aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2004-06-20 01:55:44 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2004-06-20 01:55:44 +0000
commit4d359ceaf0173107f8a897b4f930b8fce29a46ed (patch)
treeed51703f044c16f6ca291a9f4684a2137f6a863e
parentfdedc45ff6ac8d3d358f1544d3f6f2b1c66c4365 (diff)
downloadsrc-4d359ceaf0173107f8a897b4f930b8fce29a46ed.tar.gz
src-4d359ceaf0173107f8a897b4f930b8fce29a46ed.zip
This file was not part of the GDB 5.2.1 import and should have been
deleted from the vendor branch.
Notes
Notes: svn path=/vendor/gdb/dist/; revision=130758
-rw-r--r--contrib/gdb/gdb/.gdbinit16
-rw-r--r--contrib/gdb/gdb/ChangeLog-937597
-rw-r--r--contrib/gdb/gdb/ChangeLog-945705
-rw-r--r--contrib/gdb/gdb/ChangeLog-954915
-rw-r--r--contrib/gdb/gdb/ChangeLog-965116
-rw-r--r--contrib/gdb/gdb/ChangeLog-972855
-rw-r--r--contrib/gdb/gdb/ChangeLog-987122
-rw-r--r--contrib/gdb/gdb/arm-convert.s16
-rw-r--r--contrib/gdb/gdb/arm-xdep.c575
-rw-r--r--contrib/gdb/gdb/c-exp.tab.c2865
-rw-r--r--contrib/gdb/gdb/callback.c349
-rw-r--r--contrib/gdb/gdb/callback.h41
-rw-r--r--contrib/gdb/gdb/command.c1564
-rw-r--r--contrib/gdb/gdb/config/i386/cygwin32.mh6
-rw-r--r--contrib/gdb/gdb/config/i386/cygwin32.mt6
-rw-r--r--contrib/gdb/gdb/config/i386/nm-sun386.h27
-rw-r--r--contrib/gdb/gdb/config/i386/sun386.mh5
-rw-r--r--contrib/gdb/gdb/config/i386/sun386.mt3
-rw-r--r--contrib/gdb/gdb/config/i386/tm-cygwin32.h125
-rw-r--r--contrib/gdb/gdb/config/i386/tm-sun386.h205
-rw-r--r--contrib/gdb/gdb/config/i386/windows.mh17
-rw-r--r--contrib/gdb/gdb/config/i386/xm-cygwin32.h41
-rw-r--r--contrib/gdb/gdb/config/i386/xm-i386lynx.h24
-rw-r--r--contrib/gdb/gdb/config/i386/xm-linux.h36
-rw-r--r--contrib/gdb/gdb/config/i386/xm-sun386.h20
-rw-r--r--contrib/gdb/gdb/config/i386/xm-windows.h35
-rw-r--r--contrib/gdb/gdb/config/nm-empty.h2
-rw-r--r--contrib/gdb/gdb/config/nm-gnu.h43
-rw-r--r--contrib/gdb/gdb/config/nm-lynx.h85
-rw-r--r--contrib/gdb/gdb/config/nm-m3.h126
-rw-r--r--contrib/gdb/gdb/config/nm-nbsd.h87
-rw-r--r--contrib/gdb/gdb/config/nm-sysv4.h34
-rw-r--r--contrib/gdb/gdb/config/tm-lynx.h35
-rw-r--r--contrib/gdb/gdb/config/tm-nbsd.h29
-rw-r--r--contrib/gdb/gdb/config/tm-sunos.h32
-rw-r--r--contrib/gdb/gdb/config/tm-sysv4.h47
-rw-r--r--contrib/gdb/gdb/config/xm-aix4.h91
-rw-r--r--contrib/gdb/gdb/config/xm-lynx.h22
-rw-r--r--contrib/gdb/gdb/config/xm-mpw.h81
-rw-r--r--contrib/gdb/gdb/config/xm-nbsd.h26
-rw-r--r--contrib/gdb/gdb/config/xm-sysv4.h29
-rw-r--r--contrib/gdb/gdb/cpu32bug-rom.c165
-rw-r--r--contrib/gdb/gdb/cxux-nat.c537
-rw-r--r--contrib/gdb/gdb/doc/HPPA-cfg.texi114
-rw-r--r--contrib/gdb/gdb/doc/h8-cfg.texi47
-rw-r--r--contrib/gdb/gdb/doc/libgdb.texinfo878
-rw-r--r--contrib/gdb/gdb/doc/refcard.dvibin21732 -> 0 bytes
-rw-r--r--contrib/gdb/gdb/doc/remote.texi1708
-rw-r--r--contrib/gdb/gdb/f-exp.tab.c2155
-rw-r--r--contrib/gdb/gdb/gdba.el2607
-rw-r--r--contrib/gdb/gdb/gdbserver/low-linux.c451
-rw-r--r--contrib/gdb/gdb/gnu-nat.c3357
-rw-r--r--contrib/gdb/gdb/gnu-nat.h101
-rw-r--r--contrib/gdb/gdb/gnu-regex.c5797
-rw-r--r--contrib/gdb/gdb/gnu-regex.h576
-rw-r--r--contrib/gdb/gdb/go32-xdep.c35
-rw-r--r--contrib/gdb/gdb/hp-psymtab-read.c2381
-rw-r--r--contrib/gdb/gdb/hp-symtab-read.c3988
-rw-r--r--contrib/gdb/gdb/hpread.h150
-rw-r--r--contrib/gdb/gdb/i386gnu-nat.c271
-rw-r--r--contrib/gdb/gdb/irix4-nat.c207
-rw-r--r--contrib/gdb/gdb/irix5-nat.c1320
-rw-r--r--contrib/gdb/gdb/isi-xdep.c20
-rw-r--r--contrib/gdb/gdb/jv-exp.tab.c2351
-rw-r--r--contrib/gdb/gdb/kdb-start.c38
-rw-r--r--contrib/gdb/gdb/lynx-nat.c829
-rw-r--r--contrib/gdb/gdb/m2-exp.tab.c2162
-rw-r--r--contrib/gdb/gdb/m32r-rom.c626
-rw-r--r--contrib/gdb/gdb/m32r-stub.c1711
-rw-r--r--contrib/gdb/gdb/m32r-tdep.c705
-rw-r--r--contrib/gdb/gdb/m68k-stub.c1098
-rw-r--r--contrib/gdb/gdb/m68k-tdep.c685
-rw-r--r--contrib/gdb/gdb/m68klinux-nat.c710
-rw-r--r--contrib/gdb/gdb/m68knbsd-nat.c103
-rw-r--r--contrib/gdb/gdb/m88k-nat.c290
-rw-r--r--contrib/gdb/gdb/m88k-tdep.c634
-rw-r--r--contrib/gdb/gdb/mon960-rom.c260
-rw-r--r--contrib/gdb/gdb/mpw-config.in81
-rw-r--r--contrib/gdb/gdb/mpw-make.sed178
-rw-r--r--contrib/gdb/gdb/news-xdep.c65
-rw-r--r--contrib/gdb/gdb/nindy-tdep.c78
-rw-r--r--contrib/gdb/gdb/ns32k-tdep.c190
-rw-r--r--contrib/gdb/gdb/ns32km3-nat.c183
-rw-r--r--contrib/gdb/gdb/ns32knbsd-nat.c364
-rw-r--r--contrib/gdb/gdb/op50-rom.c142
-rw-r--r--contrib/gdb/gdb/os9kread.c1621
-rw-r--r--contrib/gdb/gdb/partial-stab.h812
-rw-r--r--contrib/gdb/gdb/ptx4-nat.c211
-rw-r--r--contrib/gdb/gdb/pyr-tdep.c452
-rw-r--r--contrib/gdb/gdb/pyr-xdep.c370
-rw-r--r--contrib/gdb/gdb/remote-adapt.c1524
-rw-r--r--contrib/gdb/gdb/remote-array.c1457
-rw-r--r--contrib/gdb/gdb/remote-bug.c1027
-rw-r--r--contrib/gdb/gdb/remote-d10v.c228
-rw-r--r--contrib/gdb/gdb/remote-e7000.c2227
-rw-r--r--contrib/gdb/gdb/remote-eb.c1088
-rw-r--r--contrib/gdb/gdb/remote-es.c2127
-rw-r--r--contrib/gdb/gdb/remote-est.c169
-rw-r--r--contrib/gdb/gdb/remote-hms.c157
-rw-r--r--contrib/gdb/gdb/remote-mm.c1848
-rw-r--r--contrib/gdb/gdb/remote-nindy.c762
-rw-r--r--contrib/gdb/gdb/remote-nrom.c351
-rw-r--r--contrib/gdb/gdb/remote-os9k.c1230
-rw-r--r--contrib/gdb/gdb/remote-pa.c1540
-rw-r--r--contrib/gdb/gdb/remote-sds.c1145
-rw-r--r--contrib/gdb/gdb/remote-sim.h142
-rw-r--r--contrib/gdb/gdb/remote-udi.c1722
-rw-r--r--contrib/gdb/gdb/remote-vx.c1410
-rw-r--r--contrib/gdb/gdb/remote-vx29k.c182
-rw-r--r--contrib/gdb/gdb/remote-vx68.c156
-rw-r--r--contrib/gdb/gdb/remote-vx960.c160
-rw-r--r--contrib/gdb/gdb/remote-vxmips.c199
-rw-r--r--contrib/gdb/gdb/remote-vxsparc.c194
-rw-r--r--contrib/gdb/gdb/ser-e7kpc.c438
-rw-r--r--contrib/gdb/gdb/ser-go32.c964
-rw-r--r--contrib/gdb/gdb/ser-mac.c362
-rw-r--r--contrib/gdb/gdb/ser-ocd.c209
-rw-r--r--contrib/gdb/gdb/signals.h27
-rw-r--r--contrib/gdb/gdb/somread.c743
-rw-r--r--contrib/gdb/gdb/somsolib.c1616
-rw-r--r--contrib/gdb/gdb/somsolib.h165
-rw-r--r--contrib/gdb/gdb/stop-gdb.c109
-rw-r--r--contrib/gdb/gdb/stuff.c178
-rw-r--r--contrib/gdb/gdb/symm-nat.c902
-rw-r--r--contrib/gdb/gdb/symm-tdep.c102
-rw-r--r--contrib/gdb/gdb/thread.h46
-rw-r--r--contrib/gdb/gdb/tui/ChangeLog121
-rw-r--r--contrib/gdb/gdb/tui/Makefile182
-rw-r--r--contrib/gdb/gdb/tui/Makefile.in168
-rw-r--r--contrib/gdb/gdb/tui/tui.c830
-rw-r--r--contrib/gdb/gdb/tui/tui.h120
-rw-r--r--contrib/gdb/gdb/tui/tuiCommand.c215
-rw-r--r--contrib/gdb/gdb/tui/tuiCommand.h24
-rw-r--r--contrib/gdb/gdb/tui/tuiData.c1624
-rw-r--r--contrib/gdb/gdb/tui/tuiData.h302
-rw-r--r--contrib/gdb/gdb/tui/tuiDataWin.c400
-rw-r--r--contrib/gdb/gdb/tui/tuiDataWin.h29
-rw-r--r--contrib/gdb/gdb/tui/tuiDisassem.c343
-rw-r--r--contrib/gdb/gdb/tui/tuiDisassem.h22
-rw-r--r--contrib/gdb/gdb/tui/tuiGeneralWin.c469
-rw-r--r--contrib/gdb/gdb/tui/tuiGeneralWin.h31
-rw-r--r--contrib/gdb/gdb/tui/tuiIO.c734
-rw-r--r--contrib/gdb/gdb/tui/tuiIO.h43
-rw-r--r--contrib/gdb/gdb/tui/tuiLayout.c1410
-rw-r--r--contrib/gdb/gdb/tui/tuiLayout.h15
-rw-r--r--contrib/gdb/gdb/tui/tuiRegs.c1210
-rw-r--r--contrib/gdb/gdb/tui/tuiRegs.h28
-rw-r--r--contrib/gdb/gdb/tui/tuiSource.c465
-rw-r--r--contrib/gdb/gdb/tui/tuiSource.h27
-rw-r--r--contrib/gdb/gdb/tui/tuiSourceWin.c1098
-rw-r--r--contrib/gdb/gdb/tui/tuiSourceWin.h74
-rw-r--r--contrib/gdb/gdb/tui/tuiStack.c554
-rw-r--r--contrib/gdb/gdb/tui/tuiStack.h22
-rw-r--r--contrib/gdb/gdb/tui/tuiWin.c1650
-rw-r--r--contrib/gdb/gdb/tui/tuiWin.h28
-rw-r--r--contrib/gdb/gdb/umax-xdep.c133
-rw-r--r--contrib/gdb/gdb/v850-tdep.c862
-rw-r--r--contrib/gdb/gdb/xmodem.c275
-rw-r--r--contrib/gdb/gdb/xmodem.h30
-rw-r--r--contrib/gdb/include/COPYING339
-rw-r--r--contrib/gdb/include/ChangeLog973
-rw-r--r--contrib/gdb/include/ansidecl.h141
-rw-r--r--contrib/gdb/include/aout/ChangeLog174
-rw-r--r--contrib/gdb/include/aout/adobe.h297
-rw-r--r--contrib/gdb/include/aout/aout64.h475
-rw-r--r--contrib/gdb/include/aout/ar.h36
-rw-r--r--contrib/gdb/include/aout/dynix3.h71
-rw-r--r--contrib/gdb/include/aout/encap.h135
-rw-r--r--contrib/gdb/include/aout/host.h22
-rw-r--r--contrib/gdb/include/aout/hp.h82
-rw-r--r--contrib/gdb/include/aout/hp300hpux.h119
-rw-r--r--contrib/gdb/include/aout/hppa.h7
-rw-r--r--contrib/gdb/include/aout/ranlib.h62
-rw-r--r--contrib/gdb/include/aout/reloc.h66
-rw-r--r--contrib/gdb/include/aout/stab.def264
-rw-r--r--contrib/gdb/include/aout/stab_gnu.h37
-rw-r--r--contrib/gdb/include/aout/sun4.h219
-rw-r--r--contrib/gdb/include/bfdlink.h452
-rw-r--r--contrib/gdb/include/bout.h182
-rw-r--r--contrib/gdb/include/coff/ChangeLog622
-rw-r--r--contrib/gdb/include/coff/a29k.h305
-rw-r--r--contrib/gdb/include/coff/alpha.h342
-rw-r--r--contrib/gdb/include/coff/apollo.h248
-rw-r--r--contrib/gdb/include/coff/arm.h215
-rw-r--r--contrib/gdb/include/coff/aux-coff.h31
-rw-r--r--contrib/gdb/include/coff/ecoff.h408
-rw-r--r--contrib/gdb/include/coff/h8300.h203
-rw-r--r--contrib/gdb/include/coff/h8500.h201
-rw-r--r--contrib/gdb/include/coff/i386.h224
-rw-r--r--contrib/gdb/include/coff/i860.h204
-rw-r--r--contrib/gdb/include/coff/i960.h251
-rw-r--r--contrib/gdb/include/coff/internal.h648
-rw-r--r--contrib/gdb/include/coff/m68k.h221
-rw-r--r--contrib/gdb/include/coff/m88k.h218
-rw-r--r--contrib/gdb/include/coff/mips.h368
-rw-r--r--contrib/gdb/include/coff/pe.h161
-rw-r--r--contrib/gdb/include/coff/powerpc.h196
-rw-r--r--contrib/gdb/include/coff/rs6000.h242
-rw-r--r--contrib/gdb/include/coff/sh.h253
-rw-r--r--contrib/gdb/include/coff/sparc.h209
-rw-r--r--contrib/gdb/include/coff/sym.h484
-rw-r--r--contrib/gdb/include/coff/symconst.h177
-rw-r--r--contrib/gdb/include/coff/w65.h201
-rw-r--r--contrib/gdb/include/coff/we32k.h206
-rw-r--r--contrib/gdb/include/coff/z8k.h201
-rw-r--r--contrib/gdb/include/demangle.h108
-rw-r--r--contrib/gdb/include/dis-asm.h175
-rw-r--r--contrib/gdb/include/elf/ChangeLog195
-rw-r--r--contrib/gdb/include/elf/common.h239
-rw-r--r--contrib/gdb/include/elf/dwarf.h319
-rw-r--r--contrib/gdb/include/elf/external.h195
-rw-r--r--contrib/gdb/include/elf/hppa.h94
-rw-r--r--contrib/gdb/include/elf/internal.h207
-rw-r--r--contrib/gdb/include/elf/mips.h298
-rw-r--r--contrib/gdb/include/elf/ppc.h54
-rw-r--r--contrib/gdb/include/elf/sparc.h73
-rw-r--r--contrib/gdb/include/floatformat.h88
-rw-r--r--contrib/gdb/include/fopen-bin.h27
-rw-r--r--contrib/gdb/include/fopen-same.h27
-rw-r--r--contrib/gdb/include/gdbm.h91
-rw-r--r--contrib/gdb/include/getopt.h129
-rw-r--r--contrib/gdb/include/hp-symtab.h983
-rw-r--r--contrib/gdb/include/ieee.h139
-rw-r--r--contrib/gdb/include/libiberty.h133
-rw-r--r--contrib/gdb/include/mpw/ChangeLog61
-rw-r--r--contrib/gdb/include/mpw/README1
-rw-r--r--contrib/gdb/include/mpw/dir.h23
-rw-r--r--contrib/gdb/include/mpw/dirent.h31
-rw-r--r--contrib/gdb/include/mpw/fcntl.h124
-rw-r--r--contrib/gdb/include/mpw/grp.h10
-rw-r--r--contrib/gdb/include/mpw/mpw.h130
-rw-r--r--contrib/gdb/include/mpw/pwd.h15
-rw-r--r--contrib/gdb/include/mpw/spin.h64
-rw-r--r--contrib/gdb/include/mpw/stat.h75
-rw-r--r--contrib/gdb/include/mpw/sys/file.h1
-rw-r--r--contrib/gdb/include/mpw/sys/param.h1
-rw-r--r--contrib/gdb/include/mpw/sys/resource.h9
-rw-r--r--contrib/gdb/include/mpw/sys/stat.h44
-rw-r--r--contrib/gdb/include/mpw/sys/time.h13
-rw-r--r--contrib/gdb/include/mpw/sys/types.h15
-rw-r--r--contrib/gdb/include/mpw/utime.h7
-rw-r--r--contrib/gdb/include/mpw/varargs.h9
-rw-r--r--contrib/gdb/include/nlm/ChangeLog83
-rw-r--r--contrib/gdb/include/nlm/alpha-ext.h166
-rw-r--r--contrib/gdb/include/nlm/common.h124
-rw-r--r--contrib/gdb/include/nlm/external.h174
-rw-r--r--contrib/gdb/include/nlm/i386-ext.h116
-rw-r--r--contrib/gdb/include/nlm/internal.h309
-rw-r--r--contrib/gdb/include/nlm/ppc-ext.h163
-rw-r--r--contrib/gdb/include/nlm/sparc32-ext.h120
-rw-r--r--contrib/gdb/include/oasys.h152
-rw-r--r--contrib/gdb/include/obstack.h518
-rw-r--r--contrib/gdb/include/opcode/ChangeLog812
-rw-r--r--contrib/gdb/include/opcode/a29k.h285
-rw-r--r--contrib/gdb/include/opcode/arm.h294
-rw-r--r--contrib/gdb/include/opcode/convex.h1711
-rw-r--r--contrib/gdb/include/opcode/h8300.h550
-rw-r--r--contrib/gdb/include/opcode/hppa.h471
-rw-r--r--contrib/gdb/include/opcode/i386.h898
-rw-r--r--contrib/gdb/include/opcode/i860.h491
-rw-r--r--contrib/gdb/include/opcode/i960.h509
-rw-r--r--contrib/gdb/include/opcode/m68k.h297
-rw-r--r--contrib/gdb/include/opcode/m88k.h923
-rw-r--r--contrib/gdb/include/opcode/mips.h481
-rw-r--r--contrib/gdb/include/opcode/np1.h422
-rw-r--r--contrib/gdb/include/opcode/ns32k.h491
-rw-r--r--contrib/gdb/include/opcode/pn.h282
-rw-r--r--contrib/gdb/include/opcode/ppc.h248
-rw-r--r--contrib/gdb/include/opcode/pyr.h287
-rw-r--r--contrib/gdb/include/opcode/rs6k.h254
-rw-r--r--contrib/gdb/include/opcode/sparc.h220
-rw-r--r--contrib/gdb/include/opcode/tahoe.h213
-rw-r--r--contrib/gdb/include/opcode/vax.h382
-rw-r--r--contrib/gdb/include/os9k.h169
-rw-r--r--contrib/gdb/include/progress.h37
-rw-r--r--contrib/gdb/include/wait.h63
-rw-r--r--contrib/gdb/libiberty/COPYING.LIB481
-rw-r--r--contrib/gdb/libiberty/ChangeLog1815
-rw-r--r--contrib/gdb/libiberty/Makefile.in321
-rw-r--r--contrib/gdb/libiberty/README129
-rw-r--r--contrib/gdb/libiberty/alloca-botch.h5
-rw-r--r--contrib/gdb/libiberty/alloca-norm.h16
-rw-r--r--contrib/gdb/libiberty/alloca.c475
-rw-r--r--contrib/gdb/libiberty/argv.c328
-rw-r--r--contrib/gdb/libiberty/atexit.c14
-rw-r--r--contrib/gdb/libiberty/basename.c43
-rw-r--r--contrib/gdb/libiberty/bcmp.c49
-rw-r--r--contrib/gdb/libiberty/bcopy.c35
-rw-r--r--contrib/gdb/libiberty/bzero.c31
-rw-r--r--contrib/gdb/libiberty/clock.c73
-rw-r--r--contrib/gdb/libiberty/concat.c167
-rw-r--r--contrib/gdb/libiberty/config.table63
-rw-r--r--contrib/gdb/libiberty/config/mh-a68bsd2
-rw-r--r--contrib/gdb/libiberty/config/mh-aix10
-rw-r--r--contrib/gdb/libiberty/config/mh-apollo682
-rw-r--r--contrib/gdb/libiberty/config/mh-cxux73
-rw-r--r--contrib/gdb/libiberty/config/mh-go324
-rw-r--r--contrib/gdb/libiberty/config/mh-hpbsd2
-rw-r--r--contrib/gdb/libiberty/config/mh-irix44
-rw-r--r--contrib/gdb/libiberty/config/mh-lynxos1
-rw-r--r--contrib/gdb/libiberty/config/mh-ncr300019
-rw-r--r--contrib/gdb/libiberty/config/mh-riscix6
-rw-r--r--contrib/gdb/libiberty/config/mh-sysv1
-rw-r--r--contrib/gdb/libiberty/config/mh-sysv43
-rw-r--r--contrib/gdb/libiberty/config/mt-sunos42
-rw-r--r--contrib/gdb/libiberty/config/mt-vxworks527
-rw-r--r--contrib/gdb/libiberty/configure.bat15
-rw-r--r--contrib/gdb/libiberty/configure.in77
-rw-r--r--contrib/gdb/libiberty/copysign.c140
-rw-r--r--contrib/gdb/libiberty/cplus-dem.c3019
-rw-r--r--contrib/gdb/libiberty/dummy.c49
-rw-r--r--contrib/gdb/libiberty/fdmatch.c73
-rw-r--r--contrib/gdb/libiberty/floatformat.c385
-rw-r--r--contrib/gdb/libiberty/functions.def67
-rw-r--r--contrib/gdb/libiberty/getcwd.c52
-rw-r--r--contrib/gdb/libiberty/getopt.c757
-rw-r--r--contrib/gdb/libiberty/getopt1.c190
-rw-r--r--contrib/gdb/libiberty/getpagesize.c89
-rw-r--r--contrib/gdb/libiberty/getruntime.c82
-rw-r--r--contrib/gdb/libiberty/hex.c33
-rw-r--r--contrib/gdb/libiberty/index.c11
-rw-r--r--contrib/gdb/libiberty/insque.c50
-rw-r--r--contrib/gdb/libiberty/makefile.dos29
-rw-r--r--contrib/gdb/libiberty/memchr.c60
-rw-r--r--contrib/gdb/libiberty/memcmp.c38
-rw-r--r--contrib/gdb/libiberty/memcpy.c28
-rw-r--r--contrib/gdb/libiberty/memmove.c18
-rw-r--r--contrib/gdb/libiberty/memset.c19
-rw-r--r--contrib/gdb/libiberty/mpw-config.in9
-rw-r--r--contrib/gdb/libiberty/mpw-make.sed49
-rw-r--r--contrib/gdb/libiberty/mpw.c1010
-rw-r--r--contrib/gdb/libiberty/msdos.c15
-rw-r--r--contrib/gdb/libiberty/obstack.c507
-rw-r--r--contrib/gdb/libiberty/random.c373
-rw-r--r--contrib/gdb/libiberty/rename.c22
-rw-r--r--contrib/gdb/libiberty/rindex.c11
-rw-r--r--contrib/gdb/libiberty/sigsetmask.c30
-rw-r--r--contrib/gdb/libiberty/spaces.c71
-rw-r--r--contrib/gdb/libiberty/strcasecmp.c81
-rw-r--r--contrib/gdb/libiberty/strchr.c34
-rw-r--r--contrib/gdb/libiberty/strdup.c10
-rw-r--r--contrib/gdb/libiberty/strerror.c829
-rw-r--r--contrib/gdb/libiberty/strncasecmp.c82
-rw-r--r--contrib/gdb/libiberty/strrchr.c34
-rw-r--r--contrib/gdb/libiberty/strsignal.c627
-rw-r--r--contrib/gdb/libiberty/strstr.c51
-rw-r--r--contrib/gdb/libiberty/strtod.c122
-rw-r--r--contrib/gdb/libiberty/strtol.c143
-rw-r--r--contrib/gdb/libiberty/strtoul.c110
-rw-r--r--contrib/gdb/libiberty/tmpnam.c39
-rw-r--r--contrib/gdb/libiberty/vasprintf.c165
-rw-r--r--contrib/gdb/libiberty/vfork.c8
-rw-r--r--contrib/gdb/libiberty/vfprintf.c13
-rw-r--r--contrib/gdb/libiberty/vmsbuild.com142
-rw-r--r--contrib/gdb/libiberty/vprintf.c11
-rw-r--r--contrib/gdb/libiberty/vsprintf.c55
-rw-r--r--contrib/gdb/libiberty/waitpid.c11
-rw-r--r--contrib/gdb/libiberty/xatexit.c82
-rw-r--r--contrib/gdb/libiberty/xexit.c36
-rw-r--r--contrib/gdb/libiberty/xmalloc.c106
-rw-r--r--contrib/gdb/libiberty/xstrdup.c17
-rw-r--r--contrib/gdb/libiberty/xstrerror.c54
362 files changed, 0 insertions, 166798 deletions
diff --git a/contrib/gdb/gdb/.gdbinit b/contrib/gdb/gdb/.gdbinit
deleted file mode 100644
index f60802e50093..000000000000
--- a/contrib/gdb/gdb/.gdbinit
+++ /dev/null
@@ -1,16 +0,0 @@
-echo Setting up the environment for debugging gdb.\n
-
-set complaints 1
-
-b fatal
-
-b info_command
-commands
- silent
- return
-end
-
-dir ../mmalloc
-dir ../libiberty
-dir ../bfd
-set prompt (top-gdb)
diff --git a/contrib/gdb/gdb/ChangeLog-93 b/contrib/gdb/gdb/ChangeLog-93
deleted file mode 100644
index 463154d9ce83..000000000000
--- a/contrib/gdb/gdb/ChangeLog-93
+++ /dev/null
@@ -1,7597 +0,0 @@
-Fri Dec 31 14:33:49 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * nindy-share/nindy.c: Fix order of arguments to store_unsigned_integer
- (second and third arguments were reversed).
- (say): Use varargs.
-
-Fri Dec 31 12:13:47 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * remote-mips.c: Add timeout parameter to mips_request and
- mips_receive_packet.
- (callers): pass in mips_receive_wait except mips_initialize (where
- we use it to clean up the kludge where we had been changing
- mips_receive_wait temporarily) and mips_wait (where we pass in
- -1 for no timeout).
-
-Fri Dec 31 14:33:49 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stack.c (print_block_frame_locals): Also print LOC_BASEREG variables.
-
-Fri Dec 31 06:55:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symtab.c (find_methods): Call fprintf_symbol_filtered with DMGL_ANSI.
-
-Thu Dec 30 10:16:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * values.c (unpack_long): Fix garbled error message.
-
- * remote-mips.c (mips_error): New function.
- * remote-mips.c: Use it instead of error() most places.
- * remote-mips.c (mips_receive_packet): New arg throw_error.
- (mips_initialize): Use it not catch_errors.
- * defs.h: Declare error_pre_print and warning_pre_print here...
- * main.c: ...not here.
-
- * breakpoint.c (breakpoint_chain): Make static.
- * breakpoint.c, breakpoint.h (frame_in_dummy): New function.
- * stack.c (print_frame_info): Use it.
-
-Thu Dec 30 07:41:36 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * exec.c (add_to_section_table): Check for SEC_ALLOC instead of
- SEC_LOAD to handle .bss segments properly.
-
-Thu Dec 30 10:16:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c (wait_for_inferior): Enable code which assumes that if
- we jump into the prologue from another function, then it was a
- subroutine call. #if 0 AT_FUNCTION_START; the above code should
- take care of this case.
-
-Wed Dec 29 12:32:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * valprint.c (val_print_string): Change chunksize from 200
- to 8.
-
- * symfile.c (generic_load): If no arguments, get file name
- from get_exec_file.
-
- * c-exp.y: Revert Kung's change. "..." is not a type, and the
- change caused "p (...)0" to dump core.
- * gdbtypes.c (check_stub_method): Don't pass "..." to
- parse_and_eval_type. This should fix the bug which Kung was
- trying to fix.
-
- * stabsread.c (define_symbol): If we choose not to combine
- two symbols, don't just ignore the second (LOC_REGISTER) one.
- * printcmd.c (print_frame_args): If we have a LOC_ARG and a
- LOC_REGISTER, use the LOC_ARG not the LOC_REGISTER.
-
-Tue Dec 28 15:08:00 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * solib.c (DEBUG_BASE): Remove macro and all references.
- * solib.c (debug_base_symbols): Add array of symbols to lookup.
- * solib.c (IGNORE_FIRST_LINK_MAP_ENTRY): Add macro.
- * solib.c (look_for_base, locate_base): Use debug_base_symbols.
- * solib.c (find_solib): Use IGNORE_FIRST_LINK_MAP_ENTRY.
-
-Tue Dec 28 12:06:57 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * c-exp.y : fix grammar to parse ellipsis (...)
-
-Mon Dec 27 18:42:14 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * stabsread.c (read_type): fix problem when reading static member
- of a class. caused by change to allow :: inside template
- instantiated name.
-
-Mon Dec 27 11:07:05 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbtypes.h: Expand on comments for TYPE_CODE_BITSTRING and
- TYPE_CODE_STRING a bit.
-
- * m68k-tdep.c (m68k_skip_prologue, m68k_find_saved_regs):
- Allow pea %fp; move.l %sp, %fp instead of link instruction to
- set up the new frame.
-
- * main.c (init_main): Change "set remotedebug" back to var_zinteger
- from var_boolean.
-
- * c-exp.y (yylex): Don't try to deal with nested types.
-
- * cp-valprint.c (cplus_print_value): Call check_stub_type on
- TYPE_BASECLASS (type, i) before we look at its name.
-
- * dbxread.c: Move default definition of GCC_COMPILED_FLAG_SYMBOL
- from here . . .
- * symtab.h: . . . to here.
- * dbxread.c (record_minimal_symbol): Move check for gcc{,2}_compiled.
- and __gnu_compiled* from here . . .
- * minsyms.c (prim_record_minimal_symbol_and_info): . . . to here.
- * minsyms.c (prim_record_minimal_symbol): Call
- prim_record_minimal_symbol_and_info rather than duplicating code.
- * minsyms.c, symtab.h (prim_record_minimal_symbol{,_and_info}),
- coffread.c (record_minimal_symbol),
- xcoffread.c (RECORD_MINIMAL_SYMBOL), callers: Add objfile parameter.
-
-Sun Dec 26 20:44:02 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * dbxread.c (process_one_symbol): Handle stabs-in-som just like
- stabs-in-elf.
- (pastab_build_psymtabs): Likewise.
-
- * hppa-tdep.c: Change all comments to reference %r3 or frame
- pointer rather than %r4.
- (frame_chain, skip_prologue, dig_rp_from_stack): Handle %r3 as the
- frame pointer.
-
- * config/pa/tm-hppa.h (FP_REGNUM): Define as %r3.
- (FIND_FRAME_SAVED_REGS): Handle %r3 as frame pointer.
- (CALL_DUMMY): Likewise.
-
-Sun Dec 26 16:59:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * exec.c (exec_file_command): If error occurs after we have opened
- exec_bfd but before we call push_target, make sure to close exec_bfd.
-
- * infrun.c (wait_for_inferior): Remove confusing and inaccurate
- stuff about subroutine calls, return, etc., from comment which
- says "We've wandered out of the step range.".
-
-Sun Dec 26 09:18:10 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * infrun.c (wait_for_inferior): When checking whether the line has
- changed, check the symtab as well.
-
-Sun Dec 26 09:18:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbtypes.c (force_to_range_type): Use switch statement.
- complain() not warning() if the TYPE_CODE isn't one we know how to
- deal with gracefully. Use builtin_type_int not
- lookup_fundamental_type (the objfile we passed to
- lookup_fundamental_type was sometimes NULL).
-
- * valops.c (call_function_by_hand, push_word), defs.h (push_word),
- convex-xdep.c, m88k-nat.c, i386m3-nat.c, mips-tdep.c, mipsm3-nat.c,
- ns32km3-nat.c, remote-bug.c, m88k-tdep.c, remote-hms.c, remote-mips.c,
- config/gould/tm-np1.h, hppa-tdep.c (hppa_fix_call_dummy), remote-vx.c:
- Use REGISTER_SIZE, unsigned LONGEST, and
- {store,extract}_unsigned_integer, instead of sizeof
- (REGISTER_TYPE) and REGISTER_TYPE.
- * All tm.h files: Change REGISTER_TYPE to REGISTER_SIZE.
- * hppa-tdep.c (pa_print_fp_reg): Remove unused variable val.
-
- * Makefile.in (ALLDEPFILES): Remove i386ly-nat.c and m68kly-nat.c.
- Add lynx-nat.c.
-
-Sat Dec 25 20:05:41 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (init_extra_frame_info): Correctly adjust the base
- of the current frame when "fromleaf" is true. Do not adjust the
- frame base of the innermost frame if it is a leaf function.
-
-Sat Dec 25 13:39:21 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c (define_symbol): Only combine a p/r pair into a
- LOC_REGPARM if REG_STRUCT_HAS_ADDR.
-
-Sat Dec 25 09:50:29 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * valops.c (value_struct_elt): Check for (value)-1 return from
- search_struct_method.
-
-Sat Dec 25 09:50:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * defs.h: Move definitions of TARGET_*_BIT after include of tm.h.
- The old way (using #undef in tm.h) was ugly and asking for
- trouble, because it makes it possible for some file to use the
- wrong definition. Move definition of HOST_CHAR_BIT after definition
- of TARGET_CHAR_BIT.
- * config/alpha/tm-alpha.h, config/h8300/tm-h8300.h,
- config/h8500/tm-h8500.h, config/z8k/tm-z8k.h: Don't undef TARGET_*_BIT
- before defining them.
-
- * mdebugread.c: Change the builtin_type_* in this file to
- mdebug_type_* and make them static. Use TYPE_CODE_ERROR for
- complex and float decimal.
-
- * printcmd.c (disassemble_command): Call wrap_here between printing
- address and printing instruction.
-
-Fri Dec 24 14:23:57 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c (read_type): Don't fall through 'S' case (the case it
- was falling though happened to do the right thing ("break;") but that
- is hardly a good thing to assume).
-
-Tue Dec 21 13:32:02 1993 Per Bothner (bothner@kalessin.cygnus.com)
-
- * ch-exp.y (match_dollar_tokens): Fix off-by-one bug.
- * ch-lang.c (chill_is_varying_struct), ch-lang.h: New function.
- * ch-lang.c (chill_printstr): Use double quotes, not single quotes.
- * ch-typeprint.c (chill_type_print_base): Handle TYPE_CODE_BITSTRING.
- Improve printing of TYPE_CODE_STRING, TYPE_CODE_SET, and
- TYPE_CODE_STRUCT (including checking chill_is_varying_struct).
- Print TYPE_DUMMY_RANGE by printing its TYPE_TARGET_TYPE.
- Handle TYPE_CODE_ENUM.
- * ch-valprint.c (chill_val_print): Handle TYPE_CODE_BITSTRING.
- For TYPE_CODE_STRING, never print address. Handle VARYING strings.
- * gdbtypes.c (force_to_range_type): New.
- * gdbtypes.c (create_set_type): Make work, following Chill layout.
- * gdbtypes.h (TYPE_LOW_BOUND, TYPE_HIGH_BOUND, TYPE_DUMMY_RANGE): New.
- * stabsread.c (read_type): Distinguish string and bitstring from
- char-array and set.
- * valarith.c (value_subscript), valops.c (value_coerce_array):
- Handle STRINGs as well as ARRAYs.
- * valarith.c (value_bit_index): Fix think. Use new macros.
-
-
-Fri Dec 17 10:45:32 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * symtab (decode_line_1): fix a bug when position char is not
- set correctly.
- * c-valprint (c_val_print): handle vtbl printing when vtbl is not
- set up yet.
-
-Thu Dec 16 16:46:01 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips-tdep.c (read_next_frame_reg): If SIGFRAME_REG_SIZE is not
- defined, define it as 4.
-
-Thu Dec 16 13:08:01 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * config/m68k/nm-hp300bsd.h: Correctly identify 4.3BSD vs 4.4BSD.
-
- * config/m68k/tm-hp300bsd.h (REMOTE_BPT_VECTOR): Define.
-
- * config/m68k/tm-m68k.h (REMOTE_BPT_VECTOR): Allow targets to
- override.
- (REMOTE_BREAKPOINT): Likewise.
-
-Thu Dec 16 09:14:58 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hp_function_type): Correctly handle
- pass-by-value structures > 64bits in size.
- (process_one_debug_symbol): Likewise.
-
-Mon Dec 13 20:17:39 1993 Per Bothner (bothner@kalessin.cygnus.com)
-
- Implement support for Chill POWERSETs.
- * ch-exp.y (operand_2): Implement 'Element IN PowerSet'.
- * ch-typeprint.c (chill_type_print_base): Handle POWERSETs.
- * ch-valprint.c (chill_val_print): Handle TYPE_CODE_SET.
- * eval.c (evaluate_subexp): Implement BINOP_IN.
- * expression.h (enum exp_opcode): Added BINOP_IN.
- * gdbtypes.c (create_set_type), gdbtypes.h: New function.
- * stabsread.c (read_type): If 'S', create a set type.
- * valarith.c (value_bit_index, value_in), value.h: New functions,
- for indexing in SETs.
-
-Mon Dec 13 06:42:37 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * paread.c (pa_symfile_init): Check for the existance of stabs
- after DBX_TEXT_SECT has been initialized.
-
-Tue Nov 23 17:29:28 1993 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * config/h8300/tm-h8300.h (BREAKPOINT): Insn changed to sleep.
- (DECP_PC_AFTER_BREAK): Now is 0.
- * config/h8500/tm-h8500.h (REGISTER_BYTES, REGISTER_BYTE,
- REGISTER_NAMES): update to new view. (INIT_EXTRA_FRAME_INFO): No
- extra frame info now.
- * config/sh/sh.h (NOP): Define NOP insn.
- * config/z8k/tm-z8k.h (BIG): is now sim_z8001_mode.
- * config/z8k/z8ksim.mt (TDEPFILES): Add remote-sim.o to list.
- * ser-go32.c: Lint. (strncasecmp): Removed, now in libiberty.
- (go32_readchar): Special handling for faster polling. (async
- structure): Volatile.
- * h8300-tdep.c (print_register_hook): Allocate and use the right
- number bytes for the raw register.
- * h8500-tdep.c (regoff, frame_find_saved_reg, examine_prologue):
- deleted. (h8500_register_size, h8500_register_virtual_type, ):
- Use new way of counting registers.
- * remote-e7000.c (echo_index): deleted. (expect): Better handling
- of user interrupts. (expect_prompt): Remove never used log file
- support. (want, want_nopc): Add support for H8/300H.
- (fetch_regs_from_dump): Treat \r and \n as whitespace.
- (e7000_drain): Send an "end" command before waiting for output to
- stop. (e7000_wait): Cope with H8/300H, better handling of user
- interrupts. (why_stop, expect_n, sub2_from_pc): New function.
- * remote-utils.c (gr_load_image): call fflush and QUIT more regularly.
- * utils.c (notice_quit): New function for polling for user interrupts.
-
-Fri Dec 10 15:53:56 1993 Per Bothner (bothner@kalessin.cygnus.com)
-
- * stabsread.c (read_array_type): Allow negative array bounds,
- without interpreting that to mean "adjustable."
- * ch-valprint.c (chill_val_print): Handle RANGE types.
- * ch-typeprint.c (chill_type_print_base): Handle BOOL.
- Handle variant records. Handle RANGE types.
-
-Tue Dec 7 15:41:32 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * config/mips/idt.mt: Use tm-idt.h instead of tm-bigmips.h.
- * config/mips/idtl.mt: Use tm-idtl.h instead of tm-mips.h.
- * config/mips/tm-idt.h, config/mips/tm-idtl.h: New files; use
- different BREAKPOINT value for IDT.
-
- * mipsread.c: Include bfd.h and coff/sym.h.
-
-Mon Dec 6 16:34:10 1993 K. Richard Pixley (rich@cygnus.com)
-
- * ser-unix.c (set_tty_state): set the rest of the terminal state
- pieces.
-
-Mon Dec 6 12:01:37 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in: Recognize mips* for all mips targets.
- (mips*el-*-elf*, mips*-*-elf*): New targets; use idt and idtl.
-
- Added Irix 5 support.
- * configure.in (mips-sgi-irix5*): New host and target. Use irix5
- for both.
- * config/mips/irix5.mh, config/mips/irix5.mt,
- config/mips/xm-irix5.h, config/mips/nm-irix5.h,
- config/mips/tm-irix5.h, irix5-nat.c: New files for Irix 5 support.
- * mdebugread.c: New file, split out of mipsread.c. Added
- elfmdebug_build_psymtabs routine. Added some checks on external
- symbols. Changed code to keep ecoff_debug_info and
- ecoff_debug_swap structs in the psymtab and in global pointers
- rather than retrieving them from the bfd. Also changed to keep
- the pending list with the psymtab rather than the objfile (each
- psymtab for a single objfile points to the same pending list).
- * mipsread.c: Bulk of file moved into mdebugread.c, leaving just
- the sym_fns.
- * Makefile.in (SFILES): Added mdebugread.c.
- (OBS): Added mdebugread.o.
- (mdebugread.o): New target.
- * symfile.h: Declare mdebug_build_psymtabs and
- elfmdebug_build_psymtabs.
- * elfread.c (struct elfinfo): Added mdebugsect field.
- (elf_locate_sections): Remember location of .mdebug section.
- (elf_symfile_read): Call elfmdebug_build_psymtabs on .mdebug
- section.
- * infrun.c (AT_FUNCTION_START): Set to 0 if not already defined.
- (wait_for_inferior): Use AT_FUNCTION_START if it is defined to see
- if PC is at the start of a function.
- * mips-tdep.c (read_next_frame_reg): Use SIGFRAME_REG_SIZE, and
- give it a default definition.
- (mips_skip_prologue): Skip instructions which initialize $gp
- register.
- (in_sigtramp): New procedure, moved in from mipsread.c.
- * config/mips/tm-mips.h: Declare in_sigtramp.
-
- * serial.h (serial_fdopen): Make parameter const to match
- function definition.
-
-Fri Dec 3 14:20:43 1993 Stu Grossman (grossman at cygnus.com)
-
- * config/mips/irix4.mh: Enable ser-tcp.o.
-
-Tue Nov 30 15:24:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in (check): Do not use subdir_do, so that
- TARGET_FLAGS_TO_PASS is used correctly.
-
-Mon Nov 29 16:10:38 1993 Stu Grossman (grossman at cygnus.com)
-
- * i386-nlmstub.c: Undo I/O redirection changes by Tom Lord.
- These definitely won't work under Netware.
-
-Mon Nov 29 15:34:58 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * stabsread.c(read_struct_field): Fix the check when getting to
- member functions.
-
-Mon Nov 29 16:48:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- gcc -Wall -O lint:
- * mips-tdep.c (heuristic_proc_desc): Initialize reg30 to avoid
- warning. Unnest comment.
- (init_extra_frame_info): Remove unused variable mask.
- (MASK): Fully parenthesize.
- (mips_push_dummy_frame): Remove unused variable val.
- (mips_skip_prologue): Remove unused variables f and b.
-
-Mon Nov 29 12:23:25 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c (parse_symbol, parse_partial_symbols): Do not create
- (partial) symbols for opaque struct definitions.
-
-Mon Nov 29 11:36:57 1993 Stu Grossman (grossman at cygnus.com)
-
- * i386ly-tdep.c (i386lynx_saved_pc_after_call): Change call_inst
- to unsigned char to avoid domain warning for some values.
-
-Mon Nov 22 23:42:59 1993 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * remote-e7000.c (e7000_wait): Cope with H8/300 register dump.
- * config/h8300/h8300hms.mt: Add remote-e7000.
-
-Mon Nov 22 11:03:45 1993 Fred Fish (fnf@cygnus.com)
-
- Merged changes from kev@spuds.geg.mot.com (Kevin A. Buettner):
- * gdb/config/m88k/delta88.mh (NATDEPFILES): Added corelow.o and
- coredep.o to this list.
- * gdb/m88k-nat.c (m88k_register_u_addr): Avoid error when passed
- the number for an M88110 extended register by just returning the
- address of r0.
-
-Sat Nov 20 09:20:51 1993 Fred Fish (fnf@rtl.cygnus.com)
-
- * go32-xdep.c (re_comp, re_exec): Remove stubs now that gdb
- always uses it's own version of regex.
-
-Fri Nov 19 18:23:19 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * valops.c(value_struct_elt_for_reference): enhance search operator in
- c++.
- * symtab.c(decode_line_1): same as above.
-
-Fri Nov 19 15:08:47 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symtab.c (decode_line_1): Add comment about use of
- return_to_top_level directly instead of error. Add comment saying
- that the '' should not be needed--that the completer should be fixed.
-
-Fri Nov 19 11:00:33 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * symtab.c(decode_line_1): fix the inconsistency of setting
- breakpoint with '' or without them. The '' is needed when you
- want name completion.
-
-Thu Nov 18 08:25:50 1993 Fred Fish (fnf@cygnus.com)
-
- * valprint.c (val_print_string): When looking for a null
- terminator compare current bufsize to fetchlimit to determine
- when to stop, instead of computing buffer+fetchlimit which
- may overflow for very large limits (like "unlimited").
-
-Wed Nov 17 18:23:09 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * eval.c(evaluate_subexp): to use unified search so type conversion
- operator works in calling method.
- * valarith.c(value_x_binop, value_x_unop): same as above.
- * valops.c(search_struct_method): same as above.
-
-Wed Nov 17 18:47:34 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mipsread.c: Change use of ECOFF information to correspond to
- changes in bfd/libecoff.h.
- (mipscoff_symfile_offsets): Made static.
-
-Wed Nov 17 09:43:31 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * valops.c (typecmp): improve prototype matching when calling
- a method. Make 'p (*(ostream *) &cout) << "lll" ' to work.
- * eval.c(evalute_subexp): fix operator search problem when call
- like p x.'operator+'(i).
-
-Tue Nov 16 17:15:03 1993 Stu Grossman (grossman at cygnus.com)
-
- * i386ly-nat.c, i386lynx-nat.c, m68kly-nat.c: Remove. Move
- common code into lynx-nat.c.
- * lynx-nat.c: New module. Contains portable code for Lynx native
- stuff (mostly ptrace related).
- * config/i386/i386lynx.mh (NATDEPFILES): i386ly-nat.o -> lynx-nat.o
- * config/m68k/m68klynx.mh (NATDEPFILES): i386ly-nat.o -> lynx-nat.o
-
- * config/nm-lynx.h, config/tm-lynx.h: New files to contain
- non-architecture specific native and target defs.
- * config/i386/nm-i386lynx.h, config/i386/tm-i386lynx.h,
- config/m68k/nm-m68klynx.h, config/m68k/tm-m68klynx.h: Move all
- (arch) portable stuff into ../{tm nm}-lynx.h.
-
-Tue Nov 16 13:33:47 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symtab.c (gdb_mangle_name): Only assume that the physname is
- the entire mangled name if it looks like the mangled name of a
- constructor. Needed for testsuite to work with GCC 2.4.5.
-
- * a68v-nat.c: Replace with new version from Troy Rollo. The
- version I am replacing appears to be an old copy of sun3-nat.c.
- * dstread.c (dst_symfile_read): Replace sort_all_symtab_syms call
- with loop.
-
- * Makefile.in (TAGS): Depend on TAGFILES_{NO,WITH}_SRCDIR.
-
- * Makefile.in: (HFILES,TAGFILES): Split into _WITH_SRCDIR and
- _NO_SRCDIR versions.
- (TAGS): Only add srcdir to TAGFILES_NO_SRCDIR.
- (This is part of a long saga involving me putting srcdir on
- everything (perhaps for now-obsolete reasons, I forget), Rich
- removing the srcdir from everything, Stu putting it back some
- places for Sun make, and me just now getting around to fixing
- `make TAGS' again).
-
-Mon Nov 15 12:29:10 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * stack.c(print_frame_info): print demangled function name
- ansi style.
-
-Mon Nov 15 14:32:29 1993 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * remote-e7000.c: New file to cope with the Hitachi E7000 ICE.
- * remote-utils.c, remote-utils.h (gr_load_image): New function to
- download to target.
- * h8300-tdep.c, h8500-tdep.c, remote-z8k.c, sh-tdep.c z8k-tdep.c
- (sim_load): delete.
- * remote-sim.c (gdbsim_load): Use gr_load_image, rather than
- sim_load.
- * config/sh/sh.mt: Add remote-e7000
-
-Mon Nov 15 11:38:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/i386/linux.mh: Remove XM_CLIBS, TERMLIB, SYSV_DEFINE, and
- REGEX.
- * config/i386/xm-linux.h: Don't include xm-i386v.h. Define
- HOST_BYTE_ORDER ourselves. Define HAVE_TERMIOS not HAVE_TERMIO.
- Define NEED_POSIX_SETPGID. Include unistd.h.
-
-Mon Nov 15 12:29:10 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * symtab.c(gdb_mangle_name): fix the problem with constructor
- name mangling.
-
-Mon Nov 15 11:38:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbtypes.h: Add TYPE_FLAG_TARGET_STUB.
- * gdbtypes.c (check_stub_type): On TYPE_FLAG_TARGET_STUB, do
- what cleanup_undefined_types does for arrays, except we clear
- TYPE_FLAG_TARGET_STUB if we fix up the type.
- * stabsread.c (cleanup_undefined_types): Add comments about how
- doing arrays here is no longer the clean way to do it.
- (read_array_type): Set TYPE_FLAG_TARGET_STUB as well as calling
- add_undefined_type.
- * c-typeprint.c, ch-typeprint.c: Move call to check_stub_type
- outside switch so it happens for all type codes.
- * cp-valprint.c (cp_print_value_fields): Recurse to val_print,
- instead of c_val_print, so that check_stub_type gets called.
-
- * gdbtypes.h, gdbtypes.c, m2-lang.c, ch-lang.c, c-lang.c: Remove
- TYPE_FLAG_SIGNED. It was inconsistently set, never checked
- (except in recursive_dump_type), and is pointless.
-
-Mon Nov 15 00:40:38 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * paread.c (pa_symfile_init): Look for the $TEXT$ section rather
- than the .text section.
-
-Sun Nov 14 00:28:13 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c: Remove #if 0'd dbx_class_complaint. We now handle
- this (more or less) gracefully, and complain() was never a good
- way of dealing with this.
-
- * stabsread.c (read_type): Skip the colon when reading a
- cross-reference. Only complain, not error_type, on unrecognized
- cross-reference types. error_type, not dump core, if the colon is
- missing.
-
-Fri Nov 12 16:23:08 1993 Stu Grossman (grossman at cygnus.com)
-
- * config/m68k/tm-sun3.h: Disable use of alternate breakpoint insn
- when doing remote stuff.
-
-Fri Nov 12 16:22:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * c-exp.y (yylex): Call lookup_symtab not lookup_partial_symtab.
-
- * partial-stab.h: Ignore ':' symbol descriptors. Same case as
- Kung's stabsread.c change.
-
-Fri Nov 12 11:18:02 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * stabsread.c (patch_block_stabs, define_symbol, read_type): in
- g++ template instantiation, nested class can be part of the
- params, and '::' can gets into symbol or type names. This is
- to fix the problem.
-
- * gdbtypes.c (lookup_struct_elt_type): Handle type ref or pointer
- to struct/union case.
-
-Fri Nov 12 10:39:31 1993 Stu Grossman (grossman at cygnus.com)
-
- * coff-solib.c (coff_solib_add): Cast result of alloca().
- * m68k-tdep.c (m68k_saved_pc_after_call): Get rid of
- GDB_TARGET_IS_SUN3. Use more general SYSCALL_TRAP macro.
- * config/m68k/m68klynx.mh (NATDEPFILES): Remove exec.o (it's
- already in TDEPFILES).
- * config/m68k/tm-m68k.h (SAVED_PC_AFTER_CALL): Use
- m68k_saved_pc_after_call.
- * Remove all Sun3 specific stuff.
- * (FIX_CALL_DUMMY): Cast arg to bfd_putb32 to unsigned char *.
- * config/m68k/tm-m68klynx.h: Define SYSCALL_TRAP as trap #10.
- Disable REMOTE_BREAKPOINT mechanism.
- * config/m68k/tm-sun3.h: Get rid of GDB_TARGET_IS_SUN3.
- * Protect from multiple includion.
- * Move Sun3 specific stuff from tm-m68k.h to here.
- * Define SYSCALL_TRAP as trap #0.
- * Remove def of SAVED_PC_AFTER_CALL (now in tm-m68k.h).
- * gdbserver/low-lynx.c: Redo all register store/fetch stuff to
- make it portable for 386 and 68k.
-
-Fri Nov 12 09:53:26 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * mips-tdep.c (init_extra_frame_info): Check to see whether the
- registers mentioned in the proc_desc have been saved. This
- generalizes mips_in_lenient_prologue in the sense that we keep
- searching until we've found saves for all the registers, not just
- look for a "lenient prologue" pattern.
- * mips-tdep.c: #if 0 lenient prologue code.
-
- * mips-tdep.c (heuristic_proc_desc): Don't assume a host short
- is 16 bits.
-
-Thu Nov 11 19:58:05 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/i386/i386sol2.mh: Comment out corelow.o.
-
- * printcmd.c (address_info): Use filtered, not unfiltered functions.
- We should be able to deal with a QUIT here.
-
-Thu Nov 11 15:22:20 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * printcmd.c (address_info): Use fprintf_symbol_filtered
- to print the symbol name.
-
- * stabsread.c (define_symbol): Handle cfront lossage for
- struct/union/enums and typedefs.
-
- * partial-stab.h (case N_BINCL): Update psymtab_language
- as appropriate when changing subfiles.
- (case N_SOL): Update psymtab_language as appropriate when
- changing subfiles. Add typedef for structs, unions, and enums
- when processing C++ files.
-
-Thu Nov 11 13:18:47 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * README: Remove information on languages and just cite the (newly
- updated) information in doc/gdb.texinfo instead.
-
- * delta68-nat.c: Fix typos (add missing ");" and stuct -> struct).
-
-Wed Nov 10 09:31:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dbxread.c (process_one_symbol, N_RBRAC): Don't clear
- within_function just because local_symbols is NULL. It appears
- that this bug has existed since the 10 Apr 89 change which started
- clearing within_function here.
-
- * config/m68k/tm-m68k.h: Clean up CALL_DUMMY comment.
- * config/m68k/{tm-hp300bsd.h,tm-hp300hpux.h,tm-m68k-em.h,
- tm-monitor.h,tm-sun3.h,tm-vx68.h}, config/sparc/tm-sparc.h:
- Define BELIEVE_PCC_PROMOTION.
- * dbxread.c: Remove BELIEVE_PCC_PROMOTION define. The code which
- used this was moved to stabsread.c a long time ago.
-
- * dstread.c (dst_sym_fns): Update for flavours.
- * symfile.c (find_sym_fns): Add kludge for apollo like for rs/6000.
- * dstread.c (dst_symfile_offsets): Set objfile->num_sections.
-
- gcc -Wall lint:
- * thread.c: Include "gdbcmd.h" and <ctype.h>.
- * Makefile.in: Update dependency.
- * thread.c (thread_command): Remove unused variable p.
- * values.c (unpack_double): Use len instead of TYPE_LENGTH (type).
- * valprint.c (print_floating): Correctly check sign bit now that
- we are using unsigned arithmetic.
- * symtab.c (find_pc_line_range): Remove unused variables exact_match,
- ind, and l.
-
-Tue Nov 9 17:42:25 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * valarith.c (value_x_binop): fix search operator in class bug
- * valarith.c (value_x_unop): fix search operator in class bug
-
-Tue Nov 9 19:20:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (init.c): Add udi2go32.o to list of files that we
- should not try to search for _initialize_* functions.
-
- * remote-udi.c (udi_wait): Change UDIGdb_StdoutReady back to
- UDIStdoutReady. It accidentally got changed on 24 Oct 93 when
- stdout was changed to gdb_stdout. Likewise for UDIGetStdout,
- UDIStderrReady, and UDIGetStderr.
-
-Tue Nov 9 12:48:06 1993 Tom Lord (lord@cygnus.com)
-
- * remote-hms.c (hms_wait): fixed too many arguments to putc_unfiltered.
-
-Tue Nov 9 12:20:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * utils.c (quit): Also call gdb_flush on standard output and error.
-
- * .gdbinit: Remove "source /.gdbinit". It causes a spurious error
- if /.gdbinit doesn't exist (and I know of no convention of putting
- something in /.gdbinit).
-
-Mon Nov 8 18:17:11 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * cp-valprint.c (cp_print_value_fields): change output from <no
- value> to <optimized out or zero length>
-
-Mon Nov 08 17:05:30 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * Makefile.in: Change RUNTEST_FLAGS back to RUNTESTFLAGS
- Change RUNTEST = runtest to test for existance of
- a runtest in the source tree first.
-
-Mon Nov 8 10:42:03 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in: Remove unused variable GCC. Remove "#CC=cc" line
- which doesn't really relate to anything.
-
- * Makefile.in (CC_FOR_TARGET): Test for existence of gcc/xgcc, not
- for existence of gcc/Makefile.
-
- * inflow.c (terminal_init_inferior), infptrace.c (child_resume):
- Add comments about use of Lynx PIDGET and how we will want to
- clean it up.
-
- * stabsread.c: Remove long_kludge_name code (it was already #if 0).
- * stabsread.c (read_one_struct_field): Clean up comments to reflect
- Kung's change of 5 Nov 93.
- * stabsread.c (read_one_struct_field): Don't give up on unknown
- visibility character, just shove it in fip->list->visibility.
- (read_baseclasses): Don't give up on unknown virtual or visibility
- characters, just assume a reasonable default, complain, and keep
- going.
- (attach_fields_to_type): Complain on unrecognized visibility.
- One result of all this is that '9' (VISIBILITY_IGNORE) can be used
- in a stab as well as being something which GDB uses internally.
-
-Mon Nov 8 07:57:30 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * configure.in: Remove h8300h, we have multilib now.
-
-Mon Nov 8 06:11:24 1993 D. V. Henkel-Wallace (gumby@cirdan.cygnus.com)
-
- * configure.in: Add unixware as a configuration alias for x86
- sysv4
-
- * config/i386/i386nw.mt: add i387-tdep.o, exec.o to TDEPFILES
-
-Sun Nov 7 23:49:21 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symtab.c (decode_line_1, decode_line_2): Do not adjust pc by
- FUNCTION_START_OFFSET if funfirstline is not set.
-
-Fri Nov 5 17:19:30 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * gdbtypes.h : add a field 'ignore_field_bits in cplus_specific,
- and macros to handle the bits.
- * stabsread.c (read_one_struct_field): add VISIBILITY_IGNORE, and
- for field of length 0, set this bit on.
- * cp-valprint.c (cp_print_value_fields): for VISIBILITY_IGNORE
- field, print <no value>.
-
-Fri Nov 5 14:43:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Version 4.11.2.
-
-Fri Nov 5 09:49:22 1993 Stu Grossman (grossman at cygnus.com)
-
- * inflow.c (terminal_init_inferior): Temporarily use Lynx PIDGET
- macro to set process groups.
- * infptrace.c (child_resume): Temporarily use Lynx PIDGET to
- specify resumption of all threads.
- * infrun.c (wait_for_inferior): Fix handling of thread-specific
- breakpoints for systems where DECR_PC_AFTER_BREAK > 0 (ie: backup
- PC by the right amount when continuing the thread).
- * thread.c (thread_apply_command): Add the `thread apply'
- command to apply a given GDB command to a list of threads.
-
-Fri Nov 5 05:58:03 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * Makefile.in (init.c): Don't call sed if filename is empty.
-
-Thu Nov 4 08:27:24 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dbxread.c (unknown_symchar_complaint): Make message refer to
- "symbol descriptor" not "symbol type character" for consistency
- with stabs.texinfo terminology.
-
- * stabsread.c (read_struct_fields): Accept either '$' or '.' as
- the character which introduces a cpp_abbrev or anonymous type.
-
- * c-lang.c (c_printstr): Print "" to stream (like all the other
- output from this function), not gdb_stdout.
-
- * dbxread.c (process_one_symbol): Do relocate 'S' symbols by
- the text offset (revert 12 Oct 93 change).
-
- * configure.in: Make hppa*-*-hiux* use hppahpux,
- not non-existent hppahiux.
-
-Wed Nov 3 16:24:09 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * values.c (value_fn_field): when physical name not found, do not
- error, but return null.
- * valops.c (value_struct_elt): when name and args match does not
- mean it is the one, some times a typedef class can have the same
- member method and args. This probably will not happen with new
- version of g++, but it does happen in old g++ and cause gdb error.
-
-Wed Nov 3 09:20:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- Merge changes for dos x udi:
- * Makefile.in (udi2go32.o): add rule to build this file
- * 29k-share/udi/udi2go32.c: new file
- * config/a29k/a29k-udi.mt: add udi2go32.o
- * 29k-share/udi/{udr.c, udip2soc.c}: #ifdef out the entire file
- if __GO32__ is defined. What a hack.
-
-Wed Nov 3 09:20:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote.c (putpkt, getpkt): Don't call interrupt_query.
-
- * findvar.c (value_of_register): Rename val to reg_val to avoid
- name conflict with some (e.g. tm-m68k.h) REGISTER_CONVERT_TO_VIRTUAL.
-
- * main.c: Add variables source_line_number, source_file_name,
- source_error, source_error_allocated, and source_pre_error.
- (command_line_input): If source_file_name set, increment
- source_line_number and set error_pre_print with them.
- (source_command): Set source_* and make a cleanup so they get
- set back.
-
-Tue Nov 2 16:28:34 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stack.c (down_silently_command): Add comment about PR 1913.
-
- * breakpoint.c (insert_breakpoints, delete_breakpoint): Call
- target_terminal_ours_for_output before attempting output.
-
- * fork-child.c (fork_inferior): Fix comment so that it suggests
- "set shell" rather than having "set env SHELL" affect GDB's
- operation.
-
-Tue Nov 2 15:03:08 1993 Tom Lord (lord@rtl.cygnus.com)
-
- * utils.c (vfprintf_unfiltered): don't use maybe_filtered
- since it involves a fixed size buffer.
-
-Tue Nov 2 13:42:30 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * findvar.c (value_of_register, value_from_register),
- hppa-tdep.c (pa_print_fp_reg), infcmd.c (do_registers_info),
- valops.c (value_assign): Use REGISTER_CONVERT_TO_* only if
- REGISTER_CONVERTIBLE is defined, otherwise just copy the content.
- Pass desired type to REGISTER_CONVERT_TO_*.
-
- * config/m68k/tm-m68k.h, config/i960/tm-i960.h (REGISTER_CONVERT_*):
- Pass length of desired type to store/extract_floating.
- * config/i386/tm-arm.h, config/i386/tm-i386aix.h,
- config/i386/tm-sun386.h, config/i386/tm-symmetry.h,
- config/m88k/tm-m88k.h config/rs6000/tm-rs6000.h (REGISTER_CONVERT_*):
- Use extract_floating and store_floating with length of desired type.
- * config/m68k/tm-news.h (STORE,EXTRACT_RETURN_VALUE): Add type
- parameter to REGISTER_CONVERT_*.
-
- * config/a29k/tm-a29k.h, config/convex/tm-convex.h,
- config/gould/tm-np1.h, config/gould/tm-pn.h, config/h8300/tm-h8300.h,
- config/h8500/tm-h8500.h, config/i386/tm-i386v.h,
- config/mips/tm-mips.h, config/ns32k/tm-merlin.h,
- config/ns32k/tm-umax.h, config/pa/tm-hppa.h, config/pyr/tm-pyr.h,
- config/sh/tm-sh.h, config/sparc/tm-sparc.h, config/tahoe/tm-tahoe.h,
- config/vax/tm-vax.h, config/z8k/tm-z8k.h (REGISTER_CONVERTIBLE,
- REGISTER_CONVERT_TO_RAW, REGISTER_CONVERT_TO_VIRTUAL): Remove
- versions for which REGISTER_CONVERTIBLE is always false.
- * z8k-tdep.c (register_convert_to_virtual, register_convert_to_raw):
- Remove, no longer used.
-
- * alpha-tdep.c (alpha_register_convert_to_raw,
- alpha_register_convert_to_virtual): New routines to handle
- the different raw formats in alpha floating point registers.
- * config/alpha/tm-alpha.h (REGISTER_CONVERTIBLE,
- REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW): Use them.
-
-Tue Nov 2 12:45:23 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * gdbserver/configure.in: Recognize *-*-lynxos* instead of
- *-*-lynx*, recognize sparc-*-lynxos*.
- * gdbserver/Makefile.in (install, install_only): Add.
- * gdbserver/gdbserver.1: New file, man page for gdbserver.
-
-Tue Nov 2 03:01:01 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Include <time.h> and <sys/types.h>. Change include
- of "libhppa.h" to "som.h".
- (BYTES_IN_WORD): Define.
- (hppa_sym_fns): "hppa" is 4 characters, not 5.
-
-Mon Nov 1 09:40:21 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symtab.c, symtab.h, source.c: Change find_line_pc_range to take
- a struct symtab_and_line argument, rather than a symtab and a line.
- Re-write it to be based on the address rather than bogusly adding
- one to the line number and hoping that has something to do with the
- end of the line.
-
- * config/m88k/m88k.mh (NATDEPFILES): Remove exec.o.
-
- * paread.c (pa_symtab_read): Change comments to say ignoring
- labels really should be handled by the assembler/compiler.
-
- * Makefile.in: Add -O to CXXFLAGS.
-
- * TODO: Expand comments on fast watchpoints.
-
-Sun Oct 31 19:45:06 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * paread.c (pa_symtab_read): Also filter out local symbols
- starting with "L$".
-
-Sun Oct 31 09:28:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symfile.h (sym_fns), symfile.c (find_sym_fns), xcoffread.c,
- coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c, paread.c:
- Change from using bfd target name to using the flavour.
-
- * objfiles.h, infcmd.c, symfile.c: Add comments about how various
- objfiles get created and when we should blow them away.
-
-Sat Oct 30 08:32:53 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symfile.c (reread_symbols): When re-reading symbols, do all the
- right operations ourself, rather than calling symbol_file_command.
- If we re-read something, call clear_symtab_users not just
- breakpoint_re_set.
- * objfiles.h, objfiles.c (build_objfile_section_table): No longer
- static.
- * symfile.c (clear_symtab_users): Call clear_pc_function_cache.
- * coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c, paread.c
- (*_symfile_offsets): Set objfile->num_sections.
- * remote.c (remote_wait), symfile.c (syms_from_objfile):
- Don't muck with objfile->num_sections now that all the symbol
- readers set it.
- * elfread.c: Clean up obsolete comment about handling only DWARF.
- * paread.c: Remove comment about how we should use an "ordinary"
- file format with an hppa suffix. There is nothing ordinary about SOM.
-
- * config/i386/{i386m3.mh,i386mk.mh}, config/mips/mipsm3.mh,
- config/ns32k/ns32km3.mh: Change MMALLOC_LIB to MMALLOC.
- * TODO: Update Mach stuff.
-
-Fri Oct 29 16:30:36 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- LynxOS support:
- * configure.in: Change *-*-lynx* to *-*-lynxos*, add
- sparc-*-lynxos*.
- * Makefile.in (ALLDEPFILES): Add m68kly-nat.c, sparcly-nat.c.
- Rename i386lynx-nat.[co] to i386ly-nat.[co].
- (ALLCONFIG): Add config/{m68k,sparc}/{m68k,sparc}lynx.m[ht].
- (m68kly-nat.o, sparcly-nat.o): Add rules.
- * i386ly-tdep.c: Cosmetics.
- * i386lynx-nat.c: Removed.
- * i386ly-nat.c: New file, was i386lynx-nat.c.
- * m68kly-nat.c: New file.
- * sparcly-nat.c: New file.
- * config/xm-lynx.h: New file, cpu-independent host info.
- * config/i386/i386lynx.mh: Changes for consistency.
- * config/i386/i386lynx.mt: Ditto.
- * config/i386/tm-i386lynx.h: Ditto.
- * config/i386/nm-i386lynx.h: Ditto.
- * config/i386/xm-i386lynx.h: Include config/xm-lynx.h.
- * config/m68k/m68klynx.mh, config/m68k/m68klynx.mt,
- config/m68k/tm-m68klynx.h, config/m68k/nm-m68klynx.h,
- config/m68k/xm-m68klynx.h: New files, M68K LynxOS support.
- * config/sparc/sparclynx.mh, config/sparc/sparclynx.mt,
- config/sparc/tm-sparclynx.h, config/sparc/nm-sparclynx.h,
- config/sparc/xm-sparclynx.h: New files, Sparc LynxOS support.
-
-Fri Oct 29 08:11:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * defs.h, findvar.c (extract_floating, store_floating): New functions.
- * Move SWAP_TARGET_AND_HOST from defs.h to findvar.c because it is
- now used only by extract_floating and store_floating.
- * valprint.c (print_floating): Use unsigned arithmetic. Use
- extract_unsigned_integer instead of SWAP_TARGET_AND_HOST.
- Change sizeof (float) to 4 and sizeof (double) to 8 (those are always
- the relevant sizes for this code, which is in #ifdef IEEE_FLOAT).
- * values.c (unpack_long, unpack_double, value_from_double),
- valarith.c (value_binop), stabsread.c (define_symbol):
- Use extract_floating and store_floating instead of
- SWAP_TARGET_AND_HOST.
- * config/m68k/tm-m68k.h, config/i960/tm-i960.h (REGISTER_CONVERT_*):
- Use extract_floating and store_floating.
- * config/m88k/tm-m88k.h: Add comments (it should be doing the same).
- * i386-tdep.c (i386_extract_return_value),
- * remote-nindy.c (nindy_store_registers): Use store_floating.
-
-Fri Oct 29 09:31:38 1993 Steve Chamberlain (sac@rtl.cygnus.com)
-
- * remote-sim.c (gdbsim_store_register): Change var name so
- it compiles with non-ANSI compilers.
-
-Fri Oct 29 08:11:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * TODO: Add idea for "disassemble" with source.
-
-Fri Oct 29 00:41:01 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (VERSION): Bump to 4.11.1 after release and cvs
- tagging.
-
-Thu Oct 28 09:14:42 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * TODO: Add section on Mach. Stop calling it a "bug list".
- Remove John's name and email address. Remove item on "always"
- ("hook-stop" takes care of this). Remove item on executables with
- no symbols (this works on some machines, at least). Remove item
- about calling error() during symbol reading (I think all the important
- ones have been cleaned up). Revise items about signals and remote
- systems. Remove section on ^Z requiring several continues to make
- it go (this now works. Perhaps the item is based on confusion over
- programs (like GDB itself) which catch SIGTSTP and then re-send
- themselves the signal. PR 2575 might contain relevant info).
-
-Thu Oct 28 16:55:34 1993 Fred Fish (fnf@cygnus.com)
-
- * NEWS: Note improvements in C++ support, preliminary thread
- implementation, and LynxOS native and target support for 386.
-
-Thu Oct 28 16:55:34 1993 Fred Fish (fnf@cygnus.com)
-
- * README: Add note from Peter Schauer about OSF/1 shared
- libraries. Add note from Pace Willisson about configuring on BSDI
- BSD/386 release 1.0. Update gdb references to gdb 4.11.
-
-Thu Oct 28 09:14:42 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * NEWS: Add notes about Alpha and "set remotedebug" for UDI.
-
- * valops.c (value_assign): Change bitfield code to use a buffer of
- the correct size, rather than an int.
-
-Wed Oct 27 13:43:07 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/i386/{i386m3.mt,i386m3.mh},
- config/mips/{mipsm3.mt,mipsm3.mh},
- config/ns32k/{ns32km3.mt,ns32km3.mh}: Use correct names for TM_FILE
- and XM_FILE. Replace host files *mach3-xdep.o with native
- files *m3-nat.o. Replace host file os-mach3.o with native
- file m3-nat.o.
-
- * remote-udi.c: Remove LOG_FILE stuff; superceded by "set remotedebug".
- * remote-mon.c: Remove commented out "set remotedebug" command.
- * remote-nindy.c: Clean up comment about wanting alternative to
- options specified on the GDB command line.
-
- * fork-child.c (fork_inferior): Set inferior_pid before calling
- init_trace_fun. Move the code which gets us through the shell
- to new function startup_inferior.
- * inferior.h: Declare startup_inferior.
- * procfs.c (procfs_init_inferior), inftarg.c (ptrace_him):
- Call startup_inferior.
- * m3-nat.c (m3_trace_him): Call intercept_exec_calls.
- * config/nm-m3.h: Don't define STARTUP_INFERIOR.
- * config/i386/tm-i386m3.h, config/ns32k/tm-ns32k.h,
- config/mips/tm-mipsm3.h: Don't define START_INFERIOR_TRAPS_EXPECTED.
-
- * m68k-stub.c: Change vector 13 from SIGFPE to SIGBUS.
-
-Tue Oct 26 22:05:03 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * mips-tdep.c (mips_pop_frame): If proc_desc is NULL, don't dump core.
-
-Tue Oct 26 15:07:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- gcc -Wall lint:
- * nlmread.c: Include stabsread.h.
- * Makefile.in: Update dependencies.
-
- * remote.c: Change PBUFSIZ back to 400. John's 28 Feb 1992 change
- to increase it broke the ability to write large chunks of memory
- with m68k-stub and i386-stub. Now we only use more than 400 on
- machines where we need that much to write the registers.
- * remote.c (remote_write_bytes): Eliminate possible abort(). The
- check for when to abort was off by a few bytes and besides which,
- it is handled by MAXBUFBYTES, which the caller uses.
- * m68k-stub.c: Add comments about trap #1 and trap #8 instructions.
-
-Tue Oct 26 08:36:07 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * remote-sim.h (SIM_ADDR): New type (same as CORE_ADDR).
- (sim_set_pc): Update prototype.
- (sim_read, sim_write): Ditto, and use unsigned char *buf.
- (sim_fetch_register, sim_store_register): Use unsigned char *buf.
- (sim_info): Pass printf function as argument, add verbose argument.
- (sim_stop_reason): Renamed from sim_stop_signal, fix prototype.
- * remote-sim.c (gdbsim_wait): Update call to sim_stop_reason.
- (gdbsim_files_info): Update call to sim_info.
-
-Tue Oct 26 10:41:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * valops.c (value_assign): Call reinit_frame_cache when assigning
- to a register.
-
-Mon Oct 25 11:08:59 1993 Stu Grossman (grossman at cygnus.com)
-
- * infrun.c (wait_for_inferior): Fix PC out of objfile bounds
- check to just use stop_func_name == 0.
- * remote-udi.c (store_register): Invalidate NPC/PC_REGNUM after
- changing PC.
-
-Mon Oct 25 14:57:45 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbserver/{low-lynx.c,low-sparc.c,low-sun3.c}, standalone.c,
- m3-nat.c, i386m3-nat.c, mipsm3-nat.c, ns32km3-nat.c: bcopy -> memcpy.
-
- gcc -Wall lint:
- * breakpoint.c: Include thread.h.
- * coffread.c: Include stabsread.h.
- * Makefile.in: Update dependencies.
- * breakpoint.c (mention): Add bp_call_dummy to switch.
- * symmisc.c (dump_symtab): Use %d not %ld for line number.
-
-Sun Oct 24 18:29:32 1993 Tom Lord (lord@rtl.cygnus.com)
-
- * every non-obsolete file except utils.c:
- Change the stream argument to _filtered to GDB_FILE *.
- Change all references to stdout/stderr to gdb_stdout/gdb_stderr.
- Replace all calls to stdio output functions with
- calls to corresponding _unfiltered functions.
- Replaced calls to fopen for output to gdb_fopen.
- Added sufficient goo to utils.c and defs.h to make the above
- work.
-
- The net effect is that stdio output functions are only directly
- used in utils.c. Elsewhere, the _unfiltered and _filtered
- functions and GDB_FILE type are used.
-
- In the near future, GDB_FILE will stop being equivalant to
- FILE.
-
- The semantics of some commands has changed in a very subtle way:
- called in the right context, they may cause new occurences of
- prompt_for_continue() behavior.
-
- Please respect this change by not reintroducing stdio output
- dependencies in the main body of gdb code. All output from
- commands should go to a GDB_FILE.
-
-Sun Oct 24 20:16:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * parse.c, parser-defs.h (write_exp_msymbol): New function to write
- the appropriate expression for a minimal symbol. Taken from c-exp.y
- and m2-exp.y but handles mst_file_*.
- * c-exp.y, m2-exp.y: Use it.
-
-Sun Oct 24 09:31:05 1993 Fred Fish (fnf@lisa.cygnus.com)
-
- * elfread.c (elf_symtab_read): Use bfd convention that both
- initialized and uninitialized data sections have the SEC_ALLOC
- flag bit set, but only initialized sections have SEC_LOAD set.
- SEC_DATA is ignored since it only gets set for initialized
- data.
-
-Sat Oct 23 14:48:18 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * remote-sim.h (sim_stop): New enum.
- (sim_stop_signal): Change prototype, result is enum sim_stop.
- * remote-sim.c (gdbsim_wait): Update call to sim_stop_signal.
-
-Fri Oct 22 07:49:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c (define_symbol): Skip the whole thing about "pcc
- promotion" on little-endian machines.
-
- * remote-vx.c (vx_wait): Rename pid parameter to pid_to_wait_for.
- Some compilers (legitimately) don't like variables in the
- function's outermost block whose name is the the same as the name of
- a parameter.
-
- Merge Apollo patches from Troy Rollo (troy@cbme.unsw.edu.au):
- * dst.h, dstread.c, config/m68k/{apollo68b.mt,tm-apollo68b.h}:
- New files.
- * config/m68k/nm-apollo68b.h: Add more defines.
- * configure.in: Recognize apollo target, not just host.
-
- * configure.in: Add * to end of all OS names.
-
-Fri Oct 22 06:14:01 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (ALLPARAM): Add config/m88k/xm-delta88v4.h
-
-Thu Oct 21 12:23:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (init.c): Generate using the source, not munch. This
- cleans up all kinds of hassles (which nm to use in munch, etc). The
- new formatting conventions (mostly already followed) are that
- the name of the _initialize_* routines must start in column zero,
- and must not be inside #if.
- * munch: Removed.
- * Makefile.in: Remove references to munch.
- * serial.c, remote.c, infptrace.c, maint.c, convex-tdep.c,
- alpha-tdep.c, hp300ux-nat.c, hppab-nat.c, osfsolib.c, remote-es.c,
- procfs.c, remote-udi.c, ser-go32.c, ultra3-xdep.c, sh-tdep.c,
- i960-tdep.c, hppa-tdep.c, h8500-tdep.c, dpx2-nat.c, delta68-nat.c,
- z8k-tdep.c: Make sure the above conventions are followed. Make
- sure they are all declared as returning void. Clean up
- miscellaneous comments and such.
-
- * sh-tdep.c (sim_load): Add function.
-
-Thu Oct 21 15:58:48 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * remote-mips.c (mips_wait): add pid argument.
-
-Thu Oct 21 12:23:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (c-exp.tab.o): Remove notice about shift/reduce conflicts
- which no longer occur.
-
- gcc -Wall lint:
- * findvar.c (symbol_read_needs_frame), corelow.c (ignore),
- inflow.c (gdb_has_a_terminal): Make sure to return a value.
- * regex.h: Declare re_set_syntax.
- * printcmd.c: Include valprint.h.
- * infcmd.c, exec.c, maint.c, core.c: Include language.h.
- * maint.c: Include expression.h.
- * infrun.c, fork-child.c, corelow.c, inflow.c: Include thread.h.
- * inftarg.c: Include command.h.
- * coredep.c: Include value.h.
- * c-exp.y, m2-exp.y, ch-exp.y: Include bfd.h, symfile.h and objfiles.h.
- * ch-typeprint.c: Include typeprint.h.
- * ch-valprint.c: Include c-lang.h.
- * nlmread.c: Include buildsym.h.
- * environ.c: Include gdbcore.h. Only include defs.h once.
- (set_in_environ): Cast const char * to char * when passing to
- set_gnutarget.
- * Makefile.in: Update dependencies to reflect all these new includes.
- Remove unused variables:
- * printcmd.c (printf_command): args_to_vprintf.
- * coffread.c (coff_symfile_init): strsection.
- Move variables to within the #ifdefs where they are used:
- * symtab.c (gdb_mangle_name): opname.
- * inftarg.c (child_attach): pid and exec_file.
- * inftarg.c (child_detach): siggnal.
- * objfiles.c (allocate_objfile): mapto, md, and fd.
- * objfiles.c (free_objfile): mmfd.
- * infrun.c (wait_for_inferior): Include BPSTAT_WHAT_LAST in switch.
- * infrun.c (wait_for_inferior): Remove unused same_pid label.
- * inferior.h: Declare set_sigint_trap and clear_sigint_trap.
- * parser-defs.h: Declare write_exp_elt_block.
- * stabsread.h: Declare elfstab_offset_sections and
- coffstab_build_psymtabs.
-
-Thu Oct 21 12:05:08 1993 Ken Raeburn (raeburn@cygnus.com)
-
- Patch from Jeff Law:
- * paread.c: Fix references to "hppa" that should now be "som".
-
-Thu Oct 21 12:23:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symtab.c (decode_line_1): Don't use SYMBOL_LINE for functions.
-
-Thu Oct 21 02:59:07 1993 Stu Grossman (grossman at cygnus.com)
-
- * remote-udi.c (udi_store_registers, store_register): Use
- UDI29KPC address space when modifying PC. It seems that you can't
- modify the PC directly (at least in the isstip simulator).
-
-Wed Oct 20 11:35:43 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * target.h: Put remote_debug declaration back here. Add baud_rate.
- * remote.c, remote-udi.c, remote-utils.h: Let target.h take care of
- declaring these. Those random externs all over are error prone.
- * Move "set remotebaud" from remote-utils.c to main.c to it applies
- to remote.c as well.
-
- * xcoffread.c (xcoff_symfile_read), coffread.c (coff_symfile_read):
- Sort symtabs for this objfile only, not for all objfiles.
- * symfile.c, symfile.h (sort_all_symtab_syms): Remove; no longer used.
-
- * mipsread.c (parse_symbol): In third-eye, a function has a block
- within it which represents the whole function. Create only one
- GDB block for both.
-
-Wed Oct 20 17:47:42 1993 Stu Grossman (grossman at cygnus.com)
-
- * main.c: Make baud_rate and remote_debug be global variables,
- remove #include "remote-utils.h". This makes it possible to build
- GDB without remote-utils.c. Also, move setting of remote_debug
- into main, so that all remote*.c files can use it (not just the
- serial line ones). And, make baud_rate be an int.
- * remote-udi.c: Change kiodebug to remote_debug.
- * remote-utils.c: Move setting of baud rate and debug into main.c.
- * remote-utils.h: Redefine sr_{get set}_debug and sr_{get set}_baud
- to use baud_rate and remote_debug globals for compatibility.
- * remote.c: Use remote_debug and baud_rate globals directly,
- instead of sr_ functions, so that we don't need to load
- remote-utils.c.
- * config/a29k/a29k-udi.mt: Define REMOTE_O as null so that we don't
- get the default remote* modules.
-
-Wed Oct 20 11:35:43 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c (define_symbol): When combining a LOC_ARG and a
- LOC_REGISTER, use the type from the LOC_REGISTER, not from the
- LOC_ARG.
-
-Wed Oct 20 14:34:38 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * config/i386/xm-go32.h: define some signals if they aren't
- already defined.
-
-Wed Oct 20 11:35:43 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (INTERNAL_LDFLAGS): New macro. The new part is
- that we use CFLAGS and PROFILE_CFLAGS to link.
- (gdb, rapp, kdb): Use INTERNAL_LDFLAGS instead of
- LDFLAGS and/or GLOBAL_CFLAGS.
-
-Wed Oct 20 09:29:55 1993 Stu Grossman (grossman at cygnus.com)
-
- * Makefile.in: Add $(srcdir) to all refs to 29k-share
- directories.
-
-Tue Oct 19 17:23:34 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * Makefile.in (ALLCONFIG): Add config/i386/{i386m3.mh, i386m3.mt,
- i386/i386mk.mh i386/i386mk.mt}, config/mips/{mipsm3.mh,
- mipsm3.mt}, config/ns32k/{ns32km3.mh, ns32m3.mt}
- * Makefile.in (remote_utils_h): Add remote-sim.h
- * Makefile.in (NONSRC): Add i386-nlmstub.c
- * Makefile.in (HFILES): Add coff-solib.h
-
-Tue Oct 19 14:15:40 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * values.c (value_virtual_fn_field): Fix the offset calculation
- when calling virtual functions. (gdb.t22/virtfunc.exp).
- * eval.c (evaluate_subexp): same as above.
-
-Tue Oct 19 10:43:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/rs6000/rs6000.mh (TERMCAP): Define to -lcurses.
-
- * Makefile.in: Define CXXFLAGS.
-
-Tue Oct 19 09:28:52 1993 Stu Grossman (grossman@cygnus.com)
-
- * sparclite/Makefile.in: Fixup so that this works with Sun make
- and VPATH.
-
-Tue Oct 19 10:43:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.h (struct bpstat_what): Don't use bitfields.
-
- * typeprint.c: Add "class CLASS-NAME" to docstring for ptype.
-
-Tue Oct 19 06:17:10 1993 Fred Fish (fnf@cirdan.cygnus.com)
-
- * Makefile.in (ALLPARAM): Add config/m88k/{nm-delta88v4.h,
- tm-delta88v4.h, xm-dgux.h}.
- * Makefile.in (ALLCONFIG): Add config/m88k/{delta88v4.mh,
- delta88v4.mt}.
-
- * README: Remove comment about SunOS 5.x programs leaving
- coredumps. Info from Sun is that this was not in customer
- releases.
-
-Mon Oct 18 10:28:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * hppa-tdep.c (restore_pc_queue): Call target_terminal_ours after
- done stepping the inferior.
-
- * c-exp.y: Remove never-used (because of shift/reduce conflicts)
- rules for pointers to members.
- * Makefile.in: Remove notice about expected shift/reduce conflicts.
-
- * buildsym.c (finish_block): If we pop the context stack and it is
- not empty, complain () instead of abort ().
-
-Sun Oct 17 19:42:31 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * parse.c, parser-defs.h (follow_types): New function.
- * c-exp.y (ptype : typebase abs_decl): Use it.
- * c-exp.y (ptype): Add support for type qualifiers after the
- typebase. The typebase rule already has support for them before
- the typebase.
- * Makefile.in: Change the expected number of shift/reduce
- conflicts to 6. This is OK--the 2 new conflicts are basically the
- same as one of the old ones.
-
-Sun Oct 17 13:04:49 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (VERSION): Bump to 4.10.3.
-
-Sun Oct 17 09:18:57 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c (wait_for_inferior): Clean up comments which were at
- the top of the file, making them more concise and moving them with
- the code (Sorry, Randy, but these stream-of-consciousness comments
- really have to go). Switch the order of the "&&", which makes
- things clearer and turns out to be an improvement with respect to
- side effects and speed.
-
-Sun Oct 17 02:06:01 1993 Stu Grossman (grossman at cygnus.com)
-
- * procfs.c: Handle process exits more elegantly by trapping on
- entry to _exit. Also, cleanup procinfo list when process dies of
- it's own accord (as opposed to being killed).
-
-Sat Oct 16 20:47:30 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/m88k/xm-dgux.h: Define NO_PTRACE_H.
-
- * corelow.c (add_to_thread_list): Need a cast to go from PTR to
- asection *.
-
- * infrun.c: Add comment about signals.
-
- * fork-child.c (fork_inferior): Remove CREATE_INFERIOR_HOOK again.
- Stu reinstated it (accidently I assume).
-
-Sat Oct 16 15:27:10 1993 Stu Grossman (grossman at cygnus.com)
-
- * procfs.c (procfs_wait): Losing Unixware can't do poll on /proc
- files. Use PIOCWSTOP instead.
- * corelow.c (add_to_thread_list): Fix arg to match prototype.
-
- * procfs.c (procfs_set_sproc_trap): Don't use this if sproc
- isn't available.
- * (procfs_notice_signals): Fix prototype.
-
-Fri Oct 15 22:46:07 1993 Stu Grossman (grossman at cygnus.com)
-
- * breakpoint.c (breakpoint_thread_match break_command_1):
- Thread-specific breakpoint support.
- * breakpoint.h (struct breakpoint): Add thread id field.
- * fork-child.c (fork_inferior): Move call to init_thread_list()
- back a bit so that init_trace_fun can do thread functions.
- * hppa-tdep.c (restore_pc_queue): Add pid to call to target_wait.
- * hppab-nat.c (child_resume): Handle default pid.
- * hppah-nat.c (child_resume): Handle default pid.
- * i386lynx-nat.c (child_wait): New arg pid.
- * inflow.c (kill_command): Reset thread list.
- * infptrace.c (child_resume): Handle default pid.
- * infrun.c: Thread-specific breakpoint support.
- * inftarg.c (child_wait): Add pid arg.
- * osfsolib.c (solib_create_inferior_hook): Add pid to call to
- target_resume.
- * procfs.c: Multi-thread support.
- * remote-bug.c (bug_wait): Add pid arg.
- * remote-hms.c (hms_wait): Add pid arg.
- * remote-mips.c (mips_wait): Add pid arg.
- * remote-mon.c (monitor_wait): Add pid arg.
- * remote-nindy.c (nindy_wait): Add pid arg.
- * remote-sim.c (gdbsim_wait): Add pid arg.
- * remote-udi.c (udi_wait): Add pid arg.
- * remote-vx.c (vx_wait): Add pid arg.
- * remote-z8k.c (sim_wait): Add pid arg.
- * remote.c (remote_wait): Add pid arg.
- * solib.c (solib_create_inferior_hook): Add pid to call to
- target_resume.
- * target.h (struct target_ops): Add pid arg to to_wait and
- to_notice_signals.
- * thread.c (valid_thread_id): New func to validate thread #s.
- * (pid_to_thread_id): New func to do the obvious.
- * thread.h: Prototypes for above.
-
- * coff-solib.c (coff_solib_add): Use nameoffset field to locate
- filename.
-
-Fri Oct 15 21:29:40 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * h8300-tdep.c, h8500-tdep.c: Define sim_load only, but not
- sim_kill, sim_open, or sim_set_args.
-
- * stack.c (print_stack_frame): Put catch_errors around
- print_frame_info so (for example) error printing source doesn't
- cause auto-displays to get skipped in normal_stop.
-
- * findvar.c (value_from_register): When preparing to cast a value
- from REGISTER_VIRTUAL_TYPE to type, copy the REGISTER_VIRTUAL_SIZE;
- the old code didn't copy the whole thing.
- * valops.c (value_assign): Add comment.
-
-Fri Oct 15 12:57:30 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c (upgrade_type): Replace bitsize sanity checks and
- complaint by a comment explaining why they were useless.
-
-Fri Oct 15 14:30:30 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Move comments on bypassing call dummy breakpoint from stack.c
- to breakpoint.h.
-
-Fri Oct 15 11:52:56 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symtab.c (lookup_partial_symtab): If filename is not found and
- contains no slashes, try again and compare without leading path
- components.
- * symtab.c (lookup_symtab_1): Replace open coded version of
- lookup_partial_symtab with a function call.
-
-Thu Oct 14 20:34:15 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * fork-child.c (fork_inferior), remote-eb.c (eb_create_inferior),
- remote-mon.c (monitor_create_inferior), remote-nindy.c
- (nindy_create_inferior), remote-st.c (st2000_create_inferior),
- remote-vx.c (vx_create_inferior): Remove CREATE_INFERIOR_HOOK; it
- is replaced by init_trace_fun.
- * config/convex/xm-convex.h, convex-xdep.c: Add comments explaining
- how to do without CREATE_INFERIOR_HOOK for whoever fixes the Convex
- port.
-
- * Makefile.in: Add Mach files to ALLDEPFILES, etc.
- * m3-nat.c: Clean up more hair--message(), cprocs.
- * configure.in: Recognize Mach targets and hosts.
- * config/ns32k/tm-umax.h: Add some #ifndef's so tm-ns32km3.h can
- include this file.
- * Mach headers in config/*/tm-*.h: Fix includes to match correct
- locations of files.
-
-Thu Oct 14 21:35:55 1993 Rob Savoye (rob@darkstar.cygnus.com)
-
- * remote-mon.c (general_open): Set dev_name. Minor tweaking to get
- it working again.
- * config/m68k/tm-monitor.h: Remove floating point register names
- as there aren't any on any of the monitors that use this code.
-
-Wed Oct 13 11:47:23 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * inflow.c: Pass pointer to process group, not process group itself,
- to TIOCSPGRP ioctl.
-
- * inflow.c (terminal_ours_1): Don't print warning on failure to
- set process group.
-
- * printcmd.c (printf_command): Instead of using makeva* and
- calling vprintf, just make the appropriate calls to printf.
- * printcmd.c, config/pa/xm-pa.h, config/mips/xm-makeva.h,
- config/alpha/xm-alpha.h, config/m88k/xm-m88k.h: Remove all
- traces of makeva*. My apologies to everyone (including me!)
- who spent so much time getting it to work on various machines,
- but look at the bright side, at least you won't have to do it
- again in the future.
-
- * printcmd.c (printf_command): Make a cleanup for val_args (fixes
- a memory leak).
-
-Tue Oct 12 22:54:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/mips/xm-mips.h: Remove comment about HAVE_SGTTY vs. usleep.
-
-Tue Oct 12 12:01:29 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * configure.in: only configure gdbserver for native environments
-
-Tue Oct 12 08:59:15 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c (read_type): Treat a negative type number at the start
- of a type as a type reference, not as a definition of a type with
- "50=" omitted. This makes things work on the RS/6000 again (the
- 14 Sep 1993 change broke it).
-
- * inflow.c: Use 0 (standard input) not scb->fd.
- (terminal_ours_1): If printing warning, don't claim it happened in
- terminal_inferior.
-
- * blockframe.c (get_prev_frame_info): Don't error() if there are no
- frames; just return NULL.
-
- * xcoffsolib.h, xcoffexec.c: Undo the part of Fred's bfd->abfd
- change which involved structure elements. It was unnecessary and
- was not consistently done.
-
- * stabsread.h, stabsread.c, dbxread.c (common_block*, copy_pending):
- Move common block handling from dbxread.c to stabsread.c.
- Use the name from the BCOMM instead of the ECOMM.
- Allocate things on the symbol_obstack.
- * xcoffread.c (process_xcoff_symbol): Process C_BCOMM, C_ECOMM,
- and C_ECOML. On unrecognized storage classes, go ahead and call
- define_symbol (after the complaint).
-
- * dbxread.c (process_one_symbol): Don't relocate 'S' symbols by
- the text offset.
-
-Tue Oct 12 12:33:09 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * osfsolib.c (solib_create_inferior_hook): Reset stop_soon_quietly
- after shared library symbol reading to get rid of warning from
- heuristic_proc_start.
-
-Tue Oct 12 12:01:29 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * remote-sim.c: fix unterminated character string
-
-Tue Oct 12 08:59:15 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c: Fix comment about gcc 2.3.3 stab for long long int.
-
-Mon Oct 11 14:27:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m3-nat.c, config/nm-m3.h: Add a target_ops struct and other
- various things to try to get this to work.
-
- * symtab.h: Fix comments re headers, sharing blockvectors, etc.
-
-Mon Oct 11 11:46:06 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * config/i960/vxworks960.mt (REMOTE_O): add dcache.o and remote-utils.o
-
-Mon Oct 11 02:48:57 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c (parse_partial_symbols): Do not add undefined
- symbols to the partial symbol table.
- * alpha-tdep.c (init_extra_frame_info): Remove kludge for gcc,
- gcc has to be compatible with the native tools.
- * alpha-tdep.c (alpha_push_arguments): Rename NUM_ARG_REGS to
- ALPHA_NUM_ARG_REGS and move its definition to tm-alpha.h.
- * config/alpha/tm-alpha.h (FRAME_ARGS_ADDRESS): Change it to the
- way the native tools define it, update comment.
-
-Fri Oct 8 15:54:06 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * osfsolib.c, remote-sim.c, remote.c, solib.c, xcoffexec.c,
- xcoffsolib.h: Use 'abfd' for bfd variables instead of 'bfd'.
- Sun cc doesn't like variable names that match their typedef'd type.
-
-Fri Oct 8 14:56:21 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * inflow.c: Remove unused includes of sys/param.h and sys/types.h.
-
- * inflow.c, ser-unix.c, ser-go32.c, ser-tcp.c, serial.h,
- terminal.h, fork-child.c, main.c, utils.c: Move all the process
- group stuff back to inflow.c and terminal.h; that's a better place
- for it and fixes problems with trying to get/set the process group
- of a tty we're doing remote debugging on.
- * terminal.h: Skip the redefines and includes if HAVE_TERMIOS.
-
- * findvar.c, value.h (symbol_read_needs_frame): New function.
- * c-exp.y, m2-exp.y: Call it instead of having our own switch on
- the symbol's class.
- * valops.c (value_of_variable): Use symbol_read_needs_frame to
- decide whether we care about finding a frame.
-
-Fri Oct 8 02:34:21 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * blockframe.c (get_frame_block): Do not adjust pc if the frame
- function was interrupted by a signal.
-
-Thu Oct 7 19:20:11 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/h8300/tm-h8300.h: Don't define sr_get_debug.
- * remote-sim.c: Include remote-utils.h.
- * target.h: Add comment about target_has_execution.
-
-Thu Oct 7 16:14:19 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * h8300-tdep.c (sim_load, sim_kill, sim_open, sim_set_args):
- New functions.
- * infrun.c (normal_stop): Don't try and set the pc in the current
- frame coredump if there isn't one.
- * remote-sim.c (gdbsim_store_register): Don't
- SWAP_TARGET_AND_HOST, sim_store_register takes bytes in raw order.
- (gdbsim_wait): Set status with WSETSTOP.
- * config/h8300/tm-h8300.h (sr_get_debug): Define
-
-Thu Oct 7 12:56:57 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- New Mach stuff:
- * config/i386/i386mach.c: Explain this is for the old (probably
- non-functional and/or obsolete) Mach stuff.
- * m3-nat.c, config/nm-m3.h,
- i386m3-nat.c, mipsm3-nat.c, ns32km3-nat.c,
- config/i386/{i386m3.mh,i386m3.mt,tm-i386m3.h,xm-i386m3.h},
- config/i386/{i386mk.mh,i386mk.mt,tm-i386mk.h,xm-i386mk.h},
- config/mips/{mipsm3.mh,mipsm3.mt,tm-mipsm3.h,xm-mipsm3.h},
- config/ns32k/{ns32km3.mh,ns32km3.mt,tm-ns32km3.h,xm-ns32km3.h}:
- New files.
-
- * blockframe.c (find_pc_partial_function): If we call
- PSYMTAB_TO_SYMTAB, call target_terminal_ours_for_output first.
- This is needed now that wait_for_inferior passes in endaddr.
- * infrun.c: Move call to target_terminal_inferior from proceed
- to resume.
-
-Thu Oct 7 09:22:04 1993 Stu Grossman (grossman at cygnus.com)
-
- * blockframe.c (find_pc_partial_function): Fix handling for PCs
- beyond the end of the last function in an objfile.
- * coff-solib.c (coff_solib_add): Use BFD to get fields from .lib
- section.
- * infrun.c (wait_for_inferior): Modify test for subroutine entry
- to include pc out of bounds of the previous function.
- * remote.c (remote_wait): Use strtoul for parsing 'N' message.
- Add code to relocate symfile_objfile->sections.
-
-Thu Oct 7 06:22:43 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/sparc/sun4os4.mh: Add comment saying why we don't use
- -lresolv.
-
-Thu Oct 7 09:29:11 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
- that clears the `inserted' flag for all breakpoints and deletes
- any breakpoints which should go away between runs of programs.
- * inflow.c (generic_mourn_inferior), infrun.c (init_wait_for_inferior),
- remote-es.c (es1800_load), comments in exec.c and corelow.c:
- Use it instead of mark_breakpoints_out.
- * breakpoint.c (mark_breakpoints_out): Update comment, tm-rs6000.h
- uses it in a completely different context.
- * breakpoint.c (breakpoint_re_set_one): Add bp_call_dummy case.
-
-Thu Oct 7 09:29:11 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * Makefile.in (REGEX, REGEX1): Always use our own version of
- regex.c to be consistent across hosts.
- * source.c (_initialize_source): Initialize regex to use grep
- style syntax as an approximation to POSIX basic regex syntax.
-
-Wed Oct 6 12:43:47 1993 Jeffrey A Law (law@snake.cs.utah.edu)
- Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * hppa-tdep.c (frame_chain): Rework so that it correctly
- handles boundaries where code with a frame pointer calls code
- without a frame pointer.
- (dig_fp_from_stack): New function.
-
-Wed Oct 6 12:43:47 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.c (delete_breakpoint): Don't insert a disabled breakpoint.
-
- * README: Add Alpha notes from Schauer.
-
-Tue Oct 5 15:26:04 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (install, uninstall): Remove $$n.1 stuff; I don't
- understand what it is trying to do, but I suspect it's not doing
- it.
-
- * config/ns32k/merlin.mh: Add comment about M_INSTALL.
- * config/m88k/{delta88.mh,delta88v4.mh}: Remove M_INSTALL and
- M_UNINSTALL; it tries to install a non-existent file gdb.z.
- * Makefile.in: Remove M_INSTALL stuff; the above were the only uses.
-
- * stabsread.c (read_range_type): Remove comment which recommends
- distinguishing float from complex by the name.
-
-Tue Oct 5 12:17:40 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
- Jim Kingdon (kingdon@cygnus.com)
- Stu Grossman (grossman@cygnus.com)
-
- Changes to support alpha OSF/1 in native mode.
- * alpha-nat.c, alpha-tdep.c, config/alpha/alpha-osf1.mt,
- config/alpha/nm-alpha.h, config/alpha/tm-alpha.h, osfsolib.c:
- New files.
- * Makefile.in: Add new files and dependencies.
- * configure.in: Add alpha target.
- * config/alpha/alpha-osf1.mh (NATDEPFILES): Add osfsolib.o
- * config/alpha/alpha-osf1.mh (MH_CFLAGS): Remove, we can handle
- shared libraries now.
- * config/alpha/xm-alpha.h: Cleanup, get MAKEVA_* defines right.
-
- * defs.h (CORE_ADDR): Make its type overridable via CORE_ADDR_TYPE,
- provide `unsigned int' default.
- * breakpoint.c (breakpoint_auto_delete): Delete only if we really
- stopped for the breakpoint.
- * stabsread.c, stabsread.h (define_symbol): Change valu parameter
- to a CORE_ADDR.
- * stabsread.c (read_range_type): Handle the case where the lower
- bound overflows and the upper doesn't and the range is legal.
- * infrun.c (resume): Do not step a breakpoint instruction if
- CANNOT_STEP_BREAKPOINT is defined.
-
- * inferior.h (CALL_DUMMY_LOCATION): New variant AT_ENTRY_POINT.
- Now that we have the bp_call_dummy breakpoint the call dummy code
- is no longer needed. PUSH_DUMMY_FRAME, PUSH_ARGUMENTS and
- FIX_CALL_DUMMY can be used to set up everything for the dummy.
- The breakpoint for the dummy is set at the entry point and thats it.
- * blockframe.c (inside_entry_file, inside_entry_func): Do not stop
- backtraces if pc is in the call dummy at the entry point.
- * infcmd.c (run_stack_dummy): Handle AT_ENTRY_POINT case. Use
- the expected breakpoint pc when setting up the frame for
- set_momentary_breakpoint.
- * symfile.c (entry_point_address): New function for AT_ENTRY_POINT
- support.
- * valops.c (call_function_by_hand): Handle AT_ENTRY_POINT case.
-
-Tue Oct 5 11:37:02 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * configure.in: Recognize hppa*-*-hiux* (currently synonym for hpux).
- Change other hppa host entries to use -*- not -hp-.
-
-Mon Oct 4 19:16:14 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * i386-nlmstub.c: New file; debugging stub for i386 NetWare. Must
- be compiled with NetWare header files and turned into an NLM with
- nlmconv.
-
-Mon Oct 4 11:02:11 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * minsyms.c (lookup_minimal_symbol_by_pc): Don't use mst_abs symbols.
-
- * dbxread.c (process_one_symbol): Make n_opt_found static.
-
- * Rename i386lynx-tdep.c to i386ly-tdep.c for 14 character file names.
- * Makefile.in, config/i386/i386lynx.mt: Change accordingly.
-
- * values.c (record_latest_value): Fetch lazy values and set VALUE_LVAL
- to not_lval.
-
-Sun Oct 3 15:54:51 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * objfiles.h (objfile): New slot sym_stab_info, use by most
- stab-reading formats.
- * gdb-stabs.h (DBX_SYMFILE_INFO): Access sym_stab_info instead of
- sym_private.
- * coffread.c (coff_symfile_init): Alloc struct for sym_stab_info.
- * dbxread.c, elfread.c, paread.c: Change sym_private references to
- sym_stab_info references.
-
-Sat Oct 2 19:28:35 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * mipsread.c, objfiles.c, utils.c: Use PTR not void *. RISC/OS
- 4.02 lacks void *.
- * elfread.c: Use void * not PTR inside PARAMS.
-
- * config/mips/news-mips.mh: Remove coredep.o; mips-nat.o does it.
- * config/mips/news-mips.mh: Define NAT_FILE not NM_FILE.
- * config/mips/nm-news-mips.h: Include mips/nm-mips.h not nm-mips.h.
-
-Sat Oct 2 16:05:22 1993 Stu Grossman (grossman at cygnus.com)
-
- * Makefile.in, coff-solib.c, coff-solib.h, i386lynx.mt,
- tm-i386lynx.h: Add support for SVR3 COFF shared libraries.
-
-Sat Oct 2 15:50:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m88k-nat.c (store_inferior_registers): When writing all registers,
- don't try to write EXIP_REGNUM or ENIP_REGNUM (not needed for this
- case, and they cause trouble).
-
- * TODO: Don't suggest doing fast watchpoints by stepping a line
- at a time. That would be really hairy and still not fast enough.
- Do suggest debug registers and page table diddling.
-
-Fri Oct 1 14:54:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * printcmd.c (do_examine): Make meaning of 'h', 'w', and 'g' not
- depend on builtin_type_*. Instead, it is always 2, 4, and 8 bytes
- like the documentation says.
- * printcmd.c (decode_format) [CC_HAS_LONG_LONG]: Remove 'l' as
- synonym for 'g'. This was never documented, it shouldn't depend on
- CC_HAS_LONG_LONG, and I don't see what's wrong with 'g'.
-
-Fri Oct 1 10:06:35 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * symtab.c: fix a bug in testsuite (virtfunc.exp)
-
-Thu Sep 30 11:30:56 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m88k-nat.c (fill_gregset): Fix typo (R_SFIP -> R_FIP).
-
- * c-typeprint.c (c_type_print_base, TYPE_FN_FIELD_STUB code):
- If demangled name lacks a colon, don't dump core.
-
- * blockframe.c (find_pc_partial_function): If pst->readin is
- set, don't try to get symbols from pst.
-
- * inflow.c (generic_mourn_inferior): Call reinit_frame_cache
- instead of doing it ourself.
- * blockframe.c (reinit_frame_cache): Use code which was in
- generic_mourn_inferior so we can use this function even when
- we have switched targets.
- * corelow.c (core_detach): Call reinit_frame_cache.
- * target.c (target_detach): Don't call generic_mourn_inferior
- (revert yesterday's change, now handled by core_detach).
- * objfiles.c (free_objfile): Detach any core file if we call
- SOLIB_CLEAR. #include target.h.
-
- * fork-child.c (fork_inferior): Don't call target_terminal_init
- and target_terminal_inferior until we are sure that the inferior
- has called gdb_setpgid. This fixes PR 2900 (Schauer tracked it
- down and was able to reliably reproduce it by putting a sleep()
- before the gdb_setpgid()).
-
-Thu Sep 30 12:00:49 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * c-exp.y, m2-exp.y: Change type of address for msymbol to
- builtin_type_long.
- * infptrace.c (fetch_register, store_inferior_register,
- child_xfer_memory): Use PTRACE_XFER_TYPE for the type of ptrace
- transfers. Provide an `int' default for PTRACE_XFER_TYPE.
-
-Thu Sep 30 11:30:56 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * defs.h (TARGET_*_BIT): Don't use host information (sizeof) in
- picking defaults.
-
- * cp-valprint.c (cp_is_vtbl_ptr_type): Continue to accept old form.
-
-Thu Sep 30 11:25:55 1993 Kung Hsu (kung@cygnus.com)
-
- * cp-valprint.c (cp_is_vtbl_ptr_type):
- change vtable field name to __vtbl (pr2695).
-
- * symtab.c (gdb_mangle_name): fix a bug, to get mangled name right.
-
-Wed Sep 29 18:34:22 1993 Stu Grossman (grossman at cygnus.com)
-
- * Makefile.in: Add deps for i386lynx-nat.o and i386lynx-tdep.o to
- keep non-gnu makes happy.
-
-Wed Sep 29 17:20:54 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hpux_symtab): When a K_END is found for a
- K_MODULE, clear the have_module and have_name flags.
-
-Wed Sep 29 10:52:19 1993 Kung Hsu (kung@cygnus.com)
-
- * c-valprint.c: to fix virtual table print bug (pr2695).
-
-Wed Sep 29 10:52:19 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * target.c (target_detach): Call generic_mourn_inferior.
- * inflow.c (generic_mourn_inferior): Call flush_cached_frames.
-
-Tue Sep 28 23:08:59 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dbxread.c, coffread.c, elfread.c: A few changes to comments.
-
-Tue Sep 28 18:39:37 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * configure.in: Rename ...-lynx* to ...-lynxos*.
- Add m68*-*-lynxos* configuration.
- * dbxread.c (coffstab_build_psymtabs): New function,
- interfaces coffread.c to dbxread functions.
- * coffread.c (coff_symfile_info): Expand to include
- dbx_symfile_info slots.
- (coff_symfile_init): Init coff_symfile_info struct.
- (coff_locate_sections): New functions, finds the stab and stabstr
- sections.
- (coff_symfile_read): Call coffstab_build_psymtabs if a stab
- section is present.
- (coff_section_offsets): Replace fake version with real offsets.
-
-Tue Sep 28 18:00:50 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infcmd.c (run_stack_dummy): Set the frame in the bp_call_dummy
- breakpoint.
-
-Tue Sep 28 17:53:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * config/nm-sysv4.h: Include solib.h. Define SVR4_SHARED_LIBS.
- * config/tm-sysv4.h: Don't include solib.h.
- * config/xm-sysv4.h: Don't define SVR4_SHARED_LIBS.
- * config/i386/i386v4.mt (TDEPFILES): Move solib.o from here...
- * config/i386/i386v4.mh (NATDEPFILES): ...to here.
- * config/i386/nm-i386v4.h: Include nm-sysv4.h.
- * config/m68k/amix.mt (TDEPFILES): Move solib.o from here...
- * config/m68k/amix.mh (NATDEPFILES): ...to here.
-
-Tue Sep 28 09:45:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symmisc.c (print_symbol): Use %02x not %2x for LOC_CONST_BYTES.
-
- Clean up problems with targets and hosts that have 64 bit longs
- and pointers and 32 bit ints.
- * breakpoint.c, buildsym.c, c-lang.c, c-valprint.c, ch-lang.c,
- ch-valprint.c, core.c, cp-valprint.c, dbxread.c, exec.c,
- expprint.c, gdbtypes.c, infcmd.c, language.c, language.h,
- m2-lang.c, maint.c, mips-tdep.c, mipsread.c, partial-stab.h,
- printcmd.c, remote-vx.c, solib.c, source.c, stack.c, symfile.c,
- symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
- Change all printf formats from %x to %lx if outputting an address.
- Change la_*_format to use long format.
- local_hex_string, local_hex_string_custom now take an unsigned long
- argument, change all callers.
- * coffread.c (read_coff_symtab): Remove superfluous cast for
- complaint output.
- * dbxread.c (end_psymtab): Cast MSYMBOL_INFO to long, not int.
- * findvar.c, value.h (write_register): Change val to LONGEST.
- * gdbtypes.h (struct type): Change `bitsize' to long as
- TYPE_FIELD_STATIC_PHYSNAME uses this field as a pointer.
- * inferior.h (struct inferior_status): Change type of stop_pc to
- CORE_ADDR.
- * language.h (local_octal_string, local_octal_string_custom):
- Remove prototype, the functions are neither defined nor used.
- * mipsread.c (parse_symbol): Use temporary variable for bitsize as
- f->bitsize is a long now.
- * objfiles.c (add_to_objfile_sections, build_objfile_section_table):
- Use unsigned long casts instead of int for abusing sections_end
- pointer as integer.
- * stack.c (parse_frame_specification): Change type of `args' to
- CORE_ADDR for SETUP_ARBITRARY_FRAME.
-
- * printcmd.c (make_vasize): Allow redefinition via MAKEVA_SIZE.
- * mipsread.c (parse_type): Alpha cc now supports the t->continued
- bit, update algorithm to match the way the compiler uses it.
-
-Tue Sep 28 12:05:11 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * utils.c (fprintfi_filtered): Fix comments.
-
-Mon Sep 27 18:10:08 1993 Stu Grossman (grossman at cygnus.com)
-
- * coffread.c (read_coff_symtab): Don't call getfilename if there
- are no auxents.
-
-Mon Sep 27 10:22:37 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symtab.c (find_pc_line): Fix comments.
-
- * remote-udi.c (udi_mourn): Don't pop target.
-
-Fri Sep 24 17:25:41 1993 Stu Grossman (grossman at cygnus.com)
-
- * corelow.c: Add multi thread/process support for core files with
- .reg/XXX pseudo-sections.
- * i386lynx-nat.c thread.h thread.c: Remove unnecessary core file
- support.
-
-Thu Sep 23 10:49:37 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-udi.c (download): Skip zero length sections.
-
- * valops.c (search_struct_method, value_struct_elt):
- Use (value)-1, not -1, for error.
-
- * infcmd.c (step_1), infrun.c (wait_for_inferior): Add comments
- about SHIFT_INST_REGS.
-
- * exec.c (exec_file_command): Set text_end based on all code readonly
- sections, not just ".text".
-
- * defs.h, infcmd.c, config/z8k/tm-z8k.h, config/m88k/tm-m88k.h,
- config/sh/tm-sh.h, config/h8300/tm-h8300.h, config/h8500/tm-h8500.h,
- z8k-tdep.c: Remove all references to ADDR_BITS_SET.
- * config/m88k/tm-m88k.h: Define TARGET_WRITE_PC.
-
- * config/m88k/tm-m88k.h, m88k-tdep.c: Add call function stuff.
-
-Thu Sep 23 00:13:06 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/mips/tm-mips.h (STORE_STRUCT_RETURN): Define as noop as
- the pushing of the struct return address is already handled in
- mips_push_arguments.
- * mips-tdep.c (reinit_frame_cache_sfunc): Fix typo in prototype
- declaration.
- * mipsread.c (parse_symbol, parse_type, upgrade_type): Add more
- sanity checks for corrupt symbol entries to avoid core dumps
- reported by benson@odi.com. Obviously Ultrix 4.3A cc now has
- the same problems as the OSF/1 alpha cc.
- * mipsread.c (parse_lines): Iterate over the range of the compressed
- line number entries, the old iteration sometimes failed to stop
- and wrote past the end of the LINETABLE. Add sanity check to avoid
- the same problem in case the line number info is corrupt.
- * mipsread.c (parse_procedure): Adjust pdr for alpha __sigtramp.
- * mipsread.c (parse_external, parse_partial_symbols): Ignore stNil
- symbols that are produced for statics in .o files and stLocal symbols
- that are produced for every section in OSF/1 dynamically linked
- executables.
- * mipsread.c (psymtab_to_symtab_1): Put out `undefined symbols'
- warning only under `verbose on' as there are many undefined symbols
- in a dynamically linked executable.
-
-Wed Sep 22 10:28:06 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/i960/nindy960.mt: Don't define REMOTE_O; REMOTE_O was
- intended only for VxWorks. Remove dcache.o from TDEPFILES now
- that we pick it up from the default REMOTE_O.
-
- * breakpoint.c (bpstat_what): Initialize retval.call_dummy and
- retval.step_resume.
-
- * mips-tdep.c (mips_frame_chain): If frame size zero, return zero.
- * rs6000-tdep.c: Add comment about framelessness.
-
- * remote-nindy.c: Declare ninMemGet and ninMemPut.
-
-Wed Sep 22 08:02:57 1993 Stu Grossman (grossman at cygnus.com)
-
- * Makefile.in: Add i386lynx-tdep to the right places.
- (TARDIRS): Add gdbserver.
-
- * exec.c (print_section_info): Print entry point.
- * i386lynx-nat.c (i386lynx_saved_pc_after_call): Move into
- i386lynx-tdep.c. Add core file support.
- * i386lynx-tdep.c: New module for Lynx/386 target dependant code.
- * maint.c: Add `maint info sections' command to print info about all
- sections that BFD knows about for exec and core files.
- * sparc-tdep.c (sparc_push_dummy_frame): Update stack pointer
- before putting frame on the stack. Consolidate writes to reduce
- traffic for remote debugging.
- * config/i386/i386lynx.mh (NATDEPFILES): Remove exec.o.
- * config/i386/i386lynx.mt (TDEPFILES): Add exec.o, i386lynx-tdep.o.
- * config/i386/nm-i386lynx.h: Add target_pid_to_str().
- * config/i386/tm-i386lynx.h: Remove target_pid_to_str().
- * sparclite/Makefile.in: Add deps to keep Sun make happy.
-
-Tue Sep 21 17:48:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.h, breakpoint.c (bpstat_stop_status): Add new argument
- not_a_breakpoint.
- * infrun.c (wait_for_inferior): Pass it. Also consolidate the
- test of whether we are stepping into a CURRENTLY_STEPPING macro.
-
-Tue Sep 21 17:22:34 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * breakpoint.c (bpstat_stop_status),
- infcmd.c (step_1),
- infrun.c (wait_for_inferior): collapse SHIFT_INST_REGS ifdef
- and insert macro.
-
- * m88k-tdep.c: include ieee-float.h. new global target_is_m88110.
- new const struct ext_format_m88110 for float format.
- (pic_prologue_code): add braces.
- (next_insn): remove unused variable buf.
- (frame_find_saved_regs): remove unused variables next_addr,
- saved_regs, regnum.
- (frame_locals_address): remove unused variables frame, ap.
- (frame_args_address): remove unused variables frame, ap.
- (push_parameters): add some breaks and a default case.
-
- * remote-bug.c: remove redundant includes of value.h, target.h,
- serial.h.
- (bug_open): corrected typo, sr_multi_scan -> gr_multi_scan.
- (bug_fetch_register): special case sfip register for m88110.
- remove flag bit masking of pc registers. This should be handled
- by the ADDR_BITS_* macros.
- (bug_store_register): special case sfip register for m88110.
- Corrected sprint format for extended registers.
-
- * config/m88k/tm-m88k.h: white space and comment changes. include
- ieee-float.h. expanded to cope with m88110 extended registers.
- (R0_REGNUM, XFP_REGNUM, X0_REGNUM): new macros.
- (SHIFT_INST_REGS): becomes a real macro.
-
-Tue Sep 21 17:48:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.c (breakpoint_1): Support bp_call_dummy.
-
-Tue Sep 21 17:06:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * elfread.c (record_minimal_symbol_and_info): Guess the section to
- use from the type.
- * objfiles.c: Include gdb-stabs.h for SECT_* macros.
- (objfile_relocate): Relocate textlow and texthigh in psymtabs.
- Relocate partial symbols. Check that minimal SYMBOL_SECTION is
- nonnegative before using it.
- * symtab.h: Adjust section field comment.
-
- * remote.c (interrupt_query): New function.
- (remote_interrupt_twice): Call interrupt_query.
- (putpkt, getpkt): If quit_flag is set, call interrupt_query.
- (remote_wait): Don't bother with objfile_relocate if the addresses
- haven't changed.
- (remote_fetch_registers): If we see a packet that doesn't start
- with a hex character, fetch a new one.
-
-Tue Sep 21 11:44:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote.c, remote-utils.c: Use SERIAL_FLUSH_INPUT after opening it.
-
- * printcmd.c (print_scalar_formatted): When truncating value we are
- going to print as unsigned, handle it generally for any length
- less than sizeof (LONGEST), rather than special-casing sizeof (char),
- sizeof (short), and sizeof (long). Clarify comment on what this
- is for.
-
- * symfile.c (deduce_language_from_filename): Accept .cxx for C++.
- * buildsym.c (start_subfile): Use deduce_language_from_filename
- rather than checking for .C or .cc ourself.
-
-Mon Sep 20 14:53:11 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * defs.h: Declare argument of re_comp as const char *.
-
- * remote.c, remote-mips.c: Use sr_get_debug not remote_debug.
-
- * README: Say using bfd from another release doesn't generally work.
-
-Sat Sep 18 10:13:18 1993 Jim Kingdon (kingdon@poseidon.cygnus.com)
-
- * mipsread.c (parse_type): Don't complain() if we guessed struct
- and it was a union, or vice versa.
-
- * defs.h (make_cleanup): Change PTR to void * when inside PARAMS.
-
- Some of the following is in #ifdef CALL_DUMMY_BREAKPOINT_OFFSET.
- * breakpoint.h (enum bptype): Add bp_call_dummy.
- (struct bpstat_what): Add call_dummy field.
- * infrun.c (wait_for_inferior): Deal with it.
- * breakpoint.c (bpstat_what): Deal with call dummy breakpoint.
- * infcmd.c (run_stack_dummy): Set the call dummy breakpoint.
- * config/sparc/tm-sparc.h: Define CALL_DUMMY_BREAKPOINT_OFFSET.
-
- * remote-sim.h: New file.
- * remote-sim.c: Add remote debug feature. Rename stuff to distinguish
- interface to simulator from gdb-specific stuff. Other changes.
- * remote-sp64sim.c: Renamed to remote-sim.c.
- Use sr_get_debug instead of our own sim_verbose/simif_snoop.
- Use gnutarget in call to bfd_openr.
- Rename simif_* to gdbsim_*.
- * config/sparc/sp64sim.mt: Change remote-sp64sim.c to remote-sim.c.
-
-Fri Sep 17 04:41:17 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * findvar.c (extract_signed_integer): Cast *p to LONGEST before doing
- the xor and subtract. Otherwise it will not sign extend if the type
- of LONGEST is larger than int.
- * cp-valprint.c (cp_print_class_method): Inhibit core dump if
- domain is an undefined cross reference.
- * valops.c (call_function_by_hand): Set real_pc to correct
- value if CALL_DUMMY_LOCATION != ON_STACK.
-
-Thu Sep 16 20:37:06 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
-
- * config/a29k/tm-a29k.h (FRAME_CHAIN): If rsize is zero, return zero.
-
-Thu Sep 16 13:16:22 1993 Stu Grossman (grossman at cygnus.com)
-
- * infrun.c (wait_for_inferior): Allow user to single step within
- a stack dummy.
-
-Thu Sep 16 12:34:01 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
-
- * dbxread.c (copy_pending): Deal with END NULL.
- (process_one_symbol): Add comments about what common_block NULL means.
-
-Wed Sep 15 14:50:26 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
-
- * remote-udi.c, remote-adapt.c, remote-mm.c: Move processor_type
- to tm-a29k.h and a29k-tdep.c and make it an enum.
- * a29k-tdep.c (a29k_get_processor_type): New function. Fix many
- aspects of how we detected the processor type.
- * remote-udi.c, remote-adapt.c, remote-mm.c (*_open): Call it
- rather than figuring out the type ourselves.
-
-Thu Sep 16 12:12:59 1993 Stu Grossman (grossman at cygnus.com)
-
- * sparc-stub.c (_trap_low): Do restore/save sequence after
- setting sp to ensure that we load the previous window from the
- right place on the stack.
-
-Thu Sep 16 00:36:32 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c: Many changes for alpha ecoff format:
- Correct sizeof(int) == sizeof(long) assumptions.
- Replace stParsed hack by putting the parsed types on the pending chain.
- Replace mips specific ecoff mapping by ECOFF_REG_TO_REGNUM macro,
- provide default for cross debugging.
- Swapping the symbol back is no longer needed as the symbol is not
- modified anymore.
- Add new alpha basic types, handle btTypedef, handle stStaticProc
- external symbols .
- Update and clean up cross_ref for alpha cc cross ref variations.
- Allocate types on the type_obstack to inhibit storage leaks.
- * config/mips/tm-mips.h (ECOFF_REG_TO_REGNUM): Define.
- * gdbtypes.c (recursive_dump_type): Dump TYPE_TAG_NAME if it is set.
-
-Tue Sep 14 09:12:17 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
-
- * stabsread.c (read_type): Process "s" (size) type attribute.
- If type is defined to another type, copy the type.
-
-Tue Sep 14 18:37:17 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * config/i386/i386v4.mh (NATDEPFILES): Move exec.o from here...
- * config/i386/i386v4.mt (TDEPFILES): ...to here.
-
-Tue Sep 14 12:21:49 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * Makefile.in (remote_utils_h): add serial.h and target.h.
- (main.o, remote-es.o, remote-nindy.o, remote.o): remove target.h
- (already in remote_utils_h).
- (remote-utils.o): new rule.
-
- * remote-utils.h: include serial.h.
-
- * serial.h: ifdef protect from multiple inclusion.
-
- * remote.c, remote-nindy.c, remote-mon.c, remote-es.c: include
- remote-utils.h.
-
- * remote.c (remote_open), remote-nindy.c (nindy_open,
- nindy_files_info), remote-mon.c (general_open), remote-es.c
- (es1800_open): use remote-utils facilities for baud rate.
-
-Tue Sep 14 09:12:17 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
-
- * paread.c, coffread.c, elfread.c, dwarfread.c:
- Include <time.h> and <sys/types.h> before libbfd.h.
-
- * paread.c: Define BYTES_IN_WORD before including aout/aout64.h.
-
- * Makefile.in (a29k-tdep.o): Depend on $(defs_h).
- * config/a29k/tm-a29k.h (SAVED_PC_AFTER_CALL): Use gr122 not lr0
- if this is a transparent procedure.
-
-Mon Sep 13 16:06:43 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
-
- * remote.c: Define remote_debug to 0 and #if 0 baud_rate. Temporary
- hack so this file compiles again.
-
- * remote-utils.c (gr_multi_scan): Cast return value from alloca.
- (gr_multi_scan): #if 0 never-reached return(-1).
-
- * remote-udi.c (udi_wait): Return inferior_pid not 0.
-
-Mon Sep 13 14:14:35 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- Collect some remote things into remote-utils.
- * remote-utils.[ch]: new files of functions collected from several
- different remote targets.
- * Makefile.in (REMOTE_O): add remote-utils.o.
- (dcache_h, remote_utils_h): new macros.
- (HFILES): add $(remote_utils_h).
- (ALLDEPFILES): add $(remote_utils_h).
- (dcache.o): new rule.
- (main.o, remote-bug.o): also depend on $(remote_utils_h).
- * target.h (remote_debug): extern moved to remote-utils.h.
- * target.c (find_default_run_target, find_core_target): initialize
- runable.
- (remote_debug): moved to remote-utils.c.
- (_initialize_targets): move declaration of user variable
- remotedebug to remote-utils.c.
- * remote-bug.c: include remote-utils.h rather than dcache.h.
- (bug_close, bug_write, bug_write_cr, desc, bug_dcache, timeout,
- dev_name, check_open, is_open, readchar, readchar_nofail,
- pollchar, expect, expect_prompt, get_hex_digit, get_hex_byte,
- get_hex_word, bug_kill, bug_detach, bug_create_inferior,
- multi-scan, bug_prepare_to_store, bug_fetch_word,
- bug_store_word, bug_files_info, bug_mourn, bug_com, bug_device,
- bug_speed): removed and replaced with facilities from
- remote-utils.[ch].
- (bug_read_inferior_memory): renamed to bug_read_memory.
- (bug_write_inferior_memory): renamed to bug_write_memory.
- (bug_xfer_inferior_memory): renamed to bug_xfer_memory.
- (get_word): comment out this unused function for now.
- (bug_settings, cpu_check_strings): new statics.
- (bug_open): rewritten to use gr_open.
- (_initialize_remote_bug): remove declarations of commands bug,
- device, speed.
- * main.c: include remote-utils.h.
- (baud_rate): removed to remote-utils.c.
- (main): handle baud rate settings using new facilities from
- remote-utils.
- * defs.h (baud_rate): removed extern.
-
- m88110 support via bug-197 monitor.
- * remote-bug.c (get_reg_name, bug_fetch_register,
- bug_store_register): added m88110 extended register support.
- (wait_strings): added bug-197 prompt.
- (bug_wait): cope with bug-197 prompt.
- (start_load): cope with either bug-197 or bug-187 prompt.
-
-Mon Sep 13 12:53:09 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
-
- * inferior.h, infrun.c, thread.c, infcmd.c: Remove all uses of
- pc_changed. If it was ever set to a non-zero value, it was before
- GDB 2.8. It doesn't seem to have any useful function.
-
- * defs.h: Don't define NORETURN (see comment).
-
-Sat Sep 11 10:46:09 1993 Jim Kingdon (kingdon@poseidon.cygnus.com)
-
- * m88k-nat.c (fill_gregset): Set r31 and sfip.
-
-Thu Sep 9 10:18:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-udi.c (udi_wait, case UDIStdinNeeded): Use a loop calling
- getchar() (terminated only on '\n') instead of scanf. Send the
- '\n' which terminates it to the remote system.
-
- More gcc lint:
- * exec.c (ignore): Return 0.
- * stack.c (return_command): Fetch lazy value directly, not via
- VALUE_CONTENTS, to avoid "value computed is not used".
- * inflow.c (new_tty): Move osigttou inside #if.
-
- * remote.c (remote_fetch_registers): If remote reply is short, just
- note that fact and keep going (reading extra registers as all bits 0).
- (remote_store_registers): Send number of registers that were found
- by remote_fetch_registers.
- * m68k-tdep.c, config/m68k/tm-m68k.h, config/m68k/tm-*.h: Remove
- HAVE_68881. Define CANNOT_STORE_REGISTER if ptrace() can't write
- floating registers.
- * config/m68k/{tm-m68k-nofp.h,m68k-nofp.mt,tm-m68k-fp.h,m68k-fp.mt}:
- Remove, replaced by {tm-m68k-em.h,m68k-em.mt}.
- * Makefile.in, configure.in: Change accordingly.
-
-Thu Sep 9 04:59:03 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c (cross_ref): Allow SGI extended symbol types as cross
- reference targets.
- * symmisc.c (print_symbol): Use TYPE_TAG_NAME not TYPE_NAME to avoid
- printing of identities.
-
-Wed Sep 8 19:18:27 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.c (breakpoint_1): Deal with step resume breakpoint.
-
-Wed Sep 8 13:01:10 1993 K. Richard Pixley (rich@cygnus.com)
-
- Gcc lint.
- * config/m88k/tm-m88k.h (frame_find_saved_regs): prototype.
- * config/h8300/tm-h8300.h (NUM_REGS): rewrite to avoid nested comment.
- * blockframe.c (get_prev_frame_info): initialize address.
- * breakpoint.c (bpstat_copy): initialize retval.
- (bpstat_stop_status): initialize value_is_zero.
- (bpstat_what): initialize bs_class.
- (breakpoint_1, mention): add do-nothing case for bp_step_resume.
- (break_command_1): initialize cond_end, addr_end, &
- canonical_strings_chain.
- (enable_breakpoint): initialize save_selected_frame.
- * buildsym.c (end_symtab): initialize symtab & linetablesize.
- * c-exp.y (parse_number): initialize i.
- * c-typeprint.c (c_type_print_varspec_prefix): include
- TYPE_CODE_BITSTRING in switch statements and do nothing.
- * c-valprint.c (c_val_print): removed unused variable c.
- * ch-valprint.c (chill_val_print): removed unused variable eltlen.
- * cp-valprint.c (cp_print_class_method): initialize f & j.
- * eval.c (evaluate_subexp): initialize pc2, arg1, arg2.
- * expprint.c (print_subexp): initialize myprec, assoc, & tempstr.
- * findvar.c (value_from_register): initialize first_addr.
- * gdbtypes.c (lookup_struct_elt_type): localize use of temporary
- variable typename.
- * infcmd.c (run_stack_dummy): return zero rather than simple
- return.
- * infrun.c (wait_for_inferior): initialize stop_sp, prologue_pc.
- remove symtab, appears unused.
- (restore_selected_frame): return 1.
- * mipsread.c (psymtab_to_symtab_1): initialize first_off.
- (fixup_sigtramp): initialize b0.
- * printcmd.c (do_examine): initialize val_type.
- (print_frame_args): initialize b.
- * ser-tcp.c (tcp_restore): comment out declaration. Appears
- unused.
- * ser-unix.c (hardwire_restore): comment out declaration. Appears
- unused.
- (hardwire_send_break): moved variable status into ifdef
- HAVE_SGTTY.
- (wait_for): moved variable numfds into ifdef HAVE_SGTTY.
- * serial.h: comment change only.
- * stabsread.c (rs6000_builtin_type): initialize rettype.
- (read_range_type): initialize nbits.
- * stack.c (print_frame_info): remove unused variable numargs.
- (parse_frame_specification): remove unused variables arg1, arg2,
- arg3.
- (return_command): initialize return_value.
- * symfile.c (cashier_psymtab): initialize pprev.
- * symtab.c (find_pc_psymbol): initialize best.
- (lookup_symbol): initialize s.
- (make_symbol_completion_list): initialize quote_pos.
- * thread.c: include command.h.
- (thread_info): static declaration removed; unused.
- (info_threads_command): fix == vs = typo.
- * typeprint.c (whatis_exp): initialize old_chain.
- * valprint.c (val_print_string): remove unused variable
- first_addr_err. Initialize old_chain.
- (_initialize_valprint): white space comment change.
- * values.c (show_values): rewrite if statement to avoid empty
- body.
- (vb_match): remove unused variable fieldtype_target_type.
-
-Wed Sep 8 10:21:33 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (mipsread.o): Depend on $(bfd_h).
-
-Tue Sep 7 13:06:44 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbserver/Makefile.in (TAGS): config files are in
- $(srcdir)/../config, not $(srcdir)/config.
-
- * config/pa/tm-hppa.h: Declare target_read_pc and target_write_pc.
- (STORE_RETURN_VALUE): Pass the correct offset of the return
- register to write_register_bytes.
- * hppa-tdep.c: Use target_write_pc if PCOQ_TAIL_REGNUM was not saved.
-
-Tue Sep 7 14:30:34 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * remote.c (remote_wait): Don't call error. Instead, call warning
- inside a loop. User can ^C to get out.
-
- * config/m68k/tm-m68k.h (FIX_CALL_DUMMY): Changed name of swapping
- routine to match BFD name change.
- * config/z8k/tm-z8k.h (FIX_CALL_DUMMY): Likewise.
-
-Mon Sep 6 15:01:57 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * elfread.c: change elf32_symbol_type to elf_symbol_type
-
-Mon Sep 6 15:43:25 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * remote.c (remote_wait): Added 'W' and 'N' responses.
-
-Fri Sep 3 08:57:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * main.c, utils.c: Add comments about immediate_quit.
-
- * elfread.c (elf_symtab_read): Don't add symbols starting with ".L"
- to minimal symbols.
-
- * target.c (pop_target): Don't try to deal with the stack becoming
- empty. Shouldn't happen and the code that tried was broken.
-
- * dcache.c: Cast return value from xmalloc.
-
- * remote.c: Move setting of immediate_quit from remote_open to
- remote_start_dummy and set it back to zero when done.
-
-Thu Sep 2 00:07:36 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m88k-tdep.c: Remove a bunch of unused #includes.
-
- * language.h: Add comment about current_language.
-
- * mips-tdep.c (_initialize_mips_tdep): Change heuristic-fence-post
- from var_uinteger to var_zinteger.
-
- * configure.in: Fix typo (delta88r4 -> delta88v4).
-
- * config/m88k/xm-delta88.h: Don't include sys/siginfo.h. It was
- to make this work on SVR4 before SVR4 had its own configuration,
- and it breaks SVR3.
-
- * config/m88k/tm-delta88v4.h: Define FRAME_CHAIN_VALID_ALTERNATE.
-
- * config/m88k/delta88v4.h (NATDEPFILES): Remove infptrace.o inftarg.o.
-
- * config/m88k/xm-dgux.h: Renamed from config/m88k/xm-m88k.h.
- * config/m88k/m88k.mh: Use xm-dgux.h.
- * config/m88k/xm-m88k.h: New file, with HOST_BYTE_ORDER,
- MAKEVA_END and MAKEVA_ARG.
- * config/m88k/xm-*.h: Include m88k/xm-m88k.h.
- * printcmd.c: Remove __INT_VARARGS_H code; now in xm-m88k.h.
-
-Wed Sep 1 19:31:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-udi.c (udi_wait): Call `warning' not `error'.
-
- * symtab.c (COMPLETION_LIST_ADD_SYMBOL): If the symbol has a
- demangling, don't put the mangled form in the completion list.
-
- * symtab.c, symfile.c, c-exp.y, ch-exp.y, m2-exp.y, buildsym.c,
- symfile.h, stabsread.c, minsyms.c, solib.c, nlmread.c, dwarfread.c
- partial-stab.h, symmisc.c, gdbtypes.c: Lint. Remove (or put
- inside #if) unused variables and labels. Fix unclosed comment.
- Deal with enumeration values unhandled in switch statements. Make
- sure non-void functions return values. Include appropriate
- headers.
- * dbxread.c (elfstab_build_psymtabs): Don't check for unsigned
- value < 0.
-
-Wed Sep 1 14:36:00 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * i960-tdep.c, ns32k-pinsn.c, remote-adapt.c, xcoffread.c:
- index -> strchr.
-
-Wed Sep 1 11:35:49 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote.c: Add comment explaining why dcache is disabled.
- (remote_fetch_word, remote_store_word): Make static and #if 0.
- They are not called from anywhere.
-
-Wed Sep 1 14:41:28 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * arm-tdep.c, convex-tdep.c, convex-xdep.c, dbxread.c,
- h8300-tdep.c, h8500-tdep.c, i960-pinsn.c, i960-tdep.c,
- infptrace.c, m88k-tdep.c, mips-tdep.c, regex.c, remote-vx.c,
- rs6000-tdep.c, xcoffexec.c, xcoffread.c, z8k-tdep.c,
- config/arm/tm-arm.h, config/convex/tm-convex.h,
- config/gould/tm-np1.h, config/gould/tm-pn.h,
- config/m68k/tm-isi.h, config/ns32k/tm-umax.h,
- config/pa/tm-hppa.h, config/pyr/tm-pyr.h,
- config/rs6000/tm-rs6000.h, config/tahoe/tm-tahoe.h,
- config/vax/tm-vax.h: bzero -> memset.
-
- * regex.c: bcmp -> memcmp.
-
-Wed Sep 1 11:35:49 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symtab.c (find_pc_line, find_line_common),
- symtab.h (struct linetable), xcoffread.c (arrange_linetable):
- Revise comments re linetable sorting.
- * buildsym.c (compare_line_numbers): Sort by pc, not by line.
- * coffread.c: Tell end_symtab to sort the line table.
-
- * coffread.c: Re-work a lot of the coff-specific stuff to use stuff
- in buildsym.c. This includes coff_finish_block, coff_context_stack,
- coff_local_symbols, coff_file_symbols, coff_global_symbols,
- coff_end_symtab and coff_add_symbol_to_list.
- (read_enum_type): Deal with it now that we have a "struct pending"
- not a "struct coff_pending".
-
- * buildsym.c (end_symtab): Don't realloc subfile->linetable.
-
-Wed Sep 1 13:12:43 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * a68v-nat.c, altos-xdep.c, convex-tdep.c, convex-xdep.c,
- findvar.c, hppab-nat.c, hppah-nat.c, i386mach-nat.c,
- irix4-nat.c, m68k-tdep.c, m88k-tdep.c, mipsread.c, regex.c,
- remote-bug.c, remote-hms.c, rs6000-nat.c, rs6000-tdep.c,
- sparc-nat.c, stabsread.c, sun3-nat.c, sun386-nat.c, symfile.c,
- umax-xdep.c, xcoffread.c, 29k-share/udi/udip2soc.c,
- 29k-share/udi/udr.c, config/a29k/tm-a29k.h, config/arm/tm-arm.h,
- config/convex/tm-convex.h, config/gould/tm-np1.h,
- config/gould/tm-pn.h, config/h8300/tm-h8300.h,
- config/h8500/tm-h8500.h, config/i386/tm-i386aix.h,
- config/i386/tm-sun386.h, config/i386/tm-symmetry.h,
- config/i960/tm-i960.h, config/m68k/tm-news.h,
- config/m88k/tm-m88k.h, config/mips/tm-mips.h,
- config/ns32k/tm-merlin.h, config/ns32k/tm-umax.h,
- config/pa/tm-hppa.h, config/pyr/tm-pyr.h,
- config/rs6000/tm-rs6000.h, config/sh/tm-sh.h,
- config/tahoe/tm-tahoe.h, config/vax/tm-vax.h,
- config/z8k/tm-z8k.h, nindy-share/nindy.c: bcopy -> memcpy.
-
-Wed Sep 1 05:05:53 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c (parse_partial_symbols): Use language from FDR if it
- is unambigous. Patch from ptf@delcam.co.uk (Paul Flinders).
- * mipsread.c (ecoff_symfile_info): New struct to hold the global
- pending_list.
- * mipsread.c (mipscoff_symfile_init, parse_partial_symbols):
- Allocate the global pending list and link it to the objfile.
- * mipsread.c (is_pending_symbol, add_pending): Use global pending
- list from objfile. Allocate pending list entries from the
- psymbol_obstack.
- * mipsread.c (free_pending): Remove. The pending list is now
- freed when the psymbol_obstack is freed.
- * mipsread.c (psymtab_to_symtab1): Remove pending list allocation,
- the global pending list is used now.
- * mipsread.c (parse_partial_symbols): Skip only the first
- file indirect entry when building the dependency list.
-
-Tue Aug 31 15:01:27 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- Break dcache code out of remote.c.
- * dcache.h: white space changes only.
- * dcache.c: add user settable variable to set whether data caching
- is in use.
- * remote.c: include dcache.h. removed data caching code which is
- now in dcache.c. Compile in data caching again. (data caching
- is currently off by default.)
- (remote_read_bytes, remote_write_bytes): change second arg to
- unsigned char.
- (remote_dcache): new static variable.
- * Makefile.in (REMOTE_O): add dcache.o.
- * config/m88k/m88k.mt (TDEPFILES): removed dcache.o.
-
- Break dcache code out of remote-nindy.c.
- * remote-nindy.c: removed dcache code. Changed callers to use new
- conventions. include dcache.h.
- (nindy_dcache): new static variable.
- * config/i960/nindy960.mt (TDEPFILES): added dcache.o.
-
- Break dcache code out of remote-bug.c into dcache.[hc].
- * Makefile.in (dcache_h): new macro.
- (HFILES): added $(dcache_h).
- (ALLDEPFILES): added dcache.c.
- (dcache.o): new rule.
- (remote-bug.o): now depends on $(dcache_h).
- * remote-bug.c: include dcache.h. remove externs for insque and
- remque, add extern for bcopy. Prototype bug_close,
- bug_clear_breakpoints, bug_write_cr. dcache code moved to
- dcache.[hc]. Changed dcache calling convention to include an
- initial DCACHE argument.
- (bug_dcache): new static variable.
- (bug_read_inferior_memory): change second arg to
- unsigned char.
- * dcache.[ch]: new files.
- * config/m88k/m88k.mt (TDEPFILES): add dcache.o.
-
-Tue Aug 31 10:33:13 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * c-typeprint.c (c_print_type_base): Treat show = 0 just like
- show < 0. The only case where we had been distinguishing is that
- show = 0 used to print "struct " or "enum " instead of
- "struct {...}" or "enum {...}" which seems clearly wrong.
-
-Mon Aug 30 17:51:32 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * configure.in: recognize m88110 as an m88k.
-
-Mon Aug 30 16:07:59 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * valops.c (call_function_by_hand): If we discard cleanups, call
- bpstat_clear (&inf_status.stop_bpstat).
-
-Mon Aug 30 12:47:46 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * stabsread.h, dbxread.c (end_psymtab): Return NULL if the psymtab
- was empty and thrown away.
- * mipsread.c (parse_partial_symbols): Do not add empty psymtabs to
- dependency list, skip self dependencies.
- * mipsread.c (parse_fdr): Removed, obsolete.
- * mipsread.c (parse_lines): Check for cbLine being zero, not
- cbLineOffset.
- * mipsread.c (struct symloc): Add pst_language.
- * mipsread.c (parse_partial_symbols): Set up proper language for
- header files, save it in pst_language for psymtab_to_symtab_1.
- * mipsread.c (psymtab_to_symtab_1): Use pst_language.
-
-Mon Aug 30 10:48:06 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * configure.in: Fix typo m88*-motorola-svr4* -> sysv4*.
-
-Fri Aug 27 17:09:19 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * paread.c: Include som.h instead of libhppa.h. (From Utah.)
-
-Fri Aug 27 09:30:40 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * symmisc.c (dump_symtab): Use catch_errors around print_symbol.
- Change calling sequence of print_symbol to fit catch_errors.
-
- * mips-tdep.c: Call reinit_frame_cache every time the user does
- "set heuristic-fence-post".
-
- * gdbserver/low-sun3.c: New file.
- * gdbserver/Makefile.in, config/m68k/sun3.mh: Change accordingly.
-
- * Rename files for 14-character limits:
- gdbserver/remote-gutils.c -> gdbserver/utils.c
- gdbserver/remote-inflow.c -> gdbserver/low-lynx.c
- gdbserver/remote-inflow-sparc.c -> gdbserver/low-sparc.c
- gdbserver/remote-server.c -> gdbserver/server.c
- remote-monitor.c -> remote-mon.c
- * Makefile.in, gdbserver/Makefile.in, gdbserver/configure.in,
- config/m68k/monitor.mt, config/i386/i386lynx.mh,
- config/sparc/sun4os4.mh: Change accordingly.
- * gdbserver/Makefile.in: Remove more junk inherited from gdb Makefile.
-
-Thu Aug 26 14:32:51 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infcmd.c, inferior.h (run_stack_dummy): If we stop somewhere
- besides the dummy, return 1 rather than calling error().
- Let caller print the error message. Remove name argument.
- * valops.c (call_function_by_hand): Deal with changes to calling
- sequence of run_stack_dummy. Discard restore_inferior_status cleanup
- if run_stack_dummy returns 1.
-
- * Version 4.10.2.
-
- * config/mips/tm-mips.h (EXTRACT_STRUCT_VALUE_ADDRESS):
- Get struct return address from v0, not a0.
-
- * infrun.c (restore_inferior_status): Use catch_errors when
- restoring selected frame.
-
-Wed Aug 25 21:52:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c (save_inferior_status, restore_inferior_status):
- Save and restore the registers too.
- * inferior.h (struct inferior_status): Add "registers".
-
-Tue Aug 24 00:36:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dbxread.c (end_psymtab): Clean up comment.
-
- * frame.h, symtab.h, findvar.c (read_var_value): Change basereg
- support to use LOC_BASEREG rather than SYMBOL_BASEREG_VALID.
- * dwarfread.c: Use LOC_BASEREG where appropriate.
- * Various: Support LOC_BASEREG and LOC_BASEREG_ARG.
-
- * coffread.c (init_lineno, init_stringtab): Don't check whether
- xmalloc returned NULL.
-
- * config/vax/xm-vaxult.h: Define NO_PTRACE_H.
-
- * target.c, target.h: Add "set remotedebug" command.
- * remote-bug.c, remote.c, remote-mips.c: Remove "set remotedebug" and
- "set m88ksnoop" options and use generic "set remotedebug" instead.
- * NEWS: Describe this change.
-
-Mon Aug 23 20:26:22 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * buildsym.h: Remove declaration of dbxread.c functions.
- * stabsread.h: Group together dbxread.c functions.
- Move elfstab_build_psymtabs here from symfile.h.
- Declare pastab_build_psymtabs.
- * elfread.c, paread.c: Include stabsread.h (for stabsread_new_init
- declaration, etc).
-
-Mon Aug 23 17:16:23 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * remote-bug.c: rename quiet to bug88k_snoop.
- (double_scan, multi_scan): generalize double_scan into a scan
- for multiple patterns. Rename to multi_scan.
- (bug_wait, bug_write_inferior_memory): adapt to use the new
- multi_scan in order to catch and represent target bus errors.
- (bug_scan): currently unused, so comment out.
- (bug_quiet): removed. Replaced with a standard user settable boolean.
-
- * m88k-tdep.c: remove include of sys/dir.h. Appears unnecessary
- and isn't available on solaris.
-
-Mon Aug 23 14:56:42 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/m88k/{delta88v4.mt,delta88v4.mh}: New files
- * config/m88k/delta88.mh: Fix comment.
- * config/m88k/tm-delta88.h: Remove unused BCS define.
- * config/m88k/{tm-delta88v4.h,xm-delta88v4.h,nm-delta88v4.h}:
- New files.
- * configure.in: Recognize m88*-motorola-sysv4*.
- * m88k-nat.c: Always include sys/types.h; don't depend on USG.
-
-Mon Aug 23 12:57:42 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c (parse_symbol, parse_type, cross_ref): Pass name of
- symbol as an argument and use it in complaints.
- * symmisc.c (dump_psymtab): Dump filenames of dependencies.
-
-Mon Aug 23 1993 Sean Fagan (sef@cygnus.com)
- and Jim Kingdon (kingdon@cygnus.com)
-
- Add NetBSD support:
- * configure.in: Recognize netbsd.
-
-Sun Aug 22 22:50:32 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (get_textlow): Don't go past a K_END when looking for a
- K_FUNCTION. Avoids losing on source files with no functions.
-
-Fri Aug 20 14:01:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-nindy.c: Remove unused include of sys/ioctl.h.
-
- * frame.h, symtab.h: Revise comments regarding baseregs.
-
-Fri Aug 20 15:07:05 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c (parse_partial_symbols, psymtab_to_symtab_1):
- Set language for psymtab and symtab.
- * mipsread.c (new_symbol): Set language and initialize demangled
- name for symbol.
- * symmisc.c (print_symbol): Use SYMBOL_SOURCE_NAME when printing
- the symbol type.
- * symtab.c (decode_line_1): Inhibit coredumps with cfront executables.
-
-Fri Aug 20 14:01:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Move KERNEL_U_ADDR from xm-hp300bsd.h to nm-hp300bsd.h and make
- it conditionalized on 4.3 vs. 4.4.
- * config/m68k/nm-hp300bsd.h: Move REGISTER_U_ADDR out of 4.3 and
- 4.4 sections; it was identical and now works for 4.4.
-
- * mips-tdep.c (is_delayed): Use INSN*BRANCH* not ANY_DELAY.
-
- * printcmd.c (MAKEVA_END): Update this version to use "aligner".
-
-Thu Aug 19 22:08:09 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/vax/tm-vax.h (BELIEVE_PCC_PROMOTION): Define.
- * mipsread.c (parse_symbol, parse_type, cross_ref): Handle corrupt
- file indirect entries with complaints instead of core dumps. Remove
- complaint for stTypedef within aggregates.
-
-Thu Aug 19 17:58:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * coffread.c (process_coff_symbol): Ignore tagnames like .0fake.
-
- * coffread.c (coff_read_enum_type): #if 0 out code which changes
- enum {FALSE, TRUE} into boolean.
-
- * config/m68k/delta68.m{t,h}: Use nm-delta68.h, etc. not
- non-existent files nm-delta.h, etc.
- * config/m68k/tm-delta68.h: Define CANNOT_STORE_REGISTER.
- * delta68-nat.c: Add "[0]" in offsetof argument.
- * delta68-nat.c (_initialize_kernel_u_addr): Don't try to set up
- nl with initializer, just assign to it. Check n_scnum field on
- return.
-
-Wed Aug 18 21:42:52 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hpux_symtab): Call SET_NAMESTRING for K_MODULE
- debug symbols.
-
-Wed Aug 18 12:03:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * printcmd.c (print_address), values.c (value_as_pointer): Don't
- use ADDR_BITS_REMOVE.
- * defs.h: Try to clarify comment about ADDR_BITS_REMOVE.
-
- * blockframe.c (block_innermost_frame): Uncomment.
- Return NULL if passed NULL.
- * frame.h: Declare it.
- * expression.h (union exp_element): Add field block.
- * parse.c (write_exp_elt_block): New function.
- * expression.h (OP_VAR_VALUE): Now takes additional struct block *.
- * *-exp.y: Write block for OP_VAR_VALUE.
- * eval.c, expprint.c, parse.c: Deal with block for OP_VAR_VALUE.
- * valops.c, value.h (value_of_variable), callers:
- Add second argument, for block.
-
- * main.c (gdb_readline): If we read some characters followed by EOF,
- return them rather than returning NULL.
-
-Tue Aug 17 11:14:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * mips-tdep.c: Remove unused #ifndef NUMERIC_REG_NAMES and add comment.
-
-Tue Aug 17 15:10:04 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * config/m88k/tm-m88k.h: Fix typo in comment.
- (FP_REGNUM): define in terms of SP_REGNUM
- rather than by absolute number. Also clearly comment that this
- is a convenient lie in order to decrease future confusion.
- (ACTUAL_FP_REGNUM): new macro for FP.
- (FRAME_CHAIN_VALID): removed. Standard default works fine.
- * m88k-tdep.c (frame_chain_valid): redundant, so removed.
- (NEXT_PROLOGUE_INSN): removed unused fourth arg, fixed all
- callers.
- (read_next_frame_reg): declare static.
- (examine_prologue): removed unused variabel insn2, rename insn1
- to insn, rewrote comment about finding fp, sp, etc. set frame_fp
- based on ACTUAL_FP_REGNUM rather than FP_REGNUM which is
- actually a scammed alias for SP_REGNUM on m88k.
-
- * frame.h: fixed typo in comment.
-
-Tue Aug 17 11:14:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * 29k-share/udi/udiphcfg.h: Always include udiphunix.h not udiphdos.h.
-
- * complaints.c (complain): fflush (stdout) after output.
-
-Tue Aug 17 01:43:55 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * blockframe.c, frame.h (sigtramp_saved_pc): New routine to fetch
- the saved pc from sigcontext on the stack for BSD signal handling.
- * config/i386/tm-i386bsd.h (SIGTRAMP_START, SIGTRAMP_END, FRAME_CHAIN,
- FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC, SIGCONTEXT_PC_OFFSET):
- Define to make backtracing through sigtramp work.
- * config/vax/tm-vax.h (SIGTRAMP_START, SIGTRAMP_END, TARGET_UPAGES,
- FRAME_SAVED_PC, SIGCONTEXT_PC_OFFSET): Ditto.
-
-Mon Aug 16 13:52:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * main.c (cd_command): If current_directory on entry is "/", then
- don't append an extra slash.
- Don't assume that /../.. means /.
-
- * target.c (target_xfer_memory): Clear errno before calling
- to_xfer_memory.
-
- * stack.c (frame_info, print_frame_info): Add comment about using
- the starting source line number on a line boundary if backtracing
- through sigtramp.
-
-Mon Aug 16 09:52:33 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Add U Utah contribution notice. Add TODO list.
- (hp_type_lookup): Use TYPE_NAME and TYPE_TAG_NAME.
- (process_one_debug_symbol): Likewise.
-
-Mon Aug 16 02:56:01 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * blockframe.c (create_new_frame, get_prev_frame_info):
- Use the function name when calling IN_SIGTRAMP.
- * config/m68k/tm-m68k.h (SIG_PC_FP_OFFSET, SIG_SP_FP_OFFSET):
- Define for correct handling of bachtraces through _sigtramp.
- * m68k-tdep.c (m68k_find_saved_regs): Adjust saved sp for fake
- sigtramp frames.
- * mipsread.c (parse_type): Handle corrupt TIR info with complaint
- instead of core dump.
- * mipsread.c (parse_partial_symbols): Put static symbols into the
- mimimal symbol table, use proper mst_types for all minimal symbols.
- * stack.c (frame_info, print_frame_info): Use the starting source
- line number on a line boundary if backtracing through sigtramp.
-
-Fri Aug 13 14:37:05 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * remote-bug.c: include gdbcmd.h.
- (sleep, remque, insque): forward decls added.
- (bug_fetch_registers, bug_store_registers): forward decls
- removed.
- (bug_read_inferior_memory, bug_write_inferior_memory): forward
- decls added.
- (srec_frame, srec_max_retries, srec_bytes, srec_echo_pace,
- srec_sleep, srec_noise): new static variables for user settable
- options. Mostly these are for debugging and tuning. I don't
- expect them to stay user settable options for long.
- (timeout): change default to 4 seconds.
- (check_open): declare funtion static, force return value.
- (readchar_nofail): if timeout, then say so if not being quiet.
- (pollchar, double_scan, bug_scan, bug_srec_write_cr,
- start_load): new functions.
- (bug_wait): rewritten to use double scan.
- (expect): while (1) -> for (;;)
- (get_hex_digit): rewrite if condition to avoid gcc complaints.
- (bug_load, bug_create_inferior, bug_open, bug_store_register):
- removed unused variables.
- (bug_load): replaced DELTA macro with user settable srec_frame
- variable. Other minor lint.
- (find_end_of_word, is_baudrate_right, set_rate, not_bug_wait,
- gethex, timed_read, translate_addr, bug_before_main_loop):
- unsused and removed.
- (bug_resume): add missing first arg, pid.
- (get_reg_name): use ip rather than cr04.
- (bug_write, bug_write_cr, but_clear_breakpoints, bug_quiet):
- declare type, args, and explicitly return.
- (bug_store_register): straighten out the ip vs cr04 confusion.
- (bug_write_inferior_memory): rewrite to cope with errors while
- downloading s-records.
- (bug_read_inferior_memory): declare static.
- (bug_clear_breakpoints): expect nobr before prompt.
- (_initialize_remote_bug): add initializations for srec-bytes,
- srec-max-retries, srec-frame, srec-noise, srec-sleep,
- srec-echo-pace.
-
- * Makefile.in (remote-bug.o): new rule.
- (ALLDEPFILES): added remote-bug.c
-
- * remote-hms.c (hms_wait): use -1 for timeout's which means block
- forever rather than 99999.
-
- * ser-unix.c (get_tty_state): if a descriptor is not a tty, then
- simply save encode this fact as the process group and return
- success rather than an error.
- (set_tty_state): if process group is -1, do not reset the
- process group.
- (hardwire_reachar): comment change.
-
- * serial.h: comment change.
-
- * config/m88k/tm-m88k.h: comment change to remove embedded
- comment.
- (SKIP_PROLOGUE): skip_prologue returns a value which is expected
- to reset the pc argument. So reset it.
-
-Fri Aug 13 10:15:24 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * Makefile.in (VERSION): Bump to 4.10.1 after release and cvs
- tagging.
-
-Thu Aug 12 20:40:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbserver/Makefile.in: Use GDBSERVER_LIBS and
- GDBSERVER_DEPFILES. Also remove much (but not all that could be
- removed) crud inherited from gdb Makefile.in.
- * config/i386/i386lynx.mh, config/sparc/sun4os4.mh: Define GDBSERVER_*.
- * gdbserver/README: Say it works on Sun and change configuration
- instructions slightly.
-
-Wed Aug 11 18:56:59 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * config/i386/i386v4.mh: use -lsocket and -lnsl, for remote
- targets that use BSD style network connections
-
-Wed Aug 11 17:54:24 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-{monitor,bug}.c: Make bug_ops not static (forward declaration
- of statics doesn't work with SunOS4 /bin/cc).
- Rename the occurrence in remote-monitor.c to monitor_bug_ops.
-
-Tue Aug 10 13:07:14 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * blockframe.c (find_pc_partial_function),
- mips-tdep.c (find_proc_desc): Deal with "pathological" case.
-
-Tue Aug 10 14:50:30 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * utils.c (wrap_here): Allow indent to be NULL.
- (fputs_filtered): Don't check for null wrap_indent (wrap_here now
- guarantees that it isn't, and anyway we were only checking one out
- of the two places we dereferenced it).
-
- * objfiles.h (struct objfile): Clean up comments for
- {obj,sym}_private to clarify what they are private to.
-
-Mon Aug 9 16:45:00 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * stabsread.c, buildsym.c (hashname): Moved function to
- buildsym.c, as suggested in the sources.
-
-Mon Aug 9 09:53:45 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-udi.c: Make udi_ops extern rather than trying forward
- declaration of a static variable.
-
- * hppab-nat.c: Define ptrace to call_ptrace and pass the 5th arg
- there, rather than using an ANSI C specific macro.
-
- * 29k-share/udi/udr.c: Include fcntl.h not sys/fcntl.h. Also put
- sys/types.h near the top (just on general principles).
-
- * environ.c (set_in_environ): Remove G960BASE and G960BIN; they are
- no longer used.
-
- * gdbcore.h: New variable gnutarget.
- * core.c: Add commands to set and show it.
- * Callers to bfd_*open*: Pass gnutarget instead of NULL as target.
- * environ.c (set_in_environ): For GNUTARGET, use set_gnutarget not
- putenv.
-
- * symtab.c (decode_line_1): Give error on unmatched single quote.
-
-Sun Aug 8 13:59:49 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * ser-unix.c (hardwire_send_break) [HAVE_SGTTY]: Use select not usleep.
-
- * remote.c: Add comments about 'd', 'r', and unrecognized requests.
-
- * inflow.c (terminal_init_inferior): Don't muck with tty state if
- gdb_has_a_terminal() is false.
-
-Sun Aug 8 10:07:47 1993 Fred Fish (fnf@cygnus.com)
-
- * dwarfread.c (record_minimal_symbol): Remove prototype and
- function.
- * dwarfread.c (add_partial_symbol): Remove code to add minimal
- symbols and remove comment about limitations. Experiments show
- that now that gdb handles the ELF symtab better for creating
- minimal symbols, that no additional information is added by
- examining the DWARF information, and in fact, given the
- limitations, the DWARF code was actually making things worse.
-
-Sat Aug 7 10:59:03 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * elfread.c (elf_symtab_read): Properly sort out the bss symbols
- from the data symbols and give them the correct minimal_symbol_type.
- Add file static symbols to the minimal symbol table, not just
- global symbols. Add absolute symbols as well (like _edata, _end).
- Redo stabs-in-elf special symbol handling now that file static
- symbols are entered into the into the minimal symbol table.
- * dwarfread.c (add_partial_symbol): Add comment about limitations
- of DWARF symbols for distinquishing data from bss when adding
- minimal symbols. Add file local symbols to minimal symbols.
-
-Thu Aug 5 08:58:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * ser-go32.c: Define job_control variable.
-
-Thu Aug 5 15:56:13 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * configure.in: z8k-coff is the same as z8k-sim
-
-Thu Aug 5 08:58:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * 29k-share/udi/udip2soc.c: Include sys/types.h before sys/file.h.
-
- * config/i386/tm-i386bsd.h (NUM_REGS): There are only 10, not 11.
-
- * inflow.c: Put all uses of F_GETFL and F_SETFL in #ifdef F_GETFL.
-
- * 29k-share/udi/udip2soc.c: Include fcntl.h not sys/fcntl.h.
-
-Wed Aug 4 18:32:12 1993 Fred Fish (fnf@cygnus.com)
-
- * inflow.c (pass_signal): Signal handlers take one int arg;
- supply an unused one to make it type compatible as an arg to
- signal().
-
-Tue Aug 3 18:34:14 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * config/mips/tm-mips.h: Include bfd.h before coff/sym.h.
-
-Tue Aug 3 15:34:57 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (ALLCONFIG): Add config/i386/i386nw.mt,
- config/m68k/delta68.mh, config/m68k/delta68.mt,
- config/m68k/dpx2.mh, config/m68k/dpx2.mt, config/mips/riscos.mh,
- config/mips/news-mips.mh.
- * Makefile.in (ALLPARAM): Add config/i386/nm-symmetry.h,
- config/i386/tm-i386nw.h, config/m68k/nm-delta68.h,
- config/m68k/tm-delta68.h, config/m68k/xm-delta68.h,
- config/m68k/nm-dpx2.h, config/m68k/tm-dpx2.h,
- config/m68k/xm-dpx2.h, config/mips/xm-makeva.h.
- * Makefile.in (ALLDEPFILES): Add dpx2-nat.c.
-
-Tue Aug 3 12:02:09 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mipsread.c: Updated for BFD ECOFF changes. Now gets the
- swapping routines and external structure sizes via the
- ecoff_backend information. No longer includes coff/mips.h.
-
-Tue Aug 3 10:58:04 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (SFILES): Add thread.c
-
-Tue Aug 3 10:21:58 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * remote-sp64sim.c (simif_create_inferior): Add FIXME regarding
- sim_set_args return code.
-
-Mon Aug 2 16:35:31 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * Makefile.in (VERSION): bumped to 4.9.4.
-
- * remote-monitor.c: updated copyright.
- (bug_ops, monitor_desc): now static.
- (monitor_desc): in several places, check and/or set to NULL.
-
- * remote-hms.c (hms_files_info): Add the appropriate items where
- missing in the printf call.
-
- * remote-bug.c: new file for m88k bug support.
-
- * config/m88k/m88k.mt (TDEPFILES): added remote-bug.o.
-
-Mon Aug 2 14:22:09 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * h8300-tdep.c: Use new variable h8300hmode.
-
-Mon Aug 2 12:06:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * valops.c (typecmp): If we are passing a non-reference to a function
- which takes a reference, pass the address.
- (value_arg_coerce): Don't use COERCE_ENUM; we don't want to dereference
- references here.
-
- * thread.c (thread_switch): Define as static.
- (add_thread): Cast return value from xmalloc.
-
- * gdbtypes.c (fill_in_vptr_fieldno): Call check_stub_type.
- * gdbtypes.{c,h}: Improve comments on vptr_fieldno.
-
-Mon Aug 2 11:58:52 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * README: Elaborate on gdb C++ support and cfront support.
-
-Mon Aug 2 11:30:57 1993 Stu Grossman (grossman at cygnus.com)
-
- * i386lynx-nat.c, thread.c, thread.h: Update copyrights.
-
-Mon Aug 2 12:06:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (ALLDEPFILES): Add i386lynx-nat.c.
-
-Mon Aug 2 08:42:50 1993 Stu Grossman (grossman at cygnus.com)
-
- * gdbserver/remote-inflow.c (create_inferior): Fix comments, and
- error msg. Setup seperate process group for child.
- * (write_inferior_memory): Sleep for 1 second and retry on ptrace
- failure.
-
-Sun Aug 1 22:58:18 1993 Stu Grossman (grossman at cygnus.com)
-
- * config/i386/i386lynx.mh (NATDEPFILES): Drop coredep (for now).
- * config/i386/nm-i386bsd.h: Protect from multiple inclusion.
- * config/i386/nm-i386lynx.h: Lotsa new host porting stuff.
- * config/i386/tm-i386lynx.h: Define SAVED_PC_AFTER_CALL and
- target_pid_to_str.
-
- * Makefile.in (CLIBS): Reorder to make Lynx ld happy.
- * (HFILES): New file thread.h.
- * (OBS): New file thread.c.
- * configure.in: Host config for Lynx/386.
- * fork-child.c (fork_inferior): Call init_thread_list().
- * infrun.c (resume): Add pid to invocation of target_resume().
- * (wait_for_inferior): Pay attention to pid from target_wait().
- Multi-threading code now uses this to determine what to do.
- * inftarg.c (child_wait): Conditionalize based on CHILD_WAIT macro.
- Use target_pid_to_str() macro throughout when printing pid.
- * inferior.h (child_resume): Add pid to prototype.
- * hppab-nat.c hppah-nat.c infptrace.c (child_resume): Pass in pid as
- argument, instead of using inferior_pid.
- * procfs.c (procfs_resume): Pass in pid as argument. Ignored for
- now. Use target_pid_to_str() macro throughout for printing process id.
- * remote-adapt.c (adapt_resume): Pass in pid as argument.
- * remote-eb.c (eb_resume): Pass in pid as argument.
- * remote-es.c (es1800_resume): Pass in pid as argument.
- * remote-hms.c (hms_resume): Pass in pid as argument.
- * remote-mips.c (mips_resume): Pass in pid as argument.
- * remote-mm.c (mm_resume): Pass in pid as argument.
- * remote-monitor.c (monitor_resume): Pass in pid as argument.
- * remote-nindy.c (nindy_resume): Pass in pid as argument.
- * remote-sa.sparc.c (remote_resume): Pass in pid as argument.
- * remote-sim.c (rem_resume): Pass in pid as argument.
- * remote-sp64sim.c (simif_resume): Pass in pid as argument.
- * remote-st.c (st2000_resume): Pass in pid as argument.
- * remote-udi.c (udi_resume): Pass in pid as argument.
- * remote-vx.c (vx_resume): Pass in pid as argument.
- * remote-z8k.c (rem_resume): Pass in pid as argument.
- * remote.c (remote_resume): Pass in pid as argument.
- * solib.c (solid_create_inferior_hook): Pass inferior_pid to
- target_resume().
- * target.c (normal_pid_to_str): New routine to print out process
- ID normally.
- * target.h (struct target_ops): Add pid to prototype at
- to_resume(). (target_resume): Add pid argument.
- * (target_pid_to_str): Default definition for normal type pids.
- * thread.h, thread.c: New modules for multi thread/process control.
-
-Sun Aug 1 13:02:42 1993 John Gilmore (gnu@cygnus.com)
-
- * README: Say that bug-gdb is also the place to send requests
- for help with GDB.
-
-Sun Aug 1 09:42:13 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (make-proto-gdb-1): Use -f opt on rm of Makefile.
- * h8500-tdep.c: Add parens around a few macro args.
-
-Fri Jul 30 15:43:49 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * TODO: Remove items about unix-to-unix/rapp debugging (now we
- have gdbserver), moving xm files to subdirectory, ptype yylval,
- and file-local symbols.
-
- * gdbtypes.h: Improve comments about C++ methods.
-
-Fri Jul 30 14:16:32 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * c-exp.y: Add missing 5th arg for one call to lookup_symbol, cast
- NULL in all other calls to correct pointer types.
-
-Fri Jul 30 15:43:49 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- From Jeffrey Law:
- * tm-hppa.h (TARGET_WRITE_PC): Define.
- * hppa-tdep.c (hppa_fix_call_dummy): If in a syscall,
- then return the address of the dummy itself rather than
- the address of $$dyncall.
- (target_write_pc): New function to store a new PC.
-
-Fri Jul 30 12:51:27 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
- and Jim Kingdon (kingdon@cygnus.com)
-
- * breakpoint.c (breakpoint_re_set_one): Always reparse breakpoint
- conditions, they might contain symbol table references.
-
-Fri Jul 30 12:51:27 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c (parse_symbol): Handle opaque struct definitions and
- type naming for stTypedef symbols.
-
-Fri Jul 30 14:44:21 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * c-exp.y (yylex): Detect C++ nested types.
-
-Fri Jul 30 11:07:37 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * sp64-tdep.c (sparc64_frame_chain, sparc64_frame_saved_pc): Deleted.
- (dump_ccreg, sparc_print_register_hook): New fns.
- * remote-sim.h: New file.
- * remote-sp64sim.h (sim_*): External fns. (simif_*): Internal fns.
-
- * config/sparc/sp64.mt: New file.
- * config/sparc/tm-sp64.h (FRAME_CHAIN, FRAME_SAVED_PC): Deleted.
- (PRINT_REGISTER_HOOK): Call new fn sparc_print_register_hook.
-
-Fri Jul 30 10:15:01 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * Makefile.in (ALLCONFIG): Add config/i386/ptx.mh
-
-Fri Jul 30 08:58:01 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- From J. Law:
- * infcmd.c (read_pc): Remove PA specific code.
- * tm-hppa.h (TARGET_READ_PC): Define.
- * hppa-tdep.c (target_read_pc): New function.
-
- * symtab.c (gdb_mangle_name): Deal with it if type lacks a name.
-
-Fri Jul 30 07:36:53 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * NEWS: Add note that DEC alpha support is host only, not native.
- * README: Emphasize that C++ support works best with GNU C++ and
- stabs debugging format.
- * delta68-nat.c: Add missing FSF copyright.
-
-Fri Jul 30 08:58:01 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * paread.c (pa_symtab_read): Put file-local symbols in minimal symbols.
- * hppa-tdep.c (frame_chain_valid): Check that our function has the
- same address as _start, not that it must be the same symbol.
-
-Fri Jul 30 00:18:40 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * Makefile.in (ALLDEPFILES): Add delta68-nat.c
- * Makefile.in (delta68-nat.o): Add dependency.
-
-Thu Jul 29 12:09:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * value.h (COERCE_ENUM): Use COERCE_REF to coerce refs; value_ind
- was adequate in gdb 3.5 but not now.
-
- * valops.c (typecmp): An array in t2 matches a pointer in t1.
-
- * valops.c (typecmp): When comparing type1& to type2, compare
- type1 and type2 as leniently as if we were comparing type1 to
- type2.
-
- * cp-valprint.c (cplus_print_value): Don't dump core if the
- baseclass doesn't have a name.
- * values.c (vb_match): New function, which finds the virtual
- base class pointer even if the types are nameless.
- (baseclass_{addr,offset}): Use it.
-
- * hppa-tdep.c: Make "maintenance print unwind" command from old
- "unwind" command.
-
- * remote-udi.c: Remove udi_timer, call to siginterrupt, and associated
- obsolete junk which apparently had been copied from the
- pre-serial.h remote.c, but which is no longer used.
-
-Thu Jul 29 12:36:20 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * Makefile.in (NONSRC): Need 29k-share/README, not
- 29k-share/udi/README.
-
-Thu Jul 29 12:09:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * paread.c (pa_symfile_init): If error reading string table, don't
- use errno in cases where it hasn't been set.
-
- * ser-unix.c (gdb_setpgid): Pass our pid, not 0, to setpgid.
-
- * remote-monitor.c (_initialize_monitor): Comment out use of
- connect_command, since connect_command itself is commented out.
-
- * remote-monitor.c (generic_open): Parse arguments the same way
- as remote.c.
-
- * hppa-tdep.c (pc_in_linker_stub): Fix unclosed comments.
-
-Wed Jul 28 13:19:34 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/mips/xm-mips.h: Define HAVE_TERMIOS.
-
- * dbxread.c (record_minimal_symbol): Don't put gcc_compiled or
- __gnu_compiled* symbols into the minimal symbols.
-
-Wed Jul 28 08:26:58 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * remote-mips.c (_initialize_remote_mips): Added "timeout" and
- "retransmit-timeout" variables to set mips_receive_wait and
- mips_retransmit_wait, respectively.
-
-Wed Jul 28 03:58:58 1993 (pes@regent.e-technik.tu-muenchen.de)
-
- * symmisc.c (dump_msymbols): Handle new mst_file_* types.
-
-Tue Jul 27 12:07:38 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-udi.c: Remove old comment about download not implemented.
-
- * serial.h, ser-{unix,go32,tcp}.c: Add flush_input and send_break.
- * nindy-share/*, remote-nindy.c: Extensive hacking to make it
- conform to GDB conventions like using memcpy not bcopy, serial.h,
- etc. This is to make it host on Solaris, AIX, etc.
- * Makefile.in: Reflect removed nindy-share files.
- * config/i960/nindy960.mt (TDEPFILES): Remove ttybreak.o.
-
- * stack.c (print_frame_info): Revise comment about `pathological'
- case (there was a wrong FIXME about text labels; also asm() can
- trigger this as well as versions of ar which truncate .o names).
-
- * buildsym.c (start_subfile): If a .c file includes a .C file, set
- the language of both of them to C++.
-
- * config/sparc/xm-sun4os4.h: Define MEM_FNS_DECLARED and include
- <memory.h>.
- Include <malloc.h> rather than declaring malloc functions ourself.
-
- * ser-unix.c (set_tty_state): Don't ignore errors setting process
- group.
- * inflow.c (terminal_inferior): If attach_flag set, ignore errors
- from set_tty_state.
-
- * fork-child.c (fork_inferior): Only quote exec file if needed.
-
- * mipsread.c (parse_symbol): Remove 21 Jul 93 change with
- stTypedef inside an stBlock.
-
-Tue Jul 27 12:36:49 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * breakpoint.c (breakpoint_1): Walk the breakpoint chain to decide if
- we have breakpoints or watchpoints as we might have to ignore internal
- breakpoints.
-
- Fix gdb core dumps after `file newfile' commands.
- * symtab.h, symfile.c (clear_symtab_users): New routine which
- unconditionally clears symtab users. clear_symtab_users_once
- commented out as it was a noop anyway.
- * objfiles.c (free_objfile): Don't call clear_symtab_users_once.
- * objfiles.c (free_all_objfiles), symfile.c (new_symfile_objfile),
- xcoffexec.c (exec_close): Call clear_symtab_users if necessary.
- * symfile.c (syms_from_objfile): Install cleanups for errors during
- symbol reading.
- * coffread.c, dbxread.c, mipsread.c, xcoffread.c (*_symfile_read):
- Lint cleanup code, call do_cleanups explicitly.
- * symfile.c (symbol_file_add): Call new_symfile_objfile and
- reinit_frame_cache _after_ the new symbols are read in.
-
-Tue Jul 27 01:57:01 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c (parse_type): Do not set tag name for compiler
- generated fake tag names.
-
-Mon Jul 26 17:31:49 1993 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * config/m88k/m88k.mt (TDEPFILES): add exec.o.
-
-Mon Jul 26 13:17:36 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * hppa-tdep.c: Remove all uses of use_unwind and `set use_unwind'
- command. Now we use unwind info by default if we can find it.
-
- * config/sparc: Move VARIABLES_INSIDE_BLOCK and SUN_FIXED_LBRAC_BUG
- to tm-sparc.h so they are shared between Solaris and SunOS4.
- * dbxread.c (process_one_symbol): Deal with SunOS4 acc N_STSYM and
- N_GSYM functions.
-
- * config/pa/tm-hppa.h (REGISTER_NAMES): Use "fr" rather than "fp"
- for floating point registers.
-
- * mipsread.c (parse_symbol): Put stStaticProc symbols in minimal
- symbols as mst_file_text.
-
- * hppa-tdep.c (pc_in_linker_stub): Return 0 if can't read memory.
-
- * stabsread.c (rs6000_builtin_type): Make logical types be
- TYPE_CODE_BOOL.
-
-Sun Jul 25 23:41:48 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.{c,h} (struct breakpoint): Replace symtab field with
- source_file field.
-
-Fri Jul 23 09:57:25 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * remote.c: Don't error() on errors xferring memory.
- * target.h: Clean up comments about *xfer_memory.
-
- * exec.c, corelow.c (target_ops struct): Don't allow
- {insert,remove}_breakpoints to be defaulted to
- memory_{insert_remove}_breakpoint.
-
- * demangle.c: Make it so `help set dem' tells you how to get the
- list of demangling styles.
-
-Thu Jul 22 15:41:09 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * Makefile.in: Use REMOTE_O macro not remote.o.
- * config/i960/{nindy960,vxworks960}: Don't use remote.o.
-
-Thu Jul 22 12:43:25 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * coredep.c: If NEED_SYS_CORE_H defined, include <sys/core.h>
- (can't include it in nm-*.h file because it causes conflicts with
- a.out symbol definitions).
- * hp300ux-nat.c (fetch_core_registers): Commented out; obsolete.
- * config/m68k/hp300hpux.mh (NATDEPFILES): Added coredep.o and
- corelow.o.
- * config/m68k/nm-hp300hpux.h (NEED_SYS_CORE_H): Defined.
- (REGISTER_U_ADDR): Defined.
- * config/m68k/xm-hp300hpux.h (HAVE_TERMIOS): Define instead of
- HAVE_TERMIO.
- * config/pa/xm-hppah.h: Likewise.
-
-Wed Jul 21 11:37:30 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * mipsread.c (parse_symbol): when stTypedef and friends occur within
- an stBlock, skip over the fields of the inner one.
-
- * mips-tdep.c (init_extra_frame_info): If in lenient prologue, call
- heuristic_proc_desc rather than just assuming registers not saved.
-
- * Makefile.in (regex.o): Add dependency.
-
- * hppa{b,h}-nat.c: Warning, not error, if can't access registers.
-
- * config/pa/hppa{b,h}.h: Define ATTACH_DETACH.
-
-Wed Jul 21 03:07:30 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/mips/xm-makeva.h: New file implements va_list alignment
- restrictions for mips hosts.
- * config/mips/{xm-irix3.h, xm-mips.h, xm-news-mips.h, xm-riscos.h}:
- Use it.
-
-Wed Jul 21 00:11:05 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mips-tdep.c (init_extra_frame_info): Do not check for
- mips_in_lenient_prologue if it is a dummy frame.
- * mipsread.c (fixup_sigtramp): Initialize pdr.adr, it is used by
- mips_in_lenient_prologue.
-
-Tue Jul 20 14:14:59 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hp_array_type): Handle "char foo[]".
-
-Tue Jul 20 12:53:47 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * mips-tdep.c (heuristic_proc_start): First time we print the
- warning, elaborate.
- (_initialize_mips_tdep): Improve docstring for `set heur'.
-
- * config/rs6000/tm-rs6000.h: Remove call to insert_step_breakpoint.
-
- * symtab.c (find_line_symtab): New function, to deal with multiple
- symtabs with the same name.
- (find_line_pc{,_range}): Use it.
- (find_pc_symtab): Add comment about overlapping symtabs.
-
-Mon Jul 19 21:29:14 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * Makefile.in (SFILES): Add nlmread.c.
- * Makefile.in (OBS): Add nlmread.o.
- * Makefile.in (nlmread.o): Add new target.
- * configure.in (i[34]86-*-netware): New configuration.
- * nlmread.c, config/i386/{i386nw.mt, tm-i386nw.h}: New files
- for NLM/NetWare support.
-
-Mon Jul 19 11:48:57 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * symtab.h (enum minimal_symbol_type): Add mst_file_*.
- * partial-stab.h [DBXREAD_ONLY]: Record statics in miminal symbols.
- * dbxread.c (record_minimal_symbol): Deal with statics.
- * minsyms.c (lookup_minimal_symbol): Prefer externals to statics.
-
- * config/i386/xm-i386sco.h: Define HAVE_TERMIOS.
-
- * printcmd.c, config/pa/xm-pa.h, config/alpha/xm-alpha.h: Make it so
- arg_bytes field of makeva_list is always aligned.
- * config/pa/xm-pa.h: Make arglist_address a char *.
-
- * ser-unix.c: Don't try to use job control with termio.
-
-Sun Jul 18 23:11:28 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
- and Jim Kingdon (kingdon@cygnus.com)
-
- Make breakpoint_re_set_one work with overloaded member functions,
- `b 123' and `b foo' if foo is a static function.
- * symtab.c (decode_line_1, decode_line_2): New argument `canonical'
- to return canonical line specs if requested by the caller.
- * breakpoint.c, source.c, symtab.c, symtab.h: Change prototypes and
- callers accordingly.
- * symtab.c (build_canonical_line_spec): New helper function which
- constructs the canonical line spec.
- * breakpoint.c (break_command_1): Use canonical line spec instead
- of command string as addr_string if necessary.
- * source.c (line_info): Fix storage leak.
-
-Sun Jul 18 15:22:45 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * infptrace.c: Split out define of PT_KILL; Sequent defines PT_KILL
- but not the others.
- * symm-tdep.c: Remove exec_file_command.
- [_SEQUENT_] (ptx_coff_regno_to_gdb, register_addr): New functions.
- A few miscellaneous cleanups.
- * symm-nat.c: Renamed from symm-xdep.c.
- * All symmetry dependent files: Many changes.
-
- * mips-tdep.c (mips_skip_prologue): New argument lenient.
- Use read_memory_nobpt.
- (is_delayed, mips_in_lenient_prologue): New functions.
- (init_extra_frame_info): If in the prologue, don't use saved registers.
- * config/mips/tm-mips.h: Declare mips_skip_prologue.
-
- * partial-stab.h (N_SO): Add the text offset to valu before, not after,
- passing it to END_PSYMTAB.
-
-Fri Jul 16 18:48:52 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * symtab.c (find_pc_symtab): Call warning, not printf directly.
-
- * solib.c (solib_add): Use x{re,m}alloc, not {re,m}alloc.
-
-Fri Jul 16 09:56:42 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mipsread.c: No longer need to undefine ZMAGIC.
-
-Thu Jul 15 18:03:37 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m88k-pinsn.c: Moved code into opcodes/m88k-dis.c.
- (print_insn): Now just calls print_insn_m88k.
-
-Thu Jul 15 14:54:05 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * h8300-tdep.c (examine_prologue): Make prototype match definition.
-
-Thu Jul 15 08:34:49 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * NEWS: Mention that remote.c now has a `load' operation.
-
- * hppa-tdep.c (pc_in_linker_stub): New function.
- (find_proc_framesize): Return 0 for linker stubs.
- (rp_saved): Tell the caller where rp is saved.
- (frame_chain_valid): Return 1 for linker stubs.
- (frame_saved_pc): Use return value from rp_saved.
-
- * stack.c (print_frame_info): When checking PC_IN_CALL_DUMMY,
- pass the sp relative to the frame in question, not the sp in the
- innermost frame.
-
-Wed Jul 14 17:37:03 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * mipsread.c (parse_procedure): Take as argument the symtab to look
- the name up in. Look it up with mylookup_symbol, not lookup_symbol.
- (psymtab_to_symtab_1): For stabs, pass the symtab to parse_procedure.
-
- * mipsread.c (mylookup_symbol): Use strcmp, not STREQ, as we have
- already checked the first characters.
-
- Changes from Jeffrey Law:
- * printcmd.c (makeva_list): Use MAKEVA_EXTRA_INFO to define
- machine dependent fields in the makeva_list structure.
- (makeva_size): Allocate extra space to handle gaps made by
- alignment restrictions.
- * config/pa/xm-pa.h (MAKEVA_EXTRA_INFO): Define.
- (MAKEVA_START): Initialize arglist_address field.
- (MAKEVA_ARG): Always store arguments on natural alignment
- boundaries. Set arglist_address to the address right after
- the args.
- (MAKEVA_END): Simply return the value stored in arglist_address.
-
-Wed Jul 14 13:51:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * ch-valprint.c (chill_val_print, case TYPE_CODE_STRING): Print
- address, not addr.
-
- * hppah-nat.c (store_inferior_registers): Don't print i in cases
- where we aren't using it.
-
- * a29k-tdep.c (get_saved_register): Fix typo.
-
-Wed Jul 14 09:45:52 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * configure.in: Recognize h8300h (variant of h8300).
-
-Wed Jul 14 09:45:52 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * configure.in: Recognize sparc64-*-*.
-
-Tue Jul 13 14:03:48 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c (define_symbol): Make the caddr_t hack apply to `function
- returning foo' as well as `pointer to foo'.
-
- * remote.c [REMOTE_BREAKPOINT]: Use for breakpoint insn if defined.
- * config/m68k/tm-m68k.h: Define it.
- * mem-break.c, breakpoint.c: Improve comments.
-
-Tue Jul 13 13:35:31 1993 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr)
-
- * config/m68k/tm-dpx2.h: Replace "tm-68k.h" with "m68k/tm-m68k.h".
- * config/m68k/xm-dpx2.h: Define HAVE_TERMIOS not HAVE_TERMIO.
-
-Tue Jul 13 11:50:38 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * gdbcore.h (read_memory_integer, read_memory_unsigned_integer):
- Make prototype match definition.
-
-Tue Jul 13 11:15:15 1993 Fred Fish (fnf@cygnus.com)
-
- * elfread.c: Remove notice about file still being under
- construction.
- * Makefile.in (ultra3-xdep.o, umax-xdep.o): Add missing ')'.
-
-Mon Jul 12 17:46:35 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * a29k-tdep.c (read_register_stack): Make val static.
-
-Mon Jul 12 14:10:48 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * config/h8300/tm-h8300.h (REGISTER_CONVERTIBLE): Change value to 0.
- (REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW): Move def'n to
- usual spot.
-
-Mon Jul 12 11:29:44 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * c-valprint.c (c_val_print): Fix thinko with unspecified length
- arrays.
-
- * hppa-tdep.c (find_proc_framesize): If there is a frame pointer,
- use it.
-
-Sun Jul 11 19:35:05 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symtab.c (decode_line_1): Use end of block to figure out whether
- val.end is in the same function, not minimal symbols.
-
- * source.c (line_info): Add a few more wrap_here's.
-
- * i386-tdep.c (i386_follow_jump): Do byteswapping where needed and
- don't make assumptions about sizes of host data types.
-
- * blockframe.c, symtab.h (find_pc_partial_function): New arg endaddr.
- * infrun.c, breakpoint.c, printcmd.c: Change callers.
- * printcmd.c (containing_function_bounds): Remove.
- * printcmd.c (disassemble_command): Use find_pc_partial_function,
- not containing_function_bounds.
- * infcmd.c (step_1): Use find_pc_partial_function rather than
- trying to roll our own. Move check for a pc between SIGTRAMP_START and
- SIGTRAMP_END in find_pc_partial_function, not step_1.
-
- * sparc-tdep.c (sparc_frame_chain, frame_saved_pc):
- Keep unswapped value in array of char, not REGISTER_TYPE.
- Use REGISTER_RAW_SIZE not sizeof (REGISTER_TYPE).
- (sparc_extract_struct_value_address): Use TARGET_PTR_BIT not
- sizeof (CORE_ADDR).
-
-Thu Jul 1 15:50:05 1993 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr)
-
- * configure.in (m68*-bull-sysv*): added support for Bull dpx2.
- * config/m68k/{t,x,n}m-dpx2.h, dpx2-nat.c: New files.
- * config/m68k/dpx2.m{h,t}: New files.
-
-Thu Jul 1 15:46:10 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Run through gnu-indent.
-
-Sun Jul 11 12:32:08 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * config/sparc/tm-sparc.h (PRINT_REGISTER_HOOK): Fix typo, add
- more parens around macro arg.
-
-Sat Jul 10 09:54:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c: Remove step_resume_{duplicate,shadow}. Replace
- step_resume_break_address with step_resume_breakpoint (now local
- to wait_for_inferior).
- ({insert,remove}_step_breakpoint): Remove.
- (wait_for_inferior): Set step resume break with
- set_momentary_breakpoint. Test hitting it with bpstat_stop_status
- and bpstat_what (stop_step_resume_break removed).
- * breakpoint.{h,c}, infrun.c: Return value from bpstat_what now struct
- which includes previous return value as main_action, and a step_resume
- bit.
- * breakpoint.c (delete_breakpoint): If breakpoint was inserted, and
- there is another breakpoint there, insert it.
- * infrun.c (wait_for_inferior): Rearrange the spaghetti a bit. Use
- a few more gotos.
- Various: Clean up and add comments.
-
- * infrun.c [TDESC]: Remove remaining tdesc code (see ChangeLog
- for Wed Nov 13 16:45:13 1991).
-
-Fri Jul 9 12:36:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * values.c, value.h (modify_field), callers: Make fieldval a LONGEST.
-
- * h8300-tdep.c (NEXT_PROLOGUE_INSN): Make pword1 an INSN_WORD *
- not short *.
-
- * findvar.c, defs.h
- ({extract,store}_{signed_integer,unsigned_integer,address}):
- New routines to replace SWAP_TARGET_AND_HOST.
- All over: All uses of SWAP_TARGET_AND_HOST on integers replaced.
-
- * config/sparc/tm-sparc.h: Add comment suggesting that removing
- ins and locals from the registers array might clean things up.
-
- * utils.c: Clean up comments about wrap buffer and wrap_here.
- * printcmd.c (printf_command): Call wrap_here before vprintf.
-
- * mipsread.c (cross_ref): Set the name to unknown for "struct *" case.
- Patch from ptf@delcam.co.uk (Paul Flinders).
-
- * a29k-tdep.c, findvar.c (get_saved_register): Fix byteswapping sins.
-
-Fri Jul 9 09:47:02 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * defs.h, remote-eb.c (TM_FILE_OVERRIDE): Remove it.
- * mips-tdep.c (init_extra_frame_info): Set proper fci->frame if pc
- is at the start of the dummy code.
-
-Thu Jul 8 14:48:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * sparc-tdep.c (sparc_push_dummy_frame): Skip all the do_save_insn
- stuff, just write the sp and fp.
- (sparc_pop_frame): Skip the do_restore_insn; we already restore
- the sp with the other out registers.
-
- * hppa-tdep.c (hppa_push_arguments): Allocate enough space for
- arguments.
-
- * hppa-tdep.c: Change _initialize_hppab_tdep to _initialize_hppa_tdep.
-
-Thu Jul 8 14:47:00 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * sparc-tdep.c (sparc_frame_chain): Handle sizeof (CORE_ADDR)
- != sizeof (REGISTER_TYPE).
- (frame_saved_pc): Ditto.
-
-Thu Jul 8 08:22:05 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * config/h8300/tm-h8300.h: (REGISTER_TYPES): Adjust for h8/300h.
- (REGISTER_RAW_SIZE): Ditto.
- (REGISTER_VIRTUAL_TYPE): Use builtin_type_unsigned_long for regs
- on the h8/300h (ints may still be 16 bits).
- (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
- EXTRACT_STRUCT_VALUE_ADDRESS): Add FIXME's for h8/300h. Some
- thought needed here.
-
- * h8300-tdep.c (print_insn): Call print_insn_h8300h if h8/300h.
- (examine_prologue): reg_save_depth is 4 if h8/300h.
-
- * findvar.c (read_register): Provide some support for 64 bit regs.
- (write_register): Ditto.
-
-Wed Jul 7 14:30:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/mips/nm-riscos.h: machine/machparam.h is always the right
- place to look for BSD43_NBPG, not machine/vmparam.h
-
- * infcmd.c (run_stack_dummy): New argument name.
- Change error message in (another) attempt to make it comprehensible.
- * valops.c (call_function_by_hand): Pass name to run_stack_dummy.
- * symtab.h: Declare demangle and asm_demangle since macros use them.
-
- * eval.c (evaluate_subexp): Add comment about calling a member
- function of a variable in a register.
-
- * expression.h: Clean up comment about string in STRUCT_STRUCT etc.
-
- * config/{rs6000/tm-rs6000.h,sparc/tm-sparc.h,pyr/tm-pyr.h},
- inferior.h (PC_IN_CALL_DUMMY) [ON_STACK]: Add comments about stack
- frame tops and bottoms.
-
- * frame.h, blockframe.c, stack.c, a29k-tdep.c,
- config/gould/tmp-{pn,np1}.h,
- config/{sparc/tm-sparc.h,pyr/tm-pyr.h,vax/tm-vax.h}: Remove field
- next_frame from struct frame_info. It has no purpose beyond
- ->next->frame and is an artifact from GDB 2.8.
-
-Tue Jul 6 11:51:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in: Remove gdb before creating a new one.
- Update init.c atomically.
-
- * Makefile.in (ALLPARAM): Add config/{alpha/xm-alpha.h,pa/xm-pa.h}.
- (ALLCONFIG): Add config/alpha/alpha-osf1.mh.
-
- * infcmd.c (_initialize_infcmd): In docstring for "continue",
- describe argument as setting ignore count.
-
-Sun Jul 4 15:04:47 1993 Doug Evans (dje@cygnus.com)
-
- * h8300-tdep.c (examine_prologue): Fix call to
- read_memory_unsigned_integer.
-
-Fri Jul 2 18:22:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/mips/{x,n}m-irix{3,4}.h: Make some definitions here
- rather than including xm-bigmips.h.
-
- * eval.c (evaluate_subexp): Improve error messages for OP_TYPE and
- default cases.
-
- * Makefile.in (distclean): Remove y.tab.h.
-
-Fri Jul 2 14:55:48 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * exec.c (exec_file_command): Remove Mar 28 hack as BFD handles
- file updates properly now.
- * mipsread.c (mips_coff_new_init): Force reevaluation of sigtramp
- addresses if switching to a new symbol file.
- * dbxread.c (process_one_symbol): Avoid dereferencing NULL
- symbols that might be returned from define_symbol.
-
-Fri Jul 2 13:33:12 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- New target macros for getting at the pc, sp and fp.
- * infcmd.c (read_pc, write_pc): Modify to use new macros.
- (read_sp, write_sp, read_fp, write_fp): New functions.
- * blockframe.c (reinit_frame_cache, get_prev_frame_info):
- Use new functions.
- * breakpoint.c (bpstat_alloc): ditto.
- * infrun.c (wait_for_inferior): ditto.
- * stack.c (print_frame_info): ditto.
- * valops (call_function_by_hand): ditto.
- * corelow.c (core_open): ditto.
- * h8500-tdep.c: (target_read_sp, target_write_sp, target_read_pc,
- target_write_pc, target_read_fp, target_write_fp): New functions.
- * inferior.h (read_sp, write_sp, read_fp, write_fp): Prototypes.
-
- * config/alpha/xm-alpha.h: Add MAKEVA_END.
- * config/h8500/tm-h8500.h: Define new macros.
-
-Fri Jul 2 13:51:04 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in (mipos-*-riscos*): New host and target; use riscos.
- * config/mips/nm-riscos.h: If BSD43_NBPG is not defined by
- vmparam.h, include machparam.h.
- (KERNEL_U_ADDR): Define to be BSD43_UADDR.
-
-Fri Jul 2 13:39:48 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * c-exp.y (yylex): Give error if unmatched single quote.
-
- * configure.in, config/m68k/*delta68*, delta68-nat.c: New port.
-
- * Remove unused STACK_END_ADDR in the following files (in other
- files it is used for something): tm-mips.h, tm-sun2.h, tm-news.h,
- tm-a29k, tm-i386v.h, tm-hppa.h, tm-nindy960.h, tm-amix.h,
- tm-hp300hpux.h, tm-isi.h.
-
-Thu Jul 1 09:51:27 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * config/mips/nm-riscos.h: Define NBPG and UPAGES.
- config/mips/xm-riscos.h: Include <sys/types.h>.
-
- * ser-unix.c (hardwire_noflush_set_tty_state): Use an assignment,
- not an initializer, to copy the structure.
-
- * gdbtypes.h (struct type): Add field tag_name.
- * gdbtypes.c (type_name_no_tag), c-typeprint.c (c_type_print_base):
- Use it.
- * {coff,dwarf,mips,stabs}read.c: Set it.
-
- * xm-sysv4.h: Undefine HAVE_TERMIO.
-
- * config/mips/nm-riscos.h: Remove unmatched #endif.
- Define FETCH_INFERIOR_REGISTERS.
- * config/mips/riscos.mh: Don't include coredep.o; mips-nat.o is enough.
- Fix misspelling of NAT_FILE.
- * mips-nat.c (fetch_core_registers): If KERNEL_U_ADDR is not defined,
- we can still process "modern" core files.
-
- * ser-unix.c (hardwire_print_tty_state) [HAVE_TERMIOS]: Don't
- print c_line.
- (_initialize_ser_hardwire): Just check whether _POSIX_JOB_CONTROL
- is defined; don't care what it is defined to.
-
-Wed Jun 30 20:06:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/vax/xm-vaxult2.h: Define FD_SET and FD_ZERO.
-
-Tue Jun 29 11:02:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * inftarg.c: Remove unused include of terminal.h.
- * signals.h: Don't undefine signals anymore.
- * main.c: Use job_control from serial.h.
- * fork-child.c (fork_inferior): Use gdb_setpgid.
- * serial.h, ser-unix.c, ser-go32.c: Provide gdb_setpgid.
- * utils.c (quit): Use current_target->to_terminal_ours to figure
- out whether we care about lack of job control, rather than __GO32__.
- * utils.c: Include serial.h not terminal.h
- (quit): Use job_control not TIOCGPGRP.
- * terminal.h: Don't undefine TIOCGPGRP.
- * serial.h, ser-unix.c, ser-go32.c, ser-tcp.c: Add SERIAL_FLUSH_OUTPUT.
- * utils.c (quit): Use it.
- * serial.h: Add SERIAL_UN_FDOPEN.
- * utils.c (quit): Use it.
- * ser-unix.c: Add process group to ttystate.
- [HAVE_SGTTY]: Add tchars, ltchars, and lmode to ttystate.
- * inflow.c: Include serial.h not terminal.h.
- Use serial.h stuff to replace most of the maze of #ifdef's.
- * inflow.c, main.c, inferior.h: make gdb_has_a_terminal a function.
- * serial.h: Document SERIAL_SET_TTY_STATE as being immediate.
- * ser-unix.c: Use TIOCSETN not TIOCSETP so it is true.
- * serial.h, ser-unix.c, ser-go32.c, ser-tcp.c:
- Add SERIAL_PRINT_TTY_STATE, SERIAL_NOFLUSH_SET_TTY_STATE, and
- SERIAL_SET_PROCESS_GROUP.
- * inflow.c: Use them.
- * config/xm-svr4.h, config/rs6000/xm-rs6000.h, config/sparc/sun4os4.h:
- Define HAVE_TERMIOS.
- * Various: Remove all use of TIOC*_BROKEN.
-
-Wed Jun 30 12:20:51 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/m68k/tm-sun3.h (BELIEVE_PCC_PROMOTION_TYPE): Define.
-
-Tue Jun 29 13:44:41 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * target.h (target_detach): Turn macro into function.
- * target.c (target_detach): Define it, do deferred register stores
- before calling the real target function.
-
-Tue Jun 29 13:15:42 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
- and Jim Kingdon (kingdon@cygnus.com)
-
- * symtab.h (BLOCK_SHOULD_SORT): Do not sort blocks corresponding to
- a function to avoid printing of function arguments in wrong order
- due to sorting.
- * symfile.c (compare_symbols): Remove code for sorting arguments
- as blocks containing arguments are no longer sorted.
- * symtab.c (lookup_block_symbol): Update comment accordingly.
-
-Tue Jun 29 11:02:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/pa/tm-hppa.h: Remove unused ARGS_GROW_DOC.
- (REG_STRUCT_HAS_ADDR): Add comment.
-
- * infrun.c (wait_for_inferior): Use find_pc_line not find_pc_symtab
- to check whether there is line number information.
-
-Tue Jun 29 08:29:17 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * remote-udi.c: Fix docstring so that it compiles.
-
- * remote-mips.c, remote-nindy.c: move bfd.h before symfile.h
- (for file_ptr).
-
-Tue Jun 29 09:11:27 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dbxread.c (process_one_symbol): If we find a LOC_BLOCK where we
- don't expect it, change it to LOC_STATIC so at least we don't coredump.
-
- * c-typeprint.c (c_type_print_base): Don't error() on invalid type.
-
- * symtab.h: Add comments about line numbers.
- * source.c (identify_source_line): Fix off by one bug with line.
-
-Mon Jun 28 19:00:21 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Do not include libhppax. Instead include libhppa.h
- and hpux-symtab.h. Misc indention fixes.
- (find_unwind_entry): Add PARAM prototype.
- (read_hpux_symtab): More fixes for names and sizes of structs,
- unions, enums, typedefs, and tagdefs.
- (read_hp_enum_type, read_hp_struct_type): Likewise.
- (read_hp_set_type, read_hp_subrange_type): Likewise.
- (hp_type_lookup, process_one_debug_symbol): Likewise.
- (process_one_debug_symbol): Search forward from the K_FUNCTION for
- the first K_BEGIN when setting the line number associated with a
- function. Avoid unnecessary calls to savestring.
- (hp_alloc_type): Initialize TYPE_CPLUS_SPECIFIC here. Remove
- most cases where we set it elsewhere.
- (hppa_sym_fns): Use "hppa" instead of hppax since hpread.c and
- paread.c use the same BFD backend now. All references changed.
- (hpux_symfile_init): Allocate space to hold the debugging section
- contents on the symbol obstack.
-
-Mon Jun 28 10:09:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * printcmd.c (makeva*): New interface, for making a va_list.
- (printf_command): Use it.
- * config/m88k/xm-delta88.h: Remove VPRINTF define, not needed.
- * config/pa/xm-pa.h: New file.
- * config/pa/xm-hppa{b,h}.h: Include it.
-
- * xcoffread.c: Remove obsolete NO_TYPEDEFS comment.
-
-Sun Jun 27 08:54:55 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * valprint.c (val_print_type_code_int): Fix off by one error with
- eliminating leading zeroes for large little endian integers.
-
-Sun Jun 27 08:58:56 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/mips/riscos.mh (CC): Use -systype sysv.
-
- * ser-unix.c: Move #include of <sys/time.h> to HAVE_SGTTY section.
-
- * Makefile.in (ALLPARAM): Add config/mips/{x,n}-{news-mips,riscos}.h.
-
-Fri Jun 25 11:22:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/m68k/tm-m68k.h: Remove obsolete comment about duplicating
- CALL_DUMMY between different 68k machines.
-
-Fri Jun 25 17:02:45 1993 Stu Grossman (grossman at cygnus.com)
-
- * gdbserver/Makefile.in: Add dependancies on server.h.
- * gdbserver/remote-gutils.c: Remove lots of unused functions and
- variables.
- * gdbserver/remote-inflow.c: Remove lots of unused variables and
- #includes. Also, use PTRACE_* symbols instead of constants.
- (mywait): Surround calls to wait() with enable/disable_async_io()
- so that we can be interrupted from GDB while waiting for the
- child. Also, handle child exit more gracefully.
- * gdbserver/remote-server.c: Remove lots of unused variables.
- Move all extern defs into server.h. Redo main loop so that
- failure from getpkt() causes communications to be re-established.
- Fix 'k' command so that it restarts the child.
- * gdbserver/remote-utils.c: Remove lots of unloved vars and
- subrs. Move many extern decls into server.h. (remote_open): For
- tcp, seperate usage of proto fd from connected fd. Close proto
- fd after getting connection. (putpkt/getpkt): Pay attention to
- errors when reading/writing. Report these to the caller. New
- routines input_interrupt/enable_async_io/disable_async_io to make
- it possible to get an I/O interrupt when data arrives from the
- comm link.
- * serial.h: New file to contain common defs for all remote files.
-
-Fri Jun 25 17:02:45 1993 Stu Grossman (grossman at cygnus.com)
-
- * remote.c: Add arg names to prototypes, in a modest effort at
- clarification. Also add prototypes for some new functions.
- * (remote_wait): Better error reporting for 'T' responses.
- * ser-go32.c (strncasecmp): Make str1 & str2 be const.
- * (dos_async_init): Make usage message reflect requested port #.
- * ser-tcp.c (tcp_open): Terminate hostname properly to prevent
- random hostname lookup failures. Add nicer message for unknown
- host error. (wait_for): Wake up in case of exceptions. Also,
- restart select() if we got EINTR.
- * ser-unix.c (wait_for): Restart select() if we got EINTR.
- * serial.c: (serial_close): Clean up code.
-
-Fri Jun 25 11:22:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/m68k/tm-m68k.h: Remove obsolete comment about duplicating
- CALL_DUMMY between different 68k machines.
-
-Fri Jun 25 11:22:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (*.tab.c): Use ./c-exp.tab.c not just c-exp.tab.c.
- Make comment explaining this comprehensible.
- (TAGFILES): Include ALLDEPFILES.
- (ALLDEPFILES): udi2soc.c and udr.c are in 29k-share/udi, not
- 29k-share/udi/udi.
- (update-alldeps): Remove; obsolete.
-
- * remote.c: Move comments regarding packets to top of file with the
- rest of the protocol comments.
- Fix incorrect description of 'T' response.
-
- * README (Reporting Bugs): Refer people to the GDB manual.
-
- * c-valprint.c (c_val_print): Handle TYPE_CODE_BOOLEAN.
- * stabsread.c: Type -16 is 4 bytes.
-
- * remote-udi.c: Improve docstring.
-
-Fri Jun 25 11:16:31 1993 Fred Fish (fnf@cygnus.com)
-
- * elfread.c (elf_symfile_read): Call bfd_elf_find_section, not
- bfd_elf32_find_section, to track bfd changes.
-
-Fri Jun 25 11:22:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/mips/riscos.mh (REGEX{,1}, MUNCH_DEFINE, MH_CFLAGS): Define.
- * config/mips/xm-riscos.h: Define USG.
-
-Thu Jun 24 14:52:45 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * main.c (filename_completer): Don't complete to files ending in ~.
-
- * NEWS: Mention filename completion and "info line" enhancements.
-
- * main.c (symbol_completion_function): On "info t foo", return NULL,
- don't error().
-
- * main.c (symbol_completion_function): Don't use readline word
- breaking. Use new calling convention for c->completer and
- complete_on_cmdlist.
- * command.h (struct command): Change arguments; now the text passed
- to completer does not have any word breaking done. New arg word.
- * symtab.{c,h} (make_symbol_completion_list): Do word breaking. Take
- word argument.
- * {main.c,gdbcmd.h} ({filename,noop}_completer): Take word argument.
- * command.{c,h} (complete_on_cmdlist): Take word argument.
-
- * command.c (lookup_cmd_1): Doc fix.
-
-Thu Jun 24 13:26:04 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * Makefile.in (OP_INCLUDE): define.
- (OPCODE_CFLAGS): use OP_INCLUDE.
-
- * config/i386/ncr3000.mh, config/i386/i386v4.mh,
- config/i386/i386sol2.mh, config/m68k/hp300hpux.mh,
- config/m68k/amix.mh, config/mips/irix[34].mh,
- config/m88k/delta88.mh, config/sparc/sun4sol2.mh (ALLOCA,
- ALLOCA1): macros removed.
-
- * config/mips/decstation.mh, config/rs6000/rs6000.mh
- (MMALLOC_LIB): renamed to MMALLOC.
-
-Wed Jun 23 00:25:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * partial-stab.h: Consolidate case statements for N_LSYM and N_FUN.
- * dbxread.c: Change comment regarding acc.
-
-Wed Jun 23 16:33:36 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Document a few functions, misc cleanups. Update
- copyright to reflect the first "release" of this file.
- (struct hpux_symfile_info): Delete unneeded fields. Keep pointers
- to the contents of the debug sections rather than offsets within
- the file itself. Corresponding changes to the accessor macros.
- (sl_symbol_size, slt_symbuf): Delete unneeded global variables.
- (slt_symbuf_start, slt_symbuf_end, lntt_symbuf): Likewise.
- (lntt_symbuf_start, lntt_symbuf_end, gntt_symbuf): Likewise.
- (gntt_symbuf_start, gntt_symbuf_end): Likewise.
- (fill_slt_symbuf, fill_lntt_symbuf): Delete unneeded functions.
- (fill_gntt_symbuf): Likewise.
- (get_lntt, get_gntt, get_slt): Simplify.
- (hpux_symfile_init): Read and store the contents of the debugging
- sections. Do error checking on memory allocation and BFD calls.
- (read_hpux_symtab): Delete KERNELDEBUG crud. Ignore debug symbols
- which are not needed for building partial symbol tables. Handle
- K_CONST, K_TYPEDEF, and K_TAGDEF just like K_SVAR and K_DVAR.
- (read_ofile_symtab): Delete useless processing_gcc_compilation stuff.
- (read_hp_struct_type): Initialize TYPE_CPLUS_SPECIFIC.
- (read_hp_set_type, read_hp_array_type): Likewise.
- (read_hp_subrange_type, hp_type_lookup): Likewise.
-
-Wed Jun 23 15:04:54 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- Makefile overhaul dropping autodepend features.
- * Makefile.in: many comment changes. forced consistent use of $()
- for makefile variables references. dropped leading ./ in file
- references. Drop $(srcdir)/ prefix on all dependencies.
- Inserted contents of alldeps.mak and depend.
- (INCLUDE_CFLAGS): defined as new macro for getting libiberty's
- include directory into the compilation line.
- (GDB_CFLAGS): new macro to take up the semantic previously held
- by INCLUDE_CFLAGS.
- (LIBIBERTY): dropped ancient subdir macro. I last removed this
- macro in feb of '92. How does it keep coming back?
- (MMALLOC_LIB): renamed to MMALLOC.
- (BFD_SRC_DIR): renamed to BFD_SRC.
- (BFD_OBJ_DIR): renamed to BFD_DIR.
- (BFD_LIB): renamed to BFD.
- (BFD_INCLUDES): renamed to BFD_CFLAGS.
- (READLINE_DIR): now represents object directory.
- (RL_LIB): renamed to READLINE.
- (READLINE_SRC, READLINE_CFLAGS, OPCODES, OPCODES_CFLAGS): new
- macros.
- (INTERNAL_CFLAGS): added GDB_CFLAGS, OPCODES_CFLAGS,
- READLINE_CFLAGS, BFD_CFLAGS. Dropped USER_CFLAGS.
- (LDFLAGS): removed default assignment.
- (TEXIDIR, INCLUDE_DEP, MMALLOC_DIR, MMALLOC_DEP, BFD_DEP,
- READLINE_DEP, LIBIBERTY_DIR, TESTS, depend, STAGESTUFF): unused, so removed.
- (ALLOCA1, ALLOCA): removed all references. alloca is now in
- libiberty.
- (VERSION): unilaterally and arbitrarily bumped to 4.9.3.
- (SFILES, NONSRC, HFILES, ALLDEPFILES, ALLPARAM, ALLCONFIG):
- removed all $(srcdir) prefixes.
- (getopt_h, ieee-float_h, bfd_h, wait_h, dis-asm_h): new macros
- for potential dependencies. commented out by default.
- (readline_headers, udiheaders): convenient abbreviations.
- (gdbcore_h, frame_h, symtab_h, gdbtypes_h, expression_h,
- value_h, breakpoint_h, command_h, gdbcmd_h, defs_h, inferior_h):
- new macros used for header file dependencies.
- (install-info, clean-info): collapse into the info rule.
- (install): now depends on all.
- (install-only): new target for installing without depending on
- all.
- (uninstall): new target.
- (config-check, config-check-hosts, config-check-targets): added
- fixme comments.
- (ch-exp.tab.c, m2-exp.tab.c): added artificial dependencies in
- order to force parallel makes into keeping these rules separate.
- * configure.in: omit cat'ing depend file onto generated Makefile.
- * alldeps.mak, depend: removed.
-
- * inferior.h: remove redundant include of symtab.h which is
- included in value.h via breakpoint.h.
-
- * alloca.c: removed. alloca is now in libiberty.
-
- * config/m88k/delta88.mh, config/ns32k/merlin.mh (M_UNINSTALL):
- new macro to undo what M_INSTALL does.
-
-Wed Jun 23 00:25:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/ns32k/{merlin.mh,xm-merlin.h}: Be consistent about name
- of gdb-sh.
-
- * dbxread.c (copy_pending): Change name and function of begi argument
- to endi, since that is what the caller needs.
-
- * Makefile.in (TAGFILES): Don't include YYFILES.
-
- * Makefile.in (HFILES): Include monitor.h.
-
- * Makefile.in: Include text that used to be in alldeps.mak.
- Remove config/mips/{bigmips.mh,xm-bigmips} from it.
- * Makefile.in, configure.in: Remove all traces of alldeps.mak.
-
- * main.c (main): Print help message on stdout not stderr
- per standards.texi.
- New option --version per standards.texi.
- In help message, show long options with "--" not "-".
- Don't try to print help message or version until after we have
- called initialize_all_files.
-
-Tue Jun 22 11:03:13 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Delete useless #if 1 statements.
- (hp_type_translate): Use T_LONG, T_UNS_LONG, and T_DOUBLE instead
- of magic integers. Fix handling for T_UNS_INT. Abort if the type
- passed in is not an "immediate" type.
- (read_hp_enum_type): Properly compute the size of the type.
- (read_hp_array_type): Likewise.
- (hp_type_lookup): Prefix the names of structs, unions and enums
- with "struct", "union", and "enum" as appropriate.
-
-Tue Jun 22 03:15:38 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * solib.c (solib_add_common_symbols): Don't call lookup_minimal_symbol.
- (solib_add): Call special_symbol_handling once, not once per library.
-
- * procfs.c (procfs_resume): Don't pass a SIGTSTP whose action
- is SIG_DFL.
-
- * procfs.c (procfs_resume): Skip the unnecessary PRSVADDR on all
- systems, not just Solaris.
-
- * stabsread.c: Include <ctype.h>.
-
-Mon Jun 21 16:09:46 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * fork-child.c (fork_inferior): Quote exec_file so it can contain
- funky characters.
-
-Mon Jun 21 16:56:47 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (INCLUDE_CFLAGS): Add BFD_INCLUDES for now, since
- bfd.h is included by target.h, which most of gdb includes.
- * depend: Hand remove BFD_INCLUDES from ${CC} lines, now that
- it's in INCLUDE_CFLAGS.
-
-Mon Jun 21 16:09:46 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * config/i386/*aix*, i386aix-nat.c: New files.
- * configure.in: Use them.
- * alldeps.mak: List them.
- * coffread.c (decode_base_type): Deal with anonymous enum type.
- * i387-tdep.c (print_387_status_word): Add comment re "top".
- * i386-tdep.c [I386_AIX_TARGET] (i386_extract_return_value): New func.
- * dbxread.c: Use SEEK_SET and SEEK_CUR, not L_*. Define them if and
- only if not defined by a header file.
- * mipsread.c: Don't define L_SET or L_INCR.
-
-Mon Jun 21 15:10:07 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (BFD_INCLUDES): Bfd.h is now back in bfd build dir.
- * depend: Hand updated to match.
-
-Mon Jun 21 10:13:42 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Include "demangle.h".
- (process_one_debug_symbol): Set the SYMBOL_LANGUAGE and
- SYMBOL_INIT_DEMANGLED_NAME for the current symbol. Adjust
- SYMBOL_VALUE for local variables in the stack by the size of the
- current function's stack (found in unwind descriptor). Keep
- better track of the current unwind descriptor.
-
-Sun Jun 20 13:11:11 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * stabsread.c (read_struct_fields): Don't call read_cpp_abbrev on $_.
- (read_cpp_abbrev): Don't complain specially for $_. Also return 0 if
- we don't recognize the abbrev.
-
-Sun Jun 20 00:24:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * solib.c (solib_add_common_symbols): Add comment about performance.
-
-Fri Jun 18 12:37:36 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/mips/{{x,n}m-riscos.h,riscos.mh}: New files.
- * configure.in (mips-*-sysv*): Use riscos for host, bigmips for target.
-
- * config/mips/{{x,n}m-news-mips.h,news-mips.mh}: New files.
- * config/mips/{bigmips.mh,xm-bigmips.h}: Remove.
- * configure.in (mips-sony-*): Use news-mips for host.
-
- * buildsym.h: Doc fix for processing_acc_compilation.
-
-Thu Jun 17 19:57:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * printcmd.c (print_formatted): Don't use tab in wrap_here arg.
-
-Thu Jun 17 17:29:30 1993 Jim Kingdon (kingdon@lisa.cygnus.com)
-
- * Makefile.in (INTERNAL_CFLAGS): Include ../include as well as
- ${srcdir}/../include.
-
- * config/m88k/xm-delta88.h: Comment out unused defines which conflict
- with system headers.
- * printcmd.c (printf_command): Cast second arg to vprintf to PTR.
- Use VPRINTF macro if defined.
- * config/m88k/xm-delta88.h: Define VPRINTF. Include <sys/siginfo.h>.
- Define TIOC{GETC,GLTC}_BROKEN.
- * m88k-nat.c: Uncomment include of <sys/ptrace.h>.
- * main.c: Rename initialize_{main,cmd_lists,history} to init_* to
- make things easier on munch (apparently this matters on
- the delta88 with svr3).
-
-Thu Jun 17 16:53:56 1993 david d `zoo' zuhn (zoo@cygnus.com)
-
- * Makefile.in: canonicalize install.sh; for use within
- this directory (and subdirs)
-
-Tue Jun 15 17:01:23 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: remove parentdir support; use INSTALL_XFORM
-
-Thu Jun 17 15:08:35 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * configure.in (alpha-*-osf*), config/alpha/alpha-osf.mh: New
- host.
- * sh-tdep.c (frame_find_saved_regs): Use NUM_REGS rather than hard
- wired (and wrong) constant.
- * values.c (unpack_long): Add case to unpack when target object is
- sizeof(int).
- * config/sh/tm-sh.h (REGISTER_NAMES): Know about the news ones the
- simulator defines.
-
-Wed Jun 16 16:08:18 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * NEWS: tracking user visible changes starting with
- vxworks-timeout.
-
- * remote-vx.c (_initialize_vx): rename user settable option from
- rpcTimeout to vxworks-timeout.
-
-Wed Jun 16 14:34:10 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (hp_type_translate): Fix promotion bugs from
- char to short and short to int.
-
-Wed Jun 16 12:21:49 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (depend): More makefile diddling.
- * alldeps.mak, depend: Update to latest automatically built
- versions.
-
- * Makefile.in (depend): Bfd.h keeps moving, keep up with it.
- * alldeps.mak, depend: Update to latest automatically built
- versions.
-
-Tue Jun 15 12:26:05 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * remote-vx.c: include gdbcmd.h for setlist.
- (_initialize_vx): make rpcTimeout user settable.
-
-Mon Jun 14 09:23:51 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * main.c, gdbcmd.h: Add function filename_completer.
- * main.c, symfile.c, source.c, exec.c, core.c: Use it for
- "directory", "source", "cd", "symbol-file" "add-symbol-file",
- "load", "file", "exec-file", "core-file" commands.
- (But '/' is a word break, limiting usefulness; see comments).
-
- * source.c (mod_path): Warning not error if can't find directory.
-
- * isi-xdep.c: New file.
- * config/m68k/isi.mh (XDEPFILES): Add isi-xdep.o
-
-Sun Jun 13 09:17:48 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * config/m68k/xm-news.h: Include <sys/param.h>.
-
- * m88k-tdep.c (IEEE_isNAN): Remove.
- config/m88k/tm-m88k.h (INVALID_FLOAT): Return 0. This was the same
- broken isNAN as on the mips.
-
- * valprint.c (_initialize_valprint): Use c->function.sfunc not just
- c->function.
-
- * dbxread.c (process_one_symbol): If SUN_FIXED_LBRAC_BUG is not
- defined, don't worry about Sun's silly LBRAC bug.
- * config/m68k/tm-sun3.h: Define SUN_FIXED_LBRAC_BUG to 0.
-
- * dbxread.c (process_one_symbol): If there's a symbol before an
- N_SO, don't error().
- (case N_BCOMM): complain () not error ().
-
- * defs.h, main.c (catch_errors): Add return_mask arg.
- stack.c (print_frame_info): Pass RETURN_MASK_ERROR.
- other callers: Pass RETURN_MASK_ALL.
- (return_to_top_level), callers: Add return_reason arg.
- * utils.c (quit):
- Use return_to_top_level (RETURN_QUIT) instead of error ().
- * main.c (main), tm-nindy960.h (ADDITIONAL_OPTION_HANDLER):
- Use SET_TOP_LEVEL not setjmp (to_top_level).
- * remote-nindy.c: Use catch_errors not setjmp (to_top_level).
-
-Sat Jun 12 14:40:54 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * solib.c (solib_create_inferior_hook) [SVR4_SHARED_LIBS]:
- Don't try to get the debug base yet.
-
- * dbxread.c (process_one_symbol): Set n_opt_found based on whether
- a non-gcc N_OPT symbol is found. Make SUN_FIXED_LBRAC_BUG a macro
- which returns 0 or 1 to say whether to do it.
- * config/sparc/sun4{sol2,os4}.h
- (SUN_FIXED_LBRAC_BUG,VARIABLES_INSIDE_BLOCK): Use n_opt_found so
- the right thing happens for both acc and SunOS4 /bin/cc.
-
- * valprint.c (print_hex_chars): Use local_hex_format_{pre,suf}fix.
- * printcmd.c (print_scalar_formatted): Use val_print_type_code_int.
-
- * mips-tdep.c: Remove isa_NAN; it assumed sizeof(host int) == 4 and
- probably contained byte-order sins too.
- config/mips/tm-mips.h (INVALID_FLOAT): Define to 0 like most machines.
- The IEEE_FLOAT code in print_floating takes care of it.
-
-Sat Jun 12 14:47:04 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (VERSION): Bump to 4.9.2.
- * c-valprint.c (c_val_print): For array of chars printed with
- string syntax, don't print the address of the array. From
- bothner@cygnus.com.
- * c-exp.y (yylex): Recognize '.' as indicating a floating point
- number regardless of the radix. From wilson@cygnus.com.
- * valprint.c (set_input_radix_1, set_output_radix_1): New
- prototypes and functions that do the actual radix setting work.
- * valprint.c (set_radix, set_output_radix, set_input_radix):
- Rewrite to use set_input_radix_1 and set_output_radix_1.
- * valprint.c (initialize_valprint): Enable commands to
- independently set and show input and output radices.
- * valprint.c (show_radix): New prototype and function that
- handles separate input and output radices.
-
-Fri Jun 11 18:39:38 1993 Ken Raeburn (raeburn@cygnus.com)
-
- Patches from Jeff Law, law@cs.utah.edu:
- * hppa-pinsn.c: Now uses disassembler from opcode library,
- this contains only the stub function print_insn.
-
-Fri Jun 11 15:19:59 1993 K. Richard Pixley (rich@cygnus.com)
-
- * main.c (main): back to two periods for elipse.
- (print_gdb_version): revised format for configuration info.
-
-Fri Jun 11 10:24:35 1993 Fred Fish (fnf@cygnus.com)
-
- * defs.h (INT_MAX): Cast unsigned shift result to int.
-
-Fri Jun 11 10:17:41 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * dbxread.c (process_one_symbol): Rather than having
- BLOCK_ADDRESS_FUNCTION_RELATIVE a macro, make it a variable which
- is true if we are doing stabs-in-elf, false otherwise.
- config/sparc/tm-sun4sol2.h: Don't define it.
-
-Fri Jun 11 13:33:40 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * remote-mips.c (mips_send_packet): Don't print garbage character
- in debugging info.
- (mips_request): Don't check that remote pid is 0, because
- sometimes it isn't.
- (mips_fetch_registers): Pass a pointer to SWAP_TARGET_AND_HOST,
- not an integer.
-
-Fri Jun 11 10:17:41 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * stack.c (print_frame_info): Use catch_errors around print_frame_args.
-
- * Makefile.in (install): Don't depend on gdb.
-
- * Rename remote-es1800.c to remote-es.c
- and remote-st2000.c to remote-st.c for 14-char filenames.
- config/m68k/{es1800,st2000}: Use the new names.
-
- * mips-tdep.c (isa_NAN): Don't return true on -0.
-
-Fri Jun 11 10:24:35 1993 Fred Fish (fnf@cygnus.com)
-
- * defs.h (INT_MAX): Cast unsigned shift result to int.
-
-Thu Jun 10 13:26:41 1993 Fred Fish (fnf@cygnus.com)
-
- * elfread.c (elf_symtab_read): Add bfd section address to bfd
- symbols, now that they are section relative.
- * solib.c (bfd_lookup_symbol): Ditto.
-
-Thu Jun 10 11:27:34 1993 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hp_function_type): Adjust SYMBOL_VALUE for
- arguments in the stack by the size of the current function's stack
- (found in the unwind descriptor).
- (process_one_debug_symbol): Likewise. Keep track of the current
- function's unwind descriptor.
-
-Thu Jun 10 10:56:56 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * Makefile.in (depend): Add bfd -I's for paread.c and xcoffexec.c
- depend: Updated accordingly.
-
-Wed Jun 9 16:08:44 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * Makefile.in (*.tab.c): Use mv for atomic update.
-
- * Makefile.in ({dist,real}clean): Also remove nm.h.
- (realclean): Also remove ${TESTS}, y.output, yacc.{acts,tmp}.
- (distclean): Don't rebuild *.tab.c or TAGS.
-
-Wed Jun 9 12:56:58 1993 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in (version.c): add host and target names to version.c.
- * main.c (main): print three periods for the elipse.
- (print_gdb_version): also print configuration.
-
- * udi/udiids.h, udi/udip2soc.c, udi/udiphcfg.h, udi/udiphunix.h,
- udi/udiproc.h, udi/udipt29k.h, udi/udiptcfg.h, udi/udisoc.h,
- udi/udr.c: Change AMD copyrights to FSF copyleft '93.
-
- * remote-eb.c (get_hex_regs, eb_fetch_registers), remote-adapt.c
- (get_hex_regs, adapt_fetch_registers): cast args to
- supply_register to avoid gcc warning.
-
- * config/a29k/a29k.mt (TDEPFILES): drop minimon support. It
- doesn't compile on solaris and is now obsolete.
-
- * config/sparc/sun4os4.mh (XM_CLIBS): remove -lresolv. This
- breaks stock sunos installations.
-
-Wed Jun 9 06:14:33 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * m68k-stub.c: Add comment about frame cache.
-
- * target.h (target_store_registers): Doc fix re error handling.
-
- * findvar.c (write_register): Call SWAP_TARGET_AND_HOST regardless
- of register_valid[regno].
-
-Tue Jun 8 14:42:10 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * symtab.h, dwarfread.c: Doc fix re dependencies.
-
-Tue Jun 8 17:54:09 1993 Rob Savoye (rob@rtl.cygnus.com)
-
- * serial.c (serial_close): If scb is NULL, don't try to close
- it.
- * configure.in: Add support for rom68k and bug boot monitors.
-
-Tue Jun 8 17:39:12 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * coffread.c (init_stringtab): Fix bug where sizeof(long) != 4.
- * gdbcore.h, core.c (read_memory_unsigned_integer): New function.
- * findvar.c (read_register, write_register): Fix thinko where
- sizeof(host long) != sizeof(target int).
- * h8300-tdep.c: Use new read_memory_unsigned_integer call.
- * sh-tdep.c (_initialize_sh_tdep): Add memory_size command.
-
-Tue Jun 8 14:42:10 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * Move config/m68k/tm-m68k.h (FRAME_FIND_SAVED_REGS) to
- m68k-tdep.c (m68k_find_saved_regs). Don't duplicate code between
- 68881 and non-68881 cases. Check for a pair of movel instructions.
-
-Tue Jun 8 14:52:55 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- First cut at sparc-vxworks targetting.
- * config/sparc/tm-vxsparc.h, config/sparc/vxsparc.mt: new files.
- * configure.in: sparc-vxworks gdb_target now vxsparc.
-
- * remote-eb.c, remote.c: symfile.h requires bfd.h so include it.
-
-Tue Jun 8 14:42:10 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * config/m68k/xm-news.h: add "extern int errno".
-
-Tue Jun 8 13:45:07 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * remove-vx.c (vx_read_register, vx_write_register): collapse
- ifdef I80960 else (assumes) m68k into parameterizable macros
- VX_NUM_REGS and VX_SIZE_FPREGS.
- * config/m68k/tm-vx68.h, config/i960/tm-vx960.h (VX_NUM_REGS,
- VX_SIZE_FPREGS): new definitions.
-
-Tue Jun 8 11:08:29 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * symfile.{c,h} (generic_load): New function.
- remote{,-nindy,-eb,-mips}.c: Use it.
-
-Mon Jun 7 20:07:30 1993 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in (depend): More sed gubbish to deal with
- ../bfd/bfd.h being generated during the build.
- * depend: Re-done with corrected makefile.
-
-Mon Jun 7 16:32:05 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (BFD_SRC_DIR): Renamed def and usages from BFD_DIR.
- * Makefile.in (BFD_OBJ_DIR): New definition for the bfd build
- directory to find automatically generated header files and library.
- * Makefile.in (BFD_LIB): Use BFD_OBJ_DIR.
- * Makefile.in (LINTFLAGS): Include BFD_OBJ_DIR.
- * Makefile.in (saber_gdb): Include BFD_OBJ_DIR.
- * Makefile.in (depend): Include BFD_OBJ_DIR in gcc args.
- * Makefile.in (paread.o, xcoffexec.o): Remove, now in depend.
- * depend, alldeps.mak: Rebuild after Makefile.in changes.
-
-Fri Jun 4 10:18:51 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: change lynx support to CPU-*-lynxos*
-
- * Makefile.in (subdir_do): change test from existence of directory
- to existence of Makefile (the directory may exist but not be configured)
-
-Thu Jun 3 01:18:51 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * config/sparc/xm-sun4sol2.h: define MEM_FNS_DECLARED
-
-Fri Jun 4 10:43:33 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in (mips-idt-ecoffl*): New target; use idtl.
- (mips-idt-ecoff*): Added trailing '*'.
- * config/mips/idtl.mt: New file; like idt.mt, but little endian.
-
-Thu Jun 3 17:36:56 1993 Stu Grossman (grossman@cygnus.com)
-
- * ser-go32.c: Clean up lots of compilation nits.
-
-Thu Jun 3 14:44:57 1993 Stu Grossman (grossman@cygnus.com)
-
- * Patches from Jeffrey Law <law@cs.utah.edu>.
- * hppab-nat.c: Eliminate unnecessary ifdefs for
- FETCH_INFERIOR_REGISTERS, CANNOT_FETCH_REGISTER, and
- CANNOT_STORE_REGISTER.
- (fetch_register): Delete code to handle CANNOT_FETCH_REGISTER.
- * hppa-pinsn.c: Support 'I', 'J', and 'K' in output
- templates for 1.1 FP computational instructions.
-
-Thu Jun 3 03:34:49 1993 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in: Remove ser-tcp.[co]. (Use XDEPFILES instead.)
- * alldeps.mak, depend: Rebuild to account for ser-tcp.
- * config/sparc/sun4os4.mh: Add ser-tcp to XDEPFILES.
- * gdbserver/Makefile.in (gdbserver): Use -lbsd.
- * gdbserver/remote-inflow{-sparc}.c (create_inferior): Don't use a
- shell when running the child, as args have been expanded by the
- time we get here. Simplify calling convention.
- * gdbserver/remote-server.c (main): Use new calling convention
- for create_inferior, remove defunct code for coalescing argv.
- Remove extra calls to mywait(), as we no longer have to wade
- through a shell.
-
- * target.c (target_read_memory_partial): Don't deref errnoptr
- when checking for null pointer.
-
-Wed Jun 2 19:58:46 1993 John Gilmore (gnu@cygnus.com)
-
- * remote-es1800.c: Fix typo.
-
-Tue Jun 1 21:22:39 1993 Fred Fish (fnf@cygnus.com)
-
- * target.c (target_read_memory_partial): Like target_read_memory,
- but does partial reads, such as reads that bump into the end of
- the address space.
- * target.h (target_read_memory_partial): Add prototype.
- * valprint.c (PRINT_MAX_DEFAULT): New define, initial value 200.
- * valprint.c (val_print_string): Complete rewrite to fix bug with
- bumping into end of memory, avoiding unnecessarily long reads, and
- fixing bug when print_max is set to 0 (unlimited print length).
- * valprint.c (_initialize_valprint): Use PRINT_MAX_DEFAULT to
- initialize print_max.
-
-Tue Jun 1 18:11:35 1993 Rob Savoye (rob at darkstar.cygnus.com)
-
- * configure.in: Add support for rom68k and bug boot monitors.
-
-Mon May 31 10:37:04 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * printcmd.c (print_scalar_formatted): Print integers bigger than
- LONGEST in hex no matter how big, and no matter what the format
- and size.
-
- * stabsread.c (read_type): Skip type attributes if present.
-
- * stabsread.c (read_huge_number): Don't accept '0' + radix as part
- of number, just through '0' + radix - 1.
-
-Sun May 30 15:35:21 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (SER_HARDWIRE): Temporarily comment out ser-tcp.o.
-
- * {dbxread.c, dwarfread.c} (read_ofile_symtab): Rewrite to take
- single parameter, the pointer to the partial symtab, rather than
- a bunch of args that are derived from the partial symtab. Change
- prototypes and callers to match.
-
- * dbxread.c (read_ofile_symtab): Remove "#if 1" around code to
- set demangling style automatically.
- * defs.h (CPLUS_MARKER): Clarify comment that this is only for
- GNU C++, not C++ in general.
- * symtab.h (general_symbol_info): Simplify by eliminating one
- structure level for the language dependent info.
-
-Sat May 29 15:59:29 1993 Fred Fish (fnf@cygnus.com)
-
- * c-typeprint.c (c_type_print_base): Avoid dereferencing NULL
- names for TYPE_CODE_STRUCT and TYPE_CODE_UNION types.
- TYPE_CODE_ENUM was already testing for this.
-
-Fri May 28 17:18:05 1993 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in: Add new file ser-tcp.c.
- * defs.h (memcmp): Add decl for memcmp to #ifndef MEM_FNS_DECLARED.
- * findvar.c (write_register): See if we are writing back the same
- value that's already in the register. If so, don't bother.
- * remote.c (putpkt, getpkt): Improve handling of communication
- problems.
- * ser-go32.c: Prototype it to death. Update serial_ops and add
- dummy routines where appropriate.
- * ser-tcp.c: New module to implement serial I/O via TCP
- connections.
- * ser-unix.c: Clean up getting/setting of tty state. Get rid of
- SERIAL_RESTORE, add SERIAL_{GET|SET}_TTY_STATE interfaces.
- * serial.c: Add start of support for connect command.
- (serial_open): Distinguish between tcp and local devices.
- * serial.h (struct serial_ops): Get rid of restore, add
- get_tty_state and set_tty_state. Define protoypes and macros for
- this mess.
- * gdbserver/remote-utils.c: Add tcp support. (readchar): Do
- some real buffering. Handle error conditions gracefully.
- * gdbserver/remote-inflow-sparc.c: Update to remote-inflow.c
- (Lynx), remove lots of cruft.
-
-Fri May 28 17:24:51 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * printcmd.c (print_address_symbolic): turn this into an assigment
- instead of an initialization (many compilers don't accept
- structure initialization).
-
-Thu May 27 16:56:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * xcoffread.c (read_xcoff_symtab): If several program csects in one
- source file, give them all the name of the source file, rather than
- the 2nd and subsequent ones having NULL names.
-
-Thu May 27 06:16:56 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * printcmd.c (print_address_symbolic): Append source filename and
- linenumber of the symbol if print symbol-filename is on.
- (initialize_printcmd): `set print symbol-filename'.
-
-Wed May 26 13:46:16 1993 Stu Grossman (grossman@cygnus.com)
-
- * configure.in: Add config for Lynx target. Configure gdbserver
- only for Lynx. Re-do selective configuration of sparclite.
-
- * gdbserver/{remote-gutils.c remote-server.c Makefile.in
- configure.in remote-inflow.c remote-utils.c}: New files to
- support GDB remote server. Currently only works for Lynx.
-
-Wed May 26 10:28:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c (define_symbol, case 't'): Only set the name if it
- is not a pointer type.
-
- * stabsread.c (define_symbol): Clean up logic; move the read_type
- calls to inside the switch statement (this improves the error
- handling).
-
- * mipsread.c (parse_symbol, parse_partial_symbols): Deal with Fortran
- common blocks.
-
-Tue May 25 20:44:24 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * printcmd.c (print_formatted, case 'i'): Pass a tab to wrap_here.
-
- * source.c (line_info): Change "pc" to "address" in messages and
- use print_address for addresses.
-
- * source.c (line_info): If we don't find a symtab, print more useful
- output, including the symbolic address.
-
- * source.c (line_info): If --fullname, display the source.
- (identify_source_line), callers: Take pc as argument, rather than
- assuming innermost frame (emacs doesn't use this, so no one ever
- noticed).
- * symtab.h: Declare frame_file_full_name.
- * main.c: Don't.
-
-Tue May 25 15:30:43 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
-
- * breakpoint.c (catch_command_1): Fix typo in error msg.
-
-Tue May 25 16:05:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * elfread.c (elf_symfile_read): Update ELF structure and routine
- names to specify 32-bit versions.
- (elf_symtab_read): Retrieve size field directly from symbol,
- instead of using old kludge.
-
- * mips-pinsn.c (print_insn): Cast address to bfd_vma before
- calling opcodes library.
- * z8k-tdep.c (print_insn): Likewise.
-
-Tue May 25 13:06:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c: Remove all uses of error(). Make error_type and
- read_type_number static.
- (define_symbol): Don't try to deal with a missing symbol
- descriptor which isn't followed by digit, '(', or '-'.
- * stabsread.h: Don't declare read_type_number here.
- * gdbtypes.h: Don't declare error_type here.
- * xcoffread.c: Remove NO_TYPEDEFS code.
-
-Tue May 25 09:33:16 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips-tdep.c: Removed #include of many header files, and #define
- of MIPSMAGIC; no longer used.
-
-Tue May 25 09:36:13 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Many places: replace "the inferior" in messages with "the program"
- or "the program being debugged".
- * inflow.c (try_writing_regs): Remove; it's been #if 0'd forever
- and I'm getting sick of maintaining it.
-
- * config/i386/linux.mh: Don't use \ newline; the awk scripts don't
- support it.
-
- * config/i386/go32.mh: Define SER_HARDWIRE.
- * Makefile.in: Define SER_HARDWIRE.
- (DEPFILES): Use it.
- (alldeps.mak): Add SER_HARDWIRE.
- Remove all references to ser-hardwire.{c,o}.
- * configure.in: Remove all ser_hardwire and gdb_serial_driver stuff.
-
-Mon May 24 23:50:05 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * sparc-nat.c (store_inferior_registers): Fill in all members of
- inferior_fp_registers by reading them from the inferior before
- modifying and writing them back.
- Fixes unexplainable inferior FP exceptions after calls to the inferior
- or setting of floating point registers.
- * mips-tdep.c (mips_skip_prologue): Skip move of argument register
- to register which is generated by gcc-2.4.
-
-Tue May 25 00:42:39 1993 Ken Raeburn (raeburn@cygnus.com)
-
- * hppa-pinsn.c: Define OLD_TABLE before including opcode/hppa.h.
-
-Mon May 24 13:55:14 1993 Stu Grossman (grossman@cygnus.com)
-
- * config/i386/{i386lynx.mh i386lynx.mt nm-i386lynx.h tm-i386lynx.h
- xm-i386lynx.h}: New configuration for Lynx.
-
-Mon May 24 10:01:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * mipsread.c (parse_symbol): Deal with scVar and scVarRegister.
- * symtab.h: Comment that LOC_REGPARM_ADDR can be call by reference.
-
- * c-typeprint.c (c_type_print_base): Don't print typedef'd names
- as struct, union, or enum tags.
-
-Mon May 24 01:10:01 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symmisc.c (dump_msymbols): Avoid gdb coredump with stripped
- executable.
-
-Sat May 22 10:03:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c (wait_for_inferior),
- infcmd.c (program_info, signal_command): Use symbolic signal names.
-
- * inftarg.c (child_wait): Deal with EINTR and include message from
- strerror if printing an error message.
-
- * main.c (command_line_input): Use STOP_SIGNAL not SIGTSTP.
-
- * stabsread.c: Remove most uses of lookup_fundamental_type.
- (define_symbol): Use read_type for type of enum constant,
- not just read_type_number. Also don't call error().
- (define_symbol): For unrecognized constant type, one complaint (the
- one from error_type) is enough. Don't make our own in addition.
- (define_symbol): Don't treat an N_FUN 'R' as a prototype.
- * gdbtypes.h: Doc fixes.
-
-Sat May 22 03:33:07 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- Fix stack unwinding through _sigtramp on Irix. These patches are from
- Paul Flinders <ptf@delcam.co.uk>.
- * mipsread.c (fixup_sigtramp): Find _sigtramp on Irix even when the
- executable uses sigvec.
- * mips-tdep.c (read_next_frame_reg): Allow tm-file to override
- sigcontext offsets.
- * config/mips/tm-irix3.h: Add sigcontext offsets for Irix.
-
-Sat May 22 00:39:01 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * infrun.c (wait_for_inferior): Clear stop_signal if it should not
- be passed to the inferior to make "handle <signal> nopass nostop" work.
-
-Sat May 22 00:21:41 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/mips/tm-irix3.h: Clean up, use tm-bigmips.h and redefine
- the necessary bits.
- * findvar.c (value_from_register): Fix uninitialized first_addr
- which caused problems with assignment of doubles to register variables
- on some targets.
- * mipsread.c: Remove TM_FILE_OVERRIDE, include tm.h and provide the
- missing mips definitions if necessary.
-
- Fix handling of double register variables for mips targets and big
- endian hosts. These patches are from Paul Flinders <ptf@delcam.co.uk>.
- * config/mips/tm-mips.h: Increase MAX_REGISTER_{RAW,VIRTUAL}_SIZE to
- 8 bytes for doubles.
- * config/mips/tm-mips.h (REGISTER_CONVERT_TO_TYPE): New macro for
- conversion of type held in multiple registers to host format.
- * config/mips/tm-mips.h (REGISTER_CONVERT_FROM_TYPE): New macro,
- companion to REGISTER_CONVERT_TO_TYPE.
- * config/mips/tm-mips.h (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE):
- Convert to function calls.
- * config/mips/tm-mips.h (FIX_CALL_DUMMY): New code for big endian
- mips targets.
- * mips-tdep.c (mips_print_register): Raw buffer now needs just
- MAX_REGISTER_RAW_SIZE bytes.
- * mips-tdep.c (mips_print_register): Use REGISTER_CONVERT_TO_TYPE
- (if defined) for doubles.
- * mips-tdep.c: (mips_extract_return_value, mips_store_return_value):
- New functions, take care of REGISTER_CONVERT_TO/FROM_TYPE.
- * valops.c (value_assign): Use REGISTER_CONVERT_TO_TYPE if
- defined.
- * findvar.c (value_from_register): Use REGISTER_CONVERT_TO_TYPE if
- defined.
-
-Fri May 21 09:04:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * configure.in: Add i[34]86-*-isc*.
-
- * stabsread.c: Make sure all complain() pass the address of the struct.
-
- * xcoffread.c: Make sure all struct complaints are static not auto.
-
- * Makefile.in: Add rule for xcoffexec.o like that for paread.o.
-
- * xcoffread.c (process_xcoff_symbol, case C_LSYM): Use define_symbol.
-
-Wed May 19 12:33:59 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/i386/linux.mh: Re-enable coredumps now that they should work.
-
-Wed May 19 15:44:20 1993 K. Richard Pixley (rich@cygnus.com)
-
- * config/m68k/tm-m68k.h (FRAME_CHAIN): add missing close paren.
-
-Wed May 19 15:33:57 1993 Stu Grossman (grossman@cygnus.com)
-
- * config/pa/nm-hppab.h: Comment PTRACE_ARG3_TYPE.
-
-Wed May 19 12:33:59 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (INSTALLED_LIBS): New variable.
-
-Tue May 18 14:08:50 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * main.c (quit_command): In the "quit anyway?" message, tell the user
- whether we are planning to detach or kill the program.
-
- * config/vax/vaxbsd.mh: Add "NAT_FILE= nm-vax.h".
- * config/vax/xm-vaxbsd.h: Use <sys/param.h> not <machine/limits.h>
-
- * infcmd.c (read_pc): Doc fix.
-
- * printcmd.c (print_address_symbolic): Use %u not %d for offset.
-
- * blockframe.c (get_prev_frame_info): If pc in sigtramp, set
- signal_handler_caller.
- * tm-68k.h (FRAME_{CHAIN,SAVED_PC}): Deal with sigtramp.
- * tm-hp300bsd.h: Define SIGTRAMP_{START,END} not IN_SIGTRAMP.
- * inferior.h (IN_SIGTRAMP): Definition moved from infrun.c.
- Use SIGTRAMP_START if defined.
- * infcmd.c (step_1): Use SIGTRAMP_{START,END} if needed.
- * infrun.c (wait_for_inferior): Check IN_SIGTRAMP before SKIP_PROLOGUE.
-
- * infptrace.c: Remove unused KERNEL_U_ADDR_HPUX code.
-
- * infcmd.c (step_1): Fix poorly worded error message.
-
- * config/{i386/linux.mh,m68k/isi.mh} (NATDEPFILES):
- Comment out corelow.c because core dumps are broken on these machines.
-
- * Makefile.in (depend): Put "${srcdir}" in generated dependencies
- if srcdir is not ".".
- Also put in -I${BFD_DIR} or -I${READLINE_DIR} for files which need it.
- (INCLUDE_CFLAGS): Remove BFD_DIR and READLINE_DIR.
- * depend: Update to latest automatically built version.
-
-Tue May 18 08:10:45 1993 Fred Fish (fnf@cygnus.com)
-
- * ChangeLog, ChangeLog-92: Split ChangeLog at 1993.
- * Makefile.in (NONSRC): Add ChangeLog-92
-
-Tue May 18 08:03:37 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * findvar.c ({read,write}_register): Use REGISTER_RAW_SIZE
- not typo RAW_REGISTER_SIZE.
-
- * frame.h, inferior.h: Doc fixes.
-
-Mon May 17 15:43:03 1993 Stu Grossman (grossman@cygnus.com)
-
- * findvar.c (write_register): Add sanity check for register size.
- (read_register): Fixup sanity check for register size to be
- consistent with write_register().
-
-Mon May 17 07:36:20 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * sparclite/Makefile.in: Add dummy info, install and install-info
- targets.
-
-Thu May 13 07:30:22 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * remote-nindy.c: Removed declaration of coffstrip.
- * nindy-share/nindy.c: #if 0 coffstrip routine; no longer used.
-
-Wed May 12 00:35:19 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (VERSION): Bump to 4.9.1 after release and cvs
- tagging.
-
- * Makefile.in (VERSION): GDB 4.9 release.
-
-Tue May 11 08:04:41 1993 Fred Fish (fnf@cygnus.com)
-
- * README: Update known bugs to include the Solaris bug that
- leaves core dumps in the current directory when restarting the
- inferior with "run". Expand on the testsuite information.
-
- * Makefile.in (VERSION): Bump to 4.8.96 for what should hopefully
- be the last 4.9 prerelease test archive.
-
-Mon May 10 22:13:23 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * config/m68k/xm-hp300bsd.h: Include <sys/param.h> to avoid INT_MAX
- redefined warnings.
-
-Mon May 10 20:00:43 1993 Fred Fish (fnf@cygnus.com)
-
- * README, NEWS: Update for gdb 4.9 release.
-
-Mon May 10 19:38:34 1993 John Gilmore (gnu@cygnus.com)
-
- * ch-exp.y (MAX, MIN): Rename to MAX_TOKEN, MIN_TOKEN.
- * target.c (MIN): #undef before defining.
-
-Mon May 10 16:03:03 1993 Jim Kingdon (kingdon@cygnus.com)
-
- Patch from Jeffrey Law:
- * gdb/config/pa/nm-hppab.h (PTRACE_ARG3_TYPE): Define as caddr_t.
-
-Mon May 10 15:28:27 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * hppa-tdep.c (hppa_push_arguments): Allocate correct amount of
- memory.
-
-Mon May 10 13:14:46 1993 Fred Fish (fnf@cygnus.com)
-
- * ch-exp.y (start): Apply work-around to avoid bison warning.
-
-Sun May 9 07:25:02 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (BISON): Remove double quotes around BISON
- definition when bison is used.
-
- * configure.in (hppa*-hp-bsd): Change to hppa*-hp-bsd*
- * configure.in (hppa*-hp-hpux): Change to hppa*-hp-hpux*
- * configure.in (m68*-hp-bsd): Change to m68*-hp-bsd*
- * configure.in (m68*-hp-hpux): Change to m68*-hp-hpux*
- * configure.in (hppa*-*-bsd): Change to hppa*-*-bsd*
- * configure.in (hppa*-*-hpux): Change to hppa*-*-hpux*
- * configure.in (m68*-hp-bsd): Change to m68*-hp-bsd*
- * configure.in (m68*-hp-hpux): Change to m68*-hp-hpux*
-
- * Makefile.in (VERSION): Bump to 4.8.6.
-
-Sat May 8 12:36:03 1993 Fred Fish (fnf@cygnus.com)
-
- * config/pa/xm-hppah.h (MALLOC_INCOMPATIBLE): Define it, and
- include declarations for malloc/realloc/free. Both malloc and
- realloc return 'void *' for non-ANSI compilations.
-
-Sat May 8 01:39:30 1993 (pes@regent.e-technik.tu-muenchen.de)
-
- * coffread.c (read_coff_symtab): Don't fclose stream as it is no
- longer opened twice.
-
-Thu May 6 21:08:55 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * solib.c (clear_solib): Don't close bfd if it is NULL.
-
-Thu May 6 20:55:35 1993 Fred Fish (fnf@cygnus.com)
-
- * core.c (dis_asm_read_memory): Cast second arg of
- target_read_memory to "char *".
- * breakpoint.c (watchpoint_check): Change arg type from PTR to
- "char *", to match other functions called by catch_errors().
-
-Thu May 6 15:47:45 1993 Stu Grossman (grossman@cygnus.com)
-
- * More patches from Jeffrey Law (law@cs.utah.edu).
- * gdb/config/nm-hppab.h (PTRACE_ARG3_TYPE): Define as caddr_t.
- * gdb/config/pa/tm-hppah.h (millicode_start, millicode_end):
- Delete unnecessary declarations.
-
-Thu May 6 15:15:46 1993 Stu Grossman (grossman@cygnus.com)
-
- * ser-unix.c (wait_for): Use VTIME to do timeouts instead of
- poll() for termio{s}.
-
-Thu May 6 10:03:41 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * i386-tdep.c (i386_frame_num_args): Always return -1.
-
-Wed May 5 15:16:33 1993 Stu Grossman (grossman@cygnus.com)
-
- * Patches from Jeffrey Law <law@cs.utah.edu>.
- * gdb/hppa-tdep.c: Declare frame_saved_pc.
- (frameless_function_invocation): New function.
- (frame_saved_pc, init_extra_frame_info): Use
- frameless_function_invocation.
- * gdb/config/pa/tm-hppa.h (SAVED_PC_AFTER_CALL): Use saved_pc_after
- call instead of just grabbing the value currently in %r2.
- (FRAMELESS_FUNCTION_INVOCATION): Use frameless_function_invocation.
- * gdb/config/pa/tm-hppah.h (SAVED_PC_AFTER_CALL): Delete private
- definition and use the common one in tm-hppa.h.
- * gdb/hppa-tdep.c (frame_chain_valid): If "use_unwind" is true, then
- use unwind descriptors to determine if the frame chain is valid.
- * gdb/hppa-tdep.c (find_dummy_frame_regs): Rework so that
- it does not assume %r4 is the frame pointer.
- * gdb/hppa-pinsn.c (print_insn): Handle 'r' and 'R' for break, rsm,
- and ssm instructions.
- * gdb/hppa-tdep.c (extract_5r_store, extract_5R_store): New
- helper functions for print_insn.
- * gdb/hppa-tdep.c (gcc_p, hpux_cc_p): Delete unused functions.
- * gdb/config/pa/tm-hppa.h (ABOUT_TO_RETURN): Handle a return
- which nullifies the following instruction.
-
-Tue May 4 12:11:38 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * infptrace.c [FIVE_ARG_PTRACE]: Define ptrace to call_ptrace and
- pass the 5th arg there, rather than using an ANSI C-specific macro.
-
- * Makefile.in (depend): Don't include ${CC} command for *.tab.c.
-
-Tue May 4 19:33:12 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (VERSION): Bump to 4.8.5
- * Makefile.in (INCLUDE_CFLAGS): Add BFD_DIR and READLINE_DIR
- directories to include search path.
- * Makefile.in (CLIBS, CDEPS, ADD_FILES, ADD_DEPS): Clean up
- whitespace.
- * Makefile.in (depend): For gcc -MM line, use INTERNAL_CFLAGS
- * Makefile.in (main.o, dbxread.o, coffread.o, mipsread.o,
- elfread.o, dwarfread.o, stabsread.o, xcoffread.o, xcoffexec.o,
- xdr_ld.o, xdr_rdb.o, nindy.o, Onindy.o, ttybreak.o, ttyflush.o,
- udr.o, udip2soc.o): Remove explicit rules, use the ones that
- are automatically generated in "depend".
- * Makefile.in (paread.o): Document why a dependency doesn't get
- automatically generated in "depend" and leave this explicit rule
- in for now (FIXME).
- * depend: Update to latest automatically generated version.
-
-Tue May 4 12:11:38 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffread.c: Doc fix.
-
- * Makefile.in (depend): Include $(CC) command in generated output.
-
-Mon May 3 22:51:05 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (NONSRC): Remove ${srcdir}/putenv.c.
- * Makefile.in (SFILES): Add ${srcdir}/putenv.c.
- * depend: Update to latest automatically built version.
-
-Mon May 3 19:20:20 1993 Stu Grossman (grossman@cygnus.com)
-
- * sparclite/Makefile.in: Create default target that does nothing
- in order to force user to build by hand.
-
- * sparclite/Makefile: Remove. It's not necessary anymore.
-
- * ser-unix.c (wait_for): New routine to handle read timeouts,
- etc. Uses poll() if HAVE_TERMIO[S] is defined, select() otherwise.
-
-Mon May 3 13:52:08 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips-pinsn.c (print_insn): Return value.
-
-Sun May 2 11:43:57 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (SFILES): Remove ser-hardwire.c; it is a link made
- at configuration time and doesn't belong in the distribution archive.
-
- * Makefile.in (NONSRC): Add 29k-share/README.
- * Makefile.in (HFILES): Add 29k-share/udi/udiids.h.
-
- * defs.h (UINT_MAX, LONG_MAX, INT_MAX, INT_MIN): Replace hex
- constants with slightly more portable definitions (still depends
- on 2's complement arithmetic though).
- * config/i386/nm-linux.h: Define NO_SYS_REG_H for no <sys/reg.h>.
- * i386v-nat.c (sys/reg.h): Conditionalize include on
- NO_SYS_REG_H. Linux doesn't have <sys/reg.h>.
- * ser-unix.c (termio.h): Include <termio.h> like other files that
- include termio.h, not <sys/termio.h> which may not exist (on
- linux for example).
-
-Sat May 1 16:05:24 1993 Fred Fish (fnf@cygnus.com)
-
- * valprint.c (print_longest): Change format parameter from a
- 'char' to an 'int'. We can't have 'char' parameters with the
- current coding style, where we mix prototypes with pre-ANSI
- style declarations.
- * value.h (print_longest): Change format parameter in prototype
- from a 'char' to an 'int'.
-
-Sat May 1 02:47:20 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/mips/tm-mips.h (STAB_REG_TO_REGNUM): Match it with the gcc
- definition.
- * config/mips/tm-irix3.h (STAB_REG_TO_REGNUM): Add.
- * irix4-nat.c (fill_fpregset): Fix bug with indexing into fpregsetp.
-
-Fri Apr 30 17:45:32 1993 Stu Grossman (grossman@cygnus.com)
-
- * The following patches are from Jeffrey Law <law@cs.utah.edu>.
- * config/pa/hppabsd.mh: Add more files to NATDEPFILES.
- * config/pa/xm-hppa[bh].h: Define FIVE_ARG_PTRACE.
- * hppab-nat.c: Delete WANT_NATIVE_TARGET ifdefs.
- ptrace needs 5 arguments, #define ptrace to always
- pass zero as the 5th argument.
-
-Fri Apr 30 15:54:13 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * configure.in: Match z8k-*-sim for z8000.
- * config/h8500/tm-h8500.h, h8500-tdep.c: Lint.
- * remote-hms.c: Update to use new serial protocol.
-
-Fri Apr 30 16:50:38 1993 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * mips-tdep.c: remove include of sys/dir.h. Doesn't seem
- necessary and Solaris doesn't have it.
-
- * Makefile.in (clean-info, install, install-info, info, dvi,
- check, all): do not echo recursion lines.
-
- * 29k-share/udip2soc.c (UDIConnect): replace union wait with int.
-
- * config/sparc/sun4sol2.mh (XM_CLIBS): add -lsocket which is
- required target ports which use sockets (like a29k-udi).
-
- * remote-udi.c (udi_wait): Use SIGURG, as Solaris doesn't have SIGLOST.
-
-Fri Apr 30 11:05:42 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * ser-unix.c [USE_{TERMIO,ALARM}_TIMEOUT]: New code to deal with
- systems lacking select().
-
- * Makefile.in (TAGS): Doc fix. Deal with empty DEPFILES.
-
-Fri Apr 30 10:06:46 1993 Fred Fish (fnf@cygnus.com)
-
- * alldeps.mak, depend: Update with latest automatically built
- versions.
-
-Thu Apr 29 12:03:23 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (SFILES): Add ser-unix.c and ser-go32.c.
-
- * Makefile.in (make-proto-testsuite.dir): New target to make
- prototype testsuite tree.
-
- * Makefile.in (VERSION): Bump to 4.8.4.
-
-Thu Apr 29 08:46:22 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * stabsread.c (define_symbol): If unrecognized constant type,
- complain() not error().
-
-Thu Apr 29 00:03:59 1993 Fred Fish (fnf@cygnus.com)
-
- * infptrace.c: Add missing close paren to test for
- FIVE_ARG_PTRACE defined.
-
- * defs.h (CC_HAS_LONG_LONG): Set up to define CC_HAS_LONG_LONG
- when compiling with gcc, but disable it for now. See comment.
- * defs.h (LONGEST): Define as either "long" or "long long"
- based on CC_HAS_LONG_LONG.
- * defs.h (longest_to_int): Use CC_HAS_LONG_LONG to control
- how longest_to_int is defined.
- * c-valprint.c (c_val_print): Call print_longest.
- * expprint.c (dump_expression): Use PRINTF_HAS_LONG_LONG
- instead of LONG_LONG.
- * {printcmd.c, gdbtypes.h} (LONG_LONG): Replace usages with
- CC_HAS_LONG_LONG.
- * printcmd.c (print_scalar_formatted): Call print_longest
- and let it figure out what to do for PRINTF_HAS_LONG_LONG.
- * typeprint.c (print_type_scalar): Call print_longest and let
- it figure out what to do for PRINTF_HAS_LONG_LONG.
- * valprint.c (val_print_type_code_int): Call print_longest
- and let it figure out what to do for PRINTF_HAS_LONG_LONG.
- * stabsread.c (LONG_LONG): Replace usages with CC_HAS_LONG_LONG.
- * value.h (struct value): Replace usage of LONG_LONG with
- CC_HAS_LONG_LONG.
- * value.h (print_longest): Add prototype.
- * values.c (LONG_LONG): Replace usages with CC_HAS_LONG_LONG.
- * values.c (unpack_double): Collapse code that was unnecessarily
- dependent on CC_HAS_LONG_LONG. Use LONGEST instead of direct types.
- * values.c (value_from_longest): Remove dependency on
- CC_HAS_LONG_LONG and just use LONGEST.
- * solib.c (solib_map_sections): Use bfd_get_filename
- to access filename field.
- * solib.c (clear_solib): Save filename and free it later, after
- bfd_close, since bfd_close may reference it. Use bfd_get_filename
- to access the field.
- * config/convex/xm-convex.h (LONG_LONG): Replace with
- CC_HAS_LONG_LONG. Add define for PRINTF_HAS_LONG_LONG.
- * doc/gdbint.texinfo (LONG_LONG): Replace with CC_HAS_LONG_LONG.
- Add PRINTF_HAS_LONG_LONG references.
-
-Wed Apr 28 06:11:38 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * inflow.c (kill_command), infcmd.c (attach_command),
- remote.c (remote_interrupt_twice): In messages for the user, call it
- "the program" or "the program being debugged" not "the inferior".
-
- * hp300ux-nat.c: Cast second arg to supply_register calls.
- (_initialize_kernel_u_addr, getpagesize): New functions.
- (store_inferior_register_1): Change arg name from value to val.
- (fetch_core_registers): Make arg core_reg_size unsigned.
- Pass 5 args to ptrace.
- * config/m68k/xm-hp300hpux.h: Define FIVE_ARG_PTRACE.
- Remove KERNEL_U_ADDR stuff.
- * infptrace.c [FIVE_ARG_PTRACE]: Pass 5th arg to ptrace.
- * config/m68k/hp300hpux.m{t,h}:
- Move exec.o from NATDEPFILES to TDEPFILES
- * config/m68k/hp300hpux.mt: Mention GAS requirement. Remove
- hp-include stuff. Add m68k-tdep.o to TDEPFILES.
-
-Wed Apr 28 13:27:54 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * ch-exp.y (yylex): Don't STREQ with simplename if it is NULL.
-
-Wed Apr 28 06:11:38 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * config/sparc/xm-sun4os4.h [__STDC__]: Don't use MALLOC_INCOMPATIBLE.
-
-Wed Apr 28 11:39:18 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * doc/gdb.texinfo: make node "Shell Commands" unconditional;
- describe `set demangle-style arm' (not cfront);
- mention can type `q' to discard output, when gdb pages
-
-Wed Apr 28 11:32:39 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * valops.c (search_struct_field): Fix gdb core dump with incomplete
- stabs info.
-
-Wed Apr 28 06:11:38 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * remote.c: Change timeout to 2.
- (remote_open): Use unpush_target not remote_close.
- (remote_resume): If siggnal != 0, give warning not error().
- (remote_wait, remote_interrupt, remote_interrupt_twice):
- If we get two interrupts, let the user get out if they want.
- (remote_{kill,mourn}): New functions.
- i386-stub.c (handle_exception, case 'k'): Don't BREAKPOINT.
-
-Wed Apr 28 09:20:55 1993 Ian Lance Taylor (ian@rtl.cygnus.com)
-
- * config/sparc/sun4sol2.mh (XM_CLIBS): Define to be -lnsl.
-
-Wed Apr 28 06:11:38 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * Remote targets (mourn): Call unpush_target.
-
- * config/sparc/xm-sun4os4.h: Declare free() to return int.
- Remove twisted use of PARAMS.
-
- * config/rs6000/xm-rs6000.h: Don't define MALLOC_INCOMPATIBLE now
- that ansidecl.h assumes ANSI on AIX.
-
-Tue Apr 27 10:01:33 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * README: Move most stuff about hacking GDB to doc/gdbint.texinfo.
- (Known bugs): Remove AIX bugs, revise SPARC struct bug description.
-
-Tue Apr 27 13:44:19 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * expprint.c (print_subexp): Fix bug with OP_SCOPE operator output.
-
-Tue Apr 27 10:01:33 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * remote-vx.c (net_connect): Allow numeric IP address for host.
-
-Mon Apr 26 17:59:38 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * config/sh/sh.mt, config/sh/tm-sh.h, sh-tdep.c: New files.
-
-Mon Apr 26 07:13:32 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * rs6000-tdep.c (branch_dest): Deal with stepping through system call.
-
- * symtab.h, xcoffread.c: Revise linetable sorting comments.
-
-Sun Apr 25 02:32:16 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * valops.c (value_cast): A cast might also change the object
- representation in C++.
- * dbxread.c (end_psymtab): Copy subpst read_symtab function from pst
- to get the proper read_symtab function when called from mipsread.c.
- * mipsread.c (mipscoff_psymtab_to_symtab, psymtab_to_symtab_1):
- Set cur_bfd in psymtab_to_symtab_1 as CURBFD(pst) is invalid
- for dummy psymtabs, inhibit processing of dummy psymtabs.
-
-Sat Apr 24 19:59:54 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * Changes from (or inspired by) AMD:
- * remote-udi.c (udi_attach): Assignments to Space and Offset were
- switched, fix it.
- (udi_wait): Make error message (UDIGetStdout) match error.
- (udi_wait): Handle UDIStdinNeeded.
- * command.c [CANT_FORK]: Use system().
- * utils.c (prompt_for_continue): Allow quit with 'q'.
-
- * solib.c (solib_add): Don't call special_symbol_handling if there
- were errors in symbol_add_stub. Also set so->from_tty before
- calling symbol_add_stub.
-
-Fri Apr 23 16:17:00 1993 Stu Grossman (grossman@cygnus.com)
-
- * Merge in HPPA/BSD patches from Utah:
- * defs.h: Add const to 2nd arg of psignal prototype.
- * hppah-tdep.c: Renamed to hppa-tdep.c 'cuz it's common code with
- BSD now.
- * hppab-core.c: Deleted. No longer useful.
- * hppab-nat.c: #include more files. Use PT_WUREGS, not
- PT_WRITE_U.
- * hppab-tdep.c: Deleted. Supplanted by hppa-tdep.c.
- * config/pa/hppabsd.mh (NATDEPFILES): Remove hppab-core.o.
- * config/pa/hppabsd.mt (TDEPFILES): hppab-tdep.o => hppa-tdep.o
- * config/pa/hppahpux.mt (TDEPFILES): hppab-tdep.o => hppa-tdep.o
- * config/pa/xm-hppab.h: #define SET_STACK_LIMIT_HUGE.
-
-Fri Apr 23 10:34:02 1993 Stu Grossman (grossman@cygnus.com)
-
- * Fix two bugs found by deja-gnu. One is the incorrect reporting
- of the PC being in a stack dummy when looking at a core file
- without symbols. The other is the incorrect passing of char
- arguments during expression evaluation (ie: p foo('a','b') would
- mess up the passing of it's args because it wasn't coercing the
- char's to ints).
- * hppah-tdep.c: Rename global functions to have consistent hppa_
- prefix. Make more functions static. Drop hp_ prefix from static
- functions. (hppa_push_arguments): Call value_arg_coerce to cast
- char to int args if necessary. (hppa_fix_call_dummy): Create
- this routine from FIX_CALL_DUMMY macro in tm-hppa.h.
- * inferior.h (PC_IN_CALL_DUMMY): Check for frame_address being
- valid (ie: != 0) before doing comparison against PC.
- * valops.c (call_function_by_hand): Adjust call to FIX_CALL_DUMMY
- to reflect new arguments.
- * config/pa/tm-hppa.h (POP_FRAME, PUSH_ARGUMENTS): Use new hppa_
- prefix for func name. (FIX_CALL_DUMMY): Move code into
- hppah-tdep.c.
-
- * testsuite/gdb.t16/gdbme.c, testsuite/gdb.t17/gdbme.c: Add calls
- to malloc() so that we can test GDB eval of dynamically created
- arrays (like char strings in `print "foo"').
-
-Fri Apr 23 01:28:14 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * printcmd.c (print_address_symbolic): Search symtabs as well as the
- minimal symbols for a nearby symbol.
-
-Thu Apr 22 19:44:21 1993 John Gilmore (gnu@cacophony.cygnus.com)
-
- * coffread.c: Comment changes around minimal symbol recording.
-
-Thu Apr 22 16:24:36 1993 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * command.c: comment changes only.
-
- * mips-tdep.c (heuristic_fence_post): new static variable.
- (heuristic_proc_start): use heuristic_fence_post, print better
- warnings, but only if not stop_soon_quietly.
- (_initialize_mips_tdep): add_set_cmd for heuristic-fence-post.
-
-Thu Apr 22 14:50:05 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * symtab.h: Fix LOC_REF_ARG comment.
-
-Wed Apr 22 20:21:30 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
- and Jim Kingdon (kingdon@cygnus.com)
-
- * stabsread.c (define_symbol): Combine a 'p', 'r' arg pair to a
- LOC_REGPARM symbol.
- * config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Revise comments.
- symfile.c (compare_symbols): Don't check first character; STRCMP
- does that.
-
- * stabsread.c (define_symbol): Generate a LOC_REGPARM_ADDR for
- structures that are passed by address in a register.
- * symtab.h (enum address_class): Add LOC_REGPARM_ADDR.
- * findvar.c (read_var_value),
- printcmd.c (address_info, print_frame_args),
- stack.c (print_frame_arg_vars), symmisc.c (print_{,partial_}symbol),
- * symtab.c (lookup_block_symbol): Deal with it.
-
-Thu Apr 22 09:07:24 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * objfiles.h (obj_section), objfiles.c (build_objfile_section_table):
- Add objfile field.
- * objfiles.c (find_pc_section): Return a struct obj_section *.
- * sparc-tdep.c (in_solib_trampoline): Deal with find_pc_section return.
- * symfile.c (syms_from_objfile) [IBM6000_TARGET]:
- Don't use obj_section hack.
- * xcoffexec (vmap_symtab): Relocate obj_sections.
- * printcmd.c (containing_function_bounds): Use find_pc_section.
-
- * symtab.h: Clean up SYMBOL_VALUE comments.
-
-Wed Apr 21 14:29:57 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * stack.c (print_frame_arg_vars), printcmd.c (print_frame_args):
- Expand comments about LOC_ARG/LOC_LOCAL pairs.
-
- * coffread.c (read_coff_symtab): Use rewind before fseek.
-
-Wed Apr 21 14:24:19 1993 Per Bothner (bothner@cygnus.com)
-
- * ch-exp.y: Removed unused structure_primitive_value and FIXME_23.
- * Makefile.in: Add $(YFLAGS) when using $(YACC).
- * Makefile.in: Remove message to expect conflicts and unused
- rules in ch-exp.y, since there no longer are any such.
-
-Wed Apr 21 13:27:50 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * stabs.texinfo: fixed bad xrefs (un-initialized statics)
-
-Tue Apr 20 08:55:11 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffexec.c (xcoff_relocate_core): If no exec file, error()
- rather than dumping core.
-
- * Makefile.in: Add ${srcdir}/ to all source files.
- (alldeps.mak): Add "${srcdir}/" to files when generating alldeps.mak.
- (TAGS): Deal with srcdir and new config directory scheme.
- createtags: Remove.
- Makefile.in (NONSRC): Remove createtags.
- alldeps.mak: Updated.
-
- * rs6000-tdep.c: Delete unused function print_frame.
-
- * frame.h (struct frame_info): Doc fix for next_frame.
- New field signal_handler_caller.
- blockframe.c (create_new_frame, get_prev_frame_info),
- config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO): Set it (needs
- INIT_FRAME_PC_FIRST).
- stack.c (print_frame_info), rs6000-tdep.c (rs6000_frame_chain):
- Check it.
-
-Mon Apr 19 22:52:33 1993 Stu Grossman (grossman@cygnus.com)
-
- * irix4-nat.c (fetch_core_registers): Special version of this for
- Irix 4.x, which stores regs a bit differently from other /proc
- based systems.
- * procfs.c, core-svr4.c: Move fetch_core_registers from procfs.c
- to new file core-svr4.c.
- * config/i386/i386sol2.mh, config/i386/i386v4.mh, config/m68k/amix.mh,
- config/i386/ncr3000.mh, config/sparc/sun4sol2.mh: Add core-svr4.o
- to NATDEPFILES.
- * config/mips/irix4.mh: Add corelow.o to NATDEPFILES.
-
-Mon Apr 19 11:13:34 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * i387-tdep.c: Remove unused #includes.
-
- * configure.in: Match i[34]86-*-sysv3.2 not i[34]86-*-sysv32.
-
- * config/i386/nm-i386v.h: Define NO_PTRACE_H.
-
-Sun Apr 18 10:39:35 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffread.c: Nuke NO_DEFINE_SYMBOL code. There is no going back.
-
- * stabsread.c (define_symbol): 'R' is synonym for 'P', not 'r'.
- xcoffread.c (process_xcoff_symbol, case C_RPSYM):
- Don't muck with SYMBOL_CLASS.
-
-Fri Apr 16 17:38:33 1993 Stu Grossman (grossman@cygnus.com)
-
- * munch: Don't use head command. It doesn't exist everywhere.
-
-Fri Apr 16 15:07:57 1993 Fred Fish (fnf@cygnus.com)
-
- * inflow.c (new_tty): Remove spurious 'o' character at end
- of #endif line.
-
-Fri Apr 16 12:27:11 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mips-tdep.c (mips_skip_prologue): Always skip the typical prologue
- instructions and nothing more.
- * mipsread.c (add_line): Add comment why we have to combine line number
- entries for the same line number.
-
-Fri Apr 16 09:42:03 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * symtab.{c,h}: Doc fixes (remove symseg references, last relevant
- in gdb 2.8!).
-
-Thu Apr 15 21:16:58 1993 Fred Fish (fnf@cygnus.com)
-
- * depend, alldeps.mak: Update, now that gcc -MM bug is fixed.
-
-Thu Apr 15 12:38:39 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * source.c (select_source_symtab): Clean up comment. Also, if
- we have a current_source_symtab, and s is NULL, return without
- doing anything.
- xcoffread.c (xcoff_symfile_read): Don't call select_source_symtab.
- breakpoint.c (breakpoint_re_set): Don't call select_source_symtab.
-
-Thu Apr 15 02:37:48 1993 John Gilmore (gnu@cacophony.cygnus.com)
-
- * dbxread.c (unknown_symchar_complaint): Add new complaint.
- * stabsread.h: Declare it.
- * partial-stab.h: Use it.
-
- * utils.c (malloc_botch): Don't forward-declare if NO_MMALLOC.
-
-Wed Apr 14 17:12:51 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * stack.c (print_frame_info): Print specially if dummy frame.
-
- * breakpoint.c: Add comments regarding within_scope future direction.
-
- * Version 4.8.3.
-
- * xcoffread.c (record_include_{begin,end}): Change fatal to complain.
-
-Wed Apr 14 14:03:18 1993 Per Bothner (bothner@cygnus.com)
-
- * ch-exp.y: Fix thinko that broke parsing of FALSE.
-
-Wed Apr 14 12:49:29 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * stabsread.c (read_member_functions): Initialize domain for stubbed
- member functions to avoid gdb core dumps when printing pointers
- to member functions.
- * cp-valprint.c (cp_print_class_method): Check for stubbed member
- functions.
-
-Tue Apr 13 08:28:26 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * expprint.c (print_subexp): If opcode not found in op_print_tab,
- stop with an error().
- eval.c (evaluate_subexp): Change error message.
-
- * objfiles.c (build_objfile_section_table): Cast return value
- from obstack_finish.
-
-Mon Apr 12 10:53:50 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * config/rs6000/tm-rs6000.h, rs6000-tdep.c: Move FRAME_CHAIN
- to rs6000_frame_chain and deal with it if we're in a signal handler.
- (FRAME_SAVED_PC): Use rs6000_frame_chain.
-
- * breakpoint.c (within_scope): New function.
- (enable_breakpoint, watchpoint_check): Use it.
-
- * source.c (openp): Handle "exec-file ./ls" correctly.
-
- * breakpoint.c (breakpoint_1): Use wrap_here before "at".
-
-Sat Apr 10 01:32:43 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * ch-exp.y: Clean up lexing of identifiers and
- reserved words. (E.g. don't recognize FALSEXXX as the
- keyword FALSE followed by the identifier XXX.)
- Also, convert identifiers to lower case.
-
-Fri Apr 9 15:53:19 1993 Stu Grossman (grossman@cygnus.com)
-
- * remote-mips.c, remote-monitor.c, remote-st2000.c: Convert to
- new serial interface.
-
-Fri Apr 9 15:01:12 1993 Stu Grossman (grossman@cygnus.com)
-
- * remote.c (remote_open): Use SERIAL_OPEN instead of serial_open.
- (putpkt, getpkt): Use new return codes for SERIAL_READCHAR.
- * ser-go32.c: Return -1 on most failures, 0 on most successes,
- and use new return codes for go32_readchar().
- * ser-unix.c: Ditto. Also, move error handling up to caller for
- SERIAL_SETBAUDRATE().
- * serial.c (serial_open): Internal call, not SERIAL_OPEN to get
- to specific routine.
- (serial_close): New routine to wrap around device close routine.
- serial.h: Clean & document return values more clearly.
-
-Fri Apr 9 10:20:55 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * rs6000-pinsn.c (print_operand): Deal with no operand instructions.
-
- * rs6000-pinsn.c (print_operand, case LI): Print condition register
- operand in decimal rather than wrong textual versions.
-
- * printcmd.c (_initialize_printcmd): Clean up docstring for "x"
- (mention 't', remove false thing about 'g' only good with 'f').
-
- * breakpoint.h: move "struct breakpoint" and friends to top of
- file so that bpstat_find_breakpoint prototype works.
-
- * solib.c (struct so_list): Add bfd field.
- (solib_map_sections): Leave bfd open and scratch_pathname allocated.
- Put the bfd in bfd field of the so_list.
- (clear_solib): Free bfd name and close_bfd on the bfd.
-
-Fri Apr 9 00:45:41 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * valarith.c (value_subscript): Add COERCE_REF.
- * ch-exp.y (operand_5): We can generalize the 2nd operand
- of a string repetition ot 'literal' without ambiguity.
-
-Thu Apr 8 10:15:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.h (struct bpstat): Remove momentary field.
- Remove bpstat_momentary_breakpoint. This was always kludgy
- and is no longer used.
-
- * breakpoint.h: Add enum bpstat_what.
- breakpoint.h (struct bpstat), breakpoint.c (bpstat_stop_status):
- stop and print fields of bpstat now per-breakpoint, not just
- one for the whole chain.
- breakpoint.{c,h} (bpstat_what): New function.
- breakpoint.h: Remove bpstat_stop and bpstat_should_print.
- infrun.c: Replace switch (stop_bpstat->breakpoint_at->type)
- with call to bpstat_what.
- README: Remove watchpoint/breakpoint bug from known bugs.
-
- * breakpoint.h: Prototype bpstat_find_breakpoint.
-
-Thu Apr 8 16:01:21 1993 Fred Fish (fnf@cygnus.com)
-
- * symtab.c (find_methods, gdb_mangle_name): Note that functions
- are g++ specific.
- * symtab.h (VTBL_FNADDR_OFFSET, OPNAME_PREFIX_P, VTBL_PREFIX_P,
- DESTRUCTOR_PREFIX_P): Note that macros are g++ specific.
-
-Thu Apr 8 12:45:32 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * i960-pinsn.c (tabent): Copied struct definition from
- opcodes/i960-dis.c.
-
-Thu Apr 8 10:34:37 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symtab.h (DESTRUCTOR_PREFIX_P): New macro to check if physname
- is a C++ destructor.
- * symtab.c (gdb_mangle_name): Use it.
- * symtab.c (find_methods): Do not add destructors to choice list
- for constructors.
- * symtab.c (decode_line_1): Make breakpoints on destructors work
- for gcc-2.x again.
-
-Wed Apr 7 18:43:09 1993 Stu Grossman (grossman@cygnus.com)
-
- * ser-go32.c: Make it use serial port name.
- * go32-xdep.c: Put in def for strlwr, needed by dir.o in go32 libc.
-
- * infcmd.c (read_pc): Make sure that we read PC_REGNUM when not
- in a system call!
-
-Wed Apr 7 15:52:11 1993 Stu Grossman (grossman@cygnus.com)
-
- * configure.in: Only configure sparclite subdir when target_cpu
- is sparclite.
-
-Wed Apr 7 10:11:22 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffread.c (struct coff_symbol): Change c_sclass to unsigned char.
- Remove FIXME comment regarding this.
-
- * symfile.h: Change NULL->'\0' in comment (that wasn't a typo).
-
- * xcoffread.c (read_xcoff_symtab): Use E_SYMNMLEN.
-
-Tue Apr 6 22:30:58 1993 K. Richard Pixley (rich@cygnus.com)
-
- Add section table to objfile struct. Use it for find_pc_section.
- * objfiles.c (add_to_objfile_sections,
- build_objfile_section_table, find_pc_section): new functions.
- (allocate_objfile): build section table.
- * objfiles.h (struct obj_section): new structure.
- (struct objfile): add section table.
- (find_pc_section): new prototype.
- * solib.[ch] (find_pc_section_from_so_list): removed.
- * sparc-tdep.c: include objfiles.h for find_pc_section. include
- symfile.h for objfiles.h.
- (in_solib_trampoline): adjusted for new find_pc_section
- prototype. Removed BAD_RICH_HACK ifdefs.
- * symfile.c (syms_from_objfile): offset objfile sections.
- (find_pc_section): removed. Also removed BAD_RICH_HACK ifdefs.
- * symfile.h (find_pc_section): prototype removed. Also fixed
- comment typo NUL -> NULL.
- * target.[ch] (find_pc_section_from_targets): removed.
- * config/sparc/tm-sun4sol2.h (BAD_RICHH_HACK): removed.
-
-Tue Apr 6 21:41:13 1993 Stu Grossman (grossman@cygnus.com)
-
- * ser-go32.c: Format. (go32_open): Use proper return value.
-
- * configure.in: Undo conditional configdirs hack for sparclite.
-
-Tue Apr 6 17:07:37 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
-
- * symtab.c (list_symbols): When call break_command, pass both
- filename and function name not just function name.
-
-Tue Apr 6 15:00:09 1993 Fred Fish (fnf@cygnus.com)
-
- (Changes and new files to make "none" a full fledged configuration)
- * config/none/{nm-none.h, tm-none.h, xm-none.h}: New files.
- Currently only tm-none.h has any meaningful contents.
- * config/none/none.mh (NAT_FILE): Use nm-none.h
- * config/none/none.mh (XM_FILE): Use xm-none.h
- * config/none/none.mt (TM_FILE): Use tm-none.h
- * Makefile.in (depend): Remove comment about parse errors in
- valops.c, it now parses correctly and generates a correct depend
- line. Remove line that touches xm.h, tm.h, and nm.h; they are
- now linked to config/none/{xm-none.h, tm-none.h, nm-none.h}.
-
-Tue Apr 6 09:54:29 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * values.c (USE_STRUCT_RETURN): Only use gcc wierdness for gcc1.
-
- * xcoffread.c (read_xcoff_symtab): Deal correctly with symbols of
- exactly 8 characters.
-
-Tue Apr 6 10:31:26 1993 Stu Grossman (grossman@cygnus.com)
-
- * configure.in: Sparclite uses sparc config dir. Also has it's
- own tm- & .mt files now. Also add sparclite to configdirs.
- * go32-xdep.c: Dummy routines for sigsetmask & strlwr.
- * config/i386/go32.mh: Nullify def of TERMCAP.
- * config/i386/xm-go32.h: Get rid of redef of EIO.
- * config/sparc/{sparclite.mh tm-sparclite.h}: New sparclite
- specific configs. Very similar to sun4os4, but without solib.
- * sparclite/{Makefile.in configure.in}: First cut at making this
- dir configgable.
-
-Tue Apr 6 03:10:44 1993 Stu Grossman (grossman@cygnus.com)
-
- * ser-go32.c: First cut at adapting to new serial interface.
-
-Mon Apr 5 22:29:43 1993 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in (SFILES OBS): Add serial.[co] & ser-hardwire.[co].
- These implement a new serial line interface for talking to remote
- targets.
- * configure.in: Link ser-hardwire.c to ser-unix.c for all hosts,
- EXCEPT go32, which gets ser-go32.c.
- * remote.c: Use new serial interface. More remote-xxx's to be
- converted later.
- * ser-bsd.c, ser-termios.c: Removed.
- * serial.c: New. Implements common operations for all serial
- types.
- * ser-unix.c: New. Unix specific serial operations for various
- flavors of Unix (Posix, SysV, BSD).
- * serial.h: Generic serial interface defs.
- * config/i386/go32.mh, config/i386/i386bsd.h,
- config/m68k/apollo68b.mh, config/sparc/sun4os4.mh: Remove
- ser-bsd.o from XDEPFILES. All the magic is now handled in
- configure.in.
-
-Mon Apr 5 20:48:54 1993 Stu Grossman (grossman@cygnus.com)
-
- * config/h8500/tm-h8500.h: Clean up brain damage found by GCC.
-
-Fri Apr 2 08:23:14 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffread.c (xcoff_symfile_offsets): Use 0 not addr for offsets.
-
- * rs6000-tdep.c (frameless_function_invocation): Don't even think
- about framelessness except on the innermost frame.
-
- * xcoffexec.c: Call fatal() not abort().
-
- * stabsread.c (patch_block_stabs): If stab & no symbol, make
- a LOC_OPTIMIZED_OUT symbol.
- symtab.h (enum address_class): Add LOC_OPTIMIZED_OUT.
- findvar.c (read_var_value), printcmd.c (address_info),
- symmisc.c (print_{,partial_}symbol), c-exp.y (variable),
- m2-exp.y (yylex): Deal with it.
- ch-exp.y (yylex): Deal with it.
-
-Thu Apr 1 18:43:02 1993 Stu Grossman (grossman@cygnus.com)
-
- * findvar.c (value_from_register): H8500 specific, check to see
- if we are looking at short pointer. If so, skip crock.
- * h8500-tdep.c (h8500_frame_chain): Mask down value from
- read_memory_integer() to avoid getting messed up by sign extension.
-
-Thu Apr 1 16:44:41 1993 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * sparc-tdep.c (in_solib_trampoline), symfile.c (find_pc_section):
- ifdef protect using BAD_RICH_HACK. This should be removed soon.
- * config/sparc/tm-sun4sol2.h (BAD_RICH_HACK): define.
-
-Thu Apr 1 09:01:38 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * i960-pinsn.c, a29k-pinsn.c: Much abridged, just use libopcodes.a.
-
- * core.c (dis_asm_print_address): New function.
-
- * core.c (dis_asm_read_memory): Reinstate 4th arg. The prototype
- has been fixed.
-
-Thu Apr 1 09:34:43 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * breakpoint.c (bpstat_print, bpstat_stop_status): Change to walk the
- entire breakpoint chain and print only the first entry that needs to
- be printed and needs to be stopped for. Fixes problems with printing
- of multiple breakpoints with different conditions.
- * breakpoint.c (print_it_done): Renamed from print_it_noop as it
- effectively stops printing of the breakpoint chain.
- * breakpoint.c (print_it_noop): New routine to print nothing
- for this breakpoint entry and dont stop printing.
- * breakpoint.c (breakpoint_re_set_one): mention the reevaluated
- watchpoint only if it is enabled.
- * mipsread.c (parse_procedure): Correct incorrect setjmp procedure
- descriptor from the library to make backtraces through setjmp work.
- * mipsread.c (fixup_sigtramp): Correct pcreg and fregoffset for
- sigtramp.
- * mips-tdep.c (read_next_frame_reg): Provide correct values for
- all registers saved within sigtramp, cleanup.
-
-Wed Mar 31 12:52:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * sparc-pinsn.c: Much abridged, just calls version in libopcodes.a.
-
-Wed Mar 31 21:23:41 1993 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * core.c (dis_asm_read_memory): drop fourth arg which conflicts
- with prototype in ../include/dis-asm.h.
-
-Wed Mar 31 12:52:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * core.c (dis_asm_{read_memory,memory_error}): New functions.
- m68k-pinsn.c, h8500-tdep.c, i386-pinsn.c, mips-pinsn.c, z8k-tdep.c:
- Use read_memory_func interface to disassembler.
-
-Tue Mar 30 15:46:14 1993 K. Richard Pixley (rich@rtl.cygnus.com)
-
- Teach sparc solaris to next over shared library functions.
- * solib.[hc] (find_pc_section_from_so_list): new function and
- prototype.
- * sparc-tdep.c (in_solib_trampoline): new function.
- * symfile.[hc] (find_pc_section): new function and prototypes.
- * target.[hc] (find_pc_section_from_targets): new function and
- prototypes.
- * config/sparc/tm-sun4sol2.h (IN_SOLIB_TRAMPOLINE): redefine to
- in_solib_trampoline.
-
-Tue Mar 30 08:06:24 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * infrun.c (wait_for_inferior): Revise comment.
-
- * command.c (do_setshow_command): Use %u with var_{u,z}integer.
-
- * command.{c,h}: New var_type var_integer.
- main.c: Use it for history_size.
-
- * rs6000-tdep.c, xcoffexec.c, config/rs6000/xm-rs6000.h, breakpoint.c:
- Lint and byte-order fixups.
-
- * breakpoint.c (print_it_normal): Return 0 after hitting watchpoint.
-
- * breakpoint.h (bpstat): New field print_it.
- breakpoint.c (bpstat_print): Use it.
- (print_it_normal): New function (from old bpstat_print code).
- (bpstat_{alloc,stop_status}): Set print_it field.
-
- * breakpoint.c (bpstat_stop_status): Use catch_errors when
- evaluating watchpoint condition, via new function watchpoint_check.
- Also stop if watchpoint disabled due to leaving its block.
-
- * findvar.c [REG_STRUCT_HAS_ADDR]: Add comment.
-
-Tue Mar 30 00:14:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mips-pinsn.c: Add missing include of dis-asm.h.
-
-Mon Mar 29 15:03:25 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (clean, distclean, realclean): Recursively apply
- to subdirs first, rather than last. This avoids, for example,
- Makefile being removed in a parent directory before the recursive
- make is run.
-
- * alldeps.mak, depend: Update for below changes.
-
- * config/m68k/tm-m68k.h: Renamed from config/m68k/tm-68k.h.
- * m68k/{tm-3b1.h, tm-altos.h, tm-amix.h, tm-es1800.h,
- tm-hp300bsd.h, tm-hp300hpux.h, tm-isi.h, tm-news.h, tm-os68k.h,
- tm-st2000.h, tm-sun2.h, tm-sun3.h, tm-vx68.h}: Include tm-m68k.h
- instead of tm-68k.h.
- * Makefile.in (HFILES): tm-68k.h renamed to tm-m68k.h.
- * README, a29k-pinsn.c, m68k-pinsn.c, m68k-stub.c, remote-vx.c,
- m68k/{altos.mh, altos.mt, apollo68b.mh, nm-apollo68b.h,
- nm-hp300bsd.h, config/m68k/xm-apollo68b.h}: Map '68k' to 'm68k'.
- * a29k/tm-a29k.h, doc/gdbint.texinfo: Account for renaming of
- tm-68k.h to tm-m68k.h.
- * m68k/m68k-fp.mt (TM_FILE): tm-68k-fp.h renamed to tm-m68k-fp.h.
- * m68k/m68k-nofp.mt (TM_FILE): tm-68k-nofp.h renamed to
- tm-m68k-nofp.h.
-
- * config/a29k/tm-a29k.h: Renamed from config/a29k/tm-29k.h.
- * a29k-pinsn.c: Renamed from am29k-pinsn.c.
- * a29k-tdep.c: Renamed from am29k-tdep.c.
- * remote-eb.c, config/a29k/tm-ultra3.h: Include renamed tm-a29k.h.
- * remote-monitor.c, remote-st2000.c, config/a29k/{nm-ultra3.h,
- tm-a29k.h, xm-ultra3.h}, config/romp/rtbsd.mh, doc/gdbinv-s.texi,
- testsuite/gdb.t15/funcargs.exp, testsuite/gdb.t17/callfuncs.exp:
- Map '29k' to 'a29k'.
- * config/a29k/{a29k-kern.mt, a29k-udi.mt, a29k.mt, ultra3.mt}
- (TDEPFILES): Use renamed a29k-pinsn.o and a29k-tdep.o.
- * config/a29k/{a29k-udi.mt, a29k.mt} (TM_FILE): Use renamed
- tm-a29k.h.
- * config/a29k/a29k-udi.mt (MT_CFLAGS): Remove TARGET_AM29K
- define that does not appear anywhere else in the gdb source tree.
- * doc/gdbinit.texinfo: Document renaming of tm-29k.h to tm-a29k.h.
-
-Mon Mar 29 13:55:29 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * breakpoint.c: Add comments regarding breakpoint_re_set.
-
- * xcoffread.c (sort_syms, compare_symbols): Remove.
- (xcoff_symfile_read): Use sort_all_symtab_syms from symfile.c
- not our own sort_syms (it is identical).
-
- * xcoffread.c: Nuke NAMES_HAVE_DOT define (not used).
-
-Sun Mar 28 11:24:37 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * breakpoint.c (breakpoint_re_set_one): Fix storage leak.
- * breakpoint.c (enable_breakpoint): Don't enable watchpoint if it
- went out of scope.
- * exec.c (exec_close): Fix storage leak.
- * exec.c (exec_file_command): Make sure that bfd doesn't realign the
- output sections when patching an executable.
- * mips-nat.c (store_inferior_registers): Use REGISTER_PTRACE_ADDR
- when writing all registers.
- * mips-tdep.c (mips_push_dummy_frame): Save floating point registers
- at the right offset in the dummy frame.
- * mipsread.c (psymtab_to_symtab_1): Do not complain for stProc,
- stStaticProc and stEnd symbols as they are generated by gcc-2.x.
- * mipsread.c (mipscoff_new_init): Initialize stabsread and buildsym.
-
-Fri Mar 26 15:25:05 1993 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in (TARFILES): Avoid trailing backslash.
-
-Fri Mar 26 11:29:30 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * breakpoint.{c,h}: Add exp_string to struct breakpoint and use
- it in breakpoint_re_set.
- * breakpoint.c (watch_command, enable_breakpoint): Fetch lazy values.
-
- * rs6000-tdep.c (single_step): Misc cleanups (CORE_ADDR not int,
- don't use sizeof(int) for target stuff, etc).
-
-Thu Mar 25 15:03:53 1993 Fred Fish (fnf@cygnus.com)
-
- * alldeps.mak, configure.in, i860-break.h, i860-opcode.h,
- i860-pinsn.c, i860-tdep.c, config/i860/*: Remove incomplete i860
- support that can't be integrated anyway due to lack of clear
- authorship.
-
-Thu Mar 25 12:26:50 1993 Stu Grossman (grossman@cygnus.com)
-
- * findvar.c (read_register, write_register): Make these capable
- of reading/writing registers that are shorter than REGISTER_TYPE.
- * (value_from_register): Install H8500 specific code to return
- proper value when register is being used as a pointer.
- * h8500-tdep.c: Remove extra defines of NUM_REGS.
- (h8500_skip_prologue): Use correct lengths for LINK instructions.
- (FRAME_CHAIN): Change name to h8500_frame_chain. Rewrite code to
- chain frames properly by combining frame pointer with T reg.
- (init_extra_frame_info): Delete. It's now a macro.
- (frame_args_address): Don't add PTR_SIZE. Stack args are already
- offset by the correct amount off of the frame pointer.
- (register_byte): Delete. It's now a macro.
- (register_raw_size, register_virtual_size): Delete. Replaced by
- common routine h8500_register_size, cuz there's no difference
- between the raw & virtual sizes on this machine.
- (register_convert_to_raw, register_convert_to_virtual): Delete,
- cuz there's no difference between the raw & virtual forms.
- Replaced by memcpy in tm file.
- (register_virtual_type): Rename to h8500_register_virtual_type.
- Get rid of pointer pseudo-regs, use _REGNUM with all reg names.
- (_initialize_h8500_tdep): Get rid of crock to ensure that GDB &
- emulator have same reg offsets. This is all handled in the
- simulator code now.
- (h8500_trapped_internalvar): New routine to detect references to
- convenience vars acting as pointer pseudo-regs.
- (h8500_value_trapped_internalvar): Conjure up value of pointer
- pseudo-regs.
- (h8500_set_trapped_internalvar): Convert set value in real
- register references.
- infcmd.c (read_pc, write_pc): Add h8500 specific code to handle
- code segment register.
- infrun.c (proceed): Simplify. Call write_pc instead of doing it
- by hand.
- (wait_for_inferior): Add h8500 specific code to add stack segment
- when reading SP register.
- remote-sim.c (fetch_register): Spacing.
- tm-h8500.h: #define GDB_TARGET_IS_H8500 to make it easier to
- detect cruft. Redo all register manipulation stuff. Get rid of
- pointer pseudo-regs. (INIT_EXTRA_FRAME_INFO): Adds stack segment
- to frame pointer. (IS_TRAPPED_INTERNALVAL,
- VALUE_OF_TRAPPED_INTERNALVAR, SET_TRAPPED_INTERNALVAR): Use these
- to create internal vars for pointer pseudo-regs.
-
-Thu Mar 25 10:10:28 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in: Numerous small changes to macro definitions
- and rules for building gdb distribution tree. Many macros
- eliminated or merged, and rules simplified.
- * alldeps.mak: Update.
- * depend: Update.
-
-Wed Mar 24 13:52:29 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com)
-
- * Makefile.in: recurse through SUBDIRS for dvi target too
-
-Wed Mar 24 08:48:30 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * Clean up xcoff relocation.
- objfiles.h (struct objfiles): Add section_offsets, num_sections.
- symfile.c (syms_from_objfile), xcoffread.c (xcoff_symfile_offsets):
- Set them.
- symtab.h (struct general_symbol_info): Add section field.
- minsyms.c (prim_record_minimal_symbol{,_and_info}): Set it.
- xcoffread.c: Set section for symbols and msymbols.
- (struct symtab): Add block_line_section field.
- buildsym.c (end_symtab): Set it.
- (end_symtab and callers): Add section parameter.
- objfiles.c (objfile_relocate): New funciton.
- xcoffexec.c (vmap_symtab): Use it.
- xcoffsolib.h (struct vmap): Remove unused fields.
- config/rs6000/tm-rs6000.h, stack.c, xcoffexec.c: Remove
- CORE_NEEDS_RELOCATION, symtab_relocated.
- config/rs6000/tm-rs6000.h: Remove use of loadinfotext.
- rs6000-tdep.c: Make loadinfotext static.
- breakpoint.c (fixup_breakpoints): Doc fix.
- symtab.h (struct symtab), config/rs6000/tm-rs6000.h, buildsym.c
- (end_symtab): primary field replaces nonreloc.
-
-Tue Mar 23 00:10:53 1993 John Gilmore (gnu@cygnus.com)
-
- * symtab.h (struct linetable_entry): Remove confusing comment.
-
-Tue Mar 23 00:01:23 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: add installcheck target
-
-Mon Mar 22 16:17:58 1993 Fred Fish (fnf@cygnus.com)
-
- * config/{a29k, arm, convex, gould, h8300, i386, i860, i960, m68k,
- m88k, mips, none, ns32k, pa, pyr, romp, rs6000, sparc, tahoe, vax,
- z8k}: New directories to hold cpu specific configuration files.
- Naming follows gcc convention.
- * config/{*.mt, *.mh}: All target and host makefile fragment
- config files moved to an appropriate config/<cpu> subdirectory.
- * nm-*, xm-*, tm-*: All native, host, and target files, which
- get linked to nm.h, xm.h, and tm.h respectively by configure,
- moved to appropriate config/<cpu> subdirectory.
- * nm-sysv4.h, xm-sysv4.h, tm-sysv4.h, tm-sunos.h, nm-trash.h:
- Native, host, and target files that are common across more than
- one cpu architecture and included by one of the configured
- native, host, or target files, get moved to config directory.
- * Makefile.in (INCLUDE_CFLAGS): Add -I${srcdir}/config to
- pick up native, host, or target include files moved to one of
- the config subdirectories, and that are included by other files.
- * Makefile.in (alldeps.mak): Modify to account for new config
- directory structure.
- * alldeps.mak, depend: Update for new config directory structure.
- * config/*/[ntx]m-*.h: Modify all files that include other
- [ntx]m-*.h files to use path relative to gdb/config. I.E.
- "a29k/tm-ultra3.h" includes "a29k/tm-29k.h" rather than just
- "tm-29k.h".
- * remote-eb.c (tm-29k.h): Include a29k/tm-29k.h.
- * mipsread.c (tm-mips.h): Include mips/tm-mips.h.
- * i860-pinsn.c (tm-i860.h): Include i860/tm-i860.h.
- * configure.in: Default gdb_host_cpu to host_cpu, and remap
- the ones where the default is not unique or different than the
- config subdirectory name. Similarly, handle gdb_target_cpu.
- Modify configure.in as appropriate to make use of gdb_host_cpu
- and gdb_target_cpu to find makefile fragments and make links.
-
-Mon Mar 22 12:36:24 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mipsread.c (compare_blocks): Sort blocks with the same start
- address by decreasing ending address.
-
-Mon Mar 22 20:36:04 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c (parse_procedure): Save cur_fdr accross call to
- lookup_symbol as it might get clobbered by the call.
-
- * mipsread.c (parse_partial_symbols): Use ADD_PSYMBOL_ADDR_TO_LIST.
- The previous code did not initialize the language field for the psymtab
- entry.
-
-Sat Mar 20 00:33:39 1993 John Gilmore (gnu@cygnus.com)
-
- * c-exp.y (parse_number): Avoid shift warning.
- * serial.h (struct ttystate): Declare empty one on DOS.
-
-Fri Mar 19 12:59:50 1993 Stu Grossman (grossman@cygnus.com)
-
- * xm-sun4os4.h: Return type of free() should be void, not int.
-
- * vx-share/vxWorks.h: Remove #def of NULL.
-
-Fri Mar 19 11:28:18 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * tm-rs6000.h: Nuke no-op STAB_REG_TO_REGNUM.
-
-Fri Mar 19 07:40:09 1993 Steve Chamberlain (sac@cygnus.com)
-
- * z8k-tdep.c (print_insn): Include the new dis-asm header file.
-
-Thu Mar 18 14:26:57 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * ieee-float.c: Moved to ../libiberty.
- * ieee-float.h: Moved to ../include.
- * Makefile.in: Update accordingly.
- * i386-pinsn.c (print_insn), m68k-pinsn.c (print_insn):
- Convert to stubs that call disassemblers in ../opcodes/*-dis.c.
- * m68k-tdep.c: Removed definition of ext_format ext_format_68881;
- it is now in ../opcodes/m68881-ext.c.
- * mips-tdep.c (mips_skip_prologue): Try to skip more of the
- prologue (some callers _do_ care).
- * mips-pinsn.c (print_insn), z8k-tdep.c (print_insn): Convert to
- new interface of ../opcodes/*-dis.c.
- * ch-exp.y: Add #include <ctype.h>.
-
-Thu Mar 18 11:57:49 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffexec.c (exec_close): Don't close exec_bfd twice.
-
- * xcoffread.c (enter_line_range): endaddr is exclusive, not inclusive.
-
-Wed Mar 17 09:46:31 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffread.c (arrange_linetable): Use x{m,re}alloc not {m,re}alloc.
-
-Wed Mar 17 11:28:11 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * z8k-tdep.c (extract_return_value, write_return_value,
- store_struct_return): New functions from macros in tm-z8k.h.
-
-Wed Mar 17 11:23:06 1993 Fred Fish (fnf@cygnus.com)
-
- * valops.c (value_arg_coerce): Apply temporary patch to
- fix problem with coercion of array and function types when
- passed as arguments to C functions, pending a more complete
- review of when and how coercion should be done, depending
- upon context and language.
-
-Wed Mar 17 09:46:31 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffread.c (MIN_TBTABSIZ): Change to 12.
-
- * xcoffread.c (xcoff_symfile_read): Only read stringtab and
- debugsec if there are a non-zero number of symbols.
-
-Tue Mar 16 18:08:45 1993 John Gilmore (gnu@cygnus.com)
-
- * command.c (show_user): Avoid fprintf_filtered botch (AGAIN!).
-
-Tue Mar 16 15:18:17 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffexec.c (add_vmap): Wrap symbol read in catch_errors.
-
- * xcoffread.c (read_symbol_lineno): Look to end of symbols for .bf,
- not just 50 symbols.
- (symtbl_num_syms): New variable.
- (read_xcoff_symtab): Set it.
- (read_symbol_nvalue): Check for bad symno.
- (read_symbol_{lineno,nvalue}, callers): Don't pass symtable; it's
- always symtbl.
-
-Tue Mar 16 10:09:05 1993 Stu Grossman (grossman@cygnus.com)
-
- * config/rs6000.mh: Get rid of -Dfd_set=int crock.
- This is defined in defs.h if necessary.
- * vx-share/vxWorks.h: Remove #defs of min and max.
- * vx-share/xdr_ld.c, vx-share/xdr_ptrace.c,
- vx-share/xdr_rdb.c: include defs.h.
-
-Fri Mar 12 09:33:23 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffread.c (retrieve_tracebackinfo): Move assignment out
- of while condition.
-
- * xcoffread.c (enter_line_range): complain() on bad endoffset.
- xcoffread.c: Doc fixes.
-
-Tue Mar 9 09:56:12 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * tm-rs6000.h (CORE_NEEDS_RELOCATION): Just call xcoff_relocate_core.
- xcoffexec.c (xcoff_relocate_core): New function.
- (text_adjustment): Removed.
- (add_vmap): Return the vmap.
- rs6000-tdep.c (add_text_to_loadinfo): No longer static.
-
-Fri Mar 5 05:22:46 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffsolib.h: Add objfile member to struct vmap.
- xcoff{exec,solib}.c: Use it, not lookup_objfile_bfd.
- xcoffexec.c (add_vmap): Allocate objfiles here.
-
-Sun Mar 14 02:54:15 1993 John Gilmore (gnu@cygnus.com)
-
- Support 68000 series without floating point.
-
- * configure.in (m68000-*-{aout,elf,coff}): New configs.
- * tm-68k-nofp.h: New file, lacks 68881 support.
- * config/m68k-nofp.mt: New file.
-
-Sun Mar 14 02:30:08 1993 John Gilmore (gnu@cygnus.com)
-
- Remove a few remaining underscore/no-underscore remnants from
- config files.
-
- * config/{m68k-un.mt, sparc-un.mt}: Remove.
- * config/m68k-noun.mt: Rename to m68k-fp.mt.
- * config/sparc-noun.mt: Rename to sparc-em.mt.
- * tm-68k-noun.h, tm-spc-noun.h: Remove.
- * tm-68k-un.h: Rename to tm-68k-fp.h.
- * tm-spc-un.h: Rename to tm-spc-em.h.
- * tm-sun4sol2.h: Cleanup.
- * configure.in (m68k-*, sparc-* targets): Corresponding changes.
-
-Sat Mar 13 14:58:22 1993 John Gilmore (gnu@cygnus.com)
-
- * symmisc.c (std_in, std_out, std_err): Move initializations
- to runtime code, in case they aren't constant.
-
-Fri Mar 12 16:23:54 1993 K. Richard Pixley (rich@cygnus.com)
-
- * symtab.c (find_pc_symtab): some object file formats, notably
- mips, have holes in the address ranges of symtabs. Change
- this algorithm from first hit to tightest fit.
-
- * mips-tdep.c (heuristic_proc_start): if we walk the pc into the
- fence post without finding the enclosing function, then print a
- warning.
-
-Thu Mar 11 09:33:01 1993 Fred Fish (fnf@cygnus.com)
-
- * utils.c (fputs_demangled, fprint_symbol): Remove.
- * utils.c (fprintf_symbol_filtered): New function which combines
- the functionality of fputs_demangled and fprint_symbol. Uses a
- caller provided language parameter to select the appropriate
- demangler, and caller provided args to pass to the demangler.
- * defs.h (enum language): Move further up in file so enum can
- be used in prototypes.
- * defs.h (fputs_demangled, fprint_symbol): Remove prototypes.
- * defs.h (fprintf_symbol_filtered): Add prototype.
- * c-typeprint.c (cp_type_print_method_args): Replace calls to
- fputs_demangled with call to fprintf_symbol_filtered.
- * cp-valprint.c (demangle.h): Include
- * cp-valprint.c (cp_print_value_fields): Replace calls to
- fprint_symbol with calls to fprintf_symbol_filtered.
- * printcmd.c (print_frame_args): Replace call to fprint_symbol
- with call to fprintf_symbol_filtered.
- * stack.c (print_frame_info): Remove obsolete code so we don't
- have to update fputs_demangled usage in it.
- * stack.c (print_frame_info, frame_info): Add language variable
- to pass to fprintf_symbol_demangled and initialize it from the
- symbol's language. Replace calls to fputs_demangled with calls
- to fprintf_symbol_filtered.
- * symtab.c (find_methods): Replace call to fputs_demangled with
- call to fprintf_symbol_filtered.
- * ch-valprint.c (demangle.h): Include.
- * ch-valprint.c (chill_print_value_fields): Replace call to
- fprint_symbol with call to new fprintf_symbol_filtered.
-
-Wed Mar 10 17:37:11 1993 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (VERSION): Bump version to 4.8.2.
-
- * main.c (source_command): Require an explicit pathname of file
- to source, since previous behavior of defaulting to gdb init file
- was troublesome and undocumented.
- * printcmd.c (disassemble_command): Add missing '{}' pair to
- else with two statements. Bug reported by Stephane Tsacas
- <slt@isoft.fr>.
- * symtab.c (find_pc_line): Don't complain about zero length or
- negative length line numbers for the moment, since we may not own
- the terminal when called, such as when single stepping. (FIXME)
- * language.h (CAST_IS_CONVERSION): True if current language is
- C++ as well as C. Fix from Peter Schauer.
- * environ.c (get_in_environ, set_in_environ, unset_in_environ):
- Use STREQN macro rather than bare '!strncmp()'.
- * environ.c (unset_in_environ): Avoid use of memcpy on
- overlapping memory regions, as suggested by Paul Eggert
- <eggert@twinsun.com>.
- * c-exp.y (%union struct): Remove unused ulval as suggested
- by Paul Eggert <eggert@twinsun.com>.
-
-Mon Mar 8 19:03:06 1993 Fred Fish (fnf@cygnus.com)
-
- * main.c (gdbinit): Make static.
- * main.c (inhibit_gdbinit): Move to file scope.
- * main.c (main): Remove local inhibit_gdbinit.
- * main.c (source_command): Don't source '.gdbinit' file by
- default if gdb has been told to ignore it.
-
-Sun Mar 7 21:58:53 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (MAKEOVERRIDES): Define to be empty for GNU Make
- 3.63.
-
-Fri Mar 5 17:39:45 1993 John Gilmore (gnu@cacophony.cygnus.com)
-
- * printcmd.c (print_address_symbolic): Only print if offset
- is shorter than max_symbolic_offset.
- (initialize_printcmd): `set print max-symbolic-offset'.
-
- * am29k-tdep.c (TAGWORD_ZERO_MASK): New #define.
- (examine_tag): Use it.
- (read_register_stack): Only look in the local registers for a
- memory address if it's between rfb and rsp; go to memory otherwise.
- (initialize_29k): Fix call_scratch_address doc. Remove reginv_com.
- (reginv_com): Remove ancient kludge command.
-
-Fri Mar 5 17:16:26 1993 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * tm-irix3.h (ZERO_REGNUM): copy this macro from tm-mips.h so that
- irix4 will again compile.
-
- * tm-mips.h (GDB_TARGET_IS_MIPS): no longer used, now removed.
-
- * configure.in: accept mips-sgi-irix4* for irix4.
-
-Fri Mar 5 07:49:48 1993 Steve Chamberlain (sac@lisa.cygnus.com)
-
- * z8k-tdep.c (print_register_hook): Lint.
-
-Thu Mar 4 17:42:03 1993 John Gilmore (gnu@cygnus.com)
-
- Lint fixes from Paul Eggert (eggert@twinsun.com):
-
- * command.c (do_setshow_command): var_uintegers are unsigned.
- * sparc-tdep.c (save_insn_opcodes, restore_insn_opcodes):
- unsigned, since they use hex values with the high bit set.
-
-Thu Mar 4 08:22:55 1993 Fred Fish (fnf@cygnus.com)
-
- Fixes submitted by Karl Berry (karl@nermal.hq.ileaf.com):
- * m88k-pinsn.c (sprint_address): Use SYMBOL_NAME macro to
- access symbol name.
- * m88k-nat-c (SXIP_OFFSET, SNIP_OFFSET, SFIP_OFFSET): Enclose
- macro definitions in parenthesis.
-
- * dbxread.c (dbx_symfile_init): Catch the case where there is
- no string table, but the only way we find out is by reading zero
- bytes from EOF.
-
-Wed Mar 3 15:51:28 1993 Fred Fish (fnf@cygnus.com)
-
- * dbxread.c (dbx_symfile_init): Make size of the string table
- size field a define (DBX_STRINGTAB_SIZE_SIZE). Ensure that the
- offset to the string table is nonzero and handle the nonexistant
- string table case, should it occur. Ensure that the string table
- size read from the file is reasonable, with a minimum lower bound
- of DBX_STRINGTAB_SIZE_SIZE instead of zero.
-
-Wed Mar 3 07:23:03 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: Changes to build testsuite correctly.
- (FLAGS_TO_PASS): Added CXX and CXXFLAGS.
- (CC_FOR_TARGET, CXX, CXX_FOR_TARGET): New variables.
- (TARGET_FLAGS_TO_PASS): New variable.
- (SUBDIRS): Added testsuite.
- (all): Build testsuite using TARGET_FLAGS_TO_PASS, so that
- testsuite is compiled with CC_FOR_TARGET rather than CC.
-
-Tue Mar 2 17:57:56 1993 Fred Fish (fnf@cygnus.com)
-
- * dbxread.c (dbx_symfile_init): Fix for nonexistant string table,
- reported by mycroft@gnu.ai.mit.edu.
-
- (Ultrix 2.2 support from Michael Rendell <michael@mercury.cs.mun.ca>)
- * configure.in (vax-*-ultrix2*): New triplet.
- * config/vaxult2.mh: New file.
- * xm-vaxult2.h: New file.
-
- * c-exp.y (parse_number): Change high_bit to unsigned.
- * demangle.c: Change all references to cfront to ARM, since the
- actual algorithm is the one specified in the Annotated Reference
- Manual. This was confusing users into thinking that full cfront
- support was implemented.
- * dwarfread.c (CFRONT_PRODUCER): Remove, was never really used.
- * eval.c (evaluate_subexp): For STRUCTOP_PTR pass the arg type
- directly to lookup_struct_elt_type, which will do the
- dereferencing itself.
- * gdbtypes.c (lookup_struct_elt_type): Expand comments. Fix
- NULL dereferencing bug for unnamed structs, comment out
- questionable code.
-
-Mon Mar 1 17:54:41 1993 John Gilmore (gnu@cygnus.com)
-
- * coffread.c (process_coff_symbol): Change PCC argument correction
- so that it only happens on big-endian targets; so that it only
- happens if the short or char argument is aligned on an int
- boundary; and so that it changes the location, rather than the
- type, of the argument. These changes tend to parallel similar
- (old) changes in stabsread.c.
-
- * coffread.c (coff_read_enum_type): Use the specified size for
- enums, don't assume that they are int-sized.
-
- * c-valprint.c (c_val_print): Don't assume enums are the same as
- ints.
-
- * coredep.c: Handle NO_PTRACE_H in coredep.c. Fix by Michael
- Rendell, <michael@mercury.cs.mun.ca>.
-
-Mon Mar 1 09:25:57 1993 Fred Fish (fnf@cygnus.com)
-
- * language.h (local_decimal_format_custom): Add prototype.
- * language.c (local_decimal_format_custom): Add function, bug
- reported by Robert R. Henry (rrh@tera.com).
-
-Fri Feb 26 18:33:18 1993 John Gilmore (gnu@cacophony.cygnus.com)
-
- * xcoffexec.c (vmap_ldinfo): Fix "/" for '/' typo, reported
- by Josef Leherbauer, joe@takeFive.co.at.
-
-Wed Feb 24 19:17:11 1993 John Gilmore (gnu@cacophony.cygnus.com)
-
- * symfile.c (syms_from_objfile), tm-29k.h, tm-3b1.h, tm-68k-un.h,
- tm-altos.h, tm-arm.h, tm-convex.h, tm-es1800.h, tm-h8300.h,
- tm-hp300bsd.h, tm-hp300hpux.h, tm-hppa.h, tm-i386bsd.h,
- tm-i386v.h, tm-i960.h, tm-irix3.h, tm-isi.h, tm-linux.h,
- tm-m88k.h, tm-merlin.h, tm-mips.h, tm-news.h, tm-np1.h, tm-pn.h,
- tm-pyr.h, tm-rs6000.h, tm-spc-un.h, tm-sun386.h, tm-sunos.h,
- tm-symmetry.h, tm-sysv4.h, tm-tahoe.h, tm-umax.h, tm-vax.h,
- tm-vx68.h, tm-z8k.h: Remove remnants of NAMES_HAVE_UNDERSCORE.
-
-Wed Feb 24 07:41:15 1993 Fred Fish (fnf@cygnus.com)
-
- * symtab.h (SYMBOL_INIT_DEMANGLED_NAME): Initialize contents
- of demangled name fields to NULL if no demangling exists for
- a symbol. SYMBOL_INIT_LANGUAGE_SPECIFIC does this for new
- symbols if their language is known at the time they are created,
- but sometimes the language is not known until later.
-
- * ch-typeprint.c (chill_print_type_base): Name changed to
- chill_type_print_base to match pattern for C and C++ names.
- * ch-typeprint.c (chill_print_type): Change "char" to "CHAR"
- to be consistent with other usages.
- * ch-typeprint.c (chill_type_print_base): Add support for
- printing Chill STRUCT types.
- * ch-valprint.c: Include values.h.
- * ch-valprint.c (chill_print_value_fields): New function and
- prototype for printing Chill STRUCT values.
- * ch-valprint.c (chill_val_print): Fix call to val_print_string
- that was being called with two args instead of three.
- * ch-valprint.c (chill_val_print): Call chill_print_value_fields
- to print Chill STRUCT values.
-
-Tue Feb 23 18:58:11 1993 Mike Werner (mtw@poseidon.cygnus.com)
-
- * configure.in: added testsuite to configdirs.
-
-Tue Feb 23 11:46:11 1993 Mike Stump (mrs@cygnus.com)
-
- * doc/stabs.texi: The `this' pointer is now known by the name
- `this' instead of `$t'.
-
-Tue Feb 23 11:21:33 1993 Fred Fish (fnf@cygnus.com)
-
- * dwarfread.c (read_tag_string_type): Rewrite to allow forward
- references of TAG_string_type DIEs in user defined types.
- * ch-lang.c (chill_create_fundamental_type): Track compiler
- change that now emits debugging info with the type long for Chill
- longs.
-
-Mon Feb 22 15:21:54 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * remote-mips.c: New file; implements MIPS remote debugging
- protocol.
- * config/idt.mt: New file; uses remote-mips.c
- * configure.in (mips-idt-ecoff): New target; uses idt.mt.
-
- * mips-tdep.c (mips_fpu): New variable; controls use of MIPS
- floating point coprocessor.
- (mips_push_dummy_frame): If not mips_fpu, don't save floating
- point registers.
- (mips_pop_frame): If not mips_fpu, don't restore floating point
- registers.
- (_initialize_mips_tdep): New function; let the user reset mips_fpu
- variable.
- * tm-mips.h (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE): If not
- mips_fpu, don't use fp0 as floating point return register.
- (FIX_CALL_DUMMY): If not mips_fpu, don't save floating point
- registers.
-
-Mon Feb 22 07:54:03 1993 Mike Werner (mtw@poseidon.cygnus.com)
-
- * gdb/testsuite: made modifications to testcases, etc., to allow
- them to work properly given the reorganization of deja-gnu and the
- relocation of the testcases from deja-gnu to a "tool" subdirectory.
-
-Sun Feb 21 10:55:55 1993 Mike Werner (mtw@poseidon.cygnus.com)
-
- * gdb/testsuite: Initial creation of gdb/testsuite.
- Migrated dejagnu testcases and support files for testing nm to
- gdb/testsuite from deja-gnu. These files were moved "as is"
- with no modifications. This migration is part of a major overhaul
- of dejagnu. The modifications to these testcases, etc., which
- will allow them to work with the new version of dejagnu will be
- made in a future update.
-
-Fri Feb 19 18:36:55 1993 John Gilmore (gnu@cygnus.com)
-
- * NEWS: Add reminders for next release.
-
-Fri Feb 19 10:01:39 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mipsread.c (parse_lines): Correct check for files compiled with
- -g1.
-
-Fri Feb 19 05:56:15 1993 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in (VERSION): 4.8.1 to distinguish local versions.
-
-Fri Feb 19 01:32:58 1993 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in (VERSION): GDB-4.8 release!
- * README, NEWS: Update for release.
-
-Thu Feb 18 22:44:40 1993 Stu Grossman (grossman@cygnus.com)
-
- * am29k-pinsn.c (print_insn): Minor nits with const.
- * am29k-tdep.c: More minor nits with arg types for
- supply_register, NULL vs. 0, read_register_gen, & reginv_com.
-
-Thu Feb 18 22:38:03 1993 John Gilmore (gnu@cygnus.com)
-
- * gcc.patch: Update for a different GCC (G++) bug.
- * main.c (print_gdb_version): Update copyright year to 1993.
- * nm-hp300bsd.h: Decide whether this is BSD 4.3 or 4.4,
- conditionalize this file on it. FIXME, right way is to split
- these into two config files.
- (ATTACH_DETACH): Define for BSD 4.4
- (PTRACE_ARG_TYPE): caddr_t for BSD 4.4, unset for 4.3.
- (U_REGS_OFFSET): Revise for 4.4.
- (REGISTER_U_ADDR): Separate for 4.4, but it doesn't work yet.
- * xm-hp300bsd.h: Move definitions of UINT_MAX, INT_MAX, INT_MIN,
- LONG_MAX into this file to avoid cpp "redefinition" warnings.
-
-Thu Feb 18 16:13:28 1993 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * nm-hp300bsd.h (PTRACE_ARG3_TYPE): FSF's hp300's have int* not
- caddr_t.
-
-Thu Feb 18 04:10:06 1993 John Gilmore (gnu@cygnus.com)
-
- * c-lang.c (c_printstr): Bugfix for length==0 case.
-
- * c-lang.c (c_printstr): If a C string ends in a null, don't
- print the null.
-
-Thu Feb 18 02:39:21 1993 Stu Grossman (grossman at cygnus.com)
-
- * defs.h (STRCMP): Make it work for unsigned chars.
-
-Thu Feb 18 01:56:06 1993 John Gilmore (gnu@cygnus.com)
-
- * nm-hp300bsd.h (ATTACH_DETACH, PTRACE_ATTACH, PTRACE_DETACH): define.
- * config/hp300bsd.mh (REGEX, REGEX1): Define.
- * m68k-pinsn.c (BREAK_UP_BIG_DECL, AND_OTHER_PART): #if __GNUC__,
- define to kludge the large opcode table into two smaller tables,
- since GCC take exponential space to build the table. Lint.
- (NOPCODES): Remove, use "numopcodes" from opcode/m68k.h instead.
-
-Wed Feb 17 19:24:40 1993 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in (VERSION): Roll to 4.7.9.
- * xm-hp300bsd.h: Define PSIGNAL_IN_SIGNAL_H and put a compatible
- definition here, to handle both BSD 4.3 and 4.4 systems.
- * mipsread.c (ZMAGIC): #undef to avoid duplicate define.
- * remote.c (alarm): Move declaration to global level, before
- first reference to it.
- * tm-i386bsd.h (NUM_REGS): There are only eleven, not twelve.
- * dbxread.c (process_one_symbol): Cast to unsigned char, not int.
-
-Wed Feb 17 13:40:29 1993 K. Richard Pixley (rich@cygnus.com)
-
- * remote.c (readchar): forward declare alarm which otherwise looks
- like an undeclared variable to gcc.
-
- * dbxread.c (process_one_symbol): cast enum value N_SO into int
- when comparing against an int. Avoids superfluous warning from
- vax ultrix 4.2 cc.
-
- * inflow.c (set_sigint_trap): add cast to assignment from signal.
- Avoids superfluous warnings from some systems and/or compilers
- (like vax ultrix 4.2.)
-
- * language.c (struct op_print unk_op_print_tab): use the enum
- values rather naked zeros as initializers. Avoids warnings from
- ultrix type compilers.
-
-Tue Feb 16 00:53:20 1993 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in (VERSION): Roll to 4.7.6.
- (SFILES_SUBDIR): Add 29k-share/udi_soc.
- (SFILES_SUBSUBDIR): Move 29k-share/udi files to this macro.
- (alldeps.mak): Make ALLDEPFILES_SUBSUBDIR for files in sub sub dirs.
- (ALLDEPFILES_SUBSUBDIR): Depend on this for deeper dep files.
- (HFILES): Remove all nm-* except nm-trash.h. Add ns32k-opcode.h.
- (depend): Fix bug where nm-files in config files weren't noticed.
- (make-proto-gdb-1): Avoid changing directories while building new
- prototype. Build SFILES_SUBSUBDIR with longer symlinks.
-
-Mon Feb 15 20:48:09 1993 John Gilmore (gnu@cygnus.com)
-
- * remote.c: Improve error recovery. Allow user to break out
- of initial connection attempt with INTERRUPT. Treat a timeout
- while waiting for remote packet like a retry, unless the remote
- side is actively running user code. Fix a few long printf_filtered's.
-
- * xcoffread.c (read_xcoff_symtab): Don't use null symbol name for
- trampoline symbols.
-
- * buildsym.c (start_subfile): Allow null file name.
-
-Fri Feb 12 15:46:49 1993 K. Richard Pixley (rich@cygnus.com)
-
- * xcoffread.c (process_xcoff_symbol, read_symbol_lineno): complain
- expects a pointer to complaint rather than a complaint
- structure.
- (process_linenos): free the previously allocated subfile name,
- then allocate the new one from the heap.
-
-Fri Feb 12 08:06:05 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * h8300-tdep.c, tm-h8300.h: turn off some experimental features
-
-Thu Feb 11 00:59:07 1993 John Gilmore (gnu@cygnus.com)
-
- * stabsread.c (dbx_lookup_type): Handle negative type numbers.
- Previously, would bogusly index off the bottom of type_vector.
- (rs6000_builtin_type): Accept type number as argument.
- (read_type, case '-'): Handle negatives like any other type number.
-
- * symfile.c (deduce_language_from_filename): Handle null name.
-
- * mips-tdep.c (isa_NAN): Fix byte order dependency.
- Reported by Nobuyuki Hikichi <hikichi@sra.co.jp>,
- fixed by sato@sm.sony.co.jp.
-
- * xcoffread.c (parmsym): Don't use an initializer to set up
- this struct symbol. Set it up in initialize_xcoffread.
- (read_xcoff_symtab, xcoff_symfile_read): Surround code that only
- works on real rs/6000 target with #ifndef FAKING_RS6000.
-
-Wed Feb 10 23:42:37 1993 John Gilmore (gnu@cygnus.com)
-
- * stabsread.c (rs6000_builtin_type): Move function from
- xcoffread.c:builtin_type.
- * xcoffread.c (builtin_type): Move to stabsread. Remove
- IBM6000_HOST dependency. Move misplaced comments.
- (various): Change printf's to complaints.
- (patch_block_stabs, process_xcoff_symbol case C_DECL): Add
- objfile argument to read_type calls under #if 0.
- (process_xcoff_symbol case C_RSYM): Fix typo in #ifdef.
- * xcoffexec.c (map_vmap): Don't allocate an objfile for the exec_file.
- * Makefile.in: xcoffread.o is not built by default.
- * xm-rs6000.h (IBM6000_HOST): Remove.
- * config/rs6000.mh (NATDEPFILES): xcoffread.o is native only.
- * doc/gdbint.texinfo: Eliminate IBM6000_HOST, document
- IBM6000_TARGET.
-
-Wed Feb 10 18:31:20 1993 Stu Grossman (grossman at cygnus.com)
-
- * findvar.c (read_var_value): If REG_STRUCT_HAS_ADDR, then set
- VALUE_LVAL to be lval_memory so that we don't try to modify wild
- register numbers when user tries to modify elements in structs
- passed as arguments.
- * inflow.c (child_terminal_info): Move banner outside of system
- specific #ifdefs.
- * tm-hppa.h (REG_STRUCT_HAS_ADDR): Define this for HPPA, which
- passes struct/union arguments by address.
-
-Wed Feb 10 15:34:46 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Based on patch from Kean Johnston <maw@netcom.com>:
- * nm-i386sco4.h: New file. Like nm-i386sco.h, but define
- ATTACH_DETACH, PTRACE_ATTACH and PTRACE_DETACH.
- * config/i386sco4.mh (NAT_FILE): Use nm-i386sco4.h.
-
-Tue Feb 9 20:07:18 1993 John Gilmore (gnu@cygnus.com)
-
- * remote-udi.c (FREEZE_MODE): Fix && for & typo. Found and
- fixed by Lynn D. Shumaker, shumaker@saifr00.cfsat.honeywell.com.
-
-Tue Feb 9 08:18:07 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * config/i386sco4.mh (MUNCH_DEFINE): Pass -p to nm to avoid bug in
- cc debugging output.
-
-Tue Feb 9 00:19:28 1993 John Gilmore (gnu@cygnus.com)
-
- * stabsread.c (define_symbol): Complain about unrecognized names
- that begin with CPLUS_MARKER (often '$'), but don't die. Fix
- suggested by gb@cs.purdue.edu (Gerald Baumgartner).
- (read_cpp_abbrev): Don't use the class name as part of the
- vtable pointer member name (_vptr$) in $vf abbrevs or unrecognized
- abbrevs. Inspired by Mike Tiemann.
- (read_tilde_fields): Comment. Remove ancient dead code.
- Remove erroneous but non-dead code. Simplify. Add complaints.
- (in general): Remove extraneous (parentheses) in return
- statements.
-
-Fri Feb 5 14:01:22 1993 John Gilmore (gnu@cygnus.com)
-
- * coffread.c (coff_lookup_type): Fix fencepost error reported
- by Art Berggreen, <arg@opal.acc.com>.
-
- Fix long file name bug reported on SCO Open Desktop 2.0 by Ulf Lunde
- <Ulf.Lunde@kvatro.no> and Dag H. Wanvik <Dag.H.Wanvik@kvatro.no>:
-
- * coffread.c (getfilename): Eliminate COFF_NO_LONG_FILE_NAMES
- test, which is apparently left over from when we used native
- include files and couldn't depend on the member names being there.
- * tm-3b1.h, tm-altos.h, tm-i386v.h: Don't set it.
-
-Thu Feb 4 12:23:15 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mipsread.c: Major overhaul to use new BFD symbol table reading
- routines. Now swaps information as it is needed, rather than
- swapping everything when the file is read.
-
-Thu Feb 4 01:52:36 1993 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in (TARDIRS): Add sparclite demo dir.
- (*.tab.c): Change dependency on Makefile to depend on
- Makefile.in, otherwise it always rebuilds after configuring.
- Force output *.tab.c file into current directory even in "make"
- versions that rewrite dependent file names used in command lines.
-
- * TODO: Remove some things we did.
- * am29k-opcode.h, convx-opcode: Remove; now in ../include/opcode.
- * os68k-xdep.c: Remove; useless file (os68k is a target only).
- * convex-pinsn.c: Use ../include/opcode/convex.h. Add CONST.
- * symtab.h: Eliminate unnamed unions and structs.
-
-Wed Feb 3 14:48:08 1993 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in (VERSION): Roll to 4.7.5.
-
-Tue Feb 2 20:47:42 1993 John Gilmore (gnu@cygnus.com)
-
- * breakpoint.c (breakpoint_re_set_one): Handle watchpoints when
- re-evaluating symbol pointers.
-
-Tue Feb 2 16:10:31 1993 Fred Fish (fnf@cygnus.com)
-
- * c-exp.y (lcurly, rcurly): New nonterminals.
- * c-exp.y (exp): Use lcurly and rcurly for arrays and UNOP_MEMVAL
- constructs.
- * parse.c (free_funcalls): Moved prototype from parser-defs.h,
- made function static.
- * parse.c (struct funcall): Moved struct def from parser-defs.h.
- * parse.c (funcall_chain): Moved from parser-defs.h, made static.
- * parse.c (start_arglist):
- * parser-defs.h (free_funcalls): Moved prototype to parse.c.
- * parser-defs.h (struct funcall): Moved struct def to parse.c.
- * parser-defs.h (funcall_chain): Moved to parse.c.
- * printcmd.c (print_frame_nameless_args): Fix prototype.
- * tm-mips.h (setup_arbitrary_frame): Fix prototype.
- * tm-sparc.h (setup_arbitrary_frame): Fix prototype.
- * valops.c (typecmp): Moved prototype from values.h.
- * value.h (typecmp): Moved prototype to valops.c, made static.
- * ch-exp.y (yylex): Change way control sequences are disabled.
-
-Tue Feb 2 16:11:43 1993 John Gilmore (gnu@cygnus.com)
-
- * tm-mips.h, tm-sparc.h: Fix thinko in SETUP_ARBITRARY_FRAME.
-
-Tue Feb 2 15:30:33 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mipsread.c (upgrade_type): Build array types correctly, using
- create_range_type and create_array_type.
-
-Tue Feb 2 00:19:08 1993 John Gilmore (gnu@cygnus.com)
-
- * remote-nindy.c: Cleanup.
-
- * infrun.c (wait_for_inferior): When rolling back the PC after
- a breakpoint, call write_pc so that NPC gets rolled back as well
- (for the 29K).
-
- * blockframe.c (inside_entry_file, inside_main_func,
- inside_entry_func): PC of zero is always "bottom of stack".
-
- * printcmd.c (print_frame_args, print_frame_nameless_args):
- Let print_frame_nameless_args decide whether there are any,
- laying groundwork for possibly later printing 29K args for
- functions where we have tag words but no symbols.
-
-Mon Feb 1 18:09:58 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * Makefile.in: fix GDB doc targets for new doc subdir structure
-
-Mon Feb 1 17:56:47 1993 John Gilmore (gnu@cygnus.com)
-
- * stack.c (parse_frame_specification): Parse as many arguments
- as there are (up to MAXARGS). Pass all of them in argc, argv
- format to SETUP_ARBITRARY_FRAME. Put the burden of checking how
- many there were, onto SETUP_ARBITRARY_FRAME.
- * tm-mips.h, tm-sparc.h: Corresponding changes.
- * mips-tdep.c, sparc-tdep.c: Ditto.
-
-Mon Feb 1 17:19:37 1993 John Gilmore (gnu@cygnus.com)
-
- * hp300ux-nat.c: Update copyrights.
- * mipsread.c (parse_partial_symbols): Complain about block
- indexes that go backwards. Fix from Peter Schauer.
- * symfile.c (syms_from_objfile, symbol_file_add): Allow a
- symbol-file that has no linkage symbols to be read.
- * tm-rs6000.h, xm-rs6000.h: (SIGWINCH_HANDLER and friends): Move
- from tm- file to xm-file, since they're host dependent.
- * valarith.c (value_binop): Typo.
-
-Mon Feb 1 16:16:59 1993 Stu Grossman (grossman at cygnus.com)
-
- * sparclite/aload.c: Add copyleft.
- * sparclite/crt0.s: Add comment at beginning.
-
-Mon Feb 1 14:36:11 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * remote-z8k.c, z8k-tdep.c: support for the Z8001 and Z8002.
- * parse.c (std_regs): Only declare if NO_STD_REGS is defined.
-
-Sun Jan 31 04:32:48 1993 Michael Tiemann (tiemann@rtl.cygnus.com)
-
- * values.c (value_headof): Fix typo in which VTBL and ARG were
- being confused for one another.
-
- * valops.c (typecmp): Now static.
-
- * gdbtypes.c (fill_in_vptr_fieldno): Don't ignore the first
- baseclass--we don't always inherit its virtual function table
- pointer.
-
- * eval.c (evaluate_subexp): In OP_FUNCALL case, adjust `this'
- pointer correctly in case value_struct_elt moves it around.
-
- * valops.c (typecmp): Now static. Also, now groks references
- better.
-
- * gdbtypes.c (lookup_struct_elt_type): Pass NOERR instead of
- zero on recursive call. If NAME is the name of TYPE, return TYPE.
-
-Sat Jan 30 19:55:52 1993 John Gilmore (gnu@cygnus.com)
-
- * hppah-nat.c: Eliminate <sys/user.h> and other unnecessary stuff,
- to avoid "too much defining" error from native C compiler (!).
-
- * Makefile.in (HFILES): Add typeprint.h.
- * typeprint.[ch]: Update copyrights.
-
-Thu Jan 28 19:09:02 1993 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in: Update to match doc/ subdir changes.
-
- * config/hp300hpux.mh: No cross-host file needed, just native.
- * config/go32.mh: Remove nonexistent "native" support.
-
- M88K fixes reported by Carl Greco, <cgreco@Creighton.Edu>:
- * tm-m88k.h (REGISTER_CONVERT_TO_RAW): Fix typo.
- * m88k-tdep.c (next_insn): Lint, cleanup.
- (store_parm_word): Lint.
-
- * README: Fix typo (reported by karl@hq.ileaf.com).
-
-Wed Jan 27 21:34:21 1993 Fred Fish (fnf@cygnus.com)
-
- * expression.h (BINOP_CONCAT): Document use for self concatenation
- an integral number of times.
- * language.c (binop_type_check): Extend BINOP_CONCAT for self
- concatenation case.
- * valarith.c (value_concat): Rewrite to support self
- concatenation an integral number of times.
- * Makefile.in (ch-exp.tab.c): Change "expect" message.
- * ch-exp.y (FIXME's): Make all FIXME tokens distinct, to
- eliminate hundreds of spurious shift/reduce and reduce/reduce
- conflicts that mask the 5 real ones.
- * ch-exp.y (STRING, CONSTANT, SC): Remove unused tokens.
- * ch-exp.y (integer_literal_expression): Remove production,
- no longer used.
-
-Thu Jan 21 09:58:36 1993 Fred Fish (fnf@cygnus.com)
-
- * eval.c (evaluate_subexp): Fix OP_ARRAY, remove code that
- implied that "no side effects" was nonfunctional.
- * eval.c (evaluate_subexp): Add BINOP_CONCAT case to deal with
- character string and bitstring concatenation.
- * expprint.c (dump_expression): Add case for BINOP_CONCAT.
- * expression.h (exp_opcode): Add BINOP_CONCAT.
- * gdbtypes.h (type_code): Add TYPE_CODE_BITSTRING.
- * language.c (string_type): Add function to determine if a type
- is a string type.
- * language.c (binop_type_check): Add case for BINOP_CONCAT.
- * valarith.c (value_concat): New function to concatenate two
- values, such as character strings or bitstrings.
- * valops.c (value_string): Remove error stub and implement
- function body.
- * value.h (value_concat): Add prototype.
- * ch-exp.y (operand_3): Add actions for SLASH_SLASH (//).
- * ch-exp.y (yylex): Recognize SLASH_SLASH.
- * ch-lang.c (chill_op_print_tab): Add SLASH_SLASH (//) as
- BINOP_CONCAT.
-
-Tue Jan 19 14:26:15 1993 Fred Fish (fnf@cygnus.com)
-
- * c-exp.y (exp): Add production to support direct creation
- of array constants using the obvious syntax.
- * c-valprint.c (c_val_print): Set printed string length.
- * dwarfread.c (read_tag_string_type): New prototype and
- function that handles TAG_string_type DIEs.
- * dwarfread.c (process_dies): Add case for TAG_string_type
- that calls new read_tag_string_type function.
- * expprint.c (print_subexp): Add support for OP_ARRAY.
- * gdbtypes.c (create_range_type, create_array_type): Inherit
- objfile from the index type.
- * ch-typeprint.c (chill_print_type): Add case for
- TYPE_CODE_STRING.
- * ch-valprint.c (chill_val_print): Fix case for
- TYPE_CODE_STRING.
-
-Mon Jan 18 11:58:45 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mipsread.c (CODE_MASK, MIPS_IS_STAB, MIPS_MARK_STAB,
- MIPS_UNMARK_STAB, STABS_SYMBOLS): Removed; now in
- include/coff/mips.h.
-
-Fri Jan 15 20:26:50 1993 Fred Fish (fnf@cygnus.com)
-
- * c-exp.y (exp:STRING): Convert C strings into array-of-char
- constants with an explicit null byte terminator. OP_STRING is
- now used for real string types.
- * c-lang.c (builtin_type_*): Move declarations to lang.c since
- they are used by all languages.
- * c-lang.c (_initialize_c_language): Move initializations of
- builtin_type_* to lang.c.
- * c-typeprint.c (c_type_print_varspec_prefix,
- c_type_print_varspec_suffix): TYPE_CODE_PASCAL_ARRAY renamed
- to TYPE_CODE_STRING.
- * c-valprint.c (c_val_print): Change the way character arrays
- are printed as strings to be consistent with the way strings
- are printed when pointer-to-char types are dereferenced.
- Remove test of print_max before calling val_print_string, which
- now does it's own test.
- * eval.c (evaluate_subexp): Add case for OP_ARRAY.
- * expprint.c (print_subexp, dump_expression): Add case for OP_ARRAY.
- * expression.h (enum exp_opcode): Add OP_ARRAY and document.
- * gdbtypes.c (builtin_type_*): Add declarations moved from
- c-lang.c.
- * gdbtypes.c (create_string_type): New function to create real
- string types.
- * gdbtypes.c (recursive_dump_type): TYPE_CODE_PASCAL_ARRAY
- renamed to TYPE_CODE_STRING.
- * gdbtypes.c (_initialize_gdbtypes): Add initializations of
- builtin_type_* types moved from c-lang.c.
- * gdbtypes.h (enum type_code): TYPE_CODE_PASCAL_ARRAY renamed
- to TYPE_CODE_STRING.
- * gdbtypes.h (builtin_type_string): Add extern declaration.
- * gdbtypes.h (create_string_type): Add prototype.
- * m2-lang.c (m2_create_fundamental_type): TYPE_CODE_PASCAL_ARRAY
- renamed to TYPE_CODE_STRING.
- * m88k-tdep.c (pushed_size): TYPE_CODE_PASCAL_ARRAY renamed to
- TYPE_CODE_STRING.
- * mipsread.c (_initialize_mipsread): TYPE_CODE_PASCAL_ARRAY
- renamed to TYPE_CODE_STRING.
- * parse.c (length_of_subexp, prefixify_subexp): Add case for
- OP_ARRAY.
- * printcmd.c (print_formatted): Recognize TYPE_CODE_STRING.
- * typeprint.c (print_type_scalar): TYPE_CODE_PASCAL_ARRAY renamed
- to TYPE_CODE_STRING.
- * valops.c (allocate_space_in_inferior): New function and
- prototype, using code ripped out of value_string.
- * valops.c (value_string): Rewritten to use new function
- allocate_space_in_inferior, but temporarily disabled until some
- other support is in place.
- * valops.c (value_array): New function to create array constants.
- * valprint.c (val_print_string): Add comment to document use,
- complete rewrite to fix several small buglets.
- * value.h (value_array): Add prototype.
- * value.h (val_print_string): Change prototype to match rewrite.
- * ch-valprint.c (chill_val_print): Add case for TYPE_CODE_STRING.
- * ch-exp.y (match_character_literal): Disable recognition of
- control sequence form of character literals and document why.
-
-Thu Jan 14 15:48:12 1993 Stu Grossman (grossman at cygnus.com)
-
- * nindy-share/nindy.c: Add comments to #endif's to clarify
- grouping.
-
- * hppa-pinsn.c (print_insn): Use read_memory_integer, instead of
- read_memory to get byte order right.
- * hppah-tdep.c (find_unwind_info): Don't read in unwind info
- anymore. This is done in paread.c now. We expect unwind info
- to hang off of objfiles, and search all of the objfiles when until
- we find a match.
- * (skip_trampoline_code): Cast arg to target_read_memory.
- * objfiles.h (struct objfile): Add new field obj_private to hold
- per object file private data (unwind info in this case).
- * paread.c (read_unwind_info): New routine to read unwind info
- for the objfile. This data is hung off of obj_private.
- * tm-hppa.h: Define struct obj_unwind_info, to hold pointers to
- the unwind info for this objfile. Also define OBJ_UNWIND_INFO to
- make this easier to access.
-
-Wed Jan 13 20:49:59 1993 Fred Fish (fnf@cygnus.com)
-
- * c-valprint.c (cp_print_class_member): Add extern decl.
- * c-valprint.c (c_val_print): Extract code for printing methods
- and move it to cp_print_class_method in cp-valprint.c.
- * c-valprint.c (c_val_print): Extract code to print strings and
- move it to val_print_string in valprint.c.
- * cp-valprint.c (cp_print_class_method): New function using
- code extracted from c_val_print.
- * valprint.c (val_print_string): New function using code
- extracted from c_val_print.
- * value.h (val_print_string): Add prototype.
- * ch-exp.y (CHARACTER_STRING_LITERAL): Set correct token type.
- * ch-exp.y (literal): Add action for CHARACTER_STRING_LITERAL.
- * ch-exp.y (tempbuf, tempbufsize, tempbufindex, GROWBY_MIN_SIZE,
- CHECKBUF, growbuf_by_size): New variables, macros, and support
- functions for implementing a dynamically expandable temp buffer.
- * ch-exp.y (match_string_literal): New lexer function.
- * ch-exp.y (match_bitstring_literal): Dynamic buffer code
- removed and replaced with new CHECKBUF macro.
- * ch-exp.y (yylex): Call match_string_literal when appropriate.
- * ch-valprint.c (ch_val_print): Add code for TYPE_CODE_PTR.
-
-Sat Jan 9 19:59:33 1993 Stu Grossman (grossman at cygnus.com)
-
- * Makefile.in: Add info for paread.o.
- * config/hppahpux.mh: Add paread.o to NATDEPFILES.
-
- * blockframe.c (frameless_look_for_prologue): Correct the
- comment.
- * gdbtypes.h, gdbtypes.c: Use const in decl of
- cplus_struct_default, now that pa-gas assembler has been fixed.
- * hppah-nat.c: Formatting.
- * hppah-tdep.c: Remove lots of useless externs for variables we
- don't use.
- * (find_unwind_entry): Speed up by using binary search, and a one
- entry cache.
- * (rp_saved): New routine to see what unwind info says about RP
- being saved on the stack frame.
- * (frame_saved_pc): Look for prologue to see if we need to
- examine the stack for the saved RP or not.
- * (init_extra_frame_info): Check for prologue, instead of
- framesize to determine if we are frameless or not.
- * (frame_chain_valid): Stop backtraces when we run into _start.
- * (push_dummy_frame): Reformat to make more readable.
- * (find_dummy_frame_regs): ditto.
- * (hp_pop_frame): ditto.
- * (hp_restore_pc_queue): small cleanup.
- * (hp_push_arguments): ditto.
- * (pa_do_registers_info): ditto.
- * (skip_prologue): New routine created from SKIP_PROLOGUE macro.
- * tm-hppa.h: Move contents of SKIP_PROLOGUE into hppah-tdep.c.
- * Define FRAME_CHAIN_VALID.
- * Turn on BELIEVE_PCC_PROMOTION so that we can access char args
- passed to functions.
-
- * paread.c (pa_symtab_read): Use new bfd conventions for
- accessing linker symbol table.
- * (pa_symfile_init): Access embedded STAB info via BFD section
- mechanism and related macros.
-
-
-Sat Jan 9 19:31:43 1993 Stu Grossman (grossman at cygnus.com)
-
- * sparc-stub.c: Use a seperate stack for our traps.
- * Handle recursive traps.
- * Remove all trap init code. This needs to be done by the
- environment.
- * (set_mem_fault_trap): Call exceptionHandler() to setup this
- trap.
- * (handle_exception): See if we are at breakinst, if so, then
- advance PC sp that users can just step out of breakpoint().
- * (case 'G'): Don't let GDB hack CWP. Also, copy saved regs to
- new place if SP has changed.
- * (case 's'): Get rid of this, we can't do it yet.
- * (case 't'): New command to test any old random feature.
- * (case 'r'): New command to reset the system.
- * (breakpoint): Add label to breakpoint trap instruction so that
- handle_exception() can detect where we are and get past the
- breakpoint trivially.
-
-Thu Jan 7 13:33:06 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips-pinsn.c: Actual work now done by opcodes/mips-dis.c.
-
-Thu Jan 7 09:21:51 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: recognise all sparclite variants
-
-Wed Jan 6 10:14:51 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * symfile.c: If O_BINARY isn't defined, set it to 0, call openp for
- binary files oring in the right bit.
-
- * main.c, source.c, state.c, symmisc.c: use macros defined in
- fopen-{bin|both} when fopening files.
-
-Wed Jan 6 08:19:11 1993 Fred Fish (fnf@cygnus.com)
-
- * defs.h (HOST_CHAR_BIT): New macro, defaults to either CHAR_BIT
- from a configuration file (typically including <limits.h>), or to
- TARGET_CHAR_BIT if CHAR_BIT is not defined.
- * eval.c (evaluate_subexp): Use new BYTES_TO_EXP_ELEM macro.
- * eval.c (evaluate_subexp): Add case for OP_BITSTRING.
- * expprint.c (print_subexp): Use new BYTES_TO_EXP_ELEM macro.
- * exppritn.c (print_subexp, dump_expression): Add case for
- OP_BITSTRING.
- * expression.h (OP_BITSTRING): New expression element type for
- packed bitstrings.
- * expression.h (EXP_ELEM_TO_BYTES, BYTES_TO_EXP_ELEM): New
- macros to convert between number of expression elements and bytes
- to store that many elements.
- * i960-tdep.c (leafproc_return): Use new macros to access
- minimal symbol name and address fields.
- * m88k-pinsn.c (sprint_address): Use new macros to access
- minimal symbol name and address fields.
- * nindy-tdep.c (nindy_frame_chain_valid): Use new macro to access
- minimal symbol address field.
- * parse.c (write_exp_elt, write_exp_string, prefixify_expression,
- parse_exp_1): Use new EXP_ELEM_TO_BYTES macro.
- * parse.c (write_exp_string, length_of_subexp, prefixify_expression):
- Use new BYTES_TO_EXP_ELEM macro.
- * parse.c (write_exp_bitstring): New function to write packed
- bitstrings into the expression element vector.
- * parse.c (length_of_subexp, prefixify_subexp): Add case for
- OP_BITSTRING.
- * parser-defs.h (struct stoken): Document that it is used for
- OP_BITSTRING as well as OP_STRING.
- * parser-defs.h (write_exp_bitstring): Add prototype.
- * ch-exp.y (BIT_STRING_LITERAL): Change token type to sval.
- * ch-exp.y (NUM, PRED, SUCC, ABS, CARD, MAX, MIN, SIZE, UPPER,
- LOWER, LENGTH): New tokens for keywords.
- * ch-exp.y (chill_value_built_in_routine_call, mode_argument,
- upper_lower_argument, length_argument, array_mode_name,
- string_mode_name, variant_structure_mode_name): New non-terminals
- and productions.
- * ch-exp.y (literal): Useful production for BIT_STRING_LITERAL.
- * ch-exp.y (match_bitstring_literal): New lexer support function
- to recognize bitstring literals.
- * ch-exp.y (tokentab6): New token table for 6 character keywords.
- * ch-exp.y (tokentab5): Add LOWER, UPPER.
- * ch-exp.y (tokentab4): Add PRED, SUCC, CARD, SIZE.
- * ch-exp.y (tokentab3): Add NUM, ABS, MIN, MAX.
- * ch-exp.y (yylex): Check tokentab6.
- * ch-exp.y (yylex): Call match_bitstring_literal.
-
-Mon Jan 4 16:54:18 1993 Fred Fish (fnf@cygnus.com)
-
- * xcoffexec.c (vmap_symtab): Use new macros to access minimal
- symbol name and value fields.
-
- * c-exp.y (yylex): Make static, to match prototype and other
- <lang>-exp.y files.
-
- * expression.h (exp_opcode): Add BINOP_MOD.
- * eval.c (evaluate_subexp): Handle new BINOP_MOD.
- * expprint.c (dump_expression): Handle new BINOP_MOD.
- * language.c (binop_type_check): Handle new BINOP_MOD.
- * main.c (float_handler): Re-enable float handler when hit.
- * valarith.c (language.h): Include, need current_language.
- * valarith.c (TRUNCATION_TOWARDS_ZERO): Define default macro
- for integer divide truncates towards zero for negative results.
- * valarith.c (value_x_binop): Handle BINOP_MOD if seen.
- * valarith.c (value_binop): Allow arithmetic operations on
- TYPE_CODE_CHAR variables. Add case to handle new BINOP_MOD.
- * ch-exp.y (operand_4): Add useful actions for MOD and REM.
- * ch-exp.y (tokentab3): Add MOD and REM.
- * ch-exp.y (yylex): Set innermost_block for symbols found
- in local scopes. Return LOCATION_NAME for local symbols.
- * ch-lang.c (chill_op_print_tab): Fix MOD entry to use
- BINOP_MOD instead of BINOP_REM. Add REM entry, using BINOP_REM.
-
-Mon Jan 4 07:35:31 1993 Steve Chamberlain (sac@wahini.cygnus.com)
-
- * command.c (shell_escape, make_command, _initialize_command):
- don't create or use fork if CANT_FORK is defined.
- * serial.h, ser-go32.c: now compiles, but "the obvious problems of
- code written for the IBM PC" remain.
- * xm-go32.h: define CANT_FORK
-
-Sun Jan 3 14:24:56 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * remote-sim.c: first attempt at general simulator interface
- * remote-hms.c: whitespace
- * h8300-tdep.c: (h8300_skip_prologue, examine_prologue):
- understand new stack layout. (print_register_hook): print ccr
- register in a fancy way.
-
-Sun Jan 3 14:16:10 1993 Fred Fish (fnf@cygnus.com)
-
- * eval.c (language.h): Include.
- * eval.c (evaluate_subexp_with_coercion): Only coerce arrays
- to pointer types when the current language is C. It loses for
- other languages when the lower index bound is nonzero.
- * valarith.c (value_subscript): Take array lower bounds into
- account when performing subscripting operations.
- * valops.c (value_coerce_array): Add comment describing why
- arrays with nonzero lower bounds are dealt with in value_subscript,
- rather than in value_coerce_array.
-
-Sat Jan 2 12:16:41 1993 Fred Fish (fnf@cygnus.com)
-
- * ch-exp.y (FLOAT_LITERAL): Add token.
- * ch-exp.y (literal): Add FLOAT_LITERAL.
- * ch-exp.y (match_float_literal): New lexer routine.
- * ch-exp.y (convert_float): Remove.
- * ch-exp.y (yylex): Call match_float_literal.
- * ch-exp.y (yylex): Match single '.' after trying
- to match floating point literals.
-
- * eval.c (evaluate_subexp): Add case MULTI_SUBSCRIPT.
- * expprint.c (print_subexp): Rename BINOP_MULTI_SUBSCRIPT to
- MULTI_SUBSCRIPT.
- * expprint.c (dump_expression): New function for dumping
- expression vectors during gdb debugging.
- * expression.h (BINOP_MULTI_SUBSCRIPT): Name changed to
- MULTI_SUBSCRIPT and moved out of BINOP range.
- * expression.h (DUMP_EXPRESSION): New macro that calls
- dump_expression if DEBUG_EXPRESSIONS is defined.
- * m2-exp.y (BINOP_MULTI_SUBSCRIPT): Changed to MULTI_SUBSCRIPT.
- * parse.c (length_of_subexp, prefixify_subexp): Change
- BINOP_MULTI_SUBSCRIPT to MULTI_SUBSCRIPT.
- * parse.c (parse_exp_1): Call DUMP_EXPRESSION before and after
- prefixify'ing the expression.
- * printcmd.c (print_command_1): Add comment.
- * ch-exp.y (expression_list): Add useful actions.
- * ch-exp.y (value_array_element): Add useful actions.
- * ch-exp.y (array_primitive_value): Add production.
- * ch-exp.y (yylex): Recognize ',' as a token.
-
-Fri Jan 1 18:22:02 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: pass prefix and exec_prefix via FLAGS_TO_PASS,
- POSIXize the recursive makes (make [variable assignments] target{s})
-
-Fri Jan 1 11:56:23 1993 Fred Fish (fnf@cygnus.com)
-
- * tm-sun4sol2.h (CPLUS_MARKER): Remove, now set in tm-sysv4.h.
- * tm-sysv4.h (CPLUS_MARKER): By default, g++ uses '.' as the
- CPLUS_MARKER for all SVR4 systems, so follow suit.
- * defs.h (strdup_demangled): Remove prototype.
- * dwarfread.c (enum_type, synthesize_typedef): Use new macro
- SYMBOL_INIT_LANGUAGE_SPECIFIC.
- * dwarfread.c (new_symbol): Use SYMBOL_INIT_DEMANGLED_NAME.
- * minsyms.c (install_minimal_symbols, prim_record_minimal_symbol,
- prim_record_minimal_symbol_and_info): Use new macro
- SYMBOL_INIT_LANGUAGE_SPECIFIC.
- * minsyms.c (install_minimal_symbols): Use new macro
- SYMBOL_INIT_DEMANGLED_NAME.
- * stabsread.c (define_symbol): Use new macro
- SYMBOL_INIT_DEMANGLED_NAME.
- * symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
- Use new macro SYMBOL_INIT_DEMANGLED_NAME.
- * symfile.h (ADD_PSYMBOL_VT_TO_LIST): Use new macro
- SYMBOL_INIT_DEMANGLED_NAME.
- * symmisc.c (dump_msymbols, dump_symtab, print_partial_symbol):
- SYMBOL_DEMANGLED_NAME now tests language itself.
- * symtab.c (COMPLETION_LIST_ADD_SYMBOL): SYMBOL_DEMANGLED_NAME
- now tests language itself.
- * symtab.h (SYMBOL_CPLUS_DEMANGLED_NAME): New macro that does
- what SYMBOL_DEMANGLED_NAME used to do, directly access the C++
- mangled name member in the language dependent portion of a symbol.
- * symtab.h (SYMBOL_DEMANGLED_NAME): New macro that returns the
- mangled name member appropriate for a symbol's language.
- * symtab.h (SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME,
- SYMBOL_MATCHES_NAME, SYMBOL_MATCHES_REGEXP):
- SYMBOL_DEMANGLED_NAME now tests language itself.
- * symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC): New macro that
- initializes language dependent portion of symbol.
- * symtab.h (SYMBOL_INIT_DEMANGLED_NAME): New macro that
- demangles and caches the demangled form of symbol names.
- * utils.c (fputs_demangled, fprint_symbol): Use current language
- to select an appropriate demangling algorithm.
- * utils.c (strdup_demangled): Remove, no longer used.
- * symtab.h (SYMBOL_CHILL_DEMANGLED_NAME): New macro that directly
- access the Chill mangled name member in the language dependent
- portion of a symbol.
- * ch-lang.c (chill_demangle): New function, simple demangler.
- * defs.h (chill_demangle): Add prototype.
- * symtab.h (language_dependent_info): Add struct for Chill.
-
-For older changes see ChangeLog-92
-
-Local Variables:
-mode: indented-text
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/gdb/gdb/ChangeLog-94 b/contrib/gdb/gdb/ChangeLog-94
deleted file mode 100644
index a691ace10030..000000000000
--- a/contrib/gdb/gdb/ChangeLog-94
+++ /dev/null
@@ -1,5705 +0,0 @@
-Fri Dec 30 17:58:55 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * config/m68k/tm-est.h: Remove cruft.
-
-
-Thu Dec 29 22:40:00 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * Allow up to 10 whitespace separated arguments to user defined
- commands.
- * top.c (struct user_args): Structure for holding arguments to
- user defined commands.
- (print_command_line): Delete unused "tmp_chain" variable. Clean
- up flow control by having cases exit in the same manner.
- Before executing a command or evaluating an expression, substitute
- the current $arg0..$arg9 values if the command/expression uses them.
- (arg_cleanup): New function.
- (setup_user_args, locate_arg, insert_args): Likewise.
- (execute_user_command): Allow arguments to user defined commands.
-
- * Allow if/while commands to be used within a breakpoint command
- list.
- * breakpoint.c (bpstat_do_actions): Call execute_control_command
- rather than execute_command (passes entire command structure rather
- than just the command line text).
- (breakpoint_1): Use "print_command_line" to print a breakpoint
- command line (including control structures).
- * gdbcmd.h (execute_control_command): Provide extern decl.
- (print_command_line): Likewise.
- * top.c (execute_control_command): No longer static.
- (print_command_line): New function to recursively print a command
- line, including control structures.
-
-Thu Dec 29 18:18:31 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * hppa-tdep.c (pa_print_registers): Extract register values stored
- in big endian format on big and little endian hosts.
-
- * array-rom.c: Support for Array Tech LSI33k based RAID disk
- controller board.
- * configure.in: Recognize "mips*-*-ecoff*" rather than
- "mips*-idt-ecoff*" so it'll work for the LSI33k.
-
- * monitor.[ch], op50-rom.c, rom68k-rom.c, w89k-rom.c: Add support
- to monitor config structure for supported baud rates for a target
- and variable stop bits.
- * monitor.c (monitor_fetch_register): Store register values in big
- endian format on any host.
-
-Wed Dec 28 19:27:22 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (hppa_fix_call_dummy): Prefer import stubs over
- export stubs and actual shared library functions so that lazy
- binding works correctly. Try both __d_plt_call and __gcc_plt_call
- trampolines for calling import stubs.
-
-Wed Dec 28 15:29:02 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * a29k-tdep.c (pop_frame): Fix a variable name.
-
-Wed Dec 28 12:21:39 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (push_dummy_frame): Refine code to determine what
- space ID to place in the stack & inf_status structure.
- (hppa_pop_frame): Don't walk through trampoline code if popping a
- call dummy frame.
- (hppa_fix_call_dummy): Call the stack dummy directly if the
- current PC is in a shared library.
-
- * hppa-tdep.c (push_dummy_frame): Return type is void. Clear
- in_syscall bit in flags. Don't depend on the PC queue registers
- when in_syscall is set, they're not valid.
- * config/pa/tm-hppa.h (PUSH_DUMMY_FRAME): Pass inf_status down to
- push_dummy_frame.
- (SR4_REGNUM): Define.
-
- * hppa-tdep.c: Misc. lint changes.
-
-Tue Dec 27 12:32:43 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * breakpoint.c (watchpoint_check): Don't bother restoring the
- "selected" frame anymore, it's not necessary. Initialize the
- frame cache before trying to find the current frame in the frame
- chain.
-
- * somsolib.c (som_solib_add): Return without loading any shared
- libraries if symfile_objfile is NULL.
- (som_solib_create_inferior_hook): Likewise.
-
-Fri Dec 23 17:03:13 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * remote-est.c: New file supports EST-300 CPU32 background
- mode ICE.
- * remote-utils.c (sr_com): Call registers_changed.
- * configure.in (m68*-*-est*): New configuration.
- * config/m68k/tm-est.h: New file.
-
-Fri Dec 23 16:18:50 1994 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in (CLIBS): Put LIBIBERTY last.
-
-Thu Dec 22 09:27:16 1994 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * ser-tcp.c (tcp_open): Cast to struct sockaddr when passing to
- function which expects that.
-
-Thu Dec 22 13:25:33 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * nlm/gdbserve.c, nlm/ppc.c, nlm/ppc.h: Don't try to use
- ALTERNATE_MEM_FUNCS.
-
-Wed Dec 21 14:00:26 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * monitor.c: Now supports xmodem as a remoteloadprotocol.
-
-Tue Dec 20 23:01:17 1994 Stu Grossman (grossman@cygnus.com)
-
- * config/mips/xm-irix4.h, config/mips/xm-irix5.h: #define
- _BSD_COMPAT to get reliable signal handling.
-
-Tue Dec 20 11:44:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * sparc-tdep.c, a29k-tdep.c, findvar.c (get_saved_register):
- if !target_has_registers, call error().
-
- * value.h: Remove obsolete comments about FRAME vs struct
- frame_info *.
-
-
-Sun Dec 18 11:52:58 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * sparc-tdep.c (sparc_pop_frame): Remove erroneous extra argument
- to write_register.
-
-Sat Dec 17 13:23:21 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * tm-sparc.c (EXTRA_FRAME_INFO): New field sp_offset.
- * sparc-tdep.c (sparc_init_extra_frame_info): Set it.
- (examine_prologue, sparc_init_extra_frame_info): Use ->frame plus
- ->sp_offset to compute the address something is saved at, not
- ->bottom.
-
- * sparc-tdep.c (get_saved_register): New function.
- * tm-sparc.h: Define GET_SAVED_REGISTER; don't define
- FRAME_FIND_SAVED_REGS, HAVE_REGISTER_WINDOWS or REGISTER_IN_WINDOW_P.
- * stack.c (frame_info): Add comment about what to do if
- FRAME_FIND_SAVED_REGS is not defined.
-
- * sparc-tdep.c (sparc_init_extra_frame_info): Set ->frame field
- here. Get it right for flat frames.
- * sparc-tdep.c (sparc_frame_chain): Instead of returning
- meaningful value for ->frame field, just return dummy value.
- This change is needed because the old code didn't deal with mixed
- flat and non-flat frames.
-
- * sparc-tdep.c (sparc_pop_frame): Write SP_REGNUM from
- frame->frame, don't go through saved regs for this.
-
- * sparc-tdep.c: Move guts of skip_prologue to new function
- examine_prologue. Check for flat prologue and set is_flat.
- Provide the caller with the information about what is saved where
- if desired.
- (skip_prologue, sparc_frame_find_saved_regs): Call examine_prologue.
-
- * sparc-tdep.c: Replace union sparc_insn_layout and anonymous
- union in isannulled, which won't work on a little-endian host,
- with X_* macros.
-
- * sparc-tdep.c (sparc_frame_saved_pc): If addr == 0, the saved PC
- is still in %o7.
-
- * config/sparc/tm-sparc.h: Define INIT_FRAME_PC and
- INIT_FRAME_PC_FIRST.
- * blockframe.c (get_prev_frame_info): Modify comments regarding
- INIT_FRAME_PC_FIRST and the sparc.
-
- * sparc-tdep.c (single_step): Use 4 not sizeof (long) for size of
- instruction.
-
-Sat Dec 17 02:33:37 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * c-typeprint.c (c_type_print_base): Use `show' of -1 to print
- the return type of methods to avoid infinite loops with anonymous
- types.
- * valops.c (search_struct_field): Handle anonymous unions.
-
- * sparc-tdep.c (sunos4_skip_trampoline_code): New function
- to correctly handle steps into -g compiled PIC objects in the
- main executable.
- * config/sparc/tm-sun4os4.h (SKIP_TRAMPOLINE_CODE):
- Redefine to use sunos4_skip_trampoline_code.
-
- * dwarfread.c (DWARF_REG_TO_REGNUM): Provide a default mapping
- from DWARF to GDB register numbering.
- * dwarfread.c (locval): Use DWARF_REG_TO_REGNUM to map the
- register value.
- * config/mips/tm-mipsv4.h (DWARF_REG_TO_REGNUM): Define.
-
-Fri Dec 16 10:56:29 1994 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in (uninstall): transform file names.
-
-Thu Dec 15 16:55:35 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * defs.h: Include progress.h.
- (QUIT): Call PROGRESS.
- * main.c (main): Call START_PROGRESS and END_PROGRESS, break
- usage message into shorter strings.
- * source.c: Change long command help strings into concats of
- shorter ones, for picky ANSI compilers.
-
- * top.c (command_loop): For space usage display, show both
- absolute size and the change from before command execution.
-
-Thu Dec 15 16:40:10 1994 Stu Grossman (grossman@cygnus.com)
-
- * defs.h, main.c (gdb_fputs), top.c: Add stream arg to
- fputs_unfiltered_hook.
- * defs.h, top.c, utils.c (error): Add error_hook.
-
-Tue Dec 13 15:15:33 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * breakpoint.c, infrun.c, printcmd.c: Change long command help
- strings into concats of shorter ones, for picky ANSI compilers.
-
-Mon Dec 12 17:08:02 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- Sparc flat register window support.
- * sparc-tdep.c (sparc_insn_layout): New union, defines layout of
- instructions symbolically (used to be local to skip_prologue).
- (sparc_init_extra_frame_info): New function.
- (sparc_frame_chain): Add flat cases throughout.
- (skip_prologue): Add recognition of flat prologues.
- (sparc_frame_find_saved_regs): Add flat cases.
- (sparc_pop_frame): Ditto.
- * config/sparc/tm-sparc.h (EXTRA_FRAME_INFO): New slots.
- (INIT_EXTRA_FRAME_INFO): Call sparc_init_extra_frame_info.
- (PRINT_EXTRA_FRAME_INFO): Define.
-
-
-Mon Dec 12 13:06:59 1994 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * f-lang.c: Remove duplicate declaration of
- builtin_type_f_integer, and only include it in the f_builtin_types
- once.
-
- * somread.c (som_symfile_read): Just assign to objfile->obj_private,
- not OBJ_UNWIND_INFO. Assigning to a cast is a GCC-ism which
- the HP compiler doesn't like.
-
-
-Fri Dec 9 15:50:05 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote.c (remote_wait): Pass string instead of char to strcpy.
-
-Fri Dec 9 04:43:17 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbserver/low-lynx.c (mywait): Remove debugging printf.
-
-Thu Dec 8 15:07:29 1994 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * frame.h: Restore pre-Nov 3 comments about FRAME_FP with minor
- changes. They are correct, unlike the post-Nov 3 comment
- (FRAME_FP doesn't have any machine-independent relationship with
- FP_REGNUM or any other such notion of a "frame pointer").
-
-Wed Dec 7 14:50:54 1994 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * gdbserver/remote-utils.c (write_ok): Write "OK", not "Ok", to
- match stubs and protocol spec.
- * gdbserver/remote-utils.c (remote_open): Cast to struct sockaddr
- when passing to function which expects that.
-
- The following changes aren't quite enough to make things work with
- LynxOS (apprently kernel problems).
- * infrun.c (wait_for_inferior): When resuming new thread, pass pid
- not -1 for remote case.
- * thread.c (info_threads_command): Give error if !target_has_stack.
- * infrun.c (start_remote): Call init_thread_list.
- * thread.c (info_threads_command): Don't call kill for remote
- debugging target.
- * target.c (normal_pid_to_str): Print "thread" not "process" for
- remote.
- * remote.c, gdbserver/*: Add 'H', 'S', and 'C' requests, 'X'
- response, and `thread' part of 'T' response.
- * gdbserver/*: If program exits, send packet to GDB before
- exiting. Handle termination with a signal the same as exiting
- with an exitstatus.
- * remote.c: Don't try to kill program after getting an 'X'
- response.
- * infrun.c (wait_for_inferior): Add comment about kill versus mourn.
-
-Thu Dec 8 12:37:38 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * config/pa/tm-pro.h tm-hppap.h, hppapro.mt: Rename tm-hppap.h to
- tm-pro.h.
-
-Wed Dec 7 18:22:59 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * source.c: Various cosmetic changes.
- (forward_search_command): Handle very long source lines correctly.
-
-Wed Dec 7 13:21:47 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * hppa-tdep.c: Use GDB_TARGET_IS_PA_ELF so SOM target support will
- stop being linked in.
-
- * config/pa/tm-hppap.h: New file. Set GDB_TARGET_IS_PA_ELF,
- otherwise it looks like BSD-ELF.
-
-Mon Dec 5 21:43:52 1994 Stu Grossman (grossman@cygnus.com)
-
- * inftarg.c: include <sys/types.h> to get def of pid_t.
-
-Fri Dec 2 15:03:07 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * solib.c (auto_solib_add_at_startup): New global.
- (solib_create_inferior_hook): Call solib_add only if
- auto_solib_add_at_startup is nonzero.
- (_initialize_solib): New command "set auto-solib-add".
-
-Fri Dec 2 12:52:04 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * parse.c (msymbol_addr_type): Replaced by
- lookup_pointer_type (builtin_type_void).
-
- * printcmd.c (_initialize_printcmd): Give examine_*_type
- a name for `ptype $_'.
-
-Fri Dec 2 12:52:04 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * printcmd.c (print_formatted): Call val_print_string directly,
- rather than via value_print.
-
-Wed Nov 30 22:27:27 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * somsolib.c (som_solib_get_got_by_pc): New function.
- * somsolib.h (som_solib_get_got_by_pc): Add extern decl.
- * hppa-tdep.c (hppa_fix_call_dummy): Handle case where FUN is the
- function's export stub or real address in a shared library.
-
-Tue Nov 29 13:40:25 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * config/i386/nbsd.mh (REGEX, REGEX1): No longer define.
-
- * configure.in (i[345]86-*-freebsd*): New configuration.
- * config/i386/{fbsd.mh,fbsd.mt,nm-fbsd.h}: New files.
-
-Tue Nov 29 12:23:25 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * top.c (read_next_line): Pass annotation suffix "commands"
- instead of "command", matches documentation.
-
-Mon Nov 28 14:53:21 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * config/a29k/tm-a29k.h (setup_arbitrary_frame): Replace
- FRAME_ADDR with CORE_ADDR in prototype.
-
- * top.c (command_line_input): If annotation suffix is NULL,
- replace it with an empty string.
- (read_next_line): Pass "command" as annotation suffix to
- command_line_input.
-
-Mon Nov 28 11:03:14 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * config/rs6000/tm-rs6000.h (setpgrp): move defn from here...
- * config/rs6000/xm-rs6000.h: ...to here.
-
-
-Fri Nov 25 21:26:02 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * tm-hppa.h (skip_trampoline_code): Add extern decl.
- * hppa-tdep.c (hppa_pop_frame): Silently restart the inferior and
- allow it to execute any return path trampoline code. Stop the
- inferior and give the user control when the trampoline has
- finished executing.
- (in_solib_call_trampoline): Handle export stubs which also perform
- parameter relocations.
- (in_solib_return_trampoline): Likewise.
-
-Fri Nov 25 13:37:10 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * coffread.c, symfile.h (coff_getfilename): Make it static again.
- * xcoffread.c (coff_getfilename): Use a static copy from
- coffread.c, modified for accessing the static xcoff strtbl.
-
-Fri Nov 25 00:51:05 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (in_solib_call_trampoline): Recognize calls through
- _sr4export and $$dyncall as trampolines. Likewise for long-call
- stubs and parameter relocation stubs.
- (in_solib_return_trampoline): Recognize a return trampoline for
- return value relocation stubs.
-
- * hpread.c: Include hp-symtab.h instead of hpux-symtab.h.
- Various name changes to match those used by hp-symtab.h.
-
-Thu Nov 24 00:39:27 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * blockframe.c (find_pc_partial_function): Inhibit mst_trampoline
- symbol special handling when INHIBIT_SUNSOLIB_TRANSFER_TABLE_HACK
- is defined.
- * infrun.c (IN_SOLIB_CALL_TRAMPOLINE): Renamed from
- IN_SOLIB_TRAMPOLINE. All callers changed.
- (IN_SOLIB_RETURN_TRAMPOLINE): Provide default definition.
- (wait_for_inferior): Handle single stepping through trampolines on
- return paths from shared libraries.
- * config/pa/tm-hppa.h (IN_SOLIB_CALL_TRAMPOLINE): Use
- in_solib_call_trampoline.
- (IN_SOLIB_RETURN_TRAMPOLINE): Use in_solib_return_trampoline.
- (INHIBIT_SUNSOLIB_TRANSFER_TABLE_HACK): Define.
- * hppa-tdep.c (in_solib_call_trampoline): New function.
- (in_solib_return_trampoline): New function.
-
-Wed Nov 23 21:43:03 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * tm-h8300.h (REMOTE_BREAKPOINT): Define.
- * h8300-tdep.c (h8300_pop_frame): Remove redundant call.
-
- * remote-e7000.c (HARD_BREAKPOINTS): Reenable.
- (BC_BREAKPOINTS): Disable.
- * sh-tdep.c (print_insn): Cope with big and little endian machines.
- * sh/sh.mt: Use libsim.a
- * sh/tm-sh.h (TARGET_BYTE_ORDER_SELECTABLE): New
- (BREAKPOINT): Changed to be byteorder independent.
-
-Tue Nov 22 19:13:39 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- Maintenance commands to report time and space usage.
- * main.c (display_time, display_space): New globals.
- (main): Add argument --statistics to enable reporting, display
- time and space after startup is done.
- * maint.c (maintenance_time_display, maintenance_space_display):
- New commands.
- * top.c (command_loop): Display time and space after command
- execution.
-
- * top.c (pre_init_ui_hook): New global.
- (gdb_init): If pre_init_ui_hook set, call before all other init.
-
-Tue Nov 22 10:25:59 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * a29k-tdep.c (examine_tag): Fix a bug in stack frame size.
-
-Sat Nov 19 03:10:51 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/i386/i386sol2.mh: Reenable core file support.
-
- * symfile.c (deduce_language_from_filename): Treat .c++ as a
- C++ extension.
-
- * valops.c (destructor_name_p): Do not compare the template
- part for template classes.
-
-Fri Nov 18 14:55:59 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * defs.h, infcmd.c (reg_names): Don't declare as constant.
- * remote-mips.c (mips_open): Read and set the processor type.
- * mips-tdep.c (mips_set_processor_type): Always return an int.
-
-Fri Nov 18 10:38:12 1994 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * nlm/alpha.c (strtol): Remove, it is provided by NetWare C library.
- * nlm/gdbserve.def (strtol): Add to import list.
- * nlm/fake_aio.c: Remove file, no longer used.
-
- * Makefile.in (LD_FOR_TARGET, NLMCONV_FOR_TARGET): Remove.
- * nlm/Makefile.in (gdbserve.O): Link with ${CC_FOR_TARGET}.
- (LD_FOR_TARGET): Remove.
-
-Thu Nov 17 22:09:50 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * monitor.h, monitor.c, w89k-rom.c, op50n-rom.c, idp-rom.c: Add
- support for two variables used to control the load protocol and
- conversion type.
-
-Thu Nov 17 17:51:12 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- Support for different MIPS IDT processor models.
- * mips-tdep.c (mips_processor_type, tmp_mips_processor_type,
- mips_generic_reg_names, mips_r3041_reg_names,
- mips_r3051_reg_names, mips_r3081_reg_names,
- mips_processor_type_table): New globals.
- (mips_do_registers_info): Don't display register if name is empty.
- (mips_set_processor_type_command): New command.
- (mips_show_processor_type_command): New command.
- (mips_set_processor_type): New function.
- (mips_read_processor_type): New function.
- * config/mips/tm-idt.h (DEFAULT_MIPS_TYPE): New macro.
- * config/mips/tm-mips.h (DEFAULT_MIPS_TYPE): New macro.
- (NUM_REGS): Increase to account for all CP0 registers.
- (REGISTER_NAMES): Add empty names for CP0 registers.
- (FIRST_EMBED_REGNUM, LAST_EMBED_REGNUM): Adjust.
- (PRID_REGNUM): New macro.
-
-Wed Nov 16 16:41:52 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * README: Add warning about termcap in Ultrix and OSF/1.
-
-Wed Nov 16 15:28:29 1994 Rob Savoye (rob@cygnus.com)
-
-
- * hppa-tdep.c: Remove including sys/dir.h from a target file.
-
-Wed Nov 16 10:31:27 1994 J.T. Conklin (jtc@cygnus.com)
-
- * config/powerpc/gdbserve.mt (TDEPFILES): Remove fake_aio.o.
-
- * nlm/gdbserve.c: Include <nwtypes.h> before other NetWare headers.
- * nlm/ppc.c: Likewise.
-
- * nlm/ppc.c (strtol): Remove, it is provided by NetWare C Library.
- (StopBell): New function (stubbed out).
-
-Wed Nov 16 00:12:21 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (skip_trampoline_code): Handle shared library import
- trampolines.
-
-Tue Nov 15 16:18:52 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * c-exp.y (yylex): Fix a bug in template scanning.
-
-Tue Nov 15 14:25:47 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * i386-stub.c, m68k-stub.c, sparc-stub.c, sparcl-stub.c: Mask out
- the top bit returned by getDebugChar.
-
-Tue Nov 15 01:03:56 1994 Rob Savoye (rob@slipknot.cygnus.com)
-
- * op50-rom.c, w89k-rom.c, monitor.c: Modify to usr two variables
- to set remote load type and protocol.
- * rom68k-rom.c: Add to_stop in target_ops.
-
-
-Sat Nov 12 21:55:47 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * somsolib.c: Add TODO list.
- (som_solib_add): Immediately return if $SHLIB_INFO$ sections does
- not exist or has size zero. Slightly simplify error handling.
- Keep an internal list of all the loaded shared libraries and
- various tidbits of information about the loaded shared libraries.
- Build section tables for each loaded shared library and add those
- tables to the core target if necessary.
- (som_solib_create_inferior_hook): Force re-reading of shared
- libraries at exec time.
- (som_sharedlibrary_info_command): New function for dumping
- information about the currently loaded shared libraries.
- (_initialize_som_solib): New function.
-
-Sat Nov 12 02:26:50 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * Makefile.in (copying.o, f-exp.tab.o, dpx2-nat.o, dstread.o,
- i386aix-nat.o, i386m3-nat.o, irix5-nat.o, lynx-nat.o, m3-nat.o,
- mipsm3-nat.o, ns32km3-nat.o, remote-e7000.o, remote-os9k.o):
- Add dependencies.
- (copying.o, os9kread.o, remote.o): Update dependencies.
-
- * valarith.c (value_sub): When subtracting pointers, only
- check for a match of the pointed to element lengths.
- Cast element length to LONGEST to obtain a signed result for
- pointer subtractions.
-
-Fri Nov 11 10:51:07 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * ch-exp.y (yylex): Fix off-by-one error when converting string to
- lowercase. Null terminate new string.
-
- * hppa-tdep.c (rp_saved): Handle IMPORT stubs too.
-
- * somsolib.c (som_solib_add): Check the value of __dld_flags, if
- it indicates __dld_list is not valid return an error. If it
- indicates that libraries were not mapped privately, issue a
- warning.
-
-Thu Nov 10 23:17:45 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symfile.c (syms_from_objfile): Only call find_lowest_section if
- no ".text" section exists.
-
-Thu Nov 10 15:16:21 1994 Rob Savoye <rob@rtl.cygnus.com>
-
- * rom68k-rom.c: New file. Replaces the old remote-mon.c and uses
- the new generic ROM interface in monitor.c.
- * config/m68k/monitor.mt: Use new ROM support.
- * monitor.c: Add support for xmodem download protocol.
-
-Wed Nov 9 18:46:24 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * findvar.c (find_saved_register): Fix a frame variable name.
- * infcmd.c (finish_command): Ditto.
-
-Tue Nov 8 13:20:14 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * TODO: Remove "Watchpoints seem not entirely reliable, though
- they haven't failed me recently." item--this old (4.6 at least)
- item is too vague to be useful (some watchpoint bugs have been
- fixed since then).
- * TODO: Add explanation of "RPC interface" item.
-
-Mon Nov 7 22:25:21 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (read_unwind_info): Use "text_offset" for linker
- stub unwind descriptors too.
-
- * Enable backtracing from inside a SOM shared library back into
- user code.
- * hppa-tdep.c (internalize_unwinds): Accept and use new
- "text_offset" argument for dynamic relocation of
- region_{start,end} fields in the unwind descriptor.
- (read_unwind_info): Pass text_offset to internalize unwinds.
-
-Mon Nov 7 14:34:42 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m3-nat.c: Remove comments about arbitrary limit in
- printf_filtered; that limit is gone.
-
-Mon Nov 7 00:27:16 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * Beginnings of SOM shared library support. Breakpoints and
- single frame backtracing within the library only. Only works when
- using the HPUX 9 dynamic linker. More functionality to be added
- soon.
-
- * somsolib.c, somsolib.h: New files.
- * Makefile.in (HFILES_NO_SRCDIR): Add somsolib.h
- (ALLDEPFILES): Add somsolib.c.
- (somsolib.o): Add some dependencies.
- * somread.c (som_symtab_read): Accept multiple section offsets.
- All callers changed. Adjust all text symbols with the first
- section offset.
- * symfile.c (find_lowest_section): Enable this function. Add some
- tie-breaking logic when sections have the same vma.
- (syms_from_objfile): Use find_lowest_section rather than looking
- for ".text" by name. Relax warning to only warn if the lowest
- section is not a code section.
- * config/pa/{hppabsd.mh, hppahpux.mh} (NATDEPFILES): Add somsolib.o
- * config/pa/{nm-hppab.h, nm-hppah.h}: Include somsolib.h.
-
-Sun Nov 6 12:54:54 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * partial-stab.h (N_TEXT): Put back GDB_TARGET_IS_HPPA kludge,
- it is still needed for GCC-2.6 compiled code.
- * TODO (GDB_TARGET_IS_HPPA): Note this kludge can be nuked
- sometime after GCC-2.7 has been released.
-
- * hppa-tdep.c (frame_saved_pc): Mask off low two bits when
- retrieving the PC from a signal handler caller. Fix thinko
- in Stan's last change ("frame", should have been "frame->next").
- If the next frame is a signal handler caller and it's a system
- call which has entered the kernel ((PSW & 0x2) != 0), then the
- saved pc is in %r2 instead of %r31.
-
-Fri Nov 4 23:47:07 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (hppa_frame_find_saved_regs): Change "frame" to
- "frame_info" throughout.
-
-Fri Nov 4 16:26:59 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * sparcl-stub.c: get rid of defs.h.
-
-Fri Nov 4 13:11:54 1994 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * gdbserver/Makefile.in (MMALLOC_CFLAGS): Add -I${MMALLOC_DIR}.
- Correct definition of MMALLOC_DIR to reflect fact this is
- gdb/gdbserver/Makefile.in, not gdb/Makefile.in.
-
- * gdbserver/server.c (main): After we kill the inferior in
- response to a 'k' request, exit.
-
- * remote.c (remote_kill): Use catch_errors when calling putpkt.
- (putpkt): Return int, not void, to match catch_errors calling
- convention.
-
-Fri Nov 4 10:52:38 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * rs6000-tdep.c (pop_frame): Correct a variable name.
-
-Fri Nov 4 05:43:35 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * TODO: Re-write item about SIGINT handling to reflect the fact
- that target_stop now exists.
-
-Thu Nov 3 15:19:17 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- Replace useless FRAME, FRAME_ADDR types with struct frame_info *
- and CORE_ADDR, respectively.
- * frame.h (FRAME, FRAME_INFO_ID, FRAME_ADDR): Remove.
- * blockframe.c (get_frame_info): Remove.
- * a29k-tdep.c, alpha-tdep.c, blockframe.c, breakpoint.c,
- breakpoint.h, energize.c, findvar.c, gould-pinsn.c,
- h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, i386-tdep.c, i960-tdep.c,
- infcmd.c, inferior.h, infrun.c, m68k-tdep.c, m88k-tdep.c,
- mips-tdep.c, nindy-tdep.c, printcmd.c, pyr-tdep.c, rs6000-tdep.c,
- sh-tdep.c, sparc-tdep.c, stack.c, valops.c, z8k-tdep.c,
- config/a29k/tm-a29k.h, config/alpha/tm-alpha.h,
- config/gould/tm-pn.h, config/h8300/tm-h8300.h,
- config/h8500/tm-h8500.h, config/mips/tm-mips.h,
- config/ns32k/tm-merlin.h, config/ns32k/tm-umax.h,
- config/pyr/tm-pyr.h, config/sparc/tm-sparc.h): Replace FRAME with
- struct frame_info * everywhere, replace FRAME_ADDR with CORE_ADDR,
- rename variables consistently (using `frame' or `fi'), remove
- calls to get_frame_info and FRAME_INFO_ID, remove comments about
- FRAME and FRAME_ADDR cruftiness.
-
-Thu Nov 3 14:25:24 1994 Stu Grossman (grossman@cygnus.com)
-
- * corelow.c, exec.c, inftarg.c, m3-nat.c, op50-rom.c, procfs.c,
- remote-adapt.c, remote-e7000.c, remote-eb.c, remote-es.c,
- remote-hms.c, remote-mips.c, remote-mm.c, remote-mon.c,
- remote-nindy.c, remote-os9k.c, remote-pa.c, remote-sim.c,
- remote-st.c, remote-udi.c, remote-vx.c, remote-z8k.c, remote.c,
- w89k-rom.c, target.c, target.h: Add support for target_stop().
-
-Thu Nov 3 01:23:45 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * osfsolib.c (solib_map_sections, first_link_map_member,
- next_link_map_member, xfer_link_map_member): Retrieve and use
- shared library relocation offset from runtime loader structures.
- Use libxproc.a routines to get a working version if
- USE_LDR_ROUTINES is defined.
- * README: Remove item about shared library relocation for
- Alpha OSF/1.
-
-Wed Nov 2 15:05:39 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * c-exp.y (yylex): scan template names, and scan nested class
- names.
-
-Wed Nov 2 11:01:55 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * nlm/Makefile.in: install gdbserve.nlm.
-
-
-Tue Nov 1 13:00:46 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * c-valprint.c (c_value_print): Check for plain literal `char'
- target type when suppressing `(char *)' output for strings.
-
-Mon Oct 31 19:19:51 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * coffread.c (coff_symfile_init): Remove unused local abfd.
- * utils.c [NO_MMALLOC] (mmalloc, mrealloc): Define and use size_t
- instead of long, for compatibility with mmalloc.h.
-
-Sat Oct 29 02:40:40 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * top.c (line_completion_function): Renamed from
- symbol_completion_function, takes the line buffer and the
- point in the line buffer as additional arguments.
- (readline_line_completion_function): New function, interface
- between readline and line_completion_function.
- (init_main): Use it.
- (complete_command): Use line_completion_function instead of
- abusing rl_line_buffer. Free completion strings after printing
- them.
- * symtab.c (completion_list_add_name): Recheck for duplicates
- if we intend to add a modified symbol.
-
- * gdbtypes.h (cplus_struct_type): nfn_fields_total no longer
- includes the number of methods from the baseclasses.
- * stabsread.c (attach_fn_fields_to_type): No longer add the
- number of methods from the baseclasses to TYPE_NFN_FIELDS_TOTAL,
- the baseclass type might not have been completely filled in yet.
- * symtab.c (total_number_of_methods): New function to compute
- the total number of methods for a type, including the methods
- from baseclasses.
- (decode_line_1): Use it instead of TYPE_NFN_FIELDS_TOTAL to
- allocate the symbol array for find_methods.
-
- * stabsread.c (scan_file_globals): Add default case to minimal
- symbol type switch, to avoid gcc -Wall warnings.
-
- * config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO):
- Don't test for zero backchain pointer to recognize a signal
- handler frame, if read() gets interrupted by a signal, the
- backchain will be non zero.
- (SIG_FRAME_FP_OFFSET): Move to here from rs6000-tdep.c,
- improve comment.
- (SIG_FRAME_PC_OFFSET): New definition.
- (FRAME_SAVED_PC): Return saved pc from sigcontext if this
- is a signal handler frame.
- * rs6000-tdep.c (function_frame_info): Do not error out
- if we can't access the instructions.
-
- * config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR):
- New definition to get the function address from a function pointer.
- * valops.c (find_function_addr): Use it when calling a user
- function through a function pointer.
-
-Fri Oct 28 16:16:52 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * Makefile.in (MMALLOC_DIR): New definition.
- (MMALLOC): Use MMALLOC_DIR.
- (MMALLOC_CFLAGS): Look in MMALLOC_DIR for mmalloc.h.
- (OPCODES): Remove gratuitous "./".
- * defs.h (mmalloc.h): Include.
- (mmalloc, mrealloc, etc): Remove decls.
- (cplus_demangle, cplus_demangle_opname): Remove decls.
-
-Wed Oct 26 15:41:07 1994 Stu Grossman (grossman@cygnus.com)
-
- * defs.h, main.c, top.c: Change sense and name of
- no_windows variable. Now called use_windows, and defaults to off
- (for compatibility).
-
-Wed Oct 26 12:20:53 1994 Jim Kingdon <kingdon@cygnus.com>
-
- * coffread.c (coff_symtab_read): If we get the address from
- target_lookup_symbol, set the section to -2 not SECT_OFF_BSS.
- (coff_symtab_read): Set value and section of symbol that
- process_coff_symbol returns.
-
-Tue Oct 25 09:53:04 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * config/i386/tm-nbsd.h: Enable longjmp support.
-
-Sat Oct 22 03:41:13 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * valarith.c (value_binop): Take care of ANSI `value preserving'
- rule, which was not addressed by the previous change.
-
- * rs6000-tdep.c (skip_prologue): Handle `mr r31,r1', which is
- generated by gcc-2.6, as a synonym for `oril r31,r1,0'.
-
- * TODO: Remove item about RS/6000 shared libraries.
-
-Thu Oct 20 17:35:45 1994 Stu Grossman (grossman@cygnus.com)
-
- * defs.h, infrun.c (wait_for_inferior), top.c: Call
- target_wait_hook to allow GUI to handle blocking for inferior. Call
- call_command_hook in execute_command to provide means for wrapping
- commands with GUI state change updates.
-
- * infrun.c (wait_for_inferior): Make sure
- through_sigtramp_breakpoint is non-null before deleting.
-
-Thu Oct 20 10:26:43 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * config/powerpc/ppc-nw.mt (TDEPFILES): Removed exec.o.
-
-Thu Oct 20 06:56:07 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (coffread.o): Depend on target.h.
- (remote-vx.o): Depend on gdb-stabs.h objfiles.h symfile.h $(bfd_h).
-
-Wed Oct 19 22:49:31 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * TODO: Fix typo.
-
-Wed Oct 19 11:32:15 1994 Jim Kingdon <kingdon@cygnus.com>
-
- * objfiles.c (objfile_relocate): When relocating ->sections, use
- objfile not symfile_objfile.
-
- * symtab.h, minsyms.c (minsyms_sort): New function.
- * objfiles.c (objfile_relocate): Call it.
-
- * remote-vx.c (vx_add_symbols): Call breakpoint_re_set.
-
- * objfiles.c, objfiles.h (objfile_to_front): New function.
- * remote-vx.c (vx_add_symbols): Call it.
-
- * coffread.c (coff_symtab_read): Handle common symbols the same
- way that partial-stab.h does.
-
-Wed Oct 19 21:06:12 1994 Rob Savoye (rob@cirdan.cygnus.com)
-
- * hppa-tdep.c: Remove include files a.out.h, ioctl.h, and
- machine/psl.h. These are host files.
-
-Wed Oct 19 15:13:51 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * objfiles.h (struct objfile): Fix comment--minimal_symbol_count
- does *not* include the terminating NULL msymbol.
-
-Tue Oct 18 20:53:29 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * monitor.c (monitor_load_srec,monitor_make_srec): Add an asrecord
- loader that reads files using BFD and converts it on the fly.
-
-Mon Oct 17 18:52:06 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * monitor.c (set_loadtype_command): Fixed so it doesn't core dump.
- * monitor.c (monitor_load): check the load type and load the file
- accordingly. Default to gr_load_image().
- * monitor.c (monitor_load_ascii_srec): Load an ascii file in
- srecord format by downloading to the monitor.
- * w89k-rom.c, op50n-rom.c: set supported load types.
-
-Mon Oct 17 10:29:08 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (ALLDEPFILES): Remove xcoffexec.c.
- * Makefile.in: Remove xcoffexec.o rule.
-
- * exec.c (exec_file_command): Add comment.
-
- Fix data and bss relocation for VxWorks 5.1:
- * remote-vx.c (vx_add_symbols): New function.
- (vx_load_command, add_symbol_stub): Call it instead of
- symbol_file_add.
- (vx_wait): Remove comment which was wrong to useless.
- * remote-vx.c: Reindent much of file.
- * coffread.c (cs_to_section, find_targ_sec): New functions.
- (process_coff_symbol): Set SYMBOL_SECTION to result
- from cs_to_section.
- (coff_symtab_read): Call cs_to_section and deal with result
- rather than assuming sections are in a certain order. Deal with
- BSS.
- * coffread.c: Remove text_bfd_scnum variable.
-
-Sat Oct 15 16:55:48 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * corelow.c: Format to standard.
- (core_close): Use name instead of bfd_filename.
-
-Fri Oct 14 10:29:08 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * exec.c (map_vmap): Cast return from xmalloc to its proper type,
- not to PTR.
-
- * symfile.c (reread_symbols): Include bfd_errmsg string in error
- message if bfd_close fails.
- * exec.c (exec_close), solib.c (clear_solib), corelow.c
- (core_close), objfiles.c (free_objfile), irix5-nat.c
- (clear_solib), osfsolib.c (clear_solib), remote-utils.c
- (gr_load_image): Check for errors from bfd_close.
- * solib.c (look_for_base), remote-utils.c (gr_load_image),
- remote-udi.c (download), corelow.c (core_open), symfile.c
- (symfile_bfd_open), symfile.c (generic_load): Add comment
- regarding error from bfd_close.
- * remote-udi.c (download), remote-utils.c (gr_load_image): Add
- comment about bogus handling of errors from bfd_openr.
- * exec.c (exec_close): Add comment regarding memory leak and
- dangling reference to vp->name.
-
-Sat Oct 15 03:43:00 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * eval.c (evaluate_subexp): Make fnptr a LONGEST instead
- of using longest_to_int.
-
- * infcmd.c (run_stack_dummy): Reinstate set_current_frame call,
- mips and alpha targets need the real breakpoint pc for
- creating the breakpoint frame.
-
- * stack.c (return_command): Cast return value to the return
- type of the function from which we return.
- * values.c (set_return_value): Pass VALUE_CONTENTS unmodified
- to STORE_RETURN_VALUE.
-
- * symtab.c (lookup_symbol): Remove search for `static mangled
- symbols', the search for `static symbols' already looks for
- mangled and demangled symbols via lookup_block_symbol.
-
- * valarith.c (value_binop): Use ANSI C arithmetic conversions
- when performing integral evaluations, implement BINOP_EQUAL and
- BINOP_LESS.
- (value_equal, value_less): Use value_binop to perform the
- comparison if both operands have TYPE_CODE_INT.
-
- * rs6000-tdep.c (pop_frame): Make sure all registers are valid,
- as they are written back later. Handle sp restore for frameless
- functions. Use fdata.nosavedpc instead of fdata.frameless to
- determine if the pc has been saved.
- (function_frame_info): Handle `mr r31,r1', which is generated by
- gcc-2.6, as a synonym for `oril r31,r1,0'.
- (skip_trampoline_code): Handle shared library trampolines.
- * xcoffread.c (read_xcoff_symtabs): Record XMC_GL symbols with
- their real name. Enables setting of breakpoints in shared libraries
- before the executable is run.
-
-Fri Oct 14 19:39:47 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * monitor.h, remote-mon.c: Hack up to so the old ROM monitor
- interface code still works with the new ROM monitor
- structures. Fake out a couple of fields.
-
-Fri Oct 14 14:54:37 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * h8500-tdep.c (target_read_sp, target_write_sp, target_read_pc,
- target_write_pc, target_read_fp, target_write_fp): Rename to
- h8500_read_sp, etc.
- (h8500_read_pc, h8500_write_pc): Add pid argument.
- * config/h8500/tm-h8500.h (TARGET_READ_SP, TARGET_WRITE_SP,
- TARGET_READ_PC, TARGET_WRITE_PC, TARGET_READ_FP, TARGET_WRITE_FP):
- Change to match functions above.
-
-Thu Oct 13 13:24:29 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * NEWS: Add item about if and while.
-
- * .gdbinit: Restore `end'; it was not excess. Reindent
- list-objfiles to make this clear. Comment out all of
- list-objfiles because old gdb's choke on it.
-
-Wed Oct 12 23:19:08 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * config/mips/tm-bigmips64.h: Just define TARGET_BYTE_ORDER and
- include tm-mips64.h.
-
-Wed Oct 12 18:02:17 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * Makefile.in (ANNOTATE_OBS): New definition.
- (COMMON_OBS): Add exec.o.
- (annotate.o): Remove extra compile rule.
- * config/*/*.mh, config/*/*.mt: Remove exec.o from *DEPFILES lists
- everywhere.
-
- * .gdbinit: Remove excess `end'.
-
- * exec.c: Merge in RS6000 support from xcoffexec.c.
- (symfile.h, objfiles.h, xcoffsolib.h): Include.
- (vmap): New global variable.
- (exec_close): Close and free objects in vmap chain.
- (exec_file_command) [IBM6000_TARGET]: Set up initial vmap.
- (bfdsec_to_vmap, map_vmap): Moved here from xcoffexec.c.
- (exec_files_info): Print vmap information.
- * xcoffexec.c: Remove.
- * config/rs6000/rs6000.mt, config/rs6000/rs6000lynx.mt
- (TDEPFILES): Use exec.o instead of xcoffexec.o.
- * TODO: Remove pertinent items.
-
-Wed Oct 12 10:08:19 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * partial-stab.h (N_TEXT): Delete GDB_TARGET_IS_HPPA kludge; they
- are no longer needed as of gcc-2.6.0.
-
-Tue Oct 11 15:51:01 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * lynx-nat.c (child_wait): Correct handling of byte reversed SPARC
- Lynx wait status.
- (fetch_core_registers): Don't try to fetch a register if
- regmap maps it to -1.
- * sparc-tdep.c (sparc_frame_find_saved_regs): Use FRAME_SAVED_I0
- and FRAME_SAVED_L0 when setting saved_regs_addr. SPARC Lynx
- stores the registers in a weird order.
-
-Sat Oct 8 20:59:13 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * blockframe.c (reinit_frame_cache): Reinstate select_frame call
- if inferior_pid is nonzero.
-
-Sat Oct 8 04:27:21 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- Speed up GDB startup time by not demangling partial symbols.
- * symfile.h (ADD_PSYMBOL_VT_TO_LIST),
- symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
- No longer demangle partial symbols.
- * symtab.c (lookup_symbol, list_symbols): Handle mangled
- variables, e.g. C++ static members, via the minimal symbols.
-
- Handle reordered functions in an objfile, for Irix 5.2 shared
- libraries.
- * objfiles.h (OBJF_REORDERED): New bit in the objfile flags,
- set if the functions in an objfile are reordered.
- * mdebugread.c (parse_partial_symbols): Detect reordered
- functions in an objfile.
- * symtab.c (find_pc_psymtab, find_pc_symtab): Use expensive
- lookup algorithm if the functions in the objfile are reordered.
-
- * xcoffexec.c (exec_close): If the current target has a copy
- of the exec_ops sections, reflect the freeing of the sections
- in current_target.
-
- * valops.c (call_function_by_hand): Use `sizeof dummy1', not
- `sizeof dummy', for constructing the call dummy code.
-
- * config/sparc/tm-sparc.h: Add PARAMS declarations to all
- function declarations.
- * sparc-tdep.c (sparc_pop_frame): Cast result of
- read_memory_integer to CORE_ADDR when passing it to PC_ADJUST.
-
- * irix5-nat.c (enable_break): Set breakpoint at the entry point
- of the executable, to handle the case where main resides in a
- shared library.
- * irix5-nat.c (solib_create_inferior_hook): Reset stop_soon_quietly
- after shared library symbol reading, to get rid of a warning from
- heuristic_proc_start if the startup code has no symbolic debug info.
-
- * breakpoint.h (struct breakpoint): Add new fields language
- and input_radix, to enable breakpoint resetting with the
- proper language and radix.
- * breakpoint.c (set_raw_breakpoint): Initialize them.
- (breakpoint_re_set_one): Use them when resetting the breakpoint.
- (breakpoint_re_set): Preserve current language and input_radix
- across breakpoint_re_set_one calls.
-
- * symtab.c (decode_line_1): Do not build a canonical line
- specification for `*expr' line specifications.
-
- * breakpoint.h (bpstat_stop_status): Fix prototype declaration.
-
-Fri Oct 7 08:48:18 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- The point of these changes is to avoid reading the frame pointer
- and stack pointer during stepping, to speed things up.
- A. Changes to not select a frame until we need a selected frame:
- * blockframe.c (flush_cached_frames): Call select_frame (NULL, -1).
- * infrun.c (wait_for_inferior): Move call to select_frame back to
- normal_stop. This reverts a change of 13 Apr 94 (it says Jeff
- Law, but the change was my idea); the only reason for that change
- was so we could save and restore the selected frame in
- wait_for_inferior, and now that flush_cached frames clears the
- selected frame, that should work OK now.
- B. Changes to not create a current_frame until we need one:
- * blockframe.c (get_current_frame): If current_frame is NULL, try
- to create an innermost frame.
- * sparc-tdep.c (sparc_pop_frame), infcmd.c (run-stack_dummy),
- infrun.c (wait_for_inferior), thread.c (thread_switch),
- convex-tdep.c (set_thread_command), a29k-tdep.c (pop_frame),
- alpha-tdep.c (alpha_pop_frame), convex-xdep.c (core_file_command),
- h8300-tdep.c (h8300_pop_frame), h8500-tdep.c (h8300_pop_frame),
- hppa-tdep.c (hppa_pop_frame), i386-tdep.c (i386_pop_frame),
- i960-tdep.c (pop_frame), m68k-tdep.c
- (m68k_pop_frame), mips-tdep.c (mips_pop_frame), rs6000-tdep.c
- (push_dummy_frame, pop_dummy_frame, pop_frame), sh-tdep.c
- (pop_frame), config/arm/tm-arm.h (POP_FRAME),
- config/convex/tm-convex.h (POP_FRAME), config/gould/tm-pn.h
- (POP_FRAME), config/ns32k/tm-merlin.h (POP_FRAME),
- config/ns32k/tm-umax.h (POP_FRAME), config/tahoe/tm-tahoe.h
- (POP_FRAME), config/vax/tm-vax.h (POP_FRAME): Don't
- call create_new_frame.
- * corelow.c (core_open), altos-xdep.c (core_file_command),
- arm-xdep.c (core_file_command), gould-xdep.c (core_file_command),
- m3-nat.c (select_thread), sun386-nat.c (core_file_command),
- umax-xdep.c (core_file_command): Don't call create_new_frame; do
- call flush_cached_frames.
- * blockframe.c (reinit_frame_cache): Don't call create_new_frame
- or select_frame.
- C. Changes to get rid of stop_frame_address and instead only
- fetch the frame pointer when we need it.
- * breakpoint.c (bpstat_stop_status): Remove argument
- frame_address; use FRAME_FP (get_current_frame ()).
- * infrun.c (wait_for_inferior): Don't pass frame pointer to
- bpstat_stop_status.
- * infrun.c (wait_for_inferior): Use FRAME_FP (get_current_frame
- ()) instead of stop_frame_address.
- * infrun.c (save_inferior_status, restore_inferior_status),
- inferior.h (struct inferior_status): Don't save and restore
- stop_frame_address.
- * inferior.h, infcmd.c, thread.c (thread_switch), m3-nat.c
- (select_thread): Remove stop_frame_address and uses thereof.
- D. Same thing for the stack pointer.
- * infrun.c (wait_for_inferior): Remove stop_sp and replace
- uses thereof with read_sp ().
- E. Change to eliminate one nasty little spot where we were
- wanting to know the frame pointer from before the current step
- (idea from GDB 3.5, which saved my ass, because my other ideas of
- how to fix it were very baroque).
- * infrun.c: Remove prev_frame_address.
- * infrun.c (wait_for_inferior, step_over_function): Use
- step_frame_address instead of prev_frame_address.
- F. Same basic idea for the stack pointer.
- * inferior.h, infcmd.c: New variable step_sp.
- * infcmd.c (step_1, until_next_command): Set it.
- * infrun.c: Remove prev_sp and replace uses by step_sp.
- * infrun.c (wait_for_inferior): If we get out of the step
- range, then set step_sp to the current stack pointer before we
- start going again.
-
-Fri Oct 7 12:17:17 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * top.c (target_byte_order_auto): New static variable.
- (set_endian): Mention that ``auto'' is permitted.
- (set_endian_auto): New static function.
- (show_endian): Change message based on target_byte_order_auto.
- (set_endian_from_file): New function.
- (init_main): Add command ``auto'' to endianlist.
- * exec.c (exec_file_command): Call set_endian_from_file.
- * defs.h (set_endian_from_file): Declare.
-
-Thu Oct 6 18:10:41 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * nlm/i386.c (flush_i_cache): New function, does nothing.
- (frame_to_registers, registers_to_frame, set_step_traps,
- clear_step_traps, do_status): Make non-static.
-
-Thu Oct 6 12:26:42 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * config/mips/tm-mips.h (GDB_TARGET_IS_MIPS64): If not already
- defined, define as 0.
- (FIX_CALL_DUMMY): Rewrite to remove presumption that host and
- target are similar.
- * config/mips/tm-idt.h (TARGET_BYTE_ORDER_SELECTABLE): Define.
- * config/mips/tm-idtl.h (TARGET_BYTE_ORDER_SELECTABLE): Define.
- * config/mips/tm-idt64.h (TARGET_BYTE_ORDER_SELECTABLE): Define.
- (BREAKPOINT): Remove definition.
- * config/mips/tm-idtl64.h (TARGET_BYTE_ORDER_SELECTABLE): Define.
- (BREAKPOINT): Remove definition.
- * config/mips/tm-mips64.h (GDB_TARGET_IS_MIPS64): Define with a
- value of 1, rather than without a value.
- * config/mips/tm-bigmips64.h (GDB_TARGET_IS_MIPS64): Likewise.
- * mips-tdep.c: Rewrite uses of GDB_TARGET_IS_MIPS64 to switch at
- run time rather than at compile time.
-
- * remote-mips.c (break_insn): Remove.
- (BREAK_INSN, BREAK_INSN_SIZE): Define.
- (mips_insert_breakpoint): Use BREAK_INSN, not break_insn.
- (mips_remove_breakpoint): Likewise.
-
- * defs.h: If TARGET_BYTE_ORDER_SELECTABLE is defined by tm.h,
- define TARGET_BYTE_ORDER as target_byte_order, and declare
- target_byte_order as an extern int, and define BITS_BIG_ENDIAN as
- a test of TARGET_BYTE_ORDER.
- * top.c: Several additions if TARGET_BYTE_ORDER_SELECTABLE is
- defined:
- (endianlist, target_byte_order): New variables.
- (set_endian, set_endian_big, set_endian_little): New functions.
- (show_endian): New function.
- (init_cmd_lists): Initialize endianlist.
- (init_main): Add commands ``set endian big'', ``set endian
- little'', and ``show endian''.
- * a29k-pinsn.c: Rewrite uses of TARGET_BYTE_ORDER and
- BITS_BIG_ENDIAN to switch at run time rather than at compile time.
- * coffread.c, dwarfread.c, findvar.c, mips-tdep.c: Likewise.
- * remote-os9k.c, stabsread.c, valarith.c, valprint.c: Likewise.
- * values.c: Likewise.
-
-Wed Oct 5 11:41:24 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * nlm/configure.in: ${gdb_host_cpu} defaults to ${host_cpu}.
-
- * nlm/Makefile.in: Get rid of NWINCLUDES.
- * config/{alpha,powerpc}/gdbserve.mt: Remove NWINCLUDES.
- User should now configure with --with-headers.
-
-Mon Oct 3 07:48:34 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbserver/server.c (main): Silently accept all unrecognized
- requests and send back a zero length acknowledge. That is what
- *-stub.c do and is what remote.c expects.
-
-Mon Oct 3 05:11:47 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * corelow.c (core_open): Copy the modified to_sections_end
- vector from current_target to core_ops too.
-
- * gdbserver/server.c (main): Silently accept query requests
- and send back a zero length acknowledge.
-
-Fri Sep 30 17:17:21 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * nlm/Makefile.in: Don't define NWINCLUDES.
- * config/{alpha,powerpc}/gdbserve.mt: define NWINCLUDES.
-
-Fri Sep 30 15:59:55 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbserver/low-lynx.c (create_inferior): Pass all 4 args to ptrace.
-
-Fri Sep 30 06:42:42 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * lynx-nat.c (child_wait): Use status.w_status, not status, in
- arithmetic. status is a `union wait'.
-
- * config/nm-lynx.h (PTRACE_ARG3_TYPE): Define to int, not char *.
-
- * lynx-nat.c (child_wait): Pass fourth argument to ptrace.
-
-Thu Sep 29 08:22:27 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * xcoffread.c (read_xcoff_symtab): Fix comment for yesterday's change.
-
-Wed Sep 28 17:48:18 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * coffread.c (complete_symtab): If last_source_file is set upon
- entry, free it.
-
-Wed Sep 28 08:59:14 1994 Jim Kingdon (kingdon@cygnus.com)
-
- * xcoffread.c (read_xcoff_symtab, case C_FILE):
- Set main_aux before using it.
-
- * xcoffexec.c (exec_close): If quitting, don't call clear_symtab_users.
-
- * xcoffread.c (read_xcoff_symtab): Process XTY_LD symbols we were
- ignoring before. But continue to ignore XMC_DS.
-
-Wed Sep 28 00:35:23 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (hpread_read_array_type): Do not change the type code
- to TYPE_CODE_PTR for "char foo[]". Just make it a zero length
- array type.
-
- * hpread.c (hpread_type_translate): Handle T_UNS_LONG types with
- lengths other than 32bits (HP C 9.69 represents an "unsigned char"
- as an T_UNS_LONG with length 8).
-
- * hpread.c (struct hpread_symfile_info): Delete have_module field
- and accessor macro. Minor indentation fix.
- (hpread_build_psymtabs, case K_MODULE): Only start a new psymtab
- and reset state variables have_name & texthigh if pst is NULL.
- (hpread_build_psymtabs, case K_SRCFILE): Only reset the name of a
- partial symbol table if pst is non-NULL. If pst is NULL, then
- start a new psymtab.
- (hpread_process_one_debug_symbol, case K_MODULE): Now empty.
- (hpread_process_one_debug_symbol, case K_SRCFILE): Simplify and
- correct handling of subfiles.
-
-Mon Sep 26 02:59:00 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * defs.h (misc_command_type): Remove trailing comma from
- enumerator list.
-
-Sun Sep 25 23:19:58 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (frame_saved_pc): Fix thinko in code to dig saved pc
- out of an interrupt frame.
-
-Sun Sep 25 12:50:17 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * infcmd.c (do_registers_info) [INVALID_FLOAT]: Only use if
- defined.
- * values.c (unpack_double) [INVALID_FLOAT]: Ditto.
- * mips-tdep.c (mips_print_register): Don't test float validity.
- * config/a29k/tm-a29k.h, config/alpha/tm-alpha.h,
- config/arm/tm-arm.h, config/convex/tm-convex.h,
- config/h8300/tm-h8300.h, config/h8500/tm-h8500.h,
- config/i386/tm-i386v.h, config/i386/tm-sun386.h,
- config/i960/tm-i960.h, config/m68k/tm-m68k.h,
- config/m88k/tm-m88k.h, config/mips/tm-mips.h,
- config/ns32k/tm-merlin.h, config/ns32k/tm-nbsd.h,
- config/ns32k/tm-ns32km3.h, config/ns32k/tm-umax.h,
- config/pa/tm-hppa.h, config/pyr/tm-pyr.h,
- config/rs6000/tm-rs6000.h, config/sh/tm-sh.h,
- config/sparc/tm-sparc.h, config/z8k/tm-z8k.h (INVALID_FLOAT):
- Remove definition.
-
-Sun Sep 25 06:07:37 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * TODO: Remove item about adding general multi-threaded stuff;
- this is done.
- Remove item about specifying arbitrary locations of stack frames
- (this works on some machines).
- Remove item about debugging functions without a frame pointer
- (this works on some machines).
- Remove item about re-writing macros which handle frame chaining and
- frameless functions. They have been re-written at least once
- since that item was written.
- Remove item about gdb catching SIGINT when attached; this is done.
- Remove item about having list_command not read symbols--why bother?
-
-Sat Sep 24 17:40:10 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * TODO: Append contents of Projects file.
- * Projects: Remove.
-
-Sat Sep 24 01:47:25 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * corelow.c (add_solib_stub): Remove copying of to_sections,
- pass current_target to SOLIB_ADD. The Sep 10 change failed
- if SOLIB_ADD errored out, or if SOLIB_ADD was trying to access
- target memory.
- * corelow.c (core_open): After reading the shared libraries,
- copy the modified to_sections vector from current_target to
- core_ops, so that core_close can free it later.
- * config/rs6000/nm-rs6000.h, rs6000-nat.c (xcoff_relocate_core):
- Pass down target parameter from SOLIB_ADD and use it instead of
- directly accessing core_ops.
-
-Fri Sep 23 14:58:49 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * solib.c: *BSD systems need <a.out.h> to be included before
- <link.h>.
-
- * i386b-nat.c: Add i386_float_info(), etc.
- * config/i386/nm-nbsd.h: #define FLOAT_INFO.
-
- * config/nm-nbsd.h: New file, for generic NetBSD native support.
- * config/i386/nm-nbsd.h: Use it.
- * config/sparc/nm-nbsd.h: Use it.
- * config/ns32k/nm-nbsd.h: Use it.
-
- * configure.in (i386-*-netbsd): Use config/i386/nbsd.m[ht].
- (ns32k-*-netbsd): Use config/ns32k/nbsd.m[ht].
- * config/i386/{nbsd.mh,nbsd.mt,nm-nbsd.h,tm-nbsd.h,xm-nbsd.h}:
- New files, support for NetBSD/i386.
- * config/ns32k/{nbsd.mh,nbsd.mh,nm-nbsd.h,tm-nbsd.h,xm-nbsd.h}:
- New files, support for NetBSD/ns32k.
-
-Tue Sep 20 11:34:27 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * .gdbinit: Add list-objfiles command.
-
- * TODO: Reword item regarding NO_STD_REGS.
-
- * coffread.c (record_minimal_symbol, coff_read_enum_type,
- coff_read_struct_type): Allocate on symbol_obstack, not directly
- via malloc/savestring.
-
-Tue Sep 20 15:42:02 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * TODO: Add more items.
- * tests: Remove the directory and all of its (obsolete) contents.
-
-Tue Sep 20 11:34:27 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * coffread.c (init_stringtab): When copying length to stringtab,
- use target format, not host format, since that is what the rest of
- the code assumes.
-
-Mon Sep 19 15:48:10 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * Makefile.in: Removed prelude.o, i386-nlmstub.o, nlmstub.o,
- nlmstub.nlm, and nlmstub targets. Removed NWSOURCE and
- NWINCLUDES definitions.
- * i386-nlmstub.c: Removed.
-
-Mon Sep 19 07:48:36 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dbxread.c (read_dbx_dynamic_symtab): Cast bfd_asymbol_name to
- char * (from const char *) before assigning. Don't save string we
- pass to record_minimal_symbol (it already saves it).
-
-
-Sat Sep 17 02:26:58 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * cp-valprint.c (static_field_print): New variable, controls
- printing of static members.
- (_initialize_cp_valprint): New print set subcommand
- "static-members". Turn on printing of static members by default.
- (cp_print_value_fields): Print static members if necessary.
-
- * solib.c: Remove inclusion of libelf.h and elf/mips.h.
- (elf_locate_base): Use only standard BFD functions to collect
- information about the .dynamic section. Check for DT_MIPS_RLD_MAP
- tag only if it got defined via the inclusion of <link.h>.
-
- * f-exp.y: Write block for OP_VAR_VALUE.
- * f-valprint.c (info_common_command): Handle `info common'
- without an argument correctly.
-
- * c-typeprint.c (c_type_print_base): Handle template constructors.
- * symtab.c (gdb_mangle_name): Handle template method mangling,
- get rid of GCC_MANGLE_BUG code, which only applied to gcc-2.2.2.
-
-Fri Sep 16 16:06:08 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * gdbtypes.h (TYPE_INDEX_TYPE): New macro.
- * ch-typeprint.c, ch-valprint.c: Use TYPE_INDEX_TYPE.
- * ch-valprint.c (chill_val_print): Pass index type directly
- (instead of its TYPE_TARGET_TYPE) to print_type_scalar.
- * stabsread.c (read_type): Don't set TYPE_FLAG_TARGET_STUB
- if the index type is a stub.
-
-Fri Sep 16 17:18:44 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * config/i386/{i386aix.mh, i386bsd.mh, i386lynx.mh, i386sco.mh,
- i386sco4.mh, i386sol2.mh, i386v.mh, i386v32.mh, i386v4.mh,
- ncr3000.mh, ptx.mh, ptx4.mh}, config/m68k/{altos.mh, apollo68v.mh,
- delta68.mh, dpx2.mh, hp300bsd.mh, hp300hpux.mh, m68klynx.mh,
- m68kv4.mh}, config/m88k/{delta88.mh, delta88v4.mh},
- config/mips/riscos.mh, config/pa/hppahpux.mh,
- config/rs6000/rs6000lynx.mh, config/sparc/{sparclynx.mh,
- sun4sol2.mh}, config/tahoe/tahoe.mh, config/vax/{vaxbsd.mh,
- vaxult.mh, vaxult2.mh} (REGEX, REGEX1, SYSV_DEFINE): No longer
- define.
- * config/i386/i386sco4.mh (MUNCH_DEFINE): No longer define.
-
-Fri Sep 16 15:40:34 1994 Stu Grossman (grossman@cygnus.com)
-
- * defs.h (QUIT): Call interactive_hook to allow GUI to interrupt.
- Also, add decl for symtab_to_filename.
- * source.c (symtab_to_filename): New. Returns the file
- associated with a symtab.
- * top.c: Define interactive_hook. Called during QUIT to animate
- the GUI.
-
-Fri Sep 16 00:14:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * stabsread.c (read_type): Handle stub types for bitstrings.
- * stabsread.c (read_array_type): Check for stub domain type
- using TYPE_FLAG_STUB, not its length.
- * gdbtypes.c (create_set_type): Handle a stub domain type.
-
- * ch-exp.y: Get rid of some extra non-terminals, and move
- their rules into primitive_value.
- * parser-defs.h: Add comment about unary postfix operators.
- * ch-lang.c (chill_op_print_tab): Add '->', postfix and prefix.
- * expprint.c (print_subexp): Recognize unary postfix operator.
-
-Wed Sep 14 18:27:42 1994 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * remote-hms.c: use remote_debug instead of hms_silent toggle.
- Add warnings about depreciation of `snoop' cmd.
-
-Wed Sep 14 18:18:58 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * remote-hms.c (hms_read_inferior_memory): Cope when
- target sends both \r and \n.
-
-Wed Sep 14 17:14:57 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * remote-mips.c (mips_error): Place NORETURN macro correctly.
- * TODO: Add item about START_INFERIOR_TRAPS_EXPECTED.
-
-Wed Sep 14 14:26:21 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * xcoffread.c (read_xcoff_symtab): Fix obsolete comment about
- mst_solib_trampoline.
-
- * f-valprint.c (f_val_print): Change cast of valaddr from
- CORE_ADDR * to char **, since that is how it is used.
-
- * dbxread.c (read_dbx_dynamic_symtab): Save copy of symbol names
- using obsavestring, and pass that to prim_record_minimal_symbol.
- Having the objfile point to bfd_asymbol_name directly doesn't work
- if we save and restore a mapped symbol file.
-
-
-Tue Sep 13 18:23:26 1994 Rob Savoye (rob@darkstar.cygnus.com)
-
- * w89k-rom.c, op50-rom.c, monitor.c, config/pa/hppapro.mt: New files
- to add a generic ROM monitor interface, and support file for the
- WinBond W89K and the Oki OP50N PA based target boards.
-
-
-Sun Sep 11 22:34:57 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * config/pa/tm-hppa.h (REGISTER_NAMES): Use r26-r23 for arg0-arg3.
-
-Sun Sep 11 04:36:47 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * irix5-nat.c, osfsolib.c, solib.c (solib_add): Simplify last
- change by replacing `symbols_added' with `so_last'.
- * mdebugread.c (parse_external, parse_partial_symbols): Ignore
- global common symbols, they will be resolved by the runtime loader.
- * mdebugread.c (parse_symbol, parse_partial_symbols, cross_ref):
- Handle scSCommon like scCommon symbols.
-
-Sat Sep 10 01:43:28 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * corelow.c (add_solib_stub): Copy to_sections changes from
- core_ops to current_target after adding the shared libraries.
- * partial-stab.h (N_EXCL), dbxread.c (add_old_header_file,
- find_corresponding_bincl_psymtab): Change `repeated header not seen'
- error to a complaint, simplify complaint.
- * procfs.c (signalname, errnoname): Make `name' const.
- * symfile.c (reread_symbols): Use filename from old BFD to
- reopen the objfile.
- * values.c (record_latest_value): Don't record value in the
- history chain until we are sure there won't be an error.
-
-Fri Sep 9 15:52:09 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * nlm/Makefile.in: remove MMALLOC, READLINE, TERMCAP, and other
- cruft.
-
- * config/i386/gdbserve.mt: New file, defs for i386 nlm stub.
-
-Thu Sep 8 17:14:43 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * remote.c (fromhex): Make error more explicit.
- (read_frame): Don't print bad checksum information unless
- remote_debugging. Don't use repeat count unless it's > 0.
- * remote-e7000.c (expect): When echoing, ignore multiple newlines.
- (e7000_insert_breakpoint, e7000_remove_breakpoint, target_ops):
- Optionally cope with BC style breakpoints.
- (e7000_command): After command send directly to the E7000 mark
- registers as changed.
- (why_stop, e7000_wait: Understand BC style stop condition.
- * sh-tdep.c (sh_skip_prologue): Understand more complicated
- sequences. (frame_find_saved_regs): Likewise.
- * config/h8500/tm-h8500.h (target_write_pc, TARGET_WRITE_PC):
- Handle extra arg.
- * config/i386/xm-go32.h (GDBINIT_FILENAME): Set to gdb.ini.
- (more work here to come)
- * config/sh/tm-sh.h (EXTRA_FRAME_INFO): Add f_offset and leaf_function
- fields.
-
-Thu Sep 8 16:15:34 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * sparclite/Makefile.in: Assorted stuff needed for eload.
-
- * sparclite/eload.c: Merge in command line argument parsing and
- error message handling improvements orignally made to aload.c.
-
-Wed Sep 7 23:24:50 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * defs.h (enum misc_command_type, command_control_type): Enums
- for describing the command and control types.
- (struct command_line): Add new fields to keep track of the command
- type and body associated with the command.
- * top.c: Include value.h. Delete whitespace at the end of lines.
- (build_command_line, get_command_line): New functions.
- (execute_control_command, while_command, if_command): Likewise.
- (realloc_body_list, read_next_line): Likewise.
- (recurse_read_control_structure): Likewise.
- (execute_user_command): Call execute_control_command.
- (read_command_lines): Simplify by calling read_next_line, call
- read_control_structure for "if" and "while" commands.
- (free_command_lines): Free new fields in the command structure.
- (define_command): Reset control_level to zero.
- (init_main): Install command handlers for "if" and "while" commands.
-
-Tue Sep 6 16:24:07 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * c-typeprint.c (c_type_print_varspec_prefix,
- c_type_print_varspec_suffix): Add cases for Fortran type codes.
- * eval.c (evaluate_subexp): For OP_ARRAY expressions in Fortran,
- call f77_value_literal_string instead.
- * f_exp.y: Include <string.h>, move include of parser-defs.h.
- (parse_number): Translate 'd' floats to 'e' so atof() works.
- (yylex): Remove unused variables.
- * f-lang.c: Include <string.h>.
- (get_bf_for_fcn): Remove unused variable.
- * f-typeprint.c (f_type_print_varspec_prefix,
- f_type_print_varspec_suffix): Remove unused
- variables, add cases to switch statements.
- (f_type_print_base): Remove unused variables.
- * f-valprint.c (gdbcore.h, command.h): Include.
- (f77_get_dynamic_lowerbound, f77_get_dynamic_upperbound):
- Call read_memory_integer with correct number of arguments.
- (f77_get_dynamic_upperbound): Call f77_get_dynamic_lowerbound
- with correct argument type.
- (f77_print_array): Removed unused array array_size_array.
- (f_val_print): Don't use a CORE_ADDR as a char *.
- * valops.c (value_cast): Handle COMPLEX and BOOL types.
- (value_assign): Handle Fortran literal string and complex values.
- (f77_cast_into_complex, f77_assign_from_literal_string,
- f77_assign_from_literal_complex): New functions.
-
-Mon Sep 5 14:46:41 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * ch-typeprint.c (chill_type_print_base): Make TYPE_CODE_RANGE
- case more robust.
-
-Sun Sep 4 16:06:34 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * i960-tdep.c (signal.h): Don't include.
-
- * cxux-nat.c (target_is_m88110): Remove definition.
-
- * configure.in (config/nm-empty.h): If cross only, use instead
- of config/nm-trash.h.
- * config/nm-trash.h: Remove.
- * config/nm-empty.h: New file.
- * config/i386/nm-m3.h: New file, includes config/nm-m3.h.
- * config/mips/nm-m3.h: New file, includes config/nm-m3.h.
- * config/m68k/nm-sysv4.h: New file, includes config/nm-sysv4.h.
- * config/mips/nm-sysv4.h: New file, includes config/nm-sysv4.h.
- * config/sparc/nm-sysv4.h: New file, includes config/nm-sysv4.h.
-
-
-Fri Sep 2 17:35:55 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * configure.in: No longer look for nm, tm, and xm headers in
- config/<header>; they are always in config/<cpu>/<header>.
-
-Fri Sep 2 16:40:03 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * objfiles.c (allocate_objfile): Add the newly-created objfile to
- the end of the list of objfiles, instead of at the beginning.
-
- * xcoffread.c (allocate_include_entry): New function, abstracted
- from code in record_include_begin.
- (record_include_begin, record_include_end): Call it.
-
- * blockframe.c (reinit_frame_cache): Test inferior_pid instead of
- target_has_stack to decide whether to create a real stack frame
- for the cache.
-
- * coffread.c (process_coff_symbol) [CXUX_TARGET]: Ignore vendor
- section.
- * config/m88k/tm-cxux.h (CXUX_TARGET): Define.
-
- * h8300-tdep.c: Include "dis-asm.h" instead of <dis-asm.h>.
-
-Fri Sep 2 09:51:46 1994 J.T. Conklin (jtc@cygnus.com)
-
- * config/sparc/tm-nbsd.h: Add #defines to map NetBSD struct and
- field names into what is expected by sparc-nat.c.
-
-Thu Sep 1 17:32:54 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * c-typeprint.c (c_typedef_print): Add missing Chill support.
-
-Thu Sep 1 15:41:21 1994 Stu Grossman (grossman@cygnus.com)
-
- * rs6000-pinsn.c (print_insn): Use powerpc disassembler when
- doing Power PC.
- * config/powerpc/tm-ppc-nw.h: Define GDB_TARGET_POWERPC.
-
- * config/i386/i386lynx.mh, config/m68k/m68klynx.mh,
- config/rs6000/rs6000lynx.mh, config/sparc/sparclynx.mh: Enable
- ser-tcp.
-
- * nlm/Makefile.in: Get rid of NWSOURCE.
- * nlm/alpha-io.S (inVti, outVti): Remove extraneous ldha's.
- * nlm/gdbserve.o: Add dummy __main routine.
- * nlm/gdbserve.def: Turn on debug.
-
-Thu Sep 1 12:36:39 1994 Jim Kingdon (kingdon@cygnus.com)
-
- * config/xm-nbsd.h: Don't define SET_STACK_LIMIT_HUGE; it is obsolete.
-
-Thu Sep 1 11:01:40 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * config/tm-nbsd.h: New file, support for all NetBSD targets.
- * config/xm-nbsd.h: fix typo.
- * config/sparc/{nm,tm,xm}-nbsd.h: New files, renamed from
- {nm,tm,xm}-sparcnbsd.h to conform to prefered file naming
- conventions.
- * configure.in: (sparc-*-netbsd): use config/sparc/nbsd.m[ht].
-
-Wed Aug 31 14:40:33 1994 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * remote-udi.c (udi_read_inferior_memory,udi_write_inferior_memory):
- change typeo in error msg (`inferrior' -> `inferior').
-
-Wed Aug 31 09:17:02 1994 Jim Kingdon (kingdon@cygnus.com)
-
- * inflow.c (set_sigint_trap, clear_sigint_trap): Check for
- attach_flag (this check was performed by the callers). Also check
- inferior_thisrun_terminal.
- * inftarg.c (child_wait), lynx-nat.c (child_wait),
- procfs.c (wait_fd), symm-nat.c (child_wait): Don't check
- attach_flag in deciding whether to call set_sigint_trap and
- clear_sigint_trap.
-
- * value.h (struct value): Change literal_data from PTR to char *,
- since that is the way it is used.
-
-Tue Aug 30 21:56:54 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * somread.c (som_symfile_read): Force unwinds to be re-read after
- reading in a new partial symbol table.
-
-Tue Aug 30 13:14:16 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * config/h8500/tm-8500.h (DONT_USE_REMOTE): Remove definition,
- an obsolete conditional.
- * config/pa/tm-hppa.h (BREAKPOINT) [KERNELDEBUG]: Remove use,
- an obsolete conditional.
- * config/rs6000/rs6000.mh, config/rs6000/rs6000.mt: Clean up
- comments.
-
-Mon Aug 29 14:39:42 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * Makefile.in (ns32k-opcode.h): Remove reference.
- (ns32k-pinsn.o): Update dependencies.
- * ns32k-opcode.h: Remove file.
- * ns32k-pinsn.c (print_insn): Call version in libopcodes, remove
- all other code in this file.
-
-Mon Aug 29 12:04:07 1994 Stu Grossman (grossman@cygnus.com)
-
- * nlm/configure.in: Stop using cpu.c. Put it in TDEPFILES instead.
- * config/alpha/gdbserve.mt (TDEPFILES): Remove alpha-patch.o.
-
- * nlm/Makefile.in: Add rule for .S.o.
- * nlm/aio.h: Protect from multiple inclusions.
- * nlm/alpha-io.S: Remove everything we don't need.
- * nlm/{alpha-patch.c, alpha-patch.h, alpha-uart.c, alpha-uart.h}:
- Remove, no longer needed.
- * nlm/alpha.c: Merge in lots of stuff from previous files.
- * nlm/alpha.h: Don't #include alpha-patch.h. Make
- breakpoint_insn extern.
- * Move stuff from alpha-patch.h into here.
-
- * config/alpha/gdbserve.mt (TDEPFILES): Get rid of alpha-uart.o.
-
-Mon Aug 29 11:34:34 1994 Jim Kingdon (kingdon@cygnus.com)
-
- * annotate.c (annotate_starting): Flush output.
-
-Sat Aug 27 23:32:43 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symfile.c (symbol_file_add): Move reinit_frame_cache call to
- the callers of symbol_file_add. Gets rid of heuristic fence-post
- warnings on mips and alpha targets when the PC resides in a shared
- library which is not yet read in.
- * coff-solib.c (coff_solib_add), cxux-nat.c (add_shared_symbol_files),
- irix5-nat.c (solib_add), osfsolib.c (solib_add),
- remote-vx.c (vx_open), solib.c (solib_add):
- Add call to reinit_frame_cache after all shared libraries are read in.
- * remote-udi.c (udi_load), remote-vx.c (vx_load_command),
- symfile.c (symbol_file_command, add_symbol_file_command):
- Add call to reinit_frame_cache after symbol_file_add.
-
-Wed Aug 24 17:45:14 1994 J.T. Conklin (jtc@cygnus.com)
-
- * config/xm-nbsd.h: New file, support for all NetBSD ports.
- * config/sparc/{nm-sparcnbsd.h,tm-sparcnbsd.h,xm-sparcnbsd.h,
- sparcnbsd.mh,sparcnbsd.mt}: New files, support for NetBSD/sparc.
- * configure.in: Add sparc-*-netbsd target.
-
-Wed Aug 24 13:17:34 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * remote-vx.c (vx_attach): Interpret the command argument as an
- unsigned long.
-
-Wed Aug 24 13:08:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * configure.in: Change i[34]86 to i[345]86.
- * nlm/configure.in: Likewise.
- * gdbserver/configure.in: Likewise.
-
-Wed Aug 24 09:41:09 1994 J.T. Conklin (jtc@cygnus.com)
-
- * configure.in (i386-*-netware): Automatically configure nlm
- subdir.
-
-Tue Aug 23 17:51:13 1994 J.T. Conklin (jtc@cygnus.com)
-
- * nlm/gdbserve.c: conditionalize header file inclusion for either
- NetWare 4.0 or PIN targets.
- * nlm/i386.c: include appropriate header files.
- * nlm/prelude.c: define TERMINATE_BY_UNLOAD for NetWare 4.0
- targets.
-
-Tue Aug 23 16:54:16 1994 Stu Grossman (grossman@cygnus.com)
-
- * nlm/ppc.c (set_step_traps clear_step_traps): Cleanups.
- * nlm/gdbserve.def: Autoload clib.
-
-Tue Aug 23 12:05:19 1994 Jim Kingdon (kingdon@cygnus.com)
-
- * breakpoint.c (condition_command): Call breakpoints_changed.
-
- * gdbtypes.h: Declare f77_create_literal_string_type and
- f77_create_literal_complex_type.
- * valops.c (f77_value_literal_string, f77_value_substring,
- f77_value_literal_complex): Use xmalloc not malloc.
- * valops.c (f77_value_literal_string, f77_value_substring):
- Make addr char * not CORE_ADDR.
- * value.h (struct value): Add new field literal_data of aligner union.
- (VALUE_LITERAL_DATA): Use it.
- * f-lang.h: Declare find_common_for_function.
- * value.h, valops.c: Split VALUE_SUBSTRING_START into memaddr and
- myaddr fields of a union. Don't overload it with the frame field
- (not sure this is necessary; I'm not sure what lval_* codes
- VALUE_SUBSTRING_* can be used with).
-
-Mon Aug 22 11:45:01 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * config/a29k/{a29k-kern.mt,a29k-udi.mt,a29k.mt,ultra3.mh,
- ultra3.mt}: Clean up comments, remove no-longer-used definitions.
-
- * rs6000-nat.c: Include libbfd.h again, needed until reference
- to bfd_cache_lookup is cleaned out.
-
- * config/i386/linux.mh (XM_CLIBS): Add -lm.
-
-Mon Aug 22 10:42:15 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- Work to reduce the interrupts-off duration when running in DOS.
- * ser-go32.c: (dos_async_ready): See if anything is in the buffer.
- (dos_async_rx): rewrite to unpack as many characters from the
- asynctsr as possible into a local buffer.
-
-Fri Aug 19 14:55:45 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- Initial Fortran language support, adapted from work by Farooq Butt
- (fmbutt@engage.sps.mot.com).
- * Makefile.in: Add Fortran-related files and dependencies.
- * defs.h (language_fortran): New language enum.
- * language.h (_LANG_fortran): Define.
- (MAX_FORTRAN_DIMS): Define.
- * expression.h: Reformat to standard.
- (MULTI_F77_SUBSCRIPT, OP_F77_UNDETERMINED_ARGLIST,
- OP_F77_LITERAL_COMPLEX, OP_F77_SUBSTR): New expression opcodes.
- * gdbtypes.h (TYPE_CODE_COMPLEX, TYPE_CODE_LITERAL_COMPLEX,
- TYPE_CODE_LITERAL_STRING): New type codes.
- (type): New fields upper_bound_type and lower_bound_type.
- (TYPE_ARRAY_UPPER_BOUND_TYPE, TYPE_ARRAY_LOWER_BOUND_TYPE,
- TYPE_ARRAY_UPPER_BOUND_VALUE, TYPE_ARRAY_LOWER_BOUND_VALUE): New
- macros.
- (builtin_type_f_character, etc): Declare.
- * value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_START): Define.
- * f-exp.y: New file, Fortran expression grammar.
- * f-lang.c: New file, Fortran language support functions.
- * f-lang.h: New file, Fortran language support declarations.
- * f-typeprint.c: New file, Fortran type printing.
- * f-valprint.c: New file, Fortran value printing.
- * eval.c (evaluate_subexp): Add code for new expression opcodes,
- fix wording of error message.
- * gdbtypes.c (f77_create_literal_complex_type,
- f77_create_literal_string_type): New functions.
- * language.c (set_language_command): Add Fortran info.
- (calc_f77_array_dims): New function.
- * parse.c (length_of_subexp, prefixify_subexp): Add cases for new
- expression opcodes.
- * symfile.c (deduce_language_from_filename): Recognize .f and .F
- as Fortran source files.
- * valops.c (f77_value_literal_string, f77_value_substring,
- f77_value_literal_complex): New functions.
-
-Fri Aug 19 13:35:01 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * c-typeprint.c (c_print_type): Assume demangled arguments
- if a '(' is found in varstring, looking for ')' at the end of
- varstring did fail with demangled const member functions, which
- have a trailing `const'.
- * remote.c (get_offsets, putpkt): Change to `char' buffers,
- to avoid errors when compiling with DEC c89.
- (remote_wait): Cast to `char *' before passing buffer to
- fputs_filtered, to avoid errors when compiling with DEC c89.
- (remote_wait): Do not return inferior_pid by default, this
- statement is never reached, which causes warnings from some
- compilers.
- * stabsread.c (scan_file_globals): Ignore static minimal symbols.
- * symfile.c (load_command): If called with no argument, try
- to get the filename from the executable file.
- (generic_load): Remove check for NULL filename, it is done
- in load_command now.
-
-Fri Aug 19 10:36:15 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * Makefile.in (ALLDEPFILES): Add hpread.c.
- (hpread.o): Add dependencies.
-
- * somread.c: Do not include "aout/aout64.h". SOM has nothing to
- do with a.out.
- (BYTES_IN_WORD): Delete.
- (som_symfile_read): Call hpread_build_psymtabs to build any
- minimal symbols based on the HP C native debug symbols.
- (som_symfile_finish): Call hpread_symfile_finish.
- (som_symfile_init): Call hpread_symfile_init.
- * config/pa/tm-hppa.h (HPREAD_ADJUST_STACK_ADDRESS): Define.
- * hppa-tdep.c (hpread_adjust_stack_address): New function.
-
- * config/pa/hppabsd.mh (NATDEPFILES): Add hpread.o
- * config/pa/hppahpux.mh (NATDEPFILES): Likewise.
- * hpread.c: New file.
-
-Fri Aug 19 00:40:55 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (skip_trampoline_code): Revert incorrect change
- from June 2, 1994 (what was I thinking?!?). Fix it right this
- time.
-
-Thu Aug 18 17:01:35 1994 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * nlm/i386.c, nlm/i386.h: New files that contain i386 specific code.
-
-Thu Aug 18 14:39:46 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * README: Grammar improvements, clarifications, updates.
-
-Wed Aug 17 23:08:53 1994 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in (TARGET_FLAGS_TO_PASS): Pass down LD_FOR_TARGET and
- NLMCONV_FOR_TARGET. (SUBDIRS): Add nlm target.
- * configure.in (powerpc-*-netware*): Automatically configure nlm
- subdir.
- * nlm/Makefile.in: Add {CC NLMCONV LD}_FOR_TARGET. Remove alpha
- specific stuff. Make things more configurable.
- * nlm/configure.in: Add powerpc-*-netware* target. Use
- gdbserve.mt/cpu.c/cpu.h for target stuff. Get rid of tm/xm/nm.h
- files.
- * nlm/gdbserve.c: Move Alpha specific stuff into other files.
- Remove lots of architecture-specific stuff.
- * nlm/gdbserve.def: Add new imports.
- * nlm/ppc.c, nlm/ppc.h: New files that contain PowerPC specific code.
- * nlm/prelude.c: Don't include libhooks.h, get rid of call to
- register library.
- * nlm/prelude.o: What was this doing here?
- * config/alpha/gdbserve.mt: Defs for alpha nlm stub.
- * config/powerpc/gdbserve.mt: Defs for PowerPC nlm stub.
- * config/powerpc/ppc-nw.mt: Defs for PowerPC target for GDB.
- * config/powerpc/tm-ppc-nw.h: Ditto.
-
- * nlmstub.def: New file, contains imports for 386 nlm stub.
-
-Wed Aug 17 23:17:33 1994 Rob Savoye (rob@darkstar.cygnus.com)
-
- * remote-pa.c: New file for HPPA embedded support. Currently it's
- a copy of remote.c.
- * config/pa/hppabsd.mt,hppahpux.mt,hppaosf.mt: User remote-pa.c.
-
-Wed Aug 17 13:19:52 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * config/m68k/tm-delta68.h (EXTRACT_RETURN_VALUE,
- STORE_RETURN_VALUE): Define to use %a0 for pointers.
-
-Wed Aug 17 07:43:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-mips.c: Remove unused declaration of mips_load.
-
-Tue Aug 16 16:45:34 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * coffread.c: General cleanup, and support for section offsets.
- (time.h, sys/types.h, libbfd.h): Don't include.
- (cur_src_start_addr, cur_src_end_addr): Rename to
- current_source_start_addr, current_source_end_addr.
- (nlist_stream_global): Remove.
- (nlist_bfd_global): New global variable.
- (coff_symfile_read): Remove code that gets and uses fileno()
- directly.
- (read_coff_symtab, enter_linenos, process_coff_symbol): Add
- section_offsets parameter, add text/data section offset to
- appropriate symbols' values.
- (read_one_sym): Use bfd_read instead of fread.
- (init_stringtab, init_lineno): Change first parameter to a bfd,
- use bfd routines instead of raw I/O.
-
-Tue Aug 16 15:24:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symtab.c (decode_line_1): If funfirstline and we get a
- non-LOC_BLOCK symbol (e.g. variable or type), then error().
-
- * Makefile.in (TARFILES, NONSRC, SFILES_STAND, SFILES_KGDB):
- Remove; unused.
- (TAGFILES_NO_SRCDIR): Remove ALLPARAM.
- (HFILES_NO_SRCDIR): Remove all files in config sub-directory.
- (TAGS): Also pass result of find on config sub-directory to etags.
- (ALLPARAM): Remove; now unused.
-
-Sun Aug 14 13:05:26 1994 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (VERSION): Bump to 4.13.1
- * NEWS, README: Update to match gdb 4.13 release version.
-
-Sat Aug 13 08:22:50 1994 Fred Fish (fnf@cygnus.com)
-
- Harris CX/UX support, from Bob Rusk (rrusk@mail.csd.harris.com).
- * cxux-nat.c: Remove dangling #else block.
- (m88k_harris_core_register_addr): New function.
-
- * environ.c (init_environ): If no environment, do nothing.
-
-Fri Aug 12 19:30:53 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Delete rest of TODO list. Do not include "libbfd.h",
- <time.h>, <sys/types.h>, "demangle.h", <sys/file.h>,
- "expression.h", "language.h", "gdbtypes.h", "demangleh".
- Move all global variables into the private symbol table structure
- and add accessor macros. Update some comments.
- (hpread_build_psymtabs): Delete dbsubc_addr, we don't need it.
- (hpread_end_psymtab): New function to end a partial symbol table,
- all callers changed (no more bogus sharing with dbxread.c).
-
-Fri Aug 12 15:52:37 1994 Stu Grossman (grossman@cygnus.com)
-
- * remote.c (remote_wait): Return inferior_pid instead of 0 for
- `W` message.
-
-Fri Aug 12 11:47:10 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * sparclite/aload.c (sys_error, error): Use vfprintf for variable
- argument lists.
-
-Thu Aug 11 04:06:42 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * defs.h (concat, basename, buildargv, freeargv, strerrno, strsigno,
- errno_max, signo_max, strtoerrno, strtosigno): Delete.
- Include "libiberty.h" instead.
-
-Wed Aug 10 13:23:47 1994 Rick Sladkey (jrs@world.std.com)
-
- * i386v-nat.c (i386_insert_nonaligned_watchpoint):
- add additional argument specifying raw address to permit
- proper release of debug registers.
- (i386_insert_watchpoint, i386_insert_aligned_watchpoint):
- change all callers.
-
-Wed Aug 10 16:13:45 1994 Stu Grossman (grossman@cygnus.com)
-
- * defs.h, top.c: Use `extern' in declarations of GUI hooks, and
- define them in top.c. Add comments to the hooks.
-
-Wed Aug 10 15:57:43 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * remote-sim.c (gdbsim_ops): Set `to_insert_breakpoint' and
- `to_remove_breakpoint' fields.
-
-Wed Aug 10 15:46:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infcmd.c (run_command): Remove comment suggesting using
- target_has_execution instead of inferior_pid.
-
-Wed Aug 10 10:33:20 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * remote-mips.c (mips_open): add code to handle baud rate.
-
-Tue Aug 9 09:44:42 1994 Stu Grossman (grossman@cygnus.com)
-
- * infrun.c (wait_for_inferior): Call target_resume() upon
- detection of new processes.
-
- * procfs.c (create_procinfo): Return pointer to new procinfo
- structure.
- * (do_detach): Spacing & formatting cleanup.
- * (procfs_wait): Move wait_again label to ensure that we really
- wait again. On exit from fork, release new child from gdbs'
- clutches.
- * (procfs_set_sproc_trap): Enable trapping of fork and vfork.
-
-Mon Aug 08 15:34:13 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (hpread_process_one_debug_symbol): Fix block scoping
- problem (losing localvars on the close-brace instead of after
- the close brace).
-
-Mon Aug 8 15:09:32 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * i386-nlmstub.c (handle_exception): Wait until the thread has
- been started before killing the NLM by pointing the PC at
- _exit().
-
-Sat Aug 6 22:27:30 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/mips/tm-irix5.h (IN_SIGTRAMP): Redefine for Irix 5,
- Irix 5 has a standard _sigtramp signal handler.
- * irix5-nat.c (solib_add): Get rid of sigtramp_address handling,
- it is not needed for a standard _sigtramp signal handler.
- Add shared library sections to the section table of the target
- before adding the symbols.
- * mips-tdep.c (mips_skip_prologue): Do not skip load immediate
- instructions that do not prepare a stack adjustment.
- * regex.c (SIGN_EXTEND_CHAR): Update to emacs-19.25 definition,
- which does the right thing on machines where `char' is unsigned.
-
-Fri Aug 5 17:50:59 1994 Stu Grossman (grossman@cygnus.com)
-
- * remote.c (remote_open): Move setting of inferior_pid prior to
- call to remote_start_remote. Also use unique value for pid to
- avoid confusion with read_register_pid & friends.
- * (remote_wait): Return inferior_pid instead of 0 in all cases.
-
-Fri Aug 5 12:23:02 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * dwarfread.c (bfd.h): Don't include.
-
-Fri Aug 5 09:08:34 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * i386-nlmstub.c (handle_exception): Point the PC at _exit() to
- kill the program being debugged. KillMe(), the undocumented
- call intended for this purpose, causes the server to hang.
-
-Thu Aug 4 16:26:06 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * remote.c (read_frame): Calculate run length encoded checksum
- correctly.
- * config/sh/stub.c: New file.
-
-Thu Aug 4 14:34:12 1994 Stu Grossman (grossman@cygnus.com)
-
- * target.c (find_default_run_target): Make sure to_can_run is set
- before calling it.
-
-Thu Aug 4 11:46:27 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * TODO: Remove note about fast watchpoints and remove obsolete
- Mach stuff.
-
-Thu Aug 4 11:08:03 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * config/i386/xm-i386v4.h, config/m68k/xm-m68kv4.h,
- config/sparc/xm-sun4sol2.h (NORETURN): Don't define.
- * config/m88k/tm-cxux.h (ARCH_NUM_REGS): Undefine before defining.
-
-Thu Aug 4 10:26:36 1994 Stu Grossman (grossman@rtl.cygnus.com)
-
- * target.c (add_target): Don't call clean_target on target
- vectors anymore.
- * (unpush_target): Test for to_close being set before calling.
- * (target_xfer_memory, target_info): Check for to_has_memory
- before playing with memory.
-
- * remote.c (remote_open): Set inferior_pid to make kill command
- happy.
- * inflow.c (kill_command): Revert change of Aug 2. Use
- inferior_pid to determine whether to print out "The program is not
- being run." message.
-
-Thu Aug 4 07:55:04 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/i386/i386m3.mh (NAT_CLIBS): Add -lmachid and -lnetname.
- * m3-nat.c, config/nm-m3.h: #if 0 REQUEST_QUIT stuff.
- * m3-nat.c: Pass argument to return_to_top_level.
- Declare m3_kill_inferior before use.
- (port_chain_insert): In "can't happen" case, abort rather than
- setting `mid' to large decimal constant (which gcc warns about).
- (get_thread_name): Use cast to convert const char * to char *.
- (add_mach_specific_commands): #if 0 "thread break" command.
- (m3_trace_him): Call push_target.
- (mach_really_wait): New argument pid; remove unused
- variable pid.
- (intercept_exec_calls): Call target_terminal_init and
- target_terminal_inferior once the child execs.
- * infrun.c (proceed): Pass argument to PREPARE_TO_PROCEED.
-
-Wed Aug 3 22:41:13 1994 Tom Lord (lord@x1.cygnus.com)
-
- * procfs.c (procfs_mourn_inferior): don't dereference the
- procinfo pointer after it has been freed.
-
-Wed Aug 3 12:05:13 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * breakpoint.c (breakpoint_1): Improve pluralization in display
- of breakpoint hit counts.
-
- * language.h (struct language_defn): Remove unused field
- la_longest_float.
- (longest_float): Remove, no longer used.
- * language.c (unknown_language_defn, auto_language_defn,
- local_language_defn): Remove init of la_longest_float field.
- * c-lang.c (c_language_defn, cplus_language_defn,
- asm_language_defn): Ditto.
- * ch-lang.c (chill_language_defn): Ditto.
- * m2-lang.c (m2_language_defn): Ditto.
-
-Tue Aug 2 10:58:34 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * defs.h (bfd_read, bfd_seek): Remove declarations.
- * os9kread.c, rs6000-nat.c (libbfd.h): Don't include.
-
-Tue Aug 2 09:50:50 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * inflow.c (kill_command): Fix a bug which prevented target
- programs to be killed.
-
-Mon Aug 1 18:48:47 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * defs.h: Change two-line declarations to one-line form.
- (NORETURN): Define as "volatile" only for older GCCs.
- (ATTR_NORETURN): Define for newer GCCs.
- * procfs.c (proc_init_failed): Add ATTR_NORETURN to declaration.
-
-Mon Aug 1 16:43:24 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.c (mention), main.c (fputs_unfiltered): Add comments.
- * breakpoint.c (delete_breakpoint, enable_breakpoint,
- disable_breakpoint): Don't call breakpoints_changed; it is now
- called via the *_breakpoint_hook functions.
- * annotate.c (_initialize_annotate, breakpoint_changed): New functions.
-
-Mon Aug 1 13:38:04 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * stabsread.c (read_type): Fix a bug in enum size calculation.
-
-Mon Aug 1 01:36:13 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (compare_unwind_entries): Add "const" to both
- argument types to shut up GCC.
-
- * hppa-tdep.c (saved_pc_after_call): If the saved PC is in a
- linker stub, then return the address the stub will return to.
- (frame_saved_pc): Correctly restart the search for the saved
- pc when a linker stub is encountered.
-
- * hppa-tdep.c (inst_saves_gr): Handle 16 and 8 bit instruction
- register stores emitted by the version 9 HP compilers.
- (inst_saves_fr): Relax test for a specific base register (%r1);
- this avoids losing with the version 9 HP compilers.
- (skip_prologue): Try to skip argument stores emitted by the HP
- compilers. It's not perfect, but it's better than before.
-
-Fri Jul 29 23:20:30 1994 Stu Grossman (grossman@cygnus.com)
-
- * findvar.c (write_pc write_pc_pid): Remove casts to long when
- calling write_register_pid.
- * (write_register_pid): Add prototype.
-
-Fri Jul 29 21:56:23 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * remote.c (read_frame): Split readchar/checksum calculation into
- two parts since evaluation order is undefined.
-
-Fri Jul 29 13:46:08 1994 Fred Fish (fnf@cygnus.com)
-
- From Kevin A. Buettner (kev@cujo.geg.mot.com).
- * Makefile.in (coredep.o): Add inferior.h as dependency.
- * inflow.c: Add F_SETOWN to list of defines to check
- around code that uses F_SETOWN.
-
-Fri Jul 29 09:59:05 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): If using newlib,
- set the -L and -B directory prefixes so we can link with it.
-
-Thu Jul 28 14:37:36 1994 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in (INSTALLED_LIBS, CLIBS, DEPFILES): Add support for
- --enable-xxx configure option by adding ENABLE_{CLIBS DEPFILES}
- where appropriate.
-
- * General hackery to support alternate user-interface.
- * breakpoint.c (mention, delete_breakpoint, enable_breakpoint,
- disable_breakpoint): Call hooks for alternate user-interface.
- * defs.h: Add declarations for alternate user-interface hooks.
- * main.c (main): Add --nw (and --nowindows) options to disable
- the GUI.
- * (near call to command_loop): Call command_loop_hook if set.
- * (fputs_unfiltered): Call fputs_unfiltered_hook if set.
- * stack.c: Call print_frame_info_listing_hook if set.
- * top.c (gdb_init): Initialize targets.c and utils.c prior to
- other files to make sure that calls to error and warning will
- work. Call init_ui_hook after everything else.
- * utils.c (query): Call query_hook if set.
- * (gdb_flush): Call flush_hook if set.
- * Change _initialize_utils to initialize_utils cuz we don't use
- automatic initialization of utils.c anymore.
-
-
- * remote.c: Get rid of #ifdef DONT_USE_REMOTE. It's no longer
- necessary.
-
-Thu Jul 28 14:52:01 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Use newlib if it is
- there and we are using the gcc from the tree.
- (LD_FOR_TARGET): Look for ld in ../ld/ld.new.
-
-Thu Jul 28 10:43:36 1994 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (annotate.o): Add dependencies.
-
-Wed Jul 27 14:34:42 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * sparclite/aload.c: Added new -q (quiet) option.
- return 0 exit status if file was successfully downloaded.
-
- * nlm/gdbserve.c: merge in command line argument parsing changes
- and bug fixes made to i386-nlmstub.c.
-
- * i386-nlmstub.c: The returnLength field must be initialized
- before portConfig is passed to AIOGetPortConfiguration.
- Compare command line arguments with strnicmp(); args are
- case insensitive on netware.
-
-Wed Jul 27 09:24:19 1994 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (DISTSTUFF): Add definition.
- (diststuff): Add for new distribution support.
- (gdb.tar.Z, make-proto-gdb.dir, setup-to-dist,
- gdb-$(VERSION).tar.Z, make-proto-gdb-1, make-proto-testsuite.dir):
- Remove old distribution building rules, now uses standard
- distribution support in parent directory Makefile.in.
-
-Tue Jul 26 14:15:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * target.c (push_target): Cast result from xmalloc.
-
-Tue Jul 26 18:20:46 1994 Paul Flinders (ptf@smee)
-
- * elfread.c (elf_symtab_read): Discard compiler labels generated
- by the Solaris 2.1/Intel SunPro compiler.
-
-Mon Jul 25 18:19:24 1994 Stu Grossman (grossman@cygnus.com)
-
- * target.c (nomemory): Fix prototype and routine to take correct
- args.
-
-Mon Jul 25 15:38:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (clean): Remove libgdb-files.
-
-Mon Jul 25 11:50:57 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * coredep.c: Include inferior.h.
-
-Mon Jul 25 11:36:02 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * i386-nlmstub.c: Add support for NODE, PORT and BAUD command
- line arguments.
-
-Sat Jul 23 14:36:09 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * symfile.c (deduce_language_from_filename): Recognize .S as asm,
- .cp as C++, alphabetize better.
-
- * breakpoint.c (ignore, condition): Move usage note into body of
- help text, so first line can be one-line summary.
-
-Sat Jul 23 00:58:15 1994 Stu Grossman (grossman@cygnus.com)
-
- * target.c (unpush_target): Fix handling of removal of top target.
-
-Fri Jul 22 17:30:39 1994 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in: Add stuff to build nlmstub.
- * Add rule for annotate.o to keep Sun make happy.
- * configure.in: Add config for powerpc/Netware.
-
- * partial-stab.h (near N_SO): Don't call START_PSYMTAB with null
- filename. This speeds up handling of trailing N_SO stabs (they
- mark the end of a .o file).
-
- * target.c, target.h: Change the way pushing and popping of
- targets work to support target overlays and inheritance.
- * corelow.c, hppa-tdep.c, inflow.c, remote-nindy.c, utils.c:
- Fixup references to current_target, due to previous changes.
-
- * config/i386/tm-i386nw.h: Enable longjmp support. More work is
- needed to get the address of longjmp out of the target.
-
-Tue Jul 19 13:25:06 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * main.c: Include <ctype.h>.
-
-Mon Jul 18 15:32:17 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * remote-mips.c (mips_readchar): Fix a bug in checking <IDT>
- prompt.
-
-Mon Jul 18 14:26:35 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * solib.c (look_for_base): Don't deref exec_bfd if NULL.
-
-Sun Jul 17 15:38:36 1994 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (VERSION): Bump to 4.12.4.
-
-Sun Jul 17 12:20:35 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- Harris CX/UX support, from Bob Rusk (rrusk@mail.csd.harris.com).
- * configure.in (m88*-harris-cxux*): New configuration.
- * cxux-nat.c, config/m88k/cxux.mh, config/m88k/cxux.mt,
- config/m88k/xm-cxux.h, config/m88k/tm-cxux.h, config/m88k/nm-cxux.h:
- New files.
- * config/m88k/tm-m88k.h: Add comment about Harris OS.
- (TARGET_WRITE_PC): Pass pid through to register writers.
-
- * configure.in (m68*): Put vendor-only-specified host configs
- after vendor-and-os-specified configs.
- (m68*-atari-sysv4*, m68*-cbm-sysv4*): Replace with m68*-*-sysv4.
-
- * config/m88k/delta88.mh (MUNCH_DEFINE): Remove.
- * config/m88k/delta88.mt, config/m88k/delta88v4.mh: Format
- consistently.
-
-Sat Jul 16 23:39:17 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * elfread.c (elf_symtab_read): Handle error return from
- bfd_get_dynamic_symtab_upper_bound gracefully.
-
-Sat Jul 16 14:43:17 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * inferior.h (ARCH_NUM_REGS): New macro, actual number of
- registers in use by the inferior.
- * coredep.c (fetch_core_registers, register_addr): Use it.
- * findvar.c (registers_changed, registers_fetched,
- read_register_bytes): Ditto.
- * infcmd.c (do_registers_info, registers_info): Ditto.
- * infptrace.c (fetch_inferior_registers,
- store_inferior_registers): Ditto.
- * stack.c (frame_info): Ditto.
-
- * coredep.c (CORE_REGISTER_ADDR): New macro.
- (fetch_core_registers): Use it.
-
- * breakpoint.c (ignore, condition): Add usage notes to help strings.
- * symfile.c (add-symbol-file): Add usage note to help string.
- (add_shared_symbol_files_command): New command.
-
- gcc -Wall lint.
- * inferior.h (read_pc_pid): Declare.
- * breakpoint.c (watchpoint_check): Cache breakpoint in local
- variable b, remove unused variable other_type_used.
- * main.c (inferior.h, call-cmds.h): Include.
- (gdb_init): Declare.
- * remote.c (remote_wait): Return 0 by default.
-
-Fri Jul 15 16:43:33 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- Stop printing at null char option, from Oliver Meyer
- (omeyer@i3.informatik.rwth-aachen.de).
- * valprint.h, valprint.c (stop_print_at_null): New global.
- * valprint.c (_initialize_valprint): New print set subcommand
- "null-stop".
- * c-valprint.c (c_val_print): If stop_print_at_null is on, and
- printing a char array, adjust the number of chars to print.
-
-Fri Jul 15 14:33:40 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- From Kevin A. Buettner (kev@cujo.geg.mot.com).
- * m88k-tdep.c (examine_prologue): Modified to handle prologues for
- pic code in addition to prologues where an instruction from the
- prologue gets moved into the delay slot of a branch instruction
- immediately following the prologue. A table of potential prologue
- instructions (prologue_insn_tbl) is now used for picking apart a
- function prologue.
- (frame_find_saved_regs): Changed the way in which limit gets set
- so that the delay slot of branch instructions immediately
- following the prologue gets examined.
- (pushed_size, store_parm_word, store_parm, push_parameters,
- collect_returned_value): Deleted.
-
-Fri Jul 15 01:06:00 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * infrun.c (wait_for_inferior): Handle stepping into leaf
- functions whose prologue consists of gp loading code only.
-
-Thu Jul 14 14:22:12 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * dbxread.c: Don't include libbfd.h.
- * dwarfread.c, elfread.c somread.c: Don't include libbfd.h,
- <time.h>, or <sys/types.h>.
- * elfread.c (elf_symfile_read): Use only standard BFD functions to
- collect information about the stab and stab string sections.
-
-Thu Jul 14 13:17:39 1994 Kung Hsu (kung@x1.cygnus.com)
-
- * stabsread.c (read_huge_number): handle large unsigned number
- for stabs generated by os9k C compiler.
-
-Wed Jul 13 18:58:15 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- Breakpoint hit counts, from Bob Rusk (rrusk@mail.csd.harris.com).
- * breakpoint.h (hit_count): New breakpoint field.
- * breakpoint.c (show_breakpoint_hit_counts): New variable.
- (clear_breakpoint_hit_counts): New function.
- (bpstat_stop_status): Increment the hit count.
- (breakpoint_1): Display the hit count.
- * infcmd.c (run_command): Reset breakpoint hit counts.
- * target.c (generic_mourn_inferior): Don't clear ignore counts if
- displaying hit counts.
-
-Tue Jul 12 12:23:15 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * elfread.c (elf_symfile_read): Unconditionally add dynamic
- symbols for all symbol files. Makes skipping over the
- trampoline code work when stepping from a function in a shared
- library into a function in a different shared library for Irix 5.
- Other ELF targets do not have enough information in their
- dynamic symbol tables to make this work.
- (elf_symtab_read): Relocate mst_solib_trampoline address.
-
-Mon Jul 11 16:38:49 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- Atari support, from Uwe Seimet (seimet@chemie.uni-kl.de).
- * configure.in (m68*-atari-sysv4*): New configuration.
- (m68*-cbm-sysv4*): Use m68kv4 instead of amix.
- * m68k-tdep.c (R_PS): Define as R_SR if necessary.
- * config/m68k/m68kv4.mh, config/m68k/m68kv4.mt,
- config/m68k/tm-m68kv4.h, config/m68k/xm-m68kv4.h: New files.
- * config/m68k/amix.mh, config/m68k/amix.mt,
- config/m68k/tm-amix.h, config/m68k/xm-amix.h: Removed, superseded
- by m68kv4 files.
-
-Sat Jul 9 16:28:43 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symtab.c (find_function_start_sal): New function to find
- the start of a function from a function symbol.
- (decode_line_1, decode_line_2): Use it instead of open coded
- partial copies of the code.
- (list_symbols): Quote symbol name before passing it to
- break_command to enable proper handling of mangled symbols.
-
-Wed Jul 6 20:22:07 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * ch-exp.y (match_simple_name_string): Don't lower-case here.
- * ch-exp.y (yylex): First try name lookup using exact name
- typed by user; if that fails, try lower-cased name.
-
-Wed Jul 06 12:39:07 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: More cleanups. Delete lots of trailing whitespace.
- Remove some items from the TODO list and notes throughout code
- for things which need fixing. Add more comments.
- Document bogus struct symloc sharing with dbxread.c. Delete more
- useless variables. Add more PARAM prototypes. Fixup more
- indention problems that have crept in.
- (SET_NAMESTRING): Accept new namep and objfile arguments so that
- it doesn't depend on the variable names on the procedures it's
- used from.
- (hpread_symfile_init): Delete incorrect checks for bogus sizes of
- the debug sections.
-
-Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dbxread.c, elfread.c, mipsread.c, nlmread.c, os9kread.c:
- Move "no debugging symbols found" test to symfile.c.
- * symfile.c (syms_from_objfile, reread_symbols): Add
- "no debugging symbols found" test.
- * coffread.c (init_stringtab): Handle stripped files with a
- stringtab offset of zero gracefully.
- * osfsolib.c (solib_create_inferior_hook): Use DYNAMIC flag from
- BFD instead of stop_pc heuristic to determine if it is a dynamically
- linked object file.
- * procfs.c (wait_fd): Handle ENOENT error return from PIOCWSTOP
- ioctl, it indicates that the process has exited.
-
-Mon Jul 04 19:48:03 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (hpread_symfile_init): Make sure to initialize all the
- private data to zero. Not having any HP C debug symbols is not an
- error. Just return.
-
-Mon Jul 4 19:28:56 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (read_unwind_info): ELF unwind information is in the
- .PARISC.unwind section now.
-
-Mon Jul 4 17:06:26 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * breakpoint.c (mention): Always show breakpoint address if no
- source file.
-
-Sat Jul 2 01:51:33 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * solib.c (bfd_lookup_symbol, look_for_base): Reinstate to reenable
- handling of shared libraries for non-ELF executables, but only if
- HANDLE_SVR4_EXEC_EMULATORS is defined.
- (locate_base): Try to find debug_base in the dynamic linker
- for non-ELF executables if HANDLE_SVR4_EXEC_EMULATORS is defined.
- * config/sparc/tm-sun4sol2.h (HANDLE_SVR4_EXEC_EMULATORS):
- Define to enable handling of shared libraries for a.out executables,
- run under Solaris BCP.
-
-Fri Jul 01 19:50:21 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c: Change contribution notice to the Cygnus/Utah agreed
- upon notice. Delete some stuff from the TODO list. Rework
- many comments to be clearer. Major cleanups. Consistently
- use "hpread_" prefix. Delete unnecessary macros, structures
- variables, fiels, functions and #if 0 code. Mark code which
- still needs to be cleaned up. PARAMize and make most functions
- static. Fix error checking when reading in the debug section
- contents. No more minimal symbol table handling in this code!
-
-Thu Jun 30 13:59:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c (wait_for_inferior): Print "Program exited normally"
- regardless of batch_mode.
- * defs.h, top.c (batch_mode): Removed.
-
-Wed Jun 29 18:53:36 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * Makefile.in (dcache_h): Remove redundant definition.
- (init.c): Add a comment.
- (top.c): Remove explicit compile action.
- * breakpoint.c (mention): Share code indicating location of
- break/watchpoints, don't print address if addressprint is off.
- * breakpoint.c, c-typeprint.c, c-valprint.c, energize.c, symtab.h
- (demangle): Remove redundant declarations.
- * eval.c: Remove redundant function declarations.
- * objfiles.h: Cosmetic and grammatical improvements.
- * TODO: Various updates.
-
- * remote-mips.c: Replace all \r chars with \015.
- (mips_receive_header): Display control characters readably.
- (mips_xfer_memory): Add a simple progress display.
-
-Wed Jun 29 13:11:45 1994 Steve Chamberlain (sac@cirdan.cygnus.com)
-
- * remote-e7000.c (e7000_open): Don't try a tcp open if we're
- using go32.
- * remote-hms.c (flush): New function.
- (expect): Get edge case right.
- (hms_read_inferior_memory): Be more tolerant of line noise.
-
-Tue Jun 28 14:17:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * configure.in: Use i386m3.mh and i386m3.mt as names of host and
- target files, not non-existent mach3.mh and mach3.mt.
-
-Wed Jun 29 00:26:17 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dbxread.c (dbx_symfile_read): Unconditionally add dynamic
- symbols for all symbol files. Makes skipping over the
- trampoline code work when stepping from a function in a shared
- library into a function in a different shared library.
- (read_dbx_dynamic_symtab): Relocate mst_solib_trampoline address.
-
-Tue Jun 28 15:28:01 1994 Stu Grossman (grossman@cygnus.com)
-
- * dbxread.c, partial-stab.h (near N_SO): SO stabs with blank
- names mean end of .o file.
- * infrun.c (wait_for_inferior): Clean up multi-thread logic near
- top of routine. Handle new thread notification cleanly.
- * lynx-nat.c (child_wait): General cleanups, handle new LynxOS
- thread notification scheme.
- * (child_resume): General cleanups, handle resumption of all
- threads properly.
-
-Mon Jun 27 09:57:23 1994 Steve Chamberlain (sac@cirdan.cygnus.com)
-
- * ser-go32.c: Rewrite to run under windows.
- * ser-e7kpc.c: New file to support the E7000 with the PC ISA
- bus interface.
- * serial.c (serial_open): Notice device "pc".
- * remote-e7000.c: Fix copyright date.
- (expect): Compare \n and \r the same.
- (e7000_open): Allow pc as a serial port
- * sh/sh.mt: Add ser-e7kpc.
- * h8300/h8300hms.mt: Add ser-e7kpc.
- * main.c (proc_wait): Don't wait if using go32.
-
-Mon Jun 27 00:35:51 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * somread.c: Simplify by using stabsect_build_psymtabs.
- * dbxread.c (stabsect_build_psymtabs): New argument "text_name"
- corresponding to the name of the text section. All references
- changed.
- (somstab_build_psymtabs): Delete function, no longer needed.
-
-Sun Jun 26 23:54:08 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * somread.c: Renamed from paread.c. Changed function names and
- comments to reflect that this file deals with SOM (an object file
- format), rather than the PA (a cpu).
- (Makefile.in): Chaned appropriately.
- (config/pa/hppabsd.mh, config/pa/hppahpux.mh): Likewise.
- * dbxread.c (somstab_build_psymtabs): Renamed from
- pastab_build_psymtabs.
-
-Fri Jun 24 08:15:42 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * core-sol2.c: New file to handle ELF and BCP core file flavours.
- * config/sparc/sun4sol2.mh (NATDEPFILES): Use it instead of
- core-svr4.
- * Makefile.in: Updated for core-sol2.c.
- * README: Add notes about SPARCworks cc under Solaris 2.x,
- from Casper H.S. Dik (casper@fwi.uva.nl).
- * config/mips/xm-makeva.h: Removed, no longer necessary.
- * Makefile.in, config/mips/xm-irix3.h, config/mips/xm-irix5.h,
- config/mips/xm-mips.h, config/mips/xm-news-mips.h,
- config/mips/xm-riscos.h: Remove references to xm-makeva.h
-
-Wed Jun 22 17:48:21 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdba.el: Put program input and output in a separate buffer.
-
-Wed Jun 22 16:54:15 1994 Fred Fish (fnf@cygnus.com)
-
- * energize-patches, main.c (main), top.c (gdb_init, pwd_command),
- top.h: Change all occurances of dirbuf to gdb_dirbuf. Collides
- with global variable of same name in libnsl.so on UnixWare.
-
-Wed Jun 22 14:40:52 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * symtab.c (decode_line_1): fix a bug in dealing with '<>'
- embedded in template name.
-
-Tue Jun 21 14:06:46 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * config/i386/nm-linux.h: change calling convention of
- TARGET_CAN_USE_HARDWARE_WATCHPOINT() and
- target_insert_watchpoint() and
- target_remove_watchpoint().
-
- * config/mips/tm-mips64.h: define FORCE_LONG_LONG to force LONGEST
- to be long long in gdb.
- * config/mips/tm-bigmips.h: ditto.
-
-Mon Jun 20 23:54:37 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * c-lang.c (asm_language_defn): New definitions for language_asm,
- mostly copied from c_language_defn, to avoid warnings when
- switching between c and asm stack frames.
-
-Mon Jun 20 13:51:55 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * mdebugread.c (parse_symbol): Don't call ecoff_swap_tir_in or
- ecoff_swap_rndx_in directly; use the debug_swap pointer instead.
- (upgrade_type, handle_psymbol_enumerators): Likewise.
- (has_opaque_xref, cross_ref): Likewise.
- (elfmdebug_build_psymtabs): Call swap->read_debug_info to read
- debugging information, rather than doing it here.
- * mipsread.c (mipscoff_symfile_read): Call read_debug_info entry
- point in ecoff_debug_swap backend structure, rather than calling
- ecoff_slurp_symbolic_info directly.
-
-Fri Jun 17 20:58:58 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.c: Include annotate.h. Call annotate_field rather
- than printing annotation directly.
-
- * main.c: Include string.h.
-
-Thu Jun 16 14:41:37 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * fork-child.c (startup_inferior) [STARTUP_INFERIOR]: If defined,
- call it instead of doing normal loop.
- * infcmd.c (attach_command): Don't call wait_for_inferior if
- running Mach 3.
- * infrun.c (proceed) [PREPARE_TO_PROCEED]: If defined, call
- hook that can decide whether to step over the next breakpoint.
- * utils.c (wrap_here): Abort if wrap_buffer not allocated.
- (request_quit) [REQUEST_QUIT]: If defined, call it instead of
- doing normal quit.
-
- * configure.in: Improve sorting/formatting of hosts and targets.
- (i[34]86-*-mach3*, i[34]86-*-osf1mk*, mips-*-mach3*,
- m88*-*-mach3*, ns32k-*-mach3*): Recognize.
- * Makefile.in (stop-gdb): New target.
- * stop-gdb.c: New file, utility to get attention of waiting GDBs
- in Mach 3.
-
-Wed Jun 15 00:41:03 1994 Tom Lord (lord@rtl.cygnus.com)
-
- * top.c (gdb_init): Init current_directory in gdb_init. Probably
- the identical initialization can be deleted from main.c, but i
- haven't done so just in case.
-
-Tue Jun 14 17:24:41 1994 Tom Lord (lord@x1.cygnus.com)
-
- * gdba.el: Added menu windows and slightly improved window
- handling to gdba.el. Fixed numerous minor bugs that were causing
- emacs and gdb to fall out of sync.
-
-Tue Jun 14 16:18:44 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * breakpoint.c: annotate changes lost at merge, put back in.
-
-Mon Jun 13 17:28:50 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * config/i386/i386sco.mh, i386sco4.mh (XDEPFILES): Remove
- i387-tdep.o.
-
-Sun Jun 12 03:51:52 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/m68k/dpx2.mh (NATDEPFILES): Remove duplicate inclusion
- of inftarg.o.
- * config/m68k/tm-dpx2.h (CANNOT_STORE_REGISTER): Define to inhibit
- writing of floating registers, the dpx2 kernel disallows it.
- * irix5-nat.c (LM_ADDR): The loaded address of the shared library
- is contained in o_praw.
- * irix5-nat.c (solib_map_sections): Adjust sections by the
- difference between the loaded address and the prelinked address.
- * irix5-nat.c (solib_address): Use LM_ADDR for the loaded start
- address.
- * mdebugread.c (parse_symbol): Do not relocate stEnd/scText
- symbols, their value is absolute.
- * mdebugread.c (parse_partial_symbols): Handle Irix 5.2 shared
- libraries fh->adr fields of zero. Relocate minimal symbol values
- upon readin. Relocate non-stabs symbols upon readin.
- * mdebugread.c (psymtab_to_symtab_1): Use pst->textlow for the
- start address of the outermost block.
- * mdebugread.c (parse_lines, parse_procedure): Pass in pst
- instead of section_offsets and use relocated pst->textlow for
- line number and procedure address relocations.
-
- From gmo@MicroUnity.com (Guillermo A. Loyola):
- * mdebugread.c (parse_symbol, parse_partial_symbols, cross_ref):
- Handle SGI Irix5 stIndirect symbol type.
-
-Fri Jun 10 14:52:56 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * breakpoint.c: fix a syntax error native cc does not like.
-
- * Makefile.in: change sparclite-tdep.c to sparcl-tdep.c.
- * sparclite/Makefile.in: ditto.
- * sparcl-tdpe.c: change file name because first 8 chars has to be
- unique.
- * sparcl-stub.c: ditto.
-
- * sparclite/Makefile.in: fix INCLUDE_CFLAGS to have {srcdir}/../config.
-
-Fri Jun 10 10:38:15 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (target_read_pc, target_write_pc): Accept (and
- ignore) a PID argument.
- (hppa_pop_frame): Pass a PID to target_write_pc.
- * config/pa/tm-hppa.h (TARGET_READ_PC, TARGET_WRITE_PC): Accept
- and pass through a PID argument.
- (target_read_pc, target_write_pc): Update prototypes.
-
-Thu Jun 9 18:10:44 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * Makefile.in: add new file sparclite-tdep.c.
- * sparclite/Makefile.in: add new file sparclite-stub.c.
- * sparclite/hw_breakpoint.note: note for SPARClite hardware breapoint
- support.
- * config/sparc/sparclite.mt: add sparclite-tdep.o.
- * config/sparc/tm-sparclite.h: add hardware breakpoints support
- defiines and code.
- * sparclite-tdep.c: new file, contains hardware breakpoint support
- code.
- * sparclite-stub.c: new file, stub code that add support hardware
- breakpoint support.
- * breakpoint.c: add hardware breakpoint support.
- * breakpoint.h: add new breakpoint type to support hardware
- breakpoint.
- * config/mips/nm-irix4.h: change interface for target dependent
- code supporting watch point.
- * config/pa/nm-hppab.h: change interface for target dependent
- code supporting watch point.
-
-Thu Jun 9 14:59:58 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * remote-os9k.c (rombuf_command): fix a bug accepting rombug
- output.
- * stabsread.c (read_struct_fields): os9k nested structure does not
- have terminating ';', instead it just get to ',' and bit position
- and length.
-
-Wed Jun 8 23:20:45 1994 Stu Grossman (grossman@cygnus.com)
-
- * nlmread.c (nlm_symtab_read): Clean up a bit.
- * (nlm_symfile_read): Record bounds of main() so that backtrace
- command will know where to stop.
- * objfiles.c (objfile_relocate): Relocate entry point/func info
- for backtrace as well.
- * objfiles.h: Define values for invalid PCs for entry point info.
- * symfile.c (init_entry_point_info): Initialize invalid values
- with aforementioned macros.
- * config/alpha/tm-alphanw.h: Turn on FRAME_CHAIN_VALID_ALTERNATE
- to cause backtrace to stop when it gets back to main().
- * config/i386/tm-i386nw.h: Ditto.
-
-Sat Jun 4 18:17:03 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- Fix value_print, which used to be ostensibly language-independent,
- but would print pointers and arrays in C syntax. Instead, call
- a language-specific function.
- * language.h (struct language_defn): New functional field
- la_value_print.
- (LA_VALUE_PRINT): New macro.
- * language.c (unk_lang_value_print): New stub/dummy function.
- (unknown_language_defn, auto_language_defn, local_language_defn):
- Use it.
- * c-valprint.c (c_value_print): New function, with code moved from:
- * valprint.c (value_print): ... here. Now just invoke
- LA_VALUE_PRINT to do language-specific stuff.
- * valprint.c (value_print_array_elements): Make non-static.
- * c-lang.c (c_language_defn, cplus_language_defn): Add
- c_value_print in the la_value_print field.
- * m2-lang.c (m2_language_defn): Likewise.
- * ch-lang.c (chill_language_defn): But here use chill_value_print.
- * ch-valprint.c (chill_val_print): Print null pointer as NULL.
- * ch-valprint.c (chill_value_print): New function, based on
- c_value_print, but use Chill "look and feel."
- * c-lang.h (c_value_print): New prototype.
- * ch-lang.h (chill_value_print): New prototype.
- * value.h (value_print_array_elements): New prototype.
-
- * ch-valprint.c (chill_val_print, case TYPE_CODE_BITSTRING
- and case TYPE_CODE_SET): Check that the element type isn't a stub.
-
-Fri Jun 3 09:15:00 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * main.c: Move entire file except for #ifndef MAIN_OVERRIDE code
- to new file top.c. Make things extern instead of static and
- similar rearrangements to deal with this.
- * top.h: New file.
- * utils.c: Move fputs_unfiltered to main.c. Remove
- FPUTS_UNFILTERED_OVERRIDE ifndef.
- * Makefile.in: Change so that gdb uses main.c, utils.c, and top.c,
- and libgdb uses utils.c and top.c.
-
-Thu Jun 2 23:19:10 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (skip_trampoline_code): Fix typo.
-
-Thu Jun 2 18:09:59 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * ch-valprint.c (chill_val_print_array_elements): New function.
- A Chill version of val_print_array_elements, it prints the
- array index labels, in additions ot the array element values.
- (chill_val_print): Use the new function.
-
-Thu Jun 2 08:50:00 1994 Stu Grossman (grossman@cygnus.com)
-
- * configure.in: Add nlm subdir to configdirs for alpha-*-netware
- target.
- * defs.h (enum language): Add language_asm.
- * findvar.c (read_register_bytes read_register_gen
- write_register_bytes read_register read_register_pid
- write_register write_register_pid supply_register): Move multi-
- thread handling down into these routines. Create XXX_pid routines
- that allow register references to specify the pid.
- * findvar.c infcmd.c (read_pc read_pc_pid write_pc write_pc_pid
- read_sp write_sp read_fp write_fp): Move these routines from
- infcmd to findvar to centralize the whole mess.
- * i386-nlmstub.c: Portability fixes.
- * infptrace.c (child_resume): Conditionalize to allow other natives
- to override it. Remove PIDGET gubbish, it's no longer necessary.
- * infrun.c (wait_for_inferior): Put registers_changed() before
- target_wait() to speed up remote debugging.
- * Replace code that reads registers from other threads with much
- nicer looking new function calls (see changes to findvar.c).
- * Don't skip prologues if debugging assembly source.
- * lynx-nat.c (child_resume): Lynx now needs it's own version of
- child_resume to handle multi-thread debugging properly.
- * remote.c: Add O response to get console output from target.
- * (readchar): Add timeout parameter. Handle SERIAL_EOF and
- SERIAL_ERROR here to simplify callers.
- * Change static var timeout to remote_timeout.
- * (fromhex): Remove unnecessary return -1 at end of routine.
- * (remote_wait): Turn this into a big switch statement. Add
- support for O response.
- * (putpkt): Remove unnecessary handling of SERIAL_EOF/ERROR.
- * (getpkt): Split getpkt into two parts. read_frame deals with
- all formatting issues, run-length encoding, and framing. getpkt
- now handles error recovery, and frame detection.
- * ser-tcp.c (tcp_readchar): Handle EINTR from read().
- * ser-unix.c (hardwire_raw): Set CLOCAL so that we ignore modem
- control. (hardwire_readchar): Handle EINTR from read().
- * symfile.c (deduce_language_from_filename): Add support for .s
- files.
- * config/nm-lynx.h: Define CHILD_WAIT so that lynx-nat.c can
- override infptrace's child_wait.
- * config/rs6000/rs6000lynx.mh: Use xm-rs6000ly.h & nm-rs6000ly.h
- instead of XXXlynx.h.
- * config/rs6000/rs6000lynx.mt: Use tm-rs6000ly.h instead of
- tm-rs6000lynx.h.
- * nlm/gdbserve.c: Portability fixes.
-
-Tue May 31 20:35:44 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * inftarg.c (child_wait): Call proc_wait, not wait.
- (child_mourn_inferior): Call proc_remove_foreign.
- * main.c (gdb_init): Call init_proc.
- * main.c: Provide dummy versions of init_proc, proc_wait, and
- proc_remove_foreign for the gdb case (the libgdb case provides its
- own versions of these functions).
- * Makefile.in (libgdb-files): Add libproc.a.
-
-Wed Jun 1 11:08:52 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- Hardware watchpoints for Linux, from Rick Sladkey
- (jrs@world.std.com).
- * infrun.c (wait_for_inferior) [HAVE_CONTINUABLE_WATCHPOINT]: Add
- new hardware breakpoint recovery method.
- * i386v-nat.c (i386_insert_watchpoint,
- i386_insert_nonaligned_watchpoint, i386_remove_watchpoint,
- i386_stopped_by_watchpoint) [TARGET_CAN_USE_HARWARE_WATCHPOINT]:
- New functions to support the 386 hardware debugging registers.
- * config/i386/nm-linux.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT,
- HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT,
- target_insert_watchpoint, target_remove_watchpoint): Define these
- macros to use the hardware debugging functions in i386v-nat.c.
-
-Wed May 25 17:06:15 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in: Replace libgdb.a with libgdb-files. Make "all"
- build it.
-
-Thu May 19 09:56:20 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * target.c, target.h: New variables target_activity_function and
- target_activity_fd.
- * inflow.c, inferior.h: New functions set_sigio_trap and
- clear_sigio_trap.
- * inftarg.c (child_wait), procfs.c (wait_fd): Call them.
-
-Wed May 18 13:01:55 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * remote-sim.h (sim_verbose): Delete.
- Document callbacks needed.
- (sim_*): Change result to void where there isn't one.
- (sim_open): Clarify argument and error response.
- (sim_close): Declare.
- (sim_load): Change bfd_handle argument to file name. Clarify result.
- (sim_create_inferior): Renamed from sim_set_args.
- (sim_set_pc): Delete.
- (sim_info): Delete printf_fn argument.
- * remote-sim.c (gdbsim_kill): Add comment describing purpose.
- (gdbsim_load): Try sim_load first.
- (gdbsim_create_inferior): Call sim_create_inferior.
- (gdbsim_open): Handle args == NULL. Update call to sim_open.
- (gdbsim_close): Call sim_close.
- (gdbsim_files_info): Update call to sim_info.
- (gdbsim_ops): Realign comments.
-
- * printcmd.c (decode_format): Allow TARGET_PTR_BIT to be non-constant.
-
-Tue May 17 16:45:20 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * xcoffread.c (read_xcoff_symtab): For C_FILE symbols, only use
- the auxent if the symbol's name is ".file". From David Edelsohn
- <c1dje@watson.ibm.com>.
-
-Tue May 17 11:08:22 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.c (breakpoint_1): Fix typo.
-
- * annotate.c (annotate_field_end): Fix typo.
-
- * Makefile.in: Move annotate.o from COMMON_OBS to OBS.
-
- * Makefile.in (TSSTART): Remove; no longer used.
-
- * utils.c (vfprintf_maybe_filtered, vfprintf_unfiltered): Call
- fputs_unfiltered and exit directly, rather than fatal. The latter
- calls vfprintf_unfiltered!
-
- * gdbtypes.h, gdbtypes.c (can_dereference): New function.
- * value.h, printcmd.c (print_value_flags): Move from here...
- * annotate.c: ...to here, and make it use can_dereference.
-
-Sat May 14 15:13:52 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * inflow.c (job_control, attach_flag, generic_mourn_inferior):
- Remove, needed for both native and cross.
- * target.c (attach_flag, generic_mourn_inferior): Put here.
- * utils.c (job_control): Put here.
- (terminal.h): Don't include anymore.
-
-Sat May 14 09:11:44 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * source.c (find_source_lines): Always use code that was #ifdef
- BROKEN_LARGE_ALLOCA. Do the cleanup before returning, rather than
- leaving it on the chain. Reindent much of this function.
- * config/sparc/{xm-sun4sol2.h,xm-sun4os4.h},
- config/i386/{xm-sun386.h,xm-i386m3.h,xm-i386mach.h},
- config/m68k/{sun3os4.h,xm-news.h,xm-hp300hpux.h},
- config/ns32k/xm-ns32km3.h: Remove all references to
- BROKEN_LARGE_ALLOCA; with the above change it is no longer needed.
- * main.c, fork-child.c, many config files: Remove all
- SET_STACK_LIMIT_HUGE code; with the above changes it should no
- longer be needed.
-
- * symtab.c (lookup_partial_symbol): Use if and abort, not assert.
- This avoids __eprintf troubles.
-
-Fri May 13 08:10:21 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * main.c (main): Surround in #ifndef MAIN_OVERRIDE. Move
- initialization code which needs to be called even if we bypass the
- command line stuff into gdb_init.
- * utils.c (fputs_unfiltered): Surround in #ifndef
- FPUTS_UNFILTERED_OVERRIDE.
- * Makefile.in (libgdb.a): New target.
-
- * utils.c: Rearrange I/O stuff a bit so that all output goes
- through fputs_unfiltered. Use vasprintf; removes arbitrary limit
- which made %s not work with arbitrarily large strings.
- * printcmd.c (printf_command): Use printf_filtered, not
- printf_unfiltered and printf, now that arbitrary limit is gone.
-
- gcc -Wall lint:
- * breakpoint.c (watchpoint_check): Remove unused variable b.
- * stack.c (print_frame_info): Move sp and buf inside #if.
- * eval.c (evaluate_subexp): Remove unused variables pp,
- mangle_ptr, ptr, and mangle_tstr.
- * valarith.c (value_x_binop): Remove unused variables mangle_tstr
- and mangle_ptr.
- * symtab.c (lookup_symtab): Put variable copy inside #if.
- (decode_line_1): Put variable q1 inside #if 0.
- * target.h: Declare target_link.
- * infrun.c (wait_for_inferior): Remove unused variables signame.
- * remote.c (remote_resume): Remove unused variable name.
- * c-exp.y (parse_number): Parenthesize operand of shift.
- * dbxread.c (record_minimal_symbol): Parenthesize operand of &&
- (this is a semantic change, the warning seems to have detected a bug).
- * dbxread.c (end_psymtab): Move variable p1 inside #if.
- * coffread.c: Move variable temptype inside #if.
- * ch-typeprint.c (chill_type_print_base): Remove unused variable
- name.
- * ch-valprint.c: #include typeprint.h and ch-lang.h.
- (chill_val_print): Remove unused variable in_range.
- (chill_val_print): Remove statement "length > TYPE_LENGTH (type);".
- (chill_val_print): Add default case for switch.
- * stabsread.h: Declare stabsect_build_psymtabs.
- * os9kread.c (read_minimal_symbols): Make this return void.
- (os9k_symfile_read): Remove unused variables stb_exist and val.
- (os9k_symfile_init): Remove unused variable val.
- (fill_sym): Remove unused variable id.
- (read_os9k_psymtab): Put variable back_to inside #if 0. Remove
- unused variable nsl.
- Remove unused variable symfile_bfd.
- #if 0 unused variables lbrac_unmatched_complaint and
- lbrac_mismatch_complaint.
- Remove declaration for non-existent function os9k_next_symbol_text.
-
- * annotate.c, annotate.h: New files, containing a function for
- each annotation which outputs it.
- * Move breakpoints_changed from breakpoint.c to annotate.c.
- * breakpoint.c, blockframe.c, infrun.c, cp-valprint.c, main.c,
- printcmd.c, source.c, stack.c, utils.c, valprint.c:
- Use annotate.c functions to output annotations.
- * Makefile.in (OBS): Add annotate.o.
-
-Thu May 12 10:46:27 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (read_unwind_info): Make sure elf_unwind_size and
- elf_unwind_entries are always initialized.
-
- * hppa-tdep.c (skip_trampoline_code): Handle argument relocation
- stubs which return directly to the caller rather than to the stub
- itself.
-
-Wed May 11 20:11:51 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * c-exp.y (yyerror): Display a more informative error message.
- * ch-exp.y (yyerror): Ditto, don't use global yychar.
- * m2-exp.y (yyerror): Ditto.
-
-Tue May 10 11:57:53 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * inflow.c (job_control): Move definition to front of file.
-
-Tue May 10 14:42:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * maint.c (print_section_table): Rename SEC_SHARED_LIBRARY to
- SEC_COFF_SHARED_LIBRARY to match corresponding change in bfd.
-
-Fri May 6 13:30:22 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * Makefile.in (kdb): Remove old init.c creation commands.
- * configure.in (sparclite): Match on sparclite*.
- * sparclite/aload.c (main): Only change section addresses for
- a.out format object files.
-
-Fri May 6 13:24:04 1994 Steve Chamberlain (sac@cygnus.com)
-
- * config/i386/go32.mh: Define CC.
-
-Fri May 6 11:56:54 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * gdbserver/Makefile.in: Remove irrelevant definitions and
- comments inherited from the gdb Makefile.
- (BFD_DIR, BFD, BFD_SRC, BFD_CFLAGS): Add from gdb Makefile.
- (VERSION): Update to 4.12.3.
- (gdbserver): Remove any existing executable first.
- (distclean, realclean): Remove nm.h.
- * gdbserver/low-lynx.c: Add Sparc Lynx support.
- * gdbserver/low-sparc.c, gdbserver/low-sun3.c (sys/wait.h):
- Don't use absolute pathname.
-
-Thu May 5 12:00:22 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * rs6000-nat.c (vmap_ldinfo): Don't fail if fstat returns an
- error.
-
-Wed May 4 06:56:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c (proceed, normal_stop, wait_for_inferior), breakpoint.c
- (print_it_normal): Add annotations for the inferior starting and
- stopping, and for all the various messages related to how it
- stopped.
-
- * printcmd.c (do_one_display): Annotate.
- * stack.c (print_frame_info): Annotate printing of stack frames.
-
-Wed May 4 18:15:51 1994 Stu Grossman (grossman@cygnus.com)
-
- * remote.c (get_offsets): Handle case where stub doesn't support
- qOffsets message.
-
-Wed May 4 15:30:39 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- Add partial support for g++ code compiled with -fvtable-thunks.
- * c-valprint.c (c_val_print): Add vtblprint support
- when using thunks.
- * cp-valprint.c (cp_is_vtbl_member): A vtable can be an array of
- pointers (if using thunks) as well as array of structs (otherwise).
- * cp-valprint.c (vtbl_ptr_name_old, vtbl_ptr_name): Move to global
- level, and make the latter non-static (so define_symbol can use it).
- * stabsread.c (define_symbol): If the type being defined is a
- pointer type named "__vtbl_ptr_type", set the TYPE_NAME to that name.
- * symtab.h (VTBL_PREFIX_P): Allow "_VT" as well as "_vt".
- * values.c (value_virtual_fn_field): Handle thunks.
- * values.c (value_headof): Minor efficiency hack.
- * values.c (value_headof): Incomplete thunk support. FIXME.
-
-Wed May 4 06:56:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * valprint.c (print_longest): Clarify comment about use_local.
- * printcmd.c, defs.h (print_address_numeric), callers in
- symmisc.c, symfile.c, stack.c, source.c, remote.c, infcmd.c,
- cp-valprint.c, core.c, ch-valprint.c, c-valprint.c, breakpoint.c,
- exec.c: New argument use_local.
- * source.c (identify_source_line): Use filtered output. Use
- print_address_numeric.
-
- * core.c (memory_error), symtab.c (cplusplus_hint, decode_line_1),
- language.c (type_error, range_error): Use filtered output.
- * utils.c (error_begin): Update comment to tell people to use
- filtered output.
-
- * Makefile.in (HFILES_WITH_SRCDIR): List bfd.h.
- (HFILES_NO_SRCDIR): List gdbcore.h not gdbcore_h, so as not to get
- bfd.h.
-
-Tue May 3 07:41:33 1994 Jim Kingdon (kingdon@cygnus.com)
-
- * procfs.c (procfs_wait): Reinstate code which deduces the signal
- from the fault, #ifndef FAULTED_USE_SIGINFO.
- * config/sparc/tm-sun4sol2.h: Define FAULTED_USE_SIGINFO.
-
-Fri Apr 29 18:15:04 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.c (breakpoint_1): Annotate each field of the headers.
- Explicitly annotate each record.
-
-Fri Apr 29 15:56:18 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * xcoffexec.c: Reformat to standards and lint.
- (language.h): Include.
- (exec_close): Declare arg "quitting".
- (file_command): Declare arg "from_tty".
- (map_vmap): Cast xmalloc result to PTR.
- * rs6000-nat.c: Reformat to standards and lint.
- (exec_one_dummy_insn): Use char array for saved instruction.
- (fixup_breakpoints): Declare.
- (vmap_ldinfo): Be more informative in fatal error messages.
- (xcoff_relocate_symtab): Define to return void.
- * xcoffsolib.h: Reformat to standards, improve comments.
- * config/rs6000/nm-rs6000.h (xcoff_relocate_symtab): Declare.
-
-Thu Apr 28 08:40:56 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * utils.c, defs.h (error_begin): New function.
- (quit): Print annotation before printing the error message.
- * main.c (return_to_top_level): Print annotation before doing the
- longjmp.
- * symtab.c (decode_line_1): Call error not warning and then
- return_to_top_level. Call error_begin and printf_unfiltered
- rather calling warning (before calls to return_to_top_level).
- * core.c (memory_error): Use error_begin, printf_unfiltered,
- print_address_numeric and return_to_top_level instead of error.
- Cleans up a FIXME-32x64.
- * language.c (type_error, range_error): Call error_begin
- not just target_terminal_ours.
-
- * dbxread.c (stabsect_build_psymtabs): Assign to sym_stab_info
- directly, rather than via DBX_SYMFILE_INFO. A cast on the left
- side of an assignment is non-portable.
-
- * utils.c (query): Change syntax of query annotations to be
- consistent with other input annotations.
- (prompt_for_continue): Likewise for prompt-for-continue annotation.
-
-Thu Apr 28 01:20:39 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (psymtab_to_symtab_1): Do not call sort_blocks
- for stabs symtabs.
- * mips-tdep.c (mips_skip_prologue): Handle prologues for functions
- that have a stack frame size of 32k or larger (from Paul Flinders).
- Remove #if 0'd code.
-
-Wed Apr 27 16:33:51 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * lynx-nat.c (CANNOT_STORE_REGISTER): Add a fallback definition
- for Lynx platforms that need it.
- * config/nm-lynx.h (__LYNXOS): Define if not already defined.
-
-Wed Apr 27 16:01:37 1994 Jim Kingdon (kingdon@cygnus.com)
-
- * procfs.c (procfs_wait): Use the signal from the pr_info rather
- than trying to deduce it from the fault.
-
-Wed Apr 27 12:22:46 1994 Steve Chamberlain (sac@cygnus.com)
-
- * printcmd.c (print_address_symbolic): Initialize name to empty
- string to avoid core dump if lookup fails.
- * remote-e7000.c (printf_e7000debug): Error if target not open.
-
-Tue Apr 26 22:45:24 1994 Stu Grossman (grossman at cygnus.com)
-
- * i386-nlmstub.c: Update to be more in line with PIN stub.
- * nlm/gdbserve.c (putDebugChar): Install bug fix from i386-nlmstub.
- * (hex2mem): Init ptr.
- * General cleanups to use ConsolePrintf, standard prologues, etc...
-
-Tue Apr 26 10:23:04 1994 Stu Grossman (grossman at cygnus.com)
-
- * i386-nlmstub.c: More changes to be compatible with remote.c.
-
- * dbxread.c: Move a bunch of strncmps out of process_one_symbol
- into (the far less frequently called) dbx_symfile_read.
-
- * i386-nlmstub.c: An interim version till we get PIN for the x86.
-
-Tue Apr 26 09:50:45 1994 Stu Grossman (grossman at cygnus.com)
-
- * dbxread.c (record_minimal_symbol): Record the section
- associated with the symbol to make dynmaic relocation work.
- * (dbx_symfile_read, process_one_symbol): Fixes to work around
- Solaris brain-damage which don't apply to relocatable object
- files.
- * (stabsect_build_psymtabs): New routine to read stabs out of an
- arbitrarily named section.
- * nlmread.c (nlm_symtab_read): Read ALL syms from the NLM, not just
- globals.
- * (nlm_symfile_read): Call stabsect_build_psymtabs to read the
- stabs out of the nlm.
- * partial-stabs.h (cases 'f' & 'F'): Fixes to work around Solaris
- brain-damage which don't apply to relocatable object files.
- * remote.c (putpkt): Improve error reporting and error handling.
- * (get_offsets): Temporary kludge to force data & bss sections to
- have the same relocation.
- * stabsread.c (define_symbol, scan_file_globals): Record section
- info in sym.
-
-Sat Apr 23 19:05:52 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.c (breakpoint_1): Annotate each field of output. Add
- FIXME-32x64 comment.
-
-Fri Apr 22 16:43:54 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c (wait_for_inferior): Move call to flush_cached_frames
- to after call to target_wait. This means that flush_cached_frames
- can call target_terminal_ours if it wants to.
- * infrun.c (wait_for_inferior) [HAVE_NONSTEPPABLE_WATCHPOINT]: Add
- comment about why the code is dubious.
-
- * stabsread.c (read_type): Call read_type, not nonexistent
- os9k_read_type.
-
-Fri Apr 22 14:25:36 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * remote-os9k.c (rombug_fetch_registers): set trace mode
- correctly.
- * remote-os9k.c (rombug_read_inferior_memory): cache data in
- buffer.
- * os9kread,c (read_os9k_psymtab): process file symbol to truncate
- extra info.
- * os9kread.c (os9k_read_ofile_symtab): proper casting of args
- passed to process_one_symbol.
- * stabsread.c (read_type): process os9k functio prototype.
-
-Fri Apr 22 11:27:39 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * solib.c (symbol_add_stub): If so->textsection is NULL, don't
- dump core.
-
-Thu Apr 21 07:45:49 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * utils.c (prompt_for_continue): Annotate prompt.
- (query): Annotate query.
- * printcmd.c (print_frame_args): Change syntax of argument
- annotation to make name and value part of a single group of
- annotations, not two separate groups.
- * cp-valprint.c (cp_print_value_fields): Likewise for fields.
- * valprint.c (val_print_array_elements): Change syntax of
- annotation to be more concise.
- * main.c, defs.h (command_line_input): New argument tells what
- string to include in the annotations.
- * symtab.c (decode_line_2), main.c (read_command_lines,
- command_loop): Change callers.
-
- * breakpoint.c (watch_command): Use (CORE_ADDR)0, not NULL, for
- target null pointer.
- * blockframe.c (find_frame_addr_in_frame_chain): Likewise.
-
- * printcmd.c (output_command): Annotate things we print here too.
- * printcmd.c (print_command_1): Add "value-history-value" annotation.
- * Move declaration of print_value_flags from defs.h to value.h.
- * main.c (command_line_input): Call wrap_here as well as gdb_flush.
-
-Thu Apr 21 09:29:37 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dbxread.c (read_dbx_dynamic_symtab): Reinstall support for sun3,
- BFD handles sun3 dynamic relocations now.
- * elfread.c (elf_symtab_read, elf_symfile_read): Handle dynamic
- symbol table.
-
-Wed Apr 20 19:41:21 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * printcmd.c (print_command_1): Annotate the top-level expressions
- that we print.
- (print_frame_args): Annotate each argument.
- * printcmd.c, defs.h (print_value_flags): New function.
- * cp-valprint.c (cp_print_value_fields): Annotate each field.
- * valprint.c (val_print_array_elements): Annotate each array element.
-
-Wed Apr 20 13:18:41 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * findvar.c (read_var_value): Handle LOC_REPARM_ADDR case correctly,
- the register contains a pointer to the type, not the type itself.
-
-Mon Apr 11 10:44:35 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * main.c (main): Accept --annotate=N option and make --fullname
- the same as --annotate=1.
- (command_line_input): Print annotatation before and after prompt.
- * blockframe.c (flush_cached_frames): Print annotation.
- * Rename frame_file_full_name to annotation_level and move it from
- symtab.h to defs.h.
- * source.c (identify_source_line): If annotation_level > 1,
- change output format.
- * breakpoint.c: Print annotation whenever a breakpoint changes.
- * main.c: New variable server_command.
- (command_line_input): Parse "server " and set server_command.
- (dont_repeat): Check server_command.
-
-Wed Apr 20 08:37:16 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * xcoffread.c (xcoff_next_symbol_text): Don't return before
- updating raw_symbol and symnum. Return a value in the case where
- we complained.
-
- * dstread.c, coffread.c: Don't define pending_blocks; buildsym.c
- takes care of it.
- * parse.c: Don't define block_found; it is defined in symtab.c.
- * parser-defs.h: Add comment regarding block_found.
-
-Tue Apr 19 09:46:05 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (internalize_unwind_info): Delete unused indexp
- argument.
-
-Mon Apr 18 13:18:56 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dbxread.c (read_dbx_dynamic_symtab): Relocate BFD symbols by
- section vma. Do not read dynamic relocs for sun3 executables to
- avoid BFD assertion message.
-
-Mon Apr 18 10:08:07 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * nm-hppab.h (KERNEL_U_ADDR): Define.
- (FIVE_ARG_PTRACE): Likewise.
- (CANNOT_STORE_REGISTER): Likewise.
- * nm-hppah.h (KERNEL_U_ADDR): Define.
- (FIVE_ARG_PTRACE): Likewise.
- (CANNOT_STORE_REGISTER): Likewise.
- (NEED_TEXT_START_END): Likewise.
-
- * tm-hppah.h (NEED_TEXT_START_END): Delete definition.
- * xm-hppah.h (KERNEL_U_ADDR): Delete definition.
- (FIVE_ARG_PTRACE): Likewise.
- * xm-hppab.h (KERNEL_U_ADDR): Delete definition.
- (FIVE_ARG_PTRACE): Likewise.
-
- * hppa-tdep.c (read_unwind_info): Make static.
- (restore_pc_queue): Indirect through the target vector to
- reload the register state.
-
-Sat Apr 16 22:20:51 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * paread.c (compare_unwind_entries): Delete function. It's been
- moved into hppa-tdep.c.
- (read_unwind_info): Likewise.
- (pa_symfile_read): No longer call read_unwind_info. The unwind
- tables will be read in as they are needed.
-
- * hppa-tdep.c (compare_unwind_entries): New function.
- (read_unwind_info, internalize_unwinds): Likewise.
- (find_unwind_entry): Read in unwind information on demand.
-
-Fri Apr 15 11:53:46 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * source.c (DIRNAME_SEPARATOR): New macro, replaces all references
- to : in search path processing.
- * defs.h (qsort): Rename argument in prototype.
- * symtab.h (SAYMBOL_VALUE): Rename value field, avoids bugs in
- some compilers.
- * breakpoint.c, exec.c, mdebugread.c, mipsread.c, xcoffexec.c
- (false): Eliminate usages.
-
-Fri Apr 15 11:35:19 1994 Steve Chamberlain (sac@cygnus.com)
-
- * h8500-tdep.c (initialize_h8500_tdep, large_command):
- All references to value changed to value_ptrlage_command is now
- called big_command.
- All references to value changed to value_ptr.
- * remote-e7000.c (e7000_wait): Use target_waitstatus and SETSTOP
- * remote-hms.c (hms_wait): Timeout after five seconds.
- * ser-go32.c (dosasync_read): Poll if timeout < 0.
- * config/tm/tm-h8500.h (BEFORE_MAIN_LOOP_HOOK): Deleted.
- * config/sh/tm-sh.h (BREAKPOINT): Is now sleep opcode.
-
-Thu Apr 14 07:01:56 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * procfs.c (procfs_wait): Protect watchpoint code with appropriate
- #ifdefs.
- (procfs_set_watchpoint, procfs_stopped_by_watchpoint): Likewise.
-
-Wed Apr 13 14:52:46 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * breakpoint.h (enum bptype): Add bp_hardware_watchpoint and
- bp_watchpoint_scope breakpoints.
- (struct breakpoint): Add val_chain and related_breakpoint fields
- for use by watchpoints.
-
- * breakpoint.c (within_scope): Delete. No longer used.
- (TARGET_CAN_USE_HARDWARE_WATCHPOINT): Provide default definition.
- (target_{remove,insert}_watchpoint): Likewise.
- (can_use_hardware_watchpoint): New function.
- (remove_breakpoint): New function to remove a single breakpoint
- or hardware watchpoint.
- (insert_breakpoints): Handle insertion of hardware watchpoints.
- Store a copy of the value chain derived from the watchpoint
- expression.
- (remove_breakpoints): Simplify by using remove_breakpoint.
- (delete_breakpoint): Likewise.
- (watchpoint_check): Delete the watchpoint and watchpoint scope
- breakpoints when the watchpoint goes out of scope. Save & restore
- the current frame after checking watchpoints.
- (breakpoint_init_inferior): Likewise (restarting the program
- makes all local watchpoints go out of scope).
- (bpstat_stop_status): Handle hardware watchpoints much like normal
- watchpoints. Delete the watchpoint and watchpoint scope breakpoint
- when the watchpoint goes out of scope. Remove and reinsert all
- breakpoints before returning if we stopped when a hardware watchpoint
- fired.
- (watch_command): Use a hardware watchpoint when possible. If
- watching a local expression, build a scope breakpoint too.
- (map_breakpoint_numbers): Also call given function for any
- related breakpoints.
- (disable_breakpoint): Never disable a scope breakpoint.
- (enable_breakpoint): Handle hardware breakpoints much like normal
- breakpoints, but recompute the watchpoint_scope breakpoint's
- frame and address (if we have an associated scope breakpoint).
- (read_memory_nobpt): Handle hardware watchpoints like normal
- watchpoints. When necessary handle watchpoint_scope breakpoints.
- (print_it_normal, bpstat_what, breakpoint_1, mention): Likewise.
- (clear_command, breakpoint_re_set_one, enable_command): Likewise.
- (disable_command): Likewise.
-
- * blockframe.c (find_frame_addr_in_frame_chain): New function.
- Extern prototype added to frame.h
-
- * infrun.c (wait_for_inferior): Set current_frame and select
- a frame before checking if we stopped due to a hardare watchpoint
- firing. Handle stepping over hardware watchpoints.
- (normal_stop): Remove unnecessary call to select_frame.
-
- * value.h (value_release_to_mark): Declare.
- * values.c (value_release_to_mark): New function.
-
- * procfs.c (procfs_wait): Add cases for hardware watchpoints.
- (procfs_set_watchpoint, procfs_stopped_by_watchpoint): New functions.
-
- * hppab-nat.c (hppa_set_watchpoint): New function.
-
- * config/pa/nm-hppab.h (STOPPED_BY_WATCHPOINT): Define.
- (HAVE_STEPPABLE_WATCHPOINT): Define.
- (TARGET_CAN_USE_HARDWARE_WATCHPOINT): Define.
- (target_{insert,delete}_watchpoint): Define.
-
- * config/mips/nm-irix4.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT): Define.
- (STOPPED_BY_WATCHPOINT, HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
- (target_{insert,remove}_watchpoint): Likewise.
-
-Mon Apr 11 19:21:27 1994 Stu Grossman (grossman at cygnus.com)
-
- * xcoffread.c (read_xcoff_symtab): Ignore symbols of class C_EXT,
- smtyp XTY_LD, sclass XMC_DS (external data segment label). They
- often have the same names as debug symbols for functions, and
- confuse lookup_symbol().
-
-Mon Apr 11 10:44:35 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * remote.c: Around redefinition of PBUFSIZE, adjust whitespace.
- * config/pa/tm-hppa.h (REGISTER_BYTES): Use 4 rather than
- REGISTER_RAW_SIZE (1).
- Together these changes work around a bug in HP's compiler. Both
- seem to be necessary.
-
-Mon Apr 11 09:18:24 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * paread.c (pa_symtab_read): Handle ST_STUB symbols and symbols
- with scope SS_EXTERNAL. ST_ENTRY symbols in dynamic executables
- are type mst_solib_trampoline.
-
-Fri Apr 8 17:14:37 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * config/m68k/es1800.mt: Change comments.
-
-Fri Apr 8 17:14:37 1994 Rob Savoye (rob@darkstar.cygnus.com)
-
- * config/m68k/monitor.mt (TDEPFILES): Don't include remote-es.o.
-
-Fri Apr 8 15:35:30 1994 Stu Grossman (grossman at cygnus.com)
-
- * lynx-nat.c: Restore regmap structure for SPARC. It's needed
- for core files.
-
-Fri Apr 8 14:53:35 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * values.c (unpack_long): Remove obsolete comment about using a
- switch statement.
-
- * symfile.c (symbol_file_command): Add comments about command syntax.
-
-Thu Apr 7 17:25:21 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
- Jim Kingdon (kingdon@cygnus.com)
-
- * infrun.c (IN_SOLIB_TRAMPOLINE): Correct comment, trampolines
- are in the .plt section.
- * minsyms.c (lookup_solib_trampoline_symbol_by_pc,
- find_solib_trampoline_target): New functions for handling
- stepping into -g compiled shared libraries.
- * symtab.h (lookup_solib_trampoline_symbol_by_pc,
- find_solib_trampoline_target): Add prototypes.
- * config/tm-sunos.h (IN_SOLIB_TRAMPOLINE, SKIP_TRAMPOLINE_CODE):
- Define to handle stepping into -g compiled shared libraries.
- * config/tm-sysv4.h (SKIP_TRAMPOLINE_CODE): Define to handle
- stepping into -g compiled shared libraries.
-
-Thu Apr 7 17:22:54 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * configure.in: Add mips-*-sysv4* support.
- * config/mips/mipsv4.mh, config/mips/mipsv4.mt,
- config/mips/tm-mipsv4.h, config/mips/xm-mipsv4.h, mipsv4-nat.c:
- New files for MIPS SVR4 support.
- * Makefile.in: Update for new mipsv4 files.
- * alpha-tdep.c (heuristic_proc_desc, find_proc_desc): Use
- read_next_frame_reg to obtain the frame relative stack pointer.
- * mips-tdep.c (heuristic_proc_desc): Use read_next_frame_reg to
- obtain the frame relative stack pointer.
- * mdebugread.c (parse_partial_symbols, psymtab_to_symtab1):
- Handle stStatic and stStaticProc symbols in stabs-in-ecoff output
- by entering them into the minimal symbol table.
- * printcmd.c (print_scalar_formatted): Do not try to unpack to
- a long for float formats.
- * solib.c: Include "elf/mips.h" only if DT_MIPS_RLD_MAP does not
- get defined in <link.h>.
- * solib.c (solib_add): Add shared library sections to the section
- table of the target before adding the symbols.
- * partial-stab.h: Relocate static and global functions.
- * dbxread.c (read_dbx_symtab): Remove unused variable
- end_of_text_address. Relocate text_addr when passing it
- to end_psymtab.
-
- For Alpha OSF/1 targets, enable gdb to set breakpoints in shared
- library functions before the executable is run. Retrieve dynamic
- symbols from stripped executables.
- * mipsread.c (read_alphacoff_dynamic_symtab): New function.
- * mipsread.c (mipscoff_symfile_read): Use it. Issue warning message
- if no debugging symbols were found.
- * alpha-tdep.c (alpha_skip_prologue): Silently return the unaltered
- pc if memory at the pc is not accessible and GDB_TARGET_HAS_SHARED_LIBS
- is defined.
- * config/alpha/nm-alpha.h (GDB_TARGET_HAS_SHARED_LIBS): Define,
- OSF/1 has shared libraries.
-
-Thu Apr 7 15:11:11 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dbxread.c (read_dbx_dynamic_symtab): Adjust for recent changes
- to BFD handling of dynamic symbols.
-
-Tue Apr 5 15:29:25 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (hppa_fix_call_dummy): If FUN is a procedure label,
- then gets its real address into FUN and its GOT/DP value into %r19.
-
- * tm-hppa.h (CALL_DUMMY): Use %r20, not %r19 as a temporary.
-
- * hppa-tdep.c (frameless_function_invocation): If no unwind
- descriptor was found, then assume this was not a frameless
- function invocation.
- (frame_saved_pc): If the saved PC is in a linker stub, then
- return the return address which the linker stub will return to.
-
- * xm-hppab.h: Never define USG.
- * xm-hppah.h: Always define USG.
-
-Tue Apr 5 12:58:47 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * values.c (unpack_long, value_from_longest),
- valarith.c (value_binop): Allow TYPE_CODE_RANGE.
-
-Fri Apr 1 14:04:34 1994 Jason Merrill (jason@deneb.cygnus.com)
-
- * symfile.c (deduce_language_from_filename): .cpp is a C++ extension.
-
-Fri Apr 1 00:44:00 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- For SVR4 targets, enable gdb to set breakpoints in shared
- library functions before the executable is run.
- * elfread.c (elf_symtab_read): Handle symbols for shared library
- functions.
- * sparc-tdep.c (in_solib_trampoline): Renamed to in_plt_section
- and moved to objfiles.c.
- * objfiles.c (in_plt_section): Moved to here from sparc-tdep.
- * config/tm-sysv4.h (IN_SOLIB_TRAMPOLINE): Use new in_plt_section.
- * config/sparc/tm-sun4sol2.h (IN_SOLIB_TRAMPOLINE): Removed,
- the new generic definition from tm-sysv4.h works for Solaris.
-
-Wed Mar 30 16:14:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * elfread.c (elf_symtab_read): Change storage_needed,
- number_of_symbols and i to long. Rename get_symtab_upper_bound to
- bfd_get_symtab_upper_bound. Check for errors from
- bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
- * nlmread.c (nlm_symtab_read): Same changes.
-
-Wed Mar 30 11:43:29 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * xcoffread.c (xcoff_next_symbol_text): New function.
- (read_xcoff_symtab): Set next_symbol_text_func to it.
- Move raw_symbol outside of read_xcoff_symtab.
-
- * remote.c (getpkt): Remove unused "out" label.
-
-Wed Mar 30 09:15:42 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * breakpoint.c (print_it_normal): Allow GDB to notify the user
- about more than one watchpoint being triggered.
-
-Wed Mar 30 08:24:18 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/m68k/tm-dpx2.h: Include tm-m68k.h not nonexistent tm-68k.h.
-
-Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * blockframe.c (find_pc_partial_function): mst_file_text
- symbols do not live in the shared library transfer table.
- * ch-exp.y (decode_integer_value, match_character_literal,
- match_bitstring_literal): Guard tolower calls with isupper,
- tolower on old BSD systems blindly subtracts a constant.
- * dbxread.c (read_ofile_symtab): Check for __gnu_compiled_* as
- well when determining the producer of the object file.
- * mdebugread.c (has_opaque_xref): New function to check for
- cross reference to an opaque aggregate.
- * mdebugread.c (parse_symbol, parse_partial_symbols): Do not
- enter typedefs to opaque aggregates into the symbol tables.
- * mdebugread.c (parse_external): Remove skip_procedures argument,
- it has always been 1. Remove code that handled stProc symbols,
- it was never executed and was wrong, as the index of a
- stProc symbol points to the local symbol table and not to the
- auxiliary symbol info. Update caller.
- * mdebugread.c (parse_partial_symbols): Do not enter external
- stProc symbols into the partial symbol table, they are already
- entered into the minimal symbol table.
- * config/i386/tm-symmetry.h: Clean up, it is now only used for Dynix.
- Remove all conditionals and definitions for ptx.
- I386_REGNO_TO_SYMMETRY moved to here from symm-tdep.c.
- Fix addresses of floating point registers in REGISTER_U_ADDR.
- STORE_STRUCT_RETURN now handles cc and gcc conventions.
- FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC,
- IN_SIGTRAMP, SIGCONTEXT_PC_OFFSET defined to make backtracing through
- signal trampoline code work.
- * config/i386/xm-symmetry.h: Clean up, it is now only used for Dynix.
- Remove all conditionals and definitions for ptx.
- Remove KDB definitions.
- * symm-nat.c (store_inferior_registers): Fetch registers before
- storing them to obtain valid floating point control registers.
- Store fpu registers.
- * symm-nat.c (print_1167_control_word): Dynix 3.1.1 defines
- FPA_PCR_CC_C0 and FPA_PCR_CC_C1, avoid duplicate case value.
- * symm-nat.c (fetch_inferior_registers, child_xfer_memory):
- Fix typos.
- * symm-nat.c (child_resume): Update type of `signal' parameter.
- * symm-tdep.c (I386_REGNO_TO_SYMMETRY): Moved to tm-symmetry.h.
-
-Tue Mar 29 23:01:33 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (hppa_fix_call_dummy): Use an alternate method for
- calling import stubs for functions in shared libraries.
-
-Tue Mar 29 21:14:04 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * ch-exp.y: Implement SIZE(mode_name) and SIZE(expression).
-
- * ch-lang.c (chill_is_varying_struct): Magic string is
- was "<var_length>" is now "__var_length" (more portable).
-
-Tue Mar 29 19:41:34 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote.c (getpkt): If we get a timeout, actually retry rather
- than just giving up the first time it happens.
- * remote.c: Document sequence numbers.
- (remote_store_registers): Change syntax of 'P' request so that it
- never looks like a sequence number.
-
-Tue Mar 29 16:06:01 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * os9kread.c (record_minimal_symbol): add section_offset to
- relocate minimal symbol table.
- * os9kread.c (read_minimal_symbols): ditto.
- * os9kread.c (os9k_symfile_init): increase size of dbg and stb
- file names.
- * os9kread.c (read_os9k_psymtab): if there's no dbg file, just
- return. Also if file addr is 0 leave it 0, not to relocate.
- * remote-os9k.c (_initialize_remote_os9k): add 'set remotexon',
- 'set remotexoff' and 'set remotelog' commands.
-
-Tue Mar 29 12:38:45 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote.c (remote_store_registers): Add 'P' request to set an
- individual register.
- (remote_write_bytes, remote_read_bytes): Use %lx, not %x, to print
- a target address.
-
-Sat Mar 26 07:05:18 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/sparc/tm-sparc.h: Define USE_REGISTER_NOT_ARG.
- * stabsread (define_symbol): If USE_REGISTER_NOT_ARG, go back to
- combining all 'p' and 'r' pairs into a LOC_REGPARM.
-
- * command.c (do_setshow_command, case var_string): Never add a
- space to the end of the string.
- * NEWS: Document this change.
- * .gdbinit: Add a space to the "set prompt" command.
-
-Fri Mar 25 12:40:41 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m3-nat.c, i386m3-nat.c, config/i386/i386m3.mh: Many minor
- changes to make it compile (it doesn't link yet).
-
- * buildsym.c (start_subfile, patch_subfile_names), demangle.c
- (set_demangling_style, set_demangling_command): Use savestring not
- strdup. We were not dealing properly with a NULL return from
- strdup, and were not declaring strdup (the system header may or
- may not have it).
-
- * valprint.c (val_print): Remove inaccurate comment about what
- types can be stub types.
-
- * config/i386/ptx.mh (XDEPFILES): Add coredep.o. Delete infptrace.o.
- * symm-nat.c (child_wait, _initialize_symm_nat, kill_inferior):
- Supply alternate version if ATTACH_DETACH is not defined.
- * ptx4-nat.c, config/i386/{nm-ptx4.h, ptx4.mh, ptx.mt, ptx4.mt,
- tm-ptx.h, tm-ptx4.h, xm-ptx.h, xm-ptx4.h}: New files.
- * configure.in: Recognize i[34]86-sequent-sysv4* host.
-
-Fri Mar 25 10:14:03 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (skip_prologue): Do nothing if not at the beginning
- of a function.
- (skip_trampoline_code): Rewrite and add support for argument
- relocation stubs stubs, import/export stubs, calls through
- "_sr4export" and cascaded trampolines.
-
- * hppa-tdep.c (skip_prologue): Return "pc" not zero
- if no unwind descriptor is found.
-
- * tm-hppa.h (NUM_REGS): Bump to 128 registers.
- (REGISTER_NAMES): Add entries for "right-half" of FP registers.
- (REGISTER_RAW_SIZE, MAX_REGISTER_RAW_SIZE): Do not treat FP regs
- differently. All registers are four bytes.
- (REGISTER_BYTES, REGISTER_BYTE): Simplify now that all registers are
- the same size.
- (REGISTER_VIRTUAL_TYPE): Use builtin_type_float for all FP regs.
-
- * hppa-tdep.c (pa_print_fp_reg): Update to print even numbered FP
- registers as both single and double values (fetching 2nd 32bit half
- as necessary). Annotate each register printed with its precision.
-
- * paread.c (read_unwind_info): Fix off-by-one error.
-
-Fri Mar 25 08:33:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * main.c (complete_command): Deal with it if arg is NULL.
-
-Thu Mar 24 07:12:09 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/mips/tm-mips.h (SETUP_ARBITRARY_FRAME): Revise comment
- regarding using the PC--using the PC is necessary and all the
- FIXME comments in the world won't make it go away.
-
- * valops.c (value_at, value_at_lazy): Give error if we dereference
- a pointer to void.
- * gdbtypes.h: Fix comments regarding TYPE_CODE_VOID.
- * stabsread.c: Use 1, not 0, for TYPE_LENGTH of void types.
-
- * stabsread.c (patch_block_stabs): Add comment about what happens
- if the definition is in another compilation unit from the stab.
-
- * dbxread.c (end_psymtab): Add comment about empty psymtabs.
-
-Wed Mar 23 07:50:33 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * main.c (complete_command): New command, from Rick Sladkey
- <jrs@world.std.com>.
- (symbol_completion_function): Don't declare rl_point and
- rl_line_buffer; they are now declared in readline.h.
- (show_commands): Don't declare history_base; it is declared in
- history.h.
- * command.c (lookup_cmd): Don't delete trailing whitespace.
- Reverts change of 14 May 1989.
-
-Wed Mar 23 16:14:52 1994 Stu Grossman (grossman at cygnus.com)
-
- * minsyms.c (prim_record_minimal_symbol): Move section deduction
- code from prim_record_minimal_symbol_and_info() to here. Callers
- of the latter can legitimately supply a section number of -1.
-
-Wed Mar 23 07:50:33 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbtypes.h, gdbtypes.c: Add comments regarding whether static
- member functions have an element in args for a (nonexistent) this
- pointer.
-
-Tue Mar 22 20:12:53 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * config/pa/tm-hppao.h (NO_PC_SPACE_QUEUE_RESTORE): Define.
-
- * hppa-tdep.c (hppa_pop_frame): Do not restore the PC space
- queue if NO_PC_SPACE_QUEUE_RESTORE is defined.
-
- * stabsread.c (REG_STRUCT_HAS_ADDR): Accept additional argument
- for the structure's type. All callers changed.
-
- * valops.c (call_function_by_hand): Check REG_STRUCT_HAS_ADDR
- for each structure argument rather than assuming it's either
- true or false for all structure arguments.
-
- * config/pa/tm-hppa.h (REG_STRUCT_HAS_ADDR): Depend only
- on the length structure passed, not the compiler used.
-
- * config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Accept additional
- argument for the structure's type.
-
-Tue Mar 22 15:28:33 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * values.c (set_internalvar): Don't set var->value until we are
- sure there won't be an error().
-
- * remote.c (get_offsets): Reinstate comment which was in
- remote_wait about use of SECT_OFF_TEXT and so on.
-
-Mon Mar 21 13:11:30 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symmisc.c (maintenance_check_symtabs): New function to check
- consistency of psymtabs and symtabs.
- * symtab.h (maintenance_check_symtabs): Add prototype.
- * maint.c: Add new `maint check-symtabs' command.
- * config/i386/tm-i386aix.h, config/i386/tm-sun386.h,
- config/i386/tm-symmetry.h (REGISTER_CONVERT_TO_RAW): Fix typo.
- * config/i386/tm-symmetry.h: Make comment inside #if 0 a real
- comment.
- * config/i386/tm-symmetry.h (STORE_STRUCT_RETURN): Cast argument
- to write_memory to avoid warnings from gcc.
- * config/i386/xm-symmetry.h: Add missing #endif.
- * config/i386/nm-symmetry.h (NO_PTRACE_H): Add for Dynix.
- * config/i386/symmetry.mt (TDEPFILES): Add i386-tdep.o.
- * config/i386/symmetry.mh (NAT_FILE, NATDEPFILES): Add.
-
-Mon Mar 21 11:50:28 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (hppa_fix_call_dummy): Use value_ptr.
- (hppa_push_arguments): Likewise.
-
-Mon Mar 21 11:02:51 1994 Stu Grossman (grossman at cygnus.com)
-
- * alpha-tdep.c: Gobs of changes (many imported from mips-tdep) to
- improve remote debugging efficiency. Also fixed problems with
- doing function calls for programs with no entry points.
- * infcmd.c (run_stack_dummy): Use CALL_DUMMY_ADDRESS instead of
- entry_point_address.
- * inferior.h (PC_IN_CALL_DUMMY): ditto.
- * mdebugread.c (parse_symbol, parse_procedure, parse_external,
- parse_lines): Pass section_offsets info to these routines so that
- we can relocate symbol table entries upon readin.
- * (psymtab_to_symtab_1): Set symtab->primary to tell
- objfile_relocate to do relocations for our symbols.
- * (ecoff_relocate_efi): New routine to relocate adr field of PDRs
- (which hang off of the symbol table).
- * Use prim_record_minimal_symbols_and_info instead of
- prim_record_minimal_symbols to supply section info to make minimal
- symbol relocations work.
- * minsyms.c (prim_record_minimal_symbols_and_info): If section is
- -1, try to deduce it from ms_type.
- * objfiles.c (objfile_relocate): Use ALL_OBJFILE_SYMTABS where
- appropriate. Handle relocation of MIPS_EFI symbols special. Also,
- add code to relocate objfile->sections data structure.
- * remote.c (get_offsets): Use new protocol message to acquire
- section offsets from the target.
- * (remote_wait): Get rid of relocation stuff. That's all handled
- by objfile_relocate now.
- * config/alpha/alpha-nw.mt (TM_FILE): Use tm-alphanw.h.
- * config/alpha/tm-alpha.h: Define CALL_DUMMY_ADDRESS, and
- VM_MIN_ADDRESS.
- * config/alpha/tm-alphanw.h: DECR_PC_AFTER_BREAK=0, VM_MIN_ADDRESS=0.
-
-Mon Mar 21 10:09:06 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (_initialize_hpuxread): Don't call add_symtab_fns if
- HPREAD is not defined.
-
-Sun Mar 20 15:21:57 1994 Doug Evans (dje@cygnus.com)
-
- * sparc-tdep.c (sparc_frame_find_save_regs): Use REGISTER_RAW_SIZE
- instead of 4.
- * sp64-tdep.c (target_ptr_bit, set_target_ptr_bit): Deleted,
- can no longer set this at run time.
- * config/sparc/sp64.mt (SIMFILES): Use remote-sim.o now.
- (TM_CLIBS): Define to -lm, the simulator uses the sqrt() function.
- * config/sparc/tm-sp64.h (FPS_REGNUM, CPS_REGNUM): Define (so
- sparc-tdep.c compiles).
- (TARGET_PTR_BIT): Must be a constant now, fix at 64.
-
-Sat Mar 19 08:51:12 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/m68k/{cisco.mt,tm-cisco.h}: New files.
- * Makefile.in (ALLPARAM, ALLCONFIG): Add them.
- * configure.in: Recognize m68*-cisco*-*.
-
- * Makefile.in (TAGS): Use variables directly, rather than using
- find, to locate TM_FILE, XM_FILE, and NAT_FILE. This is faster
- and means that these filenames no longer need be unique across all
- the config/* directories.
- * configure.in: Put the config/*/ into TM_FILE, etc.
-
- * m68k-stub.c (computeSignal): Return SIGFPE, not SIGURG, for chk
- and trapv exceptions.
-
- * target.h (struct section_table), objfiles.h (struct obj_section):
- Change name of field sec_ptr to the_bfd_section. More mnemonic
- and avoids the (sort of, for the ptx compiler) name clash with
- the name of the typedef.
- * exec.c, xcoffexec.c, sparc-tdep.c, rs6000-nat.c, osfsolib.c,
- solib.c, irix5-nat.c, objfiles.c, remote.c: Change users.
-
- * utils.c: Include readline.h.
- * Makefile.in (utils.o): Add dependency.
-
- * remote.c (getpkt): Add support for run-length encoding.
-
-Fri Mar 18 19:11:15 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * utils.c (prompt_for_continue): Call readline, not gdb_readline.
-
-Fri Mar 18 10:25:55 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dstread.c (record_minimal_symbol): New arg objfile. Pass it to
- prim_record_minimal_symbol.
- Callers: Pass it.
-
- * regex.c (EXTEND_BUFFER): Adjust pointers within buffer by
- computing their offset from the start of the old buffer and adding
- to the new buffer, rather than by assuming we can add the
- difference between the old buffer and the new buffer (it might not
- fit in an int). Merge in cosmetic differences from emacs regex.c
- version of this macro.
-
-Wed Mar 16 15:28:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in (install-only): Fix use of program_transform_name.
-
-Wed Mar 16 07:18:43 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * printcmd.c: Remove "set print fast-symbolic-addr off" command.
- The bug which it worked around was fixed on 25 Feb 94 in coffread.c,
- so I'm nuking the command.
- * symtab.c (find_addr_symbol): Comment out, no longer used.
-
- * main.c (main): Don't init_source_path for the -cd argument. Now
- that source_path doesn't contain the current_directory from when
- GDB started up, init_source_path is no longer useful (and is
- harmful because it clobbers a source_path set in $HOME/.gdbinit).
-
- * TODO: Remove item about line numbers being off. It is useless
- and confusing without a reproducible test case (it mentions
- proceed(), but I was able to step through proceed without trouble).
-
-Tue Mar 15 13:39:23 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- For Sunos 4.x targets, enable gdb to set breakpoints in shared
- library functions before the executable is run. Retrieve dynamic
- symbols from stripped executables.
- * symtab.h (minimal_symbol_type): Add mst_solib_trampoline type.
- * parse.c (write_exp_msymbol), symmisc.c (dump_msymbols),
- symtab.c (list_symbols): Handle mst_solib_trampoline.
- * minsyms.c (lookup_minimal_symbol): Handle mst_solib_trampoline
- for all targets, remove IBM6000_TARGET dependencies.
- * dbxread.c (read_dbx_dynamic_symtab): New function.
- * dbxread.c (dbx_symfile_read): Use it.
- * dbxread.c (SET_NAMESTRING): Set namestring to
- "<bad string table index>" instead of "foo" if the string index is
- corrupt.
- * xcoffread.c (read_xcoff_symtab): Use mst_solib_trampoline instead
- of mst_unknown.
- * symtab.c (list_symbols): Take from_tty as parameter and pass it
- to break_command. Handle mst_file_* minimal symbol types.
- * config/i386/tm-i386bsd.h: Give just macro name, not args, to #undef.
-
-Tue Mar 15 11:40:43 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * c-exp.y(yylex): fix potential memory overflow.
-
-Tue Mar 15 10:33:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * environ.c (set_in_environ): Eliminate special handling of PATH and
- GNUTARGET.
- * putenv.c: Removed, conflicts with system declaration of
- putenv on RS/6000 running AIX 3.2.5, and above change makes it
- unnecessary.
- * Makefile.in: Change accordingly.
- * procfs.c (procfs_create_inferior): Change comment accordingly.
-
-Tue Mar 15 10:05:27 1994 Jim Kingdon (kingdon@cygnus.com)
-
- * rs6000-tdep.c: Change value to value_ptr.
-
-Sun Mar 13 17:19:03 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (read_hpux_symtab: Correctly determine the namespace
- and address class of SVAR, DVAR, TYPEDEF, TAGDEF, CONST, and
- MEMENUM symbols. Do not include function-scoped variables in
- the partial symbol table.
-
-Sun Mar 13 09:45:51 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * i386m3-nat.c: Include floatformat.h.
- (get_i387_state): Use memset not bzero.
-
- * Version 4.12.3.
-
- * Makefile.in: Enable commented out getopt_h, bfd_h, etc. Change
- ieee-float.h to floatformat.h.
-
- * valprint.c (val_print_string): Ignore error if the error
- happened after a terminating '\0'.
-
- * c-valprint.c (c_val_print): Never add 1 to return value from
- val_print_string; just return what it returns.
-
- * target.h (enum target_signal): Add TARGET_SIGNAL_FIRST, for
- looping through all of the enums.
- * infrun.c (signals_info): Use it.
-
-Fri Mar 11 08:08:50 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * main.c (main): When printing warning about bad baud rate, don't
- use warning(); it relies on current_target which isn't set up yet.
-
- * breakpoint.c (_initialize_breakpoint): Update docstring for
- tbreak to match what the code actually does. Don't mention tbreak
- in docstrings for "enable once" or "enable breakpoints once".
-
-Thu Mar 10 08:52:38 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symfile.h (ADD_PSYMBOL_VT_TO_LIST): Don't put a semicolon after
- while (0). That defeats the whole purpose of using do . . . while (0).
- * mdebugread.c (parse_partial_symbols): Don't use ?: expression as
- list for ADD_PSYMBOL_TO_LIST; the macro takes its address and
- using a ?: expression as an lvalue is not portable.
-
- * stabsread.c (define_symbol): If REG_STRUCT_HAS_ADDR, also
- convert a LOC_ARG to a LOC_REF_ARG. Update code which combines
- 'p' and 'r' symbol descriptors into a single symbol to look for a
- LOC_REF_ARG.
- * README, config/sparc/tm-sparc.h: Update comments.
-
-Wed Mar 9 21:43:24 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (parse_type): Do not complain for types with
- an `indexNil' aux index, these are simply undefined types.
- Remove indexNil check from caller of parse_type.
- * mdebugread.c (parse_partial_symbols): Do not enter
- stGlobal, scCommon symbols into the minimal symbol table, their
- value is the size of the common, not its address.
- Handle scInit, scFini, scPData and scXData sections.
- Use minimal symbol type mst_file_* for stLabel symbols, instead of
- mst_*.
- Enter stProc symbols into the global_psymbols list once, not into
- the static_psymbols_list.
- Get rid of dummy psymtab if it is empty, to allow proper detection
- of stripped executables.
- * mdebugread.c (cross_ref): Allow cross references to Fortran
- common blocks.
-
-Wed Mar 9 15:23:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c (common_block_end, fix_common_block): Stash the
- struct pending * in the SYMBOL_TYPE, not the SYMBOL_NAMESPACE, so
- as to not assume that a pointer fits in an enum.
-
-Wed Mar 9 18:56:36 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * os9kread.c (fill_sym): check compiler verion number for pre-
- UltraC compiler.
- * os9kread.c (os9k_process_one_symbol): address of symbol is
- relative to section not module.
- * stabsread.c (define_symbol): add symbol type 's' as local
- symbol for os9k.
- * remote-os9k.c: add command 'set monitor_log' to turn on or off
- monitor logging.
- * remote-os9k.c: fix bug in delete breakpoint, single step trace.
- * remote-os9k.c: fix bug in 'set remotebaud' function.
- * remote-os9k.c (rombug_link): minimize checking so to improve
- speed.
- * symfile.c (symbol_file_command): check if failed to link, also make
- the command be able to accept more than one filenames.
- * target.c (target_link): check if failed to link with rombug.
- * config/i386/tm-i386os9k.h : add #define DECR_PC_AFTER_BREAK 0.
-
-Wed Mar 9 15:23:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-es.c (es1800_child_ops): Don't declare it static.
-
-Tue Mar 8 11:42:39 1994 Jim Kingdon (kingdon@cygnus.com)
-
- * config/i386/tm-i386v4.h: Give just macro name, not args, to #undef.
-
-Tue Mar 8 06:56:13 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dbxread.c: New variable lowest_text_address.
- (record_minimal_symbol, read_dbx_symtab): Set it.
- (read_dbx_symtab): Use lowest_text_address + text_size instead of
- end_of_text_address.
- * config/gould/tm-pn.h: Add comment regarding END_OF_TEXT_DEFAULT.
-
- * dbxread.c (end_psymtab): Remove old and commented out
- capping_global and capping_static. Fix comments regarding
- N_SO_ADDRESS_MAYBE_MISSING to match the real name of the macro.
-
- * parser-defs.h: Add "extern" to start of variable declarations so
- we don't end up with commons.
- * parse.c: Define these variables.
-
- * irix5-nat.c (find_solib): Cast o_path to CORE_ADDR when using it
- as one.
-
-Mon Mar 7 13:00:50 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * alpha-tdep.c: Change value to value_ptr.
-
-Sun Mar 6 17:36:53 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * solib.c (elf_locate_base): New function to locate the address
- of the dynamic linker's runtime structure in the dynamic info section.
- * solib.c (locate_base): Use it instead of iterating over the list
- of mapped address segments.
- * solib.c (look_for_base, bfd_lookup_symbol): Removed, no longer
- necessary.
-
-Fri Mar 4 09:50:47 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (pc_in_linker_stub): Move decl to beginning of file.
- (pc_in_interrupt_handler): New function. Also add PARAM decl.
- (find_proc_framesize): Deal with HPUX setting SAVE_SP bit for
- signal trampoline and interrupt routines.
- (frame_saved_pc): Handle signal trampolines and interrupt routines.
- (frame_chain, frame_chain_valid): Likewise.
- (hppa_frame_find_saved_regs): Likewise. Also deal with special
- saved regs convention for SP.
-
- * tm-hppa[bho].h: FRAME_FIND_SAVED_PC_IN_SIGTRAMP): Define.
- (FRAME_BASE_BEFORE_SIGTRAMP): Define.
- (FRAME_FIND_SAVED_REGS_IN_SIGTRAMP): Define.
-
- * tm-hppah.h (IN_SIGTRAMP): Define.
-
-Thu Mar 3 12:41:16 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * ch-exp.y (match_simple_name_string): Accept '_' as well as an
- alphabetic character as the start of a name.
-
- * sparclite/Makefile.in (all install): Build and install aload.
-
- * configure.in: Accept i[34]86-*-*sysv32 because that is what
- config.guess and config.sub produce.
-
- * mips-tdep.c: Change value to value_ptr.
-
-Wed Mar 2 09:17:55 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * breakpoint.c, breakpoint.h, c-valprint.c, ch-valprint.c,
- cp-valprint.c, eval.c, expprint.c, findvar.c, language.c,
- objfiles.h, infcmd.c, printcmd.c, stack.c, typeprint.c,
- valarith.c, valops.c, valprint.c, value.h, values.c: Replace
- value with value_ptr. This is for the ptx compiler.
- * objfiles.h, target.h: Don't declare a "sec_ptr" field using a
- "sec_ptr" typedef.
- * symm-nat.c: Add a bunch of stuff for symmetry's ptrace stuff.
- #if 0 i386_float_info.
- * symm-tdep.c (round): Remove. Also remove sgttyb.
- * symm-tdep.c: Remove lots of stuff which duplicates stuff from
- i386-tdep.c. Remove register_addr and ptx_coff_regno_to_gdb.
- * i386-tdep.c (i386_frame_find_saved_regs): Put in
- I386_REGNO_TO_SYMMETRY check in case it is needed for Dynix
- someday.
- * config/i386/nm-symmetry.h: Change KERNEL_U_ADDR. Move
- stuff from PTRACE_READ_REGS, PTRACE_WRITE_REGS macros to
- symm-nat.c. Define CHILD_WAIT and declare child_wait().
- * config/i386/tm-symmetry.h: Remove call function stuff; stuff in
- tm-i386v.h is apparently OK.
- * config/i386/xm-symmetry.h [_SEQUENT_]: Define HAVE_TERMIOS not
- HAVE_TERMIO. Define MEM_FNS_DECLARED, NEED_POSIX_SETPGID, and
- USE_O_NOCTTY.
-
-Wed Mar 2 11:31:08 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * osfsolib.c (xfer_link_map_member): Update to use new
- target_read_string interface.
-
-Wed Mar 2 09:17:55 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * infrun.c (wait_for_inferior): In checking
- remove_breakpoints_on_following_step, check
- through_sigtramp_breakpoint as well as step_resume_breakpoint.
-
-Tue Mar 1 16:22:56 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * os9kread.c (os9k_process_one_symbol): Rename
- VARIABLES_INSIDE_BLOCK to OS9K_VARIABLES_INSIDE_BLOCK.
- * symfile.c (symbol_file_command): Check for (CORE_ADDR)-1, not
- (CORE_ADDR)0, from target_link, since that is what it uses.
- Process name at end, not during parsing (like we did before Kung's
- change), so that -readnow and -mapped can appear anywhere.
- Make text_relocation a local variable.
- * config/i386/i386os9k.mt: Fix comment.
- * Makefile.in (ALLDEPFILES): Add remote-os9k.c.
- * os9kread.c: Put "comments" after #endif inside /* */.
- * stabsread.h: Add os9k_stabs variable.
- * stabsread.c (start_stabs), os9kread.c (os9k_process_one_symbol):
- Set it.
- * stabsread.c (define_symbol): If os9k_stabs, put a 'V' symbol
- descriptor in global_symbols not local_symbols.
- (read_type): If os9k_stabs, accept 'c', 'i', and 'b' type
- descriptors.
- (read_type): If os9k_stabs, accept function parameters after 'f'
- type descriptor.
- (read_array_type): If os9k_stabs, don't expect index type and
- expect lower and upper to be separated by ',' not ';'.
- (read_enum_type): If os9k_stabs, read a number before the first
- enumeration constant.
- (os9k_init_type_vector): New function.
- (dbx_lookup_type): Call it when starting new type vector.
- * config/i386/tm-i386os9k.h: Define BELIEVE_PCC_PROMOTION.
- * (os9k_process_one_symbol): Call define_symbol not os9k_define_symbol.
- * os9kstab.c: Removed.
- * Makefile.in: Update accordingly.
- * objfiles.c (objfile_relocate_data): Removed.
- * remote-os9k.c (rombug_wait): Call objfile_relocate
- not objfile_relocate_data.
- * objfiles.h, objfiles.c: Remove find_pc_objfile.
- * remote-os9k.c (rombug_wait): Call find_pc_section not
- find_pc_objfile.
- * main.c (quit_command): Check inferior_pid; revert Kung change.
- * remote-os9k.c (rombug_create_inferior): Set inferior_pid.
-
-Tue Mar 1 14:56:14 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * os9kread.c: New file to read os9000 style symbo table.
- * os9kstab.c: new file to read os9000 style stabs.
- * remote-os9k.c: remote protocol talking to os9000 rombug monitor.
- * objfiles.c (find_pc_objfile): new function to search objfile
- from pc.
- * objfiles.c (objfile_relocate_data): new function to relocate
- data symbols in symbol table.
- * objfiles.h: Add two aux fields in struct objfile to handle
- multiple symbol table files situation like in os9000.
- * symfile.c: Change so 'symbol-file' command can handle multiple
- files. Also call target_link() to get relocation infos.
- * target.c (target_link): new function to get relocation info when
- a symbol file is requested to load.
- * main.c (quit_command): take out 'inferior_pid != 0' condition,
- because in cross mode there's no inferior pid, bit they need to
- be detached.
- Makefile.in: add os9kread.c os9kstab.c and .o's.
- configure.in: add i386os9k target.
- config/i386/i386os9k.mt: new add.
- config/i386/tm-i386os9k.h: new add.
-
-Tue Mar 1 13:16:10 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/sparc/tm-sun4sol2.h (IN_SIGTRAMP): Handle ucbsigvechandler.
- * sparc-tdep.c (sparc_frame_saved_pc): Handle ucbsigvechandler.
-
-Tue Mar 1 11:54:11 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * target.c, target.h (target_read_string): Provide error detection to
- caller. Put string in malloc'd space, so caller need not impose
- arbitrary limits.
- * solib.c (find_solib): Update to use new interface.
- * irix5-nat.c (find_solib): Read o_path from inferior
- (clear_solib): Free storage for o_path.
- * valprint.c (val_print_string): Add comments.
-
-Mon Feb 28 23:54:39 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symtab.c (decode_line_1): Handle the case when skip_quoted does not
- advance `p'.
-
-Mon Feb 28 12:40:46 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * value.h (struct value): Add modifiable field.
- * values.c (allocate_value, record_latest_value, value_copy): Set it.
- (record_latest_value): Don't mess with VALUE_LVAL of value.
- * valops.c (value_assign): Check it. Reword existing error
- message on not_lval.
-
- * mips-tdep.c (mips_step_skips_delay), config/mips/tm-mips.h
- (STEP_SKIPS_DELAY): Added.
- * infrun.c (proceed) [STEP_SKIPS_DELAY]: Check for a breakpoint in
- the delay slot.
-
- * valprint.c (val_print_string): If errcode is set, always print
- an error, regardless of force_ellipsis. In the non-EIO case,
- just print the error message rather than calling error(). Don't
- access *(bufptr-1) if bufptr points to the start of the buffer.
- When looking for '\0', don't increment bufptr and addr if bufptr
- started out already at limit. If an error happens on fetching the
- first character, don't print the string.
-
-Sun Feb 27 21:05:06 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * config/m68k/tm-apollo68b.h: Remove HAVE_68881 define; it is
- obsolete.
-
- * i387-tdep.c, i386-tdep.c i386v-nat.c, i386aix-nat.c,
- i386m3-nat.c, config/m68k/tm-m68k.h, i960-tdep.c
- config/i960/tm-i960.h, remote-nindy.c, config/m88k/tm-m88k.h,
- m88k-tdep.c: Use floatformat.h instead of ieee-float.h.
- * sparc-tdep.c: Remove now-obsolete ieee-float.h stuff
- * findvar.c: Update comment regarding ieee-float.h.
-
-Sun Feb 27 21:39:48 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/i386/tm-i386v4.h (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP,
- FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC):
- Define to make backtracing through the various sigtramp handlers
- work.
- * i386-tdep.c (i386v4_sigtramp_saved_pc): New routine to fetch
- the saved pc from ucontext on the stack for SVR4 signal handling.
-
-Fri Feb 25 09:41:11 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * remote.c, remote-mon.c, remote-utils.c, remote-utils.h,
- target.h, remote-es.c, remote-nindy.c: Don't set baud rate if
- baud_rate is -1. Remove sr_get_baud_rate and sr_set_baud_rate;
- just use the global variable itself. When printing baud rate,
- don't print a baud rate if baud_rate is -1.
-
- * coffread.c (read_coff_symtab): Pass mst_file_* to
- record_minimal_symbol for C_STAT symbols. Put C_EXT and C_STAT
- symbols in the minimal symbols regardless of SDB_TYPE.
-
-Thu Feb 24 08:30:33 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * breakpoint.h (enum bptype): New type bp_through_sigtramp.
- (bpstat_what_main_action): New code BPSTAT_WHAT_THROUGH_SIGTRAMP.
- * breakpoint.c (bpstat_what): Return BPSTAT_WHAT_THROUGH_SIGTRAMP
- if we hit a bp_through_sigtramp breakpoint. Remove kludge which
- ignored bs->stop for a bp_step_resume breakpoint.
- * infrun.c (wait_for_inferior): Make a through_sigtramp_breakpoint
- which performs one (the check_sigtramp2 one) of the functions
- which had been handled by the step_resume_breakpoint. For each
- use of the step_resume_breakpoint, make it still use the
- step_resume_breakpoint, use the through_sigtramp_breakpoint, or
- operate on both.
- Deal with BPSTAT_WHAT_THROUGH_SIGTRAMP return from bpstat_what.
- When setting the frame address of the step resume breakpoint, set
- it to the address for frame *before* the call instruction is
- executed, not after.
-
- * mips-tdep.c (mips_print_register): Print integers using
- print_scalar_formatted rather than duplicating all the
- CC_HAS_LONG_LONG and so on.
- (mips_push_dummy_frame): Use read_register_gen rather than using
- read_register and then putting it back in target format with
- store_unsigned_integer. If registers are more than 4 bytes, give
- an error rather than have some registers overwrite other
- registers.
- #if 0 unused include of opcode/mips.h.
-
- * symfile.h: Don't declare arguments for coff_getfilename.
-
- * defs.h: Revert Kung change regarding FORCE_LONG_LONG.
-
-Thu Feb 24 08:06:52 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * configure.in (hppa*-*-osf*): New configuration.
- * config/pa/hppaosf.mt: New target makefile fragment.
- * config/pa/tm-hppao.h: New target include file.
-
-Thu Feb 24 04:29:19 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * exec.c (print_section_info): Print entry point for exec_bfd only.
- * ser-unix.c (wait_for): Fix typo in HAVE_TERMIO case.
- * dwarfread.c: Remove second inclusion of <sys/types.h>, which
- causes problems if <sys/types.h> has no multiple inclusion protection.
-
-Wed Feb 23 16:28:55 1994 Jeffrey A. Law (law@cygnus.com)
-
- * tm-hppa.h (CALL_DUMMY): Add two NOP instructions to the end of
- the call dummy to avoid kernel bugs in HPUX, BSD, and OSF1.
- (CALL_DUMMY_LENGTH): Changed accordingly.
-
-Wed Feb 23 16:21:25 1994 Stu Grossman (grossman at cygnus.com)
-
- * sparc-stub.c (trap_low): Make trap handler work for arbitrary
- numbers of register windows.
-
- * sparclite/hello.c: Add factorial function for testing.
- * salib.c: Use macros instead of constants for I/O addresses to
- make 931 support easier.
- * sparclite.h: Change constraint for LOC to "rJ" to force use of
- register in sta/lda instructions.
-
-Wed Feb 23 10:39:18 1994 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * dbxread.c (process_one_symbol): Set
- block_address_function_relative for COFF like we do for ELF and SOM.
-
-Sat Feb 19 03:17:32 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (new_psymtab): Pass in section_offsets and set
- them in the pst.
- * mdebugread.c (handle_psymbol_enumerators): New function to enter
- the enumerators of an ecoff enum into the partial symbol table.
- * mdebugread.c (parse_partial_symbols): Call it.
- * symfile.c (reread_symbols): Initialize objfile->*_psymbols.next.
- * symmisc.c (dump_psymtab): Fix typo, clean up output of section
- offsets. Cast psymtab->read_symtab to PTR before passing it to
- gdb_print_address.
- * i386-tdep.c (i386_skip_prologue): Skip over instructions that
- set up the global offset table pointer in pic compiled code.
- * config/mips/tm-mips.h (FIX_CALL_DUMMY): For big endian targets,
- error() on TYPE_CODE_FLT arguments whose size is greater than 8,
- swap all other TYPE_CODE_FLT arguments as mips_push_arguments
- ensures that floats are promoted to doubles before they are pushed
- on the stack.
-
-Fri Feb 18 23:12:59 1994 Stu Grossman (grossman at cygnus.com)
-
- * sparclite/Makefile.in, sparclite/salib.c, sparclite/sparclite.h:
- Fixup cache_on and flush_i_cache so that they work for both the
- 930 and 932 processors. Rewrite most low level funcs (uart
- access & cache stuff) to use new ASI access macros in sparclite.h.
- Also make it easy to access second serial port.
-
-Fri Feb 18 22:17:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * hp300ux-nat.c: Don't incloude <sys/dir.h>, <sys/ioctl.h>, or
- <sys/stat.h>; not needed.
-
-Fri Feb 18 08:26:29 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stack.c (print_frame_info): In "pathological" case, don't
- distrust the line number information.
-
-Fri Feb 18 16:51:14 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * mips-tdep.c (mips_print_register): handle 64 bits register.
- * valprint.c (print_longest): fix a bug in printing 64 bits value.
-
-Fri Feb 18 08:26:29 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Version 4.12.2.
-
- * Makefile.in (install): Do the sed for program_transform_name
- ourselves instead of worrying about INSTALL_XFORM. This enables
- users to override INSTALL_PROGRAM in the standard way.
-
- * Makefile.in (c-exp.tab.o, ch-exp.tab.o, m2-exp.tab.o): Don't
- depend on Makefile.in.
-
- * defs.h, valprint.c: Make longest_to_int a function not a macro.
- Only test against INT_MIN if a LONGEST is bigger than an int.
-
- * README: Change GhostScript to Ghostscript.
-
-Fri Feb 18 07:30:55 1994 Jim Kingdon (kingdon@cygnus.com)
-
- * config/rs6000/{tm-rs6000lynx.h,nm-rs6000lynx.h,xm-rs6000lynx.h}:
- Rename to tm-rs6000ly.h, nm-rs6000ly.h, xm-rs6000ly.h for 14
- character file names.
- * Makefile.in (ALLPARAM): Add these files.
-
- * config/mips/littlemips64.mt: Rename to mipsel64.mt for 14
- character file names.
- * Makefile.in: Add Kung's new mips64 files.
-
-Thu Feb 17 17:25:47 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * configure.in: add mips64-*-elf, mips64-*-ecoff, mips64el-*-elf,
- mips64el-*-ecoff and mips64-big-*.
- * defs.h: get rid of FORCE_LONG_LONG.
- * mips-tdep.c (mips_find_saved_regs): add sd and sdc1 instruction
- parsing. Change register size to be MIPS_REGSIZE.
-
-Thu Feb 17 09:30:22 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * corelow.c, exec.c, irix5-nat.c, mipsread.c, objfiles.c,
- osfsolib.c, rs6000-nat.c, solib.c, symfile.c, utils.c,
- xcoffexec.c: Use bfd_get_error and bfd_set_error and new error names.
-
-Fri Feb 11 21:47:24 1994 Steve Chamberlain (sac@sphagnum.cygnus.com)
-
- * remote-hms.c (readchar, hms_open, hms_fetch_register): Made more robust.
- (remove_commands, add_commands): Add/remove hms-drain when target
- is connected.
-
-Fri Feb 11 16:11:38 1994 Stu Grossman (grossman at cygnus.com)
-
- * configure.in: Add Lynx/rs6000 support.
- * lynx-nat.c: Clean up some Sparc stuff. Clean up ptrace error
- messages. Add rs6000 support. Don't try to modify unwritable
- registers.
- * rs6000-nat.c: Move lots of native dependent stuff (like core
- file support) from rs6000-tdep.c & xcoffexec.c to here.
- * rs6000-tdep.c: Move native dependent stuff to nat.c.
- * xcoffexec.c: Move native dependent stuff to nat.c.
- * config/rs6000/nm-rs6000.h: Move defs of SOLIB_* macros to here
- from tm file.
- * config/rs6000/tm-rs6000.h: Remove defs of SOLIB_* funcs, cuz they're
- really native.
- * config/rs6000/tm-rs6000lynx.h, config/rs6000/xm-rs6000lynx.h:
- New files to support Lynx/rs6000.
-
-Tue Feb 8 00:32:28 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * README: Remove note about gcc warnings on alpha, these should be
- gone now.
- * c-exp.y, ch-exp.y, core.c, corelow.c, eval.c, fork-child.c,
- m2-exp.y, minsyms.c, nlmread.c, parse.c, putenv.c, regex.c
- remote-utils.c, stabsread.c: Include <string.h>.
- * regex.c: Include "defs.h", change re_comp argument to const char *.
- * infptrace.c (fetch_register, store_inferior_registers): Change
- regaddr to type CORE_ADDR.
- * config/alpha/alpha-nw.mt, config/alpha/alpha-osf1.mt (MT_CFLAGS):
- Remove, no longer necessary now that we use bfd_vma for a CORE_ADDR.
-
-Mon Feb 7 09:21:17 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * symtab.h: Always define BYTE_BITFIELD to nothing.
-
-Mon Feb 7 08:44:17 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * config/m68k/{m68k-em.mt,tm-m68k-em.h}: Remove; no longer used.
- * configure.in: Remove comment about m68k-em.mt.
- * Makefile.in: Remove references.
-
-Mon Feb 7 08:22:42 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * defs.h [BFD64]: Use BFD_HOST_64_BIT, not nonexistent
- BFD_HOST_64_TYPE.
-
-Sun Feb 6 15:56:09 1994 Jeff Law (law@wild.cs.utah.edu)
-
- * hpread.c (hpux_symfile_init): Use obj_som_* rather than obj_* to
- access BFD private data. Search for the "$TEXT$" space rather
- than ".text".
- (hppa_sym_fns): Add bfd target flavour to initializer.
-
-Sun Feb 6 06:55:15 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * target.c (target_preopen): If target_kill doesn't remove the
- target from the stack, use pop_target to do it.
-
- * coffread.c (process_coff_symbol, case C_TPDEF): Don't set name
- of TYPE_CODE_PTR or TYPE_CODE_FUNC types. This parallels similar
- changes to stabsread.c from summer 1993.
-
- * remote-udi.c (udi_files_info): If prog_name is NULL, just skip
- printing the program, rather than passing NULL to printf.
- (udi_detach): Set udi_session_id to -1 so that udi_close doesn't
- try to call UDIDisconnect again. Print better message.
- (udi_kill): Just call UDIDisconnect ourselves, rather than doing
- it via udi_close.
- (udi_create_inferior): If udi_session_id is negative, open a new
- TIP rather than giving an error.
-
- * config/mips/mipsm3.mh, config/i386/i386m3.mh,
- config/ns32k/ns32km3.mh: Define NAT_FILE.
- * config/nm-m3.h: Change guard from _OS_MACH3_H_ and _OS_MACH3_H
- (it was inconsistent and namespace-wrong) to NM_M3_H.
- * m3-nat.c (mach_really_wait): Change parameter name to ourstatus.
- (m3_open): New function.
- (m3_ops): Use it.
- * TODO: Update Mach section.
-
- * Makefile.in: Remove "rapp" stuff; it is superseded by gdbserver.
-
-Sun Feb 6 13:26:21 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * printcmd.c (printf_command): Add missing single-letter
- backslash-escape sequences, and improve error message.
-
-Sun Feb 6 06:55:15 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * corelow.c (solib_add_stub, core_open): Pass address of from_tty
- rather than trying to shove an int into a pointer and back out
- again. This avoids compiler warnings.
-
- * defs.h (alloca): Declare as void *, not char *, on hpux.
- Don't prototype it, just declare the return type.
-
-Sun Feb 6 03:25:41 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/i386/tm-sun386.h, config/i386/tm-symmetry.h
- (REGISTER_CONVERT_TO_RAW): Add missing backslash.
-
-Sat Feb 5 08:03:41 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-mips.c (mips_fetch_registers): If regno is FP_REGNUM or
- ZERO_REGNUM, just read it as zero without talking to the board.
-
- * config/i386/tm-i386aix.h (REGISTER_CONVERT_TO_RAW): Add missing
- backslash.
- * i386-tdep.c (i386_extract_return_value): Pass TYPE_LENGTH (type)
- to store_floating, not nonexistent variable len.
-
- * remote-mips.c (mips_insert_breakpoint, mips_remove_breakpoint):
- New functions.
- (mips_store_word): Change calling convention to return errors, and
- to provide old contents if the caller wants it.
- (mips_xfer_memory): Deal with errors from mips_store_word.
- * config/mips/tm-idt.h, config/mips/tm-idtl.h: Remove BREAKPOINT
- define now that remote-mips.c doesn't use BREAKPOINT.
-
- * remote-mips.c (mips_create_inferior): Call warning if arguments
- specified, and then execute "set args" command. Call error, not
- mips_error, if executable file not specified.
-
- * remote-e7000.c: Replace "snoop" command (e7000_noecho) with
- remote_debug.
-
- * config/rs6000/tm-rs6000.h (STORE_STRUCT_RETURN): Don't cast
- to unsigned int.
-
-Sat Feb 5 05:27:05 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * value.h (print_longest): Rename "value" to "val" in prototype
- declaration because some compilers don't like arguments whose
- names are the same as types.
- * remote.c (remote_xfer_memory): Cast "myaddr" to unsigned char *
- before passing it to remote_*_bytes.
-
-Fri Feb 4 15:53:18 1994 Steve Chamberlain (sac@cygnus.com)
-
- * h8500-tdep.c (saved_pc_after_call): The size of the
- pc is memory model dependent. (segmented_command,
- unsegmented_command, _initialize_h8500_tdep): New commands to
- change memory model.
- * remote-e7000.c (_initialize_remote_e7000): Change name of snoop
- command.
- * remote-hms.c (hms_load): Remove breakpoints when loaded.
- (hms_wait): Use new status structure
- (hms_open): Push the target here. (hms_before_main_loop): Not
- here. (supply_val, hms_fetch_register, hms_store_register): Cope
- with H8/500 names too. (hms_fetch_register): Take out REGISTER_TYPE.
- * sh-tdep.c (show_regs, initialize_sh_tdep): New command to print
- all registers in a compact way.
-
-Fri Feb 4 07:41:13 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * config/rs6000/tm-rs6000.h: Declare rs6000_struct_return_address
- as CORE_ADDR to match definition in rs6000-tdep.c.
-
-Fri Feb 4 01:14:20 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dwarfread.c (process_dies): Skip nested TAG_compile_unit DIEs.
- * dwarfread.c (add_partial_symbol): Do not enter opaque aggregate
- definitions into the psymtab.
-
-Thu Feb 3 12:38:58 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m68k-stub.c: Treat mc68332 like mc68020 most places. Provide
- a special exceptionSize for the 68332.
-
- * remote-udi.c (udi_attach): If no arguments, print error.
-
-Thu Feb 3 17:34:05 1994 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (VERSION): Bump to 4.12.1
- * NEWS, README: Update to match 4.12 release.
-
-Thu Feb 3 12:38:58 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * command.c (empty_sfunc): New function.
- (add_set_cmd): Use it instead of not_just_help_class_command.
- (not_just_help_class_command): Change calling convention back to
- what it was before yesterday's change.
-
- * stabsread.c (read_sun_builtin_type): Skip the semicolon at the end
- of the type if present.
-
-Wed Feb 2 11:16:45 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * printcmd.c (decode_format): Don't blithely set the size for
- an address to 'w'. Make it 'g' or 'h', depending on TARGET_PTR_BIT.
-
- * defs.h: Just typedef CORE_ADDR to bfd_vma. Include bfd.h.
- If BFD64, make a LONGEST a BFD_HOST_64_BIT.
- * defs.h (longest_to_int): Don't depend on CC_HAS_LONG_LONG; instead
- always just check against INT_MIN and INT_MAX (this also fixes things
- if sizeof (long) > sizeof (int), e.g. Alpha).
- * config/pa/tm-hppa.h, config/i386/sun386.h, config/rs6000/tm-rs6000.h:
- Don't define LONGEST or BUILTIN_TYPE_LONGEST.
- * gdbtypes.h: Remove BUILTIN_TYPE_LONGEST and
- BUILTIN_TYPE_UNSIGNED_LONGEST.
- * language.h, c-lang.c, ch-lang.c, m2-lang.c, language.c: Remove
- longest_int and longest_unsigned_int.
- * value.h (struct value): Just align to LONGEST, rather than worrying
- about CC_HAS_LONG_LONG.
- * valarith.c (value_binop): Figure out type ourself based on
- sizeof (LONGEST) rather than relying on BUILTIN_TYPE_LONGEST. The
- point is that we don't depend on CC_HAS_LONG_LONG anymore.
- * valprint.c (val_print_type_code_int): Just call
- extract_unsigned_integer directly, rather than going through
- unpack_long.
- * printcmd.c (decode_format): Remove code which would sometimes
- change 'g' size to 'w' for integers. print_scalar_formatted handles
- printing huge integers well enough, thank you.
-
- * command.c (add_set_cmd, not_just_help_class_command): Change
- to make this the sfunc, not cfunc, since that is how we call it.
- * command.h: Comment difference between sfunc and cfunc.
- * demangle.c (set_demangling_command): Add third arg since that
- is how it is called.
- (_initialize_demangler): Use sfunc, not cfunc, for
- set_demangling_command, since that is how it is called.
- Remove show_demangling_command; it has no effect.
-
- * command.c (shell_escape): Report errors correctly (with error
- message from strerror).
-
-Wed Feb 2 14:35:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * xcoffread.c (read_xcoff_symtab): Change CSECT_LEN to use
- x_scnlen.l rather than x_scnlen to match corresponding change in
- coff/internal.h.
-
-Wed Feb 2 11:16:45 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbtypes.h, ch-typeprint.c, ch-valprint.c:
- Change comments regarding TYPE_CODE_BOOL.
- * language.c (boolean_type): Always return 1 for TYPE_CODE_BOOL,
- regardless of the language.
- (value_true): Just call value_logical_not regardless of language.
- * coffread.c (coff_read_enum_type), stabsread.c (read_enum_type):
- Remove #if 0'd code which makes some enums TYPE_CODE_BOOL.
- * language.h: Improve comment for la_builtin_type_vector.
- * m2-lang.c (_initialize_m2_language): Don't add any fields to
- builtin_type_m2_bool.
-
-Tue Feb 1 17:13:32 1994 Kevin Buettner (kev@cujo.geg.mot.com)
-
- * config/m88k/{tm-delta88.h,tm-delta88v4.h}, m88k-tdep.c:
- Define IN_SIGTRAMP and backtrace correctly through signal handlers.
-
-Tue Feb 1 22:13:25 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * procfs.c (wait_fd): Handle EINTR error return from PIOCWSTOP ioctl
- by restarting the ioctl.
-
-Tue Feb 1 16:16:25 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * target.h (target_wait): Add comment about calling
- return_to_top_level.
-
-Tue Feb 1 12:21:00 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * coffread.c (read_one_sym): bfd_coff_swap_aux_in now takes
- additional arguments.
- * xcoffread.c (read_xcoff_symtab, read_symbol_lineno): Likewise.
-
-Mon Jan 31 16:10:41 1994 Stu Grossman (grossman at cygnus.com)
-
- * sparc-stub.c: Remove unnecessary #include of memory.h.
-
-Mon Jan 31 12:12:34 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * mips-tdep.c: Remove code which sets saved_regs from
- init_extra_frame_info and put it in new function mips_find_saved_regs.
- (READ_FRAME_REG): Remove macro and replace uses with the expansion.
- * mips-tdep.c, config/mips/tm-mips.h: When examining ->saved_regs,
- check if it is NULL and call mips_find_saved_regs if so.
-
- * remote-mips.c: Use unfiltered, not filtered, output most places.
-
- * blockframe.c (get_prev_frame_info): Detect and stop an infinite
- backtrace. Revise comments.
-
-Mon Jan 31 09:40:33 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (parse_procedure): Remove _sigtramp kludges for
- alpha and irix. The _sigtramp case has to be handled properly
- in the tdep files if we have no ecoff debugging info.
- * alpha-tdep.c (alpha_frame_saved_pc, alpha_frame_chain),
- mips-tdep.c (mips_frame_saved_pc): Handle signal handler frames
- without PC_REGNUM kludge.
- * mdebugread.c (fixup_sigtramp), mips-tdep.c (read_next_frame_reg):
- Clean up handling of mips sigtramp frames, improve comments.
-
-Sat Jan 29 23:25:57 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * paread.c (read_unwind_info): Fix typo.
-
- * paread.c (pa_symtab_read): Update the "check_strange_names"
- filter to match GCC's current output. Filter out section symbols
- (which the HP linker sometimes puts in the wrong place).
-
-Sat Jan 29 07:44:59 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * serial.h (SERIAL_SET_TTY_STATE): Comment return value.
-
- * Makefile.in (TAGS): Just echo one line, rather than the whole thing.
-
- * Makefile.in: Remove all references to sparcly-nat.c.
-
- * Makefile.in (HFILES_NO_SRCDIR): Include dcache.h remote-utils.h
- remote-sim.h directly, rather than via $(remote_utils_h). This avoids
- duplicating serial.h and target.h.
-
- * Makefile.in: Don't set M_INSTALL and M_UNINSTALL. These variables
- are not used anywhere (a 5 Oct 1993 change removed the uses).
-
- * config/m68k/monitor.mt (TDEPFILE): Add remote-es.o.
- * config/m68k/es1800.mt: Add comment.
- * remote-es.c: Extensive changes to update to current conventions.
-
- * ser-unix.c (wait_for, hardwire_readchar) [HAVE_TERMIO, HAVE_TERMIOS]:
- If the timeout is too big to fit in c_cc[VTIME], then do multiple reads
- to achieve the desired timeout.
- * serial.h (serial_t): Add field timeout_remaining.
-
-Fri Jan 28 08:45:02 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * c-exp.y (yylex): Reenable nested type code.
-
-Fri Jan 28 15:40:33 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * a29k-tdep.c (examine_tag): Add comment regarding argcount.
-
- * remote-mips.c (mips_ops): Fix docstring.
-
- * remote-bug.c (bug_ops): Remove spurious newline from docstring.
-
- * config/m68k/tm-monitor.h: Changes to bring this into accordance
- with the old tm-m68k-em.h:
- (GDBINIT_FILENAME, DEFAULT_PROMPT): Remove.
- (HAVE_68881): Don't undefine; HAVE_68881 is obsolete.
- (REGISTER_NAMES): Don't muck with it; what tm-m68k.h has is fine.
- Add FIXME regarding GET_LONGJMP_TARGET.
-
- * remote-udi.c (udi_close, udi_detach, udi_kill): Add comments.
- * infptrace.c (kill_inferior): Add comments.
- * main.c (quit_command): Call target_close after we kill or
- detach.
- * remote-udi.c (udi_close): Don't error() if QUITTING.
-
-Fri Jan 28 11:55:52 1994 Rob Savoye (rob@darkstar.cygnus.com)
-
- * configure.in: Make m68k-coff and aout add monitor support in
- addition to the standard serial support.
-
-Fri Jan 28 08:45:02 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * mdebugread.c (psymtab_to_symtab_1): Don't complain on stLabel with
- index indexNil.
-
-Fri Jan 28 10:40:34 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/pa/tm-hppa.h: Define macro SMASH_TEXT_ADDRESS.
- * elfread.c (record_minimal_symbol_and_info),
- dwarfread.c (process_dies), paread.c (pa_symtab_read): Use it.
-
-Thu Jan 27 15:12:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * i386-stub.c: Add ".text" right before "mem_fault:".
-
- * main.c (baud_rate): Add FIXME comment about printing -1 value.
-
- * remote-utils.c (usage): Fix message to be accurate and conform
- more closely to normal conventions.
-
- * remote-utils.c (gr_files_info): Have the exec_bfd test control
- whether to show information about exec_bfd, and not control whether
- to show information about device and speed.
-
- * remote-utils.c (gr_open): If sr_get_device returns NULL, give
- usage message, don't dump core.
-
- * remote-bug.c (bug_write_memory): Use alloca, not GCC extension
- for variable size array.
- (bug_fetch_register, bug_store_register): Rename "value" to
- "fpreg_buf" because some compilers don't like variables whose
- names are the same as types.
- (bug_store_register): Use a cast when converting char * to
- unsigned char *.
-
- * symmisc.c (maintenance_print_symbols): Don't refer to the name
- of the command in error message (the text was referring to the old
- name of the command).
-
- * symmisc.c (dump_symtab): Fix args to fprintf_filtered.
-
- * c-typeprint.c (c_type_print_base): Have SHOW == 0 mean to print
- full details on structure elements without names. This partially
- reverts the changes of 1 Jul 1993 and 31 Aug 1993; I think this aspect
- of those changes was accidental.
-
- * stack.c (parse_frame_specification): If SETUP_ARBITRARY_FRAME is
- defined, make it an error to specify a single argument which is not
- a frame number.
-
- * Makefile.in (version.c), main.c (print_gdb_version): Use
- host_alias and target_alias, not host_canonical and
- target_canonical, to print configuration.
-
-Wed Jan 26 10:57:21 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * parse.c (write_exp_msymbol): Use new type msymbol_addr_type instead
- of builtin_type_long. It is necessary to get a type which is
- TARGET_PTR_BIT bits in size; builtin_type_long might not be big enough.
-
- Fix many sins which will come up in 32 bit x 64 bit GDB, and
- various miscellaneous things discovered in the process:
- * printcmd.c, defs.h (print_address_numeric): New function.
- * c-valprint.c (c_val_print), ch-valprint.c (chill_val_print)
- breakpoint.c (describe_other_breakpoints, breakpoint_1, mention),
- cp-valprint.c (cplus_print_value), infcmd.c (jump_command),
- printcmd.c, stack.c, symfile.c, symmisc.c, valprint.c:
- Use it.
- * utils.c, defs.h (gdb_print_address): New function.
- * expprint (dump_expression), gdbtypes.h: Use it.
- * breakpoint.c (describe_other_breakpoints),
- symmisc.c (dump_symtab, print_symbol):
- Use filtered not unfiltered I/O.
- (remove_breakpoints): Remove BREAKPOINT_DEBUG code. Might as well
- just run gdb under a debugger for this (and it had problems with
- printing addresses, how to print b->shadow, etc.).
- * buildsym.c (make_blockvector), core.c (memory_error),
- exec.c (print_section_info), maint.c (print_section_table),
- mdebugread.c (parse_procedure), solib.c, source.c, symfile.c,
- symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
- Add comments saying code is broken. Marked with "FIXME-32x64".
- * dbxread.c (process_one_symbol), partial-stab.h (default),
- remote-vx.c (vx_run_files_info):
- Don't cast int being passed to local_hex_string.
- * symmisc.c (print_symbol): Don't cast long being passed to %lx.
- * symtab.h (general_symbol_info): Add comment about SYMBOL_VALUE
- only being a long.
- * symmisc.c (print_symbol): Print "offset" in message for LOC_ARG
- and LOC_LOCAL.
- * printcmd.c (print_address): Remove #if 0 code with ADDR_BITS_REMOVE.
- * source.c: Include <sys/types.h> regardless of USG.
-
-Tue Jan 25 12:58:26 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * valops.c (value_assign): Set `type' after coercing toval.
- * c-valprint.c (c_val_print), ch-valprint.c (chill_val_print):
- Use extract_unsigned_integer to get the address of a reference.
-
-Tue Jan 25 11:31:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c (STABS_CONTINUE, error_type), partial-stab.h:
- AIX can use ? instead of \ for continuation. Deal with it.
-
- * paread.c (read_unwind_info): Just assign to objfile->obj_private,
- not OBJ_UNWIND_INFO. Assigning to a cast is a GCC-ism which
- the HP compiler in ANSI mode doesn't like.
-
- * main.c: When defaulting HAVE_SIGSETMASK based on USG, just do it
- based on USG, rather than defining HAVE_SIGSETMASK to an
- expression containing defined. Having a macro used in #if expand
- to an expression containing "defined" is undefined according to
- ANSI, and the HP compiler in ANSI mode doesn't do what we wanted
- it to.
-
-Mon Jan 24 20:51:29 1994 John Gilmore (gnu@cygnus.com)
-
- * sparc-nat.c (fetch_inferior_registers, store_inferior_registers):
- Clean up the changes of 11 Jan, as recommended by Peter Schauer.
-
-Fri Jan 21 19:10:44 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * ch-exp.y (match_string_literal): Allow a zero-length string.
- * ch-lang.c (chill_printstr): Don't print zero-length string funny.
-
-Sat Jan 22 17:08:48 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * i386aix-nat.c (i386_float_info): Reverse order of registers before
- passing them to print_387_status.
- (print_387_status): Don't subtract top from 7 before using it.
- * i387-tdep.c: Remove comment about AIX wanting "top" subtracted
- from 7; the above explains it.
-
-Sat Jan 22 20:25:11 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mips-tdep.c (init_extra_frame_info): Use frame relative stack
- pointer value when fixing up the frame at the start of a function.
-
-Sat Jan 22 12:29:13 1994 Stu Grossman (grossman at cygnus.com)
-
- * lynx-nat.c (fetch_core_registers): Load the I & L regs for the
- Sparc from the stack.
-
-Sat Jan 22 08:30:42 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * remote-mips.c (mips_initialize): Clear mips_initializing via
- cleanup chain, not directly.
-
- * ser-unix.c (wait_for) [HAVE_TERMIO, HAVE_TERMIOS]: Make a timeout
- of -1 mean forever, like in the HAVE_SGTTY case. Warn if we are
- munging the timeout due to the limited range of c_cc[VTIME].
-
- * fork-child.c, inferior.h (fork_inferior): New argument shell_file.
- * procfs.c (procfs_create_inferior), inftarg.c (child_create_inferior),
- m3-nat.c (m3_create_inferior): Pass it.
- * procfs.c: Remove ptrace function. It was declared in a way which
- conflicted with the prototype in unistd.h on Solaris.
-
-Sat Jan 22 01:37:40 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * sparc-tdep.c (frame_saved_pc): Get the pc from the saved pc
- in the sigcontext if it is a signal trampoline frame.
- * config/sparc/tm-sun4sol2.h (IN_SIGTRAMP, SIGCONTEXT_PC_OFFSET):
- Define for Solaris2.
-
-Sat Jan 22 00:34:47 1994 Stu Grossman (grossman at cygnus.com)
-
- * sparc-tdep.c, lynx-nat.c, config/sparc/tm-sparc.h,
- config/sparc/tm-sparclynx.h: Move defs of FRAME_SAVED_I0/L0 to
- tm-sparc.h so they can be overridden if necessary.
-
-Fri Jan 21 17:49:28 1994 Stu Grossman (grossman at cygnus.com)
-
- * lynx-nat.c: Add Sparc support.
- * sparcly-nat.c: Remove. It's useless.
- * config/sparc/nm-sparclynx.h: Rewrite.
- * config/sparc/sparclynx.mh (NATDEPFILES): Replace sparcly-nat.o
- with lynx-nat.o
- * config/sparc/tm-sparclynx.h: Rewrite.
-
-Fri Jan 21 19:08:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * rs6000-pinsn.c: Use the new disassembler in the opcodes
- directory. Old code was discarded, since the new opcode table has
- a different format.
-
-Fri Jan 21 14:28:30 1994 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (realclean): Remove info files per make-stds.texi.
-
-Fri Jan 21 12:47:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dbxread.c (end_psymtab): Only patch psymtab textlow and texthigh
- if N_SO_ADDRESS_MAYBE_MISSING is defined.
- * config/sparc/tm-sun4sol2.h: Define it.
-
-Thu Jan 20 15:04:24 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * printcmd.c (print_address_symbolic): Unconditionally use msymbol
- if we did not find a symbol.
-
-Fri Jan 21 08:20:18 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * infptrace.c (child_xfer_memory): Only use if CHILD_XFER_MEMORY
- is not defined.
-
- * hppab-nat.c (call_ptrace): Delete redundant function.
- (kill_inferior, attach, detach, child_resume): Likewise.
- (child_xfer_memory): Likewise.
-
- * hppah-nat.c (call_ptrace): Delete redundant function.
- (kill_inferior, attach, detach, child_resume): Likewise.
-
- * config/pa/hppabsd.mh (NATDEPFILES): Add infptrace.o.
-
- * config/pa/hppahpux.mh (NATDEPFILES): Add infptrace.o.
-
- * config/pa/nm-hppab.h (FETCH_INFERIOR_REGISTERS): Define.
-
- * config/pa/nm-hppah.h (FETCH_INFERIOR_REGISTERS): define.
- (CHILD_XFER_MEMORY): Define.
- (PT_*): Define so that generic infptrace.c code can be used.
-
-Fri Jan 21 09:23:33 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * xcoffread.c (xcoff_symfile_read): Make second parameter a
- struct section_offsets *, not a (nonexistent) struct section_offset *.
-
- * xcoffread.c (read_xcoff_symtab): Make main_aux just a union
- internal_xcoff_symtab, not an array of one of them. Change lots of
- "main_aux" to "&main_aux" and so on.
-
- * coffread.c, xcoffread.c: Include <coff/internal.h>
- before "symfile.h".
-
-Thu Jan 20 17:30:55 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * coffread.c (coff_getfilename): Make it not static.
-
- * xcoffread.c (read_xcoff_symtab): complain() not abort().
-
- * xcoffread.c (struct coff_symbol): Rename c_nsyms to c_naux (removes
- a completely gratuitous difference between xcoffread.c and coffread.c).
-
-Wed Jan 19 15:09:44 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c (wait_for_inferior): Don't set frame for
- step_resume_breakpoint for IN_SIGTRAMP cases.
-
- * infrun.c (wait_for_inferior), breakpoint.h (struct bpstat_what),
- breakpoint.c (bpstat_what): Move step_resume from its own field of
- the struct bpstat_what into the main_action. Make it override
- other breakpoints. This is a conservative change in the sense
- that before the step resume breakpoint was a breakpoint.c
- breakpoint, hitting the step resume breakpoint overrode even
- calling bpstat_stop_status.
-
-Wed Jan 19 12:40:25 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * infrun.c (normal_stop): Set stop_pc after popping the dummy frame
- in case execution was stopped in the called function.
- * stack.c (print_frame_info, frame_info): If backtracing through
- a call dummy, handle the starting source line number on a line
- boundary like backtracing through sigtramp.
- * sparc-tdep.c (sparc_frame_find_saved_regs): Get frame address
- for call dummy frame right. Remove old test for dummy frame,
- it has been unused at least since gdb-3.5.
- * sparc-tdep.c (sparc_push_dummy_frame): Set return address register
- of the dummy frame.
-
-Tue Jan 18 16:16:35 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infcmd.c (signal_command): Accept 0 as legitimate signal number.
-
-Tue Jan 18 14:09:25 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * infrun.c (signals_info), target.c (target_signal_from_name):
- Use ugly casts to avoid enumvar < enumvar or enumvar++.
-
-Mon Jan 17 22:00:15 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * ser-unix.c (hardwire_noflush_set_tty_state): Don't muck with ICANON.
- * inflow.c (terminal_ours_1): When discussing how to deal with the
- tty state, make note of query() as well as readline.
-
- * infrun.c (_initialize_infrun): Add TARGET_SIGNAL_POLL to list of
- signals for which stop and print are cleared by default.
-
-Mon Jan 17 20:00:51 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * config/pa/tm-hppa.h (unwind_table_entry): Use one of the
- reserved fields to hold a stub unwind entry type. Fix typo.
- (stub_unwind_entry): New structure for raw stub unwind entries.
- (stub_unwind_types): The types of stubs we may encounter.
- (UNWIND_ENTRY_SIZE, STUB_UNWIND_ENTRY_SIZE): New defines.
- * hppa-tdep.c (rp_saved): Use additional information provided
- by linker stub unwind descriptors.
- (frameless_function_invocation): Likewise.
- (frame_chain_valid): Likewise.
- * paread.c (compare_unwind_entries): New function for sorting
- unwind table entries.
- (read_unwind_info): Rewrite to remove dependency on host endianness.
- Read in data from the $UNWIND_END$ subspace which contains linker
- stub unwind descriptors. Merge that data into the basic unwind
- table.
-
- * hppab-nat.c (_initialize_kernel_u_addr): Delete unwanted functions.
-
-Mon Jan 17 22:00:15 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * xcoffread.c (read_xcoff_symtab, case C_FILE): Accept the name
- from either the symbol name or the auxent.
- * coffread.c, symfile.h (coff_getfilename): Renamed from getfilename,
- no longer static.
-
-Mon Jan 17 13:35:01 1994 Fred Fish (fnf@cygnus.com)
-
- * Makefile.in (ALLPARAM): Change irix5.h to nm-irix5.h.
-
-Mon Jan 17 12:35:42 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * README: Update notes for alpha port.
-
-Mon Jan 17 11:15:57 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * i960-tdep.c (i960_fault_to_signal): Return TARGET_SIGNAL_ILL
- for operation fault, constraint fault, and type fault.
-
-Sun Jan 16 12:46:01 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (init.c): Add comment explaining formatting conventions.
-
- * c-exp.y (parse_number): Assign to temporary between the right
- shifts, to work around a bug in the SCO compiler.
-
- * Makefile.in (ALLCONFIG, ALLPARAM, ALLDEPFILES, HFILES_NO_SRCDIR):
- Add various files which were added to GDB recently.
-
- * xcoffread.c (process_xcoff_symbol): Only change 'V' to 'S' if not
- within_function.
-
- * Makefile.in: Add mostlyclean target.
-
-Sat Jan 15 10:20:13 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Version 4.11.4.
-
-Sat Jan 15 18:27:34 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * main.c (show_commands): Make return type of extern
- history_get be HIST_ENTRY, rather than struct _hist_entry.
- (The latter loses with the upcoming merged readline.)
-
-Sat Jan 15 10:20:13 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * minsyms.c (prim_record_minimal_symbol_and_info): Make tempstring
- const char *, not char *.
-
- * symtab.h (struct symbol): Make section short, not unsigned short.
-
- * symtab.c (lookup_symbol): Add comment about QUIT here.
-
- * utils.c (fputs_unfiltered): Call fputs, not fputs_maybe_filtered.
-
- * c-exp.y (parse_number): Check for overflow regardless of range
- checking. Fix overflow check to use unsigned LONGEST, not
- unsigned int.
-
- * c-exp.y (parse_number): Make it so that integer constants are
- builtin_type_long_long if builtin_type_long isn't big enough or if
- an "LL" suffix is used. Properly handle "UL" or "LU" suffixes.
-
- * c-typeprint.c (c_type_print_varspec_suffix, case TYPE_CODE_FUNC):
- Print our "()" first, then recurse for the target type.
-
-Fri Jan 14 21:55:39 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-udi.c (udi_create_inferior): Quote empty execfile argument.
-
- * gdbserver/low-lynx.c: Include <sys/wait.h> not "/usr/include/wait.h".
-
-Fri Jan 14 14:17:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * utils.c (request_quit): Re-establish signal handler regardless
- of USG.
-
- * config/mips/xm-irix4.h: Define HAVE_TERMIOS.
-
-Fri Jan 14 21:55:39 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * i960-tdep.c: Include target.h.
-
-Fri Jan 14 17:12:28 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * lynx-nat.c (sys/wait.h): Don't use absolute pathname.
-
-Fri Jan 14 11:06:10 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * lynx-nat.c (child_wait): Fix thinkos in struct target_waitstatus
- changes (status -> ourstatus; declare status, etc.).
- * config/nm-lynx.h: Fix child_wait prototype and include target.h.
-
-Fri Jan 14 14:17:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (ALLPARAM): Add config/nm-lynx.h.
-
-Fri Jan 14 11:49:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * remote-mips.c (mips_request, mips_wait): Correct prototypes.
-
-Fri Jan 14 11:37:17 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/i386/xm-linux.h: Define HAVE_TERMIOS.
-
-Fri Jan 14 01:04:36 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/alpha/tm-alpha.h (CALL_DUMMY): Improve comment.
-
-Thu Jan 13 10:32:38 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote-vx.c (vx_wait): Only call i960_fault_to_signal if I80960
- is defined. Otherwise just report TARGET_SIGNAL_UNKNOWN.
-
- * mips-tdep.c (mips_push_arguments): Byteswap struct_addr before
- writing it.
-
- Add search to target vector (#if 0'd until after 4.12):
- * target.h (to_search, target_search): Add.
- * gdbcore.h, core.c (generic_search): Add.
- * remote.c (remote_search): Add.
- * a29k-tdep.c (init_frame_info): Use target_search to find traceback
- tag.
-
- * printcmd.c (print_address_symbolic): If set print fast-symbolic-addr
- is on, call find_pc_function rather than relying just on the minimal
- symbols (probably only matters for symbol readers which don't put
- statics in the minimal symbols, but changing this strikes me as
- not conservative enough).
- Initialize name_location in all cases.
- If no symbol and no msymbol, don't print anything symbolic.
-
- * a29k-tdep.c (push_dummy_frame): Add comment about saving lr0.
-
-Wed Jan 12 20:53:16 1994 John Gilmore (gnu@cygnus.com)
-
- * printcmd.c (print_address_symbolic): Make it search the
- symtabs for variables as well as functions. Add `set print
- fast-symbolic-addr' and default it to fast (the old way).
- Print line numbers for data items as well as functions.
-
- * symtab.c (find_addr_symbol): Return the symtab and the symbol
- address, if a symbol is found (take two more args pointing to
- where to store these results).
-
- * symtab.h (find_addr_symbol): Add prototype.
-
-Wed Jan 12 19:32:11 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * objfiles.h: Fix comments to reflect the fact that the phrase
- "top of stack" always refers to where the pushing and popping takes
- place, regardless of whether it is at the highest or lowest address.
-
-Wed Jan 12 13:23:37 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (parse_symbol): Do not set TYPE_TAG_NAME for
- compiler generated tag names.
- * mdebugread.c (parse_type): Handle cross references to qualified
- aggregate types.
- * valops.c (value_struct_elt): Improve error message if the
- address of a method is requested from an object instance.
- * valops.c (search_struct_method): Make name_matched non-static
- to get it initialized correctly.
- * config/i386/nm-i386sco.h (CANNOT_STORE_REGISTER): Define to
- exclude segment register which are not writable on newer SCO versions.
-
-Wed Jan 12 14:44:45 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * go32-xdep.c: Remove unused function uerror.
- (sigsetmask): Declare return type. Declare argument (to match the
- way it is called). Explicitly return 0.
-
-Wed Jan 12 01:44:25 1994 John Gilmore (gnu@cygnus.com)
-
- * symtab.h (struct symbol, general_symbol_info, minimal_symbol,
- partial_symbol): Shrink the storage sizes of symbols, by making
- enums into 1-byte bitfields when compiled __GNUC__, moving all the
- enums and small ints to the end of each struct to improve
- alignment, and switching the section number from int to unsigned
- short.
-
-Wed Jan 12 00:16:26 1994 John Gilmore (gnu@cygnus.com)
-
- * symtab.c (find_addr_symbol): New routine that will find the nearest
- symbol associated with an address. It does so by exhaustive
- search of the symtabs, so it's slow but complete.
-
-Tue Jan 11 23:57:30 1994 John Gilmore (gnu@cygnus.com)
-
- * coffread.c (read_coff_symtab): Set PC bounds of _globals_ symtab
- to [0,0] rather than [0, end of first source file]. This avoids
- problems with other parts of GDB looking for linetables in the
- _globals_ symtab. Eliminate variables num_object_files and
- first_object_file_end.
-
-Tue Jan 11 00:53:46 1994 John Gilmore (gnu@cygnus.com)
-
- * a29k-tdep.c (init_frame_info): Cast null arg to examine_tag.
- (pop_frame): Restore PC2 and LR0 from dummy frames.
- (push_dummy_frame): Save PC2 and LR0 into dummy frames.
- (setup_arbitrary_frame): Handle 3 args and set up real frames.
- * config/a29k/tm-a29k.h (FRAME_NUM_ARGS): Update comments.
- (DUMMY_FRAME_RSIZE): Add 2 longwords for PC2 and LR0.
- (SETUP_ARBITRARY_FRAME): Define.
-
-Tue Jan 11 06:59:10 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * infrun.c, config/mips/tm-irix5.h: Remove #if 0'd AT_FUNCTION_START.
-
-Tue Jan 11 14:27:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * remote-udi.c (udi_resume): Correct prototype.
-
-Tue Jan 11 11:10:30 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * config/pa/tm-hppa.h (FRAME_FIND_SAVED_REGS): Call
- hppa_frame_find_saved_regs.
- * hppa-tdep.c (dig_fp_from_stack): Delete function.
- (prologue_inst_adjust_sp): New function.
- (is_branch, inst_saves_gr, inst_saves_fr): New functions.
- (skip_prologue): Completely rewrite to use unwind information.
- (hppa_frame_find_saved_regs): Likewise.
-
-Tue Jan 11 06:59:10 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * remote-mips.c (mips_wait): Use new function mips_signal_from_protocol
- to convert a signal number with appropriate bounds checking.
-
- * remote-mips.c (mips_wait): Fix typos (0x177 -> 0177, 0x377 -> 0377).
-
-Tue Jan 11 00:53:46 1994 John Gilmore (gnu@cygnus.com)
-
- * stack.c (frame_info): If FRAME_FIND_SAVED_REGS isn't defined,
- print a newline to end the display anyway.
-
- * sparc-tdep.c (sparc_pop_frame): Pop the fsr and csr (float and
- coprocessor status regs) when popping a frame. This fixes
- float exceptions that occur after calling inferior functions.
-
- * sparc-nat.c (fetch_inferior_registers, store_inferior_registers):
- Read and write the fsr (float status register) to/from the child
- process along with the float regs. Remove Peter Schauer's change
- of May 24 '93, which has higher overhead and doesn't solve the
- real problem (which was that FSR wasn't being set).
-
-Mon Jan 10 23:16:42 1994 John Gilmore (gnu@cygnus.com)
-
- * a29k-tdep.c (examine_prologue): Don't worry if the ASGEQ
- stack overflow check isn't right after the register stack
- adjustment instruction. Metaware R2.3u compiler moves other
- things in front of it. This fix isn't perfect but is what's
- running.
-
-Mon Jan 10 20:08:23 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * c-valprint.c (c_val_print): Treat TYPE_CODE_RANGE like TYPE_CODE_INT.
-
- * config/alpha/alpha-netware.mt: Rename to alpha-nw.mt for 14
- character filenames.
- * configure.in: Change accordingly.
-
-Mon Jan 10 15:48:36 1994 Tom Lord (lord@rtl.cygnus.com)
-
- * m68k-stub.c, sparc-stub.c: removed spurious introduction of
- _filtered io routines from these two files.
-
-Fri Jan 7 12:42:45 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/i386/tm-i386v.h, config/m68k/tm-m68k.h, config/mips/tm-mips.h,
- config/vax/tm-vax.h (CALL_DUMMY_BREAKPOINT_OFFSET): Define.
- * mdebugread.c (parse_symbol): Handle enum sh.type produced by
- DEC c89.
- * mdebugread.c (add_line): Handle zero linenos produced by DEC c89.
-
-Fri Jan 7 12:55:25 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * utils.c (print_sys_errmsg): Call gdb_flush (gdb_stdout) before
- printing to gdb_stderr.
-
- * remote-udi.c (udi_kill): Don't close the connection, just set
- inferior_pid to zero.
- (udi_mourn): Call remove_breakpoints.
-
- * remote-udi.c: Remove obsolete need_artificial_traps comment.
-
- * i386b-nat.c (sregmap): If sEAX, etc., not defined, use tEAX, etc.
-
-Thu Jan 6 07:17:53 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * symtab.c (lookup_symbol): Don't try adding .c to the name.
-
- * remote-bug.c: At the start of each section, reset srec_frame
- back to 160.
-
- * target.h: Add TARGET_WAITKIND_LOADED and TARGET_WAITKIND_SPURIOUS.
- * target.c (store_waitstatus): Add CHILD_SPECIAL_WAITSTATUS hook.
- * infrun.c (wait_for_inferior): Replace SIGTRAP_STOP_AFTER_LOAD with
- code which looks for those two waitkinds. Use switch statement.
- * config/rs6000/tm-rs6000.h: Replace SIGTRAP_STOP_AFTER_LOAD with
- CHILD_SPECIAL_WAITSTATUS.
-
- * procfs.c (procfs_wait): Fix argument name to match 4 Jan changes.
- * Move target_signal_from_host, target_signal_to_host, and
- store_waitstatus from inftarg.c to target.c. procfs needs them.
- * target.c: Include "wait.h" and <signal.h>.
- * target.h, infrun.c (proceed), proceed callers: Pass new code
- TARGET_SIGNAL_DEFAULT instead of -1. This avoids problems with
- enums being treated as unsigned and is cleaner.
- * infrun.c (signals_info): Don't print TARGET_SIGNAL_DEFAULT or
- TARGET_SIGNAL_0.
- * infcmd.c (signal_command), infrun.c (signals_info):
- Don't allow user to specify numeric equivalent of
- TARGET_SIGNAL_DEFAULT.
-
-Tue Jan 4 15:34:36 1994 Stu Grossman (grossman@cygnus.com)
-
- * config/alpha/alpha-netware.mt: New target support for Alpha
- running Netware.
- * configure.in: Add alpha-*-netware* target.
-
-Tue Jan 4 14:51:35 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * remote-mips.c (mips_wait): Fix ref to TARGET_WAITKIND_STOPPED.
-
-Tue Jan 4 09:47:14 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * target.h: Add enum target_waitkind, enum target_signal, and
- struct target_waitstatus. Change status argument to target_wait to
- be struct target_waitstatus * instead of int *.
- * target.h, infrun.c, all targets: Change type of signal arguments
- to resume(), proceed(), and target_resume() from int to enum
- target_signal.
- * All targets (*_wait, *_resume): Change accordingly.
- * infcmd.c (program_info, signal_command), throughout infrun.c,
- * fork-child.c, solib.c, hppa-tdep.c, osfsolib.c: Use this stuff.
- * convex-xdep.c, convex-tdep.c: Add FIXME's (getting the Convex
- signal code stuff right with the new signals would be non-trivial).
- * inferior.h (stop_signal): Make it enum target_signal not int.
- * target.c, target.h (target_signal_to_string, target_signal_to_name,
- target_signal_from_name): New functions.
- * inftarg.c, target.h (target_signal_to_host, target_signal_from_host,
- store_waitstatus): New functions.
- * procfs.c (procfs_notice_signals): Use them.
- * i960-tdep.c (i960_fault_to_signal): New function, to replace
- print_fault.
- * config/i960/tm-i960.h: Don't define PRINT_RANDOM_SIGNAL.
-
- * objfiles.c (build_objfile_section_table): Don't abort() if
- objfile->sections is already set.
-
- * objfiles.c (add_to_objfile_sections): Check SEC_ALLOC not SEC_LOAD
- to match recent change to exec.c.
-
- * Version 4.11.3.
-
- * main.c (print_gdb_version): Change year to 1994.
-
- * ChangeLog, ChangeLog-93: Split ChangeLog at 1994.
- * Makefile.in (NONSRC): Add ChangeLog-93.
-
-Mon Jan 3 11:57:29 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stabsread.c (read_type): Allow defining several type numbers
- at once (e.g. "(1,2)=(3,4)="...).
-
- * stabsread.c (read_enum_type): Use TARGET_INT_BIT not sizeof (int).
-
- * breakpoint.c (frame_in_dummy): Check PC as well as frame.
-
-Mon Jan 3 02:47:03 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (psymtab_to_symtab_1): Only pass N_STAB symbols
- to process_one_symbol.
- * symtab.c (find_pc_psymbol): Search global_psymbols as well to
- avoid caching a bad endaddr in find_pc_partial_function.
-
-Sun Jan 2 21:41:17 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/m68k/tm-sun3.h: Don't define BELIEVE_PCC_PROMOTION.
-
-Sat Jan 1 04:35:23 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * infrun.c (wait_for_inferior): Do not step or step resume past
- the end of a one-line function we just stepped into.
-
-For older changes see ChangeLog-93
-
-Local Variables:
-mode: indented-text
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/gdb/gdb/ChangeLog-95 b/contrib/gdb/gdb/ChangeLog-95
deleted file mode 100644
index 2265be880adb..000000000000
--- a/contrib/gdb/gdb/ChangeLog-95
+++ /dev/null
@@ -1,4915 +0,0 @@
-Fri Dec 29 16:30:58 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * symfile.c (find_sym_fns): Add PowerMac to xcoff file recognition
- kludge.
-
-Fri Dec 22 11:05:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in (gdb_host): Add support for DG/UX running on x86 as
- a host.
- (all x86 targets and hosts): Add support for pentium-pro machines.
-
- * configure: Rebuild.
-
- * config/i386/i386dgux.mh: New file for DG/UX running on x86 host.
-
-Thu Dec 21 19:09:20 1995 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * remote-array.c (array_wait): Poll the keyboard along with the
- serial port so users can tpye at the target while their
- application is running.
-
-Thu Dec 21 11:58:52 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * Makefile.in (ppcbug-rom.o, srec.o): Add dependencies.
-
- * monitor.c (monitor_debug): Take prefix, and suffix arguments.
- Print trailing newline after the suffix.
- (monitor_printf{,_noecho}): Change monitor_debug calls.
- (monitor_printf): Call monitor_expect instead of trying to do the
- expect processing locally so that if there is extra junk, it
- doesn't hang things up.
- (readchar): If MO_HANDLE_NL is set, handle \r\n pairs and convert
- them to a single \r. Use monitor_debug to print out byte read.
-
- * monitor.h (MO_HANDLE_NL): Add new flag.
-
- * ppcbug-rom.c (ppcbug_ops{1,2}): Split into two ops, one that
- uses lo 0 to load, and the other that uses lo 1. Set flag
- MO_HANDLE_NL.
- (ppcbug_open{0,1}): Clone and split to handle ppcbug_ops{1,2}.
- (_initialize_ppcbug_rom): Set up both ppcbug_open{0,1}.
-
-Wed Dec 20 10:54:41 1995 Fred Fish <fnf@cygnus.com>
-
- * defs.h: Delete extraneous whitespace at end of file.
- * symfile.h: Move #include of demangle.h outside conditional.
- * objfiles.h (struct objstats, OBJSTAT, OBJSTATS): New struct and
- macros to hold per-objfile statistics for internal
- instrumentation.
- (struct objfile): Add OBJSTATS member, which is optional.
- * buildsym.h (next_symbol_text_func): Now takes objfile argument.
- Also update copyright to 1995.
- * dbxread.c (dbx_next_symbol_text): Now takes objfile argument.
- (dbx_symfile_init, coffstab_build_psymtabs, elfstab_build_psymtabs,
- stabsect_build_psymtabs): Accumulate string table size.
- (dbx_next_symbol_text, read_dbx_symtab, read_ofile_symtab):
- Accumulate number of stabs symbols read.
- * dwarfread.c (new_symbol, symthesize_typedef):
- Accumulate number of full symbols created.
- * gdbtypes.c (alloc_type): Accumulate number of types.
- * maint.c (maintenance_print_statistics): New function.
- * mdebugread.c (mdebug_next_symbol_text): Now takes objfile
- argument.
- * minsyms.c (prim_record_minimal_symbol_and_info): Accumulate
- number of minimal symbols read.
- * os9kread.c (read_os9k_psymtab): next_symbol_text takes objfile
- arg.
- * partial-stab.h: next_symbol_text takes objfile arg.
- * stabsread.c (error_type, STABS_CONTINUE): Now takes objfile arg
- and uses it to call next_symbol_text.
- * symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
- Accumulate number of partial symbols created.
- * symfile.h (ADD_PSYMBOL_VT_TO_LIST): Accumulate number of partial
- symbols created.
- * symmisc.c (print_objfile_statistics): Print the per-objfile
- internal instrumentation statistics gathered.
- * xcoffread.c (xcoff_next_symbol_text): Now takes objfile argument.
-
-Fri Dec 15 16:15:55 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * top.c (set_endian_from_file): Use new bfd_big_endian macro.
-
-Fri Dec 15 12:21:10 1995 Raymond Jou <rjou@mexican.cygnus.com>
-
- * mpw-make.sed: Add quotes to RIncludes reference.
-
-Fri Dec 15 13:18:55 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * remote-array.c: Remove bogus setting of baudrate to 4800. Their
- hardware has real UARTS now.
-
-Mon Dec 11 18:19:16 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.in (powerpc-*-macos*): New target configuration.
- * configure: Update.
- * config/powerpc/macos.mh, config/powerpc/macos.mt,
- config/powerpc/nm-macos.h, config/powerpc/tm-macos.h, mac-nat.c:
- New files, native PowerMac debugging support.
- * Makefile.in (mac-nat.o): Add build rule.
- * mpw-config.in (enable_cflags): Add support.
- (m68k-apple-macos, powerpc-apple-macos): Fix natdepfiles to
- list object file instead of source file.
- * mpw-make.sed (@ENABLE_CFLAGS@): Don't edit out, replace with
- value of variable.
- (install, install-only): Edit MPW-specific installation into
- place of Unix shell code.
- * mac-gdb.r: Fix version resources to use symbolic version strings.
- (cfrg): New resource, code fragment for PowerMac.
-
-Mon Dec 11 14:13:03 1995 Fred Fish <fnf@amigalib.com>
-
- * dbxread.c (process_one_symbol): When looking at the next
- minimal symbol, check for end of the minimal symbol array
- (symbol with NULL pointer for name) before dereferencing it.
-
-Mon Dec 11 15:56:55 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * eval.c (evaluate_struct_tuple): Fix thinko.
-
-Mon Dec 11 06:52:02 1995 Wilfried Moser <moser@rtl.cygnus.com>
-
- * ch-typeprint.c (chill_type_print_base): Slightly change of printing
- of variant structures.
-
-Mon Dec 11 00:36:01 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * valops.c (value_cast): Handle casts to and from TYPE_CODE_CHAR.
- * ch-exp.c (match_integer_literal): Fix long long support.
- * gdbtypes.c (get_discrete_bounds): Make TYPE_LENGTH (type) ==
- sizeof (LONGEST) case work OK.
-
-Fri Dec 8 21:02:24 1995 Fred Fish <fnf@cygnus.com>
-
- * coffread.c, dbxread.c, dstread.c, objfiles.c, os9kread.c,
- symfile.c, symtab.c: Use "obstack.h" rather than <obstack.h>.
-
-Wed Dec 6 16:16:18 1995 Stu Grossman (grossman@cirdan.cygnus.com)
-
- * remote-mips.c (mips_receive_header): Allow mips_syn_garbage to be
- user-settable (via set syn-garbage-limit). Setting it to -1 makes
- it unlimited.
-
-Tue Dec 5 18:33:43 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
-
- * gdbtypes.c (check_stub_method): Make sure we get back a function
- string in the demangled name before we try to use it.
-
-Tue Dec 5 18:08:29 1995 Stu Grossman (grossman@cygnus.com)
-
- * monitor.c (monitor_expect_regexp): Make static, add prototype.
- * (monitor_read_memory_single): Call monitor_expect_regexp with
- pointer to getmem_resp_delim_pattern, not entire struct.
-
-Tue Dec 5 15:51:25 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * c-lang.h (c_op_print_tab): Don't declare, some compilers
- consider illegal if structure not defined, and only used
- in c-lang.c anyway.
-
-Sun Dec 3 12:31:03 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * eval.c (evaluate_subexp_standard case): Fix typo.
-
-Sun Dec 3 11:59:21 1995 Jeffrey A. Law <law@cygnus.com>
-
- * ch-exp.c (parse_named_record_element): Avoid aggregrate
- initializations for automatic variables.
-
- * hppa-tdep.c (hppa_alignof): Fix typo in last change.
-
-Sat Dec 2 19:32:57 1995 Fred Fish <fnf@cygnus.com>
-
- * symfile.c (global_psymbols, static_psymbols): Remove, unused.
-
-Sat Dec 2 03:02:21 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * alpha-tdep.c (heuristic_proc_desc): Add heuristic to
- determine the return address register, needed for OSF/1-3.2C.
- * config/alpha/tm-alpha.h (T7_REGNUM, T9_REGNUM): Define.
-
-Fri Dec 1 07:23:57 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppcbug-rom.c (ppcbug_cmds): Turn on MO_GETMEM_READ_SINGLE
- because PPCbug displays the memory as characters as well as hex.
- Fix getmem/setmem commands.
-
- * srec.c (load_srec): Fix off by one typo in last submission.
-
- * rs6000-tdep.c (push_arguments): Fix typo.
-
-Thu Nov 30 23:54:17 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * language.c (lang_bool_type), language.h: New function.
- * language.h (LA_BOOL_TYPE): New macro.
- * eval.c (evaluate_subexp_standard) Use LA_BOOL_TYPE instead
- of builtin_type_int where appropriate,
- * valarith.c (value_subscript): Likewise.
-
- * valops.c (value_slice): Implement (value) bitstring slices.
- * valprint.c (val_print): If TYPE_LENGTH is zero, don't automatically
- print "<incomplete type>" - Chill has zero-length (string) types.
-
- * gdbtypes.c (check_stub_type): Removed; no longes needed.
- * ch-exp.c (expect, parse_call): Tweak error messages.
-
-Wed Nov 29 13:35:18 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * scm-valprint.c (scm_isymnames): Remove "#@" prefix.
- (scm_scmval_print): Do not print "#@" prefix.
-
- * gdbtypes.h (enum type_code): Added TYPE_CODE_TYPEDEF.
- (check_typedef): New prototype.
- (CHECK_TYPEDEF): New macro.
- (TYPE_DUMMY_RANGE): Removed.
- * gdbtypes.c (get_discrete_bounds): Fix paren error; make more robust.
- (create_array_type): Don't force_to_range_type; users of the
- array are responsible for handling non-range index types.
- (create_set_type): Likewise.
- (force_to_range_type): Removed.
- (check_typedef): New function handles stub types and typedefs.
- (check_stub_type): Just call check_typedef. (To be removed.)
- (recursive_dump_type): Handle TYPE_CODE_TYPEDEF.
- * ch-lang.c (type_lower_upper): Use get_discrete_bounds.
- (evaluate_subexp_chill): Handle string repetition.
- Re-arrange to handle EVAL_AVOID_SIDE_EFFECTS better.
- * ch-typeprint.c (chill_type_print_base): Handle TYPE_CODE_TYPEDEF.
- Pass show=0 in recursive calls various places.
- (case TYPE_CODE_ARRAY): Don't require index type to have
- TYPE_CODE_RANGE.
- (case TYPE_CODE_RANGE): Don't need to support TYPE_DUMMY_RANGE.
- * gdbtypes.c, ch-lang.c, ch-typeprint.c (numerous places):
- Add check_typedef/CHECK_TYPEDEF as needed.
-
- * ch-exp.y: Replaced by ...
- * ch-exp.c: New file. Use recursive-descent.
- Recognize labelled array tuples and powerset ranges.
- * Makefile.in: Update for no longer using yacc for ch-exp.
-
- * c-lang.c: Make various functions non-static.
- * c-lang.h: Add bunches of prototypes.
- * cp-valprint.c (cp_print_value_fields): Also take address.
- (cp_print_value): Likewise. Use baselcass_offset.
- * stabsread.c (current_symbol): New static variable.
- (type_synonym_name): Remove.
- (read_type): If copying, make copy be a TYPE_CODE_TYPEDEF.
- (read_array_type): Don't need to handle undefined element type here.
- (cleanup_undefined_types): Ditto.
- (read_range_type): Look for Chill ranges.
- * valops.c (value_assign): Fix case lval_internalvar - don't try
- to assign into old value (which might be too small!).
- (value_coerce_array): No longer need special VALUE_REPEATED handling.
- (value_arg_coerce): Cleaner array->pointer decay mechanism.
- (search_struct_field): Use baseclass_offset rather than
- baseclass_addr.
- (value_slice): Use get_discrete_bounds.
- * value.h (COERCE_VARYING_ARRAY): Take type argumnt as well.
- * values.c (baseclass_offset): Change parameter interface.
- (baseclass_addr): Removed.
- * c-typeprint.c, c-valprint.c, ch-valprint.c, values.c, valops.c:
- Add check_typedef/CHECK_TYPEDEF as needed.
-
- * alpha-tdep.c, c-exp.y, h8500-tdep.c, f-exp.y, f-valprint.c,
- findvar.c, hppa-tdep.c, infcmd.c, language.c, printcmd.c,
- rs6000-tdep.c, symmisc.c, symtab.c, mdebugread.c:
- Add check_typedef/CHECK_TYPEDEF as needed.
-
- * f-typeprint.c, valarith.c, valprint.c, typeprint.c, eval.c:
- Add check_typedef/CHECK_TYPEDEF as needed.
- * f-typeprint.c: Various cleaning up.
- * valarith.c (value_subscript): Also subscript bitstrings (for Chill).
- * typeprint.c (print_type_scalar): Also support TYPE_CODE_RANGE.
- * eval.c (evaluate_subexp_standard case OP_ARRAY): Implement
- support for labelled array tuples and ranges in powerset tuples.
- (init_array_element): New function.
-
- * top.c (command_line_input): Only strip out an initial #-comment.
- Looking for internal comments is language-specific (breaks Scheme).
-
- * expression.h (enum exp_opcode): Add BINOP_RANGE.
- * expprint.c (dump_expression): Support BINOP_RANGE.
- * eval.c (evaluate_subexp_standard): Handle BINOP_RANGE (as error).
- (case MULTI_SUBSCRIPT): Fix broken f77 value->int ad hoc conversion.
- * ch-lang.c (chill_op_print_tab): Support BINOP_RANGE.
- (evaluate_subexp_chill): Error on BINOP_COMMA.
-
- * Makefile.in: Clean up so doc stuff stays in doc sub-dir.
-
-Wed Nov 29 16:39:50 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * monitor.c (monitor_debug): New function to print monitor debug
- output in printable fashion.
- (monitor_printf{,_noecho}): Call monitor_debug instead of
- fputs_unfiltered.
-
- * srec.c (load_srec): When printing srec debug information, do not
- print the carriage return directly, instead print \\r followed by
- a newline.
-
-Tue Nov 28 15:25:28 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (target_subdir): Define.
- (CC_FOR_TARGET, CXX_FOR_TARGET): Use it to find target libraries.
- * configure.in (X_CFLAGS): Fix typo.
- (target_subdir): Set to "${target_alias}/" if cross.
- * configure: Regenerated.
-
- * dbxread.c (dbx_symfile_read): Set block_address_function_relative
- for `pe' format files.
-
-Tue Nov 28 11:17:47 1995 Fred Fish <fnf@cygnus.com>
-
- * magic.h: Renamed to gmagic.h to avoid <magic.h> conflict.
- * magic.c: Renamed to gmagic.c in sympathy.
- * eval.c, gmagic.c, config/tm-magic.h:
- Include "gmagic.h" rather than "magic.h".
-
-Sat Nov 25 02:56:38 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (handle_psymbol_enumerators, parse_symbol):
- Recognize enums from alpha cc -migrate.
- (upgrade_type): Pass correct fd to parse_symbol when parsing
- the index type of an array.
- (parse_procedure, parse_lines, psymtab_to_symtab_1): Handle
- unsorted procedure descriptors from Irix 5.x and Alpha OSF/1-3.x
- shared libraries. Use CORE_ADDR instead of `unsigned long' in
- procedure descriptor address computations.
-
- * symtab.c (decode_line_1): Prevent accidental strchr match
- of a null character with the terminating null character of
- gdb_completer_quote_characters.
- (cplusplus_hint): Make sure that only a single quote is printed
- in the hint message.
-
-Fri Nov 24 16:17:01 1995 Jeffrey A Law (law@cygnus.com)
-
- * top.c (recurse_read_control_structure): Don't make cleanups
- here. Callers handle that correctly.
-
-Tue Nov 21 15:16:34 1995 Fred Fish <fnf@rtl.cygnus.com>
-
- * config/m68k/xm-hp300hpux.h: Define MMAP_BASE_ADDRESS and MMAP_INCREMENT.
- Also force HAVE_MMAP to be defined since autoconf is currently broken
- for detecting a working mmap under hpux.
- * config/pa/xm-hppah.h (MMAP_BASE_ADDRESS): Tweak MMAP_BASE_ADDRESS
- to a better value suggested by Jeffrey A Law (law@cygnus.com).
-
-Tue Nov 21 08:48:58 1995 Fred Fish <fnf@cygnus.com>
-
- * config/pa/xm-hppah.h: Define MMAP_BASE_ADDRESS and MMAP_INCREMENT.
- Also force HAVE_MMAP to be defined since autoconf is currently broken
- for detecting a working mmap under hpux.
- * objfiles.c (map_to_address): Have gdb print a warning when it
- is compiled with HAVE_MMAP but without both MMAP_BASE_ADDRESS and
- MMAP_INCREMENT defined (thus making it appear mmap doesn't work).
-
-Mon Nov 20 14:13:53 1995 Stu Grossman (grossman@cygnus.com)
-
- * infrun.c (wait_for_inferior): Add support for dynamic function
- trampolines. These are pieces of code between the caller and the
- callee that figure out the address of the callee's code at run
- time. Upon entry, we can't figure out the callee's address, so we
- set a breakpoint within the trampoline where the address will be
- known, and continue the target. Once we hit the breakpoint, we
- break at the callee's address and proceed as usual.
-
-Mon Nov 20 11:12:34 1995 Fred Fish <fnf@cygnus.com>
-
- * objfiles.c (allocate_objfile): Change warning message about mapped
- symbol tables so that it is obvious that they are not supported on
- this particular machine rather than implying they are not supported
- at all in this version of gdb.
-
-Sun Nov 19 05:20:53 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * irix5-nat.c, osfsolib.c (solib_address): Return the name of the
- containing solib.
- * stack.c (print_frame_info): Use minimal symbol only if
- fi->pc is in a known section.
-
-Sat Nov 18 11:19:35 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
-
- * solib.c (solib_address): Return the name of the containing solib.
- * solib.h (PC_SOLIB): New macro; define using solib_address.
- * stack.c (print_frame_info) [PC_SOLIB]: If no function name, try
- PC_SOLIB on the PC value.
-
-Sat Nov 18 04:09:31 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * annotate.c (annotate_source, annotate_frame_begin): Issue
- `0x' prefix for the pc value, to remain consistent with previous
- GDB versions.
-
- * blockframe.c (find_pc_partial_function), config/pa/tm-hppa.h:
- Remove Sun shared library transfer hack and
- INHIBIT_SUNSOLIB_TRANSFER_TABLE_HACK, it is obsoleted by the
- mst_solib_trampoline minimal symbols.
-
- * blockframe.c (inside_main_func): Check main_func_*pc against
- INVALID_ENTRY_*PC, not zero.
- * symfile.c (init_entry_point_info): Initialize ei.*pc with
- INVALID_ENTRY_*PC.
- * mipsread.c (mipscoff_symfile_read): If the entry_file bounds
- are still unknown after processing the partial symbols, then try
- to set them from the minimal symbols.
-
- * infcmd.c (registers_info): Error out if selected_frame is NULL.
- * stack.c (return_command): Select new current frame silently if
- not interactive.
-
- * mipsread.c (read_alphacoff_dynamic_symtab): Ignore additional
- DT_MIPS_LOCAL_GOTNO and DT_MIPS_GOTSYM entries.
-
- * irix5-nat.c (solib_create_inferior_hook): Call solib_add only
- if auto_solib_add_at_startup is nonzero.
- (_initialize_solib): Add "set auto-solib-add" command.
- * osfsolib.c (solib_create_inferior_hook): Call solib_add only
- if auto_solib_add_at_startup is nonzero.
- (_initialize_solib): Add "set auto-solib-add" command.
-
-Wed Nov 15 17:12:04 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * utils.c: Don't include sys/ioctl.h etc if MPW is host.
-
-Tue Nov 14 17:16:46 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * config/arm/tm-arm.h (ADDITIONAL_REGISTER_NAMES): Fix r5.
- (FRAME_SAVED_PC): Minor clean up.
-
-Tue Nov 14 14:51:05 1995 Stu Grossman (grossman@cygnus.com)
-
- * monitor.c (monitor_load_srec monitor_make_srec): Move all
- S-record download code into srec.c.
- * srec.c srec.h: New files. Contain S-record loading routines
- formerly in monitor.c.
- * serial.c serial.h: New routine just like fprintf, but uses
- serial_t instead of FILE *.
- * sh-tdep.c (frame_find_saved_regs init_extra_frame_info):
- Don't add four to saved pc (makes things match manual). Also, fix
- bug where we didn't get pc from stack frame correctly.
- * config/sh/tm-sh.h (SAVED_PC_AFTER_CALL): Don't add four to
- saved pc. Real hardware does this for you.
- * sh3-rom.c (sh3_load): New routine. Sets up for download then
- calls generic S-record loader.
- * config/h8300/h8300.mt, config/h8500/h8500.mt,
- config/m68k/monitor.mt, config/pa/hppapro.mt, config/sh/sh.mt:
- Add srec.o to TDEPFILES.
-
-Tue Nov 14 15:57:36 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppcbug-rom.c: New file to support the Motorola PPCBUG monitor
- for PowerPC's.
-
- * config/powerpc/ppc{,le}-{eabi,sim}.mt (TDEPFILES): Include
- ppcbug-rom.o, monitor.o, and srec.o
-
- * config/i386/linux.mt (XDEPFILES): Include ser-tcp.o.
-
-Mon Nov 13 13:12:46 1995 Jeffrey A Law (law@cygnus.com)
-
- * partial-stab.h: Remove GDB_TARGET_IS_HPPA kludge.
-
-Fri Nov 10 13:08:54 1995 Jeff Law (law@kahlua.cs.utah.edu)
-
- * terminal.h (HAVE_SGTTY): Fix typo.
-
-Thu Nov 9 17:34:01 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in (gdb_target): Build in the simulator for all
- PowerPC eabi targets, not just eabisim, providing
- --enable-sim-powerpc is used, or the host compiler is GCC.
-
-Thu Nov 9 14:04:05 1995 Raymond Jou (rjou@mexican.cygnus.com)
-
- * mpw-config.in: Add variable with names of SIOW libraries.
- * mpw-make.sed: Add an action to build SIOWgdb.
-
-Wed Nov 8 19:25:22 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Edit @ENABLE_CFLAGS@ out, mpw-configure can
- add back in if necessary.
-
-Wed Nov 8 15:59:52 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * config/mips/vr4300.mt: Added simulator to default VR4300 build.
-
-Tue Nov 7 16:02:25 1995 Stu Grossman (grossman@cygnus.com)
-
- * remote-mips.c (mips_initialize): Fix brain damage found by
- Jamie. Basically had case statement in the wrong place...
- * (mips_load): Remove unnecessary `db tty0' command. It's all
- handled by mips_initialize now.
-
-Tue Nov 7 12:59:14 1995 Raymond Jou <rjou@mexican.cygnus.com>
-
- * mac-gdb.r: Added #ifdef Macgdb.
-
-Tue Nov 7 14:59:51 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * remote-mips.c (mips_initialize): Updated to talk to VR4300 RISQ
- monitor board.
-
-Mon Nov 6 11:44:11 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * config/mips/{tm-vr4300.h tm-vr4300el.h} (TARGET_MONITOR_PROMPT):
- Change into real strings.
-
- * remote-sim.c (gdbsim_open): Moved sim_open() call to after
- callback initialisation.
-
-Sun Nov 5 00:07:52 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * configure.in (AC_CHECK_HEADERS): add stddef.h.
-
-Fri Nov 3 12:30:43 1995 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (COMMON_OBS): Use corefile.o rather than core.o
- * core.c: Rename to corefile.c.
- * config/pyr/tm-pyr.h, umax-xdep.c, sun386-nat.c, pyr-xdep.c,
- Makefile.in (SFILES), gould-xdep.c, coredep.c, armtdep.c,
- arm-xdep.c, altos-xdep.c: Change core.c references to corefile.c.
-
- From Graham Stoney <greyham@research.canon.oz.au>.
- * Makefile.in (remote-array.o): Add rule to build.
- (ALLDEPFILES): Add remote-array.c
- * remote-array.c (baud_rate): Remove unnecessary declaration.
- (baudrate): Remove.
- (array_files_info): Print global baud_rate not baudrate.
-
-Sat Nov 4 10:21:58 1995 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in (INTERNAL_CFLAGS): Add ENABLE_CFLAGS.
- * fork-child.c (fork_inferior): Add call to
- TARGET_CREATE_INFERIOR_HOOK to allow target specific code to get
- control just before the new process executes it's first instruction.
- * remote-mips.c (mips_initialize): Cleanup a bit. Don't try to
- receive a packet at first. This speeds up initialization a lot.
- Use TARGET_MONITOR_PROMPT instead of "<IDT>".
- (common_breakpoint): Use rresponse instead of rerrflg to inspect
- error code.
- * symfile.c (syms_from_objfile reread_symbols): Call
- TARGET_SYMFILE_POSTREAD to allow target specific code to get
- control after reading new symbols.
- * target.h: New macros TARGET_SYMFILE_POSTREAD, and
- TARGET_CREATE_INFERIOR_HOOK. See above for descriptions.
- * config/mips/{irix5.mh nm-irix5.h}: Delete nm-irix5.h. Make
- NAT_FILE point directly at ../nm-sysv4.h.
- * config/mips/{mipsm3.mh nm-m3.h}: Delete nm-m3.h. Make
- NAT_FILE point directly at ../nm-m3.h.
- * config/mips/{mipsv4.mh nm-sysv4.h}: Delete nm-sysv4.h. Make
- NAT_FILE point directly at ../nm-sysv4.h.
- * config/mips/nm-mips.h: Improve comment at top of file.
- * config/mips/tm-mips.h (TARGET_MONITOR_PROMPT): Change
- definition into a proper string.
-
-Wed Nov 1 20:18:08 1995 Fred Fish <fnf@cygnus.com>
-
- * config/i386/tm-i386.h: New file containing generic i*86 target
- definitions.
- (TARGET_BYTE_ORDER): Moved here from tm-i386v.h.
- (IEEE_FLOAT): Moved here from tm-i386v.h.
- (START_INFERIOR_TRAPS_EXPECTED): Define default as 2.
- (FUNCTION_START_OFFSET): Moved here from tm-i386v.h.
- (SKIP_PROLOGUE): Moved here from tm-i386v.h.
- (SAVED_PC_AFTER_CALL): Moved here from tm-i386v.h.
- (INNER_THAN): Moved here from tm-i386v.h.
- (BREAKPOINT): Moved here from tm-i386v.h.
- (DECR_PC_AFTER_BREAK): Moved here from tm-i386v.h.
- (ABOUT_TO_RETURN): Moved here from tm-i386v.h.
- (REGISTER_SIZE): Moved here from tm-i386v.h.
- (NUM_REGS): Moved here from tm-i386v.h.
- (REGISTER_NAMES): Moved here from tm-i386v.h.
- (EXTRACT_STRUCT_VALUE_ADDRESS): Moved here from tm-i386v.h.
- (FP_REGNUM): Moved here from tm-i386v.h.
- (SP_REGNUM): Moved here from tm-i386v.h.
- (PC_REGNUM): Moved here from tm-i386v.h.
- (PS_REGNUM): Moved here from tm-i386v.h.
- (FP0_REGNUM): Moved here from tm-i386aix.h.
- (FPC_REGNUM): Moved here from tm-sun386.h.
- (REGISTER_BYTES): Moved here from tm-i386aix.h.
- (REGISTER_BYTE): Moved here from tm-i386aix.h.
- (REGISTER_RAW_SIZE): Moved here from tm-i386aix.h.
- (MAX_REGISTER_RAW_SIZE): Moved here from tm-i386aix.h.
- (REGISTER_VIRTUAL_SIZE): Moved here from tm-i386aix.h.
- (MAX_REGISTER_VIRTUAL_SIZE): Moved here from tm-i386aix.h.
- (EXTRACT_RETURN_VALUE): Moved here from tm-i386aix.h.
- (STORE_RETURN_VALUE): Moved here from tm-i386aix.h.
- (REGISTER_VIRTUAL_TYPE): Moved here from tm-i386v.h.
- (STORE_STRUCT_RETURN): Moved here from tm-i386v.h.
- (FRAME_CHAIN): Moved here from tm-i386v4.h.
- (FRAMELESS_FUNCTION_INVOCATION): Moved here from tm-i386v4.h.
- (FRAME_SAVED_PC): Moved here from tm-i386os9k.h
- (FRAME_ARGS_ADDRESS): Moved here from tm-i386v.h.
- (FRAME_LOCALS_ADDRESS): Moved here from tm-i386v.h.
- (FRAME_NUM_ARGS): Moved here from tm-i386sun.h.
- (FRAME_ARGS_SKIP): Moved here from tm-i386v.h.
- (FRAME_FIND_SAVED_REGS): Moved here from tm-i386v.h.
- (PUSH_DUMMY_FRAME): Moved here from tm-i386v.h.
- (POP_FRAME): Moved here from tm-i386v.h.
- (CALL_DUMMY, CALL_DUMMY_LENGTH, CALL_DUMMY_START_OFFSET,
- CALL_DUMMY_BREAKPOINT_OFFSET, FIX_CALL_DUMMY): Moved here from
- tm-i386v.h
- (print_387_control_word, print_387_status_word): Declare prototypes.
- (struct frame_info, struct frame_saved_regs): Forward decls for
- prototypes.
- (SP_ARG0): Moved here from tm-i386v.h.
-
- * config/i386/tm-i386v.h:
- (i386/tm-i386.h): Include.
- (TARGET_BYTE_ORDER): Remove.
- (IEEE_FLOAT): Remove.
- (START_INFERIOR_TRAPS_EXPECTED): Undef before redefine to 4.
- (FUNCTION_START_OFFSET): Remove.
- (SKIP_PROLOGUE): Remove.
- (i386_skip_prologue): Remove prototype.
- (SAVED_PC_AFTER_CALL): Remove.
- (INNER_THAN): Remove.
- (BREAKPOINT): Remove.
- (DECR_PC_AFTER_BREAK): Remove.
- (ABOUT_TO_RETURN): Remove.
- (REGISTER_SIZE): Remove.
- (NUM_REGS): Undef before redefine to 16 (no FP support).
- (REGISTER_NAMES): Undef before redefine.
- (FP_REGNUM, SP_REGNUM, PC_REGNUM, PS_REGNUM): Remove.
- (REGISTER_BYTES): Undef before redefine.
- (REGISTER_BYTE): Undef before redefine.
- (REGISTER_RAW_SIZE): Undef before redefine.
- (REGISTER_VIRTUAL_SIZE): Undef before redefine.
- (MAX_REGISTER_RAW_SIZE): Undef before redefine.
- (MAX_REGISTER_VIRTUAL_SIZE): Undef before redefine.
- (REGISTER_VIRTUAL_TYPE): Undef before redefine.
- (STORE_STRUCT_RETURN): Undef before redefine.
- (EXTRACT_RETURN_VALUE): Undef before redefine.
- (STORE_RETURN_VALUE): Undef before redefine.
- (EXTRACT_STRUCT_VALUE_ADDRESS): Remove.
- (FRAME_CHAIN): Undef before redefine.
- (FRAMELESS_FUNCTION_INVOCATION): Undef before redefine.
- (FRAME_SAVED_PC): Undef before redefine.
- (FRAME_ARGS_ADDRESS): Remove.
- (FRAME_LOCALS_ADDRESS): Remove.
- (FRAME_NUM_ARGS): Undef before redefine.
- (FRAME_ARGS_SKIP): Remove.
- (FRAME_FIND_SAVED_REGS): Remove.
- (PUSH_DUMMY_FRAME): Remove.
- (POP_FRAME): Remove.
- (CALL_DUMMY): Remove.
- (CALL_DUMMY_LENGTH): Remove.
- (CALL_DUMMY_START_OFFSET): Remove.
- (CALL_DUMMY_BREAKPOINT_OFFSET): Remove
- (FIX_CALL_DUMMY): Remove.
- (print_387_control_word): Remove.
- (print_387_status_word): Remove.
- (SP_ARG0): Remove.
-
- * config/i386/tm-symmetry.h:
- (TM_SYMMETRY_H): Enclose file in test for define & define if needed.
- (START_INFERIOR_TRAPS_EXPECTED): Move to after inclusion of
- tm-i386v4.h or tm-i386v.h, #undef, and #define back to 2.
- (DECR_PC_AFTER_BREAK): Move to after inclusion of tm-i386v4.h
- or tm-i386v.h, #undef, and #define to 0.
- (MAX_REGISTER_RAW_SIZE): Remove.
- (FRAME_CHAIN): Remove.
- (FRAMELESS_FUNCTION_INVOCATION): Remove.
- (FRAME_SAVED_PC): Remove.
- (print_387_control_word, print_387_status_word): Remove prototypes.
-
- * config/i386/tm-ptx.h:
- (TM_PTX_H): Enclose file in test for define & define if needed.
- (START_INFERIOR_TRAPS_EXPECTED): Move to after inclusion of
- tm-i386v4.h or tm-i386v.h, #undef, and #define back to 2.
- (DECR_PC_AFTER_BREAK): Move to after inclusion of tm-i386v4.h
- or tm-i386v.h, #undef, and #define to 0.
- (SDB_REG_TO_REGNUM): Remove obsolete commented out define.
- (print_387_control_word, print_387_status_word): Remove prototypes.
-
- * config/i386/tm-linux.h:
- (TM_LINUX_H): Enclose file in test for define & define if needed.
- (i386/tm-i386.h): Include instead of tm-i386v.h.
- (START_INFERIOR_TRAPS_EXPECTED): Remove.
-
- * config/i386/tm-i386v4.h:
- (TM_I386V4_H): Enclose file in test for define & define if needed.
- (i386/tm-i386.h): Include instead of tm-i386v.h.
- (START_INFERIOR_TRAPS_EXPECTED): Remove.
- (FRAME_CHAIN): Moved to tm-i386.h.
- (FRAMELESS_FUNCTION_INVOCATION): Moved to tm-i386.h.
- (FRAME_SAVED_PC): Remove.
- (sigtramp_saved_pc): Define as i386v4_sigtramp_saved_pc.
- (FRAME_NUM_ARGS): Remove.
-
- * config/i386/tm-i386os9k.h:
- (TM_I386OS9K_H): Enclose file in test for define & define if needed.
- (i386/tm-i386.h): Include instead of tm-i386v.h.
- (START_INFERIOR_TRAPS_EXPECTED): Remove.
- (NUM_REGS): Undefine before redefining.
- (FRAME_CHAIN): Remove.
- (FRAMELESS_FUNCTION_INVOCATION): Remove.
- (FRAME_SAVED_PC): Move to tm-i386.h.
-
- * config/i386/tm-i386nw.h:
- (TM_I386NW_H): Enclose file in test for define & define if needed.
- (i386/tm-i386.h): Include instead of tm-i386v.h.
- (START_INFERIOR_TRAPS_EXPECTED): Remove.
-
- * config/i386/tm-i386bsd.h:
- (TM_I386BSD_H): Enclose file in test for define & define if needed.
- (i386/tm-i386.h): Include instead of tm-i386v.h.
- (START_INFERIOR_TRAPS_EXPECTED): Remove.
- (FRAMELESS_FUNCTION_INVOCATION): Remove.
- (FRAME_SAVED_PC): Remove.
-
- * config/i386/tm-i386aix.h:
- (i386/tm-i386.h): Include instead of tm-i386v.h.
- (START_INFERIOR_TRAPS_EXPECTED): Remove.
- (FP_REGNUM): Remove.
- (SP_REGNUM): Remove.
- (PC_REGNUM): Remove.
- (PS_REGNUM): Remove.
- (FP0_REGNUM): Moved to tm-i386.h.
- (NUM_REGS): Remove.
- (REGISTER_NAMES): Remove.
- (REGISTER_BYTES): Moved to tm-i386.h.
- (REGISTER_BYTE): Moved to tm-i386.h.
- (REGISTER_RAW_SIZE): Moved to tm-i386.h.
- (MAX_REGISTER_RAW_SIZE): Moved to tm-i386.h.
- (REGISTER_VIRTUAL_SIZE): Moved to tm-i386.h.
- (REGISTER_VIRTUAL_TYPE): Removed.
- (EXTRACT_RETURN_VALUE): Moved to tm-i386.h.
- (STORE_RETURN_VALUE): Moved to tm-i386.h.
-
- * config/i386/tm-sun386.h:
- (TM_SUN386_H): Enclose file in test for define & define if needed.
- (i386/tm-i386.h): Include.
- (TARGET_BYTE_ORDER): Remove.
- (FUNCTION_START_OFFSET): Remove.
- (SKIP_PROLOGUE): Remove.
- (SAVED_PC_AFTER_CALL): Remove.
- (INNER_THAN): Remove.
- (BREAKPOINT): Remove.
- (DECR_PC_AFTER_BREAK): Remove.
- (ABOUT_TO_RETURN): Remove.
- (REGISTER_SIZE): Remove.
- (NUM_REGS): Undefine before defining.
- (REGISTER_NAMES): Undefine before redefining.
- (REGISTER_BYTES): Undefine before redefining.
- (REGISTER_BYTE): Undefine before defining.
- (FP_REGNUM): Undefine before defining.
- (PC_REGNUM): Undefine before defining.
- (FPC_REGNUM): Undefine before defining.
- (REGISTER_RAW_SIZE): Undefine before defining.
- (FRAME_CHAIN): Undefine before defining.
- (FRAMELESS_FUNCTION_INVOCATION): Undefine before defining.
- (FRAME_SAVED_PC): Undefine before defining.
- (FRAME_NUM_ARGS): Moved to tm-i386.h.
- (MAX_REGISTER_RAW_SIZE): Remove.
- (MAX_REGISTER_VIRTUAL_SIZE): Remove.
- (STORE_STRUCT_RETURN): Remove.
- (EXTRACT_STRUCT_VALUE_ADDRESS): Remove.
- (FRAME_ARGS_ADDRESS): Remove.
- (FRAME_LOCALS_ADDRESS): Remove.
- (FRAME_NUM_ARGS): Undefine before defining.
- (FRAME_ARGS_SKIP): Remove.
- (FRAME_FIND_SAVED_REGS): Remove.
- (PUSH_DUMMY_FRAME): Remove.
- (POP_FRAME): Remove.
- (CALL_DUMMY, CALL_DUMMY_LENGTH, CALL_DUMMY_START_OFFSET): Remove.
- (struct frame_info, struct frame_saved_regs): Remove forward decls
- for prototypes.
-
- * config/i386/tm-i386lynx.h (i386/tm-i386.h): Include instead of
- tm-i386v.h.
- * config/i386/tm-i386m3.h (i386/tm-i386.h): Include instead of
- tm-i386v.h.
-
- * i386-tdep.c (i386_extract_return_value): Make function visible
- for all i386 targets, but only assume floating point values returned
- in floating point registers for I386_AIX_TARGET.
-
- * i386v-nat.c (i386_register_u_addr): Enable code to locate
- floating point regs in user struct.
-
-Wed Nov 1 15:32:57 1995 Fred Fish <fnf@cygnus.com>
-
- * breakpoint.c (breakpoint_re_set): Fix typo in comment.
- * symtab.c (in_prologue): Document func_start and when it is zero
- don't call SKIP_PROLOGUE (which typically leads unconditionally to
- an error when we try to access a prologue at address 0).
-
-Tue Oct 31 13:01:15 1995 Fred Fish <fnf@cygnus.com>
-
- * elfread.c: Include elf-bfd.h rather than libelf.h.
-
-Tue Oct 31 10:42:42 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * win32-nat.c (xlate_exception): Treat a stack overflow like a SEGV.
-
-Sun Oct 29 11:22:05 1995 Fred Fish <fnf@cygnus.com>
-
- * monitor.c: Include gnu-regex.h rather than system regex.h.
-
-Sat Oct 28 23:51:48 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * defs.h: Test on name __WIN32__ rather than WIN32.
- * inflow.c (new_tty): Likewise
- * terminal.h: Likewise.
- * utils.c (initialize_utils): Likewise.
- * win32-nat.c (child_create_inferiror): Print error code when failing.
- * config/i386/win32.mh (XM_CLIBS): Need -lkernel32.
-
-Sat Oct 28 04:52:36 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symtab.h (enum address_class): Add LOC_UNRESOLVED for
- a location whose address has to be resolved via the minimal
- symbol table.
- * buildsym.c (finish_block), findvar.c (symbol_read_needs_frame,
- read_var_value), printcmd.c (address_info),
- symmisc.c (print_symbol, print_partial_symbol): Handle
- LOC_UNRESOLVED.
- * stabsread.c (scan_file_globals): Change unresolved LOC_STATIC
- symbols to LOC_UNRESOLVED. Remove rt_common_objfile lookup
- kludge, global common symbols are now handled by LOC_UNRESOLVED.
- (scan_file_globals_1): Move code back to scan_file_globals,
- delete.
-
-Fri Oct 27 09:54:07 1995 Stu Grossman (grossman@cygnus.com)
-
- * breakpoint.c (breakpoint_re_set): #ifdef GET_LONGJMP_TARGET
- around calls to create_longjmp_breakpoint. Why install the
- breakpoints if we can't find the longjmp target?
- * infrun.c (wait_for_inferior): Cleanup comments near call test.
- * remote-mips.c: Fixed a bunch of prototypes to avoid char/int
- complaint from picky compilers. Add comment to mips_expect.
- Replace all instances of sr_get_debug with remote_debug.
- * (mips_readchar): Don't jam init string to monitor.
- mips_initialize() handles that.
- * (mips_receive_header): Print better message when we get too
- much garbage.
- * (mips_request): Allow caller to pass in buff to allow them to
- analyze the returned message.
- * (mips_initialize): Re-do initialization to try sending a BREAK,
- a ^C, and then a download escape sequence. Cleanup protocol
- startup. Eliminate sleeps. Clear breakpoints (if using monitor
- breakpoints). Re-init frame.
- * (mips_detach): Close down target.
- * (mips_wait): Handle return status with registers, or breakpoint
- * stuff.
- * (mips_kill): Add ^C handling.
- * (mips_insert_breakpoint mips_remove_breakpoint): Call new
- breakpoint stuff if enabled.
- * (calculate_mask remote_mips_set_watchpoint
- remote_mips_remove_watchpoint remote_mips_stopped_by_watchpoint):
- Hardware watchpoint/breakpoint stuff.
- * (common_breakpoint): Common code for new monitor breakpoint commands.
- * (mips_load): Don't use `prompt'. It's a global variable.
- * top.c (dont_repeat_command): New command for use in
- user-defined commands to suppress auto-repeat (by hittin return key).
- * valops.c: Add start of auto function-call abandonment capability.
-
-Thu Oct 26 22:02:27 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-config.in: Add support for PowerMac host, add beginnings
- of native support.
- * mpw-make.sed: Disable subdir recursion, edit out useless rule.
- * mac-xdep.c (Values.h): Don't include.
- (GestaltEqu.h): Include Gestalt.h instead.
- (do_mouse_down): Comment out control tracking, needs to be
- updated to use UPP before will work on PowerMac.
- * config/xm-mpw.h: New file, all-Mac host support.
- * config/m68k/xm-mpw.h: Move most definitions into generic Mac
- support.
- * config/powerpc/xm-mpw.h: New file, PowerMac host support.
-
-Thu Oct 26 15:21:32 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
-
- * regex.h: Renamed to gnu-regex.h.
- * regex.c: Renamed to gnu-regex.c.
- * Makefile.in (POSSLIBS): Refer to gnu-regex.h and gnu-regex.c.
- (REGEX, REGEX1): Change to gnu-regex.o instead of regex.o.
- (regex.o): Renamed to gnu-regex.o; refer to gnu-regex.c.
- (irix5-nat.o, osfsolib.o, gnu-regex.o, solib.o, source.o, symtab.o):
- Likewise.
- * irix5-nat.c, osfsolib.c, gnu-regex.c, solib.c, source.c, symtab.c):
- Include "gnu-regex.h" instead of "regex.h".
- * alpha-tdep.c (in_prologue): Rename to alpha_in_prologue, to
- avoid conflicts with symtab.h.
-
-Tue Oct 24 18:30:18 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * config/pa/hppahpux.mh: Remove hardcoding of X locations.
- * Makefile.in: Use X11_CFLAGS, X11_LDFLAGS and X11_LIBS.
- * configure.in: Link X statically on Solaris, SunOS and HPUX.
-
-Tue Oct 24 12:26:14 1995 Stu Grossman (grossman@cygnus.com)
-
- * monitor.c (monitor_expect_regexp): Same as monitor_expect, but
- with the obvious extension.
- (monitor_read_memory_single): Use regexp for getmem.resp_delim
- because of parsing ambiguities caused by certain monitors.
- (monitor_read_memory): Use new regexp stuff to parse
- getmem.resp_delim.
- * monitor.h (struct memrw_cmd->resp_delim): Document this as a
- regexp.
- * sh3-rom.c: Finish off table. Use new regexp capability for
- getmem commands.
-
- * infrun.c (wait_for_inferior): Disable questionable code near
- the step range test. Replace call detection test with much
- simpler (and more efficient) test that doesn't require prologue
- examination (as often).
- * symtab.c symtab.h (in_prologue): New function that indicates
- whether or not we are in a function prologue. This uses the
- symbol table, and then falls back to prologue examination if that
- fails. It's much more efficient for remote debugging because it
- avoids examining memory, which is very slow. This is used in
- wait_for_inferior to determine if we've made a function call that
- needs to be skipped over (for next/nexti).
- * mips-tdep.c (after_prologue): New function, returns the PC
- after the prologue. Uses PDRs and the symbol table.
- (mips_find_saved_regs): Use in_prologue() to avoid costly
- prologue examination if possible.
- (mips_skip_prologue): Use after_prologue() if possible to avoid
- costly prologue examination.
-
-Mon Oct 23 16:03:33 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * configure.in (configdirs): Added support for the VR4300 default
- builds (mips64*vr4300*el-*-elf*, mips64*vr4300*-*-elf*).
-
- * configure: Regenerated.
-
- * remote-mips.c (mips_load): Updated the prompt spotting code to
- make use of the TARGET_MONITOR_PROMPT manifest.
-
-Sat Oct 21 06:11:49 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * alpha-tdep.c, mips-tdep.c (init_extra_frame_info):
- Do not set saved registers from heuristics for a sigtramp frame.
-
- * dwarfread.c (enum_type): Determine signedness of enum type
- from enumerators.
-
- * mips-tdep.c: Include gdb_string.h, gcc -Wall lint.
-
- * rs6000-nat.c (xcoff_relocate_core): Fix typo.
-
- * valops.c (value_repeat): Fix length of memory transfer to
- match recent allocate_repeat_value change.
-
-Thu Oct 19 19:04:35 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * gdbtypes.c (get_discrete_bounds): Fix typo.
-
-Thu Oct 19 12:15:37 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * defs.h (SEEK_SET, SEEK_CUR): Add default definitions.
- * dbxread.c, mdebugread.c, os9kread.c (SEEK_SET, SEEK_CUR):
- Remove default definitions.
-
- * Makefile.in (CC-LD): Rename to CC_LD, so MPW xform works.
- (MMALLOC_SRC): Define.
- (MMALLOC_CFLAGS): Use.
- (ser-mac.o): Add rule.
- * dwarfread.c, somread.c, ultra3-nat.c, xcoffread.c: Replace L_SET
- with SEEK_SET in all calls to bfd_seek.
- * scm-tags.h (scm_tags): Remove excess comma.
-
- * mpw-config.in: Adapt to work with autoconf'ed configury;
- build config.h, add empty definitions to mk.tmp.
- (powerpc-apple-macos): Make it work.
- * mpw-make.sed: New file, sed commands to translate Unix makefile
- into MPW syntax.
- * mpw-make.in: Remove.
- * mac-gdb.r: New file, was macgdb.r, renamed for consistency
- with other tools, now includes cfrg resource.
- * macgdb.r: Remove.
- * config/m68k/xm-mpw.h: Remove most of contents, replace with
- include of include/mpw/mpw.h.
-
-Tue Oct 17 10:38:53 1995 Jeffrey A Law (law@cygnus.com)
-
- * hppa-tdep.c (frame_chain): Fix more obscure problems caused
- by system calls that core dump processes without saving all
- the register state.
-
- * config/pa/hppahpux.mt (XDEPFILES): Remove bogus definition.
- * config/pa/hppapro.mt (XDEPFILES): Likewise.
-
-Tue Oct 17 08:04:26 1995 Fred Fish <fnf@rtl.cygnus.com>
-
- * NEWS: Fix typo.
-
-Mon Oct 16 18:24:03 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * config/sh/tm-sh.h (REGISTER_VIRTUAL_TYPE): Return builtin_type_float
- for FP registers.
- (REGISTER_NAMES): Add FP register names. Remove ticks, stalls, cycles,
- insts, plr, and tlr.
- (NUM_REGS, NUM_REALREGS): Increase from 23 to 41.
- (FPUL_REGNUM, FP0_REGNUM): New macros.
-
-Mon Oct 16 11:27:06 1995 Stu Grossman (grossman@cygnus.com)
-
- * remote-mips.c: Add support for speedy (about 10x faster)
- downloads.
-
- * remote-array.c: Move baud_rate initialization from
- _initialize_array to array_open. It was forcing the baud rate of
- all targets to be 4800 baud! Seems like I've fixed this before...
- * config/mips/idt.mt (TDEPFILES): Remove remote-array.o. This
- has *nothing* to do with IDT!!!
-
-
- * Makefile.in sh3-rom.c config/sh/sh.mt config/sh/tm-sh.h: Add
- sh3 monitor support.
- * monitor.c: Cleanup regexp compilation stuff to make it easier
- to use several regexps.
- * monitor.h: Get rid of struct rom_cmd_data. It's no longer used.
- * config/m68k/tm-monitor.h: Don't redefine NUM_REGS here. It just
- causes GDB to crash.
-
- * sparcl-tdep.c: Cleanup serial error handling.
-
-Sun Oct 15 16:19:27 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * rs6000-tdep.c: Don't include a.out.h, improve some formatting.
-
-Fri Oct 13 15:27:49 1995 Stu Grossman (grossman@cygnus.com)
-
- * dcache.c: Change default value of remotecache to off. It just
- screws up too many targets.
- * sparcl-stub.c: Add prototypes to many forward decls.
- * Create private copies of strlen, strcpy, and memcpy to prevent
- chaos when user steps into them.
- * (trap_low handle_exception): Clean up DSU support code
- (hardware breakpoints). Move lots of stuff from asm-land to
- C-land (make it much easier to #ifdef if necessary). Also, use
- trap 255 to get into break mode instead of doing a DSU register
- write, which may trash the register.
- * (putpacket): Don't check return value of putDebugChar. It
- returns void...
-
-Fri Oct 13 14:16:17 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * remote-sim.h: Always include callback.h.
- (sim_set_callbacks): New declaration.
-
-Fri Oct 13 10:57:40 1995 Jeffrey A Law (law@cygnus.com)
-
- * somsolib.c (som_solib_add): Just give a warning if a file
- mentioned in the dld_list can't be found.
- * config/pa/tm-hppah.h (FRAME_SAVED_PC_IN_SIGTRAMP): Dig out
- the PC from the PC queues rather than %r31.
-
-Thu Oct 12 13:36:15 1995 Jeffrey A Law (law@cygnus.com)
-
- * corelow.c (core_open): Don't update the to_sections and
- to_sections_end fields in core_ops here. It's too late.
- * irix5-nat.c (solib_add): Update the to_sections and
- to_sections_end fields in core_ops here if needed.
- * osfsolib.c (solib_add): Likewise.
- * rs6000-nat.c (xcoff_relocate_core): Likewise.
- * solib.c (solib_add): Likewise.
- * somsolib.c (solib_add): Likewise.
-
-Wed Oct 11 17:25:59 1995 Fred Fish <fnf@rtl.cygnus.com>
-
- * Makefile.in (VERSION): Bump version to 4.15.1
-
-Tue Oct 10 15:26:39 1995 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (VERSION): Version 4.15 released.
- * README: Updated for version 4.15.
- * NEWS: Updated for 4.15 release.
-
-Tue Oct 10 13:18:50 1995 Fred Fish <fnf@cygnus.com>
-
- * configure.in: Add AC_PROG_YACC
- * configure: Regenerate
- * Makefile.in (BISON): Remove macro definition.
- (YACC): Set from autoconfig.
- (FLAGS_TO_PASS): Remove BISON.
- (TARGET_FLAGS_TO_PASS): Remove BISON.
-
-Tue Oct 10 12:25:11 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * win32-nat.c (child_create_inferior): Pass argv correctly.
- * Makefile.in (win32-nat.o): Add dependencies.
-
-Mon Oct 9 14:36:29 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * NEWS: Add information about win32 and arm code.
- * win32-nat.c: Renamed from win32.c.
- * config/i386/win32.mh: Renamed from config/i386/i386win32.mh.
- * config/i386/win32.mt: Renamed from config/i386/i386win32.mt.
- * config/i386/tm-win32.h: Renamed from config/i386/tm-i386win32.h.
- * config/i386/xm-win32.h: Renamed from config/i386/xm-i386win32.h.
- * configure.in (i[345]86-*-win32): Updated to cope with filename
- changes.
- * configure: Regenerated.
-
-Sun Oct 8 18:01:04 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * ch-exp.y (yylex): Also look for '$' following '$'.
-
-Sat Oct 7 22:52:42 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ch-exp.y (yylex): Fix typo.
-
-Fri Oct 6 11:56:49 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * remote-sim.c (gdbsim_open): Put callback initializations here.
- (_initalize_remote_sim): Not here.
-
-Fri Oct 6 17:08:49 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * top.c (execute_control_command): Use 0/1 instead of BFD's
- true/false.
-
-Fri Oct 6 14:43:19 1995 Stu Grossman (grossman@cygnus.com)
-
- * sparcl-stub.c: Include sparclite.h to get access to register
- fondling macros.
- * (trap_low): Save and restore FP regs if necessary. Also, clean
- up save and restore of debug unit regs.
- * (hard_trap_info): Add more architecturally defined traps.
- * (set_debug_traps): Only set FP disabled trap if FP is disabled.
- * (get_in_break_mode): Clean up. Get rid of calls to
- set_hw_breakpoint_trap(). Also, use write_asi macro.
- * (handle_exception): Clean up `g' and `G' commands. Add `P'
- command.
- * (hw_breakpoint): Why was this here!? It's gone now...
-
-Fri Oct 6 11:56:49 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * callback.c (fdbad): Fix typo in comment.
- (os_close, os_isatty, os_lseek, os_read, os_write): Use if
- statements rather than || to get correct return value.
- (os_write_stdout): Pass missing first argument to os_write.
- * remote-sim.c: Include callback.h.
- (_initialize_remote_sim): Call sim_set_callbacks and then
- initialize the callbacks.
-
-Thu Oct 5 17:28:09 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * values.c (allocate_repeat_value): Allocate an array type, and
- a value of that type; use that instead of setting VALUE_REPEATED.
- * value.h (struct value): Remove fields repetitions and repeated.
- (VALUE_REPEATED, VALUE_REPETITIONS): Removed, no longer used.
- * c-valprint.c, ch-valprint.c, eval.c, printcmd.c, valops.c,
- value.h, values.c: Simplify, since now VALUE_REPEATED is never
- used.
- * valprint.c (value_print_array_elemen): Removed never-used
- function.
-
-Thu Oct 5 15:14:36 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * parse.c (write_dollar_variable): New function.
-
- * c-exp.y (yylex): Replace code for recognizing '$'
- pseudo-variables with a call to write_dollar_variable.
- Simplify grammar correspondingly.
- * f-exp.y: Likewise.
- * m2-exp.y: Likewise.
- * ch-exp.y: Likewise. (Remove function match_dollar_tokens.)
- * scm-exp.c (scm_lreadr): Call write_dollar_variable to handle '$'.
-
-Thu Oct 5 13:27:30 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * win32.c: New file; support for debugging on windows NT.
- * configure.in: (i[345]86-*-win32): New target.
- * configure: Regnerated.
- * eval.c (evaluate_subexp_standard): Remove unused name.
- * serial.c (gdb_string.h): Include.
- * source.c (value.h): Include.
- * config/i386/i386win32.mh (XDEPFILES): Add win32.o
- * config/i386/i386win32.mt: New.
- * config/i386/tm-i386win32.h: New.
-
-Wed Oct 4 18:41:34 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * expression.h (enum exp_code): Added OP_NAME.
- * expprint.c (print_subexp): Add OP_NAME support.
- * parse.c (length_of_subexp, prefixify_subexp): Likewise.
- * scm-lang.c (scm_unpack, in_eval_c, scm_lookup_name): new function.
- * scm-lang.h: Declare builtin_type_scm; other minor tweaks.
- * values.c (unpack_long): If type is SCM, call scm_unpack.
- * scm-valprint.c (scm_val_print): Use extract_signed_integer,
- instead unpack_long
- * scm-lang.c: More Scheme expression parsing from here ...
- * scm-exp.c: ... to here. New file.
- Also, provide for gdb to evaluate simple constants and names..
- * Makefile.in: Note new scm-exp.{c,o}.
-
-Wed Oct 4 17:23:03 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * gdbtypes.c (get_discrete_bounds): New function.
- (force_to_range_type): Use get_discrete_bounds.
- * gdbtypes.h (get_discrete_bounds): Add declaration.
- * valarith.c (value_bit_index): Generalize to use get_discrete_bounds.
- * ch-valprint.c (chill_val_print): Make (power)sets and bitstring
- support use get_discrete_bounds and generally be more robust.
-
-Tue Oct 3 16:54:56 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-nrom.c (nrom_ops): Add value for to_thread_alive,
- add comments naming slots.
-
-Mon Oct 2 21:45:44 1995 Jeff Law (law@hurl)
-
- * top.c (build_command_line): Demand arguments for if/while
- commands.
-
-Mon Oct 2 13:08:01 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * Makefile.in (X11_CFLAGS): Set only to @X_INCDIR@.
-
-Sat Sep 30 16:13:36 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * scm-lang.c: Moved Scheme value printing code to ...
- * scm-valprint.c: ... this new file.
- Also major improvements in support for printing SCM values.
- * scm-lang.h: New file.
- * scm-tags.h: New file.
- * Makefile.in: Note new scm-valprint.{c,o}.
-
-Sat Sep 30 09:35:02 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * configure.in: X_INCDIR and X_LIBDIR added.
- * Makefile.in: @X_INCDIR@ and @X_LIBDIR@ added.
- * configure: Regnerated.
-
-Fri Sep 29 02:10:05 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * config/arm/tm-arm.h (FRAME_CHAIN, FRAME_CHAIN_VALID):
- Any pc > LOWESTPC is ok.
-
- * remote-rdp.c (rdp_init): Take out variable baud rate stuff.
- (remote_rdp_detatch): Delete.
- * breakpoint.c (ctype.h): Don't include twice.
-
- * Makefile.in (remote-rdp.o): Doesn't need remote-rdp.h
- * callback.c (os_printf_filtered): fix protos.
- * defs.h (puts_filtered, puts_unfiltered
- [v|f|]printf_[un]filtered): Make format arg const.
- * remote-rdp.c (rdp_init): Attept to sync at different
- baudrates.
- * utils.c (puts_filtered, puts_unfiltered
- [v|f|]printf_[un]filtered): Define prototypes with
- const in the right place.
-
-Thu Sep 28 17:43:39 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * defs.h (enum language): Add language_scm.
- * expression.h (enum exp_code): Added OP_EXPRSTRING.
- * scm-lang.c: Preliminary support for Guile /SCM dialect of Scheme.
- * expprint.c (print_subexp): Add OP_EXPRSTRING support.
- * parse.c (length_of_subexp, prefixify_subexp): Likewise.
- * valops.c (find_function_in_inferior): New function.
- (value_allocate_space_in_inferior): New function.
- (allocate_space_in_inferior): Redefine using previous function.
- * Makefile.in (SFILES): Add scm-lang.c.
- (COMMON_OBS): Add scm-lang.o
-
-Thu Sep 28 14:32:11 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * callback.[ch]: New files.
- * remote-rdp.c: Support for the ARM RDP monitor.
- * Makefile: Update.
- * arm-tdep.c (arm_othernames): New.
- (_initialize_arm_tdep): install 'othernames' command.
- (arm_nullified_insn, shifted_reg_val, arm_get_next_pc): New.
- * configure.in: Check for termios.h, termio.h and sgtty.h.
- (i[345]86-*-win32*): New host.
- * configure: Regenerated.
- * inflow.c: Clean up inclusions.
- * main.c (main): Check for WINGDB, not WIN32.
- * printcmd.c (do_examine): Put QUIT test in loop.
- * remote-hms.c (e7000_load): Delete.
- (hms_ops): Point to generic_load instead.
- * remote-hms.c (hms_ops): Point to generic_load.
- * remote-sim.c (sim_callback_write_stdout): Becomes
- gdbsim_write_stdout.
- (gdbsim_load): Call generic_load.
- * remote-utils.c (gr_load_image): Delete.
- * ser-unix.c (terminal.h): Include instead of havig
- own #if tree.
- (hardwire_flush_input): Reset input buffer too.
- * source.c (openp): If WIN32 then open file in binary mode.
- * terminal.h: Configure IO mechanism using autoconf defines if
- available and not overriden.
- * utils.c (quit, pollquit, notice_quit): WIN32 check becomes
- WINGDB check.
-
- * config/arm/arm.mt (TDEPFILES): Add remote-rdp.o.
- * config/arm/tm-arm.h (TARGET_BYTE_ORDER): becomes
- TARGET_BYTE_ORDER_SELECTABLE.
- (ADDR_BITS_REMOVE): New.
- (ORIGINAL_REGISTER_NAMES, ADDITIONAL_REGISTER_NAMES): New.
- (INST_xx): New.
- (FRAME_FIND_SAVED_REGS): Pass the right argument.
- (arm_get_next_pc): Declare.
-
-Wed Sep 27 10:14:36 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * valops.c (search_struct_field): Also allow "else" as a variant
- name.
- * eval.c (evaluate_struct_tuple): New function. Used to evaluate
- structure tuples. Now also handles Chill variant records.
- (get_label): New function, used by evaluate_struct_tuple.
- (evaluate_subexp_standard case OP_ARRAY): Use evaluate_struct_tuple.
- (evaluate_labeled_field_init): Removed.
-
- * valops.c (search_struct_field): Generalize to work with Chill
- variant records.
-
-Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (parse_partial_symbols): Reset includes_used
- and dependencies_used after finishing the partial symbol table.
-
- * rs6000-tdep.c (push_dummy_frame): Handle lr_offset of zero
- correctly.
-
- * rs6000-nat.c (xcoff_relocate_core): Don't relocate data
- addresses for the main objfile if DONT_RELOCATE_SYMFILE_OBJFILE
- is defined.
- * xcoffread.c: gcc -Wall lint. Remove traceback table reading
- code. The existing code tried to add parameter information for
- functions compiled without -g, which cannot be done properly
- for optimized code and produced misleading parameter displays.
- (ef_complaint, eb_complaint): Make a local static copy to avoid
- dependency on coffread.c.
- (read_xcoff_symtab, process_xcoff_symbol, scan_xcoff_symtab):
- Enter C_EXT/C_HIDEXT symbols into the minimal symbol table only.
- (read_xcoff_symtab): Ignore C_STAT section auxiliary entry
- symbols. Complain about unmatched .ef and .eb symbols instead of
- segfaulting.
- (process_xcoff_symbol): Determine value of C_GSYM symbols via
- the global_sym_chain mechanism in stabsread.c.
- (xcoff_new_init): Call stabsread_new_init and buildsym_new_init.
- (init_string_tab): Initialize length field bytes in the strtbl.
- (scan_xcoff_symtab): Skip symbols that start with `$' or `.$'.
- Set first_fun_line_offset for symbols with two auxents only.
-
-Wed Sep 20 21:06:35 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * op50-rom.c (op50n_cmds): Send ".\r" after the interrupt
- character.
-
-Wed Sep 20 13:12:56 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (maintainer-clean): New target, synonym for
- realclean. Add GNU standard maintainer-clean echos.
- * gdbserver/Makefile.in (maintainer-clean): New target, synonym
- for realclean.
- * nlm/Makefile.in (maintainer-clean): Likewise.
-
-Wed Sep 20 08:16:03 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * defs.h (xmalloc, xrealloc): Delete, they're declared in libiberty.h.
- (GETENV_PROVIDED, FCLOSE_PROVIDED): New.
- * doc/gdbint.texinfo (GETENV_PROVIDED, FCLOSE_PROVIDED): Document.
- * remote-sim.[ch] (sim_callback_write_stdout): New.
-
-Tue Sep 19 15:28:58 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * gdbtypes.c (create_set_type): Set TYPE_LENGTH in bytes, not bits.
- * valops.c (value_bitstring): TYPE_LENGTH is bytes, not bits.
-
- * gdbtypes.c (force_to_range_type): Calculate upper limit of
- TYPE_CODE_CHAR depending on TYPE_LENGTH (instead of just using 255).
-
-Mon Sep 18 01:43:42 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * somsolib.c (auto_solib_add_at_startup): Delete definition. No
- longer needed.
-
-Sat Sep 16 13:23:36 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/mips/tm-mips.h (UNUSED_REGNUM): Define.
- * mipsv4-nat.c (supply_gregset): Fill UNUSED_REGNUM register
- with zero.
-
-Thu Sep 14 17:35:24 1995 Stu Grossman (grossman@cygnus.com)
-
- * remote-sim.c (gdbsim_create_inferior): Back out change that
- broke all simulator configurations except the rs6000.
-
-Thu Sep 14 14:44:59 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * monitor.c (monitor_expect): Discard NULL characters.
-
-Thu Sep 14 14:12:30 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * infcmd.c: Add extern declaration for auto_solib_add_at_startup.
-
-Wed Sep 13 13:33:58 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * symfile.c: Move global variable auto_solib_add_at_startup from
- solib.c to symfile.c.
- * solib.c: ditto.
- * symfile.h: Add extern declaration of the above mentioned variable.
- * infcmd.c: Take out extern declaration, since it's in symfile.h.
-
-Thu Sep 14 12:39:35 1995 Stu Grossman (grossman@cygnus.com)
-
- * coffread.c (coff_symtab_read): Complain about unmatched .ef and
- .eb symbols instead of segfaulting.
-
-Wed Sep 13 13:33:58 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * stabsread.c (read_one_struct_field): Use subfile language instead of
- global language. Improve efficiency.
-
-Wed Sep 13 08:45:02 1995 Jeff Law (law@fast.cs.utah.edu)
-
- * somsolib.c (auto_solib_add_at_startup): Define new global variable.
- (som_solib_create_inferior_hook): Don't add libraries if
- auto_solib_add_at_startup is zero.
- (_initialize_som_solib): Add command to toggle
- auto_solib_add_at_startup.
-
-Tue Sep 12 19:37:24 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * monitor.c (monitor_make_srec): Fix thinkos in computation
- of addr_size.
-
-Tue Sep 12 15:46:18 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * stabsread.c (read_one_struct_field): Add a patch to handle cfront
- generated stabs that each field is in full mangled name.
-
- * stabsread.c: To include language.h and expression.h for the reason
- above.
-
- * infcmd.c (attach_command): Add solibs only when
- auto_solib_add_at_startup is set.
-
-Mon Sep 11 17:22:35 1995 Fred Fish <fnf@cygnus.com>
-
- * NEWS: Add information about remote target caching.
-
-Sun Sep 10 15:36:21 1995 Fred Fish <fnf@cygnus.com>
-
- * defs.h: Only include mmalloc.h if NO_MMALLOC is not
- defined.
-
-Sun Sep 10 10:24:48 1995 Michael Tiemann <tiemann@axon.cygnus.com>
-
- * tm-ppc-eabi.h (PC_IN_CALL_DUMMY): Redefine this to work with the
- simulator. FIXME.
-
- * rs6000-tdep.c (push_dummy_frame): Calculate the correct link
- register offset from the current frame (don't assume it is always 8).
- (push_dummy_frame): Add comment about having only 4096 bytes of
- stack space in the simulator (by default).
-
- * remote-sim.c (gdbsim_create_inferior): Call
- `add_text_to_loadinfo' so that gdb can find TOC entries when
- calling functions in the inferior.
-
-Sun Sep 10 09:00:28 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * sparc-tdep.c (fill_fpregset): Fix incorrect FP_MAX_REGNUM
- substitution.
- (supply_fpregset): Use FP_MAX_REGNUM.
-
-Sat Sep 9 08:21:52 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * stabsread.c (read_enum_type): Exit loop for putting pending
- enum symbols into the enum type correctly if we had no pending
- symbols on entry to read_enum_type.
-
-Fri Sep 8 12:57:41 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * inferior.h: Add extern declaration of inferior_environ.
- * solib.c (solib_map_sections): To get inferior's env instead of
- gdb's for LD_LIBRARY_PATH, same for PATH.
-
- * solib.c (solib_map_sections): Copy full path name into so_list
- structure so that symbol_file_add can find it.
-
-Tue Sep 5 17:47:53 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * config/sparc/tm-sp64.h (REGISTER_RAW_SIZE): Lower 32 fp regs
- have size 4.
- (REGISTER_VIRTUAL_SIZE): Likewise.
- (REGISTER_VIRTUAL_TYPE): Lower 32 fp regs have type float.
- Upper 32 fp regs have type double.
- * sparc-tdep.c (NUM_SPARC_FPREGS): Replace with
- (FP_REGISTER_BYTES): this, and update all uses.
- (FP_MAX_REGNUM): Define if not already.
- (get_saved_register): Handle new sparc64 fp regs.
- (sparc_frame_find_saved_regs): Likewise.
- (sparc_print_register_hook): Only print fp regs < 32 as doubles.
- Add code to handle long doubles when gdb does.
- (_initialize_sparc_tdep): Use print_insn_sparc64 if sparc64.
-
-Sat Sep 2 06:41:26 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * configure.in: Explicitly `exit 0' for broken shells.
- * configure: Rebuilt.
-
- * symtab.c (list_symbols): Add missing blank after
- `<function, no debug info>' output.
-
- * valops.c (value_assign): Handle truncation when assigning
- to bitfields. Use value_copy to construct the return value
- from toval.
- * values.c (value_copy): Copy VALUE_FRAME and VALUE_OPTIMIZED_OUT.
-
-Fri Sep 1 08:25:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
-
- * configure (mips64*vr4300*-*-elf): Support added.
- * remote-mips.c (mips_readchar): Change to allow build-time prompt
- string.
- * config/mips/tm-mips.h: Added TARGET_MONITOR_PROMPT.
- * config/mips/{vr4300.mt, vr4300el.mt, tm-vr4300.h,
- tm-vr4300el.h}: Added.
-
-Thu Aug 31 12:48:04 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * config/sh/sh.mt (SIM): Add -lm.
-
-Wed Aug 30 18:10:57 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * rmote-nindy.c (non_dle, nidy_resume, nindy_wait): Changes to
- conform to GNU coding standards.
-
- * solib.c (match_main): Modify to follow GNU coding conventions.
-
-Mon Aug 28 17:07:26 1995 Kung Hsu <kung@lisa.cygnus.com>
-
- * remote.c (remote_wait): Revert 19 July my change which should be
- customer specific.
-
-Sat Aug 26 00:26:11 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (parse_symbol): Handle sh.value of zero for enums.
- Determine signedness of enum type from enumerators.
- (parse_type): Handle btIndirect types, handle fBitfield for
- some non-member types.
- (upgrade_type): Use TYPE_FLAG_TARGET_STUB for arrays with
- unknown length.
- (cross_ref): Handle stIndirect forward reference to btTypedef.
-
- * stabsread.c (read_enum_type): Determine signedness of enum
- type from enumerators.
-
- * top.c (execute_command): Remove trailing whitespace from
- command arguments, except for `set' and `complete' commands.
- (validate_comname): Allow underscores in user defined command
- names.
-
- * values.c (modify_field): Change `Value does not fit in %d bits'
- error to a warning. Exclude sign extension bits of negative field
- values from fit check.
-
-Fri Aug 25 11:31:29 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in (powerpc*-*-eabisim*): Only link in the simulator
- if the target is powerpc{,le}-*-eabisim*, since the simulator
- needs GCC to build.
- * config/powerpc/ppc{,le}-sim.mt: Cloned from ppc{,le}-eabi.mt.
- * config/powerpc/ppc{,le}-eabi.mt: Remove simulator support.
- * config/powerpc/tm-ppc{,le}-sim.mt: Include tm-ppc{,le}-sim.h.
-
-Wed Aug 23 16:55:35 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/powerpc/ppc{,le}-eabi.mt (SIM_OBJS, SIM): Link in the
- PowerPC simulator.
-
-Tue Aug 22 02:00:47 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * tm-hppa.h (EXTRACT_RETURN_VALUE): Fix for FP values.
-
- * tm-hppa.h (STORE_RETURN_VALUE): Fix to work with -msoft-float
- calling conventions too. Use the TYPE of the return value, not
- its length to determine if it should also be copied into the
- floating point registers.
-
- * tm-hppa.h (PROLOGUE_FIRSTLINE_OVERLAP): Delete. Causes more
- problems than it fixes.
- * hppa-tdep.c (skip_prologue): If we exit the main loop without
- finding all the register saves, retry again without looking for
- the registers we could not find the first time.
-
-Mon Aug 21 23:39:56 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (frame_chain_valid): Handle systems where "$START$"
- calls "main" directly.
- (skip_prologue): Always assume arguments were saved into the stack
- since GCC will do so without setting the magic Args_Saved bit in
- the unwind descriptor.
-
-Mon Aug 21 11:49:17 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * remote-udi.c (udi_wait): Mask off high bits of stop reason.
- * remote-udi.c (fetch_register): For unfetchable regs, pretend it's
- done. Fix a bug.
-
-Mon Aug 21 00:45:17 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * Makefile.in (install): Remove "brokensed" hack, unnecessary now
- that we're using autoconf.
- (uninstall): Likewise.
-
-
-Sat Aug 19 01:19:34 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * gdbtypes.c (recursive_dump_type): Add dont_print_type_obstack
- to inhibit infinite recursion when printing aggregate types.
-
-Fri Aug 18 17:48:55 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * dcache.c (dcache_write_line): Write dirty lines right.
-
-Fri Aug 18 06:26:56 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * sparc-tdep.c (isbranch): Fix typo which caused wrong
- target addresses for annulled branches.
-
-Wed Aug 16 21:54:39 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * config/pa/tm-hppa.h (PROLOGUE_FIRSTLINE_OVERLAP): Define.
-
-Tue Aug 15 07:51:21 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * remote.c (remote_write_bytes): Chop up large transfers.
-
-Mon Aug 14 17:56:36 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * gcc.patch: Remove, relevant only to long-ago versions of GCC.
-
-Mon Aug 14 13:43:01 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * config/sparc/tm-sparclite.h: Define FRAME_CHAIN_VALID_ALTERNATE.
- * blockframe.c (inside_main_func): If main func addr range not set,
- try to set it now.
-
-Sat Aug 12 15:34:54 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * config/powerpc/xm-aix.h (FIVE_ARG_PTRACE): Define.
- * config/rs6000/xm-rs6000.h (FIVE_ARG_PTRACE): Likewise.
-
- * configure.in: Recognize aix4 specially as some aspects
- of aix4 need different handling than aix3.
- * configure: Updated.
- * config/powerpc/{aix4.mh,aix4.mt,tm-ppc-aix4.h}: New files
- specific to aix4 support on the power pc.
- * config/powerpc/tm-ppc-aix.h (DONT_RELOCATE_SYMFILE_OBJFILE): Do
- not defined. The aix4 specific target files will do that.
- * config/rs6000/{aix4,mh,aix4,mt,tm-rs6000-aix4.h}: New files
- specific to aix4 support on the rs6000.
-
- * config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR): Don't
- do the conversion if the pointer is not a magic aix function
- pointer.
- * rs6000-tdep.c: Include objfiles.h and symtab.h.
- (is_magic_function_pointer): New function.
-
- * rs6000-tdep.c (skip_prologue): Refine check for frameless
- functions. Handle b .+4 emitted by aix4 compilers. Only
- allow one load of a minimal toc pointer. Handle aix4 compiler's
- code for alloca.
-
- * rs6000-tdep.c (find_toc_address): Report an error if no toc was
- found rather than possibly core dumping.
-
- * partial-stab.h: Handle extra field generated by the aix4 compiler
- for enumerations.
- * stabsread.c (read_enum_type): Likewise.
-
-Sat Aug 12 03:18:04 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * rs6000-tdep.c (extract_return_value): Fix returning of values
- whose length is less than the register size for big endian targets.
-
-Fri Aug 11 13:04:32 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * symtab.c (list_symbols): if break command set breakpoint on
- matched symbol.
-
-Wed Aug 9 18:59:05 1995 Fred Fish <fnf@cygnus.com>
-
- * defs.h (strchr, strrchr, strstr, strtok, strerror): Enclose in
- #ifndefs to protect against previous definitions as macros.
-
-Wed Aug 9 14:51:36 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * xcoffread.c (xcoff_symfile_offset): Revert an unwanted change
- that got in accidentally with Aug 1 change.
-
-Sat Aug 5 09:07:28 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * remote-hms.c (hms_cmds): Get reg term right.
- * monitor.c (monitor_fetch_register): If we see
- a non-hex digit, just stop reading.
- * remote.c (remote_wait): Change way $O is handled.
-
-Wed Aug 9 11:42:36 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * configure.in (powerpc-*-aix*): Recognize as a new gdb host
- and target.
- (powerpc-*-eabi*): Don't set configdirs.
- (powerpcle-*-eabi*): Likewise.
- * configure: Updated.
- * rs6000-nat.c (vmap_ldinfo): Don't relocate data addresses
- for the main objfile if DONT_RELOCATE_SYMFILE_OBJFILE is
- defined.
- * config/powerpc/{aix.mh,aix.mh}: Host and target makefile fragments
- for powerpc running aix4.
- * config/powerpc/{nm-aix.h, tm-ppc-aix.h, xm-aix.h}: Native, target
- and host include files for powerpc running aix4.
-
-Wed Aug 9 08:11:45 1995 Stan Shebs <shebs@cygnus.com>
-
- * top.c (target_output_hook): Really make it match defs.h (char *
- is not the same as unsigned char *).
-
-Tue Aug 8 15:13:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in (CXX_FOR_TARGET): Don't use ${rootme}/../gcc/xgcc
- unless it is present.
-
-Tue Aug 8 10:50:15 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * top.c (target_output_hook): Make declaration match the one
- in defs.h.
-
- * symfile.c (add_psymbol_to_list): Initialize SYMBOL_SECTION.
- (add_psymbol_addr_to_list): Likewise.
- * symfile.h (ADD_PSYMBOL_VT_TO_LIST): Likewise.
-
-Mon Aug 7 15:34:29 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * top.c (target_output_hook): New definition.
- * stack.c (gdb_string.h): Include after defs.h
- * defs.h (target_output_hook): New declaration.
- * source.c (mod_path): Fix Win32 \ handling.
-
-Sun Aug 6 22:14:25 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (frame_saved_pc): Don't try to dig a return pointer
- out of a long branch stub.
-
-Fri Aug 4 13:37:31 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * xcoffread.c (process_linenos): Fix typo in last change.
-
-Thu Aug 3 22:01:26 1995 Fred Fish <fnf@rtl.cygnus.com>
-
- * ch-exp.y (write_lower_upper_value): Add prototype so bison
- generated parser will insert prototype before first func usage.
- Bison and byacc order the output sections differently. Also
- make function static.
-
-Thu Aug 3 10:45:37 1995 Fred Fish <fnf@cygnus.com>
-
- * Update all FSF addresses except those in COPYING* files.
-
-Thu Aug 3 01:38:45 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/alpha/tm-alpha.h (EXTRA_FRAME_INFO): Add pc_reg field.
- (SKIP_TRAMPOLINE_CODE): Define.
- * alpha-tdep.c (alpha_frame_saved_pc): Use pc_reg field from
- frame to find the saved pc register.
- (alpha_saved_pc_after_call): Skip over shared library trampoline
- before trying to find the saved pc register.
- (find_proc_desc): Copy PROC_PC_REG from found proc_desc
- to heuristic proc_desc.
- (init_extra_frame_info): Initialize pc_reg field in frame.
-
-Wed Aug 2 18:00:36 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.in (m68*-est-*): Use monitor target config.
- * configure: Update.
- * config/m68k/est.mt, config/m68k/tm-est.h: Delete.
- * config/m68k/monitor.mt, config/m68k/tm-monitor.h: Fix comments.
-
-Tue Aug 1 22:52:53 1995 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (VERSION): Bump to 4.14.2
-
-Tue Aug 1 16:04:36 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * xcoffread.c (process_linenos): The value in include file symbol
- should point to line number table. Currently this value is not
- set correctly by AIX ld. A fix to get around this bug.
-
-Tue Aug 1 11:44:53 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * configure.in: Check for working mmap, ansi headers, string.h,
- strings.h, and memory.h.
- * configure: Regenerated.
-
- * gdb_stat.h: New file, "portable" <sys/stat.h>.
- * gdb_string.h: New file, "portable" <string.h>.
-
- * altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c,
- convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c,
- gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c,
- i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c,
- mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c,
- rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c,
- symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c,
- ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h"
- instead of <sys/stat.h>.
-
- * alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c,
- ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c,
- core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c,
- dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c,
- exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c,
- fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c,
- inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c,
- m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c,
- monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c,
- printcmd.c, procfs.c, regex.c, remote-adapt.c,
- remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c,
- remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c,
- remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c,
- remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c,
- remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c,
- solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c,
- symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c,
- valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include
- "gdb_string.h" instead of <string.h>.
-
- * config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h,
- sparc/xm-sun4os4.h (HAVE_MMAP): Removed.
-
- * config/xm-lynx.h, config/i386/xm-ptx.h,
- config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h,
- config/mips/xm-irix3.h, config/mips/xm-mips.h,
- config/mips/xm-news-mips.h, config/mips/xm-riscos.h,
- config/pa/hppah.h, config/rs6000/xm-rs6000.h,
- config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h,
- config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h,
- config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed.
- * config/mips/xm-irix3.h, config/mips/xm-mips.h,
- config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
-
-Tue Aug 1 02:08:30 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mips-tdep.c (mips_extract_return_value): Fix returning of
- values whose length is less than the register size for big endian
- targets.
- * alpha-tdep.c (alpha_extract_return_value,
- alpha_store_return_value): Use alpha_convert_register_to_*
- to handle functions returning "float" correctly.
-
-Mon Jul 31 19:12:48 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * h8500-tdep.c: General linting and cleanup.
- (opcodes/h8500-opc.h): Don't include.
- (code_size, data_size): Make static.
- (frame_locals_address, frame_args_address): Remove.
- (h8300_pop_frame): Rename to h8500_pop_frame.
- (big_command, medium_command, compact_command, small_command):
- Define as regular functions rather than with macro trickery.
- (tm_print_insn): Set to correct disassembler function.
- * config/h8500/tm-h8500.h: Minor cleanup, add prototypes.
- (ABOUT_TO_RETURN): #if 0 out.
- (FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS): Use usual define.
- (GDB_TARGET_IS_H8500): Remove duplicate definition.
- (regoff): Remove, never used.
- * config/h8500/h8500.mt (TDEPFILES): Add monitor.o.
-
-Mon Jul 31 14:32:30 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * configure.in: Check for unistd.h.
- * configure: Regenerated.
-
- * command.c, cp-valprint.c, fork-child.c, i386-tdep.c,
- i386b-nat.c, inflow.c, main.c, maint.c, objfiles.c, solib.c,
- source.c, stack.c, symfile.c, top.c, utils.c: Include strings.h
- and/or unistd.h to bring prototypes into scope.
-
-Sun Jul 30 01:40:11 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * rs6000-tdep.c (frame_saved_pc): Check for signal handler caller
- before trying to determine the start of the function.
- (skip_prologue): Skip subroutine call which might save the
- floating point registers only if it is within the first three
- instructions.
- Reinstate setting of alloca_reg if setup of a gcc frame pointer
- is found.
- (frame_get_cache_fsr): Use new fields in rs6000_framedata.
-
-Sat Jul 29 14:43:35 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * sparclite: Removed subdirectory. aload and eload are now in
- utils/sparclite, low-level library is in libgloss.
- * configure.in (sparclite*): Don't configure sparclite subdir.
- * configure: Update.
- * Makefile.in (TARDIRS): Remove, no longer used.
-
-Sat Jul 29 01:45:56 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * procfs.c (unconditionally_kill_inferior): Clear current signal
- if PROCFS_NEED_CLEAR_CURSIG_FOR_KILL is defined.
- * config/alpha/nm-osf3.h (PROCFS_NEED_CLEAR_CURSIG_FOR_KILL): Define.
-
- * alpha-tdep.c: Move sigtramp handling of saved registers from
- read_next_frame_reg to alpha_find_saved_regs, handle saved
- floating point registers.
- * mips-tdep.c: Move sigtramp handling of saved registers from
- read_next_frame_reg to mips_find_saved_regs, handle saved
- floating point registers.
- * config/mips/tm-irix3.h, config/mips/tm-irix5.h,
- config/mips/tm-mipsv4.h (SIGFRAME_FPREGSAVE_OFF): Define.
-
- * sparc-tdep.c (sparc_pc_adjust): Fix check for `unimp'
- instruction to handle functions returning structures with
- large sizes properly.
-
-Fri Jul 28 11:50:17 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * configure, configure.in (z8k-*-sim): deleted.
-
-Thu Jul 27 12:49:28 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * lynx-nat.c (child_wait): Handle threads exiting.
-
-Thu Jul 27 07:47:50 1995 Michael Meissner <meissner@cygnus.com>
-
- * rs6000-tdep.c (skip_prologue): Don't assume the update stack
- instruction is the last in the prologue, since xlc stores the lr
- after the stack update. Make sure offset is correct sign for
- large frames.
- (frame_saved_pc): Move test for signal before frameless.
-
- * config/rs6000/tm-rs6000.h (DEFAULT_LR_SAVE): Define.
- * config/powerpc/tm-ppc-eabi.h (DEFAULT_LR_SAVE): Redefine.
-
-Thu Jul 27 01:22:08 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * hppa-tdep.c (hppa_fix_call_dummy): Rewrite code for calling
- into shared libraries.
-
-Wed Jul 26 23:33:34 1995 Michael Meissner <meissner@cygnus.com>
-
- * config/rs6000/tm-rs6000.h (rs6000_framedata): Add offsets the
- gprs, fprs, lr, and cr is stored at.
- (FRAME_FIND_SAVED_REGS): Use new fields in rs6000_framedata.
- (function_frame_info): Delete declaration.
- (SKIP_PROLOGUE): Skip_prologue is now passed a rs6000_framedata
- structure to fill in.
- (FRAMELESS_FUNCTION_INVOCATION): Function now longer takes a
- second argument.
- (FRAME_SAVED_PC): Call frame_saved_pc.
-
- * rs6000-tdep.c (skip_prologue): Recognize V.4 prologues as well
- as AIX style. Fill in rs6000_framedata structure. Remember where
- the gprs, fprs, cr, and lr are saved.
- (pop_frame): Use skip_prologue, not function_frame_info, and use
- new rs6000_framedata fields.
- (function_frame_info): Function deleted.
- (frameless_function_invocation): Separate frame_saved_pc support
- to new function. Recognize V.4 frames.
- (frame_saved_pc): New function.
- (frame_get_cache_fsr): Use skip_prologue, not function_frame_info.
- (frame_initial_stack_address): Ditto.
-
-Wed Jul 26 01:00:37 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * remote.c: Add documentation for extended protocol operations
- and for thread_alive change from a couple weeks ago.
- (extended_remote_ops): Declare and define a new target vector
- for the extended remote protocol.
- (extended_remote_restart): New function to restart the remote
- server & process.
- (remote_open): Just a stub routine.
- (extended_remote_open): New function to start a remote session
- using the extended gdb remote protocol.
- (remote_open_1): New function containing code common to both
- remote_open and extended_remote_open.
- (remote_mourn, extended_remote_mourn, remote_mourn_1): Similarly.
- (extended_remote_create_inferior): New function for the extended
- remote target.
- (initialize_remote): Add the extended_remote_ops target vector.
- * gdbserver/server.c (main, case '!'): Set extended_protocol.
- (main, case 'k'): If the extended protocol is in use, kill the
- inferior then start a new one.
- (main, case 'R'): New command to restart the remote server and
- inferior process. Only supported when using the extended
- protocol.
- (main, server loop): If the inferior terminates while using the
- extended protocol then start a new one. If getpkt fails when
- using the extended protocol then exit.
-
-Tue Jul 25 11:43:44 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mdebugread.c (psymtab_to_symtab_1): Relocate encoded stab
- line numbers using the psymtab's section offsets.
-
-Tue Jul 25 10:43:27 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/rs6000/tm-rs6000.h (rs6000_framedata): Rename from
- aix_framedata. Change all uses.
- * rs6000-tdep.c: Change all aix_framedata -> rs6000_framedata.
-
-Sat Jul 22 23:44:18 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * defs.h (ATTR_FORMAT): Disable if ANSI_PROTOTYPES is not defined.
-
-Fri Jul 21 16:50:28 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * lynx-nat.c (child_thread_alive): New function. Somehow I
- forgot to check this in with all the other thread_alive changes.
-
-Thu Jul 20 22:22:34 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * somread.c (som_symtab_read): Add unsatisfied common symbols to
- the minimal symbol table. All common symbols are "unsatisfied"
- when -E is passed to the linker.
-
-Thu Jul 20 15:04:57 1995 Fred Fish <fnf@cygnus.com>
-
- * top.c (show_endian): Cast first arg of printf_unfiltered to
- correct type of "char *".
-
-Thu Jul 20 14:18:51 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * lynx-nat.c (child_wait): A thread_id of zero from wait apparently
- means the process is single threaded, so there's no need to add
- it to the thread list. Handle case where multi-threaded process
- reverts back to a single-threaded process.
-
- * gdbserver/low-hppabsd.c: Remove error declaration.
- * gdbserver/low-sparc.c: Likewise.
- * gdbserver/low-sun3.c: Likewise.
- * gdbserver/server.h: Remove error and fatal declaration.
- * gdbserver/utils.c (error): Update to be compatable with recent
- changes in defs.h.
- (fatal): Likewise.
-
-Wed Jul 19 22:42:43 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/m68k/tm-m68kv4.h (DWARF_REG_TO_REGNUM): Define to
- correctly map floating point registers numbers.
-
- * dwarfread.c (locval, new_symbol): Handle variables that are
- optimized out.
-
- * mdebugread.c: Replace all uses of builtin_type_* with
- mdebug_type_*. Define and initialize mdebug_type_*.
-
- * serial.h (serial_close): Add additional argument `really_close'.
- (SERIAL_CLOSE): Update serial_close call accordingly.
- (SERIAL_UN_FDOPEN): Use serial_close to handle refcnt properly.
- * serial.c (serial_close): Handle `really_close'.
- * serial.h (scb_base): Moved to serial.c, made static.
-
- * valops.c (value_addr): Don't coerce arrays.
- (typecmp): Coerce arrays instead of calling value_addr if necessary.
-
-Wed Jul 19 18:19:28 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- From Richard Earnshaw (rearnsha@armltd.co.uk):
- * infrun.c (wait_for_inferior): Set the convenience variable
- $_exitcode to the termination code of the inferior.
- * top.c (quit_command): Accept optional expression to use
- as parameter to exit().
-
-Wed Jul 19 13:15:32 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * remote.c (remote_wait): When getting registers, check endianess and
- do conversion if necessary.
-
-Tue Jul 18 00:41:31 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * gdbserver/low-hppabsd.c: New file.
- * gdbserver/Makefile.in (SFILES): Add low-hppabsd.c.
- * config/pa/hppabsd.mh (XDEPFILES): Add ser-tcp.o.
- (GDBSERVER_DEPFILES): Add low-hppabsd.o.
- * config/pa/hppaosf.mh: Likewise.
-
-Mon Jul 17 21:35:18 1995 Fred Fish <fnf@cygnus.com>
-
- * dache.c (struct dcache_block): Change data member from unsigned
- char to char, since everything passed in and out of dcache is char
- or casted to appropriate type anyway.
- (dcache_alloc): Move assignment of db out of test and combine
- separate tests into if-else.
- (dcache_peek_byte): Change ptr from unsigned char* to char*.
- (dcache_peek_byte): Remove now unnecessary cast in read_memory call.
- (dcache_peek): Change cast of incoming data arg.
- (dcache_poke): Change cast of addr of incoming data arg.
- (dcache_info): Mask data passed to printf_filtered to lsbyte only.
- (dcache_info): Change printf_filtered arg from "% 2x" to " %2x".
- * target.c (debug_to_thread_alive): Change return type to int and
- return zero, for type compatibility with other *_thread_alive
- funcs.
- (cleanup_target): Change cast of ignore function to match type of the
- to_thread_alive member.
- * defs.h (error_hook): Add ATTR_NORETURN.
- * defs.h (NORETURN, ATTR_NORETURN): Switch from volatile to
- __attribute__ method with gcc 2.7, to avoid gcc 2.6.3 bug.
- * remote.c (remote_wait): Cast first arg to strtol, strchr, and
- strncmp to "const char *" from "unsigned char *".
- (remote_wait): Cast arg to putpkt and strcpy from "unsigned char *"
- to "char *".
- (remote_wait): Change printf format for long arg from "%d" to "%ld".
- (getpkt): Remove unused variable "bp".
- (remote_fetch_word, remote_store_word): Ifdef out apparently unused
- functions.
- * breakpoint.c (watchpoint_check): Removed unused variables
- "saved_level" and "saved_frame".
- * valops.c (value_arg_coerce): Add other enum TYPE_CODE_* and
- default cases to switch for completeness.
- * infrun.c (wait_for_inferior): Enclose "have_waited" label
- in #ifdef that matches the one in which it is referenced.
- * ser-unix.c (hardwire_noflush_set_tty_state): Enclose otherwise
- unused variable "state" in #ifdef that matches one in which it is
- referenced.
- * eval.c (evaluate_subexp_standard): Remove unused variable "var".
- * eval.c (evaluate_subexp_standard): Remove unused variable
- "tmp_symbol".
- * valarith.c (value_subscript): Remove unused variable
- "lowerbound", which is redeclared in a nested scope prior to use.
- * printcmd.c (print_frame_nameless_args): Use "%ld" to print long
- arg, not "%d".
- * {mem-break.c, remote-pa.c, remote.c, saber.suppress}:
- Remove unused static var "check_break_insn_size".
- * buildsym.c (finish_block): Add other enum LOC_* and default
- cases to switch for completeness.
- ch-lang.c (type_lower_upper): Removed unused label "retry".
- Add other enum TYPE_* and default cases to switch for completeness.
- * f-typeprint.c (f_type_print_args): Ifdef out unused function
- that may be used someday when Fortran support is complete.
- * ch-valprint.c (chill_print_type_scalar): Add other enum
- TYPE_* and default cases to switch for completeness.
- (chill_val_print): Remove unused local var "high_bound" that
- is redeclared in a nested scope prior to use.
- (chill_var_print): Use "%ld" to print long arg, not "%d".
- * regex.c (re_compile_fastmap, re_match_2): Add remaining enum
- types and default to switches for completeness.
- * minsyms.c (lookup_minimal_symbol_text): Delete unused variable
- "trampoline_symbol".
- (prim_record_minimal_symbol_and_info): Return NULL rather than
- trash.
- * elfread.c (elf_symtab_read): Don't dereference NULL returns from
- record_minimal_symbol_and_info.
- * f-lang.c (saved_function_list_end): Ifdef out unused variable
- that may be used someday.
- * f-valprint.c (f_val_print): Remove unused local "straddr".
-
-Mon Jul 17 13:08:00 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * stabsread.h (struct stab_section_list): Define.
- (coffstab_build_psymtabs): Remove staboff and stabsize parameters.
- Add textaddr, textsize, and stabs parameters.
- * gdb-stabs.h (struct dbx_symfile_info): Remove text_sect field.
- Add text_addr and text_size fields.
- (DBX_TEXT_SECT): Don't define.
- (DBX_TEXT_ADDR, DBX_TEXT_SIZE): Define.
- * coffread.c: Include <ctype.h>.
- (struct coff_symfile_info): Remove stabsect and stabindexsect
- fields. Add textaddr, textsize, and stabsects fields.
- (coff_locate_sections): Record the address of the .text section,
- and total the sizes of all sections with names beginning with
- ".text". Don't bother to record a .stab.index section (COFF
- doesn't use them). Make a linked list of all sections with names
- beginning with ".stab".
- (coff_symfile_read): Adjust call to coffstab_build_psymtabs for
- new parameters.
- * dbxread.c (dbx_symfile_read): Use DBX_TEXT_ADDR and
- DBX_TEXT_SIZE, rather than getting both from DBX_TEXT_SECT.
- (dbx_symfile_init): Set DBX_TEXT_ADDR and DBX_TEXT_SIZE, not
- DBX_TEXT_SECT.
- (elfstab_build_psymtabs): Likewise.
- (stabsect_build_psymtabs): Likewise.
- (symbuf_sections, symbuf_left, symbuf_read): New static variables.
- (fill_symbuf): If symbuf_sections is not NULL, read symbols from
- multiple sections.
- (coffstab_build_psymtabs): Remove staboffset and stabsize
- parameters. Add textaddr, textsize, and stabsects parameters.
- Set DBX_TEXT_ADDR and DBX_TEXT_SIZE, not DBX_TEXT_SECT. Handle
- multiple stabs sections.
- * os9kread.c (os9k_symfile_read): Use DBX_TEXT_ADDR and
- DBX_TEXT_SIZE, rather than getting both from DBX_TEXT_SECT.
- (os9k_symfile_init): Set DBX_TEXT_ADDR and DBX_TEXT_SIZE, not
- DBX_TEXT_SECT.
-
- * remote-vx.c (vx_ops, vx_run_ops): Initialize new to_thread_alive
- field.
-
-Sat Jul 15 01:02:53 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/alpha/alpha-osf3.mh, config/alpha/nm-osf3.h: New files
- for OSF/1-3.x procfs support.
- * configure.in (alpha-dec-osf): Use them when configuring
- for OSF/1-3.x.
- * configure: Updated.
- * target.c: Include <string.h>.
-
-Fri Jul 14 16:16:56 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in, configure.in: Use one variable, frags, to hold
- pathnames of makefile fragments.
- * configure: regenerated.
-
-Fri Jul 14 09:49:47 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * procfs.c (procfs_ops): Fix typo in last change.
-
-Thu Jul 13 13:42:38 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * inftarg.c (child_thread_alive): New function to see if a
- particular thread is still running.
- (child_ops): Add child_thread_alive entry.
- * remote.c (remote_thread_alive): New function to see if a
- particular thread is still alive.
- (remote_ops): Add remote_thread_alive.
- * target.c (dummy_target): Add dummy entry for thread_alive.
- (cleanup_target): de_fault thread_alive too.
- (update_current_target): INHERIT thread_alive too.
- (debug_to_thread_alive): New function.
- (setup_target_debug): Add debug_to_thread_alive.
- * target.h (struct target_ops): Add to_thread_alive.
- (target_thread_alive): Define.
- * thread.c (info_threads_command): Don't call kill; use
- target_thread_alive instead.
- * config/nm-lynx.h (CHILD_THREAD_ALIVE): Define.
- * gdbserver/low-lynx.c (mythread_alive): New function.
- (mywait): Don't restart any threads after a new thread notification,
- let the generic code handle it.
- * gdbserver/low-sparc.c (mythread_alive): Dummy version.
- * gdbserver/low-sun3.c (mythread_alive): Likewise.
- * gdbserver/server.c (main): Handle thread_alive requests.
- * gdbserver/server.h (mythread_alive): Declare.
- * corelow.c (core_ops): Add dummy entry for thread_alive.
- * exec.c (exec_ops): Likewise.
- * m3-nat.c (m3_ops): Likewise.
- * monitor.c (monitor_ops): Likewise.
- * procfs.c (procfs_ops): Likewise.
- * remote-array.c (array_ops): Likewise.
- * remote-e7000.c (e7000_ops): Likewise.
- * remote-es.c (es1800_ops, es1800_child_ops): Likewise.
- * remote-mips.c (mips_ops): Likewise.
- * remote-pa.c (remote_hppro_ops): Likewise.
- * remote-sim.c (gdbsim_ops): Likewise.
- * sparcl-tdep.c (sparclite_ops): Likewise.
-
-Tue Jul 11 11:15:55 1995 Kung Hsu <kung@rtl.cygnus.com>
-
- * solib.c: Add _DYNAMIC__MGC base symbol for Mentor Graphics Inc.
- * solib.c (match_main): New function for checking name of main.
- * solib.c (solib_add): Not to add if solib match main.
-
-Fri Jul 7 14:41:56 1995 Kung Hsu <kung@rtl.cygnus.com>
-
- * elfread.c (elf_symtab_read): Fix a bug ignoring compiler
- generated internal labels ($LM...).
-
-Wed Jul 5 11:38:36 1995 Kung Hsu <kung@rtl.cygnus.com>
-
- * defs.h: if __GO32__ or WIN32 the directory separating symbol should
- be '\' not '/'.
-
- * remote-nindy (nindy_wait): Use infinite timeout reading after
- esacpe character.
-
-Tue Jul 4 10:30:22 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * infrun.c (wait_for_inferior): When switching from one thread to
- another, save infrun's state for the old thread and load infrun's
- previous state for the new thread.
- * thread.c (struct thread_info): Add new fields for thread specific
- state saved/restored in infrun.c.
- (add_thread): Initialize new fields.
- (load_infrun_state): New function.
- (save_infrun_state): New function.
- * thread.h (load_infrun_state): Provide external decl.
- (save_infrun_state): Likewise.
-
- * infrun.c (wait_for_inferior): When we hit a breakpoint for the
- wrong thread, make sure to write the fixed PC value into the thread
- that stopped. Restart all threads after single stepping over a
- breakpoint for a different thread.
- * breakpoint.c (set_momentary_breakpoint): Make momentary
- breakpoints thread specific in a multi-threaded program.
- * lynx-nat.c (child_resume): Add some comments. Correctly
- choose between the single and multi-threaded step and continue
- ptrace calls.
-
-Fri Jun 30 16:15:36 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/h8300/h8300.mt: Renamed from h8300hms.mt.
- * config/h8500/h8500.mt: Renamed from h8500hms.mt.
- * config/z8k/z8k.mt: Renamed from z8ksim.mt.
- * configure, configure.in: Update to reflect renamings.
-
- * remote-sim.c (sim): New command, passes commands to simulator.
- (simulator_command): New function.
- (gdbsim_ops): Clean up.
- * remote-sim.h (sim_do_command): Declare.
- * sh-tdep.c (memory_size): Remove command.
-
- * Makefile.in (SIM, SIM_OBS): New variables.
- (CLIBS, CDEPS): Add value of SIM.
- (DEPFILES): Add value of SIM_OBS
-
- * config/arm/arm.mt, config/h8300/h8300.mt, config/h8500/h8500.mt,
- config/sh/sh.mt, config/sparc/sp64sim.mt, config/w65/w65.mt,
- config/z8k/z8k.mt: Remove simulator files from TDEPFILES,
- define in SIM_OBS and SIM.
- config/sparc/sp64sim.mt (SIMFILES): Remove.
-
- * remote-z8k.c: Remove, was superseded by remote-sim.c
- * Makefile.in, mpw-make.in: Remove references to remote-z8k.c.
-
-Sun Jun 25 15:30:43 1995 Stan Shebs <shebs@cygnus.com>
-
- * remote.c (remote_read_bytes, remote_write_bytes): Second arg
- should be char *, not unsigned char *.
- * dcache.h (memxferfunc): Ditto.
- * monitor.c (monitor_write_memory, monitor_read_memory_single):
- Ditto.
- (monitor_make_srec): Let compiler figure size of hextab.
-
-Sat Jun 24 19:27:37 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * lynx-nat.c (child_wait): Don't restart new threads and loop
- to the top of child_wait; let the machine independent code in
- wait_for_inferior deal with new thread notifications.
-
-Fri Jun 23 11:51:58 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * remote-nindy (nindy_load): Put in target specific load, it's
- 20 times faster.
-
-Thu Jun 22 20:21:59 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * utils.c (error): Move local `args' outside conditional,
- move local `string1' inside, declare function as void if
- non-ANSI compiler, dereference error_hook when calling.
-
- * mac-xdep.c (stdarg.h): Don't include.
-
-Thu Jun 22 13:12:33 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * remote-nindy.c (nindy_wait): Change timeout in SERIAL_READCHAR.
-
-Wed Jun 21 13:24:41 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hppam3-nat.c: Change HP800_THREAD_STATE to TRACE_FLAVOR and
- HP800_THREAD_STATE_COUNT to TRACE_FLAVOR_SIZE.
-
-Wed Jun 21 05:57:56 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * monitor.c: Turn on caching.
- (monitor_printf): If a ^C was sent, don't expect to see its
- echo.
- (monitor_open): Enable caching.
- (monitor_resume, monitor_load): Flush cache.
- (monitor_xfer_memory): Call cache routine.
- (monitor_dump_regs): New.
- (monitor_fetch_registers): If monitor_dump_regs available
- then use it.
- (monitor_load): Don't ref exec_bfd if it's NULL.
- (monitor_load_srec): Use new monitor_make_srec calling convention.
- (monitor_make_srec): Rewrite to cope with two, three and four byte
- addresses.
- * remote-hms.c (hms_cmds): Initialze end-of-command delim.
- * dcache.h, dcache.h: Rewritten.
- * remote.c: Reenable caching.
- (getpkt): Reduce MAX_TRIES to 3.
- (remote_xfer_memory): Use dcache_xfer_memory.
- * defs.h (error_hook): New.
- * top.c (error_hook): New definition.
- * utils.c (error): Use error_hook if initialized.
- * sparcl-tdep.c (HAVE_SOCKETS): Don't define if GO32 or WIN32. Use
- HAVE_SOCKETS in place of #ifndef GO32.
-
-Tue Jun 20 22:17:44 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * config/pa/tm-hppa.h (PSW_*): Define processor status word masks.
- (INSTRUCTION_NULLIFIED): Allow specific targets to override.
- * config/pa/tm-hppao.h (INSTRUCTION_NULLIFIED): Define to work
- around losing mach kernel behavior.
-
-Tue Jun 20 12:03:36 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * monitor.c (monitor_wait): Don't use the watchdog timeout
- if its value is 0.
- * w89k-rom.c (w89k_open): Define to be static.
-
-
-Sat Jun 17 10:17:16 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * somsolib.c (som_solib_add): Validate regexp argument.
- Don't assume the first entry on dld's library list is the main
- program. Don't load the same library more than once and don't
- consider the main program a shared library.
- (som_solib_sharedlibrary_command): New function
- (_initialize_som_solib): Add "sharedlibrary" command.
-
-Thu Jun 15 14:54:58 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * array-rom.c: Remove, no longer used.
-
- * remote-hms.c (hms_open): Make static.
-
- * mpw-config.in (MacSerial.h): Copy from version in {CIncludes},
- not {MPW}Interfaces:CIncludes.
- * ser-mac.c (mac_baud_rate_table): Fix value for 38400 baud.
-
-Wed Jun 14 14:27:07 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * ch-exp.y: Remove lots of unsupported productions and names.
- Add support for IF-expressions, ORIF, ANDIF, NUM, and ADDR.
-
-Tue Jun 13 21:40:11 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * parser-defs.h (enum precedence): Added PREC_BUILTIN_FUNCTION.
- * expression.h (enum exp_opcode): Added UNOP_LOWER, UNOP_UPPER,
- UNUP_LENGTH.
- * expprint.c (dump_expression): Handle the new exp_opcodes.
- (print_subexp): Handle PREC_BUILTIN_FUNCTION.
- (print_simple_m2_func): Removed.
- (print_subexp): Remove support for Modula2 builtin functions.
- * m2-lang.c (m2_op_print_tab): Add support for builtin functions.
- * ch-exp.y: Parse LOWER, UPPER, and LENGTH builtins.
- (write_lower_upper_value): Convenience function for LOWER and UPPER.
- (upper_lower_argument, length_argument): Removed non-terminals.
- * ch-lang.c (chill_op_print_tab): Entries for UPPER, LOWER, LENGTH.
- (type_lower_upper): New function. Calculate LOWER/UPPER of type.
- (value_chill_length): New function. Calcalate LENGTH of ARRAY/STRING.
- (evaluate_subexp_chill): Handle UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH.
-
-Mon Jun 12 12:48:13 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- Windows support bits from Steve Chamberlain <sac@slash.cygnus.com>.
- * defs.h: Don't declare strchr and friends if WIN32.
- (DIRNAME_SEPARATOR): Move here from source.c.
- (SLASH_P, SLASH_CHAR, SLASH_STRING, ROOTED_P): New macros,
- symbolic definitions for filename bits.
- * top.c (cd_command): Use these.
- * source.c (mod_path, openp): Ditto.
- * terminal.h: Disable termio/sgtty definitions if WIN32.
- * findvar.c (registers_changed): Call registers_changed_hook
- if it is defined.
-
-Mon Jun 12 12:22:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in (distclean, realclean): Remove config.cache and
- config.log.
-
-Mon Jun 12 00:21:59 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * somsolib.c: Include gdb-stabs.h.
- (som_solib_section_offsets): Use SECT_OFF_XXX rather than 0, 1,
- etc. Initialize offsets for RODATA & BSS too.
-
-Sat Jun 10 17:59:11 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa-tdep.c (frame_chain): Try to compensate for incomplete
- register information in core files when backtracing.
-
-Fri Jun 9 14:51:38 1995 Stu Grossman (grossman@cygnus.com)
-
- * remote-nrom.c: Remove everything but download code. More
- cleanups.
-
-Thu Jun 8 15:06:00 1995 Stu Grossman (grossman@cygnus.com)
-
- * defs.h maint.c monitor.c remote-mips.c remote.c: Add support
- for `watchdog' variable. This allows the user to put an upper
- limit on the amount of time that GDB will wait for the target to
- return from a step or continue operation. This will primarily be
- used for the testsuite, where it is difficult to come up with a
- reasonable timeout for things like function calls, which can take
- as long as three minutes under some circumstances. If the
- watchdog timer expires, GDB will generate an error that looks like
- `Watchdog has expired.', and will detach from the target.
-
- * remote-mips.c (mips_open): Setup initial frame from target.
- Print it out so that user is told where the program is stopped
- when they attach.
-
- * remote-nrom.c: Loads of cleanups. Use serial code to open
- network connections. Use expect() to wait for response to
- download command.
-
- * ser-tcp.c (tcp_open): Retry connection if we get ECONNREFUSED.
-
- * serial.c serial.h (serial_open serial_fdopen serial_close):
- Allow users to open the same device multiple times. They all get
- to share the same serial_t. This is about the only way to have
- multiple active targets use the same device (for download and
- debug).
-
- * sparcl-tdep.c: Keep #include <unistd.h> away from GO32.
-
- * target.c: Add `targetdebug' variable. If this is non-zero,
- then a special target is put at the top of the target stack which
- will cause all calls through the target vector to have their args
- and results printed out.
-
-Wed Jun 7 17:40:37 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * ch-exp.y: Handle <primitive_value> "->" <modename>.
-
-Wed Jun 7 17:46:33 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * mem-break.c (LITTLE_BREAKPOINT): If BREAKPOINT and
- {LITTLE,BIG}_BREAKPOINT are all defined, don't redefine.
- (BIG_BREAKPOINT): Ditto.
-
- * config/rs6000/tm-rs6000.h (BREAKPOINT): Define as either
- BIG_BREAKPOINT or LITTLE_BREAKPOINT depending on the target byte
- order.
-
-Wed Jun 7 12:41:42 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * somsolib.c (som_solib_section_offsets): Handle relative pathnames.
-
- * hppa-tdep.c (frame_saved_pc): Handle backtracing through signal
- handler in dynamically linked executables.
-
-Tue Jun 6 10:44:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- From Andrew Cagney <cagney@highland.com.au>
- * rs6000-tdep.c (single_step): Handle both little and big endian
- breakpoints.
- (gdb_print_insn_powerpc): Deal with disassembling both little and
- big endian PowerPC systems.
- (_initialize_rs6000_tdep): Use gdb_print_insn_powerpc to handle
- disassembly, rather that assuming big endian order.
-
- * config/rs6000/tm-rs6000.h (BREAKPOINT): Delete.
- (BIG_BREAKPOINT): Define, big endian breakpoint instruction.
- (LITTLE_BREAKPOINT): Define, little endian breakpoint instruction.
-
-Sat Jun 3 01:54:56 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * README: Add note about Unixware 2.x.
-
- * dbxread.c (process_one_symbol): Check for exact symbol name
- match when fixing up N_GSYM and N_STSYM symbols from Sun acc.
-
- * valprint.c (value_print_array_elements): Use
- fprintf_filtered to put out `<repeats %u times>',
- from schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
-
- * value.h (struct value): Change `repetitions' field from
- `short' to `int' type.
-
-Fri Jun 2 11:17:23 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * arc-tdep.c (arc_bfd_mach_type): New static global.
- (codestream_fill): Handle byte order differences.
- (setup_prologue_scan): Don't read stdarg function's "sub sp,sp,N".
- (arc_get_frame_setup): Read it here.
- (arc_frame_saved_pc): And here.
- (arc_print_insn): New function.
- (arc_set_cpu_type): Set arc_bfd_mach_type. Don't set tm_print_insn.
- (_initialize_arc_tdep): Set tm_print_insn to arc_print_insn.
-
-Wed May 31 12:04:01 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * nlm/{configure.in, Makefile.in}: Converted to use autoconf.
- * nlm/configure: New file, generated with autoconf 2.3.
-
- * nlm/configure.in: Use sed instead of awk to get the value of
- cpufile. Awk is not a utility required by the GNU coding
- standards. This change also fixes the rigid whitespace
- requirements that were required for awk.
-
- * sparclite/aload.c: Use a file descriptor instead of a stdio
- stream for i/o with target board.
- Use #error if HAVE_TERMIOS is not defined.
-
- * sparclite/{Makefile.in, configure.in}: Converted to use
- autoconf.
- * sparclite/configure: New file, generated with autoconf 2.3.
-
-Sun May 28 23:10:07 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * defs.h: Include either varargs.h or stdarg.h (for va_list).
- Fix stupid thinko in last change ("..." -> "va_list").
-
- * defs.h (vprintf_filtered declaration): Add PARAMS prototype;
- gcc-2.5 chokes on format attributes for unprototyped functions.
- (vfprintf_filtered declaration): Likewise.
- (vprintf_unfiltered declaration): Likewise.
- (vfprintf_unfiltered). Likewise.
-
-Sat May 27 23:54:17 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * configure.in: Use sed instead of awk to get the values of
- hostfile, targetfile and nativefile. Awk is not a utility
- required by the GNU coding standards. This change also
- fixes the rigid whitespace requirements that were required
- for awk.
- * configure: regenerated.
-
-Sat May 27 16:24:04 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
-
- * sparclite/{Makefile,configure}.in: Add hooks for building with
- -lsocket & -lnsl for solaris2. Don't build aload/eload for DOS.
-
-Thu May 25 12:46:37 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdbserver/remote-utils.c (prepare_resume_reply): Add FIXME
- comment regarding signal numbering.
-
-Wed May 24 15:49:47 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * arm-tdep.c (_initialize_arm_tdep): Use print_insn_little_arm
- now.
-
- * arm-tdep.c (convert_from_extended, convert_to_extended):
- New.
- * coffread.c (enter_linenos): Return if linetab 0.
- * config/arm/arm.mt (TDEPFILES): Add simulator support.
- * config/arm/tm-arm.h (FRAME_FIND_SAVED_REGS): Fix prototypes.
-
-Mon May 22 19:37:21 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * config/idt.mt: replace monitor and array-rom with the new
- remote-array.
-
-Mon May 22 15:38:25 1995 Stu Grossman (grossman@cygnus.com)
-
- * remote-nindy.c: Install Kung patch for PR 6820. I have no idea
- what this does...
-
- * breakpoint.c: Move defaults of watchpoint related macros into
- target.h.
- * target.h: Macros from breakpoint.c. Conditionalize based on
- TARGET_HAS_HARDWARE_WATCHPOINTS.
- * i386v-nat.c procfs.c: Use TARGET_HAS_HARDWARE_WATCHPOINTS
- instead of TARGET_CAN_USE_HARDWARE_WATCHPOINT to enable watchpoint
- code.
- * config/i386/nm-linux.h, config/mips/nm-irix4.h,
- config/pa/nm-hppab.h, config/sparc/tm-sparclite.h: #define
- TARGET_HAS_HARDWARE_WATCHPOINTS to enable watchpoint code.
-
-Mon May 22 06:47:30 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.c, target.h: Move defaults of watchpoint related
- macros back to breakpoint.c. Required to get GDB compiling
- on Solaris again.
-
-Fri May 19 14:49:37 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * defs.h (ATTR_FORMAT): New macro, expands to gcc's format
- attribute when compiled by gcc.
- * defs.h, language.h, monitor.h: Changed many function
- declarations to use ATTR_FORMAT.
-
- * breakpoint.c (delete_command); source.c (directory_command);
- top.c (define_command): Changed call to query() that had too
- many arguments.
- * printcmd.c (address_info): Changed call to printf_filtered()
- that had too many arguments.
-
-Fri May 19 09:52:07 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c (wait_for_inferior): Move assignments to stop_signal
- and stop_pc, and STOPPED_BY_WATCHPOINT code, back where they
- were--after the switch statement on w.kind. You can't read the
- registers of an inferior which has exited. Use a goto in the
- STOPPED_BY_WATCHPOINT code.
- * infrun.c (wait_for_inferior): Reinstate
- HAVE_STEPPABLE_WATCHPOINT and HAVE_CONTINUABLE_WATCHPOINT code.
-
-Fri May 19 06:15:40 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * utils.c, complaints.c, language.c, monitor.c, remote-array.c,
- remote-mips.c, remote-os9k.c, remote-st.c: Conditionalize use of
- stdarg rather than varargs on ANSI_PROTOTYPES not __STDC__; it
- must match the definition of PARAMS.
-
-Thu May 18 15:58:46 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * utils.c (fprintf_filtered, fprintf_unfiltered, fprintfi_filtered,
- printf_filtered, printf_unfiltered, printfi_filtered, query, warning,
- error, fatal, fatal_dump_core): Use stdarg.h macros when compiling
- with an ANSI compiler.
- * complaints.c (complain): Likewise.
- * language.c (type_error, range_error): Likewise.
- * monitor.c (monitor_printf, monitor_printf_noecho): Likewise.
- * remote-array.c (printf_monitor, debuglogs): Likewise.
- * remote-mips.c (mips_error): Likewise.
- * remote-os9k.c (printf_monitor): Likewise.
- * remote-st.c (printf_stdebug): Likewise.
-
- * defs.h, complaints.h, language.h, monitor.h: Add prototypes to
- match above changes.
-
- * printcmd.c: Remove uneeded #include <varargs.h>.
- * remote-e7000.c: Likewise.
-
- * f-typeprint.c (f_type_print_base): Fix typo found by above
- changes.
-
-Wed May 17 11:21:32 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * Makefile.in (xcoffread.o): Depend on partial-stab.h.
-
- * xcoffsolib.c (sharedlibrary_command): New command.
- * xcoffsolib.c (solib_info): Call xcoff_relocate_symtab.
- * xcoffsolib.c: Miscellaneous cleanups.
-
- * partial-stab.h: Ignore symbol descriptor '-' (for local
- variables with negative type numbers) without complaint.
-
- * rs6000-nat.c (vmap_ldinfo): Use bfd_stat rather than our own
- local emulation thereof. Remove unused variable ostart.
-
-Wed May 17 15:55:53 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in (config.status): changed target so that
- config.status --recheck is executed if configure script changes.
-
- * monitor.c (monitor_printf): Changed format specification in
- error message to work with pre-ansi compilers.
- (monitor_load_srec): reduced length of s-records from 128 to 32
- bytes so download is more reliable with the rom68k monitor.
-
- * rom68k-rom.c: Added trailing space to prompt string.
-
- * config/i386/xm-i386sco.h (HAVE_STRSTR): Removed.
- * config/i386/xm-go32.h, mswin/xm.h (SYS_SIGLIST_MISSING):
- Removed.
- * defs.h, config/{xm-lynx.h, xm-nbsd.h},
- config/i386/{xm-i386bsd.h, xm-linux.h},
- config/m68k/xm-hp300bsd.h, config/mips/xm-irix4.h,
- config/ns32k/xm-ns32km3.h, doc/gdbint.texinfo
- (PSIGNAL_IN_SIGNAL_H): Removed.
-
-Tue May 16 13:16:06 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in (Makefile): Added config.status to dependency list.
-
- * configure.in: Added INIT-CMDS argument to AC_OUTPUT which sets
- gdb_host_cpu, gdb_target_cpu and nativefile.
- * configure: regenerated.
-
-Mon May 15 23:50:51 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (parse_symbol): Do not relocate stBlock/scText
- symbols, their value is the displacement from the procedure address.
- * top.c (init_main): Add missing newlines to help strings for
- `if' and `while' commands, fix help string for `show commands'.
-
-Mon May 15 18:37:56 1995 Stu Grossman (grossman@cygnus.com)
-
- * breakpoint.c: Move defaults of watchpoint related macros into
- target.h. Use BP_TEMPFLAG and BP_HARDWAREFLAG instead of
- constants.
- * infrun.c (wait_for_inferior): Enhance comment near
- STOPPED_BY_WATCHPOINT.
- * target.h: Macros from breakpoint.c.
-
-Mon May 15 17:11:38 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * config/i386/{i386sol2.mh, i386v4.mh, ncr3000.mh},
- config/m68k/m68kv4.mh, config/mips/{irix4.mh, irix5.mh,
- mipsv4.mh}, config/sparc/sun4so2.mh (INSTALL): Removed, figured
- out by autoconf.
- * config/apollo68v.mh (RANLIB): Removed, figured out by autoconf.
-
- * Makefile.in, configure.in: Converted to use autoconf
- * aclocal.m4: New file, local autoconf macro definitions.
- * configure: New file, generated with autoconf 2.3.
-
-Mon May 15 14:46:41 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote.c (remote_kill): Add prototype.
- * cpu32bug-rom.c (cpu32bug_open): Properly define as static.
- * config/h8300/h8300hms.mt (TDEPFILES): Add monitor.o.
-
-Mon May 15 12:12:34 1995 Stu Grossman (grossman@cygnus.com)
-
- * sparclite/salib.c (win_ovf win_unf): Make window size constant
- into a variable (__WINSIZE) so that it can be controlled via the
- .h file.
- * sparclite/sparclite.h: Add SL933 #ifdef to set __WINSIZE to 6
- for the 933 board.
-
- * infrun.c: Add #ifdef HP_OS_BUG to all references to
- trap_expected_after_continue.
- * (wait_for_inferior): Fix for remote watchpoints. Don't try to
- insert breakpoints while target is running (this only works on
- *some* native targets). This may also speed up native watchpoints
- considerably.
-
-Sat May 13 13:55:04 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dwarfread.c (struct dwfinfo), dbxread.c (struct symloc),
- mdebugread.c (struct symloc), hpread.c (struct symloc),
- xcoffread.c (struct symloc): Fix inaccurate comment introduced
- 20 Apr 1995.
-
-Sat May 13 13:34:18 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * rs6000-tdep.c (find_toc_address): Revise comment.
- * symfile.c, symfile.h (init_psymbol_list): New function;
- consolidate duplicated copies from os9kread.c, dbxread.c
- and dwarfread.c.
- * defs.h: Declare info_verbose.
- * xcoffread.c: Extensive changes to support psymtabs.
-
-Fri May 12 13:48:41 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * cpu32bug-rom.c remote-est.c rom68k-rom.c: Update line_term element.
-
-Fri May 12 06:39:30 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * partial-stab.h: Expand comments.
-
-Thu May 11 19:01:37 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * Support debugging using native MACH primitives on hppa*-*-osf*.
- * configure.in: hppa*-*-osf* != hppa*-*-bsd* anymore.
- * config/pa/hppaosf.mh: New file.
- * config/pa/nm-hppao.h: Likewise.
- * hppam3-nat.c: Likewise.
- * config/pa/tm-hppao.h (PSW_SS): Define for single-stepping.
- (MACHINE_CPROC_*_OFFSET): Define.
- (TRACE_*): Define.
- (START_INFERIOR_TRAPS_EXPECTED): Delete definition.
-
-Wed May 10 18:59:26 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * hppa-tdep.c (read_unwind_info): Cosmetic cleanup.
- * (unwind_command): Clean it up and make it print things out
- nicer.
- * monitor.c: Add ^C handling capability (mostly ripped off from
- remote.c).
- * (monitor_printf): Make it check the command echo.
- * (monitor_printf_noecho): Similar to above, but doesn't check
- for echo.
- * (monitor_stop): No longer waits for prompt. That is the job of
- the caller. This makes things work much better for monitor_wait,
- which waits for the prompt itself.
- * (monitor_open): Deal with new monitor_stop semantics. Also,
- flush input after sending init strings to get rid of junk that may
- be output. Also, don't always send \r to remote. Use
- monitor_ops->line_term cuz proper character isn't always \r.
- * (monitor_fetch_register): Switch to completely different
- algorithm to deal with lame-ass monitors which put spaces in the
- middle of numbers, and prompt with a space!!!!!
- * (monitor_read_memory_single): New routine to be used with
- monitors that can only return one byte/short/long at a time. This
- is selected via MO_GETMEM_READ_SINGLE.
- * (monitor_load_srec): Use monitor_printf_noecho for sending S
- records. Most targets don't echo them.
- * (monitor.h): Get rid of cmd_delim. Add line_delim.
- * op50n-rom.c (op50n_cmds): Fill it up. Make it work.
- * w89k-rom.c: Change all eols from \r to \n. Change load_resp to
- ^Q to prevent error message.
- * config/pa/tm-hppa.h (CALL_DUMMY (for hppro)): Add special
- instruction sequence at end to make restore_pc_queue happy.
-
-Wed May 10 15:59:00 1995 Torbjorn Granlund <tege@adder.cygnus.com>
-
- * remote-est.c (est_open): Make static to match prototype.
-
-Tue May 9 16:58:50 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in: Add little endian PowerPC support.
- * config/powerpc/ppcle-eabi.mt: New file for little endian PowerPC
- support.
- * config/powerpc/tm-ppcle-eabi.h: ditto.
-
-Mon May 8 12:11:38 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * nlm/configure.in (gdb_host, gdb_host_cpu, gdb_target): Removed.
- These variables not used.
-
- * config/m68k/monitor.mt (TDEPFILES): Added cpu32bug-rom.o.
-
-Wed May 3 17:54:47 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * monitor.c (monitor_command): Don't use PROMPT until monitor
- target is known to be open.
- (monitor_make_srec): Don't define size of hextab.
-
-Tue May 2 18:32:24 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.in (--enable-netrom): New configuration option.
- * Makefile.in (REMOTE_OBS): Rename from REMOTE_O, append
- value of NETROM_OBS.
- (NETROM_OBS): New variable.
- * remote-nrom.c: New file, NetROM target support.
- * config/a29k/a29k-udi.mt, config/i960/vxworks960.mt: Use
- REMOTE_OBS instead of REMOTE_O.
- * config/arc/arc.mt: Ditto.
-
-Fri Apr 28 23:30:00 1995 Stu Grossman (grossman@cygnus.com)
-
- * array-rom.c (_initialize_array array_open): Move baud_rate
- initialization from _initxxx to array_open to fix bug with
- overriding -b command line option.
-
-Thu Apr 27 20:29:34 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (RUNTEST): Fix reference of `srcdir'.
-
-Wed Apr 26 19:01:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * remote-hms.c: Rewrite to use new monitor conventions.
-
-Tue Apr 25 11:27:14 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dbxread.c: Add comment explaining lowest_text_address.
- Add comment regarding stringtab_global and psymtabs.
-
-Sat Apr 22 01:26:29 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * config/pa/tm-hppa.h (EXTRACT_STRUCT_VALUE_ADDRESS): Fix.
-
- * config/pa/tm-hppa.h (EXTRACT_RETURN_VALUE): Rewrite to correctly
- handle "short", "int" and small structures returned in registers.
-
-Fri Apr 21 12:57:53 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * minsyms.c: add new function lookup_minimal_symbol_text, to look
- for text symbol only.
- * breakpoint.c (create_longjmp_breakpoint): call
- lookup_minimal_symbol_text instead of lookup_minimal_symbol.
- * symtab.h: add lookup_minimal_symbol_text prototype.
-
-Fri Apr 21 12:03:44 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * sh-tdep.c (sh-opc.h): Don't include.
- (gdbcore.h): Include.
- (frame_find_saved_regs): Remove unused local.
-
-Thu Apr 20 10:12:21 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dwarfread.c (struct dwfinfo), dbxread.c (struct symloc),
- mdebugread.c (struct symloc), hpread.c (struct symloc): Clean
- up comments.
-
-Wed Apr 19 16:58:11 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * hppa-tdep.c (deposit_17): New routine to deposit 17 bit
- constants into PA instructions.
- * Put #ifdefs around all signal handling code. Not generally
- needed for embedded boards.
- * (hppa_fix_call_dummy): Parameterize offsets into call dummy to
- allow different dummys to be used by this code. Use
- INSTRUCTION_SIZE instead of REGISTER_SIZE for things.
- Conditionalize setup of _sr4export fixup. Improve comments.
- * config/pa/tm-hppa.h: Define INSTRUCTION_SIZE. Use a different
- call dummy if PA_LEVEL_0 is defined. Better comments for call
- dummys. Define offsets for LDIL/LDO instructions which load
- function addresses.
- * config/pa/tm-pro.h: Get rid of signal handling stuff. Define
- PA_LEVEL_0 to disable mucking with space regs and such.
-
-Mon Apr 17 15:37:08 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * cpu32bug-rom.c monitor.h op50-rom.c remote-est.c rom68k-rom.c
- w89k-rom.c: Remove loadtypes, loadprotos and baudrates.
- * op50-rom.c: Fix copyrights and add load routine to op50n_cmds.
- * rom68k-rom.c (_initialize_rom68k): Don't set baud rate.
- * w89k-rom.c: Fix copyrights.
-
-Sun Apr 16 14:00:55 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * monitor.c: Move all xmodem stuff into xmodem.[ch]. Remove
- unnecessary remoteloadprotocol and remoteloadtype support.
- * (expect expect_prompt): Change names to monitor_expect and
- monitor_expect_prompt. Make them global.
- * (printf_monitor): Change name to monitor_printf. Make global.
- * (monitor_read_memory): Flush command echo to avoid parsing
- ambiguity with CPU32Bug monitor.
- * (monitor_load): Remove remoteloadprotocol and remoteloadtype
- support. Call target_ops->load_routine, default to
- monitor_load_srec.
- * (monitor_load_srec): Remove everything but S-record support.
- * monitor.h (monitor_ops): Add load_routine to provide monitor
- specific download capability.
- * remote-est.c: Clean up copyrights and comments.
- * w89k-rom.c: Use new xmodem support.
- * xmodem.c xmodem.h: New files to support xmodem downloads.
- * rom68k-rom.c remote-est.c: Fix copyrights, add load_routine
- entry to monitor_ops.
- * cpu32bug-rom.c: New file to support Moto BCC debuggers.
- * config/m68k/est.mt (TDEPFILES): Add cpu32bug.o.
- * config/pa/hppapro.mt (TDEPFILES): Add xmodem.o.
-
-Sat Apr 15 18:00:15 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * rem-multi.shar: Removed; superceded by gdbserver.
-
-Fri Apr 14 12:10:24 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * xcoffread.c (xcoff_sym_fns): Revise comment about merging this
- with coffread.c.
-
- * breakpoint.c (fixup_breakpoints): Removed.
- * rs6000-nat.c (vmap_symtab): Don't call fixup_breakpoints.
- (vmap_ldinfo, xcoff_relocate_core): Call breakpoint_re_set.
-
- * coffread.c (coff_symfile_offsets): Allocate SECT_OFF_MAX
- sections, not just SECT_OFF_MAX-1.
-
- * rs6000-nat.c (vmap_symtab), xcoffread.c: Re-do section offsets
- to be indexed by SECT_OFF_* instead of xcoff section numbers.
- * objfiles.c, remote.c: Remove comments regarding SECT_OFF_*.
- * symtab.h: Revise comment about block_line_section.
- * rs6000-nat.c (vmap_symtab): Don't relocate objfile->sections.
-
-Sat Apr 15 14:15:14 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.in (init.c): Don't try to do symbolic {o} in sed
- command, not allowed by some version of MPW Make.
- * ser-mac.c (mac-setbaudrate): Make it actually set baud rates.
-
-Sat Apr 15 14:05:09 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * alpha-tdep.c (alpha_push_arguments): Fix typo (TYPE_VALUE ->
- VALUE_TYPE). Do the cast for TYPE_CODE_BOOL, TYPE_CODE_CHAR,
- TYPE_CODE_ENUM, and TYPE_CODE_RANGE as well as TYPE_CODE_INT.
-
-Sat Apr 15 14:04:32 1995 Per Bothner <bothner@cygnus.com>
-
- * alpha-tdep.c (alpha_push_arguments): Only cast to long for
- TYPE_CODE_INT.
-
-
-Thu Apr 13 16:17:04 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * remote-array.c: New file for Array Tech LSI33k based controller
- board.
-
-Thu Apr 13 12:23:31 1995 Kung Hsu <kung@rtl.cygnus.com>
-
- * a29k-tdep.c (get_longjmp_target): Replace SWAP_TARGET_AND_HOST with
- extract_address.
- * remote-vxsparc.c: New file, preliminary check in, this configuration
- not supported yet.
- * remote-vxmips.c: ditto.
-
-Thu Apr 13 12:10:14 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000-tdep.c (xcoff_add_toc_to_loadinfo): Don't use a prototype
- to declare the function.
-
-Wed Apr 12 16:40:20 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * monitor.h (init_monitor_ops): Declare.
- * rom68k-rom.c: Clarify some comments.
- (rom68k_open): Define as static, to match decl.
-
-Wed Apr 12 16:36:44 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * gdb.gdb: New file.
- * .gdbinit: Move list-objfiles to gdb.gdb.
-
- * values.c (set_internalvar): Set modifiable flag of newval.
-
-Wed Apr 12 14:34:31 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * xcoffread.c: Call complain() rather than error() or printing a
- warning.
-
-Wed Apr 12 08:15:27 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * arc-tdep.c: #include "gdbcmd.h".
- (codestream_seek): Pass CORE_ADDR.
- (arc_cpu_type, tmp_arc_cpu_type, arc_cpu_type_table): New globals.
- (debug_pipeline_p): Likewise.
- (X_...): Instruction field access macros.
- (BUILD_INSN): Define.
- (codestream_tell): Allow for stream elements > 1 byte.
- (codestream_fill): Likewise.
- (setup_prologue_scan): New function.
- (arc_get_frame_setup): Call it. Update to current spec
- regarding prologues. Use BUILD_INSN.
- (skip_prologue): New argument `frameless_p'. Use BUILD_INSN.
- (arc_frame_saved_pc): New function.
- (frame_find_saved_regs): Use BUILD_INSN.
- (get_insn_type, single_step): New functions.
- (one_stepped): New global.
- (arc_set_cpu_type_command, arc_show_cpu_type_command): New functions.
- (arc_set_cpu_type): New function.
- (_initialize_arc_tdep): Define new `set' commands `cpu',
- `displaypipeline', and `debugpipeline'.
- * arc/tm-arc.h (TARGET_BYTE_ORDER): Delete.
- (TARGET_BYTE_ORDER_SELECTABLE): Define.
- (DEFAULT_ARC_CPU_TYPE): Define.
- (SKIP_PROLOGUE_FRAMELESS_P): Define.
- (BREAKPOINT): Delete.
- (BIG_BREAKPOINT, LITTLE_BREAKPOINT): Define.
- (DECR_PC_AFTER_BREAK): Change to 8.
- (NO_SINGLE_STEP): Define.
- (ARC_PC_TO_REAL_ADDRESS): Define.
- (SAVED_PC_AFTER_CALL): Use it.
- (NUM_REGS, REGISTER_BYTES): Fix.
- (FRAME_SAVED_PC): Call arc_frame_saved_pc.
- (FRAME_LOCALS_ADDRESS): Fix.
-
-Tue Apr 11 16:42:37 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * top.c, utils.c, defs.h: Remove error_hook. It is currently
- unused and would need to hook into error_begin()/return_to_top_level(),
- instead of error(), if it were to be used.
-
-Tue Apr 11 13:46:25 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * utils.c, defs.h (warning_begin): Renamed from warning_setup, for
- consistency with error_begin. Also print warning_pre_print.
- Document it better.
- * utils.c (warning): Use it.
- * utils.c (error_begin): Doc fix.
- * rs6000-nat.c (vmap_ldinfo): If we don't find ldinfo for the
- symfile_objfile, nuke it.
-
-Tue Apr 11 09:35:20 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * printcmd.c (print_address_numeric): Pass use_local to
- print_longest, rather than always passing 1.
-
- * nlm/Makefile.in: Remove comments discussing munch.
-
-
-Mon Apr 10 18:31:57 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- Merge in support for Mac MPW as a host.
- (Old change descriptions retained for informational value.)
-
- * mpw-config.in (i386-unknown-go32): Change from aout.
- (sh-hitachi-hms): New target.
- * mpw-make.in (BISON): Use byacc instead of bison.
- (VERSION): Bump to 4.14.1.
- (*-pinsn.*): Remove mentions everywhere.
- (all): Don't build MacGDB.
- (gdb, SiowGDB): Depend on Version.r.
- (Version.r): Generate from version info.
- * main.c (main): Pass program name to START_PROGRESS, END_PROGRESS.
- (main) [MPW]: Remove debugging hook.
- * mac-xdep.c (debug_openp): New flag.
- (mac_init): Set flag if env variable defined.
- * ser-mac.c (mac_open): Clarify error message.
- (mac_readchar): Call PROGRESS while looping.
- (mac_write): Call sleep instead of sec_sleep.
- (sec_sleep): Remove.
- * source.c (openp) [MPW]: Only print debugging info if debugging.
- * utils.c (query) [MPW]: Clarify that behavior is a bug.
-
- * mpw-make.in (init.c): Use open-brace instead of mpw-open-brace.
-
- * main.c, source.c: Remove hacks that replace long strings
- with shorter ones, now solved portably.
-
- * config/m68k/xm-mpw.h (spin.h): Include.
- (ALMOST_STDC): Only define if MPW_C.
- * config/m68k/tm-mac.h: New file, Mac target definitions.
-
- * mpw-config.in (m68k-apple-macos, ppc-apple-macos,
- i386-unknown-aout): New targets.
- (mk.tmp): Add *DEPFILES definitions.
- * mpw-make.in: Remove gC rules, clean up definitions for other
- include files, bump version, fix bogus \ that should be \Option-d.
- (init.c): Build correctly.
-
- * mpw-make.in (HFILES_NO_SRCDIR): Add somsolib.h
- (ALLDEPFILES): Add somsolib.c.
- (somsolib.o): Add some dependencies.
-
- * mpw-config.in: Use nm-empty.h if host is not target.
- (xdepfiles): Add mac-xdep.c.o.
- (xm_file): Remove.
- * mpw-make.in: Add Fortran files.
- (XDEPFILES): Remove.
-
- * mpw-config.in (MacSerial.h): Duplicate from standard Serial.h.
- * ser-mac.c (MacSerial.h): Include instead of Serial.h.
-
- * mpw-make.in: Use {s} instead of {srcdir} everywhere.
- (bindir, libdir): Remove extra colon.
- (source.c): Compile with C instead of gC.
- (c-exp.tab.c, ch-exp.tab.c, m2-exp.tab.c): Add {o}.
- (install-only): Don't install MacGDB.
- * source.c (openp) [MPW]: Add a debugging display.
- (open_source_file) [MPW]: Use MPW basename finders.
- [MPW_C]: Briefer versions of help for line and list commands.
-
- * mpw-make.in: Change references from paread.c to somread.c
-
- * mpw-make.in (VERSION): Update to 4.12.3.
- (SiowGDB): New target, GDB using SIOW library.
- (init-new.c): New target, attempt to generate init.c from sources.
- (main.c.o, top.c.o): Put each in its own segment.
- * main.c (main) [MPW]: Always call mac_init.
- * utils.c (query) [MPW]: Always return "yes" if in MacGDB, output
- an extra newline otherwise.
- * mac-xdep.c: More comments in various places, remove junk.
- (mac_init): Add tests for MPW and SIOW.
- (use_wne, has_color_qd): Renamed.
- (use_color_qd): New variable.
- (grow_window): Only do console resizing to console window,
- call resize_console_window.
- (zoom_window): Call resize_console_window.
- (resize_console_window, scroll_text): New functions.
- (adjust_console_sizes): Always align viewrect to even multiples of
- text lines.
- (adjust_console_text): Always scroll by whole lines.
- (hacked_vfprintf, hacked_puts, hacked_fputc, hacked_putc): Force a
- recalculation of scroll positions if a newline was output.
- (hacked_fflush): Similarly, for flushing.
- (hacked_fgetc): New function, aborts if called in MacGDB.
- * ser-mac.c (mac_readchar): Rename starttime to start_time,
- remove debugging printf.
- (mac_write): Sleep on first 4 writes.
- (sec_sleep): New function, works like standard sleep.
- * macgdb.r: Adjust positioning and contents of About box.
- Set minimum size to 2000K, preferred size to 5000K.
- * config/m68k/xm-mpw.h (fgetc): Define as a macro.
-
- * mpw-make.in (.c.o, .gc.o): Prefix segment names with gdb_.
- (top.c.o, annotate.c.o): Add build rules.
- * macgdb.r (SysTypes.r): Include.
- ('vers'): New resource, version info.
- (mFile, mEdit, mDebug): Enable all menu items.
- (mDebug): Add key equivalents for continue, step, next.
- (wConsole): Add zoom and close boxes to window.
- * mac-xdep.c (new_console_window): New function, code taken from
- mac_init.
- (mac_command_loop): Use GetCaretTime for wait interval, call
- do_idle on null events.
- (do_idle): New function.
- (zoom_window): Implement zooming.
- (v_scroll_proc): New function, handles vertical scrolling.
- (activate_window): Do activation of console window.
- (do_menu_command): Implement items of file, edit, and debug menus.
- (do_keyboard_command): Fix command extraction.
- (adjust_console_sizes, adjust_console_text): New functions.
- (hacked_fprintf, hacked_vfprintf, hacked_fputs, hacked_fputc,
- hacked_putc): Don't call draw_console.
- * ser-mac.c (mac_open): Add an error message for invalid ports.
- (first_mac_write): New global.
- (mac_write): Use first_mac_write to sleep on first several writes.
-
- * mpw-make.in (INCLUDE_CFLAGS): Add readline source dir.
- (READLINE_CFLAGS, READLINE_SRC, READLINE_DIR): Uncomment.
- (TSOBS): Don't compile inflow.c.
- (all, install): Add MacGDB.
- * main.c (main): Do Mac-specific init and command loop if a
- standalone app, skip full option help message if compiling
- with MPW C.
- (gdb_readline): If MPW, add a newline after the (gdb) prompt.
- * utils.c (_initialize_utils): If MPW, don't try to use termcap to
- compute the window size.
- * config/m68k/xm-mpw.h (printf, fprintf, fputs, fputc, putc,
- fflush): Define as macros that expand into hacked_... versions.
- (StandAlone, mac_app): Declare.
- * macgdb.r (SIZE): Set the default partition to 4000K.
- * mac-xdep.c (readline.h, history.h): Include.
- (terminal.h): Don't include.
- (mac_app): Define.
- (gdb_has_a_terminal): Define Mac-specific version.
- (do_keyboard_command): Simplify search for command string.
- (readline): Define as gdb_readline.
- Add other history/readline stubs to make main gdb link.
- (hacked_fprintf, hacked_printf, hacked_vfprintf, hacked_fputs,
- hacked_fputc, hacked_fflush): New functions, intercept output to
- stdout and stderr, send to console window.
-
- * mpw-make.in (MacGDB): New target, standalone Mac-hosted gdb.
- (XDEPFILES): Define.
- (main.c.o): Compile with gC instead of C.
- * mac-defs.h: New file, menu etc definitions shared between
- C and Rez files.
- * macgdb.r: New file, Rez (resource compiler) resource
- definitions.
- * mac-xdep.c: New file, Mac host interface code.
- * config/m68k/xm-mpw.h (PATHNAME_SEPARATOR): Rename to
- DIRNAME_SEPARATOR.
- (PATHNAME_SEPARATOR_STRING): Remove.
- (SIGQUIT, SIGHUP): Define.
- (fileno, R_OK): Define.
-
- * mpw-config.in: New file, MPW configuration fragment.
- * mpw-make.in: New file, MPW makefile fragment.
- * config/m68k/xm-mpw.h: New file, MPW host definitions.
- * ser-mac.c: New file, Mac serial interface.
-
-Mon Apr 10 16:47:57 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * valprint.c (print_longest): Fix a syntax error in #ifdef
- PRINTF_HAS_LONG_LONG.
-
- * config/mips/xm-irix5.h: turn on CC_HAS_LONG_LONG and
- PRINTF_HAS_LONG_LONG.
- * config/mips/tm-irix5.h: turn on FORCE_LONG_LONG.
-
-Sat Apr 8 02:47:45 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (parse_symbol): Use new variable
- nodebug_var_symbol_type as type of variables which don't have any
- ecoff debug info associated with them.
- (parse_symbol, parse_procedure): Use heuristics to determine if
- functions were compiled without debugging info and change their
- type to nodebug_function_symbol_type.
- (_initialize_mdebugread): Initialize nodebug_*_symbol_type.
-
- * source.c (line_info): Clear sal.pc for `info line' without
- arguments.
-
-Fri Apr 7 17:43:01 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * monitor.c: make_xmodem_packet and print_xmodem_packet go away.
- send_xmodem_packet shows up to do the obvious. Lots of fixes to
- xmodem downloads including resetting of block number at start of
- new transfers, fix for buffer overrun problem, addition of CRC
- generation code.
- * (monitor_open): loadtype_str and loadproto_str now default to
- first entry in monitor_ops->loadtypes.
- * (monitor_wait): Lengthen register dump buf, because of verbose
- Winbond monitor.
- * (monitor_fetch_register): Report unimplemented registers as 0.
- * (monitor_read_memory): Only do 16 byte aligned transfers
- because of formatting weirdness with the Winbond monitor. Also,
- ignore non-hex, non-whitespace formatting between bytes (same
- monitor).
- * (monitor_load): Clean up logic.
- * (monitor_load_srec): Re-do xmodem support. Move lots of it
- into send_xmodem_packet.
- * (getacknak): Get rid of polls and timeouts. Handle CRC
- requests from receiver.
- * (monitor_make_srec): Efficiency improvements. Don't call
- sprintf to output two digit hex numbers.
- * (crcinit, docrc): New, CRC-16 support routines.
- * (send_xmodem_packet): New routine to generate either CRC-16 or
- checksummed xmodem packets.
-
- * remote-est.c (est_loadtypes), rom68k-rom.c (rom68k_loadtypes):
- Reduce tables down to only the load types supported by each
- monitor.
-
- * w89k-rom.c (w89k_supply_register): Parses output of Winbond
- register dumps.
- * (w89k_loadtypes, w89k_loadprotos): Reduce to just srec/xmodem.
- * (w89k_cmds): Add clear all breakpoints, memory fill, and dump
- registers commands.
-
- * config/pa/tm-hppa.h: Define lots register offsets needed by
- w89k-rom.c.
-
-
-Thu Apr 6 17:00:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * Makefile.in (X11_INCLUDES): Define as empty.
- (X11_CFLAGS): Define as including $(X11_INCLUDES).
- (X11_LIB_SWITCHES): Define as empty.
- (X11_LIBS): Define as -lX11.
-
-
-Wed Apr 5 19:57:38 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * mips-tdep.c (mips_print_register): Remove unused variable
- our_type and call to init_type. Fixes memory leak. Reindent function.
-
- * mips-tdep.c (mips_print_register), findvar.c
- (write_register_bytes): Make buffer char[] instead of unsigned
- char[].
-
-Mon Apr 3 19:28:14 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * top.c, utils.c, main.c, defs.h: Replace error_pre_print with two
- variables: error_pre_print (for RETURN_ERROR) and quit_pre_print
- (for RETURN_QUIT). Fixes a bug whereby typing ^C (e.g. in "maint
- print sym") could output extraneous stuff.
- * objfiles.c: Don't declare error_pre_print; defs.h does it.
-
-Mon Apr 3 13:48:28 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * monitor.h: Add MO_GETMEM_NEEDS_RANGE flag.
- * monitor.c (monitor_read_memory): Use previously mentioned flag
- to send proper format memory examine commands to the w89k monitor.
- Also, try to handle bizarre format of memory dump...
-
- * op50-rom.c w89k-rom.c: Update to new monitor.[ch] conventions.
-
-Sat Apr 1 03:22:20 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dbxread.c (process_one_symbol) [SOFUN_ADDRESS_MAYBE_MISSING]:
- Handle relocated symbol address.
- * partial-stab.h, case N_SO, SOFUN_ADDRESS_MAYBE_MISSING:
- Do not relocate a zero address.
-
-Thu Mar 30 19:46:36 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/a29k/tm-a29k.h: Nuke obsolete define CONTROL_END_ADDR; it
- is nowhere used.
-
- * stabsread.c (read_range_type): Remove FIXME comment about
- type-id (I presume this meant a number followed by = followed by a
- type) versus type number; Per fixed it.
-
-Wed Mar 29 09:56:04 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * configure.in: sparc-*-sunos5* is same as sparc-*-solaris2*.
-
-Wed Mar 29 18:30:03 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-e7000.c (why_stop): Add new kinds of strings to expect
- from the emulator.
- (e7000_wait): Add interpretations for more stop reasons,
- including warnings for write protect and cycle address errors.
-
-Wed Mar 29 17:09:29 1995 Stu Grossman (grossman@cygnus.com)
-
- * monitor.c monitor.h remote-est.c rom68k-rom.c: Add start of
- support for interrupting target.
- * monitor.c (monitor_open): Send stop command before doing
- anything else.
- * (monitor_load_srec): Fix record size calculation to prevent end
- of segment from getting trashed.
- * rom68k-rom.c: Update to latest version of struct monitor_ops.
- * config/sparc/tm-sparc.h (FIX_CALL_DUMMY): Fix byte-order
- problems. Makes DOS hosted function calling work.
- * sparclite/crt0.s: Define _start to make COFF happy.
-
-Wed Mar 29 09:11:51 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * defs.h (atof): Don't provide an external declaration if atof is
- a macro.
-
-Wed Mar 29 00:01:07 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * rs6000-tdep.c (skip_prologue): Skip saving of LR and CR in
- the stack frame, fix typos in `st rx,NUM(r1)' and `stu r1,NUM(r1)'
- tests.
-
-Tue Mar 28 17:04:04 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * gdbtypes.c (create_range_type): If indextype has TYPE_FLAG_STUB
- set, set TYPE_FLAG_TARGET_STUB.
- (check_stub_type): Recalculate TYPE_LENGTH for range type.
- * stabsread.c (read_range_type): If index type number is followed
- by '=', back up, call read_type. and assume we have a true range.
- * gdbtypes.h (TYPE_FLAG_TARGET_STUB): Update comment.
-
-Mon Mar 27 22:51:54 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * alpha-nat.c, irix4-nat.c, irix5-nat.c, mipsv4-nat.c,
- sparc-tdep.c (supply_gregset, supply_fpregset): Fill inaccessible
- registers with zero to handle recent read_register_bytes change.
- * irix4-nat.c, irix5-nat.c, mipsv4-nat.c (supply_gregset,
- fill_gregset): Fix handling of CAUSE_REGNUM.
- * mips-nat.c (store_inferior_registers): Handle unwritable
- registers when storing a single register.
- * config/mips/tm-irix3.h (CAUSE_REGNUM, BADVADDR_REGNUM):
- Fix definitions.
-
- * mdebugread.c (parse_symbol, psymtab_to_symtab_1): Clear
- allocated mips_extra_func_info, if the debug info is corrupt,
- the PDR to fill it in might be missing.
-
-Mon Mar 27 14:43:00 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * vx-share/regPacket.h: a new file interfacing with vxworks.
-
-Sun Mar 26 13:22:47 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.c (bpstat_do_actions): Once we've executed the
- commands, set bs->commands to NULL.
-
-Sat Mar 25 01:16:10 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * buildsym.c (patch_subfile_name): Update last_source_file
- with the real source file name.
- * dbxread.c (end_psymtab): Handle static functions in the
- SOFUN_ADDRESS_MAYBE_MISSING case by passing pst->filename
- to lookup_minimal_symbol.
- (process_one_symbol): Ignore extra outermost context from
- SunPRO cc and acc.
- * stabsread.c (define_symbol): Do not complain for SunPRO
- static variable encoding if STATIC_TRANSFORM_NAME is defined.
- * sparc-tdep.c, config/sparc/tm-sun4sol2.h
- (sunpro_static_transform_name): Renamed from
- solaris_static_transform_name.
- * config/sparc/tm-sun4os4.h (STATIC_TRANSFORM_NAME):
- Define to sunpro_static_transform_name for acc 3.0 compiled
- executables.
- * procfs.c, config/alpha/nm-osf2.h (PROCFS_DONT_TRACE_FAULTS):
- Renamed from PROCFS_DONT_TRACE_IFAULT, don't trace any faults
- if defined.
- * procfs.c (info_proc_siginfo): Cast sip->si_addr to
- `unsigned long' and use `lx' format for printing it.
-
-Fri Mar 24 15:45:42 1995 Stu Grossman (grossman@cygnus.com)
-
- * configure.in: Move test for m68*-est-* before m68*-*-coff*.
- * findvar.c: Move default def of CANNOT_STORE_REGISTER closer to
- the beginning of the code.
- * (write_register_gen): New routine. Analogous to
- read_register_gen.
- * (write_register_bytes): Another rewrite! Make it smarter about
- not updating regs with the same value.
- * monitor.c (printf_monitor readchar): Use stderr instead of
- stdout to output debug info. Also cleanup readchar a little.
- * (expect): Make sure that excessive responses are null
- terminated.
- * (monitor_open): Check for magic number in monitor_ops struct.
- Allow multiple commands as init strings. Also, clear all
- breakpoints.
- * (monitor_resume monitor_wait): Send a command to dump all the
- regs for those targets which don't do so when waking up after a
- continue command.
- * (monitor_wait): Handle excessive response output better.
- * (monitor_write_memory): Use block fill, word, and long word
- commands (if they exist) to write memory more efficiently.
- * General cleanups to use flag bits instead of individual flag
- words in monitor_ops struct.
- * (monitor_command): Return output from command.
- * (monitor_load_srec): Allocate buffer only once. Use alloca.
- Wait for load response string instead of using a timeout to start
- sending S-records. Fix bug where value of srec_frame shrinks. If
- hashmark is set, print `-' for retransmissions. General cleanups.
- * (monitor_make_srec): Get rid of S-record default type kludge.
- * monitor.h: Use seperate struct for memory and register
- read/write commands. Memory commands can come in byte, word,
- long, and longlong forms.
- * (monitor_ops): Change lots of fields. Generalize some stuff.
- Put all flags into flags word. Allow init to be a list of commands.
- Add command for clearing all breakpoints, block fill, dumping all
- registers.
- * remote-est.c: Rewrite to use new monitor conventions.
- * config/m68k/est.mt (TDEPFILES): Add monitor.o.
- * config/m68k/tm-est.h: Set NUM_REGS to 18.
- * testsuite/gdb.base/break.exp: Lots of cleanups. Use gdb_test
- more thoroughly.
-
-Thu Mar 23 23:20:00 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * somsolib.c (som_solib_add): Handle case where a shared library
- referenced by a core file has sections without the SEC_ALLOC bit
- set (eg stabs sections).
-
-Thu Mar 23 15:07:08 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * breakpoint.c (bpstat_do_actions): For each element in the bpstat
- chain, do all the commands regardless of whether they run the
- inferior.
-
-Wed Mar 22 19:17:06 1995 Doug Evans <dje@cygnus.com>
-
- * mem-break.c (LITTLE_BREAKPOINT, BIG_BREAKPOINT): Define as
- BREAKPOINT if mono-endian.
- (break_insn): Deleted.
- (big_break_insn, little_break_insn): Define.
- (memory_insert_breakpoint): Handle bi-endian cpus.
- (BREAKPOINT_LEN): Define.
- (memory_remove_breakpoint): Use it.
- (memory_breakpoint_size): Likewise.
-
-Tue Mar 21 17:03:17 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * sparc-stub.c: add nop after 'bg good_wim'.
- * sparcl-stub.c: ditto.
-
-Tue Mar 21 13:34:12 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c (handle_command): Don't print TARGET_SIGNAL_0,
- TARGET_SIGNAL_UNKNOWN, or TARGET_SIGNAL_DEFAULT.
-
-Mon Mar 20 10:09:59 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hppab-nat.c (store_inferior_registers): Sync with HPUX version.
-
-Mon Mar 20 07:34:48 1995 Stu Grossman (grossman@cygnus.com)
-
- * hppah-nat.c (store_inferior_registers): Move check for
- CANNOT_STORE_REGISTER to a better place. Fixes ptrace I/O errors
- found by test suite during function calls, which attempts to write
- unwritable registers.
-
-Sat Mar 18 02:02:24 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (parse_symbol): If finishing a function without
- known parameter type info, set that from parameter symbols.
- Remove commented-out add_param_to_type support.
-
-Thu Mar 16 16:38:03 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * xcoffread.c (process_linenos): Make sure filename we pass to
- start_subfile will cause deduce_language_from_filename to return
- the correct thing. Reindent function to GNU standards.
-
-Thu Mar 16 15:54:00 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * nlm/gdbserve.c (handle_exception): #if out call to StopBell,
- as it is not available on NetWare 3 or PIN.
- * nlm/ppc.c (StopBell): Removed.
-
-Thu Mar 16 12:14:41 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * xcoffread.c (read_xcoff_symtab): When creating a dummy parameter
- inferred from the traceback tags, give its type the name
- "<non-float parameter>".
-
- * stabsread.c (rs6000_builtin_type): Recognize types -31 to -34.
-
-Wed Mar 15 15:09:29 1995 Stu Grossman (grossman@cygnus.com)
-
- * findvar.c (read_register_bytes write_register_bytes): Make
- these routines much smarter about updating registers from the
- target, only doing so when absolutely necessary. This really
- speeds up register modification on some remote targets.
-
- * monitor.c: More cleanups. Get rid of monitor_load_ascii_srec.
- BFD makes this unnecessary. Lots of debugging speedups.
- * (expect): NULL terminate return string.
- * (monitor_open monitor_supply_register parse_register_dump
- monitor_wait monitor_fetch_register): Switch to using GNU regexp
- library to parse multi-register displays.
- * (monitor_read_memory): Read multiple bytes (up to 16) at once.
- * (monitor_create_inferior): Call clear_proceed_status to make run
- command notice first breakpoint.
- * (monitor_load): Clean up. Reset inferior_pid, set pc to start
- address and reset symbol table stuff to make loads put things into
- a fresh state.
- * (monitor_load_srec): Lower sleep time to 1 second.
-
- * monitor.h (struct monitor_ops): Add register_pattern and
- supply_register to monitor_ops.
-
- * rom68k-rom.c: Add new support for handling register dumps.
- * config/m68k/tm-m68k.h: Define D0_REGNUM and A0_REGNUM for register
- dump handling.
-
-Wed Mar 15 15:18:27 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * utils.c, defs.h (putchar_unfiltered, fputc_unfiltered): Make
- argument be an int, not a char. Using a prototype followed by an
- old-style function definition in a case where an argument is
- widened is a GCC-ism not supported by the native AIX compiler.
-
-Wed Mar 15 12:22:35 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * nlmstub.def: Removed, this was moved to nlm/gdbserve.def
- long ago.
-
- * configure.in (alpha-*-netware*): Removed configuration.
- * config/alpha/{alpha-nw.mt, gdbserve.mt, tm-alphanw.h}: Removed.
- * nlm/{README-ALPHA-NETWARE, aio.h, alpha-io.S, alpha-regdef.h,
- alpha.c, alpha.h, altdebug.h}: Removed.
-
- * nlm/gdbserve.c (main): Add support for processing BOARD=
- argument, deprecate NODE=.
-
-Wed Mar 15 10:58:26 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * c-exp.y (yylex): Make an empty character constant an error.
-
-Tue Mar 14 15:00:54 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * valops.c (value_arg_coerce): Do possible value_coerce_array
- before determining type argument to value_cast.
-
-Tue Mar 14 10:41:41 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * remote-es.c: Replace ignore with 0.
-
-Tue Mar 14 05:52:36 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * valops.c (value_repeat), eval.c (evaluate_subexp_standard):
- If VALUE_REPEATED is already set, just error out.
-
- * valops.c (value_cast, value_slice), parse.c (follow_types): Add
- FIXME-type-allocation comments.
-
- * gdbtypes.h (struct type): Fix comment about what units the
- TYPE_LENGTH is in.
-
-Mon Mar 13 18:27:25 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * ch-valprint.c (annotate.h): Include.
- * eval.c (evaluate_subexp_standard): Remove unused variable.
- (calc_f77_array_dims): Add parens to expression.
- * f-exp.y (yylex): Add parens to expression, remove unused label.
- * f-lang.h (calc_f77_array_dims): Declare.
- * f-valprint.c (f_val_print): Remove unused variables.
-
-Mon Mar 13 15:25:47 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * alpha-tdep.c (find_proc_desc): If pdr.framereg field is -1, don't
- use the PDR, just examine prologues instead.
-
-Fri Mar 10 16:13:18 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * config/arc/tm-arc.h: Change arc register names.
-
-Fri Mar 10 02:49:40 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- Fix problems with infinite recursion when printing a class
- that contains a static instance of the class.
- * cp-valprint.c (dont_print_vb_obstack): Renamed from
- dont_print_obstack, made static.
- (dont_print_statmem_obstack): New obstack, controls printing
- of static member classes.
- (_initialize_cp_valprint): Initialize it.
- (cp_print_static_field): New function, handles printing of
- static members.
- (cp_print_value_fields): New parameter dont_print_statmem to
- handle recursive printing of static member classes, use
- cp_print_static_field to handle printing of static members.
- * c-valprint.c (cp_print_value_fields): Update prototype and
- call to include additional dont_print_statmem parameter.
- * c-valprint.c, f-valprint.c (dont_print_obstack): Remove unused
- extern declaration.
-
- * alpha-tdep.c, findvar.c, infptrace.c: Include <string.h>.
-
- * config/alpha/tm-alpha.h (FRAME_FIND_SAVED_REGS): Call
- alpha_find_saved_regs if fi->saved_regs is still NULL.
-
- * elfread.c (elf_symtab_read): Ensure that the filename field
- of a minsym is nonempty. Ignore solib trampoline symbols from
- the main symbol table, they might have a bogus value.
-
- * procfs.c (set_proc_siginfo), config/alpha/alpha-osf2.mh:
- Fix typos in comments.
-
-Thu Mar 9 17:19:47 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * mdebugread.c (parse_symbol, psymtab_to_symtab_1): Initialize
- pdr.framereg field of MIPS_EFI_SYMBOL_NAME symbol to -1. That way
- we know whether the PDR ever got set.
- * mips-tdep.c (find_proc_desc): If pdr.framereg field is -1, don't
- use the PDR, just examine prologues instead.
-
-Wed Mar 8 23:35:10 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * somsolib.c (som_solib_section_offsets): Get offset of text
- section right.
-
-Wed Mar 8 16:12:21 1995 Stu Grossman (grossman@cygnus.com)
-
-
- * source.c (forward_search_command reverse_search_command): Set
- convenience variable $_ to be the line # of the match.
- * symtab.c (decode_line_1): Allow convenience variables to be
- used in line specs (for breakpoints and such).
-
-Wed Mar 8 12:51:00 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * Makefile.in (VERSION): Bump to 4.14.1.
- * NEWS, README: Update for 4.14.
- * i386v-nat.c (i386_insert_aligned_watchpoint): Fix declaration.
- (i386_insert_nonaligned_watchpoint): Call aligned instead of
- generic watchpoint insertion.
-
-Tue Mar 7 19:26:10 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * valops.c (value_slice): Do COERCE_VARYING_ARRAY.
-
-Tue Mar 7 00:23:47 1995 Stu Grossman (grossman@cygnus.com)
-
- * monitor.c, array-rom.c, monitor.h, rom68k-rom.c: Move target_ops
- into monitor.c.
- * monitor.c (monitor_create_inferior): Allow run command to start
- program.
-
- * monitor.c (monitor_load): Set PC to start address when done
- loading.
-
- * array-rom.c, monitor.h, rom68k-rom.c: Clean up target_ops.
- Remove ref to monitor_create_inferior.
-
- * monitor.c: More general cleanups. Add prototypes, remove
- unused routines. Fix bug with wrong number of args to error().
-
- * main.c (main): Don't start up GUI when running under gdb mode
- in emacs.
-
- * Makefile.in: Add rules for monitor.o and rom68k-rom.o to make
- Sun make (with VPATH) work...
-
- * monitor.c, monitor.h, rom68k-rom.c: Serious cleanup to make IDP
- (rom68k) target work right.
- * array-rom.c, op50-rom.c, w89k-rom.c: Partial updates to new
- monitor.c interface. More work needs to be done here.
- * config/m68k/tm-monitor.h: Change DECR_PC_AFTER_BREAK to 0 to
- match the IDP monitor. Also, set NUM_REGS to 18 cuz there's no
- floating-point for this card.
-
- * serial.h, ser-go32.c, ser-mac.c, ser-tcp.c, ser-unix.c: Add
- SERIAL_SETSTOPBITS to set the number of stopbits (needed for IDP
- board?!?!?).
-
- * defs.h, utils.c, remote-hms.c, remote-pa.c, remote.c: Fix defs
- and usage of fputc_unfiltered and putchar_unfiltered. Eliminate
- putc_unfiltered (it's superfluous).
-
- * command.h, command.c, top.c: Add var_enum command type. It's
- like var_string but allows only only one of the specified strings.
-
-Mon Mar 6 15:03:59 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * valops.c (value_cast): Don't use backslash newline--pre-ANSI
- compilers (such as SunOS4 /bin/cc) don't generally support it
- except in some contexts.
-
-Fri Mar 3 17:42:48 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * valops.c (value_cast): Check for cast to array type *before*
- we coerce array to pointer (in case arg2 is already array).
-
- * valops.c (call_function_by_hand): Set using_gcc to 2 if using
- gcc2. Needed for REG_STRUCT_HAS_ADDR to work on sparc.
- Also check REG_STRUCT_HAS_ADDR for union, array and string types.
-
- * valops.c (call_function_by_hand): Re-arrange code for pushing
- paramaters on the stack so we can do better STACK_ALIGN.
-
- * valops.c (call_function_by_hand): Call error if the number
- of arguments is fewer than parameter types in function type.
-
-Fri Mar 3 17:13:05 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-tdep.c (sparc_extract_struct_value_address): Move
- sparc64 support to here.
- (sparc64_extract_struct_value_address): Deleted.
- (dump_ccreg): Add a prototype so long long arg -> int.
- * sparc/tm-sp64.h (USE_STRUCT_CONVENTION): Define.
- (EXTRACT_STRUCT_VALUE_ADDRESS): Delete.
-
-Fri Mar 3 15:12:12 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (hpread_record_lines): New argument "offset". All
- callers changed. Use it to handle dynamic address relocation.
- (hpread_build_psymtabs): Adjust texthigh as we read each function
- debug symbol. Fix computation of texthigh.
- (hpread_read_subrange_type): Work around macro bugs in HP's
- compilers.
- (hpread_process_one_debug_symbol): Correctly map source lines.
-
- * somread.c (check_strange_names): Filter names emitted by the HP
- compiler when generating PIC code.
-
- * valops.c (value_struct_elt_for_reference): Work around macro
- bugs in HP's compilers.
- * c-exp.y (block): Likewise.
-
-Fri Mar 3 12:27:28 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * rs6000-tdep.c (push_dummy_frame): Fix order of arguments to
- store_address.
-
- * utils.c [_AIX]: Include stddef.h instead of #defining size_t.
-
-Fri Mar 3 12:33:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000-tdep.c (skip_prologue): Skip multiple stores of the saved
- registers that GCC emits on the PowerPC by default in addition to
- the store multiple instruction used on the Power series.
-
-Fri Mar 3 00:54:58 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc-tdep.c (decode_asi): New function.
- (sparc_print_register_hook): Pretty print more v9 registers.
- * sparc/tm-sp64.h (REGISTER_NAMES): Fix some typos.
-
-Thu Mar 2 22:20:22 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * dwarfread.c (struct dieinfo): Use CORE_ADDR for at_{low,high}_pc.
- (target_to_host): Change result type to CORE_ADDR.
-
-Thu Mar 2 15:13:04 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * rs6000-tdep.c: Fix byte-swapping sins.
-
-Thu Mar 2 16:48:45 1995 Michael Meissner <meissner@cygnus.com>
-
- * rs6000-tdep.c (branch_dest): Minor code cleanup, don't share
- code between branch unconditional and branch conditional cases.
-
-Wed Mar 1 09:41:26 1995 Doug Evans <dje@canuck.cygnus.com>
-
- Various changes for sparc64.
- * sparc-tdep.c (NUM_SPARC_FPREGS): Define.
- (SPARC_INTREG_SIZE): Define.
- (*): Use SPARC_INTREG_SIZE instead of REGISTER_RAW_SIZE (intreg)
- where appropriate.
- (enum branch_type): New value `done_retry'.
- (isbranch): Renamed from isannulled. All callers changed.
- Support new sparc64 branch insns.
- (single_step): Handle done_retry.
- (sparc_extract_struct_value_address): Don't assume 4 byte regs.
- (get_saved_register): Likewise.
- (sparc_push_dummy_frame): Likewise.
- (sparc_frame_find_saved_regs): Likewise.
- (sparc_pop_frame): Likewise. Don't refer to FPS_REGNUM, CPS_REGNUM,
- or PS_REGNUM if not sparc64. sparc64 has 64 fp regs.
- (sparc64_extract_struct_value_address): New function.
- (dump_ccreg, sparc_print_register_hook): Likewise.
- * sp64-tdep.c: Deleted.
- * sparc/tm-sp64.h (GDB_TARGET_IS_SPARC64): Define.
- (NUM_REGS): Reduce by 2, cle/tle are in the pstate reg.
- (CC_HAS_LONG_LONG): Define.
- (REGISTER_NAMES): Delete cle/tle and reorganize.
- (PS_REGNUM, FPS_REGNUM, CPS_REGNUM): Delete, they're ifdef'd out of
- sparc-tdep.c now.
- (REGISTER_BYTES): Update.
- (REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW): Delete.
- (EXTRACT_RETURN_VALUE): Delete. Use definition in tm-sparc.h.
- (NO_SINGLE_STEP): Likewise.
- * sparc/tm-sparc.h (EXTRACT_VALUE_RETURN): Don't assume 4 byte regs.
- * sparc/sp64.mt: Move simulator support ...
- * sparc/sp64sim.mt: ... to here.
-
-Wed Mar 1 13:14:42 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * remote-vx960.c: new file for target specific register packaging.
- * remote-vx68.c: ditto.
- * config/i960/vxworks960.mt: add remote-vx960.o.
- * config/m68k/vxworks68.mt: add remote-vx68.o.
-
-Wed Mar 1 13:42:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * remote.c (remote_wait): Make calls to strtol be type correct by
- passing the address of a char * pointer instead of an unsigned
- char *.
-
- * rs6000-tdep.c (push_dummy_frame): Cast sp to char * when calling
- write_memory to make things type correct.
-
-Wed Mar 1 12:17:31 1995 Michael Meissner <meissner@cygnus.com>
-
- * ch-exp.y, c-exp.y, f-exp.y, m2-exp.y (yy defines): Support the
- standard Linux yacc by adding more names to be redefined with a
- prefix.
-
-Tue Feb 28 22:55:47 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * hppa-tdep.c (pa_print_registers), monitor.c: Use
- extract_unsigned_integer and friends, not SWAP_TARGET_AND_HOST.
- * defs.h, findvar.c: Move SWAP_TARGET_AND_HOST back to findvar.c.
- Rename it to SWAP_FLOATING to make it clear it is no longer for
- integers.
-
-Tue Feb 28 14:38:39 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * defs.h (SWAP_TARGET_AND_HOST): check endianess at runtime not
- compile time.
- * arc-tdep.c (_initialize_arc_tdep): set tm_print_insn according to
- processor.
-
- * vx-share/ptrace.h: merge in WRS new ptrace requests.
-
- * defs.h: fix a syntax error.
-
- * a29k-tdep.c (get_longjmp_target): add this function, from WRS.
- * remote-vx.c: move read_register and write_register out to
- target specific files.
- * remote-vx29k.c (get_fp_contnets): add this function, from WRS.
-
- * defs.h: define SWAP_TARGET_AND_HOST macro.
- * findvar.c, monitor.c, hppa-tdep.c: remove definition of
- SWAP_TARGET_AND_HOST.
-
-Tue Feb 28 08:31:40 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * alpha-tdep.c (find_proc_desc): Only attempt to set
- PROC_LOCALOFF (found_heuristic) if found_heuristic is non-NULL.
-
-Mon Feb 27 11:56:32 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * monitor.c: General gcc -Wall lint cleanup and reformat.
- (monitor_command): If no args, send an empty command.
-
-Thu Feb 23 21:07:25 1995 Stu Grossman (grossman@cygnus.com)
-
- * monitor.c (monitor_load_ascii_srec): Add a one second sleep
- after send LOAD_CMD to prevent loss of first S-record.
-
-Tue Feb 21 20:48:42 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * valops.c (call_function_by_hand): Set using_gcc to 2 if gcc-2.
- Call error if too few arguments.
- If REG_STRUCT_HAS_ADDR (structs passed by invisible reference),
- copy and convert to reference *before* we calculate alignment.
- Also, make sure structs allocated for return values and invisible
- reference don't violate STACK_ALIGN.
-
-Tue Feb 21 23:29:59 1995 Per Bothner <bothner@rtl.cygnus.com>
-
- * ch-exp.y (expression_conversion): Recognize 'ARRAY () TYPE (EXPR)'
- (same as C's '(TYPE[])EXPR')
-
-Tue Feb 21 11:47:26 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * top.c (print_gdb_version): Update the year.
-
-Sun Feb 19 14:31:57 1995 Jim Kingdon <kingdon@rtl.cygnus.com>
-
- * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Look for newlib in
- `..' not in `../..'.
-
-Sun Feb 19 11:05:28 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * procfs.c (unconditionally_kill_inferior): Don't issue a PIOCKILL
- in addition to a PIOCSSIG to kill the inferior.
-
-Thu Feb 16 15:06:12 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * parse.c (follow_types): Given (TYPE[]) (i.e. with no length),
- create a 0-length array type, and set BOUND_CANNOT_BE_DETERMINED.
- * valops.c (value_cast): If a cast like (TYPE[])VALUE (i.e. array
- of unknown length) use sizeof(VALUE)/sizeof(TYPE) as the length.
- * c-typeprint.c (c_type_print_varspec_suffix): If array length
- is 0, print it, but not if upper_bound is BOUND_CANNOT_BE_DETERMINED.
-
-Thu Feb 16 16:06:50 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * dcache.c (insque, remque): Rewrite Linux support.
-
-Wed Feb 15 12:33:20 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/powerpc/tm-ppc-eabi.h (TEXT_SEGMENT_BASE): Define as 1.
-
- * dcache.c (insque, remque): If compiling in standard C on Linux,
- protect insque and remque with macros to cast the pointer
- arguments to the proper type.
-
-Tue Feb 14 17:16:41 1995 Stu Grossman (grossman@cygnus.com)
-
- * annotate.c, breakpoint.c, defs.h, top.c: Replace
- enable/disable_breakpoint_hook with modify_breakpoint_hook.
-
-Tue Feb 14 16:58:07 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * expression.h: Move declaration of evaluate_subexp_with_coercion
- from here...
- * value.h: ...to here.
- * expression.h: Don't include value.h
-
-Tue Feb 14 11:46:07 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * expression.h: Move include of value.h until after declaration of
- enum exp_opcode.
-
-Sun Feb 12 13:47:30 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-e7000.c: Comprehensive cleanup; removal of dead code,
- simplify code, declare things, format to standards.
- (inferior.h, value.h, command.h, remote-utils.h): Include.
- (e7000_login): Rename to e7000_login_command.
- (e7000_ftp): Rename to e7000_ftp_command.
- (e7000_drain): Rename to e7000_drain_command.
-
- * irix5-nat.c (string.h): Include near beginning of file.
-
-Sun Feb 12 12:36:38 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * valops.c (value_arg_coerce): Use VALUE_TYPE not SYMBOL_TYPE on
- arg, it is a value not a symbol.
-
- gcc -Wall lint:
- * eval.c: Move declaration of evaluate_subexp_with_coercion from here..
- * expression.h: ..to here.
- * expression.h: Include value.h.
- * ch-lang.c (evaluate_subexp_chill): Add default case in switch.
-
-Sun Feb 12 11:03:47 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * language.h (struct language_defn): New field evaluate_exp.
- * c-lang.c (c_language_defn, cplus_language_defn, asm_langauge_defn),
- f-lang.c (f_language_defn), language.c (unknown_language_defn,
- auto_language_defn, local_language_defn), m2-lang.c (m2_language_defn):
- Set evaluate_exp to evaluate_subexp_standard.
- * ch-lang.c (evaluate_subexp_chill): New function. Chill-specific
- support for MULTI_SUBSCRIPT.
- (chill_language_defn): Set evaluate_exp to evaluate_subexp_chill.
- * eval.c (enum noside): Move from here ....
- * expression.h (enum noside): ... to here.
- (evaluate_subexp_standard): New prototype.
- * eval.c (evaluate_subexp): Renamed to evaluate_subexp_standard.
- Removed lo-longer-needed test for chill_varying_type.
- (evaluate_subexp): New. Calls exp->language_defn->evaluate_exp.
-
- * ch-exp.y (maybe_expression_list): New non-terminal.
- (primitive_value): Allow empty parameter list.
-
-Sun Feb 12 10:02:16 1995 Per Bothner <bothner@cygnus.com>
-
- * buildsym.c (finish_block): If finishing a function without known
- parameter type info, set that from parameter symbols.
- * c-typeprint.c (c_type_print_varspec_suffix): For TYPE_CODE_FUNC,
- print parameter types, if available.
- * ch-typeprint.c (chill_type_print_base): Likewise.
-
- * gdbtypes.h (struct type): Remove function type field.
- (TYPE_FUNCTION_TYPE): Remove macro. We can't as simply re-use
- function types now that we're also storing parameter types.
- And the payoff is much less.
- * gdbtypes.c (make_function_type): Don't use/set TYPE_FUNCTION_TYPE.
- (recursive_dump_type): Don't print TYPE_FUNCTION_TYPE.
- * dwarfread.c (read_subroutine_type): Don't set TYPE_FUNCTION_TYPE.
-
- * valops.c (value_arg_coerce): Now takes param_type argument.
- (call_function_by_hand): Convert arguments with value_arg_coerce
- early, and overwrite original args with converted args.
- No longer need multiple calls to value_arg_coerce.
- (value_arg_push): Removed.
- * hppa-tdep.c (hppa_push_arguments): No longer call value_arg_coerce.
- * mips-tdep.c (mips_push_arguments): Likewise.
- * alpha-tdep.c (alpha_push_arguments): Likewise.
- * rs6000-tdep.c (push_arguments, ran_out_of_registers_for_arguments):
- Likewise.
- * value.h (value_arg_coerce): Remove declaration. (It's now static.)
-
- * valops.c (value_cast): Do COERCE_VARYING_ARRAY after COERCE_REF.
-
- * symtab.c (add_param_to_type): Remove (commented-out) function,
- since that functionality has been re-written.
- * coffread.c: Remove commented-out add_param_to_type support.
- * mdebugread.c (parse_symbol): Likewise.
- * stabsread.c (define_symbol): Likewise.
-
-Sun Feb 12 09:03:47 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * buildsym.c (start_subfile): Set language for f2c like for cfront.
-
-Thu Feb 9 20:20:11 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * op50n-rom.c: Add the control registers.
-
-Thu Feb 9 15:46:39 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * Makefile.in (CLIBS): Add $(LIBIBERTY) before, in addition to
- after, any host/target/native libraries.
- * dcache.c (insque, remque): Remove declarations.
- * gdbtypes.h (type_code): Remove trailing comma.
-
- From Peter Schauer:
- * xcoffread.c (read_xcoff_symtab) [C_HIDEXT]: Move #ifdef
- STATIC_NODEBUG_VARS inside case.
-
-Thu Feb 9 07:43:41 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * config/sparc/tm-sun4sol2.h: Define STATIC_TRANSFORM_NAME.
- * partial-stab.h: Call it.
- * stabsread.c (define_symbol) [STATIC_TRANSFORM_NAME]: Call
- STATIC_TRANSFORM_NAME to get the name and use minimal symbols to
- get the address.
- * sparc-tdep.c (solaris_static_transform_name): New function.
-
-Thu Feb 9 12:09:09 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * somread.c (som_symtab_read): Handle dynamic relocation for both
- text and data symbols.
- (som_symfile_offsets): If objfile is a shared library, then get
- text and data offsets from the shared library structures.
- * somsolib.c (som_solib_add): Copy the bfd pointer from the
- objfile rather than reopening the file again.
- (som_solib_section_offsets): New function.
- * somsolib.h (som_solib_section_offsets): Declare.
-
-Wed Feb 8 20:32:18 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * config/sparc/tm-sun4sol2.h, dbxread.c: Rename
- N_SO_ADDRESS_MAYBE_MISSING to SOFUN_ADDRESS_MAYBE_MISSING.
- * symtab.h (minimal_symbol) [SOFUN_ADDRESS_MAYBE_MISSING]: Add
- filename field.
- * elfread.c (record_minimal_symbol_and_info),
- minsyms.c, symtab.h (prim_record_minimal_symbol_and_info): Return
- newly created symbol.
- * elfread.c (elf_symtab_read) [SOFUN_ADDRESS_MAYBE_MISSING]:
- Set filename field of minimal symbol.
- * symmisc.c (dump_msymbols) [SOFUN_ADDRESS_MAYBE_MISSING]:
- Print filename field.
- * minsyms.c, symtab.h (lookup_minimal_symbol): New arg sfile.
- * symm-tdep.c, somsolib.c, hppa-tdep.c, c-exp.y, f-exp.y,
- m2-exp.y, nindy-tdep.c, m3-nat.c, irix5-nat.c, hpread.c,
- os9kread.c, breakpoint.c, alpha-tdep.c, valops.c, symtab.c,
- printcmd.c, dbxread.c: Change callers to pass NULL for sfile.
- * dbxread.c (process_one_symbol) [SOFUN_ADDRESS_MAYBE_MISSING]:
- Find address of function from minimal symbols.
- * partial-stab.h, case 'f', 'F': Call find_stab_function_addr
- instead of getting pst->textlow from the stab.
- * minsyms.c (find_stab_function_addr): New function.
-
-Wed Feb 8 19:19:56 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * monitor.c: Fix so all the output shows up in the GUI command
- window.
-
-Mon Feb 6 18:50:59 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * i386-tdep.c (_initialize_i386_tdep): Put void decl on separate
- line, so init.c generation works correctly.
- * arc-tdep.c (_initialize_arc_tdep): Ditto.
-
-Mon Feb 6 14:44:36 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * config/mips/idt.mt: Add support for the lsi33k target.
- * config/sparc/sun4sol2.mh: Add support for ser-tcp.
- * array-rom.c: Finish the rest of the support commands needed by
- GDB.
- * mips-tdep.c: Add LSI33k register names and processor type.
-
-Sat Feb 4 13:29:52 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/m68k/est.mt (TDEPFILES): Remove m68k-pinsn.o.
-
-Fri Feb 3 11:19:20 1995 Stu Grossman (grossman@cygnus.com)
-
- * core.c (dis_asm_read_memory), defs.h, top.c: Get rid of
- dis_asm_read_memory_hook. We can now call the disassemblers
- directly and have no need for this hook anymore.
- * defs.h, printcmd.c: Make print_insn be static.
-
- * ser-go32.c (dos_comisr): Make this 8 bit clean.
- * (dos_open dos_close): Allow multiple opens to the same device.
- Use a ref count to prevent unwanted deallocations.
- * sparcl-tdep.c: Put #ifdefs around all socket stuff to make GO32
- happy.
- * (sparclite_ops): Switch to download_stratum.
- * target.h (enum strata): Move download_stratum before
- process_stratum so that executable targets get pushed on top of
- download targets.
-
-Thu Feb 2 19:02:45 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * array-rom.c: Remove the non GDB remote protocol config stuff.
-
- * monitor.c: All reading/writing functions for memory and
- registers work.
-
-Thu Feb 2 16:11:04 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * config/arc/arc.mt: new target makefile for arc processor.
- * config/arc/tm-arc.h: new target header for arc processor.
- * config/arc/go32.mh: new go32 host makefile for arc processor.
- * config/arc/xm-go32.h: new go32 host header for arc processor.
- * arc-tdep.c: new target dependent codes for arc processor.
-
-Thu Feb 2 13:58:40 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * Makefile.in (VERSION): Bump to 4.13.2.
-
-Thu Feb 2 07:27:56 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- Fix compiler warnings:
- * remote-e7000.c (printf_e7000debug): Rename to puts_e7000debug
- and have the caller do the sprintf. Saves us from varargs hell.
- (normal): Define before use.
- * remote-e7000.c: Reindent a few things.
-
-Wed Feb 1 21:16:42 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * f-typeprint.c (f_type_print_varspec_suffix): Print array index
- ranges in reverse order.
- * f-valprint.c (f77_create_arrayprint_offset_tbl): Fix calculation.
-
- * eval.c (evaluate_subscript): Don't call value_subscript, since
- it adjusts for lower bound and enforces ranges.
-
- * expression.h (exp_code): Remove MULTI_F77_SUBSCRIPT, OP_F77_SUBSTR.
- * eval.c, parse.c: Removed uses of removed opcodes.
- * eval.c (evaluate_subexp): Clean up handling of
- OP_UNDETERMINED_ARGLIST (no backtracking, more general).
-
- * f-valprint.c (f_val_print): Print TYPE_CODE_STRING using
- LA_PRINT_STRING, and not val_print_string (which reads from inferior).
-
- * ch-lang.c (chill_is_varying_struct), ch-lang.h: Remve function
- duplicate function made redundant by chill_varying_type.
-
- Re-write of f77 string and complex number support:
-
- * language.h (struct language_defn): New fields string_lower_bound
- and string_char_type.
- * c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn),
- language.c (unknown_language_defn, auto_language_defn,
- local_language_defn), m2-lang.c (m2_language_defn), f-lang.c
- (f_language_defn), ch-lang.c (chill_language_defn): Set new fields.
- * gdbtypes.c (create_string_type): Use new string_char_type field.
- * valops.c (value_string): Use new string_lower_bound field.
-
- * defs.h (TARGET_COMPLEX_BIT, TARGET_DOUBLE_COMPLEX_BIT): Removed.
- * f-lang.c (f_create_fundamental_type, _initialize_f_language),
- m2-lang.c (m2_create_fundamental_type),
- gdbtypes.c (_initialize_gdbtypes): Set TYPE_TARGET_TYPE of complex
- types. Set their TYPE_CODEs to TYPE_CODE_COMPLEX.
- * mdebugread.c (mdebug_type_complex, mdebug_type_double_complex):
- Removed. Use builtin_type_complex and builtin_type_double_complex.
-
- * gdbtypes.h (enum type_code): Removed TYPE_CODE_LITERAL_STRING
- and TYPE_CODE_LITERAL_COMPLEX.
- * c-typeprint.c, f-typeprint.c, f-valprint.c, eval.c: Removed uses of
- TYPE_CODE_LITERAL_STRING and TYPE_CODE_LITERAL_COMPLEX.
- * gdbtypes.c, gdbtypes.h (f77_create_literal_complex_type,
- f77_create_literal_string_type): Removed.
- * value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_MEMADDR,
- VALUE_SUBSTRING_MYADDR): Removed.
-
- * expression.h (enum exp_opcode): Rename OP_F77_LITERAL_COMPLEX to
- OP_COMPLEX.
- * parse.c: Update accordingly.
-
- * f-valprint.c (f77_print_cmplx): Removed.
- (f_val_print case TYPE_CODE_COMPLEX): Re-write to use print_floating.
-
- * f-exp.y (STRING_LITERAL): Use OP_STRING instead of OP_ARRAY.
- * eval.c (evaluate_subexp): For case OP_ARRAY, don't call
- f77_value_literal_string.
- * valops.c, value.h (f77_value_literal_string, f77_value_substring,
- f77_assign_from_literal_string, f77_assign_from_literal_complex):
- Removed.
- (value_assign): No longer need to handle literal types.
- * valops.c (f77_value_literal_complex), value.h: Re-written and
- renamed to value_literal_complex. Last arg is now a (complex) type.
- * valops.c (f77_cast_into_complex): Re-written and renamed to
- cast_into_complex.
- * eval.c (evaluate_subexp): Update accordingly.
-
- * ch-valprint.c (chill_val_print): On TYPE_CODE_STRING, don't
- print address for non-'s'-formats.
- * ch-typeprint.c, ch-valprint.c: Use chill_varying_type instead
- of chill_is_varying_struct.
-
-Wed Feb 1 13:27:33 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- gcc -Wall lint.
- * alpha-tdep.c (alpha_in_lenient_prologue): Comment out.
- (after_prologue): Remove unused local b.
- * procfs.c (thread.h): Include.
- (pr_flag_table, pr_why_table, faults_table, siginfo_table): Use
- nested braces in initializer.
- * top.c (initialize_targets, initialize_utils): Declare.
- (locate_arg, insert_args): Add parens around tested assignments.
- * remote-utils.c (sr_scan_args): Remove decl of strtol.
- * remote.c (thread.h): Include.
- (remote_wait): Remove unused local p2.
- * sparc-tdep.c (fill_gregset, fill_fpregset): Remove decls of
- registers array.
-
- defs.h (stdlib.h): Include.
- (exit, perror, atoi, qsort, memcpy, memcmp): Don't declare.
- (fclose, atof, malloc, realloc, free, strchr, strrchr, strstr,
- strtok, strerror): Don't specify parameter types in declaration.
-
-Wed Feb 1 12:23:57 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * ch-exp.y (value_string_element, string_primitive_value,
- start_element, left_element, right_element, slice_size,
- lower_element, upper_element, first_element): Removed.
- (value_string_slice, value_array_slice): Replaced by ...
- (slice): New non-terminal, with working slice support.
- (primitive_value_lparen, rparen): New non-terminals.
- (maybe_tuple_elements): New non-terminal, to allow empty tuples.
- (idtokentab): Added "up".
-
- * value.h (COERCE_VARYING_ARRAY): New macro.
- * valarith.c (value_subscript): Use it.
- * valops.c (value_cast): Likewise. Also, do nothing if already
- correct type, and allow converting from/to range to/from scalar.
-
- * valops.c, value.h (varying_to_slice, value_slice): New functions.
- * eval.c (OP_ARRAY): Add cast for array element.
- * expression.h (TERNOP_SLICE, TERNOP_SLICE_COUNT): New exp_opcodes.
- * valops.c (chill_varying_type): Moved function frp, here ...
- * gdbtypes.c (chill_varying_type), gdbtypes.h: ... to here.
- * parse.c (length_of_subexp, prefixify_subexp): Add support
- for TERNOP_SLICE, TERNOP_SLICE_COUNT.
- * expprint.c (print_subexp, dump_expression): Likewise.
- * eval.c (evaluate_subexp): Likewise.
-
- * eval.c (evaluate_subexp case MULTI_SUBSCRIPT): Don't call
- value_x_binop on a Chill varying string.
-
-Tue Jan 31 13:51:53 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config/m68k/monitor.mt,
- config/pa/{hppabsd.mt,hppahpux.mt,hppaosf.mt,hppapro.mt}: Put
- depfiles in TDEPFILES not REMOTE_O.
-
-Tue Jan 31 11:14:44 1995 Steve Chamberlain <sac@splat>
-
- From nigel@algor.co.uk.
- * ser-go32.c (dos_close): Don't crash if scb null.
- (dos_sendbreak): New function.
- (dos_ops): Point to dos_sendbreak.
- (dos_info): Calculate COM number correctly.
-
-Tue Jan 31 09:40:11 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * xcoffread.c (process_xcoff_symbol): Use new variables
- func_symbol_type and var_symbol_type as type of functions and
- variables which don't have any stabs associated with them.
- Reindent most of function.
- (_initialize_xcoffread): Initialize *_symbol_type.
-
- * xcoffread.c (read_xcoff_symtab): Reindent most of function.
- Put C_HIDEXT symbols in the minimal symbols, rather than ignoring
- them (this part commented out as I didn't quite get it to work).
- (cs_to_section, find_targ_sec): New functions, to support above code.
- * xcoffread.c (RECORD_MINIMAL_SYMBOL): Only skip '.' if it is
- actually present.
-
-Mon Jan 30 17:34:24 1995 Stu Grossman (grossman@cygnus.com)
- * sparcl-tdep.c: Add `sparclite' target for doing serial and udp
- downloads to SPARClite demo boards.
-
-Sun Jan 29 09:43:22 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * remote.c, remote-pa.c: Remove #if 0'd icache code. It has had
- no hope of working as is for a long time (in particular, shebs' 27
- Jan 95 change confuses the issue further--target_read_memory and
- xfer_core_file do *not* do the same thing in this context).
- Revise comment.
-
-Sat Jan 28 13:40:46 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * elfread.c (elf_symtab_read): Do not test BSF_GLOBAL for
- procedure linkage table symbols, it is no longer set due to the
- Jan 6 BFD change in bfd/elfcode.h.
-
-Fri Jan 27 17:08:06 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * top.c (use_windows): Clarify comments.
-
- * convex-tdep.c (xfer_core_file): Comment out.
- * config/convex/tm-convex.h (XFER_CORE_FILE): Remove.
- * remote.c, remote-pa.c (remote_fetch_word): Change xfer_core_file
- references to target_read_memory.
- * gdbcore.h (xfer_core_file, core_open, core_detach): Remove
- declarations.
- * corelow.c (core_open, core_detach): Make static.
-
- * arm-tdep.c: Make it compile.
- (exec_file_command, xfer_core_file): Comment out.
- (arm_print_insn): Remove, now in libopcodes.
- (skip_prologue): Comment out most of body.
- (arm_frame_find_saved_regs): Move here from tm-arm.h.
- (_initialize_arm_tdep): Set tm_print_insn.
- * config/arm/tm-arm.h: Remove old refs to first_object_file_end.
- (XFER_CORE_FILE): Remove.
- (FRAME_FIND_SAVED_REGS): Call arm_frame_find_saved_regs.
-
-Fri Jan 27 08:48:28 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (CHILL_LIB): Define as in testsuite/Makefile.in.
-
-Thu Jan 26 18:24:41 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * symtab.c (find_pc_line): When subtracting one to get a line
- number, make sure not to end up with zero.
-
- * remote-vx.c: Revert all of Kung's changes of 16 Jan. The
- problems with those changes were (a) the file didn't compile, (b)
- they changed memset to bzero--memset is correct, (c) they took out
- code to deal with boards lacking floating point, (d) who knows
- what I didn't discover in a quick read.
-
-Thu Jan 26 17:32:54 1995 Stu Grossman (grossman@cygnus.com)
-
- * sparcl-tdep.c: Clean up formatting and indentation.
-
-Thu Jan 26 10:49:59 1995 Steve Chamberlain <sac@splat>
-
- * remote-hms.c (hms_ops): Change ref of hr_load_image
- to gr_load_image.
- (dcache_flush, dcache_hit, dcache_value, dcache_fetch,
- dcache_poke, dcache_init): Deleted.
- (hms_open, hms_resume, hms_fetch_word, hms_store_word):
- Use dcache routines provided by remote-util.h
-
-Thu Jan 26 12:08:31 1995 Michael Meissner <meissner@cygnus.com>
-
- * configure.in: Add support for powerpc-*-eabi.
-
- * powerpc/tm-ppc-eabi.h, powerpc/pcc-eabi.mt: New files for
- PowerPC support.
-
-Wed Jan 25 18:13:14 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * language.h (struct language_defn): New field c_style_arrays.
- * language.c (unknown_language_defn, auto_language_defn,
- local_language_defn), c-lang.c (c_language_defn, cplus_language_defn,
- asm_language_defn): Set c_style_arrays to true.
- * m2-lang.c (m2_language_defn), ch-lang.c (chill_language_defn),
- f-lang.c (f_language_defn): Set c_style_arrays to false.
- * valops.c (value_string): If c_style_array is not set,
- allocate string in gdb (not inferior) using allocate_value.
-
- * value.h (COERCE_ARRAY), valops.c (value_addr, value_arg_coerce):
- Only call value_coerce_array if current_language->c_style_arrays.
- * values.c: Add #include "language.h". (Needed for COERCE_ARRAY.)
-
- * valops.c (chill_varying_type): New predicate.
- * valops.c (value_cast): Support assigning a fixed string or array
- to a variable string/array structure.
-
- * valarith.c (value_subscripted_rvalue): Extra parameter lowerbound.
- Check index>=lowerbound, and then add lowerbound to index here,
- instead of in caller. Generalize to arbitrary lval_types.
- (value_subscript): Use enhanced value_subscripted_rvalue if
- c_style_arrays is false (and index is in range).
-
-
-Wed Jan 25 18:13:14 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * eval.c (evaluate_subexp case OP_ARRAY): Fix calls to memset:
- TYPE_LENGTH is length in bytes, not bits.
-
-Wed Jan 25 08:19:35 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * infrun.c (proceed): Flush stdout before resuming inferior.
- * infcmd.c (step_1), annotate.c (annotate_starting):
- Don't bother to flush here.
-
-Wed Jan 25 01:11:21 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hpread.c (hpread_process_one_debug_symbol): Fix lines garbled
- by an ill-advised global search and replace.
-
-Mon Jan 23 13:11:46 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- Add support for Chill bitstring literals (e.h. H'FF00').
- * ch-exp.y (match_bitstring_literal): Fix for proper endianness.
- * expprint.c (print_subexp): Don't call error on OP_BITSTRING,
- just print B'<unimlemented>'.
- * gdbtypes.c (create_set_type): Fix bug in length calculation.
- * valops.c, value.h (value_bitstring): New function.
- * eval.c (evaluate_subexp): Implement support for OP_BITSTRING.
-
- * ch-typeprint.c (chill_type_print_base): For TYPE_CODE_FUNC,
- check that return type is non-void, and print in proper Chill syntax.
-
-Mon Jan 23 12:20:34 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * Makefile.in: Remove references to remote-mon.c.
- * remote-mon.c: remove. Replaced by rom68k-rom.c.
- * rom68k-rom.c: Support for Rom68k monitor.
-
-Mon Jan 23 10:50:57 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in (CHILL_FOR_TARGET): Update -L argument to point to
- gcc/ch/runtime not chillrt, since that is where the chill runtime
- lives now.
-
-Mon Jan 23 00:06:57 1995 Steve Chamberlain <sac@splat>
-
- * remote-hms.c (hms_load): Delete.
- (target_ops): Use hr_load_image.
-
- * remote-e7000.c, remote-z8k.c, remote-nindy.c (target_ops):
- Define memory_insert/remove_breakpoint.
- * xm-go32.h: Remove redundant SIGs.
-
-Thu Jan 19 20:26:58 1995 Steve Chamberlain <sac@splat>
-
- * ser-go32.c: Rewritten by nigel@algor.co.uk.
-
-Fri Jan 20 15:23:55 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * expression.h (OP_LABELED): New operator, for Chill
- labeled structre tuples.
- * ch-exp.y (tuple_element, named_record_element, tuple_elements):
- New non-terminals, to handle labeled structure tuples.
- (tuple): Re-define using tuple_elements.
- * eval.c (evaluate_labeled_field_init): New function, to handle
- initialization of structure fields, possibly using OP_LABELED.
- (evaluate_subexp): Use it.
- * expprint.c (print_subexp case): For OP_ARRAY, use Chill syntax
- for Chill. Handled OP_LABELED.
- * parse.c (length_of_subexp, prefixify_subexp): Handle OP_LABELED.
-
- * eval.c (evaluate_subexp): Handle Chill Powerset tuples.
- * valarith.c (value_bit_index): Just treat bitstring as represented
- by an array of bytes. Alignment is handled by compiler.
-
-Wed Jan 18 19:00:29 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * h8300-tdep.c (gdb_print_insn_h8300): Fix typo (&info -> info).
- * sh-tdep.c (gdb_print_insn_sh): Ditto.
-
-Wed Jan 18 11:25:43 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * remote-os9k.c (rombug_open): Fix a bug in exception handling
- command.
- * remote-os9k.c (rombug_write_inferior_memory): reset buffer after
- write.
-
-Tue Jan 17 09:48:38 1995 Jim Kingdon <kingdon@lioth.cygnus.com>
-
- * parse.c (_initialize_parse): Improve wording of names of
- msym_*_symbol_type.
-
-Tue Jan 17 14:00:58 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * config/mips/tm-mips.h (enum mips_fpu_type): New enum.
- (mips_fpu): Change type to enum mips_fpu_type.
- (FIX_CALL_DUMMY): Handle mips_fpu == MIPS_FPU_SINGLE.
- * mips-tdep.c (mips_fpu): Change type to enum mips_fpu_type.
- Don't initialize.
- (mips_fpu_string): New static variable.
- (mips_push_dummy_frame): Handle mips_fpu == MIPS_FPU_SINGLE.
- (mips_pop_frame): Likewise.
- (mips_extract_return_value): Likewise.
- (mips_store_return_value): Likewise.
- (mips_set_fpu_command): New static function.
- (mips_show_fpu_command): New static function.
- (_initialize_mips_tdep): Change handling of set/show mipsfpu.
-
-Tue Jan 17 09:48:38 1995 Jim Kingdon <kingdon@lioth.cygnus.com>
-
- * a29k-tdep.c (gdb_print_insn_a29k): Fix typo (&info -> info).
-
- * parse.c (write_exp_msymbol): Use new variables
- msym_*_symbol_type as type of msymbol expression.
- (_initialize_parse): Initialize them.
-
-Mon Jan 16 18:11:03 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- General cleanup and simplication of disassembler interface.
- * a29k-pinsn.c, arm-pinsn.c, convex-pinsn.c, gould-pinsn.c,
- hppa-pinsn.c, i386-pinsn.c, i960-pinsn.c, m68k-pinsn.c,
- m88k-pinsn.c, mips-pinsn.c, ns32k-pinsn.c, pyr-pinsn.c,
- rs6000-pinsn.c, sparc-pinsn.c, tahoe-pinsn.c, vax-pinsn.c: Remove.
- * gould-tdep.c, ns32k-tdep.c, tahoe-tdep.c, vax-tdep.c: New files,
- had been -pinsn.c files.
- * Makefile.in (ALLDEPFILES): Remove removed files.
- (a29k-pinsn.o, arm-pinsn.o, convex-pinsn.o, gould-pinsn.o,
- hppa-pinsn.o, i386-pinsn.o, i960-pinsn.o, m68k-pinsn.o,
- m88k-pinsn.o, mips-pinsn.o, ns32k-pinsn.o, pyr-pinsn.o,
- rs6000-pinsn.o, sparc-pinsn.o, tahoe-pinsn.o, vax-pinsn.o):
- Remove compile actions.
- * arm-tdep.o, gould-tdep.o, ns32k-tdep.o, tahoe-tdep.o,
- vax-tdep.o: Add compile actions.
- * defs.h (tm_print_insn): New global.
- * a29k-tdep.c (gdb_print_insn_a29k): New function.
- (_initialize_a29k_tdep): Rename from _initialize_29k,
- set tm_print_insn.
- * alpha-tdep.c (print_insn): Remove.
- (_initialize_alpha_tdep): Set tm_print_insn.
- * arm-tdep.c (arm_print_insn): New function, was print_insn
- in arm-pinsn.c.
- * convex-tdep.c (convex_print_insn): New function, was print_insn
- in convex-pinsn.c.
- * h8300-tdep.c (print_insn): Remove.
- (gdb_print_insn_h8300): New function.
- (_initialize_h8300_tdep): New function.
- * h8500-tdep.c (print_insn): Remove.
- (_initialize_h8500_tdep): New function.
- * hppa-tdep.c (_initialize_hppa_tdep): Set tm_print_insn.
- * i386-tdep.c (_initialize_i386_tdep): New function.
- * i960-tdep.c (mem, next_insn): New functions, were in
- i960-pinsn.c.
- (_initialize_i960_tdep): Set tm_print_insn.
- * m68k-tdep.c (_initialize_m68k_tdep): New function.
- * m88k-tdep.c (_initialize_m88k_tdep): New function.
- * mips-tdep.c (gdb_print_insn_mips): New function.
- (_initialize_mips_tdep): Set tm_print_insn.
- * pyr-tdep.c (pyr_print_insn): New function, was print_insn
- in pyr-pinsn.c.
- * rs6000-tdep.c (_initialize_rs6000_tdep): New function.
- * sh-tdep.c (print_insn): Remove.
- (gdb_print_insn_sh): New function.
- (_initialize_sh_tdep): Set tm_print_insn.
- * sparc-tdep.c (_initialize_sparc_tdep): New function.
- * w65-tdep.c (print_insn): Remove.
- (_initialize_w65_tdep): New function.
- * z8k-tdep.c (print_insn): Remove.
- (gdb_print_insn_z8k): New function.
- (_initialize_z8k_tdep): Set tm_print_insn.
- * printcmd.c (print_insn): New function, generic disassembler.
- * config/*/*.mt (TDEPFILES): Remove refs to *-pinsn.o.
-
-Mon Jan 16 15:43:29 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * Makefile.in: add new files remote-vx29k.c, config/a29k/tm-vx29k.h,
- and config/a29k/vx29k.mt.
- * configure.in: add new configuration a29k-*-vxworks.
- * remote-vx29k.c: new file merged from WRS.
- * remote-vx.c: merge changes from WRS.
- * config/a29k/vx29k.mt: new file for new configuration.
- * config/a29k/tm-vx29k.h: new header file for newconfiguration.
-
-Sun Jan 15 14:36:19 1995 Steve Chamberlain <sac@splat>
-
- * breakpoint.h (disable_breakpoint, enable_breakpoint):
- New declarations.
- (enum bpdisp): Change name of 'delete' member to 'del'.
- (struct bpstat): Changed name to 'bpstats'.
- * breakpoint.c (disable_breakpoint, enable_breakpoint,
- breakpoint_chain): Made globally visible.
- (bpstat_stop_status): Use new name for bpstat.
- (break_command_1, watch_command_1, catch_command_1,
- breakpoint_auto_delete, denable_delete_breakpoint): Use 'del'
- instead of 'delete'.
- (set_breakpoint_sal): New function.
- * defs.h (registers_changed_hook): New declaration.
- * infcmd.c (run_stack_dummy): 'delete' is now 'del'.
- * inflow.c (new_tty): Treat WIN32 in same way as __GO32__
- * main.c (main): Don't scan options when in WIN32 and exit
- without entering main loop.
- * m2-exp.y (m2_elx): Member 'class' is now 'aclass'.
- * symtab.h (struct symbol, struct partial_symbol): Changed name of
- member 'class' to 'aclass'.
- (SYMBOL_CLASS, PSYMBOL_CLASS): Reflect change.
- * top.c (registers_changed_hook): New definition.
- * utils.c (quit, notice_quit, initialize_utils): Treate WIN32
- in same way as __GO32__.
- * value.h (c_typedef_print): Rename 'new' argument.
-
- * w65-tdep.c, config/tm-w65.h, config/w65.mt: New files.
- * configure.in: Suppprt for w65,
-
-
-Sat Jan 14 11:18:11 1995 Jim Kingdon <kingdon@lioth.cygnus.com>
-
- * infcmd.c (signal_command): For "signal 0", pass (CORE_ADDR)-1,
- not stop_pc, to proceed.
-
- * eval.c (evaluate_subexp): Clear expect_type except for C++ and CHILL.
-
-Fri Jan 13 17:52:57 1995 Jim Kingdon <kingdon@lioth.cygnus.com>
-
- * infcmd.c (signal_command): Accept "signal 0"; the change to not
- accept it was accidental. "handle 0" and "info signal 0" remain
- illegal, though.
-
-Fri Jan 13 15:19:01 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * Makefile.in (all): Don't make libgdb-files.
- (libgdb): New action, makes libgdb-files.
-
-Thu Jan 12 21:23:25 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * stabsread.c (read_enum_type): When pending enum symbols are
- put into the enum type, they must be inserted in "backwards
- order, in case we've overflowed a struct pending buffer.
-
-
-Thu Jan 12 09:33:24 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * README: Add note about SPARCworks cc release 3.0 and higher.
-
- Add procfs support for Alpha OSF/1-2.x.
- * config/alpha/nm-osf.h: Renamed from nm-alpha.h, generic
- OSF/1 native support.
- * config/alpha/alpha-osf1.mh (NAT_FILE): Changed accordingly.
- (MUNCH_DEFINE): Removed.
- * config/alpha/alpha-osf2.mh, config/alpha/nm-osf2.h: New files
- for procfs support.
- * configure.in (alpha-dec-osf*): Use alpha-osf2.mh for OSF/1
- release 2.x and higher, else alpha-osf1.mh, as the procfs support
- in release 1.x is incomplete.
- * Makefile.in (ALLCONFIG): Add config/alpha/alpha-osf2.mh.
- * alpha-nat.c (supply_gregset, fill_gregset, supply_fpgregset,
- fill_fpgregset): New routines for procfs support.
- * inftarg.c (_initialize_inftarg): Don't add ptrace support
- if we have an optional procfs and /proc is accessible.
- * procfs.c: Include sys/fault.h and sys/syscall.h before
- including sys/procfs.h.
- (unconditionally_kill_inferior): If PROCFS_NEED_PIOCSSIG_FOR_KILL
- is defined, additionally perform a PIOCSSIG to really terminate
- the inferior.
- (create_procinfo): Always return a result.
- (create_procinfo, do_attach): Don't trace T_IFAULT faults if
- PROCFS_DONT_TRACE_IFAULT is defined.
- (procfs_init_inferior): Use START_INFERIOR_TRAPS_EXPECTED as
- argument to startup_inferior if it is defined.
- (proc_set_exec_trap): If PIOCSSPCACT is defined, use it instead
- of tracing exits from exec system calls. Needed for the user level
- loader under Alpha OSF/1.
- (do_detach): Clear any pending signal if we want to detach from
- a process without a signal.
- (set_proc_siginfo): If PROCFS_DONT_PIOCSSIG_CURSIG is defined,
- don't issue a PIOCSSIG if pr_cursig already contains the signal we
- intend to set.
- (info_proc_signals): If PROCFS_SIGPEND_OFFSET is defined, the
- pending signals are numbered from 1 instead of 0.
- (info_proc_mappings): Increase size of output format for addresses
- if BFD_HOST_64_BIT is defined.
- (procfs_stop): Renamed from child_stop.
- (_initialize_procfs): Don't add procfs support if we have an
- optional procfs and /proc is not accessible.
-
-
-Wed Jan 11 17:53:26 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * array-rom.c: Add support for most commands.
-
- * monitor.c: Add GDB remote protocol for the hybrid environment on
- the Array board.
-
-Wed Jan 11 00:44:01 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * command.c (show_user_1): Use print_command_line to show a user
- defined command (including control structures).
-
- * top.c (init_main): Change documentation for user defined
- commands to indicate they may accept up to ten arguments.
-
-Tue Jan 10 16:22:41 1995 Jim Kingdon <kingdon@lioth.cygnus.com>
-
- * mips-tdep.c (mips_skip_prologue): Accept or as well as addu for
- `move $s8, $sp' instruction.
-
-Sun Jan 8 12:45:34 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
-
- * target.c, target.h (target_signal_from_command): New function.
- * infrun.c (handle_command, signals_info), infcmd.c
- (signal_command): Use it.
- * infrun.c, infcmd.c: Update docstrings for these commands.
-
- * target.h (enum target_signal), target.c (signals), target.c
- (target_signal_from_host, target_signal_to_host): Add
- TARGET_SIGNAL_REALTIME_* and TARGET_SIGNAL_PRIO for lynx.
- * config/tm-lynx.h: Define signal numbers for realtime events.
-
-Sat Jan 7 07:23:53 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dbxread.c (process_one_symbol): Handle N_FUN symbols
- for Sun acc 3.0 under SunOS4.
-
- Changes to improve handling of runtime common symbols
- under SunOS4.
- * minsyms.c (get_symbol_leading_char): New routine to determine
- the leading symbol character for an objfile.
- (prim_record_minimal_symbol_and_info, install_minimal_symbols):
- Use it.
- * objfiles.h (rt_common_objfile): New global, points to objfile
- containing the runtime common minimal symbols.
- * objfiles.c (free_objfile): Mark rt_common_objfile as
- unallocated before freeing it.
- * solib.c (allocate_rt_common_objfile): New routine to allocate
- an objfile for the runtime common minimal symbols.
- (solib_add_common_symbols): Allocate an objfile for the runtime
- common symbols if necessary and put common symbols into it.
- Clean up code and comments.
- (solib_add, special_symbol_handling): Cleanup comments regarding
- runtime common symbols.
- * stabsread.c (scan_file_globals_1): New routine, contains
- old scan_file_globals code. Checks if there are any unresolved
- global symbols before starting the expensive minimal symbol table
- search.
- (scan_file_globals): Now calls scan_file_globals_1 for the passed
- objfile and eventually for the runtime common objfile. Complains
- about any unresolved global symbols and removes them from the
- global symbol chain to avoid dangling pointers into the symbol
- table if the symbol table is reread.
-
-Thu Jan 5 17:38:29 1995 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in (install_only uninstall): Indent for clarity.
-
- * core.c (dis_asm_read_memory): Add call to
- dis_asm_read_memory_hook to provide alternate way for disassembler
- to read memory.
-
- * defs.h: Protect from multiple inclusion. Add decl for
- dis_asm_read_memory_hook.
-
- * top.c: Make window startup be the default.
- * Add dis_asm_read_memory_hook.
-
-
-Thu Jan 5 01:16:40 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * stabsread.c (define_symbol): Handle `a' symbol type used for
- reference parameter passed in a register.
-
-
-Wed Jan 4 12:27:29 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * defs.h: move include tm.h up, so that the type LONGEST can
- also based on the target requirement to determine. In this case
- target mips64.
-
- * remote-os9k.c (rombug_open): catch exception e in rombug.
- * remote-os9k.c (rombug_wait): print message before register display
- from rombug.
-
-Wed Jan 4 09:18:27 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * top.c (locate_arg): Call strchr not index.
-
-Tue Jan 3 16:52:03 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * ch-exp.y (literal): Recognize NULL.
- (tuple): Parse simple unlabelled tuples.
- * eval.c (evaluate_subexp case OP_ARRAY): Use expect_type to
- evaluate brace-initializer-expressions depending on context.
- (evaluate_subexp case UNOP_CAST): Pass the target type as
- expected type when evaluating the expression.
-
- * ch-typeprint.c (chill_type_print_base): Get names of PTR and
- BOOL from TYPE_NAME.
- * ch-valprint.c (chill_print_type_scalar): New function, to handle
- TYPE_CODE_RANGE better than print_type_scalar does.
- (chill_val_print_array_elements): Use above new function.
-
-Mon Jan 2 15:02:51 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-udi.c (udi_load): Tell symbol_file_add that the
- program being loaded is the main program.
-
-For older changes see ChangeLog-94
-
-Local Variables:
-mode: indented-text
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/gdb/gdb/ChangeLog-96 b/contrib/gdb/gdb/ChangeLog-96
deleted file mode 100644
index 760b425f7599..000000000000
--- a/contrib/gdb/gdb/ChangeLog-96
+++ /dev/null
@@ -1,5116 +0,0 @@
-Tue Dec 31 15:19:32 1996 Geoffrey Noer <noer@cygnus.com>
-
- * config/mn10300/tm-mn10300.h: more small register fixes
-
-Tue Dec 31 06:51:43 1996 Mark Alexander <marka@cygnus.com>
-
- * config/i386/xm-windows.h: Undo previous change to SIGTRAP
- and SIGQUIT values; it messed up non-MIPS targets.
- * config/mips/tm-mips.h: Undefine BREAKPOINT, replace
- with separate LITTLE_BREAKPOINT and BIG_BREAKPOINT definitions;
- this fixes problem with setting breakpoints in little-endian
- programs in the simulator.
-
-Mon Dec 30 00:14:06 1996 Doug Evans <dje@seba.cygnus.com>
-
- * remote-sim.c (gdbsim_open_p): New static local.
- (gdbsim_open): Call unpush_target if sim open. Set gdbsim_open_p.
- (gdbsim_close): Only call sim_close if sim open. Reset gdbsim_open_p.
-
-Sun Dec 29 09:15:03 1996 Mark Alexander <marka@cygnus.com>
-
- * config/i386/xm-windows.h: Make SIGTRAP and SIGQUIT consistent
- with sim/mips/support.h.
-
-Fri Dec 27 14:53:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * v850-tdep.c (struct pifsr): Add cur_frameoffset field.
- (v850_scan_prologue): Add debug code #ifdef'ed DEBUG. Support new
- compiler prologues using register save functions and short store
- instructions. Add support for functions with large stack frames.
-
- * config/v850/tm-vm850.h ({R0,R1,R12,EP}_REGNUMS): New register
- number defintiions for r0, r1, r12, ep.
- (SAVE{1,2,3}_{START,END}_REGNUM): Register number definitions for
- the 3 sets of saved registers.
-
-Thu Dec 26 19:56:55 1996 Mark Alexander <marka@cygnus.com>
-
- * valprint.c (print_longest): Don't lose upper bits
- of 64-bit values on Windows.
- * config/i386/xm-windows.h: Leave CC_HAS_LONG_LONG defined,
- undefine PRINTF_HAS_LONG_LONG, so that 64-bit values will
- be printed without loss of upper bits.
-
-Thu Dec 26 15:15:21 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * config/sparc/tm-sparclet.h: make registers ASR15, ASR19 invisible
- (they're not useful, you can't change, write or even read them)
-
-Thu Dec 26 15:20:48 1996 Fred Fish <fnf@cygnus.com>
-
- * config/pa/hppahpux.mh (TERMCAP): Always link to libc before
- libcurses, to avoid picking up broken select() from libcurses
- on some versions of HPUX.
-
-Thu Dec 26 15:14:41 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * sparclet-rom.c: Remove includes of Unix system files.
- Add function "sparclet_supply_register" so that parse_register_dump
- will not seg-fault by calling a null function pointer.
- Remove XMODEM support (unfinished work?).
- Remove flag "MO_HANDLE_NL", so monitor's output can be read by humans.
- Add fill command.
- Remove colon from getreg.resp_delim so PSR register will work.
- Remove pointer to sparclet_load (downloading SREC's doesn't work).
- Null out local register names for %g0, all %cc and all %asr regs,
- since the monitor can't report them. Will return zero instead.
- * sparclet-stub.c: New -- remote protocol support for sparclet CPU.
- * config/sparc/tm-sparclet.h: Re-arrange REGISTER_NAMES:
- Add back %g0 and %psr, add %cc coprocessor regs, add %asr regs.
- Adjust NUM_REGS and REGISTER_BYTES accordingly
-
-Tue Dec 24 10:27:37 1996 Jeffrey A Law (law@cygnus.com)
-
- * remote-e7000.c (want_h8300h, want_nopc_h8300h): Renamed
- from want and want_nopc.
- (want_h8300s, want_nopc_h8300s): New variables for H8/S register
- lists.
- (e7000_fetch_registers): Use H8/300H or H8/S register list string
- as needed.
- (e7000_wait): Likewise.
-
-Mon Dec 23 02:25:58 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mips-tdep.c (mips_find_saved_regs): If a frame has been
- interrupted by a signal, figure out whether the registers that
- the proc_desc claims are saved have been saved yet.
- (mips_push_dummy_frame): Write dummy frame register after all
- registers have been saved in the dummy frame. Update comments
- to reflect the fact that we are now using an AT_ENTRY_POINT
- call dummy.
-
-Sun Dec 22 15:52:25 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-tdep.c (d10v_skip_prologue): PR11287. Fix problem where
- some breakpoints weren't being set.
-
-Sat Dec 21 12:57:59 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/mips/tm-mips.h (PC_IN_CALL_DUMMY): Removed, the default
- definition in inferior.h is sufficient.
- * mips-tdep.c (mips_pc_in_call_dummy): Ditto.
- (mips_push_arguments): Make sure that the stack is aligned to a
- multiple of 8 after the arguments are pushed.
- Structures are always passed by value in the old ABI.
- Adjust argument register value on big endian targets when passing
- a value whose length is less than the register size.
- Write stack arguments with a single write_memory call.
- (mips_pop_frame): Use frame_saved_regs instead of proc_desc to
- decide which registers have to be restored.
-
- * irix5-nat.c (fill_gregset): Sign extend registers before
- filling in the gregset structure.
-
-Fri Dec 20 11:06:03 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * mswin/genmakes: Don't define _DEBUG. This breaks wingdb.
-
-Thu Dec 19 19:42:44 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * v850-tdep.c (v850_scan_prologue): Deal with -mep shorting
- register saves by using the ep register.
-
-Thu Dec 19 15:57:16 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r-tdep.c (m32r_frame_find_saved_regs): Fix thinko in arg def.
-
-Thu Dec 19 09:38:56 1996 Mark Alexander <marka@cygnus.com>
-
- * values.c (unpack_double): Make it compile with MSVC++ 2.x.
- * remote-mips.c (S_IROTH): Define if not defined by stat.h, e.g.
- when using MSVC++.
- (common_open): Fix help string.
-
-Wed Dec 18 23:01:32 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Use NewFolderRecursive for installation.
-
-Sat Dec 14 20:50:01 1996 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c (mips_push_arguments): Handle floating point args.
- * config/mips/tm-mips.h (FIX_CALL_DUMMY): Define to set up $25
- correctly for PIC on Irix 5.
-
-Sat Dec 14 09:52:30 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * i386-tdep.c (i386_frame_find_saved_regs): Handle zero return
- from get_pc_function_start gracefully.
-
-Sat Dec 14 00:43:57 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * c-exp.y (qualified_name): Replace explicit check for valid
- destructor name with call to destructor_name_p.
-
- * c-lang.h, c-typeprint.c (cp_type_print_method_args): Removed,
- no longer needed.
-
- * c-typeprint.c (c_type_print_varspec_prefix, c_type_print_base):
- Replace remaining fprintf_unfiltered calls with their filtered variant.
- (c_type_print_base): Do not print return type for destructors from
- template classes.
- Replace cp_type_print_method_args with cplus_demangle call to get
- consistent type output for stubbed and unstubbed methods.
-
- * cp-valprint.c (cp_print_class_method): Replace
- cp_type_print_method_args with cplus_demangle call to get consistent
- type output for stubbed and unstubbed methods.
-
- * gdbtypes.c, gdbtypes.h (get_destructor_fn_field): New function
- to find the destructor field indices for a type.
-
- * gdbtypes.h (struct type): Clarify comments for vptr_basetype
- and arg_types fields.
- (struct fn_field): Remove args field, no longer used.
-
- * symtab.c (decode_line_1), valops.c (value_struct_elt,
- check_field_in): Use get_destructor_fn_field to find the destructor
- field indices instead of assuming that the compiler passes the member
- function fields in a specific order.
-
- * symtab.c (find_methods): Pass NULL instead of SYMBOL_BLOCK_VALUE
- to lookup_symbol.
- (list_symbol): Replace cp_type_print_method_args with cplus_demangle
- call in zapped out code and explain why this code is zapped out.
-
-Thu Dec 12 13:29:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/powerpc/ppc{,le}-sim.mt (SIM): Add the simulator common
- library ../sim/common/libcommon.a.
-
-Wed Dec 11 11:15:08 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * monitor.c (monitor_load): Add support for load address argument.
- * dsrec.c: #include <time.h>.
- (load_srec): New argument load_offset. Print download stats.
- * srec.h (load_srec): Update prototype.
- * sh3-rom.c (sh3_load): Update call to load_srec.
-
-Mon Dec 9 17:34:05 1996 Geoffrey Noer <noer@cygnus.com>
-
- * config/mn10300/tm-mn10300.h: more small register fixes
- * mn10300-tdep.c: filled in from another target
-
-Mon Dec 9 17:12:19 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * monitor.c (monitor_insert_breakpoint): Handle bi-endian machines.
-
-Mon Dec 9 15:58:51 1996 Mark Alexander <marka@cygnus.com>
-
- * config/mips/tm-mips.h: Get rid of call-dummy code.
- Minor changes to make pre-ANSI compilers happy.
- * mips-tdep.c: Minor changes to make pre-ANSI compilers happy.
- (mips_push_arguments): Rewrite to partially support EABI.
- (mips_pc_in_call_dummy): New function.
- * infcmd.c: Include symfile.h to get prototype of entry_point_address,
- which fixes 64-bit sign extension bug on MIPS.
-
-Mon Dec 9 00:14:49 1996 Geoffrey Noer <noer@cygnus.com>
-
- * config/mn10300/tm-mn10300.h: fix register names
- * mn10300-tdep.c: new skeleton tdep for mn10300
-
-Sun Dec 8 18:02:57 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * remote-sim.h: Update some comments.
- * remote-sim.c (gdb_os_error): New function.
- (init_callbacks): Fix initializing of gdb_callback. Add gdb_os_error.
- (gdb_os_printf_filtered): Use gdb_stdout, not stdout.
-
-Sun Dec 8 00:36:31 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * irix5-nat.c (supply_gregset, fill_gregset): Handle gregsets
- from O32 and N32 ABI.
- (xfer_link_map_member): Work around problem with alignments
- in struct obj when compiling GDB under N32 ABI.
-
-Thu Dec 5 23:30:44 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * d10v-tdep.c: Add support for examination and interpretation
- of instruction trace buffer.
- (trace, untrace, info trace, tdisassemble): New commands.
-
-Thu Dec 5 14:06:23 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * config/sparc/tm-sparclet.h (TARGET_BYTE_ORDER): Undef.
- (TARGET_BYTE_ORDER_SELECTABLE): Define.
- (BREAKPOINT): Undef.
- ({BIG,LITTLE}_BREAKPOINT): Define.
- (TM_PRINT_INSN_MACH): Redefine for sparclet.
-
-Wed Dec 4 16:34:05 1996 Geoffrey Noer <noer@cygnus.com>
-
- * config/mn10300/mn10300.mt, config/mn10300/tm-mn10300.h: New.
-
-Tue Dec 3 13:02:08 1996 Fred Fish <fnf@ninemoons.com>
-
- * infptrace.c (store_inferior_registers): Move some common code out
- to store_register, like fetch_inferior_registers & fetch_register.
- (store_register): New function, from store_inferior_registers.
- (fetch_inferior_registers, fetch_register): Minor code tweaks to
- make {fetch,store}_inferior_registers and {fetch,store}_register
- routines as similar in structure as possible.
- (fetch_inferior_registers, store_inferior_registers): Eliminate
- local variable numregs and just use ARCH_NUM_REGS directly.
-
-Tue Dec 3 11:38:14 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * blockframe.c: add macro USE_GENERIC_DUMMY_FRAMES to enable/disable
- code for generic call_dummy frames.
- * config/h8300/tm-h8300.h: turn on USE_GENERIC_DUMMY_FRAMES
- * config/m32r/tm-m32r.h: Ditto.
- * config/sh/tm-sh.h: Ditto.
- * config/v850/tm-v850.h: Ditto.
-
-Sun Dec 1 00:41:47 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * vax-tdep.c (vax_print_insn, print_insn_arg): Use info functions
- for printing. From Valeriy Ushakov <uwe@ptc.spbu.ru>.
-
-Sun Dec 1 00:40:46 1996 Geoffrey Noer <noer@cygnus.com>
-
- * configure.tgt: Add new mn10300 entry.
-
-Sun Dec 1 00:18:59 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- Add support for Irix 6.2 native O32 and N32 ABI.
-
- * config.in, configure.in, configure: Check for <objlist.h>.
- * configure.tgt: Handle mips*-sgi-irix6* like irix5 for now.
-
- * cp-valprint.c (cp_print_value_fields): Use SYMBOL_VALUE_ADDRESS
- instead of SYMBOL_BLOCK_VALUE to get the address of a static member.
-
- * dwarf2read.c: Turn warnings and recoverable errors into complaints,
- add new complaints where appropriate.
- gcc -Wall cleanup.
- (struct line_head): Change line_base from char to int to avoid
- problems with compilers whose plain char is represented by an
- unsigned char.
- (struct partial_die_info): Add is_declaration field.
- (dwarf2_tmp_obstack): New obstack for allocating temporary storage
- used during symbol reading.
- (cu_header_offset): New variable for resolving relative reference
- dies.
- (optimized_out, basereg, islocal, frame_base_reg, frame_base_offset):
- New interface variables for decode_locdesc.
- (struct dwarf2_pinfo): New structure for communication between
- psymtab and symtab reading, passed via pst->read_symtab_private.
- (dwarf2_has_info, dwarf2_build_psymtabs): Accept objects files
- without line number sections.
- (dwarf2_build_psymtabs_hard): Initialize temporary obstack
- for symbol reading.
- Allocate and initialize pst->read_symtab_private.
- Relocate pst->textlow and pst->texthigh with baseaddr.
- (scan_partial_symbols): Do not add DW_AT_declaration symbols
- to the partial symbol table.
- Add file scope enumerator symbols to the partial symbol table.
- Fix typo in highpc computation.
- If we didn't find a lowpc, set it to highpc to avoid complaints
- from `maint check.
- (add_partial_symbol): Relocate symbol values with baseaddr.
- Add static DW_TAG_subprogram and DW_TAG_variable symbols to the
- minimal symbol table.
- Obtain symbol values for DW_TAG_variable symbols from the location
- descriptor, skip symbols with missing location desciptors.
- Skip symbols for aggregate types without children.
- Handle enumerator symbols.
- (dwarf2_psymtab_to_symtab): Issue symbol reading message if verbose.
- (psymtab_to_symtab_1): Set local variables from
- pst->read_symtab_private, set cu_header_offset and baseaddr.
- Initialize temporary obstack for symbol reading, initialize
- buildsym and add a cleanup to really_free_pendings.
- Relocate highpc with baseaddr when calling end_symtab.
- If the compilation is from a C file generated by language
- preprocessors, do not set the symtab language if it was already
- deduced by start_subfile.
- Removed verbose sorting symbol table message.
- (process_die): Handle DW_TAG_ptr_to_member_type and
- DW_TAG_reference_type.
- Use read_subroutine_type to get the function type for
- DW_TAG_subprogram before calling read_func_scope.
- (read_file_scope): Initialize file name to <unknown>, start_subfile
- expects a non-NULL name.
- If we didn't find a lowpc, set it to highpc to avoid complaints
- from finish_symbol.
- Relocate lowpc and highpc with baseaddr.
- Get rid of Irix6.2 native cc compile machine prefix in comp_dir.
- Zero out ftypes for each new compilation unit (may be different
- language or different objfile).
- Accept compilation units without line number information, pass
- comp_dir to decode_lines.
- (read_func_scope): Initialize function name to <unknown> to avoid
- core dumps when DW_AT_name is missing.
- Relocate lowpc and highpc with baseaddr.
- Handle DW_AT_frame_base, keep result for DW_OP_fbreg operations.
- Pass function type to new_symbol.
- (read_lexical_block_scope): Relocate lowpc and highpc with baseaddr.
- (read_structure_scope): Set TYPE_TAG_NAME, not TYPE_NAME.
- Handle DW_TAG_class_type.
- Copy fields to type_obstack, release temporary storage for fields.
- Don't add symbol if die is a stub die and has no children.
- Handle C++ static member fields.
- (read_enumeration): Set TYPE_TAG_NAME, not TYPE_NAME.
- Copy fields to type_obstack, release temporary storage for fields.
- Let new_symbol handle the symbol creation for enumerators
- instead of handcrafting a symbol.
- Determine signedness of enum type from enumerators.
- (dwarf_read_array_type): Handle variable length arrays.
- Use lookup_pointer_type instead of handcrafting a type.
- Create array type only if a DW_TAG_subrange_type was found.
- (read_tag_pointer_type, read_tag_reference_type):
- Use lookup_pointer_type and lookup_reference_type instead
- of handcrafting a type.
- (read_tag_ptr_to_member_type): New function to handle
- DW_TAG_ptr_to_member_type.
- (read_subroutine_type): Handle parameter dies.
- Use lookup_function_type instead of handcrafting a type.
- (read_typedef): Allocate a TYPE_CODE_TYPEDEF type for the typedef.
- (read_base_type): If the type has a name, use init_type to create
- a new type instead of second guessing a fundamental type.
- (read_comp_unit): Reset die reference table before building
- a new one.
- (dwarf2_read_section): Read section contents into psymbol_obstack.
- (dwarf2_read_abbrevs): Handle unterminated abbreviations
- for a compile unit gracefully.
- (read_partial_die): Zero partial die before reading its info.
- Handle DW_AT_declaration.
- Fix typo in handling of DW_FORM_block4.
- (read_full_die): Fix typo in handling of DW_FORM_block4.
- (read_1_signed_byte, read_2_signed_bytes, read_4_signed_bytes):
- New routines to get signed values from a buffer.
- (read_n_bytes, read_string): Allocate storage from the temporary
- obstack. If the host char size permits it, return pointer
- to buffer instead of allocating storage.
- (set_cu_language): Handle DW_LANG_Mips_Assembler.
- (dwarf_attr): Return NULL if reference die for DW_AT_specification
- or DW_AT_abstract_origin die is not found.
- (record_minimal_symbol): Removed, replaced with a direct call to
- prim_record_minimal_symbol, it now handles saving the string itself.
- (convert_locdesc): Removed, partial symtab reading now uses
- decode_locdesc.
- (dwarf_attr): Use dwarf2_get_ref_die_offset to get the absolute
- offset for the die reference.
- (dwarf_decode_lines): Complain if the line section info is missing.
- Use read_1_signed_byte to extract lh.line_base to avoid
- problems with compilers whose plain char is represented by an
- unsigned char.
- Add cleanups for allocated temporary storage.
- Start a subfile for the first file in the state machine.
- Fix off by one problem with dirs.dirs access.
- Use comp_dir when directory index is 0.
- Support multiple sequences (from Jason Merrill <jason@cygnus.com>).
- (dwarf2_start_subfile): Try to keep line numbers from identical
- absolute and relative file names in a common subfile.
- (new_symbol): Allocate symbol and symbol name on the symbol_obstack.
- Set SYMBOL_LINE from DW_AT_decl_line if present.
- Set SYMBOL_TYPE from passed type if not NULL.
- Change DW_TAG_variable symbol types with missing type entries
- to a sensible type.
- Handle optimized_out, offreg and islocal storage classes.
- Add external symbols with type information whose address isn't
- known as LOC_UNRESOLVED symbols.
- Synthesize typedefs for C++ classes, structs, unions and enumerations.
- Handle DW_TAG_enumerator symbols, complain for unrecognized
- symbol tags.
- (die_type): A missing DW_AT_type represents a void type.
- Use dwarf2_get_ref_die_offset to get the absolute offset for
- the die reference.
- (die_containing_type): New function to build type from
- DW_AT_containing_type attribut.
- (read_type_die): Handle DW_TAG_ptr_to_member_type.
- Treat DW_TAG_subprogram like DW_TAG_subroutine_type.
- (dwarf_base_type): Fix typo with creation of FT_UNSIGNED_SHORT
- fundamental type.
- (create_name): Removed, symbol name allocation is now done
- in new_symbol.
- (dump_die): Use print_address_numeric to print a CORE_ADDR.
- (dwarf2_empty_die_ref_table): New function to clear the die
- reference table.
- (dwarf2_get_ref_die_offset): New function to get the absolute
- die offset from a die reference attribute.
- (decode_locdesc): Complete rewrite using a stack, code mostly
- borrowed from dwarfread.c:locval.
- (dwarf_alloc_type): Removed, replaced by direct calls to alloc_type.
- (dwarf_alloc_block): Allocate block on temporary obstack.
-
- * elfread.c (elf_symtab_read): When handling Irix dynamic symbols,
- skip section name symbols and relocate all others.
- (elf_symfile_read): Build dwarf2 psymtab even if offset is non-zero.
-
- * irix5-nat.c (fetch_core_registers): Handle core_reg_sect
- from N32 executables. Call registers_fetched after extracting
- the registers.
- (obj_list_variant, struct link_map, LM_OFFSET, LM_ADDR): New
- definitions to enable support of O32 and N32 format objlists.
- (struct so_list): New members offset, so_name and lmstart to
- eliminate dependencies from the objlist format used.
- (solib_map_sections, symbol_add_stub, solib_add,
- info_sharedlibrary_command, solib_address, clear_solib): Use
- so_name and LM_OFFSET.
- (first_link_map_member): Rewrite to enable support of O32 and N32
- format objlists.
- (next_link_map_member, xfer_link_map_member): New functions to
- support O32 and N32 format objlists.
- (find_solib): Use first_link_map_member, next_link_map_member and
- xfer_link_map_member.
- (solib_create_inferior_hook): Use TARGET_SIGNAL_* instead of
- host signal numbers.
-
- * mdebugread.c (parse_partial_symbols, handle_psymbol_enumerators):
- Pass CORE_ADDR variant to add_psymbol_to_list.
-
- * mips-tdep.c (heuristic_proc_desc): Stop examining the prologue
- if we encounter a positive stack adjustment. Handle `move $30,$sp'.
- Handle `sd reg,offset($sp)' for 32 bit ABIs.
-
- * symmisc.c (dump_msymbols, print_partial_symbols): Use
- print_address_numeric to print a SYMBOL_VALUE_ADDRESS.
- (dump_symtab): Print compilation directory if it is not NULL.
-
- * valops.c (search_struct_field, value_struct_elt_for_reference):
- Use SYMBOL_VALUE_ADDRESS instead of SYMBOL_BLOCK_VALUE to get the
- address of a static member.
-
-Thu Nov 28 00:46:24 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * vax-tdep.c (vax_print_insn): Made static, modified to take
- disassemble_info as parameter.
- (_initialize_vax_tdep): New function to initialize tm_print_insn
- to vax_print_insn.
-
-Wed Nov 27 11:29:06 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * blockframe.c: Remove old-style CALL_DUMMY code.
- * h8300-tdep.c, config/h8300/tm-h8300.h: Ditto.
- * m32r-tdep.c, config/m32r/tm-m32r.h: Ditto.
- * sh-tdep.c, config/sh/tm-sh.h: Ditto.
- * v850-tdep.c, config/v850/tm-v850.h: Ditto.
-
-Wed Nov 27 10:32:14 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * breakpoint.c: DELETE command will not delete CALL_DUMMY breakpoint.
- * blockframe.c: Add target-independant support for managing
- CALL_DUMMY frames on the host side.
- * frame.h: Declarations for generic CALL_DUMMY frame support.
- * h8300-tdep.c: Add target function calls using generic frame support.
- * config/h8300/tm-h8300.h: config for generic target function calls.
- * m32r-tdep.c: Add target function calls using generic frame support.
- * config/m32r/tm-m32r.h: config for generic target function calls.
- * sh-tdep.c: Add target function calls using generic frame support.
- * config/sh/tm-sh.h: config for generic target function calls.
- * v850-tdep.c: Add target function calls using generic frame support.
- * config/v850/tm-v850.h: config for generic target function calls.
- * valops.c: ADD PUSH_RETURN_ADDRESS so that it doesn't have to be
- done by PUSH_ARGUMENTS when there's no CALL_DUMMY.
-
-Tue Nov 26 19:21:35 1996 Mark Alexander <marka@cygnus.com>
-
- * config/mips/tm-mips.h (ADDR_BITS_REMOVE, TARGET_READ_SP): Define.
- (mips_addr_bits_remove): Declare.
- * mips-tdep.c (mips_push_dummy_frame): Fix heuristic-fence-post
- errors when hitting breakpoints during inferior function calls
- in 64-bit programs.
- (fix_sign_extension): Make public, rename to mips_addr_bits_remove.
- * utils.c (paddr_nz, preg_nz): New functions, similar to
- paddr and preg but don't print leading zeroes.
- * defs.h (paddr_nz, preg_nz): Declare.
- * remote-mips.c: Use paddr_nz instead of paddr throughout
- to reduce packet size.
- (pmon_end_download): Improve timeout error handling.
-
-Tue Nov 26 17:21:37 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Rebuild with autoconf 2.12.
-
-Mon Nov 25 13:17:16 1996 Fred Fish <fnf@ninemoons.com>
-
- From: Paul Eggert <eggert@twinsun.com>
- * remote-bug.c (wait_strings): Avoid creating a trigraph.
-
-Fri Nov 22 15:55:22 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * valops.c (value_at, value_fetch_lazy): Put in D10V call
- to fix up address pointers.
- * values.c (value_from_longest): Removed previous d10v changes.
- * config/d10v/tm-d10v.h (TARGET_PTR_BIT): Change to 4 bytes.
-
-Fri Nov 22 10:06:19 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/i386/nm-i386v4.h (LOSING_POLL): Define, needed for
- Unixware 1.1.2.
-
-Thu Nov 21 19:13:58 1996 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c: Replace hard-coded constants with MIPS_INSTLEN.
- (common_breakpoint): Use paddr instead of %x to print 64-bit values.
- (heuristic_proc_desc): Add tests for 64-bit instructions.
- (init_extra_frame_info, mips_push_arguments): Recognize additional
- registers for EABI.
- * remote-mips.c: Extend DDB target to allow TFTP downloads.
- * config/mips/tm-mips.h (MIPS_LAST_ARG_REGNUM, MIPS_NUM_ARG_REGS):
- Define.
-
-Wed Nov 20 19:09:16 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * infcmd.c (do_registers_info): Call val_print with the
- virtual buf instead of the raw buf. Needed for REGISTER_CONVERT
- to work with non-floating point regs.
-
- * d10v-tdep.c (d10v_skip_prologue): If we have line debugging
- information, then the end of the prologue should the first
- assembly instruction of the first source line.
-
- * values.c (value_from_longest): Put in D10V call to
- fix up address pointers.
-
- * config/d10v/tm-d10v.h (REGISTER_VIRTUAL_SIZE): Modified.
- (REGISTER_VIRTUAL_TYPE): Modified for PC_REGNUM and SP_REGNUM.
- (REGISTER_CONVERTIBLE): Make PC and SP convertible.
- (REGISTER_CONVERT_TO_VIRTUAL): Define.
- (REGISTER_CONVERT_TO_RAW): Define.
- (D10V_MAKE_DADDR): Define.
- (D10V_MAKE_IADDR): Define.
-
-Wed Nov 20 16:15:15 1996 Geoffrey Noer <noer@cygnus.com>
-
- * config/i386/cygwin32.mh: add MMALLOC_CFLAGS = -I$(MMALLOC_SRC)
- -DMMCHECK_FORCE=1 so memory checks are loaded for cygwin32 gdb
-
-Wed Nov 20 00:43:09 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * callback.h: Delete, moved to ../include.
- * callback.c: Delete, moved to ../sim/common.
- * Makefile.in (SFILES,COMMON_OBJS): Delete callback.[co].
- (callback.o): Delete rule.
- * remote-sim.h: No longer include callback.h.
- (sim_callback_write_stdout): Delete prototype.
- * remote-sim.c (init_callbacks,end_callbacks): New functions.
- (gdb_os_write_stdout, gdb_os_printf_filtered): New functions.
- (gdb_callback, callbacks_initialized): New static globals.
- (gdbsim_open): Call init_callbacks.
- (gdbsim_close): Call end_callbacks.
- (simulator_command): Call init_callbacks.
-
- * config/h8300/h8300.mt (SIM): Change to ../sim/h8300/libsim.a.
- * config/h8500/h8500.mt (SIM): Change to ../sim/h8500/libsim.a.
-
-Mon Nov 18 15:58:05 1996 Jim Wilson <wilson@cygnus.com>
-
- * config/mips/tm-mips.h (FIX_CALL_DUMMY): Change unsigned LONGEST
- to ULONGEST.
-
-Fri Nov 15 15:34:18 1996 Fred Fish <fnf@cygnus.com>
-
- From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
- * procfs.c (wait_fd): Handle EINTR error return from poll
- by restarting the poll.
- * defs.h (PIDGET): Define a default version that just
- returns its argument unchanged.
- * inflow.c (terminal_init_inferior): Eliminate #ifdef
- of PIDGET and fold both alternatives into common code.
- (pass_signal): Use PIDGET for pid passed to kill().
-
-Thu Nov 14 15:54:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * utils.c (paddr,preg): Use a static variable initialized to 32
- instead of doing addr>>32 to eliminate a warning produced by GCC
- on 32-bit systems.
-
- * config/d10v/tm-d10v.h (ULONGEST): Define.
-
-Tue Nov 12 12:25:27 1996 Jim Wilson <wilson@cygnus.com>
-
- * c-typeprint.c (cp_type_print_method_args): Pass -1 for show in
- recursive call to type_print.
-
-Tue Nov 12 12:18:29 1996 Jim Wilson <wilson@cygnus.com>
-
- * defs.h (ULONGEST): New macro.
- * alpha-tdep.c, breakpoint.c, c-exp.y, ch-exp.c, convex-xdep.c,
- corefile.c, defs.h, f-exp.y, findvar.c, gdbcore.h, m2-exp.y,
- m88k-tdep.c, printcmd.c, remote-hms.c, remote-mips.c, sparc-tdep.c,
- valarith.c, valops.c, values.c, config/gould/tm-np1.h,
- config/mips/tm-mips.h, mswin/prebuilt/gdb/cexptab.c,
- mswin/prebuilt/gdb/fexptab.c, mswin/prebuilt/gdb/m2exptab.c:
- Change all occurances of unsigned LONGEST to ULONGEST.
-
- * configure.host (mips-sgi-irix6): Add.
-
-Tue Nov 12 12:16:40 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * sh-tdep.c: Add functionality for target function calls.
- * config/sh/tm-sh.h: Add support for target function calls.
-
-Tue Nov 12 12:06:58 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * m32r-tdep.c: Add functionality for target function calls.
- * valops.c: Small change to support target function calls.
- * config/m32r/tm-m32r.h: Add support for target function calls.
-
-Mon Nov 11 17:15:59 1996 Geoffrey Noer <noer@cygnus.com>
-
- * defs.h: Modify Nov 11 12:59:00 change so _MSC_VER is checked
- instead of _WIN32.
- * win32-nat.c: Fix Nov 11 12:59:00 change (windows.h should
- be included instead of windefs.h for compilers other than
- VC++).
- * mswin/windefs.h: Remove ^Ms and change C++ style comments
- to C style comments.
-
-Mon Nov 11 14:32:38 1996 Mark Alexander <marka@cygnus.com>
-
- * utils.c (get_cell): Fix off-by-one bug.
- * mips-tdep.c (get_frame_pointer, fix_sign_extension):
- New functions to consolidate common code.
- (mips_frame_chain, init_extra_frame_info): Use new functions
- to fix problems with backtrace and finish commands on ddb board.
-
-Mon Nov 11 12:59:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
-
- * mips-tdep.c, remote-mips.c, values.c, mdebugread.c,
- config/mips/tm-mips.h: Add/fix bugs for 64-bit mips support.
- * defs.h: Cleanup; add prototypes.
- * corefile.c: Change FIXME #ifdef
- * win32-nat.c: Include windefs instead of windows.h.
- * utils.c: Add routines for printing addresses and registers
- based on type size.
-
-Sat Nov 9 01:05:10 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * alpha-tdep.c (heuristic_proc_desc): Stop examining the prologue
- if we encounter a positive stack adjustment.
- (find_proc_desc): If heuristic_fence_post is non-zero, use
- heuristic_proc_start to determine the start of a function before
- calling heuristic_proc_desc.
-
- * coffread.c (coff_symtab_read): Change minimal symbol types
- for C_LABEL symbols from mst_* to mst_file_*.
-
- * config/m68k/sun3os4.mh (MMALLOC_CFLAGS): Define MMCHECK_FORCE to 1.
-
- * configure.in: Handle error message from sun3 native ld when
- configuring HLDFLAGS.
- * configure: Regenerated with autoconf.
-
- * c-valprint.c (c_value_print): Adjust value address by VALUE_OFFSET.
- * cp-valprint.c (cp_print_value): Prevent gdb crashes by making sure
- that the virtual base pointer from an user object still points to
- accessible memory.
-
- * dbxread.c (dbx_symfile_init): Initialize sym_stab_info to
- clear the recently added header_files fields.
- (dbx_symfile_finish): Free hfiles[i].vector to avoid storage leak.
-
-Fri Nov 8 14:30:23 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * config/tm-sh.h: Added a missing comma in middle of
- REGISTER_NAMES list.
-
-Fri Nov 8 12:29:51 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * monitor.c: Fix some formatting and comments.
-
- * remote-sim.c (simulator_command): Set up callbacks before
- entering the simulator.
-
-Thu Nov 7 15:19:08 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-tdep.c: Fix some problems with inferior function calls.
- * config/d10v/tm-d10v.h (EXTRA_FRAME_INFO): Change dummy to be
- a pointer to the dummy's stack instead of just a flag.
-
-Tue Nov 5 10:21:02 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * m32r-tdep.c: Improved frame_chain and fn prologue analysis.
- * config/tm-m32r.h: Add framesize and register to extra_frame_info.
-
-Tue Nov 5 10:08:07 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * mswin/gdbwin.h: Remove bogus definition of CORE_ADDR.
- * mswin/srcwin.cpp (CSrcScroll1::CSrcScroll1): Initialize depth
- to fix divide-by-zero problem with clicking on source window.
-
-Mon Nov 4 00:48:37 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * mswin/recordit: Fix problem with absolute paths.
- * mswin/recordit: Fix problem with relative paths.
-
-Sun Nov 3 18:06:42 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * mswin/{Makefile.in configure configure.in}: New files for
- configuring wingdb under Unix.
-
-Sat Nov 2 03:54:13 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * irix5-nat.c, osfsolib.c, solib.c (symbol_add_stub): Handle
- missing or zero-sized .text sections properly.
- * mdebugread.c: Handle scRConst and scSUndefined storage classes.
- * stabsread.c (scan_file_globals): Try to resolve symbols
- for shared libraries from the minimal symbol table of the main
- executable first.
-
-Fri Nov 1 13:59:28 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-tdep.c, config/d10v/tm-d10v.h: Major fixes to support
- inferior function calls and proper stack backtracing on D10V-EVA
- board.
-
-Fri Nov 1 10:50:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/powerpc/linux.mh (NATDEPFILES): Fix up things so that it
- links.
- (GDBSERVER_DEPFILES,TERMCAP): Ditto.
-
- * monitor.c (dev_name,targ_ops): Move static variables before
- first use, to avoid compiler warnings.
-
-Thu Oct 31 16:37:17 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * m32r-tdep.c: Improved frame_chain and fn prologue analysis.
- * configure.tgt: Add entry for m32r target.
- * monitor.h: Add a flag to tell monitor_store_register to use
- (val, regno) instead of (regno, val).
- * monitor.c: Make monitor_store_register honor the above flag.
- Make monitor_exp ignore DC1/DC3 for m32r.
- Increase buf size in monitor_dump_regs.
-
-Wed Oct 30 18:14:14 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * m32r-tdep.c, m32r-rom.c: New files.
- * config/m32r/m32r.mt: New file.
- * config/m32r/tm-m32r.h: New file.
-
-Tue Oct 29 16:56:01 1996 Geoffrey Noer <noer@cygnus.com>
-
- * config/i386/xm-cygwin32.h:
- * config/powerpc/xm-cygwin32.h:
- add #define LSEEK_NOT_LINEAR so source lines aren't unexpectedly
- truncated.
-
-Tue Oct 29 18:36:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/powerpc/tm-ppc-eabi.h (TARGET_BYTE_ORDER_SELECTABLE):
- Define.
-
-Tue Oct 29 14:59:20 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * TODO: Add item suggesting an "info bfd" command.
-
-Tue Oct 29 12:48:04 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-tdep.c: Snapshot that supports D10V-EVA board.
-
- * config/d10v/tm-d10v.h (REGISTER_NAMES): Add imap0,imap1,dmap.
- (TARGET_READ_FP,TARGET_WRITE_FP): Define.
-
-Mon Oct 28 17:34:24 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * mswin/genmakes mswin/recordit: New scripts to generate make
- files for MSVC.
-
-Sun Oct 27 20:18:04 1996 Mark Alexander <marka@cygnus.com>
-
- * config/mips/{tm-vr5000.h,tm-vr5000el.h,vr5000.mt,vr5000el.mt}:
- New files.
- * configure.tgt: Modify cases for vr5000 to use new files.
-
-Sat Oct 26 07:15:14 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/alpha/alpha-osf3.mh (XM_CLIBS): Add -lm for OSF/1-4.0.
-
- * procfs.c (proc_set_exec_trap): Under Alpha OSF/1-4.0, tracing
- the entry to the exit system call to detect termination of the
- inferior stopped working. Trace termination of the inferior via
- PRFS_STOPTERM instead.
- (procfs_init_inferior): Do not trace entry to exit system call
- if PIOCSSPCACT is defined.
- (procfs_wait): Handle PR_DEAD event, which signals the termination
- of the inferior if PRFS_STOPTERM is set.
-
- * mdebugread.c (parse_partial_symbols): Ignore stNil section
- start address symbols.
-
- * sparc-tdep.c (get_saved_register): Get saved PC from the
- frame info if not in innermost frame.
-
-Thu Oct 24 10:51:45 1996 Mark Alexander <marka@cygnus.com>
-
- * dbxread.c (process_one_symbol): Interpret end-of-function
- markers correctly; this fixes problem on Vr5000 where all
- functions in a module had the same address.
- * configure.in, configure.tgt, configure.host, gdbserver/configure.in:
- Correct for pc-linux-gnu problem in config.guess.
- * configure: Regenerate.
-
-Thu Oct 24 10:06:58 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dbxread.c: Don't swap symbols in place, since internal and
- external forms may have different sizes. Don't assume that an
- internal_nlist has the same layout as an external_nlist. Create
- symbol for n_strx element so to hide specifics of nlist from
- partial-stab.h.
- * partial-stab.h: Don't reference dbxread symbols directly. Use
- CUR_SYMBOL_STRX instead.
- * config/i386/xm-windows.h: Define SIGQUIT and SIGTRAP.
-
- * config/v850/tm-v850.h: Define PS_REGNUM and TARGET_V850 for
- MSVC builds.
- * mswin/gdbwin.c (reg_order): Define register order for V850.
- * mswin/gui.cpp (CGuiApp::InitInstance): Define target name for
- V850.
- * mswin/regdoc.h: Define MAXREGS for V850.
-
-Tue Oct 22 16:28:20 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * v850-tdep.c (scan_prologue): Changes to deal with scheduled
- prologues correctly. First, prologue end is now defined by
- presence of a branch, jump or call insn. Second, can no longer
- fix frame offsets because we may not know the offset until after a
- register has been saved.
- * (v850_init_extra_frame_info): Fixup frame offsets here because
- we have all the info at this time.
- * (v850_frame_chain): Use new calling convention for scan_prologue.
-
-Tue Oct 22 10:25:29 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-tdep.c, config/d10v/tm-d10v.h: Changes to allow stack
- backtraces and inferior function calls.
-
-Tue Oct 22 10:32:46 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Update init.c editing to work with Oct 8 change.
- (@HLDFLAGS@): Always edit out.
-
-Mon Oct 21 18:17:08 1996 Mark Alexander <marka@cygnus.com>
-
- * mdebugread.c (parse_partial_symbols): Fix 64-bit
- sign-extension problems in calculating psymtab addresses.
- * buildsym.c (end_symtab): Use macro to pop context.
-
-Mon Oct 21 14:40:50 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * v850-tdep.c: Cleanup lots of things. Add many comments.
-
- * v850-tdep.c (v850_init_extra_frame_info v850_frame_chain): Fix
- sign bugs with scanning prologues. Get a little smarter about
- calculating the length of uninteresting instructions.
-
-Mon Oct 21 14:01:38 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * top.c: Add new commands "set annotate" and "show annotate".
-
-Sun Oct 20 04:38:39 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * corelow.c (core_close): Clear inferior_pid only if there is
- an open core_bfd.
-
- * cp-valprint.c (cp_print_value_fields): Pass correct address
- to val_print, not 0.
-
- From Andreas Schwab (schwab@issan.informatik.uni-dortmund.de):
- * eval.c (evaluate_subexp_standard) [case BINOP_REPEAT]: Chase
- typedefs before checking for integral type of right operand.
-
-Fri Oct 18 17:26:22 1996 Mark Alexander <marka@cygnus.com>
-
- * mdebugread.c (parse_symbol): Fix crash when malloc has
- no type info and void type has no associated pointer type.
-
-Thu Oct 17 18:18:20 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.host: New file, host configuration mapping.
- * configure.tgt: New file, target configuration mapping.
- * configure.in: Remove host and target mapping.
- * configure: Rebuild.
-
-Wed Oct 16 17:46:03 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * breakpoint.c (must_shift_inst_regs): New global.
- (bpstat_stop_status): Change #if uses of DECR_PC_AFTER_BREAK into
- equivalent expression uses.
- * infrun.c (wait_for_inferior): Ditto.
-
-Wed Oct 16 01:53:43 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * v850-tdep.c (v850_push_arguments): Use symbolic names for arg
- registers.
- * config/v850/tm-v850.h: Change FP to 29. Define arg regs.
-
-Tue Oct 15 16:30:07 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * Makefile.in (init.c): Don't use -s option with grep. It means
- something different under Digital Unix.
-
- * buildsym.c (finish_block): Treat LOC_BASEREG_ARG and
- LOC_LOCAL_ARG as arguments so that GDB will know about function
- args declared this way. Mostly affects dwarf.
- * dwarfread.c (decode_die_type): Change default type from int to
- void. This allows GDB to recognize void functions.
- * (new_symbol): If AT_PROTOTYPED is present, set a flag in the
- type structure.
- * findvar.c (extract_floating store_floating): Clean up comments
- to reflect reality.
- * gdbtypes.h: Add TYPE_FLAG_PROTOTYPED so that we can tell if a
- function has a prototype. Currently, only dwarf supports this.
- * utils.c (floatformat_from_doublest): Fix logic error with
- converting from double to float. (It wasn't shifting mant_long if
- it had a hidden bit.)
- * v850-tdep.c: Add support for function calling. Fix some
- problems with debugging code w/o debug symbols.
- * config/v850/tm-v850.h: Ditto.
-
-Tue Oct 15 18:19:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * utils.c: Always ensure that size_t is defined. Check
- HAVE_STDDEF_H rather than __STDC__
- (xmalloc, xrealloc): Use size_t rather than long.
-
-Tue Oct 15 14:24:19 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * config/powerpc/tm-ppc-eabi.h: Undefine NO_SINGLE_STEP so targets
- can use single-step commands.
-
-Sun Oct 13 11:38:25 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * stabsread.c (define_symbol): If REG_STRUCT_HAS_ADDR is non-zero,
- follow typedefs before checking TYPE_CODE for structures and unions.
-
-Fri Oct 11 15:43:54 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * frame.h: Move definition of struct frame_saved_regs to before
- struct frame to make it possible to use frame_saved_regs in
- EXTRA_FRAME_INFO macro.
-
- * v850-tdep.c config/v850/tm-v850.h: Lotsa new functions and
- macros to make frame operations (such as backtrace) work.
-
-Fri Oct 11 14:23:50 1996 Fred Fish <fnf@cygnus.com>
-
- * dbxread.c (process_one_symbol): Check for null string directly
- rather than using strcmp against "".
- * partial-stab.h: Ditto.
-
-Fri Oct 11 12:18:32 1996 Mark Alexander <marka@cygnus.com>
-
- * gdbserver/{gdbreplay.c,low-linux.c,remote-utils.c,utils.c}:
- Make it compile on Linux and eliminate some warnings.
-
-Thu Oct 10 16:32:08 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * Makefile.in (init.c): Fixup final sed script to work around
- Linux bug with `p' operator.
-
-Wed Oct 9 18:02:48 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-mips.c: Use the correct name everywhere (DDB) for NEC's
- VR4300 target.
- (ddb_ops, pmon_ops): Fix the documentation strings.
-
-Wed Oct 9 07:42:44 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * Makefile.in (init.c): Retro HPUX grep lacks -h option. Strip
- filenames with sed instead.
-
-Tue Oct 8 15:59:44 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * defs.h: Remove decls of xmalloc and xrealloc. There is a
- conflicting definition in libiberty.h.
-
-Tue Oct 8 11:47:13 1996 Fred Fish <fnf@cygnus.com>
-
- * dbxread.c (dbx_symfile_read): Call free_pending_blocks rather
- than poking global variable (which is now static).
- * hpread.c (hpread_build_psymtabs): Ditto.
- * os9kread.c (os9k_symfile_read): Ditto.
- * xcoffread.c (xcoff_initial_scan): Ditto.
-
- * buildsym.h (free_pending_blocks): Declare here.
- (pending_blocks): Remove declaration of global symbol.
- (free_pendings): Remove declaration of global symbol.
- (make_blockvector): Declare here.
- (record_pending_block): Declare here.
-
- * dstread.c (make_blockvector): Remove static copy that was old
- clone of version in buildsym.c.
- (process_dst_block): Call record_pending_block rather than doing
- it by hand.
- (read_dst_symtab): Ditto.
-
- * buildsym.c (make_blockvector): Make global rather than static,
- (record_pending_block): New function, code moved from finish_block.
- (finish_block): Use record_pending_block.
- (free_pending_blocks): New function.
- (really_free_pendings): Call free_pending_blocks.
- (pending_blocks): Make static instead of global.
- (free_pendings): Make static instead of global.
-
-Tue Oct 8 09:03:22 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * config/i386/windows.mh config/i386/xm-windows.h:: New config
- files to support building Wingdb (built under Microsoft build
- environment).
-
- * Makefile.in: Add rule for hpux-thread.o (needs special header
- files).
- * (SUBDIRS): Remove mswin.
- * Change procedure for creating init.c. Speeds things up quite a
- bit.
- * config.in configure configure.in: Check for select, poll.
- * Check for OSF header files before including hpux-thread.o.
- * Don't configure doc or testsuite when building under MSVC.
- * findvar.c value.h (read_register_pid write_register_pid): Make
- global. Needed for hppa-tdep.c.
- * (supply_register): Don't set pid to inferior_pid when supplying
- registers.
- * hppa-tdep.c (saved_pc_after_call): frame_saved_pc ->
- FRAME_SAVED_PC.
- * (frame_saved_pc): Change name to hppa_frame_saved_pc.
- * (hppa_pop_frame): Don't use a pid of 0 with target_write_pc.
- Use write_pc instead, which uses the correct pid.
- * (target_read_pc target_write_pc): Use read/write_register_pid
- instead of read/write_register to preserve the pid passed in.
- * inftarg.c (child_can_run): Add flag child_suppress_run to allow
- hpux-threads.c to override this as a runnable target.
- * config/pa/nm-hppah.h: Define target_new_objfile and
- target_pid_to_str.
- * config/pa/tm-hppa.h (FRAME_SAVED_PC): Use hppa_frame_saved_pc
- instead of frame_saved_pc.
- * config/m68k/tm-m68k.h: Define TARGET_M68K for Wingdb.
- * config/m68k/tm-monitor.h: Use FRAME_CHAIN_VALID_ALTERNATE, since
- we can't easily determine the start file bounds with ELF.
- * config/mips/tm-mips.h: Define TARGET_MIPS for Wingdb.
- * hpux-thread.c: New file for HPUX/OSF thread support.
- * osf-share/{README AT386/cma_thread_io.h HP800/cma_thread_io.h
- RIOS/cma_thread_io.h cma_attr.h cma_deb_core.h cma_debug_client.h
- cma_errors.h cma_handle.h cma_init.h cma_list.h cma_mutex.h
- cma_sched.h cma_semaphore_defs.h cma_sequence.h cma_stack.h
- cma_stack_int.h cma_tcb_defs.h cma_util.h}: New files for OSF
- thread support.
-
-Sun Oct 6 15:48:09 1996 Fred Fish <fnf@cygnus.com>
-
- * buildsym.c (finish_block): Change innerblock_anon_complaint to
- print the addresses as part of the complaint. Add a complaint for
- cases where the block end address is smaller than the block start
- address, in case any such conditions slip through our fixup mechanism.
- * symmisc.c (dump_symtab): Only print blockvector for primary
- symtabs, to avoid massive duplication of output due to secondary
- symtabs that point to same blockvector. Also do some minor
- formatting tweaks.
-
-Mon Oct 7 10:42:32 1996 Per Bothner <bothner@deneb.cygnus.com>
-
- Replace header_files global by per-objfile field.
- * gdb-stabs.h (struct dbx_symfile_info): Add fields header_files,
- n_header_files, n_allocated_header_files.
- * stabsread.h (header_files, n_header_files, n_allocated_header_files):
- Replace externs by macros HEADER_FILES, N_HEADER_FILES, and
- N_ALLOCATED_HEADER_FILES.
- * dbxread.c (dbx_symfile_finish): Free HEADER_FILES.
- (free_header_files, init_header-files): Don't free/init headerfiles.
- (various functions): Use macros instead of header_files globals.
- * stabsread.c (various functions): Likewise.
-
-Sun Oct 6 22:43:06 1996 Jason Merrill <jason@yorick.cygnus.com>
-
- * dwarf2read.c (read_tag_reference_type): New fn.
- (read_type_die): Call it.
- (dwarf_attr): Also look in the DIEs referred to by specification
- or abstract_origin attributes.
-
-Wed Oct 2 22:07:16 1996 Fred Fish <fnf@cygnus.com>
-
- * inferior.h (IN_SIGTRAMP): Pass pc to SIGTRAMP_START and
- SIGTRAMP_END.
- * config/i386/tm-i386os9k.h (SIGTRAMP_START, SIGTRAMP_END):
- Define with dummy pc arg.
- * config/m68k/tm-nbsd.h: Ditto.
- * doc/gdbint.texinfo: Document that SIGTRAMP_START and
- SIGTRAMP_END are macros that take an single argument.
-
-Mon Sep 30 20:02:45 1996 Fred Fish <fnf@cygnus.com>
-
- * defs.h: Remove define of PRIVATE_XMALLOC.
-
-Mon Sep 30 15:39:28 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * config/v850/tm-v850.h: Use distinct register for PC, not EIPC.
-
-Mon Sep 30 11:16:34 1996 Jeffrey A Law (law@cygnus.com)
-
- * top.c (execute_control_command): Free values from while_control
- and if_control conditions after evaluation to avoid storage leaks.
- From Peter Schauer.
-
-Fri Sep 27 17:43:06 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * configure configure.in: Recognize v850 target.
- * v850-tdep.c: New file, NEC V850 target support.
- * config/v850/{v850.mt tm-v850.h}: New files for NEC V850 support.
-
-Fri Sep 27 14:48:15 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * infrun.c (wait_for_inferior): Update current_line and
- current_symtab when stepping continues in the middle of a new line.
-
-Fri Sep 27 10:25:30 1996 Fred Fish <fnf@cygnus.com>
-
- * top.c (print_gdb_version): Rewrote to comply with new GNU coding
- standards for the --version option.
- (print_gnu_advertisement): Remove, now part of print_gdb_version.
- (show_version): Remove call to print_gnu_advertisement.
- * top.h (print_gnu_advertisement): Remove prototype.
- * main.c (print_gdb_help): Move help to static function and
- add prototype.
- (main): Call print_gdb_help rather than inlining it.
- (main): Remove call to print_gnu_advertisement.
-
-Fri Sep 27 13:32:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/d10v/tm-d10v.h (TARGET_{INT,PTR}_BIT): Define.
- (TARGET_{,LONG_}DOUBLE_BIT): Ditto.
-
-Thu Sep 26 23:10:26 1996 Mark Alexander <marka@cygnus.com>
-
- * configure.in, config/i386/tm-linux.h: Fix configure
- problem on older Linux systems that prevented core files
- from being recognized.
-
-Wed Sep 25 18:31:33 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * dbug-rom.c: New file, support for Motorola's dBUG monitor.
- * config/m68k/monitor.mt (TDEPFILES): Add it.
- * NEWS: Mention it.
-
-Mon Sep 23 16:13:50 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * config/d10v/tm-d10v.h (SAVED_PC_AFTER_CALL): Fixed.
- Now single-steps correctly.
- * d10v-tdep.c (d10v_pop_frame): Fixed.
-
-Fri Sep 20 16:10:58 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/sh/tm-sh.h (REGISTER_NAMES): Move fp registers to
- be consistent with GCC.
- (FPUL_REGNUM, etc): Renumber to match list changes.
- (ADDR_BITS_REMOVE): Delete.
- * sh-tdep.c (sh_reg_names, sh3_reg_names, sh3e_reg_names):
- Rearrange to match REGISTER_NAMES.
- * sh3-rom.c (sh3_regnames, sh3e_regnames): Ditto.
-
-Thu Sep 19 16:19:01 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-tdep.c: Stack chain should work now.
-
-Tue Sep 17 18:46:57 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v-tdep.c, config/d10v/tm-d10v.h: Snapshot.
-
-Tue Sep 17 12:20:50 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add cases for MIPS 5000 like MIPS 4300.
- * configure: Rebuild.
-
-Tue Sep 17 12:09:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
-
- * ser-e7kpc.c: Added wingdb support for target e7000pc.
-
-Tue Sep 17 10:56:52 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * remote-mips.c (pmon_wait): DDB PMON does not require forced
- re-entry back into debug mode.
-
-Mon Sep 16 14:32:58 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * remote-mips.c (mips_load): Ensure that the PC is explicitly
- loaded after a load to a DDB PMON system.
-
-Fri Sep 13 12:02:39 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (INTERNAL_LDFLAGS): Add @HLDFLAGS@ to list.
- (HLDENV): Set to @HLDENV@.
- (gdb): Prefix link command line with $(HLDENV).
- * configure.in: Add support to test for --enable-shared and
- generate appropriate values for HLDFLAGS and HLDENV.
- * configure: Regenerated with autoconf.
-
-Sun Sep 8 15:26:27 1996 Fred Fish <fnf@cygnus.com>
-
- * alpha-nat.c (fetch_core_registers): Match Sep 4 gdbcore.h prototype
- change for core_read_registers in struct core_fns.
- * core-regset.c (fetch_core_registers): Ditto & add prototype.
- * core-sol2.c (fetch_core_registers): Ditto & add prototype.
- * i386aix-nat.c (fetch_core_registers): Ditto & add prototype.
- * i386b-nat.c (fetch_core_registers): Ditto.
- * i386mach-nat.c (fetch_core_registers): Ditto & add prototype.
- * irix4-nat.c (fetch_core_registers): Ditto.
- * irix5-nat.c (fetch_core_registers): Ditto.
- * lynx-nat.c (fetch_core_registers): Ditto & add prototype.
- * m68knbsd-nat.c (fetch_core_registers): Ditto.
- * mips-nat.c (fetch_core_registers): Ditto & add prototype.
- * rs6000-nat.c (fetch_core_registers): Ditto.
- * sparc-nat.c (fetch_core_registers): Ditto.
- * sun3-nat.c (fetch_core_registers): Ditto & add prototype.
- * ultra3-nat.c (fetch_core_registers): Ditto & add prototype.
-
- * alpha-nat.c (register_addr): Match Sep 4 gdbcore.h prototype change.
- * delta68-nat.c (register_addr): Ditto.
- * gdbserver/low-linux.c (register_addr): Ditto.
- * gdbserver/low-hppabsd.c (register_addr): Ditto.
- * i386m3-nat.c (register_addr): Ditto.
- * mips-nat.c (register_addr): Ditto.
- * ultra3-nat.c (register_addr): Ditto.
-
-Sun Sep 8 15:14:00 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * blockframe.c (inside_main_func): Cleanup slightly. Move
- mainsym def into the block it's used in.
- * configure.in configure: Allow NATDEPFILES to be recognized in
- .mh files regardless of whitespace.
-
- * cpu32bug-rom.c (cpu32bug_cmds): Change load_response string to
- keep downloads from hanging.
-
- * remote-wiggler.c: Add support for flash upgrades.
- * (wiggler_error): Fix message format. Add new error code.
- * (wiggler_write_byets): Error code is hex. Report errors with
- proper routine name.
- * (wiggler_read_byets): Report errors with proper routine name.
- * (get_packet): Add support for new flash commands.
- * (wiggler_load): Call clear_symtab_users() to reset things
- properly after download.
- * (flash_xfer_memory bdm_update_flash_command): New funxtions to
- support flash upgrades for Wiggler.
- * (_initialize_remote_wiggler): Add `bdm update-flash' command.
-
-Fri Sep 6 13:14:13 1996 Geoffrey Noer <noer@cygnus.com>
-
- * ser-tcp.c: don't include netinet/tcp.h if __CYGWIN32__
-
-Thu Sep 5 17:05:13 1996 Geoffrey Noer <noer@cygnus.com>
-
- * config/i386/cygwin32.mh:
- * config/powerpc/cygwin32.mh: build ser-tcp.o for both hosts
-
-Thu Sep 5 12:09:13 1996 Per Bothner <bothner@deneb.cygnus.com>
-
- * value.h (COERCE_REF): Fix previous change.
- (COERCE_ENUM): Add a check_typedef (this is the real fix).
-
-Thu Sep 5 03:28:30 1996 Wilfried Moser <moser@rtl.cygnus.com>
-
- * eval.c (evaluate_subexp_standard): In case of OP_ARRAY: make a
- better check of array boundaries.
-
-Thu Sep 5 01:29:42 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * configure: Update aclocal.m4 and re-run autoconf to get correct
- defs for BFD stuff.
- * remote-wiggler.c (wiggler_error): Error codes are hex. Also,
- fix default message generation.
-
-Wed Sep 4 17:28:40 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * Makefile.in: Add mswin to SUBDIRS. Add rules for
- mswin/libwingdb.a and remote-wiggler.o.
- * breakpoint.c (breakpoint_here_p): Clean up bp enabled test.
- * (breakpoint_inserted_here_p): New func, just like
- breakpoint_here_p, except it's honest. Honestly.
- * breakpoint.h: Proto for above.
- * configure configure.in: Add mswin to configdirs if host is
- i[3456]86-*-windows.
- * core-aout.c (fetch_core_registers register_addr) gdbcore.h:
- Change all vars that can contain addresses to type CORE_ADDR.
- * findvar.c (supply_register): Allow val to be NULL. This means
- that regno is unsupported.
- * (read_pc read_pc_pid write_pc write_pc_pid): Make non-pid forms
- just call pid forms with inferior_pid so that there's only once
- place to hack PC's and such.
- * infrun.c (proceed): Don't skip breakpoints if user changed PC.
- * remote-wiggler.c: New file. Support for BDM interface from
- Macraigor Systems.
- * serial.c: Enhance serial logging capability. Add hex and octal
- output modes (set remotelogbase {hex|octal|ascii}. Also log
- breaks, timeouts, errors, and eofs.
- * serial.h: Redefine SERIAL_SEND_BREAK to go through a wrapper
- function so that we can log breaks. Don't export serial_logfile
- or serial_logfp.
- * top.c (execute_command): Don't test for serial_logfp here.
- Just call serial_log_comand, and let serial.c sort it out.
- * valops.c (value_of_variable): Don't attempt to establish frames
- for static and global variables. This makes things work a bit
- better if the stack or frame pointer is trashed.
- * config/m68k/monitor.mt (TDEPFILES): Add remote-wiggler.o.
- * config/m68k/tm-m68k.h: Define STACK_ALIGN. CPU32 can't hack
- misaligned stacks during function calls.
-
-Wed Sep 4 13:06:26 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * terminal.h: Don't use #elif.
-
-Wed Sep 4 06:49:35 1996 Wilfried Moser <moser@rtl.cygnus.com>
-
- * ch-exp.c (parse_tuple_element): Allow (*): for array tuples
- if we have a type.
-
- * eval.c (evaluate_subexp_standard): In case of OP_ARRAY:
- check number of args against bounds of array to avoid
- memory corruption.
-
- * value.h (COERCE_REF): Do a CHECK_TYPEDEF in case we get
- a TYPE_CODE_TYPEDEF.
-
-Fri Aug 30 15:07:14 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * remote-mips.c: Provide support for DDBVR4300 target board.
- (ddb_open, ddb_ops): Added.
- (mips_monitor_type): MON_DDB Added.
- (mips_enter_debug, mips_exit_debug, mips_initialize,
- mips_fetch_registers, common_breakpoint, mips_load,
- _initialize_remote_mips): Updated.
-
-Thu Aug 29 17:00:18 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * nlm/configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
- * nlm/configure: Regenerate.
-
- * gdbserver/configure.in (i[345]86-*-*): Recognize i686 for
- pentium pro.
-
-Wed Aug 28 13:11:15 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: If CY_AC_PATH_TCLCONFIG can't find TCL, don't run
- CY_AC_LOAD_TCLCONFIG.
- * configure: Rebuild.
-
-Tue Aug 27 12:40:40 1996 Fred Fish <fnf@cygnus.com>
-
- * infrun.c (wait_for_inferior): Initialize stop_func_end before calling
- find_pc_partial_function.
-
-Tue Aug 27 10:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure: Regenerate again.
-
-Tue Aug 27 04:25:08 1996 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: work around host_alias configure bug.
- AC_CANONICAL_HOST is called twice (first by AC_CHECK_TOOL
- and second by AC_CANONICAL_SYSTEM). The second clobbers the
- previous setting. Circumventing by moving the second check
- to before the first.
- * configure: regenerated
-
-Mon Aug 26 18:36:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * config/d10v/d10v.mt: New file.
- * config/d10v/tm-d10v.h: New file.
- * configure.in: New target D10V.
- * d10v-tdep.c: New file.
-
-Sun Aug 25 00:09:47 1996 Fred Fish <fnf@rtl.cygnus.com>
-
- * rs6000-tdep.c: Fix typo in comment.
- * valops.c (call_function_by_hand): Set using_gcc to 2
- for code compiled without -g, per comment in code.
- * config/a29k/tm-a29k.h (STACK_ALIGN): Add comment.
- * config/sparc/tm-sparc.h (STACK_ALIGN): Add comment.
- * config/sparc/tm-sp64.h (STACK_ALIGN): Add comment.
- * config/pyr/tm-pyr.h (STACK_ALIGN): Add comment.
- * config/m88k/tm-m88k.h (STACK_ALIGN): Add comment.
- * config/pa/tm-hppa.h (PUSH_ARGUMENTS): Enclose args in ()'s.
- (STACK_ALIGN): Add comment, move to be with other associated
- macros, and document.
- * config/mips/tm-mips.h (PUSH_ARGUMENTS): Enclose args in ()'s.
- (STACK_ALIGN): Remove completely, handled by PUSH_ARGUMENTS.
- * config/alpha/tm-alpha.h (PUSH_ARGUMENTS): Enclose args in ()'s.
- * config/rs6000/tm-rs6000.h (STACK_ALIGN): Remove completely,
- handled by PUSH_ARGUMENTS.
- (PUSH_ARGUMENTS): Enclose args in ()'s.
-
-Fri Aug 23 13:55:05 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * infrun.c (wait_for_inferior): Try to reenable shared library
- breakpoints even if auto_solib_load is not set.
-
-Wed Aug 21 16:31:27 1996 Fred Fish <fnf@cygnus.com>
-
- * valprint.c (print_longest): Test for CC_HAS_LONG_LONG as well as
- PRINTF_HAS_LONG_LONG.
- * expprint.c (dump_expression): Ditto.
- * configure.in: Fix check for long long support in compiler to
- use a function body, not a nested function.
- * configure: Rebuild with autoconf.
-
-Tue Aug 20 17:59:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * aclocal.m4: Include ../bfd/aclocal.m4.
- * configure.in: Add stdlib.h to AC_CHECK_HEADERS. Call
- BFD_NEED_DECLARATION on malloc, realloc, and free.
- * acconfig.h: Add NEED_DECLARATION_MALLOC,
- NEED_DECLARATION_REALLOC, and NEED_DECLARATION_FREE.
- * configure, config.in: Rebuild.
- * defs.h: Include <stddef.h> and <stdlib.h> based on HAVE_*_H
- rather than __STDC__. Only declare malloc, realloc, and free if
- NEED_DECLARATION_* is defined.
-
-Tue Aug 20 15:37:03 1996 Fred Fish <fnf@cygnus.com>
-
- * solib.c (_initialize_solib): Add missing '\' chars at ends of
- strings that continue on next line.
- (enable_break): Replace "return 0" with setting success to zero
- and letting normal return handle the return.
-
-Sat Aug 17 14:16:23 1996 Fred Fish <fnf@cygnus.com>
-
- * mips-tdep.c (mips_push_arguments): Make sure sp and struct_addr
- are properly aligned.
-
-Fri Aug 16 17:54:26 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * rs6000-tdep.c (rs6000_fix_call_dummy): Add full set of arguments.
- * config/rs6000/tm-rs6000.h (FIX_CALL_DUMMY): Pass all arguments
- to function, declare function correctly.
-
-Fri Aug 16 17:24:35 1996 Dawn Perchik <dawn@critters.cygnus.com>
-
- * symtab.h: changed namespace to _namespace for compiling under
- MFC v4.0.
-
-Fri Aug 16 13:52:21 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Update for various recent changes, add some
- comments.
-
-Fri Aug 16 15:47:36 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/rs6000/tm-rs6000.h (FIX_CALL_DUMMY): Cast args to be an
- integer for type correctness.
-
-Fri Aug 16 15:15:37 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * config/mips/{vr4300.mt, vr4300el.mt} (SIM): Add -lm when
- simulator is included.
-
-Thu Aug 15 13:44:13 1996 Fred Fish <fnf@cygnus.com>
-
- * findvar.c (write_register_pid): Only needed when TARGET_WRITE_PC
- is not defined.
- (read_register_pid): Only needed when TARGET_READ_PC is not
- defined.
- * hppa-tdep.c (frame_saved_pc): Remove prototype.
- * infptrace.c (udot_info): Prototype when CHILD_XFER_MEMORY is
- not defined.
- * config/xm-aix4.h (aix_resizewindow): Convert old style decl
- to prototype.
- * xcoffsolib.c (command.h): Include for needed prototypes.
-
-Wed Aug 14 17:54:19 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * config/i386/cygwin32.mh: Set NAT_FILE to nm-empty.h to make
- native work.
-
-Wed Aug 14 02:03:42 1996 Fred Fish <fnf@cygnus.com>
-
- From Blair MacIntyre <bm@cs.columbia.edu>:
- * hppa-tdep.c (hppa_fix_call_dummy): Use MSYMBOL_TYPE rather
- than SYMBOL_TYPE on msymbols.
- * somsolib.c (som_solib_create_inferior_hook): Ditto.
-
- * Makefile.in (init.c): Generate with prototypes.
-
- * config/pa/tm-hppa.h (frame_saved_pc): Add prototype.
- * config/rs6000/xm-rs6000.h (aix_resizewindow): Ditto.
- * config/rs6000/tm-rs6000.h (frame_initial_stack_address): Ditto.
- (pc_load_segment_name): Ditto.
- (pop_frame): Ditto.
- (extract_return_value): Ditto.
- (is_magic_function_pointer): Ditto.
- (push_dummy_frame): Ditto.
- (fix_call_dummy): Ditto.
- (push_arguments): Ditto.
- (skip_trampoline_code): Ditto.
- (aix_process_linenos): Ditto.
-
- * config/m68k/tm-cisco.h (get_longjmp_target): Add prototype.
- * config/m68k/tm-es1800.h: Ditto.
- * config/m68k/tm-vx68.h: Ditto.
- * config/m68k/tm-sun3.h: Ditto.
- * config/m68k/tm-m68kv4.h: Ditto.
-
-Tue Aug 13 23:04:36 1996 Fred Fish <fnf@cygnus.com>
-
- * config/mips/nm-mips.h (get_longjmp_target): Add prototype.
- * config/mips/nm-irix3.h (get_longjmp_target): Add prototype.
- * remote-mips.c (mips_read_processor_type): Remove prototype.
- * mips-tdep.c (gdb_print_insn_mips): Add prototype and make static.
- * irix5-nat.c (fetch_core_registers): Add prototype.
-
-Mon Aug 12 21:23:44 1996 Fred Fish <fnf@cygnus.com>
-
- * remote-pa.c (boot_board): Add dummy params to make type compatible
- for passing to add_com.
- * scm-exp.c (scm_lreadr): Ensure svalue is not used uninitialized.
- * buildsym.c (compare_line_numbers): Change function to match
- prototype and also what qsort expects.
-
-Mon Aug 12 19:19:00 1996 Mark Alexander <marka@cygnus.com>
-
- * remote.c: Make remote_write_size public.
- * sh-tdep.c (_initialize_sh_tdep): Set remote_write_size to 300
- to prevent packet errors with some versions of CMON.
-
-Mon Aug 12 16:20:58 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * defs.h: Define CONST_PTR as blank if compiling with Microsoft
- C, else it's `const'.
- * c-lang.c c-lang.h ch-lang.c f-lang.c language.c m2-lang.c
- scm-lang.c: Microsoft C can't hack const pointers. Use CONST_PTR
- macro instead.
- * configure configure.in defs.h: Use AC_C_CONST to figure out if
- the compiler supports const. Gets rid of some cruft in defs.h.
- * dwarf2read.c: <string.h> -> "gdb_string.h"
- * remote-sim.c: Add prototypes. Fix call to gdbsim_kill.
- * sparcl-tdep.c (download): Add prototypes to write_routine and
- start_routine args.
-
- * mswin/gdbwin.c: Don't include both varargs.h AND stdarg.h. Get
- rid of varargs.h Include string.h.
- * (gdbwin_update gdbwin_fputs regs_changed_f bpt_changed_f
- update): Fix prototypes, fix calls.
- * (update): Return value for catch_errors.
- * (run_execute_command togdb_command_from_tty togdb_command):
- Cleanup catching of errors from calls to execute_command. Also,
- dup command string to avoid modifying const strings.
- * (togdb_breakinfo_i_init togdb_breakinfo_i_next): Use 0 instead
- of NULL when see if b->address isn't set.
- * (bi_disable_bpt bi_enable_bpt bi_delete_all
- bi_delete_breakpoint): Add arg to calls to update.
- * (gui_command): Add prototype.
- * (mswin_query): Fix prototype.
- * (_initialize_gdbwin): Dup string to avoid modifying const.
- * (info_path togdb_get_info_path): Remove const from decls cuz
- this can't be const (it points at malloc'ed memory).
- * (togdb_searchpath): Remove const from path. Dup string to
- avoid modifying const strings.
- * rindex -> strrchr.
- * (gdbwin_list_symbols): Regexp param is const.
- * Fix lots of refs to psymtabs to deref correct pointers.
- * (togdb_set_breakpoint_sal): Call set_breakpoint_sal with sal,
- not &sal.
- * mswin/gdbwin.h (togdb_searchpath togdb_get_info_path
- toget_set_info_path): Fix prototypes to match reality.
- * mswin/gui.cpp: Define _beginthreadex and _endthreadex routines
- with proper prototypes.
- * mswin/iface.cpp (gdbwin_fputs): Define with correct number of args.
- * mswin/ser-win32s.c: Fix defs of min and max.
- * mswin/serdll32.c (OpenComm16): Make cbInQueue and cbOutQueue be
- USHORT.
- * (WriteComm16): Change lpBug from LPVOID to LPCSTR.
- * mswin/serdll32.h: Fix prototypes for OpenComm16 and WriteComm16.
-
-Sun Aug 11 20:54:16 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * main.c (main): Make sure command loop is used with cygwin32.
- * terminal.h: Allow cygwin32 to use termios.h.
-
-Fri Aug 9 12:42:49 1996 Jeffrey A Law (law@cygnus.com)
-
- * somread.c (som_symtab_read): Handle secondary definition
- symbols (aka weak symbols).
-
- * config/tm-hppa.h (EXTRACT_RETURN_VALUE): Fix thinko in
- last change.
-
-Thu Aug 8 10:12:36 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * symfile.c (symfile_bfd_open): Change ifdef from __WIN32__ to
- _WIN32.
-
- * somread.c: Rearrange order of includes to fix warnings under
- hpux-10.10. Also don't include sys/file.h.
-
-Wed Aug 7 21:45:52 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dbxread.c: Don't include param.h or sys/file.h.
- * (dbx_symfile_read): Determine symfile_relocatable from bfd
- flags instead of file extension. Also clean up a little bit.
-
-Wed Aug 7 17:18:37 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dwarf2read.c dwarfread.c exec.c infcmd.c infrun.c main.c
- mdebugread.c os9kread.c source.c top.c utils.c: Don't
- include param.h or sys/file.h (or unistd.h in some cases).
- * defs.h exec.c inflow.c remote-array.c remote-e7000.c
- sparcl-tdep.c terminal.h utils.c: Replace all occurances of
- __WIN32__, WINGDB, WIN32, etc... with _WIN32.
- * main.c: Remove #ifndef WINGDB around option processing. Fix
- bug with passing argc==0 and argv==NULL to getopt.
- * (main) Remove calls to access() before source_command. Let
- soure_command handle access errors.
- * maint.c (maintenance_dump_me): #ifdef out for _WIN32.
- * symtab.c (operator_chars): Make this global for wingdb.
- * top.c (disconnect): #ifdef out for _WIN32.
- * (source_command): If got an error and from_tty, then call print
- error, else just return quietly.
- * utils.c (fatal_dump_core): Can't kill ourselves under windows.
- Just exit.
- * (pollquit notice_quit): #ifdef out stuff that doesn't exist
- under windows.
-
-Wed Aug 7 09:59:19 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/pa/tm-hppa.h (EXTRACT_RETURN_VALUE): Tweak for
- structures > 4 bytes in size.
-
- * valops.c (call_function_by_hand): Handle aligning stacks that
- grow up correctly.
- * config/pa/tm-hppa.h (USE_STRUCT_CONVENTION): Define.
- (STACK_ALIGN): Define.
- * hppa-tdep.c (hppa_alignof): Don't demand a minumim two byte
- alignment on structs/unions.
-
-Sun Aug 4 16:22:42 1996 Fred Fish <fnf@cygnus.com>
-
- * config/powerpc/nm-aix.h (PTRACE_ARG3_TYPE): Define to "int *",
- which is the documented type under at least AIX 3 and AIX 4.
-
-Sat Aug 3 04:02:46 1996 Fred Fish <fnf@cygnus.com>
-
- * config/alpha/alpha-osf3.mh (XM_FILE): Change from xm-alpha.h to
- xm-alphaosf.h.
- (MMALLOC_CFLAGS): Define NO_MMCHECK to not install consistency
- checks.
-
-Thu Aug 1 10:11:34 1996 Fred Fish <fnf@cygnus.com>
-
- * config/mips/tm-mips.h (TM_MIPS_H): Enclose file contents in
- this, define when contents are included.
- (mips_read_processor_type): Add prototype.
- * config/mips/xm-mips.h: Remove strdup decl, now in gdb_string.h
- * mdebugread.c (ecoff_relocate_efi): Add prototype.
- (fixup_sigtramp): Only needed when TM_MIPS_H is defined.
-
-Wed Jul 31 20:21:24 1996 Fred Fish <fnf@cygnus.com>
-
- * rs6000-nat.c (add_vmap): Return 0 to caller rather than random value.
- (vmap_ldinfo): Ensure got_exec_file is not used uninitialized.
- (fetch_core_registers): Add prototype.
- (vmap_symtab): Ditto.
- (objfile_symbol_add): Ditto.
- (add_vmap): Ditto.
- (vmap_ldinfo): Ditto.
- (vmap_exec): Ditto.
-
-Tue Jul 30 17:57:46 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * stabsread.c (get_substring): Declare second arg as int.
-
- * remote-es.c: Include gdb_string.h after defs.h.
-
-Mon Jul 29 21:13:20 1996 Fred Fish <fnf@cygnus.com>
-
- * rs6000-tdep.c (push_arguments): Remove unused variable "pc".
- (branch_dest): Remove unused variable "offset".
- (pop_dummy_frame): Add prototype and make static.
- (push_arguments): Guard against using len uninitialized.
- (push_arguments): Guard against using arg uninitialized.
- (frame_saved_pc): Remove unused variable "frameless".
- (free_loadinfo): Ifdef out unused function.
-
- * xcoffread.c (compare_lte): Change prototype and function to
- be correct type for passing to qsort.
- (add_stab_to_list): Ifdef out unused function and prototype.
- (compare_lte): Add prototype
- (arrange_linetable): Ditto.
- (record_include_begin): Ditto.
- (record_include_end): Ditto.
- (process_linenos): Ditto.
- (xcoff_next_symbol_text): Ditto.
- (scan_xcoff_symtab): Ditto.
- (xcoff_initial_scan): Ditto.
-
- * mips-tdep.c (mips_read_processor_type): Add parens around
- bitwise-and operands in comparison; previous expression always
- evaluated to 0 because of equality comparison of two constants.
-
- * rs6000-tdep.c (skip_prologue): Add missing parens around
- operands of logical-or so that first operand does not bind
- to previous logical-and.
-
- * configure.in: Expand "long long" test to include code that triggers
- known problem on HPUX with native compiler.
- (configure): Regenerated.
-
-Mon Jul 29 18:12:27 1996 Jeffrey A Law (law@cygnus.com)
-
- * somsolib.c (som_solib_create_inferior_hook): Don't
- warn if __d_pid can't be found.
-
-Sun Jul 28 10:46:39 1996 Fred Fish <fnf@cygnus.com>
-
- * config/mips/tm-mips.h (struct frame_info): Forward decl.
- (struct type): Ditto.
- (struct value): Ditto.
-
- * config/mips/tm-mips.h (sigtramp_address): Move extern decl
- from mips-tdep.c to here.
- (sigtramp_end): Ditto.
- (fixup_sigtramp): Ditto.
-
- * config/mips/tm-mips.h (init_extra_frame_info): Add prototype.
- (mips_frame_chain): Ditto.
- (mips_step_skips_delay): Ditto.
- (mips_frame_saved_pc): Ditto.
- (mips_find_saved_regs): Ditto.
- (mips_frame_num_args): Ditto.
- (mips_pop_frame): Ditto.
- (mips_extract_return_value): Ditto.
- (mips_store_return_value): Ditto.
- (mips_push_dummy_frame): Ditto.
- (mips_push_arguments): Ditto.
- (mips_do_registers_info): Ditto.
- (ecoff_relocate_efi): Ditto.
- (ecoff_relocate_efi): Ditto.
- * irix4-nat.c (fetch_core_registers): Add prototype.
- * mips-tdep.c (read_next_frame_reg): Add prototype
- (heuristic_proc_start): Ditto.
- (heuristic_proc_desc): Ditto.
- (mips_print_register): Ditto.
- * config/mips/nm-irix5.h (procfs_set_watchpoint): Add prototype.
- (procfs_stopped_by_watchpoint): Ditto.
- * config/mips/nm-irix4.h (procfs_set_watchpoint): Add prototype.
- (procfs_stopped_by_watchpoint): Ditto.
- * config/alpha/tm-alpha.h (ecoff_relocate_efi): Add prototype.
- (struct symbol): Add forward decl for prototype.
-
- * breakpoint.c (internal_breakpoint_number): Only needed if
- GET_LONGJMP_TARGET or SOLIB_ADD is defined.
-
- * objfiles.c (ecoff_relocate_efi): Remove prototype.
-
-Sat Jul 27 17:47:35 1996 Fred Fish <fnf@cygnus.com>
-
- * configure.in: Add test for "long long" support.
- * configure: Regenerate with autoconf.
- * acconfig.h: Add CC_HAS_LONG_LONG
- * config.in: Regenerate with autoheader.
- * config/mips/tm-mips64.h (FORCE_LONG_LONG): Remove
- * config/sparc/tm-sp64.h (CC_HAS_LONG_LONG): Remove.
- * config/mips/tm-vr4300el.h (CC_HAS_LONG_LONG): Remove.
- * config/mips/tm-vr4300.h (CC_HAS_LONG_LONG): Remove.
- * config/mips/xm-irix5.h (CC_HAS_LONG_LONG): Remove
- (PRINTF_HAS_LONG_LONG): Remove.
- (FORCE_LONG_LONG): Remove.
- * config/powerpc/xm-aix.h (UINT_MAX): Undef and use gdb's version.
- * config/convex/xm-convex.h (CC_HAS_LONG_LONG): Remove
- (PRINTF_HAS_LONG_LONG): Remove.
- * config/xm-nbsd.h (CC_HAS_LONG_LONG): Remove.
- (PRINTF_HAS_LONG_LONG): Remove.
- * config/pa/tm-hppa.h (GET_FIELD): Put parens around
- subtraction inside shift. Put parens around subtraction
- in operand of bitwise and.
- (struct frame_info): Forward declare
- if __STDC__ defined.
- (frame_saved_regs): Ditto.
- (struct value): Ditto.
- (struct type): Ditto.
- (struct inferior_status): Ditto.
- (init_extra_frame_info): Add prototype.
- (skip_prologue): Ditto.
- (frameless_function_invocation): Ditto.
- (frame_chain): Ditto.
- (frame_chain_valid): Ditto.
- (saved_pc_after_call): Ditto.
- (hppa_fix_call_dummy): Ditto.
- (hppa_push_arguments): Ditto.
- (pa_do_registers_info): Ditto.
- (in_solib_call_trampoline): Ditto.
- (in_solib_return_trampoline): Ditto.
- (push_dummy_frame): Ditto.
- * convex-tdep.c (decout): Use print_longest rather than
- fprintf_filtered.
- * defs.h: Remove use of FORCE_LONG_LONG and __GNUC__ to set
- CC_HAS_LONG_LONG.
- (INT_MIN): Fix so it works correctly when assigned to a long long.
- * valprint.c (longest_to_int): Rewrite to remove dependence
- on INT_MIN and INT_MAX.
- (print_longest): Rewrite the code that falls back to synthesized
- hex output when LONGEST value is not representable as in a long and
- printf doesn't support printing long longs.
- * ch-valprint.c (chill_val_print): Cast 2nd arg of
- chill_print_type_scalar to LONGEST.
- chill_print_type_scalar): Make static and add prototype.
- * hppa-tdep.c (get_field): Ifdef out unused function.
- (set_field): Ditto.
- (extract_3): Ditto.
- (extract_5_store): Ditto.
- (extract_11): Ditto.
- (extract_12): Ditto.
- (deposit_17): Ditto.
- (extract_14): Convert to static and add prototype.
- (deposit_14): Ditto.
- (extract_21): Ditto.
- (deposit_21): Ditto.
- (extract_17): Ditto.
- (extract_5r_store): Ditto.
- (extract_5R_store): Ditto.
- (extract_5_load): Ditto.
- (find_proc_framesize): Ditto.
- (find_dummy_frame_regs): Ditto.
- (sign_extend): Ditto.
- (find_unwind_entry): Add prototype.
- (find_return_regnum): Ditto.
- (unwind_command): Ditto.
- (find_dummy_frame_regs): Add parens around subtraction in operand
- of bitwise-and.
- (skip_prologue): Add parens around operands of logical-and inside
- operand of logical-or.
- (sign_extend): Add parens around operands of subtraction inside
- operand of shift.
- (low_sign_extend): Ditto.
- * top.c (filename_completer): Convert old style decl of
- filename_completion_function into prototype.
- * f-lang.c (patch_common_entries): Ifdef out unused function.
- * stabsread.c (read_cfront_baseclasses): Remove unused local
- variable "msg_noterm".
- (resolve_cfront_continuation): Remove unused local variable "fip".
- (read_type): Remove unused variable xtypenums.
- (read_cfront_static_fields): Remove unused variable "i".
- (read_cfront_static_fields): Remove unused variable "nfields".
- (read_cfront_member_functions): Add missing comment terminator.
- (read_cfront_static_fields): Return 1 rather than random value.
- (read_cfront_baseclasses): Ditto.
- (read_cfront_baseclasses): Ditto.
- (read_cfront_baseclasses): Ditto.
- * somsolib.c (som_solib_create_inferior_hook): Remove unused
- variable "u".
- (som_solib_create_inferior_hook): Remove unused variable
- shadow_contents.
- (language.h): Add for needed prototypes.
- (som_solib_sharedlibrary_command): Add prototype.
- * hpread.c: (hpread_read_array_type): Add prototype.
- * somread.c (hpread_build_pysmtabs): Add prototype.
- (hpread_symfile_finish): Ditto.
- (hpread_symfile_init): Ditto.
- * hppah-nat.c (fetch_register): Convert old style decl
- to prototype.
- (gdbcore.h): Include for needed prototypes.
- (fetch_register): Remove unused variable "mess".
- * remote-pa.c (get_offsets): Ifdef out unused function.
- (remote_start_remote): Remove unused variable "timeout".
- (boot_board): Add prototype.
- (reaad_frame): Add prototype.
- (getpkt): Remove unused variable "bp".
- (remote_kill): Add prototype.
- (remote_mourn): Add prototype.
- (remote_insert_breakpoint): Add prototype.
- (remote_remove_breakpoint): Add prototype.
- * valops.c (value_push): Only use if PUSH_ARGUMENTS is not defined.
- * infcmd.c (do_registers_info): Only need prototype if
- DO_REGISTERS_INFO is not defined.
- (breakpoint_auto_delete_contents): Only need if
- CALL_DUMMY_BREAKPOINT_OFFSET is defined.
-
-Sat Jul 27 08:49:49 1996 Fred Fish <fnf@cygnus.com>
-
- * xcoffread.c (xcoff_end_psymtab): Add textlow_not_set parameter.
- (END_PSYMTAB): Ditto.
- (scan_xcoff_symtab): Call xcoff_end_psymtab with textlow_not_set.
-
-Fri Jul 26 14:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * printcmd.c (_initialize_printcmd): Initialize
- tm_print_insn_info.flavour.
-
-Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (scm-valprint.o): Depends upon gdbcore_h.
- (arm-tdep.o): Ditto.
- (dcache.o): Ditto.
- (i386ly-tdep.o): Ditto.
- (i960-tdep.o): Ditto.
- (m68k-tdep.o): Ditto.
- (nindy-tdep.o): Ditto.
- (scm-lang.o): Ditto.
- (w65-tdep.o): Ditto.
- (z8k-tdep.o): Ditto.
- (m68k-tdep.o): Depends upon value_h and gdb_string.h
- (m2-valprint.o): Depends upon m2-lang.h.
- (sparc-tdep.o): Depends upon gdb_string.h
- (valprint.o): Depends upon valprint.h
-
- * remote-e7000.c (notice_quit): Remove prototype.
- * top.c (initialize_targets): Remove prototype, now in target.h.
- * stabsread.c (resolve_cfront_continuation): Remove prototype.
- * dbxread.c (resolve_cfront_continuation): Remove prototype.
- * symfile.h (set_demangling_style): Remove prototype.
- * config/tm-sysv4.h (in_plt_section): Remove prototype, in objfiles.h.
- * config/sparc/tm-sparc.h (single_step): Remove extern decl, now in
- target.h.
- * config/arc/tm-arc.h (one_stepped, single_step): Remove extern decls,
- now in target.h.
- * ser-unix.c (hardwire_restore): Remove obsolete prototype.
- * sparc-tdep.c (single_step): Remove forward decl of isbranch.
- * scm-lang.c (find_function_in_inferior): Remove prototype.
- (value_allocate_space_in_inferior): Ditto.
- * infrun.c (write_pc_pid): Remove prototype, now in inferior.h.
- * defs.h (strchr): Remove declarations, they are declared in
- gdb_string.h also.
- (strrchr): Ditto.
- (strstr): Ditto.
- (strtok): Ditto.
- (strerror): Ditto.
- * f-valprint.c (f77_print_array_1): Remove extra arg that was being
- passed to f77_print_array_1.
- * gdbtypes.c (add_name): Remove unused variables lenstrlen and lenstr.
- * scm-exp.c (scm_istr2int): Remove unused variable "j".
- (scm_parse): Remove unused variable "str".
- * hp300ux-nat.c (store_inferior_register): Remove unused variable
- "buf".
- (store_inferior_registers): Remove unnecessary decl "registers".
- * m68k-tdep.c (m68k_pop_frame): Remove unused variable "fi".
- * scm-lang.c (scm_get_field): Remove unused variable "val".
- (scm_lookup_name): Remove unused variable "symval".
- * objfiles.c (map_to_file): Remove unused local variable "tempfd".
- * procfs.c (do_attach, do_detach): Remove unused variable "result".
- (last_resume_pid): Remove unused static variable.
- * alpha-tdep.c (alpha_linux_sigtramp_offset): Remove unused variable
- "res".
- * objfiles.c (map_to_address): Remove unused function.
- * f-valprint.c (print_max): Remove extraneous extern decl,
- in valprint.h.
- (calc_f77_array_dims): Remove extraneous prototype, in f-lang.h.
- * ch-exp.c (write_lower_upper_value): Remove prototype for
- type_lower_upper.
-
- * gdbtypes.c (cfront_mangle_name): #ifdef out unused function.
- * ch-exp.c (parse_mode_call): Ditto.
- * f-valprint.c (there_is_a_visible_common_named): Ditto.
- * f-lang.c (clear_function_list): Ditto.
- (get_bf_for_fcn): Ditto.
- (clear_bf_list): Ditto.
- (add_common_block): Ditto.
- (patch_all_commons_by_name): Ditto.
- (find_first_common_named): Ditto.
- (add_common_entry): Ditto.
- (allocate_saved_function_node): Ditto.
- (allocate_saved_bf_node): Ditto.
- (allocate_common_entry_node): Ditto.
- (allocate_saved_f77_common_node): Ditto.
-
- * arm-tdep.c (gdbcore.h): Include for necessary prototypes.
- * dcache.c (gdbcore.h): Ditto.
- * i386ly-tdep.c (gdbcore.h): Ditto.
- * i960-tdep.c (gdbcore.h): Ditto.
- * m2-valprint.c (m2-lang.h): Ditto.
- * m68k-tdep.c (gdbcore.h): Ditto.
- (value.h): Ditto.
- (gdb_string.h): Ditto.
- * nindy-tdep.c (gdbcore.h): Ditto.
- * scm-lang.c (gdbcore.h): Ditto.
- * scm-valprint.c (gdbcore.h): Ditto.
- * w65-tdep.c (gdbcore.h): Ditto.
- * z8k-tdep.c (gdbcore.h): Ditto.
- * sparc-tdep.c (gdb_string.h): Include.
- * valprint.c (valprint.h): Include.
-
- * config/xm-lynx.h: Remove part of comment about INT_MIN
- redefined warnings from defs.h, since INT_MIN define in
- defs.h is now protected by #ifndef INT_MIN.
- * config/i386/xm-i386bsd.h: Ditto.
- * config/m68k/xm-hp300bsd.h: Ditto.
- * config/m68k/xm-news.h: Ditto.
-
- * config/pa/xm-hppah.h (INT_MIN): Remove bogus INT_MIN
- definition as 0x80000000. The macro in defs.h is better.
- * config/i386/xm-i386m3.h (INT_MIN): Ditto.
- * config/i386/xm-i386mach.h (INT_MIN): Ditto.
- * config/ns32k/xm-ns32km3.h (INT_MIN): Ditto.
- * config/pa/xm-hppab.h: Ditto.
-
- * core-aout.c (fetch_core_registers): Add prototype.
- * hp300ux-nat.c (fetch_inferior_register): Ditto.
- (store_inferior_register_1): Ditto.
- (store_inferior_register): Ditto.
- * config/m68k/tm-m68k.h (find_saved_regs): Ditto.
- *scm-valprint.c (c_val_print): Ditto.
- * procfs.c (add_fd): Ditto.
- (remove_fd): Ditto.
- (wait_fd): Ditto.
- (sigcodename): Ditto.
- (sigcodedesc): Ditto.
- (procfs_kill_inferior): Ditto.
- (procfs_xfer_memory): Ditto.
- (procfs_store_registers): Ditto.
- (create_procinfo): Ditto.
- (procfs_init_inferior): Ditto.
- (proc_set_exec_trap): Ditto.
- (procfs_attach): Ditto.
- (procfs_detach): Ditto.
- (procfs_prepare_to_store): Ditto.
- (procfs_files_info): Ditto.
- (procfs_open): Ditto.
- (procfs_wait): Ditto.
- (procfs_fetch_registers): Ditto.
- (procfs_mourn_inferior): Ditto.
- (procfs_can_run): Ditto.
- (procfs_thread_alive): Ditto.
- (procfs_stop): Ditto.
- * alpha-nat.c (fetch_core_registers): Ditto.
- * config/alpha/tm-alpha.h (alpha_osf_skip_sigtramp_frame): Ditto.
- * objfiles.c (ecoff_relocate_efi): Ditto.
- * inflow.c (pass_signal): Ditto.
- (handle_sigio): Ditto.
- * annotate.c (breakpoint_changed): Ditto.
- * callback.c (wrap): Ditto.
- (fdbad): Ditto.
- (fdmap): Ditto.
- * utils.c (malloc_botch): Ditto.
- (fputs_maybe_filtered): Ditto.
- (vfprintf_maybe_filtered): Ditto.
- * defs.h (notice_quit): Ditto.
- * defs.h (xmalloc, xrealloc): Ditto.
- * top.c (stop_sig): Ditto.
- (init_signals): Ditto.
- (user_defined_command): Ditto.
- (source_cleanup_lines): Ditto.
- (dont_repeat_command): Ditto.
- (serial_log_command): Ditto.
- (disconnect): Ditto.
- * target.h (initialize_targets): Ditto.
- * os9kread.c (read_minimal_symbols): Ditto.
- * mdebugread.c (mdebug_psymtab_to_symtab): Ditto.
- (fdr_name): Ditto.
- (push_parse_stack): Ditto.
- (pop_parse_stack): Ditto.
- (is_pending_symbol): Ditto.
- (add_pending): Ditto.
- * serial.c (serial_logchar): Ditto.
- (serial_interface_lookup): Ditto.
- * serial.h (serial_log_command): Ditto.
- * f-valprint.c (info_common_command): Ditto.
- * gdbtypes.h (print_type_scalar): Ditto.
- * scm-valprint.c (scm_scmlist_print): Ditto.
- (scm_ipruk): Ditto.
- * scm-lang.c (scm_printstr): Ditto.
- (in_eval_c): Ditto.
- (evaluate_subexp_scm): Ditto.
- * scm-exp.c (scm_read_token): Ditto.
- (scm_skip_ws): Ditto.
- (scm_lreadparen): Ditto.
- * m2-lang.c (emit_char): Ditto.
- (m2_printchar): Ditto.
- (m2_printstr): Ditto.
- (m2_create_fundamental_type): Ditto.
- * f-lang.c (emit_char): Ditto.
- (f_printchar): Ditto.
- (f_printstr): Ditto.
- (f_create_fundamental_type): Ditto.
- * ch-lang.c (chill_printchar): Ditto.
- (chill_printstr): Ditto.
- (chill_create_fundamental_type): Ditto.
- (value_chill_length): Ditto.
- (value_chill_card): Ditto.
- (value_chill_max_min): Ditto.
- (evaluate_subexp_chill): Ditto.
- * ch-exp.c (PEEK_TOKEN): Ditto.
- (peek_token_): Ditto.
- (forward_token_): Ditto.
- (parse_case_label): Ditto.
- (parse_opt_untyped_expr): Ditto.
- (parse_unary_call): Ditto.
- (parse_call): Ditto.
- (parse_named_record_element): Ditto.
- (parse_tuple_element): Ditto.
- (parse_opt_element_list): Ditto.
- (parse_tuple): Ditto.
- (parse_primval): Ditto.
- (parse_operand6): Ditto.
- (parse_operand5): Ditto.
- (parse_operand4): Ditto.
- (parse_operand3): Ditto.
- (parse_operand2): Ditto.
- (parse_operand1): Ditto.
- (parse_operand0): Ditto.
- (parse_expr): Ditto.
- (parse_then_alternative): Ditto.
- (parse_else_alternative): Ditto.
- (parse_if_expression): Ditto.
- (parse_untyped_expr): Ditto.
- (growbuf_by_size): Ditto.
- (match_simple_name_string): Ditto.
- (decode_integer_value): Ditto.
- (decode_integer_literal): Ditto.
- (match_float_literal): Ditto.
- (match_float_literal): Ditto.
- (match_string_literal): Ditto.
- (match_character_literal): Ditto.
- (match_integer_literal): Ditto.
- (match_bitstring_literal): Ditto.
- (write_lower_upper_value): Ditto.
- * ch-lang.h (type_lower_upper): Ditto.
- * c-lang.c (emit_char): Ditto.
- * dwarfread.c (free_utypes): Ditto.
- * stabsread.h (resolve_cfront_continuation): Ditto.
- * stabsread.c (get_substring): Ditto.
- (read_one_struct_field): Ditto.
- * stabsread.h (process_later): Ditto.
- * demangle.c (set_demangling_command): Ditto.
- * defs.h (set_demangling_style): Ditto.
- * maint.c (maintenance_info_command): Ditto.
- (print_section_table): Ditto.
- (maintenance_info_sections): Ditto.
- (maintenance_print_command): Ditto.
- * symtab.h (maintenance_print_statistics): Ditto.
- * objfiles.h (in_plt_section): Ditto.
- * objfiles.c (add_to_objfile_sections): Ditto.
- * bcache.c (hash): Ditto.
- (lookup_cache): Ditto.
- * exec.c (bfdsec_to_vmap): Ditto.
- (ignore): Ditto.
- * f-exp.y (growbuf_by_size, match_string_literal): Ditto.
- * language.c (unk_lang_printchar): Ditto.
- (unk_lang_printstr): Ditto.
- (unk_lang_create_fundamental_type): Ditto.
- (unk_lang_print_type): Ditto.
- (unk_lang_val_print): Ditto.
- (unk_lang_value_print): Ditto.
- * target.c (update_current_target): Ditto.
- (debug_to_open): Ditto.
- (debug_to_close): Ditto.
- (debug_to_attach): Ditto.
- (debug_to_detach): Ditto.
- (debug_to_resume): Ditto.
- (debug_to_wait): Ditto.
- (debug_to_fetch_registers): Ditto.
- (debug_to_store_registers): Ditto.
- (debug_to_prepare_to_store): Ditto.
- (debug_to_xfer_memory): Ditto.
- (debug_to_files_info): Ditto.
- (debug_to_insert_breakpoint): Ditto.
- (debug_to_remove_breakpoint): Ditto.
- (debug_to_terminal_init): Ditto.
- (debug_to_terminal_inferior): Ditto.
- (debug_to_terminal_ours_for_output): Ditto.
- (debug_to_terminal_ours): Ditto.
- (debug_to_terminal_info): Ditto.
- (debug_to_kill): Ditto.
- (debug_to_load): Ditto.
- (debug_to_lookup_symbol): Ditto.
- (debug_to_create_inferior): Ditto.
- (debug_to_mourn_inferior): Ditto.
- (debug_to_can_run): Ditto.
- (debug_to_notice_signals): Ditto.
- (debug_to_thread_alive): Ditto.
- (debug_to_stop): Ditto.
- * breakpoint.h (set_breakpoint_sal): Ditto.
- * remote-utils.c (usage): Ditto.
- * remote.c (set_thread): Ditto.
- (remote_thread_alive): Ditto.
- (get_offsets): Ditto.
- (read_frame): Ditto.
- (remote_insert_breakpoint): Ditto.
- (remote_remove_breakpoint): Ditto.
- * sparc-nat.c (fetch_core_registers): Ditto.
- * corelow.c (add_to_thread_list): Ditto.
- (ignore): Ditto.
- * inftarg.c (proc_wait): Ditto.
- * infptrace.c (udot_info): Ditto.
- (fetch_register): Ditto.
- * ser-unix.c (hardwire_noflush_set_tty_state): Ditto.
- (hardwire_print_tty_state): Ditto.
- (hardwire_flush_output): Ditto.
- (hardwire_flush_input): Ditto.
- (hardwire_send_break): Ditto.
- (hardwire_setstopbits): Ditto.
- * ser-tcp.c (tcp_return_0): Ditto.
- (tcp_noflush_set_tty_state): Ditto.
- (tcp_print_tty_state): Ditto.
- * solib.c (match_main): Ditto.
- * gdbtypes.c (print_bit_vector): Ditto.
- (print_arg_types): Ditto.
- (dump_fn_fieldlists): Ditto.
- (print_cplus_stuff): Ditto.
- * symfile.h (entry_point_address): Ditto.
- * symfile.c (decrement_reading_symtab): Ditto.
- * valops.c (value_arg_coerce): Ditto.
- * value.h (find_function_in_inferior): Ditto.
- (value_allocate_space_in_inferior): Ditto.
- * values.c (vb_match): Ditto.
- * thread.c (info_thread_command): Ditto.
- (restore_current_thread): Ditto.
- (thread_apply_all_command): Ditto.
- (thread_apply_command): Ditto.
- * inferior.h (write_pc_pid): Ditto.
- * infrun.c (delete_breakpoint_current_contents): Ditto.
- * breakpoint.c (print_it_normal): Ditto.
- (watchpoint_check): Ditto.
- (print_it_done): Ditto.
- (print_it_noop): Ditto.
- (maintenance_info_breakpoints): Ditto.
- (create_longjmp_breakpoint): Ditto.
- (hbreak_command): Ditto.
- (thbreak_command): Ditto.
- (watch_commnd_1): Ditto.
- (rwatch_command): Ditto.
- (awatch_command): Ditto.
- (do_enable_breakpoint): Ditto.
- * ch-valprint.c (chill_val_print_array_elements): Ditto.
- * eval.c (evaluate_subexp): Ditto.
- (get_label): Ditto.
- (evaluate_struct_tuple): Ditto.
- * eval.c (init_array_element): Ditto.
-
- * alpha-tdep.c (push_sigtramp_desc): Add prototype and make static.
- * breakpoint.c (hw_breakpoint_used_count): Ditto.
- (hw_watchpoint_used_count): Ditto.
- * findvar.c (write_register_gen): Ditto.
- (read_register_pid): Ditto.
- * symtab.c (cplusplus_hint): Ditto.
- * infcmd.c (breakpoint_auto_delete_contents): Ditto.
- * ch-valprint.c (chill_print_type_scalar): Ditto.
- * gdbtypes.c (add_name): Ditto.
- (add_mangled_type): Ditto.
- (cfront_mangle_name): Ditto.
- * sparc-tdep.c (isbranch): Ditto.
- * inftarg.c (child_stop): Ditto.
- * win32-nat.c (child_stop): Ditto.
- * mac-nat.c (child_stop): Ditto.
- * remote-utils.c (sr_com): Ditto.
- * dbxread.c (process_now): Ditto.
- * ch-exp.c (require): Ditto.
- (check_token): Ditto.
- (expect): Ditto.
- (parse_mode_call): Ditto.
- (parse_mode_or_normal_call): Ditto.
- * scm-lang.c (scm_lookup_name): Ditto
- * f-lang.c (allocate_saved_bf_node): Ditto.
- (allocate_saved_function_node): Ditto.
- (allocate_saved_f77_common_node): Ditto.
- (allocate_common_entry_node): Ditto.
- (add_common_block): Ditto.
- (add_common_entry): Ditto.
- (find_first_common_named): Ditto.
- (patch_common_entries): Ditto.
- (patch_all_commons_by_name): Ditto.
- (clear_bf_list): Ditto.
- (get_bf_for_fcn): Ditto.
- (clear_function_list): Ditto.
- * scm-exp.c (scm_istr2int): Ditto.
- (scm_istring2number): Ditto.
- * scm-valprint.c (scm_inferior_print): Ditto.
- * f-typeprint.c (print_equivalent_f77_float_type): Ditto.
- * f-valprint.c (f77_get_dynamic_length_of_aggregate): Ditto.
- (f77_create_arrayprint_offset_tbl): Ditto.
- (f77_print_array_1): Ditto.
- (f77_print_array): Ditto.
- (list_all_visible_commons): Ditto.
- (there_is_a_visible_common_named): Ditto.
- * mdebugread.c (ecoff_relocate_efi): Ditto.
- * callback.c (os_close): Ditto.
- (os_get_errno): Ditto.
- (os_isatty): Ditto.
- (os_lseek): Ditto.
- (os_open): Ditto.
- (os_read): Ditto.
- (os_read_stdin): Ditto.
- (os_write): Ditto.
- (os_write_stdout): Ditto.
- (os_rename): Ditto.
- (os_system): Ditto.
- (os_time): Ditto.
- (os_unlink): Ditto.
- (os_shutdown): Ditto.
- (os_init): Ditto.
- (os_printf_filtered): Ditto.
-
- * scm-lang.h (scm_parse): Change old style decl to prototype.
- * config/alpha/tm-alphalinux.h (alpha_linux_sigtramp_offset): Ditto.
- * top.c (init_proc): Ditto.
- (query_hook): Ditto.
- (error_hook): Ditto.
- * f-lang.c (c_value_print): Ditto.
- * ch-exp.c (parse_expression): Ditto.
- (parse_primval): Ditto.
- (parse_untyped_expr): Ditto.
- (parse_opt_untyped_expr): Ditto.
- (ch_lex): Ditto.
- * config/sparc/tm-sparc.h (sparc_init_extra_frame_info): Ditto.
- (sparc_frame_saved_pc): Ditto.
- (sparc_push_dummy_frame): Ditto.
- (sparc_pop_frame): Ditto.
- * defs.h (fclose): Ditto.
- (atof): Ditto.
- (error_hook): Ditto.
-
- * arc-tdep.c (single_step): Change arg to type "enum target_signal".
- * rs6000-tdep.c (single_step): Ditto.
- * sparc-tdep.c (single_step): Ditto.
-
- * breakpoint.c (cleanup_executing_breakpoints): Change unused arg type
- to PTR which is what make_cleanup expects.
- * utils.c (null_cleanup): Change arg type to PTR.
- * defs.h (null_cleanup): Change prototype to match actual function.
- * config/sparc/tm-sparc.h (struct frame_info): Move forward decl.
- * ch-valprint.c (chill_val_print): Cast 2nd arg of
- chill_print_type_scalar to LONGEST.
- * infrun.c (wait_for_inferior): Have empty switch case for
- BPSTAT_WHAT_CHECK_SHLIBS when SOLIB_ADD is not defined.
- (stop_on_solib_events): Only needed if SOLIB_ADD is defined.
- * infcmd.c (attach_command): Only need auto_solib_add if SOLIB_ADD
- is defined.
- * symfile.c (generic_load): Scan long int using a long int spec,
- not an int spec.
- * infptrace.c (udot_info): Only need local variables if KERNEL_U_SIZE
- is defined.
- (fetch_register): Only need function if FETCH_INFERIOR_REGISTERS is
- not defined.
- * inflow.c (handle_sigio): Only need prototype when the actual
- function is compiled in.
- * valprint.c (longest_to_int): Expand error message to be
- separate messages for args larger than largest signed int
- and args smaller than smallest signed int.
- * valprint.c (print_longest): Fix problems with support for case
- where compiler supports type "long long" but the runtime doesn't
- support printing them with "%ll".
- * scm-valprint.c (scm_scmlist_print, scm_scmval_print): Change
- return types to void since we don't actually return anything
- meaningful and callees ignore the values anyway.
- * procfs.c (modify_inherit_on_fork_flag): Enclose pr_flags in PIOCSET
- ifdef.
- (modify_run_on_last_close_flag): Ditto.
- (wait_fd): Enclose local variables "num_fds" and "i" LOSING_POLL
- ifdef
- * alpha-tdep.c (push_sigtramp_desc): Return proc_desc rather than
- random value.
- * infrun.c (wait_for_inferior): Ensure random_signal is not used
- uninitialized.
- * valops.c (call_function_by_hand): Ensure struct_addr is not used
- uninitialized.
- * breakpoint.c (watch_command_1): Ensure prev_frame is not used
- uninitialized.
- * utils.c (vfprintf_maybe_filtered): Change second arg from "char *"
- to "const char *".
- * infptrace.c (udot_info): Add two dummy args so that the type is
- correct for passing to add_info.
- * f-lang.c (saved_fcn): Move decl to head of file so it can be used
- in prototypes.
- (saved_bf_symnum): Ditto.
- (SAVED_FUNCTION): Ditto.
- (SAVED_FUNCTION_PTR): Ditto.
- (SAVED_BF): Ditto.
- (SAVED_BF_PTR): Ditto.
- * ch-exp.c (parse_named_record_element): Build error message in
- temporary buffer before passing it to expect, rather than passing
- wrong number of args to expect.
- * demangle.c (set_demangling_style): Call set_demangling_command with
- correct number of arguments.
- * inferior.h (terminal_init_inferior_with_pgrp): Change arg type to
- int to match actual function.
- (os_isatty): Call fdmap with right number of arguments, was missing
- the host_callback* arg.
- * target.c (cleanup_target): Prototype all functions casts.
- * target.h (one_stepped, single_step): Declare here and convert
- single_step to prototype.
- * infrun.c (one_stepped, single_step): Don't declare externs
- here, they have moved to target.h.
- * eval.c (init_array_element): Declare previously undeclared
- last two args as LONGEST.
- * dcache.c (dcache_xfer_memory): Change xfunc decls to prototype form.
-
-Thu Jul 25 16:11:54 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * dsrec.c (load_srec): Protect ANSI style function parms with PARAMS.
-
-Mon Jul 22 18:13:27 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * Makefile.in (os9kread.o): Remove dependency on partial-stab.h.
- * dbxread.c (read_dbx_symtab end_psymtab), partial-stab.h: Don't
- use partial_symtab->textlow==0 as a flag, as 0 is a legitimate
- text address. Use a seperate flag (textlow_not_set) instead.
- This makes stabs in ELF .o files work a lot better.
- * mdebugread.c xcoffread.c: Define textlow_not_set for
- partial-stab.h.
- * stabsread.h (end_psymtab): Add textlow_not_set arg to prototype.
-
-Sat Jul 20 10:41:06 1996 Fred Fish <fnf@cygnus.com>
-
- * dwarf2read.c (struct filenames): Change internal "struct file"
- to "struct fileinfo" to avoid conflict with "struct file" in
- <sys/file.h> on HPUX and Solaris.
-
-Fri Jul 19 14:05:57 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * dwarf2read.c: New file, DWARF 2 reader originally contributed by
- Brent Benson, with additions by Gary Funck and Jerry Kreuscher.
- * Makefile.in (COMMON_OBS): Add dwarf2read.o.
- (SFILES): Add dwarf2read.c.
- (dwarf2read.o): Add build rule.
- * symfile.h (dwarf2_has_info, dwarf2_build_psymtabs): Declare
- exported functions.
- * elfread.c (elf_symfile_read): Call them.
- (elf_symtab_read) [HARRIS_TARGET]: Skip some special symbols.
-
-Thu Jul 18 01:22:01 1996 Geoffrey Noer <noer@cygnus.com>
-
- * symfile.c (symfile_bfd_open):
- * exec.c (exec_file_command): for __GO32__ and __WIN32__ systems,
- free the user from having to type the .exe extension.
-
-Wed Jul 17 06:54:50 1996 Mark Alexander <marka@cygnus.com>
-
- * mon960-rom.c: Shorten the mon960_inits string to a single
- carriage return; this prevents a hang on connecting immediately
- after powerup, when MON960 is attempting autobaud detection.
-
-Tue Jul 16 23:47:04 1996 Mark Alexander <marka@cygnus.com>
-
- * a29k-tdep.c (get_saved_register): Allow PC to be modified
- when innermost frame is selected, but not in outer frames.
-
-Tue Jul 16 23:37:25 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * command.c (do_setshow_command): Don't segfault when showing
- var_string and var_string_noescape vars that are NULL.
-
-Mon Jul 15 16:55:48 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * win32-nat.c (handle_load_dll): dos_path_to_unix_path renamed to
- cygwin32_conv_to_posix_path.
- (child_create_inferior): unix_path_to_dos_path renamed to
- cygwin32_conv_to_win32_path. Rewrite code to translate PATH.
-
-Mon Jul 15 16:44:05 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * defs.h printcmd.c: Create global disassemble_info structure
- tm_print_insn_info.
- * i386-tdep.c (set_assembly_language_command): set
- tm_print_insn_info.mach to the appropriate value for 386 or 8086
- disassembly.
- * printcmd.c (print_insn): Move init of disassembler_info to
- _initialize_printcmd. Set endian for disassembler here.
- * sparc-tdep.c: Set tm_print_insn_info.mach as appropriate to
- select sparc/sparclite.
- * config/sparc/{tm-sparc.h tm-sparclite.h}: Get rid of
- TM_PRINT_INSN. Set TM_PRINT_INSN_MACH to
- bfd_mach_sparc/bfd_mach_sparc_sparclite.
-
-Fri Jul 12 19:04:32 1996 Fred Fish <fnf@cygnus.com>
-
- * hpread.c (hpread_lookup_type): Use xmmalloc/xmrealloc rather
- than xmalloc/xrealloc.
-
-Fri Jul 12 17:59:47 1996 Fred Fish <fnf@cygnus.com>
-
- * objfiles.c (map_to_file): Error return from mmalloc_findbase is
- a NULL pointer, not a -1.
-
-Fri Jul 12 10:16:24 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * i386-tdep.c (set_assembly_language_command): New routine to
- select between i386 and i8086 instruction sets for disassembly.
- New command `set assembly-language {i386 i8086}'.
-
-Thu Jul 11 21:13:21 1996 Mark Alexander <marka@cygnus.com>
-
- * monitor.c (monitor_write_memory, monitor_read_memory_single):
- Disable use of "long long" memory read/write commands; can't
- use them because we hold the values to read/write in an int
- variable, and because strtoul fails on values that exceed the
- size of a long. This fixes breakpoint problems on MON960.
-
-Thu Jul 11 11:39:31 1996 Fred Fish <fnf@cygnus.com>
-
- * config/m68k/xm-hp300hpux.h (HAVE_MMAP): Remove definition.
- * config/pa/xm-hppah.h (HAVE_MMAP): Ditto.
-
-Wed Jul 10 16:54:41 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (MMALLOC_CFLAGS): Eliminate intermediate MMALLOC_DISABLE
- and MMALLOC_CHECK macros, and add comment indicating how host dependent
- makefile fragment should modify MMALLOC_CFLAGS to not use mmalloc, or
- to use it but to not do heap corruption checking.
- * gdbserver/Makefile.in: Ditto.
- * utils.c (init_malloc): Replace warning() use with direct call of
- fprintf_unfiltered, since current_target has not yet been set and thus
- we cannot use warning(). If we try to use mmcheck and it fails,
- suggest that this configuration needs NO_MMCHECK or MMCHECK_FORCE
- defined. Other small mmalloc related cleanups.
- * config/sparc/sun4os4.mh (MMALLOC_CFLAGS): Define MMCHECK_FORCE to 1.
- * config/alpha/alpha-osf2.mh (MMALLOC_CFLAGS): Set to -DNO_MMCHECK.
-
- * config/sparc/xm-sun4os4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
- * config/i386/xm-i386v4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
- * config/i386/xm-linux.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
- * config/m68k/xm-hp300hpux.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
- * config/m68k/xm-m68kv4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT);
- * config/m68k/xm-sun3os4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
- * config/pa/xm-hppah.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
- * config/sparc/xm-sun4sol2.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
- Remove obsolete defines.
-
- * config/alpha/alpha-linux.mh (MMALLOC_DISABLE):
- * config/alpha/alpha-osf1.mh (MMALLOC_DISABLE):
- * config/rs6000/rs6000.mh (MMALLOC_DISABLE):
- * config/rs6000/aix4.mh (MMALLOC_DISABLE):
- * config/powerpc/aix4.mh (MMALLOC_DISABLE):
- * config/powerpc/aix.mh (MMALLOC_DISABLE):
- * config/ns32k/ns32km3.mh (MMALLOC_DISABLE):
- * config/mips/mipsm3.mh (MMALLOC_DISABLE):
- * config/mips/decstation.mh (MMALLOC_DISABLE):
- * config/m88k/cxux.mh (MMALLOC_DISABLE):
- * config/i386/i386mk.mh (MMALLOC_DISABLE):
- * config/i386/i386m3.mh (MMALLOC_DISABLE):
- * config/i386/i386gnu.mh (MMALLOC_DISABLE):
- Use MMALLOC_CFLAGS instead.
-
-Tue Jul 9 22:41:12 1996 Jeffrey A Law (law@cygnus.com)
-
- * h8300-tdep.c: Remove some outdated comments.
- (h8300_skip_prologue): Rework to be more correct for the H8/300H.
- Handle stm.l insns for the H8/S.
- (examine_prologue): Likewise.
-
-Tue Jul 9 16:48:55 1996 Raymond Jou <rjou@mexican.cygnus.com>
-
- * ser-mac.c (mac_close): Change a typo SetSetBuf to SerSetBuf.
-
-Mon Jul 08 08:50:39 1996 Mark Alexander <marka@cygnus.com>
-
- * mon960-rom.c (mon960_open): Add floating point detection to
- prevent hang on non-FPU processors (PR 9775).
- (mon960_cmds): Swap setmem.cmdw and setmem.cmdl to fix problem
- setting breakpoints and improve loading speed.
-
-Sun Jul 7 14:57:34 1996 Fred Fish <fnf@cygnus.com>
-
- * coffread.c (record_minimal_symbol): Don't presave name string
- on symbol_obstack before passing to prim_record_minimal_symbol.
- It now handles saving the string itself.
- * dbxread.c (read_dbx_dynamic_symtab): Ditto.
- * mipsread.c (read_alphacoff_dynamic_symtab): Ditto.
- * os9kread.c (record_minimal_symbol): Ditto.
- * solib.c (solib_add_common_symbols): Ditto.
-
- * coffread.c (coff_symtab_read): Don't presave name string on
- symbol_obstack before passing to prim_record_minimal_symbol_and_info.
- It now handles saving the string itself.
- * dbxread.c (record_minimal_symbol): Ditto.
- * elfread.c (record_minimal_symbol_and_info): Ditto.
-
- * dstread.c (record_minimal_symbol): Remove static function that just
- called prim_record_minimal_symbol with the same args (after change to
- prim_record_minimal_symbol to do it's own name string saves).
- * nlmread.c (record_minimal_symbol): Ditto.
- * somread.c (record_minimal_symbol): Ditto.
-
- * hpread.c (hpread_read_enum_type): Save symbol name on symbol obstack.
- (hpread_read_function_type): Ditto.
- (hpread_process_one_debug_symbol): Ditto.
- * mdebugread.c (parse_symbol): Ditto.
- (new_symbol): Ditto.
- * minsyms.c (prim_record_minimal_symbol_and_info): Ditto.
-
- * coffread.c (process_coff_symbol): Use obsavestring to save
- SYMBOL_NAME, rather than obstack_copy0.
- * dstread.c (create_new_symbol): Ditto
- * symfile.c (obconcat): Ditto.
- * stabsread.c (patch_block_stabs): Ditto.
- * xcoffread.c (SYMNAME_ALLOC): Ditto.
-
- * symfile.c (obsavestring): Update comments
- * solib.c (solib_add_common_symbols): Remove local var origname.
-
-Wed Jul 3 15:56:08 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * configure: Re-build with autoconf-2.10.
-
- * sparcl-tdep.c (_initialize_sparc_tdep) config/sparc/tm-sparc.h,
- config/sparc/tm-sparclite.h: Initialize tm_print_insn from
- TM_PRINT_INSN, which comes from the tm file.
-
-Tue Jul 02 21:41:20 1996 Mark Alexander <marka@cygnus.com>
-
- * coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c,
- os9kread.c: Replace identical sym_offsets functions with
- default_symfile_offsets.
- * somread.c (som_symfile_offsets): Use new SIZEOF_SECTION_OFFSETS
- macro to allocate section_offsets.
- * symfile.c (default_symfile_offsets): New function.
- * symfile.h: Declare default_symfile_offsets.
- * symtab.h: Define SIZEOF_SECTION_OFFSETS macro to
- simplify allocation of section_offsets.
-
-Tue Jun 11 12:02:55 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * Makefile.in (INTERNAL_LDFLAGS): Add in flags from configure.
- * configure configure.in: Only make sol-thread.o for native.
- Also, switch to dlopened libthread_db.so.1.
- * sol-thread.c: Switch to using dlopen to get the thread_db
- library.
-
-Thu Jun 13 16:53:25 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * configure, configure.in: Change test for libthread_db to only
- work for configs where build/host/target are the same.
-
-Tue Jul 2 15:04:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/powerpc/{linux.mh,xm-linux.h}: New files, for Linux on
- PowerPC.
-
- * configure.in (powerpc-*-linux): Add Linux, System V, and ELF
- support.
- * configure: Regenerate.
-
-Mon Jul 1 13:00:43 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- From Raymond Jou <rjou@mexican.cygnus.com>:
- * mpw-make.sed: Add lines to whack out autoconf hook
- @CONFIG_LDFLAGS@.
-
-Mon Jul 01 11:07:15 1996 Mark Alexander <marka@cygnus.com>
-
- * remote-e7000.c (e7000_stop): New function.
-
-Fri Jun 28 06:34:19 1996 Dawn Perchik <dawn@cygnus.com>
-
- * configure, configure.in: Add target sparclet.
- * monitor.h, monitor.c: Added monitor flags MO_NO_ECHO_ON_SETMEM
- (don't expect echo on setmem command), MO_RUN_FIRST_TIME (if
- command to start process running on target is different from one
- to continue execution), MO_HEX_PREFIX (if addresses from monitor
- have a "0x" prefix).
- * monitor.c, parse.c, sparc-tdep.c: Don't require strings in the
- registers array. This is to allow NULLs to be place holders in
- the tm-*.h file so that only minor changes are needed when a new
- processor is introduced (eg, one without floating point).
- * sparc-tdep.c: Conditionally remove dependancies on floating
- point.
- * sparclet-rom.c, config/sparc/sparclet.mt,
- config/sparc/tm-sparclet.h: New files for target sparclet.
- * symfile.c (load_command): Add option for 2nd parameter; a load
- offset added to the vma of each section.
-
-Fri Jun 28 05:39:19 1996 Dawn Perchik <dawn@cygnus.com>
-
- * main.c (main): Add option "l" for setting remote_timeout.
-
-Fri Jun 28 05:25:18 1996 Dawn Perchik <dawn@cygnus.com>
-
- * remote-e7000.c, remote.c, target.h, top.c: Add set option
- "remote_timeout" for setting remote_timeout. Add set option
- "use_hard_breakpoints" for setting hardware .vs. memory
- breakpoints.
-
-Fri Jun 28 04:32:18 1996 Dawn Perchik <dawn@cygnus.com>
-
- * remote-e7000.c (e7000_parse_device): New function.
- Add option "tcp_remote" to target command if using
- tcp to connect to a remote host which is then connected
- via serial port to the e7000 (for exampole, a port master).
- (e7000_open): Change to call e7000_parse_device.
-
-Fri Jun 28 03:47:17 1996 Dawn Perchik <dawn@cygnus.com>
-
- * monitor.c (monitor_debug): Fix remotedebug buffering.
-
-Thu Jun 27 18:24:17 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/i386/cygwin32.mh, config/powerpc/cygwin32.mh
- (NATDEPFILES): Add a space.
-
-Wed Jun 26 06:05:39 1996 Wilfried Moser <moser@rtl.cygnus.com>
-
- * gdbtypes.c (create_array_type): If TYPE_LENGTH (result_type)
- is zero, set TYPE_FLAG_TARGET_STUB to force reevaluation of the type.
-
- * ch-exp.c (calculate_array_length): Function removed.
-
-Tue Jun 25 17:41:06 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * remote-e7000.c (e7000_read_inferior_memory_large): New function.
- (e7000_xfer_inferior_memory): Call it.
-
-Tue Jun 25 23:14:07 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * gdb/gdbserver/Makefile.in (docdir): Removed.
-
-Tue Jun 25 22:05:38 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir):
- Use autoconf set values.
- (docdir): Removed.
- * configure.in (AC_PREREQ): autoconf 2.5 or higher.
- * nlm/Makefile.in (bindir, libdir, datadir, mandir, infodir,
- includedir): Use autoconf set values.
- (docdir): Removed.
- * nlm/configure.in (AC_PREREQ): autoconf 2.5 or higher.
- * nlm/configure: Rebuilt.
- * gdb/gdbserver/Makefile.in (datadir): Set to $(prefix)/share.
-
-Mon Jun 24 09:56:14 1996 Angela Marie Thomas (angela@cygnus.com)
-
- * stabsread.c (read_cfront_member_functions): add type
-
-Sun Jun 23 23:40:48 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * win32-nat.c: #include <unistd.h>.
- (unix_paths_to_dos_paths, dos_paths_to_unix_paths): Delete.
- (child_create_inferior): Convert only env var PATH to win32 style.
- (set_pathstyle_dos): Delete.
- (_initialize_inftarg): Delete dos-path-style command.
-
-Thu Jun 20 13:42:23 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.in: Revise sol-thread.o test.
- * configure: Regenerated.
-
- * source.c (find_source_lines): Reassign size to result of read.
-
-Tue Jun 18 16:25:54 1996 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * h8300-dep.c (gdb_print_insn_h8300): Handle the H8/S.
- (h8300_command): Likewise.
- (set_machine): Likewise.
- (set_machine_hook): Likewise.
- (_initialize_h8300m): Likewise.
-
- * config/h8300/tm-h8300.h (h8300smode): Declare.
-
-Sun Jun 16 15:21:51 1996 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * somsolib.c (som_solib_create_inferior_hook): Handle tracking
- of shl_load calls for hpux10.
-
-Thu Jun 13 11:16:10 1996 Tom Tromey <tromey@thepub.cygnus.com>
-
- * config.in: Regenerated.
- * acconfig.h (HAVE_THREAD_DB_LIB): Added entry.
-
- * configure: Regenerated.
- * aclocal.m4 (CY_AC_PATH_TCLH, CY_AC_PATH_TKH): Use odd names to
- avoid name clashes with SunOS headers.
-
-Tue Jun 11 19:52:50 1996 Fred Fish <fnf@cygnus.com>
-
- From Michael Snyder <Michael_Snyder@next.com>:
- * bcache.c (print_bcache_statistics): Avoid divide-by-zero
- exception if one or more objfile has no symbols, such as when
- a dynamic library has been stripped.
-
-Tue Jun 11 12:02:55 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * Makefile.in (INTERNAL_LDFLAGS): Add in flags from configure.
- * configure configure.in: Only make sol-thread.o for native.
- Also, switch to dlopened libthread_db.so.1.
- * sol-thread.c: Switch to using dlopen to get the thread_db
- library.
-
-Mon Jun 10 14:17:19 1996 Fred Fish <fnf@cygnus.com>
-
- * config/sparc/{xm-sun4sol2.h,xm-sun4os4.h} (MMAP_BASE_ADDRESS):
- Change from 0xE0000000 to 0xC0000000.
-
-Thu Jun 6 17:10:32 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/powerpc/xm-solaris.h: Initial version of support for
- Solaris on PowerPC.
-
-Wed Jun 5 01:52:57 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * configure.in (configdirs): Force 4100 builds to use 4300 GDB
- target.
- * configure: Rebuild.
-
- * config/mips/vr4300el.mt (SIM_OBS): Include simulator in
- little-endian builds.
-
-Mon Jun 3 11:48:29 1996 Jeffrey A Law (law@cygnus.com)
-
- * inftarg.c (child_thread_alive): Protect declaration with
- #ifndef CHILD_THREAD_ALIVE.
-
- * source.c (find_source_lines): Check the time on the symtab's bfd if
- it exists, else check the time on the exec_bfd.
-
-Thu May 30 09:43:17 1996 Mark Alexander <marka@cygnus.com>
-
- * dsrec.c (make_srec): Fix calculation of address size
- to allow addresses less than 0x100.
-
-Thu May 30 04:24:09 1996 Wilfried Moser <moser@rtl.cygnus.com>
-
- * ch-exp.c (ch_lex): In case of LOC_TYPEDEF call calculate_array_length.
-
-Tue May 28 16:15:47 1996 Geoffrey Noer <noer@cygnus.com>
-
- * remote-mips.c: cannot use EINVAL for breakpoint test since
- its value varies for different hosts (e.g. go32's is 19, while
- sunos is 22). Changed to hardcoded 22 since that is what the
- mips boards return.
-
-Tue May 28 11:14:58 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * configure: Regenerated.
- * aclocal.m4 (CY_AC_PATH_TCLH): Don't use AC_TRY_RUN.
- (CY_AC_PATH_TKH): Don't use AC_TRY_RUN.
-
-Sun May 26 16:56:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * solib.c (solib_absolute_prefix, solib_search_path): New variables.
- (_initialize_solib): Add set/show commands for those variables.
- (solib_map_sections): Implement searching using them.
-
-Sun May 26 14:14:49 1996 Fred Fish <fnf@cygnus.com>
-
- Changes from: David Mosberger-Tang <davidm@azstarnet.com>
-
- * NEWS: Add Alpha Linux as a new native configuration.
-
- * mdebugread.c (parse_symbol): When we find a malloc() symbol with
- return type VOID, assume no debugging info is available for that
- object file and patch the return value into VOID *. Otherwise,
- operations requiring an implicit call to malloc() will fail.
-
- * infrun.c (wait_for_inferior): The criterion to detect entering a
- sigtramp handler is now: (a) the current pc is inside a sigtramp
- handler, (b) the previous pc is not in a sigtramp handler, and (c)
- the current stack pointer is "inner" than the old one. Condition
- (c) is new to avoid mistaking a return from a signal handler into
- sigtramp as a new sigtramp invocation.
-
- * dcache.c (struct dcache_block): Declare addr as CORE_ADDR. An
- int may not be big enough to hold an address.
- (dcache_hit): Ditto.
- (dcache_peek_byte): Fix indentation.
-
- * configure.in (alpha-*-linux*): Add target.
- * configure: Rebuild
-
- * config/alpha/tm-alpha.h (PROC_DESC_IS_DYN_SIGTRAMP): New macro.
- (SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
- (DYNAMIC_SIGTRAMP_OFFSET): Ditto.
- (SIGCONTEXT_ADDR): Ditto.
- (FRAME_PAST_SIGTRAMP_FRAME): Ditto.
-
- * config/alpha/alpha-linux.mh: New file.
- * config/alpha/alpha-linux.mt: Ditto.
- * config/alpha/nm-linux.h: Ditto.
- * config/alpha/tm-alphalinux.h: Ditto.
- * config/alpha/xm-alphalinux.h: Ditto.
- * config/alpha/xm-alphaosf.h: Renamed from xm-alpha.h.
- * config/alpha/alpha-osf1.mh (XM_FILE): Change from xm-alpha.h to
- xm-alphaosf.h.
- * config/alpha/alpha-osf2.mh: Ditto.
-
- * blockframe.c (find_pc_partial_function): Pass PC to
- SIGTRAMP_START and SIGTRAMP_END macros for the benefit of systems
- that detect sigtramp code via designated code sequences (as is the
- case for Linux/Alpha, for example).
-
- * config/i386/tm-i386bsd.h: Change SIGTRAMP_START and SIGTRAMP_END
- to ignore new PC argument.
- * config/m68k/tm-hp300bsd.h: Ditto.
- * config/vax/tm-vax.h: Ditto.
-
- * alpha-tdep.c (alpha_linux_sigtramp_offset): New function.
- (alpha_osf_skip_sigtramp_frame): Ditto.
- (push_sigtramp_desc): Ditto.
- (alpha_find_saved_regs): Use SIGCONTEXT_ADDR macro to extract
- sigcontext address from frame.
- (alpha_saved_pc_after_call): When in sigtramp, use
- alpha_frame_saved_pc() instead of read-register().
- (after_prologue): When inside a dynamically generated sigtramp
- function, there is no prologue, so return address of first
- instruction.
- (alpha_in_prologue): Fix typo in comment.
- (find_proc_desc): Use macro DYNAMIC_SIGTRAMP_OFFSET to determine
- whether we're inside a dynamicaly generated sigtramp function. If
- so, create and push and appropriate procedure descriptor.
- (alpha_frame_chain): Use macro FRAME_PAST_SIGTRAMP_FRAME to obtain
- the frame past a sigtramp frame (if the current frame is indeed a
- sigtramp function).
- (init_extra_frame_info): Don't read next frame register off of
- stack-pointer when inside a dynamiccaly generated sigtramp.
- (alpha_pop_frame): Also unlink and destroy procedure descriptors
- created for dynamically generated sigtramp functions.
-
- * alpha-nat.c: When compiling under Linux, include <asm/reg.h> and
- <alpha/ptrace.h> instead of <machine/reg.h>
-
-Tue Jul 2 13:58:10 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (inf_validate_task_sc):
- Give terminal to gdb while asking question.
- (inf_resume): Don't validate the task suspend-count while execing.
-
-Thu Jun 13 11:04:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (inf_validate_task_sc): Query user before clearing any
- additional suspend count.
- (S_proc_wait_reply, gnu_attach): Don't call inf_validate_task_sc.
- (inf_resume): Call inf_validate_task_sc here.
- (gnu_resume): Call inf_update_procs to ensure noticing new threads.
-
-Fri Jun 7 17:00:43 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (gnu_create_inferior: attach_to_child): Return PID.
-
-Thu May 23 15:13:56 1996 Jeffrey A Law (law@cygnus.com)
-
- * h8300-tdep.c (IS_PUSH): Refine.
- (IS_MOVE_FP, IS_MOV_SP_FP): Accept H8/300H varaints.
- (IS_SUB4_SP, IS_SUBL_SP): New macros.
- (h8300_skip_prologue): Handle H8/300H prologue code sequences.
- (examine_prologue): Handle addresses from 0x010000 to 0xffffff
- when in H8/300H mode. Get the return pointer's address correctly
- for the H8/300H. Handle H8/300H prolouge code sequences.
-
- * symfile.c (generic_load): Print the starting address
- of the file just loaded.
-
-Thu May 23 12:09:52 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Edit @THREAD_DB_OBS@ out of makefile.
-
-Tue May 21 11:53:56 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * breakpoint.c (bpstat_do_actions): Avoid endless recursion
- if a `source' command is contained in bs->commands.
-
- * infrun.c (wait_for_inferior): Update step_frame_address when
- stepping into a new line.
-
- From schwab@issan.informatik.uni-dortmund.de (Andreas Schwab):
- * breakpoint.c (breakpoint_1): Add shlib_disabled case to
- bpenables array.
-
-Mon May 20 22:52:00 1996 Mark Alexander <marka@cygnus.com>
-
- * dsrec.c (load_srec): Add WAITACK parameter, for machines
- like EST visionICE that send back an ACK after each S-record.
- * monitor.c (monitor_wait_srec_ack): New function.
- (monitor_load): Pass monitor_wait_srec_ack to load_srec
- if the monitor's MO_SREC_ACK flag is set.
- * monitor.h: Define MO_SREC_ACK flag.
- * remote-est.c (est_cmds): Add MO_SREC_ACK flag.
- * sh3-rom.c (sh3_load): Accomodate change in load_srec prototype.
- * srec.h: Add WAITACK parameter to load_srec prototype.
-
-Sun May 19 21:22:00 1996 Rob Savoye <rob@chinadoll>
-
- * config/sparc/sparclite.mt: Add the sparc simulator.
-
-Sun May 19 16:49:37 1996 Fred Fish <fnf@cygnus.com>
-
- * defs.h (read_command_lines, query_hook): Update prototypes.
- (readline_begin_hook, readline_hook, readline_end_hook): Declare.
- * breakpoint.c (commands_command): Build message in temporary buffer
- and pass that, as well as tty control flag, to read_command_lines.
- * top.c (readline_begin_hook, readline_hook, readline_end_hook):
- Define here.
- (command_loop): Check for non-NULL instream before looping.
- (command_line_input): Use readline_hook when appropriate, to get
- user input from a GUI window.
- (read_next_line): Also build prompt if getting user input from a GUI.
- (recurse_read_control_structure): Fix typo in comment.
- (read_command_lines): Use passed in prompt and tty flag to decide how
- to build message. Use readline_begin_hook when appropriate, to set
- up a GUI interaction window. Just return head, whether NULL or not,
- after using readline_end_hook to complete GUI interaction.
- (define_command, document_command): Build message in a temporary
- buffer and pass it to read_command_lines, along with tty flag.
-
-
-Sat May 18 02:43:58 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * blockframe.c (frameless_look_for_prologue):
- Add FUNCTION_START_OFFSET only if func_start is non-zero.
- * minsyms.c (lookup_minimal_symbol_by_pc): Return NULL if
- pc is not in a known section.
- * stack.c (print_frame_info): Remove check for fi->pc in known
- section, now handled by lookup_minimal_symbol_by_pc.
-
-
-Fri May 17 13:31:04 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * sh-stub.c: New file, was config/sh/stub.c.
-
-
-Wed May 15 08:25:12 1996 Jeffrey A Law (law@cygnus.com)
-
- * top.c (read_next_line): Fix thinkos. From Donn Seeley.
-
- * coffread.c (coff_symtab_read): Handle C_LABEL symbols like
- C_STAT symbols.
- * h8300-tdep.c (h8300_pop_frame): Reset $sp and $pc correctly.
- Flush cached frames just before exiting.
- * remote-sim.c (gdbsim_resume): Complain if the program isn't
- being run.
- * config/h8300/tm-h8300.h (BELIEVE_PCC_PROMOTION): Define.
-
-Tue May 14 18:05:16 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * procfs.c (procfs_thread_alive procfs_stop): Make static.
- (procfs_pid_to_str): New routine to print out thread id's in an
- intelligible manner.
- * sol-thread.c (sol_thread_fetch_registers): Re-order manner in
- which supply_register is called to fix bug with writing
- individual regs.
- * config/sparc/tm-sun4sol2.h: Define default for
- target_pid_to_str in case host lacks libthread_db.
-
-Mon May 13 23:53:30 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * Makefile.in config.in configure configure.in
- config/sparc/nm-sun4sol2.h config/sparc/sun4sol2.mh
- config/sparc/tm-sun4sol2.h: Use autoconf to config Solaris thread
- and pthread support, since pre-2.5 systems don't come with
- libthread_db.so.1.
-
- * procfs.c (info_proc): Use int instead of id_t. Old versions of
- Irix don't seem to define this.
-
-Mon May 13 17:40:58 1996 Jeffrey A Law (law@cygnus.com)
-
- * top.c (execute_control_command, case while_control): Allow
- a while command to be interrupted.
-
-Mon May 13 16:17:36 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * sol-thread.c: More cleanup, add comments.
- (sol_thread_resume): Prevent people from trying to step
- inactive threads.
- (sol_thread_wait sol_thread_fetch_registers
- sol_thread_store_registers): Remove unnecessary check for
- sol_thread_active. These routines won't get called unless threads
- are active.
-
-Mon May 13 11:29:37 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- SH3-E support from Allan Tajii <atajii@hmsi.com>:
- * sh-tdep.c (sh_reg_names, sh3_reg_names): Add empty names for
- float registers.
- (sh3e_reg_names): New register name array.
- (sh_processor_type_table): Add sh3e processor type.
- * config/sh/tm-sh.h (REGISTER_VIRTUAL_TYPE): Fix test.
- (REGISTER_NAMES, NUM_REGS, NUM_REALREGS, etc): Adjust for
- full set of registers.
- * remote-e7000.c (want_sh3, want_sh3_nopc): New globals.
- (e7000_fetch_registers, e7000_wait): Use them.
- * sh3-rom.c (sh3_regnames): Add float registers.
- (sh3e_cmds, sh3e_ops): New globals.
- (sh3e_open): New function.
- (_initialize_sh3_rom): Rename from _initialize_sh3, set up
- sh3e target vector.
-
-Fri May 10 15:53:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
-
- * sol-thread.c: Cleanup. gcc -Wall fixes. Add prototypes.
- Print out messages instead of codes for thread_db errors. Make
- access macros for thread and lwp manipulation. Make cleanups to
- fixup inferior_pid in case of errors.
-
-Thu May 9 19:06:02 1996 Fred Fish <fnf@cygnus.com>
-
- * aclocal.m4: Remove unused definition of AC_C_CROSS.
- * configure.in: Add powerpcle-*-solaris* host and target config
- so April 30th change does not get lost next time configure is
- rebuilt.
-
-Thu May 9 14:13:08 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * Makefile.in, breakpoint.c, corelow.c, fork-child.c, inflow.c,
- infrun.c, mac-nat.c, procfs.c, remote.c, sol-thread.c, thread.c,
- win32-nat.c, config/nm-lynx.h: Rename thread.h to gdbthread.h to
- avoid conflict with Solaris /usr/include/thread.h.
-
-Thu May 9 12:33:32 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * abug-rom.c: Config file for the older style ABug monitor that
- runs on the mvme13x boards.
- * config/m68k/monitor.mt: Add abug support for m68k cross
- debugging.
-
-Wed May 8 20:33:24 1996 Fred Fish <fnf@cygnus.com>
-
- * infcmd.c (do_registers_info): Always print the raw floating
- point value's bytes in big endian order, so the the leftmost bit
- is the most significant.
- * breakpoint.c (clear_momentary_breakpoints): Remove dead code
- that is referenced nowhere else.
- (set_breakpoint): Ditto.
- (do_enable_breakpoint): Created from enable_once_breakpoint
- with a couple of changes.
- (enable_breakpoint): Call do_enable_breakpoint with an appropriate
- bpdisp enum value to set disposition of breakpoint.
- (enable_once_breakpoint): Ditto.
- (enable_delete_breakpoint): Ditto.
- * breakpoint.h (clear_momentary_breakpoints): Remove prototype.
- * symtab.c (find_pc_line): Improve comments.
- * xcoffread.c: Ditto.
-
-Tue May 7 18:37:06 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * target.c (debug_to_xfer_memory): Insert line breaks when
- dumping the memory block.
-
-Mon May 6 13:52:52 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * fork-child.c (fork_inferior), inferior.h: init_trace_fun now
- returns a possibly modified pid.
- * inftarg.c (ptrace_him): Now returns pid;
- * m3-nat.c (m3_trace_him): Now returns pid;
- * infcmd.c (run_command): Minor cleanup.
- * infrun.c (wait_for_inferior): Add another check for one_stepped
- near where we read the pc to avoid erroneously setting
- random_signal for multi-threaded support.
- * procfs.c: Add support for Solaris LWPs. Remove def of
- LOSING_POLL. Many cleanups... Several workarounds for Solaris
- lossage. System call entry and exit are now handled by
- dynamically registered handlers.
- * (syscallname): Don't barf when handed an unknown syscall
- number.
- * (info_proc_syscalls): Ditto.
- * sol-thread.c: New file. Implements Solaris thread support.
- * symfile.c (symbol_file_add): Add call to target_new_objfile to
- notify target-dependent code about new symbol tables.
- * (clear_symtab_users): Call target_new_objfile to notify it of
- the removal of all symbol tables.
- * target.c (push_target): Make sure that to_close is non-zero
- before calling it.
- * target.h (target_new_objfile): Provide default.
- * config/alpha/nm-osf2.h: Define LOSING_POLL because this version
- of OSF can't hack using poll with /proc.
- * config/sparc/nm-sun4sol2.h (target_new_objfile): Define to be
- sol-thread-new-objfile.
- * config/sparc/sun4sol2.mh: Add sol-thread.o to NATDEFFILES, and
- add libthread_db.so.1 to NAT_CLIBS.
- * config/sparc/tm-sun4sol2.h: Define PIDGET, TIDGET, and
- target_pid_to_str.
-
-Sat May 4 02:13:34 1996 N Srin Kumar <nsrin@wipinfo.soft.net>
-
- * procfs.c (remove_fd): Fix copy of fds to fill hole left after
- removal of the requested fd.
-
-Mon May 6 07:52:48 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000-tdep.c (_initialize_rs6000_tdep): Don't do XCOFF specific
- hooks under ELF.
-
- * config/powerpc/tm-ppc-eabi.h: Define ELF_OBJECT_FORMAT.
-
-Thu May 2 12:46:14 1996 Jeffrey A Law (law@cygnus.com)
-
- From Peter Schauer:
- * breakpoint.h (enum bpdisp): Add del_at_next_stop.
- * breakpoint.c (insert_breakpoints, watchpoint_check,
- bpstat_stop_status): Avoid bad references to memory freed via
- delete_breakpoint on watchpoints going out of scope.
- Do not delete these watchpoints, disable them and change their
- disposition to del_at_next_stop instead.
- (breakpoint_auto_delete): Delete all breakpoints whose disposition
- is del_at_next_stop.
- (breakpoint_init_inferior): Use switch to avoid reference to
- already deleted breakpoint.
-
-Wed May 1 17:29:18 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (rs6000-nat.o): Depend on xcoffsolib.h.
- * config/rs6000/rs6000.mh (NATDEPFILES): Move xcoffread.o ...
- * config/rs6000/rs6000.mt (TDEPFILES): ... to here.
- * xcoffsolib.c (xcoff_relocate_symtab_hook): Define and initialize.
- (solib_info): Call xcoff_relocate_symtab via the hook.
- (sharedlibrary_command): Ditto.
- * xcoffread.c: Remove all FAKING_RS6000 comments and defines.
- (xcoff_add_toc_to_loadinfo_hook): Define and initialize here.
- (xcoff_init_loadinfo_hook): Define and initialize here.
- (scan_xcoff_symtab): Call xcoff_add_toc_to_loadinfo via the hook.
- (xcoff_initial_scan): Call xcoff_init_loadinfo via the hook.
- * xcoffsolib.h (xcoff_relocate_symtab_hook): Declare extern func.
- * rs6000-tdep.c (_initialize_rs6000_tdep): Add initializations
- of xcoff_add_toc_to_loadinfo_hook and xcoff_init_loadinfo_hook.
- * rs6000-nat.c (_initialize_core_rs6000): Add initialization
- of xcoff_relocate_symtab_hook.
-
-Tue Apr 30 13:22:02 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure (powerpcle-*-solaris*): Add Solaris support.
-
- * config/powerpc/{solaris.m[ht],tm-solaris.h}: New files for
- Solaris support.
-
-Mon Apr 29 16:17:31 1996 Dawn Perchik <dawn@cygnus.com>
-
- * c-valprint.c (c_val_print): Fix printing for arrays defined
- with 0 length.
-
-Sun Apr 28 15:08:05 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- Support for bi-endian remote breakpoints.
- * remote.c (big_break_insn, little_break_insn): New globals.
- (break_insn): Remove.
- (remote_insert_breakpoint, remote_remove_breakpoint): Use own
- code if REMOTE_BREAKPOINT defined, otherwise call memory
- breakpoint functions.
- * config/sh/tm-sh.h (REMOTE_BREAKPOINT): Remove.
- (BIG_REMOTE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT): Define.
-
- * mon960-rom.c (mon960_cmds): Remove forward decl.
- (mon960_load): Use current_monitor instead of mon960_cmds.
- (mon960_regnames): Remove backslashes from line ends.
- (_initialize_mon960): Fix documentation string.
-
-Sun Apr 28 12:10:35 1996 Fred Fish <fnf@cygnus.com>
-
- * symfile.h (psymbol_allocation_list): Expand comments which
- describe the psymbol allocation list and how each field is
- used.
-
-Sun Apr 28 03:44:30 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * breakpoint.c (delete_breakpoint): Fix bpt->val, bpt->exp
- storage leaks.
- (breakpoint_re_set_one): Fix b->exp, b->val, b->cond storage leaks.
-
- * infcmd.c (run_command), solib.c (locate_base): Check for
- target_has_execution in addition to inferior_pid, a core file
- from a threaded program is yielding a non-zero inferior_pid.
-
- * sparc-tdep.c (get_saved_register): Handle window registers
- in a dummy frame correctly.
-
-Sat Apr 27 20:38:32 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (CLIBS): Move $(MMALLOC) past all other libs,
- so that anything that wants an allocation function not yet pulled
- in, will get it from mmalloc rather than a system library.
- * Makefile.in (INSTALLED_LIBS): Reorder to match order of CLIBS,
- to avoid surprising results when used.
-
-Sat Apr 27 00:12:05 1996 Dawn Perchik (dawn@cygnus.com)
-
- * stabsread.c: Changes and bug fixes for cfront support.
- Fix bug for class data members.
- Fix parsing bug when no base classes exist.
- Fix memory bug - allocate space for cplusplus specific info.
- Add support for static data.
- Add prototypes for static functions.
- Enhance comments to show what each function expects to parse.
- Cleanup code.
- * stabsread.c(resolve_cont),dbxread.c(resolve_cont): Rename
- function to resolve_cfront_continuation.
-
-Fri Apr 26 23:58:26 1996 Jeffrey A Law (law@cygnus.com)
-
- * infrun.c (wait_for_inferior): Call registers_changed when
- restarting the inferior to get over a nullified instruction.
-
-Tue Apr 24 12:12:55 1996 Dawn Perchik (dawn@cygnus.com)
-
- * dbxread.c,stabsread.c,gdbtypes.c,partial-stab.h,valops.c:
- Add new support for parsing cfront stabs.
-
-Wed Apr 24 00:32:55 1996 Jeffrey A Law (law@cygnus.com)
-
- * infrun.c (wait_for_inferior): Move "have_waited" label
- outside of #ifdef conditionals. Don't trash the wait status
- if we get a signal and the current instruction is nullified.
-
-Mon Apr 22 20:17:01 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (VERSION): Bump version number to 4.16.1.
- * NEWS: Update for 4.16 release.
-
-Mon Apr 22 16:32:29 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * monitor.h: Clean up comment formatting.
- (current_monitor): Remove decl.
- (LOADTYPES, LOADPROTOS, INIT_CMD, etc): Remove definitions.
- (push_monitor, SREC_SIZE): Remove.
- * monitor.c: Expand old macro into current_monitor derefs
- everywhere.
- * remote-os9k.c (current_monitor): Remove definition.
-
-Mon Apr 22 14:54:45 1996 Mark Alexander <marka@superball.cygnus.com>
-
- * corefile.c (specify_exec_file_hook): Allow arbitrary number of
- hooks.
- (call_extra_exec_file_hooks): New function.
- * h8300-tdep.c: Lint; add .h files to provide missing declarations,
- remove unused variables.
- (set_machine_hook): New function.
- (_initialize_h8300m): Initialize it.
-
-Fri Apr 19 15:03:49 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * remote-mips.c (encoding): Don't specify size, to avoid bug in
- SunOS native compiler.
-
-Thu Apr 18 18:46:57 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * monitor.c: Use int rather than LONGEST for values, since
- the formatting strings are not prepared to accept long longs.
-
-Wed Apr 17 20:17:27 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * arm-tdep.c (initialize_arm_tdep): Make apcs32 a `zinteger'.
-
-Tue Apr 16 17:38:23 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * corelow.c (add_to_thread_list): Make sure reg_sect is non-null
- before de-referencing it. Prevents deref of NULL pointer if core
- file lacks .reg section.
- * defs.h: Rename floatformat_{to from}_long_double to
- floatformat_{to from}_doublest. Get rid of FLOATFORMAT_{TO
- FROM}... macros.
- * findvar.c (extract_floating store_floating): Change all refs to
- FLOATFORMAT_{FROM TO}... to floatformat_{from to}_doublest.
- * utils.c: Change floatformat_{to from}_long_double to
- floatformat_{to from}_doublest cuz the new routines will use
- whatever size (double or long double) is appropriate.
- * config/i960/tm-i960.h (REGISTER_CONVERT_TO_VIRTUAL
- REGISTER_CONVERT_TO_RAW): Change FLOATFORMAT... macros to
- floatformat... routine calls.
-
-Mon Apr 15 16:34:11 1996 Per Bothner <bothner@kalessin.cygnus.com>
-
- * stabsread.c (read_type): Move handling of '@' from type
- number handling to handling of types proper (as emitted by gcc!).
- For typedefs, allocate the typedef type before reading its
- definition, to properly handling recursive types.
-
-Mon Apr 15 11:19:26 1996 Jeffrey A Law (law@cygnus.com)
-
- * ch-exp.c (calculate_array_length): Fix prototype.
-
-Sat Apr 13 14:21:16 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * remote-nindy.c (nindy_open): Acquire more target state so that
- user can attach to a previously running program.
- * (nindy_fetch_registers nindy_store_registers): Get rid of fp
- conversion code. That's all handled in {extract store}_floating
- now.
- * utils.c (floatformat_to_double): Don't bias exponent when
- handling zero's, denorms or NaNs.
- * config/i960/tm-i960.h (REGISTER_CONVERT_TO_VIRTUAL
- REGISTER_CONVERT_TO_RAW): Change to using DOUBLST and
- FLOATFORMAT_TO/FROM_DOUBLEST macros.
- * config/i960/tm-nindy960.h: Undefine
- REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, and
- REGISTER_CONVERTIBLE. These are no longer necessary now that all
- the magic happens in extract/store_floating.
-
-Sat Apr 13 02:58:02 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * eval.c (evaluate_subexp_standard): Report error when attempting to
- evaluate subscripts for types which cannot be subscripted.
-
- * valarith.c (value_x_binop, value_x_unop): Add noside parameter.
- Return a zero value with the return type of the member function
- if noside is EVAL_AVOID_SIDE_EFFECTS instead of calling the member
- function.
- * values.h (value_x_binop, value_x_unop): Update prototypes
- accordingly.
- * eval.c (evaluate_subexp_standard): Update all callers of
- value_x_binop, value_x_unop accordingly.
-
- * valarith.c (value_neg, value_complement): Perform ANSI C/C++
- integral promotion on operands.
-
-Fri Apr 12 13:19:27 1996 Fred Fish <fnf@cygnus.com>
-
- * README: Update for 4.16 release.
- * configure.in (AC_CHECK_FUNCS): Also check for sbrk.
- * configure: Regenerate with autoconf.
- * config.in: Regenerate with autoheader.
- * main.c (main): Only use sbrk() when HAVE_SBRK is defined.
- * top.c (command_loop): Ditto.
-
-Fri Apr 12 09:45:29 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * defs.h: Define TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT
- defaults for bi-endian targets. Replace function pointers for
- floatformat routines with macros. No need for these to be runtime
- selectable.
- * findvar.c: Get rid of floatformat function pointers. Use
- macros in extract_floating and store_floating.
- * remote-nindy.c (nindy_fetch_registers nindy_store_registers):
- Use floatformat macros.
-
-Thu Apr 11 21:28:02 1996 Fred Fish <fnf@cygnus.com>
-
- From: Miles Bader <miles@gnu.ai.mit.edu>
- * configure.in (AC_CHECK_HEADERS): check for endian.h.
- Use AC_CHECK_TOOL to find AR & RANLIB. Add AC_PROG_AWK.
- Add host & target cases for i[345]86-*-gnu*.
- * config.in: Regenerate with autoheader.
- * configure: Regenerate with autoconf.
- * Makefile.in (AR, AWK): Set from corresponding autoconf substs.
- (init.c): Don't scan mig-generated files.
- * defs.h (endian.h): Include if HAVE_ENDIAN_H defined.
- * config/nm-m3.h (ATTACH_NO_WAIT): Define.
- * infcmd.c (attach_command): Use "#ifndef ATTACH_NO_WAIT"
- rather than "#ifndef MACH".
-
-Thu Apr 11 18:49:42 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote.c (remotewritesize): New GDB variable, controls size
- of memory packets sent to the target.
-
-Thu Apr 11 13:47:52 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dcache.c: Add prototypes. Make many functions static.
- * (dcache_peek dcache_fetch dcache_poke): Make dcache_fetch and
- dcache_poke call dcache_xfer_memory directly in order to fix
- problems with turning off dcache. dcache_peek is now unnecessary,
- so it goes away.
-
- * defs.h: Define new macros HOST_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT
- and TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT to specify a pointer
- to a struct floatformat. This allows for better handling of
- targets whose floating point formats differ from the host by more
- than just byte order.
- * (floatformat_to_long_double floatformat_from_long_double):
- Prototypes for new functions in utils.c.
- * (floatformat_to_doublest floatformat_from_doublest): Prototypes
- for pointers to floating point conversion functions. The actual
- function uses either double or long double if the host supports it.
- * findvar.c (floatformat_to_doublest floatformat_from_doublest):
- Initialize to point at correct function depending on HAVE_LONG_DOUBLE.
- * (extract_floating store_floating): Rewrite. Now, if host fp
- format is the same as the target, we just do a copy. Otherwise,
- we call floatformat_{to from}_doublest.
- * remote-nindy.c (nindy_xfer_inferior_memory): Change param
- `write' to `should_write'.
- * utils.c (floatformat_to_long_double
- floatformat_from_long_double): New routines that implement long
- double versions of functions in libiberty/floatformat.c.
- * config/i960/tm-i960.h (TARGET_LONG_DOUBLE_FORMAT): Define this for
- i960 extended real (80 bit) numbers.
- * nindy-share/nindy.c (ninMemGet ninMemPut): Return number of bytes
- actually read or written.
-
-Wed Apr 10 02:56:06 1996 Wilfried Moser <moser@rtl.cygnus.com>
-
- * ch-valprint.c (chill_val_print): Remove call to calculate_array_length.
- (calculate_array_length): Move function from here ...
-
- * ch-exp.c (calculate_array_length): ... to here.
- (parse_primval): If we have a symbol with an array type
- and the length is 0, call calculate_array_length.
-
-Tue Apr 9 01:23:05 1996 Wilfried Moser <moser@rtl.cygnus.com>
-
- * eval.c (evaluate_subexp_standard): In case of TYPE_CODE_SET:
- Add some checks for powerset compatibility.
-
- * valops.c (value_slice): Use lowbound instead of lowerbound for
- call to slice_range_type to get correct bounds.
-
-Mon Apr 8 12:53:56 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (scm-exp.o, scm-lang.o, scm-valprint.o): Add targets and
- dependencies.
- * scm-lang.c (gdb_string.h): Include.
- * objfiles.c (add_to_objfile_sections): Cast second arg of obstack_grow
- call to correct type (char *).
- * cp-valprint.c (cp_print_static_field): Ditto.
- * somsolib.c (som_solib_create_inferior_hook): Add a declaration
- for external find_unwind_entry function (from hppa-tdep.c).
- * remote-pa.c (remote_write_bytes, remote_read_bytes): Change
- type of second arg to "char *" to be type compatible with
- dcache.
- (remote_wait): Cast second arg to strtol to correct type.
- * hppa-tdep.c (compare_unwind_entries): Change argument types to
- "const void *" to be type compatible with qsort, and then
- assign to local args prior to use.
-
-Mon Apr 8 15:35:52 1996 Jeffrey A Law (law@cygnus.com)
-
- * infptrace.c (kill_inferior): Remove call to "kill"; update
- comments.
-
-Mon Apr 8 14:05:07 1996 Geoffrey Noer <noer@cygnus.com>
-
- * remote-e7000.c: don't append :23 to target port if __WIN32__
- is defined (it's WinGDB).
-
-Sun Apr 7 22:34:29 1996 Fred Fish <fnf@cygnus.com>
-
- From: Miles Bader <miles@gnu.ai.mit.edu>
- * gnu-nat.c, gnu-nat.h, msg.defs, exc_request.defs, i386gnu-nat.c,
- msg_reply.defs, notify.defs, process_reply.defs, reply_mig_hack.awk,
- config/nm-gnu.h, config/i386/{i386gnu.mh, i386gnu.mt, nm-gnu.h,
- m-i386gnu.h, xm-i386gnu.h}: New files for GNU hurd.
-
-Sun Apr 7 13:32:41 1996 Fred Fish <fnf@cygnus.com>
-
- * configure.in (case host): Add i386sco5 host.
- * configure: Regenerate.
-
- From: Robert Lipe <robertl@dgii.com>
- Add support for SCO OpenServer 5 (a.k.a. 3.2v5*) This
- target is an SVR3.2 with COFF, ELF, and shared libes, but
- no /proc.
- * config/i386/i386sco5.mh: New file.
- * config/i386/nm-i386sco5.h: New file.
-
-Sat Apr 6 08:55:22 1996 Fred Fish <fnf@cygnus.com>
-
- * bcache.c (bcache): When size of chunk to cache is exactly equal to
- BCACHE_MAXLENGTH, stash chunk as unique copy.
-
-Sat Apr 6 00:46:26 1996 Fred Fish <fnf@cygnus.com>
-
- * symfile.c (INLINE_ADD_PSYMBOL): Remove ifdef.
- (add_psymbol_to_list): Add an arg for passing CORE_ADDR values and
- use it, rather than calling add_psymbol_addr_to_list.
- (add_psymbol_addr_to_list): Delete.
- (add_psymbol_to_list): Make psymbol static to avoid random data in
- gaps due to alignment of structure members.
- * symfile.h (INLINE_ADD_PSYMBOL, ADD_PSYMBOL_TO_LIST,
- ADD_PSYMBOL_ADDR_TO_LIST): Remove. Real world tests show no
- performance improvements by inlining via complicated macros and
- they just make gdb larger and harder to maintain.
- * dwarfread.c (add_enum_psymbol): Replace ADD_PSYMBOL_TO_LIST
- and/or ADD_PSYMBOL_ADDR_TO_LIST macro(s) with call to
- add_psymbol_to_list with appropriate long or CORE_ADDR args.
- (add_partial_symbol): Ditto.
- * partial-stab.h: Ditto.
- * os9kread.c (read_os9k_psymtab): Ditto
- * mdebugread.c (parse_partial_symbols): Ditto.
- (handle_psymbol_enumerators): Ditto.
- (demangle.h): Include.
- * hpread.c (hpread_build_psymtabs): Ditto.
- (hpread_build_psymtabs): Ditto.
- (demangle.h): Include
-
-Thu Apr 4 20:16:55 1996 Fred Fish <fnf@cygnus.com>
-
- * configure.in: Check for setpgid function.
- * config.in: Regenerate with autoheader.
- * configure: Regenerate with autoconf.
- * inflow.c (_initialize_inflow): Only try to use _SC_JOB_CONTROL
- if it is actually defined.
- (gdb_setpgid): Use HAVE_SETPGID.
- * ch-exp.c: Change include of <string.h> to "gdb_string.h".
- * c-exp.y, f-exp.y, m2-exp.y: Ditto.
- * c-exp.y, serial.c: Include <ctype.h>.
- * config/m68k/nm-news.h: Add typedef for pid_t which is
- apparently missing from <sys/types.h>. Enclose entire
- file in NM_NEWS_H ifndef and define when included.
- * config/mips/nm-news-mips.h: Ditto.
- * config/m68k/tm-m68k.h (REGISTER_CONVERT_TO_VIRTUAL,
- REGISTER_CONVERT_TO_RAW): Change name of temporary variable.
-
-Thu Apr 4 19:04:18 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * arm-xdep.c: Move native-specific code to here from arm-tdep.c.
- * arm-tdep.c (arm_apcs_32): New global.
- (arm_addr_bits_remove, arm_saved_pc_after_call,
- arm_push_dummy_frame, arm_pop_frame): New functions.
- (arm_skip_prologue): Updated version from Richard Earnshaw.
- (_initialize_arm_tdep): Add set/show "apcs32".
- * config/arm/tm-arm.h (ADDR_BITS_REMOVE): Call
- arm_addr_bits_remove.
- (SAVED_PC_AFTER_CALL): Call arm_saved_pc_after_call.
- (frame_find_saved_regs): Declare properly.
- (PUSH_DUMMY_FRAME): Call arm_push_dummy_frame.
- (POP_FRAME): Call arm_pop_frame, use ADDR_BITS_REMOVE instead of
- explicit mask.
- * config/arm/nm-arm.h: New file.
- * config/arm/xm-arm.h (KERNEL_U_ADDR, FETCH_INFERIOR_REGISTERS):
- Move definitions to nm-arm.h.
- * config/arm/arm.mh (NAT_FILE): Define.
-
- * symfile.c (generic_load): Initialize data_count properly.
-
-Thu Apr 4 17:17:53 1996 Fred Fish <fnf@cygnus.com>
-
- * symmisc.c (print_objfile_statistics): Print memory used by
- psymbol cache obstack.
-
-Thu Apr 4 15:43:07 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * symfile.c (report_transfer_performance): New function.
- (generic_load): Call it to report transfer rate.
- * remote-e7000.c (e7000_load): Ditto.
-
-Mon Apr 1 16:31:00 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Change references to config.h to be in objdir,
- edit out rules to rebuild config.h.
-
-Mon Apr 1 08:32:23 1996 Fred Fish <fnf@cygnus.com>
-
- * hppa-tdep.c (hppa_pop_frame): Call clear_proceed_status before
- proceeding.
-
-Sun Mar 31 16:15:43 1996 Fred Fish <fnf@cygnus.com>
-
- * hppah-nat.c (store_inferior_registers, store_inferior_registers,
- fetch_register, child_xfer_memory): Use call_ptrace function supplied
- by infptrace.c rather than calling ptrace directly.
-
-Sun Mar 31 15:39:00 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mon960-rom.c: Cleanups and elimination of unused code,
- clarify documentation string.
- (mon960_serial, mon960_ttyname): Remove.
- * config/i960/tm-mon960.h (ADDITIONAL_OPTIONS,
- ADDITIONAL_OPTION_CASES, ADDITIONAL_OPTION_HELP): Remove.
-
-Sat Mar 30 11:00:22 1996 Fred Fish <fnf@cygnus.com>
-
- * configure.in: Check whether printf family supports printing
- long doubles or not and define PRINTF_HAS_LONG_DOUBLE if so.
- * acconfig.h: Provide default undef for PRINTF_HAS_LONG_DOUBLE.
- * configure: Regenerate.
- * valprint.c (print_floating): Use PRINTF_HAS_LONG_DOUBLE.
- * c-exp.y (parse_number): Use PRINTF_HAS_LONG_DOUBLE.
- * configure.in: Fix have_gregset and have_fpregset autoconf
- variable names so that they match the pattern required to
- cache them.
-
-Fri Mar 29 21:39:56 1996 Fred Fish <fnf@cygnus.com>
-
- * core-aout.c (fetch_core_registers): Cast core_reg_size to int
- before testing against reg_ptr.
- * eval.c (evaluate_subexp_standard): Cast type of
- TYPE_FN_FIELD_VOFFSET to int.
- * findvar.c (extract_signed_integer, extract_unsigned_integer,
- extract_long_unsigned_integer): Cast type of sizeof to int.
- * values.c (unpack_field_as_long, modify_field): Ditto.
- * valops.c (value_assign, call_function_by_hand): Ditto.
- * infcmd.c (do_registers_info): Ditto.
- * ser-tcp.c (tcp_open): Ditto.
- * remote.c (putpkt): Ditto.
- * dcache.c (dcache_peek): Ditto.
- * dcache.c (dcache_poke): Ditto.
- * m2-exp.y (yylex): Ditto.
- * gnu-regex.c (re_match_2): Ditto.
- * f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef
- out unused macro definition and variables.
- * inftarg.c (proc_wait): Move from main.c to here, and make static.
- * valprint.c (val_print_string): Change bufsize from int to unsigned.
- * main.c (wait.h): Include.
- * top.c (command_line_input): Remove unused variable "c".
- * f-typeprint.c (f_type_print_varspec_prefix): Add missing enum
- value TYPE_CODE_TYPEDEF to switch statement.
- (f_type_print_varspec_suffix): Add missing enum value
- TYPE_CODE_TYPEDEF to switch statement.
- * ch-exp.c (parse_primval): Add remaining enumeration values to
- switch statement, with no specific action.
- (ch_lex): Add LOC_UNRESOLVED in switch statement.
- (pushback_token): Ifdef out, since code using it is ifdef'd out.
- * stabsread.c (cleanup_undefined_types): Remove unused label
- "badtype".
- * objfiles.h (print_symbol_bcache_statistics): Add prototype.
- * maint.c (objfiles.h): Include.
- (maintenance_print_statistics): Remove unused variable "temp".
- * minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
- unused variable "found_file_symbol".
- * m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch.
- * language.c (lang_bool_type): Use existing function local type
- variable rather than create block local variables.
- * solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS.
- * infptrace.c (wait.h, command.h): Include.
- * ser-tcp.c (gdb_string.h): Include
- * i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR.
- (i386_get_frame_setup): Change "pc" from int to CORE_ADDR.
- * command.c (complete_on_enum): Make assignment used as truth value
- explictly check against NULL.
- (wait.h): Include.
- * infrun.c (wait_for_inferior): Ifdef out prologue_pc since code
- that uses it is ifdef'd out.
- * parser-defs.h: Add prototype for write_dollar_variable.
- * infrun.c: Add prototype for write_pc_pid.
- * breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs.
- * symmisc.c (bcache.h): Include.
- * bcache.h: Add prototype for print_bcache_statistics.
- * symfile.c: Include <time.h>.
- * printcmd.c (print_scalar_formatted): Change len to unsigned int.
- * valarith.c (value_equal): Cast result of TYPE_LENGTH to int.
- * valarith.c (value_binop): Change result_len, promoted_len1,
- and promoted_len2 to unsigned int.
- * valarith.c (value_subscripted_rvalue): Change elt_offs and
- elt_size to unsigned int.
- * valops.c (value_array): Change typelength to unsigned int.
- (destructor_name_p): Change len to unsigned int.
- * scm-lang.h (scm_parse): Add prototype for scm_unpack.
- * symfile.c (decrement_reading_symtab): Change return type to void.
- * valarith.c (value_subscript): Remove unused variable "word".
- (value_subscript): Remove unused variable "tint".
- * valops.c (auto_abandon): Ifdef out, since code using it is also
- ifdef'd out.
- * eval.c (init_array_element): Remove unused variable "val".
- * Makefile.in (values.o): Depends on scm-lang.h.
- (command.o): Depends upon wait_h.
- (ser-tcp.o): Depends upon gdb_string.h.
- (infptrace.o): Depends upon wait_h and command_h.
- (maint.o): Depends on objfiles.h and symfile.h.
- * values.c (allocate_repeat_value): Remove unused variable
- "element_type".
- (scm-lang.h): Include.
- * breakpoint.c (create_longjmp_breakpoint): Enclose in
- GET_LONGJMP_TARGET define, unused otherwise.
- * config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint,
- i386_remove_watchpoint and i386_stopped_by_watchpoint.
-
-Thu Mar 28 12:53:19 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.in (sparc64-*-solaris2*): Delete.
- Stick with sparc-*-solaris2*.
- * configure: Regenerated.
-
-Thu Mar 28 06:51:26 1996 Fred Fish <fnf@cygnus.com>
-
- * valops.c (value_assign): Make copy of internal variable value
- before returning it as a new value, since it is owned by the
- internal variable and will be freed along with it.
-
-Wed Mar 27 08:36:17 1996 Jeffrey A Law (law@cygnus.com)
-
- * From Peter Schauer.
- * breakpoint.c (breakpoint_re_set_one): Keep temporary
- breakpoints bp_until, bp_finish, bp_watchpoint_cope, bp_call_dummy
- and bp_step_resume in case breakpoint_re_set_one is called due
- to a step over a dlopen call.
- * infrun.c (wait_for_inferior): Always remove breakpoints from
- inferior in BPSTAT_WHAT_CHECK_SHLIBS case.
-
-Tue Mar 26 13:15:32 1996 Fred Fish <fnf@cygnus.com>
-
- * config/mips/tm-mips.h (COERCE_FLOAT_TO_DOUBLE): Only prefer
- non-prototyped case over prototyped case for C.
- * config/pa/tm-hppa.h (COERCE_FLOAT_TO_DOUBLE): Ditto.
-
-Sat Mar 23 17:24:28 1996 Fred Fish <fnf@cygnus.com>
-
- * os9kread.c (os9k_process_one_symbol): Note nonportable
- assumption that an int can hold a char *.
-
- * bcache.h (struct hashlink): Wrap data[] inside union with
- double to force longest alignment.
- (BCACHE_DATA): New macro to access data[].
- (BCACHE_ALIGNMENT): New macro to get offset to data[].
- * bcache.c (lookup_cache, bcache): Use BCACHE_DATA to get
- address of cached data. Use BCACHE_ALIGNMENT to compute
- amount of space to allocate for each hashlink struct.
-
-Sat Mar 23 12:14:02 1996 Fred Fish <fnf@cygnus.com>
-
- * ch-lang.c (evaluate_subexp_chill): Fix typo.
-
-Thu Mar 21 08:27:19 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (VERSION): Bump version to 4.15.3
-
-Thu Mar 21 10:56:41 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * config.in: Rename from config.h.in.
- * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
- Change CONFIG_HEADERS test in AC_OUTPUT accordingly.
- * configure: Rebuild.
- * Makefile.in (stamp-h): Depend upon config.in, not config.h.in.
- Set CONFIG_HEADERS to config.h:config.in.
-
-Tue Mar 19 12:47:51 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * partial-stab.h (case N_ENDM): Finish current partial symbol
- table for Solaris 2 cc.
-
-Tue Mar 19 10:39:15 1996 Jeffrey A Law (law@cygnus.com)
-
- * rs6000-nat.c (exec_one_dummy_insn): Don't clobber the
- PC in the registers array. From Peter Schauer.
-
-Mon Mar 18 13:47:09 1996 Fred Fish <fnf@cygnus.com>
-
- * symfile.c (reread_symbols): Reinitialize bcache struct
- members to zero using memset. Also use memset to reinit
- global_psymbols and static_psymbols, rather than explicitly
- resetting each structure member.
-
-Sat Mar 16 19:47:36 1996 Fred Fish <fnf@cygnus.com>
-
- * configure.in: Add fragment to create stamp-h.
-
- From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
- * configure.in (AC_CHECK_HEADERS): Check for link.h.
- * configure: Regenerate with autoconf.
- * config.h.in: Regenerate with autoheader.
- * config/i386/nm-linux.h: Include solib.h only if HAVE_LINK_H
- is defined.
- * solib.c: Exclude most of the code if HAVE_LINK_H is not defined.
- * config/i386/linux.mh: Reinstate XM_CLIBS, it is needed for
- older a.out based systems.
-
-Sat Mar 16 16:45:43 1996 Fred Fish <fnf@cygnus.com>
-
- * config.h.in: New file.
- * acconfig.h: New file, for autoheader.
- * configure.in (AC_CONFIG_HEADER): Add, generate config.h.
- * configure: Regenerate.
- * Makefile.in (defs_h): Add config.h
- (distclean): Remove config.h and stamp-h during distclean.
- (config.h, stamp-h): New targets to remake config.h when necessary.
- * defs.h (config.h): Include before any other includes or defines.
- * i386-tdep.c (gdb_string.h): Move include after include of defs.h.
- * i386v4-nat.c (defs.h): Include before testing HAVE_SYS_PROCFS_H.
-
-Sat Mar 16 14:55:27 1996 Fred Fish <fnf@cygnus.com>
-
- From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
- * Makefile.in (INSTALLED_LIBS): Make sure that @LIBS@ will not
- result in an empty line, to work around a bug in native Ultrix 4.4
- and OSF/1-3.2C make.
-
-Sat Mar 16 13:33:17 1996 Fred Fish <fnf@cygnus.com>
-
- * configure.in: Add gdbserver to configdirs under linux.
- * configure: Regenerate.
-
-Fri Mar 15 12:06:58 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * config/i386/nm-nbsd.h (FLOAT_INFO): Comment out.
- * config/i386/tm-nbsd.h (NUM_REGS): Define.
-
-Thu Mar 14 10:31:18 1996 Jeffrey A Law (law@cygnus.com)
-
- * solib.c (solib_break_names): Add _r_debug_state for
- vanilla SVR4 implementations. From Peter Schauer.
-
-Mon Mar 11 14:24:57 1996 Dawn Perchik <dawn@critters.cygnus.com>
-
- * mon960-rom.c: New file; support mon960 rom monitor on i960.
- * monitor.c (monitor_debug): Change remotedebug to buffer strings.
- * monitor.c (monitor_open): Add test for flag MO_NO_ECHO_ON_OPEN before
- epecting prompt and echo during open.
- * monitor.c (monitor_stop): Add test for flag MO_SEND_BREAK_ON_OPEN to
- determine if break should be sent as stop command.
- * monitor.h: Add flags MO_NO_ECHO_ON_OPEN and MO_SEND_BREAK_ON_OPEN.
- * i960-tdep.c (mon960_frame_chain_valid): New function for getting
- stack frame on mon960.
- * Makefile.in: Add mon960 files.
- * configure.in: Changed i960-*-coff* and i960-*-elf* to target mon960;
- added i960-nindy-coff* and i960-nindy-elf* for target nindy.
- * configure: Regenerated.
- * config/i960/mon960.mt, config/i960/tm-mon960.h: New files;
- support mon960 rom monitor on i960.
-
-Mon Mar 11 11:02:47 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- With Michael Snyder:
- * i386-tdep.c (skip_trampoline_code): Fix strncmp length.
- * win32-nat.c (CHECK, DEBUG*, debug_*): New.
- (handle_load_dll): Don't reload symbols.
- (handle_exception): Use the DEBUG_* names.
- (child_wait): Add DEBUG_* code.
- (_initialize_inftarg): Add new commands to set debug_ names.
-
-Mon Mar 11 09:19:58 1996 Jeffrey A Law (law@cygnus.com)
-
- * From Peter Schauer:
- * breakpoint.c (insert_breakpoints): Use ALL_BREAKPOINTS_SAFE.
- (bpstat_stop_status): Likewise.
- (remove_solib_event_breakpoints): Likewise.
- (clear_momentary_breakpoints): Likewise.
- (re_enable_breakpoints_in_shlibs): Don't reenable a breakpoint
- if we still can't read the memory for that breakpoint.
- (mention): Add bp_shlib_event case to keep gcc quiet.
-
-Fri Mar 8 12:08:12 1996 Jeffrey A Law (law@cygnus.com)
-
- * breakpoint.h (enum enable): New enum shlib_disabled for
- shared library breakpoints that have been temporarily disabled.
- * breakpoint.c: Handle temporarily disabled shared library
- breakpoints like disabled breakpoints in most places.
- (insert_breakpoints): Use shlib_disabled to indicate
- that an unsettable breakpoint is only temporarily disabled.
- (re_enable_breakpoints_in_shlibs): New function.
- * corelow.c (solib_add_stub): After adding shared libraries,
- try to reenable any temporarily disabled breakpoints.
- * infcmd.c (attach_command): Likewise.
- * infrun.c (wait_for_inferior): Likewise.
-
-Fri Mar 8 11:41:25 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * defs.h (extract_long_unsigned_integer): Declare.
- * findvar.c (extract_long_unsigned_integer): New function.
- * printcmd.c (print_scalar_formatted): Use it.
- * valprint.c (val_print_type_code_int): Likewise.
-
-Thu Mar 7 17:40:50 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * infcmd.c (do_registers_info): Ignore anonymous registers.
- * sh-tdep.c (set processor): New command to set specific
- processor type.
- (sh_reg_names, sh3_reg_names): Arrays of register names for
- SH and SH3 processors.
- (sh_set_processor_type): New function.
- * sh3-rom.c (sh3_open): Call it.
- (sh3_regname): Add names of all the bank registers.
- (sh3_supply_register): Clean up formatting.
- * config/sh/tm-sh.h (NUM_REGS, NUM_REALREGS): Increase to include
- bank registers.
- (REGISTER_NAMES): Add names of bank registers.
- (FP15_REGNUM): Define.
- (REGISTER_VIRTUAL_TYPE): Use it.
- * monitor.c: Clean up some comments.
-
-Thu Mar 7 12:09:51 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * i386b-nat.c: Revert part of Mar 5 change. FreeBSD collapsed the
- s* and t* symbols too.
-
-Thu Mar 7 15:18:51 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * symfile.c (generic_load): Avoid division by zero.
-
-Wed Mar 6 17:57:59 1996 Jeffrey A Law (law@cygnus.com)
-
- * breakpoint.c (bfd_lookup_symbol): Provide for all SVR4 systems,
- not just those with HANDLE_SVR4_EXEC_EMULATORS.
-
- From Peter Schauer:
- * breakpoint.c (internal_breakpoint_number): Move to file scope.
- (create_solib_event_breakpoint): Use an internal breakpoint number.
-
-Wed Mar 6 00:32:44 1996 Wilfried Moser <moser@rtl.cygnus.com>
-
- * valarith.c (value_in): Change builtin_type_chill_bool to
- LA_BOOL_TYPE.
-
-Tue Mar 5 23:48:36 1996 Wilfried Moser <moser@rtl.cygnus.com>
-
- * ch-exp.c (parse_primval): Handle CARD, MAX, MIN.
- (match_string_literal): Handle control sequence.
- (match_character_literal): Deto.
-
- * ch-lang.c (chill_printchar): Change formating of nonprintable
- characters from C'xx' to ^(num).
- (chill_printstr): Deto.
- (value_chill_card, value_chill_max_min): New functions to process
- Chill's CARD, MAX, MIN.
- (evaluate_subexp_chill): Process UNOP_CARD, UNOP_CHMAX, UNOP_CHMIN.
-
- * expression.h (exp_opcode): Add UNOP_CARD, UNOP_CHMAX, UNOP_CHMIN
- for Chill's CARD, MAX, MIN.
-
- * valarith.c (value_in): Add processing of TYPE_CODE_RANGE
- and change return type from builtin_type_int to
- builtin_type_chill_bool.
-
-Tue Mar 5 18:54:04 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/nm-nbsd.h (link_object, lo_name, etc): Move to here
- from config/nm-nbsd.h.
- * config/sparc/nm-nbsd.h (regs, fp_status, etc): Move to here
- from config/sparc/tm-nbsd.h.
-
- * config/m68k/nm-hp300hpux.h (FIVE_ARG_PTRACE): Define here
- instead of in config/m68k/xm-hp300hpux.h.
-
-Tue Mar 5 12:05:35 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * i386b-nat.c, m68knbsd-nat.c (fetch_core_registers): Provide
- implementation for NetBSD systems.
-
-Mon Mar 4 23:44:16 1996 Per Bothner <bothner@kalessin.cygnus.com>
-
- * valarith.c (binop_user_defined_p): Return 0 for BINOP_CONCAT.
- (value_concat): Handle varying strings (add COERCE_VARYING_ARRAY).
-
- * ch-lang.c (evaluate_subexp_chill case MULTI_SUBSCRIPT): Error
- if "function" is pointer to non-function.
-
-Mon Mar 4 17:47:03 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * top.c (print_gdb_version): Update copyright year.
-
-Mon Mar 4 14:44:54 1996 Jeffrey A Law (law@cygnus.com)
-
- From Peter Schauer:
- * infrun.c (wait_for_inferior): Remove breakpoints and
- switch terminal settings before calling SOLIB_ADD.
- * solib.c (enable_break, SVR4 variant): Don't map in symbols
- for the dynamic linker, the namespace pollution causes real
- problems.
-
-Sun Mar 3 17:18:57 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * remote-mips.c (common_breakpoint): Explicitly terminate the
- returned buffer.
-
-Wed Feb 28 22:32:18 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- From Wilfried Moser <wilfried.moser@aut.alcatel.at>:
- * remote.c (remote_detach): Send a command 'D' to the target
- when detaching, update the function's comments.
-
-Thu Jun 6 16:11:38 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (thread_cmd_list): New declaration.
- (parse_int_arg): New function.
-
-Wed Jun 5 17:28:04 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.h (struct proc): Add DETACH_SC field.
- * gnu-nat.c (make_proc): Set DETACH_SC.
- (struct inf): Add DETACH_SC & DEFAULT_THREAD_DETACH_SC fields.
- (make_inf): Set DETACH_SC & DEFAULT_THREAD_DETACH_SC fields.
- (add_thread_commands): Add set/show for detach-suspend-count.
- Add takeover-suspend-count cmd.
- (inf_detach): Set suspend counts to the detach SC, not 0.
- (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd,
- set_task_detach_sc_cmd, show_task_detach_sc_cmd,
- set_thread_default_thread_detach_sc_cmd,
- show_thread_default_thread_detach_sc_cmd): New functions.
- (show_task_cmd): Also show detach-suspend-count values.
- (thread_takeover_sc_cmd): New function.
-
-Fri May 31 16:49:24 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (show_thread_run_cmd): Actually print state.
-
-Thu May 30 10:47:56 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (inf_signal): Make unforwardable exceptions an error.
-
-Tue May 28 17:06:36 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (inf_validate_stopped): proc_getprocinfo takes a
- pointer to the flags now, not the flags themselves.
-
-Mon May 27 13:31:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (gnu_wait): Print debugging msgs for pending execs.
- (gnu_create_inferior): Check return from ptrace.
-
-Sun May 26 16:56:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.h (struct proc): Add DEAD field.
- * gnu-nat.c (make_proc): Initialize DEAD.
- (inf_set_traced, inf_validate_task_sc, inf_validate_procs: Frob it.
- (gnu_wait): Only abort for 0 threads if the task isn't dead.
-
-Sat May 25 17:06:05 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (inf_signal): Pass SIGCODE when posting a signal.
-
-Wed May 22 18:44:28 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (S_proc_wait_reply): Add SIGCODE argument.
- (inf_set_traced): Only give no-signal-thread error message if
- turning *on* tracing.
-
-Wed May 15 13:03:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (inf_validate_procs): If INF has no threads, always
- set inf->threads_up_to_date to 0.
- (inf_signal): Pass in new SIGCODE argument to msg_sig_post_untraced.
- (gnu_wait): Pass in new TIMEOUT arg to interrupt_operation.
- (proc_update_sc): Cast thread state arg to thread_set_state.
- (proc_get_state): Cast thread state arg to thread_get_state.
- (inf_validate_task_sc): Cast task_basic_info arg to task_info.
- * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Call
- inf_update_procs before we lookup the thread.
- * config/i386/i386gnu.mh (MH_CFLAGS): New variable.
-
-Tue May 7 17:52:33 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (gnu_kill_inferior): Use inf_set_task to clear the task.
-
-Mon May 6 19:06:49 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (inf_set_traced): Use msg_set_init_int with
- INIT_TRACEMASK instead of setting the exec flags.
-
-Fri May 3 19:10:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (inf_validate_procs): Don't clear INF->task if we find
- the task's died, so others have a chance at it.
- (gnu_resume): When single-stepping a single thread, given an error
- if there is no such thread. When single-stepping one but running
- the others, just given a warning and still run all the threads.
- (gnu_wait): If there seem to be no threads, look harder, and
- signal an error if there really aren't any.
- (gnu_attach): Reset thread numbering to 0.
-
- * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Give
- thread name in warning messages.
-
- * gnu-nat.c (active_inf): New function.
- (show_sig_thread_cmd, show_stopped_cmd): Use it.
- (info_port_rights, info_send_rights_cmd, info_port_sets_cmd,
- info_recv_rights_cmd, info_port_rights_cmd, info_port_rights_cmd):
- New functions.
- (add_task_commands): Add new port-right info commands.
-
-Fri Apr 26 20:42:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (gnu_wait): Instead of _hurd_intr_rpc_mach_msg, just
- use mach_msg with MACH_RCV_INTERRUPT.
- (set_noninvasive_cmd): New function.
- (add_task_commands): Add command entry for `set noninvasive'.
-
-Mon Mar 4 14:12:02 1996 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (gnu_read_inferior): Use hurd_safe_memmove, not safe_bcopy.
- (safe_bcopy): Function removed.
-
-Mon Dec 4 14:18:26 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c (proc_update_sc): Assert only threads can have state.
- (make_proc): Initialize state_valid & state_changed fields.
-
-Tue Nov 28 17:51:21 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * reply_mig_hack.awk: New file.
-
-Tue Nov 14 14:31:03 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * breakpoint.c (breakpoint_1): Print breakpoint thread field.
-
- * lynx-nat.c (child_wait): Return TARGET_WAITKIND_SPURIOUS for new
- threads.
-
-Mon Nov 13 18:30:53 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * target.c (debug_to_check_threads): New function.
-
- * inflow.c (terminal_init_inferior_with_pgrp): New function.
- (terminal_init_inferior): Call terminal_init_inferior_with_pgrp.
- * inferior.h (terminal_init_inferior_with_pgrp): New declaration,
- but only if PROCESS_GROUP_TYPE is defined.
-
-Mon Nov 6 16:42:09 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * target.c (debug_to_thread_alive): Pass through the return value.
-
-Thu Nov 2 18:05:00 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * target.c (signals, target_signal_from_host, target_signal_to_host):
- Add mach exceptions.
- * target.h (enum target_signal): Add mach exceptions.
-
-Mon Oct 30 16:41:04 1995 Miles Bader <miles@gnu.ai.mit.edu>
-
- * gnu-nat.c: New file: gnu native backend.
- * i386gnu-nat.c: New file: i386-specific part of gnu native backend.
- * gnu-nat.h: New file.
- * config/nm-gnu.h: New file.
- * config/tm-i386gnu.h: New file.
- * config/xm-i386gnu.h: New file.
- * config/i386/i386gnu.mh: New file.
- * config/i386/i386gnu.mt: New file.
-
-Wed Feb 28 15:50:12 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (VERSION): Bump version to 4.15.2 to establish
- baseline for gdb 4.16 rerelease testing.
-
-Wed Feb 28 13:32:05 1996 Jeffrey A Law (law@cygnus.com)
-
- * somsolib.c (som_solib_create_inferior_hook): Before returning
- call clear_symtab_users.
-
-Tue Feb 27 00:04:46 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * remote-e7000.c (e7000_open): Delete all breakpoints when
- connecting to e7000. Change connect message to allow use of
- monitor.exp in test suite.
- * (e7000_load): Print transfer rate of download.
- * symfile.c (generic_load): Print transfer rate of download.
-
-Sun Feb 25 13:58:33 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.in (mips*-*-vxworks*): New config.
- * configure: Regenerated.
-
- * config/mips/vxmips.mt, config/mips/tm-vxmips.h: New files.
- * remote-vxmips.c (vx_convert_to_virtual, vx_convert_from_virtual):
- Remove, never used.
-
-Sat Feb 24 12:30:28 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * partial-stab.h (case N_FUN): Function symbols generated
- by SPARCworks cc have a meaningless zero value, do not update
- pst->textlow if the function symbol value is zero.
-
- * stabsread.c (define_symbol): Initialize SYMBOL_TYPE field
- for function prototype declaration symbols.
-
-Fri Feb 23 22:33:04 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * remote-e7000.c (e7000_load): New routine to download via the
- network.
- * (e7000_wait): Don't backup PC when we hit a breakpoint.
- Apparantly new sh2 pods get this right...
- * (e7000_ops): Add call to e7000_load.
-
-Thu Feb 22 00:52:42 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * config/m68k/{nbsd.mh,nbsd.mt,nm-nbsd.h,tm-nbsd.h,xm-nbsd.h},
- m68knbsd-nat.c: New files, support for NetBSD/m68k.
-
- * configure.in (m68k-*-netbsd*): New config.
- * configure: Regenerated.
-
-Wed Feb 21 19:00:21 1996 Fred Fish <fnf@cygnus.com>
-
- * standalone.c (open, _initialize_standalone): Fix obvious typos
- reported by Martin Pool <martin@citr.uq.oz.au>.
-
-Wed Feb 21 14:24:04 1996 Jeffrey A Law (law@cygnus.com)
-
- * solib.c (solib_create_inferior_hook): Fix thinko.
-
-Tue Feb 20 23:59:19 1996 Jeffrey A Law (law@cygnus.com)
-
- * solib.c (solib_break_names): Define for Solaris and Linux.
- (enable_break): For SVR4 systems, first try to use the debugger
- interfaces in the dynamic linker to track shared library events
- as they happen, then fall back to BKPT_AT_SYMBOL code. Convert
- BKPT_AT_SYMBOL code to use shared library event breakpoints.
- (solib_create_inferior_hook): Simplify BKPT_AT_SYMBOL code,
- it no longer needs to restart/wait on the inferior.
- * symfile.c (find_lowest_section): No longer static.
- * symfile.h (find_lowest_section): Corresponding changes.
-
-Tue Feb 20 18:54:08 1996 Fred Fish <fnf@cygnus.com>
-
- * valops.c (COERCE_FLOAT_TO_DOUBLE): Define default value.
- (value_arg_coerce): Use COERCE_FLOAT_TO_DOUBLE.
- * config/alpha/tm-alpha.h (COERCE_FLOAT_TO_DOUBLE): Define to 1.
- * config/mips/tm-mips.h: Ditto.
- * config/pa/tm-hppa.h: Ditto.
- * config/rs6000/tm-rs6000.h: Ditto.
- * config/sparc/tm-sparc.h: Ditto.
-
-Tue Feb 20 17:32:05 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * config/{i386,ns32k}/nbsd.mh (NATDEPFILES): Remove core-aout.o.
-
- * config/nm-nbsd.h (FETCH_INFERIOR_REGISTERS): Defined.
- * config/xm-nbsd.h (CC_HAS_LONG_LONG, PRINTF_HAS_LONG_LONG):
- #ifdef'd out definitions --- Causes serious gdb failures on
- the i386. Need to investigate further before enabling.
-
- * i386b-nat.c (fetch_inferior_registers, store_inferior_registers,
- fetch_core_registers): New functions. These functions are defined
- if FETCH_INFERIOR_REGISTERS is set. Registers are fetched/stored
- with ptrace PT_GETREGS/PT_SETREGS.
-
-Tue Feb 20 16:55:06 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * findvar.c (extract_floating store_floating): Replace `long
- double' with `DOUBLEST'.
-
-Mon Feb 19 15:25:51 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * config/xm-nbsd.h (CC_HAS_LONG_LONG, PRINTF_HAS_LONG_LONG):
- Define.
-
-Mon Feb 19 10:32:05 1996 Jeffrey A Law (law@cygnus.com)
-
- * symtab.h (looup_minimal_symbol_solib_trampoline): Declare.
-
- * breakpoint.h (remove_solib_event_breakpoints): Declare.
- * breakpoint.c (remove_solib_event_breakpoints): New function.
- * somsolib.c (solib_create_inferior_hook): Remove all solib event
- breakpoints before inserting any new ones. Use a solib event
- breakpoint for the breakpoint at "_start".
- Remove extraneous "\n" from calls to warning.
-
- * breakpoint.c (breakpoint_1): Add missing "sigtramp" to bptypes
- name array.
-
-Mon Feb 19 01:09:32 1996 Doug Evans <dje@cygnus.com>
-
- * dwarfread.c (add_partial_symbol): Use ADD_PSYMBOL_ADDR_TO_LIST
- for CORE_ADDR values.
- (new_symbol): Use SYMBOL_VALUE_ADDRESS for CORE_ADDR values.
- * symfile.h (add_psymbol_{,addr}to_list): Add prototypes.
-
-Sun Feb 18 14:37:13 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mipsread.c (mipscoff_symfile_read): Unconditionally add
- alpha coff dynamic symbols for all symbol files. Makes skipping
- over the trampoline code work when stepping from a function in a
- shared library into a function in a different shared library.
-
-Sun Feb 18 09:27:10 1996 Stu Grossman (grossman@cygnus.com)
-
- * config/sparc/tm-sparc.h: Define PS_FLAG_CARRY. Define
- RETURN_VALUE_ON_STACK to return long doubles on the stack.
-
-Sat Feb 17 16:33:11 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (ch-exp.o): Add dependencies.
- (various): Add gdb_string.h to dependencies that need it.
-
-Sat Feb 17 08:57:50 1996 Fred Fish <fnf@cygnus.com>
-
- * symmisc.c (print_symbol_bcache_statistics): Update description for
- printing byte cache statistics.
-
-Thu Feb 16 16:02:03 1996 Stu Grossman (grossman@cygnus.com)
-
- * Add native support for long double data type.
- * c-exp.y (%union): Change dval to typed_val_float. Use DOUBLEST
- to store actual data. Change types of INT and FLOAT tokens to
- typed_val_int and typed_val_float respectively. Create new token
- DOUBLE_KEYWORD to specify the string `double'. Make production
- for FLOAT use type determined by parse_number. Add production for
- "long double" data type.
- * (parse_number): Use sscanf to parse numbers as float, double or
- long double depending upon the type of typed_val_float.dval. Also
- allow user to specify `f' or `l' suffix to explicitly specify
- float or long double constants. Change typed_val to
- typed_val_int.
- * (yylex): Change typed_val to typed_val_int. Also, scan for
- "double" keyword.
- * coffread.c (decode_base_type): Add support for T_LNGDBL basic
- type.
- * configure, configure.in: Add check for long double support in
- the host compiler.
- * defs.h: Define DOUBLEST appropriatly depending on whether
- HAVE_LONG_DOUBLE (from autoconf) is defined. Also, fix prototypes
- for functions that handle this type.
- * expression.h (union exp_element): doubleconst is now type
- DOUBLEST.
- * m2-exp.y f-exp.y (%union): dval becomes type DOUBLEST.
- * findvar.c (extract_floating): Make return value be DOUBLEST.
- Also, add support for numbers with size of long double.
- * (store_floating): Arg `val' is now type DOUBLEST. Handle all
- floating types.
- * parser-defs.h parse.c (write_exp_elt_dblcst): Arg expelt is now
- DOUBLEST.
- * valarith.c (value_binop): Change temp variables v1, v2 and v to
- type DOUBLEST. Coerce type of result to long double if either op
- was of that type.
- * valops.c (value_arg_coerce): If argument type is bigger than
- double, coerce to long double.
- * (call_function_by_hand): If REG_STRUCT_HAS_ADDR is defined, and
- arg type is float and > 8 bytes, then use pointer-to-object
- calling conventions.
- * valprint.c (print_floating): Arg doub is now type DOUBLEST.
- Use appropriate format and precision to print out floating point
- values.
- * value.h: Fixup prototypes for value_as_double,
- value_from_double, and unpack_double to use DOUBLEST.
- * values.c (record_latest_value): Remove check for invalid
- floats. Allow history to store them so that people may examine
- them in hex if they want.
- * (value_as_double unpack_double): Change return value to DOUBLEST.
- * (value_from_double): Arg `num' is now DOUBLEST.
- * (using_struct_return): Use RETURN_VALUE_ON_STACK macro (target
- specific) to expect certain types to always be returned on the stack.
-
-Fri Feb 16 14:00:54 1996 Fred Fish <fnf@cygnus.com>
-
- * bcache.c, bcache.h: New files to implement a byte cache.
- * Makefile.in (SFILES): Add bcache.c.
- (symtab_h): Add bcache.h.
- (HFILES_NO_SRCDIR): add bcache.h
- (COMMON_OBJS): Add bcache.o
- (bcache.o): New target.
- * dbxread.c (start_psymtab): Make global_syms & static_syms
- type "partial_symbol **".
- * hpread.c (hpread_start_symtab): Ditto.
- * os9kread.c (os9k_start_psymtab): Ditto.
- * stabsread.h (start_psymtab): Ditto.
- * {symfile.c, symfile.h} (start_psymtab_common): Ditto.
- * maint.c (maintenance_print_statistics): Call
- print_symbol_bcache_statistics.
- * objfiles.c (allocate_objfile): Initialize psymbol bcache malloc
- and free pointers.
- * solib.c (allocate_rt_common_objfile): Ditto.
- * symfile.c (reread_symbols): Ditto.
- (free_objfile): Free psymbol bcache when objfile is freed.
- (objfile_relocate): Use new indirect psymbol pointers.
- * objfiles.h (struct objfile): Add psymbol cache.
- * symfile.c (compare_psymbols): Now passed pointers to pointers to
- psymbols.
- (reread_symbols): Free psymbol bcache when freeing other objfile
- resources.
- (add_psymbol_to_list, add_psymbol_addr_to_list): Initialize new
- psymbol using the psymbol bcache.
- (init_psymbol_list): Psymbol lists now contain pointers rather than
- the actual psymbols.
- * symfile.h (psymbol_allocation_list): Psymbol lists now dynamically
- grown arrays of pointers.
- (ADD_PSYMBOL_VT_TO_LIST): Initialize new symbol using the psymbol
- bcache.
- * symmisc.c (print_partial_symbols): Now takes pointer to pointer
- to partial symbol.
- (print_symbol_bcache_statistics): New function to print per objfile
- bcache statistics.
- (print_partial_symbol, print_partial_symbols,
- maintenance_check_symtabs, extend_psymbol_list):
- Account for change to pointer to pointer to partial symbol.
- * symtab.c (find_pc_psymbol, lookup_partial_symbol, decode_line_2,
- make_symbol_completion_list):
- Account for change to pointer to pointer to partial symbol.
- * symtab.h (bcache.h): Include.
- * xcoffread.c (xcoff_start_psymtab): Make global_syms & static_syms
- type "partial_symbol **".
-
-Fri Feb 16 10:02:34 1996 Fred Fish <fnf@cygnus.com>
-
- * dwarfread.c (free_utypes): New function.
- (read_file_scope): Call free_utypes as cleanup, rather than just
- freeing the utypes pointer.
-
-Thu Feb 15 21:40:52 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * demangle.c (is_cplus_marker): New function, checks if a
- character is one of the commonly used C++ marker characters.
- * defs.h (is_cplus_marker): Add prototype.
- * c-typeprint.c (c_type_print_base), ch-lang.c (chill_demangle),
- cp-valprint.c (cp_print_class_method), mdebugread.c (parse_symbol),
- stabsread.c (define_symbol, read_member_functions, read_struct_fields),
- symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P),
- values.c (vb_match): Use is_cplus_marker instead of comparison
- with CPLUS_MARKER.
-
-Thu Feb 15 18:08:13 1996 Fred Fish <fnf@cygnus.com>
-
- * symfile.h (INLINE_ADD_PSYMBOL): Default this to 0 and possibly
- delete entirely someday.
-
-Thu Feb 15 15:25:34 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Edit out makefile rebuild rule.
- (host_alias, target_alias): Comment out instead of deleting.
- (@LIBS@): Edit out references.
-
-Tue Feb 13 22:56:46 1996 Fred Fish <fnf@cygnus.com>
-
- * symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
- Use n_psyms in OBJSTAT, not psyms.
-
-Mon Feb 12 15:59:31 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * configure.in (sparclet-*-aout*): New config.
- * configure: Regenerated.
-
-Mon Feb 12 14:17:52 1996 Fred Fish <fnf@cygnus.com>
-
- * somsolib.c (som_solib_add): Use xmalloc rather than bare
- unchecked call to malloc.
- * remote-mips.c (pmon_load_fast): ditto.
- * remote-mm.c (mm_open): ditto.
- * hpread.c (hpread_lookup_type): ditto.
- * remote-adapt.c (adapt_open): ditto.
-
-Mon Feb 12 13:11:32 1996 Fred Fish <fnf@cygnus.com>
-
- * f-lang.c (allocate_saved_bf_node, allocate_saved_function_node,
- allocate_saved_f77_common_node, allocate_common_entry_node,
- add_common_block): Use xmalloc rather than malloc, some of which
- were unchecked.
- * gnu-regex.c: At same point as other gdb specific changes
- #undef malloc and then #define it to xmalloc.
- * ch-exp.c (growbuf_by_size): Use xmalloc/xrealloc rather than
- bare unchecked calls to malloc/realloc.
- * stabsread.c (dbx_lookup_type): Use xmalloc rather than bare
- unchecked call to malloc.
-
-Wed Feb 7 11:31:26 1996 Stu Grossman (grossman@cygnus.com)
-
- * symtab.c (gdb_mangle_name): Change opname var to be const to
- match return val of cplus_mangle_name.
- * i960-tdep.c: Change arg types of next_insn to match callers.
-
-Wed Feb 7 07:34:24 1996 Fred Fish <fnf@cygnus.com>
-
- * config/i386/linux.mh (XM_CLIBS, GDBSERVER_LIBS): Remove. These
- apparently aren't needed in any reasonably recent version of
- linux.
-
-Tue Feb 6 21:37:03 1996 Per Bothner <bothner@kalessin.cygnus.com>
-
- * stabsread.c (read_range_type): If !self-subrange and language
- is Chill, assume a true range. If a true_range is a sub_subrange,
- use builtin_type_int for index_type.
-
-Tue Feb 6 18:38:51 1996 J.T. Conklin <jtc@slave.cygnus.com>
-
- * nindy-share/nindy.c (say): Use stdarg.h macros when compiling
- with an ANSI compiler.
-
-Mon Feb 5 18:24:28 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- From Michael_Snyder@NeXT.COM (Michael Snyder):
- * valops.c (value_arg_coerce): Coerce float to double, unless the
- function prototype specifies float.
-
-Mon Feb 5 09:51:55 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * language.c (set_language_command): Use languages table when
- printing available languages.
-
-Sat Feb 3 12:22:05 1996 Fred Fish <fnf@cygnus.com>
-
- Fix problems reported by Hans Verkuil (hans@wyst.hobby.nl):
- * command.c (add_cmd): Add missing initialization for enums member.
- Reorder members to match structure declaration to make it easier to
- tell when one is missing.
- * exec.c (exec_file_command): Fix problem where filename in malloc'd
- memory is referenced after being freed.
-
-Sat Feb 3 03:26:21 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dwarfread.c (read_func_scope): Avoid GDB core dumps if
- AT_name tag is missing.
-
- * procfs.c (procfs_stopped_by_watchpoint): Fix logic when
- FLTWATCH and FLTKWATCH are defined.
-
- * remote.c (remote_read_bytes): Advance memaddr for transfers,
- return number of bytes transferred for partial reads.
-
- * top.c (init_signals): Reset SIGTRAP to SIG_DFL.
-
-Fri Feb 2 13:40:50 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * win32-nat.c (mappings): Add ppc registers.
- (child_resume): Turn off step for ppc.
-
-Thu Feb 1 10:29:31 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * config/powerpc/(cygwin32.mh, cygwin32.mt, tm-cygwin32.h,
- xm-cygwin32.h): New.
- * config/i386/(*win32*): Becomes *cygwin32*.
- * configure.in (i[3456]86-*-win32*): Becomes i[3456]86-*-cygwin32.
- (powerpcle-*-cygwin32): New.
- * configure: Regenerate.
- * win32-nat.c (child_create_inferior): Call CreateProcess
- with the right program arg.
-
-Thu Feb 1 11:01:10 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/pa/tm-hppa.h (SOFT_FLOAT): Provide a default definition.
-
-Wed Jan 31 19:01:28 1996 Fred Fish <fnf@cygnus.com>
-
- * serial.c: Change fputc/fputs/fprintf to _unfiltered forms.
-
-Wed Jan 31 18:36:27 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/sparc/xm-sun4os4.h (HAVE_TERMIOS): Remove.
-
- * config/sparc/xm-sparc.h (HAVE_WAIT_STRUCT): Remove, never used.
-
- * config/i386/nm-i386mach.h (CHILD_PREPARE_TO_STORE): Move to
- here from config/i386/xm-i386mach.h, fix name.
- * config/i386/nm-sun386.h: Ditto, from config/i386/xm-sun386.h.
- * config/i386/nm-ptx4.h (CHILD_PREPARE_TO_STORE): Move to
- here from config/i386/xm-ptx4.h.
- * config/i386/nm-ptx4.h: Ditto, from config/i386/xm-ptx.h.
- * config/i386/nm-symmetry.h: Ditto, from config/i386/xm-symmetry.h.
- * config/m68k/nm-sun3.h: Ditto, from config/m68k/xm-sun3.h.
- * config/sparc/nm-nbsd.h: Ditto, from config/sparc/xm-nbsd.h.
- * config/sparc/nm-sun4os4: Ditto, from config/sparc/xm-sparc.h.
-
- * config/sparc/nm-sun4sol2.h: New file, renamed from nm-sysv4.h.
- (PRSVADDR_BROKEN): Move here from xm-sun4sol2.h.
- * config/sparc/sun4sol2.mh (NAT_FILE): Update.
-
-Wed Jan 31 17:20:26 1996 Jeffrey A Law (law@cygnus.com)
-
- * config/pa/tm-hppa.h (EXTRACT_RETURN_VALUE): Handle software
- floating point correctly.
- (STORE_RETURN_VALUE): Likewise.
- * config/pa/tm-pro.h (SOFT_FLOAT): define.
-
-Wed Jan 31 13:34:52 1996 Fred Fish <fnf@cygnus.com>
-
- * config/i386/xm-linux.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
- Define to what should be reasonable values. However, apparently
- a bug in linux mmap prevents mapped symbol tables from working.
-
-Tue Jan 30 18:26:19 1996 Fred Fish <fnf@cygnus.com>
-
- * defs.h (errno.h>: Move #include closer to head of file to solve
- obscure problem with systems that declare perror with const arg, in
- both errno.h and stdio.h, and const is defined away by intervening
- local include.
-
-Tue Jan 30 15:41:10 1996 Fred Fish <fnf@cygnus.com>
-
- From Jon Reeves <reeves@zk3.dec.com>:
- * i386-stub.c (getpacket): Change fprintf stream from "gdb" to stderr.
- (mem_fault_routine): Fix misplaced volatile type qualifier in decl.
-
-Mon Jan 29 19:05:58 1996 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (diststuff): Make all-doc; diststuff target does not
- exist in doc/Makefile.in.
-
-Mon Jan 29 18:44:57 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/m88k/xm-cxux.h (BP_HIT_COUNT): Remove, never used.
-
-Mon Jan 29 00:10:35 1996 Wilfried Moser <moser@rtl.cygnus.com>
-
- * ch-valprint.c (calculate_array_length): New function to
- determine the length of an array type.
- (chill_val_print (case TYPE_CODE_ARRAY)): If the length of an
- array type is zero, call calculate_array_length.
-
- * gdbtypes.c (get_discrete_bounds (case TYPE_CODE_ENUM)): The
- values may not be sorted. Scan all entries and set the real lower
- and upper bound.
-
-Sun Jan 28 15:50:42 1996 Fred Fish <fnf@cygnus.com>
-
- * config/xm-linux.h: Move include of solib.h and #define of
- SVR4_SHARED_LIBS from here ...
- * config/nm-linux.h: ...to here.
-
-Sat Jan 27 10:34:05 1996 Fred Fish <fnf@cygnus.com>
-
- * configure.in (AC_CHECK_HEADERS): Check for sys/procfs.h.
- Also check for gregset_t and fpregset_t types.
- * configure: Regenerate.
- * core-regset.c (sys/procfs.h): Only include if HAVE_SYS_PROCFS_H
- is defined.
- (fetch_core_registers): Turn into stub unless both HAVE_GREGSET_T
- and HAVE_FPREGSET_T are defined. These changes allow systems
- like linux that are migrating to /proc support to use a single
- configuration for both new and old versions.
-
- * config/i386/linux.mt: Note that this is now for both a.out and
- ELF systems.
- * config/i386/linux.mh (NATDEPFILES): Add solib.o, core-regset.o,
- i386v4-nat.o
- * config/i386/tm-linux.h (tm-sysv4.h): Include.
- * config/i386/xm-linux.h (solib.h): Include
- (SVR4_SHARED_LIBS): Define.
- * i386v4-nat.c: Only compile if HAVE_SYS_PROCFS_H is defined.
- (supply_gregset, fill_gregset): Compile if HAVE_GREGSET_T defined.
- (supply_fpregset, fill_fpregset): Compile if HAVE_FPREGSET_T
- defined.
-
-Fri Jan 26 13:48:14 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/sparc/xm-sparc.h (NEW_SUN_CORE): Remove, never used.
- * config/i386/xm-sun386.h: Ditto.
- * config/m68k/xm-sun2.h, config/m68k/xm-sun3.h: Ditto.
-
-Thu Jan 25 16:05:53 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * Makefile.in (INSTALLED_LIBS, CLIBS): Include @LIBS@.
-
-Thu Jan 25 09:22:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- From Greg McGary <gkm@gnu.ai.mit.edu>:
- * dcache.c (dcache_peek, dcache_poke): Advance addr for
- multi-byte I/O.
-
-Thu Jan 25 13:08:51 1996 Doug Evans (dje@cygnus.com)
-
- * infrun.c (normal_stop): Fix test for shared library event.
-
-Thu Jan 25 03:26:38 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * configure.in (sparc64-*-*): Add default host configuration.
- (sparc64-*-solaris2*): Add target configuration.
- (sparc64-*-solaris2* host): Link statically if GCC used.
- * configure: Regenerated.
- * sparc/sp64sol2.mt: New file.
-
-Wed Jan 24 22:31:37 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * Makefile.in (RUNTEST): srcdir renamed to rootsrc.
-
-Wed Jan 24 15:42:24 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * Makefile.in (lint): Close backquotes.
-
-Wed Jan 24 13:19:10 1996 Fred Fish <fnf@cygnus.com>
-
- * NEWS: Make note of new record and replay feature for
- remote debug sessions.
- * serial.c (gdbcmd.h): Include.
- (serial_logfile, serial_logfp, serial_reading, serial_writing):
- Define here, for remote debug session logging.
- (serial_log_command, serial_logchar, serial_write, serial_readchar):
- New functions for remote debug session logging.
- (serial_open): Open remote debug session log file when needed.
- (serial_close): Close remote debug session log file when needed.
- (_initialize_serial): Add set/show commands for name of remote
- debug session log file.
- * serial.h (serial_readchar): Declare
- (SERIAL_READCHAR): Call serial_readchar().
- (SERIAL_WRITE): Call serial_write().
- (serial_close): Declare as extern.
- (serial_logfile, serial_logfp): Declare.
- * top.c (execute_command): Declare serial_logfp. Log user command
- in remote debug session log if log file is open.
- * remote-array.c (array_wait): #ifdef out echo to gdb_stdout.
- (array_read_inferior_memory): Rewrite to fix memory overwrite bug.
- * remote-array.c (SREC_SIZE): Remove, duplicates define in
- monitor.h.
- * remote-array.c (hexchars, hex2mem): Remove, unused.
- * gdbserver/low-linux.c (store_inferior_registers): Remove
- unnecessary extern declaration of registers[].
- * gdbserver/Makefile.in (all): Add gdbreplay.
- * gdbserver/gdbreplay.c: New file.
- * gdbserver/README: Give example of recording a remote
- debug session with gdb and then replaying it with gdbreplay.
-
-Tue Jan 23 18:02:35 1996 Per Bothner <bothner@kalessin.cygnus.com>
-
- * stabsread.c (rs6000_builtin_type): Make bool type unsigned.
- (read_one_struct_field): Support boolean bitfields.
- * c-valprint.c (c_val_print): Print booleans properly.
-
-Tue Jan 23 18:54:09 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-vxsparc.c (vx_convert_to_virtual, vx_convert_from_virtual):
- Remove, never used.
- * config/sparc/vxsparc.mt (TDEPFILES): Add remote-vxsparc.o.
-
-Tue Jan 23 14:36:05 1996 Per Bothner <bothner@kalessin.cygnus.com>
-
- * ch-exp.c (parse_tuple): Error if invalid mode.
-
- * value.h (COERCE_ARRAY): Don't coerce enums.
- (COERCE_ENUM): Don't COERCE_REF.
- (COERCE_NUMBER): New macro (same as COERCE_ARRAY then COERCE_ENUM).
- * valops.c (value_assign): Only do COERCE_ARRAY if internalvar (let
- value_cast handle it otherwise); do *not* COERCE_ENUM either way.
- * valarith.c: Use COERCE_NUMBER instead od COEREC_ARRAY.
- Add COERCE_REF before COERCE_ENUM.
- * values.c (value_as_long): Simplify.
-
- * valops.c (value_array): Create internalvar if !c_style_arrays.
-
- * language.c (lang_bool_type): Add Fortran support.
- * eval.c (OP_BOOL): Use LA_BOOL_TYPE.
-
-Tue Jan 23 13:08:26 1996 Jeffrey A Law (law@cygnus.com)
-
- * symfile.c (auto_solib_add): Renamed from auto_solib_add_at_startup.
- All references changed.
- * breakpoint.c (bpstat_what): Add shlib_event to the class types.
- Update state table. Reformat so that it's still readable.
- When we hit the shlib_event breakpoint, set the calss of shlib_event.
- (breakpoint_1): Add "shlib events" as a breakpoint type.
- Print the shlib_event breakpoint like other breakpoints.
- (create_solib_event_breakpoint): New function.
- (breakpoint_re_set_one): Handle solib_event breakpoints.
- * breakpoint.h (enum bytype): Add bp_shlib_event breakpoint type.
- (enum bpstat_what_main_action): Add BPSTAT_WHAT_CHECK_SHLIBS
- action.
- (create_solib_event_breakpoint): Declare.
- * infrun.c (wait_for_inferior): Handle CHECK_SHLIBS bpstat.
- (normal_stop): Inform the user when the inferior stoped due
- to a shared library event.
- (_initialize_infrun): Add new set/show variable "stop-on-solib-events"
- to control whether or not gdb continues the inferior or stops it when
- a shared library event occurs.
- * minsyms.c (lookup_minimal_symbol_solib_trampoline): New function.
- * somsolib.c (TODO list): Update.
- (som_solib_create_inferior_hook): Arrange for gdb to be notified
- when significant shared library events occur.
- * hppa-tdep.c (find_unwind_entry): No longer static.
-
-Tue Jan 23 09:00:48 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * printcmd.c (print_insn): Pass fprintf_unfiltered to
- INIT_DISASSEMBLE_INFO.
-
-Mon Jan 22 16:59:40 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote.c (remotebreak): New GDB variable.
- (remote_break): New global.
- (remote_interrupt): Send a break instead of ^C if remote_break.
- * NEWS: Describe the new variable.
-
-Mon Jan 22 16:24:11 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc-tdep.c (_initialize_sparc_tdep): Always use print_insn_sparc.
-
-Fri Jan 19 07:19:38 1996 Fred Fish <fnf@cygnus.com>
-
- * hp300ux-nat.c (getpagesize): Remove unused function
- fetch_core_registers.
- (hp300ux_core_fns): Remove, is unused.
- (_initialize_core_hp300ux): Remove, is unused.
- (gdbcore.h): Remove #include, no longer needed.
-
-Fri Jan 19 00:59:53 1996 Jeffrey A Law (law@cygnus.com)
-
- * rs6000-nat.c (exec_one_dummy_insn): Rework to avoid
- ptrace bug in aix4.1.3 on the rs6000.
-
-Wed Jan 17 13:22:27 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-hms.c (hms_ops): Add value for to_thread_alive.
- * remote-nindy.c (nindy_ops): Ditto.
- * remote-udi.c (udi_ops): Ditto.
-
-Tue Jan 16 18:00:35 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * remote-mips.c (pmon_opn, pmon_wait, pmon_makeb64, pmon_zeroset,
- pmon_checkset, pmon_make_fastrec, pmon_check_ack,
- pmon_load_fast): New functions. Support for the PMON monitor world.
- (common_open): New function to merge support for different monitors.
- (mips_open): Use common_open().
- (mips_send_command): New function.
- (mips_send_packet): Scan out-of-sequence packets.
- (mips_enter_debug, mips_exit_debug): New functions.
- (pmon_ops): New target definition structure.
-
-Tue Jan 16 11:22:58 1996 Stu Grossman (grossman@cygnus.com)
-
- * Makefile.in (CLIBS): Add LIBS to allow libraries to be
- specified on the make command line (via make LIBS=xxx).
-
-
-Fri Jan 12 21:41:58 1996 Jeffrey A Law (law@cygnus.com)
-
- * symtab.c (find_pc_symtab): Don't lose if OBJF_REORDERED
- is set but there are no psymtabs.
-
-Fri Jan 12 15:56:12 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * dsrec.c (load_srec): Remove unused variable.
- * monitor.c (monitor_expect): Don't expect a ^C to echo.
- * serial.c (serial_open): Add parallel interface.
- * sh3-rom.c (parallel, parallel_in_use): New.
- (sh3_load): If parallel_in_use, download though the
- parallel port.
- (sh3_open): Open parallel port if specified.
- (sh3_close): New function.
- (_inititalize_sh3): Add sh3_close hook and documentation.
- * monitor.c (monitor_close): Export.
- * monitor.h (monitor_close): Add prototype.
-
-Fri Jan 12 13:11:42 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- From Wilfried Moser <wilfried.moser@aut.alcatel.at>:
- * remote.c (remotetimeout): New GDB variable, use to set the
- remote timeout for reading.
-
-Fri Jan 12 07:14:27 1996 Fred Fish <fnf@cygnus.com>
-
- * lynx-nat.c, irix4-nat.c, sparc-nat.c: Include gdbcore.h
- to get "struct core_fns" defined.
- * Makefile.in (lynx-nat.o, irix4-nat.o, sparc-nat.o):
- Are dependent upon gdbcore_h.
-
-Thu Jan 11 23:13:24 1996 Per Bothner <bothner@cygnus.com>
-
- * symfile.c (decrement_reading_symtab): New function.
- * symfile.c, symtab.h (currently_reading_symtab): New variable.
- * symfile.c (psymtab_to_symtab): Adjust currently_reading_symtab.
- * gdbtypes.c (check_typedef): Don't call lookup_symbol if
- currently_reading_symtab (since that could infinitely recurse).
-
-Thu Jan 11 17:21:25 1996 Per Bothner <bothner@kalessin.cygnus.com>
-
- * stabsread.c (read_struct_type): Trivial simplification.
-
- * stabsread.c (define-symbol): Use invisible references
- for TYPE_CODE_SET and TYPE_CODE_BITSTRING too.
- * valops.c (call_function_by_hand): Likewise.
- * eval.c (evaluate_subexp_standard): When known, use the formal
- parameter type as the expected type when evaluating arg expressions.
- * ch-lang.c (evaluate_subexp_chill): Likewise (for MULTI_SUBSCRIPT).
-
-Thu Jan 11 10:08:14 1996 Tom Tromey <tromey@creche.cygnus.com>
-
- * main.c (main): Disable window interface if --help or --version
- specified.
-
-Wed Jan 10 16:08:49 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
-
- * configure.in, configure: Recognize rs6000-*-aix4*.
- * config/powerpc/xm-aix.h: Reduce to include "xm-aix4.h".
- * config/rs6000/aix4.mh (XM_FILE): Point to xm-aix4.h.
- * config/rs6000/xm-aix4.h: New file.
- * config/xm-aix4.h: New file.
-
-Wed Jan 10 11:25:37 1996 Fred Fish <fnf@cygnus.com>
-
- From Wilfried Moser <wilfried.moser@aut.alcatel.at>:
- * gdbserver/low-linux.c: New file.
- * remote.c (remote_read_bytes): Fix aborts on larger packets.
-
- * config/i386/linux.mh (GDBSERVER_DEPFILES, GDBSERVER_LIBS):
- Define.
- * stabsread.c (define_symbol): If register value is too large,
- tell what it is and what max is.
-
-Tue Jan 9 09:33:53 1996 Jeffrey A Law (law@cygnus.com)
-
- * hpread.c (hpread_build_psymtabs): Finish Jan 4th
- enum namespace -> enum_namespace change.
-
-Tue Jan 9 04:44:47 1996 Wilfried Moser <moser@rtl.cygnus.com>
-
- * ch-exp.c (parse_primval): In case ARRAY, add missing
- FORWARD_TOKEN ().
-
-Mon Jan 8 13:29:34 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-mips.c (mips_receive_header): Recognize \012 instead
- of \n, but write \n when program sends a \012.
- * ser-mac.c (mac_input_buffer): Increase size of buffer.
-
-Mon Jan 8 12:00:40 1996 Jeffrey A Law (law@cygnus.com)
-
- * infptrace.c (initialize_infptrace): Move function out of
- #ifdef conditional; put code within the function inside an
- #ifdef conditional.
-
- * buildsym.c (end_symtab): Remove sort_pending and sort_linevec
- arguments. Sorting is now dependent on OBJF_REORDERED. All
- callers/references changed.
- * dbxread.c (read_ofile_symtab): Correctly determine value for
- last_source_start_addr for reordered executables.
- (process_one_symbol): Handle N_FUN with no name as an end of
- function marker.
- * partial-stab.h (case N_FN, N_TEXT): Don't assume CUR_SYMBOL_VALUE
- is the high text address for a psymtab.
- (case N_SO): Likewise.
- (case N_FUN): Handle N_FUN with no name as an end of function
- marker.
- * minsyms.c (lookup_minimal_symbol_by_pc): Examine all symbols
- at the same address rather than a random subset of them.
- * coffread.c (coff_symfile_init): Set OBJF_REORDERED.
- * elfread.c (elf_symfile_init): Similarly.
- * somread.c (som_symfile_init): Similarly.
- * xcoffread.c (xcoff_symfile_init): Similarly.
-
-Fri Jan 5 17:46:01 1996 Stu Grossman (grossman@cygnus.com)
-
- * stack.c (print_stack_frame print_frame_info) symmisc.c
- (dump_symtab): Change RETURN_MASK_ERROR to RETURN_MASK_ALL so
- that catch_errors doesn't get blindsided by QUIT and lose the
- cleanup chain. This fixes a problem where ^C while in a
- user-defined command sometimes leaves instream NULL and causes a
- segfault in command_loop.
-
-Fri Jan 5 13:59:16 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
-
- * configure.in, configure: Add `-ldl -lw' for Solaris linking.
-
-Fri Jan 5 12:02:00 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * config/sh/sh.mt, config/powerpc/*.mt, config/pa/hppapro.mt,
- config/m68k/monitor.mt, config/h8500/h8500.mt, config/h8300/h8300.mt:
- srec.o renamed to dsrec.o.
-
-Thu Jan 4 16:04:54 1996 Stu Grossman (grossman@cygnus.com)
-
- * breakpoint.c (remove_breakpoint): Change error to warning so
- that hardware watchpoint removal problems won't leave breakpoint
- traps in the target.
- * remote-e7000.c (e7000_insert_breakpoint,
- e7000_remove_breakpoint): Use e7000 based breakpoints, not memory
- breakpoints.
- * (e7000_wait): Adjust PC back by two when we see a breakpoint to
- compensate for e7000 maladjustment.
- * sparcl-tdep.c (sparclite_check_watch_resources): Fix logic bug
- which prevented hardware watchpoints from working.
-
-Thu Jan 4 10:44:17 1996 Fred Fish <fnf@cygnus.com>
-
- * infptrace.c (udot_info): New function.
- (PT_*): Define each individually if that one is not defined.
- * rs6000-nat.c (kernel_u_size): New function
- Include <sys/user.h> for "struct user"
- * alpha-nat.c (kernel_u_size): New function.
- Include <sys/user.h> for "struct user"
- * sparc-nat.c (kernel_u_size): New function.
- Include <sys/user.h> for "struct user"
- * i386b-nat.c (kernel_u_size): New function.
- * i386v-nat.c (kernel_u_size): New function.
- * config/i386/nm-fbsd.h (KERNEL_U_SIZE): Define.
- (kernel_u_size): Declare.
- * config/i386/nm-linux.h (KERNEL_U_SIZE): Define.
- (kernel_u_size): Declare.
- * config/sparc/nm-sun4os4.h (KERNEL_U_SIZE): Define.
- (kernel_u_size): Declare.
- * config/alpha/nm-osf2.h (KERNEL_U_SIZE): Define.
- (kernel_u_size): Declare.
- * config/rs6000/nm-rs6000.h (KERNEL_U_SIZE): Define.
- (kernel_u_size): Declare.
-
-Thu Jan 4 11:00:01 1996 steve chamberlain <sac@slash.cygnus.com>
-
- * mdebugread.c (mylookup_symbol): enum namespace becomes
- enum_namespace type.
- * symfile.c (add_psymbol_to_list)
- (add_psymbol_addr_to_list): Ditto.
- * symtab.c (lookup_partial_symbol): Ditto.
- (lookup_symbol): Ditto.
- (lookup_block_symbol): Ditto.
- * win32-nat.c (handle_load_dll): Use incoming dll base.
- (child_wait): Catch DLL load errors.
- (create_child_inferior): Translated between paths correctly.
-
-Wed Jan 3 23:13:53 1996 Fred Fish <fnf@cygnus.com>
-
- * i386v4-nat.c (supply_gregset, fill_gregset): Subtract NUM_FREGS
- from NUM_REGS to get number of general registers that we care about.
- * config/i386/tm-i386.h (REGISTER_BYTES): Define in terms
- of number of general regs and number of floating point regs.
-
-Wed Jan 3 19:49:54 1996 steve chamberlain <sac@slash.cygnus.com>
-
- * config/i386/tm-win32.h (IN_SOLIB_CALL_TRAMPOLINE): New.
- (SKIP_TRAMPOLINE_CODE): New.
- * config/i386/xm-win32.h (CANT_FORK): Deleted.
- (SLASH*) Changed to use unix style slash.
- * symtab.h (namespace enum): becomes typedef to avoid namespace
- collision in C++.
- * infcmd.c (path_command): Use empty string if PATH name not set.
- * i386-tdep.c (skip_trampoline_code): New function.
- * srec.c: Renamed dsrec.c to avoid filename collision.
- * Makefile.in: Cope with renaming.
-
-Wed Jan 3 13:09:04 1996 Fred Fish <fnf@cygnus.com>
-
- * symmisc.c (print_objfile_statistics): Print memory use statistics
- for objfile psymbol, symbol, and type obstacks.
-
-Tue Jan 2 13:41:14 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/mips/nm-irix5.h: Restore.
- (TARGET_HAS_HARDWARE_WATCHPOINTS, etc): Define as for Irix 4;
- from Lee Iverson <leei@ai.sri.com>.
- * config/mips/irix5.mh (NAT_FILE): Use nm-irix5.h.
- * config/mips/irix[345].mh (MUNCH_DEFINE): Remove.
-
-For older changes see ChangeLog-95
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/gdb/gdb/ChangeLog-97 b/contrib/gdb/gdb/ChangeLog-97
deleted file mode 100644
index 4f9a949c0481..000000000000
--- a/contrib/gdb/gdb/ChangeLog-97
+++ /dev/null
@@ -1,2855 +0,0 @@
-Wed Dec 31 11:43:53 1997 Mark Alexander <marka@cygnus.com>
-
- * dsrec.c (load_srec): Check remotedebug flag when printing
- debug info.
-
-Wed Dec 31 10:33:15 1997 David Taylor <taylor@texas.cygnus.com>
-
- * breakpoint.c (breakpoint_re_set): add _siglongjmp to list of
- longjmp breakpoints.
-
-Mon Dec 29 21:25:34 1997 Mark Alexander <marka@cygnus.com>
-
- * dve3900-rom.c: New file to support Densan DVE-R3900/20 board.
- * monitor.c (monitor_debug): Move to utils.c, rename to puts_debug.
- (monitor_write_memory, monitor_read_memory, monitor_insert_breakpoint,
- monitor_remove_breakpoint): Remove useless address bits if current
- monitor has MO_ADDR_BITS_REMOVE flag.
- * monitor.h (MO_ADDR_BITS_REMOVE): Define.
- * utils.c (puts_debug): Formerly monitor_debug from monitor.c;
- move here and make public. Add better support for carriage returns.
- * defs.h (puts_debug): Declare.
- * dsrec.c (load_srec): Use puts_debug to print remotedebug information.
- Output header record correctly.
- (make_srec): Output a header record instead of a termination record
- if sect is non-NULL (value is ignored), but abfd is NULL.
- * config/mips/tm-tx39.h (DEFAULT_MIPS_TYPE): Remove definition.
- (REGISTER_NAMES): Define to add R3900-specific registers.
- * config/mips/tm-tx39l.h: Ditto.
- * config/mips/tx39.mt (TDEPFILES): Add dve3900-rom.o and support files.
- * config/mips/tx39l.mt: Ditto.
-
-Wed Dec 24 12:48:48 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * dsrec.c: Cosmetic improvements.
- (make-srec): Change indexing of format and code tables to
- remove confusing empty entries.
-
-Mon Dec 22 21:51:53 1997 Mark Alexander <marka@cygnus.com>
-
- * remote-mips.c (_initialize_remote_mips): Fix DDB doc string.
-
-Sun Dec 21 17:00:06 1997 David Taylor <taylor@texas.cygnus.com>
-
- * d30v-tdep.c (d30v_frame_find_saved_regs): split most of
- function off into d30v_frame_find_saved_regs_offsets;
- (d30v_frame_find_saved_regs_offsets): new function. Got
- backtrace working when calling from framefull (unoptimized)
- routines (.e.g, main) into frameless (optimized) routines
- (e.g., printf).
-
-Fri Dec 19 09:49:49 1997 David Taylor <taylor@texas.cygnus.com>
-
- * d30v-tdep.c (d30v_frame_chain): test end_of_stack
- (d30v_frame_find_saved_regs): set it.
- * config/d30v/tm-d30v.h: improved FRAME_CHAIN_VALID
-
-Thu Dec 18 12:34:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- From Gavin Koch <gavin@cygnus.com>: mips-tdep.c
- * (mips_push_arguments): For big-endian shorts and char's store at
- * the correct location.
-
-Thu Dec 18 00:26:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * mdebugread.c (parse_partial_symbols): Delete check that symbols
- for file not already loaded. Did not work when an include file
- was involved.
-
-Wed Dec 17 10:43:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * elfread.c (elf_symfile_read): Since the partial symbol table is
- searched last in first, insert mdebug or XCOFF info into the
- partial symbol table before any DWARF2 info.
-
-Thu Dec 18 00:00:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * symfile.c (init_psymbol_list): Handle init with zero elements.
-
- * elfread.c (elf_symfile_read): If `mainline', clear psymbol table
- using init_psymbol_list 0. For build_psymtabs functions, pass
- mainline==0 so that psymbol_list isn't re-initialized.
-
- * symfile.c (discard_psymtab): New function, correctly unlink an
- empty psymtab from an object file.
- * dbxread.c (end_psymtab): Call discard_psymtab.
- * xcoffread.c (xcoff_end_psymtab): Ditto.
- * hpread.c (hpread_end_psymtab): Ditto.
- * os9kread.c (os9k_end_psymtab): Ditto.
-
-Wed Dec 17 10:47:05 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * tracepoint.c (set_raw_tracepoint): initialize addr_string
- to NULL; (trace_actions_command): call readline_begin_hook only
- if from_tty is true.
-
-Tue Dec 16 20:05:48 1997 Mark Alexander <marka@cygnus.com>
-
- * configure.tgt: Change little-endian tx39 target name to tx39l.
-
-Tue Dec 16 11:24:30 1997 Jeffrey A Law (law@cygnus.com)
-
- * remote-sim.c (gdbsim_open): Use "--architecture" instead of
- ambigious short form.
-
-Tue Dec 16 10:29:16 1997 David Taylor <taylor@texas.cygnus.com>
-
- * d30v-tdep.c (d30v_frame_chain): don't or in DMEM_START to
- FP_REGNUM value before return; (prologue_find_regs): two sets
- of offsets -- frame pointer and stack pointer, not just one that
- tries to do double duty; (d30v_frame_find_saved_regs): stop once
- we hit pc (in case we're stopped in the middle of the prologue)
- and improve handling of frameless prologues; (d30v_push_arguments):
- *ALL* arguments go on the stack until we run out of args registers,
- force sp to be 8 byte aligned.
-
- * config/tm-d30v.h (EXTRACT_STRUCT_VALUE_ADDRESS): fix, it's r2,
- not r0; (FRAME_CHAIN_VALID): handle use of external memory;
- (STACK_ALIGN): define.
-
-Mon Dec 15 15:13:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (gdbsim_wait): When HAVE_SIGACTION and SA_RESTART
- intall cntrl-c handler with SA_RESTART clear. On BSD systems this
- stops read syscalls's being restarted.
-
- * configure.in (configdirs): Check for sigaction.
- * configure: Re-generate.
-
-Mon Dec 15 11:38:52 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * dwarf2read.c: From change proposed by Gavin Koch.
- (address_significant_size): New static variable.
- (dwarf2_build_psymtabs_hard): Check consistency between
- `address_size' and `address_significant_size'.
- (read_address): MASK out all but the significant bits, as
- determined by `address_significant_size', of any addresses.
- (elf-bfd.h): Include.
- (dwarf2_build_psymtabs_hard): Set `address_significant_size'
- according to the arch_size of the elf object file.
-
-Thu Dec 11 13:40:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * dwarf2read.c (dwarf_decode_lines): Change type of address to
- CORE_ADDR.
-
-Thu Dec 11 14:28:01 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * tracepoint.c (trace_find_command): don't error if going
- backwards thru the trace buffer in a loop.
- * (struct tracepoint): delete unused field.
-
-Wed Dec 10 17:57:00 1997 David Taylor <taylor@texas.cygnus.com>
-
- * d30v-tdep.c : don't bury lots of magic numbers in the code
- instead use defines for the opcodes and opcode masks; update
- to use actual d30v patterns; fix register sizes to be 4 bytes
- not 2 bytes; improve prologue testing now that we have a C
- compiler; fix stack frame handling enough to get backtraces
- working; initial changes to push and pop frames (so that gdb
- can call functions in the inferior).
-
- * config/d30v/tm-d30v.h: update DMEM_START, IMEM_START, and
- STACK_START; change FR_REGNUM to 61 (was 11). Reformat comment
- about DUMMY FRAMES so that it is readable. Fix SAVED_PC_AFTER_FRAME
- macro.
-
-Wed Dec 10 17:41:07 1997 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * ch-valprint.c (chill_val_print): To avoid segfaults, don't print
- a string whose dynamic length is longer than its static length.
-
-Wed Dec 10 15:54:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * dwarf2read.c (dwarf2_build_psymtabs_hard): Check
- cu_header.length is within dwarf_info_buffer not
- dwarf_abbrev_buffer.
-
-Mon Dec 8 14:28:49 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * tracepoint.c (memrange_sortmerge): allow for memranges
- that overlap. (collect_pseudocommand etc.) cleanup decls.
-
-Fri Dec 5 09:22:35 1997 Nick Clifton <nickc@cygnus.com>
-
- * config/v850/tm-v850.h (BREAKPOINT): Reverted back to old value...
-
-Thu Dec 4 09:30:22 1997 Nick Clifton <nickc@cygnus.com>
-
- * config/v850/tm-v850.h (BREAKPOINT): Changed to match new value.
-
-Wed Dec 3 12:44:15 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * tracepoint.c: Add declaration for x_command.
-
- * printcmd.c (x_command): Remove static declaration.
-
-Wed Dec 3 12:00:42 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * tracepoint.c (finish_tfind_command): call do_display so that
- auto-displays are updated by tfind. Also, keep track of frame
- and current-function so that tfind behaves like stepping (only
- show the stack frame if we step into a new function or return).
-
-Wed Dec 3 14:14:58 1997 David Taylor <taylor@texas.cygnus.com>
-
- * sol-thread.c: additional support for debugging threaded core
- files on solaris; previously only kernel threads were found --
- user threads generated errors.
- * corelow.c: don't register core_ops as a target if
- coreops_suppress_target is true (set by sol-thread.c).
-
-Tue Dec 2 14:53:09 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * tracepoint.c: make "tdump" command handle literal memranges.
-
-Tue Dec 2 11:34:48 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * tracepoint.c: use "lookup_cmd" to parse actions commands
- (thus allowing unambiguous prefixes and aliases).
-
-Tue Dec 2 10:15:57 1997 Nick Clifton <nickc@cygnus.com>
-
- * configure.tgt: Add support for Thumb target.
-
-Tue Dec 2 10:14:15 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * tracepoint.c: move prototype of validate_actionline(), and
- make it consistent with the function declaration.
-
-Thu Nov 27 09:07:18 1997 Michael Meissner <meissner@cygnus.com>
-
- * Makefile.in (tracepoint_h): New macro for tracepoint.h
- includes.
- (tracepoint.o): Add rule to build.
-
-Wed Nov 26 22:59:04 1997 Jeffrey A Law (law@cygnus.com)
-
- * remote-sim.c (gdbsim_cntrl_c): Lose ANSI prototype.
-
- * tracepoint.c (set_raw_tracepoint): fix typo
-
-Wed Nov 26 11:33:09 1997 Keith Seitz <keiths@onions.cygnus.com>
-
- * tracepoint.c (set_raw_tracepoint): Make sure there's a trailing
- slash on the directory name.
-
- * top.c (get_prompt): New function.
- * top.h: Declare it.
-
-Wed Nov 26 09:59:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * dwarf2read.c (struct comp_unit_head): Change length and
- abbrev_offset fields to unsigned int.
- (dwarf2_build_psymtabs_hard): Verify length and offset read from
- .debug_info section.
-
-Mon Nov 24 19:36:34 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * tracepoint.c, tracepoint.h: new module, implements tracing,
- which is a new functionality somewhat like breakpoints except
- that a tracepoint stops the inferior only long enough to collect
- and cache selected buffers and memory locations, then allows
- the inferior to continue; the cached trace data can then be
- examined later.
-
-Mon Nov 24 14:17:02 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * infcmd.c: export registers_info, for use by other modules.
- * printcmd.c: export output_command, for use by other modules.
- * stack.c: export locals_info and args_info, for use by other modules.
- * remote.c: export getpkt, putpkt, and fromhex for external use.
- Make fromhex case-insensative. New function "remote_console_output"
- abstracts the acceptance of "O" packets from target.
- Make all "remotedebug" output go to stdout, not stderr.
-
-Mon Nov 24 08:59:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * valprint.c (print_longest): When CC has long long but printf
- doesn't, print decimal value as three parts.
-
- * config/i386/tm-fbsd.h: New file.
- * config/i386/fbsd.mt (TM_FILE): Change to tm-fbsd.h.
-
- * config/i386/nm-fbsd.h (FLOAT_INFO): Move definition from here.
- * config/i386/tm-fbsd.h (FLOAT_INFO): To here.
-
- * configure.in (PRINTF_HAS_LONG_LONG): Check full functionality of
- %ll format specifier.
- (SCANF_HAS_LONG_DOUBLE): Check the scanf family for support of
- long double using %Lg.
- * acconfig.h: Provide default undef for SCANF_HAS_LONG_DOUBLE.
- * configure: Re-generate.
-
- * c-exp.y (parse_number): Use sscanf %Lg when host has
- SCANF_HAS_LONG_DOUBLE not PRINTF_HAS_LONG_DOUBLE
-
-Sun Nov 23 17:12:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * printcmd.c (print_insn): Set the machine type if known.
-
- * i386-tdep.c (_initialize_i386_tdep): Delete "set
- assembly-language" command. Replaced by generic "set
- architecture". Set initial machine using bfd_lookup_arch.
-
-Fri Nov 21 19:43:23 1997 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * valops.c (call_function_by_hand): If the function has a
- prototype, convert its arguments as if by assignment. Otherwise,
- do the usual promotions.
- * stabsread.c (define_symbol): Set the TYPE_FLAG_PROTOTYPED flag
- on functions' types when we can; all C++ functions should get it,
- and if the Sun-style prototype notation is in the stabs, we can
- notice that.
-
-Fri Nov 21 12:20:16 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * aclocal.m4 (AM_CYGWIN32, AM_EXEEXT): Remove. They are already
- defined by the inclusion of ../bfd/aclocal.m4.
- * configure: Rebuild.
-
-Fri Nov 21 10:52:39 1997 Michael Meissner <meissner@cygnus.com>
-
- * Makefile.in (SHELL): Really do the change.
-
-Fri Nov 21 02:19:57 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: also revert SHELL change until configury
- changes work
-
-Thu Nov 20 16:35:13 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * sparc-tdep.c (sparc_pc_adjust): Don't assume sizeof (long) == 4.
-
-Thu Nov 20 04:11:27 1997 Geoffrey Noer <noer@cygnus.com>
-
- * aclocal.m4: add EXEEXT setting rule
- * configure.in: call it
- * configure: regenerate
- * Makefile.in: pepper with EXEEXTs in appropriate places,
- set SHELL = @SHELL@ for those lame hosts that don't have a /bin/sh
- For some reason, EXEEXT isn't getting substututed in correctly
- so for now, set EXEEXT to empty string
-
-Mon Nov 17 15:35:06 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * Makefile.in (remote-sim.o): Depend on $(INCLUDE_DIR)/callback.h.
-
-Fri Nov 14 13:04:34 1997 Jeffrey A Law (law@cygnus.com)
-
- * jv-exp.y (copy_exp, insert_exp): Avoid ANSI prototypes.
-
-Thu Nov 13 09:47:35 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v-tdep.c (d30v_print_flags): Function to print the d30v flags
- in a human readable format.
- (print_flags_command): Command wrapper to call d30v_print_flags.
- (d30v_do_registers_info): When printing out all of the registers,
- print out the flag values in a human readable fashion.
- (_initialize_d30v_tdep): Add info flags command to print the
- flags.
-
- * config/d30v/tm-d30v.h (PSW_*): Add macros for each of the PSW
- bits that are defined.
-
-Wed Nov 12 14:58:39 1997 Jeff Holcomb <jeffh@cygnus.com>
-
- * symfile.c (generic_load): Handle cancel from the
- ui_load_progress_hook routine.
- * dsrec.c (load_srec): Handle cancel from the
- ui_load_progress_hook routine.
-
-Mon Nov 10 15:13:13 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * valprint.c (print_longest): The b, h, w, and g format specifiers
- print unsigned values.
-
-Mon Nov 10 02:02:49 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * top.c (quit_confirm): Change exit message.
-
-Tue Nov 4 16:52:50 1997 Geoffrey Noer <noer@cygnus.com>
-
- * config/i386/cygwin32.mh: because cygwin.dll calls malloc/realloc
- to allocate memory for environ space, gdb cannot use memory
- checks -- set -DNO_MMCHECK
-
-Tue Nov 4 13:50:59 1997 Jim Blandy <jimb@sendai.cygnus.com>
-
- * jv-exp.y (ArrayAccess): Implement Name [ Expression ]; check the
- code to see why this is not trivial.
- (copy_exp, insert_exp): New functions.
-
-Fri Oct 24 17:24:00 1997 Dawn Perchik <dawn@cygnus.com>
-
- * dwarf2read.c (dwarf2_build_psymtabs_hard): Handle the case
- where a compilation unit die has no children (DW_TAG_compile_unit
- has DW_children_no).
- (scan_partial_symbols): Add comment for nesting_level.
-
-Wed Oct 29 15:53:24 1997 David Taylor <taylor@texas.cygnus.com>
-
- * solib.c (solib_break_names): add entry for Solaris 2.6 run
- time linker. From Casper Dik via Peter Schauer.
-
-Tue Oct 28 17:31:47 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * configure.in (configdir): Add -lcomdlg32 and -ladvapi32
- to WIN32LIBS.
-
- * configure: Rebuild
-
-Fri Oct 24 16:48:21 1997 David Taylor <taylor@texas.cygnus.com>
-
- * sol-thread.c (sol_find_new_threads_callback,
- sol_find_new_threads): New functions.
- * config/sparc/nm-sun4sol2.h (FIND_NEW_THREADS): New macro, invoke
- sol_find_new_threads.
- * thread.c (info_threads_command): invoke FIND_NEW_THREADS if it
- is defined.
-
-Thu Oct 23 16:16:04 1997 Jeff Law (law@fast.cs.utah.edu)
-
- * dbxread.c (process_one_symbol): Put back initialization
- of a variable lost during last change. Don't perform
- assignment inside conditionals.
- * stabsread.c (symbol_reference_defined): Return -1 for error/not
- found. All callers changed appropriately.
- (define_symbol): Don't perform assignment inside conditionals.
-
-Wed Oct 22 13:04:52 1997 Jeffrey A Law (law@cygnus.com)
-
- * mdebugread.c (psymtab_to_symtab_1): Handle new live range stabs
- entries.
-
- * dbxread.c: More comment cleanups.
- * stabsread.c: Fix various violations of the GNU coding and
- formatting standards. Update/add comments to make code clearer.
- (resolve_reference): Delete unused function.
- (ref_search_val): Remove function. It didn't belong in stabsread.c
- (resolve_live_range): No longer returns a value. Do not add it
- to the live range list until the entire range stab has been parsed.
- (get_substring): Remove duplicate declaration.
- (resolve_symbol_reference): Now static. Remove unnecessary code
- to deal with cleanups.
- (ref_add): Use xrealloc instea of realloc.
- (process_reference): Reorganize slightly to make clearer.
- * stabsread.h (resolve_symbol_reference): Remove declaration.
- (resolve_reference): Likewise.
- * symtab.c (find_active_alias): New function.
- (lookup_block_symbol): Use find_active_alias.
- * symtab.h (struct range_list): Fix dangling struct live_range
- reference.
- (ref_search_val): Remove decl.
-
- * symtab.h (struct range_list): Renamed from struct live_range.
- (struct symbol): Remove struct live_range_info substruct.
- Bring the alias list and range list fields up to the toplevel
- as "aliases" and "ranges".
- (SYMBOL_ALIASES, SYMBOL_RANGES): Corresponding changes.
- (SYMBOL_RANGE_START, SYMBOL_RANGE_END, SYMBOL_RANGE_NEXT): Delete.
- * stabsread.c: Corresponding changes.
-
- * dbxread.c: Fix various violations of the GNU coding and
- formatting standards. Update/add comments to make code
- clearer.
- (process_later): Use xrealloc instead of realloc.
-
- * symtab.c: Include inferior.h.
-
-Tue Oct 21 14:15:26 1997 Per Bothner <bothner@cygnus.com>
-
- * ch-exp.c: Rename FIELD_NAME to DOT_FIELD_NAME (to avoid conflict).
-
-Fri Oct 17 13:22:02 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * infcmd.c: Improve grammar of "set args" help.
-
-Thu Oct 16 15:03:58 1997 Michael Meissner <meissner@cygnus.com>
-
- * remote-sds.c (sds_load): Properly declare as static.
-
-Wed Oct 15 10:27:14 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * config/sparc/tm-sparc.h (FIX_CALL_DUMMY): Mask off displacement
- to 30 bits in call insn to handle --enable-64-bit-bfd.
- (STORE_STRUCT_RETURN): Change to handle --enable-64-bit-bfd.
-
-Tue Oct 14 22:13:27 1997 Dawn Perchik <dawn@cygnus.com>
-
- * stabsread.c: Make ref_map entries dynamically allocated.
-
-Thu Oct 9 12:37:57 1997 Frank Ch. Eigler <fche@cygnus.com>
-
- * printcmd.c (print_address_symbolic, address_info): Mask
- target-specific flag bits from PC, for more aesthetic disassembly.
- * config/mips/tm-mips.h: Added PC masking for MIPS family
- (especially the MIPS16).
-
-Sat Oct 4 18:45:44 1997 Mark Alexander <marka@cygnus.com>
-
- * remote-mips.c (mips-initialize): Work around flakiness in
- some versions of PMON after loading a program.
-
-Fri Oct 3 15:49:18 1997 Per Bothner <bothner@cygnus.com>
-
- * c-lang.h, cp-valprint.c (static_field_print): Make non-static.
- * parse.c, parser-defs.h (length_of_subexp): Make non-static.
- * jv-exp.y (FieldAccess): Handle dollar-VARIABLE as primary.
- (ArrayAccess): Likewise. Also remove warnings.
- (CastExpression): Implement (typename) UnaryExpression.
- (push_qualified_expression_name): Fix small bug.
- * jv-lang.c: Use TYPE_TAG_NAME, not TYPE_NAME for class names.
- (_initialize_jave_language): Fix typo (jave -> java).
- (java_language): Java does *not* have C-style arrays.
- (java_class_from_object): Make more general (and complicated).
- (java_link_class_type): Fix typo "super" -> "class". Handle arrays.
- (java_emit_char, java_printchar): New function.
- (evaluate_subexp_java case BINOP_SUBSCRIPT): Handle Java arrays.
- * jv-valprint.c (java_value_print): Implement printing of Java arrays.
- (java_print_value_fields): New function.
- (java_val_print): Better printing of TYPE_CODE_CHAR, TYPE_CODE_STRUCT.
-
-Fri Oct 3 09:52:26 1997 Mark Alexander <marka@cygnus.com>
-
- * config/mips/tm-mips.h (MAKE_MSYMBOL_SPECIAL): Force MIPS16
- addresses to be odd.
- (MIPS_FPU_SINGLE_REGSIZE, MIPS_FPU_DOUBLE_REGSIZE): Define.
- * mips-tdep.c (mips_extract_return_value): Doubles aren't
- returned in FP0 if FP registers are single-precision only.
-
-Mon Sep 29 23:03:03 1997 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c (set_reg_offset): New function.
- (mips16_heuristic_proc_desc): Calculate offsets of registers
- saved by entry pseudo-op after rest of prologue has been read.
- Use set_reg_offset to ignore all but the first save of a given
- register.
- (mips32_heuristic_proc_desc): Initialize frame adjustment value.
- * remote-sim.c (gdbsim_store_register): Don't update registers
- that have a null or empty name.
- * findvar.c (read_register_bytes): Don't fetch registers
- that have a null or empty name.
-
-Tue Sep 30 13:35:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/mips/tm-mips.h (NUM_REGS): Define conditionally.
- (REGISTER_NAMES): Ditto.
-
-Fri Sep 26 21:08:22 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * dsrec.c (load_srec): add ui_load_progress_hook to
- display some feedback to user
-
- * symfile.c (generic_load): add ui_load_progress_hook to
- display some feedback to user
-
-Fri Sep 26 17:32:22 1997 Jason Molenda (crash@pern.cygnus.com)
-
- * command.c (add_cmd, add_show_from_set): Insert new commands in
- alphabetical order.
-
-Fri Sep 26 12:22:00 1997 Mark Alexander <marka@cygnus.com>
-
- * config/mips-tm-mips.h (mips_extra_func_info): New frame_adjust
- member for storing offset of MIPS16 frame pointer from SP.
- * mips-tdep.c: Use RA_REGNUM instead of hardcoded 31 throughout.
- (PROC_FRAME_ADJUST): Define.
- (mips16_heuristic_proc_desc): Store frame pointer adjustment value.
- (get_frame_pointer): Use frame pointer adjustment value when
- calculating frame address.
- * remote-sim.c (gdbsim_fetch_register): Don't fetch registers
- that have a null or empty name.
-
-Fri Sep 26 12:40:51 1997 Jeffrey A Law (law@cygnus.com)
-
- * mips-tdep.c (_initialize_mips_tdep): Allow target files to
- override default FPU type.
-
-Fri Sep 26 10:33:54 1997 Felix Lee <flee@cygnus.com>
-
- * configure.tgt (v850-*-*): necmsg.lib instead of v850.lib.
-
-Wed Sep 24 14:02:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/v850/tm-v850.h (BREAKPOINT): Use 1 word DIVH insn with
- RRRRR=0 for simulator breakpoint. Previous breakpoint insn was two
- words.
-
-Thu Sep 18 15:07:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ser-e7kpc.c (get_ds_base): Only use under Windows.
- (windows.h): Include when any _WIN32 host.
-
-Wed Sep 24 18:12:47 1997 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * The following block of changes add support for debugging assembly
- source files.
- * breakpoint.c (resolve_sal_pc): Prevent crash when pc isn't
- associated with a function.
- * buildsym.c (record_line start_symtab end_symtab): Don't delete
- symtabs which only have line numbers (but no other debug symbols).
- * dbxread.c (read_dbx_symtab end_psymtab): Ditto.
-
- * remote-sim.c: New functions gdbsim_insert/remove_breakpoint. Use
- intrinsic simulator breakpoints if available, otherwise do it the
- hard way.
-
- * configure.tgt: Add d30v.
- * d30v-tdep.c: New file.
- * config/d30v/d30v.mt, config/d30v/tm-d30v.h: New files.
-
-Tue Sep 23 11:24:13 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * Makefile.in (ALLCONFIG): Remove, inaccurate and never used.
-
-Tue Sep 23 00:08:18 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mips-tdep.c (mips_push_arguments): Tweak alignment of register
- value if the remaining length of a non-integral argument is smaller
- than the register size for big-endian non-EABI mode.
-
- * rs6000-tdep.c (branch_dest): Handle return from signal
- handler function via sigreturn kernel call.
-
-Mon Sep 22 15:32:06 1997 Dawn Perchik <dawn@cygnus.com>
-
- * stabsread.h, symtab.h, dbxread.c, symtab.c, stabsread.c:
- Fix prototypes. Remove function scoped function declarations.
-
-Fri Sep 19 18:51:26 1997 Felix Lee <flee@cygnus.com>
-
- * config/i386/windows.mh (XDEPFILES): need to list some files
- explicitly, for odd reasons.
-
-Tue Sep 16 20:00:05 1997 Per Bothner <bothner@cygnus.com>
-
- * jv-exp.y (push_fieldnames): New, to handle EXP.FIELD1....FIELDN.
- (push_expression_name): New, to handle expression names.
- (push_qualified_expression_name): New, for qualified expression names.
- (parse_number): Fix bugs in parsing of non-decimal integers.
- * jv-lang.h, jv-lang.c (java_demangle_type_signature): New.
- * jv-lang.c (type_from_class): Just use name with java_lookup_class.
- (java_link_class_type): Add dummy "class" field.
- (java_lookup_type): New.
- (evaluate_subexp_java case STRUCTOP_STRUCT): Force to address.
- * jv-typeprint.c (java_type_print_base): Don't print "class" field.
- Use java_demangle_type_signature to print array class types.
- * jv-valprint.c (java_value_print): Preliminary array support.
- Print pointer as TYPE@HEXADDR, instead of (TYPE)0xHEXADDR.
- (java_val_print): Move check for object type to java_value_print.
- Check for null. Print pointer as @HEXADDR, not 0xHEXADDR.
-
- * valops.c (search_struct_field): Search basesclasses in
- ascending, not descending order. Hack to avoid virtual baseclass
- botch for Java interfaces.
-
-Tue Sep 16 19:56:23 1997 Per Bothner <bothner@cygnus.com>
-
- * util.c (run_cleanup_chain, make_run_cleanup, do_run_cleanups):
- New cleanup clean for cleanups to be run when at each 'run' command.
- * infcmd.c (run_command): Call do_run_cleanups.
-
- * solib.c (find_solib): Register cleanup to call clear_solib
- on a new 'run' command.
- (symbol_add_stub): First look for existing objfile with same name.
-
-Tue Sep 16 16:00:01 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-sds.c (sds_load): New function.
- (sds_ops): Use it.
- (sds_open): Don't set inferior_pid yet.
- (sds_kill): Remove contents.
- (sds_create_inferior): Rewrite to work more like monitor
- interfaces.
- (sds_restart): Remove, no longer used.
-
- * monitor.h (MO_SREC_ACK_PLUS, MO_SREC_ACK_ROTATE): New flags.
- * monitor.c (monitor_wait_srec_ack): Add DINK32-specific ack code.
- * dsrec.c (load_srec): Always write a header S-record.
- * dink32-rom.c (dink32_regnames): Fix the names of float registers.
- (dink32_cmds): Set to use S-record downloading with acks.
- * remote-est.c (est_cmds): Add MO_SREC_ACK_PLUS flag.
-
-Tue Sep 16 10:08:27 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/v850/tm-v850.h (BREAKPOINT): Set to a truely illegal
- instruction.
-
- * exec.c (exec_file_command): Call set_architecture_from_file.
-
-Mon Sep 15 13:01:22 1997 Mark Alexander <marka@cygnus.com>
-
- * dbxread.c (MSYMBOL_SIZE): New macro.
- (end_psymtab): Use MSYMBOL_SIZE to extract size from minimal symbol.
- * elfread.c (elf_symtab_read): If ELF symbol is "special",
- such as a MIPS16 function, mark minimal symbol as special too.
- * mips-tdep.c (pc_is_mips16): New function to check whether
- a function is MIPS16 by looking at the minimal symbol. Use
- pc_is_mips16 throughout instead of IS_MIPS16_ADDR macro.
- * config/mips/tm-mips.h (SYMBOL_IS_SPECIAL, MAKE_MSYMBOL_SPECIAL,
- MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): New functions for setting/testing
- "special" MIPS16 bit in ELF and minimal symbols.
- * mdebugread.c (parse_partial_symbols): Don't construct a partial
- symbol table for a file that already has one.
-
-Sat Sep 13 08:32:13 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mdebugread.c (parse_symbol, handle_psymbol_enumerators): Handle
- yet another variant of enumerator debugging info, used by DU 4.0
- native cc.
-
-Tue Sep 9 20:47:23 1997 Felix Lee <flee@cygnus.com>
-
- * config/i386/windows.mh (XDEPFILES): reduce to libwingdb.a.
- otherwise link command line is too long.
-
-Tue Sep 9 17:41:41 1997 Jeffrey A Law (law@cygnus.com)
-
- * symtab.c, dbxread.c, stabsread.c: Fix up ANSI-C isms. Fix
- some formatting problems.
-
-Mon Sep 8 16:45:51 1997 Stu Grossman <grossman@cygnus.com>
-
- * ser-e7kpc.c: Don't include w32sut.h. We no longer use the UT
- mechanism. Remove prototypes for dos_async_* functions. They don't
- exist anymore.
-
-Mon Sep 8 12:48:50 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * top.c (quit_confirm, quit_force): New functions, broken out of
- quit_command.
- (quit_command): Just call quit_confirm and quit_force.
- * top.h (quit_confirm, quit_force): Declare.
-
-Sun Sep 7 17:26:30 1997 Dawn Perchik <dawn@cygnus.com>
-
- * dbxread.c, buildsym.c, symtab.c, stabsread.c: Add support for
- reading stabs extensions for live range information.
- * stabsread.h, partial-stab.h: Add prototypes for new functions.
- * symtab.h: Add structure for storing live range information.
-
-Wed Sep 3 16:39:39 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * top.c (set_arch): New function, update target_architecture.
-
- * defs.h, top.c (set_architecture_from_arch_mach): Replace
- set_architecture, takes the arch and machine as arguments.
-
- * sh3-rom.c (sh3e_open): Update.
- (sh3_open): Ditto.
-
-Tue Sep 2 12:00:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-e7000.c (e7000_fetch_registers): Fix typo, stray paren.
- (e7000_wait): Ditto.
-
-Mon Sep 1 11:21:03 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * top.c (init_main): Add ``set processor'' as an alias for ``set
- architecture''.
-
-Sat Aug 30 13:44:48 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * config/sparc/sparclite.mt: Removed simulator references (erc32
- has been disabled).
-
-Thu Aug 28 10:20:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-e7000.c (e7000_fetch_registers): Check
- target_architecture instead of sh_processor_type.
- (e7000_wait): Ditto.
-
- * config/sh/tm-sh.h (sh_set_processor_type): Delete prototype.
-
- * sh3-rom.c (sh3_open): Call set_architecture not
- sh_set_processor_type.
- (sh3e_open): Ditto.
-
- * sh-tdep.c (sh_show_processor_type_command): Delete.
- (sh_set_processor_type_command): Delete.
- (sh_target_architecture_hook): Rename from sh_set_processor_type,
- use AP to determine architecture.
- (sh_show_regs): Use bfd_mach_sh* types.
-
- * remote-sim.c (gdbsim_open): Pass --arch=XXX to simulator when
- architecture was specified explicitly.
-
- * defs.h (target_architecture, target_architecture_auto,
- set_architecture, set_architecture_from_file): Declare.
- (target_architecture_hook): Allow targets to be notified of set
- arch commands.
-
- * top.c (init_main): Add set/show/info architecture commands.
- (set_architecture, show_architecture, info_architecture): New
- functions, parse same.
- (set_architecture_from_file): New function, determine arch from
- BFD.
-
-Tue Aug 26 17:13:43 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (gdbsim_open): Only pass endianness to sim_open
- when set explicitly. Prepend endianness arg so that it can be
- overridden.
-
- * defs.h, top.c (target_byte_order_auto): Make global when
- byteorder is selectable.
-
-Tue Aug 26 15:19:56 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (gdbsim_create_inferior): Pass exec_bfd into
- sim_create_inferior.
- (gdbsim_create_inferior): Pass -1 to proceed, sim_create_inferior
- has already set the PC.
- (gdbsim_create_inferior): Allow exec_file to be NULL, make "No
- exec file" a warning. Ditto for "No program loaded".
-
-Mon Aug 25 17:08:01 1997 Geoffrey Noer <noer@cygnus.com>
-
- * ocd.c: revert Sun change -- enable log file handling
-
-Mon Aug 25 12:21:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (gdbsim_open): Pass exec_bfd to sim_open call.
-
-Sun Aug 24 21:16:59 1997 Geoffrey Noer <noer@cygnus.com>
-
- * ocd.c: comment out sections that create and flush wigglers.log
- log file when using the wiggler.
-
-Thu Aug 21 16:18:08 1997 Geoffrey Noer <noer@cygnus.com>
-
- * config/powerpc/ppc-eabi.mt:
- * config/powerpc/ppc-sim.mt:
- * config/powerpc/ppcle-eabi.mt:
- * config/powerpc/ppcle-sim.mt: ser-ocd.c needs to be before
- other ocd-related files in TDEPFILES
-
-Thu Aug 21 14:56:04 1997 Geoffrey Noer <noer@cygnus.com>
-
- * ppc-bdm.c (bdm_ppc_wait): stop printfing ecr, der
- * ocd.c: initialize remote_timeout
- (ocd_wait): while looping, call ocd_do_command with OCD_AYT
- (ocd_get_packet): remove find_packet goto. If there isn't
- an 0x55 at the start, something is quite wrong so error out
- instead of advancing in the packet and trying again. If checksum
- is invalid, print error message instead of trying again.
- * ser-ocd.c (ocd_readchar): error if we attempt to read past
- the end of the from_wiggler_buffer.
-
-
-Wed Aug 20 14:08:39 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * dink32-rom.c: Don't use "mf" command to fill, is too picky
- about alignment.
-
-
-Tue Aug 19 08:41:36 1997 Fred Fish <fnf@cygnus.com>
-
- * objfiles.c (objfile_relocate): Add call to breakpoint_re_set
- after relocations are complete.
- * remote-vx.c (vx_add_symbols): Remove call to breakpoint_re_set,
- this is now done in objfile_relocate.
-
-Mon Aug 18 17:29:54 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * win32-nat.c (handle_exception): Return a value indicating
- whether the exception was handled. Don't handle random exceptions
- the first time around, so that structured exception handling
- works.
- (child_wait): Check the return value of handle_exception. Set the
- continue_status argument to ContinueDebugEvent accordingly.
-
-Mon Aug 18 11:14:15 1997 Nick Clifton <nickc@cygnus.com>
-
- * configure.tgt: Add support for v850ea target.
-
-Sun Aug 17 20:31:57 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * m32r-stub.c: fix typo
-
-Sun Aug 17 17:33:34 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-sds.c: Remove unused remnants of remote.c.
- (tob64): Return the result length.
- (sds_interrupt): Send a stop message.
- (sds_wait): Add debug output for signal interpretation, flag
- that signal was due to a trap.
- (sds_fetch_registers): Fill the registers array correctly for
- PowerPC.
- (sds_store_registers): Get the right values from registers array.
- (putmessage): Tweak length handling so checksum comes out right.
- (sds_insert_breakpoint, sds_remove_breakpoint): Do correctly.
-
-Fri Aug 15 20:53:13 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (init.c): Don't use xargs.
-
-Fri Aug 15 13:59:37 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * infrun.c (wait_for_inferior): Add the symbols for any
- newly loaded objects upon a TARGET_WAITKIND_LOADED event.
-
- Rewrite code which determines the TOC address for calling functions
- in the inferior under AIX.
- * rs6000-nat.c (find_toc_address): New function to determine
- the required TOC address from a function address.
- (_initialize_core_rs6000): Set up find_toc_address_hook to point
- to find_toc_address.
- (xcoff_relocate_symtab, xcoff_relocate_core): Remove
- add_text_to_loadinfo calls.
- (exec_one_dummy_insn): Change pid and status to int to get rid of
- compiler warnings.
- (xcoff_relocate_symtab): Cast ldi to `int *' when passing it to
- ptrace to get rid of compiler warnings.
- * rs6000-tdep.c: Add definition for find_toc_address_hook.
- (rs6000_fix_call_dummy): If find_toc_address_hook is non zero,
- patch TOC address load code in the call dummy with the value
- returned from find_toc_address_hook.
- (struct loadinfo, loadinfo, loadinfolen,
- loadinfotextindex, xcoff_init_loadinfo, free_loadinfo,
- xcoff_add_toc_to_loadinfo, add_text_to_loadinfo, find_toc_address):
- Remove.
- (_initialize_rs6000_tdep): Remove initialization of
- coff_add_toc_to_loadinfo_hook and xcoff_init_loadinfo_hook.
- * xcoffread.c (coff_add_toc_to_loadinfo_hook,
- xcoff_init_loadinfo_hook): Remove.
- (struct coff_symfile_info): Add toc_offset field.
- (scan_xcoff_symtab): Record toc_offset value in toc_offset field
- instead of calling xcoff_add_toc_to_loadinfo_hook.
- (get_toc_offset): New function to return the value of the
- toc_offset field for an object file.
- (xcoff_initial_scan): Remove call of xcoff_init_loadinfo_hook.
- * xcoffsolib.h (add_text_to_loadinfo): Remove declaration.
- * config/rs6000/tm-rs6000.h: Add declarations for
- find_toc_address_hook and get_toc_offset.
-
-Wed Aug 13 19:31:28 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-sds.c: New file, interface to SDS-compatible monitors.
- * Makefile.in (remote-sds.o): Add build rule.
- * config/powerpc/ppc-eabi.mt, config/powerpc/ppc-sim.mt
- (TDEPFILES): Add remote-sds.o.
-
-Tue Aug 12 14:37:18 1997 Geoffrey Noer <noer@cygnus.com>
-
- * ocd.c (ocd_wait): loop until we're in BDM mode instead of
- assuming control has returned to GDB.
-
-Mon Aug 11 19:16:04 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * dink32-rom.c: New file, support for DINK32 monitor.
- * Makefile.in (dink32-rom.o): Add build rule.
- * config/powerpc/ppc-eabi.mt, config/powerpc/ppc-sim.mt
- (TDEPFILES): Add dink32-rom.o.
- * monitor.h (MO_32_REGS_PAIRED, MO_SETREG_INTERACTIVE,
- MO_SETMEM_INTERACTIVE, MO_GETMEM_16_BOUNDARY,
- MO_CLR_BREAK_1_BASED): New monitor interface flags.
- * monitor.c: Use them.
- (monitor_store_register): Use setreg.term if defined.
- (monitor_insert_breakpoint, monitor_remove_breakpoint): Notice
- if set_break and clr_break fields are empty.
-
-Mon Aug 11 16:22:36 1997 Geoffrey Noer <noer@cygnus.com>
-
- * ocd.c (ocd_insert_breakpoint, ocd_remove_breakpoint): Macro
- BDM_BREAKPOINT already has braces around it, remove erroneous ones.
- * ser-ocd.c (ocd_write): Conditionalize on _WIN32 instead of
- __CYGWIN32__.
- * config/powerpc/tm-ppc-eabi.h: Remove BDM_NUM_REGS, BDM_REGMAP
- * ppc-bdm.c: move BDM_NUM_REGS, BDM_REGMAP here from tm.h file,
- fill in doc fields of bdm_ppc_ops.
- (bdm_ppc_fetch_registers): Don't ask for invalid registers such
- as the MQ or floating point regs not present on ppc 8xx boards.
- (bdm_ppc_store_registers): Don't write those same invalid registers.
- * config/i386/cygwin32.mh: Stop including ocd.o ser-ocd.o.
- * config/powerpc/ppc-eabi.mt:
- * config/powerpc/ppcle-eabi.mt:
- * config/powerpc/ppc-sim.mt:
- * config/powerpc/ppcle-sim.mt: Include ser-ocd.o.
-
-Mon Aug 11 16:08:52 1997 Fred Fish <fnf@cygnus.com>
-
- * frame.h (enum lval_type): Conditionalize on __GNUC__
- instead of __STDC__.
-
-Sun Aug 10 19:08:26 1997 Jeffrey A Law (law@cygnus.com)
-
- * utils.c (error): Fix return type for !ANSI_PROTOTYPES.
-
-Sun Aug 10 16:49:09 1997 Geoffrey Noer <noer@cygnus.com>
-
- * ocd.c: move ocd_write_bytes proto to ocd.h since it is used
- by ppc-bdm.c, use OCD_LOG_FILE to help debugging, define
- BDM_BREAKPOINT if not defined in tm.h
- (ocd_error): add new error cases
- (ocd_start_remote): send the OCD_INIT command before
- OCD_AYT and OCD_GET_VERSION calls, 80 was correct speed after all
- (ocd_write_bytes): no longer static
- (ocd_insert_breakpoint): no longer static
- (ocd_remove_breakpoint): new
- * ocd.h: add protos for ocd_write_bytes, ocd_insert_breakpoint,
- and ocd_remove_breakpoint
- * ppc-bdm.c: change bdm_ppc_ops so we call ocd_insert_breakpoint
- and ocd_remove_breakpoint instead of memory_insert_breakpoint
- and memory_remove_breakpoint.
- (bdm_ppc_open): after calling ocd_open, modify DER
- register so interrupts will drop us into debugging mode, finally
- disable the watchdog timer on the board so we don't leave BDM
- mode unexpectedly.
-
-Sat Aug 9 01:50:14 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * values.c (value_primitive_field): Account for offset when
- extracting the value of a bitfield.
- From Paul Hilfinger <hilfingr@CS.Berkeley.EDU>.
-
-Fri Aug 8 21:35:44 1997 Mark Alexander <marka@cygnus.com>
-
- * gdbserver/utils.c (error): Change prototype to match defs.h.
- * gdbserver/low-sim.c: Change simulator calls to use new interface.
- * remote.c (remote_write_bytes): Include '$' at start of packet
- and checksum at end of packet in overhead calculation.
-
-Fri Aug 8 15:59:24 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ser-ocd.c: If _WIN32, include <windows.h>.
- (dll_do_command): New static variable if _WIN32.
- (ocd_open): Set dll_do_command if _WIN32.
- (ocd_write): Use dll_do_command rather than do_command.
- * config/i386/cygwin32.mh (XDEPFILES): Remove libwigglers.a.
- (BDM_DLLNAME, BDM_LIBNAME, BDM_DEFFILE): Don't define.
- ($(BDM_LIBNAME)): Remove target.
- * wigglers.def: Remove.
-
- * config/i386/cygwin32.mh ($(BDM_LIBNAME)): Rename target from
- libwigglers.def.
- (libwigglers.a): Remove target.
-
-Fri Aug 8 13:11:01 1997 Mike Meissner <meissner@cygnus.com>
-
- * config/powerpc/ppc{,le}-{eabi,sim}.mt (TDEPFILES): Make sure
- ppc-bdm.o and ocd.o are used for all powerpc-eabi targets.
-
-Thu Aug 7 19:40:52 1997 Geoffrey Noer <noer@cygnus.com>
-
- Changes to OCD support to support wiggler box as well as
- target boxes:
- * ocd.c: change speed in init command to 0 from 80,
- add (temporary) logging commands to help debugging,
- (ocd_open): if "target ocd wiggler lpt" then use special
- ser-ocd.c serial interface which communicates with Wigglers.dll,
- otherwise ("target ocd <foo>") do as we did before
- (ocd_get_packet): add OCD_LOG_FILE and OCD_SET_CONNECTION to
- switch of known commands of len 0
- * ocd.h: add OCD_LOG_FILE
- * serial.c (serial_open): do serial_interface_lookup on ocd
- in the case of ocd
- * ser-ocd.c: add buffer to contain responses from sending a
- command to the Wigglers.dll.
- (ocd_readchar): return curr char from buffer and increment ptr
- (ocd_write): send buffer to Wigglers.dll, storing response in
- return buffer and initializing curr location ptr to start of
- buffer.
-
-Thu Aug 7 13:39:31 1997 Geoffrey Noer <noer@cygnus.com>
-
- * ocd.h: add OCD_SET_CONNECTION
- * ocd.c: rename "do_command" to "ocd_do_command"
-
-Thu Aug 7 13:09:17 1997 Geoffrey Noer <noer@cygnus.com>
-
- Nomenclature change. BDM is a specific type of OCD
- (On Chip Debugging). Wiggler is the parallel port box controlled
- by Wigglers.dll. The faster target box from Macraigor Systems
- is not a wiggler.
- * ocd.c:
- * ocd.h:
- * ppc-bdm.c:
- * ser-ocd.c:
- Replace all instances of "wiggler_" with "ocd_" and change most other
- instances of "wiggler" to "ocd" or "ocd device" depending on context.
- * config/m68k/monitor.mt: remove remote-wiggler.o from TDEPFILES
- until OCD with that target is supported again.
-
-Wed Aug 6 16:15:31 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: add DLLTOOL = @DLLTOOL@, pass on DLLTOOL to
- sub makes, change clean rule to also remove *.a to remove
- libwigglers.a, in dependencies: add ppc-bdm.o ocd.o ser-ocd.o and
- remove remote-wiggler.o
- * configure.in: add DLLTOOL support
- * configure: regenerate
- * wigglers.def: new file for imports for wigglers.dll
- * ser-ocd.c: new file which is layer between ocd.c and either the
- wigglers.dll or the target box, only stub so far
- * config/powerpc/ppc-eabi.mt: add ppc-bdm.o to TDEPFILES
- * config/powerpc/ppc-sim.mt: add ppc-bdm.o to TDEPFILES
- * config/i386/cygwin32.mh: add ocd.o ser-ocd.o libwigglers.a
- to XDEPFILES, add rules to build libwigglers.a
-
- checking in changes of Stu Grossman <grossman@cygnus.com>:
- * remote-wiggler.c: delete
- * ocd.c: new, was remote-wiggler.c
- always include sys/types.h, include ocd.h, move WIGGLER
- commands and many wiggler prototypes to ocd.h, make wiggler_desc
- static, stop making local wiggler functions static,
- define write_mem_command for wiggler_write_bytes
- (wiggler_start_remote): stop hardcoding the target type,
- instead set and use a target_type variable.
- (wiggler_open): add new target_type and ops args
- (wiggler_wait): now no longer takes pid and target_status as args,
- stop trying to set target_status struct, remove BGND insn
- checks
- (read_bdm_registers): renamed to wiggler_read_bdm_registers
- (wiggler_read_bdm_registers): numregs arg changed to reglen arg,
- remove pktlen check, set reglen instead of numregs
- (dump_all_bdm_regs): delete
- (wiggler_fetch_registers): delete
- (wiggler_prepare_to_store): now just an empty function
- (wiggler_store_registers): delete
- (wiggler_read_bdm_register): new
- (wiggler_write_bdm_registers): new
- (wiggler_write_bdm_register): new
- (wiggler_write_bytes): use write_mem_command variable instead of
- WIGGLER_WRITE_MEM
- (get_packet): renamed to wiggler_get_packet, change refs throughout
- (put_packet): renamed to wiggler_put_packet, change refs throughout
- (wiggler_get_packet): add break to default case of switch,
- change length of WIGGLER_GET_VERSION len to 10 from 4 to match
- specs
- (wiggler_mourn): unpush_target with current_ops, not &wiggler_ops
- (flash_xfer_memory): delete
- (noop_store_registers): new placeholder replacement for
- target_store_registers() which prevents generic_load from trying to
- set up the PC.
- (bdm_update_flash_command): add store_registers_tmp variable,
- make handling of wiggler_ops more generic -- define wiggler_ops
- in a target-specific file instead (such as ppc-bdm.c in the case
- of the ppc), use current_target to deal with registers again
- making this file less target-specific.
- (bdm_read_register_command): new
- (_initialize_remote_wiggler): stop doing add_target (&wiggler_ops),
- comment out add_cmd ("read-register", ...)
- * ocd.h: new, contains common wiggler prototypes, command definitions
- * ppc-bdm.c: file for ppc-specific OCD code, including target_ops
- structure for ppc bdm
- (bdm_ppc_open): new
- (bdm_ppc_wait): new
- (bdm_ppc_fetch_registers): new
- (bdm_ppc_store_registers_: new
- (_initialize_bdm_ppc): new
- * config/powerpc/tm-ppc-eabi.h: add necessary CPU32 BDM defines
-
-Wed Aug 6 00:24:08 1997 Jeffrey A Law (law@cygnus.com)
-
- * hpread.c (hpread_read_struct_type): Use accessor macros rather
- than directly mucking around with data structures.
-
-Tue Aug 5 13:37:14 1997 Per Bothner <bothner@cygnus.com>
-
- * gdbtypes.h: Re-interpret struct field. Suppport address of static.
- Add a bunch of macros.
- * coffread.c, dwarf2read.c, dwarfread.c, mdebugread.c, stabsread.c:
- Update to use new macros.
- * coffread.c, hpread.c, stabsread.c: Remove bugus TYPE_FIELD_VALUE.
- * value.h, values.c (value_static_field): New function.
- * cp-valprint.c, valops.c: Modify to use value_static_field.
-
- * jv-lang.c (get_java_utf8_name): Re-write so it works with
- implied (missing) data field, as defined by cc1java.
- (java_link_class_type): Type length and field offset (in interior)
- now includes object header. Get static fields working.
- * jv-lang.h (JAVA_OBJECT_SIZE): Update for change in Kaffe.
- * jv-typeprint.c (java_type_print_derivation_info,
- java_type_print_base): New functions, for better Java output.
- * jv-valprint.c: Start to support Java-specific output.
-
-Sun Aug 3 08:18:09 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * c-valprint.c (c_val_print): Use extract_address to retrieve
- the address of the virtual function.
- From Peter Bloecher (Peter.Bloecher@eedn.ericsson.se).
-
- * eval.c (evaluate_subexp_standard), valarith.c (value_x_unop):
- Handle C++ operator *.
-
-Fri Aug 1 15:21:44 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Check for cygwin32 environment. Define and
- substitute WIN32LIBS and WIN32LDAPP. Always set configdir to
- unix; setting it to win was for an old Tcl/Tk configuration
- scheme.
- * Makefile.in (TK_CFLAGS): Add @TK_BUILD_INCLUDES@.
- (WIN32LDAPP, WIN32LIBS): Define.
- (CLIBS): Add $(WIN32LIBS).
- (gdb): Use $(WIN32LDAPP).
- * configure: Rebuild.
-
-Thu Jul 31 15:40:19 1997 Per Bothner <bothner@cygnus.com>
-
- * symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC, SYMBOL_INIT_DEMANGLED_NAME,
- SYMBOL_DEMANGLED_NAME): Add demangling support for Java.
- * utils.c (fprintf_symbol_filtered): Handle language_java.
-
- * symtab.c (decode_line_1): Handle Java-style package.class.method.
-
-Wed Jul 30 14:04:18 1997 Per Bothner <bothner@cygnus.com>
-
- * java-*: Renamed to jv-*, to make fit within 14 characters.
- * jv-lang.h (java_type_print): Added declaration.
- * jv-typeprint.c: New file. Provides java_print_type.
- * jv-lang.c (java_link_class_type): New function.
- (java_language_defn): Replace c_print_type by java_print_type.
- * Makefile.in: Update accordingly.
-
-Tue Jul 29 10:12:44 1997 Felix Lee <flee@cygnus.com>
-
- * Makefile.in (init.c): except some mswin files do need to be
- scanned. oh well.
-
-Mon Jul 28 14:04:39 1997 Felix Lee <flee@cygnus.com>
-
- * Makefile.in (init.c): don't try to scan mswin for _initialize
- funcs. (generates misleading error message because files have
- .cpp suffix, not .c suffix)
-
-Mon Jul 28 13:27:21 1997 Felix Lee <flee@cygnus.com>
-
- * ser-e7kpc.c: <w32sut.h> -> "mswin/w32sut.h"
-
-Mon Jul 28 02:54:31 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * xcoffread.c (coff_getfilename): Do not strip directory component
- of filename.
-
-Fri Jul 25 15:16:15 1997 Felix Lee <flee@cygnus.com>
-
- * mon960-rom.c: removed unused #includes; no ioctl.h in Windows.
- * nindy-share/ttyflush.c: find sleep() for _MSC_VER.
- * remote-array.c: #include <ctype.h> for isascii().
- * utils.c (notice_quit,pollquit): cleanup. _WIN32 -> _MSC_VER.
-
-Fri Jul 25 16:48:18 1997 Jeffrey A Law (law@cygnus.com)
-
- * top.c (execute_command): Force cleanup of alloca areas.
- * findvar.c (registers_changed): Likewise.
-
-Fri Jul 25 15:37:15 1997 Stu Grossman <grossman@cygnus.com>
-
- * v850ice.c: Include <windows.h>. Support new v850 DLL interface.
- * Add defs for target status.
-
-Tue Jul 22 12:11:48 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * config/mips/tm-mips64.h: longs, long longs, and pointers
- are all 64 bits on EABI mips targets.
-
-Thu Jul 17 11:38:46 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * partial-stab.h (case N_BINCL): detect missing partial symtab.
- * dbxread.c: Add a complaint for N_BINCL without a corresponding
- partial symtab. Remove earlier change of 5/27/97.
-
-Wed Jul 16 10:38:03 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * sol-thread.c (sol_thread_[store, fetch]_registers): if
- inferior_pid is an LWP rather than a Solaris thread, let
- procfs handle the request.
- (rw_common, sol_thread_xfer_memory): procfs_xfer_memory will
- only work if inferior_pid points to an LWP (rather than a
- Solaris thread). Use procfs_first_available to find a good LWP.
- (info_solthreads): added a maintenance command to list all
- known Solaris threads and their attributes.
- * mips-tdep.c (mips_do_registers_info): Completely changed the
- output format to be neat and columnar. Added the helper funcs
- do_fp_register_row and do_gp_register_row. Also small mods to
- mips_print_register, which is still used to print a single reg.
-
-Mon Jul 14 18:02:53 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * procfs.c (wait_fd): Handle an fd that has "hung up" or
- otherwise terminated (Solaris threads).
-
-Thu Jul 10 00:02:41 1997 Martin M. Hunt <hunt@cygnus.com>
-
- * defs.h (init_ui_hook): Change prototype to accept one arg.
- * main.c (gdb_init): Change prototype to accept one arg.
- * top.c (gdb_init): Accepts one argument which it uses to
- call (*init_ui_hook).
-
-Fri Jul 4 14:49:33 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * source.c (OPEN_MODE, FDOPEN_MODE): Define; value depends upon
- whether CRLF_SOURCE_FILES is defined.
- (open_source_file): Use OPEN_MODE with open and openp.
- (print_source_lines): Use FDOPEN_MODE with fdopen. If
- CRLF_SOURCE_FILES is defined, ignore \r characters.
- (forward_search_command): Use FDOPEN_MODE with fdopen.
- (reverse_search_command): Likewise.
- * config/i386/xm-cygwin32.h (CRLF_SOURCE_FILES): Define.
- (LSEEK_NOT_LINEAR): Don't define.
-
-Thu Jul 3 17:41:46 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * mips-tdep.c (mips_extract_return_value): align 4-byte float
- return values within the 8-byte FP register.
-
-Thu Jul 3 13:48:11 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * mips-tdep.c (mips_push_arguments): don't left-adjust 32-bit
- integers in 64-bit register parameters before function calls.
-
-Mon Jun 30 17:54:51 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * mips-tdep.c (mips_push_arguments): special-case handling for
- odd-sized struct parameters passed in registers / on stack.
-
-Mon Jun 30 15:30:38 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * mips-tdep.c (mips_push_arguments): tweak alignment of small
- structs passed in registers for little-endian non-EABI mode.
-
-Mon Jun 30 13:05:39 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * breakpoint.c (frame_in_dummy): use generic dummy if available.
- (check_duplicates, clear_command): compare sections only if
- doing overlay debugging.
-
-Fri Jun 27 23:03:53 1997 Fred Fish <fnf@ninemoons.com>
-
- * buildsym.h (struct subfile): Add debugformat member.
- (record_debugformat): Declare global function.
- * buildsym.c (start_subfile): Initialize debugformat member
- to NULL.
- (record_debugformat): New function to record the format.
- (end_symtab): Copy format into symtab debugformat member.
- (end_symtab): Free subfile debugformat member.
- * symmisc.c (free_symtab): Free debugformat when freeing
- symtab.
- * symfile.c (allocate_symtab): Initialize the new debugformat
- member for new symtabs.
- * symtab.h (struct symtab): Add debugformat member.
- * source.c (source_info): Print the debug format.
-
- * os9kread.c (os9k_process_one_symbol): Call record_debugformat
- with "OS9".
- * hpread.c (hpread_expand_symtab): Call record_debugformat
- with "HP".
- (hpread_process_one_debug_symbol): Ditto.
- * dbxread.c (process_one_symbol): Call record_debugformat
- with "stabs".
- * coffread.c (coff_start_symtab): Call record_debugformat
- with "COFF".
- * xcoffread.c (read_xcoff_symtab): Call record_debugformat
- with "XCOFF".
- * dwarfread.c (read_file_scope): Call record_debugformat
- with "DWARF 1".
- * dwarf2read.c (read_file_scope): Call record_debugformat
- with "DWARF 2".
- * dstread.c (dst_end_symtab): Set debugformat to be
- "Apollo DST".
- * mdebugread.c (new_symtab): Set debugformat to be "ECOFF".
-
-Fri Jun 27 21:05:45 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * mips-tdep.c (mips_push_arguments): handle alignment of
- integer and struct args on stack for mips64 big-endian.
-
-Fri Jun 27 19:19:12 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * config/mips/tm-mips.h (USE_STRUCT_CONVENTION): MIPS_EABI returns
- structs in a register wherever possible.
- * mips-tdep.c (mips_extract_return_value): handle structs.
- (mips_store_return_value): handle values smaller than MIPS_REGSIZE
- (including structs, if gdb ever allows it).
-
-Fri Jun 20 17:58:34 1997 Fred Fish <fnf@cygnus.com>
-
- * sh-tdep.c (sh_skip_prologue): Also recognize fmov insns.
- (sh_frame_find_saved_regs): Recognize fmov insns and adjust
- stack push count accordingly.
- * sh-tdep.c (IS_FMOV, FPSCR_SZ): New defines
-
-Thu Jun 19 08:18:48 1997 Mark Alexander <marka@cygnus.com>
-
- * utils.c (floatformat_from_doublest): Improve test for infinity.
-
-Wed Jun 18 13:47:52 1997 Fred Fish <fnf@cygnus.com>
-
- * dwarfread.c (isreg, optimized_out, offreg, basereg): Move
- global variables into the struct dieinfo structure.
- (locval): Pass pointer to a dieinfo struct rather than a
- pointer to the raw location information. Change prototype.
- Set isreg, optimized_out, offreg and basereg as appropriate.
- (struct_type): Call locval with dieinfo struct pointer.
- (new_symbol): Ditto.
- (new_symbol): Call locval and save location before testing
- the values of the new dieinfo struct flags, set by locval.
-
-Tue Jun 17 13:30:12 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * procfs.c (proc_set_exec_trap, procfs_init_inferior, procfs_wait,
- unconditionally_kill_inferior): Undo Oct 26 1996 and Apr 26 1997
- changes to trace PRFS_STOPTERM and handle PR_DEAD.
- These changes tried to work around a problem with an early DU 4.0
- release, but they trigger subtle timing dependent kernel bugs
- in older OSF/1 releases.
-
-Tue Jun 17 06:52:47 1997 Fred Fish <fnf@cygnus.com>
-
- * dwarfread.c (new_symbol): Use SYMBOL_VALUE_ADDRESS, instead of
- SYMBOL_VALUE, to set the value of LOC_STATIC symbols.
-
-Mon Jun 16 18:38:28 1997 Mark Alexander <marka@cygnus.com>
-
- * infrun.c (wait_for_inferior): Mark registers as invalid when
- stepping over an instruction that triggered a watchpoint.
- * remote-mips.c: Numerous changes to support hardware breakpoints
- and watchpoints on LSI MiniRISC and TinyRISC boards.
- * mips-tdep.c: Move MIPS16-related macros to config/mips/tm-mips.h.
- (mips_breakpoint_from_pc): Account for different breakpoint
- instructions used by PMON and IDT monitor.
- * config/mips/tm-embed.h: Enable hardware breakpoints on embedded
- MIPS targets.
- * config/mips/tm-mips.h: Define breakpoint instructions for
- PMON and IDT monitor. Move MIPS16-related macros here from
- mips-tdep.c.
-
-Fri Jun 13 13:44:47 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * config/mips/tm-tx39[l].h, tx39[l].mt: change r3900 target to tx39.
-
-Fri Jun 13 14:14:10 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-tdep.c (mn10300_analyze_prologue): Fix some comments.
- Add missing return statements after finding an "add imm{16,32},sp"
- instruction.
- (mn10300_frame_chain): Add in size of our register save area to find
- our caller's frame if our caller does not have a frame pointer.
-
-Fri Jun 13 12:55:49 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * symfile.c (generic_load): Check return code of target_write_memory.
-
-Fri Jun 13 10:28:09 1997 Fred Fish <fnf@cygnus.com>
-
- * config/i386/nm-linux.h: Enable prototypes that were #ifdef out.
- * config/tm-sysv4.h (in_plt_section): Add prototype.
-
- * maint.c (maintenance_translate_address): Avoid assignment
- inside if, per GNU coding standards.
- * symfile.c (simple_read_overlay_table): Avoid assignments inside if,
- per GNU coding standards.
-
- * monitor.c (parse_register_dump): Is really a void function.
- Add prototype.
- (monitor_read_memory): Remove unused variable "name".
- (monitor_read_memory): Remove unused variable "regbuf".
- (monitor_open): Remove unused variable "i".
- (get_hex_word): Apparently unused, #if away for now.
- (from_hex): Ditto.
-
- * i386v4-nat.c (supply_fpregset): Remove unused variable "regi".
- (fill_fpregset): Remove unused variables "regi", "to", "from" and
- "registers".
-
- * remote-e7000.c (ctype.h): Include.
- (e7000_insert_breakpoint): #if away unused arg used by unused expr.
- * frame.h (generic_get_saved_register): Add prototype.
- (enum lval_type): Add partial forward decl.
- * dsrec.c (make_srec): Remove unused variable "type_code".
- * remote-sim.c (gdbsim_wait): Handle sim_running and sim_polling
- cases by just ignoring them.
- (command.h): Include.
-
- * java-exp.y (parse_number): Remove unused variable "unsigned_p".
- * java-lang.c (gdbcore.h): Include for prototypes.
- (type_from_class): Remove unused variable "ftype".
- (type_from_class): Remove unused variable "name_length".
- (evaluate_subexp_java): Add default case to handle remaining
- enumerations.
- * java-valprint.c (c-lang.h): Include for prototypes.
-
- * symfile.c (simple_read_overlay_region_table): #if away
- unused function.
- (simple_free_overlay_region_table): Ditto.
- (overlay_is_mapped): Add default case to switch.
- (simple_read_overlay_region_table): Ditto.
- (simple_read_overlay_region_table): Add prototype.
-
- * symtab.c (fixup_symbol_section): Remove unused msym variable.
- (fixup_psymbol_section): Ditto.
- (find_pc_sect_symtab): Make distance a CORE_ADDR.
-
- * utils.c: Add comment about t_addr being either unsigned long or
- unsigned long long.
- (paddr): Change formats to match actual types args are cast to.
- (preg): Ditto.
- (paddr_nz): Ditto.
- (preg_nz): Ditto.
-
- * defs.h (perror_with_name): Is a NORETURN function.
- * utils.c (perror_with_name): Is a NORETURN function.
- (error): Is NORETURN independently of ANSI_PROTOTYPES.
-
- * symtab.c (fixup_symbol_section): Remove prototype.
- * symtab.h: (fixup_symbol_section): Add prototype.
- * m32r-rom.c (report_transfer_performance): Add prototype.
- * sparclet-rom.c: Ditto.
- * dsrec.c: Ditto.
-
- * c-exp.y (parse_number): Cast args to float* or double* as
- appropriate for conversion format.
- * java-exp.y (parse_number): Ditto.
-
- * Makefile.in (c-exp.tab.c): Remove #line lines that refer
- to nonexistant y.tab.c file.
- (java-exp.tab.c): Ditto.
- (f-exp.tab.c): Ditto.
- (m2-exp.tab.c): Ditto.
-
- * sh-tdep.c (symfile.h): Include.
- (gdb_string.h): Include.
- (sh_fix_call_dummy): Ifdef away, currently unused.
- * config/sh/tm-sh.h (pop_frame): Add prototype.
- * config/sh/tm-sh.h (sh_set_processor_type): Add prototype.
-
-Sat Jun 7 02:34:19 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * eval.c (evaluate_subexp_for_sizeof): Handle dereferencing
- of non-pointer values.
-
- * symtab.c (gdb_mangle_name): Improve mangling of nested types,
- their physical names already include the class name.
-
- * valops.c (value_cast): Handle upcast of a class pointer.
-
- From Andreas Schwab (schwab@issan.informatik.uni-dortmund.de):
- * corelow.c (get_core_registers): Make secname big enough.
-
-Fri Jun 6 14:43:23 1997 Keith Seitz <keiths@pizza.cygnus.com>
-
- * config/sh/tm-sh.h: add define for FPSCR_REGNUM
- * sh-tdep.c (sh_show_regs): print out all registers for
- the current processor
-
-Fri Jun 6 13:01:55 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (gdbsim_kill): Remove call to depreciated function
- sim_kill.
-
-Thu Jun 5 11:39:03 1997 Ian Lance Taylor <ian@cygnus.com>
-
- Fixes for recent correction to PE format:
- * coffread.c (pe_file): New static variable.
- (struct find_targ_sec_arg): Change resultp from pointer to int to
- pointer to pointer to asection.
- (find_targ_sec): Just store the section in args->resultp, not the
- section offset value.
- (cs_to_section): Compute the section offset value from the
- section.
- (cs_section_address): New static function.
- (coff_symfile_read): Set pe_file.
- (read_one_sym): When reading a PE file, adjust the symbol value to
- include the section address if the symbol has an appropriate
- storage class.
-
-Tue Jun 3 16:24:46 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * configure.tgt: add mipsr3900-elf target
- * config/mips/r3900.mt r3900l.mt tm-r3900.h tm-r3900l.h: ditto
-
-Tue May 27 10:34:11 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * dbxread.c: Check malloc's return for null, prevent segv.
-
-Fri May 23 14:45:02 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * infcmd.c (jump_command): Don't try to dereference sfn if it's
- NULL.
-
-Fri May 23 13:51:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * top.c (init_cmd_lists): Always initialize endianlist.
- (init_main): Always define endian commands.
- (set_endian_big): Issue warning if endian not selectable.
- (set_endian_little): Ditto.
- (set_endian_auto): Ditto.
-
-Thu May 22 11:53:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (simulator_command): Restrict access to the
- simulator to periods when the simulator is open.
-
-Wed May 21 16:03:25 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * procfs.c (init_procinfo): new function, abstracts some code
- shared by create_procinfo and do_attach;
- (procfs_set_inferior_syscall_traps): new function, abstracts
- some code needed by procfs_init_inferior, do_attach, and
- procfs_lwp_creation_handler; (procfs_first_available): new
- function, find any LWP that's runnable; (procfs_thread_alive):
- replace stub function with real implementation;
- (procfs_lwp_creation_handler): fix bug starting new child
- threads; (info_proc): bug fixes and enhancements for the
- "INFO PROCESSES" command; (close_procinfo_file): call new
- function "delete_thread" to cleanup GDB's thread database;
- (proc_init_failed): add new argument "kill", to control whether
- process is killed (so this function can be shared by
- create_procinfo and do_attach); (procfs_exit_handler): handle
- exit from an attached process, and cleanup procinfo handles
- when the process exits; (procfs_resume, procfs_wait): cleanup
- after a thread when it exits; (do_attach, do_detach): handle
- attached processes with multiple threads; plus some general
- improvements in the diagnostic output.
- * sol-thread.c (sol_thread_alive): replace stub with real
- implementation; (thread_to_lwp, lwp_to_thread): enhance to
- handle threads that may have exited; (sol_thread_attach): add
- startup setup stuff; (sol_thread_detach): add unpush_target
- call; (sol_thread_mourn_inferior): add unpush_target call;
- (sol_thread_wait, sol_thread_resume): enhance to deal with
- thread exit cleanly; (sol_thread_new_objfile,
- sol_thread_pid_to_str): detect unsuccessful startup and
- don't crash; plus some general cleanup.
- * thread.c (delete_thread): new function, allows targets to
- notify gdb when a thread is no longer valid.
- * infrun.c (wait_for_inferior): don't try to detect a new
- thread on receiving a TARGET_EXITED event.
-
-Tue May 20 09:32:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (gdbsim_open): Pass callback struct.
- (init_callbacks): Remove call to sim_set_callbacks.
-
-Thu May 15 07:56:50 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/rs6000/tm-rs6000.h (SIG_FRAME_LR_OFFSET): Define.
- * rs6000-tdep.c (frameless_function_invocation): Mark frames
- with a zero PC as frameless to improve backtraces from core dumps
- caused by dereferencing a NULL function pointer.
- (frameless_function_invocation, frame_saved_pc, rs6000_frame_chain):
- Handle frameless functions interrupted by a signal.
-
- * sparc-tdep.c (sparc_init_extra_frame_info, sparc_frame_saved_pc):
- Handle frameless functions interrupted by a signal.
-
-Wed May 14 08:58:55 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-tdep.c (mn10200_analyze_prologue): Update prologue comments
- to reflect current reality. Gross attempt at handling out of
- line prologues.
-
- * mn10200-tdep.c (mn10200_skip_prologue): Don't look at the debug
- symbols to find the end of the prologue.
- * mn10300-tdep.c (mn10300_skip_prologue): Likewise.
-
-Thu May 8 08:42:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (AC_TYPE_SIGNAL): Add
- * configure: Re-generate.
- * remote-sim.c: Signal returns RETSIGTYPE.
-
-Wed May 7 20:05:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * target.h (target_stop): Drop argument so it can be tested for
- NULL.
-
-Sat May 3 20:51:48 1997 Mark Alexander <marka@cygnus.com>
-
- * utils.c (floatformat_from_doublest): Handle infinity properly.
-
-Thu May 1 11:44:46 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * Finalize merge from Hurd folk.
- Mon Oct 30 16:41:04 1995 Miles Bader <miles@gnu.ai.mit.edu>
- * thread.c (thread_apply_command, thread_apply_all_command,
- thread_command): Make sure TP is alive.
- (thread_alive): New function.
- Tue Nov 14 14:31:03 1995 Miles Bader <miles@gnu.ai.mit.edu>
- * infrun.c (sig_print_info): Deal better with long signal names.
- Wed Nov 22 15:23:35 1995 Miles Bader <miles@gnu.ai.mit.edu>
- * thread.c (thread_id_to_pid): New function.
- Fri Dec 1 13:25:25 1995 Miles Bader <miles@gnu.ai.mit.edu>
- * gnu-nat.c: (set_thread_cmd_list, show_thread_cmd_list,
- set_thread_default_cmd_list, show_thread_default_cmd_list):
- New variables. (set_thread_cmd, show_thread_cmd,
- set_thread_default_cmd, show_thread_default_cmd): New functions.
- Fri Apr 18 15:20:16 1997 Miles Bader <miles@gnu.ai.mit.edu>
- * gnu-nat.c (inf_startup): remove TASK parameter.
- (inf_set_task): replace with new function (inf_set_pid).
- * gdbthread.h: Add extern decl for thread_cmd_list.
-
-Thu May 1 02:28:21 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * printcmd.c (disassemble_command): Adjust low function bound
- by FUNCTION_START_OFFSET.
-
-Mon Apr 28 21:25:32 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * Makefile.in: Add rule for gnu-nat.o and i386gnu-nat.o (Gnu Hurd)
- * config/i386/i386gnu.mh: remove rules for [i386]gnu-nat.o, now
- in Makefile.in (as for other targets); add NATDEPFILE corelow.o to
- satisfy symbol dependancy in solib.c (core_ops).
- * target.[ch] conditionalize Mach-specific signals so that they
- won't show up in non-Mach gdb's!
- * thread.c: change name of static function "thread_switch" to
- "switch_to_thread", to avoid conflict with Mach global symbol;
- move thread_cmd_list to global scope so targets can add their
- own thread commands.
- * infrun.c: sig_print_info: allow for long signal names.
- * gnu-nat.[ch]: tidying up comments.
- * gnu-nat.c: remove calls to prune_threads and renumber_threads;
- gnu_wait must not return -1 when inferior exits;
- attach_to_child will modify inferior_pid in a way that allows
- fork_inferior to remain unchanged; remove extra arg from
- startup_inferior; move Mach thread commands here from thread.c.
-
-Mon Apr 28 18:21:20 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * symtab.c: decode_line_1, replace the assignment to
- values.sals[0].pc which I accidentally left out on 4/3/97.
-
-Mon Apr 28 17:27:40 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * c-exp.y: make parse_number reject "123DEADBEEF".
- (fix by Bob Manson).
- * java-exp.y: Ditto.
- * top.c: change "to enable to enable" to "to enable" in a couple
- of help strings.
-
-Mon Apr 28 09:01:59 1997 Mark Alexander <marka@cygnus.com>
-
- * breakpoint.c (remove_breakpoint): Pass correct type to
- target_remove_watchpoint.
- * target.h: Improve comment for target_{remove,insert}_breakpoint.
-
-Sat Apr 26 03:38:02 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * alpha-tdep.c (heuristic_proc_desc): Increase search limit
- for return address register, handle `ret' instruction.
-
- * corelow.c (get_core_registers): Initialize cf.
-
- * procfs.c: Minor changes to make pre-ANSI compilers happy.
- (procfs_notice_signals): Copy traced signal set back to
- pi->prrun.pr_trace.
- (unconditionally_kill_inferior): If PR_DEAD is defined,
- rerun inferior after killing it.
-
-Fri Apr 25 00:10:18 1997 Jeffrey A Law (law@cygnus.com)
-
- * config/mn10300/tm-mn10300.h (EXTRACT_STRUCT_VALUE_ADDRESS): The
- structure value address is found in $a0 now.
- * config/mn10200/tm-mn10200.h (EXTRACT_STRUCT_VALUE_ADDRESS): Likewise.
-
-Thu Apr 24 13:31:10 1997 Jeffrey A Law (law@cygnus.com)
-
- * config/mn10300/tm-mn10300.h (STORE_RETURN_VALUE): Pointers are
- returned in $a0.
- (EXTRACT_RETURN_VALUE): Likewise.
-
- * mn10300-tdep.c (mn10300_analyze_prologue): Check for a return
- insn at "pc", not "fi->pc".
-
-Wed Apr 23 11:18:45 1997 Jeffrey A Law (law@cygnus.com)
-
- * config/mn10200/tm-mn10200.h (STORE_RETURN_VALUE): Pointers are
- returned in $a0.
- (EXTRACT_RETURN_VALUE): Likewise.
-
-Tue Apr 22 11:58:15 1997 Fred Fish <fnf@cygnus.com>
-
- * config/arm/tm-arm.h (TARGET_DOUBLE_FORMAT): Define to use
- floatformat_ieee_double_littlebyte_bigword for little endian
- target byte order.
- * utils.c (floatformat_to_doublest): Create local preswapped
- copy of input for floatformat_littlebyte_bigword formats.
- (get_field, put_field): Treat floatformat_littlebyte_bigword
- the same as floatformat_little.
- (floatformat_from_doublest): Postswap output words for
- the floatformat_littlebyte_bigwords format.
-
-Tue Apr 22 09:02:10 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * config/alpha/alpha-osf3.mh config/i386/{i386gnu linux}.mh
- config/mips/{embed embed64 embedl embedl64 vr4300 vr4300el vr5000
- vr5000el}.mt config/powerpc/{aix aix4}.mh config/rs6000/{aix
- aix4}.mh config/sh/sh.mt config/sparc/sp64sim.mt:
- config/v850/v850.mt:
- Remove -lm. That's now handled by configure.
-
- * Makefile.in (maintainer-clean): Add distclean to dependencies.
- Remove duplicate rm's of files.
-
-Mon Apr 21 09:49:25 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * remote-pa.c: Remove. It's broken and no longer necessary.
-
- Sat Apr 19 11:56:10 1997 Per Bothner <bothner@deneb.cygnus.com>
-
- * java-exp.y: Combine TRUE and FALSE into BOOLEAN_LITERAL.
- (Avoids name clash with broken AIX header files.)
-
-Sat Apr 19 01:49:37 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * serial.c (serial_log_command): Fix fputs_unfiltered calls.
-
- * config/powerpc/tm-ppc-aix4.h, config/rs6000/tm-rs6000-aix4.h
- (DONT_RELOCATE_SYMFILE_OBJFILE): Removed.
- * xcoffsolib.h (struct vmap): Add new members tvma, toffs and dvma,
- remove tadj.
- * exec.c (bfdsec_to_vmap): Initialize new vmap members, initialize
- tstart and dstart with section VMA.
- * rs6000-nat.c (vmap_symtab): Relocate relative to the VMA in the
- object file.
- (vmap_ldinfo, xcoff_relocate_core): Adjust tstart by section offset
- of the text section, remove DONT_RELOCATE_SYMFILE_OBJFILE hack.
- (vmap_exec): Relocate relative to the VMA in the object file,
- relocate .bss section as well.
- (xcoff_relocate_core): No longer adjust section addresses by VMA.
- * rs6000-tdep.c (find_toc_address): Change type of tocbase
- to CORE_ADDR.
- * xcoffread.c (secnum_to_bfd_section): New routine to get
- BFD section from CS section number.
- (scan_xcoff_symtab): Make toc_offset section relative.
-
- * symtab.c (total_number_of_methods): Avoid core dump if
- baseclass type is still undefined.
-
-Fri Apr 18 17:25:10 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * Makefile.in (SUBDIRS): Add mswin so that make cleanup cleans up
- that directory.
- * defs.h utils.c (error warning): Make message be const.
- * main.c (fputs_unfiltered): Only send gdb_stdout and gdb_stderr
- to hook. Otherwise send it to fputs.
- * monitor.c monitor.h (monitor_get_dev_name): New function. Does
- the obvious.
- * remote-e7000.c: Remove debugify stuff. Change printf, fprintf
- to _filtered forms to make output appear in GUIs. Replace all
- uses of SERIAL_READCHAR with readchar, which has better error
- checking.
- * (e7000_parse_device): Add prototype.
- (readchar): Improve doc. Handle random serial errors.
- (expect): Disable notice_quit code. It's busted. Remove
- serial error handling (it's now handled in readchar). Remove
- remote_debug echoing. That's handled in readchar as well.
- (e7000_parse_device): Remove serial_flag arg. It's not
- necessary.
- (e7000_open): Split into two pieces. Second part is
- e7000_start_remote, and is error protected. Now, when we connect
- to the target, we setup the initial frame and registers so that
- the user gets an immediate indication of where the target is.
- (gch): Remove debug output. That's handled by readchar.
- (e7000_read_inferior_memory): Handle errors better.
- (_initialize_remote_e7000): Get rid of `<xxx>' things from
- command names. They show up when doing completion and confuse
- things horribly.
- * ser-e7kpc.c: Get rid of the DLL's since we can access the device
- directly from Win32s and Win95. Get rid of debugify crud.
- * serial.c: Remove debugify cruft.
- * (serial_logchar serial_log_command serial_write serial_readchar
- serial_send_break serial_close): Merge common functionality into
- serial_logchar. Clean up rest of routines.
- * sparclet-rom.c: Disembowel. Leave only download routine.
- Download routine now switches to remote target automatically.
- * top.c (disconnect): Only define if SIGHUP is defined. Cleans
- up MSVC/Win32 problem.
- * utils.c (gdb_flush): Don't call hook unless it's for gdb_stdout
- or gdb_stderr.
- * config/sh/tm-sh.h: Define TARGET_SH for WinGDB.
- * config/sparc/tm-sparclet.h: Remove override for prompt.
-
-Fri Apr 18 13:38:19 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * remote-sim.c (gdbsim_open): Only pass -E to sim_open if
- TARGET_BYTE ORDER_SELECTABLE.
-
-Fri Apr 18 16:52:41 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (init_callbacks): Initialize poll_quit and magic
- fields of gdb_callback.
- (gdbsim_stop): Add gdbsim_stop to list of supported client
- operations.
- (gdbsim_wait, gdbsim_resume): Move call to sim_resume into
- sim_wait where gdb is in a position to handle a long running
- function.
- (gdbsim_cntrl_c): New function. Wrap the sim_resume call in a
- SIGINT handler.
- (gdb_os_poll_quit): New function. Check for a quit pending on the
- console.
-
-Thu Apr 17 14:30:04 1997 Per Bothner <bothner@deneb.cygnus.com>
-
- * objfiles.c (allocate_objfile): Allow NULL bfd argument.
- * defs.h (enum language): Add language_java.
- * java-exp.y, java-lang.c, java-lang.h, java-valprint.c: New files.
- * Makefile.in: Update for new files.
- * symfile.c (deduce_language_from_filename): Recognize .java.
-
-Thu Apr 17 02:20:23 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r-stub.c (stash_registers): Rewrite.
- (restore_registers): Renamed to restore_and_return.
- (cleanup_stash): New function.
- (process_exception): New function.
- (_catchException*): Rewrite.
-
- * remote-sim.c (gdbsim_load): Update call to sim_load.
- (gdbsim_create_inferior): No longer pass start_address to
- sim_create_inferior.
- (gdbsim_open): Pass endian indicator as arg.
-
-Tue Apr 15 15:31:09 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote.c (get_offsets): Don't use scanf for interpreting
- response to qOffsets.
-
-Tue Apr 15 14:51:04 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbserver/Makefile.in (INSTALL_XFORM): Remove.
- (INSTALL_XFORM1): Remove.
- (install-only): Use $(program_transform_name) directly, rather
- than using $(INSTALL_XFORM) and $(INSTALL_XFORM1).
- (uninstall): Transform name.
-
-Mon Apr 14 17:06:27 1997 Mark Alexander <marka@cygnus.com>
-
- * remote-mips.c (mips_load): Ensure that PC gets updated
- after a load on LSI target.
-
-Mon Apr 14 15:54:51 1997 Geoffrey Noer <noer@pizza.cygnus.com>
-
- * procfs.c (notice_signals): fix typo
-
-Mon Apr 14 16:25:10 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbserver/Makefile.in (INSTALL): Change install.sh to
- install-sh.
-
-Mon Apr 14 11:55:27 1997 Geoffrey Noer <noer@pizza.cygnus.com>
-
- * config/i386/cygwin32.mh: remove -lkernel32 from XM_CLIBS
- since gcc automatically includes it
-
-Thu Apr 10 13:20:53 1997 Geoffrey Noer <noer@cygnus.com>
-
- * procfs.c: Substantial (but incomplete) changes to support
- sysv4.2mp procfs as implemented in UnixWare 2.1. The procinfo
- struct now has substructs like struct flt_ctl instead of
- just a fltset_t and has a ctl_fd, status_fd, as_fd, and
- map_fd instead of a single fd. Non-sysv4.2mp procfs models
- still have the structs and multiple fds, but don't use the
- entire struct and the four fds all point to the same thing.
- We use PROCFS_USE_READ_WRITE to decide whether to talk to
- procfs with reads/writes or use ioctl instead. We use
- HAVE_MULTIPLE_PROC_FDS to determine whether procfs really has
- multiple fds or not. PROC_NAME_FMT is split out into
- CTL_PROC_NAME_FMT, AS_PROC_NAME_FMT, MAP_PROC_NAME_FMT,
- STATUS_PROC_NAME_FMT.
-
- (procfs_notice_signals): now a necessary wrapper around
- (notice_signals): which are the new guts for noticing signals
- (open_proc_file): gets a new flag arg used in sysv4.2mp to
- determine whether or not to attempt to open the ctl_fd.
- (procfs_read_status): new local function, reads procfs status
- (procfs_write_pcwstop): new local function, writes a PCWSTOP
- (procfs_write_pckill): new local function, writes a PCKILL
- (unconditionally_kill_inferior): remove signo since we now
- just call procfs_write_pckill().
- (procfs_xfer_memory): call lseek with SEEK_SET rather than 0
- (proc_iterate_over_mappings): the whole function is ifdefed
- on UNIXWARE to keep things readable.
-
- Expanded the syscall_table to include new potential sysv4.2mp
- members. Note that all ifdefs of UNIXWARE should be eliminated
- if possible or renamed to describe what's being selected for a
- bit better. Sysv4.2mp and IRIX both have SYS_sproc so the
- IRIX specific code now also checks it's not UNIXWARE.
-
- * config/i386/tm-i386v42mp.h: also define HAVE_PSTATUS_T,
- HAVE_NO_PRRUN_T, PROCFS_USE_READ_WRITE, and UNIXWARE
- * config/mips/nm-irix4.h: set CTL_PROC_NAME_FMT et al to
- "/debug/%d" as PROC_NAME_FMT used to be
-
-Wed Apr 9 11:36:14 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-tdep.c: Almost completely rewritten based on mn10200
- port.
- * config/mn10300/tm-mn10300.h: Likewise.
-
-Tue Apr 8 10:45:24 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * config/pa/{hppabsd.mt hppahpux.mt hppaosf.mt}: Remove
- remote-pa.o from TDEPFILES. Nobody uses it, and besides, it's a
- lousy out-of-date clone of remote.c.
-
-Fri Apr 4 08:21:21 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * remote.c: Fix problems realized while showering.
- * (hexnumlen): Add prototype. Use max, not min.
- * (remote_write_bytes remote_read_bytes): Fix max packet size
- calculations to properly account for packet overhead. Also handle
- (probably rare) case where remote_register_buf_size isn't set.
-
- * remote.c: Fix doc for `C' and `S' commands to indicate full
- address.
- * (remote_ops extended_remote_ops remote_desc remote_write_size):
- Make static.
- * (remote_fetch_registers remote_write_bytes remote_read_bytes):
- Record size of response to fetch registers command, use this to
- limit size of memory read and write commands.
- * (push_remote_target): New function to make it possible to have
- another target switch to the remote target.
- * target.h: Add prototype for push_remote_target.
- * sh-tdep.c (sh_frame_find_saved_regs): Fix sign extension bugs
- for hosts which default to unsigned chars (such as SGI's).
- * (_initialize_sh_tdep): Don't set remote_write_size. It's now
- handled automatically in remote.c.
-
-Thu Apr 3 15:10:30 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * blockframe.c: blockvector_for_pc_sect(), block_for_pc_sect(),
- find_pc_sect_function(), find_pc_sect_partial_function(): new
- functions for debugging overlays; pc without section is ambiguous.
- * breakpoint.[ch]: add section pointer to breakpoint struct;
- add section argument to check_duplicates(); check section as well
- as pc in [breakpoint_here_p(), breakpoint_inserted_here_p(),
- breakpoint_thread_match(), bpstat_stop_status()];
- add section argument to describe_other_breakpoints();
- use INIT_SAL() macro to zero-out new sal structures;
- make resolve_sal_pc() fix up the sal's section as well as its pc;
- match on section + pc in clear_command() and delete_breakpoint();
- account for overlay sections in insert_breakpoints(),
- remove_breakpoint() and breakpoint_re_set_one();
- all this to support overlays where a PC is not unique.
- * exec.c: change xfer_memory() to handle overlay sections.
- * findvar.c: change read_var_value() to handle overlay sections.
- * frame.h: declaration for block_for_pc_sect() [blockframe.c].
- * infcmd.c: jump_command() warns against jumping into an overlay
- that's not in memory. Also use INIT_SAL() to initialize sals.
- * infrun.c: wait_for_inferior() sets a flag to invalidate cached
- overlay state information; Also use INIT_SAL() to init sals.
- * m32r-rom.c: modify load routines to use LMA instead of VMA.
- * m32r-stub.c: mask exit value down to 8 bits; screen out any
- memory read/writes in the range 600000 to a00000, and ff680000
- to ff800000 (hangs because nothing is mapped there); fix strcpy().
- * maint.c: maintenance command "translate-address" supports overlays.
- * minsyms.c: lookup_minimal_symbol_by_pc_sect() supports overlays.
- * objfiles.[ch]: add ovly_mapped field to the obj_section struct;
- this constitutes gdb's internal overlay mapping table. Add macro
- ALL_OBJSECTIONS() to loop thru the obj_structs and look at overlays.
- Add function find_pc_sect_section().
- * printcmd.c: modify print_address_symbolic() with overlay smarts;
- modify address_info() with overlay smarts; add function sym_info()
- to support the INFO SYMBOL command (translate address to symbol(s));
- modify disassemble_command() to work on unmapped overlays.
- * source.c: use INIT_SAL() to initialize sals.
- * symfile.[ch]: change generic_load() to use section's LMA address
- instead of VMA address, for overlay sections.
- Add numerous functions for finding a PC's section / overlay,
- translating between VMA and LMA address ranges, determining if an
- overlay section is mapped, etc. Add several user commands for
- overlay debugging. Add support for a "generic" form of automatically
- reading overlay mapping info from the inferior (based on the default
- (simple) overlay manager which Cygnus provides as an example).
- * symtab.[ch]: add functions find_pc_sect_symtab(),
- find_pc_sect_psymtab(), find_pc_sect_psymbol(), find_pc_sect_line()
- for lookup; modify lookup_symbol and decode_line_1() to use them;
- modify find_function_start_sal() to account for overlay sections;
- add macro INIT_SAL() for initializing struct symtab_and_line.
- * target.c: fix a comment in the declaration of target_ops.
-
-Thu Apr 3 10:31:12 1997 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c (mips_in_call_stub, mips_in_return_stub,
- mips_skip_stub, mips_ignore_helper): New functions for dealing
- with MIPS16 call/return thunks.
- (mips_init_frame_pc_first): New function to implement
- INIT_FRAME_PC_FIRST macro; includes code from old macro plus
- new code to skip over MIPS16 thunks.
- (mips_frame_chain): Skip over MIPS16 thunks.
- * config/mips/tm-mips.h (mips_in_call_stub, mips_in_return_stub,
- mips_skip_stub, mips_ignore_helper): Declare.
- (IN_SOLIB_CALL_TRAMPOLINE, IN_SOLIB_RETURN_TRAMPOLINE,
- SKIP_TRAMPOLINE_CODE, IGNORE_HELPER_CALL): New macros that invoke
- the above functions.
- (INIT_FRAME_PC_FIRST): Change to invoke mips_init_frame_pc.
- (mips_init_frame_pc): Declare.
- * infrun.c (wait_for_inferior): Use new IGNORE_HELPER_CALL macro
- to decide if certain library function calls should be ignored.
-
-Wed Apr 2 14:16:51 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * remote-sim.c (gdbsim_open): Check return code from sim_open.
- Update call to sim_open (new arg SIM_OPEN_DEBUG).
-
-Mon Mar 31 14:55:53 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * gdbinit.in: New file.
- * .gdbinit: Remove.
- * configure.in: Generate .gdbinit from gdbinit.in.
- * configure: Rebuild.
-
-Sat Mar 29 13:57:20 1997 Fred Fish <fnf@cygnus.com>
-
- * COPYING: Install new version of file from FSF.
- * copying.c (show_copying_command): Update FSF address.
-
-Fri Mar 28 18:33:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (distclean): Remove .gdbinit.
-
-Fri Mar 28 15:38:04 1997 Mike Meissner <meissner@cygnus.com>
-
- * remote-sim.c (gdb_os_{,e}vprintf_filtered): Change stdarg type
- to va_list from void *, since va_list might not be a pointer
- type.
-
-Thu Mar 27 14:21:46 1997 Mark Alexander <marka@cygnus.com>
-
- * remote-mips.c: Clean up comment and extraneous semicolon
- for mips_monitor_prompt variable.
-
-Thu Mar 27 12:46:58 1997 Mark Alexander <marka@cygnus.com>
-
- * remote-mips.c: Add `set monitor-prompt' command.
-
-Wed Mar 26 06:47:44 1997 Mark Alexander <marka@cygnus.com>
-
- Fix from Peter Schauer:
- * mdebugread.c (parse_procedure): Set address of procedure to
- block start; this fixes problems with shared libraries introduced
- by change of Mar 21.
-
-Mon Mar 24 19:43:16 1997 Geoffrey Noer <noer@cygnus.com>
-
- * symtab.c (find_pc_symtab): change to support the case
- where the objfile is reordered and contains both coff and
- stabs debugging info (continue on if a psymtab isn't found).
-
-Sun Mar 23 16:19:20 1997 Mark Alexander <marka@cygnus.com>
-
- Fixes from Peter Schauer:
- * config/mips/tm-mips.h (REGISTER_CONVERT_TO_TYPE,
- REGISTER_CONVERT_FROM_TYPE): Swap words if target, not host,
- is big-endian and if registers are 32 bits.
- * mips-tdep.c (mips_print_register, mips_extract_return_value,
- mips_store_return_value): Fix floating-point word-order problems on
- little-endian targets introduced by changes of Mar 21.
-
-Sun Mar 23 15:43:27 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote.c (target_resume_hook, target_wait_loop_hook): New
- globals.
- (remote_resume, remote_wait): Use them.
- * d10v-tdep.c: Set the above hooks.
- (tracesource): New GDB variable, controls source display in
- traces.
- (display_trace): Find and display source line if requested.
- (trace_info): Mention empty trace buffer if appropriate.
- (tdisassemble_command): Robustify argument handling.
-
- * configure.host: Remove extra bogus Linux case.
-
-Sat Mar 22 16:41:35 1997 Fred Fish <fnf@cygnus.com>
-
- * remote-sim.c (simulator_command): Add comment about dealing with
- NULL or empty args.
-
-Sat Mar 22 02:48:11 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * c-exp.y (yylex): Handle nested template parameter lists.
- * symtab.c (decode_line_2): Fix test for valid choice number.
-
-Fri Mar 21 19:10:05 1997 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c (mips_push_arguments): On non-EABI architectures,
- copy first two floating point arguments to general registers, so that
- MIPS16 functions will receive the arguments correctly.
- (mips_print_register): Print double registers correctly on
- little-endian hosts.
- (mips_extract_return_value): Return double values correctly
- on little-endian hosts.
-
- * mdebugread.c (parse_procedure): Adjust address of procedure relative
- to address in file descriptor record; this accounts for constant
- strings that may precede functions in the text section. Remove
- now-useless lowest_pdr_addr from argument list and all calls.
-
-Fri Mar 21 15:36:25 1997 Michael Meissner <meissner@cygnus.com>
-
- * configure.tgt (powerpc*-{eabi,linux,sysv,elf}*): Determine
- whether the simulator will be built by whether the Makefile in the
- simulator directory was built.
-
- * configure.in (--enable-sim-powerpc): Delete switch.
- * configure: Regenerate.
-
-Thu Mar 20 20:52:04 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-tdep.c (mn10200_analyze_prologue): Look for save of "a1"
- in the prologue too.
-
- * remote-sim.c (gdb_os_vprintf_filtered): Fix to work with non-ANSI
- compilers.
- (gdb_os_evprintf_filtered): Similarly.
-
-Wed Mar 19 16:13:22 1997 Geoffrey Noer <noer@pizza.cygnus.com>
-
- New UnixWare 2.1 configuration
- * config/i386/i386v42mp.mt: new
- * config/i386/i386v42mp.mh: new
- * config/i386/tm-i386v42mp.h: new
- * config/i386/nm-i386v42mp.h: new
- * configure.tgt: added new entries
- * configure.host: added new entries
-
-Mon Mar 17 17:52:00 1997 J.T. Conklin <jtc@cygnus.com>
-
- * dsrec.c (load_srec): Print leading zeroes when printing section
- addresses.
-
-Mon Mar 17 15:00:16 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
-
- * remote-sim.h: Delete - moved to ../include/remote-sim.h.
-
- * Makefile.in (remote_utils_h): Update path to remote-sim.h.
-
-Fri Mar 7 20:55:28 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
-
- * remote-sim.c (flush_stdout, write_stderr, flush_stderr,
- vprintf_filtered, evprintf_filtered): Callbacks that accept
- varargs.
-
-Sat Mar 15 00:50:46 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * breakpoint.c (insert_breakpoints, watchpoint_check,
- bpstat_stop_status): Do not disable watchpoints going out of scope.
- (insert_breakpoints): Make sure that the current frame is valid
- before calling find_frame_addr_in_frame_chain.
-
- * top.c (setup_user_args): Handle quotes and backslashes.
- (print_gdb_version): Update copyright year.
-
-Fri Mar 14 15:44:03 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (elfread.o): Depend upon elf-bfd.h and elf/mips.h.
-
-Thu Mar 13 22:51:00 1997 Dawn Perchik <dawn@cygnus.com>
-
- * utils.c (pollquit, notice_quit): If _WIN32, limit test for
- cntl-C to wingdb.
- (initialize_utils): If _WIN32, don't call ScreenRows and ScreenCols
- except under wingdb. (Contributed by Martin Hunt).
-
-Thu Mar 13 12:40:49 1997 Tom Tromey <tromey@cygnus.com>
-
- * configure: Regenerated.
- * configure.in: Run AC_CONFIG_AUX_DIR before AC_CANONICAL_SYSTEM.
-
-Thu Mar 13 11:00:22 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * remote-sim.h (sim_state, SIM_DESC): New types.
- (sim_open): Return a `descriptor' as result.
- (*): New argument of descriptor result from sim_open.
- * remote-sim.c (gdbsim_desc): Renamed from gdbsim_open_p.
- (gdbsim_open): Record result of sim_open in gdbsim_desc.
- Pass argv list to sim_open, argv[0] = pseudo program name.
- (*): Pass gdbsim_desc to sim_foo fns.
-
-Wed Mar 12 14:40:06 1997 Tom Tromey <tromey@cygnus.com>
-
- * config.in: Regenerated.
-
- * acconfig.h (START_INFERIOR_TRAPS_EXPECTED, sys_quotactl,
- HAVE_HPUX_THREAD_SUPPORT): Define.
-
-Tue Mar 11 07:25:27 1997 Mark Alexander <marka@cygnus.com>
-
- First cut at supporting simulators in gdbserver:
-
- * configure, configure.in: Allow gdbserver to be configured
- for cross-target environments.
- * gdbserver/Makefile.in: Add simulator support.
- * gdbserver/configure.in: Eliminate assumption that host == target.
- Simplify using gdb/configure.tgt and gdb/configure.host.
- Fix other minor configuration errors.
- * gdbserver/low-sparc.c: Fix compile error.
- * gdbserver/remote-utils.c: Eliminate assumption that registers
- and addresses are four bytes. Fix minor compile errors and warnings.
- * gdbserver/server.c: Rewrite numerous instances of identical code
- for starting inferior processes to call new function start_inferior.
- Eliminate assumption that registers and addresses are four bytes.
- * gdbserver/server.h: Add missing prototypes to eliminate compiler
- warnings.
- * gdbserver/low-sim.c: New file to mate gdbserver with simulators.
- * config/mips/vr5000.mt: Add Vr5000 simulator support to gdbserver.
- * config/i386/linux.mh: Eliminate gdbserver support as a first step
- in moving such support from host to target makefile fragments.
- * config/i386/linux.mt: Move gdbserver support here from linux.mh.
-
-Mon Mar 10 12:27:47 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * symtab.h (INIT_SAL): New macro to initialize symtab_and_line,
- to insure consistant initialization of unused fields to zero.
- * symtab.c: replace initializations of sals with new macro INIT_SAL.
- * breakpoint.c: ditto.
- * infrun.c: ditto.
- * infcmd.c: ditto.
- * source.c: add call to INIT_SAL macro.
-
-Sat Mar 8 00:16:37 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * sparc-tdep.c (isbranch): Always handle v9 branch instructions,
- they might get used on 32 bit targets as well.
-
-Wed Mar 5 19:34:09 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * remote-mips.c (mips_exit_debug): Some IDT boards don't
- send the full exit string.
-
-Wed Mar 5 12:59:27 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-tdep.c (mn10200_push_arguments): Handle new calling
- conventions.
- (mn10200_store_struct_return): Likewise.
-
-Tue Mar 4 10:31:02 1997 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c (mips_fetch_instruction): New function; replace
- common code throughout with calls to it.
- (mips_find_saved_regs): Examine MIPS16 entry instruction to determine
- correct saved addresses of $s0 and $s1.
- (mips_find_saved_regs, mips16_heuristic_proc_desc): Use MIPS_REGSIZE
- instead of hardcoded 4.
- (mips16_skip_prologue): Handle extended instructions correctly.
-
-Mon Mar 3 12:29:20 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * defs.h (LONGEST): Move #ifndef LONGEST to outside.
- Try BFD_HOST_64_BIT if ! CC_HAS_LONG_LONG.
-
-Thu Feb 27 18:54:11 1997 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c (IS_MIPS16_ADDR, MAKE_MIPS16_ADDR, UNMAKE_MIPS16_ADDR):
- New macros for testing, setting, and clearing bit 0 of addresses.
- Change numerous bits of code where bit 0 was being manipulated
- to use these macros.
-
-Thu Feb 27 14:12:41 1997 Mark Alexander <marka@cygnus.com>
-
- * remote-mips.c: Put back the form feeds.
-
-Thu Feb 27 12:04:24 1997 Mark Alexander <marka@cygnus.com>
-
- * remote-mips.c: Remove form feeds (^L) from source.
- (mips_initialize): LSI PMON doesn't support 'set regsize' command.
- (pmon_wait): Don't need to exit and re-enter debug mode on LSI
- PMON after a continue; it causes target program misbehavior.
- (mips_fetch_register): Don't fetch unsupported registers; this
- cuts down on wasted serial traffic.
-
-Thu Feb 27 09:38:16 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * configure.in configure (HPUX/OSF thread support): Enable this
- only when running GCC, since HP's thread header files use ANSI C
- which is not supported by their default compiler.
-
- * configure.host (i[3456]86-*-windows): Disable long long
- support for WinGDB. Add mswin to configdirs.
- * configure.in configure: Move calls to configure.host and
- configure.tgt to the top of configure.in to allow them to set
- config variables before they are referenced.
-
-Tue Feb 25 20:21:52 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.tgt (mips*-*-lnews*): New target.
-
-Mon Feb 24 16:35:00 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-tdep.c (mn10200_analyze_prologue): Don't fix fi->frame
- if we're not the innermost frame. Fix minor typos.
-
-Sat Feb 22 03:39:50 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * stabsread.c (read_type): Fix handling of template names
- with template parameters containing `::'.
-
- * valops.c (search_struct_field, search_struct_method):
- Pass correct valaddr parameter to baseclass_offset.
- Prevent gdb crashes by making sure that the virtual base pointer
- from an user object still points to accessible memory.
-
-Tue Feb 18 13:36:34 1997 Mark Alexander <marka@cygnus.com>
-
- * maint.c: Eliminate -Wall warnings by including some header files.
-
-Tue Feb 18 13:06:30 1997 Mark Alexander <marka@cygnus.com>
-
- * remote-sim.c (init_callbacks): Undo previous change.
-
-Tue Feb 18 11:13:00 1997 Dawn Perchik <dawn@cygnus.com>
-
- * maint.c: Fix dereference of pointer.
- * remote-sim.c: Fix reference of structure member "last_error".
- * debugify.c: Include config.h to get ANSI definitions.
-
-Sat Feb 15 17:43:46 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * remote-vx.c (vx_attach): Remove code added by kung. It made no
- sense.
-
-Fri Feb 14 13:00:07 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * main.c (print_gdb_help): Make static to match declaration.
-
-Thu Feb 13 18:18:18 1997 Dawn Perchik <dawn@cygnus.com>
-
- * remote-e7000.c, ser-e7kpc.c, serial.c: Remove // comments.
-
-Wed Feb 12 15:58:00 1997 Dawn Perchik <dawn@cygnus.com>
-
- * debugify.c, debugify.h: Make safe for non-ansi compilers.
-
-Wed Feb 12 15:30:00 1997 Dawn Perchik <dawn@cygnus.com>
-
- * defs.h: Fix prototypes for new cleanup functions.
-
-Wed Feb 12 15:08:47 1997 Dawn Perchik <dawn@cygnus.com>
-
- * debugify.c, debugify.h: Fix for general gnu use. Remove C++
- comment, add PARAMS, add license info and fix indentation.
-
-Wed Feb 12 14:42:47 1997 Dawn Perchik <dawn@cygnus.com>
-
- * debugify.c, debugify.h: New files. Provide common macros
- for writing debug info to a log file or stdio.
-
-Wed Feb 12 02:44:39 1997 Dawn Perchik <dawn@cygnus.com>
-
- * c-valprint.c (c_val_print): Fix printing for arrays defined
- with 0 length.
-
-Tue Feb 11 22:24:39 1997 Dawn Perchik <dawn@cygnus.com>
-
- * defs.h: Fix cntl-C to read from the Windows message queue.
- Add prototypes for make_final_cleanup (and the other cleanup
- routines.
- * remote-e7000.c: Fix sync code to timeout if unable to sync.
- Change sync code to report status while trying to sync-up
- with hardware. Add debugging output and document.
- * ser-e7kpc.c: Swap order of len & offset to match implementation.
- Add debugging output and document.
- * serial.c: Add debugging output.
- * top.c: Add call to do_final_cleanups.
- Remove conditionals preventing Win32 from getting SIGQUIT.
- * utils.c: (*_cleanup): Modify cleanup routines to accept a cleanup
- chain as a parameter. Extract this generic code from the cleanup
- routines into separate funtions (*_my_cleanup). Keep old
- functionality by passing "cleanup_chain" to the new funtions.
- Define the cleanup chain "final_cleanup_chain" to be a cleanup
- chain which will be executed only when gdb exits. Add functions
- (*_final_cleanup) to match the original (*_cleanup) functions.
- (pollquit, quit, notice_quit): Fix to read cntl-C from the
- Windows message queue.
-
-Tue Feb 11 15:36:31 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r-rom.c: #include <sys/types.h>.
- #ifdef out new load support if wingdb.
- * m32r/tm-m32r.h (TARGET_M32R): Define, for wingdb.
-
-Tue Feb 11 12:28:09 1997 Jeffrey A Law (law@cygnus.com)
-
-
- * config/mn10200/tm-mn10200.h (STORE_STRUCT_RETURN): Fix.
- * mn10200-tdep.c (mn10200_store_struct_return): New function.
-
- * config/mn10200/tm-mn10200.h (EXTRACT_RETURN_VALUE): Fix case when
- extracting a return value from a register pair.
-
- * mn10200-tdep.c (mn10200_push_arguments): Stack only needs to
- be two byte aligned. Round argument sizes up to two byte boundary.
- Write out args in two byte hunks.
- (mn10200_push_return_address): Implement.
- * config/mn10200/tm-mn10200.h (EXTRACT_RETURN_VALUE): Abort for
- structures > 8 bytes (temporary).
- (STORE_RETURN_VALUE): Likewise.
- (CALL_DUMMY): No longer undefine.
- (USE_STRUCT_CONVENTION): Use for args > 8 bytes.
- (REG_STRUCT_HAS_ADDR): Define.
-
-Mon Feb 10 18:35:55 1997 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c (non_heuristic_proc_desc): New function.
- (find_proc_desc): Move non-heuristic proc search code into separate
- function.
- (gdb_print_insn_mips): Use non-heuristic method to find procedure
- descriptor, to avoid prologue examination when disassembling.
- * remote-mips.c: Add support for new "lsi" target (LSI MiniRISC
- aka MicroMeteor board).
- (mips_exit_debug): Prevent protocol reinitialization if an error
- occurs while exiting debug mode.
-
-Mon Feb 10 16:11:57 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10200-tdep.c: Remove lots of debugging printfs, update/improve
- comments, formatting, etc. Plus other minor fixes for problems
- I found during my first pass over the mn10200 port.
- (mn10200_analyze_prologue): New function.
- (mn10200_frame_chain, mn10200_init_extra_frame_info): Use it.
- * config/mn10200/tm-mn10200.h: Lots of updates/improvements to
- comments, formatting, etc. Minor fixes for problems I found during
- my first pass over the mn10200 port.
- (TARGET_*_BIT): Define appropriately for ints, long longs, doubles and
- pointers.
- (REGISTER_VIRTUAL_TYPE): Define as a long.
- (EXTRACT_RETURN_VALUE): Rework to deal with long ints living
- in register pairs.
- (STORE_RETURN_VALUE): Similarly.
-
- * blockframe.c (generic_get_saved_regs): Remove unused variable
- "addr".
- * breakpoint.c (frame_in_dummy): Move struct breakpoint *b decl
- inside #ifdef CALL_DUMMY.
- (watch_command_1): Initialize target_resources_ok.
- * command.c (do_setshow_command): Provide dummy initialization
- for "match".
- * valops.c (find_function_addr): Move function & prototype inside
- #ifdef CALL_DUMMY.
- (value_arg_coerce): Similarly.
- (value_of_variable): Provide dummy initialization of "frame".
-
-Mon Feb 10 07:54:26 1997 Fred Fish <fnf@cygnus.com>
-
- * xcoffread.c (RECORD_MINIMAL_SYMBOL): Add NULL asection* parameter
- to prim_record_minimal_symbol_and_info call that was missed in Jan 3
- change.
- (scan_xcoff_symtab): Ditto.
-
-Sun Feb 09 09:23:26 1997 Mark Alexander <marka@cygnus.com>
-
- * remote-mips.c (common_breakpoint): Prevent 64-bit addresses
- from being sent to 32-bit targets by masking off upper bits.
- * mips-tdep.c (heuristic_proc_start): Mask off upper 32 bits
- of PC on 32-bit targets.
- (mips16_heuristic_proc_desc): Recognize 'addiu s1,sp,n' as a
- frame setup instruction.
- (mips32_heuristic_proc_desc): Fix warning found by gcc -Wall.
- (mips16_skip_prologue): Recognize 'addiu s1,sp,n' as a valid
- prologue instruction. Fix warnings and bugs found by gcc -Wall.
- * buildsym.c (finish_block): Improve handling of overlapping blocks;
- fixes problem on MIPS16 printing function arguments.
-
-Sat Feb 8 01:14:43 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dwarf2read.c (dwarf2_linkage_name): New function to get
- the linkage name of a die from DW_AT_MIPS_linkage_name or
- DW_AT_name.
- (read_func_scope, dwarf2_add_field, dwarf2_add_member_fn,
- new_symbol): Use it instead of accessing DW_AT_name.
- (read_partial_die): Use DW_AT_MIPS_linkage name as name of the
- partial die if present.
- (dwarf2_add_member_fn): Make a copy of physname on the type obstack.
-
-Fri Feb 7 10:06:22 1997 Jeffrey A Law (law@cygnus.com)
-
- * blockframe.c (generic_frame_chain_valid): If the new frame
- is not INNER_THAN the old frame, then it's not valid.
-
-Tue Feb 04 09:04:37 1997 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c (mips16_get_imm): Fix calculation of extended immediate.
- (mips16_heuristic_proc_desc): Recognize jal(x) instruction.
-
-Mon Feb 03 17:57:58 1997 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c (mips16_decode_reg_save): Distinguish between
- sd and sw instructions correctly.
- (heuristic_proc_start): Add support for MIPS16.
- (mips16_get_imm, mips16_heuristic_proc_desc,
- mips32_heuristic_proc_desc): New helper functions for
- heuristic_proc_desc.
- (heuristic_proc_desc): Rewrite and reorganize to support MIPS16.
- (mips_push_arguments): Don't align small arguments in EABI.
- (mips32_skip_prologue): Attempt to shrink code size a little.
-
-Mon Feb 3 11:06:05 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * m32r-stub.c: New -- remote protocol support for M32R cpu.
- * m32r-rom.c: Several experiments with improved download time.
-
-Fri Jan 31 08:26:39 1997 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c (MIPS16_INSTLEN): Define.
- (mips_find_saved_regs): Replace hardcoded 2's with MIPS16_INSTLEN.
- (heuristic_proc_start): Recognize 'entry' pseudo-op as a start
- of function on MIPS16.
- (mips32_skip_prologue, mips16_skip_prologue): New helper functions
- for mips_skip_prologue.
- (mips_skip_prologue): Recognize both 16- and 32-bit prologues.
-
-Wed Jan 29 12:45:54 1997 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/powerpc/ppc{,le}-sim.mt (SIM): Remove the library
- ../sim/common/libcommon.a.
-
-Tue Jan 28 15:54:13 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * blockframe.c: fix a null pointer ref in generic_get_saved_register
-
-Tue Jan 28 15:39:50 1997 Geoffrey Noer <noer@cygnus.com>
-
- * mn10200-tdep.c (mn10200_frame_chain): Get basic backtracing
- working.
-
-Mon Jan 27 14:31:52 1997 Mark Alexander <marka@cygnus.com>
-
-First set of changes for mips16:
- * config/mips/tm-mips.h (MIPS16_BIG_BREAKPOINT,
- MIPS16_LITTLE_BREAKPOINT, BREAKPOINT_FROM_PC): Define.
- (ABOUT_TO_RETURN): Call new function mips_about_to_return.
- (mips_breakpoint_from_pc, mips_about_to_return): Declare.
- * mem-break.c (memory_breakpoint_from_pc): New function.
- (memory_insert_breakpoint, memory_remove_breakpoint): Use
- memory_breakpoint_from_pc to determine breakpoint contents and size.
- * target.h (memory_breakpoint_from_pc): Declare.
- * monitor.c (monitor_insert_breakpoint): Use memory_breakpoint_from_pc
- to determine size of breakpoint instruction.
- * mips-tdep.c (mips32_decode_reg_save, mips16_decode_reg_save):
- New helper functions for mips_find_saved_regs.
- (mips_find_saved_regs): Recognize mips16 prologues.
- (mips_addr_bits_remove): Strip off upper 32 bits of address
- when target CPU is 32 bits but CORE_ADDR is 64 bits.
- (mips_step_skips_delay): No branch delay slot on mips16.
- (gdb_print_insn_mips): Disassemble mips16 code.
- (mips_breakpoint_from_pc, mips_about_to_return): New functions.
-
-Mon Jan 27 10:34:03 1997 Jeffrey A Law (law@cygnus.com)
-
- * tm-mn10200.h (NUM_REGS): Decrease to 12.
- (REGISTER_NAMES): Elimination registers not found on the mn10200.
- (PC_REGNUM, MDR_REGNUM, PSW_REGNUM): Corresponding changes.
- (LIR_REGNUM, LAR_REGNUM): Delete. They don't exist on the mn10200.
-
-Sat Jan 25 00:07:59 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dwarf2read.c: Replace integral tag, name and form fields in
- internal structure definitions with the corresponding enumeration
- types from dwarf2.h. Add default cases to switches on enumerations
- where appropriate.
- Make quoting of string arguments in complaint messages consistent.
- Check for NULL returns from DW_STRING.
- (struct partial_die_info): Add sibling and has_type fields, remove
- unused value field.
- (DW_*): Move access macro definitions near the definition of the
- attribute structure.
- (struct field_info): New structure to pass information about fields
- and member functions between die processing routines.
- (dwarf2_build_psymtabs_hard): Set cu_header_offset.
- (scan_partial_symbols): Do not enter DW_TAG_subprogram dies into
- the partial symbol table if the DW_AT_*_pc attributes are missing.
- Add file scope base type definitions to the partial symbol table.
- Skip over child dies if the die has a sibling attribute.
- (add_partial_symbol): Enter global variables with type attributes
- and without location descriptors into the partial symbol table.
- Store value of DW_TAG_variable dies in the partial symbol table.
- Do not enter global variables into the minimal symbol table.
- Add base type definitions to the partial symbol table.
- (psymtab_to_symtab_1): Use dwarf2_get_pc_bounds to determine highpc.
- (process_die): Move check for DW_AT_low_pc to read_func_scope.
- Add a typedef symbol for base type definitions to the symbol table.
- Ignore DW_TAG_inlined_subroutine tags for now.
- (read_file_scope): Use dwarf2_get_pc_bounds to determine pc bounds.
- (read_func_scope, read_lexical_block_scope): Use dwarf2_get_pc_bounds
- to determine pc bounds, ignore dies with invalid bounds.
- (dwarf2_get_pc_bounds): New routine to extract and validate the
- DW_AT_*_pc attributes of a die.
- (dwarf2_add_field, dwarf2_attach_fields_to_type, skip_member_fn_name,
- dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type):
- New functions to handle fields and member functions.
- (read_structure_scope): Rewritten to use them.
- (read_array_type): Renamed from dwarf_read_array_type.
- Default upper array bound to describe an array with unspecified
- length.
- Create array types in backwards order, as dwarf2 puts out the array
- dimensions from left to right.
- (read_subroutine_type): Handle DW_TAG_unspecified_parameters,
- DW_AT_artificial and DW_AT_prototyped.
- (read_base_type): Make an unsigned type for DW_ATE_boolean.
- Pass objfile to dwarf_base_type.
- (read_partial_die): Use read_attribute to read in the attributes.
- Handle DW_AT_sibling and DW_AT_type.
- Follow references when determining DW_AT_name and DW_AT_external
- attributes of the die.
- Validate DW_AT_*_pc attributes.
- (read_full_die): Use read_attribute to read in the attributes.
- (read_attribute): New function to read an attribute described
- by an abbreviated attribute.
- (new_symbol): Relocate symbol value for DW_TAG_label with baseaddr.
- Do not set SYMBOL_VALUE_ADDRESS for DW_TAG_subprogram,
- SYMBOL_BLOCK_VALUE for the symbol will be set later by finish_block.
- Change symbol class for global variables with a zero valued location
- descriptor to LOC_UNRESOLVED.
- Handle DW_AT_const_value attributes for DW_TAG_variable,
- DW_TAG_formal_parameter and DW_TAG_enumerator.
- Build a typedef symbol for DW_TAG_base_type.
- (dwarf2_const_value): New routine to copy a constant value from an
- attribute to a symbol.
- (dwarf_base_type): Use passed in objfile, not current_objfile
- when calling dwarf2_fundamental_type.
- (dump_die): Use DW_* accessor macros to access values of attributes.
- (decode_locdesc): Handle DW_OP_plus_uconst.
-
-Wed Jan 22 01:31:16 1997 Geoffrey Noer <noer@cygnus.com>
-
- * mn10200-tdep.c: New file.
- * config/mn10200/tm-mn10200.h: New, REGISTER_SIZE is 24 bits not 32,
- SP_REGNUM and FP_REGNUM are different, also no lar or lir.
- * config/mn10200/mn10200.mt: New file.
- * configure.tgt: add mn10200 entry.
-
-Tue Jan 21 18:32:23 1997 Stu Grossman (grossman@lisa.cygnus.com)
-
- * configure.in configure: Check if host has libdl if doing
- Solaris threads.
-
-Tue Jan 21 17:03:26 1997 Geoffrey Noer <noer@cygnus.com>
-
- * mn10300-tdep.c: Wrote/fixed implementations of
- mn10300_frame_chain, mn10300_init_extra_frame_info,
- mn10300_frame_saved_pc
- * config/mn10300/tm-mn10300.h: Redefine INIT_EXTRA_FRAME_INFO
- and INIT_FRAME_PC macros.
-
-Tue Jan 21 17:01:20 1997 Stu Grossman (grossman@lisa.cygnus.com)
-
- * configure.in configure: Check if host has libm. Make sure we
- are using gcc when using the -export-dynamic option. Fixes a
- problem with building under Solaris/SunPro cc.
-
-Mon Jan 20 13:52:13 1997 Mark Alexander <marka@cygnus.com>
-
- * config/mips/{embed,embed64,embedl,embedl64}.mt:
- Link in simulator on MIPS embedded targets.
-
-Sat Jan 18 02:31:29 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * blockframe.c (frameless_look_for_prologue): Mark frames
- with a zero PC as frameless to improve backtraces from core dumps
- caused by dereferencing a NULL function pointer.
-
-Thu Jan 16 14:10:41 1997 Geoffrey Noer <noer@cygnus.com>
-
- * config/mn10300/tm-mn10300.h: fix BREAKPOINT definition.
-
-Tue Jan 14 16:01:06 1997 Geoffrey Noer <noer@cygnus.com>
-
- * mn10300-tdep.c: made a lot more generic, ripping out code
- from copied target (no more mn10300_scan_prologue,
- init_extra_frame_info, and mn10300_fix_call_dummy calls)
- * config/mn10300/tm-mn10300.h: undefine INIT_EXTRA_FRAME_INFO
- and INIT_FRAME_PC macros
-
-Thu Jan 9 11:44:40 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * sparc-tdep.c (sparc_frame_find_saved_regs): Don't use
- FP_REGISTER_BYTES to compute offsets into the saved frame,
- since it fails for SPARC targets configured without any
- FP regs. Instead, use DUMMY_STACK_REG_BUF_SIZE.
-
-Mon Jan 6 11:15:14 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * symtab.c (fixup_symbol_section): Handle NULL symbols without
- crashing.
-
-Fri Jan 3 12:08:16 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * Makefile.in configure configure.in: Remove ENABLE_CLIBS,
- ENABLE_OBS, and THREAD_DB_OBS. These are consolidated into LIBS
- and CONFIG_OBS.
- * configure configure.in: Clean up test cases around thread support.
- * configure.tgt (v850-*-*): Include v850ice.o and v850.lib if
- host is Windows.
- * c-valprint.c ch-valprint.c cp-valprint.c eval.c expprint.c
- printcmd.c valops.c value.h values.c: Add bfd_section arg to
- value_at and value_at_lazy.
- * coffread.c dbxread.c elfread.c mdebugread.c minsyms.c symtab.h:
- Add bfd_section arg to prim_record_minimal_symbol_and_info.
- * corefile.c gdbcore.h printcmd.c valops.c: Use read_memory_section
- instead of read_memory. It takes a bfd_section arg.
- * coffread.c dbxread.c elfread.c gdb-stabs.h objfiles.h: Remove
- unnecessary cast for assignment of struct dbx_symfile_info.
- Struct objfile now uses a real pointer instead of PTR for this
- element.
- * dbxread.c (dbx_symfile_init): Stash bfd section pointers for
- text, data and bss into dbx_symfile_info.
- * exec.c (xfer_memory): Handle transfers for user-specified
- sections.
- * findvar.c (read_var_value locate_var_value): Copy bfd section
- from the symbol to the value.
- * gdb-stabs.h: Add section pointers for text, data and bss
- sections.
- * maint.c (translate address command): Add test code for overlay
- address translation.
- * printcmd.c (do_examine do_one_display): Now takes a bfd section
- arg.
- * (print_formatted x_command): Record current section along with
- current address for repeated commands.
- * sparc-nat.c (fetch_inferior_registers): Change
- target_xfer_memory to target_{read write}_memory to allow changes
- to target_xfer_memory interface for section info.
- * symmisc.c (dump_msymbols print_symbol): Print section
- assocaited with symbol.
- * symtab.c (fixup_symbol_section): New routine to
- add section info to symbols returned by lookup_symbol.
- * symtab.h (struct general_symbol_info): Add bfd section to
- symbols.
- * target.c target.h (target_xfer_memory): Add bfd section to
- args.
- * (target_read_memory_section): New routine to read data from a
- specific section.
- * (target_memory_bfd_section): New global variable to pass bfd
- section in to targets.
- * valarith.c (value_add value_addr value_array): Preserve bfd
- section when computing new value.
- * value.h (struct value): Add bfd section to values.
- * values.c (allocate_value value_copy): Initialize/preserve bfd
- section.
- * (unpack_double): Clean up _MSC_VER conditionals to remove
- duplicate code.
- * v850ice.c: New module to support communication with NEC's
- PC-based ICE.
- * config/v850/tm-v850.h (REGISTER_NAMES): Replace sp, gp, fp, and
- ep names with rxx names. sp and fp are renamed via a different
- mechanism.
-
-Fri Jan 3 14:20:05 1997 Geoffrey Noer <noer@cygnus.com>
-
- * mn10300-tdep.c (mn10300_push_arguments): rewrote,
- also removed code elsewhere that made use of RP_REGNUM.
- * config/mn10300/tm-mn10300.h: ripped out RP_REGNUM, V0_REGNUM,
- ARG0_REGNUM, ARGLAST_REGNUM (all not appropriate for mn10300
- arch.), redefined SAVED_PC_AFTER_CALL, EXTRACT_RETURN_VALUE,
- EXTRACT_STRUCT_VALUE_ADDRESS, STORE_RETURN_VALUE.
-
-For older changes see ChangeLog-96
-
-Local Variables:
-mode: indented-text
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/gdb/gdb/ChangeLog-98 b/contrib/gdb/gdb/ChangeLog-98
deleted file mode 100644
index bd19b49066a5..000000000000
--- a/contrib/gdb/gdb/ChangeLog-98
+++ /dev/null
@@ -1,7122 +0,0 @@
-Thu Dec 31 15:26:13 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * corelow.c (core_ops): Don't initialize statically.
- (init_core_ops): New function, fills in core_ops.
- (_initialize_corelow): Use it.
-
-Thu Dec 31 16:54:30 1998 David Taylor <taylor@texas.cygnus.com>
-
- The following changes were made by
- Elena Zannoni <ezannoni@kwikemart.cygnus.com>
- Edith Epstein <eepstein@sophia.cygnus.com>
- David Taylor <taylor@texas.cygnus.com>
-
- * config/pa/tm-hppa.h (INSTRUCTION_NULLIFIED): Change to read
- nullify instruction bit from IPSW only when we are not in a system
- call.
- (STRCAT_REGISTER, pa_do_strcat_registers_info): Additional
- parameter -- precision.
-
- * Makefile.in (BUILD_TUI): To build the tui, only when configured
- with --enable-tui.
- (YLWRAP): Use ylwrap to avoid problems on systems w/o bison.
- (gdb$(EXEEXT)): Make it dependent on BUILD_TUI.
- (all-tui): Remove dependency from phony target.
- (c-exp.tab.c): Use ylwrap instead of bison.
- (jv-exp.tab.c): Ditto.
- (f-exp.tab.c): Ditto.
- (m2-exp.tab.c): Ditto.
-
- * configure.in (ENABLE_CFLAGS): Define and export BUILD_TUI.
-
- * configure: Regenerated.
-
- * c-typeprint.c (c_type_print_base): Get to the method name by
- skipping over all the namespaces, classes and '::'.
-
- * infcmd.c (run_command): Only call SOLIB_RESTART if it's
- defined.
- (detach_command): Ditto.
-
- * infptrace.c (call_ptrace): Add some debugging code.
-
- * infrun.c (follow_inferior_fork): Only define on HP.
- (wait_for_inferior): Only call SOLIB_IN_DYNAMIC_LINKER if we have
- shared libraries; restore test of IN_SOLIB_DYNSYM_RESOLVE_CODE
- removed by HP.
-
- * Makefile.in (ALLDEPFILES): Add somread.c, hp-psymtab-read.c,
- hp-symtab-read.c.
- (SFILES): Remove the above files
- (COMMON_OBS): Remove somread.o
- (SFILES): Add the tui files to this, so they get
- included in etags tables.
- (all-tui): New rule, which does a recursive make in the tui
- subdir.
- (gdb$(EXEEXT)): Add tui-all to the list of
- dependencies, and add tui/libtui.a to the link list.
- (tui/libtui.a): When recursing, pass down
- ${FLAGS_TO_PASS}. And don't echo the make command. This is
- closer to what the other recursions do.
- (HFILES_NO_SRCDIR) add hpread.h.
- (COMMON_OBS): Add hp-psymtab-read.o, hp-symtab-read.o
- Allow the TUI code to be conditionally enabled.
- (TUI_TARGET, TUI_LIBRARY): New variables, whose values are set by
- the configuration script. They're set to the empty string when
- the TUI isn't enabled.
- (gdb$(GDBEXT)): Use those, instead of referring to tui-all and
- tui/libtui.a directly.
-
- * Makefile.in: Avoid spurious relinking.
- (gdb$(EXEEXT)): Depend on the actual tui library, not on a
- fictitious target. Since the fictitious target never existed, make
- would always relink.
- (tui/libtui.a): Renamed from all-tui. Always recurse to make sure
- the library is up to date.
- (TUI_TARGET): Variable removed; there's no need for it any more.
-
- * Makefile.in: Look for tui include files in the tui source dir.
-
- * Use automake's `aclocal' program to generate aclocal.m4, to allow
- us to use automake macros in configure.in with impunity.
-
- * acconfig.h: Add an entry for the `TUI' symbol.
-
- * acinclude.m4: New file, containing the code from the old
- aclocal.m4. Incorporate (by reference) ../bfd/acinclude.m4, not
- ../bfd/aclocal.m4, since we only want bfd's local macros.
-
- * aclocal.m4: Now automagically generated. Just run aclocal!
-
- * annotate.c (annotate_catchpoint): New function.
-
- * annotate.h: Taking the new includes (symtab.h and gdbtypes.h).
- not taking the ansic C build fix.
- (annotate_catchpoint): Declare.
-
- * blockframe.c (blockvector_for_pc_sect): Check that the end of
- the block is >= to the pc, not just >.
-
- * breakpoint.c (create_temp_exception_breakpoint): #If it out --
- nothing calls it.
- (bpstat_stop_status): Don't call SOLIB_HAVE_LOAD_EVENT if it's not
- defined; don't call SOLIB_HAVE_UNLOAD_EVENT if it's not defined.
- (bpstat_get_triggered_catchpoints): If we don't have shared
- library support, then don't call SOLIB_LOADED_LIBRARY_PATHNAME nor
- SOLIB_UNLOADED_LIBRARY_PATHNAME.
- (watch_command_1): Don't require a run before a watch command
- unless we're on HP [it's an HP OS bug, not a generic limitation]
- (catch_load_command_1): Don't define if no shared libraries.
- (catch_command_1): Don't claim to support fork catchpoints unless
- CHILD_INSERT_FORK_CATCHPOINT is defined, don't claim to support
- vfork catchpoints unless CHILD_INSERT_VFORK_CATCHPOINT is defined,
- don't clain to support shared library load catchpoints if shared
- libraries aren't supported, and don't claim to support exec
- catchpoints unless CHILD_INSERT_EXEC_CATCHPOINT is defined
-
- (bpstat_do_actions): If we just set cmd to NULL, don't then try to
- set it to cmd->next as we'll SEGV.
- (bpstat_do_actions): Simplify significantly. It's
- now almost as simple as before the merge and it no longer has the
- HP bug that breakpoint commands are executed repeatedly.
-
- (break_at_finish_command_1): Rewrite and make sure
- selected_frame points to a frame before using it. Fix string
- termination error.
- (break_at_finish_at_depth_command_1): Ditto.
-
- (can_use_hw_watchpoints): New static variable.
- (read_memory_nobpt): Test for breakpoint type bp_none.
- (insert_breakpoints): Test for breakpoint type bp_catch_exec;
- insure have a current frame before getting the frame address.
- (remove_breakpoints): Check for breakpoints of types bp_none,
- bp_catch_fork, bp_catch_vfork, and bp_catch_exec.
- (bpstat_stop_status): Fix updates of b->hit_count.
- (bpstat_have_active_hw_watchpoints): New function.
- (create_exec_event_watchpoint): New function.
- (watch_command_1): Use can_use_hw_watchpoints.
- (catch_fork_command_1): Change name of function to call from
- target_create_catch_(v)fork_hook to create_(v)fork_even_catchpoint.
- (delete_breakpoint): Test for already deleted breakpoints; add
- support for bp_catch_fork, bp_catch_vfork, and bp_catch_exec
- breakpoints.
- (_initialize_breakpoint): Add can-use-hw-watchpoints to list of
- user settable debugger variables.
-
- (clear_command): When there is no argument
- to the clear command, delete all breakpoints that are hit at
- default line. This will include a breakpoint whose line number
- does not correspond to the default line, but has been set at
- the default address.
-
- (delete_breakpoint): Don't call bpstat_clear_actions, instead
- clear things explicitly; if clearing breakpoint_at, then also
- clear any associated actions so that bpstat_do_actions won't try
- to execute them.
- (_initialize_breakpoint): Fix function name for bx command.
-
- (tbreak_command): Remove static from declaration.
- (maintenance_info_breakpoints): Ditto.
-
- (reattach_breakpoints): New funct definition, used with with
- hardware watchpoints
- (breakpoint_1): Change format and add entries to bptypes[]
- (maintenance_info_breakpoints): Function is no longer static
-
- (_initialize_breakpoint): Removed a comment.
- (exception_catchpoints_are_fragile,
- exception_support_initialized): Define.
- (breakpoint_here_p): Fixed syntax error in conditional
- (disable_watchpoints_before_interactive_call_start): Fixed call to
- check_duplicates. Need a section parameter.
- (enable_watchpoints_after_interactive_call_stop): Fixed call to
- check_duplicates. Need a section parameter.
- (breakpoint_re_set_one): Fixed call to check_duplicates. Need a
- section parameter.
- (delete_command): Fixed syntax error in conditional
- (breakpoint_re_set): Fixed some typos.
-
- (args_for_catchpoint_enable): New type for handling exceptions.
- (current_exception_event): New variable for handling exceptions.
- (insert_breakpoints): Check for additional breakpoint types --
- bp_catch_throw, bp_catch_catch, call_disabled. Also, do some
- additional work to handle an exception catchpoint.
- (remove_breakpoint): There are additional breakpoint types to
- check for: Bp_catch_throw, bp_catch_catch, call_disabled. Also do
- some additional work to remove the exception catchpoints
- (breakpoint_init_inferior): New input parameter. If there are
- exception catchpoints delete them.
- (breakpoint_here_p): There are additional breakpoint enable
- settings to check for: Shlib_disabled, call_disabled
- (breakpoint_thread_match): There are additional breakpoint enable
- settings to check for: Call_disabled
- (ep_is_catchpoint): There are additional breakpoint types to check
- for: Bp_catch_throw, bp_catch_catch
- (ep_is_exception_catchpoint): New function
- (bpstat_find_step_resume_breakpoint): New function
- (bpstat_do_actions): Introduce a local copy of the bpstat
- structure.
- (print_it_normal): There are additional breakpoint types to check
- for: Bp_catch_throw, bp_catch_catch Changeing the control
- structure a bit (adding else ifs) Add code to print out info about
- exceptions.
- (bpstat_stop_status): There are additional breakpoint enable
- settings to check for: Call_disabled. there are additional
- breakpoint types to chack for: Bp_catch_catch and bp_catch_throw.
- Check to see if stopped due to an exception. Minor fixes to the
- catch_errors calls. Make sure to count all encountered
- breakpoints. There was something funky going on previously with
- the counting.
- (bpstat_what): Add cases for new breakpoint types:
- bp_catch_catch, bp_catch_throw.
- (bpstat_get_triggered_catchpoints): Check for new breakpoint types
- : Bp_catch_catch, bp _catch_throw.
- (breakpoint_1): Account for new breakpoint types.
- (describe_other_breakpoints): Account for new breakpoint enable
- setting (call_disabled)
- (check_duplicates): Account for new breakpoint enable setting
- (call_disabled)
- (disable_breakpoints_in_shlibs): New function
- (disable_watchpoints_before_interactive_call_start): New function
- (mention): Account for new breakpoint types.
- (break_command_1): Some additional checking for a valid PC.
- (watch_command_1): Some dditional checking to prevent a watch
- before a run command.
- (ep_parse_optional_filename): Simplified for loop.
- (create_exception_catchpoint): New function
- (cover_target_enable_exception_callback): New function
- (handle_gnu_4_16_catch_command): This used to be thcatch_command_1
- function.e
- (create_temp_exception_breakpoint): New function
- (catch_command_1): Differs from gdb 4.16 and gdb 4.17. Is now
- calling catch_exception_command_1 using the EX_EVENT_CATCH and
- EX_EVENT_THROW values as parameters.
- (clear_command): Additional comments
- (delete_breakpoint): Handle exceptions. Check for additional
- breakpoint enable settings: Shlib_disabled, call_disabled.
- (delete_command): Hp folks are claiming that we should not delete
- shlib_event breakpoints
- (breakpoint_re_set_one): Moved call to check_duplicates. Add new
- breakpoint types to switch statement.
- (breakpoint_re_set_thread): New function
- (enable_command): Account for new breakpoint types.
-
- (insertion_state_t): New enumerated type.
- (remove_breakpoint): New param in funct prototype.
- (insert_breakpoints): Check for bp_catch_fork and bp_catch_vfork.
- (remove_breakpoints): Changed call to remove_breakpoint.
- (detach_breakpoints): New function.
- (remove_breakpoint): New parameter, is. Also changed the
- way b->inserted is set.
- (ep_is_catchpoint): New function.
- (ep_is_shlib_catchpoint): New function.
- (print_it_normal): Check for bp_catch_load, bp_catch_unload,
- bp_catch_fork, bp_catch_vfork, bp_catch_exec. Also new code
- to print out catchpoints properly.
- (bpstat_stop_status): Check for bp_catch_fork, bp_catch_vfork,
- and bp_catch_exec. Also, some code to check for catching a
- shared library load/unload.
- (bpstat_what): Added catch_shlib_event to class enumeration.
- Defined new macro, shlr. Expanded the bpstat_what_main_action
- table. Add cases for bp_catch_load, bp_catch_unload,
- bp_catch_fork, bp_catch_vfork, and bp_catch_exec.
- (bpstat_get_triggered_catchpoints): New function.
- (breakpoint_1): Changes to bptypes definition. Also check for
- bp_catch_load, bp_catch_unload, bp_catch_fork, bp_catch_vfork,
- bp_catch_exec. Similar changes to the switch statement.
- (set_raw_breakpoint): Initialize new breakpoint structure fields.
- dll_pathname, triggered_dll_pathname, forked_inferior_pid,
- exec_pathname.
- (create_solib_load_unload_event_breakpoint): New function.
- (create_solib_load_event_breakpoint): New function.
- (create_solib_unload_event_breakpoint): New function.
- (create_fork_vfork_event_catchpoint): New function.
- (create_fork_event_catchpoint): New function.
- (create_vfork_event_catchpoint): New function.
- (mention): New cases for bp_catch_load, bp_catch_unload,
- bp_catch_fork, bp_catch_vfork, bp_catch_exec.
- (ep_skip_leading_whitespace): New function.
- (ep_find_event_name_end): New function.
- (ep_parse_optional_if_clause): New function.
- (ep_parse_optional_filename): New function.
- (catch_fork_kind): New enumerated type.
- (catch_fork_command_1): New function.
- (catch_exec_command_1): New function.
- (catch_load_command_1): New function.
- (catch_unload_command_1): New function.
- (catch_throw_command_1): New function.
- (catch_command_1): Now calls catch_throw_command_1.
- (tcatch_command): New function.
- (delete_breakpoint): Changed call to remove_breakpoint.
- Also free the new fields in the breakpoint structure.
- (breakpoint_re_set_one): Handle bp_catch_load, bp_catch_unload,
- bp_catch_fork, bp_catch_vfork, bp_catch_exec.
- (disable_command): Handle bp_catch_load, bp_catch_unload,
- bp_catch_fork, bp_catch_vfork, bp_catch_exec.
- (enable_command): Handle bp_catch_load, bp_catch_unload,
- bp_catch_fork, bp_catch_vfork, bp_catch_exec.
- (_initialize_breakpoint): Alter add_com call for catchpoints,
- add add_com call for watchpoints.
-
- * breakpoint.h (enum bptype): New entries bp_catch_catch,
- bp_catch_throw, and bp_none, bp_catch_load, bp_catch_unload,
- bp_catch_fork, bp_catch_vfork,bp_catch_exec. Add declarations for
- new functions bpstat_have_active_hw_watchpoints and
- create_exec_event_catchpoint.
- (tbreak_command): Add prototype.
- (update_breakpoints_after_exec): Add prototype; update comments.
- (reattach_breakpoints): New funct prototype declaration.
- (enable): New enumerated value call_disabled.
- (bpstat_find_step_resume_breakpoint): New funct decl.
- (inf_context): New enumerated type.
- (breakpoint_re_set_thread): New funct decl.
- (breakpoint_init_inferior): New parameter.
- (disable_watchpoints_before_interactive_call_start): New funct decl.
- (enable_watchpoints_after_interactive_call_stop): New funct decl.
- (disable_breakpoints_in_shlibs): New funct decl.
- (struct breakpoint): New fields, dll_pathname,triggered_dll_pathname,
- forked_inferior_pid,exec_pathname BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK.
- (bpstat_get_triggered_catchpoints): New function.
- (detach_breakpoints): New function.
- (create_solib_load_event_breakpoint): New function.
- (create_solib_unload_event_breakpoint) New function.
- (create_fork_event_catchpoint): New function.
- (create_vfork_event_catchpoint): New function.
- (ep_is_catchpoint): New function.
- (ep_is_shlib_catchpoint) New function.
- (enum bpstat_what_main_action): New entry.
-
- * buildsym.c (finish_block): Get rid of processing_hp_compilation;
- handle LOC_INDIRECT case. Set the BLOCK_GCC_COMPILED to the right
- compiler.
- (push_context): Add symbols for parameters to the context_stack.
- (merge_symbol_lists): New function. Merges two symbol lists.
- (struct context_stack): Add new field param.
-
- (processing_hp_compilation): New external var.
-
- * c-exp.y: Use external flag hp_som_som_object_present to decide
- whether code was compiled by HP's compilers. Add two new C++
- tokens for true and false.
- (yylex): Check for template name is done differently for the
- HP/aCC compiler case; change some of the template processing code
- for handling HP aCC templates.
-
- * c-lang.c (c_create_fundamental_type): Added case to handle
- template args. Handle FT_BOOLEAN type. Set no sign flag for
- FT_CHAR.
- (cplus_builtin_types): New structure for c++ builtin types.
- (cplus_language_defn): Use cplus_builtin_types instead of
- c_builtin_types.
-
- * c-typeprint.c (c_type_print_base): Don't print 'privete' label
- for a class if all members are private, similarly don't print
- 'public' for a struct. Add support for sized enums (HP/aCC). get
- rid of the 'static' keyword printed by the demangler for member
- function, when printing the type of a class. 'static' will be
- added by this function. If the demangled name is null, and the
- method is not stubbed, get the signature by looking at the
- information stored in the symbol structure. Remove printing of
- 'const' and 'volatile' keywords for methods. This is now taken
- care as part of the demangled member names.
- (cp_type_print_method_args): New function. To print a C++ method
- arguments and name to the output stream.
-
- (c_type_print_cv_qualifier): New function. Print out "const" and
- "volatile" attributes.
- (c_type_print_varspec_prefix): Print const or volatile qualifiers.
- (c_type_print_args): Print 'void' for c++.
- (c_type_print_varspec_suffix): Print 'void' for a no argument
- function.
- (c_type_print_base): Print const or volatile qualifiers. Do not
- print 'unnamed union' if HP aCC compiler used. Distinguish
- between struct and class based on the DECLARED_TYPE. Handle
- HP/aCC compiler case for not printing vtable. Add Template
- support.
-
- (cp_type_print_derivation_info): Print out 'protected' when
- appropriate. This applies only to HP's compilers, not gcc.
-
- (c_val_print): Added parameter embedded_offset. Add
- embedded_offset to valaddr in function calls; fix calls to
- val_print and cp_print_value_fields. process TYPE_CODE_METHOD as
- well. moved call to check_typedef out of conditional. added
- embedded offset param to val_print call.
-
- (c_value_print): Add new parameter to call to val_print.
- handle pointer to class case. Attempt to
- determine the real type of the object to be printed.
- ensure that const char *, const unsigned char *
- come out without the type but the volatile variants
- and the signed variants don't.
-
- * coff-solib.c (coff_solib_add): Add parameters to call
- to symbol_file_add.
-
- * coff-solib.h: (Solib_REMOVE_INFERIOR_HOOK): New macro. defined
- to 0. functionality not implemented for coff.
- (SOLIB_CREATE_CATCH_LOAD_HOOK): New macro, generate error message
- for coff.
- (SOLIB_CREATE_CATCH_UNLOAD_HOOK): Ditto.
- (SOLIB_HAVE_LOAD_EVENT): Ditto.
- (SOLIB_LOADED_LIBRARY_PATHNAME): Ditto.
- (SOLIB_HAVE_UNLOAD_EVENT): Ditto.
- (SOLIB_UNLOADED_LIBRARY_PATHNAME): Ditto.
- (SOLIB_IN_DYNAMIC_LINKER): Ditto.
- (SOLIB_RESTART): Ditto.
-
- * command.c (find_cmd): New function. (lookup_cmd_1): Call it,
- change parsing if tui_version or xdb_commands is set.
- (_initialize_command): Install new alias if xdb_commands is set.
-
- * complaints.h: Add ifdef...endif pair at beginning and end of file.
-
- * config.in, configure: Regenerated.
-
- * config/pa/hppabsd.mh (NATDEPFILES): Added new files
- hp-psymtab-read.o and hp-symtab-read.o.
- * config/pa/hppahpux.mh (NATDEPFILES): Ditto.
-
- * config/pa/hppahpux.mh (TERMCAP): Use -lHcurses.
- * config/pa/hppaosf.mh (NATDEPFILES): Ditto.
-
- * config/pa/hpux1020.mh (TERMCAP): Use -lHcurses.
- (MH_CFLAGS): New flag, -D__HP_CURSES, this define
- is used by HP's linker to find the correct curses library.
-
- * config/pa/hpux1020.mh: New file.
-
- * config/pa/hpux1020.mt: New file.
-
- * config/pa/hpux1100.mh (TERMCAP): Link against -lcurses, not
- -lHcurses. The latter does not contain mvwaddstr, wscrl, or
- wstbwlmkfzz.
-
- * config/pa/hpux1100.mh (TERMCAP): Use -lHcurses.
- (MH_CFLAGS): New flag, -D__HP_CURSES, this define
- is used by HP's linker to find the correct curses library.
-
- * config/pa/hpux1100.mh (TERMCAP): When hosting on hpux 11.00, use
- -lHcurses rather than -lcurses.
-
- * config/pa/hpux1100.mh: New file.
-
- * config/pa/hpux1100.mt: New file.
-
- * config/pa/nm-hppah.h (CHILD_HAS_SYSCALL_EVENT): New macro
- (CHILD_THREAD_ALIVE): New macro
- (STOPPED_BY_WATCHPOINT): Add a condition to the macro,
- ! stepped_after_stopped_by_watchpoint
- (TARGET_ENABLE_HW_WATCHPOINTS): New macro
- (hppa_enable_hw_watchpoints): New funct decl
- (TARGET_DISABLE_HW_WATCHPOINTS): New macro
- ( hppa_disable_hw_watchpoints): New funct decl
- these are for HP's implementation of fast
- watchpoints (via page protection).
- (target_pid_to_str): New macro, calls hppa_pid_to_str
- (target_tid_to_str): New macro, calls hppa_tid_to_str
-
- * config/pa/nm-hppah.h (CHILD_POST_WAIT): Delete;
- (CHILD_CREATE_CATCH_FORK_HOOK): Replace with
- CHILD_INSERT_FORK_CATCHPOINT and CHILD_REMOVE_FORK_CATCHPOINT.
- (CHILD_CREATE_CATCH_VFORK_HOOK): Replace with
- CHILD_INSERT_VFORK_CATCHPOINT and CHILD_REMOVE_VFORK_CATCHPOINT.
- (CHILD_CAN_FOLLOW_VFORK_PRIOR_TO_EXEC,
- CHILD_INSERT_EXEC_CATCHPOINT, CHILD_REMOVE_EXEC_CATCHPOINT,
- CHILD_HAS_EXECD, CHILD_REPORTED_EXEC_EVENTS_PER_EXEC_CALL,
- CHILD_POST_ATTACH, TARGET_HAS_HARDWARE_WATCHPOINTS,
- TARGET_CAN_USE_HARDWARE_WATCHPOINT,
- TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT,
- TARGET_RANGE_PROFITABLE_FOR_HW_WATCHPOINT, STOPPED_BY_WATCHPOINT,
- HAVE_NONSTEPPABLE_WATCHPOINT, target_insert_watchpoint,
- target_remote_watchpoint): New macros.
-
- * config/pa/nm-hppah.h (CHILD_XFER_MEMORY): Reinsert accidentally
- deleted define.
-
- * config/pa/nm-hppah.h:
- (PREPARE_TO_PROCEED): Defined macro to use
- hppa_prepare_to_proceed.
- (hppa_pid_to_str): Extern decl.
- (hppa_tid_to_str): Extern decl.
- (target_pid_or_tid_to_str): New macro definition.
- (hppa_pid_or_tid_to_str): Extern decl.
- (ENSURE_VFORKING_PARENT_REMAINS_STOPPED): New macro - for
- handling events caused by a call to vfork.
- (hppa_ensure_vforking_parent_remains_stopped): Extern decl.
- (RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK): New macro -
- for handling events caused by a call to vfork.
- (hppa_resume_execd_vforking_child_to_get_parent_vfork): Extern decl.
-
- * config/pa/nm-hppah.h: Fix PREPARE_TO_PROCEED macro.
-
- * config/pa/nm-hppah.h: Fix for gcc compile on HPUX, change
- PT_RDUAREA to PT_RUAREA.
-
- * config/pa/nm-hppah.h: Introduced an HPUXHPPA define.
- A bit of a hack so that I can ifdef some code that
- only works for the HP wildebeest debugger.
-
- * config/pa/nm-hppah.h: Lots of new CHILD_ defines;
- process_event_kind enum.
-
- * config/pa/tm-hppa.h (BREAKPOINT32): New define.
- (CALL_DUMMY_HAS_COMPLETED): New define.
-
- * config/pa/tm-hppa.h (STACK_ALIGN): New macro.
- (NO_EXTRA_ALIGNMENT_NEEDED): New macro.
- (PC_REQUIRES_RUN_BEFORE_USE): New macro.
- (REGISTER_NAMES): Formatting in file changed.
- (CR27_REGNUM): Base register for thread local storage.
- (USE_STRUCT_CONVENTION): New macro used to decide whether
- a function returning a value of type type will
- put it on the stack or into registers (based on the
- PA risc calling conventions).
- (EXTRACT_RETURN_VALUE): Fixed calculation for extracting return value.
- (VALUE_RETURNED_FROM_STACK): New macro.
- (TARGET_READ_PC): Declared the function used in the definition.
- (SKIP_TRAMPOLINE_CODE): Declared the function used in the definition.
- (TARGET_WRITE_PC): Declared the function used in the definition.
- (TARGET_READ_FP): Declared the function used in the definition.
-
- * config/pa/tm-hppa.h (STRCAT_REGISTER): Define macro for
- future use.
- (pa_do_strcat_registers_info): Moved function decl from
- defs.h to this HPUX specific .h file.
-
- * config/pa/tm-hppa.h (USE_STRUCT_CONVENTION): Type_LENGTH returns
- bytes, not bits; fix off by 8 error.
-
- * config/pa/tm-hppa.h:
- New comment for obj_unwind_info definition
- New typedef, obj_private_struct
-
- * config/pa/tm-hppa.h: Delete most target_ macros -- use default
- versions instead; remove extraneous comma from proc_wait macro.
-
- * config/pa/tm-hppa.h: Get rid of macro HP_COMPILED_TARGET.
-
- * config/pa/tm-hppa.h: Removed redefinitions of
- USE_STRUCT_CONVENTION and STACK_ALIGN macros.
-
- * config/pa/tm-hppa.h: Some new definitions
- New macros: Arg0_REGNUM, ARG1_REGNUM, ARG2_REGNUM, ARG3_REGNUM.
- target_pid_to_exec_file, target_acknowledge_forked_child,
- target_create_catch_fork_hook, target_create_catch_vfork_hook,
- target_has_forked, target_has_vforked, require_attach,
- require_detach, proc_wait
- New funct decls: Hppa_pid_to_exec_file,
- hppa_acknowledge_forked_child, hppa_create_catch_fork_hook,
- hppa_create_catch_vfork_hook, hppa_target_has_forked,
- hppa_target_has_vforked, hppa_require_attach,
- hppa_require_detach, process_wait
- (unwind_table_entry): Added comments to describe struct fields.
-
- * config/pa/tm-hppah.h (somsolib.h): Include it.
-
- * config/pa/tm-hppah.h:
- (CHILD_ENABLE_EXCEPTION_CALLBACK): New define
- (CHILD_GET_CURRENT_EXCEPTION_EVENT): New define
-
- * configure.host (hppa-*-hpux10.20, hppa-*-hpux11.0*): New configs.
-
- * configure.in (AC_CHECK_HEADERS): Add check for term.h.
-
- * configure.in: Add an --enable-tui argument.
-
- * configure.in: Construct tui/Makefile from tui/Makefile.in.
-
- * configure.in: Use AM_PROG_CC_STDC. If we have the GUI, then we
- need this to process libgui.h.
-
- * convex-tdep.c (decout): Change FILE to GDB_FILE.
-
- * corefile.c: Include objfiles.h, symfile.h.
- (core_file_command): Attempt to determine the name of the symbol
- file from the core file.
- (read_memory_string): New function.
-
- * corefile.c (core_file_command): Temporary hack to make non-hpux
- work. For, non-hpux, t->to_core_file_to_sym_file does not have a
- reasonable value. No target_ops vector on the stack gives it a
- non-zero value. fix later.
-
- * corelow.c (core_file_to_sym_file): Added new local variable,
- failing command, and do some explicit type castings.
- (core_ops): Add three new fields: to_has_syscall_event,
- to_enable_exception_callback, to_get_current_exception_event.
- Necessary since we still have oldstyle initialization in
- this file
-
- * corelow.c: Include unistd.h
- (core_file_to_sym_file): New function
- (core_file_thread_alive): New function
- (core_ops): Added new target ops vector fields. see below. And
- yes we definitiely need to initialize them here, as long as
- we're using static initialization.
-
- * cxux-nat.c (add_shared_symbol_files): Additonal params for calls
- to symbol_file_add.
-
- * defs.h (gdb_file_isatty): New function decl.
-
- * defs.h (GDB_FILE): If TUI is defined, define a structure rather
- than making this an alias for FILE.
- (gdb_stdout, gdb_stderr): If TUI is defined, then define these
- as pointers to variables of type GDB_FILE rather than making them
- be aliases for stdout and stderr.
-
- * defs.h (TUIDO): Add definition conditionalized on definition
- (or lack thereof) of TUI.
-
- * defs.h (command_class): Add two additional values.
- (precision_type): New enum.
-
- * defs.h (gdb_fclose): Add declaration.
-
- * defs.h (store_address): Change prototype to match function.
-
- * defs.h (tui_version, xdb_commands, dbx_commands): Add decl's.
-
- * defs.h (gdb_file_deallocate): New function declaration
-
- * defs.h:
- (streamtype): New enumerated type to distinguish between
- output to a FILE and output to a buffer.
- (tui_stream): New struct type, named GDB_FILE. Contains,
- streamtype, FILE, buffer, and bufferlength fields.
- (gdb_stdout): Of type GDB_FILE, will pass this around gdb
- rather than stdout.
- (gdb_stderr): Of type GDB_FILE, will pass this around gdb
- rather than stderr.
- (fputs_unfiltered_hook): Change stream parameter from FILE to
- GDB_FILE
- (flush_hook): Change stream parameter from FILE to GDB_FILE
- (gdb_fclose): Fix declaration for gdb_fclose; parameter is now of
- type GDB_FILE **
- (gdb_file_adjust_strbuf): New function declaration. function lives in
- utils.c.
- (gdb_file_init_astring): New function declaration. function lives
- in utils.c
- (gdb_file_get_strbuf): New function declaration. function lives
- in utils.c
-
- * defs.h: Additional include files included when TUI is defined.
-
- * defs.h: Funct decl source_full_path_of.
-
- * demangle.c: Add HP_DEMANGLING_STYLE_STRING.
-
- * demangle.c: Added new demangling style, EDG_DEMANGLING_STYLE_STRING,
- to the demanglers structure. This is for support of
- Kuck & Assoc.'s changes for demangling.
-
- * eval.c (evaluate_subexp_standard): C++ member function changes.
-
- * eval.c (evaluate_subexp_standard): Verify TYPE_TARGET_TYPE is
- non NULL before dereferencing it.
-
- * eval.c (evaluate_subexp_standard): With HP/aCC compiler it is not possible
- to perform inferior calls via function pointers.
- Resolve calls to overloaded functions using find_overload_match.
- We cannot handle HP/aCC pointers to member functions.
- Deal with HP/aCC pointers to members in various kind of expressions.
-
- * f-lang.c (f_printchar): Change FILE to GDB_FILE.
- (f_printstr): Ditto.
- (emit_char): Ditto.
-
- * f-lang.c (f_printstr): Change stdout to gdb_stdout.
-
- * f-typeprint.c (f_print_type): Change FILE to GDB_FILE.
- (f_type_print_varspec_prefix): Ditto.
- (f_type_print_args): Ditto.
- (f_type_print_varspec_suffix): Ditto.
- (print_equivalent_f77_float_type): Ditto.
- (f_type_print_base): Ditto.
-
- * findvar.c (): Hp snapshot 3 changes. (extract_address): Coerce
- return value from extract_unsigned_integer to CORE_ADDR.
- (store_address): Change val from CORE_ADDR to LONGEST; changes to
- support machines where CORE_ADDR and LONGEST are different sizes.
- (get_saved_register): Coerce arg to store_address to LONGEST.
- (read_relative_register_raw_bytes): Cast last arg to
- store_address to LONGEST. (read_register): Cast return from
- extract_address to a CORE_ADDR. (write_register_pid): Change val
- from LONGEST to CORE_ADDR. (read_pc_pid): Save and restore
- inferior_pid if necessary. (write_pc_pid): Ditto.
- (read_var_value): Cast arg to store_address.
-
- * findvar.c (read_relative_register_raw_bytes_for_frame): New
- function.
- (read_relative_register_raw_bytes): Call it.
-
- * findvar.c (symbol_read_needs_frame): Handle LOC_THREAD_LOCAL_STATIC and
- LOC_INDIRECT.
-
- * fork-child.c (fork_inferior): Chenge fifth parameter to be a
- function returning void.
-
- * fork-child.c (fork_inferior): Delete unused variable f.
-
- * fork-child.c:
- (Startup_WITH_SHELL): New macro -- interim fix for a bug
- (breakup_args): New function -- breaks up an argument string into
- an argument suitable for passing into execvp().
- (fork_inferior): Handling problems with starting up gdb with a shell.
- -- again, this appears to be an interim fix.
-
- * fork-child.c:
- (fork_inferior): Added a comment
- (clone_and_follow_inferior): New function.
- (startup_inferior): Minor formatting changes.
-
- * fork-child.c:
- (fork_inferior): Hp change is problematic. The -f option has
- different meanings for different shells. It is particularly
- inappropriate for bourne shells.
-
- * fork-child.c:
- (fork_inferior): Added new parameter, pre_trace_fun.
- pre_trace_fun is a function pointer. For some targets,
- like HPUX, this function gets called to prepare for forking
- a child.
-
- * fork-child.c:
- (fork_inferior): Fixed call to init_trace_fun
-
- * fork-child.c:
- Moved definition of STARTUP_WITH_SHELL to inferior.h
- Added a DEBUGGING macro. Currently set to 0. May remove
- later.
- breakup_args: Add DEBUGGING ifdefs. more sophisticated
- parsing to break up args.
- (fork_inferior): Rename kshell variable to shell. new local
- variable, tryname. Make use of STARTUP_WITH_SHELL macro.
- More error processing if starting up with a shell.
- (startup_inferior): Distinguish between starting up with a shell
- and not doing so.
-
- * gdbthread.h:
- Declarations for load_infrun_state and save_infrun_state take
- an additional parameter.
-
- * gdbthread.h: Note that sometime between gdb 4.16 and 4.17,
- thread.h was renamed gdbthread.h
- (load_infrun_state): Additional parameters
- (store_infrun_state): Additional parameters
-
- * gdbthread.h: Include breakpoint.h
-
- * hp-psymtab-read.c (QUICK_LOOK_UP): Redefine to be 0.
- (hpread_build_psymtabs): Deal with enums.
- (hpread_start_psymtab): Include section offset.
- (hpread_end_psymtab): Take care of offset.
-
- * hp-psymtab-read.c (TRUE): Define.
- (FALSE): Define.
- (file_exists): New function. Checks for existance of file.
- (hpread_pxdb_needed): Rewrite.
- (hpread_quick_traverse): Use correct demangling style.
- Handle F77 case.
- (hpread_get_header): Rewrite.
- (hpread_get_textlow): Add support for DOC_FUNCTION.
- (hpread_build_psymtabs): Make sure we do the right thing
- for pxdb and F77.
-
- * hp-psymtab-read.c (hpread_pxdb_check): Change parenthesis positions.
-
- * hp-psymtab-read.c (hpread_quick_traverse): Compare CORE_ADDR
- variable end_addr to 0 instaed of NULL to get rif of gcc warning.
-
- * hp-psymtab-read.c:
- (Hpread_get_textlow): Added param to function
- Defined convennience macros and some datatypes and variables for
- processing the quick lookup-tables. Looks like the code existed
- before, but has been munged.
- (hpread_pxdb_needed): Major rearrangements of code. Additional local
- variables. Also, more extensive checking for various scenarios:
- debug info for optimized code vs. unoptimized code, pxdb has been
- run vs. pxdb has not been run.
- (VALID_FILE): New macro
- (VALID_MODULE): New macro
- (VALID_PROC): New macro
- (VALID_CLASS): New macro
- (FILE_START): New macro
- (MODULE_START): New macro
- (PROC_START): New macro
- (FILE_END): New macro
- (MODULE_END): New macro
- (PROC_END): New macro
- (FILE_ISYM): New macro
- (MODULE_ISYM): New macro
- (PROC_ISYM): New macro
- (VALID_CURR_FILE): New macro
- (VALID_CURR_MODULE): New macro
- (VALID_CURR_PROC): New macro
- (VALID_CURR_CLASS): New macro
- (CURR_FILE_START): New macro
- (CURR_MODULE_START): New macro
- (CURR_PROC_END): New macro
- (CURR_FILE_ISYM): New macro
- (CURR_MODULE_ISYM): New macro
- (CURR_PROC_ISYM): New macro
- (TELL_OBJFILE): New macro
- (pst_syms_struct): New typedef to keep track of the start/end symbol
- table (LNTT) indices of psymtabs created so far.
- (pst_syms_count): New variable
- (pst_syms_size): New variable
- (told_objfile): New variable
- (init_pst_syms): New function. sets up psymtab symbol index stuff.
- (clear_pst_syms): New function. clean up psymtab symbol index stuff.
- (record_pst_syms): New function. add info about newest psymtab to symbol
- index table.
- (find_next_pst_start): New function. Find a suitable symbol table index.
- (find_next_file_isym): New function
- (find_next_proc_isym): New function
- (find_next_module_isym): New function
- (scan_procs): New function. Scan and record partial symbols for all
- functions starting from specified index and in a specified code range.
- (hpread_quick_traverse: Major rearrangement of code. The function
- now uses all the nifty macros. There are some new local variables.
- Check for EDG_DEMANGLING style. ifdef out some code for handling F77.
- Previously, the function looped over all the modules in the table.
- Now, the function loops over all the files, modules, and procedures.
- With HP aCC and CTTI, it is possible for a compiled object to have a
- file and no module.
- (hpread_build_psymtabs): Added a section of code ifdefed by
- QUICK_LOOK_UP. It check to see whether or not there are any globals
- in the executable. Fix number of params to hpread_start_psymtab call.
- Some changes to the way DNTT_TYPE_MODULE is handled.
- (hpread_get_textlow): Change in signature, minor code changes. The
- function finds the low address associated with a specified symbol.
- In looking for the address for the symbol avoid going of the end of
- the LNTT file.
-
- * hp-psymtab-read.c: Change TRUE to 1 and FALSE to 0. Do some
- reformatting.
-
- * hp-psymtab-read.c: Include demangle.h
- (trans_lang): New function to let gdb know the correct language.
- (hpread_quick_traverse): Use ARM style demangling.
- Demangle procedures names.
- Use gdb language names instead of hp language names.
- Add symbol to list using its demangled name.
-
- * hp-psymtab-read.c: New file.
- (hpread_call_pxdb): New function. Call PXDB to process our file.
- (hpread_pxdb_check): New function. Return TRUE if the file needs
- pre-processing by PXDB and we have thus called PXDB to do this
- processing and the file needs to be re-loaded.
- (hpread_quick_traverse): New function. Traverse the quick look-up
- tables, building a set of psymtabs.
- (hpread_get_header): New function. Get appropriate header from obj
- file, based on pxdb type
- (hpread_symfile_init): No change from hpread.c
- (hpread_build_psymtabs): If there are quick lookup tables, read those,
- then scan the global section LNTT. Otherwise, just scan the whole LNTT.
- Changed: Add a global function entry to the global partial symbol list.
- Handle end of symbols, for QLT case.
- In case of TAGDEF, if it is a class or a template, add the name to the
- var_namespace, so that it is known as a type by gdb.
- In case of CONSTANT, and it is global, add it to the globals.
- (hpread_symfile_finish): No change from hpread.c
- (hpread_get_lntt): Make it not static
- (hpread_get_gntt): No change from hpread.c
- (hpread_get_slt): Make it not static
- (hpread_get_textlow): No change from hpread.c
- (hpread_start_psymtab): No change from hpread.c
- (hpread_end_psymtab): No change from hpread.c
-
- * hp-symtab-read.c (hpread_get_scope_start): Renamed. It was
- hpread_get_depth.
- (hpread_type_translate): Distinguish between signed and unsigned char
- types.
- (hpread_psymtab_to_symtab): Set flag for hp compilation.
- (hpread_read_function_type): Append symbols for parameters to local
- list as well as to the global list. Get the parameters types from the
- local list instead of the global list.
- (hpread_read_struct_type): Add new field num_fn_fields to next_fn_field
- structure. Rewrite handling of templates
- (hpread_type_lookup): Change handling of dntt_type_modifier.
- (hpread_process_one_debug_symbol): Call hpread_get_scope_start instea
- of hpread_get_depth. Handle enum as well.
- (hpread_get_scope_depth): New function. Get nesting depth for a
- DNTT entry.
-
- * hp-symtab-read.c (hpread_psymtab_to_symtab): Set
- processing_gcc_compilation to 0.
-
- * hp-symtab-read.c (hpread_psymtab_to_symtab_1): Change stdout to
- gdb_stdout; change fflush to gdb_flush.
- (hpread_psymtab_to_symtab): Change fflush to gdb_flush.
-
- * hp-symtab-read.c (hpread_read_enum_type): Declare variable.
- (hpread_read_struct_type): Eliminate references
- to 'args' member of fn_field.
-
- * hp-symtab-read.c (hpread_read_struct_type): A static member
- is now indicated by the bitsize field, not the bitpos.
- Initialize physname to empty.
- (fix_static_member_physnames): Use new macros to deal with
- physnames.
-
- * hp-symtab-read.c (hpread_read_struct_type): Change references
- to bitpos member of struct field to use the FIELD_BITPOS macro.
-
- * hp-symtab-read.c (hpread_read_struct_type): Comment out reference to
- obsolete field fn_field.args.
- Add struct complaint definitions for complaints.
- (hpread_read_struct_type): Change call to complain.
- (hpread_read_array_type): Change call to complain.
- (hpread_type_lookup): Change call to complain.
- (hpread_process_one_debug_symbol): Change calls to complain.
- (hpread_type_translate): Change calls to complain.
-
- * hp-symtab-read.c (hpread_read_struct_type): Make sure bitvector
- has been allocated before calling has_vtable.
-
- * hp-symtab-read.c (hpread_read_struct_type): Revert change,
- just check for vtable without checking for bitvectors too.
-
- * hp-symtab-read.c:
- (Hpread_expand_symtab): Change name of local variable from
- at_end_of_module to at_module_boundary.
- Also, if demangling style is already EDG, do not reset it
- to the HP demangling style.
- Change at_end_of_module param to hpread_process_one_debug_symbol
- call to at_module_boundary.
- No longer break out of loop when reach end of module. With CTTI,
- the compiler can generate function symbols which are not in
- any module. Typically they show up after the end of one
- module and before the start of the next module.
- (hpread_read_struct_type): Check that the debug info for
- a TEMPLATE_ARG is correct.
- (hpread_process_one_debug_symbol): Change name of at_end_of_module_p
- param to at_module_boundary_p.
- Also set *at_module_boundary_p = -1 if missing a module end and set
- it to 1 when finished expanding the debug info.
- Handle TLS variable.
-
- * hp-symtab-read.c: Include defs.h, symtab.h, gdbtypes.h, complaints.h.
- (fixup_class): New static variable.
- (fixup_method): New static variable.
- (hpread_get_location): Rewrite.
- (hpread_has_name): Add cases for DNTT_TYPE_DOC_FUNCTION and
- DNTT_TYPE_DOC_MEMFUNC
- (hpread_expand_symtab): Use HP demangling style.
- Set hp_som_som_object_present to 1.
- (hpread_type_translate): Error out if not immediate. Issue warning
- if there is an unhandled type code.
- (error_in_hpread_type_translate_complaint): Remove this structure.
- (hpread_read_enum_type): Don't assume size of enum is always 4 bytes.
- (hpread_read_function_type): Add new parameter to indicate a new block.
- Do not add the parameters to the symbol list.
- If the type was read in earlier, do not modify the type structure.
- If we are creating a new block, set the local symbol list to be the
- param list.
- Need to mark this type as preprocessed.
- (hpread_read_doc_function_type): New function. Read and internalize
- a native DOC function debug symbol.
- (hpread_read_struct_type): A method can be of type doc_function and
- doc_memfunc too.
- Handle case in which a method is read before its class. Deal with
- incomplete method types.
- Handle cases in which HP/aCC compiler creates operator names w/o
- the 'operator' keyword. Rewrite the loop over the fileds.
- (fix_static_member_physnames): New function. Adjust the physnames for
- each static member.
- (fixup_class_method_type): New function. Fix-up the type structure for a
- class.
- (hpread_read_array_type): Change complaint to warning.
- (hpread_type_lookup): Add case for DNTT_TYPE_DOC_FUNCTION.
- For structures/classes set static member to point to strings with full
- names.
- Change calls to hpread_read_function_type to pass extra parameter.
- (hpread_record_lines): Handle case for SLT_NORMAL_OFFSET.
- (class_of): New function. Given a function "f" which is a member of a class,
- find the classname that it is a member of.
- (hpread_process_one_debug_symbol): Deal with possible alias field from the
- som record for the Function or Entry type.
- Do the demangling ourselves if the gdb demangler failed.
- Add support for DOC functions.
- For function types, add parameters to local list.
- (hpread_get_scope_depth): Make this function a no-op.
- (hpread_adjust_bitoffsets): New function. Adjust the bitoffsets for all
- fields of an anonymous union.
- (hpread_get_next_skip_over_anon_unions): New function. Skip over anonymous
- unions.
-
- * hp-symtab-read.c: Include demangle.h
- (hpread_expand_symtab): Ensure we are using ARM-style demangling.
- (hpread_process_one_debug_symbol): Set the mangled and demangled
- names for functions.
- Record the class name to generate the demangled names of member
- functions.
-
- * hp-symtab-read.c: New file.
- (hpread_get_depth): No change from hpread.c
- (hpread_get_line): No change from hpread.c
- (hpread_get_location): No change from hpread.c
- (hpread_has_name): Make it not static. Return 1 for DNTT_TYPE_BLOCKDATA
- and DNTT_TYPE_MEMFUNC. Return 0 for CLASS_SCOPE, REFERENCE,PTRMEM,
- PTRMEMFUNC, CLASS, GENFIELD, VFUNC, MEMACCESS, INHERITANCE,
- FRIEND_CLASS, FRIEND_FUNC, MODIFIER, OBJECT_ID, TEMPLATE, TEMPLATE_ARG,
- FUNC_TEMPLATE, LINK.
- (hpread_psymtab_to_symtab_1): No changes from hpread.c
- (hpread_psymtab_to_symtab): Make it a static function
- (hpread_expand_symtab): Modified
- (hpread_type_translate): If not typep.dntti.immediate do not abort,
- but complain and return. Same for default action. Handle more HP_TYPEs.
- (hpread_lookup_type): Initially allocate a correct-size type-vector.
- (hpread_alloc_type): Reset type_addr only if a type was allocated.
- (hpread_read_enum_type): If this has already a type associated, return.
- (hpread_read_function_type): Do different things depending on whether
- function is a MEMFUNC, a TEMPLATE, a FUNCTION som record.
- Do not use the LOC_REGPARM_ADDR symbol class.
- (hpread_read_struct_type): Handle classes and templates too. Major
- rewrite.
- (hpread_get_nth_template_arg): New function.
- (hpread_read_templ_arg_type): New function.
- (hpread_read_set_type): No change from hpread.c
- (hpread_read_array_type): Modified
- (hpread_read_subrange_type): Add handling of more DNTT entries.
- added support for templates, classes, references, virtual functions.
- (hpread_type_lookup): Handle DNNT_TYPE_MODULE.
- (hpread_record_lines): No changes from hpread.c
- (hpread_process_one_debug_symbol): Handle WITH, COMMON,
- CLASS_SCOPE. Expand TAGDEF case to handle classes and templates.
-
- * hppa-tdep.c (pa_do_strcat_registers_info): Has a new parameter,
- precision, which is passed into the call to pa_strcat_fp_reg to
- indicate whether to display the floating point registers using
- single or double preceision.
- (pa_strcat_registers): Introduce local variable, precision, and
- pass it into call to pa_strcat_fp_reg.
- (pa_strcat_fp_reg): Modified function. New parameter, precision,
- used by function to decide whether to use single or double
- precision. Also added the code to put a double precision value
- into a buffer.
-
- * hppa-tdep.c: Add'l includes <machine/save_state.h>,
- <unistd.h>, declare pa_register_look_aside, define is_pa_2.
- (rp_saved): Check for where to read the return pointer from.
- (pa_do_registers_info): Handle is_pa_2. (pa_register_look_aside):
- new function. (pa_print_registers): Handle is_pa_2.
- (in_solib_call_trampoline): Handle a compiler/linker error.
- (skip_trampoline_code): Changes to some masks used in examining
- instructions. (inst_saves_fr): Test for FSTWS instruction.
- (skip_prologue): Renamed to skip_prologue_hard_way.
- (after_prologue): New function. (skip_prologue): New function.
-
- * hppa-tdep.c (after_prologue): If f is NULL, don't dereference
- it.
-
- * hppa-tdep.c (after_prologue): If no debug info, return zero
- telling caller that we need to find the end of the prologue via
- the hard way (instruction examination).
-
- * hppa-tdep.c (find_unwind_entry): Avoid dereferencing a null
- pointer.
-
- * hppa-tdep.c (hppa_pid_to_exec_file): Deleted -- no longer used.
-
- * hppa-tdep.c (hppa_prepare_to_proceeed): Add prototype.
- (read_unwind_info): Purecov comments, bug fixes.
- (find_unwind_entry): Purecov comments, bug fixes.
- (find_stub_with_shl_get): Purecov comments.
- (frame_chain): Additional parens.
- (hppa_push_arguments): Changes to commented out version of routine.
- (hppa_fix_call_dummy): Purecov comments, fix location of end.o.
- (in_solib_call_trampoline): Purecov comments.
- (in_solib_return_trampoline): Purecov comments.
- (setup_d_pid_in_inferior): Fix location of end.o.
- (initialize_hp_cxx_exception_support): Fix location of end.o.
- (child_enable_exception_callback): Purecov comments.
-
- * hppa-tdep.c:
- (Pa_do_strcat_registers_info): New routine. called by
- tui/tuiRegs.c:_tuiRegisterFormat to place a register name
- and value into a string buffer. Interface may change in
- future. Checking this in so that we have something
- functional for HP.
- (pa_strcat_registers): New routine, called by
- pa_do_strcat_registers_info. Does same thing as
- pa_print_registers except it takes a stream parameter.
- This routine should disappear in future. Checking in
- so that we have something functional to give HP
- (pa_strcat_fp_reg): New routine, called by
- pa_do_strcat_registers_info and pa_strvat_registers
- to place a floating point register name and value into
- a buffer. This interface may change in future.
- Checking in so that we have something functional to give HP.
-
- * hppa-tdep.c: (Pa_print_fp_reg): Change prototype to match def'n.
- (pa_register_look_aside): Fix comment immediately before function.
-
- * hppa-tdep.c: Changes to better support stack unwinding,
- reading and writing registers for HPUX. The HP folks had
- an advantage ... access to a runtime architecture spec ;-}.
- New includes: Ptrace.h
- (internalize_unwinds): Initialize new fields in table.
- (read_unwind_info): Entries in the table are now more complex
- structures. References of the form ...->table[index].stub_type
- are now ...->table[index].stub_unwind.stub_type.
- (find_proc_framesize): Added a check for pc == 0.
- (rp_saved): Entries in the table are now more complex
- structures. References of the form ...->table[index].stub_type
- are now ...->table[index].stub_unwind.stub_type.
- (frameless_function_invocation): Stub_type becomes
- stub_unwind.stub_type
- (saved_pc_after_call): Stub_type becomes stub_unwind.stub_type
- (hppa_frame_saved_pc): Stub_type becomes stub_unwind.stub_type
- (frame_chain_valid): Stub_type becomes stub_unwind.stub_type
- (hppa_call_dummy): Stub_type becomes stub_unwind.stub_type
- (pa_print_fp_reg): Additional params to call val_print
- (in_solib_call_trampoline): Stub_type becomes stub_unwind.stub_type
- (in_solib_return_trampoline): Stub_type becomes stub_unwind.stub_typ
- (skip_trampoline_code): Additional code to handle external
- dyncalls. Also stub_type becomes stub_unwind.stub_type
- (hppa_pid_to_exec_file): New funct. FOr HPUX 10.0 and beyond there
- is an explicit ptrace request for getting the pathname associated
- with a process id (pid).
-
- * hppa-tdep.c: Fix for gcc compile on HPUX
- (hppa_pid_to_exec_file): Remove unwanted param from
- call to call_ptrace. Note, hppa_pid_to_exec_file goes
- away in subsequent hp snapshots.
-
- * hppa-tdep.c: Include bfd.h.
- include dl.h
- (args_for_find_stub): New structure.
- (find_unwind_entry): Deal with null input pc value.
- (rp_saved): Ditto.
- For the import stub, return -24 always.
- (hppa_frame_saved_pc): Save old pc value, to detect we are in a loop.
- (init_extra_frame_info): Use TARGET_READ_FP.
- (frame_chain): Include thread support.
- If the caller's pc is zero, we loose and return, just like stack bottom.
- Disable warning about being unable to find unwind info.
- (hppa_push_arguments): Rewrite.
- (hppa_value_returned_from_stack): New function. Handles returning a value
- larger that 64 bits, stored on the stack.
- (find_stub_with_shl_get): New function. To look up symbols in shlibs.
- (cover_find_stub_with_shl_get): New function. Cover routine for
- find_stub_with_shl_get to pass to catch_errors.
- (hppa_fix_call_dummy): Comment out old stub mechanism. Rewrite using dyncall.
- (target_read_fp): New function.
- (pa_do_registers_info): Floating point registers start at FP4.
- (pa_print_registers): Use FP4_REGNUM instead of 72.
- (skip_trampoline_code): Do machine instruction matching for PA2.0.
- (setup_d_pid_in_inferior): New function. Exception handling support.
- (initialize_hp_cxx_exception_support): Ditto.
- (child_enable_exception_callback): Ditto.
- (child_get_current_exception_event): Ditto.
-
- * hppah-nat.c (child_post_wait, child_post_follow_vfork,
- child_post_follow_inferior_by_clone): New functions.
-
- * hppah-nat.c (child_xfer_memory): Make sure the call to ptrace really
- fails before we give up.
- (hppa_pid_to_str): New function. Format a process id.
- (hppa_tid_to_str): New function. Format a thread id.
-
- * hppah-nat.c (child_xfer_memory): Use xmalloc, not alloca.
- (child_post_wait): Delete.
- (child_post_follow_vfork): Delete decl of child_ops; delete
- large chunks of function -- let it be handled by the normal
- mechanism that notices and handles exec events, in resume().
-
- * hppah-nat.c (require_notification_of_exec_events): New function;
- just notify of exec events, not all events, and just the specified
- pid, don't include it's children (10.20 version).
- (child_acknowledge_created_inferior): Call new function
- require_notification_of_exec_events instead of
- require_notification_of_events.
-
- * hppah-nat.c [!GDB_NATIVE_HPUX_11]: Move HPUX 10.x-specific
- support code here from infptrace.c.
-
- * hppah-nat.c: Removed #define ptrace call_ptrace
- replaced all calls to ptrace with calls to call_ptrace
- (parent_attach_all): Removed call to ptrace
-
- * hpread.c (hpread_psymtab_to_symtab_1): Change fflush to
- gdb_flush; change stdout to gdb_stdout.
- (hpread_psymtab_to_symtab): Change fflush to gdb_flush.
-
- * hpread.h: New file. Includes all includes, struct defs, defines
- from hpread.c.
-
- * infcmd.c
- (attach_command): New local variable, exec_file, added code to
- determine exec_file from pid if exec_file is not already known,
- call new target operation, target_post_attach -- a no-op unless
- on HPUXHPPA
- (detach_command): After detaching, do a SOLIB_RESTART
-
- * infcmd.c (objfiles.h): Fix typo on include line.
-
- * infcmd.c (run_command): Only call SOLIB_RESTART if it's
- defined.
- (detach_command): Ditto.
-
- * infcmd.c:
- (run_stack_dummy): Add calls to
- disable_watchpoints_before_interactive_call_start and
- enable_watchpoints_after_interactive_call_stops
- (finish_command): Alter code handling the evaluation and printing
- of the target function's return value.
- (attach_command): When given a pid, but no exec file, try to determine
- the exec file from the process. If the process does not record a
- full path name, try to qualify the filename against the source path.
- (_initialize_infcmd): Add some verbiage about how to use the attach command
-
- * infcmd.c:
- Include objfiles.h
- (run_command): If program has already been started, and decide
- to restart it, then kill the target, flush the caches,
- call init_wait_for_inferior. Also purge old solib objfiles.
-
- * infcmd.c: Changed calls to val_print, using a new macro,
- SOLIB_RESTART
- (run_command): Calls SOLIB_RESTART
- (do_registers_info): Changed calls to val_print
-
- * infcmd.c: Made the symfile.h include preceed the
- objfiles.h include. The other ordering caused a
- compile problem (incompletely defined types).
-
- * inferior.h (REQUIRE_DETACH): Fix default definition.
- * inftarg.c (child_post_attach): Fix declaration, make static.
- (proc_wait): Make globally visible.
- (child_insert_fork_catchpoint, etc): Fix return type.
-
- * inferior.h (STARTUP_WITH_SHELL): New define.
- (START_INFERIOR_TRAPS_EXPECTED): New define
-
- * inferior.h (fork_inferior): Change fifth parameter to be a function
- returning void.
-
- * inferior.h (proc_wait): Declare.
-
- * inferior.h:
- (Require_ATTACH): New macro
- (REQUIRE_DETACH): New macro
- (detach): Definition is now an extern
- (clone_and_follow_inferior): New definition, it's also an extern
-
- * inferior.h:
- (Require_attach): Default definition for require_attach funct
- (require_detach): Default definition for require_detach funct
- (pre_fork_inferior): New funct decl for function defined in
- infptrace.c
- (fork_inferior): New parameter in funct decl.
-
- * inferior.h:
- New variable decls: Inferior_ignoring_startup_exec_events,
- inferior_ignoring_leading_exec_events -- these variables
- are used when processing an exec call.
- (CALL_DUMMY_HAS_COMPLETED): New default macro -- for targets
- where PC in call dummy implies that call dummy has
- completed. Note, that on HPUX this inference does not hold.
-
- * infptrace.c
- (require_notification_of_events): New function
- (child_acknowledge_created_inferior): Previously named
- hppa_acknowledge_forked_child. Also calling
- require_notification_of_events and clearing some semaphore
- variables
- (child_post_startup_inferior): New function
- (child_create_catch_fork_hook): Previously named
- hppa_create_catch_fork_hook
- (child_create_catch_vfork_hook): Previously named
- hppa_create_catch_vfork_hook
- (child_has_forked): Previously named hppa_target_has_forked
- (child_has_vforked): Previously named hppa_target_has_vforked
- (process_wait): Changed to call target_post_wait
- (attach): Add call to require_notification_of_events
- (child_pid_to_exec_file): New function
- (hppa_require_attach): New local variable, pt_status
- (hppa_get_process_events): New function
-
- * infptrace.c (call_ptrace): Simplify control flow.
- (proc_wait): Move here from inftarg.c, add target_post_wait call.
-
- * infptrace.c (call_ptrace): Add some debugging code.
-
- * infptrace.c (child_pid_to_exec_file): Declare variable.
-
- * infptrace.c (kill_inferior): Clean up call to proc_wait.
-
- * infptrace.c:
- (Call_ptrace): When the ptrace request is PT_SETTRC,
- call ptrace and then call parent_attach_all.
-
- * infptrace.c:
- (Child_has_syscall_event): New function. only applicable
- (for now) on HPUX 10.30 and beyond via the ttrace call.
- In infptrace.c there is a default operation.
- With ttrace, it is possible to tell the kernel to
- notify the debugger that the target program is about to make
- or return from a syscall.
- (child_thread_alive): New function. a default function.
- ptrace doesn't support kernel threads.
- (hppa_enable_page_protection_events): Defualt function
- (hppa_disable_page_protection_events): Default function
-
- * infptrace.c (child_pid_to_exec_file): Fix number of params to
- cal_ptrace call.
-
- * infptrace.c (hppa_pid_or_tid_to_str): New function.
- (hppa_switched_threads): New function.
- (hppa_ensure_vforking_parent_remains_stopped): New function.
- (hppa_resume_execd_vforking_child_to_get_parent_vfork): New function.
-
- * infptrace.c: Most of the changes found in infptrace.c should
- be moved to hppah-nat.c
- (PT_VERSION): A new define
- (startup_semaphore_t): A new struct type. it is used to
- coordinate the parent and child processes after a fork and
- before an exec on HPUX.
- (call_ptrace): Changes to determine whether the ptrace
- request is for starting the tracing of the target process.
- (parent_attach_all): New funct. used on HPUX for coordinating
- the parent and child processes after a fork and before and exec.
- (hppa_acknowledge_forked_child): New funct. prabably belongs
- in hppah-nat.c
- (hppa_enable_catch_fork): New funct. probably belongs in
- hppah-nat.c
- (hppa_disable_catch_fork): New funct. probably belongs in
- hppah-nat.c
- (hppa_create_catch_fork_hook): New funct. probably belongs in
- hppah-nat.c
- (hppa_enable_catch_vfork): New funct. probably belongs in
- hppah-nat.c
- (hppa_disable_catch_vfork): New funct. probably belongs in
- hppah-nat.c
- (hppa_create_catch_vfork_hook): New funct. probably belongs to
- hppah-nat.c
- (hppa_target_has_forked): New funct. probably belongs in
- hppah-nat.c
- (hppa_target_has_vforked): New funct. probably belongs in
- hppah-nat.c
- (process_wait): New funct. also ifdefed for proc_wait.
- (kill_inferior): Call proc_wait rather than wait. this is
- pretty hacky.
- (pre_fork_inferior): New function. used only by HPUX.
- probably should be defined elsewhere.
-
- * infrun.c (follow_inferior_fork): Only define on HP.
- (wait_for_inferior): Only call SOLIB_IN_DYNAMIC_LINKER if we have
- shared libraries; restore test of IN_SOLIB_DYNSYM_RESOLVE_CODE
- removed by HP.
-
- * infrun.c (normal_stop): Add a call to the TUIDO
- macro just before the annotate_stopped label. This
- updates the windows after each program stop.
-
- * infrun.c (normal_stop): Verify stop_command is non-zero before
- dereferencing it (it won't be set if dbx_commands is set).
-
- * infrun.c (resume): Add #ifdef HPPAHPUX around HPUX-specific
- code.
-
- * infrun.c (resume): Add missing semicolon.
-
- * infrun.c (wait_for_inferior): Fix syntax error.
-
- * infrun.c (follow_fork_mode_kind_names): Removed "both" option.
- (follow_fork): Added parameters. additional code for handling
- following of parent, following of child
- (resume): Added code for deciding how to resume in presence of
- fork. Additional params to follow_fork call.
-
- * infrun.c (follow_exec): Ifdef for HPUXHPPA for the moment, the
- code in here assumes the existance of the child_ops target
- vector. This is incorrect for Solaris.
-
- * infrun.c (resume): Fixed ifdefs, HPPAHPUX -> HPUXHPPA.
-
- * infrun.c (wait_for_inferior): Fixed a matching parens problem --
- matching curly brace inside ifdefed code which is not being
- compiled. Change local validFlag to be an 'int' rather than a
- 'bool' and fixed the corresponding assignment statements.
-
- * infrun.c:
- Two new global variables: Inferior_ignoring_startup_exec_events and
- inferior_ignoring_leading_exec_events.
- New static variables: Parent_of_vfork_trap_expected_and_ignorable,
- step_resume_breakpoint, through_sigtramp_breakpoint, pending_follow,
- follow_vfork_when_exec
- (follow_inferior_fork): Does what follow_fork did!
- (follow_fork): Is now a wrapper function for follow_inferior_fork
- (follow_vfork): Is now a wrapper function for follow_inferior_fork
- (follow_exec): New function, handles an exec event.
- (resume): Remove 3 local variables: Child_pid, has_forked, has_vforked.
- move and expand code that tries to follow a fork (i.e. also check
- for vfork and exec
- (init_wait_for_inferior): Initialize the new structure, pending_follow
- (delete_breakpoint_current_contents): When deleting all the breakpoints also
- set the breakpoint struct pointer to NULL.
- (wait_for_inferior): A number of changes.
- The step_resume_breakpoint and through_sigtramp_breakpoint local
- variables are now visible in entire module.
- Changed name of variable from child_inferior_pid to saved_inferior_pid.
- Added several cases to the event processing switch statement:
- Target_WAITKIND_FORKED, TARGET_WAITKIND_VFORKED, TARGET_WAITKIND_EXECD.
- Also, for TARGET_WAITKIND_STOPPED, check to see if expecting a trap
- from the parent of a vfork (ignorable) otherwise break as usual.
- When determining the value of 'random_signal' (0 or 1), no longer check for
- catchpoints.
- When determining how to handle unexpected signals, must now take into
- account fork, vfork, and exec.
- Change call to PC_IN_CALL_DUMMY to a call to CALL_DUMMY_HAS_COMPLETED
- At stop_stepping label, check to see if stopped for fork or
- vfork event.
-
- * infrun.c: New code is related to threads and fork/vfork/exec.
- New static variable: Thread_step_needed
- Deleted static variable: Parent_of_vfork_trap_expected_and_ignorable
- Altered the pending_follow and fork_event structs
- (follow_inferior_fork): Before detaching from child and removing
- all breakpoints form it -- but only if forking or following
- vforks as soon as they happen. Also reset the solib inferior hook.
- The same kind of logic applies to hitting step_resume_breakpoints
- (calling breakpoint_re_set_thread) and to resetting and inserting
- breakpoints.
- (follow_exec): Forward decl
- (follow_vfork): Check to see if gdb followed the child. If
- the child exec'd before gdb saw the parent's vfork event
- then call follow_exec.
- (follow_exec): If the exec occured after a vfork, then follow
- the vfork as well. Do it before following the exec.
- Make sure to update breakpoints after and exec
- (resume): New local variable, should_resume.
- Change parameters in calls to follow_fork, follow_vfork, and
- follow_exec. Some changes to the way various pending_follow.kind
- situations are handled (there's TARGET_WAITKIND_FORKED,
- TARGET_WAITKIND_VFORKED, ARGET_WAITKIND_EXECD. Some additional
- conditions to check before deciding to resume the target (i.e.
- should_resume=1, stepping?, thread_step_needed?i, regular
- resume?)
- (proceed): When proceeded at location that does not have a breakpoint
- set thread_step_needed=0 to indicate that it is not necessary to
- single step thread over breakpoint. SOme additional checks to see
- if it is necessary to step thread over breakpoint.
- (start_remote): Remove call to clear_proceed_status.
- (init_wait_for_inferior): Initialize new fields in fork_event
- structure and add a call to clear_proceed_status.
- (wait_for_inferior): New local variable: New_thread_event.
- Initialize thread_step_needed = 0.
- Minor massaging of conditions for adding a new thread to the thread list.
- No longer resuming execution after adding a new thread. Let user play with thread first.
- Some changes in the way TARGET_WAITKIND_FORKED, ARGET_WAITKIND_VFORKED,
- TARGET_WAITKIND_EXECD are handled -- this is all HPUX related.
- Simplified TARGET_WAITKIND_STOPPED -- HP previously had some
- more complicated code in here.
- Moved the code to resume threads to after the large case statement that processes the events.
- Additional processing for stop_signal=TARGET_SIGNAL_TRAP.
- Cleanup code at process_event_stop_test label.
- Set thread_step_needed when processing a BPSTAT_WHAT_SINGLE.
- Minor massaging of fork/vfork/exec part of stop_stepping code.
- (normal_stop): Minor changes. calling show_and_print_stack_frame.
- (xdb_handle_command): New function
- (_initialize_infrun): Handle xdb_commands. also handle dbx commands
-
- * infrun.c: Changes to support following forks, and handling
- catchpoints.
- (follow_fork_mode_kind_names): New array
- (follow_fork): New function. implements the follow parent,
- or child functionality.
- (resume): Additions to check whether the target process
- just forked and decide which process to follow.
- (wait_for_inferior): Additional variables (child_inferior_pid,
- stepping_through_solib_after_catch,
- - stepping_through_solib_catchpoints.
- - Altered CURRENTLY_STEPPING macro to check for stepping through
- a shared library after hitting a catchpoint.
- - Add parameters to save_infrun_state call
- - Check for fork and vfork when deciding if event is a random
- signal
- - When considering stops due to breakpoints, check for
- BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK
- - Check for stop due to an explicit catchpoint
- - When checking for single stepping event, also check for
- stepping to get out of dynamic linker's hook after catching
- a shlib event
- (is_internal_shlib_eventpoint): New funct. check to see if
- event type is bp_shlib_event.
- (stopped_for_internal_shlib_event): New funct. check for shlib
- events
- (stopped_for_shlib_catchpoint): New funct. check for catchpoints.
- (normal_stop): Additions to check for shlib event
- (set_follow_fork_mode_command): New funct. handles the new follow
- fork command.
- (_initialize_infrun): Additions for follow-fork-mode command.
-
- * infrun.c: Ifdefing references to
- switched_from_inferior_pid for HPUXHPPA. They don't seem
- useful for Solaris (i.e. non-HPUX)
-
- * infrun.c: Included tuiData.h and tuiDataWin.h, ifdefed for TUI.
- Included top.h. New static variables: Switched_from_inferior_pid,
- number_of_threads_in_syscalls.
- (follow_inferior_fork): If there is a step_resume breakpoint
- explicitly reset the thread number.
- (resume): For TARGET_WAITKIND_VFORKED, removed a check for getting
- the vfork event to soon.
- (init_wait_for_inferior): Added parameter to call to
- breakpoint_init_inferior. Initialize number_of_threads_in_syscalls.
- (wait_for_inferior): New local variables: Prev_sal,
- enable_hw_watchpoints_after_wait, stepping_through_sigtramp,
- stepped_after_stopped_by_watchpoint. Enable watchpoints after a wait.
- Added cases for TARGET_WAITKIND_SYSCALL_ENTRY and
- TARGET_WAITKIND_SYSCALL_RETURN.
- Do additional processing if stop due to breakpoint, but breakpoint is
- only valid for a thread other than the one currently running. Additional
- parameters to save_infrun_state and load_infrun_state. Some additional
- processing for BPSTAT_WHAT_STEP_RESUME. Some additional processing to
- handle stepping over a function.
- (normal_stop): Added notification of switching threads. ifdefing some
- TUI changes and leaving out non-essential TUI changes.
- (restore_selected_frame): Ifdefing some TUI changes
- (restore_inferior_status): Ifdefing some TUI changes
-
- * infrun.c: Removed the TUI ifdefs and TUI code. Also removed
- include for top.h. HP introduced this. I'm taking it out.
-
- * inftarg.c (child_detach_from_process): Declare.
- (child_attach_to_process): Declare.
- (child_stop): Make static to match declaration.
-
- * inftarg.c (ptrace_him): Change prototype back to return int.
-
- * inftarg.c (ptrace_me): Remove debug output, pass NULL to
- fork_inferior if not HPUX.
-
- * inftarg.c:
- (child_require_attach): New funct prototype and definition
- (child_require_detach): New funct prototype and definition
- (proc_wait): Funct prototype and definition are enclosed by
- proc_wait ifndef
- (child_attach_to_process): New function, does most of the
- work that child_attach used to do and some additional
- work to determine whether gdb is already attached to the
- target how to react.
- (child_attach): Altered. It's now a wrapper for
- child_attach_to_process.
- (child_require_attach): New function, called if should attach
- even when gdb is already attached to target.
- (child_detach_from_process): New function, does most of the
- work that child_detach used to do and some additional work
- to determine whether gdb is currently attached to the target.
- (child_detach): Altered. It's now a wrapper for
- child_detach_from_process.
- (child_require_detach): New function, called if should try to
- detach even when gdb is not attached to target.
- (ptrace_him): Calls a new function, target_acknowledge_forked_child.
- Currently, target_acknowledge_forked_child, is only defined to
- do something for HPUX.
- (child_create_inferior): Changed call to fork_inferior.
- (child_ops): Added to_require_attach and to_require_detach fields
- to the child_ops target ops vector.
-
- * inftarg.c:
- Some hacks for ttrace work
- (child_wait): Additional local variables, additional code in
- while loop to check for: Process exited, process forked,
- process vforked, process execd
- (child_thread_alive): John B. seems to think that the kill
- call is inapproapriate for HPUX.
- (child_attach_to_process): Using strtol rather than atoi.
- no longer check for case where there is no known exec file.
- (child_post_attach): New function, a default, a no-op
- (child_insert_fork_catchpoint): New function, a default, a no-op
- (child_remove_fork_catchpoint): New function, a default, a no-op
- (child_create_catch_fork_hook): Deleted
- (child_create_catch_vfork_hook): Deleted
- (child_insert_vfork_catchpoint): New function, a default, a no-op
- (child_remove_vfork_catchpoint): New function, a default, a no-op
- (child_can_follow_vfork_prior_to_exec ):new function, a default,
- a no-op
- (child_insert_exec_catchpoint): New function, a default, a no-op
- (child_remove_exec_catchpoint): New function, a default, a no-op
- (child_has_execd): New function, a default, returns 0
- (child_reported_exec_events_per_exec_call): New function, a
- default, returns 1
- (child_has_exited): New function, a default.
- (child_core_file_to_sym_file): New function, a default, returns NULL.
- (child_ops): Initialize new target_ops vector fields to the
- child* functions.
- * infptrace.c:
- (Call_ptrace): For HPUX, handle additional requests: Pt_CONTIN1,
- PT_STEP1.
- (require_notification_of_events): Add several signals to the
- set of events requiring notification: Ptrace_SIGNAL,
- PTRACE_EXEC, PTRACE_FORK, PTRACE_VFORK
- (child_acknowledge_created_inferior): This function is only
- defined if CHILD_ACKNOWLEDGE_CREATED_INFERIOR is defined.
- (child_post_startup_inferior): Function is only defined if
- CHILD_POST_STARTUP_INFERIOR is defiend. Also, now call
- require_notification_of_events.
- (child_create_catch_fork_hook): Deleted
- (child_create_catch_vfork_hook): Deleted
- (child_insert_fork_catchpoint): New function
- (child_remove_fork_catchpoint): New function
- (child_insert_vfork_catchpoint): New function
- (child_remove_vfork_catchpoint): New function
- (child_has_forked): Now enclosed by a CHILD_HAS_FORKED ifdef
- (child_has_vforked): Now enclosed by CHILD_HAS_VFORKED ifdef
- (child_can_follow_vfork_prior_to_exec): New function
- (child_insert_exec_catchpoint): New function
- (attach): Removed call to require_notification_of_events
- (child_post_attach): New function, call to
- require_notification_of_events moved here.
- (child_pid_to_exec_file): New enclosed by CHILD_PID_TO_EXEC_FILE ifdef
- introduced the concept of a saved_inferior_pid
- (hppa_require_attach): Add some code to decide if gdb is already
- attached to process. Can not figure this out via a ptrace call.
- (hppa_insert_hw_watchpoint): New function
- (hppa_remove_hw_watchpoint): New function
-
- * inftarg.c:
- (child_attach_to_process): Change position in file
- (child_detach_from_process): Change position in file
-
- * inftarg.c:
- (child_attach_to_process): Changed parameter to child_wait call
-
- * inftarg.c:
- (child_post_wait): New function declaration and definition
- (ptrace_him):
- - change return value to a void.
- - change target_acknowledge_forked_child call to
- target_acknowledge_created_inferior
- - call target_post_startup_inferior rather than returning pid.
- (child_attach_to_process): Change param name, fail_if_already_attached
- -> after_fork.
- Invert a couple of if-then-else statments.
- Use REQUIRE_ATTACH macro
- (child_attach): Change params in child_attach_to_process call
- (child_require_attach): Change params in child_attach_to_process call
- (child_detach_to_process): Change param name,
- fail_if_already_attached -> after_fork.
- Invert a couple of if-then-else statments.
- Use REQUIRE_DETACH macro
- (child_detach): Change params in child_detach_from_process call
- (child_require_detach): Change params in child_detach_from_process
- call
- (child_post_startup_inferior): New function
- (child_acknowledge_created_inferior): New function
- (child_clone_and_follow_inferior): New function
- (child_post_follow_inferior_by_clone): New function
- (child_create_catch_fork_hook): New function
- (child_create_catch_vfork_hook): New function
- (child_has_forked): New function
- (child_has_vforked): New function
- (child_post_follow_vfork): New function
- (child_stop): No longer a static function
- (child_pid_to_exec_file): New function
-
- * inftarg.c:
- (child_wait): Child_pid becomes related pid. return pid
- rather than inferior_pid. Changes are in code handling fork
- and vfork
-
- * inftarg.c:
- Include gdb_stat.h and sys/unistd.h
- (child_wait): New local variables. Check for live threads.
- Check for syscall events
- (child_thread_alive): No longer a static funct.
- (ptrace_him): Remove some code inserted in snap3
- (child_create_inferior): Added a bunch of code to handle a
- bad interaction between start-up-with-shell and the HP
- catch-fork/catch-exec logic. I am ifdefing this for
- HPUXHPPA for now.
- (child_has_syscall_event): New default target_ops function
- (child_enable_exception_callback): New default target_ops function
- (child_get_current_exception_event): New default target_ops function
- (child_ops): 3 new fields
-
- * inftarg.c: Remove HPUX_SNAP1 and HPUX_SNAP2 ifdefs
-
- * inftarg.c: Reverted previous change.
-
- * infttrace.c (hppa_remove_hw_watchpoint): Fix check for write
- access hardware watchpoint.
-
- * infttrace.c (proc_wait): Rename from proc_wait.
-
- * infttrace.c (require_notification_of_exec_events): New function;
- just notify of exec events, not all events, and just the specified
- pid, don't include it's children.
- (child_acknowledge_created_inferior): Call new function
- require_notification_of_exec_events instead of
- require_notification_of_events.
- (child_post_startup_inferior): Call require_notification_of_events
-
- * infttrace.c: Changed all references to boolean to int.
- Changed all references to TRUE and FALSE to 1 and 0.
-
- * irix5-nat.c (symbol_add_stub): Add params to call to
- symbol_file_add.
-
- * jv-lang.c (get_dynamics_objfile): Add 2 more parameters to call
- to allocate_objfile.
-
- * main.c (fputs_unfiltered): Changes to prevent cursor form
- jumping around in the TUI. Altered where tuiTermUnsetup and
- tuiTermSetup are called
-
- * main.c (fputs_unfiltered): Changed function so that it
- checks to see if output is to a string buffer or to a
- FILE stream and does the correct action (i.e. strcat or
- fputs). Fixed params for fputs call.
-
- * main.c (fputs_unfiltered): Don't try to call the TUI's
- CommandCharCount functions when the TUI isn't enabled.
-
- * main.c (fputs_unfiltered): Change FILE to GDB_FILE.
-
- * main.c (main): If the user gives the --version or --help flags,
- disable the TUI.
-
- * main.c (tui_version, xdb_commands, dbx_commands): New variables.
- (main): New command line arguments --tui, --xdb, --dbx; add call
- to tyiCleanUp via tuiDo to main loop.
- (fputs_unfiltered): Tui related changes.
-
- * main.c: Define 2 new global variables, gdb_stdout and gdb_stderr
- of type GDB_FILE.
- (main): Allocate space for and initialize gdb_stdout and gdb_stdin.
-
- * objfiles.c (find_pc_sect_section): Make end condition be less
- than s->endaddr, not less than or equal to s->endaddr.
-
- * objfiles.c:
- (allocate_objfile): 2 new parameters: User_loaded and is_solib.
- When appropriate, record in the object file that it is user loaded.
- The run command can use this information to purge object file
- entries associated with the old inferior and keep user loaded
- object files loaded via the add-symbol-file command.
- (objfile_purge_solibs): New function. deletes all objectfile entries
- that are not explicitly loaded by the user.
-
- * objfiles.c:
- (objfile_relocate): Check for LOC_INDIRECT
- (find_pc_sect_section): Change condition from
- pc < s->endaddr to pc <= s->endaddr
-
- * objfiles.h:
- New variables: User_loaded and is_solib
- (OBJF_SHARED): New macro. used to distinguish objfile for
- shared library from "vanilla" objfile.
- (allocate_objfile): Add new parameters to function decl.
- (objfile_purge_solibs): New function decl.
-
- * objfiles.h: Add some typedefs: Importentry, ExportEntry.
- Add some new variables: Import_list, import_list_size,
- export_list, export_list_size
-
- * osfsolib.c:
- (symbol_add_stub): Added params to call to symbol_file_add
-
- * pa/hpux1020.mh (NATDEPFILES): Add corelow.o, symbol table and
- solib files.
-
- * pa/hpux1100.mh (NAT_FILE): Use nm-hppah11.h.
- (NATDEPFILES): Add symbol table and solib files.
-
- * pa/nm-hppah11.h: New file, HPUX11-only definitions.
-
- * pa/tm-hppa.h (proc_wait): Remove decl and macro.
-
- * parse.c (write_dollar_variable): Handle cases in which variables
- besides the debugger ones start with $ and $$.
- (parse_nested_classes_for_hpacc): New function. Parse a string that
- is possibly a namespace / nested class specification.
- (find_template_name_end): New function.
-
- * procfs.c:
- (procfs_init_inferior): Return value is now a void.
-
- * procfs.c (procfs_ops): Initializing new target ops vector fields. see list below.
-
- * procfs.c:
- (procfs_ops): Adding new target_ops vector fields and
- removing a few. see list below
-
- * procfs.c: Added new fields to procfs_ops.
- Necessary since we still have oldstyle initialization in
- this file
-
- * pyr-tdep.c (pyr_do_registers_info): Change stdout to gdb_stdout.
- (frame_locals_address): Change stderr to gdb_stderr.
- (frame_args_addr): Ditto.
-
- * pyr-xdep.c (fetch_inferior_registers): Change stderr to
- gdb_stderr.
-
- * serial.c (serial_close): Call gdb_fclose, not fclose on a
- GDB_FILE.
-
- * serial.c (serial_logchar): Change chtype to ch_type. sigh.
-
- * solib.c (look_for_base): The parameter to file must be
- of type FILE *. So cast exec_bfd -> iostream in the call
- to fileno as a FILE *, not a GDB_FILE *. This will work because
- exec_bfd -> iostream is declared and given a value in bdf and
- bfd will continue to use FILE rather than GDB_FILE.
-
- * solib.c:
- (solib_add): Remove references to exec_ops.
-
- * solib.c:
- (solib_add): Update exec_ops.to_sections
-
- * solib.c:
- (symbol_add_stub): Added params to call to symbol_file_add
-
- * solib.h:
- (SOLIB_REMOVE_INFERIOR_HOOK): New macro. defined to 0.
- functionality not implemented for this target.
-
- * solib.h: Added macro definitions. These macros generate
- error messages for solaris??
- (SOLIB_CREATE_CATCH_LOAD_HOOK)
- (SOLIB_CREATE_CATCH_UNLOAD_HOOK)
- (SOLIB_HAVE_LOAD_EVENT)
- (SOLIB_LOADED_LIBRARY_PATHNAME)
- (SOLIB_HAVE_UNLOAD_EVENT)
- (SOLIB_UNLOADED_LIBRARY_PATHNAME)
- (SOLIB_IN_DYNAMIC_LINKER)
- (SOLIB_RESTART)
-
- * somread.c (is_in_import_list): Ditto.
-
- * somread.c (som_symfile_read): Added some comments
-
- * somread.c (som_symfile_read): Read in import and export lists.
- (som_symtab_read): Change test for dynamic executable.
- (is_in_import_list): New function. Check if a given symbol name
- is in the import list.
- (init_import_symbols): New function. Read in and initialize the
- som import list.
- (init_export_symbols): New function. Read in and initialize the
- som export list.
-
- * somread.c:
- (som_symfile_read): Fix missing comment delimiters
-
- * somsolib.c (DLD_FLAGS_MAPPRIVATE): New macro.
- Define bit of __dld_flags in HP-UX a.out files.
- (DLD_FLAGS_HOOKVALID): Ditto.
- (DLD_FLAGS_LISTVALID): Ditto.
- (DLD_FLAGS_BOR_ENABLE): Ditto.
- (som_solib_total_st_size): Cumulative size in bytes of the
- symbol tables of all shared objects on the so_list_head list.
- (som_solib_st_size_threshhold_exceeded): Threshold for adding symbols
- for shlibs.
- (som_solib_sizeof_symbol_table): New function. Computes size of
- symbol table for a shlib.
- (som_solib_load_symbols): New function. Load symbols from shlib.
- (som_solib_add): Detect if __dld_list is not valid.
- Record main program's symbol table size.
- Load symbols if called from command line.
- Keep threshold into account when loading shlib symbols.
- (som_solib_create_inferior_hook): Use dld_flags macros.
- (som_sharedlibrary_info_command): Let user know if symbols were
- not loaded.
- (som_solib_restart): Discard all the shlibs descriptors.
- (_initialize_som_solib): Chenge help message for auto-solib-add
- command.
- Set threshold for symbol table to 50 megabytes.
-
- * somsolib.c (_initialize_som_solib): Added call to som_solib_restart.
- (som_solib_restart): New function
- (som_solib_in_dynamic_linker): New function
- (som_solib_desire_dynamic_linker_symbols): New function
- (som_solib_unloaded_library_pathname): New function
- (som_solib_loaded_library_pathname): New function
- (som_solib_library_pathname): New function
- (som_solib_have_unload_event): New function
- (som_solib_have_load_event): New function
- (som_solib_create_catch_unload_hook): New function
- (som_solib_create_catch_load_hook): New function
- (som_solib_create_inferior_hook): Rewritten
- dld_cache: New struct
- addr_and_unwind_t: New struct
- (find_unwind_entry) added prototype
-
- * somsolib.c (som_solib_create_inferior_hook): Introduce new local
- msymbol2 and change some msymbol's to msymbol2's -- was clobbering
- msymbol, passing a NULL to lookup_minimal_symbol_solib_trampoline,
- and ultimately core dumping with a SEGV.
-
- * somsolib.c:
- Include assert.h
- (som_solib_mapped_entry): Additional comments for text_addr,
- text_link_addr, text_end, and tsd_start_addr fields. Commenting
- out 2 tsd fields, __data_start and __data_end.
- (som_solib_add_solib_objfile): Add params to calls to symbol_file_add.
- Add some code for distinguishing between a shared library and other
- objfiles. This appears to be a prelude to thread local storage.
- (som_solib_load_symbols): Changes to printf statement
- enclosed by SOLIB_DEBUG ifdef.
- (som_solib_add): Change comment to correctly specify path
- to end.o -- /opt/langtools/lib/end.o. changes to printf statement
- enclosed by SOLIB_DEBUG ifdef.
- Removed several SOLIB_DEBUG ifdefs and the associated printfs.
- Add code to find the start address for the object file's thread
- local storage
- (som_solib_create_inferior_hook): Fix warning messages use correct
- path to end.o -- /opt/langtools/lib/end.o. Change control flow.
- No longer user early returns from function is cases of error.
- (reset_inferior_pid): New function
- (som_solib_remove_inferior_hook): New function
- (so_lib_thread_start_addr): New function. used for tsd.
-
- * somsolib.c: Removed references to ASSERT macro.
-
- * somsolib.c: Add debugging macro.
- (struct som_solib_mapped_entry): Add new field tsd_start_addr.
- (struct so_list): Added new field solib_addr.
- (som_solib_add_solib_objfile): New function.
- (som_solib_load_symbols): Rewritten.
- (som_solib_add): Make sure we don't load the symbols in if the
- threshold was exceeded.
- (som_solib_get_solib_by_pc): New function. Return the address of
- handle of the shared library.
- (som_solib_restart): Disable breakpoints at restart.
- (_initialize_som_solib): Set threshold to 100 megabytes.
-
- * somsolib.c: Add include of fcntl.h so that O_RDONLY is defined.
-
- * somsolib.h (DISABLE_UNSETTABLE_BREAK): New macro.
- (PC_SOLIB): New macro.
-
- * somsolib.h:
- (SOLIB_CREATE_CATCH_LOAD_HOOK): Define
- (SOLIB_CREATE_CATCH_UNLOAD_HOOK): Define
- (SOLIB_HAVE_LOAD_EVENT): Define
- (SOLIB_LOADED_LIBRARY_PATHNAME): Define
- (SOLIB_HAVE_UNLOAD_EVENT): Define
- (SOLIB_UNLOADED_LIBRARY_PATHNAME): Define
- (SOLIB_IN_DYNAMIC_LINKER): Define
- (SOLIB_RESTART): Define
-
- * somsolib.h:
- (SOLIB_REMOVE_INFERIOR_HOOK): New macro. defined to use
- som_solib_remove_inferior_hook.
-
- * somsolib.h:
- (som_solib_create_catch_load_hook)
- (som_solib_create_catch_unload_hook)
- (som_solib_have_load_event)
- (som_solib_loaded_library_pathname)
- (som_solib_have_unload_event)
- (som_solib_unloaded_library_pathname)
- (som_solib_in_dynamic_linker)
- Fix prototypes to use type names, not parameter names.
-
- * source.c (find_source_lines): Make non static.
- (open_source_file): Ditto.
- (source_full_path_of): New function.
- (print_source_lines): Rename to print_source_lines_base and make
- static; formatting.
- (print_source_lines): New function.
- (forward_search_command): Tui changes.
- (reverse_search_command): Tui changes.
- (_initialize_source): Add xdb and dbx compatibility commands.
-
- * source.c (list_command): Handle case of odd number of source
- lines to display.
-
- * source.c:
- (source_full_path_of): New function. file was overlooked
- in merge ;-/.
-
- * stack.c (func_command): Make high bound be <, not <=.
-
- * stack.c (_initialize_stack): For the backtrace command, delete
- the help line about usage, since this has to be a valid help
- message for the 'where' command too.
-
- * stack.c (current_frame_command): Add a check for the
- existance of a stack. If there is no stack produce an
- error message and exit.
-
- * stack.c (down_silently_base, up_silently_base,
- args_plus_locals_info, print_frame_info_base,
- print_stack_frame_base, print_stack_frame_base_stub): Declare.
- (print_frame_local_vars): Add'l parameter.
- (print_stack_frame_stub): New version created, old version renamed
- to show_and_print_stack_frame_base_stub.
- (print_stack_frame_base_stub, print_only_stack_frame_stub,
- show_and_print_stack_frame, print_only_stack_frame,
- stack_publish_stopped_with_no_frame, print_frame_info,
- show_stack_frame, backtrace_full_command, args_plus_locals_info,
- select_and_print_frame, select_and_maybe_print_frame,
- current_frame_command, func_command): New functions.
- (backtrace_command): New function, old renamed to
- backtrace_command_1.
- (print_block_frame_locals, print_frame_local_vars): Additional
- parameter, number of tabs.
- (up_silently_command): New function, old renamed to
- up_silently_command_base.
- (down_silently_command): New function, old renamed to
- down_silently_base.
- (_initialize_stack): Register new commands based on values of
- xdb_commands and dbx_commands variables.
-
- * stack.c (func_command): Make high bound be <, not <=.
-
- * stack.c (parse_frame_specification): Fix prototype to match
- function definition.
- (show_and_print_stack_frame_stub): Fix name.
- (select_and_print_frame): Change uncaught tuiDO call.
-
- * stack.c (up_silent_base): Rename from up_silently_command_base.
-
- * symfile.c (symbol_file_command): Only call SOLIB_RESTART if it's
- defined.
-
- * symfile.c (add_psymbol_with_dem_name_to_list): New function.
- Adds a symbol with a long value to a psymtab. Differs from
- add_psymbol_to_list in taking both a mangled and a demangled name.
-
- * symfile.c (compare_psymbols): Call strcmp directly, instead of
- using macro.
-
- * symfile.c (symbol_file_add): Reindent portions.
- (symbol_file_command): Add call to tuiDo.
-
- * symfile.c (symbol_file_command): Only call SOLIB_RESTART if it's
- defined.
-
- * symfile.c (symfile_bfd_open): Add code to call PXDB on hpux, if
- the file has not already been processed by pxdb.
- Added define USE_PXDB.
-
- * symfile.c (symfile_bfd_open): Change parenthesis positioning
- around call to hpread_pxdb_check.
-
- * symfile.c (symfile_bfd_open): Make not static.
- (RESET_HP_UX_GLOBALS): New macro. Resets globals when new symbol
- file loaded.
- (USE_PXDB): Not needed. Removed.
- (symbol_file_add): Add HP specific code to deal with pxdb.
- (symbol_file_command): Reset HP specific globals if new symbol file
- loaded.
- (symfile_bfd_open): Comment out checking for pxdb.
- (reread_symbols): Reset HP specific globals.
-
- * symfile.c (symfile_bfd_open): Uncomment hpus specific code.
-
- * symfile.c:
- (symbol_file_add): Add user_loaded and is_solib parameters.
- fixed number of parameters in call to allocate_objfile
- (symbol_file_command): Added call to SOLIB_RESTART macro.
- fixed number of parameters in calls to symbol_file_add.
- (add_symbol_file_command): Fixed number of parameters in calls to
- symbol_file_add.
-
- * symfile.c: Added prototype for hpread_pxdb_check.
-
- * symfile.c: Changed HPUX_SNAP1 ifdef to HPUXHPPA. enclosed calls to
- RESET_HP_UX_GLOBALS with an HPUXHPPA ifdef
-
- * symfile.h (symfile_bfd_open): Add protptype.
-
- * symfile.h: Add prototype for add_psymbol_with_dem_name_to_list.
-
- * symfile.h: Clarify purpose of auto_solib_add.
-
- * symmisc.c (maintenance_print_symbols): Call gdb_fclose, not
- fclose on a GDB_FILE* during cleanup.
- (maintenance_print_psymbols): Call gdb_fclose, not fclose on a
- GDB_FILE* during cleanup.
- (maintenance_print_msymbols): Call gdb_fclose, not fclose on a
- GDB_FILE* during cleanup.
-
- * symmisc.c (maintenance_print_symbols): Gdb_fclose now takes a
- GDB_FILE ** parameter. Fix the local GDB_FILE variables and the
- call to make_cleanup.
- (maintenance_print_psymbols): Ditto
- (maintenance_print_msymbols): Ditto
-
- * symmisc.c (print_objfile_statistics): Close quotes in
- output strings.
-
- * symmisc.c:
- (Print_symbol): Add LOC_INDIRECT to switch statement
- (print_partial_symbols): Add LOC_INDIRECT to switch statement
-
- * symtab.c (find_pc_sect_psymtab): High bounds should be <, not <=.
- (find_pc_sect_symtab): Ditto.
-
- * symtab.c (hp_som_som_object_present): New flag to indicate HP
- compiled code.
- (find_pc_sect_psymtab): Change tests to make sure we are checking
- the texthigh adress as well.
- (lookup_transparent_type): New function. Look up a type name
- in the struct_namespace. The type returned must not be opaque.
- (find_pc_sect_symtab): Make sure we check the address 'pc' itself,
- too.
- (find_addr_symbol): Prepare to handle LOC_INDIRECT address class, but
- leave it commented out.
- (find_pc_sect_line): Return correct information if pc is in import
- or export stub (trampoline).
- (decode_line_1): Skip two chars, if they are '$$'. Like for HP's
- $$dyncall. Handle cases in which varaible and function names can start
- with $.
- (overload_list_add_symbol): If cannot demangle name, use it as is.
- Free string after use.
- (make_symbol_overload_list): Initialize oload_name to NULL and
- oload_name_len to 0. If demangle not successful, use name as it is.
- Free string after use.
-
- * symtab.c (lookup_symbol): Changed call to find_pc_sect_symtab,
- to the original find_pc_symtab, in HP added fragment.
-
- * symtab.c (lookup_symbol): Change HPUX_SNAP1 ifdef to a HPUXHPPA ifdef
-
- * symtab.c (lookup_symbol): Ifdef the searching of symbol in the
- minimal symbol tables, for hpux we move this check at the end
- of the function.
- Before we error out if symbol is not found in the symtab, look
- in the statics.
- Before erroring out if static symbol not found look in the globals.
-
- * symtab.c (lookup_symbol): Return symbol as soon as found.
- (decode_line_1): Check whether we have a conditional break. Temporarily
- remove it from the line, to not confure perenthesis checking.
- Handle namespaces.
- (overload_list_add_symbol): New function. Overload
- resolution support.
- (make_symbol_overload_list): Ditto.
-
- * symtab.c:
- (find_template_name_end): New prototype decl.
- (lookup_symbol): When a global or static symbol shows up in the
- psymtab table, but not the symtab table, tell the user that
- the symbol may be an inlined function or a template function and
- provide some guidance to the user about how to more fully
- specify the symbol.
- (lookup_transparent_type): When a global or static symbol shows up
- in the psymtab table, but not the symtab table, tell the user that
- the symbol may be an inlined function or a template function and
- provide some guidance to the user about how to more fully
- specify the symbol.
- (decode_line_1): Handle template function specification when decoding a
- line. May need to be ifdefed for HP's aCC?
- (_initialize_symtab): Handle dbx commands.
-
- * symtab.h (address_class): Add new address calss for
- LOC_THREAD_LOCAL_STATIC and LOC_INDIRECT.
- (lookup_transparent_type): Add prototype.
- (exception_event_kind): New enum for exception catchpoints.
- (exception_event_record): New structure for exception catchpoints.
- (CURRENT_EXCEPTION_KIND): New macro.
- (CURRENT_EXCEPTION_CATCH_SAL): New macro.
- (CURRENT_EXCEPTION_CATCH_LINE): New macro.
- (CURRENT_EXCEPTION_CATCH_FILE): New macro.
- (CURRENT_EXCEPTION_CATCH_PC): New macro.
- (CURRENT_EXCEPTION_THROW_SAL): New macro.
- (CURRENT_EXCEPTION_THROW_LINE): New macro.
- (CURRENT_EXCEPTION_THROW_FILE) new macro.:
- (Current_EXCEPTION_THROW_PC): New macro.
-
- * symtab.h(make_symbol_overload_list): Add prototype.
-
- * symtab.h:
- (symbol_file_add): Add new params to function decl.
-
- * target.c (cleanup_target): Changed casting of default functions for
- to_has_forked, to_has_vforked, to_pid_to_exec_file to get rid of
- warnings.
-
- * target.c (cleanup_target): Changed the default functions for
- to_pid_to_exec_file and to_core_file_to_sym_file
-
- * target.c (cleanup_target): Fixed PARAMS for to_has_syscall_event
-
- * target.c (cleanup_target): Syntax error, mismatched paranthesis.
-
- * target.c:
- (Default_clone_and_follow_inferior): New funct prototype declaration
- and function definition
- (dummy_target): More target_ops vector changes for HPUX
- new fields. ifdefed for HPUX_SNAP2. New fields are
- to_post_wait, to_post_startup_inferior
- to_acknowledge_created_inferior, to_clone_and_follow_inferior,
- to_post_follow_inferior_by_clone, to_create_catch_fork_hook,
- to_create_catch_vfork_hook, to_has_forked, to_has_vforked,
- to_post_follow_vfork, to_pid_to_exec_file
- (de_fault): Add new HPUX specific target_ops operations to
- the de_fault macro
- (INHERIT): Add new HPUX specific target_ops operations to the
- INHERIT macro
- (find_default_clone_and_follow_inferior): New funct definition
- (debug_to_post_wait): New funct
- (debug_to_post_startup_inferior): New funct
- (debug_to_acknowledge_created_inferior): New funct
- (debug_to_clone_and_follow_inferior): New funct
- (debug_to_post_follow_inferior_by_clone): New funct
- (debug_to_create_catch_fork_hook): New funct
- (debug_to_create_catch_vfork_hook): New funct
- (debug_to_has_forked): New funct
- (debug_to_has_vforked): New funct
- (debug_to_post_follow_vfork): New funct
- (setup_target_debug): Initialize new target_ops vector fields.
-
- * target.c:
- (Cleanup_target): Fixed the return type on a few of the
- default function values.
-
- * target.c:
- (Dummy_target): Add 3 new fields
- (nosupport_runtime): New function, used in cleanup_target
- (cleanup_target): Changes in the de_fault macro, both to
- accomodate the new target_ops vector fields and to use
- more accurate default functions.
- (update_current_target): Add new target_ops vector fields to the
- INHERIT macro
- (generic_mourn_inferior): The call to breakpoint_init_inferior now takes a
- parameter
- (normal_pid_to_str): Adding a \0 to the end of buf.
- (debug_to_has_syscall_event): New func
- (debug_to_enable_exception_callback): New func
- (debug_to_get_current_exception_event): New func
- (setup_target_debug): Initialize the 3 new target_ops vector fields
-
- * target.c:
- (Struct signals): Fix message associated with SIGRETRACT.
-
- * target.c:
- (Dummy_target): Fix syntax error
- (cleanup_target): Changed the default values for the new
- target_ops vector fields. HP folks inappropriately set
- most of them to noprocess(). They should be a mixture
- of ignore() and return_zero().
-
- * target.c:
- (Dummy_target): Add new target_ops vector fields and their initializations
- (cleanup_target): Added new new target_ops vector fields to the de_fault
- macro definition.
- (update_current_target): Added new new target_ops vector fields to the INHERIT
- macro definition
- (return_one): New function, used by the de_fault macro
- (debug_to_post_attach): New function
- (debug_to_wait): Added new cases: Target_WAITKIND_FORKED, TARGET_WAITKIND_VFORKED,
- TARGET_WAITKIND_EXECD
- (debug_to_insert_fork_catchpoint): New function
- (debug_to_remove_fork_catchpoint): New function
- (debug_to_insert_vfork_catchpoint): New function
- (debug_to_remove_vfork_catchpoint): New function
- (debug_to_can_follow_vfork_prior_to_exec): New function
- (debug_to_insert_exec_catchpoint): New function
- (debug_to_remove_exec_catchpoint): New function
- (debug_to_core_file_to_sym_file): New function
- (setup_target_debug): Give new fields in current_target target_ops vector values.
-
- * target.c: Hp merge, 4/15/98 snapshot
- There are new target_ops fields that pertain only
- to HPUX. All the changes relate to this. First,
- new fields are added to the dummy_target target_ops
- vector: To_require_attach, to_require_detach.
-
- * target.c: Remove HPUX_SNAP1 and HPUX_SNAP2 ifdefs
-
- * thread.c (info_threads_command): Call print_only_stack_frame
- instead of print_stack_frame.
- (_initialize_thread): Make t an alias for thread only if
- xdb_commands is not set.
-
- * thread.c (thread_command): If no arguments, don't generate an
- error, instead tell the user which thread is current.
- (info_threads_commands): Don't lose the users position within the
- current thread -- remember it and then restore it.
-
- * thread.c:
- (struct thread_info): Add stepping_through_sigtramp field
- (add_thread): Initialize stepping_through_sigtramp field
- (load_infrun_state): Add stepping_through_sigtramp param and
- make sure it gets assigned a value.
- (save_infrun_state): Add stepping_through_sigtramp param and
- make sure that the value gets saved.
- (info_threads_command): Ifdefing some local variables and
- code for HPUXHPPA. HP folks want print the tid rather than pid?
- Also, looks like the HP folks solved the same thread switching
- problem that 4.17 solves. Taking 4.17.
- (restore_current_thread): Print out the current frame after
- switching threads.
- (thread_apply_all_command): Ifdefing a print statement for
- HPUXHPPA. The HP folks want to print out a tid rather than pid?
- (thread_apply_command): Ifdefing a print statement for
- HPUXHPPA. The HP folks want to print out a tid rather than pid?
- (thread_command): Decided not to take HP change.
-
- * thread.c: Fixing gdb core dump problem causing many testsuite
- failures.
- (add_thread): Remove call to bpstat_clear, initialize
- tp->stepping_through_solib_catchpoints = NULL;
-
- * thread.c: Changes for catchpoints, shared libaries,
- (thread_info): Additional fields in the thread_info struct
- for stepping_through_solib_after_catch and
- stepping_through_solib_catchpoints.
- (add_thread): Initialize the new thread_info fields.
- (load_infrun_state): Additional parameters for handling
- catchpoints and shared libraries.
- (save_infrun_state): Additional parameters for handling
- catchpoints and shared libraries.
-
- * top.c (command_loop): Initialize space_at_cmd_start to 0.
- (set_prompt): New function.
- (togglelist, stoplist): New command lists.
- (command_loop): Tui changes -- paranoia to make sure
- insert mode is off when not editing.
- (quit_force): Clean up tui on exit.
- (init_main): Make definition of info status command dependent upon
- dbx mode not being set.
- (fputs_unfiltered_hook): Changed stream parameter from FILE
- to GDB_FILE
- (flush_hook): Changed stream parameter from FILE to GDB_FILE
-
- * top.h (set_prompt): Declare.
-
- * typeprint.c (whatis_exp): Decide real runtime type. For the vtable
- case.
-
- * utils.c (query): Changes to prevent cursor from jumping around in the
- TUI. Call tuiBufferGetc explicitly, rather than passing it
- into tuiDo. The tuiDo function does some additional work
- that is inappropriate when handling queries.
- (GDB_FILE_ISATTY): New macro that takes a GDB_FILE param and
- determines whether or not it's using a tty.
- (gdb_file_isatty); called by the GDB_FILE_ISATTY macro. Does
- the actual work
- (init_page_info): Call GDB_FILE_ISATTY rather than ISATTY
- (print_spaces): Fix parameter to fputc. fix call to
- gdb_file_adjust_strbuf.
- (gdb_file_init_astring): Fix parameter to xmalloc
- (gdb_file_deallocate): New function to deallocate
- a GDB_FILE object and possibly a string buffer
- (gdb_file_init_astring): Initialize buffer as the empty
- string. Indent GNU style.
- (gdb_fopen): Gdb_fopen is called if the GDB_FILE object is
- actually afile rather than astring. The routine now allocates space
- for a GDB_FILE object and initializes its fields in addition to
- performing an fopen.
- (gdb_flush): Fix the parameter passed into fflush. It's now
- stream->ts_filestream.
- (gdb_fclose): Pass in an object of type GDB_FILE **. Fix parameter
- to fclose. It's now tmpstream->ts_filestream. Make sure to free
- the GDB_FILE object and set the GDB_FILE * object to NULL.
- (gdb_adjust_strbuf): New function. Determine if the current
- ts_strbuf field contains sufficient space to concatenate a string
- of length n on the end. If not, then reallocate the ts_strbuf.
- (print_spaces): Check to see if the GDB_FILE is afile or
- astring. If it is astring, then adjust the size of the ts_strbuf
- field and concatenate the correct number of spaces onto the end of
- the buffer. Otherwise continue to use fputc.
- (gdb_file_get_strbuf): New function. return a ptr to the ts_strbuf
- field in a GDB_FILE object.
- (gdb_file_init_astring): New function to allocate space for and
- initialize a GDB_FILE object when it is an astring.
- (set_width): Declare it.
- (pagination_enabled): Define it.
- (query): Tui changes.
- (init_page_info, set_width): New functions.
- (set_width_command): Call set_width.
- (_initialize_utils): Replace termcap stuff with call to
- init_page_info; if xdb_commands set, define am and sm commands;
- define pagination as a set/show command.
- (vfprintf_maybe_filtered): Change FILE to GDB_FILE.
- (fputs_maybe_filtered): Ditto.
- (print_spaces): Ditto.
- (gdb_printchar): Ditto.
- (gdb_flush): Ditto.
- (fputs_filtered): Ditto.
- (vfprintf_filtered): Ditto.
- (vfprintf_unfiltered): Ditto.
- (fprintf_filtered): Ditto.
- (fprintf_unfiltered): Ditto.
- (fprintfi_filtered): Ditto.
- (print_spaces_filtered): Ditto.
- (fprintf_symbol_filtered): Ditto.
- (gdb_fclose): New function.
-
- * valops.c (call_function_by_hand): Assign to param_type only
- if function has parameters.
-
- * valops.c (call_function_by_hand): Ifdef the
- HP_COMPILED_TARGET stuff.
- (value_arg_coerce): Ditto.
-
- * valops.c (call_function_by_hand): Make sure param_type is
- initialized to NULL.
-
- * valops.c (find_rt_vbase_offset): Add parameter to value_at.
- (value_rtti_type): Ditto.
- (value_full_object): Ditto.
-
- * valops.c (search_struct_field_aux): Fixed mismatching parenths
-
- * valops.c (search_struct_field_aux): Make sure TYPE_TAG_NAME
- is not null before copying it.
-
-
- * valops.c (search_struct_field_aux): Set found_class_name to null
- if class has no name (anon unions case). Adjust base_addr
- computation.
-
- * valops.c (value_arg_coerce): Change final arg to int.
-
- * valops.c (value_arg_coerce): Remove the conditional on HP
- compiled target, for doing coercion of float to double. Removed
- third parameter, using_gcc.
- (call_function_by_hand): Do not use HP_COMPILED_TARGET, just
- use the gcc_compiled variable.
-
- * valops.c (value_cast): Take case of the enclosing_type and
- pointer_to_offset fields.
- (value_at): Use VALUE_CONTENTS_ALL_RAW
- (value_fetch_lazy): Ditto
- (value_assign): Handle enclosing_type, embedded_offset and
- pointed_to_offset fields.
- (value_repeat): Use VALUE_CONTENTS_ALL_RAW and VALUE_ENCLOSING_TYPE.
- (value_ind): Set enclosing_type and embedded_offset correctly,
- for a pointer value being dereferenced. Target memory bytes
- corresponding to the size of the enclosing type are retreived.
- (value_addr): Handle enclosing_type and pointed_to_offset.
- (value_push): Use VALUE_CONTENTS_ALL and VALUE_ENCLOSING_TYPE.
- (value_arg_coerce): Coerce floats to doubles only if gcc was not
- used to compile the target.
- (call_function_by_hand): Handle pointers to functions as paramters.
- (value_array): Use VALUE_CONTENTS_ALL and VALUE_ENCLOSING_TYPE.
- (search_struct_method): Produce more informative error message.
- (find_rt_vbase_offset): Deal with negative offsets.
- (value_find_oload_method_list): New function. Return the list of
- overloaded methods of a specified name.
- (find_method_list): New function. Search through the methods of an
- object (and its bases) to find a specified method.
- (value_full_object): New function. Given a value, check its real
- run-time type.
- (value_rtti_target_type): New function. Given a pointer value V, find
- the real (RTTI) type of the object it points to.
- (value_rtti_type): New function. Find the real run-time type of a
- value using RTTI.
-
- * valops.c: Include gdbcmd.h
- Set global overload_resolution to 0.
- (find_function_in_inferior): Modify error message.
- (value_allocate_space_in_inferior): Modify error message.
- (value_cast): Deal with HP/aCC peculiarities.
- (value_of_variable): Use SYMBOL_SOURCE_NAME instead of SYMBOL_NAME.
- (value_addr): Modify address value by adding the embedded offset.
- (value_ind): Modify the address of the object by the pointed_to_offset.
- (call_function_by_hand): Do not do any extra alignment if not needed.
- Fetch the return value from the stack rather then from the register,
- for the hppa architecture.
- (search_struct_field): Rewritten. Now this function uses
- search_struct_field_aux to do all the work.
- (search_struct_field_aux): New function. This is the old
- search_struct_field rewritten.
- (find_rt_vbase_offset): Give error if virtual table pointer is not good.
- (find_overload_match): New function. Find the best function that
- matches on the argument types according to the overload resolution
- rules.
- (_initialize_valops): Add new set/show command for overload-resolution.
-
- * value.h (VALUE_POINTED_TO_OFFSET): New macro.
- Add field pointed_to_offset to value structure.
- Add prototypes for new functions in valops.c.
-
- * value.h (write_register_pid): Change prototype to match
- function.
-
- * value.h: Hp merge, 4/15/98 snapshot
- Added parameter to val_print func decl.
- Added new macro, VALUE_EMBEDDED_OFFSET, and
- new func decl, find_rt_vbase_offset, for C++
- support.
-
- * values.c (allocate_value): Allocate also for value_embedded_offset
- and value_enclosing_type.
- (value_copy): Copy value_embedded_offset and value_enclosing_type too.
- Use all_raw in copying the value itself.
- (value_primitive_field): Add handling of base subobjects.
-
- * values.c (value_copy): Copy the pointed_to_offset as well.
- (allocate_value): Allocate the pointed_to_offset as well.
- (value_virtual_fn_field): Rewrite.
-
- * values.c (value_primitive_field): Adjust embedded offset and
- offset calculation.
-
- * values.c (value_static_field): Take into consideration that static
- data members can be minimal symbols too.
-
- * values.c (value_virtual_fn_field): Fix call to value_at.
-
- * win32-nat.c (handle_load_dll): Added params to call to symbol_file_add.
-
- Other changes have to do with XDB compatability. Leave oout
- for now.
-
- defs.h (vfprintf_filtered): Change FILE to GDB_FILE in decl.
- (fprintf_filtered): Ditto.
- (fprintfi_filtered): Ditto.
- (vfprintf_unfiltered): Ditto.
- (fprintf_unfiltered): Ditto.
-
- infcmd.c (_initialize_infcmd): If xdb_commands is set, make S an
- alias for next and define R, lr, g. Define go.
-
- pyr-tdep.c (pyr_print_insn): Change FILE to GDB_FILE.
-
-
- * breakpoint.c (create_temp_exception_breakpoint): #If it out --
- nothing calls it.
- (bpstat_stop_status): Don't call SOLIB_HAVE_LOAD_EVENT if it's not
- defined; don't call SOLIB_HAVE_UNLOAD_EVENT if it's not defined.
- (bpstat_get_triggered_catchpoints): If we don't have shared
- library support, then don't call SOLIB_LOADED_LIBRARY_PATHNAME nor
- SOLIB_UNLOADED_LIBRARY_PATHNAME.
- (watch_command_1): Don't require a run before a watch command
- unless we're on HP [it's an HP OS bug, not a generic limitation]
- (catch_load_command_1): Don't define if no shared libraries.
- (catch_command_1): Don't claim to support fork catchpoints unless
- CHILD_INSERT_FORK_CATCHPOINT is defined, don't claim to support
- vfork catchpoints unless CHILD_INSERT_VFORK_CATCHPOINT is defined,
- don't clain to support shared library load catchpoints if shared
- libraries aren't supported, and don't claim to support exec
- catchpoints unless CHILD_INSERT_EXEC_CATCHPOINT is defined
-
- There are new target_ops vector fields that pertain
- only to HPUX. Added the to_require_attach and
- to_require_detach fields to exec_ops. These new
- fields are ifdef'ed for HPUX_SNAP1.
-
- * breakpoint.h:
- Fix compile error in enum bptype.
-
- * coff-solib.h:
- Fixed a number of macro definitions. SOLIB_LOADED_LIBRARY_PATHNAME,
- SOLIB_HAVE_LOAD_EVENT, SOLIB_HAVE_UNLOAD_EVENT,
- SOLIB_UNLOADED_LIBRARY_PATHNAME, SOLIB_IN_DYNAMIC_LINKER. These
- macros are only meaningful (for now) for SOM. So, all
- the macros were defined as error(...), but were used in
- conditions. This caused the compile to crap out. I redefined
- these (for now) to be 0.
-
- * procfs.c:
- (procfs_create_inferior): Fix call to fork_inferior -- need another
- parameter.
-
- * solib.h:
- Fixed a number of macro definitions. SOLIB_LOADED_LIBRARY_PATHNAME,
- SOLIB_HAVE_LOAD_EVENT, SOLIB_HAVE_UNLOAD_EVENT,
- SOLIB_UNLOADED_LIBRARY_PATHNAME, SOLIB_IN_DYNAMIC_LINKER. These
- macros are only meaningful (for now) for SOM. So, all
- the macros were defined as error(...), but were used in
- conditions. This caused the compile to crap out. I redefined
- these (for now) to be 0.
-
- * valops.c:
- (search_struct_field): Undeclared local variable, "assigned".
- (find_rt_vbase_offset): Fixed call to value_at
-
- * value.h: Fix signature for find_rt_vbase_offset funct decl
- (missing a param)
-
-Wed Dec 30 17:48:12 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- From J.T. Conklin <jtc@redbacknetworks.com>:
- * i386-stub.c: Fix error string in last change.
-
-1998-12-30 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * utils.c: <Readline/readline.h> instead of "readline/readline.h".
-
- * configure.in (TERM_LIB): Search for the appropriate term library
- on the host system.
- * configure: Regenerated.
- * Makefile.in (TERMCAP): Set based on autoconf check.
- * config/*/*.mh: Don't override TERMCAP setting.
-
-Wed Dec 30 17:23:14 1998 Mark Alexander <marka@cygnus.com>
-
- * value.c (value_virtual_fn_field): Handle the situation where
- vtbl is a pointer to a structure instead of a pointer to an array.
-
-Mon Dec 28 17:43:36 1998 David Taylor <taylor@texas.cygnus.com>
-
- The following changes were made by Jim Blandy <jimb@cygnus.com>,
- Edith Epstein <eepstein@cygnus.com>, Elena Zannoni
- <ezannoni@cygnus.com> Stan Shebs <shebs@cygnus.com>, and David
- Taylor <taylor@cygnus.com>, as part of the project to merge in
- changes originally made by HP; HP did not create ChangeLog
- entries.
-
- * c-lang.h (cp_print_value_fields): Update prototype; fixed
- prototype decl for c_val_print function -- it needed an
- embedded_offset param; fixed prototype of cp_print_value_fields.
- Include value.h.
- (C_LANG_H): Define.
-
- * c-valprint.c (c_val_print): Add new parameter embedded_offset.
- Add embedded_offset to valaddr in function calls. fix calls to
- val_print, and cp_print_value_fields. Attempt to determine the
- real type of the object to be printed. fixed call to
- cp_print_value_fields. process TYPE_CODE_METHOD as well. moved
- call to check_typedef out of conditional. add embedded offset
- param to val_print call.
-
- (c_value_print): Add new parameter to call to val_print. Handle
- pointer to class case. Ensure that const char *, const unsigned
- char * come out without the type but the volatile variants and the
- signed variants don't.
-
- * ch-lang.h (chill_val_print): Add parameter to decl.
-
- * ch-valprint.c: The various print routines have an additional
- parameter. Currently, the new parameter is only used when printing
- C++ expressions. So, in ch-valprint.c, the new parameter is always
- 0. Changes in calls to val_print, chill_val_print, c_val_print
- Affected functions are chill_val_print_array_elements,
- chill_val_print, chill_print_value_fields, chill_value_print.
-
- * cp-valprint.c add vtable pointers names for aCC (HP) compiler.
- (cp_print_class_method): Print message for HP/aCC case.
- (cp_print_class_member): Add comments.
- (cp_print_value): Adjust address computations for virtual base
- classes. add new parameter 'offset'. Find correct offset for
- base class in HP/aCC case. Change call to cp_print_value_fields
- to have extra par.
- (cp_print_value_fields): Do not print also if the only field is
- the vtable pointer. Print out vtable ptr, for HP/aCC compiled
- case. do not print leading '=' in case of anonymous union, or
- struct. add new parameter 'offset'. Do not print the vtable
- pointer as a member, in the HP aCC case. Changed calls to
- val_print to have extra parameter.
- (cp_print_hpacc_virtual_table_entries): New function. Print vtable
- entries, in HP/aCC compiled case.
- (cp_print_static_field): Change call to cp_print_value_fields, and
- val_print.
-
- * d30v-tdep.c (d30v_print_register): Add embedded_offset param
- to val_print call.
-
- * defs.h: Additional include files included when TUI is defined.
- (gdb_file_isatty): New function decl.
- (GDB_FILE): If TUI is defined, define a structure rather
- than making this an alias for FILE.
- (gdb_stdout, gdb_stderr): If TUI is defined, then define these
- as pointers to variables of type GDB_FILE rather than making them
- be aliases for stdout and stderr.
- (TUIDO): Add definition conditionalized on definition
- (or lack thereof) of TUI.
- (command_class): Add two additional values.
- (precision_type): New enum.
- (gdb_fclose): Add decl.
- (store_address): Change prototype to match function.
- (tui_version, xdb_commands, dbx_commands): Add decls.
- (gdb_file_deallocate): New function decl
- (pa_do_strcat_registers_info): New function decl.
- (streamtype): New enumerated type to distinguish between output to
- a FILE and output to a buffer.
- (tui_stream): New struct type, named GDB_FILE.
- (gdb_stdout): Of type GDB_FILE, will pass this around gdb rather
- than stdout.
- (gdb_stderr): Of type GDB_FILE, will pass this around gdb rather
- than stderr.
- (fputs_unfiltered_hook): Change stream parameter from FILE to
- GDB_FILE.
- (flush_hook): Change stream parameter from FILE to GDB_FILE.
- (gdb_fclose): Fix decl for gdb_fclose; parameter is now of
- type GDB_FILE **.
- (gdb_file_adjust_strbuf): New function decl. function lives
- in utils.c.
- (gdb_file_init_astring): New function decl. function lives
- in utils.c.
- (gdb_file_get_strbuf): New function decl. function lives in
- utils.c.
- (source_full_path_of): Declare.
-
- * exec.c (_initialize_exec): Make definition of file command be
- dependent upon dbx_commands not being set.
- (exec_file_attach): New function.
- (exec_file_command): Call it.
- (exec_ops): Add new target vector fields.
-
- * f-lang.h (f_print_type): Change FILE to GDB_FILE in decl.
- (f_val_print): Ditto.
- (f_val_print): Add parameter to the function decl.
-
- * f-valprint.c (_initialize_f_valprint): If xdb_commands is set,
- define lc command.
- (f77_create_arrayprint_offset_tbl): Change FILE to GDB_FILE.
- (f77_print_array): Ditto.
- (f77_print_array_1): Ditto.
- (f_val_print): Ditto.
- (f_val_print): Add a parameter; this new parameter is currently
- only non-zero when handling C++ expressions. In this file its
- value is always 0. changed fflush to gdb_flush.
-
- * gnu-nat.c: (init_gnu_ops): Add new target vector fields.
- (gnu_create_inferior): Add param to fork_inferior call.
-
- * hppa-tdep.c (after_prologue): If f is NULL, don't dereference
- it. if no debug info, return zero telling caller that we need to
- find the end of the prologue via the hard way (instruction
- examination).
- (find_unwind_entry): Avoid dereferencing a null
- pointer.
- (hppa_pid_to_exec_file): Deleted -- no longer used.
- (hppa_prepare_to_proceeed): Add prototype.
- (read_unwind_info): Purecov comments, bug fixes.
- (find_unwind_entry): Purecov comments, bug fixes.
- (find_stub_with_shl_get): Purecov comments.
- (frame_chain): Additional parens.
- (hppa_push_arguments): Changes to commented out version of routine.
- (hppa_fix_call_dummy): Purecov comments, fix location of end.o.
- (in_solib_call_trampoline): Purecov comments.
- (in_solib_return_trampoline): Purecov comments.
- (setup_d_pid_in_inferior): Fix location of end.o.
- (initialize_hp_cxx_exception_support): Fix location of end.o.
- (child_enable_exception_callback): Purecov comments.
- (pa_do_strcat_registers_info): Has a new parameter, precision,
- which is passed into the call to pa_strcat_fp_reg to indicate
- whether to display the floating point registers using
- single or double preceision.
- (pa_strcat_registers): Introduce local variable, precision, and
- pass it into call to pa_strcat_fp_reg.
- (pa_strcat_fp_reg): Modified function. New parameter, precision,
- used by function to decide whether to use single or double
- precision. Also add the code to put a double precision value
- into a buffer.
- (pa_do_strcat_registers_info): New routine. called by
- tui/tuiRegs.c:_tuiRegisterFormat to place a register name
- and value into a string buffer. Interface may change in
- future. Checking this in so that we have something
- functional for HP.
- (pa_strcat_registers): New routine, called by
- pa_do_strcat_registers_info. Does same thing as
- pa_print_registers except it takes a stream parameter.
- This routine should disappear in future. Checking in
- so that we have something functional to give HP
- (pa_strcat_fp_reg): New routine, called by
- pa_do_strcat_registers_info and pa_strvat_registers
- to place a floating point register name and value into
- a buffer. This interface may change in future.
- Checking in so that we have something functional to give HP.
- (pa_print_fp_reg): Change prototype to match def'n.
- (pa_register_look_aside): Fix comment immediately before function.
- Changes to better support stack unwinding, reading and writing
- registers for HPUX. New includes ptrace.h, bfd.h, dl.h.
- (internalize_unwinds): Initialize new fields in table.
- (read_unwind_info): Entries in the table are now more complex
- structures. References of the form ...->table[index].stub_type are
- now ...->table[index].stub_unwind.stub_type.
- (find_proc_framesize): Add a check for pc == 0.
- (rp_saved): Entries in the table are now more complex
- structures. References of the form ...->table[index].stub_type are
- now ...->table[index].stub_unwind.stub_type.
- (frameless_function_invocation): Stub_type becomes
- stub_unwind.stub_type
- (saved_pc_after_call): Stub_type becomes stub_unwind.stub_type
- (hppa_frame_saved_pc): Stub_type becomes stub_unwind.stub_type
- (frame_chain_valid): Stub_type becomes stub_unwind.stub_type
- (hppa_call_dummy): Stub_type becomes stub_unwind.stub_type
- (pa_print_fp_reg): Additional params to call val_print
- (in_solib_call_trampoline): Stub_type becomes
- stub_unwind.stub_type
- (in_solib_return_trampoline): Stub_type becomes
- stub_unwind.stub_typ
- (skip_trampoline_code): Additional code to handle external
- dyncalls. Also stub_type becomes stub_unwind.stub_type
- (hppa_pid_to_exec_file): New funct. FOr HPUX 10.0 and beyond there
- is an explicit ptrace request for getting the pathname associated
- with a process id (pid).
- (hppa_pid_to_exec_file): Remove unwanted param from call to
- call_ptrace.
- (args_for_find_stub): New structure.
- (find_unwind_entry): Deal with null input pc value.
- (rp_saved): Ditto.
- For the import stub, return -24 always.
- (hppa_frame_saved_pc): Save old pc value, to detect we are in a loop.
- (init_extra_frame_info): Use TARGET_READ_FP.
- (frame_chain): Include thread support.
- If the caller's pc is zero, we lose and return, just like stack
- bottom.
- Disable warning about being unable to find unwind info.
- (hppa_push_arguments): Rewrite.
- (hppa_value_returned_from_stack): New function. Handles returning
- a value larger than 64 bits, stored on the stack.
- (find_stub_with_shl_get): New function. To look up symbols in shlibs.
- (cover_find_stub_with_shl_get): New function. Cover routine for
- find_stub_with_shl_get to pass to catch_errors.
- (hppa_fix_call_dummy): Comment out old stub mechanism.
- Rewrite using dyncall.
- (target_read_fp): New function.
- (pa_do_registers_info): Floating point registers start at FP4.
- (pa_print_registers): Use FP4_REGNUM instead of 72.
- (skip_trampoline_code): Do machine instruction matching for PA2.0.
- (setup_d_pid_in_inferior): New function. Exception handling support.
- (initialize_hp_cxx_exception_support): Ditto.
- (child_enable_exception_callback): Ditto.
- (child_get_current_exception_event): Ditto.
-
- * hpux-thread.c (hpux_thread_ops): Add new target vector fields.
-
- * infcmd.c: Include objfiles.h.
- (attach_command): New local variable, exec_file, add code to
- determine exec_file from pid if exec_file is not already known,
- call new target operation, target_post_attach -- a no-op unless
- on HPUXHPPA.
- (detach_command): After detaching, do a SOLIB_RESTART.
- (objfiles.h): Fix typo on include line.
- (run_command): Only call SOLIB_RESTART if it's defined.
- (detach_command): Ditto.
- (run_command): If program has already been started, and decide
- to restart it, the kill the target, flush the caches,
- call init_wait_for_inferior. Also purge old solib objfiles.
- (run_stack_dummy): Add calls to
- disable_watchpoints_before_interactive_call_start and
- enable_watchpoints_after_interactive_call_stops.
- (finish_command): Alter code handling the evaluation and printing
- of the target function's return value.
- (attach_command): When given a pid, but no exec file, try to
- determine the exec file from the process. If the process does not
- record a full path name, try to qualify the filename against the
- source path.
- (_initialize_infcmd): Add some verbiage about how to use the
- attach command.
- (do_registers_info): Changed calls to val_print
- made the symfile.h include preceed the
- objfiles.h include. The other ordering caused a
- compile problem (incompletely defined types).
-
- * inftarg.c (child_post_attach): Fix decl, make static.
- (proc_wait): Make globally visible.
- (child_insert_fork_catchpoint, etc): Fix return type.
- (child_detach_from_process): Declare.
- (child_attach_to_process): Declare.
- (child_stop): Make static to match decl.
- (ptrace_him): Change prototype back to return int.
- (ptrace_me): Remove debug output, pass NULL to fork_inferior if
- not HPUX.
- (proc_wait): function prototype and definition are enclosed by
- proc_wait ifndef
- (child_attach_to_process): New function, does most of the work
- that child_attach used to do and some additional work to determine
- whether gdb is already attached to the target how to react.
- (child_attach): Altered. It's now a wrapper for
- child_attach_to_process.
- (child_require_attach): New function, called if should attach even
- when gdb is already attached to target.
- (child_detach_from_process): New function, does most of the work
- that child_detach used to do and some additional work to determine
- whether gdb is currently attached to the target.
- (child_detach): Altered. It's now a wrapper for
- child_detach_from_process.
- (child_require_detach): New function, called if should try to
- detach even when gdb is not attached to target.
- (ptrace_him): Calls a new function,
- target_acknowledge_forked_child. Currently,
- target_acknowledge_forked_child, is only defined to do something
- for HPUX.
- (child_create_inferior): Changed call to fork_inferior.
- (child_ops): Add to_require_attach and to_require_detach fields
- to the child_ops target ops vector.
- Some hacks for ttrace work:
- (child_wait): Additional local variables, additional code in
- while loop to check for process exited, process forked,
- process vforked, process execd.
- (child_thread_alive): John B. seems to think that the kill
- call is inapproapriate for HPUX.
- (child_attach_to_process): Using strtol rather than atoi.
- no longer check for case where there is no known exec file.
- (child_post_attach): New function, a default, a no-op.
- (child_insert_fork_catchpoint): New function, a default, a no-op.
- (child_remove_fork_catchpoint): New function, a default, a no-op.
- (child_insert_vfork_catchpoint): New function, a default, a no-op.
- (child_remove_vfork_catchpoint): New function, a default, a no-op.
- (child_can_follow_vfork_prior_to_exec ):new function, a default,
- a no-op.
- (child_insert_exec_catchpoint): New function, a default, a no-op.
- (child_remove_exec_catchpoint): New function, a default, a no-op.
- (child_has_execd): New function, a default, returns 0.
- (child_reported_exec_events_per_exec_call): New function, a
- default, returns 1.
- (child_has_exited): New function, a default.
- (child_core_file_to_sym_file): New function, a default, returns NULL.
- (child_ops): Initialize new target vector fields.
-
- * jv-lang.h: (Java_val_print): Add embedded_offset param to func
- decl.
-
- * jv-valprint.c: Changing calls to val_print to accomodate new param.
- (java_value_print): Add embedded_offset param to val_print call
- (java_print_value_fields): Add embedded_offset param to val_print
- call.
- (java_val_print): Add embedded_offset param. alter call to
- c_val_print to accomodate embedded_offset param.
-
- * language.c (lang_bool_type): Return builtin_type_bool in c++
- case.
- (unk_lang_val_print): Add embedded_offset param to
- prototype decl and definition.
-
- * language.h (LA_VAL_PRINT macro, la_val_print function decl):
- altered to accomodate the new parameter to the various print
- functions.
-
- * m2-lang.h (m2_val_print): Add a parameter to the function decl.
-
- * m2-valprint.c (m2_val_print): Add a parameter.
- This parameter is currently only used when evaluating C++
- expressions. So, it is always 0 in this file.
-
- * m3-nat.c (m3_create_inferior): Add param to fork_inferior call
- (m3_pid_to_exec_file): New function
- (m3_ops): Add new target vector fields.
-
- * mac-nat.c (init_child_ops): Add new target vector fields.
-
- * mips-tdep.c: Chnages to accomodate additional parameter
- to val_print.
- (mips_print_register): Alter calls to val_print
-
- * monitor.c (monitor_write): Change stderr to gdb_stderr.
- (monitor_remove_breakpoint): Ditto.
- (init_base_monitor_ops): Add new target vector fields.
-
- * ppc-bdm.c (init_bdm_ppc_ops): Add new target vector fields.
-
- * printcmd.c (do_examine): When saving a value_ptr, remove it from
- the list of value_ptr's to be freed automatically; when discarding
- a previously saved value_ptr, free it.
- (print_formatted): Update comments; add new comments.
- (printf_command, print_insn): Purecov comments.
- (_initialize_printcmd): Add assign as a command if dbx_commands is
- set; create va as an alias for disassemble if xdb_commands is set.
- (address_info): New cases LOC_INDIRECT and
- LOC_THREAD_LOCAL_STATIC.
- (display_command): If tui_version and exp starts with a '$', then
- don't display it unless tui_vSetLayoutTo fails.
- (disassemble_command): Add tuiDo calls.
- (print_scalar_formatted): For integers that are long long, check
- the print format and print out in binary octal, decimal, or
- hex. Call the new print_*_chars functions in valprint.c
- (print_frame_args): Altered calls to val_print, to reflect
- additional parameter to val_print (case LOC_BASEREG_ARG).
-
- * procfs.c: (Procfs_init_inferior): Return value is now a void.
- (procfs_ops): Add new target vector fields.
- (procfs_create_inferior): Fix call to fork_inferior -- need another
- parameter.
-
- * remote-adapt.c (adapt_open): Change stderr to gdb_stderr.
- (adpat_insert_breakpoint): Ditto.
- (init_adapt_ops): Add new target vector fields.
-
- * remote-array.c (array_wait): Change fflush to gdb_flush and
- stdout to gdb_stdout.
- (init_array_ops): Add new target vector fields.
-
- * remote-bug.c (bug_load): Change fflush to gdb_flush; stdout to
- gdb_stdout.
- (bug_wait): Change stderr to gdb_stderr.
- (bug_insert_breakpoint): Ditto.
- (init_bug_ops): Add new target vector fields.
-
- * remote-e7000.c
- (init_e7000_ops): Add new target vector fields.
- * remote-eb.c (init_eb_ops): Ditto.
- * remote-es.c (init_es1800_ops): Ditto.
- (init_es1800_child_ops): Ditto.
- * remote-es.c (init_es1800_ops): Ditto.
- (init_es1800_child_ops): Ditto.
- * remote-hms.c (init_hms_ops): Ditto.
- * remote-hms.c (init_hms_ops): Ditto.
- * remote-nindy.c (init_nindy_ops): Ditto.
- * remote-nrom.c (init_nrom_ops): Ditto.
- * remote-os9k.c (init_rombug_ops): Ditto.
- * remote-rdp.c (init_remote_rdp_ops): Ditto.
- * remote-sds.c (init_sds_ops): Ditto.
- * remote-sim.c (init_gdbsim_ops): Ditto.
- * remote-st.c (init_st2000_ops): Ditto.
- * remote-udi.c (init_udi_ops): Ditto.
- * remote-vx.c (init_vx_ops): Ditto.
- (init_vx_run_ops): Ditto.
- * remote-vx.c: (Init_vx_ops): Ditto.
- (init_vx_run_ops): Ditto.
-
- * remote-mips.c (mips_getstring): Change stderr to gdb_stderr.
- (pmon_insert_breakpoint): Ditto.
- (pmon_remove_breakpoint): Ditto.
- (check_lsi_error): Ditto.
- (common_breakpoint): Ditto.
- (pmon_makeb64): Ditto.
-
- * remote-mips.c (mips_xfer_memory): Change fflush to gdb_flush;
- change stdout to gdb_stdout.
-
- * remote-mm.c (mm_open): Change stderr to gdb_stderr.
- (init_mm_ops): Add new target vector fields.
- (mm_load): Fixed params in commented out call to symbol_file_add.
-
- * remote-nindy.c (instream): Change decl to FILE.
-
- * remote-udi.c (udi_load): Fixed params in call to symbol_file_add.
-
- * remote-vx.c (vx_add_symbols): Fixed params in call to
- symbol_file_add.
-
- * remote.c (init_remote_ops): Cosmetic change to match expected
- test output.
-
- * rs6000-nat.c (add_vmap): Add params to call to allocate_objfile.
-
- * scm-lang.h: Add parameter to scm_val_print function decl.
-
- * scm-valprint.c (scm_scmval_print): Cast svalue to (int); new
- parameter. This parameter is currently only used when evaluating
- C++ expressions. So, it is always 0 in this file.
- (c_val_print): Fixed prototype decl; it needed an embedded_offset
- param.
-
- * sol-thread.c (sol_core_ops): Add new target vector fields.
- (sol_thread_ops): Ditto.
-
- * somsolib.c (DLD_FLAGS_MAPPRIVATE): New macro.
- Define bit of __dld_flags in HP-UX a.out files.
- (DLD_FLAGS_HOOKVALID): Ditto.
- (DLD_FLAGS_LISTVALID): Ditto.
- (DLD_FLAGS_BOR_ENABLE): Ditto.
- (som_solib_total_st_size): Cumulative size in bytes of the
- symbol tables of all shared objects on the so_list_head list.
- (som_solib_st_size_threshhold_exceeded): Threshold for adding symbols
- for shlibs.
- (som_solib_sizeof_symbol_table): New function. Computes size of
- symbol table for a shlib.
- (som_solib_load_symbols): New function. Load symbols from shlib.
- (som_solib_add): Detect if __dld_list is not valid.
- Record main program's symbol table size.
- Load symbols if called from command line.
- Keep threshold into account when loading shlib symbols.
- (som_solib_create_inferior_hook): Use dld_flags macros.
- (som_sharedlibrary_info_command): Let user know if symbols were
- not loaded.
- (som_solib_restart): Discard all the shlibs descriptors.
- (_initialize_som_solib): Chenge help message for auto-solib-add
- command.
- Set threshold for symbol table to 50 megabytes.
- (_initialize_som_solib): Add call to som_solib_restart.
- (som_solib_restart): New function
- (som_solib_in_dynamic_linker): New function
- (som_solib_desire_dynamic_linker_symbols): New function
- (som_solib_unloaded_library_pathname): New function
- (som_solib_loaded_library_pathname): New function
- (som_solib_library_pathname): New function
- (som_solib_have_unload_event): New function
- (som_solib_have_load_event): New function
- (som_solib_create_catch_unload_hook): New function
- (som_solib_create_catch_load_hook): New function
- (som_solib_create_inferior_hook): Rewritten
- dld_cache: New struct
- addr_and_unwind_t: New struct
- (find_unwind_entry) add prototype
- Include assert.h, remove references to ASSERT macro,
- add include of fcntl.h so that O_RDONLY is defined.
- (som_solib_create_inferior_hook): Introduce new local
- msymbol2 and change some msymbol's to msymbol2's -- was clobbering
- msymbol, passing a NULL to lookup_minimal_symbol_solib_trampoline,
- and ultimately core dumping with a SEGV.
- (som_solib_mapped_entry): Additional comments for text_addr,
- text_link_addr, text_end, and tsd_start_addr fields. Commenting
- out 2 tsd fields, __data_start and __data_end.
- (som_solib_add_solib_objfile): Add params to calls to symbol_file_add.
- Add some code for distinguishing between a shared library and other
- objfiles. This appears to be a prelude to thread local storage.
- (som_solib_load_symbols): Changes to printf statement
- enclosed by SOLIB_DEBUG ifdef.
- (som_solib_add): Change comment to correctly specify path
- to end.o -- /opt/langtools/lib/end.o. changes to printf statement
- enclosed by SOLIB_DEBUG ifdef.
- Removed several SOLIB_DEBUG ifdefs and the associated printfs.
- Add code to find the start address for the object file's thread
- local storage
- (som_solib_create_inferior_hook): Fix warning messages use correct
- path to end.o -- /opt/langtools/lib/end.o. Change control flow.
- No longer user early returns from function is cases of error.
- (reset_inferior_pid): New function
- (som_solib_remove_inferior_hook): New function
- (so_lib_thread_start_addr): New function. used for tsd.
- (struct som_solib_mapped_entry): Add new field tsd_start_addr.
- (struct so_list): Add new field solib_addr.
- (som_solib_add_solib_objfile): New function.
- (som_solib_load_symbols): Rewritten.
- (som_solib_add): Make sure we don't load the symbols in if the
- threshold was exceeded.
- (som_solib_get_solib_by_pc): New function. Return the address of
- handle of the shared library.
- (som_solib_restart): Disable breakpoints at restart.
-
- * sparcl-tdep.c (init_sparclite_ops): Add new target vector fields.
-
- * target.c (cleanup_target): Changed casting of default functions
- for to_has_forked, to_has_vforked, to_pid_to_exec_file to get rid
- of warnings. Fixed PARAMS for to_has_syscall_event. Fixed the
- return type on a few of the default function values.
- (cleanup_target): Changes in the de_fault macro, both to
- accomodate the new target_ops vector fields and to use
- more accurate default functions.
- (debug_to_open): Change stderr to gdb_stderr.
- (debug_to_close): Ditto.
- (debug_to_attach): Ditto.
- (debug_to_post_attach): Ditto.
- (debug_to_require_attach): Ditto.
- (debug_to_detach): Ditto.
- (debug_to_require_detach): Ditto.
- (debug_to_resume): Ditto.
- (debug_to_wait): Ditto.
- (debug_to_post_wait): Ditto.
- (debug_to_fetch_registers): Ditto.
- (debug_to_store_registers): Ditto.
- (debug_to_prepare_to_store): Ditto.
- (debug_to_xfer_memory): Ditto.
- (debug_to_files_info): Ditto.
- (debug_to_insert_breakpoint): Ditto.
- (debug_to_remove_breakpoint): Ditto.
- (debug_to_terminal_init): Ditto.
- (debug_to_terminal_inferior): Ditto.
- (debug_to_terminal_ours_for_output): Ditto.
- (debug_to_terminal_ours): Ditto.
- (debug_to_terminal_info): Ditto.
- (debug_to_kill): Ditto.
- (debug_to_load): Ditto.
- (debug_to_lookup_symbol): Ditto.
- (debug_to_create_inferior): Ditto.
- (debug_to_post_startup_inferior): Ditto.
- (debug_to_acknowledge_created_inferior): Ditto.
- (debug_to_clone_and_follow_inferior): Ditto.
- (debug_to_post_follow_inferior_by_clone): Ditto.
- (debug_to_insert_fork_catchpoint): Ditto.
- (debug_to_remove_fork_catchpoint): Ditto.
- (debug_to_insert_vfork_catchpoint): Ditto.
- (debug_to_remove_vfork_catchpoint): Ditto.
- (debug_to_has_forked): Ditto.
- (debug_to_has_vforked): Ditto.
- (debug_to_can_follow_vfork_prior_to_exec): Ditto.
- (debug_to_post_follow_vfork): Ditto.
- (debug_to_insert_exec_catchpoint): Ditto.
- (debug_to_remove_exec_catchpoint): Ditto.
- (debug_to_has_execd): Ditto.
- (debug_to_reported_exec_events_per_exec_call): Ditto.
- (debug_to_has_syscall_event): Ditto.
- (debug_to_has_exited): Ditto.
- (debug_to_mourn_inferior): Ditto.
- (debug_to_can_run): Ditto.
- (debug_to_notice_signals): Ditto.
- (debug_to_thread_alive): Ditto.
- (debug_to_stop): Ditto.
- (debug_to_enable_exception_callback): Ditto.
- (debug_to_get_current_exception_event): Ditto.
- (debug_to_pid_to_exec_file): Ditto.
- (debug_to_core_file_to_sym_file): Ditto.
- (default_clone_and_follow_inferior): New function prototype
- decl and function definition.
- (dummy_target): Add new target_ops vector fields and their
- initializations. More target_ops vector changes for HPUX new
- fields.
- (de_fault): Add new HPUX specific target_ops operations to the
- de_fault macro
- (INHERIT): Add new HPUX specific target_ops operations.
- (debug_to_post_wait): New function.
- (debug_to_post_startup_inferior): Ditto.
- (debug_to_acknowledge_created_inferior): Ditto.
- (debug_to_clone_and_follow_inferior): Ditto.
- (debug_to_post_follow_inferior_by_clone): Ditto.
- (debug_to_create_catch_fork_hook): Ditto.
- (debug_to_create_catch_vfork_hook): Ditto.
- (debug_to_has_forked): Ditto.
- (debug_to_has_vforked): Ditto.
- (debug_to_post_follow_vfork): Ditto.
- (setup_target_debug): Initialize new target_ops vector fields.
- (nosupport_runtime): New function, used in cleanup_target
- (update_current_target): Add new new target_ops vector fields to
- the INHERIT macro definition.
- (generic_mourn_inferior): The call to breakpoint_init_inferior now
- takes a parameter.
- (normal_pid_to_str): Add a \0 to the end of buf.
- (debug_to_has_syscall_event): New function.
- (debug_to_enable_exception_callback): New function.
- (debug_to_get_current_exception_event): New function.
- (setup_target_debug): Initialize the 3 new target_ops vector fields
- (struct signals): Fix message associated with SIGRETRACT.
- (return_one): New function, used by the de_fault macro
- (debug_to_post_attach): New function.
- (debug_to_wait): Add new cases TARGET_WAITKIND_FORKED,
- TARGET_WAITKIND_VFORKED, TARGET_WAITKIND_EXECD.
- (debug_to_insert_fork_catchpoint): New function.
- (debug_to_remove_fork_catchpoint): Ditto.
- (debug_to_insert_vfork_catchpoint): Ditto.
- (debug_to_remove_vfork_catchpoint): Ditto.
- (debug_to_can_follow_vfork_prior_to_exec): Ditto.
- (debug_to_insert_exec_catchpoint): Ditto.
- (debug_to_remove_exec_catchpoint): Ditto.
- (debug_to_core_file_to_sym_file): Ditto.
- (setup_target_debug): Give new fields in current_target target_ops
- vector values.
-
- * target.h: Include symtab.h.
- (target_waitkind): New enumerated values
- TARGET_WAITKIND_SYSCALL_ENTRY, TARGET_WAITKIND_SYSCALL_RETURN,
- TARGET_WAITKIND_FORKED, TARGET_WAITKIND_VFORKED,
- TARGET_WAITKIND_EXECD.
- (target_waitstatus): Add a syscall_id field to structure.
- (child_has_syscall_event): New decl.
- (child_thread_alive): New decl.
- (target_ops): Add 3 new fields: To_has_syscall_event,
- to_enable_exception_callback, to_get_current_exception_event
- (target_enable_exception_callback): New macro.
- (target_has_syscall_event): New macro.
- (target_get_current_exception_event): New macro.
- (TARGET_DISABLE_HW_WATCHPOINTS): New macro.
- (TARGET_ENABLE_HW_WATCHPOINTS): New macro.
- (PC_REQUIRES_RUN_BEFORE_USE): New macro.
- (target_tid_to_str): New macro.
- (target_waitstatus): Additional fields in struct to keep track
- of child pid and pathname to execd file.
- (target_ops): Add in the new target_ops function pointer fields.
- New macros to go along with new target_ops fields.
- In target_waitstatus.value, change name of child_pid field to
- related_pid.
- (target_pid_or_tid_to_str): Define default macro.
- Add missing #endif after PC_REQUIRES_RUN_BEFORE_USE definition
- (ENSURE_VFORKING_PARENT_REMAINS_STOPPED): Define default macro.
- (RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK): Define default
- macro.
- There are new function decls for to_require_attach
- and to_require_detach. There are also new macros,
- target_require_attach and target_require_detach. There are
- also new function decls for find_default_require_detach
- and find_default_require_attach.
- (target_ops): New fields to_post_wait, to_post_startup_inferior
- to_acknowledge_created_inferior, to_clone_and_follow_inferior,
- to_post_follow_inferior_by_clone, to_create_catch_fork_hook,
- to_create_catch_vfork_hook, to_has_forked, to_has_vforked,
- to_post_follow_vfork, to_pid_to_exec_file.
- New function definitions child_pid_to_exec_file, child_post_wait,
- child_post_startup_inferior, child_acknowledge_created_inferior,
- child_clone_and_follow_inferior,
- child_post_follow_inferior_by_clone, child_create_catch_fork_hook,
- child_create_catch_vfork_hook, child_has_forked,
- child_has_vforked, child_acknowledge_created_inferior,
- child_post_follow_vfork.
- New macros target_post_startup_inferior,
- target_acknowledge_created_inferior,
- target_clone_and_follow_inferior,
- target_post_follow_inferior_by_clone,
- target_create_catch_fork_hook, target_create_catch_vfork_hook,
- target_pid_to_exec_file.
- (find_default_clone_and_follow_inferior): New function prototype.
-
-
- * v850ice.c (init_850ice_ops): Init new target vector fields.
-
- * valprint.c (print_binary_chars): Print out long long as
- a binary number.
- (print_octal_chars): Print out long long as an octal number
- (print_decimal_chars): Print out long long as a decimal number
- (strcat_longest): Define it.
- * valprint.c: Hp merge, 4/15/98 snapshot
- Add parameter to val_print. This is used for
- evaluating C++ expressions.
-
- * value.h (VALUE_POINTED_TO_OFFSET): New macro.
- Add field pointed_to_offset to value structure.
- Add prototypes for new functions in valops.c.
- (write_register_pid): Change prototype to match
- function.
- (val_print function decl): Additional parameter.
- (VALUE_EMBEDDED_OFFSET): New macro.
- (find_rt_vbase_offset): New function decl -- for C++ support.
-
-Wed Dec 23 15:03:42 1998 Per Bothner <bothner@cygnus.com>
-
- * Makefile.in (READLINE_CFLAGS): Search $(READLINE_SRC)/.. rather
- than $(READLINE_SRC) so #include <readline/readline.h> will work.
- * top.c: #include <readline/history.h> instead of "history.h".
- * tracepoint.c: Likewise.
- * mac-xdep.c: Likewise.
-
-Wed Dec 23 12:32:00 1998 Andrew Cagney <cagney@chook.cygnus.com>
-
- * defs.h (TARGET_FLOAT_FORMAT, TARGET_DOUBLE_FORMAT): Define using
- TARGET_BYTE_ORDER and not target_byte_order.
-
-Tue Dec 22 10:51:33 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * config/i386/cygwin.mh (TERMCAP): define.
- (from Chris Faylor, cgf@cygnus.com)
-
- * top.c: specify directory name for including readline.h
-
- * tracepoint.c: ditto.
-
- * utils.c: ditto.
-
-Mon Dec 21 13:30:34 1998 Mark Alexander <marka@cygnus.com>
-
- * value.c (value_virtual_fn_field): Handle the situation where
- vtbl is a pointer to a structure instead of a pointer to an array.
-
-Mon Dec 21 10:38:11 1998 Andrew Cagney <cagney@chook>
-
- * mips-tdep.c: (MIPS_DEFAULT_FPU_TYPE): Default to
- MIPS_FPU_DOUBLE.
-
-1998-12-17 J.T. Conklin <jtc@redbacknetworks.com>
-
- * blockframe.c (get_frame_saved_regs): If the saved_regs_addr ptr
- is null, ensure that saved registers are copied from the local
- variable that was used to obtain them.
-
-Sat Dec 19 09:55:09 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * mips-tdep.c (mips32_heuristic_proc_desc): Clear temp_saved_regs
- on restart. Fixes problem with backtracing through functions that
- use virtual frame pointers.
-
-Fri Dec 18 14:23:34 1998 Andrew Cagney <cagney@chook>
-
- * mips-tdep.c (mips_push_arguments): Don't left-shift small
- structs being passed in a register when an O64 target.
-
- * config/mips/tm-mips.h (enum mips_fpu_type, mips_fpu): Move to
- mips-tdep.c.
-
- * mips-tdep.c (mips_fpu_string): Delete variable.
- (mips_fpu_type_auto): New variable.
- (mips_fpu_type): Rename mips_fpu.
- (_initialize_mips_tdep): Delete initialization of mips_fpu et.al.
- Rewrite ``set mipsfpu'' command set.
- (set_mipsfpu_command, show_mipsfpu_command,
- set_mipsfpu_single_command, set_mipsfpu_double_command,
- set_mipsfpu_none_command, set_mipsfpu_auto_command): New
- functions, handle commands.
- (mips_push_arguments, mips_push_dummy_frame, mips_pop_frame,
- mips_extract_return_value): Update.
-
-Thu Dec 17 02:15:40 1998 Andrew Cagney <cagney@chook.cygnus.com>
-
- * configure.tgt (gdb_target): Identify mips64*vr4100*-*-elf* as
- vr4100.
-
-Thu Dec 17 01:34:36 1998 Andrew Cagney <cagney@chook>
-
- * gdbtypes.c (build_gdbtypes): New function.
- (_initialize_gdbtypes): Call.
-
-Wed Dec 16 11:47:00 1998 Andrew Cagney <cagney@chook>
-
- * gdbarch.c (show_architecture): Use TARGET_ARCHITECTURE.
- * gdbarch.h, gdbarch.c: Fix typo's. Use struct's in preference to
- types.
- * gdbarch.h, gdbarch.c (gdbarch_debug): Add ``set archdebug'' to
- command set.
-
-Tue Dec 15 23:46:40 1998 Andrew Cagney <cagney@chook>
-
- * config/mips/tm-*.h: (TARGET_BYTE_ORDER_DEFAULT,
- TARGET_BYTE_ORDER_SELECTABLE_P): Replace TARGET_BYTE_ORDER and
- TARGET_BYTE_ORDER_SELECTABLE.
-
-1998-12-14 Anthony Thompson (athompso@cambridge.arm.com)
-
- * remote-rdp.c (rdp_init): Don't discard first character on reset.
- (translate_open_mode): Define table.
- (exec_swi): Handle SWI_Clock. SWI_Open now handles stdin/stdout.
- SWI_Write returns number of bytes not written. SWI_Read does the
- same. SWI_Seek should return success/failure flag. Fix SWI_Flen.
-
-1998-12-14 J.T. Conklin <jtc@redbacknetworks.com>
-
- * config/i386/nbsd.mh, config/m68k/nbsd.mh, config/ns32k/nbsd.mh
- (XDEPFILES): Add ser-tcp.o.
-
-Mon Dec 14 14:46:13 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * monitor.c (monitor_expect, monitor_printf_noecho,
- monitor_printf): Always compile EXTRA_RDEBUG code.
- (RDEBUG): Ditto.
-
- From Michael Meissner <meissner@cygnus.com>:
- * ppcbug-rom.c (init_ppc_cmds): Cleanup formatting.
-
-1998-12-08 Michael Meissner <meissner@cygnus.com>
-
- * monitor.c (monitor_printable_string): New function to convert a
- string into a printable representation.
- (monitor_error): Call error after converting string into printable
- format.
- (monitor_printf{,_noecho}): If EXTRA_RDEBUG is defined, convert
- string into printable form before printing.
- (monitor_expect): Ditto.
- (monitor_read_memory{,_single}): Call monitor_error, not error.
- (monitor_read_memory): Return immediately if length is 0.
-
- * ppcbug-rom.c (init_ppc_cmds): Fill in dump_registers field,
- which is now required.
-
-Mon Dec 14 11:01:39 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbarch.h, gdbarch.c: Consolidate the semi-dynamic target system
- dependant GDB parameters.
- (set_gdbarch_from_file): Combine set_architecture_from_file and
- set_byte_order_from_file.
- * top.c, defs.h, printcmd.c: Delete them from here.
- * Makefile.in: Add gdbarch.[ch].
- * exec.c (exec_file_command): Call set_gdbarch_from_file.
-
-Sun Dec 13 09:52:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * defs.h (TARGET_PRINT_INSN_INFO, TARGET_PRINT_INSN): Define.
- (TARGET_ARCHITECTURE, TARGET_ARCHITECTURE_AUTO): Define.
- (TARGET_BYTE_ORDER_AUTO): Define.
- (TARGET_BYTE_ORDER_SELECTABLE_P): Provide default. Replaces
- TARGET_BYTE_ORDER_SELECTABLE. Handle compat issues.
- (BITS_BIG_ENDIAN): Simplify.
- (TARGET_FLOAT_FORMAT): Ditto.
- (TARGET_DOUBLE_FORMAT):
-
- * remote-e7000.c, sh-tdep.c, printcmd.c, remote-sim.c,
- remote-rdi.c, sparc-tdep.c: Update.
-
- * config/powerpc/tm-ppcle-eabi.h, config/rs6000/tm-rs6000.h,
- config/powerpc/tm-ppc-eabi.h, config/mn10300/tm-mn10300.h:
- Convert.
-
-Sat Dec 12 09:28:13 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * frame.h (struct frame_info): Add CORE_ADDR *saved_regs and
- struct frame_extra_info *extra_info.
- (frame_obstack_alloc, frame_saved_regs_zalloc): Prototype.
- (SIZEOF_FRAME_SAVED_REGS): Provide default.
- (FRAME_INIT_SAVED_REGS): Provide default.
- (struct frame_saved_regs): Deprecate.
- (EXTRA_FRAME_INFO): Deprecate.
-
- * blockframe.c (frame_obstack_alloc, frame_saved_regs_zalloc): New
- function.
- (generic_get_saved_register): Use FRAME_INIT_SAVED_REGS and
- frame->saved_regs.
- (frame_cache_obstack): Make static.
- (get_frame_saved_regs): Deprecate. Copy the saved regs into the
- frame buffer.
-
- * stack.c (frame_info): Rewrite using frame->saved_regs and
- FRAME_INIT_SAVED_REGS.
- * findvar.c (find_saved_register): Ditto.
-
- * config/mn10300/tm-mn10300.h (EXTRA_FRAME_INFO): Delete.
- (FRAME_FIND_SAVED_REGS): Replace with FRAME_INIT_SAVED_REGS. No-op.
- * mn10300-tdep.c: Update.
- (analyze_dummy_frame): New function.
- (struct frame_extra_info): Define.
- (mn10300_init_extra_frame_info): Update.
-
- * config/rs6000/tm-rs6000.h: (EXTRA_FRAME_INFO): Delete.
- (FRAME_FIND_SAVED_REGS): Replace with FRAME_INIT_SAVED_REGS.
- (FRAME_ARGS_ADDRESS): Replace with function.
-
- * rs6000-tdep.c (frame_get_saved_regs): Rename from
- frame_get_cache_fsr.
- (rs6000_init_extra_frame_info): New function.
- (rs6000_frame_init_saved_regs): Call frame_get_saved_regs.
- (FUNCTION_START_OFFSET): Delete references, was ZERO.
- (rs6000_frame_args_address): New function.
- (frame_initial_stack_address): Update
-
- * config/mips/tm-mips.h (EXTRA_FRAME_INFO): Remove saved_regs.
- (FRAME_INIT_SAVED_REGS): Rename FRAME_FIND_SAVED_REGS, update.
- * mips-tdep.c (mips_find_saved_regs, read_next_frame_reg,
- init_extra_frame_info, mips_pop_frame): Update.
- * config/alpha/tm-alpha.h (FRAME_INIT_SAVED_REGS,
- EXTRA_FRAME_INFO), alpha-tdep.c (alpha_find_saved_regs,
- alpha_pop_frame, init_extra_frame_info): Ditto.
-
- * i960-tdep.c, m88k-tdep.c, h8300-tdep.c: Update.
- * config/sparc/tm-sparc.h, config/a29k/tm-a29k.h: Define
- FRAME_INIT_SAVED_REGS as no-op.
-
- * z8k-tdep.c (z8k_init_frame_saved_regs): Rename
- get_frame_saved_regs.
- (examine_frame, z8k_skip_prologue): Update.
- * config/z8k/tm-z8k.h (FRAME_INIT_SAVED_REGS): Define.
-
-1998-12-11 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- From J.T. Conklin <jtc@redbacknetworks.com>:
- * i386-stub.c (handle_exception): Add support for 'P' command.
- (NUMREGS): New macro.
-
-Fri Dec 11 09:07:05 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * i386b-nat.c: Include "expression.h".
-
- * symtab.h: Don't include "gnu-regex.h".
-
- * solib.c (solib_add_common_symbols): Cast parameters passed to
- make_cleanup to use the new make_cleanup_func typedef.
-
- * inftarg.c: Include "wait.h" after, rather than before, <wait.h>.
- "wait.h" was defining all WIF* macro's instead of filling in those
- that <wait.h> missed.
-
-Fri Dec 11 09:52:04 1998 Andrew Cagney <cagney@chook>
-
- * mipsm3-nat.c, hppah-nat.c, infptrace.c, i386gnu-nat.c,
- hppab-nat.c, core-aout.c, arm-xdep.c, alpha-nat.c, altos-xdep.c,
- pyr-xdep.c, remote-st.c, remote-os9k.c, tahoe-tdep.c, pyr-tdep.c,
- vax-tdep.c: Replace reg_name with REGISTER_NAME.
-
-Thu Dec 10 15:19:40 1998 David Taylor <taylor@texas.cygnus.com>
-
- The following changes were made by Jim Blandy <jimb@cygnus.com>,
- Edith Epstein <eepstein@cygnus.com>, Elena Zannoni
- <ezannoni@cygnus.com> Stan Shebs <shebs@cygnus.com>, and David
- Taylor <taylor@cygnus.com>, as part of the project to merge in
- changes originally made by HP; HP did not create ChangeLog
- entries.
-
- * annotate.c (annotate_catchpoint): New function.
-
- * annotate.h (annotate_catchpoint): declare it; add new includes
- (symtab.h and gdbtypes.h).
-
- * buildsym.h: add external var processing_hp_compilation.
-
- * coff-solib.h:
- (SOLIB_REMOVE_INFERIOR_HOOK): new macro. defined to 0.
- functionality not implemented for coff.
- (SOLIB_CREATE_CATCH_LOAD_HOOK): New macro; generate error msg for coff.
- (SOLIB_CREATE_CATCH_UNLOAD_HOOK): ditto.
- (SOLIB_HAVE_LOAD_EVENT): ditto.
- (SOLIB_LOADED_LIBRARY_PATHNAME): ditto.
- (SOLIB_HAVE_UNLOAD_EVENT): ditto.
- (SOLIB_UNLOADED_LIBRARY_PATHNAME): ditto.
- (SOLIB_IN_DYNAMIC_LINKER): ditto.
- (SOLIB_RESTART): ditto.
-
- * complaints.h: add ifdef...endif pair at beginning and end of file.
-
- * dstread.c (dst_symfile_read): the parameter to fileno
- must be of type FILE *. So cast abfd->iostream in the
- call to fileno must be cast as a FILE *, not a GDB_FILE *.
- This will work because abfd->iostream is declared and
- given a value in bdf and bfd will continue to use FILE
- rather than GDB_FILE.
-
- * dwarf2read.c (dwarf_bool_name): change parameter from bool
- to mybool. sigh.
-
- * expression.h: include symtab.h
-
- * frame.h (print_only_stack_frame, show_stack_frame,
- show_frame_info): add prototypes.
-
- * gdbcmd.h (togglelist, stoplist): declare.
-
- * gdbcore.h (read_memory_string): declare it.
- (exec_file_attach): add prototype.
-
- * inflow.c (terminal_is_ours): make non static.
-
- * minsyms.c: minor spacing change.
-
- * parser-defs.h (parse_nested_classes_for_hpacc): add prototype.
- (find_template_name_end): add prototype.
-
- * scm-lang.c (scm_unpack): cast svalue to (int).
-
- * top.h: declare it.
-
- * valprint.h (print_binary_chars): new prototype definition.
- (print_octal_chars): new prototype definition.
- (print_decimal_chars): new prototype definition.
-
-Thu Dec 10 07:14:56 1998 Andrew Cagney <cagney@chook>
-
- * config/arm/tm-arm.h, arm-tdep.c: Replace REGISTER_NAMES with
- REGISTER_NAME.
- * mn10300-tdep.c, config/mn10300/tm-mn10300.h: Ditto.
- * sh-tdep.c, config/sh/tm-sh.h: Ditto.
-
- * defs.h (REGISTER_NAME): Provide default for old targets.
- * defs.h, infcmd.c: Rename reg_names to gdb_register_names.
-
- * tracepoint.c, target.c, parse.c, infcmd.c, remote-udi.c,
- expprint.c, infcmd.c, printcmd.c, eval.c, stack.c, findvar.c,
- remote-udi.c, config/alpha/tm-alpha.h, remote-sim.c, d30v-tdep.c,
- config/mips/tm-mips.h, hppa-tdep.c: Use REGISTER_NAME.
-
-1998-12-08 James E Wilson <wilson@wilson-pc.cygnus.com>
-
- * config/i960/mon960.mt (SIM_OBJS, SIM): Define.
-
-Tue Dec 8 16:49:24 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * NEWS: Add mentions of newly-added configurations.
-
-1998-12-08 Philippe De Muyter <phdm@macqel.be>
-
- * config/xm-aix4.h (SIGWINCH_HANDLER): Function `aix_resize_window'
- must accept a signal number as parameter.
- * config/rs6000/xm-rs6000.h (SIGWINCH_HANDLER): Ditto.
- * utils.c (initialize_utils): Give a parameter to `SIGWINCH_HANDLER'.
-
- * inferior.h (register_valid): Variable's type is `SIGNED char', not
- `char'.
- * findvar.c (register_valid): Ditto.
-
- * defs.h (make_cleanup_func): Protect parameter list by `PARAMS'.
- * gdbthread.h (unbind_target_thread_vector): Likewise.
-
-Tue Dec 8 15:09:44 1998 Edith Epstein <eepstein@sophia.cygnus.com>
-
- Merged in m68k-linux patch from Andreas Schwab
-
- 1998-12-01 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
-
- * Makefile.in, configure.host, configure.tgt: Add support for
- m68k-linux.
- * config/m68k/linux.mh: New file.
- * config/m68k/linux.mt: New file.
- * config/m68k/nm-linux.h: New file.
- * config/m68k/tm-linux.h: New file.
- * config/m68k/xm-linux.h: New file.
- * gdb/m68klinux-nat.c: New file.
- * gdbserver/low-linux.c: Add support for m68k-linux.
- * gdb/config/m68k/tm-m68k.h (NUM_FREGS): New macro.
-
-1998-12-07 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * config/i386/xm-cygwin.h: Remove REQUEST_QUIT definition.
- * config/powerpc/xm-cygwin.h: Ditto.
-
-1998-12-07 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * rs6000-tdep.c (pop_frame): Correctly find the registers saved in
- the stack frame. Their offset from the previous stack frame is in
- fdata.gpr_offset and fdata.fpr_offset, not fdata.offset.
- (gdb.base/return.exp)
- * config/rs6000/tm-rs6000.h: Doc fixes.
-
-1998-12-03 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * monitor.c (monitor_read_memory): Zero out pattern buffers
- before calling re_search.
- (parse_register_dump): Ditto.
-
-Thu Dec 3 10:37:22 EST 1998 Zdenek Radouch (radouch@cygnus.com)
-
- FR30 updates - still very preliminary.
- * configure.tgt
- * fr30-tdep.c
- * config/fr30/tm-fr30.h
-
-Thu Dec 3 16:30:35 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ax-gdb.c: Include target.h.
-
-Tue Dec 3 10:59:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ax-gdb.c (_initialize_ax_gdb), i960-tdep.c (pop_frame),
- monitor.c (flush_monitor_dcache, longlongendswap), remote-array.c
- (hexword2ascii), w89k-rom.c (init_w89k_cmds), z8k-tdep.c
- (init_frame_pc, extract_return_value): Make return type void.
- * monitor.c (monitor_write_even_block): Make return type explicit.
- (monotor_read_memory_block): Delete function.
- * monitor.h: Update.
- * remote.c (remote_get_threadlist, remote_update_threads),
- remote-array.c (array_get_packet), remote-rdi.c (Fail): Always
- return a value.
- * m32r-tdep.c (m32r_fix_call_dummy): From Michael Snyder, void
- function.
- * jv-valprint.c (java_val_print): From Stu Grossman. Return 0 by
- default.
-
-Wed Dec 2 15:11:38 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c: Move default definition of
- TARGET_VIRTUAL_FRAME_POINTER from here to target.h.
- * target.h: Add default definition of TARGET_VIRTUAL_FRAME_POINTER.
- * ax-gdb.c (gen_frame_args_address, gen_frame_locals_address):
- use TARGET_VIRTUAL_FRAME_POINTER to determine frame pointer.
- (gen_trace_for_expr): new argument, address of tracepoint,
- gets passed to new_agent_expr and added to struct agent_expr.
- (is_nontrivial_conversion): call to new_agent_expr now requires
- a dummy argument. (agent_command): use get_current_frame() to
- get current PC scope; pass it to gen_trace_for_expr.
- * ax-general.c (new_agent_expr): new argument, address of
- tracepoint; store it in new field of struct agent_expr.
- * ax.h (struct agent_expr): add new field for tracepoint address.
- * ax-gdb.h: change prototypes to match above changes.
-
- * m32r-tdep.c (decode_prologue): If no branch or push fp is found,
- but there's a stack adjust, then use that as the end of prologue.
- (m32r_skip_prologue): don't skip past the first line if there is
- line info. (m32r_virtual_frame_pointer): new function.
- (m32r_fix_call_dummy): no return value needed.
-
-Tue Dec 1 10:59:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ocd.c (remote_timeout), (BDM_BREAKPOINT), monitor.c (readchar),
- remote.c: Cleanup closing of open comments.
-
-Mon Nov 30 16:04:03 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * config/fr30/tm-fr30.h (INNER_THAN): Add parameters.
-
-Mon Nov 30 11:18:48 1998 Andrew Cagney <cagney@chook>
-
- * frame.h (FRAME_CHAIN_VALID): Default to
- default_frame_chain_valid.
- * blockframe.c (default_frame_chain_valid): New function.
-
- * frame.h (FRAME_CHAIN_VALID_ALTERNATIVE): Delete references
- * blockframe.c (alternate_frame_chain_valid): New function.
- * config/mips/tm-mipsv4.h, config/m88k/tm-delta88v4.h,
- config/m68k/tm-monitor.h, config/m68k/tm-m68kv4.h,
- config/i386/tm-i386v4.h, config/i386/tm-i386nw.h,
- config/h8300/tm-h8300.h: Update.
-
- * blockframe.c (nonnull_frame_chain_valid): New function.
- * config/m68k/tm-os68k.h, config/m68k/tm-vx68.h,
- config/m68k/tm-apollo68b.h, config/i960/tm-vx960.h,
- config/arc/tm-arc.h: Update FRAME_CHAIN_VALID.
-
- * hppa-tdep.c (frame_chain_valid, hppa_frame_chain_valid),
- remote-vx29k.c (get_fp_contents, vx29k_frame_chain_valid),
- arm-tdep.c (frame_chain_valid, arm_frame_chain_valid): Rename
- functions so that they are name space clean.
- * config/pa/tm-hppa.h, config/a29k/tm-vx29k.h,
- config/arm/tm-arm.h: Update FRAME_CHAIN_VALID.
-
- * gould-tdep.c (gould_frame_chain_valid), d30v-tdep.c
- (d30v_frame_chain_valid), d10v-tdep.c (d10v_frame_chain_valid):
- New functions.
- * config/gould/tm-np1.h, config/gould/tm-pn.h,
- config/d30v/tm-d30v.h, config/d10v/tm-d10v.h: Update
- FRAME_CHAIN_VALID.
-
-Sun Nov 29 11:18:37 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * z8k-tdep.c (z8k_addr_bits_remove), w65-tdep.c
- (w65_addr_bits_remove), h8500-tdep.c (h8500_addr_bits_remove),
- m88k-tdep.c (m88k_addr_bits_remove): Function to clean up an
- address.
- * config/z8k/tm-z8k.h, config/w65/tm-w65.h, config/m88k/tm-m88k.h,
- config/h8500/tm-h8500.h: Define ADDR_BITS_REMOVE to call targets
- corresponding function.
- * z8k-tdep.c (saved_pc_after_call): Update.
-
-Sat Nov 28 12:24:31 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/z8k/tm-z8k.h, config/w65/tm-w65.h, config/vax/tm-vax.h,
- config/v850/tm-v850.h, config/tahoe/tm-tahoe.h,
- config/sparc/tm-sparc.h, config/sh/tm-sh.h,
- config/rs6000/tm-rs6000.h, config/pyr/tm-pyr.h,
- config/pa/tm-hppa.h, config/ns32k/tm-umax.h,
- config/ns32k/tm-merlin.h, config/none/tm-none.h,
- config/mn10300/tm-mn10300.h, config/mn10200/tm-mn10200.h,
- config/mips/tm-mips.h, config/m88k/tm-m88k.h,
- config/m68k/tm-m68k.h, config/m32r/tm-m32r.h,
- config/i960/tm-i960.h, config/i386/tm-i386.h,
- config/h8500/tm-h8500.h, config/h8300/tm-h8300.h,
- config/gould/tm-pn.h, config/gould/tm-np1.h, config/arm/tm-arm.h,
- config/convex/tm-convex.h, config/d10v/tm-d10v.h,
- config/alpha/tm-alpha.h, config/a29k/tm-a29k.h: Add parameters to
- macro INNER_THAN.
-
- * valops.c (push_word, value_push, call_function_by_hand),
- breakpoint.c (bpstat_stop_status), blockframe.c
- (generic_push_dummy_frame, generic_frame_chain_valid), inferior.h
- (PC_IN_CALL_DUMMY), infrun.c (wait_for_inferior): Update use of
- INNER_THAN.
-
-Fri Nov 27 11:00:25 1998 Andrew Cagney <cagney@chook>
-
- * target.h (one_stepped): Move global from here.
- * infrun.c (singlestep_breakpoints_inserted_p): To here. Rename.
- Make static.
- (wait_for_inferior): Update.
- (resume): Update. Set variable after call to SOFTWARE_SINGLE_STEP.
-
- * target.h (NO_SINGLE_STEP): Replace with SOFTWARE_SINGLE_STEP_P
- and SOFTWARE_SINGLE_STEP.
- * config/sparc/tm-sparc.h, config/rs6000/tm-rs6000.h,
- config/arc/tm-arc.h: Update.
- * rs6000-tdep.c (rs6000_software_single_step), sparc-tdep.c
- (sparc_software_single_step), arc-tdep.c (arc_single_step): New
- functions. Replace function single_step.
-
- * config/mips/tm-mips.h (STEP_SKIPS_DELAY_P): Define.
- * infrun.c (proceed): Cleanup.
-
-Thu Nov 26 11:19:15 1998 Andrew Cagney <cagney@amy.cygnus.com>
-
- * config/alpha/tm-alpha.h (ABOUT_TO_RETURN): Replace macro.
- * alpha-tdep.c (alpha_about_to_return): With new function.
- (heuristic_proc_start): Update.
- * config/mips/tm-mips.h (ABOUT_TO_RETURN), mips-tdep.c
- (heuristic_proc_start, mips_about_to_return): Ditto.
- * config/ns32k/tm-merlin.h (ABOUT_TO_RETURN),
- config/ns32k/tm-umax.h (ABOUT_TO_RETURN), ns32k-tdep.c
- (ns32k_about_to_return, ns32k_get_enter_addr): Ditto.
-
- * config/z8k/tm-z8k.h, config/w65/tm-w65.h, config/vax/tm-vax.h,
- config/tahoe/tm-tahoe.h, config/sparc/tm-sparc.h,
- config/sh/tm-sh.h, config/rs6000/tm-rs6000.h, config/pyr/tm-pyr.h,
- config/pa/tm-hppa.h, config/m88k/tm-m88k.h, config/m68k/tm-m68k.h,
- config/i960/tm-i960.h, config/i386/tm-i386.h,
- config/h8500/tm-h8500.h, config/h8300/tm-h8300.h,
- config/gould/tm-pn.h, config/gould/tm-np1.h,
- config/convex/tm-convex.h, config/arm/tm-arm.h,
- config/arc/tm-arc.h, config/a29k/tm-a29k.h: Delete macro
- ABOUT_TO_RETURN.
- * config/w65/tm-w65.h (RTL, RTS): Delete macros.
- * h8500-tdep.c (about_to_return): Delete function.
-
-Thu Nov 26 11:19:15 1998 Andrew Cagney <cagney@chook.cygnus.com>
-
- * rs6000-tdep.c (rs6000_breakpoint_from_pc): Change big_breakpoint
- and little_breakpoint to char[] from char*.
- * remote-array.c (array_insert_breakpoint): Change bp_addr to
- CORE_ADDR type.
-
-Wed Nov 25 00:13:06 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * vx-share/xdr_ld.c (xdr_ldtabl): Cast second arg to char**
- instead of char*.
-
- * configure.tgt (v850): Only build v850ice when cygwin and gui.
- * configure.in: Add parameter to --enable-build-warnings.
- * configure: Re-build.
-
- * c-exp.y (parse_number): Rewrite shift to pacify GCC.
-
- * config/i960/tm-i960.h (BREAKPOINT): Delete definition - simply
- wrong.
-
- * monitor.c (compile_pattern): Make val const char*.
- (monitor_wait_cleanup): Make old_timeout void*, pointing at
- old_timeout.
- (monitor_wait): Update.
-
- * remote-udi.c, remote-sim.c, remote-e7000.c, hppa-tdep.c,
- remote-mips.c, sparcl-tdep.c, xcoffread.c: Cast parameters passed
- to make_cleanup to use the new make_cleanup_func typedef.
-
- * alpha-tdep.c (MASK): Use LONGEST to avoid arithmetic overflow.
-
- * config/a29k/tm-a29k.h (TRANSPARENT): Rename macro to
- TRANSPARENT_FRAME. Avoid name-space clash.
- * a29k-tdep.c (init_frame_info): Update.
-
-Wed Nov 25 20:37:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * rs6000-tdep.c (rs6000_breakpoint_from_pc): Change big_breakpoint
- and little_breakpoint to char[] from char*.
- * mem-break.c (memory_insert_breakpoint,
- memory_remove_breakpoint): Pass address of bplen.
- * remote-array.c (array_insert_breakpoint): Change bp_addr to
- CORE_ADDR type.
-
-Tue Nov 24 15:46:33 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * config/mn10300/tm-mn10300.h (TARGET_VIRTUAL_FRAME_POINTER):
- new target macro.
- * mn10300-tdep.c (mn10300_virtual_frame_pointer): new function.
- * tracepoint.c (encode_actions): Use the new target macro to
- determine the virtual frame pointer, for collecting locals/args.
- (add_local_symbols, collect_symbol): add a register/offset pair of
- arguments so that the virtual frame pointer can be passed in.
-
-1998-11-24 Felix Lee <flee@cygnus.com>
-
- * procfs.c (procfs_wait): handle syscall events first.
-
- * procfs.c (GDB_GREGSET_TYPE, GDB_FPREGSET_TYPE): new macros.
- * config/sparc/xm-sun4sol2.h: use them.
- * core-sol2.c: don't #undef gregset_t and fpregset_t.
- * sol-thread.c: ditto.
- * sparc-tdep.c: ditto.
-
-Tue Nov 24 14:13:10 1998 Andrew Cagney <cagney@chook>
-
- * breakpoint.c (memory_breakpoint_size): Delete global.
- (read_memory_nobpt): Determine real breakpoint address and size
- using BREAKPOINT_FROM_PC.
-
- * defs.h (breakpoint_from_pc_fn): BREAKPOINT_FROM_PC function
- template.
- * target.h, mem-break.c (memory_breakpoint_from_pc):
- Rewrite. Always define. Return NULL when memory breakpoints are
- not supported.
- (memory_insert_breakpoint, memory_remove_breakpoint): Call
- BREAKPOINT_FROM_PC.
- * target.h (BREAKPOINT_FROM_PC): Provide default.
- * gdbint.texinfo (BREAKPOINT_FROM_PC): Document.
-
- * config/rs6000/tm-rs6000.h (BREAKPOINT): Delete macro.
- (BREAKPOINT_FROM_PC): Define.
- ({BIG,LITTLE}_BREAKPOINT): Move macros from here.
- * rs6000-tdep.c: To here.
- (rs6000_breakpoint_from_pc): New function.
-
- * config/mn10300/tm-mn10300.h (BREAKPOINT): Delete macro.
- (BREAKPOINT_FROM_PC): Define, call.
- * mn10300-tdep.c (mn10300_breakpoint_from_pc): New function.
-
- * config/mips/tm-mips.h ({BIG,LITTLE}_BREAKPOINT,
- IDT_{BIG,LITTLE}_BREAKPOINT, PMON_{BIG,LITTLE}_BREAKPOINT,
- MIPS16_{BIG,LITTLE}_BREAKPOINT): Move macros from here.
- * mips-tdep.c: To here.
-
- * config/arm/tm-arm.h ({BIG,LITTLE}_BREAKPOINT): Delete macros.
- ({ARM,THUMB}_{BE,LE}_BREAKPOINT): Move macros from here.
- * arm-tdep.c: To here.
-
- * remote-array.c (memory_breakpoint_size): Delete variable.
- (array_insert_breakpoint): Obtain breakpoint size using
- BREAKPOINT_FROM_PC.
- * remote-st.c (memory_breakpoint_size, st2000_insert_breakpoint):
- Ditto.
- * remote-os9k.c (memory_breakpoint_size,
- rombug_insert_breakpoint): Ditto.
- * remote-e7000.c (memory_breakpoint_size): Ditto.
-
-Mon Nov 23 11:38:40 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * symfile.c (deduce_language_from_filename): rewrite so as to
- work from a table of filename extensions, modifiable by the user.
- (filename_language_table): new data structure.
- (set_ext_lang_command): new function for new command, "set
- extension-language". (info_extension_language_command): new
- function for new command "info extension-languages".
- (add_filename_language, init_filename_language_table): new
- support functions for the above.
- * language.c (language_enum): new function. Support for above.
-
-Mon Nov 23 10:47:54 1998 Andrew Cagney <cagney@chook.cygnus.com>
-
- * config/sh/tm-sh.h, config/mn10200/tm-mn10200.h,
- config/m32r/tm-m32r.h, config/arm/tm-arm.h, config/i960/tm-i960.h,
- config/gould/tm-np1.h, config/d10v/tm-d10v.h,
- config/v850/tm-v850.h, config/pa/tm-hppa.h, config/a29k/tm-a29k.h,
- config/mn10300/tm-mn10300.h, config/mips/tm-mips.h
- (USE_STRUCT_CONVENTION): Cleanup, define macro as function.
-
- * sh-tdep.c (sh_use_struct_convention), mn10200-tdep.c
- (mn10200_use_struct_convention), i960-tdep.c
- (i960_use_struct_convention), gould-tdep.c
- (gould_use_struct_convention), d10v-tdep.c
- (d10v_use_struct_convention), v850-tdep.c
- (v850_use_struct_convention), hppa-tdep.c
- (hpha_use_struct_convention), m32r-tdep.c
- (m32r_use_struct_convention), arm-tdep.c
- (arm_use_struct_convention), mn10300-tdep.c
- (mn10300_use_struct_convention), a29k-tdep.c
- (a29k_use_struct_convention), mips-tdep.c
- (mips_use_struct_convention): New functions
-
- * value.h, values.c (generic_use_struct_convention): New function,
- replace macro.
- * values.c (USE_STRUCT_CONVENTION): Macro defaults to function
- generic_use_struct_convention.
-
-Sat Nov 21 17:15:40 1998 Philippe De Muyter <phdm@macqel.be>
-
- * breakpoint.c (bpstat_stop_status): Do not increment hit_count
- of breakpoint if condition is not true.
-
- * coffread.c (coff_symtab_read): Discard C_LABEL's that are not
- function entry points, to avoid getting them in the stack dump
- instead of the actual function.
-
- * config/m68k/delta68.mh (NAT_FILE): Undo 1998-08-18 change;
- without NAT_FILE definition, configure will assume that GDB cannot
- run native.
- * config/m68k/nm-delta68.h (KERNEL_U_SIZE): New macro.
- * delta68-nat.c (kernel_u_size): New function.
-
-Fri Nov 20 10:13:03 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * buildsym.c (end_symtab): Cleanup PROCESS_LINENUMBER_HOOK.
-
-Thu Nov 19 15:21:04 1998 Geoffrey Noer <noer@cygnus.com>
-
- * rdi-share/host.h: if compiling under Cygwin, make sure new
- preprocessor define is defined. Define it if not.
- * rdi-share/hostchan.h: ditto
- * rdi-share/aclocal.m4: regenerate
- * rdi-share/configure: regenerate
-
-Thu Nov 19 14:43:44 1998 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: switch back to checking __CYGWIN32__
- * configure: regenerate
-
-Thu Nov 19 09:53:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * exec.c (exec_file_command): Cleanup. Replace #if
- NEED_TEXT_START_END with if().
- * config/pa/nm-hppah.h (NEED_TEXT_START_END): Redefine to be 1.
- * config/convex/tm-convex.h (NEED_TEXT_START_END): Ditto.
- * config/gould/tm-np1.h (NEED_TEXT_START_END): Ditto.
- * config/a29k/tm-a29k.h (NEED_TEXT_START_END): Ditto.
-
-Thu Nov 19 13:06:22 1998 Geoffrey Noer <noer@cygnus.com>
-
- * main.c: Wait until more time has passed before calling
- new cygwin_ funcs, revert back to the cygwin32_ ones for now.
- * win32-nat.c: Ditto.
-
-Wed Nov 18 15:03:17 1998 Andrew Cagney <cagney@chook.cygnus.com>
-
- * 29k-share/udi/udip2soc.c (UDIConnect): Replace sys_errlist with
- strerror.
-
-Mon Nov 16 14:17:05 1998 Geoffrey Noer <noer@cygnus.com>
-
- * defs.h: if compiling under Cygwin, define __CYGWIN__ if
- __CYGWIN32__ is defined and __CYGWIN__ isn't for backwards
- compatibility.
-
-Fri Nov 13 00:15:08 1998 Geoffrey Noer <noer@cygnus.com>
-
- Changes to account for name change from cygwin32 to cygwin and
- clean up Win32-related ifdefs.
-
- * configure.tgt: check for cygwin* instead of cygwin32.
- New cygwin gdb_target variable loses the "32".
- * configure.host: check for cygwin* instead of cygwin32.
- New cygwin gdb_host variable loses the "32".
- * configure.in: test __CYGWIN__ instead of __CYGWIN32__,
- rename gdb_cv_os_cygwin32 variable to drop the "32". Call
- AM_EXEEXT instead of AC_EXEEXT since that isn't in a released
- autoconf yet.
- * configure: regenerate.
-
- * main.c: drop "32" from cygwin_ funcs, include sys/cygwin.h where
- cygwin path conv protos live, instead of adding a proto here for
- them here.
- * {main.c, ser-tcp.c, ser-unix.c, top.c}: check __CYGWIN__
- instead of __CYGWIN32__.
- * source.c: thoughout, check _WIN32 instead of WIN32.
-
- * config/i386/cygwin32.mh: delete.
- * config/i386/cygwin.mh: new file, was cygwin32.mh.
- * config/i386/cygwin32.mt: delete.
- * config/i386/cygwin.mt: new file, was cygwin32.mt.
- * config/i386/tm-cygwin32.h: delete.
- * config/i386/tm-cygwin.h: new file, was tm-cygwin32.h.
- * config/i386/xm-cygwin32.h: delete.
- * config/i386/xm-cygwin.h: new file, was xm-cygwin32.h.
- * config/i386/xm-windows.h: #include xm-cygwin.h now.
- * config/powerpc/cygwin32.mh: delete.
- * config/powerpc/cygwin.mh: new file, was cygwin32.mh.
- * config/powerpc/cygwin32.mt: delete.
- * config/powerpc/cygwin.mt: new file, was cygwin32.mt.
- * config/powerpc/tm-cygwin32.h: delete.
- * config/powerpc/tm-cygwin.h: new file, was tm-cygwin32.h.
- * config/powerpc/xm-cygwin32.h: delete.
- * config/powerpc/xm-cygwin.h: new file, was xm-cygwin32.h.
-
- * rdi-share/aclocal.m4: regenerate with aclocal.
- * rdi-share/configure: regenerate with autoconf.
- * rdi-share/{host.h, hostchan.c, hostchan.h, serdrv.c, serpardr.c,
- unixcomm.c}: check __CYGWIN__ instead of __CYGWIN32__.
-
-Thu Nov 12 17:19:43 1998 John Metzler <jmetzler@cygnus.com>
-
- * remote.c (remote_get_threadinfo): Support for remote
- multithread debugging.
- (remote_get_threadlist): get a partial list of threads
- (remote_threadlist_iterator): Step through all the threads
- (init_remote_threadtests): Optional builtin unit test commands.
-
- * thread.c (bind_target_thread_vector): Implementa a more dynamic
- way of accessing target specific thread info functions than
- FIND_NEW_THREADS.
- (target_thread_info): Function to get extended thread information.
-
- * gdbthread.h: Export internal data structures corresponding to
- external detailed thread info response. This is more like a 'ps'
- command than what might be expected of host based threads. This
- is for embedded systems.
-
-Wed Nov 11 15:47:00 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * procfs.c (proc_set_exec_trap): don't set PR_ASYNC or PR_FORK
- in the child process for UnixWare (causes processes forked by
- the debuggee to hang).
-
-Mon Nov 9 12:00:36 1998 Dave Brolley <brolley@cygnus.com>
-
- * config/fr30/fr30.mt: New file.
- * config/fr30/tm-fr30.h: New file.
-
-1998-11-05 Jim Wilson <wilson@cygnus.com>
-
- * remote-vx.c (net_read_registers, net_write_registers,
- vx_xver_memory, vx_resume, vx_attach, vx_detach, vx_kill):
- Change errno to errno_num.
- * vx-share/xdr_ptrace.c (xdr_ptrace_return): Likewise.
- * vx-share/xdr_ptrace.h (struct ptrace_return): Likewise.
-
-Thu Nov 5 08:41:33 1998 Christopher Faylor <cgf@cygnus.com>
-
- * top.c (gdb_readline): Allow CRLF line termination on systems
- which define CRLF_SOURCE_FILES.
- * win32-nat.c: 1) Add thread support, 2) fix ability to attach to
- a running process, and 3) implement limited support for cygwin
- signals.
- (thread_rec): New function.
- (child_add_thread): Ditto.
- (child_init_thread_list): Ditto.
- (child_delete_thread): Ditto.
- (do_child_fetch_inferior_registers): Ditto.
- (do_child_store_inferior_registers): Ditto.
- (handle_output_debug_string): Ditto.
- (child_fetch_inferior_registers): Use do_* function to perform
- operation.
- (child_store_inferior_registers): Ditto.
- (child_continue): Ditto.
- (child_thread_alive): Ditto.
- (cygwin_pid_to_str): Ditto.
- (handle_load_dll): Reorganize, add first attempt at reading
- dll names from attached processes. Change info messages to provide
- more information when dll is already loaded.
- (handle_exception): Changes mandated by new thread-aware structures.
- (child_wait): Track thread creation/destruction. Handle cygwin
- signals.
- (child_create_inferior): Ditto.
- (child_resume): Ditto.
- (child_kill_inferior): Ditto. Close child process handle to avoid a
- handle leak.
- (child_ops): Fill out child_ops fields that deal with threads.
- * config/i386/tm-cygwin32.h: Declare function and macro needed
- for converting a cygwin "pid" to a string.
- * config/i386/xm-cygwin32.h: define HAVE_SIGSETMASK as 0 since
- sigsetmask is not defined in cygwin.
-
-Thu Nov 5 08:38:18 1998 Christopher Faylor <cgf@cygnus.com>
-
- * win32-nat.c: Remove obsolete PPC conditionals.
-
-Wed Nov 4 18:44:31 1998 Dave Brolley <brolley@cygnus.com>
-
- * configure.tgt: Add fr30-*-elf*.
-
-1998-11-03 Jim Wilson <wilson@cygnus.com>
-
- * c-exp.y (parse_number): Check TARGET_LONG_LONG_BIT when setting
- high_bit to avoid undefined negative shift.
-
-Mon Nov 2 15:26:33 1998 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: Check cygwin* instead of cygwin32*.
- * configure: regenerate
-
-Thu Oct 29 10:04:20 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- [Support for trace debugging: registers that were not collected.]
- * remote.c (remote_fetch_registers): accept 'xxxx' in the register
- packet, with the meaning "register value is not available".
- Set register_valid to -1, which will connote "no value available".
- * findvar.c (read_relative_register_raw_bytes): return failure if
- register_valid == -1. (value_of_register): return failure if
- register_valid == -1. (read_var_value): return error if
- value_of_register fails for a register variable.
- (value_from_register): return failure if register_valid == -1.
- * eval.c (evaluate_subexp_standard): return error if
- value_of_register fails for a register used in an expression.
- * infcmd.c (do_registers_info): display "value not available"
- for registers for which register_valid == -1.
-
- * tracepoint.c (set_raw_tracepoint): just save the filename as is
- from the symbol table, rather than trying to prepend the dir name.
- Also save the bfd section. (tracepoints_info): use the section
- when looking up the function name.
- * tracepoint.h: add section field to tracepoint struct.
-
-Wed Oct 28 08:01:38 1998 Mark Alexander <marka@cygnus.com>
-
- * sparcl-tdep.c (send_resp, sparclite_serial_start,
- sparclite_serial_write): Use remote_timeout instead of hardcoded
- two second timeout.
- (download): Fix adjustment of a.out load addresses.
-
-Wed Oct 28 12:32:58 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (--enable-build-warnings): Finish rename from
- --enable-warnings.
- (enable-build-warnings): Add -Wpointer-arth, allow =* for
- sim/common compatibility.
- * configure: Re-generate.
-
-Wed Oct 21 08:44:30 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * 29k-share/udi/udip2soc.c: Replace sys_errlist with strerror().
-
-Thu Oct 22 09:56:55 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/rs6000/aix4.mh (NATDEPFILES): Move xcoffread.o from here.
- * config/rs6000/aix4.mt (TDEPFILES): To here.
-
-Wed Oct 21 10:02:31 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * rdi-share/unixcomm.c: Provide definitions of SERPORT and PARPORT
- on BSD hosts.
-
-1998-10-19 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in (AM_EXEEXT): Use AC_EXEEXT instead.
- * configure: Regenerated.
-
-Sat Oct 17 17:39:23 1998 Felix Lee <flee@cygnus.com>
-
- * core-sol2.c: #include <sys/types.h>, for sol2.7 weirdness.
-
-Fri Oct 16 15:31:38 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * m32r-tdep.c (decode_prologue): Return failure if we reach
- the end of the function without finding the end of the prologue.
-
-1998-10-16 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * command.c copying.c copying.awk core-aout.c core-regset.c
- corelow.c dcache.c i386-tdep.c i386v4-nat.c i387-tdep.c
- infcmd.c infptrace.c infrun.c remote.c solib.c symfile.c
- symmisc.c valarith.c: Add prototypes.
-
- * defs.h: Add prototype for utils.c::do_run_cleanups.
-
- * gdbtypes.c: Add prototypes.
- (make_pointer_type): Add braces to remove nested if-else ambiguity.
- (make_reference_type): Ditto.
-
- * printcmd.c (printf_command): Initialize 'f' and 'string' at
- function startup to suppress possibly-used-before-initialized warning.
-
- * remote-utils.c: Add prototypes.
- (sr_pollchar): Add braces to remove nested if-else ambiguity.
-
- * ser-tcp.c: Add prototypes.
- (wait_for): Add braces to remove nested if-else ambiguity.
- (tcp_readchar): Ditto.
-
- * ser-unix.c: Add prototypes.
- (get_tty_state): Don't define errno here.
- (hardwire_readchar): Only define 't' if we are compiling in a Cygwin
- environment.
-
- * symtab.c: Add prototypes.
- (find_methods): Add braces to remove nested if-else ambiguity.
- (search_symbols): Set 'i' to an initial value to suppress a
- possibly-used-before-initialized warning.
-
- * valops.c: Add prototypes.
- (value_cast): Set 'eltype2' to an initial value to suppress a
- possibly-used-before-initialized warning.
- (value_of_variable): Add braces to remove nested if-else ambiguity.
- (value_of_this): Ditto.
-
- * valprint.c: Add prototypes.
- (print_floating): Add braces to remove nested if-else ambiguity.
-
-Thu Oct 15 19:50:48 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * tm-sp64.h (SETUP_ARBITRARY_FRAME, FRAME_SPECIFICATION_DYADIC):
- Remove, nevermore used.
-
-Thu Oct 15 16:55:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * command.c: Include "wait.h" after, rather than before, <wait.h>.
- "wait.h" was defining all WIF* macro's instead of filling in those
- that <wait.h> missed.
-
-1998-10-14 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * defs.h: Move _initialize_printcmd, _initialize_stack,
- _initialize_blockframe out of here and in to their respective .c
- files.
- * blockframe.c: Move _initialize_blockframe prototype to here.
- * printcmd.c: Move _initialize_printcmd prototype to here.
- * stack.c: Move _initialize_stack prototype to here.
-
- * source.c, symtab.h: Move _initialize_source prototype to the .c
- file.
- * values.c, value.h: Move _initialize_values prototype to the .c file.
- * gdbthread.h, thread.c: Move _initialize_thread prototype to the .c
- file.
- * breakpoint.c, breakpoint.h: Move _initialize_breakpoint prototype
- to the .c file.
-
- * abug-rom.c alpha-nat.c alpha-tdep.c annotate.c ax-gdb.c bcache.c:
- Standardize comments for the prototype section of these files.
-
- * configure.in: Look in libc for wctype before looking for it in libc.
-
-Tue Oct 13 18:56:51 1998 Felix Lee <flee@cygnus.com>
-
- * sol-thread.c (ps_pstop, etc): simple test for proc_service.h
- version didn't work for sol2.6; pushed it to autoconf.
- * configure.in (gdb_cv_proc_service_is_old): new test.
- * acconfig.h (PROC_SERVICE_IS_OLD): new define.
- * configure, config.in: regenerate.
-
-1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * blockframe.c (find_pc_sect_partial_function): Add braces to avoid
- possible nested-if confusion.
- * breakpoint.c (breakpoint_here_p): Ditto.
- (breakpoint_inserted_here_p): Ditto.
- (breakpoint_thread_match): Ditto.
-
- * gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined.
- * gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability
- prototypes.
-
- * symtab.h: Add prototype for _initialize_source.
- * value.h: Add prototype for _initialize_value.
-
- * defs.h: Include sys/types.h or stddef.h to get size_t.
- (make_cleanup): Add make_cleanup_func typedef and switch to using
- a prototype for this function.
- (mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't
- using mmalloc.
-
- * ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c
- dwarf2read.c dwarfread.c elfread.c eval.c exec.c infcmd.c infrun.c
- mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c
- symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c
- valops.c: Cast parameters passed to make_cleanup to use the new
- make_cleanup_func typedef.
-
-Tue Oct 13 00:51:48 1998 Felix Lee <flee@cygnus.com>
-
- * sol-thread.c (ps_pstop, etc): different solaris versions have
- slightly different prototypes in proc_service.h; compensate.
-
-1998-10-12 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * Makefile.in (AWK): Unused; remove.
- * configure.in: Remove unused autoconf checks for MINIX, memcpy,
- poll, select, strings.h.
- * config.in: Regenerated.
- * configure: Regenerated.
-
-1998-10-12 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Check for sys/debugreg.h, asm/debugreg.h.
- * i386v-nat.c: Include asm/debugreg.h, sys/debugreg.h if it is not
- present.
-
-Sun Oct 11 12:08:07 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * dwarf2read.c (dwarf2_build_psymtabs_hard): Do not adjust the
- address range of a compilation unit without children.
-
- * mdebugread.c (parse_partial_symbols): Fix handling of stabs
- continuations, use xmalloc and xrealloc.
-
-Fri Oct 9 18:14:43 1998 Mark Alexander <marka@cygnus.com>
-
- * rs6000-tdep.c: Don't include tm.h twice.
-
-1998-10-08 Keith Seitz <keiths@cygnus.com>
-
- * main.c (main): Remove calls to {pre,post}_add_symbol_hooks.
- There should be sufficient information/hooks now to eliminate
- this hack.
-
- * exec.c (file_command): Add a new hook here to inform ui's
- when the exec file has changed. Adding it here allows the
- ui to be informed after symbol reading.
-
- * gdbcore.h: Add declaration of file_changed_hook.
-
-Thu Oct 8 08:40:42 1998 Mark Alexander <marka@cygnus.com>
-
- * rs6000-tdep.c (get_saved_register): Define only if
- USE_GENERIC_DUMMY_FRAMES is defined.
-
-1998-10-06 Jason Molenda (jsm@bugshack.cygnus.com)
-
- Eliminate a few warnings from the compiler.
- * breakpoint.h: Add prototype.
- * breakpoint.c (do_enable_breakpoint): cast mem_cnt, i to (void).
- * configure.in: Check if strdup declaration is necessary.
- * configure: Regenerated.
- * defs.h: Add prototypes.
- * gdb_string.h: Only define strdup if necessary.
- * gdbthread.h: Add prototypes.
- * printcmd.c: Add prototyptes.
- (disassemble_command): Remove unused variable 'section'.
- * symtab.c: Add prototypes.
- * symtab.h: Include gnu-regex.h, add prototype.
- * thread.c: Add prototype.
-
-Mon Oct 5 19:44:39 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- From David Purves <purves@apogee.com>:
- * stabsread.c (rs6000_builtin_type): Create a complex float instead
- of an error.
- (read_sun_floating_type): Similarly.
- (read_range_type): Create a complex float if self_subrange is
- true.
-
-Fri Oct 2 19:42:31 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * c-lang.c (emit_char c_printchar c_printstr), c-lang.h (c_printstr)
- ch-lang.c (chill_printstr chill_printchar) c-valprint.c (c_val_print)
- ch-valprint.c (chill_val_print) expprint.c (print_subexp) f-lang.c
- (f_printstr f_printchar emit_char) f-valprint.c (f_val_print)
- jv-lang.c (java_printchar java_emit_char) jv-valprint.c
- (java_value_print java_val_print) language.c (unk_lang_printchar
- unk_lang_printstr unk_lang_emit_char) language.h (struct
- language_defn LA_PRINT_STRING LA_EMIT_CHAR) m2-lang.c (m2_printstr
- m2_printchar emit_char) printcmd.c (print_formatted) scm-lang.c
- (scm_printstr) valprint.c (val_print_string) value.h
- (val_print_string): Add emit_char routines to language_desc struct
- to allow finer control over language specific character output issues.
- Add character width arg to printstr routines to allow handling of
- wchar_t/Unicode strings. Fix c_printstr to handle wide characters.
- Supply width argument to LA_PRINT_STRING and val_print_string.
-
- * jv-lang.c (java_object_type dynamics_objfile java_link_class_type
- get_dynamics_objfile get_java_object_type) jv-lang.h
- (get_java_object_type): Make lots of things static.
-
- * expprint.c (dump_prefix_expression dump_subexp): Move opcode name
- printing to common routine (op_name).
- * (dump_subexp): Add support for OP_SCOPE.
-
-Fri Oct 2 16:25:54 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.host (i[3456]86-*-windows): Remove, no longer used.
- * mswin: Remove directory, no longer used.
-
-Fri Oct 2 18:52:20 1998 Fernando Nasser <fnasser@cygnus.com>
-
- * sol-thread.c: Fixed prototypes and calls to supply_fpregset and
- fill_fpregset
-
-1998-10-02 Keith Seitz <keiths@cygnus.com>
-
- * remote.c (remote_interrupt): Rewrite to use remote_stop.
- (remote_interrupt_twice): Remove. remote_stop now handles it.
- (remote_stop): New function which handles interrupting the
- remote target so that CLUI and GUI use the same core functions
- to achieve the same goal.
- (remote_wait): Change to handle remote_stop properly.
- [interrupted_already]: New static global to help remote_stop.
- [remote_ops, extended_remote_ops]: Add remote_stop for to_stop member.
-
- * target.c: Rename static function "ignore" to "target_ignore" and
- export it so that gdb can determin if some target vector member is
- actually not defined. Replace all occurances of ignore.
-
- * target.h: Export target_ignore.
-
-Fri Oct 2 03:51:48 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * target.c (target_xfer_memory): Handle requests with zero
- transfer length right away.
-
- * values.c (unpack_double): Set up code, length and signedness of
- type _after_ checking for typedef.
-
-Thu Oct 1 15:39:27 EDT 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * breakpoint.c (bpstat_stop_status): Do not consider an
- untripped watchpoint as a "hit".
-
-Thu Oct 1 20:52:39 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * exec.c (exec_file_command), convex-tdep.c (exec_file_command),
- arm-xdep.c (exec_file_command), remote-rdp.c
- (remote_rdp_create_inferior), remote-os9k.c
- (rombug_create_inferior), remote-mm.c (mm_create_inferior),
- remote-eb.c (eb_create_inferior), remote-es.c
- (es1800_create_inferior), remote-rdi.c (arm_rdi_create_inferior),
- remote-sim.c (gdbsim_create_inferior), remote-utils.c
- (gr_create_inferior), remote-st.c (st2000_create_inferior),
- remote-nindy.c (nindy_create_inferior), remote-hms.c
- (hms_create_inferior), remote-e7000.c (e7000_create_inferior),
- remote-array.c (array_create_inferior), remote-adapt.c
- (adapt_create_inferior): Replace "exec" with "executable" in
- messages.
-
-1998-09-25 Keith Seitz <keiths@cygnus.com>
-
- * rdi-share/unixcomm.c: If using cygwin32, also use the SERPORT and
- PARPORT defines for win32.
- (Unix_MatchValidSerialDevice): For cygwin32, valid serial port names
- start with "com", not "/dev/tty".
- (Unix_OpenSerial): Do not use O_NONBLOCK on cygwin32.
-
- * rdi-share/devsw.c (DevSW_Close): Free the device's state
- (SwitcherState) so that the device may be reopened.
-
- * remote-rdi.c (mywritec): Send all output through gdb's *_unfiltered
- functions, ignoring non-ASCII chars, so that non-tty UI's can snarf
- the output from fputs_hook.
- (mywrite): Ditto.
- (arm_rdi_open): Set inferior_pid.
- (arm_rdi_detach): Pop the target off the target stack so that
- users can attach and detach multiple times.
- (arm_rdi_close): Close the opened device and reset inferior_pid, too.
-
-1998-09-24 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Change --enable-warnings to --enable-build-warnings.
- * configure: Updated.
-
-1998-09-24 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in (WARN_CFLAGS): Add -Wmissing-prototypes.
- * configure: Regenerated.
-
-1998-09-24 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Add --enable-warnings.
- Adjust whitespace of other --with and --enable options so that
- configure --help lines up correctly.
- * aclocal.m4: Ditto.
- * Makefile.in (WARN_CFLAGS): Add. Set by configure.
- * configure: Regenerated.
-
-Thu Sep 24 15:44:34 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-rdi.c: Fix formatting, remove some commented-out code.
- (init_rdi_ops): Omit needless initializations.
-
-Wed Sep 23 18:21:03 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (remote_address_masked): New function - mask address
- according to REMOTE_ADDRESS_SIZE.
- (remote_address_size): New global.
- (hexnumstr): New function - convert arbitrary unsigned to hex.
- (remote_write_bytes, remote_read_bytes): Use hexnumstr to
- construct packet address. Mask address when necessary.
- (_initialize_remote): Add "set remoteaddresssize" command, set
- REMOTE_ADDRESS_SIZE variable.
-
- * NEWS: Update.
-
-Wed Sep 23 18:08:52 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote.c (_initialize_remote, packet_command, print_packet):
- Pretty print code.
-
-Wed Sep 23 12:32:54 1998 <cagney@amy.cygnus.com>
-
- * remote.c (packet_command): Test REMOTE_DESC to determine if
- remote connection is open.
-
-Tue Sep 22 22:27:24 1998 Mark Alexander <marka@cygnus.com>
-
- Patch from Dawn Perchik <dawn@cygnus.com>:
- * rs6000-tdep.c (pop_frame): Handle generic dummy frames.
- (push_arguments): Likewise.
- (frame_saved_pc): Likewise.
- (rs6000_frame_chain): Likewise.
- (ppc_push_return_address): New function.
- (get_saved_register): New function.
- * config/powerpc/tm-ppc-eabi.h: Add generic dummy frame macros.
-
-Mon Sep 21 19:29:32 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * defs.h utils.c (fputc_filtered): New function. Does the obvious...
- * jv-lang.c (java_printchar): Fix output of chars > 0xff. Fold
- java_emit_char into java_printchar.
- * language.h (PRINT_LITERAL_FORM): Reformat for readability.
-
-Mon Sep 21 14:38:03 1998 Catherine Moore <clm@cygnus.com>
-
- * config/arm/tm-arm.h (*_BREAKPOINT): Define both little endian
- and big endian breakpoint patterns.
-
- * arm-tdep.c (arm_break_point_from_pc): Insert either big endian
- or little endian breakpoints depending upon target byte order.
-
-Fri Sep 18 07:53:08 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * sol-thread.c (sol_thread_notice_signals): Use PIDGET when
- passing pid down to procfs_notice_signals.
-
-Wed Sep 16 14:57:14 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * stabsread.c (resolve_symbol_reference): Return 1 on success, 0 on
- failure.
- * (define_symbol): Check return value from resolve_symbol_reference,
- and drop symbol if it fails.
-
-Tue Sep 15 15:24:16 1998 Stu Grossman <grossman@fencer.cygnus.com>
-
- * stabsread.c: Make all complaints static.
- * Fix formatting of live range splitting code.
- * (resolve_symbol_reference define_symbol resolve_live_range): Change
- errors to complaints so that bad live range symbols won't abort the
- entire symbol table. Handle errors by aborting just the current
- symbol.
- * (ref_init): Goes away. Folded into ref_add().
- * (REF_MAP_SIZE): Put parens around parameter so that args like
- `1 + 2' get handled correctly (yes, this was a real bug).
- * (ref_add): Remove check for allocation failures. Not necessary
- when using xrealloc(). Fix pointer arithmetic problem when clearing
- memory. This and the previous patch prevent random SEGV's when there
- are lots of live range symbols.
-
-Tue Sep 15 14:02:01 1998 Nick Clifton <nickc@cygnus.com>
-
- * remote-rdi.c: Prevent multiple attempts to close the remote
- connection.
-
-Tue Sep 15 10:24:17 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * printcmd.c (examine_i_type): New static - type for instructions.
- (do_examine): For "i" format, specify examine_i_type.
- (do_examine): Call value_at_lazy instead of value_at so that
- examine data is only fetched if it is used.
- (x_command): If examine data was not fetched, set convenience
- variable "__" to void.
- (_initialize_printcmd): Initialize examine_i_type.
-
-Sun Sep 13 01:34:59 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * blockframe.c (find_pc_sect_partial_function): use bfd section
- of msymbol for end of section comparison.
-
-Fri Sep 11 14:02:49 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c: clean up several unused variables and such.
-
-Fri Sep 11 12:38:34 EDT 1998 Zdenek Radouch (radouch@cygnus.com)
-
- * arm-tdep.c (arm_push_arguments): fixed frame construction
-
-Thu Sep 10 20:51:23 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * mn10300-tdep.c (mn10300_analyze_prologue): guard against NULL.
-
-Wed Sep 9 19:37:36 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * dbxread.c (IGNORE_SYMBOL): Remove definition, is never used.
- * os9kread.c: Remove comment mentioning IGNORE_SYMBOL.
-
-Wed Sep 9 11:39:05 1998 Ron Unrau <runrau@cygnus.com>
-
- * blockframe.c(find_pc_sect_partial_function): look for min syms in
- the same section when trying to guess the end of a function.
- * symfile.c(list_overlays_command): use print_address_numeric
- * remote-sim.c: export simulator_command
-
-1998-09-08 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * breakpoint.c (bpstat_stop_status): Declare a bp match if the
- current fp matches the bp->fp OR if the current fp is less than
- the bp->fp if we're looking at a bp_step_resume breakpoint.
-
-Tue Sep 8 19:42:58 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * symtab.h (struct symtab): Remove EXTRA_SYMTAB_INFO hook,
- not currently used.
- * symfile.c (allocate_symtab): Deprecate use of
- INIT_EXTRA_SYMTAB_INFO here.
-
-Fri Sep 4 15:33:25 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * README: Update remote debugging and testsuite info.
-
-Thu Sep 3 13:50:20 1998 Mark Alexander <marka@cygnus.com>
-
- * config/mn10300/tm-mn10300.h (FP_REGNUM): Redefine to be a
- pseudo-register, not the same as a3.
- (D2_REGNUM, D3_REGNUM, A2_REGNUM, A3_REGNUM): Define.
- * mn10300-tdep.c (fix_frame_pointer): New function.
- (set_movm_offsets): Use register number macros instead of
- hard-coded constants.
- (mn10300_analyze_prologue): Fix to handle redefinition of FP_REGNUM.
- (mn10300_frame_chain): Fix to handle redefinition of FP_REGNUM;
- use register number macros instead of hard-coded constants;
- add missing parameter to call of mn10300_analyze_prologue.
- (mn10300_frame_saved_pc): Use register number macros instead of
- hard-coded constants.
-
-Tue Sep 1 12:04:57 EDT 1998 Zdenek Radouch (radouch@cygnus.com)
-
- Changes to support/fix ARM/ELF port. Use MAKE_MSYMBOL_SPECIAL for
- both ELF and COFF;
- * elfread.c (elf_symtab_read): use ELF specific macro
- * coffread.c (coff_symtab_read): use COFF_MAKE_MSYMBOL_SPECIAL()
- * arm-tdep.c: separate COFF and ELF thumb processing
- disable --mapcs-float processing
- * dwarf2read.c: Disabled building of minimal symbols
- * config/arm/tm-arm.h: new macros for distinguishing arm/thumb
- * config/mips/tm-mips.h: use ELF specific macro
-
-Mon Aug 31 15:42:10 1998 Tom Tromey <tromey@cygnus.com>
-
- * top.c (context_hook): Define.
-
-Tue Aug 25 13:21:58 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * ax-gdb.c (gen_var_ref): Allow for typedef types.
- (gen_cast, gen_bitfield_ref, gen_expr, gen_deref): ditto.
-
-Mon Aug 24 18:29:03 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c (collect_symbol): Handle register doubles that
- are stored in two registers.
-
-Mon Aug 24 14:39:08 1998 Mark Alexander <marka@cygnus.com>
-
- * sh-stub.c (undoSStep): Improve comment.
- * sparc-tdep.c (sparc_extract_struct_value_address): Simplify to use
- same method on both 32-bit and 64-bit machines.
- * sparcl-tdep.c (sparclite_check_watch_resources): Simulator doesn't
- support hardware breakpoints.
- * config/sparc/tm-sparc.h (CALL_DUMMY): Improve comments.
-
-1998-08-20 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * rdi-share/Makefile.am (INCLUDES): Fix typeo.
- * rdi-share/Makefile.in: Regenerated.
-
-1998-08-19 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * rdi-share/Makefile.am: Use just `INCLUDES' not `libname_INCLUDES'.
- * rdi-share/Makefile.in: Regenerated.
-
-1998-08-19 Keith Seitz <keiths@cygnus.com>
-
- * v850ice.c (v850ice_stop): New function to stop the ICE.
- (v850ice_load) Pass filename to ICE DLL.
- (ice_stepi, ice_nexti, ice_cont): Do not directly call the gdb
- commands -- let the GUI do it so that it can retain control
- of the display.
-
-Wed Aug 19 15:53:52 1998 Anthony Green <green@hoser.cygnus.com>
-
- * i386v4-nat.c: Include sys/reg.h if present.
-
-Wed Aug 19 03:07:53 1998 Richard Henderson <rth@cygnus.com>
-
- * config/alpha/alpha-linux (XDEPFILES): Build ser-tcp.
-
-1998-08-18 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * symtab.c (decode_line_1): For minimal symbol, SKIP_PROLOG to
- make sure we stop after the frame pointer is locaded and backtrace
- prints an accurate stack. Complements changes made on Mon Jul 27
- 10:45:56 1998
- (decode_line_2): Replaced the whitespace after ">" in a prompt
- which has been taken away by changes made on Sun Jul 19 02:11:45
- 1998
-
-1998-08-18 Keith Seitz <keiths@cygnus.com>
-
- * stack.c: Define new hook, selected_frame_level_changed_hook, which
- will be called whenever the selected stack level changes.
- (select_frame): Call the selected_frame_level_changed_hook.
-
-Tue Aug 18 18:03:42 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote-rdi.c (arm_rdi_open): Pass serial device name to
- Adp_OpenDevice, and include it in error reports.
-
-1998-08-18 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * configure.in: Add more header files to AC_CHECK_HEADERS.
- * configure: Regenerated.
-
- * command.c: Include wait.h or sys/wait.h if present.
- * inftarg.c: Ditto.
- * core-aout.c: Include ptrace.h or sys/ptrace.h if present, based
- on autoconf test.
- * infptrace.c: Ditto.
-
- * expprint.c: Include ctype.h for isprint prototype.
- * i386aix-nat.c: Include sys/reg.h if autoconf says it is present.
- * i386v-nat.c: Include ptrace.h, sys/ptrace.h, and sys/reg.h if
- present, based on autoconf test.
-
- * utils.c: Include curses.h and term.h if present.
- (puts_debug): Change 'carriage_return' local variable to return_p
- to avoid name clash.
-
- * config/m68k/nm-apollo68b.h: Don't define PTRACE_IN_WRONG_PLACE,
- determine it with autoconf.
- * config/i386/nm-linux.h: Don't define NO_SYS_REG_H, determine it
- with autoconf.
- * config/i386/nm-i386sco.h: Don't define NO_PTRACE_H, determine it
- with autoconf.
- * config/i386/nm-i386v.h: Ditto.
- * config/i386/nm-symmetry.h: Ditto.
- * config/m88k/xm-cxux.h: Ditto.
- * config/m88k/xm-dgux.h: Ditto.
-
- * config/m68k/delta68.mh (NAT_FILE): nm-delta68.h no longer necessary.
- * config/m68k/nm-delta68.h: Removed.
-
-Fri Aug 14 11:14:03 1998 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-tdep.c (set_movm_offsets): Change second argument to
- be the actual args to movm itself. All callers changed. Only set
- fi->fsr.regs[x] if reg X is saved by the movm instruction.
-
-Fri Aug 14 04:18:23 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * sol-thread.c (lwp_to_thread): Fix error message for failing
- td_ta_map_lwp2thr call.
- (ps_lgetLDT): Mask off upper bits in GS register when comparing
- with selector.
-
-Wed Aug 12 16:30:01 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * remote-sim.c (simulator_command): Reset register cache after
- simulator command.
-
-Wed Aug 12 09:00:26 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * expprint.c (dump_prefix/postfix_expression): Don't try to print
- type expressions.
-
-Tue Aug 11 11:33:25 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * c-typeprint.c (c_print_type): Don't crash if varstring is null.
- * expprint.c expression.h (dump_expression): Rename to
- dump_prefix_expression.
- * Print out the expression in normal form. Call print_longest
- instead of trying to do it ourselves.
- * (dump_postfix_expression): New function, prints out the expression
- with indentation and better formatting and interpretation.
- * parse.c (parse_exp_1): Put calls to dump expressions under ifdef
- MAINTENANCE_CMDS and expressiondebug variable.
-
-Thu Aug 6 13:20:02 1998 Ron Unrau <runrau@cygnus.com>
-
- * infrun.c (wait_for_inferior): use stop_func_name instead of
- stop_func_start to decide that no debug info exists.
-
-Thu Jul 30 13:53:50 1998 Mark Alexander <marka@cygnus.com>
-
- * mips-tdep.c (mask_address_p): New variable.
- (mips_addr_bits_remove): Test mask_address_p to decide whether
- to mask off the upper 32 bits of addresses.
- (_initialize_mips_tdep): Add command to set mask_address_p.
- (mips_call_dummy_address): New function.
- * config/mips/tm-mips.h (CALL_DUMMY_ADDRESS): Redefine to
- call mips_call_dummy_address.
-
-1998-07-29 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * symfile.c (add_symbol_file_command): Test for the from_tty
- parameter and avoid query when not interactive.
-
-Mon Jul 27 16:11:42 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c (remote_set_transparent_ranges): new function.
- Send the start and end addresses of all loadable read-only
- sections down to the trace target, so that it can treat them
- as "transparent" (ie. don't care if they were collected or not).
-
-Mon Jul 27 15:38:07 1998 Mark Alexander <marka@cygnus.com>
-
- * mn10300-tdep.c (mn10300_analyze_prologue): Undo previous fix
- for setting frame address in optimized code; made unnecessary
- by compiler fixes.
-
-Mon Jul 27 10:45:56 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * symtab.c (decode_line_1): For minimal symbol, call
- find_pc_sect_line() to make sure the line number gets set
- properly.
- (print_symbol_info): Redeclare function void.
-
-1998-07-27 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * config/d10v/tm-d10v.h (REGISTER_NAMES): sp -> r15. The
- stack pointer et al are synthesized from the SP_REGNUM (etc)
- defines and should not be mentioned in REGISTER_NAMES.
-
-Fri Jul 24 14:41:19 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c (encode_actions): Treat register names and simple
- variable names as special cases and don't convert them to byte-
- codes: these things can be collected far more efficiently
- without invoking the bytecode interpreter.
-
-Fri Jul 24 13:32:46 1998 Mark Alexander <marka@cygnus.com>
-
- * config/i386/tm-i386.h (STORE_STRUCT_RETURN): Make it
- work on hosts of any endianness.
- * config/i386/tm-i386v.h: Ditto.
-
-Fri Jul 24 07:41:12 1998 Mark Alexander <marka@cygnus.com>
-
- * mn10300-tdep.c (set_movm_offsets): New helper function
- for mn10300_analyze_prologue.
- (mn10300_analyze_prologue): Simplify by factoring out common code.
- Fix bugs in setting frame address for optimized code.
- Use read_memory_nobpt instead of target_read_memory.
-
-Thu Jul 23 17:01:17 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c (collect_symbol): handle LOC_ARG case.
-
-Thu Jul 23 15:07:40 1998 Dawn Perchik <dawn@cygnus.com>
-
- * sparc-tdep.c (sparc_init_extra_frame_info): Recognize when we're
- in a function prologue before the SAVE instruction.
- (sparc_frame_saved_pc): Ditto.
- * config/sparc/tm-sparc.h (EXTRA_FRAME_INFO): Add in_prologue flag.
-
-Thu Jul 23 14:58:09 1998 Dawn Perchik <dawn@cygnus.com>
-
- * i386-tdep.c (i386_get_frame_setup): Recognize function
- prologues in code compiled with -fcheck-stack.
-
-Thu Jul 23 14:49:27 1998 Dawn Perchik <dawn@cygnus.com>
-
- * remote-mips.c (remote_mips_insert_hw_breakpoint,
- remote_mips_remove_hw_breakpoint): New functions for hardware
- breakpoints on LSI targets.
- * config/mips/tm-embed.h (target_remove_hw_breakpoint,
- target_insert_hw_breakpoint): Define to call
- remote_mips_insert_hw_breakpoint and remote_mips_remove_hw_breakpoint,
- respectively.
-
-1998-07-21 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * source.c (print_source_lines): Print "No such file or directory"
- just once.
- (directory_command): same as above; resets if user issues dir.
-
-Sun Jul 19 02:11:45 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * symtab.c (decode_line_2): Instead of printing a prompt
- and calling command_line_input() without a prompt, just
- call it with the proper args. This makes the GUI work too.
-
-Fri Jul 17 9:26:50 1998 Ron Unrau <runrau@cygnus.com>
-
- * blockframe.c (find_pc_sect_partial_function): allow for the possi-
- bility of multiple symbols at the same address when finding high.
- * breakpoint.c (resolve_sal_pc): if the function based section lookup
- fails, try getting the section from the minimal symbol table.
- * parse.c (write_exp_msymbol): use symbol_overlayed_address to get
- the LMA of a minimal symbol if unmapped.
- * symtab.c (find_line_symtab): change interface to return symtab
- containing the best linetable found.
- (decode_line_1): use find_line_symtab to set val.symtab. This should
- improve support for source files with multiple symtabs.
-
-Wed Jul 15 11:51:33 1998 Keith Seitz <keiths@cygnus.com>
-
- * main.c (main): Fix violations of GNU coding standard.
-
- * breakpoint.c: Export delete_command.
-
- * infcmd.c: Export continue_command, stepi_command, and nexti_command.
-
- * Makefile.in: Add target for v850ice.o.
-
- * configure.tgt: Add cygwin32 dependencies for v850 ice.
-
-Wed Jul 15 10:58:29 1998 Nick Clifton <nickc@cygnus.com>
-
- * tracepoint.c (set_raw_tracepoint): Cope with symbols that do not
- have an associated directory.
-
-Mon Jul 13 15:21:04 1998 Mark Alexander <marka@cygnus.com>
-
- * utils.c (puts_debug): Display non-printable characters in hex
- instead of octal.
-
-Thu Jul 9 16:16:47 1998 Jeffrey A Law (law@cygnus.com)
-
- * mn10300-tdep.c (mn10300_generic_register_names): New variable.
- (set_machine_hook): New function. Copy the appropriate register
- names into reg_names.
- (_initialize_mn10300_tdep): Set up to call set_machine_hook.
- * tm-mn10300 (NUM_REGS): Bump to 32.
- (REGISTER_NAMES): Updated accordingly.
-
-
-Tue Jul 7 7:40:13 1998 Ron Unrau <runrau@cygnus.com>
-
- * symtab.c (find_pc_sect_psymbol): allow case where textlow is 0
-
-Thu Jul 2 15:57:58 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * breakpoint.c (resolve_sal_pc): Accept absence of innermost
- Lexical block for breakpoint resolution.
-
-Thu Jul 2 10:22:00 1998 Dawn Perchik <dawn@cygnus.com>
-
- * mdebugread.c (parse_partial_symbols): Go ahead and read the .mdebug
- section, but just don't add a 2nd minimal symbol if this is an .mdebug
- section in an ELF file.
-
-1998-07-01 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * Makefile.in (ax-general.o): Depend on $(defs_h) too.
- (ax_h): Bother to define this.
-
-Mon Jun 29 19:01:18 1998 Jim Wilson <wilson@cygnus.com>
-
- * gnu-regex.c (re_comp): Add cast to char * before gettext calls.
-
-Sun Jun 28 11:35:48 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- Improve support for SunPro F77.
- * dbxread.c (end_psymtab, process_one_symbol): Handle minimal
- symbols with trailing underscore names.
- * minsyms.c (find_stab_function_addr): Ditto.
- * dbxread.c (process_one_symbol): Ignore N_ALIAS for now.
- * partial-stab.h (case N_ALIAS): Ditto.
- * stabsread.c (read_sun_builtin_type): Handle boolean types.
-
-Fri Jun 26 14:03:01 1998 Keith Seitz <keiths@cygnus.com>
-
- * symtab.h (enum namespace): Add new namespaces FUNCTIONS_NAMESPACE,
- TYPES_NAMESPACE, METHODS_NAMESPACE, and VARIABLES_NAMESPACE used by
- new search_symbols.
- Add prototype for search_symbols and free_search_symbols.
-
- * symtab.c (list_symbols): Rewrite to use new search_symbols.
- (file_matches): New helper function for search_symbols.
- (free_search_symbols): New function which frees data returned from
- search_symbols.
- (print_symbol_info): New helper function which prints info about a
- matched symbol to stdout. Extracted from old list_symbols.
- (print_msymbol_info): New helper function which prints info about
- a matched msymbol to stdout. Extracted from old list_symbols.
- (symtab_symbol_info): Extracted from old list_symbols.
- (variables_info): Use symtab_symbol_info.
- (functions_info): Use symtab_symbol_info.
- (types_info): Use symtab_symbol_info.
- (rbreak_command): Rewrite to use new search_symbols.
-
-Thu Jun 25 22:38:32 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * mips-tdep.c (mips_push_arguments): Use 128-bit stack frame
- alignment for inferior calls.
-
-Wed Jun 24 23:17:12 1998 Mark Alexander <marka@cygnus.com>
-
- * mn10200-tdep.c (mn10200_analyze_prologue): Fix calculation
- of jsr target address.
-
-Tue Jun 23 19:37:46 1998 Mark Alexander <marka@cygnus.com>
-
- * config/mn10200/tm-mn10200.h (SAVED_PC_AFTER_CALL): Don't
- zero upper byte of address.
-
-Tue Jun 23 17:32:26 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * rs6000-tdep.c (pop_dummy_frame): use memcpy.
- (push_arguments): use memset.
- (various other places): fix up indentation and long lines.
-
-Tue Jun 23 11:58:35 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * configure.in: s/lXext/-lXext/ for Jillian's change.
-
-Tue Jun 23 11:14:04 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * source.c (find_source_lines): fix indentation.
-
- * config/mips/tm-irix5.h: Modify to work better on irix 6, by
- making FP registers 8 bytes instead of 4.
- REGISTER_BYTES: redefine. REGISTER_BYTE(): redefine.
- REGISTER_VIRTUAL_TYPE: redefine. MIPS_LAST_ARG_REGNUM: redefine.
- * irix5-nat.c (fetch_core_registers): read 8 bytes per FP register.
- * mips-tdep.c (FP_REGISTER_DOUBLE): new macro to distinguish
- targets with 8-byte FP registers (don't use TARGET_MIPS64).
- (STACK_ARGSIZE): new macro, how much space is taken up on the
- stack for each function argument (don't use TARGET_MIPS64).
- (mips_push_arguments): modify logic to work better on Irix 6
- (n32 ABI).
-
-Tue Jun 23 12:29:53 1998 Jillian Ye <jillian@cygnus.com>
-
- * configure.in: Add -lXext to mips_extra_libs
- * configure: Regenerated.
-
-Sun Jun 21 09:31:12 1998 Ron Unrau (runrau@cygnus.com)
-
- * symtab.c (find_line_pc): assumed that a PC of 0 is illegal.
- Changed to pass PC as arg and return 1 if valid (0 otherwise).
- * symtab.h: Change prototype to match.
- * symtab.c (find_line_pc_range): Use new interface.
- * breakpoint.c (resolve_sal_pc): Ditto.
-
-Wed Jun 17 15:50:00 1998 Ron Unrau (runrau@cygnus.com)
-
- * parse.c (target_map_name_to_register): Check target specific
- aliases *first* so that it can over-ride architectural names
-
-Wed Jun 17 17:13:38 1998 Said Ziouani (saidz@park-street.cygnus.com)
-
- * remote-sds.c (sds_start_remote): Fix printf call.
-
-Tue Jun 16 16:32:08 1998 Mark Alexander <marka@cygnus.com>
-
- * mn10200-tdep.c (mn10200_analyze_prologue): Fix null pointer
- crash when in "start".
-
-Tue Jun 16 14:38:40 1998 Ron Unrau (runrau@cygnus.com)
-
- * dbxread.c: reset function_start_offset after a finishing N_FUN
- is seen.
- * remote-sim.c: allow TARGET_REDEFINE_DEFAULT_OPS to override
- target vectors as needed.
-
-Sun Jun 14 08:46:25 1998 Ron Unrau (runrau@cygnus.com)
-
- * partial-stab.h: 'F' and 'f' type N_FUN psymbols should pass
- CUR_SYMBOL_VALUE as CORE_ADDR instead of long
- * buildsym.[ch]: export pending_blocks list
-
-Sat Jun 13 13:02:32 1998 Dawn Perchik (dawn@cygnus.com)
-
- * remote.c: Fix remote help string to match that of help.exp.
-
-Fri Jun 12 14:22:55 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * configure.in (LIBS): Add -lw to the list of libraries if needed.
-
-Thu Jun 11 15:05:10 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * btowc.c: Removed.
- * configure.in: Don't see if we need to replace btowc().
- * Makefile.in: Don't include LIBOBJS.
- * configure: Regenerated.
- * gnu-regex.c (regex_compile): Only support i18n [:foo:] if
- we have btowc().
-
-Wed Jun 10 15:39:14 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * c-exp.y: Fix problems with parsing "'foo.bar'::func".
- Some languages allow symbols with dots.
-
- * gdbtypes.c (check_stub_method): Cosmetic. Use more descriptive
- names for parameters.
-
- * jv-exp.y: Parser now accepts primitive types.
- * (parse_number): Use correct ifdef for scanf long double support.
- * jv-lang.c (java_array_type): Initial cut at array support.
-
- * language.c language.h (set_language): Now returns previous language.
-
- * symtab.c (find_methods): Make static. Cosmetic changes, including
- indentation, and adding descriptive comments. Move local variable
- defs into the block they are used in.
- * Don't call check_stub_method any more. Use gdb_mangle_name to
- generate the full method name. find_method doesn't need all the other
- goobldegook that check_stub_method does.
- * (gdb_mangle_name): Use more descriptive names for parameters. Fix
- comment.
- * (lookup_partial_symbol lookup_block_symbol): Check for java to
- ensure we can find mangled names.
- * (decode_line_1): Move local variable defs into the block they are
- used in. (Improves code readability.)
-
-Wed Jun 10 18:04:35 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * gdbtypes.c (get_discrete_bounds): Assign unsigned type flag for
- all-positive enum.
- (create_set_type): Ditto for all-positive set values.
- * values.c (unpack_field_as_long): Check for typedef in struct
- field unpacking.
-
-Wed Jun 10 14:06:05 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * configure.in: Add some tests for gnu-regex.c's benefit.
- See if btowc() function is provided in C library.
- * configure, config.in: Regenerated.
- * Makefile.in (CLIBS, CDEPS): Add @LIBOBJS@ to build btowc.c
- if necessary.
- * btowc.c: New file.
-
- * gnu-regex.c: Reorder wchar.h and wctype.h includes for Solaris'
- benefit.
- Drop namespace preserving defines for now.
-
-Wed Jun 10 11:53:42 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * gnu-regex.c: Include "gnu-regex.h", not "regex.h".
-
-Wed Jun 10 11:34:07 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * gnu-regex.c, gnu-regex.h: Change LGPL license to GPL license
- to stay consistent with the rest of GDB.
-
-Wed Jun 10 11:27:39 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * gnu-regex.c, gnu-regex.h: Update to current FSF (glibc) versions.
-
-Wed Jun 10 10:58:18 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * printcmd.c (disassemble_command): move overlay mapping code
- "up" into find_pc_partial_function.
- * blockframe.c (find_pc_partial_function): adjust start address
- and end address for overlays (mapped vs. unmapped addresses),
- so that all callers of this function may benefit.
- * m32r-tdep.c (m32r_skip_prologue): adjust indentation.
-
-Mon Jun 8 16:08:10 1998 Ron Unrau <runrau@cygnus.com>
-
- * objfiles.c (add_to_objfile_sections): All targets to define
- TARGET_KEEP_SECTION to permit them to retain bfd sections that
- GDB would otherwise have discarded.
-
-Fri Jun 5 13:56:19 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * dbxread.c (read_dbx_symtab): Don't lower texthigh for last psymtab.
-
-Thu Jun 4 18:35:04 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * remote.c (init_extended_remote_ops): Make extended_remote_ops
- by copying from remote_ops, move it and init_remote_ops to
- usual place at end of file, remove "void" from arg lists.
-
-Thu Jun 4 17:51:06 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc-tdep.c (sparc_fix_call_dummy): Byte-swap the call dummy
- on bi-endian machines.
- (sparc_extract_return_value): Handle values smaller than int on
- machines with little-endian data.
- (sparc_target_architecture_hook): Set bi_endian flag.
-
-Thu Jun 4 12:14:48 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * printcmd.c (disassemble_command): Fix off-by-one error for
- disassembling functions in unmapped overlay sections.
-
-Thu Jun 4 10:15:03 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * remote.c: merged.
-
- - Jim Blandy <jimb@zwingli.cygnus.com>
- (print_packet, remote_packet_command): New functions.
- (_initialize_remote): Register the remote-packet command.
- - David Taylor <taylor@texas.cygnus.com>
- (_initialize_remote): remote-compare is now
- compare-sections.
- - Elena Zannoni <ezannoni@kwikemart.cygnus.com>
- (remote_compare_command): added warning, issued in case
- of mismatch only.
-
-Thu Jun 4 08:25:38 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * remote.c (remote_compare_command): New function, new command.
- Compare object file binary image with corresponding memory on
- remote target. Report differences.
-
-Tue Jun 2 19:05:04 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc-tdep.c (sparc_target_architecture_hook): Set target
- byte order only when it's selectable.
-
-Tue Jun 2 02:01:56 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc-tdep.c (sparc_target_architecture_hook): New function to
- set endianness based on machine type.
- (_initialize_sparc_tdep): Initialize target_architecture_hook.
- (sparc_print_register_hook): Print PSR and FPSR in fancy format
- on 32-bit machines.
- * config/sparc/tm-sparc.h (PRINT_REGISTER_HOOK): Redefine to
- call sparc_print_register_hook instead of using inline code.
- * config/sparc/tm-sp64.h (PRINT_REGISTER_HOOK): Remove.
-
-Thu May 28 17:19:14 1998 Keith Seitz <keiths@cygnus.com>
-
- * main.c (main): Check for NULL from getenv on CYGWIN32.
-
-Thu May 28 09:41:44 1998 Nick Clifton <nickc@cygnus.com>
-
- * monitor.c (monitor_vsprintf): Handle %%. Patch courtesy of
- Felix Lee (flee@cygnus.com)
-
-Thu May 28 00:27:35 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * mips-tdep.c (mips_push_dummy_frame): Fix calculation of
- PROC_REG_OFFSET and PROC_FREG_OFFSET.
-
-Mon Apr 27 14:37:49 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/v850/tm-v850.h (REGISTER_BYTE): FP_REGNUM and
- FP_RAW_REGNUM use the same register location.
-
- * v850-tdep.c (v850_scan_prologue): Use FP_RAW_REGNUM instead of
- FP_REGNUM.
- (v850_frame_chain): Ditto.
-
- * config/v850/tm-v850.h (REGISTER_NAMES): Add "fp".
- (NUM_REGS): Update.
- (FP_REGNUM): Update.
- (FP_RAW_REGNUM): Define.
-
-Wed May 27 14:22:31 1998 Keith Seitz <keiths@cygnus.com>
-
- * main.c (main): Convert the path returned from getenv to a posix
- path on cygwin32 hosts.
-
-Mon May 25 13:31:27 1998 Keith Seitz <keiths@cygnus.com>
-
- * remote.c (remote_open_1): If an error occurs starting the remote,
- pop the target AND return.
-
-Sat May 23 02:23:09 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * dwarf2read.c (read_subroutine_type): Set TYPE_FLAG_PROTOTYPED
- on C++ functions.
- * valops.c (value_arg_coerce): Add new argument to indicate whether
- the function has a prototype, handle integer and float promotions
- accordingly.
- (call_function_by_hand): Always call value_arg_coerce, pass down
- prototype information.
-
-Fri May 22 10:56:36 1998 John Metzler <jmetzler@cygnus.com>
-
- * remote.c (_initialize_remote): Typo extended__remote
-
-Thu May 21 13:14:25 1998 John Metzler <jmetzler@cygnus.com>
-
- * gnu-nat.c (init_gnu_ops): Initialization of target ops by assignment.
- (_initialize_gnu_nat): Call new init
- * mac-nat.c (init_child_ops): Ditto.
- (_initialize_mac_nat): Ditto.
- * monitor.c (init_base_monitor_ops): Ditto.
- (_initialize_remote_monitors): Ditto.
- * ppc-bdm.c (init_bdm_ppc_ops): Ditto.
- (_initialize_bdm_ppc): Ditto.
- * remote-adapt.c (init_adapt_ops): Ditto.
- (_initialize_remote_adapt): Ditto.
- * remote-array.c (init_array_ops): Ditto.
- (_initialize_array): Ditto.
- * remote-bug (init_bug_ops): Ditto.
- (_initialize_remote_bug): Ditto.
- * remote-e7000.c (init_e7000_ops): Ditto.
- (_initialize_remote_e7000): Ditto.
- * remote-eb.c (init_eb_ops): Ditto.
- (_initialize_remote_eb): Ditto.
- * remote-es.c (init_es1800_ops): Ditto.
- (init_es1800_child_ops): Ditto.
- (_initialize_es1800): Ditto.
- * remote-hms.c (init_hms_ops): Ditto.
- (_initialize_remote_hms): Ditto.
- * remote-mm.c (init_mm_ops): Ditto.
- (_initialize_remote_mm): Ditto.
- * remote-nindy.c (init_nindy_ops): Ditto.
- (_initialize_nindy): Ditto.
- * remote_nrom.c (init_nrom_ops): Ditto.
- (_initialize_remote_nrom): Ditto.
- * remote-os9k (init_rombug_ops): Ditto.
- (_initialize_remote_os9k): Ditto.
- * remote-rdi.c (init_rdi_ops): Ditto.
- (_initialize_remote_rdi): Ditto.
- * remote-rdp.c (init_remote_rdp_ops): Ditto.
- (_initialize_remote_rdp): Ditto.
- * remote-sds.c (init_sds_ops): Ditto.
- (_initialize_remote_sds): Ditto.
- * remote-sim.c (init_gdbsim_ops): Ditto.
- (_initialize_remote_sim): Ditto.
- * remote-st.c (init_st2000_ops): Ditto.
- (_initialize_remote_st2000): Ditto.
- * remote-udi.c (init_udi_ops): Ditto.
- (_initialize_remote_udi): Ditto.
- * remote-vx.c (init_vx_ops): Ditto.
- (init_vx_run_ops): Ditto.
- (_initialize_vx): Ditto.
- * remote.c (init_remote_ops): Ditto.
- (init_extended_remote_ops): Ditto.
- (_initialize_remote): Ditto.
- * sparcl-tdep.c (init_sparclite_ops): Ditto.
- (_initialize_sparcl_tdep): Ditto.
- * v850ice.c (init_850ice_ops): Ditto.
- (_initialize_v850ice): Ditto.
- * win32-nat.c (init_child_ops): Ditto.
- (_initialize_inftarg): Ditto.
-
-1998-05-21 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * ax-gdb.c (const_var_ref): Don't handle function names. I don't
- want to implement all the "usual unary conversion" rules for
- constants.
- (gen_usual_unary): Turn "function" values into "pointer to
- function" values, in accordance with ANSI.
- (gen_deref): Don't do the usual unary conversions here. Let the
- caller do it. Note that dereferencing a function pointer yields
- a function designator, which we call an rvalue, not an lvalue.
- (gen_address_of): Handle functions specially.
- (gen_struct_ref): Perform the usual unary conversions before
- calling gen_deref.
- (gen_expr): In case for the prefix '*' operator, call
- gen_usual_unary manually.
-
-Wed May 20 15:29:41 1998 Gavin Koch <gavin@cygnus.com>
-
- * mips/tm-tx39.h (MIPS_DEFAULT_FPU_TYPE): Defined as MIPS_FPU_NONE.
- * mips/tm-tx39l.h: Same.
-
-Wed May 20 10:12:11 1998 John Metzler <jmetzler@cygnus.com>
-
- * m32r-tdep.c (decode_prologue): Handle frames compiled with -Os.
- Split out as separate function called by skip prologue and scan
- prologue. new formula handles optimization in which the prologue
- is interleaved with the body of the function. Also recognizes new
- variations of prologue encoding. Use of frame pointer is
- essential to debugging, -fno-omit-frame-pointer
- (m32r_skip_prologue): Call decode prologue, ignore line info
- (m32r_scan_prologue): Call decode prologue, ignore line info.
-
-Tue May 19 17:23:54 1998 John Metzler <jmetzler@cygnus.com>
-
- * w89k-rom.c (_initialize_w89k): Call new init function
- (init_w89k_cmds): Convert to dynamic initialization of monitor_ops
- data structure for forward compatability with additions to the
- data structure.
- * dbug-rom.c (_initialize_dbug_rom): ditto
- (init_dbug_cmds): ditto
- * m32r-rom.c (_initialize_m32r_rom): ditto
- (init_m32r_cmds): ditto
-
-Tue May 19 14:54:11 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c (memrange_cmp): use const void * args to avoid
- ANSI compiler warnings.
-
-1998-05-19 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * ax-gdb.c (gen_fetch, gen_var_ref, gen_deref, find_field,
- gen_bitfield_ref, gen_expr): Call error, not abort.
- * ax-general.c (read_const, generic_ext, ax_trace_quick,
- ax_label, ax_const_d, ax_reg, ax_print): Same.
-
- * tracepoint.c: Remove the $(...) syntax for memranges.
- (validate_actionline, encode_actions, trace_dump_command): Remove
- clauses for the $(...) syntax.
- (parse_and_eval_memrange): Function deleted.
- (_initialize_tracepoint): Update function description.
-
- * ax-gdb.c (_initialize_ax_gdb): Make the "agent" command a
- subcommand of "maintenance", as it should have been from the
- beginning. #include "gdbcmd.h", to get the declaration for
- maintenancelist.
- * Makefile.in: Document that dependency.
-
-Tue May 19 12:00:58 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * tracepoint.c (get_tracepoint_by_number): new function, to access
- traceframe_number for use of the GUI.
-
- * tracepoint.h: added prototype for get_traceframe_number.
-
-Mon May 18 13:34:27 1998 Keith Seitz <keiths@cygnus.com>
-
- * dbxread.c (process_one_symbol): If block addresses are relative to
- function start addresses, reset function_start_address whenever a new
- source file is seen.
-
-Mon May 18 13:04:27 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c (get_tracepoint_by_number): make sure to advance
- arg pointer even if we fail to parse a useful number. Otherwise,
- since this function is called in a loop, it may loop forever!
- Also change strtol call to allow arbitrary radix.
- (map_args_over_tracepoints (and other places)): add QUIT; call
- to loop, to allow breakout using control-C. Not all loops were
- analyzed to make sure they could terminate cleanly, but even
- terminating with a messed-up tracepoint list would be better
- than not terminating at all!
- (tdump_command): check to see if we're connected to a trace-
- capable target (currently only "remote") before doing anything
- else.
-
-Sat May 16 22:21:48 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * config/d30v/tm-d30v.h (INIT_FRAME_PC_FIRST): Fill in PC into
- frame struct before extracting saved register offsets.
-
-Fri May 15 22:47:45 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c (encode_actions): fix typo in printf format string.
-
-1998-05-15 Jim Blandy <jimb@zwingli.cygnus.com>
-
- Implement a few more tracing operators: ^ | & ~ !
- * ax-gdb.c (gen_integral_promotions, gen_logical_not,
- gen_complement): New functions.
- (gen_binop): New argument MAY_CARRY, indicating whether we need to
- correct the upper bits of the value after performing the
- operation. Callers changed.
- (gen_expr): Handle BINOP_BITWISE_AND, BINOP_BITWISE_IOR, and
- BINOP_BITWISE_XOR here as well, by calling gen_binop. Handle
- UNOP_LOGICAL_NOT, UNOP_COMPLEMENT.
-
- * ax-gdb.c (gen_conversion): Reworked to avoid some unnecessary
- sign extension.
-
- * ax-gdb.c (gen_usual_arithmetic): Renamed from gen_usual_binary,
- to match the ANSI C standard better. Callers changed.
-
- * ax-gdb.c (gen_traced_pop): Add prototyped declaration.
-
-Fri May 15 18:18:38 1998 David Taylor <taylor@texas.cygnus.com>
-
- * tracepoint.c (stringify_collections_list): return a collection
- of strings rather than a single string.
- (free_actions_list): new function.
- (encode_actions): process collection of strings returned by
- stringify_collections_list.
-
-1998-05-15 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * ax-gdb.c (gen_traced_pop): New function.
- (gen_expr): Call it for comma operator.
- (gen_trace_for_expr): Call it, instead of writing it out.
-
- Add facilities for sending arbitrary packets to the remote agent.
- There are a bunch of improvements to make (make it generic; handle
- 'O' replies properly), but I just want to get this onto the branch.
- * remote.c (print_packet, remote_packet_command): New functions.
- (_initialize_remote): Register the remote-packet command.
-
-Thu May 14 17:52:31 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * tracepoint.c: move actionline_type definition to tracepoint.h.
- (validate_actionline): make non static.
-
- * tracepoint.h: move actioline_type definition from tracepoint.c.
- (validate_actionline) moved prototype from tracepoint.c.
-
-Thu May 14 11:49:18 1998 David Taylor <taylor@texas.cygnus.com>
-
- * tracepoint.c (validate_actionline): add additional error
- checking, remove some dead code.
- (encode_actions): additional cleanups.
- (trace_find_command): remove some dead code.
- (trace_find_pc_command): ditto.
- (trace_find_tracepoint_command): ditto.
- (trace_find_line_command): ditto.
- (trace_find_range_command): ditto.
- (trace_find_outside_command): ditto.
-
-Thu May 14 5:51:00 1998 Ron Unrau <runrau@cygnus.com>
-
- * symtab.c (decode_line_1): set section for "break *<addr>"
-
-Wed May 13 20:58:02 1998 Mark Alexander <marka@cygnus.com>
-
- * corefile.c (reopen_exec_file): Reopen the exec file if
- it has changed.
-
-Wed May 13 15:22:02 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc-tdep.c (fetch_instruction): New function.
- (single_step, sparc_init_extra_frame_info, examine_prologue):
- Use fetch_instruction instead of read_memory_integer
- to ensure that instructions are always read as big-endian.
-
-Wed May 13 14:42:21 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add AC_FUNC_ALLOCA.
- * defs.h: Check HAVE_ALLOCA_H rather than sparc. Add _AIX pragma
- alloca.
- * configure: Rebuild.
- * Makefile.in (jv-lang.o, jv-typeprint.o, jv-valprint.o): New
- targets.
-
-Wed May 13 11:19:08 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c (trace_command): Remove old diagnostic code that was
- preventing tracepoints from being defined with a full-path filename.
-
-Tue May 12 13:17:35 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * stabsread.c (read_one_struct_field): Check for typedef in type
- tree before clearing bitfield information.
-
-1998-05-11 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * ax-gdb.c (gen_binop): New function, based on gen_mul, to replace
- gen_mul and gen_div, and handle `%' op as well. Correctly tests
- type of arguments.
- (gen_expr): Factor out common code in binary arithmetic operators.
- Add support for `%'.
- (gen_mul, gen_div): Removed.
-
-Thu May 7 14:49:38 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * config/sparc/tm-sp64.h (CALL_DUMMY): Store and retrieve
- %o0-%o5 as 64-bit values; compensate for stack bias.
- (USE_STRUCT_CONVENTION): We only pass pointers to structs
- if they're larger than 32 bytes.
- (REG_STRUCT_HAS_ADDR): Ditto.
-
- * sparc-tdep.c (sparc_init_extra_frame_info): Use read_sp()
- instead of read_register. If the target is a sparc64 and the frame
- pointer is odd, compensate for the stack bias.
- (get_saved_register): Use read_sp().
- (DUMMY_STACK_REG_BUF_SIZE): Use FP_REGISTER_BYTES.
- (sparc_push_dummy_frame): Use read_sp()/write_sp(). On sparc64,
- save the PC, NPC, CCR, FSR, FPRS, Y and ASI registers.
- (sparc_frame_find_saved_regs): Use read_sp(). Read the PC, NPC,
- CCR, FSR, FPRS, Y and ASI registers from the frame, if it's a
- dummy frame.
- (sparc_pop_frame): Use write_sp(). If the target is a sparc64 and
- the FP is odd, compensate for stack bias.
- (sparc_store_return_value): Right-justify the return value before
- writing it to %o0.
- (sparc_fix_call_dummy): Don't NOP out part of the call dummy on
- sparc64.
- (sparc64_read_sp, sparc64_read_fp, sparc64_write_sp,
- sparc64_write_fp, sp64_push_arguments,
- sparc64_extract_return_value): New functions to support the
- sparc64 ABI.
-
- * dwarfread.c (handle_producer): Set processing_gcc_compilation to
- the right version number.
-
- * dwarf2read.c (read_file_scope): Assume we're processing
- GCC2 output.
-
-Wed May 6 16:34:03 1998 Jeffrey A Law (law@cygnus.com)
-
- * somsolib.c: Include gdb_stat.h.
-
-Mon May 4 18:34:01 1998 David Taylor <taylor@texas.cygnus.com>
-
- * ax-gdb.c (gen_mul): new function; (gen_div): new function;
- (gen_expr): add support for * and / operators, call gen_mul and
- gen_div as appropriate.
-
-Mon May 4 16:24:22 1998 Mark Alexander <marka@cygnus.com>
-
- * defs.h (make_run_cleanup): Declare.
- * solib.c (find_solib): Pass correct number of arguments to
- make_run_cleanup.
-
-Mon May 4 07:08:25 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c (trace_actions_command): actions command must set
- step_count to zero (in case previous actions have set it but the
- new set does not).
-
-Sat May 2 09:35:07 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * ocd.h: Add new flags, function codes, and processor types to
- support new Wiggler capabilities.
- * (ocd_write_bytes_size): New function to allow atomic writes of
- memory in sizes larger than a byte.
-
- * ser-unix.c (baudtab): Add 57600, 115200, 230400, and 460800 baud.
-
-Fri May 1 19:51:32 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * stabsread.c (read_one_struct_field): Do not override supplied
- bitfield size for a range type value.
-
- * gdbtypes.c (create_range_type): For a range with positive
- lower limit, declare range type as unsigned.
-
-Fri May 1 10:58:34 1998 John Metzler <jmetzler@cygnus.com>
-
- * monitor.c: Turn off debug
-
-Fri May 1 09:29:56 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * breakpoint.c (delete_command): Skip internal breakpoints when
- all breakpoints are requested.
-
- * stabsread.c (define_symbol): Record parameter types from Sunpro
- function stabs in the TYPE_FIELDS of the function type.
-
-Thu Apr 30 15:59:54 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * Makefile.in (config-check-targets, config-check-hosts): Removed.
-
-1998-04-30 Paul Eggert <eggert@twinsun.com>
-
- * Makefile.in (maintainer-clean):
- Don't get ahead of yourself and delete Makefile
- before running `make'.
- (local-maintainer-clean, do-maintainer-clean): New rules.
-
-Wed Apr 29 14:02:59 1998 David Taylor <taylor@texas.cygnus.com>
-
- * ax-gdb.c (gen_add): when adding a pointer and an int, use
- the size of the pointer, not the int (typo) to decide how
- to extend the result.
-
-Wed Apr 29 10:20:40 1998 John Metzler <jmetzler@cygnus.com>
-
- * monitor.h: Defined additional hooks for dmpregs, configure_hooks
- and wait_filter. These additions require that all ROM monitor
- interfaces be recoded to initialize monitor ops using assignments
- rather than static structure initialization. Added new bits to
- flags MO_EXACT_DUMPADDR, MO_HAS_BLOCKWRITES.
-
- * monitor.c (RDEBUG): Conditional tracing throughout the file.
- (fromhex): Now recognized upper cse hex digits
- (monitor_printf_noecho):
- (monitor_readchar): Tracing interferes with input timing.
- (monitor_open): Register different memory write functions with
- dcache_init if MO_HAS_BLOCKWRITES.
- (flush_monior_dcache): Added as an additional utilty.
- (monitor-resume): Call continue hook if one has been supplied.
- (monitor_wait_filter): New function Factored out of monitor wait
- and used if alternate wait-filter has not been provided.
- (monitor_wait): call alternate wait filter if provided. Call
- monitor_dump_regs, a new function factored out from inline code.
- (monitor_dump_block): A new function used as a utility when
- monitors must dump several blocks of registers using different
- commands.
- (monitor_dump_regs): Call alternate function if provided. Uses new
- hook in monitor.h.
- (monitor_write_memory): Engage previouly added hook
- MO_FILL_USES_ADDR.
- (monitor_write_even_block): new function supports writing long
- blocks of 4byte words.
- (longlongendswap): new internal function
- (monitor_write_memory_longlongs): new function writes large blocks
- using command to enter a long long.
- (monitor_write-memory_block): new Function figures out which block
- mod to use.
- (monitor_read_memory): Can now handle dump formats in which the bytes
- preceeding the requested data is not printed.
-
-Tue Apr 28 19:41:33 1998 Tom Tromey <tromey@cygnus.com>
-
- * tracepoint.c (memrange_cmp): Another typo fix; `memrbnge' ->
- `memrange'.
-
- * tracepoint.c (memrange_cmp): Fixed typo in function intro.
-
-Tue Apr 28 17:41:20 1998 Philippe De Muyter <phdm@macqel.be>
-
- * symfile.c (overlay_auto_command): Add forgotten parameter
- definitions.
- (overlay_manual_command, overlay_off_command): Likewise.
- (overlay_load_command): Likewise.
- * tracepoint.c (memrange_cmp): Parameters have type void *, not
- struct memrange *.
-
-Tue Apr 28 11:08:25 1998 John Metzler <jmetzler@cygnus.com>
-
- * rom68k-rom.c (_initialize_rom68k): Fix unresolved init_rom_68kcmds.
-
-Mon Apr 27 14:32:21 1998 Mark Alexander <marka@cygnus.com>
-
- * config/sparc/tm-sparc.h (CALL_DUMMY): Shorten it drastically,
- make it work on the simulator.
- (FIX_CALL_DUMMY): Convert to function call instead of inline code.
- (sparc_fix_call_dummy): Declare.
- * sparc-tdep.c (sparc_fix_call_dummy): New function, taken from
- old FIX_CALL_DUMMY macro, with additional fixes for simulator.
- (sparc_push_dummy_frame): Set registers differently on simulator
- to prevent corrupted register window save areas.
-
-Mon Apr 27 13:46:40 1998 John Metzler <jmetzler@cygnus.com>
-
- * rom68k-rom.c (_initialize_rom68k, init_rom68k_cmds):
- Convert all static initializations of monitor ops structures to
- executable initializations in order that additions to the data
- structure definition can me made without repeating this editing
- exercise.
- * abug-rom.c (_initialize_abug_rom, init_abug-cmds): Ditto.
- * cpu32bug-rom.c (_initialize_cpu32bug_rom, init_cpu32bug_cmds): Ditto.
- * mon960-rom.c (initialize_mon960, init_mon960_cmds): Ditto.
- * op50-rom.c (initialize_op50n, init_op50n_cmds): Ditto.
- * ppcbug-rom.c (_initialize_ppcbug_rom, init_ppc_cmds): Ditto.
- * sh3-rom.c (_initialize_sh3_rom, init_sh3_cmds): Ditto.
- * sparclet-rom.c (_initialize_sparclet, init_sparclet_cmds): Ditto.
- * remote-est.c (_initialize_est, init_est_cmds): Ditto.
- * remote-hms.c ( _initialize_remote_hms, init_hms_cmds): Ditto.
-
-Mon Apr 27 10:43:04 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * gdb_string.h (strdup): Don't specify arguments in prototype.
-
-Sun Apr 26 07:57:21 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * rs6000-nat.c (vmap_ldinfo): Issue warning instead of error if
- fstat on ldinfo_fd fails. Use objfile->obfd instead of vp->bfd
- to check for reference to the same file.
-
- * target.c (target_read_string): Handle string transfers at the
- end of a memory section gracefully.
-
-Fri Apr 24 17:18:56 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: enable EXEEXT setting
-
-Fri Apr 24 11:53:49 1998 David Taylor <taylor@texas.cygnus.com>
-
- * tracepoint.c (add_local_symbols): change type of type from
- char to int so that type shows up as 'A' or 'L' not 0.
-
-Thu Apr 23 16:37:20 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * README: Minor changes for 4.17 release.
-
-Thu Apr 23 15:44:39 1998 Per Bothner <bothner@cygnus.com>
-
- * symfile.c (deduce_language_from_filename): .class implies java.
-
-Thu Apr 23 12:52:21 1998 Philippe De Muyter <phdm@macqel.be>
-
- * configure.in (strerror): Check if function must be declared.
- * acconfig.h (NEED_DECLARATION_STRERROR): New define slot.
- * gdb_string.h (strerror): Function declaration issued if
- NEED_DECLARATION_STRERROR.
- * configure, config.in: Files regenerated.
-
-Thu Apr 23 12:27:43 1998 Philippe De Muyter <phdm@macqel.be>
-
- * symfile.c (simple_overlay_update_1): Do not prefix array address
- by `&'.
- * bcache.h (BCACHE_DATA_ALIGNMENT): Ditto.
- * tracepoint.c (encode_actions): Ditto.
- * language.c, complaints.c, utils.c (varargs.h): Do not include that
- file here, it is already included indirectly by defs.h.
- * dbxread.c (dbx_symfile_init, process_one_symbol): Cast xmalloc return
- value to the appropriate pointer type.
- * utils.c (floatformat_from_doublest): Ditto.
- * tracepoint.c (read_actions, _initialize_tracepoint): Ditto.
- (add_memrange): Likewise with xrealloc return value.
- * stabsread.c (ref_add): Ditto.
- * coffread.c (coff_symfile_init): Likewise for xmmalloc return value.
- * elfread.c (elf_symfile_read): Ditto.
- * os9kread.c (os9k_symfile_init): Ditto.
-
-Thu Apr 23 00:32:08 1998 Tom Tromey <tromey@cygnus.com>
-
- * config.in: Rebuilt.
- * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_STPCPY, HAVE_GETTEXT,
- HAVE_LC_MESSAGES): Define.
-
-Wed Apr 22 15:38:56 1998 Tom Tromey <tromey@cygnus.com>
-
- * configure: Rebuilt.
- * configure.in: Call CY_GNU_GETTEXT.
- * Makefile.in (top_builddir): New macro.
- (INTL): Define to @INTLLIBS@.
- (INTL_DEPS): New macro.
- (CDEPS): Reference INTL_DEPS, not INTL.
-
-Wed Apr 22 12:58:23 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- Handle missing shared libraries during the examination of a core
- dump gracefully.
- * solib.c (find_solib): Use catch_errors around call to
- solib_map_sections. Use warning instead of error if reading of
- the shared library name fails.
- (solib_map_sections): Change return and argument types to make
- it callable from catch_errors.
- (symbol_add_stub): Avoid GDB core dump if solib->abfd is NULL.
- * irix5-nat.c, osfsolib.c (xfer_link_map_member, solib_map_sections,
- symbol_add_stub): Ditto.
-
-Wed Apr 22 14:34:49 1998 Michael Meissner <meissner@cygnus.com>
-
- * Makefile.in (INTL*): Add support to link in the intl library,
- and to add -I options to its source and object directories.
- (INTERNAL_CFLAGS): Ditto.
- (C{LIBS,DEPS}): Ditto.
-
-Tue Apr 21 11:20:54 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * mips-tdep.c (gdb_print_insn_mips): Disassemble MIPS instructions
- with subtarget-specific `mach', rather than fixed default.
- * config/mips/tm-mips.h (TM_PRINT_INSN_MACH): New macro, default
- disassembly `mach'.
-
-Mon Apr 20 15:35:03 1998 Philippe De Muyter <phdm@macqel.be>
-
- * coffread.c (decode_base_type): Treat a long field with size greater
- than TARGET_LONG_BIT as long long.
- * values.c (value_from_longest): Print code value in error message.
-
-Mon Apr 20 15:32:21 1998 Mark Kettenis <kettenis@phys.uva.nl>
-
- * gdb/gdb_string.h (strdup): Declare only if not defined as a
- macro.
-
-Mon Apr 20 14:18:45 1998 J. Kean Johnston <jkj@sco.com>
-
- * procfs.c: Added replacement macros for LWP stuff. Fixed support
- for UnixWare / SVR4.2MP targets and any targets which use
- multi-file /proc entries. Fixed support for hardware watchpoints.
- * solib.c: SCO needs some of the same code as SunOS. Change
- preprocessor conditionals.
-
- * config/i386/i386sco5.mt: New file.
- * config/i386/tm-i386sco5.h: New file.
- * config/i386/i386sco5.mh (NATDEPFILES): add i386v-nat.o.
- * config/i386/nm-i386v42mp.h
- (TARGET_HAS_HARDWARE_WATCHPOINTS): define.
- Add other macros for hardware assisted watchpoints.
- * config/i386/nm-i386sco5.h: Correct attributions.
- (TARGET_HAS_HARDWARE_WATCHPOINTS): define.
- * config/i386/nm-linux.h (target_remote_watchpoint): Pass
- 'type' through to i386_insert_watchpoint.
-
-Mon Apr 20 14:12:30 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * infrun.c (wait_for_inferior): Don't add signalled processes
- as new threads.
- * procfs.c (wait_fd): Note if LWP has exited.
- (procfs_wait): use GETPID to get process ID.
-
-Sat Apr 18 15:21:04 1998 Stan Cox <scox@cygnus.com>
-
- * configure.tgt: Added sparc86x support.
-
-Thu Apr 16 13:13:24 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * rdi-share/etherdrv.c (EthernetWrite): Use strerror to get
- error string if in an ANSI C-ish environment.
-
-Wed Apr 15 18:59:48 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc-tdep.c (SPARC_HAS_FPU): Define.
- (sparc_extract_return_value): New function, required to handle
- machines without floating point.
- (sparc_store_return_value): Ditto.
- * config/sparc/tm-sparc.h (EXTRACT_RETURN_VALUE): Call
- sparc_extract_return_value instead of using inline code.
- (sparc_extract_return_value): Declare.
- (STORE_RETURN_VALUE): Call sparc_store_return_value instead
- of using inline code.
- (sparc_store_return_value): Declare.
-
-Wed Apr 15 12:19:42 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * solib.c (enable_break): Only call warning once
- instead of three times.
-
-Tue Apr 14 16:52:59 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc-tdep.c (sparc_extract_struct_value_address): Make it
- work correctly on little-endian hosts.
- (sparc_push_arguments): New function.
- (gdb_print_insn_sparc): New function.
- (_initialize_sparc_tdep): Make gdb_print_insn_sparc the default
- disassembler, so that SPARClite-specific instructions will
- be recognized.
- * sparcl-tdep.c (readchar): Print debugging information.
- (debug_serial_write): New function, a replacement for SERIAL_WRITE
- that prints debugging information.
- * config/sparc/tm-sparc.h (PUSH_ARGUMENTS): Define.
- (sparc_push_arguments): Declare.
-
-Tue Apr 14 15:43:49 1998 John Metzler <jmetzler@cygnus.com>
-
- * gdbcfgxref (xref_menu): Call new regex and wild card searches
- Now you can type in a specific triple like mips64-vr4300-elf or
- somthing like mips*.h
- (triple_search, wildcardsearch): The new functions
-
-Mon Apr 13 16:28:07 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * utils.c (warning): added call to warning_hook
-
- * source.c (find_source_lines): modified to call warning in case
- of source vs. executable time stamp mismatch. Simplified object
- file check. Initialized mtime to 0.
-
- * defs.h: added warning_hook prototype
-
- * top.c: added warning_hook prototype.
-
-Mon Apr 13 09:54:08 1998 Keith Seitz <keiths@andros.cygnus.com>
-
- * config/sparc/tm-sun4os4.h (IS_STATIC_TRANSFORM_NAME): Add missing
- definition.
-
-Fri Apr 10 22:36:28 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- Update support for x86 Solaris 2.
- * config/i386/tm-i386sol2.h, nm-i386sol2.h: New configuration
- files for x86 Solaris 2.
- * config/i386/i386sol2.mt, i386sol2.mh: Use them.
- * config/sparc/tm-sun4sol2.h (PROCFS_GET_CARRY): New macro, extract
- carry flag from a given regset.
- (IS_STATIC_TRANSFORM_NAME): New macro, check if a symbol name
- is a SunPro transformed name.
- * i386-tdep.c (sunpro_static_transform_name): New function to
- extract the source name from a SunPro transformed name.
- * inferior.h (procfs_first_available, procfs_get_pid_fd):
- Add prototypes.
- * infrun.c (wait_for_inferior): Handle breakpoint hit in
- signal handler without intervening stop in sigtramp.
- * procfs.c (procfs_lwp_creation_handler): Use PROCFS_GET_CARRY
- instead of direct access to the status register.
- (procfs_get_pid_fd): New function, returns procfs fd for a given pid.
- * sol-thread.c (ps_lgetLDT): New function, returns LDT for a given
- lwpid.
- (sol_find_new_threads): Handle failed libthread_db initialization
- gracefully.
- * stabsread.c (define_symbol): Use IS_STATIC_TRANSFORM_NAME
- to check for a SunPro transformed symbol name.
-
-Fri Apr 10 10:35:35 1998 John Metzler <jmetzler@cygnus.com>
-
- * utils.c (fmthex): A formatting function for hexdumps
-
- * mips-tdep.c (unpack_mips16): Fixed instruction decoding, lots of
- bit pattern interpretations. mips_fetch_instruction does not work
- for 16 bit instructions. Some confusion remains about sign
- extension in backward branches.
- (mips32_relative_offset): Sign extension
- (mips32_next_pc): Major debugging, bit pattern interpretation
- (print_unpack): debugging printf
- (fetch_mips_16): new funtion, key on PC low bit, not symbol table
- (mips16_next_16): Initial major debugging of this function. Lots
- of bit pattern mistakes.
- (mips_next_pc): key on low bit of PC, not symbol table.
- * symfile.c (generic_load): Added a download verification which
- reads back the loaded code. Download chunk size is now a defined
- macro. Fixed a bug in which downloading slips into loading one
- byte at a time. Lower level functions in monitor.c can load long
- sequences of bytes and make use of these fixups. Referencing
- bfd-start_address directly was incorrectly getting zero for start.
-
-Thu Apr 9 19:20:32 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * mips-tdep.c (do_fp_register_row): Use alloca rather than arrays
- with dynamic size.
-
-Wed Apr 8 19:21:42 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * top.c (print_gdb_version): Print 1998 now.
-
-Wed Apr 8 16:57:22 1998 Philippe De Muyter <phdm@macqel.be>
-
- * source.c: Remove obsolete decl of strstr().
-
-Wed Apr 8 16:47:33 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * solib.c (solib_create_inferior_hook): Remove Ulrich Drepper's
- patch of March 23 1998.
- * breakpoint.c (breakpoint_re_set_one): Remove Ulrich Drepper's
- patch of March 23 1998.
-
-Sat Apr 4 10:05:00 1998 Dawn Perchik <dawn@cygnus.com>
-
- * mdebugread.c (parse_partial_symbols): If this is an .mdebug
- section in an ELF file, override a symbol's ECOFF section with its
- ELF section. Also, fix stabs continuation where a stabs string
- continues for more than one continuation.
-
-Mon Apr 6 09:17:48 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * mips-tdep.c (mips_push_arguments): Specify dimention of valbuf
- using MAX_REGISTER_RAW_SIZE.
-
-Sat Apr 4 10:05:00 1998 Dawn Perchik <dawn@cygnus.com>
-
- * infrun.c: Fix prototype of signals_info to match static funtion.
-
-Thu Apr 2 12:47:41 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * sol-thread.c (sol_thread_store_registers): Save & restore new
- value of single updated register to prevent accidental clobbering.
-
-Wed Apr 1 22:01:09 1998 Mark Alexander <marka@cygnus.com>
-
- * config/sparc/tm-sparclite.h (TARGET_BYTE_ORDER_SELECTABLE): Define.
- * config/sparc/sparclite.mt: Link in the erc32 simulator.
-
-Wed Apr 1 16:30:49 1998 Ian Dall <Ian.Dall@dsto.defence.gov.au>
-
- * ns32k-tdep.c (flip_bytes, ns32k_localcount,
- ns32k_get_enter_addr, sign_extend): Restore functions mysteriously
- deleted.
-
- * ns32knbsd-nat.c: New (?) file to support fetching and storing
- registers on NetBSD hosts.
-
- * nbsd.mh (NATDEPFILES): put ns32knbsd-nat.o instead of
- ns32k-nat.o
-
- * ns32km3-nat.c (reg_offset): Get order of floating point
- registers correct. Add extra 32382 register offsets.
- (REG_ADDRESS): define to point at correct part of thread
- state. Use calls to "warning" instead of "message".
-
- * tm-nbsd.h, tm-ns32km3.h (REGISTER_NAMES, NUM_REGS,
- REGISTER_BYTES, REGISTER_BYTE): redefine allowing for 32382
- fpu registers.
-
-Wed Apr 1 13:43:07 1998 Philippe De Muyter <phdm@macqel.be>
-
- * NEWS: m68k-motorola-sysv host support added.
- * coffread.c (coff_start_symtab): Accept the filename as an argument,
- set it here. Callers updated.
-
-Wed Apr 1 23:13:23 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/mips/tm-mips.h (REGISTER_VIRTUAL_TYPE): Handle 32 bit SR,
- FSR and FIR registers.
- (REGISTER_VIRTUAL_SIZE): Compute using REGISTER_VIRTUAL_TYPE.
- (REGISTER_RAW_SIZE): Define using REGISTER_VIRTUAL_SIZE.
-
- * config/mips/tm-mips64.h: Ditto.
-
-Tue Mar 31 21:30:39 1998 Nick Clifton <nickc@cygnus.com>
-
- * arm-tdep.c (gdb_print_insn_arm): Attach a fake Thumb symbol
- vector to the info structure when disassembling thumb
- instructions.
-
- * coffread.c (coff_symtab_read, read_one_sym,
- process_coff_symbol): Support Thumb symbol types.
-
- * dbxread.c (process_one_symbol): Call SMASH_TEXT_ADDRESS (if it
- is defined) for function symbols.
-
-Tue Mar 31 16:39:28 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * tracepoint.c (get_tracepoint_by_number): change warning to note.
- (delete_trace_command): suppress y/n query if no tracepoints, or
- if not from_tty. (trace_pass_command): reject junk at end of args.
- (read_actions): an action list consisting only of "end" is discarded.
- (validate_actionline (for collect command)): an argument beginning
- with a dollar_sign but not recognized as a special argument is
- parsed like any other expression -- if it isn't a register name,
- it's rejected. Also reject an empty argument to while-stepping.
- (trace_find_command): reject a negative frame number argument.
- (_initialize_tracepoint): set $traceframe initially to -1.
-
-Mon Mar 30 16:42:12 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * rdi-share/Makefile.am, rdi-share/aclocal.m4,
- rdi-share/configure: New files.
- * rdi-share/configure.in: Rewritten to be an autoconf input file.
- * rdi-share/Makefile.in, rdi-share/configure: Generated by
- automake/autoconf.
- * rdi-share/dbg_hif.h, etherdrv.c, hostchan.c: Use autoconf tests
- to check environment.
-
-Sun Mar 29 15:17:16 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * tracepoint.c (trace_start_command): Set trace_running_p.
- (trace_stop_command): Clear trace_running_p.
-
-Sat Mar 28 15:19:48 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * NEWS: Update for 4.17 release.
-
-Fri Mar 27 10:15:50 1998 David Taylor <taylor@tito.cygnus.com>
-
- * tracepoint.c (parse_and_eval_memrange): Fix memory leaks.
- (encode_actions): Use the new gen_trace_for_expr function
- instead of expr_to_address_and_size; collect registers when
- using expressions. (clear_collection_list): Fix memory leak.
-
-1998-03-26 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * ax-gdb.h (gen_trace_for_expr): Add prototype.
-
-Thu Mar 26 17:24:23 1998 David Taylor <taylor@texas.cygnus.com>
-
- * tracepoint.c (validate_actionline): Fix memory leak.
- (encode_actions): Fix memory leak.
-
-Thu Mar 26 16:16:55 1998 David Taylor <taylor@tito.cygnus.com>
-
- * tracepoint.c (trace_mention): New function.
- (trace_command): Call it.
-
-1998-03-26 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * ax-general.c (ax_reqs): New function.
- * ax.h (enum agent_flaws, struct agent_reqs): New types.
- (agent_reqs): New extern prototype. Well, actually, this was
- there before, due to a premature checkin.
- (struct aop_map): Add new `data_size' member.
- * ax-general.c (aop_map): Supply its value.
- * ax-gdb.c (agent_command): Call ax_reqs, for testing.
-
- * ax-general.c (ax_print): If we encounter an invalid or
- incomplete opcode, don't abort; just print an error message.
-
- * ax-gdb.c: Generate trace bytecodes, as appropriate.
- (trace_kludge): New variable.
- (gen_fetch, gen_bitfield_ref): Emit trace bytecodes, if asked
- nicely.
- (expr_to_agent): Ask for no trace bytecodes.
- (gen_trace_for_expr): New function.
- (agent_command): Call it, and display the result appropriately ---
- no struct axs_value, so no type or kind information.
-
- * ax-gdb.c: Use TARGET_CHAR_BIT throughout, not HOST_CHAR_BIT.
-
-Thu Mar 26 22:29:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- * tracepoint.c (trace_status_command): Recognize a boolean return
- value from the stub to indicate whether trace experiment is
- running. Export this value as a global state variable.
- (trace_running_p) for use by the GUI. (from Michael Snyder)
- (trace_pass_command) added call to modify_tracepoint_hook.
-
- * tracepoint.h export trace_running_p.
-
-Thu Mar 26 13:08:01 1998 David Taylor <taylor@texas.cygnus.com>
-
- * tracepoint.c (validate_actionline): do not error out if
- exp->elts[0].opcode is not on short line -- let
- expr_to_address_and_size handle it.
-
-1998-03-26 Jim Blandy <jimb@zwingli.cygnus.com>
-
- * tracepoint.c: Include "ax.h", not "agentexpr.h".
-
- * tracepoint.c (encode_actions): Call expr_to_address_and_size,
- not simply expr_to_agent.
-
- * ax-general.c: Comment out code in progress, so everyone else can
- at least compile.
-
- * gdbtypes.c: Doc fix.
-
- * ax.h, ax-gdb.h, ax-general.c, ax-gdb.c: New files.
- * Makefile.in (REMOTE_OBJS): Add ax-general.o and ax-gdb.o.
- (SFILES): Add ax-general.c, ax-gdb.c.
- (ax_h): New variable.
- (ax-general.o, ax-gdb.o): New rules.
-
-
-Tue Mar 24 16:22:40 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
-
- * Makefile.in: Derive SHELL from configure.
- * config/d10v/d10v.mt config/m32r/m32r.mt
- config/mn10200/mn10200.mt config/mn10300/mn10300.mt
- config/d30v/d30v.mt: Remove -lm from SIM. This prevents
- dependency checking of -lm (under NT native builds). (It is
- automatically added by configure if it exists.)
- * doc/configure mswin/configure nlm/configure
- testsuite/gdb.base/configure testsuite/gdb.c++/configure
- testsuite/gdb.chill/configure testsuite/gdb.disasm/configure
- testsuite/gdb.stabs/configure testsuite/gdb.threads/configure:
- Regenerate with autoconf 2.12.1 to fix shell issues for NT native
- builds.
-
-Mon Mar 23 18:10:57 1998 Ulrich Drepper (drepper@cygnus.com)
-
- * solib.c (solib_create_inferior_hook): Rewrite previous
- change to check the type of file via BFD.
-
-Mon Mar 23 13:52:28 1998 Ulrich Drepper (drepper@cygnus.com)
-
- * breakpoint.c (breakpoint_re_set_one): Treat bp_shlib_events
- like bp_breakpoints.
- * solib.c (solib_create_inferior_hook): Relocate section addresses
- if the alleged start address doesn't agree with the PC.
-
-Sat Mar 21 19:34:49 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- merged changes from Foundry (list follows by file/author):
-
- - Tom Tromey <tromey@cygnus.com>
- * Makefile.in (gdbres.o): New target.
- (WINDRES): New define.
- * configure: Rebuilt.
- * configure.in (WINDRES): Define.
- (CONFIG_OBS): Include gdbres.o on Windows.
- * gdbtool.ico: New file.
- * gdb.rc: New file.
-
- * ser-unix.c
- - Keith Seitz <keiths@onions.cygnus.com>
- (wait_for): Don't reset the timeout_remaining for CYGWIN32,
- since we now effectively poll the serial port.
- Don't reset the current_timeout, either, since this member is used
- by hardwire_readchar to track the timeout and call the ui_loop_hook.
- (hardwire_readchar): Poll the serial port for Cygwin32. We timeout
- every second, update the UI, and loop around doing this until we
- have hit the real timeout or we get data or an error. This will
- allow the UI to stay active while gdb is "blocked" talking to the
- target.
- - Martin M. Hunt <hunt@cygnus.com>
- (wait_for): Do reset current_timeout because it is only used to
- keep track of what the current timeout for the scb is.
-
- * top.c
- - Martin M. Hunt <hunt@cygnus.com>
- (quit_confirm): Change exit message again
- for GUI.
- (pc_changed_hook): Add prototype.
- - Tom Tromey <tromey@cygnus.com>
- (quit_confirm): Added missing `else'.
- (quit_confirm): Special-case message if init_ui_hook is
- set.
-
- * symtab.c
- - Martin M. Hunt <hunt@cygnus.com>
- (find_pc_sect_line): If no symbol information
- is found, return correct pc anyway.
- (find_methods): Comment out an apparently
- bogus error message because it messes up Foundry.
-
- * serial.c
- - Martin M. Hunt <hunt@cygnus.com>
- (_initialize_serial): Add a description of
- "set remotelogbase".
-
- * findvar.c
- - Martin M. Hunt <hunt@cygnus.com>
- (write_register_gen): Add call to
- pc_changed_hook if the PC is being changed.
-
- * defs.h
- - Martin M. Hunt <hunt@cygnus.com>
- (pc_changed_hook): Define.
-
- * command.c
- - Martin M. Hunt <hunt@cygnus.com>
- (do_setshow_command): If no arguments are supplied,
- don't dump core, instead print out an error message.
-
- * breakpoint.c
- - Martin M. Hunt <hunt@cygnus.com>
- Make set_raw_breakpoint, set_breakpoint_count,
- and breakpoint_count non-static so they are accessible from
- elsewhere.
- (enable_breakpoint): Enable breakpoint
- with same disposition instead of changing all breakpoints
- to donttouch.
-
- * annotate.h
- - Keith Seitz <keiths@onions.cygnus.com>
- Add declarations for annotation hooks.
-
- * annotate.c
- - Keith Seitz <keiths@onions.cygnus.com>
- Add hooks: annotate_starting_hook, annotate_stopped_hook,
- annotate_signalled_hook, annotate_exited_hook.
- (annotate_starting): If hook exists, call it instead.
- (annotate_stopped): If hook exists, call it instead.
- (annotate_exited): If hook exists, call it instead.
- (annotate_signalled): If hook exists, call it instead.
-
-Fri Mar 20 14:45:36 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * gdbserver/Makefile.in: add dependency on XM_CLIBS.
- * gdbserver/low-sim.c (registers) force into alignment.
- (create_inferior): Fix typo on new_argv; add abfd arg to
- sim_open, sim_create_inferior. Add reg_size arg to
- sim_fetch_register, sim_store_register. Make simulator
- take a single-step to get into a known running state.
- * gdbserver/gdbreplay.c: include fcntl.h for def'n of F_SETFL.
- * gdbserver/server.c: Add remote_debug variable to control
- debug output.
- * gdbserver/server.h: Add prototypes for enable/disable_async_io.
- * gdbserver/remote-utils.c: add verbose debugging output controlled
- by "remote_debug" variable. Add call to "disable_async_io()"
- to avoid being killed by async SIGIO signals.
- * config/m32r/m32r.mt: define GDBSERVER_(LIBS and DEPFILES),
- so that gdbserver can be built with the m32r simulator.
-
-Fri Mar 20 09:04:06 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * gdbtypes.h (builtin_type_{,u}int{8,16,32,64}): New gdb builtin
- types.
-
- * gdbtypes.c (_initialize_gdbtypes): Initialize new types.
-
- * mips-tdep.c (do_gp_register_row): Pad register value when GP
- register is smaller than MIPS_REGSIZE.
-
- * findvar.c (value_of_register): When raw and virtual register
- values identical, check that sizes are consistent.
-
-Thu Mar 19 11:32:15 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * minsyms.c (compare_minimal_symbols): If addresses are identical,
- then compare on names. Sorted list should have symbols with
- identical addresses AND names adjacent, so dups can be discarded.
-
-Wed Mar 18 12:50:17 1998 Jeff Law (law@cygnus.com)
-
- * stabsread.c (define_symbol): Don't look for ',' as a LRS
- indicator.
-
-Wed Mar 18 10:34:51 1998 Nick Clifton <nickc@cygnus.com>
-
- * rdi-share/etherdrv.c: Set sys_errlist[] as char * not const char *.
-
-Fri Mar 13 15:43:53 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/mips/xm-mips.h (CC_HAS_LONG_LONG): Undefine for Ultrix
- when compiling with native cc, the compiler has broken long long
- support.
-
-Fri Mar 13 15:37:02 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * config/m68k/xm-sun3os4.h: Remove malloc declarations, they
- are handled via autoconf now.
- * remote.c (remote_ops, extended_remote_ops): Replace static
- forward declaration by moving the static definition to the top of
- the file, for old K&R compilers.
- * tracepoint.c (collect_symbol, trace_start_command):
- Replace ANSI string concatenation with K&R compatible simple string.
-
-1998-03-11 Fred Fish <fnf@ninemoons.com>
-
- * source.c (select_source_symtab): Don't reach error if we have
- a current_source_symtab from reading in partial symbol table.
-
-Fri Mar 6 13:10:27 1998 Fred Fish <fnf@cygnus.com>
-
- * utils.c (quit): Call SERIAL_DRAIN_OUTPUT rather than
- SERIAL_FLUSH_OUTPUT.
- * serial.h (struct serial_ops): Add drain_output, pointer to
- function that waits for output to drain.
- (SERIAL_DRAIN_OUTPUT): Macro to wait for output to drain.
- * ser-unix.c (hardwire_drain_output): New function and prototype.
-
- * ser-unix.c (hardwire_ops): Add entry for drain_output function.
- * ser-tcp.c (tcp_ops): Ditto.
- * ser-ocd.c (ocd_ops): Ditto.
- * ser-mac.c (mac_ops): Ditto.
- * ser-go32.c (dos_ops): Ditto.
- * ser-e7kpc.c (e7000pc_ops): Ditto.
-
-Thu Mar 5 16:07:41 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * sparcl-tdep.c: fix #endif comments
-
-Thu Mar 5 15:10:35 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * Makefile.in (BISON): Configure substitutes in @YACC@, not @BISON@.
-
-Thu Mar 5 14:42:41 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * ocd.c (ocd_open): If we fail ocd_start_remote, make sure we
- error () so that we abort out of bdm_ppc_open.
-
-Wed Mar 4 16:53:52 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * serial.c (_initialize_serial): Add a description of
- "set remotelogbase".
-
- * command.c (do_setshow_command): If no arguments are supplied,
- don't dump core, instead print out an error message.
-
-Wed Mar 4 01:39:08 1998 Ron Unrau <runrau@cygnus.com>
-
- * elfread.c (elf_symtab_read): merge SYMBOL_IS_SPECIAL into
- MAKE_MSYMBOL_SPECIAL
- * config/mips/tm-mips.h: ditto
-
-Tue Mar 3 17:19:08 1998 John Metzler <jmetzler@cygnus.com>
-
- * dwarfread.c (read_tag_pointer_type): Pointer sizes now come from
- TARGET_PTR_BIT rather from sizeof(char *) on host.
-
-Tue Mar 3 14:37:02 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * alpha-nat.c (fetch_osf_core_registers): Renamed from
- fetch_aout_core_registers.
- (alpha_osf_core_fns): Renamed from alpha_aout_core_fns, change
- flavour to bfd_target_unknown_flavour for OSF core files.
-
-Mon Mar 2 17:44:13 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * breakpoint.c (_initialize_breakpoint): Make "en" an alias
- for "enable" (so that it doesn't conflict with "end").
-
-Mon Mar 2 17:04:25 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * Makefile (VERSION): Bump to 4.17.1.
-
-Mon Mar 2 16:59:15 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * rdi-share/etherdrv.c (sys_errlist): Add correct decl for Linux.
-
-Mon Mar 2 16:51:44 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * Makefile.in (YYFILES): Remove in maintainer-clean, not distclean.
-
-Mon Mar 2 16:47:11 1998 Philippe De Muyter <phdm@macqel.be>
-
- * Makefile.in (distclean): Add `rm $(YYFILES)'.
-
-Mon Mar 2 16:45:48 1998 Philippe De Muyter <phdm@macqel.be>
-
- * coffread.c (coff_read_enum_type): Set TYPE_FLAG_UNSIGNED if enum
- is unsigned.
-
-Sun Mar 2 15:16:13 1998 Richard Henderson <rth@cygnus.com>
-
- * configure.host, configure.tgt: Add sparc-linux.
- * sparc-nat.c: Include <asm/reg.h> not <machine/reg.h> for Linux.
- * config/sparc/*linux*: New files.
-
-Mon Mar 2 12:12:41 1998 Anthony Thompson (athompso@cambridge.arm.com)
-
- * arm-tdep.c (gdb_print_insn_arm): Call print_insn_big_arm
- if we're big endian; else call print_insn_little_arm.
-
-Mon Feb 24 11:24:57 1998 Richard Henderson <rth@cygnus.com>
-
- * Makefile.in (BISON): Don't even pretend to use yacc.
- (c-exp.tab.o): Use bison -o to use a unique intermediate file.
- (f-exp.tab.o, m2-exp.tab.o): Likewise.
- (jv-exp.tab.o): Likewise.
-
-Tue Feb 24 03:32:59 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (gdbsim_fetch_register): Don't abort when the
- register size is wrong.
-
-Thu Feb 19 16:49:48 1998 John Metzler <jmetzler@cygnus.com>
-
- * target.c (debug_to_fetch_registers,debug_to_store_registers,
- debug-to_insert_breakpoint,debug_to_remove_breakpoint): tracing
- 64 bit targets crashed long long printfs.
-
-Tue Feb 17 16:36:22 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * symfile.c (read_target_int_array): rename read_target_long_array
- and force the sizeof an ovly_table element to sizeof(long),
- instead of sizeof(int).
-
-Tue Feb 17 18:05:05 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * remote-mips.c (mips_request): Use unsigned long during parsing
- returned value from monitor, to prevent accidental sign extension.
-
-Tue Feb 17 14:28:33 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * acconfig.h: FORCE_MMCHECK changed to MMCHECK_FORCE.
- * configure.in: Ditto.
- * configure: Regenerated.
-
-Tue Feb 17 14:07:34 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * gdbtypes.c (check_typedef): Do not try to resolve the length of
- a type which has TYPE_FLAG_TARGET_STUB set, if the target type has
- set TYPE_FLAG_TARGET_STUB as well.
-
-Tue Feb 17 14:32:18 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
- Pass register size to sim_{fetch,store}_register. Check nr of
- register bytes transfered is correct.
-
-Mon Feb 16 14:05:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-d10v.c (remote_d10v_open): Call push_remote_target
- instead of open_remote_target.
-
- * remote.c (remote_xfer_memory): Use REMOTE_TRANSLATE_XFER_ADDRESS
- to translate addr/size when defined.
- (open_remote_target): Delete.
-
- * target.h (open_remote_target): Delete.
-
- * config/d10v/tm-d10v.h (REMOTE_TRANSLATE_XFER_ADDRESS): Define.
-
-Mon Feb 16 14:05:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (d10v_extract_return_value): Wierd. GCC wants to
- return odd sized register quantities with only half of the first
- register used!
-
- * config/d10v/tm-d10v.h (USE_STRUCT_CONVENTION): Use stack when
- size > 8.
-
-Mon Feb 16 14:05:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/d10v/tm-d10v.h (USE_STRUCT_CONVENTION): Define. True when
- sizeof type > 1.
-
-Sun Feb 15 16:10:50 1998 Ron Unrau <runrau@cygnus.com>
-
- * parse.c (write_dollar_variable): call new function
- target_map_name_to_register to allow targets to define their own
- register name aliases.
- * infcmd.c (registers_info): use target_map_name_to_register so that
- "print $reg" and "info reg $reg" use the same register name aliases.
-
-Fri Feb 13 16:40:30 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/i386/i386mk.mt (OBJFORMATS): Delete, no longer used.
- * config/i386/xm-i386mk.h: Fix an include.
- * config/pyr/tm-pyr.h (PC_INNER_THAN): Remove, never used.
-
-Thu Feb 12 16:12:07 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * remote-mips.c (mips_enter_debug): Sleep before sending CR to
- monitor.
- (mips_exit_debug): Accept any whitespace / verbiage before monitor
- prompt reappears.
-
-Thu Feb 12 18:25:42 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (show_regs): Avoid use of %llx when printing 8 byte
- accumulators.
-
-Thu Feb 12 17:10:22 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * valops.c (value_at): For d10v, make read pointers with
- read_target_unsigned_integer, keep addresses unsigned.
- (value_fetch_lazy): Ditto.
-
-Thu Feb 12 12:14:02 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-d10v.c: New file. Layer the d10v GDB->remote memory map
- on top of the remote serial memory transfer functions.
-
- * config/d10v/d10v.mt (TDEPFILES): Add remote-d10v.o
-
- * Makefile.in (remote-d10v.o): Add dependencies.
-
- * remote.c (remote_open_1): Add arg extended_p, engage extended
- protocol when extended_p.
- (remote_open, extended_remote_open): Pass !extended_p /
- extended_p to remote_open_1.
-
- * remote.c (open_remote_target), target.h: New function.
-
-Wed Feb 11 08:41:15 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/i386/fbsd.mh (XDEPFILES): Add ser-tcp.o.
-
-Tue Feb 10 17:50:37 1998 Keith Seitz <keiths@onions.cygnus.com>
-
- * tracepoint.c (tracepoint_operation): Call the modify_tracepoint_hook
- if it exists.
- Remove static declaration of free_actions.
-
- * tracepoint.h: Add declaration of free_actions.
-
-Tue Feb 10 12:17:13 1998 Fred Fish <fnf@cygnus.com>
-
- * symtab.c (decode_line_1): Revert change that mistakenly
- removed assignment of sals[0].pc field.
-
-Mon Feb 10 12:37:47 1998 Philippe De Muyter <phdm@macqel.be>
-
- * m68k/tm-delta68.h (EXTRACT_RETURN_VALUE): Type argument for
- `REGISTER_CONVERT_TO_VIRTUAL is `TYPE', not
- `REGISTER_VIRTUAL_TYPE (FP0_REGNUM)';
- (STORE_RETURN_VALUE): Ditto, and offset for `write_register_bytes'
- is `REGISTER_BYTE (FP0_REGNUM)', not `FP0_REGNUM'.
- (FRAME_NUM_ARGS): New macro.
- * m68k/tm-news.h (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE): Ditto.
- * delta68-nat.c (clear_insn_cache): New function, forgotten in previous
- patch.
-
-Mon Feb 9 11:10:06 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c: Replace references to IMEM_ADDR and DMEM_ADDR with
- D10V_MAKE_[DI]ADDR and D10V_CONVERT_[ID]ADDR_TO_RAW macros.
-
- * config/d10v/tm-d10v.h (IMEM_START): Move to 0x01......
- (DMEM_START): Move to 0x00......
- (STACK_START): Move to 0x00..7ffe.
- (D10V_MAKE_IADDR, D10V_MAKE_DADDR): Translate unconditionally.
-
- * d10v-tdep.c (d10v_xlate_addr): Delete function.
-
-Mon Feb 9 15:10:21 1998 Fred Fish <fnf@cygnus.com>
-
- * symtab.c (fixup_psymbol_section): Move forward declaration to
- top of file with other such decls. Make it a static function.
- * symtab.h: Minor formatting tweaks.
-
-Mon Feb 9 13:14:12 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/a29k-udi.mt, config/i960/vxworks960.mt (REMOTE_OBS):
- Remove redefinition.
- * config/i960/tm-i960.h (BREAKPOINT): Define.
-
-Mon Feb 9 15:35:38 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (init.c): Ignore errors when making init.c. Seems
- necessary to work around bug in Solaris make.
-
-Sun Feb 6 02:44:28 1998 Philippe De Muyter <phdm@macqel.be>
-
- * m68k/tm-delta68.h (CPLUS_MARKER): Macro deleted.
- (EXTRACT_STRUCT_VALUE_ADDRESS): Macro defined.
- (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE): Macros modified
- because floating-point values return via %fp0.
- (CLEAR_INSN_CACHE): New macro.
- * m68k/tm-m68k.h (REGISTER_CONVERT_TO_VIRTUAL): Macro fixed
- to use DOUBLEST.
- (REGISTER_CONVERT_TO_RAW): Ditto.
- * infptrace.c (child_xfer_memory): If CLEAR_INSN_CACHE is defined,
- call it after having written in child process's memory.
- * inflow.c (PROCESS_GROUP_TYPE): Macro defined if HAVE_TERMIO.
- (gdb_has_a_terminal, terminal_ours_1): Functions fixed for HAVE_TERMIO.
-
-Fri Feb 6 16:17:30 1998 Jeffrey A Law (law@cygnus.com)
-
- * config/mips/tm-mips64.h (TARGET_LONG_BIT): Allow final target to
- override.
- (TARGET_LONG_LONG_BIT): Likewise.
- (TARGET_PTR_BIT): Likewise.
-
-Fri Feb 6 17:42:22 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/d10v/tm-d10v.h (D10V_CONVERT_IADDR_TO_RAW,
- D10V_CONVERT_DADDR_TO_RAW): Define.
-
- * d10v-tdep.c (d10v_push_arguments): Re-write. Pass arguments in
- registers, regardless of their size, when they fit.
-
-Thu Feb 5 13:16:36 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * d10v-tdep.c (d10v_extract_return_value): For function pointers
- translate address to IMAP area.
-
- * config/d10v/tm-d10v.h (EXTRA_FRAME_INFO): Delete dummy from
- struct.
- (POP_FRAME): Point at generic_pop_current_frame.
-
- * d10v-tdep.c (d10v_pop_frame): Delete code handling dummy frames,
- handled earlier.
- (d10v_push_return_address): New function.
- (d10v_pop_dummy_frame): Delete.
- (d10v_fix_call_dummy): Delete.
- (d10v_call_dummy_address): Delete.
-
- * d10v-tdep.c (d10v_init_extra_frame_info): Clear dummy and
- frameless.
-
- * d10v-tdep.c (d10v_push_arguments): Keep stack word aligned.
-
- * config/d10v/tm-d10v.h (EXTRACT_STRUCT_VALUE_ADDRESS): Extract
- address of structure from first ARG1_REGNUM.
-
- * d10v-tdep.c (d10v_push_arguments): Force 4 byte args into
- even-odd register pair. Store 1 and 2 byte args in registers.
-
- * valops.c (value_fetch_lazy): Ensure that a D10V function pointer
- is fetched in the correct byte order.
- (value_at): Ditto. Also ensure data pointers are mapped to data
- segment.
-
- * config/d10v/tm-d10v.h (D10V_DADDR_P, D10V_IADDR_P):
-
- * d10v-tdep.c: Replace 2 with REGISTER_RAW_SIZE.
- (d10v_pop_frame): Replace R13 with LR_REGNUM.
- (d10v_push_arguments): Replace R2 with ARG1_REGNUM.
- (d10v_push_arguments): Replace 6 with ARGN_REGNUM.
- (d10v_extract_return_value): Access return value with RET1_REGNUM.
-
- * config/d10v/tm-d10v.h (ARG1_REGNUM, ARGN_REGNUM, RET1_REGNUM):
- Define.
- (STORE_RETURN_VALUE): Specify return register using RET1_REGNUM.
- (STORE_STRUCT_RETURN): Specify ARG1_REGNUM as the struct ptr
- location.
-
-Thu Feb 5 13:16:36 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * blockframe.c (generic_pop_dummy_frame): Flush the frame, no
- longer valid.
-
- * blockframe.c (generic_pop_current_frame), frames.h: New
- function.
-
-Thu Feb 5 17:18:16 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.c (gdbsim_create_inferior): clear_proceed_status
- before /re/starting the simulator.
-
-Thu Feb 5 15:55:31 1998 C. M. Heard (heard@vvnet.com)
-
- * top.c (do_nothing): Remove signal handler after signal is caught.
-
-Thu Feb 5 11:57:06 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * tracepoint.c (tracepoint_operation): call free_actions instead
- of free. (free_actions): eliminate some memory leaks for actions.
- (validate_actionline): pass string arg by reference, so we can
- change the pointer. Change all memrange collection arguments to
- canonical form (literal address and size), to enforce early
- evaluation. Accept UNOP_MEMVAL (assembly variables) for
- trace collection. (parse_and_eval_memrange): accept expressions
- for the address and size fields of a memrange (and evaluate
- them immediately). (several places): use -1 instead of zero
- to distinguish an absolute memrange from a register-relative one.
- (encode_actions): add handling for UNOP_MEMVAL (assembly variable).
-
-Wed Feb 4 17:40:21 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * Makefile.in (SFILES): add tracepoint.c.
- (LINTFILES): add @CONFIG_SRCS@.
- (SOURCES): Ditto.
- * configure.in (CONFIG_SRCS): Mirror use of CONFIG_OBS.
- * configure: Regenerated.
-
-Tue Feb 3 16:12:32 1998 Gordon W. Ross (gwr@mc.com)
-
- * infptrace.c (child_resume): Don't try to step if
- NO_SINGLE_STEP is defined.
-
-Mon Feb 2 19:06:13 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * Makefile.in (VERSION): Bump to 4.16.2.
-
-Mon Feb 2 17:18:25 1998 Richard Henderson <rth@cygnus.com>
-
- * alpha-nat.c (fetch_aout_core_registers): Rename from
- fetch_core_registers.
- (fetch_elf_core_registers): New function.
- (supply_gregset): Use ALPHA_REGSET_BASE.
- (supply_fpregset): Likewise.
- (fill_fpregset): Likewise.
- (alpha_aout_core_fns): Rename from alpha_core_fns.
- (alpha_elf_core_fns): New.
- * config/alpha/alpha-linux.mh (NATDEPFILES): solib.o not osfsolib.o.
- Disable MMALLOC.
- * config/alpha/nm-linux.h (SVR4_SHARED_LIBS): Define if ELF.
- (TARGET_ELF64): Likewise.
- (ALPHA_REGSET_BASE): New.
- * config/alpha/nm-osf.h (ALPHA_REGSET_BASE): New.
- * config/alpha/tm-alphalinux.h: Include tm-sysv4.h.
-
- * solib.c (elf_locate_base): Add TARGET_ELF64 support.
- (info_sharedlibary_command): Likewise.
-
- * configure.host: Match alpha*.
- * configure.tgt: Likewise.
-
-Fri Jan 30 15:11:38 1998 David Taylor <taylor@texas.cygnus.com>
-
- Changes by <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
- * infrun.c (IN_SOLIB_DYNSYM_RESOLVE_CODE): new macro for detecting
- whether we are in the dynamic symbol resolution code
- (wait_for_inferior): invoke it.
- * solib.c (in_svr4_dynsym_resolve_code): new function
- (enable_break): record start and end of the dynamic linker
- text and plt sections for use in in_svr4_dynsym_resolve_code.
- * solib.h (IN_SOLIB_DYNSYM_RESOLVE_CODE): add svr4 definition;
- (in_svr4_dynsym_resolve_code): declare it.
- * config/nm-gnu.h (solib.h): move inclusion to after definition
- of SVR4_SHARED_LIBS.
- * config/nm-sysv4.h (solib.h): ditto.
- * config/i386/nm-i386sco5.h (solib.h): ditto.
- * config/i386/nm-linux.h (solib.h): ditto.
- * config/mips/nm-irix5.h (IN_SOLIB_DYNSYM_RESOLVE_CODE): undefine.
-
-Thu Jan 29 19:39:31 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * coffread.c (coff_symtab_read) [SEM]: Remove code, macro can
- never be defined.
- * dbxread.c (process_one_symbol) [BLOCK_ADDRESS_ABSOLUTE]:
- Remove, no longer needed.
- * hppa-tdep.c (N_SET_MAGIC): Remove, no longer used.
- * config/pa/xm-hppab.h (SEEK_SET, SEEK_CUR, SEEK_END): Ditto.
- * config/mips/tm-mipsm3.h (NUMERIC_REG_NAMES): Ditto.
- * config/mips/mipsm3.mt (TDEPFILES): Remove mipsread.o.
-
-Wed Jan 28 14:46:52 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- Suggested by Chris Walter <walter@budoe.bu.edu>:
- * dwarfread.c (set_cu_language): Recognize Fortran.
- * dwarf2read.c (set_cu_language): Ditto.
- (read_array_type): Fix language test.
-
-Wed Jan 28 12:51:08 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * blockframe.c (generic_frame_chain_valid): A frame pointer may
- be valid if it is equal to the frame pointer of its caller (ie.
- not necessarily strictly INNER_THAN). Allows frameless functions.
-
-Wed Jan 28 11:23:25 1998 Mark Alexander <marka@cygnus.com>
-
- * monitor.c (monitor_vsprintf): New function to handle
- printing of large addresses using %A format specifier.
- (monitor_printf_noecho, monitor_printf): Use monitor_vsprintf
- instead of vsprintf.
- * dve3900-rom.c (_initialize_r3900_rom): Use %A instead of %Lx
- to print addresses.
-
-Tue Jan 27 16:14:23 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * configure.in (CONFIG_LDFLAGS): Only add -export-dynamic
- when using GNU ld.
-
-Mon Jan 26 19:07:46 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * config/alpha/tm-alphalinux.h (alpha_linux_sigtramp_offset):
- Add closing parenthesis. From HJ Lu.
-
-Mon Jan 26 17:54:45 1998 Mark Alexander <marka@cygnus.com>
-
- * dve3900-rom.c: Improve performance by using memory commands
- that print less fluff. Minor cosmetic changes.
- Eliminate compiler warnings.
-
-Sat Jan 24 23:44:43 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * breakpoint.c (enable_breakpoint): Preserve breakpoint
- disposition when enabling a breakpoint.
-
- * symtab.c (find_pc_sect_line): If no symbol information
- is found, return correct pc anyway.
-
-Fri Jan 23 17:26:22 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.host (i[3456]86-*-osf1mk*, mips-*-mach3*,
- ns32k-*-mach3*): Fix file names.
- (i[3456]86-*-os9k, m88*-*-mach3*, w65-*-*): Remove config
- recognition, no source files for these.
- * configure.tgt (powerpc-*-aix4*): Remove config, now identical
- to powerpc-*-aix*.
- * config/powerpc/{aix4.mh,aix4.mt,tm-ppc-aix4.h}: Remove files,
- no longer needed.
-
-Fri Jan 23 16:49:41 1998 Mark Alexander <marka@cygnus.com>
-
- * monitor.c (monitor_write, monitor_readchar): New functions.
- * monitor.h (monitor_write, monitor_readchar): Declare.
- * dve3900-rom.c: Add support for fast loading on ethernet connections.
-
-Fri Jan 23 07:47:06 1998 Fred Fish <fnf@cygnus.com>
-
- * config/d10v/tm-d10v.h (CALL_DUMMY): Define as "{ 0 }".
- (TARGET_READ_FP): Define to d10v_read_fp rather than d10v_read_sp.
- (TARGET_WRITE_FP): Define to d10v_write_fp rather than d10v_write_sp.
- (d10v_write_fp, d10v_read_fp): Add prototypes.
- * symtab.c (decode_line_1): Remove assignment of sals[0].pc field.
- * symfile.c (simple_overlay_update, simple_overlay_update_1):
- Ignore the size of overlay sections. This check is redundant anyway.
- * printcmd.c (print_frame_args): Ditto.
- * valops.c (value_fetch_lazy): Ditto.
- * values.c (unpack_long): Ditto.
- * d10v-tdep.c (d10v_frame_chain, d10v_frame_find_saved_regs,
- d10v_init_extra_frame_info): Fix some minor bugs so the finish command
- works properly.
- (show_regs): Change num1 and num2 types from "long long" to "LONGEST".
- (d10v_read_fp, d10v_write_fp): New functions.
- (d10v_push_arguments): Remove unneeded assigns to "val" and "contents".
- (d10v_push_arguments): Fix for pointers and structs.
- (d10v_extract_return_value): Fix for pointers and chars.
-
-Tue Jan 20 18:53:18 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * configure.tgt (i386-*-mach*, m88*-*-mach3*): Remove config
- recognition, no source files for these (note that the i386 Mach
- config is for pre-Mach 3).
- (mips*-*-mach3*, ns32k-*-mach3*): Fix file names.
- * config/mips/mipsel64.mt: Remove, never referenced.
-
-Mon Jan 19 14:01:28 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * top.c (print_gdb_version): Restore to original message.
-
-Mon Jan 19 13:34:40 1998 Ian Lance Taylor <ian@cygnus.com>
-
- From cgf@bbc.com (Chris Faylor):
- * win32-nat.c (child_mourn_inferior): Call ContinueDebugEvent to
- let the child exit.
- (child_kill_inferior): Respond to all debug events as the child is
- terminating.
-
- * Makefile.in (all): Change gdb dependency to gdb$(EXEEXT).
- (uninstall): Add $(EXEEXT) to file name to remove.
- (gdb$(EXEEXT)): Rename target from plain gdb.
- (gdb1$(EXEEXT)): Rename target from plain gdb1.
- (clean, mostlyclean): Add $(EXEEXT) to binary names to remove.
-
-1998-01-16 Felix Lee <flee@cygnus.com>
-
- * top.c (print_gdb_version): delete stutter.
-
-Thu Jan 15 12:29:13 1998 Nick Clifton <nickc@cygnus.com>
-
- * remote-rdi.c (arm_rdi_open): Patch from Tony.Thompson@arm.com
- to prevent spurous error messages on non-ICE targets.
-
-Wed Jan 14 19:27:02 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/mips/{r3900.mt,r3900l.mt,tm-r3900.h,tm-r3900l.h}:
- Remove, no longer used.
-
-Wed Jan 14 18:11:26 1998 Michael Meissner <meissner@cygnus.com>
-
- Patch from Jim Wilson.
- * d30v-tdep.c (d30v_frame_find_saved_regs_offsets): Properly
- declare void function before use.
-
- * config/d30v/tm-d30v.h (CALL_DUMMY): Initialize as { 0 }, not {}.
-
-Tue Jan 13 16:38:48 1998 Fred Fish <fnf@cygnus.com>
-
- * configure.in (--with-mmalloc): Add new configure arg to use the
- mmalloc package. Default is to not use it.
- (START_INFERIOR_TRAPS_EXPECTED): Define to the integer 2, not
- the string "2".
- * acconfig.h (USE_MMALLOC, FORCE_MMCHECK): Add #undef.
- * configure: Regenerated.
- * config.in: Regenerated.
- * Makefile.in (MMALLOC_DIR, MMALLOC_SRC): Remove.
- (MMALLOC): Set using configure.
- (MMALLOC_CFLAGS): Set using configure.
-
- * config/i386/tm-linux.h (sys_quotactl): Define to 1 rather
- than just defining it.
- * mpw-make.sed: Undefine USE_MMALLOC rather than defining NO_MMALLOC.
- * utils.c (NO_MMALLOC): Use USE_MMALLOC instead.
- * objfiles.c: ditto.
- * defs.h: ditto.
-
- * config/sparc/sun4os4.mh (MMALLOC_CFLAGS): Remove.
- * config/m68k/sun3os4.mh (MMALLOC_CFLAGS): Remove.
- * config/i386/cygwin32.mh (MMALLOC_CFLAGS): Remove.
- * config/alpha/alpha-osf3.mh (MMALLOC_CFLAGS): Remove.
- * config/alpha/alpha-osf2.mh (MMALLOC_CFLAGS): Remove.
- * gdbserver/Makefile.in (MMALLOC_*): Remove.
- * config/rs6000/rs6000.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/rs6000/aix4.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/powerpc/aix4.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/powerpc/aix.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/ns32k/ns32km3.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/mips/mipsm3.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/mips/decstation.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/m88k/cxux.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/i386/xm-windows.h (NO_MMALLOC, NO_MMCHECK): Remove.
- * config/i386/i386mk.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/i386/i386m3.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/i386/i386gnu.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/alpha/alpha-osf1.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
- * config/alpha/alpha-linux.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
-
-Mon Jan 12 11:46:51 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * config/m68k/tm-m68k.h (REGISTER_VIRTUAL_TYPE): make A0 thru A7
- default to void pointer type (so that their default radix is hex).
-
- * symtab.c: move rbreak_command from no_class to class_breakpoint
- so it will be listed under "help breakpoints".
-
-Sat Jan 10 14:58:04 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * rdi-share/hostchan.c: Remove gettimeofday declaration.
-
-Thu Jan 8 11:03:59 1998 Nick Clifton <nickc@cygnus.com>
-
- * remote-rdp.c: Applied patches submitted by Tony.Thompson@arm.com
- to implement the Angel remote debugging interface.
-
- * Makefile.in: Add build rules for remote-rdi.c and
- rdi-share/libangsd.a.
-
- * configure.tgt: Updated from source on branch.
- * config/arm/tm-arm.h: Updated from source on branch.
- * arm-tdep.c: Updated from source on branch.
-
- * rdi-share: New directory, RDI library contributed by ARM.
-
-Mon Jan 5 20:21:59 1998 Mark Alexander <marka@cygnus.com>
-
- * monitor.h (MO_PRINT_PROGRAM_OUTPUT): Define.
- * monitor.c (monitor_wait): Echo program output.
- * dve3900-rom.c (_initialize_r3900_rom): Remove MO_HANDLE_NL flag,
- add MO_PRINT_PROGRAM_OUTPUT flag.
-
-Mon Jan 5 18:21:11 1998 David Taylor <taylor@texas.cygnus.com>
-
- * top.h (HAVE_SIGSETJMP): define SIGJMP_BUF, SIGSETJMP, and
- SIGLONGJMP appropriately based on whether HAVE_SIGSETJMP is
- defined.
- * top.c (return_to_top_level, catch_errors): use the new macros
- * main.c (SET_TOP_LEVEL): ditto.
- * config/xm-sysv4.h (HAVE_SIGSETJMP): Define.
-
-Fri Jan 2 18:48:58 1998 Mark Alexander <marka@cygnus.com>
-
- * configure.in: Double up brackets in shell case pattern.
-
-Fri Jan 2 17:06:05 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
-
- * tracepoint.c (finish_tfind_command): improved algorithm for
- deciding when we've "stepped" into a new stack frame.
- (map_args_over_tracepoints): loop over tracepoint list "safely",
- since list elements may be deleted during loop.
- (read_actions): add actions to history list.
-
-For older changes see ChangeLog-97
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/gdb/gdb/arm-convert.s b/contrib/gdb/gdb/arm-convert.s
deleted file mode 100644
index 8124052bb100..000000000000
--- a/contrib/gdb/gdb/arm-convert.s
+++ /dev/null
@@ -1,16 +0,0 @@
-/* OBSOLETE .text */
-/* OBSOLETE .global _convert_from_extended */
-/* OBSOLETE */
-/* OBSOLETE _convert_from_extended: */
-/* OBSOLETE */
-/* OBSOLETE ldfe f0,[a1] */
-/* OBSOLETE stfd f0,[a2] */
-/* OBSOLETE movs pc,lr */
-/* OBSOLETE */
-/* OBSOLETE .global _convert_to_extended */
-/* OBSOLETE */
-/* OBSOLETE _convert_to_extended: */
-/* OBSOLETE */
-/* OBSOLETE ldfd f0,[a1] */
-/* OBSOLETE stfe f0,[a2] */
-/* OBSOLETE movs pc,lr */
diff --git a/contrib/gdb/gdb/arm-xdep.c b/contrib/gdb/gdb/arm-xdep.c
deleted file mode 100644
index 64ca9003665e..000000000000
--- a/contrib/gdb/gdb/arm-xdep.c
+++ /dev/null
@@ -1,575 +0,0 @@
-/* OBSOLETE /* Acorn Risc Machine host machine support. */
-/* OBSOLETE Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. */
-/* OBSOLETE */
-/* OBSOLETE This file is part of GDB. */
-/* OBSOLETE */
-/* OBSOLETE This program is free software; you can redistribute it and/or modify */
-/* OBSOLETE it under the terms of the GNU General Public License as published by */
-/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
-/* OBSOLETE (at your option) any later version. */
-/* OBSOLETE */
-/* OBSOLETE This program is distributed in the hope that it will be useful, */
-/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* OBSOLETE GNU General Public License for more details. */
-/* OBSOLETE */
-/* OBSOLETE You should have received a copy of the GNU General Public License */
-/* OBSOLETE along with this program; if not, write to the Free Software */
-/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
-/* OBSOLETE Boston, MA 02111-1307, USA. *x/ */
-/* OBSOLETE */
-/* OBSOLETE #include "defs.h" */
-/* OBSOLETE #include "frame.h" */
-/* OBSOLETE #include "inferior.h" */
-/* OBSOLETE #include "opcode/arm.h" */
-/* OBSOLETE */
-/* OBSOLETE #include <sys/param.h> */
-/* OBSOLETE #include <sys/dir.h> */
-/* OBSOLETE #include <signal.h> */
-/* OBSOLETE #include <sys/ioctl.h> */
-/* OBSOLETE #include <sys/ptrace.h> */
-/* OBSOLETE #include <machine/reg.h> */
-/* OBSOLETE */
-/* OBSOLETE #define N_TXTADDR(hdr) 0x8000 */
-/* OBSOLETE #define N_DATADDR(hdr) (hdr.a_text + 0x8000) */
-/* OBSOLETE */
-/* OBSOLETE #include "gdbcore.h" */
-/* OBSOLETE */
-/* OBSOLETE #include <sys/user.h> /* After a.out.h *x/ */
-/* OBSOLETE #include <sys/file.h> */
-/* OBSOLETE #include "gdb_stat.h" */
-/* OBSOLETE */
-/* OBSOLETE #include <errno.h> */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE fetch_inferior_registers (regno) */
-/* OBSOLETE int regno; /* Original value discarded *x/ */
-/* OBSOLETE { */
-/* OBSOLETE register unsigned int regaddr; */
-/* OBSOLETE char buf[MAX_REGISTER_RAW_SIZE]; */
-/* OBSOLETE register int i; */
-/* OBSOLETE */
-/* OBSOLETE struct user u; */
-/* OBSOLETE unsigned int offset = (char *) &u.u_ar0 - (char *) &u; */
-/* OBSOLETE offset = ptrace (PT_READ_U, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0) */
-/* OBSOLETE - KERNEL_U_ADDR; */
-/* OBSOLETE */
-/* OBSOLETE registers_fetched (); */
-/* OBSOLETE */
-/* OBSOLETE for (regno = 0; regno < 16; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE regaddr = offset + regno * 4; */
-/* OBSOLETE *(int *) &buf[0] = ptrace (PT_READ_U, inferior_pid, */
-/* OBSOLETE (PTRACE_ARG3_TYPE) regaddr, 0); */
-/* OBSOLETE if (regno == PC_REGNUM) */
-/* OBSOLETE *(int *) &buf[0] = GET_PC_PART (*(int *) &buf[0]); */
-/* OBSOLETE supply_register (regno, buf); */
-/* OBSOLETE } */
-/* OBSOLETE *(int *) &buf[0] = ptrace (PT_READ_U, inferior_pid, */
-/* OBSOLETE (PTRACE_ARG3_TYPE) (offset + PC * 4), 0); */
-/* OBSOLETE supply_register (PS_REGNUM, buf); /* set virtual register ps same as pc *x/ */
-/* OBSOLETE */
-/* OBSOLETE /* read the floating point registers *x/ */
-/* OBSOLETE offset = (char *) &u.u_fp_regs - (char *) &u; */
-/* OBSOLETE *(int *) buf = ptrace (PT_READ_U, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0); */
-/* OBSOLETE supply_register (FPS_REGNUM, buf); */
-/* OBSOLETE for (regno = 16; regno < 24; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE regaddr = offset + 4 + 12 * (regno - 16); */
-/* OBSOLETE for (i = 0; i < 12; i += sizeof (int)) */
-/* OBSOLETE *(int *) &buf[i] = ptrace (PT_READ_U, inferior_pid, */
-/* OBSOLETE (PTRACE_ARG3_TYPE) (regaddr + i), 0); */
-/* OBSOLETE supply_register (regno, buf); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Store our register values back into the inferior. */
-/* OBSOLETE If REGNO is -1, do this for all registers. */
-/* OBSOLETE Otherwise, REGNO specifies which register (so we can save time). *x/ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE store_inferior_registers (regno) */
-/* OBSOLETE int regno; */
-/* OBSOLETE { */
-/* OBSOLETE register unsigned int regaddr; */
-/* OBSOLETE char buf[80]; */
-/* OBSOLETE */
-/* OBSOLETE struct user u; */
-/* OBSOLETE unsigned long value; */
-/* OBSOLETE unsigned int offset = (char *) &u.u_ar0 - (char *) &u; */
-/* OBSOLETE offset = ptrace (PT_READ_U, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0) */
-/* OBSOLETE - KERNEL_U_ADDR; */
-/* OBSOLETE */
-/* OBSOLETE if (regno >= 0) */
-/* OBSOLETE { */
-/* OBSOLETE if (regno >= 16) */
-/* OBSOLETE return; */
-/* OBSOLETE regaddr = offset + 4 * regno; */
-/* OBSOLETE errno = 0; */
-/* OBSOLETE value = read_register (regno); */
-/* OBSOLETE if (regno == PC_REGNUM) */
-/* OBSOLETE value = SET_PC_PART (read_register (PS_REGNUM), value); */
-/* OBSOLETE ptrace (PT_WRITE_U, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, value); */
-/* OBSOLETE if (errno != 0) */
-/* OBSOLETE { */
-/* OBSOLETE sprintf (buf, "writing register number %d", regno); */
-/* OBSOLETE perror_with_name (buf); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE for (regno = 0; regno < 15; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE regaddr = offset + regno * 4; */
-/* OBSOLETE errno = 0; */
-/* OBSOLETE value = read_register (regno); */
-/* OBSOLETE if (regno == PC_REGNUM) */
-/* OBSOLETE value = SET_PC_PART (read_register (PS_REGNUM), value); */
-/* OBSOLETE ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, value); */
-/* OBSOLETE if (errno != 0) */
-/* OBSOLETE { */
-/* OBSOLETE sprintf (buf, "writing all regs, number %d", regno); */
-/* OBSOLETE perror_with_name (buf); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Work with core dump and executable files, for GDB. */
-/* OBSOLETE This code would be in corefile.c if it weren't machine-dependent. *x/ */
-/* OBSOLETE */
-/* OBSOLETE /* Structure to describe the chain of shared libraries used */
-/* OBSOLETE by the execfile. */
-/* OBSOLETE e.g. prog shares Xt which shares X11 which shares c. *x/ */
-/* OBSOLETE */
-/* OBSOLETE struct shared_library */
-/* OBSOLETE { */
-/* OBSOLETE struct exec_header header; */
-/* OBSOLETE char name[SHLIBLEN]; */
-/* OBSOLETE CORE_ADDR text_start; /* CORE_ADDR of 1st byte of text, this file *x/ */
-/* OBSOLETE long data_offset; /* offset of data section in file *x/ */
-/* OBSOLETE int chan; /* file descriptor for the file *x/ */
-/* OBSOLETE struct shared_library *shares; /* library this one shares *x/ */
-/* OBSOLETE }; */
-/* OBSOLETE static struct shared_library *shlib = 0; */
-/* OBSOLETE */
-/* OBSOLETE /* Hook for `exec_file_command' command to call. *x/ */
-/* OBSOLETE */
-/* OBSOLETE extern void (*exec_file_display_hook) (); */
-/* OBSOLETE */
-/* OBSOLETE static CORE_ADDR unshared_text_start; */
-/* OBSOLETE */
-/* OBSOLETE /* extended header from exec file (for shared library info) *x/ */
-/* OBSOLETE */
-/* OBSOLETE static struct exec_header exec_header; */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE core_file_command (filename, from_tty) */
-/* OBSOLETE char *filename; */
-/* OBSOLETE int from_tty; */
-/* OBSOLETE { */
-/* OBSOLETE int val; */
-/* OBSOLETE */
-/* OBSOLETE /* Discard all vestiges of any previous core file */
-/* OBSOLETE and mark data and stack spaces as empty. *x/ */
-/* OBSOLETE */
-/* OBSOLETE if (corefile) */
-/* OBSOLETE free (corefile); */
-/* OBSOLETE corefile = 0; */
-/* OBSOLETE */
-/* OBSOLETE if (corechan >= 0) */
-/* OBSOLETE close (corechan); */
-/* OBSOLETE corechan = -1; */
-/* OBSOLETE */
-/* OBSOLETE data_start = 0; */
-/* OBSOLETE data_end = 0; */
-/* OBSOLETE stack_start = STACK_END_ADDR; */
-/* OBSOLETE stack_end = STACK_END_ADDR; */
-/* OBSOLETE */
-/* OBSOLETE /* Now, if a new core file was specified, open it and digest it. *x/ */
-/* OBSOLETE */
-/* OBSOLETE if (filename) */
-/* OBSOLETE { */
-/* OBSOLETE filename = tilde_expand (filename); */
-/* OBSOLETE make_cleanup (free, filename); */
-/* OBSOLETE */
-/* OBSOLETE if (have_inferior_p ()) */
-/* OBSOLETE error ("To look at a core file, you must kill the program with \"kill\"."); */
-/* OBSOLETE corechan = open (filename, O_RDONLY, 0); */
-/* OBSOLETE if (corechan < 0) */
-/* OBSOLETE perror_with_name (filename); */
-/* OBSOLETE /* 4.2-style (and perhaps also sysV-style) core dump file. *x/ */
-/* OBSOLETE { */
-/* OBSOLETE struct user u; */
-/* OBSOLETE */
-/* OBSOLETE unsigned int reg_offset, fp_reg_offset; */
-/* OBSOLETE */
-/* OBSOLETE val = myread (corechan, &u, sizeof u); */
-/* OBSOLETE if (val < 0) */
-/* OBSOLETE perror_with_name ("Not a core file: reading upage"); */
-/* OBSOLETE if (val != sizeof u) */
-/* OBSOLETE error ("Not a core file: could only read %d bytes", val); */
-/* OBSOLETE */
-/* OBSOLETE /* We are depending on exec_file_command having been called */
-/* OBSOLETE previously to set exec_data_start. Since the executable */
-/* OBSOLETE and the core file share the same text segment, the address */
-/* OBSOLETE of the data segment will be the same in both. *x/ */
-/* OBSOLETE data_start = exec_data_start; */
-/* OBSOLETE */
-/* OBSOLETE data_end = data_start + NBPG * u.u_dsize; */
-/* OBSOLETE stack_start = stack_end - NBPG * u.u_ssize; */
-/* OBSOLETE data_offset = NBPG * UPAGES; */
-/* OBSOLETE stack_offset = NBPG * (UPAGES + u.u_dsize); */
-/* OBSOLETE */
-/* OBSOLETE /* Some machines put an absolute address in here and some put */
-/* OBSOLETE the offset in the upage of the regs. *x/ */
-/* OBSOLETE reg_offset = (int) u.u_ar0; */
-/* OBSOLETE if (reg_offset > NBPG * UPAGES) */
-/* OBSOLETE reg_offset -= KERNEL_U_ADDR; */
-/* OBSOLETE fp_reg_offset = (char *) &u.u_fp_regs - (char *) &u; */
-/* OBSOLETE */
-/* OBSOLETE /* I don't know where to find this info. */
-/* OBSOLETE So, for now, mark it as not available. *x/ */
-/* OBSOLETE N_SET_MAGIC (core_aouthdr, 0); */
-/* OBSOLETE */
-/* OBSOLETE /* Read the register values out of the core file and store */
-/* OBSOLETE them where `read_register' will find them. *x/ */
-/* OBSOLETE */
-/* OBSOLETE { */
-/* OBSOLETE register int regno; */
-/* OBSOLETE */
-/* OBSOLETE for (regno = 0; regno < NUM_REGS; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE char buf[MAX_REGISTER_RAW_SIZE]; */
-/* OBSOLETE */
-/* OBSOLETE if (regno < 16) */
-/* OBSOLETE val = lseek (corechan, reg_offset + 4 * regno, 0); */
-/* OBSOLETE else if (regno < 24) */
-/* OBSOLETE val = lseek (corechan, fp_reg_offset + 4 + 12 * (regno - 24), 0); */
-/* OBSOLETE else if (regno == 24) */
-/* OBSOLETE val = lseek (corechan, fp_reg_offset, 0); */
-/* OBSOLETE else if (regno == 25) */
-/* OBSOLETE val = lseek (corechan, reg_offset + 4 * PC, 0); */
-/* OBSOLETE if (val < 0 */
-/* OBSOLETE || (val = myread (corechan, buf, sizeof buf)) < 0) */
-/* OBSOLETE { */
-/* OBSOLETE char *buffer = (char *) alloca (strlen (REGISTER_NAME (regno)) */
-/* OBSOLETE + 30); */
-/* OBSOLETE strcpy (buffer, "Reading register "); */
-/* OBSOLETE strcat (buffer, REGISTER_NAME (regno)); */
-/* OBSOLETE */
-/* OBSOLETE perror_with_name (buffer); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (regno == PC_REGNUM) */
-/* OBSOLETE *(int *) buf = GET_PC_PART (*(int *) buf); */
-/* OBSOLETE supply_register (regno, buf); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE if (filename[0] == '/') */
-/* OBSOLETE corefile = savestring (filename, strlen (filename)); */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE corefile = concat (current_directory, "/", filename, NULL); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE flush_cached_frames (); */
-/* OBSOLETE select_frame (get_current_frame (), 0); */
-/* OBSOLETE validate_files (); */
-/* OBSOLETE } */
-/* OBSOLETE else if (from_tty) */
-/* OBSOLETE printf ("No core file now.\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE #if 0 */
-/* OBSOLETE /* Work with core dump and executable files, for GDB. */
-/* OBSOLETE This code would be in corefile.c if it weren't machine-dependent. *x/ */
-/* OBSOLETE */
-/* OBSOLETE /* Structure to describe the chain of shared libraries used */
-/* OBSOLETE by the execfile. */
-/* OBSOLETE e.g. prog shares Xt which shares X11 which shares c. *x/ */
-/* OBSOLETE */
-/* OBSOLETE struct shared_library */
-/* OBSOLETE { */
-/* OBSOLETE struct exec_header header; */
-/* OBSOLETE char name[SHLIBLEN]; */
-/* OBSOLETE CORE_ADDR text_start; /* CORE_ADDR of 1st byte of text, this file *x/ */
-/* OBSOLETE long data_offset; /* offset of data section in file *x/ */
-/* OBSOLETE int chan; /* file descriptor for the file *x/ */
-/* OBSOLETE struct shared_library *shares; /* library this one shares *x/ */
-/* OBSOLETE }; */
-/* OBSOLETE static struct shared_library *shlib = 0; */
-/* OBSOLETE */
-/* OBSOLETE /* Hook for `exec_file_command' command to call. *x/ */
-/* OBSOLETE */
-/* OBSOLETE extern void (*exec_file_display_hook) (); */
-/* OBSOLETE */
-/* OBSOLETE static CORE_ADDR unshared_text_start; */
-/* OBSOLETE */
-/* OBSOLETE /* extended header from exec file (for shared library info) *x/ */
-/* OBSOLETE */
-/* OBSOLETE static struct exec_header exec_header; */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE exec_file_command (filename, from_tty) */
-/* OBSOLETE char *filename; */
-/* OBSOLETE int from_tty; */
-/* OBSOLETE { */
-/* OBSOLETE int val; */
-/* OBSOLETE */
-/* OBSOLETE /* Eliminate all traces of old exec file. */
-/* OBSOLETE Mark text segment as empty. *x/ */
-/* OBSOLETE */
-/* OBSOLETE if (execfile) */
-/* OBSOLETE free (execfile); */
-/* OBSOLETE execfile = 0; */
-/* OBSOLETE data_start = 0; */
-/* OBSOLETE data_end -= exec_data_start; */
-/* OBSOLETE text_start = 0; */
-/* OBSOLETE unshared_text_start = 0; */
-/* OBSOLETE text_end = 0; */
-/* OBSOLETE exec_data_start = 0; */
-/* OBSOLETE exec_data_end = 0; */
-/* OBSOLETE if (execchan >= 0) */
-/* OBSOLETE close (execchan); */
-/* OBSOLETE execchan = -1; */
-/* OBSOLETE if (shlib) */
-/* OBSOLETE { */
-/* OBSOLETE close_shared_library (shlib); */
-/* OBSOLETE shlib = 0; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Now open and digest the file the user requested, if any. *x/ */
-/* OBSOLETE */
-/* OBSOLETE if (filename) */
-/* OBSOLETE { */
-/* OBSOLETE filename = tilde_expand (filename); */
-/* OBSOLETE make_cleanup (free, filename); */
-/* OBSOLETE */
-/* OBSOLETE execchan = openp (getenv ("PATH"), 1, filename, O_RDONLY, 0, */
-/* OBSOLETE &execfile); */
-/* OBSOLETE if (execchan < 0) */
-/* OBSOLETE perror_with_name (filename); */
-/* OBSOLETE */
-/* OBSOLETE { */
-/* OBSOLETE struct stat st_exec; */
-/* OBSOLETE */
-/* OBSOLETE #ifdef HEADER_SEEK_FD */
-/* OBSOLETE HEADER_SEEK_FD (execchan); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE val = myread (execchan, &exec_header, sizeof exec_header); */
-/* OBSOLETE exec_aouthdr = exec_header.a_exec; */
-/* OBSOLETE */
-/* OBSOLETE if (val < 0) */
-/* OBSOLETE perror_with_name (filename); */
-/* OBSOLETE */
-/* OBSOLETE text_start = 0x8000; */
-/* OBSOLETE */
-/* OBSOLETE /* Look for shared library if needed *x/ */
-/* OBSOLETE if (exec_header.a_exec.a_magic & MF_USES_SL) */
-/* OBSOLETE shlib = open_shared_library (exec_header.a_shlibname, text_start); */
-/* OBSOLETE */
-/* OBSOLETE text_offset = N_TXTOFF (exec_aouthdr); */
-/* OBSOLETE exec_data_offset = N_TXTOFF (exec_aouthdr) + exec_aouthdr.a_text; */
-/* OBSOLETE */
-/* OBSOLETE if (shlib) */
-/* OBSOLETE { */
-/* OBSOLETE unshared_text_start = shared_text_end (shlib) & ~0x7fff; */
-/* OBSOLETE stack_start = shlib->header.a_exec.a_sldatabase; */
-/* OBSOLETE stack_end = STACK_END_ADDR; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE unshared_text_start = 0x8000; */
-/* OBSOLETE text_end = unshared_text_start + exec_aouthdr.a_text; */
-/* OBSOLETE */
-/* OBSOLETE exec_data_start = unshared_text_start + exec_aouthdr.a_text; */
-/* OBSOLETE exec_data_end = exec_data_start + exec_aouthdr.a_data; */
-/* OBSOLETE */
-/* OBSOLETE data_start = exec_data_start; */
-/* OBSOLETE data_end += exec_data_start; */
-/* OBSOLETE */
-/* OBSOLETE fstat (execchan, &st_exec); */
-/* OBSOLETE exec_mtime = st_exec.st_mtime; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE validate_files (); */
-/* OBSOLETE } */
-/* OBSOLETE else if (from_tty) */
-/* OBSOLETE printf ("No executable file now.\n"); */
-/* OBSOLETE */
-/* OBSOLETE /* Tell display code (if any) about the changed file name. *x/ */
-/* OBSOLETE if (exec_file_display_hook) */
-/* OBSOLETE (*exec_file_display_hook) (filename); */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE #if 0 */
-/* OBSOLETE /* Read from the program's memory (except for inferior processes). */
-/* OBSOLETE This function is misnamed, since it only reads, never writes; and */
-/* OBSOLETE since it will use the core file and/or executable file as necessary. */
-/* OBSOLETE */
-/* OBSOLETE It should be extended to write as well as read, FIXME, for patching files. */
-/* OBSOLETE */
-/* OBSOLETE Return 0 if address could be read, EIO if addresss out of bounds. *x/ */
-/* OBSOLETE */
-/* OBSOLETE int */
-/* OBSOLETE xfer_core_file (memaddr, myaddr, len) */
-/* OBSOLETE CORE_ADDR memaddr; */
-/* OBSOLETE char *myaddr; */
-/* OBSOLETE int len; */
-/* OBSOLETE { */
-/* OBSOLETE register int i; */
-/* OBSOLETE register int val; */
-/* OBSOLETE int xferchan; */
-/* OBSOLETE char **xferfile; */
-/* OBSOLETE int fileptr; */
-/* OBSOLETE int returnval = 0; */
-/* OBSOLETE */
-/* OBSOLETE while (len > 0) */
-/* OBSOLETE { */
-/* OBSOLETE xferfile = 0; */
-/* OBSOLETE xferchan = 0; */
-/* OBSOLETE */
-/* OBSOLETE /* Determine which file the next bunch of addresses reside in, */
-/* OBSOLETE and where in the file. Set the file's read/write pointer */
-/* OBSOLETE to point at the proper place for the desired address */
-/* OBSOLETE and set xferfile and xferchan for the correct file. */
-/* OBSOLETE */
-/* OBSOLETE If desired address is nonexistent, leave them zero. */
-/* OBSOLETE */
-/* OBSOLETE i is set to the number of bytes that can be handled */
-/* OBSOLETE along with the next address. */
-/* OBSOLETE */
-/* OBSOLETE We put the most likely tests first for efficiency. *x/ */
-/* OBSOLETE */
-/* OBSOLETE /* Note that if there is no core file */
-/* OBSOLETE data_start and data_end are equal. *x/ */
-/* OBSOLETE if (memaddr >= data_start && memaddr < data_end) */
-/* OBSOLETE { */
-/* OBSOLETE i = min (len, data_end - memaddr); */
-/* OBSOLETE fileptr = memaddr - data_start + data_offset; */
-/* OBSOLETE xferfile = &corefile; */
-/* OBSOLETE xferchan = corechan; */
-/* OBSOLETE } */
-/* OBSOLETE /* Note that if there is no core file */
-/* OBSOLETE stack_start and stack_end define the shared library data. *x/ */
-/* OBSOLETE else if (memaddr >= stack_start && memaddr < stack_end) */
-/* OBSOLETE { */
-/* OBSOLETE if (corechan < 0) */
-/* OBSOLETE { */
-/* OBSOLETE struct shared_library *lib; */
-/* OBSOLETE for (lib = shlib; lib; lib = lib->shares) */
-/* OBSOLETE if (memaddr >= lib->header.a_exec.a_sldatabase && */
-/* OBSOLETE memaddr < lib->header.a_exec.a_sldatabase + */
-/* OBSOLETE lib->header.a_exec.a_data) */
-/* OBSOLETE break; */
-/* OBSOLETE if (lib) */
-/* OBSOLETE { */
-/* OBSOLETE i = min (len, lib->header.a_exec.a_sldatabase + */
-/* OBSOLETE lib->header.a_exec.a_data - memaddr); */
-/* OBSOLETE fileptr = lib->data_offset + memaddr - */
-/* OBSOLETE lib->header.a_exec.a_sldatabase; */
-/* OBSOLETE xferfile = execfile; */
-/* OBSOLETE xferchan = lib->chan; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE i = min (len, stack_end - memaddr); */
-/* OBSOLETE fileptr = memaddr - stack_start + stack_offset; */
-/* OBSOLETE xferfile = &corefile; */
-/* OBSOLETE xferchan = corechan; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE else if (corechan < 0 */
-/* OBSOLETE && memaddr >= exec_data_start && memaddr < exec_data_end) */
-/* OBSOLETE { */
-/* OBSOLETE i = min (len, exec_data_end - memaddr); */
-/* OBSOLETE fileptr = memaddr - exec_data_start + exec_data_offset; */
-/* OBSOLETE xferfile = &execfile; */
-/* OBSOLETE xferchan = execchan; */
-/* OBSOLETE } */
-/* OBSOLETE else if (memaddr >= text_start && memaddr < text_end) */
-/* OBSOLETE { */
-/* OBSOLETE struct shared_library *lib; */
-/* OBSOLETE for (lib = shlib; lib; lib = lib->shares) */
-/* OBSOLETE if (memaddr >= lib->text_start && */
-/* OBSOLETE memaddr < lib->text_start + lib->header.a_exec.a_text) */
-/* OBSOLETE break; */
-/* OBSOLETE if (lib) */
-/* OBSOLETE { */
-/* OBSOLETE i = min (len, lib->header.a_exec.a_text + */
-/* OBSOLETE lib->text_start - memaddr); */
-/* OBSOLETE fileptr = memaddr - lib->text_start + text_offset; */
-/* OBSOLETE xferfile = &execfile; */
-/* OBSOLETE xferchan = lib->chan; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE i = min (len, text_end - memaddr); */
-/* OBSOLETE fileptr = memaddr - unshared_text_start + text_offset; */
-/* OBSOLETE xferfile = &execfile; */
-/* OBSOLETE xferchan = execchan; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE else if (memaddr < text_start) */
-/* OBSOLETE { */
-/* OBSOLETE i = min (len, text_start - memaddr); */
-/* OBSOLETE } */
-/* OBSOLETE else if (memaddr >= text_end */
-/* OBSOLETE && memaddr < (corechan >= 0 ? data_start : exec_data_start)) */
-/* OBSOLETE { */
-/* OBSOLETE i = min (len, data_start - memaddr); */
-/* OBSOLETE } */
-/* OBSOLETE else if (corechan >= 0 */
-/* OBSOLETE && memaddr >= data_end && memaddr < stack_start) */
-/* OBSOLETE { */
-/* OBSOLETE i = min (len, stack_start - memaddr); */
-/* OBSOLETE } */
-/* OBSOLETE else if (corechan < 0 && memaddr >= exec_data_end) */
-/* OBSOLETE { */
-/* OBSOLETE i = min (len, -memaddr); */
-/* OBSOLETE } */
-/* OBSOLETE else if (memaddr >= stack_end && stack_end != 0) */
-/* OBSOLETE { */
-/* OBSOLETE i = min (len, -memaddr); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE /* Address did not classify into one of the known ranges. */
-/* OBSOLETE This shouldn't happen; we catch the endpoints. *x/ */
-/* OBSOLETE internal_error ("Bad case logic in xfer_core_file."); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Now we know which file to use. */
-/* OBSOLETE Set up its pointer and transfer the data. *x/ */
-/* OBSOLETE if (xferfile) */
-/* OBSOLETE { */
-/* OBSOLETE if (*xferfile == 0) */
-/* OBSOLETE if (xferfile == &execfile) */
-/* OBSOLETE error ("No program file to examine."); */
-/* OBSOLETE else */
-/* OBSOLETE error ("No core dump file or running program to examine."); */
-/* OBSOLETE val = lseek (xferchan, fileptr, 0); */
-/* OBSOLETE if (val < 0) */
-/* OBSOLETE perror_with_name (*xferfile); */
-/* OBSOLETE val = myread (xferchan, myaddr, i); */
-/* OBSOLETE if (val < 0) */
-/* OBSOLETE perror_with_name (*xferfile); */
-/* OBSOLETE } */
-/* OBSOLETE /* If this address is for nonexistent memory, */
-/* OBSOLETE read zeros if reading, or do nothing if writing. */
-/* OBSOLETE Actually, we never right. *x/ */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE memset (myaddr, '\0', i); */
-/* OBSOLETE returnval = EIO; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE memaddr += i; */
-/* OBSOLETE myaddr += i; */
-/* OBSOLETE len -= i; */
-/* OBSOLETE } */
-/* OBSOLETE return returnval; */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
diff --git a/contrib/gdb/gdb/c-exp.tab.c b/contrib/gdb/gdb/c-exp.tab.c
deleted file mode 100644
index 46ff4363d0ee..000000000000
--- a/contrib/gdb/gdb/c-exp.tab.c
+++ /dev/null
@@ -1,2865 +0,0 @@
-
-/* A Bison parser, made from c-exp.y
- by GNU Bison version 1.27
- */
-
-#define YYBISON 1 /* Identify Bison output. */
-
-#define INT 257
-#define FLOAT 258
-#define STRING 259
-#define NAME 260
-#define TYPENAME 261
-#define NAME_OR_INT 262
-#define STRUCT 263
-#define CLASS 264
-#define UNION 265
-#define ENUM 266
-#define SIZEOF 267
-#define UNSIGNED 268
-#define COLONCOLON 269
-#define TEMPLATE 270
-#define ERROR 271
-#define SIGNED_KEYWORD 272
-#define LONG 273
-#define SHORT 274
-#define INT_KEYWORD 275
-#define CONST_KEYWORD 276
-#define VOLATILE_KEYWORD 277
-#define DOUBLE_KEYWORD 278
-#define VARIABLE 279
-#define ASSIGN_MODIFY 280
-#define THIS 281
-#define TRUEKEYWORD 282
-#define FALSEKEYWORD 283
-#define ABOVE_COMMA 284
-#define OROR 285
-#define ANDAND 286
-#define EQUAL 287
-#define NOTEQUAL 288
-#define LEQ 289
-#define GEQ 290
-#define LSH 291
-#define RSH 292
-#define UNARY 293
-#define INCREMENT 294
-#define DECREMENT 295
-#define ARROW 296
-#define BLOCKNAME 297
-#define FILENAME 298
-
-#line 38 "c-exp.y"
-
-
-#include "defs.h"
-#include "gdb_string.h"
-#include <ctype.h>
-#include "expression.h"
-#include "value.h"
-#include "parser-defs.h"
-#include "language.h"
-#include "c-lang.h"
-#include "bfd.h" /* Required by objfiles.h. */
-#include "symfile.h" /* Required by objfiles.h. */
-#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
-
-/* Flag indicating we're dealing with HP-compiled objects */
-extern int hp_som_som_object_present;
-
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
- as well as gratuitiously global symbol names, so we can have multiple
- yacc generated parsers in gdb. Note that these are only the variables
- produced by yacc. If other parser generators (bison, byacc, etc) produce
- additional global names that conflict at link time, then those parser
- generators need to be fixed instead of adding those names to this list. */
-
-#define yymaxdepth c_maxdepth
-#define yyparse c_parse
-#define yylex c_lex
-#define yyerror c_error
-#define yylval c_lval
-#define yychar c_char
-#define yydebug c_debug
-#define yypact c_pact
-#define yyr1 c_r1
-#define yyr2 c_r2
-#define yydef c_def
-#define yychk c_chk
-#define yypgo c_pgo
-#define yyact c_act
-#define yyexca c_exca
-#define yyerrflag c_errflag
-#define yynerrs c_nerrs
-#define yyps c_ps
-#define yypv c_pv
-#define yys c_s
-#define yy_yys c_yys
-#define yystate c_state
-#define yytmp c_tmp
-#define yyv c_v
-#define yy_yyv c_yyv
-#define yyval c_val
-#define yylloc c_lloc
-#define yyreds c_reds /* With YYDEBUG defined */
-#define yytoks c_toks /* With YYDEBUG defined */
-#define yylhs c_yylhs
-#define yylen c_yylen
-#define yydefred c_yydefred
-#define yydgoto c_yydgoto
-#define yysindex c_yysindex
-#define yyrindex c_yyrindex
-#define yygindex c_yygindex
-#define yytable c_yytable
-#define yycheck c_yycheck
-
-#ifndef YYDEBUG
-#define YYDEBUG 0 /* Default to no yydebug support */
-#endif
-
-int
-yyparse PARAMS ((void));
-
-static int
-yylex PARAMS ((void));
-
-void
-yyerror PARAMS ((char *));
-
-
-#line 120 "c-exp.y"
-typedef union
- {
- LONGEST lval;
- struct {
- LONGEST val;
- struct type *type;
- } typed_val_int;
- struct {
- DOUBLEST dval;
- struct type *type;
- } typed_val_float;
- struct symbol *sym;
- struct type *tval;
- struct stoken sval;
- struct ttype tsym;
- struct symtoken ssym;
- int voidval;
- struct block *bval;
- enum exp_opcode opcode;
- struct internalvar *ivar;
-
- struct type **tvec;
- int *ivec;
- } YYSTYPE;
-#line 145 "c-exp.y"
-
-/* YYSTYPE gets defined by %union */
-static int
-parse_number PARAMS ((char *, int, int, YYSTYPE *));
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
-#endif
-
-
-
-#define YYFINAL 214
-#define YYFLAG -32768
-#define YYNTBASE 69
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 298 ? yytranslate[x] : 91)
-
-static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 62, 2, 2, 2, 52, 38, 2, 59,
- 65, 50, 48, 30, 49, 57, 51, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 68, 2, 41,
- 32, 42, 33, 47, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 58, 2, 64, 37, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 66, 36, 67, 63, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 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, 31, 34, 35, 39, 40, 43, 44,
- 45, 46, 53, 54, 55, 56, 60, 61
-};
-
-#if YYDEBUG != 0
-static const short yyprhs[] = { 0,
- 0, 2, 4, 6, 8, 12, 15, 18, 21, 24,
- 27, 30, 33, 36, 39, 42, 46, 50, 55, 59,
- 63, 68, 73, 74, 80, 82, 83, 85, 89, 91,
- 95, 100, 105, 109, 113, 117, 121, 125, 129, 133,
- 137, 141, 145, 149, 153, 157, 161, 165, 169, 173,
- 177, 181, 185, 191, 195, 199, 201, 203, 205, 207,
- 209, 214, 216, 218, 220, 222, 224, 226, 230, 234,
- 238, 243, 245, 248, 250, 252, 255, 258, 261, 265,
- 269, 271, 274, 276, 279, 281, 285, 288, 290, 293,
- 295, 298, 302, 305, 309, 311, 315, 317, 319, 321,
- 323, 326, 330, 333, 337, 341, 346, 349, 353, 355,
- 358, 361, 364, 367, 370, 373, 375, 378, 380, 386,
- 389, 392, 394, 396, 398, 400, 402, 406, 408, 410,
- 412, 414, 416
-};
-
-static const short yyrhs[] = { 71,
- 0, 70, 0, 85, 0, 72, 0, 71, 30, 72,
- 0, 50, 72, 0, 38, 72, 0, 49, 72, 0,
- 62, 72, 0, 63, 72, 0, 54, 72, 0, 55,
- 72, 0, 72, 54, 0, 72, 55, 0, 13, 72,
- 0, 72, 56, 89, 0, 72, 56, 79, 0, 72,
- 56, 50, 72, 0, 72, 57, 89, 0, 72, 57,
- 79, 0, 72, 57, 50, 72, 0, 72, 58, 71,
- 64, 0, 0, 72, 59, 73, 75, 65, 0, 66,
- 0, 0, 72, 0, 75, 30, 72, 0, 67, 0,
- 74, 75, 76, 0, 74, 85, 76, 72, 0, 59,
- 85, 65, 72, 0, 59, 71, 65, 0, 72, 47,
- 72, 0, 72, 50, 72, 0, 72, 51, 72, 0,
- 72, 52, 72, 0, 72, 48, 72, 0, 72, 49,
- 72, 0, 72, 45, 72, 0, 72, 46, 72, 0,
- 72, 39, 72, 0, 72, 40, 72, 0, 72, 43,
- 72, 0, 72, 44, 72, 0, 72, 41, 72, 0,
- 72, 42, 72, 0, 72, 38, 72, 0, 72, 37,
- 72, 0, 72, 36, 72, 0, 72, 35, 72, 0,
- 72, 34, 72, 0, 72, 33, 72, 68, 72, 0,
- 72, 32, 72, 0, 72, 26, 72, 0, 3, 0,
- 8, 0, 4, 0, 78, 0, 25, 0, 13, 59,
- 85, 65, 0, 5, 0, 27, 0, 28, 0, 29,
- 0, 60, 0, 61, 0, 77, 15, 89, 0, 77,
- 15, 89, 0, 86, 15, 89, 0, 86, 15, 63,
- 89, 0, 79, 0, 15, 89, 0, 90, 0, 86,
- 0, 86, 22, 0, 86, 23, 0, 86, 81, 0,
- 86, 22, 81, 0, 86, 23, 81, 0, 50, 0,
- 50, 81, 0, 38, 0, 38, 81, 0, 82, 0,
- 59, 81, 65, 0, 82, 83, 0, 83, 0, 82,
- 84, 0, 84, 0, 58, 64, 0, 58, 3, 64,
- 0, 59, 65, 0, 59, 88, 65, 0, 80, 0,
- 86, 15, 50, 0, 7, 0, 21, 0, 19, 0,
- 20, 0, 19, 21, 0, 14, 19, 21, 0, 19,
- 19, 0, 19, 19, 21, 0, 14, 19, 19, 0,
- 14, 19, 19, 21, 0, 20, 21, 0, 14, 20,
- 21, 0, 24, 0, 19, 24, 0, 9, 89, 0,
- 10, 89, 0, 11, 89, 0, 12, 89, 0, 14,
- 87, 0, 14, 0, 18, 87, 0, 18, 0, 16,
- 89, 41, 85, 42, 0, 22, 86, 0, 23, 86,
- 0, 7, 0, 21, 0, 19, 0, 20, 0, 85,
- 0, 88, 30, 85, 0, 6, 0, 60, 0, 7,
- 0, 8, 0, 6, 0, 60, 0
-};
-
-#endif
-
-#if YYDEBUG != 0
-static const short yyrline[] = { 0,
- 230, 231, 234, 241, 242, 247, 250, 253, 257, 261,
- 265, 269, 273, 277, 281, 285, 291, 299, 303, 309,
- 317, 321, 325, 329, 335, 339, 342, 346, 350, 353,
- 360, 366, 372, 378, 382, 386, 390, 394, 398, 402,
- 406, 410, 414, 418, 422, 426, 430, 434, 438, 442,
- 446, 450, 454, 458, 462, 468, 475, 486, 493, 496,
- 500, 508, 533, 538, 545, 554, 562, 568, 579, 595,
- 608, 632, 633, 667, 725, 731, 732, 733, 735, 737,
- 741, 743, 745, 747, 749, 752, 754, 759, 766, 768,
- 772, 774, 778, 780, 792, 793, 798, 800, 802, 804,
- 806, 808, 810, 812, 814, 816, 818, 820, 822, 824,
- 826, 829, 832, 835, 838, 840, 842, 844, 849, 856,
- 857, 860, 861, 867, 873, 882, 887, 894, 895, 896,
- 897, 900, 901
-};
-#endif
-
-
-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-
-static const char * const yytname[] = { "$","error","$undefined.","INT","FLOAT",
-"STRING","NAME","TYPENAME","NAME_OR_INT","STRUCT","CLASS","UNION","ENUM","SIZEOF",
-"UNSIGNED","COLONCOLON","TEMPLATE","ERROR","SIGNED_KEYWORD","LONG","SHORT","INT_KEYWORD",
-"CONST_KEYWORD","VOLATILE_KEYWORD","DOUBLE_KEYWORD","VARIABLE","ASSIGN_MODIFY",
-"THIS","TRUEKEYWORD","FALSEKEYWORD","','","ABOVE_COMMA","'='","'?'","OROR","ANDAND",
-"'|'","'^'","'&'","EQUAL","NOTEQUAL","'<'","'>'","LEQ","GEQ","LSH","RSH","'@'",
-"'+'","'-'","'*'","'/'","'%'","UNARY","INCREMENT","DECREMENT","ARROW","'.'",
-"'['","'('","BLOCKNAME","FILENAME","'!'","'~'","']'","')'","'{'","'}'","':'",
-"start","type_exp","exp1","exp","@1","lcurly","arglist","rcurly","block","variable",
-"qualified_name","ptype","abs_decl","direct_abs_decl","array_mod","func_mod",
-"type","typebase","typename","nonempty_typelist","name","name_not_typename", NULL
-};
-#endif
-
-static const short yyr1[] = { 0,
- 69, 69, 70, 71, 71, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 73, 72, 74, 75, 75, 75, 76, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 77, 77, 77, 78, 79,
- 79, 78, 78, 78, 80, 80, 80, 80, 80, 80,
- 81, 81, 81, 81, 81, 82, 82, 82, 82, 82,
- 83, 83, 84, 84, 85, 85, 86, 86, 86, 86,
- 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
- 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
- 86, 87, 87, 87, 87, 88, 88, 89, 89, 89,
- 89, 90, 90
-};
-
-static const short yyr2[] = { 0,
- 1, 1, 1, 1, 3, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 3, 3, 4, 3, 3,
- 4, 4, 0, 5, 1, 0, 1, 3, 1, 3,
- 4, 4, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 5, 3, 3, 1, 1, 1, 1, 1,
- 4, 1, 1, 1, 1, 1, 1, 3, 3, 3,
- 4, 1, 2, 1, 1, 2, 2, 2, 3, 3,
- 1, 2, 1, 2, 1, 3, 2, 1, 2, 1,
- 2, 3, 2, 3, 1, 3, 1, 1, 1, 1,
- 2, 3, 2, 3, 3, 4, 2, 3, 1, 2,
- 2, 2, 2, 2, 2, 1, 2, 1, 5, 2,
- 2, 1, 1, 1, 1, 1, 3, 1, 1, 1,
- 1, 1, 1
-};
-
-static const short yydefact[] = { 0,
- 56, 58, 62, 132, 97, 57, 0, 0, 0, 0,
- 0, 116, 0, 0, 118, 99, 100, 98, 0, 0,
- 109, 60, 63, 64, 65, 0, 0, 0, 0, 0,
- 0, 133, 67, 0, 0, 25, 2, 1, 4, 26,
- 0, 59, 72, 95, 3, 75, 74, 128, 130, 131,
- 129, 111, 112, 113, 114, 0, 15, 0, 122, 124,
- 125, 123, 115, 73, 0, 124, 125, 117, 103, 101,
- 110, 107, 120, 121, 7, 8, 6, 11, 12, 0,
- 0, 9, 10, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 13, 14, 0, 0,
- 0, 23, 27, 0, 0, 0, 0, 76, 77, 83,
- 81, 0, 0, 78, 85, 88, 90, 0, 0, 105,
- 102, 108, 0, 104, 33, 0, 5, 55, 54, 0,
- 52, 51, 50, 49, 48, 42, 43, 46, 47, 44,
- 45, 40, 41, 34, 38, 39, 35, 36, 37, 130,
- 0, 17, 16, 0, 20, 19, 0, 26, 0, 29,
- 30, 0, 69, 96, 0, 70, 79, 80, 84, 82,
- 0, 91, 93, 0, 126, 75, 0, 0, 87, 89,
- 61, 106, 0, 32, 0, 18, 21, 22, 0, 28,
- 31, 71, 92, 86, 0, 0, 94, 119, 53, 24,
- 127, 0, 0, 0
-};
-
-static const short yydefgoto[] = { 212,
- 37, 80, 39, 168, 40, 114, 171, 41, 42, 43,
- 44, 124, 125, 126, 127, 185, 58, 63, 187, 176,
- 47
-};
-
-static const short yypact[] = { 205,
--32768,-32768,-32768,-32768,-32768,-32768, 46, 46, 46, 46,
- 269, 57, 46, 46, 100, 134, -14,-32768, 228, 228,
--32768,-32768,-32768,-32768,-32768, 205, 205, 205, 205, 205,
- 205, 21,-32768, 205, 205,-32768,-32768, -16, 504, 205,
- 22,-32768,-32768,-32768,-32768, 107,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768, 205, 14, 23,-32768, 7,
- 24,-32768,-32768,-32768, 10,-32768,-32768,-32768, 34,-32768,
--32768,-32768,-32768,-32768, 14, 14, 14, 14, 14, -26,
- -21, 14, 14, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
- 205, 205, 205, 205, 205, 205,-32768,-32768, 419, 438,
- 205,-32768, 504, -25, -2, 46, 53, 8, 8, 8,
- 8, -1, 359,-32768, -41,-32768,-32768, 9, 42, 54,
--32768,-32768, 228,-32768,-32768, 205, 504, 504, 504, 467,
- 556, 580, 603, 625, 646, 665, 665, 254, 254, 254,
- 254, 124, 124, 356, 416, 416, 14, 14, 14, 89,
- 205,-32768,-32768, 205,-32768,-32768, -17, 205, 205,-32768,
--32768, 205, 93,-32768, 46,-32768,-32768,-32768,-32768,-32768,
- 45,-32768,-32768, 50,-32768, 146, -22, 128,-32768,-32768,
- 333,-32768, 68, 14, 205, 14, 14,-32768, -3, 504,
- 14,-32768,-32768,-32768, 67, 228,-32768,-32768, 531,-32768,
--32768, 125, 126,-32768
-};
-
-static const short yypgoto[] = {-32768,
--32768, 3, -5,-32768,-32768, -44, 12,-32768,-32768, -76,
--32768, 79,-32768, 11, 16, 1, 0, 113,-32768, 2,
--32768
-};
-
-
-#define YYLAST 724
-
-
-static const short yytable[] = { 46,
- 45, 181, 38, 84, 169, 57, 72, 206, 52, 53,
- 54, 55, 84, 84, 64, 65, 122, 188, 73, 74,
- 75, 76, 77, 78, 79, 130, 169, 131, 82, 83,
- 46, 81, 162, 165, 113, -66, 116, 129, 135, 46,
- 115, 170, 207, 136, 132, 120, 198, 48, 49, 50,
- 133, 48, 49, 50, 134, 46, 128, 121, 48, 49,
- 50, 210, 182, 59, 170, 122, 123, 107, 108, 109,
- 110, 111, 112, 191, 192, 60, 61, 62, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
- 159, 51, 174, -97, 175, 51, 59, -68, 203, 208,
- 163, 166, 51, 167, 204, 175, 174, 173, 66, 67,
- 62, 117, 186, 199, 213, 214, 172, 68, 118, 119,
- 194, 0, 186, 193, 5, 189, 7, 8, 9, 10,
- 190, 12, 0, 14, 120, 15, 16, 17, 18, 19,
- 20, 21, 69, 0, 70, 196, 121, 71, 197, 0,
- 205, 0, 113, 200, 122, 123, 201, 118, 119, 0,
- 101, 102, 103, 104, 105, 106, 202, 107, 108, 109,
- 110, 111, 112, 120, 0, 194, 0, 186, 0, 209,
- 0, 0, 183, 0, 0, 121, 177, 178, 179, 180,
- 0, 184, 0, 122, 123, 186, 211, 1, 2, 3,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
- 14, 0, 15, 16, 17, 18, 19, 20, 21, 22,
- 0, 23, 24, 25, 5, 0, 7, 8, 9, 10,
- 0, 12, 26, 14, 0, 15, 16, 17, 18, 19,
- 20, 21, 0, 27, 28, 0, 0, 0, 29, 30,
- 0, 0, 0, 31, 32, 33, 34, 35, 0, 0,
- 36, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 0, 15, 16, 17, 18,
- 19, 20, 21, 22, 0, 23, 24, 25, 99, 100,
- 101, 102, 103, 104, 105, 106, 26, 107, 108, 109,
- 110, 111, 112, 0, 0, 0, 0, 27, 28, 0,
- 0, 0, 29, 30, 0, 0, 0, 56, 32, 33,
- 34, 35, 0, 0, 36, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 0,
- 15, 16, 17, 18, 19, 20, 21, 22, 0, 23,
- 24, 25, 0, 0, 0, 5, 0, 7, 8, 9,
- 10, 0, 12, 0, 14, 0, 15, 16, 17, 18,
- 19, 20, 21, 0, 0, 0, 29, 30, 0, 0,
- 0, 31, 32, 33, 34, 35, 120, 0, 36, 0,
- 0, 0, 0, 102, 103, 104, 105, 106, 121, 107,
- 108, 109, 110, 111, 112, 0, 122, 123, 0, 0,
- 0, 0, 0, 183, 48, 160, 50, 7, 8, 9,
- 10, 0, 12, 0, 14, 0, 15, 16, 17, 18,
- 19, 20, 21, 48, 160, 50, 7, 8, 9, 10,
- 0, 12, 0, 14, 0, 15, 16, 17, 18, 19,
- 20, 21, 0, 0, 0, 104, 105, 106, 161, 107,
- 108, 109, 110, 111, 112, 0, 0, 0, 51, 0,
- 0, 0, 0, 0, 0, 0, 0, 164, 0, 0,
- 0, 0, 85, 0, 0, 0, 0, 51, 86, 87,
- 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
- 98, 99, 100, 101, 102, 103, 104, 105, 106, 0,
- 107, 108, 109, 110, 111, 112, 0, 0, 0, 85,
- 0, 0, 0, 0, 195, 86, 87, 88, 89, 90,
- 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
- 101, 102, 103, 104, 105, 106, 0, 107, 108, 109,
- 110, 111, 112, 87, 88, 89, 90, 91, 92, 93,
- 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
- 104, 105, 106, 0, 107, 108, 109, 110, 111, 112,
- 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 0, 107,
- 108, 109, 110, 111, 112, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- 105, 106, 0, 107, 108, 109, 110, 111, 112, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, 0, 107, 108, 109, 110,
- 111, 112, 92, 93, 94, 95, 96, 97, 98, 99,
- 100, 101, 102, 103, 104, 105, 106, 0, 107, 108,
- 109, 110, 111, 112, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 0, 107,
- 108, 109, 110, 111, 112, 95, 96, 97, 98, 99,
- 100, 101, 102, 103, 104, 105, 106, 0, 107, 108,
- 109, 110, 111, 112
-};
-
-static const short yycheck[] = { 0,
- 0, 3, 0, 30, 30, 11, 21, 30, 7, 8,
- 9, 10, 30, 30, 13, 14, 58, 59, 19, 20,
- 26, 27, 28, 29, 30, 19, 30, 21, 34, 35,
- 31, 31, 109, 110, 40, 15, 15, 15, 65, 40,
- 40, 67, 65, 65, 21, 38, 64, 6, 7, 8,
- 41, 6, 7, 8, 21, 56, 56, 50, 6, 7,
- 8, 65, 64, 7, 67, 58, 59, 54, 55, 56,
- 57, 58, 59, 65, 21, 19, 20, 21, 84, 85,
- 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
- 106, 60, 50, 15, 63, 60, 7, 15, 64, 42,
- 109, 110, 60, 111, 65, 63, 50, 116, 19, 20,
- 21, 15, 123, 168, 0, 0, 115, 15, 22, 23,
- 136, -1, 133, 133, 7, 125, 9, 10, 11, 12,
- 125, 14, -1, 16, 38, 18, 19, 20, 21, 22,
- 23, 24, 19, -1, 21, 161, 50, 24, 164, -1,
- 15, -1, 168, 169, 58, 59, 172, 22, 23, -1,
- 47, 48, 49, 50, 51, 52, 175, 54, 55, 56,
- 57, 58, 59, 38, -1, 191, -1, 188, -1, 195,
- -1, -1, 65, -1, -1, 50, 118, 119, 120, 121,
- -1, 123, -1, 58, 59, 206, 206, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, -1, 18, 19, 20, 21, 22, 23, 24, 25,
- -1, 27, 28, 29, 7, -1, 9, 10, 11, 12,
- -1, 14, 38, 16, -1, 18, 19, 20, 21, 22,
- 23, 24, -1, 49, 50, -1, -1, -1, 54, 55,
- -1, -1, -1, 59, 60, 61, 62, 63, -1, -1,
- 66, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, -1, 18, 19, 20, 21,
- 22, 23, 24, 25, -1, 27, 28, 29, 45, 46,
- 47, 48, 49, 50, 51, 52, 38, 54, 55, 56,
- 57, 58, 59, -1, -1, -1, -1, 49, 50, -1,
- -1, -1, 54, 55, -1, -1, -1, 59, 60, 61,
- 62, 63, -1, -1, 66, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
- 18, 19, 20, 21, 22, 23, 24, 25, -1, 27,
- 28, 29, -1, -1, -1, 7, -1, 9, 10, 11,
- 12, -1, 14, -1, 16, -1, 18, 19, 20, 21,
- 22, 23, 24, -1, -1, -1, 54, 55, -1, -1,
- -1, 59, 60, 61, 62, 63, 38, -1, 66, -1,
- -1, -1, -1, 48, 49, 50, 51, 52, 50, 54,
- 55, 56, 57, 58, 59, -1, 58, 59, -1, -1,
- -1, -1, -1, 65, 6, 7, 8, 9, 10, 11,
- 12, -1, 14, -1, 16, -1, 18, 19, 20, 21,
- 22, 23, 24, 6, 7, 8, 9, 10, 11, 12,
- -1, 14, -1, 16, -1, 18, 19, 20, 21, 22,
- 23, 24, -1, -1, -1, 50, 51, 52, 50, 54,
- 55, 56, 57, 58, 59, -1, -1, -1, 60, -1,
- -1, -1, -1, -1, -1, -1, -1, 50, -1, -1,
- -1, -1, 26, -1, -1, -1, -1, 60, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, -1,
- 54, 55, 56, 57, 58, 59, -1, -1, -1, 26,
- -1, -1, -1, -1, 68, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, -1, 54, 55, 56,
- 57, 58, 59, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, -1, 54, 55, 56, 57, 58, 59,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 51, 52, -1, 54,
- 55, 56, 57, 58, 59, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
- 51, 52, -1, 54, 55, 56, 57, 58, 59, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, -1, 54, 55, 56, 57,
- 58, 59, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 50, 51, 52, -1, 54, 55,
- 56, 57, 58, 59, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 51, 52, -1, 54,
- 55, 56, 57, 58, 59, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 50, 51, 52, -1, 54, 55,
- 56, 57, 58, 59
-};
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/lib/bison.simple"
-/* This file comes from bison-1.27. */
-
-/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
-#ifndef YYSTACK_USE_ALLOCA
-#ifdef alloca
-#define YYSTACK_USE_ALLOCA
-#else /* alloca not defined */
-#ifdef __GNUC__
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
-#define YYSTACK_USE_ALLOCA
-#include <alloca.h>
-#else /* not sparc */
-/* We think this test detects Watcom and Microsoft C. */
-/* This used to test MSDOS, but that is a bad idea
- since that symbol is in the user namespace. */
-#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
-#if 0 /* No need for xmalloc.h, which pollutes the namespace;
- instead, just don't use alloca. */
-#endif
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
-/* I don't know what this was needed for, but it pollutes the namespace.
- So I turned it off. rms, 2 May 1997. */
- #pragma alloca
-#define YYSTACK_USE_ALLOCA
-#else /* not MSDOS, or __TURBOC__, or _AIX */
-#if 0
-#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
- and on HPUX 10. Eventually we can turn this on. */
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#endif /* __hpux */
-#endif
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc */
-#endif /* not GNU C */
-#endif /* alloca not defined */
-#endif /* YYSTACK_USE_ALLOCA not defined */
-
-#ifdef YYSTACK_USE_ALLOCA
-#define YYSTACK_ALLOC alloca
-#else
-#define YYSTACK_ALLOC xmalloc
-#endif
-
-/* Note: there must be only one dollar sign in this file.
- It is replaced by the list of actions, each action
- as one case of the switch. */
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY -2
-#define YYEOF 0
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
-/* Like YYERROR except do call yyerror.
- This remains here temporarily to ease the
- transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
-#define YYFAIL goto yyerrlab
-#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(token, value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { yychar = (token), yylval = (value); \
- yychar1 = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
- goto yybackup; \
- } \
- else \
- { yyerror ("syntax error: cannot back up"); YYERROR; } \
-while (0)
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-#ifndef YYPURE
-#define YYLEX yylex()
-#endif
-
-#ifdef YYPURE
-#ifdef YYLSP_NEEDED
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval, &yylloc)
-#endif
-#else /* not YYLSP_NEEDED */
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval)
-#endif
-#endif /* not YYLSP_NEEDED */
-#endif
-
-/* If nonreentrant, generate the variables here */
-
-#ifndef YYPURE
-
-int yychar; /* the lookahead symbol */
-YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
-
-#ifdef YYLSP_NEEDED
-YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
-#endif
-
-int yynerrs; /* number of parse errors so far */
-#endif /* not YYPURE */
-
-#if YYDEBUG != 0
-int yydebug; /* nonzero means print parse trace */
-/* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
-#endif
-
-/* YYINITDEPTH indicates the initial size of the parser's stacks */
-
-#ifndef YYINITDEPTH
-#define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
-
-#if YYMAXDEPTH == 0
-#undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 10000
-#endif
-
-/* Define __yy_memcpy. Note that the size argument
- should be passed with type unsigned int, because that is what the non-GCC
- definitions require. With GCC, __builtin_memcpy takes an arg
- of type size_t, but it can handle unsigned int. */
-
-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
-#else /* not GNU C or C++ */
-#ifndef __cplusplus
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (to, from, count)
- char *to;
- char *from;
- unsigned int count;
-{
- register char *f = from;
- register char *t = to;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#else /* __cplusplus */
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (char *to, char *from, unsigned int count)
-{
- register char *t = to;
- register char *f = from;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#endif
-#endif
-
-#line 216 "/usr/lib/bison.simple"
-
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
- into yyparse. The argument should have type void *.
- It should actually point to an object.
- Grammar actions can access the variable by casting it
- to the proper pointer type. */
-
-#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
-#define YYPARSE_PARAM_ARG
-#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-#ifdef YYPARSE_PARAM
-int yyparse (void *);
-#else
-int yyparse (void);
-#endif
-#endif
-
-int
-yyparse(YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
-{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */
-
- short yyssa[YYINITDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
-
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to xreallocate them elsewhere */
-
-#ifdef YYLSP_NEEDED
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
-#else
-#define YYPOPSTACK (yyvsp--, yyssp--)
-#endif
-
- int yystacksize = YYINITDEPTH;
- int yyfree_stacks = 0;
-
-#ifdef YYPURE
- int yychar;
- YYSTYPE yylval;
- int yynerrs;
-#ifdef YYLSP_NEEDED
- YYLTYPE yylloc;
-#endif
-#endif
-
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
-
- int yylen;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
-#endif
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
-
- yyssp = yyss - 1;
- yyvsp = yyvs;
-#ifdef YYLSP_NEEDED
- yylsp = yyls;
-#endif
-
-/* Push a new state, which is found in yystate . */
-/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks. */
-yynewstate:
-
- *++yyssp = yystate;
-
- if (yyssp >= yyss + yystacksize - 1)
- {
- /* Give user a chance to xreallocate the stack */
- /* Use copies of these so that the &'s don't force the real ones into memory. */
- YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
-#ifdef YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
-#endif
-
- /* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
-#ifdef YYLSP_NEEDED
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
-#else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
-#endif
-
- yyss = yyss1; yyvs = yyvs1;
-#ifdef YYLSP_NEEDED
- yyls = yyls1;
-#endif
-#else /* no yyoverflow */
- /* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- {
- yyerror("parser stack overflow");
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 2;
- }
- yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
- yystacksize = YYMAXDEPTH;
-#ifndef YYSTACK_USE_ALLOCA
- yyfree_stacks = 1;
-#endif
- yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1,
- size * (unsigned int) sizeof (*yyssp));
- yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1,
- size * (unsigned int) sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1,
- size * (unsigned int) sizeof (*yylsp));
-#endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
-#ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
-
- if (yyssp >= yyss + yystacksize - 1)
- YYABORT;
- }
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
-#endif
-
- goto yybackup;
- yybackup:
-
-/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
-/* yyresume: */
-
- /* First try to decide what to do without reference to lookahead token. */
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
-
- if (yychar == YYEMPTY)
- {
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
-#endif
- yychar = YYLEX;
- }
-
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
- {
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
-#endif
- }
- else
- {
- yychar1 = YYTRANSLATE(yychar);
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise meaning
- of a token, for further debugging info. */
-#ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
-#endif
- fprintf (stderr, ")\n");
- }
-#endif
- }
-
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
- goto yydefault;
-
- yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrlab;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Shift the lookahead token. */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
-#endif
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
-
- yystate = yyn;
- goto yynewstate;
-
-/* Do the default action for the current state. */
-yydefault:
-
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
-
-/* Do a reduction. yyn is the number of a rule to reduce with. */
-yyreduce:
- yylen = yyr2[yyn];
- if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- int i;
-
- fprintf (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
-
- /* Print the symbols being reduced, and their result. */
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
-#endif
-
-
- switch (yyn) {
-
-case 3:
-#line 235 "c-exp.y"
-{ write_exp_elt_opcode(OP_TYPE);
- write_exp_elt_type(yyvsp[0].tval);
- write_exp_elt_opcode(OP_TYPE);;
- break;}
-case 5:
-#line 243 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_COMMA); ;
- break;}
-case 6:
-#line 248 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_IND); ;
- break;}
-case 7:
-#line 251 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_ADDR); ;
- break;}
-case 8:
-#line 254 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_NEG); ;
- break;}
-case 9:
-#line 258 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_LOGICAL_NOT); ;
- break;}
-case 10:
-#line 262 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_COMPLEMENT); ;
- break;}
-case 11:
-#line 266 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_PREINCREMENT); ;
- break;}
-case 12:
-#line 270 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_PREDECREMENT); ;
- break;}
-case 13:
-#line 274 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_POSTINCREMENT); ;
- break;}
-case 14:
-#line 278 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_POSTDECREMENT); ;
- break;}
-case 15:
-#line 282 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_SIZEOF); ;
- break;}
-case 16:
-#line 286 "c-exp.y"
-{ write_exp_elt_opcode (STRUCTOP_PTR);
- write_exp_string (yyvsp[0].sval);
- write_exp_elt_opcode (STRUCTOP_PTR); ;
- break;}
-case 17:
-#line 292 "c-exp.y"
-{ /* exp->type::name becomes exp->*(&type::name) */
- /* Note: this doesn't work if name is a
- static member! FIXME */
- write_exp_elt_opcode (UNOP_ADDR);
- write_exp_elt_opcode (STRUCTOP_MPTR); ;
- break;}
-case 18:
-#line 300 "c-exp.y"
-{ write_exp_elt_opcode (STRUCTOP_MPTR); ;
- break;}
-case 19:
-#line 304 "c-exp.y"
-{ write_exp_elt_opcode (STRUCTOP_STRUCT);
- write_exp_string (yyvsp[0].sval);
- write_exp_elt_opcode (STRUCTOP_STRUCT); ;
- break;}
-case 20:
-#line 310 "c-exp.y"
-{ /* exp.type::name becomes exp.*(&type::name) */
- /* Note: this doesn't work if name is a
- static member! FIXME */
- write_exp_elt_opcode (UNOP_ADDR);
- write_exp_elt_opcode (STRUCTOP_MEMBER); ;
- break;}
-case 21:
-#line 318 "c-exp.y"
-{ write_exp_elt_opcode (STRUCTOP_MEMBER); ;
- break;}
-case 22:
-#line 322 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_SUBSCRIPT); ;
- break;}
-case 23:
-#line 328 "c-exp.y"
-{ start_arglist (); ;
- break;}
-case 24:
-#line 330 "c-exp.y"
-{ write_exp_elt_opcode (OP_FUNCALL);
- write_exp_elt_longcst ((LONGEST) end_arglist ());
- write_exp_elt_opcode (OP_FUNCALL); ;
- break;}
-case 25:
-#line 336 "c-exp.y"
-{ start_arglist (); ;
- break;}
-case 27:
-#line 343 "c-exp.y"
-{ arglist_len = 1; ;
- break;}
-case 28:
-#line 347 "c-exp.y"
-{ arglist_len++; ;
- break;}
-case 29:
-#line 351 "c-exp.y"
-{ yyval.lval = end_arglist () - 1; ;
- break;}
-case 30:
-#line 354 "c-exp.y"
-{ write_exp_elt_opcode (OP_ARRAY);
- write_exp_elt_longcst ((LONGEST) 0);
- write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
- write_exp_elt_opcode (OP_ARRAY); ;
- break;}
-case 31:
-#line 361 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_MEMVAL);
- write_exp_elt_type (yyvsp[-2].tval);
- write_exp_elt_opcode (UNOP_MEMVAL); ;
- break;}
-case 32:
-#line 367 "c-exp.y"
-{ write_exp_elt_opcode (UNOP_CAST);
- write_exp_elt_type (yyvsp[-2].tval);
- write_exp_elt_opcode (UNOP_CAST); ;
- break;}
-case 33:
-#line 373 "c-exp.y"
-{ ;
- break;}
-case 34:
-#line 379 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_REPEAT); ;
- break;}
-case 35:
-#line 383 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_MUL); ;
- break;}
-case 36:
-#line 387 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_DIV); ;
- break;}
-case 37:
-#line 391 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_REM); ;
- break;}
-case 38:
-#line 395 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_ADD); ;
- break;}
-case 39:
-#line 399 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_SUB); ;
- break;}
-case 40:
-#line 403 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_LSH); ;
- break;}
-case 41:
-#line 407 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_RSH); ;
- break;}
-case 42:
-#line 411 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_EQUAL); ;
- break;}
-case 43:
-#line 415 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_NOTEQUAL); ;
- break;}
-case 44:
-#line 419 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_LEQ); ;
- break;}
-case 45:
-#line 423 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_GEQ); ;
- break;}
-case 46:
-#line 427 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_LESS); ;
- break;}
-case 47:
-#line 431 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_GTR); ;
- break;}
-case 48:
-#line 435 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_AND); ;
- break;}
-case 49:
-#line 439 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_XOR); ;
- break;}
-case 50:
-#line 443 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_IOR); ;
- break;}
-case 51:
-#line 447 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_LOGICAL_AND); ;
- break;}
-case 52:
-#line 451 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_LOGICAL_OR); ;
- break;}
-case 53:
-#line 455 "c-exp.y"
-{ write_exp_elt_opcode (TERNOP_COND); ;
- break;}
-case 54:
-#line 459 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_ASSIGN); ;
- break;}
-case 55:
-#line 463 "c-exp.y"
-{ write_exp_elt_opcode (BINOP_ASSIGN_MODIFY);
- write_exp_elt_opcode (yyvsp[-1].opcode);
- write_exp_elt_opcode (BINOP_ASSIGN_MODIFY); ;
- break;}
-case 56:
-#line 469 "c-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (yyvsp[0].typed_val_int.type);
- write_exp_elt_longcst ((LONGEST)(yyvsp[0].typed_val_int.val));
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 57:
-#line 476 "c-exp.y"
-{ YYSTYPE val;
- parse_number (yyvsp[0].ssym.stoken.ptr, yyvsp[0].ssym.stoken.length, 0, &val);
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (val.typed_val_int.type);
- write_exp_elt_longcst ((LONGEST)val.typed_val_int.val);
- write_exp_elt_opcode (OP_LONG);
- ;
- break;}
-case 58:
-#line 487 "c-exp.y"
-{ write_exp_elt_opcode (OP_DOUBLE);
- write_exp_elt_type (yyvsp[0].typed_val_float.type);
- write_exp_elt_dblcst (yyvsp[0].typed_val_float.dval);
- write_exp_elt_opcode (OP_DOUBLE); ;
- break;}
-case 61:
-#line 501 "c-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_int);
- CHECK_TYPEDEF (yyvsp[-1].tval);
- write_exp_elt_longcst ((LONGEST) TYPE_LENGTH (yyvsp[-1].tval));
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 62:
-#line 509 "c-exp.y"
-{ /* C strings are converted into array constants with
- an explicit null byte added at the end. Thus
- the array upper bound is the string length.
- There is no such thing in C as a completely empty
- string. */
- char *sp = yyvsp[0].sval.ptr; int count = yyvsp[0].sval.length;
- while (count-- > 0)
- {
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_char);
- write_exp_elt_longcst ((LONGEST)(*sp++));
- write_exp_elt_opcode (OP_LONG);
- }
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_char);
- write_exp_elt_longcst ((LONGEST)'\0');
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_opcode (OP_ARRAY);
- write_exp_elt_longcst ((LONGEST) 0);
- write_exp_elt_longcst ((LONGEST) (yyvsp[0].sval.length));
- write_exp_elt_opcode (OP_ARRAY); ;
- break;}
-case 63:
-#line 534 "c-exp.y"
-{ write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS); ;
- break;}
-case 64:
-#line 539 "c-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_bool);
- write_exp_elt_longcst ((LONGEST) 1);
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 65:
-#line 546 "c-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_bool);
- write_exp_elt_longcst ((LONGEST) 0);
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 66:
-#line 555 "c-exp.y"
-{
- if (yyvsp[0].ssym.sym)
- yyval.bval = SYMBOL_BLOCK_VALUE (yyvsp[0].ssym.sym);
- else
- error ("No file or function \"%s\".",
- copy_name (yyvsp[0].ssym.stoken));
- ;
- break;}
-case 67:
-#line 563 "c-exp.y"
-{
- yyval.bval = yyvsp[0].bval;
- ;
- break;}
-case 68:
-#line 569 "c-exp.y"
-{ struct symbol *tem
- = lookup_symbol (copy_name (yyvsp[0].sval), yyvsp[-2].bval,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL);
- if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
- error ("No function \"%s\" in specified context.",
- copy_name (yyvsp[0].sval));
- yyval.bval = SYMBOL_BLOCK_VALUE (tem); ;
- break;}
-case 69:
-#line 580 "c-exp.y"
-{ struct symbol *sym;
- sym = lookup_symbol (copy_name (yyvsp[0].sval), yyvsp[-2].bval,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL);
- if (sym == 0)
- error ("No symbol \"%s\" in specified context.",
- copy_name (yyvsp[0].sval));
-
- write_exp_elt_opcode (OP_VAR_VALUE);
- /* block_found is set by lookup_symbol. */
- write_exp_elt_block (block_found);
- write_exp_elt_sym (sym);
- write_exp_elt_opcode (OP_VAR_VALUE); ;
- break;}
-case 70:
-#line 596 "c-exp.y"
-{
- struct type *type = yyvsp[-2].tval;
- if (TYPE_CODE (type) != TYPE_CODE_STRUCT
- && TYPE_CODE (type) != TYPE_CODE_UNION)
- error ("`%s' is not defined as an aggregate type.",
- TYPE_NAME (type));
-
- write_exp_elt_opcode (OP_SCOPE);
- write_exp_elt_type (type);
- write_exp_string (yyvsp[0].sval);
- write_exp_elt_opcode (OP_SCOPE);
- ;
- break;}
-case 71:
-#line 609 "c-exp.y"
-{
- struct type *type = yyvsp[-3].tval;
- struct stoken tmp_token;
- if (TYPE_CODE (type) != TYPE_CODE_STRUCT
- && TYPE_CODE (type) != TYPE_CODE_UNION)
- error ("`%s' is not defined as an aggregate type.",
- TYPE_NAME (type));
-
- tmp_token.ptr = (char*) alloca (yyvsp[0].sval.length + 2);
- tmp_token.length = yyvsp[0].sval.length + 1;
- tmp_token.ptr[0] = '~';
- memcpy (tmp_token.ptr+1, yyvsp[0].sval.ptr, yyvsp[0].sval.length);
- tmp_token.ptr[tmp_token.length] = 0;
-
- /* Check for valid destructor name. */
- destructor_name_p (tmp_token.ptr, type);
- write_exp_elt_opcode (OP_SCOPE);
- write_exp_elt_type (type);
- write_exp_string (tmp_token);
- write_exp_elt_opcode (OP_SCOPE);
- ;
- break;}
-case 73:
-#line 634 "c-exp.y"
-{
- char *name = copy_name (yyvsp[0].sval);
- struct symbol *sym;
- struct minimal_symbol *msymbol;
-
- sym =
- lookup_symbol (name, (const struct block *) NULL,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL);
- if (sym)
- {
- write_exp_elt_opcode (OP_VAR_VALUE);
- write_exp_elt_block (NULL);
- write_exp_elt_sym (sym);
- write_exp_elt_opcode (OP_VAR_VALUE);
- break;
- }
-
- msymbol = lookup_minimal_symbol (name, NULL, NULL);
- if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
- else
- if (!have_full_symbols () && !have_partial_symbols ())
- error ("No symbol table is loaded. Use the \"file\" command.");
- else
- error ("No symbol \"%s\" in current context.", name);
- ;
- break;}
-case 74:
-#line 668 "c-exp.y"
-{ struct symbol *sym = yyvsp[0].ssym.sym;
-
- if (sym)
- {
- if (symbol_read_needs_frame (sym))
- {
- if (innermost_block == 0 ||
- contained_in (block_found,
- innermost_block))
- innermost_block = block_found;
- }
-
- write_exp_elt_opcode (OP_VAR_VALUE);
- /* We want to use the selected frame, not
- another more inner frame which happens to
- be in the same block. */
- write_exp_elt_block (NULL);
- write_exp_elt_sym (sym);
- write_exp_elt_opcode (OP_VAR_VALUE);
- }
- else if (yyvsp[0].ssym.is_a_field_of_this)
- {
- /* C++: it hangs off of `this'. Must
- not inadvertently convert from a method call
- to data ref. */
- if (innermost_block == 0 ||
- contained_in (block_found, innermost_block))
- innermost_block = block_found;
- write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (STRUCTOP_PTR);
- write_exp_string (yyvsp[0].ssym.stoken);
- write_exp_elt_opcode (STRUCTOP_PTR);
- }
- else
- {
- struct minimal_symbol *msymbol;
- register char *arg = copy_name (yyvsp[0].ssym.stoken);
-
- msymbol =
- lookup_minimal_symbol (arg, NULL, NULL);
- if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
- else if (!have_full_symbols () && !have_partial_symbols ())
- error ("No symbol table is loaded. Use the \"file\" command.");
- else
- error ("No symbol \"%s\" in current context.",
- copy_name (yyvsp[0].ssym.stoken));
- }
- ;
- break;}
-case 78:
-#line 734 "c-exp.y"
-{ yyval.tval = follow_types (yyvsp[-1].tval); ;
- break;}
-case 79:
-#line 736 "c-exp.y"
-{ yyval.tval = follow_types (yyvsp[-2].tval); ;
- break;}
-case 80:
-#line 738 "c-exp.y"
-{ yyval.tval = follow_types (yyvsp[-2].tval); ;
- break;}
-case 81:
-#line 742 "c-exp.y"
-{ push_type (tp_pointer); yyval.voidval = 0; ;
- break;}
-case 82:
-#line 744 "c-exp.y"
-{ push_type (tp_pointer); yyval.voidval = yyvsp[0].voidval; ;
- break;}
-case 83:
-#line 746 "c-exp.y"
-{ push_type (tp_reference); yyval.voidval = 0; ;
- break;}
-case 84:
-#line 748 "c-exp.y"
-{ push_type (tp_reference); yyval.voidval = yyvsp[0].voidval; ;
- break;}
-case 86:
-#line 753 "c-exp.y"
-{ yyval.voidval = yyvsp[-1].voidval; ;
- break;}
-case 87:
-#line 755 "c-exp.y"
-{
- push_type_int (yyvsp[0].lval);
- push_type (tp_array);
- ;
- break;}
-case 88:
-#line 760 "c-exp.y"
-{
- push_type_int (yyvsp[0].lval);
- push_type (tp_array);
- yyval.voidval = 0;
- ;
- break;}
-case 89:
-#line 767 "c-exp.y"
-{ push_type (tp_function); ;
- break;}
-case 90:
-#line 769 "c-exp.y"
-{ push_type (tp_function); ;
- break;}
-case 91:
-#line 773 "c-exp.y"
-{ yyval.lval = -1; ;
- break;}
-case 92:
-#line 775 "c-exp.y"
-{ yyval.lval = yyvsp[-1].typed_val_int.val; ;
- break;}
-case 93:
-#line 779 "c-exp.y"
-{ yyval.voidval = 0; ;
- break;}
-case 94:
-#line 781 "c-exp.y"
-{ free ((PTR)yyvsp[-1].tvec); yyval.voidval = 0; ;
- break;}
-case 96:
-#line 794 "c-exp.y"
-{ yyval.tval = lookup_member_type (builtin_type_int, yyvsp[-2].tval); ;
- break;}
-case 97:
-#line 799 "c-exp.y"
-{ yyval.tval = yyvsp[0].tsym.type; ;
- break;}
-case 98:
-#line 801 "c-exp.y"
-{ yyval.tval = builtin_type_int; ;
- break;}
-case 99:
-#line 803 "c-exp.y"
-{ yyval.tval = builtin_type_long; ;
- break;}
-case 100:
-#line 805 "c-exp.y"
-{ yyval.tval = builtin_type_short; ;
- break;}
-case 101:
-#line 807 "c-exp.y"
-{ yyval.tval = builtin_type_long; ;
- break;}
-case 102:
-#line 809 "c-exp.y"
-{ yyval.tval = builtin_type_unsigned_long; ;
- break;}
-case 103:
-#line 811 "c-exp.y"
-{ yyval.tval = builtin_type_long_long; ;
- break;}
-case 104:
-#line 813 "c-exp.y"
-{ yyval.tval = builtin_type_long_long; ;
- break;}
-case 105:
-#line 815 "c-exp.y"
-{ yyval.tval = builtin_type_unsigned_long_long; ;
- break;}
-case 106:
-#line 817 "c-exp.y"
-{ yyval.tval = builtin_type_unsigned_long_long; ;
- break;}
-case 107:
-#line 819 "c-exp.y"
-{ yyval.tval = builtin_type_short; ;
- break;}
-case 108:
-#line 821 "c-exp.y"
-{ yyval.tval = builtin_type_unsigned_short; ;
- break;}
-case 109:
-#line 823 "c-exp.y"
-{ yyval.tval = builtin_type_double; ;
- break;}
-case 110:
-#line 825 "c-exp.y"
-{ yyval.tval = builtin_type_long_double; ;
- break;}
-case 111:
-#line 827 "c-exp.y"
-{ yyval.tval = lookup_struct (copy_name (yyvsp[0].sval),
- expression_context_block); ;
- break;}
-case 112:
-#line 830 "c-exp.y"
-{ yyval.tval = lookup_struct (copy_name (yyvsp[0].sval),
- expression_context_block); ;
- break;}
-case 113:
-#line 833 "c-exp.y"
-{ yyval.tval = lookup_union (copy_name (yyvsp[0].sval),
- expression_context_block); ;
- break;}
-case 114:
-#line 836 "c-exp.y"
-{ yyval.tval = lookup_enum (copy_name (yyvsp[0].sval),
- expression_context_block); ;
- break;}
-case 115:
-#line 839 "c-exp.y"
-{ yyval.tval = lookup_unsigned_typename (TYPE_NAME(yyvsp[0].tsym.type)); ;
- break;}
-case 116:
-#line 841 "c-exp.y"
-{ yyval.tval = builtin_type_unsigned_int; ;
- break;}
-case 117:
-#line 843 "c-exp.y"
-{ yyval.tval = lookup_signed_typename (TYPE_NAME(yyvsp[0].tsym.type)); ;
- break;}
-case 118:
-#line 845 "c-exp.y"
-{ yyval.tval = builtin_type_int; ;
- break;}
-case 119:
-#line 850 "c-exp.y"
-{ yyval.tval = lookup_template_type(copy_name(yyvsp[-3].sval), yyvsp[-1].tval,
- expression_context_block);
- ;
- break;}
-case 120:
-#line 856 "c-exp.y"
-{ yyval.tval = yyvsp[0].tval; ;
- break;}
-case 121:
-#line 857 "c-exp.y"
-{ yyval.tval = yyvsp[0].tval; ;
- break;}
-case 123:
-#line 862 "c-exp.y"
-{
- yyval.tsym.stoken.ptr = "int";
- yyval.tsym.stoken.length = 3;
- yyval.tsym.type = builtin_type_int;
- ;
- break;}
-case 124:
-#line 868 "c-exp.y"
-{
- yyval.tsym.stoken.ptr = "long";
- yyval.tsym.stoken.length = 4;
- yyval.tsym.type = builtin_type_long;
- ;
- break;}
-case 125:
-#line 874 "c-exp.y"
-{
- yyval.tsym.stoken.ptr = "short";
- yyval.tsym.stoken.length = 5;
- yyval.tsym.type = builtin_type_short;
- ;
- break;}
-case 126:
-#line 883 "c-exp.y"
-{ yyval.tvec = (struct type **) xmalloc (sizeof (struct type *) * 2);
- yyval.ivec[0] = 1; /* Number of types in vector */
- yyval.tvec[1] = yyvsp[0].tval;
- ;
- break;}
-case 127:
-#line 888 "c-exp.y"
-{ int len = sizeof (struct type *) * (++(yyvsp[-2].ivec[0]) + 1);
- yyval.tvec = (struct type **) xrealloc ((char *) yyvsp[-2].tvec, len);
- yyval.tvec[yyval.ivec[0]] = yyvsp[0].tval;
- ;
- break;}
-case 128:
-#line 894 "c-exp.y"
-{ yyval.sval = yyvsp[0].ssym.stoken; ;
- break;}
-case 129:
-#line 895 "c-exp.y"
-{ yyval.sval = yyvsp[0].ssym.stoken; ;
- break;}
-case 130:
-#line 896 "c-exp.y"
-{ yyval.sval = yyvsp[0].tsym.stoken; ;
- break;}
-case 131:
-#line 897 "c-exp.y"
-{ yyval.sval = yyvsp[0].ssym.stoken; ;
- break;}
-}
- /* the action file gets copied in in place of this dollarsign */
-#line 542 "/usr/lib/bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-#ifdef YYLSP_NEEDED
- yylsp -= yylen;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
- *++yyvsp = yyval;
-
-#ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
-#endif
-
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTBASE];
-
- goto yynewstate;
-
-yyerrlab: /* here on detecting error */
-
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
- {
- ++yynerrs;
-
-#ifdef YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (yyn > YYFLAG && yyn < YYLAST)
- {
- int size = 0;
- char *msg;
- int x, count;
-
- count = 0;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) xmalloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
-
- if (count < 5)
- {
- count = 0;
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- {
- strcat(msg, count == 0 ? ", expecting `" : " or `");
- strcat(msg, yytname[x]);
- strcat(msg, "'");
- count++;
- }
- }
- yyerror(msg);
- free(msg);
- }
- else
- yyerror ("parse error; also virtual memory exceeded");
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror("parse error");
- }
-
- goto yyerrlab1;
-yyerrlab1: /* here on error raised explicitly by an action */
-
- if (yyerrstatus == 3)
- {
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
-
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
-
- yychar = YYEMPTY;
- }
-
- /* Else will try to reuse lookahead token
- after shifting the error token. */
-
- yyerrstatus = 3; /* Each real token shifted decrements this */
-
- goto yyerrhandle;
-
-yyerrdefault: /* current state does not do anything special for the error token. */
-
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
-#endif
-
-yyerrpop: /* pop the current state because it cannot handle the error token */
-
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
-#ifdef YYLSP_NEEDED
- yylsp--;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
-yyerrhandle:
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
-
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
-
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrpop;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
-#endif
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- yystate = yyn;
- goto yynewstate;
-
- yyacceptlab:
- /* YYACCEPT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 0;
-
- yyabortlab:
- /* YYABORT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 1;
-}
-#line 911 "c-exp.y"
-
-
-/* Take care of parsing a number (anything that starts with a digit).
- Set yylval and return the token type; update lexptr.
- LEN is the number of characters in it. */
-
-/*** Needs some error checking for the float case ***/
-
-static int
-parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
- int parsed_float;
- YYSTYPE *putithere;
-{
- /* FIXME: Shouldn't these be unsigned? We don't deal with negative values
- here, and we do kind of silly things like cast to unsigned. */
- register LONGEST n = 0;
- register LONGEST prevn = 0;
- ULONGEST un;
-
- register int i = 0;
- register int c;
- register int base = input_radix;
- int unsigned_p = 0;
-
- /* Number of "L" suffixes encountered. */
- int long_p = 0;
-
- /* We have found a "L" or "U" suffix. */
- int found_suffix = 0;
-
- ULONGEST high_bit;
- struct type *signed_type;
- struct type *unsigned_type;
-
- if (parsed_float)
- {
- /* It's a float since it contains a point or an exponent. */
- char c;
- int num = 0; /* number of tokens scanned by scanf */
- char saved_char = p[len];
-
- p[len] = 0; /* null-terminate the token */
- if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval,&c);
- else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval,&c);
- else
- {
-#ifdef SCANF_HAS_LONG_DOUBLE
- num = sscanf (p, "%Lg%c", &putithere->typed_val_float.dval,&c);
-#else
- /* Scan it into a double, then assign it to the long double.
- This at least wins with values representable in the range
- of doubles. */
- double temp;
- num = sscanf (p, "%lg%c", &temp,&c);
- putithere->typed_val_float.dval = temp;
-#endif
- }
- p[len] = saved_char; /* restore the input stream */
- if (num != 1) /* check scanf found ONLY a float ... */
- return ERROR;
- /* See if it has `f' or `l' suffix (float or long double). */
-
- c = tolower (p[len - 1]);
-
- if (c == 'f')
- putithere->typed_val_float.type = builtin_type_float;
- else if (c == 'l')
- putithere->typed_val_float.type = builtin_type_long_double;
- else if (isdigit (c) || c == '.')
- putithere->typed_val_float.type = builtin_type_double;
- else
- return ERROR;
-
- return FLOAT;
- }
-
- /* Handle base-switching prefixes 0x, 0t, 0d, 0 */
- if (p[0] == '0')
- switch (p[1])
- {
- case 'x':
- case 'X':
- if (len >= 3)
- {
- p += 2;
- base = 16;
- len -= 2;
- }
- break;
-
- case 't':
- case 'T':
- case 'd':
- case 'D':
- if (len >= 3)
- {
- p += 2;
- base = 10;
- len -= 2;
- }
- break;
-
- default:
- base = 8;
- break;
- }
-
- while (len-- > 0)
- {
- c = *p++;
- if (c >= 'A' && c <= 'Z')
- c += 'a' - 'A';
- if (c != 'l' && c != 'u')
- n *= base;
- if (c >= '0' && c <= '9')
- {
- if (found_suffix)
- return ERROR;
- n += i = c - '0';
- }
- else
- {
- if (base > 10 && c >= 'a' && c <= 'f')
- {
- if (found_suffix)
- return ERROR;
- n += i = c - 'a' + 10;
- }
- else if (c == 'l')
- {
- ++long_p;
- found_suffix = 1;
- }
- else if (c == 'u')
- {
- unsigned_p = 1;
- found_suffix = 1;
- }
- else
- return ERROR; /* Char not a digit */
- }
- if (i >= base)
- return ERROR; /* Invalid digit in this base */
-
- /* Portably test for overflow (only works for nonzero values, so make
- a second check for zero). FIXME: Can't we just make n and prevn
- unsigned and avoid this? */
- if (c != 'l' && c != 'u' && (prevn >= n) && n != 0)
- unsigned_p = 1; /* Try something unsigned */
-
- /* Portably test for unsigned overflow.
- FIXME: This check is wrong; for example it doesn't find overflow
- on 0x123456789 when LONGEST is 32 bits. */
- if (c != 'l' && c != 'u' && n != 0)
- {
- if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n))
- error ("Numeric constant too large.");
- }
- prevn = n;
- }
-
- /* An integer constant is an int, a long, or a long long. An L
- suffix forces it to be long; an LL suffix forces it to be long
- long. If not forced to a larger size, it gets the first type of
- the above that it fits in. To figure out whether it fits, we
- shift it right and see whether anything remains. Note that we
- can't shift sizeof (LONGEST) * HOST_CHAR_BIT bits or more in one
- operation, because many compilers will warn about such a shift
- (which always produces a zero result). Sometimes TARGET_INT_BIT
- or TARGET_LONG_BIT will be that big, sometimes not. To deal with
- the case where it is we just always shift the value more than
- once, with fewer bits each time. */
-
- un = (ULONGEST)n >> 2;
- if (long_p == 0
- && (un >> (TARGET_INT_BIT - 2)) == 0)
- {
- high_bit = ((ULONGEST)1) << (TARGET_INT_BIT-1);
-
- /* A large decimal (not hex or octal) constant (between INT_MAX
- and UINT_MAX) is a long or unsigned long, according to ANSI,
- never an unsigned int, but this code treats it as unsigned
- int. This probably should be fixed. GCC gives a warning on
- such constants. */
-
- unsigned_type = builtin_type_unsigned_int;
- signed_type = builtin_type_int;
- }
- else if (long_p <= 1
- && (un >> (TARGET_LONG_BIT - 2)) == 0)
- {
- high_bit = ((ULONGEST)1) << (TARGET_LONG_BIT-1);
- unsigned_type = builtin_type_unsigned_long;
- signed_type = builtin_type_long;
- }
- else
- {
- int shift;
- if (sizeof (ULONGEST) * HOST_CHAR_BIT < TARGET_LONG_LONG_BIT)
- /* A long long does not fit in a LONGEST. */
- shift = (sizeof (ULONGEST) * HOST_CHAR_BIT - 1);
- else
- shift = (TARGET_LONG_LONG_BIT - 1);
- high_bit = (ULONGEST) 1 << shift;
- unsigned_type = builtin_type_unsigned_long_long;
- signed_type = builtin_type_long_long;
- }
-
- putithere->typed_val_int.val = n;
-
- /* If the high bit of the worked out type is set then this number
- has to be unsigned. */
-
- if (unsigned_p || (n & high_bit))
- {
- putithere->typed_val_int.type = unsigned_type;
- }
- else
- {
- putithere->typed_val_int.type = signed_type;
- }
-
- return INT;
-}
-
-struct token
-{
- char *operator;
- int token;
- enum exp_opcode opcode;
-};
-
-static const struct token tokentab3[] =
- {
- {">>=", ASSIGN_MODIFY, BINOP_RSH},
- {"<<=", ASSIGN_MODIFY, BINOP_LSH}
- };
-
-static const struct token tokentab2[] =
- {
- {"+=", ASSIGN_MODIFY, BINOP_ADD},
- {"-=", ASSIGN_MODIFY, BINOP_SUB},
- {"*=", ASSIGN_MODIFY, BINOP_MUL},
- {"/=", ASSIGN_MODIFY, BINOP_DIV},
- {"%=", ASSIGN_MODIFY, BINOP_REM},
- {"|=", ASSIGN_MODIFY, BINOP_BITWISE_IOR},
- {"&=", ASSIGN_MODIFY, BINOP_BITWISE_AND},
- {"^=", ASSIGN_MODIFY, BINOP_BITWISE_XOR},
- {"++", INCREMENT, BINOP_END},
- {"--", DECREMENT, BINOP_END},
- {"->", ARROW, BINOP_END},
- {"&&", ANDAND, BINOP_END},
- {"||", OROR, BINOP_END},
- {"::", COLONCOLON, BINOP_END},
- {"<<", LSH, BINOP_END},
- {">>", RSH, BINOP_END},
- {"==", EQUAL, BINOP_END},
- {"!=", NOTEQUAL, BINOP_END},
- {"<=", LEQ, BINOP_END},
- {">=", GEQ, BINOP_END}
- };
-
-/* Read one token, getting characters through lexptr. */
-
-static int
-yylex ()
-{
- int c;
- int namelen;
- unsigned int i;
- char *tokstart;
- char *tokptr;
- int tempbufindex;
- static char *tempbuf;
- static int tempbufsize;
- struct symbol * sym_class = NULL;
- char * token_string = NULL;
- int class_prefix = 0;
- int unquoted_expr;
-
- retry:
-
- unquoted_expr = 1;
-
- tokstart = lexptr;
- /* See if it is a special token of length 3. */
- for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
- if (STREQN (tokstart, tokentab3[i].operator, 3))
- {
- lexptr += 3;
- yylval.opcode = tokentab3[i].opcode;
- return tokentab3[i].token;
- }
-
- /* See if it is a special token of length 2. */
- for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
- if (STREQN (tokstart, tokentab2[i].operator, 2))
- {
- lexptr += 2;
- yylval.opcode = tokentab2[i].opcode;
- return tokentab2[i].token;
- }
-
- switch (c = *tokstart)
- {
- case 0:
- return 0;
-
- case ' ':
- case '\t':
- case '\n':
- lexptr++;
- goto retry;
-
- case '\'':
- /* We either have a character constant ('0' or '\177' for example)
- or we have a quoted symbol reference ('foo(int,int)' in C++
- for example). */
- lexptr++;
- c = *lexptr++;
- if (c == '\\')
- c = parse_escape (&lexptr);
- else if (c == '\'')
- error ("Empty character constant.");
-
- yylval.typed_val_int.val = c;
- yylval.typed_val_int.type = builtin_type_char;
-
- c = *lexptr++;
- if (c != '\'')
- {
- namelen = skip_quoted (tokstart) - tokstart;
- if (namelen > 2)
- {
- lexptr = tokstart + namelen;
- unquoted_expr = 0;
- if (lexptr[-1] != '\'')
- error ("Unmatched single quote.");
- namelen -= 2;
- tokstart++;
- goto tryname;
- }
- error ("Invalid character constant.");
- }
- return INT;
-
- case '(':
- paren_depth++;
- lexptr++;
- return c;
-
- case ')':
- if (paren_depth == 0)
- return 0;
- paren_depth--;
- lexptr++;
- return c;
-
- case ',':
- if (comma_terminates && paren_depth == 0)
- return 0;
- lexptr++;
- return c;
-
- case '.':
- /* Might be a floating point number. */
- if (lexptr[1] < '0' || lexptr[1] > '9')
- goto symbol; /* Nope, must be a symbol. */
- /* FALL THRU into number case. */
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- /* It's a number. */
- int got_dot = 0, got_e = 0, toktype;
- register char *p = tokstart;
- int hex = input_radix > 10;
-
- if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
- {
- p += 2;
- hex = 1;
- }
- else if (c == '0' && (p[1]=='t' || p[1]=='T' || p[1]=='d' || p[1]=='D'))
- {
- p += 2;
- hex = 0;
- }
-
- for (;; ++p)
- {
- /* This test includes !hex because 'e' is a valid hex digit
- and thus does not indicate a floating point number when
- the radix is hex. */
- if (!hex && !got_e && (*p == 'e' || *p == 'E'))
- got_dot = got_e = 1;
- /* This test does not include !hex, because a '.' always indicates
- a decimal floating point number regardless of the radix. */
- else if (!got_dot && *p == '.')
- got_dot = 1;
- else if (got_e && (p[-1] == 'e' || p[-1] == 'E')
- && (*p == '-' || *p == '+'))
- /* This is the sign of the exponent, not the end of the
- number. */
- continue;
- /* We will take any letters or digits. parse_number will
- complain if past the radix, or if L or U are not final. */
- else if ((*p < '0' || *p > '9')
- && ((*p < 'a' || *p > 'z')
- && (*p < 'A' || *p > 'Z')))
- break;
- }
- toktype = parse_number (tokstart, p - tokstart, got_dot|got_e, &yylval);
- if (toktype == ERROR)
- {
- char *err_copy = (char *) alloca (p - tokstart + 1);
-
- memcpy (err_copy, tokstart, p - tokstart);
- err_copy[p - tokstart] = 0;
- error ("Invalid number \"%s\".", err_copy);
- }
- lexptr = p;
- return toktype;
- }
-
- case '+':
- case '-':
- case '*':
- case '/':
- case '%':
- case '|':
- case '&':
- case '^':
- case '~':
- case '!':
- case '@':
- case '<':
- case '>':
- case '[':
- case ']':
- case '?':
- case ':':
- case '=':
- case '{':
- case '}':
- symbol:
- lexptr++;
- return c;
-
- case '"':
-
- /* Build the gdb internal form of the input string in tempbuf,
- translating any standard C escape forms seen. Note that the
- buffer is null byte terminated *only* for the convenience of
- debugging gdb itself and printing the buffer contents when
- the buffer contains no embedded nulls. Gdb does not depend
- upon the buffer being null byte terminated, it uses the length
- string instead. This allows gdb to handle C strings (as well
- as strings in other languages) with embedded null bytes */
-
- tokptr = ++tokstart;
- tempbufindex = 0;
-
- do {
- /* Grow the static temp buffer if necessary, including allocating
- the first one on demand. */
- if (tempbufindex + 1 >= tempbufsize)
- {
- tempbuf = (char *) xrealloc (tempbuf, tempbufsize += 64);
- }
- switch (*tokptr)
- {
- case '\0':
- case '"':
- /* Do nothing, loop will terminate. */
- break;
- case '\\':
- tokptr++;
- c = parse_escape (&tokptr);
- if (c == -1)
- {
- continue;
- }
- tempbuf[tempbufindex++] = c;
- break;
- default:
- tempbuf[tempbufindex++] = *tokptr++;
- break;
- }
- } while ((*tokptr != '"') && (*tokptr != '\0'));
- if (*tokptr++ != '"')
- {
- error ("Unterminated string in expression.");
- }
- tempbuf[tempbufindex] = '\0'; /* See note above */
- yylval.sval.ptr = tempbuf;
- yylval.sval.length = tempbufindex;
- lexptr = tokptr;
- return (STRING);
- }
-
- if (!(c == '_' || c == '$'
- || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
- /* We must have come across a bad character (e.g. ';'). */
- error ("Invalid character '%c' in expression.", c);
-
- /* It's a name. See how long it is. */
- namelen = 0;
- for (c = tokstart[namelen];
- (c == '_' || c == '$' || (c >= '0' && c <= '9')
- || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '<');)
- {
- /* Template parameter lists are part of the name.
- FIXME: This mishandles `print $a<4&&$a>3'. */
-
- if (c == '<')
- {
- if (hp_som_som_object_present)
- {
- /* Scan ahead to get rest of the template specification. Note
- that we look ahead only when the '<' adjoins non-whitespace
- characters; for comparison expressions, e.g. "a < b > c",
- there must be spaces before the '<', etc. */
-
- char * p = find_template_name_end (tokstart + namelen);
- if (p)
- namelen = p - tokstart;
- break;
- }
- else
- {
- int i = namelen;
- int nesting_level = 1;
- while (tokstart[++i])
- {
- if (tokstart[i] == '<')
- nesting_level++;
- else if (tokstart[i] == '>')
- {
- if (--nesting_level == 0)
- break;
- }
- }
- if (tokstart[i] == '>')
- namelen = i;
- else
- break;
- }
- }
- c = tokstart[++namelen];
- }
-
- /* The token "if" terminates the expression and is NOT
- removed from the input stream. */
- if (namelen == 2 && tokstart[0] == 'i' && tokstart[1] == 'f')
- {
- return 0;
- }
-
- lexptr += namelen;
-
- tryname:
-
- /* Catch specific keywords. Should be done with a data structure. */
- switch (namelen)
- {
- case 8:
- if (STREQN (tokstart, "unsigned", 8))
- return UNSIGNED;
- if (current_language->la_language == language_cplus
- && STREQN (tokstart, "template", 8))
- return TEMPLATE;
- if (STREQN (tokstart, "volatile", 8))
- return VOLATILE_KEYWORD;
- break;
- case 6:
- if (STREQN (tokstart, "struct", 6))
- return STRUCT;
- if (STREQN (tokstart, "signed", 6))
- return SIGNED_KEYWORD;
- if (STREQN (tokstart, "sizeof", 6))
- return SIZEOF;
- if (STREQN (tokstart, "double", 6))
- return DOUBLE_KEYWORD;
- break;
- case 5:
- if (current_language->la_language == language_cplus)
- {
- if (STREQN (tokstart, "false", 5))
- return FALSEKEYWORD;
- if (STREQN (tokstart, "class", 5))
- return CLASS;
- }
- if (STREQN (tokstart, "union", 5))
- return UNION;
- if (STREQN (tokstart, "short", 5))
- return SHORT;
- if (STREQN (tokstart, "const", 5))
- return CONST_KEYWORD;
- break;
- case 4:
- if (STREQN (tokstart, "enum", 4))
- return ENUM;
- if (STREQN (tokstart, "long", 4))
- return LONG;
- if (current_language->la_language == language_cplus)
- {
- if (STREQN (tokstart, "true", 4))
- return TRUEKEYWORD;
-
- if (STREQN (tokstart, "this", 4))
- {
- static const char this_name[] =
- { CPLUS_MARKER, 't', 'h', 'i', 's', '\0' };
-
- if (lookup_symbol (this_name, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL))
- return THIS;
- }
- }
- break;
- case 3:
- if (STREQN (tokstart, "int", 3))
- return INT_KEYWORD;
- break;
- default:
- break;
- }
-
- yylval.sval.ptr = tokstart;
- yylval.sval.length = namelen;
-
- if (*tokstart == '$')
- {
- write_dollar_variable (yylval.sval);
- return VARIABLE;
- }
-
- /* Look ahead and see if we can consume more of the input
- string to get a reasonable class/namespace spec or a
- fully-qualified name. This is a kludge to get around the
- HP aCC compiler's generation of symbol names with embedded
- colons for namespace and nested classes. */
- if (unquoted_expr)
- {
- /* Only do it if not inside single quotes */
- sym_class = parse_nested_classes_for_hpacc (yylval.sval.ptr, yylval.sval.length,
- &token_string, &class_prefix, &lexptr);
- if (sym_class)
- {
- /* Replace the current token with the bigger one we found */
- yylval.sval.ptr = token_string;
- yylval.sval.length = strlen (token_string);
- }
- }
-
- /* Use token-type BLOCKNAME for symbols that happen to be defined as
- functions or symtabs. If this is not so, then ...
- Use token-type TYPENAME for symbols that happen to be defined
- currently as names of types; NAME for other symbols.
- The caller is not constrained to care about the distinction. */
- {
- char *tmp = copy_name (yylval.sval);
- struct symbol *sym;
- int is_a_field_of_this = 0;
- int hextype;
-
- sym = lookup_symbol (tmp, expression_context_block,
- VAR_NAMESPACE,
- current_language->la_language == language_cplus
- ? &is_a_field_of_this : (int *) NULL,
- (struct symtab **) NULL);
- /* Call lookup_symtab, not lookup_partial_symtab, in case there are
- no psymtabs (coff, xcoff, or some future change to blow away the
- psymtabs once once symbols are read). */
- if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
- {
- yylval.ssym.sym = sym;
- yylval.ssym.is_a_field_of_this = is_a_field_of_this;
- return BLOCKNAME;
- }
- else if (!sym)
- { /* See if it's a file name. */
- struct symtab *symtab;
-
- symtab = lookup_symtab (tmp);
-
- if (symtab)
- {
- yylval.bval = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK);
- return FILENAME;
- }
- }
-
- if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
- {
-#if 1
- /* Despite the following flaw, we need to keep this code enabled.
- Because we can get called from check_stub_method, if we don't
- handle nested types then it screws many operations in any
- program which uses nested types. */
- /* In "A::x", if x is a member function of A and there happens
- to be a type (nested or not, since the stabs don't make that
- distinction) named x, then this code incorrectly thinks we
- are dealing with nested types rather than a member function. */
-
- char *p;
- char *namestart;
- struct symbol *best_sym;
-
- /* Look ahead to detect nested types. This probably should be
- done in the grammar, but trying seemed to introduce a lot
- of shift/reduce and reduce/reduce conflicts. It's possible
- that it could be done, though. Or perhaps a non-grammar, but
- less ad hoc, approach would work well. */
-
- /* Since we do not currently have any way of distinguishing
- a nested type from a non-nested one (the stabs don't tell
- us whether a type is nested), we just ignore the
- containing type. */
-
- p = lexptr;
- best_sym = sym;
- while (1)
- {
- /* Skip whitespace. */
- while (*p == ' ' || *p == '\t' || *p == '\n')
- ++p;
- if (*p == ':' && p[1] == ':')
- {
- /* Skip the `::'. */
- p += 2;
- /* Skip whitespace. */
- while (*p == ' ' || *p == '\t' || *p == '\n')
- ++p;
- namestart = p;
- while (*p == '_' || *p == '$' || (*p >= '0' && *p <= '9')
- || (*p >= 'a' && *p <= 'z')
- || (*p >= 'A' && *p <= 'Z'))
- ++p;
- if (p != namestart)
- {
- struct symbol *cur_sym;
- /* As big as the whole rest of the expression, which is
- at least big enough. */
- char *ncopy = alloca (strlen (tmp)+strlen (namestart)+3);
- char *tmp1;
-
- tmp1 = ncopy;
- memcpy (tmp1, tmp, strlen (tmp));
- tmp1 += strlen (tmp);
- memcpy (tmp1, "::", 2);
- tmp1 += 2;
- memcpy (tmp1, namestart, p - namestart);
- tmp1[p - namestart] = '\0';
- cur_sym = lookup_symbol (ncopy, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL);
- if (cur_sym)
- {
- if (SYMBOL_CLASS (cur_sym) == LOC_TYPEDEF)
- {
- best_sym = cur_sym;
- lexptr = p;
- }
- else
- break;
- }
- else
- break;
- }
- else
- break;
- }
- else
- break;
- }
-
- yylval.tsym.type = SYMBOL_TYPE (best_sym);
-#else /* not 0 */
- yylval.tsym.type = SYMBOL_TYPE (sym);
-#endif /* not 0 */
- return TYPENAME;
- }
- if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0)
- return TYPENAME;
-
- /* Input names that aren't symbols but ARE valid hex numbers,
- when the input radix permits them, can be names or numbers
- depending on the parse. Note we support radixes > 16 here. */
- if (!sym &&
- ((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10) ||
- (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10)))
- {
- YYSTYPE newlval; /* Its value is ignored. */
- hextype = parse_number (tokstart, namelen, 0, &newlval);
- if (hextype == INT)
- {
- yylval.ssym.sym = sym;
- yylval.ssym.is_a_field_of_this = is_a_field_of_this;
- return NAME_OR_INT;
- }
- }
-
- /* Any other kind of symbol */
- yylval.ssym.sym = sym;
- yylval.ssym.is_a_field_of_this = is_a_field_of_this;
- return NAME;
- }
-}
-
-void
-yyerror (msg)
- char *msg;
-{
- error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
-}
diff --git a/contrib/gdb/gdb/callback.c b/contrib/gdb/gdb/callback.c
deleted file mode 100644
index d59ecdabd7a1..000000000000
--- a/contrib/gdb/gdb/callback.c
+++ /dev/null
@@ -1,349 +0,0 @@
-/* Host callback routines for GDB.
- Copyright 1995 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. */
-
-
-/* This file provides a standard way for targets to talk to the host OS
- level.
-
- This interface will probably need a bit more banging to make it
- smooth. Currently the simulator uses this file to provide the
- callbacks for itself when it's built standalone, which is rather
- ugly. */
-
-#ifndef INSIDE_SIMULATOR
-#include "defs.h"
-#endif
-
-#include "ansidecl.h"
-#include "callback.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <time.h>
-
-
-
-/* Set the callback copy of errno from what we see now. */
-static int
-wrap (p, val)
- host_callback *p;
- int val;
-{
- p->last_errno = errno;
- return val;
-}
-
-/* Make sure the FD provided is ok. If not, return non-zero
- and set errno. */
-
-static int
-fdbad (p, fd)
- host_callback *p;
- int fd;
-{
- if (fd < 0 || fd > MAX_CALLBACK_FDS || !p->fdopen[fd])
- {
- p->last_errno = EINVAL;
- return -1;
- }
- return 0;
-}
-
-static int
-fdmap (p, fd)
- host_callback *p;
- int fd;
-{
- return p->fdmap[fd];
-}
-
-int
-os_close (p, fd)
- host_callback *p;
- int fd;
-{
- int result;
-
- result = fdbad (p, fd);
- if (result)
- return result;
- result = wrap (p, close (fdmap (p, fd)));
- return result;
-}
-
-int
-os_get_errno (p)
- host_callback *p;
-{
- /* !!! fixme, translate from host to taget errno value */
- return p->last_errno;
-}
-
-
-int
-os_isatty (p, fd)
- host_callback *p;
- int fd;
-{
- int result;
-
- result = fdbad (p, fd);
- if (result)
- return result;
- result = wrap (p, isatty (fdmap (fd)));
- return result;
-}
-
-int
-os_lseek (p, fd, off, way)
- host_callback *p;
- int fd;
- long off;
- int way;
-{
- int result;
-
- result = fdbad (p, fd);
- if (result)
- return result;
- result = lseek (fdmap (p, fd), off, way);
- return result;
-}
-
-int
-os_open (p, name, flags)
- host_callback *p;
- const char *name;
- int flags;
-{
- int i;
- for (i = 0; i < MAX_CALLBACK_FDS; i++)
- {
- if (!p->fdopen[i])
- {
- int f = open (name, flags);
- if (f < 0)
- {
- p->last_errno = errno;
- return f;
- }
- p->fdopen[i] = 1;
- p->fdmap[i] = f;
- return i;
- }
- }
- p->last_errno = EMFILE;
- return -1;
-}
-
-int
-os_read (p, fd, buf, len)
- host_callback *p;
- int fd;
- char *buf;
- int len;
-{
- int result;
-
- result = fdbad (p, fd);
- if (result)
- return result;
- result = wrap (p, read (fdmap (p, fd), buf, len));
- return result;
-}
-
-int
-os_read_stdin (p, buf, len)
- host_callback *p;
- char *buf;
- int len;
-{
- return wrap (p, read (0, buf, len));
-}
-
-int
-os_write (p, fd, buf, len)
- host_callback *p;
- int fd;
- const char *buf;
- int len;
-{
- int result;
-
- result = fdbad (p, fd);
- if (result)
- return result;
- result = wrap (p, write (fdmap (p, fd), buf, len));
- return result;
-}
-
-/* ignore the grossness of INSIDE_SIMULATOR, it will go away one day. */
-int
-os_write_stdout (p, buf, len)
- host_callback *p;
- const char *buf;
- int len;
-{
-#ifdef INSIDE_SIMULATOR
- return os_write (p, 1, buf, len);
-#else
- int i;
- char b[2];
- for (i = 0; i< len; i++)
- {
- b[0] = buf[i];
- b[1] = 0;
- if (target_output_hook)
- target_output_hook (b);
- else
- fputs_filtered (b, gdb_stdout);
- }
- return len;
-#endif
-}
-
-int
-os_rename (p, f1, f2)
- host_callback *p;
- const char *f1;
- const char *f2;
-{
- return wrap (p, rename (f1, f2));
-}
-
-
-int
-os_system (p, s)
- host_callback *p;
- const char *s;
-{
- return wrap (p, system (s));
-}
-
-long
-os_time (p, t)
- host_callback *p;
- long *t;
-{
- return wrap (p, time (t));
-}
-
-
-int
-os_unlink (p, f1)
- host_callback *p;
- const char *f1;
-{
- return wrap (p, unlink (f1));
-}
-
-
-int
-os_shutdown (p)
-host_callback *p;
-{
- int i;
- for (i = 0; i < MAX_CALLBACK_FDS; i++)
- {
- if (p->fdopen[i] && !p->alwaysopen[i]) {
- close (p->fdmap[i]);
- p->fdopen[i] = 0;
- }
- }
- return 1;
-}
-
-int os_init(p)
-host_callback *p;
-{
- int i;
- os_shutdown (p);
- for (i= 0; i < 3; i++)
- {
- p->fdmap[i] = i;
- p->fdopen[i] = 1;
- p->alwaysopen[i] = 1;
- }
- return 1;
-}
-
-
-/* !!fixme!!
- This bit is ugly. When the interface has settled down I'll
- move the whole file into sim/common and remove this bit. */
-
-/* VARARGS */
-void
-#ifdef ANSI_PROTOTYPES
-os_printf_filtered (host_callback *p, const char *format, ...)
-#else
-os_printf_filtered (p, va_alist)
- host_callback *p;
- va_dcl
-#endif
-{
- va_list args;
-#ifdef ANSI_PROTOTYPES
- va_start (args, format);
-#else
- char *format;
-
- va_start (args);
- format = va_arg (args, char *);
-#endif
-
-#ifdef INSIDE_SIMULATOR
- vprintf (format, args);
-#else
- vfprintf_filtered (stdout, format, args);
-#endif
-
- va_end (args);
-}
-
-host_callback default_callback =
-{
- os_close,
- os_get_errno,
- os_isatty,
- os_lseek,
- os_open,
- os_read,
- os_read_stdin,
- os_rename,
- os_system,
- os_time,
- os_unlink,
- os_write,
- os_write_stdout,
-
- os_shutdown,
- os_init,
-
- os_printf_filtered,
-
- 0, /* last errno */
-};
diff --git a/contrib/gdb/gdb/callback.h b/contrib/gdb/gdb/callback.h
deleted file mode 100644
index b97c3b2ce81e..000000000000
--- a/contrib/gdb/gdb/callback.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef CALLBACK_H
-#define CALLBACK_H
-typedef struct host_callback_struct host_callback;
-
-#define MAX_CALLBACK_FDS 10
-
-struct host_callback_struct
-{
- int (*close) PARAMS ((host_callback *,int));
- int (*get_errno) PARAMS ((host_callback *));
- int (*isatty) PARAMS ((host_callback *, int));
- int (*lseek) PARAMS ((host_callback *, int, long , int));
- int (*open) PARAMS ((host_callback *, const char*, int mode));
- int (*read) PARAMS ((host_callback *,int, char *, int));
- int (*read_stdin) PARAMS (( host_callback *, char *, int));
- int (*rename) PARAMS ((host_callback *, const char *, const char *));
- int (*system) PARAMS ((host_callback *, const char *));
- long (*time) PARAMS ((host_callback *, long *));
- int (*unlink) PARAMS ((host_callback *, const char *));
- int (*write) PARAMS ((host_callback *,int, const char *, int));
- int (*write_stdout) PARAMS ((host_callback *, const char *, int));
-
-
- /* Used when the target has gone away, so we can close open
- handles and free memory etc etc. */
- int (*shutdown) PARAMS ((host_callback *));
- int (*init) PARAMS ((host_callback *));
-
- /* Talk to the user on a console. */
- void (*printf_filtered) PARAMS ((host_callback *, const char *, ...));
-
- int last_errno; /* host format */
-
- int fdmap[MAX_CALLBACK_FDS];
- char fdopen[MAX_CALLBACK_FDS];
- char alwaysopen[MAX_CALLBACK_FDS];
-};
-#endif
-
-
-extern host_callback default_callback;
diff --git a/contrib/gdb/gdb/command.c b/contrib/gdb/gdb/command.c
deleted file mode 100644
index 58af56701f5f..000000000000
--- a/contrib/gdb/gdb/command.c
+++ /dev/null
@@ -1,1564 +0,0 @@
-/* Handle lists of commands, their decoding and documentation, for GDB.
- Copyright 1986, 1989, 1990, 1991, 1998 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "gdbcmd.h"
-#include "symtab.h"
-#include "value.h"
-#include <ctype.h>
-#include "gdb_string.h"
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_WAIT_H
-# include <wait.h>
-#else
-# ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-# endif
-#endif
-
-#include "wait.h"
-
-/* Prototypes for local functions */
-
-static void undef_cmd_error PARAMS ((char *, char *));
-
-static void show_user PARAMS ((char *, int));
-
-static void show_user_1 PARAMS ((struct cmd_list_element *, GDB_FILE *));
-
-static void make_command PARAMS ((char *, int));
-
-static void shell_escape PARAMS ((char *, int));
-
-static int parse_binary_operation PARAMS ((char *));
-
-static void print_doc_line PARAMS ((GDB_FILE *, char *));
-
-void _initialize_command PARAMS ((void));
-
-/* Add element named NAME.
- CLASS is the top level category into which commands are broken down
- for "help" purposes.
- FUN should be the function to execute the command;
- it will get a character string as argument, with leading
- and trailing blanks already eliminated.
-
- DOC is a documentation string for the command.
- Its first line should be a complete sentence.
- It should start with ? for a command that is an abbreviation
- or with * for a command that most users don't need to know about.
-
- Add this command to command list *LIST.
-
- Returns a pointer to the added command (not necessarily the head
- of *LIST). */
-
-struct cmd_list_element *
-add_cmd (name, class, fun, doc, list)
- char *name;
- enum command_class class;
- void (*fun) PARAMS ((char *, int));
- char *doc;
- struct cmd_list_element **list;
-{
- register struct cmd_list_element *c
- = (struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
- struct cmd_list_element *p;
-
- delete_cmd (name, list);
-
- if (*list == NULL || STRCMP ((*list)->name, name) >= 0)
- {
- c->next = *list;
- *list = c;
- }
- else
- {
- p = *list;
- while (p->next && STRCMP (p->next->name, name) <= 0)
- {
- p = p->next;
- }
- c->next = p->next;
- p->next = c;
- }
-
- c->name = name;
- c->class = class;
- c->function.cfunc = fun;
- c->doc = doc;
- c->hook = NULL;
- c->prefixlist = NULL;
- c->prefixname = NULL;
- c->allow_unknown = 0;
- c->abbrev_flag = 0;
- c->completer = make_symbol_completion_list;
- c->type = not_set_cmd;
- c->var = NULL;
- c->var_type = var_boolean;
- c->enums = NULL;
- c->user_commands = NULL;
- c->hookee = NULL;
- c->cmd_pointer = NULL;
-
- return c;
-}
-
-/* Same as above, except that the abbrev_flag is set. */
-
-#if 0 /* Currently unused */
-
-struct cmd_list_element *
-add_abbrev_cmd (name, class, fun, doc, list)
- char *name;
- enum command_class class;
- void (*fun) PARAMS ((char *, int));
- char *doc;
- struct cmd_list_element **list;
-{
- register struct cmd_list_element *c
- = add_cmd (name, class, fun, doc, list);
-
- c->abbrev_flag = 1;
- return c;
-}
-
-#endif
-
-struct cmd_list_element *
-add_alias_cmd (name, oldname, class, abbrev_flag, list)
- char *name;
- char *oldname;
- enum command_class class;
- int abbrev_flag;
- struct cmd_list_element **list;
-{
- /* Must do this since lookup_cmd tries to side-effect its first arg */
- char *copied_name;
- register struct cmd_list_element *old;
- register struct cmd_list_element *c;
- copied_name = (char *) alloca (strlen (oldname) + 1);
- strcpy (copied_name, oldname);
- old = lookup_cmd (&copied_name, *list, "", 1, 1);
-
- if (old == 0)
- {
- delete_cmd (name, list);
- return 0;
- }
-
- c = add_cmd (name, class, old->function.cfunc, old->doc, list);
- c->prefixlist = old->prefixlist;
- c->prefixname = old->prefixname;
- c->allow_unknown = old->allow_unknown;
- c->abbrev_flag = abbrev_flag;
- c->cmd_pointer = old;
- return c;
-}
-
-/* Like add_cmd but adds an element for a command prefix:
- a name that should be followed by a subcommand to be looked up
- in another command list. PREFIXLIST should be the address
- of the variable containing that list. */
-
-struct cmd_list_element *
-add_prefix_cmd (name, class, fun, doc, prefixlist, prefixname,
- allow_unknown, list)
- char *name;
- enum command_class class;
- void (*fun) PARAMS ((char *, int));
- char *doc;
- struct cmd_list_element **prefixlist;
- char *prefixname;
- int allow_unknown;
- struct cmd_list_element **list;
-{
- register struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
- c->prefixlist = prefixlist;
- c->prefixname = prefixname;
- c->allow_unknown = allow_unknown;
- return c;
-}
-
-/* Like add_prefix_cmd but sets the abbrev_flag on the new command. */
-
-struct cmd_list_element *
-add_abbrev_prefix_cmd (name, class, fun, doc, prefixlist, prefixname,
- allow_unknown, list)
- char *name;
- enum command_class class;
- void (*fun) PARAMS ((char *, int));
- char *doc;
- struct cmd_list_element **prefixlist;
- char *prefixname;
- int allow_unknown;
- struct cmd_list_element **list;
-{
- register struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
- c->prefixlist = prefixlist;
- c->prefixname = prefixname;
- c->allow_unknown = allow_unknown;
- c->abbrev_flag = 1;
- return c;
-}
-
-/* This is an empty "cfunc". */
-void
-not_just_help_class_command (args, from_tty)
- char *args;
- int from_tty;
-{
-}
-
-/* This is an empty "sfunc". */
-static void empty_sfunc PARAMS ((char *, int, struct cmd_list_element *));
-
-static void
-empty_sfunc (args, from_tty, c)
- char *args;
- int from_tty;
- struct cmd_list_element *c;
-{
-}
-
-/* Add element named NAME to command list LIST (the list for set
- or some sublist thereof).
- CLASS is as in add_cmd.
- VAR_TYPE is the kind of thing we are setting.
- VAR is address of the variable being controlled by this command.
- DOC is the documentation string. */
-
-struct cmd_list_element *
-add_set_cmd (name, class, var_type, var, doc, list)
- char *name;
- enum command_class class;
- var_types var_type;
- char *var;
- char *doc;
- struct cmd_list_element **list;
-{
- struct cmd_list_element *c
- = add_cmd (name, class, NO_FUNCTION, doc, list);
-
- c->type = set_cmd;
- c->var_type = var_type;
- c->var = var;
- /* This needs to be something besides NO_FUNCTION so that this isn't
- treated as a help class. */
- c->function.sfunc = empty_sfunc;
- return c;
-}
-
-/* Add element named NAME to command list LIST (the list for set
- or some sublist thereof).
- CLASS is as in add_cmd.
- ENUMLIST is a list of strings which may follow NAME.
- VAR is address of the variable which will contain the matching string
- (from ENUMLIST).
- DOC is the documentation string. */
-
-struct cmd_list_element *
-add_set_enum_cmd (name, class, enumlist, var, doc, list)
- char *name;
- enum command_class class;
- char *enumlist[];
- char *var;
- char *doc;
- struct cmd_list_element **list;
-{
- struct cmd_list_element *c
- = add_set_cmd (name, class, var_enum, var, doc, list);
- c->enums = enumlist;
-
- return c;
-}
-
-/* Where SETCMD has already been added, add the corresponding show
- command to LIST and return a pointer to the added command (not
- necessarily the head of LIST). */
-struct cmd_list_element *
-add_show_from_set (setcmd, list)
- struct cmd_list_element *setcmd;
- struct cmd_list_element **list;
-{
- struct cmd_list_element *showcmd =
- (struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
- struct cmd_list_element *p;
-
- memcpy (showcmd, setcmd, sizeof (struct cmd_list_element));
- delete_cmd (showcmd->name, list);
- showcmd->type = show_cmd;
-
- /* Replace "set " at start of docstring with "show ". */
- if (setcmd->doc[0] == 'S' && setcmd->doc[1] == 'e'
- && setcmd->doc[2] == 't' && setcmd->doc[3] == ' ')
- showcmd->doc = concat ("Show ", setcmd->doc + 4, NULL);
- else
- fprintf_unfiltered (gdb_stderr, "GDB internal error: Bad docstring for set command\n");
-
- if (*list == NULL || STRCMP ((*list)->name, showcmd->name) >= 0)
- {
- showcmd->next = *list;
- *list = showcmd;
- }
- else
- {
- p = *list;
- while (p->next && STRCMP (p->next->name, showcmd->name) <= 0)
- {
- p = p->next;
- }
- showcmd->next = p->next;
- p->next = showcmd;
- }
-
- return showcmd;
-}
-
-/* Remove the command named NAME from the command list. */
-
-void
-delete_cmd (name, list)
- char *name;
- struct cmd_list_element **list;
-{
- register struct cmd_list_element *c;
- struct cmd_list_element *p;
-
- while (*list && STREQ ((*list)->name, name))
- {
- if ((*list)->hookee)
- (*list)->hookee->hook = 0; /* Hook slips out of its mouth */
- p = (*list)->next;
- free ((PTR)*list);
- *list = p;
- }
-
- if (*list)
- for (c = *list; c->next;)
- {
- if (STREQ (c->next->name, name))
- {
- if (c->next->hookee)
- c->next->hookee->hook = 0; /* hooked cmd gets away. */
- p = c->next->next;
- free ((PTR)c->next);
- c->next = p;
- }
- else
- c = c->next;
- }
-}
-
-/* This command really has to deal with two things:
- * 1) I want documentation on *this string* (usually called by
- * "help commandname").
- * 2) I want documentation on *this list* (usually called by
- * giving a command that requires subcommands. Also called by saying
- * just "help".)
- *
- * I am going to split this into two seperate comamnds, help_cmd and
- * help_list.
- */
-
-void
-help_cmd (command, stream)
- char *command;
- GDB_FILE *stream;
-{
- struct cmd_list_element *c;
- extern struct cmd_list_element *cmdlist;
-
- if (!command)
- {
- help_list (cmdlist, "", all_classes, stream);
- return;
- }
-
- c = lookup_cmd (&command, cmdlist, "", 0, 0);
-
- if (c == 0)
- return;
-
- /* There are three cases here.
- If c->prefixlist is nonzero, we have a prefix command.
- Print its documentation, then list its subcommands.
-
- If c->function is nonzero, we really have a command.
- Print its documentation and return.
-
- If c->function is zero, we have a class name.
- Print its documentation (as if it were a command)
- and then set class to the number of this class
- so that the commands in the class will be listed. */
-
- fputs_filtered (c->doc, stream);
- fputs_filtered ("\n", stream);
-
- if (c->prefixlist == 0 && c->function.cfunc != NULL)
- return;
- fprintf_filtered (stream, "\n");
-
- /* If this is a prefix command, print it's subcommands */
- if (c->prefixlist)
- help_list (*c->prefixlist, c->prefixname, all_commands, stream);
-
- /* If this is a class name, print all of the commands in the class */
- if (c->function.cfunc == NULL)
- help_list (cmdlist, "", c->class, stream);
-
- if (c->hook)
- fprintf_filtered (stream, "\nThis command has a hook defined: %s\n",
- c->hook->name);
-}
-
-/*
- * Get a specific kind of help on a command list.
- *
- * LIST is the list.
- * CMDTYPE is the prefix to use in the title string.
- * CLASS is the class with which to list the nodes of this list (see
- * documentation for help_cmd_list below), As usual, ALL_COMMANDS for
- * everything, ALL_CLASSES for just classes, and non-negative for only things
- * in a specific class.
- * and STREAM is the output stream on which to print things.
- * If you call this routine with a class >= 0, it recurses.
- */
-void
-help_list (list, cmdtype, class, stream)
- struct cmd_list_element *list;
- char *cmdtype;
- enum command_class class;
- GDB_FILE *stream;
-{
- int len;
- char *cmdtype1, *cmdtype2;
-
- /* If CMDTYPE is "foo ", CMDTYPE1 gets " foo" and CMDTYPE2 gets "foo sub" */
- len = strlen (cmdtype);
- cmdtype1 = (char *) alloca (len + 1);
- cmdtype1[0] = 0;
- cmdtype2 = (char *) alloca (len + 4);
- cmdtype2[0] = 0;
- if (len)
- {
- cmdtype1[0] = ' ';
- strncpy (cmdtype1 + 1, cmdtype, len - 1);
- cmdtype1[len] = 0;
- strncpy (cmdtype2, cmdtype, len - 1);
- strcpy (cmdtype2 + len - 1, " sub");
- }
-
- if (class == all_classes)
- fprintf_filtered (stream, "List of classes of %scommands:\n\n", cmdtype2);
- else
- fprintf_filtered (stream, "List of %scommands:\n\n", cmdtype2);
-
- help_cmd_list (list, class, cmdtype, (int)class >= 0, stream);
-
- if (class == all_classes)
- fprintf_filtered (stream, "\n\
-Type \"help%s\" followed by a class name for a list of commands in that class.",
- cmdtype1);
-
- fprintf_filtered (stream, "\n\
-Type \"help%s\" followed by %scommand name for full documentation.\n\
-Command name abbreviations are allowed if unambiguous.\n",
- cmdtype1, cmdtype2);
-}
-
-/* Print only the first line of STR on STREAM. */
-static void
-print_doc_line (stream, str)
- GDB_FILE *stream;
- char *str;
-{
- static char *line_buffer = 0;
- static int line_size;
- register char *p;
-
- if (!line_buffer)
- {
- line_size = 80;
- line_buffer = (char *) xmalloc (line_size);
- }
-
- p = str;
- while (*p && *p != '\n' && *p != '.' && *p != ',')
- p++;
- if (p - str > line_size - 1)
- {
- line_size = p - str + 1;
- free ((PTR)line_buffer);
- line_buffer = (char *) xmalloc (line_size);
- }
- strncpy (line_buffer, str, p - str);
- line_buffer[p - str] = '\0';
- if (islower (line_buffer[0]))
- line_buffer[0] = toupper (line_buffer[0]);
- fputs_filtered (line_buffer, stream);
-}
-
-/*
- * Implement a help command on command list LIST.
- * RECURSE should be non-zero if this should be done recursively on
- * all sublists of LIST.
- * PREFIX is the prefix to print before each command name.
- * STREAM is the stream upon which the output should be written.
- * CLASS should be:
- * A non-negative class number to list only commands in that
- * class.
- * ALL_COMMANDS to list all commands in list.
- * ALL_CLASSES to list all classes in list.
- *
- * Note that RECURSE will be active on *all* sublists, not just the
- * ones selected by the criteria above (ie. the selection mechanism
- * is at the low level, not the high-level).
- */
-void
-help_cmd_list (list, class, prefix, recurse, stream)
- struct cmd_list_element *list;
- enum command_class class;
- char *prefix;
- int recurse;
- GDB_FILE *stream;
-{
- register struct cmd_list_element *c;
-
- for (c = list; c; c = c->next)
- {
- if (c->abbrev_flag == 0 &&
- (class == all_commands
- || (class == all_classes && c->function.cfunc == NULL)
- || (class == c->class && c->function.cfunc != NULL)))
- {
- fprintf_filtered (stream, "%s%s -- ", prefix, c->name);
- print_doc_line (stream, c->doc);
- fputs_filtered ("\n", stream);
- }
- if (recurse
- && c->prefixlist != 0
- && c->abbrev_flag == 0)
- help_cmd_list (*c->prefixlist, class, c->prefixname, 1, stream);
- }
-}
-
-
-/* Search the input clist for 'command'. Return the command if
- found (or NULL if not), and return the number of commands
- found in nfound */
-
-static struct cmd_list_element *
-find_cmd(command, len, clist, ignore_help_classes, nfound)
- char *command;
- struct cmd_list_element *clist;
- int ignore_help_classes;
- int *nfound;
-{
- struct cmd_list_element *found, *c;
-
- found = (struct cmd_list_element *)NULL;
- *nfound = 0;
- for (c = clist; c; c = c->next)
- if (!strncmp (command, c->name, len)
- && (!ignore_help_classes || c->function.cfunc))
- {
- found = c;
- (*nfound)++;
- if (c->name[len] == '\0')
- {
- *nfound = 1;
- break;
- }
- }
- return found;
-}
-
-/* This routine takes a line of TEXT and a CLIST in which to start the
- lookup. When it returns it will have incremented the text pointer past
- the section of text it matched, set *RESULT_LIST to point to the list in
- which the last word was matched, and will return a pointer to the cmd
- list element which the text matches. It will return NULL if no match at
- all was possible. It will return -1 (cast appropriately, ick) if ambigous
- matches are possible; in this case *RESULT_LIST will be set to point to
- the list in which there are ambiguous choices (and *TEXT will be set to
- the ambiguous text string).
-
- If the located command was an abbreviation, this routine returns the base
- command of the abbreviation.
-
- It does no error reporting whatsoever; control will always return
- to the superior routine.
-
- In the case of an ambiguous return (-1), *RESULT_LIST will be set to point
- at the prefix_command (ie. the best match) *or* (special case) will be NULL
- if no prefix command was ever found. For example, in the case of "info a",
- "info" matches without ambiguity, but "a" could be "args" or "address", so
- *RESULT_LIST is set to the cmd_list_element for "info". So in this case
- RESULT_LIST should not be interpeted as a pointer to the beginning of a
- list; it simply points to a specific command. In the case of an ambiguous
- return *TEXT is advanced past the last non-ambiguous prefix (e.g.
- "info t" can be "info types" or "info target"; upon return *TEXT has been
- advanced past "info ").
-
- If RESULT_LIST is NULL, don't set *RESULT_LIST (but don't otherwise
- affect the operation).
-
- This routine does *not* modify the text pointed to by TEXT.
-
- If IGNORE_HELP_CLASSES is nonzero, ignore any command list elements which
- are actually help classes rather than commands (i.e. the function field of
- the struct cmd_list_element is NULL). */
-
-struct cmd_list_element *
-lookup_cmd_1 (text, clist, result_list, ignore_help_classes)
- char **text;
- struct cmd_list_element *clist, **result_list;
- int ignore_help_classes;
-{
- char *p, *command;
- int len, tmp, nfound;
- struct cmd_list_element *found, *c;
-
- while (**text == ' ' || **text == '\t')
- (*text)++;
-
- /* Treating underscores as part of command words is important
- so that "set args_foo()" doesn't get interpreted as
- "set args _foo()". */
- for (p = *text;
- *p && (isalnum(*p) || *p == '-' || *p == '_' ||
- (tui_version &&
- (*p == '+' || *p == '<' || *p == '>' || *p == '$')) ||
- (xdb_commands && (*p == '!' || *p == '/' || *p == '?')));
- p++)
- ;
-
- /* If nothing but whitespace, return 0. */
- if (p == *text)
- return 0;
-
- len = p - *text;
-
- /* *text and p now bracket the first command word to lookup (and
- it's length is len). We copy this into a local temporary */
-
-
- command = (char *) alloca (len + 1);
- for (tmp = 0; tmp < len; tmp++)
- {
- char x = (*text)[tmp];
- command[tmp] = x;
- }
- command[len] = '\0';
-
- /* Look it up. */
- found = 0;
- nfound = 0;
- found = find_cmd(command, len, clist, ignore_help_classes, &nfound);
-
- /*
- ** We didn't find the command in the entered case, so lower case it
- ** and search again.
- */
- if (!found || nfound == 0)
- {
- for (tmp = 0; tmp < len; tmp++)
- {
- char x = command[tmp];
- command[tmp] = isupper(x) ? tolower(x) : x;
- }
- found = find_cmd(command, len, clist, ignore_help_classes, &nfound);
- }
-
- /* If nothing matches, we have a simple failure. */
- if (nfound == 0)
- return 0;
-
- if (nfound > 1)
- {
- if (result_list != NULL)
- /* Will be modified in calling routine
- if we know what the prefix command is. */
- *result_list = 0;
- return (struct cmd_list_element *) -1; /* Ambiguous. */
- }
-
- /* We've matched something on this list. Move text pointer forward. */
-
- *text = p;
-
- /* If this was an abbreviation, use the base command instead. */
-
- if (found->cmd_pointer)
- found = found->cmd_pointer;
-
- /* If we found a prefix command, keep looking. */
-
- if (found->prefixlist)
- {
- c = lookup_cmd_1 (text, *found->prefixlist, result_list,
- ignore_help_classes);
- if (!c)
- {
- /* Didn't find anything; this is as far as we got. */
- if (result_list != NULL)
- *result_list = clist;
- return found;
- }
- else if (c == (struct cmd_list_element *) -1)
- {
- /* We've gotten this far properly, but the next step
- is ambiguous. We need to set the result list to the best
- we've found (if an inferior hasn't already set it). */
- if (result_list != NULL)
- if (!*result_list)
- /* This used to say *result_list = *found->prefixlist
- If that was correct, need to modify the documentation
- at the top of this function to clarify what is supposed
- to be going on. */
- *result_list = found;
- return c;
- }
- else
- {
- /* We matched! */
- return c;
- }
- }
- else
- {
- if (result_list != NULL)
- *result_list = clist;
- return found;
- }
-}
-
-/* All this hair to move the space to the front of cmdtype */
-
-static void
-undef_cmd_error (cmdtype, q)
- char *cmdtype, *q;
-{
- error ("Undefined %scommand: \"%s\". Try \"help%s%.*s\".",
- cmdtype,
- q,
- *cmdtype? " ": "",
- strlen(cmdtype)-1,
- cmdtype);
-}
-
-/* Look up the contents of *LINE as a command in the command list LIST.
- LIST is a chain of struct cmd_list_element's.
- If it is found, return the struct cmd_list_element for that command
- and update *LINE to point after the command name, at the first argument.
- If not found, call error if ALLOW_UNKNOWN is zero
- otherwise (or if error returns) return zero.
- Call error if specified command is ambiguous,
- unless ALLOW_UNKNOWN is negative.
- CMDTYPE precedes the word "command" in the error message.
-
- If INGNORE_HELP_CLASSES is nonzero, ignore any command list
- elements which are actually help classes rather than commands (i.e.
- the function field of the struct cmd_list_element is 0). */
-
-struct cmd_list_element *
-lookup_cmd (line, list, cmdtype, allow_unknown, ignore_help_classes)
- char **line;
- struct cmd_list_element *list;
- char *cmdtype;
- int allow_unknown;
- int ignore_help_classes;
-{
- struct cmd_list_element *last_list = 0;
- struct cmd_list_element *c =
- lookup_cmd_1 (line, list, &last_list, ignore_help_classes);
-#if 0
- /* This is wrong for complete_command. */
- char *ptr = (*line) + strlen (*line) - 1;
-
- /* Clear off trailing whitespace. */
- while (ptr >= *line && (*ptr == ' ' || *ptr == '\t'))
- ptr--;
- *(ptr + 1) = '\0';
-#endif
-
- if (!c)
- {
- if (!allow_unknown)
- {
- if (!*line)
- error ("Lack of needed %scommand", cmdtype);
- else
- {
- char *p = *line, *q;
-
- while (isalnum(*p) || *p == '-')
- p++;
-
- q = (char *) alloca (p - *line + 1);
- strncpy (q, *line, p - *line);
- q[p - *line] = '\0';
- undef_cmd_error (cmdtype, q);
- }
- }
- else
- return 0;
- }
- else if (c == (struct cmd_list_element *) -1)
- {
- /* Ambigous. Local values should be off prefixlist or called
- values. */
- int local_allow_unknown = (last_list ? last_list->allow_unknown :
- allow_unknown);
- char *local_cmdtype = last_list ? last_list->prefixname : cmdtype;
- struct cmd_list_element *local_list =
- (last_list ? *(last_list->prefixlist) : list);
-
- if (local_allow_unknown < 0)
- {
- if (last_list)
- return last_list; /* Found something. */
- else
- return 0; /* Found nothing. */
- }
- else
- {
- /* Report as error. */
- int amb_len;
- char ambbuf[100];
-
- for (amb_len = 0;
- ((*line)[amb_len] && (*line)[amb_len] != ' '
- && (*line)[amb_len] != '\t');
- amb_len++)
- ;
-
- ambbuf[0] = 0;
- for (c = local_list; c; c = c->next)
- if (!strncmp (*line, c->name, amb_len))
- {
- if (strlen (ambbuf) + strlen (c->name) + 6 < (int)sizeof ambbuf)
- {
- if (strlen (ambbuf))
- strcat (ambbuf, ", ");
- strcat (ambbuf, c->name);
- }
- else
- {
- strcat (ambbuf, "..");
- break;
- }
- }
- error ("Ambiguous %scommand \"%s\": %s.", local_cmdtype,
- *line, ambbuf);
- return 0; /* lint */
- }
- }
- else
- {
- /* We've got something. It may still not be what the caller
- wants (if this command *needs* a subcommand). */
- while (**line == ' ' || **line == '\t')
- (*line)++;
-
- if (c->prefixlist && **line && !c->allow_unknown)
- undef_cmd_error (c->prefixname, *line);
-
- /* Seems to be what he wants. Return it. */
- return c;
- }
- return 0;
-}
-
-#if 0
-/* Look up the contents of *LINE as a command in the command list LIST.
- LIST is a chain of struct cmd_list_element's.
- If it is found, return the struct cmd_list_element for that command
- and update *LINE to point after the command name, at the first argument.
- If not found, call error if ALLOW_UNKNOWN is zero
- otherwise (or if error returns) return zero.
- Call error if specified command is ambiguous,
- unless ALLOW_UNKNOWN is negative.
- CMDTYPE precedes the word "command" in the error message. */
-
-struct cmd_list_element *
-lookup_cmd (line, list, cmdtype, allow_unknown)
- char **line;
- struct cmd_list_element *list;
- char *cmdtype;
- int allow_unknown;
-{
- register char *p;
- register struct cmd_list_element *c, *found;
- int nfound;
- char ambbuf[100];
- char *processed_cmd;
- int i, cmd_len;
-
- /* Skip leading whitespace. */
-
- while (**line == ' ' || **line == '\t')
- (*line)++;
-
- /* Clear out trailing whitespace. */
-
- p = *line + strlen (*line);
- while (p != *line && (p[-1] == ' ' || p[-1] == '\t'))
- p--;
- *p = 0;
-
- /* Find end of command name. */
-
- p = *line;
- while (*p == '-' || isalnum(*p))
- p++;
-
- /* Look up the command name.
- If exact match, keep that.
- Otherwise, take command abbreviated, if unique. Note that (in my
- opinion) a null string does *not* indicate ambiguity; simply the
- end of the argument. */
-
- if (p == *line)
- {
- if (!allow_unknown)
- error ("Lack of needed %scommand", cmdtype);
- return 0;
- }
-
- /* Copy over to a local buffer, converting to lowercase on the way.
- This is in case the command being parsed is a subcommand which
- doesn't match anything, and that's ok. We want the original
- untouched for the routine of the original command. */
-
- processed_cmd = (char *) alloca (p - *line + 1);
- for (cmd_len = 0; cmd_len < p - *line; cmd_len++)
- {
- char x = (*line)[cmd_len];
- if (isupper(x))
- processed_cmd[cmd_len] = tolower(x);
- else
- processed_cmd[cmd_len] = x;
- }
- processed_cmd[cmd_len] = '\0';
-
- /* Check all possibilities in the current command list. */
- found = 0;
- nfound = 0;
- for (c = list; c; c = c->next)
- {
- if (!strncmp (processed_cmd, c->name, cmd_len))
- {
- found = c;
- nfound++;
- if (c->name[cmd_len] == 0)
- {
- nfound = 1;
- break;
- }
- }
- }
-
- /* Report error for undefined command name. */
-
- if (nfound != 1)
- {
- if (nfound > 1 && allow_unknown >= 0)
- {
- ambbuf[0] = 0;
- for (c = list; c; c = c->next)
- if (!strncmp (processed_cmd, c->name, cmd_len))
- {
- if (strlen (ambbuf) + strlen (c->name) + 6 < sizeof ambbuf)
- {
- if (strlen (ambbuf))
- strcat (ambbuf, ", ");
- strcat (ambbuf, c->name);
- }
- else
- {
- strcat (ambbuf, "..");
- break;
- }
- }
- error ("Ambiguous %scommand \"%s\": %s.", cmdtype,
- processed_cmd, ambbuf);
- }
- else if (!allow_unknown)
- error ("Undefined %scommand: \"%s\".", cmdtype, processed_cmd);
- return 0;
- }
-
- /* Skip whitespace before the argument. */
-
- while (*p == ' ' || *p == '\t') p++;
- *line = p;
-
- if (found->prefixlist && *p)
- {
- c = lookup_cmd (line, *found->prefixlist, found->prefixname,
- found->allow_unknown);
- if (c)
- return c;
- }
-
- return found;
-}
-#endif
-
-/* Helper function for SYMBOL_COMPLETION_FUNCTION. */
-
-/* Return a vector of char pointers which point to the different
- possible completions in LIST of TEXT.
-
- WORD points in the same buffer as TEXT, and completions should be
- returned relative to this position. For example, suppose TEXT is "foo"
- and we want to complete to "foobar". If WORD is "oo", return
- "oobar"; if WORD is "baz/foo", return "baz/foobar". */
-
-char **
-complete_on_cmdlist (list, text, word)
- struct cmd_list_element *list;
- char *text;
- char *word;
-{
- struct cmd_list_element *ptr;
- char **matchlist;
- int sizeof_matchlist;
- int matches;
- int textlen = strlen (text);
-
- sizeof_matchlist = 10;
- matchlist = (char **) xmalloc (sizeof_matchlist * sizeof (char *));
- matches = 0;
-
- for (ptr = list; ptr; ptr = ptr->next)
- if (!strncmp (ptr->name, text, textlen)
- && !ptr->abbrev_flag
- && (ptr->function.cfunc
- || ptr->prefixlist))
- {
- if (matches == sizeof_matchlist)
- {
- sizeof_matchlist *= 2;
- matchlist = (char **) xrealloc ((char *)matchlist,
- (sizeof_matchlist
- * sizeof (char *)));
- }
-
- matchlist[matches] = (char *)
- xmalloc (strlen (word) + strlen (ptr->name) + 1);
- if (word == text)
- strcpy (matchlist[matches], ptr->name);
- else if (word > text)
- {
- /* Return some portion of ptr->name. */
- strcpy (matchlist[matches], ptr->name + (word - text));
- }
- else
- {
- /* Return some of text plus ptr->name. */
- strncpy (matchlist[matches], word, text - word);
- matchlist[matches][text - word] = '\0';
- strcat (matchlist[matches], ptr->name);
- }
- ++matches;
- }
-
- if (matches == 0)
- {
- free ((PTR)matchlist);
- matchlist = 0;
- }
- else
- {
- matchlist = (char **) xrealloc ((char *)matchlist, ((matches + 1)
- * sizeof (char *)));
- matchlist[matches] = (char *) 0;
- }
-
- return matchlist;
-}
-
-/* Helper function for SYMBOL_COMPLETION_FUNCTION. */
-
-/* Return a vector of char pointers which point to the different
- possible completions in CMD of TEXT.
-
- WORD points in the same buffer as TEXT, and completions should be
- returned relative to this position. For example, suppose TEXT is "foo"
- and we want to complete to "foobar". If WORD is "oo", return
- "oobar"; if WORD is "baz/foo", return "baz/foobar". */
-
-char **
-complete_on_enum (enumlist, text, word)
- char **enumlist;
- char *text;
- char *word;
-{
- char **matchlist;
- int sizeof_matchlist;
- int matches;
- int textlen = strlen (text);
- int i;
- char *name;
-
- sizeof_matchlist = 10;
- matchlist = (char **) xmalloc (sizeof_matchlist * sizeof (char *));
- matches = 0;
-
- for (i = 0; (name = enumlist[i]) != NULL; i++)
- if (strncmp (name, text, textlen) == 0)
- {
- if (matches == sizeof_matchlist)
- {
- sizeof_matchlist *= 2;
- matchlist = (char **) xrealloc ((char *)matchlist,
- (sizeof_matchlist
- * sizeof (char *)));
- }
-
- matchlist[matches] = (char *)
- xmalloc (strlen (word) + strlen (name) + 1);
- if (word == text)
- strcpy (matchlist[matches], name);
- else if (word > text)
- {
- /* Return some portion of name. */
- strcpy (matchlist[matches], name + (word - text));
- }
- else
- {
- /* Return some of text plus name. */
- strncpy (matchlist[matches], word, text - word);
- matchlist[matches][text - word] = '\0';
- strcat (matchlist[matches], name);
- }
- ++matches;
- }
-
- if (matches == 0)
- {
- free ((PTR)matchlist);
- matchlist = 0;
- }
- else
- {
- matchlist = (char **) xrealloc ((char *)matchlist, ((matches + 1)
- * sizeof (char *)));
- matchlist[matches] = (char *) 0;
- }
-
- return matchlist;
-}
-
-static int
-parse_binary_operation (arg)
- char *arg;
-{
- int length;
-
- if (!arg || !*arg)
- return 1;
-
- length = strlen (arg);
-
- while (arg[length - 1] == ' ' || arg[length - 1] == '\t')
- length--;
-
- if (!strncmp (arg, "on", length)
- || !strncmp (arg, "1", length)
- || !strncmp (arg, "yes", length))
- return 1;
- else
- if (!strncmp (arg, "off", length)
- || !strncmp (arg, "0", length)
- || !strncmp (arg, "no", length))
- return 0;
- else
- {
- error ("\"on\" or \"off\" expected.");
- return 0;
- }
-}
-
-/* Do a "set" or "show" command. ARG is NULL if no argument, or the text
- of the argument, and FROM_TTY is nonzero if this command is being entered
- directly by the user (i.e. these are just like any other
- command). C is the command list element for the command. */
-void
-do_setshow_command (arg, from_tty, c)
- char *arg;
- int from_tty;
- struct cmd_list_element *c;
-{
- if (c->type == set_cmd)
- {
- switch (c->var_type)
- {
- case var_string:
- {
- char *new;
- char *p;
- char *q;
- int ch;
-
- if (arg == NULL)
- arg = "";
- new = (char *) xmalloc (strlen (arg) + 2);
- p = arg; q = new;
- while ((ch = *p++) != '\000')
- {
- if (ch == '\\')
- {
- /* \ at end of argument is used after spaces
- so they won't be lost. */
- /* This is obsolete now that we no longer strip
- trailing whitespace and actually, the backslash
- didn't get here in my test, readline or
- something did something funky with a backslash
- right before a newline. */
- if (*p == 0)
- break;
- ch = parse_escape (&p);
- if (ch == 0)
- break; /* C loses */
- else if (ch > 0)
- *q++ = ch;
- }
- else
- *q++ = ch;
- }
-#if 0
- if (*(p - 1) != '\\')
- *q++ = ' ';
-#endif
- *q++ = '\0';
- new = (char *) xrealloc (new, q - new);
- if (*(char **)c->var != NULL)
- free (*(char **)c->var);
- *(char **) c->var = new;
- }
- break;
- case var_string_noescape:
- if (arg == NULL)
- arg = "";
- if (*(char **)c->var != NULL)
- free (*(char **)c->var);
- *(char **) c->var = savestring (arg, strlen (arg));
- break;
- case var_filename:
- if (arg == NULL)
- error_no_arg ("filename to set it to.");
- if (*(char **)c->var != NULL)
- free (*(char **)c->var);
- *(char **)c->var = tilde_expand (arg);
- break;
- case var_boolean:
- *(int *) c->var = parse_binary_operation (arg);
- break;
- case var_uinteger:
- if (arg == NULL)
- error_no_arg ("integer to set it to.");
- *(unsigned int *) c->var = parse_and_eval_address (arg);
- if (*(unsigned int *) c->var == 0)
- *(unsigned int *) c->var = UINT_MAX;
- break;
- case var_integer:
- {
- unsigned int val;
- if (arg == NULL)
- error_no_arg ("integer to set it to.");
- val = parse_and_eval_address (arg);
- if (val == 0)
- *(int *) c->var = INT_MAX;
- else if (val >= INT_MAX)
- error ("integer %u out of range", val);
- else
- *(int *) c->var = val;
- break;
- }
- case var_zinteger:
- if (arg == NULL)
- error_no_arg ("integer to set it to.");
- *(int *) c->var = parse_and_eval_address (arg);
- break;
- case var_enum:
- {
- int i;
- int len;
- int nmatches;
- char *match = NULL;
- char *p;
-
- /* if no argument was supplied, print an informative error message */
- if (arg == NULL)
- {
- char msg[1024];
- strcpy (msg, "Requires an argument. Valid arguments are ");
- for (i = 0; c->enums[i]; i++)
- {
- if (i != 0)
- strcat (msg, ", ");
- strcat (msg, c->enums[i]);
- }
- strcat (msg, ".");
- error (msg);
- }
-
- p = strchr (arg, ' ');
-
- if (p)
- len = p - arg;
- else
- len = strlen (arg);
-
- nmatches = 0;
- for (i = 0; c->enums[i]; i++)
- if (strncmp (arg, c->enums[i], len) == 0)
- {
- match = c->enums[i];
- nmatches++;
- }
-
- if (nmatches <= 0)
- error ("Undefined item: \"%s\".", arg);
-
- if (nmatches > 1)
- error ("Ambiguous item \"%s\".", arg);
-
- *(char **)c->var = match;
- }
- break;
- default:
- error ("gdb internal error: bad var_type in do_setshow_command");
- }
- }
- else if (c->type == show_cmd)
- {
- /* Print doc minus "show" at start. */
- print_doc_line (gdb_stdout, c->doc + 5);
-
- fputs_filtered (" is ", gdb_stdout);
- wrap_here (" ");
- switch (c->var_type)
- {
- case var_string:
- {
- unsigned char *p;
-
- fputs_filtered ("\"", gdb_stdout);
- if (*(unsigned char **)c->var)
- for (p = *(unsigned char **) c->var; *p != '\0'; p++)
- gdb_printchar (*p, gdb_stdout, '"');
- fputs_filtered ("\"", gdb_stdout);
- }
- break;
- case var_string_noescape:
- case var_filename:
- case var_enum:
- fputs_filtered ("\"", gdb_stdout);
- if (*(char **)c->var)
- fputs_filtered (*(char **) c->var, gdb_stdout);
- fputs_filtered ("\"", gdb_stdout);
- break;
- case var_boolean:
- fputs_filtered (*(int *) c->var ? "on" : "off", gdb_stdout);
- break;
- case var_uinteger:
- if (*(unsigned int *) c->var == UINT_MAX) {
- fputs_filtered ("unlimited", gdb_stdout);
- break;
- }
- /* else fall through */
- case var_zinteger:
- fprintf_filtered (gdb_stdout, "%u", *(unsigned int *) c->var);
- break;
- case var_integer:
- if (*(int *) c->var == INT_MAX)
- {
- fputs_filtered ("unlimited", gdb_stdout);
- }
- else
- fprintf_filtered (gdb_stdout, "%d", *(int *) c->var);
- break;
-
- default:
- error ("gdb internal error: bad var_type in do_setshow_command");
- }
- fputs_filtered (".\n", gdb_stdout);
- }
- else
- error ("gdb internal error: bad cmd_type in do_setshow_command");
- (*c->function.sfunc) (NULL, from_tty, c);
-}
-
-/* Show all the settings in a list of show commands. */
-
-void
-cmd_show_list (list, from_tty, prefix)
- struct cmd_list_element *list;
- int from_tty;
- char *prefix;
-{
- for (; list != NULL; list = list->next) {
- /* If we find a prefix, run its list, prefixing our output by its
- prefix (with "show " skipped). */
- if (list->prefixlist && !list->abbrev_flag)
- cmd_show_list (*list->prefixlist, from_tty, list->prefixname + 5);
- if (list->type == show_cmd)
- {
- fputs_filtered (prefix, gdb_stdout);
- fputs_filtered (list->name, gdb_stdout);
- fputs_filtered (": ", gdb_stdout);
- do_setshow_command ((char *)NULL, from_tty, list);
- }
- }
-}
-
-/* ARGSUSED */
-static void
-shell_escape (arg, from_tty)
- char *arg;
- int from_tty;
-{
-#ifdef CANT_FORK
- /* FIXME: what about errors (I don't know how GO32 system() handles
- them)? */
- system (arg);
-#else /* Can fork. */
- int rc, status, pid;
- char *p, *user_shell;
-
- if ((user_shell = (char *) getenv ("SHELL")) == NULL)
- user_shell = "/bin/sh";
-
- /* Get the name of the shell for arg0 */
- if ((p = strrchr (user_shell, '/')) == NULL)
- p = user_shell;
- else
- p++; /* Get past '/' */
-
- if ((pid = fork()) == 0)
- {
- if (!arg)
- execl (user_shell, p, 0);
- else
- execl (user_shell, p, "-c", arg, 0);
-
- fprintf_unfiltered (gdb_stderr, "Cannot execute %s: %s\n", user_shell,
- safe_strerror (errno));
- gdb_flush (gdb_stderr);
- _exit (0177);
- }
-
- if (pid != -1)
- while ((rc = wait (&status)) != pid && rc != -1)
- ;
- else
- error ("Fork failed");
-#endif /* Can fork. */
-}
-
-static void
-make_command (arg, from_tty)
- char *arg;
- int from_tty;
-{
- char *p;
-
- if (arg == 0)
- p = "make";
- else
- {
- p = xmalloc (sizeof("make ") + strlen(arg));
- strcpy (p, "make ");
- strcpy (p + sizeof("make ")-1, arg);
- }
-
- shell_escape (p, from_tty);
-}
-
-static void
-show_user_1 (c, stream)
- struct cmd_list_element *c;
- GDB_FILE *stream;
-{
- register struct command_line *cmdlines;
-
- cmdlines = c->user_commands;
- if (!cmdlines)
- return;
- fputs_filtered ("User command ", stream);
- fputs_filtered (c->name, stream);
- fputs_filtered (":\n", stream);
-
- while (cmdlines)
- {
- print_command_line (cmdlines, 4);
- cmdlines = cmdlines->next;
- }
- fputs_filtered ("\n", stream);
-}
-
-/* ARGSUSED */
-static void
-show_user (args, from_tty)
- char *args;
- int from_tty;
-{
- struct cmd_list_element *c;
- extern struct cmd_list_element *cmdlist;
-
- if (args)
- {
- c = lookup_cmd (&args, cmdlist, "", 0, 1);
- if (c->class != class_user)
- error ("Not a user command.");
- show_user_1 (c, gdb_stdout);
- }
- else
- {
- for (c = cmdlist; c; c = c->next)
- {
- if (c->class == class_user)
- show_user_1 (c, gdb_stdout);
- }
- }
-}
-
-void
-_initialize_command ()
-{
- add_com ("shell", class_support, shell_escape,
- "Execute the rest of the line as a shell command. \n\
-With no arguments, run an inferior shell.");
-
- if (xdb_commands)
- add_com_alias("!", "shell", class_support, 0);
-
- add_com ("make", class_support, make_command,
- "Run the ``make'' program using the rest of the line as arguments.");
- add_cmd ("user", no_class, show_user,
- "Show definitions of user defined commands.\n\
-Argument is the name of the user defined command.\n\
-With no argument, show definitions of all user defined commands.", &showlist);
-}
diff --git a/contrib/gdb/gdb/config/i386/cygwin32.mh b/contrib/gdb/gdb/config/i386/cygwin32.mh
deleted file mode 100644
index 25f15cfcd031..000000000000
--- a/contrib/gdb/gdb/config/i386/cygwin32.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-MH_CFLAGS=
-XM_FILE=xm-cygwin32.h
-TERMCAP=
-NATDEPFILES=win32-nat.o
-XM_CLIBS=-lkernel32
-
diff --git a/contrib/gdb/gdb/config/i386/cygwin32.mt b/contrib/gdb/gdb/config/i386/cygwin32.mt
deleted file mode 100644
index 22b45473ad61..000000000000
--- a/contrib/gdb/gdb/config/i386/cygwin32.mt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Target: Intel 386 run win32
-TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-cygwin32.h
-
-
-
diff --git a/contrib/gdb/gdb/config/i386/nm-sun386.h b/contrib/gdb/gdb/config/i386/nm-sun386.h
deleted file mode 100644
index f7a904b4f1a3..000000000000
--- a/contrib/gdb/gdb/config/i386/nm-sun386.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Native support for Sun 386i, for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Do implement the attach and detach commands. */
-
-#define ATTACH_DETACH
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-#define FETCH_INFERIOR_REGISTERS
-
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
diff --git a/contrib/gdb/gdb/config/i386/sun386.mh b/contrib/gdb/gdb/config/i386/sun386.mh
deleted file mode 100644
index d2496610b173..000000000000
--- a/contrib/gdb/gdb/config/i386/sun386.mh
+++ /dev/null
@@ -1,5 +0,0 @@
-# Host: Sun 386i
-XDEPFILES=
-XM_FILE= xm-sun386.h
-NAT_FILE= nm-sun386.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o sun386-nat.o
diff --git a/contrib/gdb/gdb/config/i386/sun386.mt b/contrib/gdb/gdb/config/i386/sun386.mt
deleted file mode 100644
index 665ca643fd55..000000000000
--- a/contrib/gdb/gdb/config/i386/sun386.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Sun 386i target configuration file.
-TDEPFILES= i386-tdep.o solib.o
-TM_FILE= tm-sun386.h
diff --git a/contrib/gdb/gdb/config/i386/tm-cygwin32.h b/contrib/gdb/gdb/config/i386/tm-cygwin32.h
deleted file mode 100644
index f7464ba66cba..000000000000
--- a/contrib/gdb/gdb/config/i386/tm-cygwin32.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* Macro definitions for i386 running under the win32 API Unix.
- Copyright 1995, 1996 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-#include "i386/tm-i386v.h"
-
-#undef MAX_REGISTER_RAW_SIZE
-#undef MAX_REGISTER_VIRTUAL_SIZE
-#undef NUM_REGS
-#undef REGISTER_BYTE
-#undef REGISTER_BYTES
-#undef REGISTER_CONVERTIBLE
-#undef REGISTER_CONVERT_TO_RAW
-#undef REGISTER_CONVERT_TO_VIRTUAL
-#undef REGISTER_NAMES
-#undef REGISTER_RAW_SIZE
-#undef REGISTER_VIRTUAL_SIZE
-#undef REGISTER_VIRTUAL_TYPE
-
-/* Number of machine registers */
-
-#define NUM_REGS 24
-
-/* Initializer for an array of names of registers.
- There should be NUM_REGS strings in this initializer. */
-
-/* the order of the first 8 registers must match the compiler's
- * numbering scheme (which is the same as the 386 scheme)
- * also, this table must match regmap in i386-pinsn.c.
- */
-
-#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
- "esp", "ebp", "esi", "edi", \
- "eip", "ps", "cs", "ss", \
- "ds", "es", "fs", "gs", \
- "st", "st(1)","st(2)","st(3)",\
- "st(4)","st(5)","st(6)","st(7)",}
-
-#define FP0_REGNUM 16
-
-/* Total amount of space needed to store our copies of the machine's
- register state, the array `registers'. */
-
-#define REGISTER_BYTES (16 * 4 + 8 * 10)
-
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#define REGISTER_BYTE(N) (((N) < 16) ? (N) * 4 : (((N) - 16) * 10) + (16 * 4))
-
-/* Number of bytes of storage in the actual machine representation
- for register N. */
-
-#define REGISTER_RAW_SIZE(N) (((N) < 16) ? 4 : 10)
-
-/* Number of bytes of storage in the program's representation
- for register N. */
-
-#define REGISTER_VIRTUAL_SIZE(N) (((N) < 16) ? 4 : 10)
-
-/* Largest value REGISTER_RAW_SIZE can have. */
-
-#define MAX_REGISTER_RAW_SIZE 10
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-
-#define MAX_REGISTER_VIRTUAL_SIZE 10
-
-/* Nonzero if register N requires conversion
- from raw format to virtual format. */
-
-#define REGISTER_CONVERTIBLE(N) \
- ((N < FP0_REGNUM) ? 0 : 1)
-
-/* Convert data from raw format for register REGNUM in buffer FROM
- to virtual format with type TYPE in buffer TO. */
-extern void
-i387_to_double PARAMS ((char *, char *));
-
-
-#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
-{ \
- double val; \
- i387_to_double ((FROM), (char *)&val); \
- store_floating ((TO), TYPE_LENGTH (TYPE), val); \
-}
-
-extern void
-double_to_i387 PARAMS ((char *, char *));
-
-#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
-{ \
- double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
- double_to_i387((char *)&val, (TO)); \
-}
-
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
-
-#define REGISTER_VIRTUAL_TYPE(N) \
- ((N < FP0_REGNUM) ? builtin_type_int : \
- builtin_type_double)
-
-#define NAMES_HAVE_UNDERSCORE
-
-
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) skip_trampoline_code (pc, name)
-#define SKIP_TRAMPOLINE_CODE(pc) skip_trampoline_code (pc, 0)
-extern CORE_ADDR skip_trampoline_code PARAMS ((CORE_ADDR pc, char *name));
diff --git a/contrib/gdb/gdb/config/i386/tm-sun386.h b/contrib/gdb/gdb/config/i386/tm-sun386.h
deleted file mode 100644
index 259fd5182387..000000000000
--- a/contrib/gdb/gdb/config/i386/tm-sun386.h
+++ /dev/null
@@ -1,205 +0,0 @@
-/* Parameters for a Sun 386i target machine, for GDB, the GNU debugger.
- Copyright 1986, 1987, 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. */
-
-#if !defined (TM_SUN386_H)
-#define TM_SUN386_H 1
-
-#include "i386/tm-i386.h"
-
-#ifndef sun386
-#define sun386
-#endif
-#define GDB_TARGET_IS_SUN386 1
-#define SUNOS4
-#define USE_MACHINE_REG_H
-
-/* Perhaps some day this will work even without the following #define */
-#define COFF_ENCAPSULATE
-
-#ifdef COFF_ENCAPSULATE
-/* Avoid conflicts between our include files and <sys/exec.h>
- (maybe not needed anymore). */
-#define _EXEC_
-#endif
-
-/* sun386 ptrace seems unable to change the frame pointer */
-#define PTRACE_FP_BUG
-
-/* Address of end of stack space. */
-
-#define STACK_END_ADDR 0xfc000000
-
-/* Number of machine registers */
-
-#undef NUM_REGS
-#define NUM_REGS 35
-
-/* Initializer for an array of names of registers. There should be NUM_REGS
- strings in this initializer. The order of the first 8 registers must match
- the compiler's numbering scheme (which is the same as the 386 scheme) also,
- this table must match regmap in i386-pinsn.c. */
-
-#undef REGISTER_NAMES
-#define REGISTER_NAMES { "gs", "fs", "es", "ds", \
- "edi", "esi", "ebp", "esp", \
- "ebx", "edx", "ecx", "eax", \
- "retaddr", "trapnum", "errcode", "ip", \
- "cs", "ps", "sp", "ss", \
- "fst0", "fst1", "fst2", "fst3", \
- "fst4", "fst5", "fst6", "fst7", \
- "fctrl", "fstat", "ftag", "fip", \
- "fcs", "fopoff", "fopsel" \
- }
-
-/* 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. */
-
-#undef FP_REGNUM
-#define FP_REGNUM 6 /* (ebp) Contains address of executing stack frame */
-#undef SP_REGNUM
-#define SP_REGNUM 18 /* (usp) Contains address of top of stack */
-#undef PS_REGNUM
-#define PS_REGNUM 17 /* (ps) Contains processor status */
-#undef PC_REGNUM
-#define PC_REGNUM 15 /* (eip) Contains program counter */
-#undef FP0_REGNUM
-#define FP0_REGNUM 20 /* Floating point register 0 */
-#undef FPC_REGNUM
-#define FPC_REGNUM 28 /* 80387 control register */
-
-/* Total amount of space needed to store our copies of the machine's
- register state, the array `registers'. */
-
-#undef REGISTER_BYTES
-#define REGISTER_BYTES (20*4+8*10+7*4)
-
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#undef REGISTER_BYTE
-#define REGISTER_BYTE(N) \
- ((N) >= FPC_REGNUM ? (((N) - FPC_REGNUM) * 4) + 160 \
- : (N) >= FP0_REGNUM ? (((N) - FP0_REGNUM) * 10) + 80 \
- : (N) * 4)
-
-/* Number of bytes of storage in the actual machine representation
- for register N. */
-
-#undef REGISTER_RAW_SIZE
-#define REGISTER_RAW_SIZE(N) (((unsigned)((N) - FP0_REGNUM)) < 8 ? 10 : 4)
-
-/* Number of bytes of storage in the program's representation
- for register N. */
-
-#undef REGISTER_VIRTUAL_SIZE
-#define REGISTER_VIRTUAL_SIZE(N) (((unsigned)((N) - FP0_REGNUM)) < 8 ? 8 : 4)
-
-/* Nonzero if register N requires conversion
- from raw format to virtual format. */
-
-#undef REGISTER_CONVERTIBLE
-#define REGISTER_CONVERTIBLE(N) (((unsigned)((N) - FP0_REGNUM)) < 8)
-
-/* Convert data from raw format for register REGNUM in buffer FROM
- to virtual format with type TYPE in buffer TO. */
-
-#undef REGISTER_CONVERT_TO_VIRTUAL
-#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
-{ \
- double val; \
- i387_to_double ((FROM), (char *)&val); \
- store_floating ((TO), TYPE_LENGTH (TYPE), val); \
-}
-extern void
-i387_to_double PARAMS ((char *, char *));
-
-/* Convert data from virtual format with type TYPE in buffer FROM
- to raw format for register REGNUM in buffer TO. */
-
-#undef REGISTER_CONVERT_TO_RAW
-#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
-{ \
- double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
- double_to_i387((char *)&val, (TO)); \
-}
-extern void
-double_to_i387 PARAMS ((char *, char *));
-
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
-
-#undef REGISTER_VIRTUAL_TYPE
-#define REGISTER_VIRTUAL_TYPE(N) \
- (((unsigned)((N) - FP0_REGNUM)) < 8 ? builtin_type_double : builtin_type_int)
-
-/* 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. */
-
-#undef EXTRACT_RETURN_VALUE
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- memcpy (VALBUF, REGBUF + REGISTER_BYTE (TYPE_CODE (TYPE) == TYPE_CODE_FLT ? FP0_REGNUM : 11), TYPE_LENGTH (TYPE))
-
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. */
-
-#undef STORE_RETURN_VALUE
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
- write_register_bytes (REGISTER_BYTE (TYPE_CODE (TYPE) == TYPE_CODE_FLT ? FP0_REGNUM : 11), VALBUF, TYPE_LENGTH (TYPE))
-
-/* 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. */
-
-#undef FRAME_CHAIN
-#define FRAME_CHAIN(thisframe) \
- (!inside_entry_file ((thisframe)->pc) ? \
- read_memory_integer ((thisframe)->frame, 4) :\
- 0)
-
-/* 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. */
-
-#undef FRAMELESS_FUNCTION_INVOCATION
-#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
-{ (FRAMELESS) = frameless_look_for_prologue (FI); }
-
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
-
-/* Insert the specified number of args and function address
- into a call sequence of the above form stored at DUMMYNAME. */
-
-#undef FIX_CALL_DUMMY
-#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
-{ \
- *(int *)((char *)(dummyname) + 1) = (int)(fun) - (pc) - 5; \
-}
-
-#endif /* !defined (TM_SUN386_H) */
-
diff --git a/contrib/gdb/gdb/config/i386/windows.mh b/contrib/gdb/gdb/config/i386/windows.mh
deleted file mode 100644
index 3933a6e00533..000000000000
--- a/contrib/gdb/gdb/config/i386/windows.mh
+++ /dev/null
@@ -1,17 +0,0 @@
-# gdbwin.o and ser-win32s.c have to be named because they have
-# _initialize functions that need to be found by init.c
-# gui.ores has to be named, or else msvc won't link it in.
-XDEPFILES = \
- mswin/gdbwin.o \
- mswin/ser-win32s.o \
- mswin/gui.ores \
- mswin/libwingdb.a
-
-$(XDEPFILES):
- rootme=`pwd` ; export rootme ; \
- ( cd mswin ; \
- $(MAKE) $(FLAGS_TO_PASS) all )
-
-XM_FILE=xm-windows.h
-MMALLOC=
-SER_HARDWIRE =
diff --git a/contrib/gdb/gdb/config/i386/xm-cygwin32.h b/contrib/gdb/gdb/config/i386/xm-cygwin32.h
deleted file mode 100644
index becbebe08ba3..000000000000
--- a/contrib/gdb/gdb/config/i386/xm-cygwin32.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Definitions for hosting on WIN32, for GDB.
- Copyright 1995, 1996 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define HOST_BYTE_ORDER LITTLE_ENDIAN
-
-#include "fopen-bin.h"
-
-#define GDBINIT_FILENAME "gdb.ini"
-
-
-#define SLASH_P(X) ((X)=='\\' || (X) == '/')
-#define ROOTED_P(X) ((SLASH_P((X)[0]))|| ((X)[1] ==':'))
-#define SLASH_CHAR '/'
-#define SLASH_STRING "/"
-
-
-/* If we longjmp out of the signal handler we never get another one.
- So disable immediate_quit inside request_quit */
-#define REQUEST_QUIT
-
-
-
-
-
-
diff --git a/contrib/gdb/gdb/config/i386/xm-i386lynx.h b/contrib/gdb/gdb/config/i386/xm-i386lynx.h
deleted file mode 100644
index 6078cb6f2cba..000000000000
--- a/contrib/gdb/gdb/config/i386/xm-i386lynx.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Host-dependent definitions for Intel 386 running LynxOS.
- Copyright 1993 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define HOST_BYTE_ORDER LITTLE_ENDIAN
-
-/* Get generic LynxOS host definitions. */
-
-#include "xm-lynx.h"
diff --git a/contrib/gdb/gdb/config/i386/xm-linux.h b/contrib/gdb/gdb/config/i386/xm-linux.h
deleted file mode 100644
index 217c6d4d0949..000000000000
--- a/contrib/gdb/gdb/config/i386/xm-linux.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Native support for GNU/Linux, for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef XM_LINUX_H
-#define XM_LINUX_H
-
-#define HOST_BYTE_ORDER LITTLE_ENDIAN
-
-#define HAVE_TERMIOS
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-#define KERNEL_U_ADDR 0x0
-
-#define NEED_POSIX_SETPGID
-
-/* Need R_OK etc, but USG isn't defined. */
-#include <unistd.h>
-
-#endif /* #ifndef XM_LINUX_H */
diff --git a/contrib/gdb/gdb/config/i386/xm-sun386.h b/contrib/gdb/gdb/config/i386/xm-sun386.h
deleted file mode 100644
index 51c3b58c11b6..000000000000
--- a/contrib/gdb/gdb/config/i386/xm-sun386.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Host support for Sun 386i, for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1989, 1992, 1996 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define HOST_BYTE_ORDER LITTLE_ENDIAN
diff --git a/contrib/gdb/gdb/config/i386/xm-windows.h b/contrib/gdb/gdb/config/i386/xm-windows.h
deleted file mode 100644
index e083010067cd..000000000000
--- a/contrib/gdb/gdb/config/i386/xm-windows.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Definitions for hosting on WIN32, built with Microsoft Visual C/C++, for GDB.
- Copyright 1996, 1998 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "i386/xm-cygwin.h"
-
-#undef PRINTF_HAS_LONG_LONG
-#undef HAVE_UNISTD_H
-#undef HAVE_TERMIO_H
-#undef HAVE_TERMIOS_H
-#undef HAVE_SGTTY_H
-#undef HAVE_SBRK
-#define CANT_FORK
-
-#define MALLOC_INCOMPATIBLE
-
-#include <malloc.h>
-
-#define SIGQUIT 3
-#define SIGTRAP 5
diff --git a/contrib/gdb/gdb/config/nm-empty.h b/contrib/gdb/gdb/config/nm-empty.h
deleted file mode 100644
index 7069d8c8a4e8..000000000000
--- a/contrib/gdb/gdb/config/nm-empty.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* This is just a dummy file to symlink to when GDB is configured as a
- cross-only debugger. */
diff --git a/contrib/gdb/gdb/config/nm-gnu.h b/contrib/gdb/gdb/config/nm-gnu.h
deleted file mode 100644
index 8f17406abc2d..000000000000
--- a/contrib/gdb/gdb/config/nm-gnu.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Common declarations for the GNU Hurd
-
- Copyright 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
-
- The GNU Hurd is free software; you can redistribute 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.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef __NM_GNU_H__
-#define __NM_GNU_H__
-
-#include <unistd.h>
-#include <mach.h>
-#include <mach/exception.h>
-#include "regcache.h"
-
-extern char *gnu_target_pid_to_str (int pid);
-
-/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
-
-/* Don't do wait_for_inferior on attach. */
-#define ATTACH_NO_WAIT
-
-/* Use SVR4 style shared library support */
-#define SVR4_SHARED_LIBS
-#include "solib.h"
-#define NO_CORE_OPS
-
-#endif /* __NM_GNU_H__ */
diff --git a/contrib/gdb/gdb/config/nm-lynx.h b/contrib/gdb/gdb/config/nm-lynx.h
deleted file mode 100644
index 1cd2bd1ceb1a..000000000000
--- a/contrib/gdb/gdb/config/nm-lynx.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Native-dependent definitions for LynxOS.
- Copyright 1993, 1994, 1995, 1996, 1999, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef NM_LYNX_H
-#define NM_LYNX_H
-
-#include <sys/conf.h>
-#include <sys/kernel.h>
-/* sys/kernel.h should define this, but doesn't always, sigh. */
-#ifndef __LYNXOS
-#define __LYNXOS
-#endif
-#include <sys/mem.h>
-#include <sys/signal.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/itimer.h>
-#include <sys/file.h>
-#include <sys/proc.h>
-#include "gdbthread.h"
-
-/* This is the amount to subtract from u.u_ar0 to get the offset in
- the core file of the register values. */
-
-#define KERNEL_U_ADDR 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 *. */
-#define PTRACE_ARG3_TYPE int
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-
-#define FETCH_INFERIOR_REGISTERS
-
-/* Thread ID of stopped thread. */
-
-#define WIFTID(x) (((union wait *)&x)->w_tid)
-
-/* Override child_wait in inftarg.c */
-
-#define CHILD_WAIT
-
-/* Override child_resume in infptrace.c */
-
-#define CHILD_RESUME
-
-/* Override child_thread_alive in intarg.c */
-
-#define CHILD_THREAD_ALIVE
-
-#include "target.h"
-
-extern ptid_t child_wait (ptid_t ptid,
- struct target_waitstatus *status);
-
-/* Lynx needs a special definition of this so that we can
- print out the pid and thread number seperately. */
-
-
-/* override child_pid_to_str in inftarg.c */
-#define CHILD_PID_TO_STR
-extern char *lynx_pid_to_str (ptid_t ptid);
-
-#endif /* NM_LYNX_H */
diff --git a/contrib/gdb/gdb/config/nm-m3.h b/contrib/gdb/gdb/config/nm-m3.h
deleted file mode 100644
index f89838ed9676..000000000000
--- a/contrib/gdb/gdb/config/nm-m3.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Mach 3.0 common definitions and global vars.
-
- Copyright 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef NM_M3_H
-#define NM_M3_H
-
-#include <mach.h>
-#include "regcache.h"
-
-/* Mach3 doesn't declare errno in <errno.h>. */
-extern int errno;
-
-/* Task port of our debugged inferior. */
-
-extern task_t inferior_task;
-
-/* Thread port of the current thread in the inferior. */
-
-extern thread_t current_thread;
-
-/* If nonzero, we must suspend/abort && resume threads
- * when setting or getting the state.
- */
-extern int must_suspend_thread;
-
-#define PREPARE_TO_PROCEED(select_it) mach3_prepare_to_proceed(select_it)
-
-/* Try to get the privileged host port for authentication to machid
-
- * If you can get this, you may debug anything on this host.
- *
- * If you can't, gdb gives it's own task port as the
- * authentication port
- */
-#define mach_privileged_host_port() task_by_pid(-1)
-
-/*
- * This is the MIG ID number of the emulator/server bsd_execve() RPC call.
- *
- * It SHOULD never change, but if it does, gdb `run'
- * command won't work until you fix this define.
- *
- */
-#define MIG_EXEC_SYSCALL_ID 101000
-
-/* If our_message_port gets a msg with this ID,
- * GDB suspends it's inferior and enters command level.
- * (Useful at least if ^C does not work)
- */
-#define GDB_MESSAGE_ID_STOP 0x41151
-
-/* wait3 WNOHANG is defined in <sys/wait.h> but
- * for some reason gdb does not want to include
- * that file.
- *
- * If your system defines WNOHANG differently, this has to be changed.
- */
-#define WNOHANG 1
-
-/* Before storing, we need to read all the registers. */
-
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
-
-/* Check if the inferior exists */
-#define MACH_ERROR_NO_INFERIOR \
- do if (!MACH_PORT_VALID (inferior_task)) \
- error ("Inferior task does not exist."); while(0)
-
-/* Error handler for mach calls */
-#define CHK(str,ret) \
- do if (ret != KERN_SUCCESS) \
- error ("Gdb %s [%d] %s : %s\n",__FILE__,__LINE__,str, \
- mach_error_string(ret)); while(0)
-
-/* This is from POE9 emulator/emul_stack.h
- */
-/*
- * Top of emulator stack holds link and reply port.
- */
-struct emul_stack_top
- {
- struct emul_stack_top *link;
- mach_port_t reply_port;
- };
-
-#define EMULATOR_STACK_SIZE (4096*4)
-
-#define THREAD_ALLOWED_TO_BREAK(mid) mach_thread_for_breakpoint (mid)
-
-#define THREAD_PARSE_ID(arg) mach_thread_parse_id (arg)
-
-#define THREAD_OUTPUT_ID(mid) mach_thread_output_id (mid)
-
-#define ATTACH_TO_THREAD attach_to_thread
-
-/* Don't do wait_for_inferior on attach. */
-#define ATTACH_NO_WAIT
-
-/* Do Mach 3 dependent operations when ^C or a STOP is requested */
-#define DO_QUIT() mach3_quit ()
-
-#if 0
-/* This is bogus. It is NOT OK to quit out of target_wait. */
-/* If in mach_msg() and ^C is typed set immediate_quit */
-#define REQUEST_QUIT() mach3_request_quit ()
-#endif
-
-#endif /* NM_M3_H */
diff --git a/contrib/gdb/gdb/config/nm-nbsd.h b/contrib/gdb/gdb/config/nm-nbsd.h
deleted file mode 100644
index 402f606fd267..000000000000
--- a/contrib/gdb/gdb/config/nm-nbsd.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* Native-dependent definitions for NetBSD.
- Copyright 1994, 1996, 1999 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define PTRACE_ARG3_TYPE char*
-
-#define FETCH_INFERIOR_REGISTERS
-
-#define ATTACH_DETACH
-
-#include "solib.h" /* Support for shared libraries. */
-#if defined (SVR4_SHARED_LIBS)
-#include "elf/common.h" /* Additional ELF shared library info. */
-#endif
-
-#if !defined (SVR4_SHARED_LIBS)
-
-/* make structure definitions match up with those expected in solib.c */
-#define link_object sod
-#define lo_name sod_name
-#define lo_library sod_library
-#define lo_unused sod_reserved
-#define lo_major sod_major
-#define lo_minor sod_minor
-#define lo_next sod_next
-
-#define link_map so_map
-#define lm_addr som_addr
-#define lm_name som_path
-#define lm_next som_next
-#define lm_lop som_sod
-#define lm_lob som_sodbase
-#define lm_rwt som_write
-#define lm_ld som_dynamic
-#define lm_lpd som_spd
-
-#define link_dynamic_2 section_dispatch_table
-#define ld_loaded sdt_loaded
-#define ld_need sdt_sods
-#define ld_rules sdt_filler1
-#define ld_got sdt_got
-#define ld_plt sdt_plt
-#define ld_rel sdt_rel
-#define ld_hash sdt_hash
-#define ld_stab sdt_nzlist
-#define ld_stab_hash sdt_filler2
-#define ld_buckets sdt_buckets
-#define ld_symbols sdt_strings
-#define ld_symb_size sdt_str_sz
-#define ld_text sdt_text_sz
-#define ld_plt_sz sdt_plt_sz
-
-#define rtc_symb rt_symbol
-#define rtc_sp rt_sp
-#define rtc_next rt_next
-
-#define ld_debug so_debug
-#define ldd_version dd_version
-#define ldd_in_debugger dd_in_debugger
-#define ldd_sym_loaded dd_sym_loaded
-#define ldd_bp_addr dd_bpt_addr
-#define ldd_bp_inst dd_bpt_shadow
-#define ldd_cp dd_cc
-
-#define link_dynamic _dynamic
-#define ld_version d_version
-#define ldd d_debug
-#define ld_un d_un
-#define ld_2 d_sdt
-
-#endif
diff --git a/contrib/gdb/gdb/config/nm-sysv4.h b/contrib/gdb/gdb/config/nm-sysv4.h
deleted file mode 100644
index 4b4f09897bc3..000000000000
--- a/contrib/gdb/gdb/config/nm-sysv4.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Definitions for running gdb on a host machine running any flavor of SVR4.
- Copyright 1991, 1992, 1993, 1998 Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygnus.com).
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Use SVR4 style shared library support */
-
-#define SVR4_SHARED_LIBS
-#include "solib.h"
-
-/* SVR4 has /proc support, so use it instead of ptrace. */
-
-#define USE_PROC_FS
-
-/* SVR4 machines can easily do attach and detach via /proc (procfs.c)
- support */
-
-#define ATTACH_DETACH
diff --git a/contrib/gdb/gdb/config/tm-lynx.h b/contrib/gdb/gdb/config/tm-lynx.h
deleted file mode 100644
index 13aeca1c3f7a..000000000000
--- a/contrib/gdb/gdb/config/tm-lynx.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Macro definitions for LynxOS targets.
- Copyright 1993, 1995 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef TM_LYNX_H
-#define TM_LYNX_H
-
-/* Override number of expected traps from sysv. */
-#define START_INFERIOR_TRAPS_EXPECTED 2
-
-#include "coff-solib.h" /* COFF shared library support */
-
-/* Lynx's signal.h doesn't seem to have any macros for what signal numbers
- the real-time events are. */
-#define REALTIME_LO 33
-/* One more than the last one. */
-#define REALTIME_HI 64
-
-#endif /* TM_LYNX_H */
diff --git a/contrib/gdb/gdb/config/tm-nbsd.h b/contrib/gdb/gdb/config/tm-nbsd.h
deleted file mode 100644
index d002d6bb2b58..000000000000
--- a/contrib/gdb/gdb/config/tm-nbsd.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Target machine sub-description for NetBSD.
- This is included by other tm-*.h files to specify NetBSD-specific stuff.
- Copyright 1993, 1994 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef SVR4_SHARED_LIBS
-
-/* Return non-zero if we are in a shared library trampoline code stub. */
-
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
- (name && !strcmp(name, "_DYNAMIC"))
-
-#endif /* !SVR4_SHARED_LIBS */
diff --git a/contrib/gdb/gdb/config/tm-sunos.h b/contrib/gdb/gdb/config/tm-sunos.h
deleted file mode 100644
index c8db07e865e1..000000000000
--- a/contrib/gdb/gdb/config/tm-sunos.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Target machine sub-description for SunOS version 4.
- This is included by other tm-*.h files to specify SunOS-specific stuff.
- Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "solib.h" /* Support for shared libraries. */
-
-/* Return non-zero if we are in a shared library trampoline code stub. */
-
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
- lookup_solib_trampoline_symbol_by_pc (pc)
-
-/* If PC is in a shared library trampoline code, return the PC
- where the function itself actually starts. If not, return 0. */
-
-#define SKIP_TRAMPOLINE_CODE(pc) find_solib_trampoline_target (pc)
diff --git a/contrib/gdb/gdb/config/tm-sysv4.h b/contrib/gdb/gdb/config/tm-sysv4.h
deleted file mode 100644
index 35b95eb71f89..000000000000
--- a/contrib/gdb/gdb/config/tm-sysv4.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Macro definitions for GDB on all SVR4 target systems.
- Copyright 1991, 1992, 1993, 1994, 1996, 1997, 2000
- Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygnus.com).
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* For SVR4 shared libraries, each call to a library routine goes through
- a small piece of trampoline code in the ".plt" section.
- The horribly ugly wait_for_inferior() routine uses this macro to detect
- when we have stepped into one of these fragments.
- We do not use lookup_solib_trampoline_symbol_by_pc, because
- we cannot always find the shared library trampoline symbols
- (e.g. on Irix5). */
-
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) in_plt_section((pc), (name))
-extern int in_plt_section (CORE_ADDR, char *);
-
-/* If PC is in a shared library trampoline code, return the PC
- where the function itself actually starts. If not, return 0. */
-
-#define SKIP_TRAMPOLINE_CODE(pc) find_solib_trampoline_target (pc)
-
-/* It is unknown which, if any, SVR4 assemblers do not accept dollar signs
- in identifiers. The default in G++ is to use dots instead, for all SVR4
- systems, so we make that our default also. FIXME: There should be some
- way to get G++ to tell us what CPLUS_MARKER it is using, perhaps by
- stashing it in the debugging information as part of the name of an
- invented symbol ("gcc_cplus_marker$" for example). */
-
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
diff --git a/contrib/gdb/gdb/config/xm-aix4.h b/contrib/gdb/gdb/config/xm-aix4.h
deleted file mode 100644
index bea086a371b7..000000000000
--- a/contrib/gdb/gdb/config/xm-aix4.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Parameters for hosting on an PowerPC, for GDB, the GNU debugger.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
- Contributed by Cygnus Corporation.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* The following text is taken from config/rs6000.mh:
- * # The IBM version of /usr/include/rpc/rpc.h has a bug -- it says
- * # `extern fd_set svc_fdset;' without ever defining the type fd_set.
- * # Unfortunately this occurs in the vx-share code, which is not configured
- * # like the rest of GDB (e.g. it doesn't include "defs.h").
- * # We circumvent this bug by #define-ing fd_set here, but undefining it in
- * # the xm-rs6000.h file before ordinary modules try to use it. FIXME, IBM!
- * MH_CFLAGS='-Dfd_set=int'
- * So, here we do the undefine...which has to occur before we include
- * <sys/select.h> below.
- */
-#undef fd_set
-
-#include <sys/select.h>
-
-/* At least as of AIX 3.2, we have termios. */
-#define HAVE_TERMIOS 1
-/* #define HAVE_TERMIO 1 */
-
-#define USG 1
-
-#define FIVE_ARG_PTRACE
-
-/* This system requires that we open a terminal with O_NOCTTY for it to
- not become our controlling terminal. */
-
-#define USE_O_NOCTTY
-
-/* Brain death inherited from PC's pervades. */
-#undef NULL
-#define NULL 0
-
-/* The IBM compiler requires this in order to properly compile alloca(). */
-#pragma alloca
-
-/* There is no vfork. */
-
-#define vfork fork
-
-char *termdef ();
-
-/* Signal handler for SIGWINCH `window size changed'. */
-
-#define SIGWINCH_HANDLER aix_resizewindow
-extern void aix_resizewindow (int);
-
-/* `lines_per_page' and `chars_per_line' are local to utils.c. Rectify this. */
-
-#define SIGWINCH_HANDLER_BODY \
- \
-/* Respond to SIGWINCH `window size changed' signal, and reset GDB's \
- window settings appropriately. */ \
- \
-void \
-aix_resizewindow (signo) \
- int signo; \
-{ \
- int fd = fileno (stdout); \
- if (isatty (fd)) { \
- int val; \
- \
- val = atoi (termdef (fd, 'l')); \
- if (val > 0) \
- lines_per_page = val; \
- val = atoi (termdef (fd, 'c')); \
- if (val > 0) \
- chars_per_line = val; \
- } \
-}
diff --git a/contrib/gdb/gdb/config/xm-lynx.h b/contrib/gdb/gdb/config/xm-lynx.h
deleted file mode 100644
index 6f19abdb8105..000000000000
--- a/contrib/gdb/gdb/config/xm-lynx.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Host-dependent definitions for any CPU running LynxOS.
- Copyright 1993 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* for INT_MIN, to avoid "INT_MIN redefined" warnings from defs.h */
-
-#include <limits.h>
diff --git a/contrib/gdb/gdb/config/xm-mpw.h b/contrib/gdb/gdb/config/xm-mpw.h
deleted file mode 100644
index 0c473d755726..000000000000
--- a/contrib/gdb/gdb/config/xm-mpw.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Macro definitions for running GDB on Apple Macintoshes.
- Copyright (C) 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 "mpw.h"
-
-#include "fopen-bin.h"
-
-#include "spin.h"
-
-#define CANT_FORK
-
-/* Map these standard functions to versions that can do I/O in a console
- window. */
-
-#define printf hacked_printf
-#define fprintf hacked_fprintf
-#define vprintf hacked_vfprintf
-#define fputs hacked_fputs
-#define fputc hacked_fputc
-#undef putc
-#define putc hacked_putc
-#define fflush hacked_fflush
-
-#define fgetc hacked_fgetc
-
-#define POSIX_UTIME
-
-/* No declaration of strdup in MPW's string.h, oddly enough. */
-
-char *strdup (char *s1);
-
-/* '.' indicates drivers on the Mac, so we need a different filename. */
-
-#define GDBINIT_FILENAME "_gdbinit"
-
-/* Commas are more common to separate dirnames in a path on Macs. */
-
-#define DIRNAME_SEPARATOR ','
-
-/* This is a real crufty hack. */
-
-#define HAVE_TERMIO
-
-/* Addons to the basic MPW-supported signal list. */
-
-#ifndef SIGQUIT
-#define SIGQUIT (1<<6)
-#endif
-#ifndef SIGHUP
-#define SIGHUP (1<<7)
-#endif
-
-/* If __STDC__ is on, then this definition will be missing. */
-
-#ifndef fileno
-#define fileno(p) (p)->_file
-#endif
-
-#ifndef R_OK
-#define R_OK 4
-#endif
-
-extern int StandAlone;
-
-extern int mac_app;
diff --git a/contrib/gdb/gdb/config/xm-nbsd.h b/contrib/gdb/gdb/config/xm-nbsd.h
deleted file mode 100644
index c8d00f6dd639..000000000000
--- a/contrib/gdb/gdb/config/xm-nbsd.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Host-dependent definitions for any CPU running NetBSD.
- Copyright 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Include this to get things like NGROUPS which <limits.h> doesn't
- define on some systems. */
-#include <sys/param.h>
-
-/* NetBSD has termios facilities. */
-#define HAVE_TERMIOS
diff --git a/contrib/gdb/gdb/config/xm-sysv4.h b/contrib/gdb/gdb/config/xm-sysv4.h
deleted file mode 100644
index 614d40327727..000000000000
--- a/contrib/gdb/gdb/config/xm-sysv4.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Definitions for running gdb on a host machine running any flavor of SVR4.
- Copyright 1991, 1992, 1993, 1995, 1998 Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygnus.com).
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* SVR4 has termios facilities. */
-
-#undef HAVE_TERMIO
-#define HAVE_TERMIOS
-
-/* SVR4 is a derivative of System V Release 3 (USG) */
-
-#define USG
diff --git a/contrib/gdb/gdb/cpu32bug-rom.c b/contrib/gdb/gdb/cpu32bug-rom.c
deleted file mode 100644
index 2801be9ea0fb..000000000000
--- a/contrib/gdb/gdb/cpu32bug-rom.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/* Remote debugging interface for CPU32Bug Rom monitor for GDB, the GNU debugger.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
-
- Written by Stu Grossman 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. */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "monitor.h"
-#include "serial.h"
-#include "regcache.h"
-
-static void cpu32bug_open (char *args, int from_tty);
-
-static void
-cpu32bug_supply_register (char *regname, int regnamelen, char *val, int vallen)
-{
- int regno;
-
- if (regnamelen != 2)
- return;
-
- switch (regname[0])
- {
- case 'S':
- if (regname[1] != 'R')
- return;
- regno = PS_REGNUM;
- break;
- case 'P':
- if (regname[1] != 'C')
- return;
- regno = PC_REGNUM;
- break;
- case 'D':
- if (regname[1] < '0' || regname[1] > '7')
- return;
- regno = regname[1] - '0' + D0_REGNUM;
- break;
- case 'A':
- if (regname[1] < '0' || regname[1] > '7')
- return;
- regno = regname[1] - '0' + A0_REGNUM;
- break;
- default:
- return;
- }
-
- monitor_supply_register (regno, val);
-}
-
-/*
- * 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 *cpu32bug_regnames[NUM_REGS] =
-{
- "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
- "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7",
- "SR", "PC",
-};
-
-/*
- * Define the monitor command strings. Since these are passed directly
- * through to a printf style function, we need can include formatting
- * strings. We also need a CR or LF on the end.
- */
-
-static struct target_ops cpu32bug_ops;
-
-static char *cpu32bug_inits[] =
-{"\r", NULL};
-
-static struct monitor_ops cpu32bug_cmds;
-
-static void
-init_cpu32bug_cmds (void)
-{
- cpu32bug_cmds.flags = MO_CLR_BREAK_USES_ADDR;
- cpu32bug_cmds.init = cpu32bug_inits; /* Init strings */
- cpu32bug_cmds.cont = "g\r"; /* continue command */
- cpu32bug_cmds.step = "t\r"; /* single step */
- cpu32bug_cmds.stop = NULL; /* interrupt command */
- cpu32bug_cmds.set_break = "br %x\r"; /* set a breakpoint */
- cpu32bug_cmds.clr_break = "nobr %x\r"; /* clear a breakpoint */
- cpu32bug_cmds.clr_all_break = "nobr\r"; /* clear all breakpoints */
- cpu32bug_cmds.fill = "bf %x:%x %x;b\r"; /* fill (start count val) */
- cpu32bug_cmds.setmem.cmdb = "ms %x %02x\r"; /* setmem.cmdb (addr, value) */
- cpu32bug_cmds.setmem.cmdw = "ms %x %04x\r"; /* setmem.cmdw (addr, value) */
- cpu32bug_cmds.setmem.cmdl = "ms %x %08x\r"; /* setmem.cmdl (addr, value) */
- cpu32bug_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
- cpu32bug_cmds.setmem.resp_delim = NULL; /* setreg.resp_delim */
- cpu32bug_cmds.setmem.term = NULL; /* setreg.term */
- cpu32bug_cmds.setmem.term_cmd = NULL; /* setreg.term_cmd */
- cpu32bug_cmds.getmem.cmdb = "md %x:%x;b\r"; /* getmem.cmdb (addr, len) */
- cpu32bug_cmds.getmem.cmdw = "md %x:%x;b\r"; /* getmem.cmdw (addr, len) */
- cpu32bug_cmds.getmem.cmdl = "md %x:%x;b\r"; /* getmem.cmdl (addr, len) */
- cpu32bug_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
- cpu32bug_cmds.getmem.resp_delim = " "; /* getmem.resp_delim */
- cpu32bug_cmds.getmem.term = NULL; /* getmem.term */
- cpu32bug_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
- cpu32bug_cmds.setreg.cmd = "rs %s %x\r"; /* setreg.cmd (name, value) */
- cpu32bug_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
- cpu32bug_cmds.setreg.term = NULL; /* setreg.term */
- cpu32bug_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
- cpu32bug_cmds.getreg.cmd = "rs %s\r"; /* getreg.cmd (name) */
- cpu32bug_cmds.getreg.resp_delim = "="; /* getreg.resp_delim */
- cpu32bug_cmds.getreg.term = NULL; /* getreg.term */
- cpu32bug_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
- cpu32bug_cmds.dump_registers = "rd\r"; /* dump_registers */
- cpu32bug_cmds.register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- cpu32bug_cmds.supply_register = cpu32bug_supply_register; /* supply_register */
- cpu32bug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
- cpu32bug_cmds.load = "lo\r"; /* download command */
- cpu32bug_cmds.loadresp = "\n"; /* load response */
- cpu32bug_cmds.prompt = "CPU32Bug>"; /* monitor command prompt */
- cpu32bug_cmds.line_term = "\r"; /* end-of-line terminator */
- cpu32bug_cmds.cmd_end = NULL; /* optional command terminator */
- cpu32bug_cmds.target = &cpu32bug_ops; /* target operations */
- cpu32bug_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
- cpu32bug_cmds.regnames = cpu32bug_regnames; /* registers names */
- cpu32bug_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
-}; /* init_cpu32bug_cmds */
-
-static void
-cpu32bug_open (char *args, int from_tty)
-{
- monitor_open (args, &cpu32bug_cmds, from_tty);
-}
-
-void
-_initialize_cpu32bug_rom (void)
-{
- init_cpu32bug_cmds ();
- init_monitor_ops (&cpu32bug_ops);
-
- cpu32bug_ops.to_shortname = "cpu32bug";
- cpu32bug_ops.to_longname = "CPU32Bug monitor";
- cpu32bug_ops.to_doc = "Debug via the CPU32Bug monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- cpu32bug_ops.to_open = cpu32bug_open;
-
- add_target (&cpu32bug_ops);
-}
diff --git a/contrib/gdb/gdb/cxux-nat.c b/contrib/gdb/gdb/cxux-nat.c
deleted file mode 100644
index 742f89cdb19c..000000000000
--- a/contrib/gdb/gdb/cxux-nat.c
+++ /dev/null
@@ -1,537 +0,0 @@
-/* Native support for Motorola 88k running Harris CX/UX.
- Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 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 <sys/types.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include "gdbcore.h"
-#include <sys/user.h>
-
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "symtab.h"
-#include "regcache.h"
-
-#ifndef USER /* added to support BCS ptrace_user */
-#define USER ptrace_user
-#endif
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <sys/file.h>
-#include "gdb_stat.h"
-
-#include "symtab.h"
-#include "setjmp.h"
-#include "value.h"
-
-#include <sys/ptrace.h>
-
-/* CX/UX provides them already, but as word offsets instead of char offsets */
-#define SXIP_OFFSET (PT_SXIP * 4)
-#define SNIP_OFFSET (PT_SNIP * 4)
-#define SFIP_OFFSET (PT_SFIP * 4)
-#define PSR_OFFSET (PT_PSR * sizeof(int))
-#define FPSR_OFFSET (PT_FPSR * sizeof(int))
-#define FPCR_OFFSET (PT_FPCR * sizeof(int))
-
-#define XREGADDR(r) (((char *)&u.pt_x0-(char *)&u) + \
- ((r)-X0_REGNUM)*sizeof(X_REGISTER_RAW_TYPE))
-
-extern int have_symbol_file_p ();
-
-extern jmp_buf stack_jmp;
-
-extern int errno;
-
-void
-fetch_inferior_registers (int regno)
-{
- register unsigned int regaddr;
- char buf[MAX_REGISTER_RAW_SIZE];
- register int i;
-
- struct USER u;
- unsigned int offset;
-
- offset = (char *) &u.pt_r0 - (char *) &u;
- regaddr = offset; /* byte offset to r0; */
-
-/* offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
- for (regno = 0; regno < PC_REGNUM; regno++)
- {
- /*regaddr = register_addr (regno, offset); */
- /* 88k enhancement */
-
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0);
- regaddr += sizeof (int);
- }
- supply_register (regno, buf);
- }
- /* now load up registers 32-37; special pc registers */
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) PSR_OFFSET, 0);
- supply_register (PSR_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPSR_OFFSET, 0);
- supply_register (FPSR_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPCR_OFFSET, 0);
- supply_register (FPCR_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
- supply_register (SXIP_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
- supply_register (SNIP_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
- supply_register (SFIP_REGNUM, buf);
-
- if (target_is_m88110)
- {
- for (regaddr = XREGADDR (X0_REGNUM), regno = X0_REGNUM;
- regno < NUM_REGS;
- regno++, regaddr += 16)
- {
- X_REGISTER_RAW_TYPE xval;
-
- *(int *) &xval.w1 = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0);
- *(int *) &xval.w2 = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) (regaddr + 4), 0);
- *(int *) &xval.w3 = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) (regaddr + 8), 0);
- *(int *) &xval.w4 = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) (regaddr + 12), 0);
- supply_register (regno, (void *) &xval);
- }
- }
-}
-
-/* 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)
-{
- register unsigned int regaddr;
- char buf[80];
-
- struct USER u;
-
- unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
-
- regaddr = offset;
-
- /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
- svr3 doesn't run on an 88110, or the kernel isolates the different (not
- completely sure this is true, but seems to be. */
- if (regno >= 0)
- {
- /* regaddr = register_addr (regno, offset); */
- if (regno < PC_REGNUM)
- {
- regaddr = offset + regno * sizeof (int);
- errno = 0;
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- else if (regno == PSR_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
- else if (regno == FPSR_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
- else if (regno == FPCR_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
- else if (regno == SXIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
- else if (regno == SNIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
- else if (regno == SFIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
- else if (target_is_m88110 && regno < NUM_REGS)
- {
- X_REGISTER_RAW_TYPE xval;
-
- read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
- sizeof (X_REGISTER_RAW_TYPE));
- regaddr = XREGADDR (regno);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 4, xval.w2);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 8, xval.w3);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 12, xval.w4);
- }
- else
- printf_unfiltered ("Bad register number for store_inferior routine\n");
- }
- else
- {
- for (regno = 0; regno < PC_REGNUM; regno++)
- {
- /* regaddr = register_addr (regno, offset); */
- errno = 0;
- regaddr = offset + regno * sizeof (int);
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
- if (target_is_m88110)
- {
- for (regno = X0_REGNUM; regno < NUM_REGS; regno++)
- {
- X_REGISTER_RAW_TYPE xval;
-
- read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
- sizeof (X_REGISTER_RAW_TYPE));
- regaddr = XREGADDR (regno);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 4), xval.w2);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 8), xval.w3);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 12), xval.w4);
- }
- }
- }
-}
-
-/* blockend is the address of the end of the user structure */
-
-m88k_register_u_addr (int blockend, int regnum)
-{
- struct USER u;
- int ustart = blockend - sizeof (struct USER);
-
- if (regnum < PSR_REGNUM)
- return (ustart + ((int) &u.pt_r0 - (int) &u) +
- REGISTER_SIZE * regnum);
- else if (regnum == PSR_REGNUM)
- return (ustart + ((int) &u.pt_psr) - (int) &u);
- else if (regnum == FPSR_REGNUM)
- return (ustart + ((int) &u.pt_fpsr) - (int) &u);
- else if (regnum == FPCR_REGNUM)
- return (ustart + ((int) &u.pt_fpcr) - (int) &u);
- else if (regnum == SXIP_REGNUM)
- return (ustart + SXIP_OFFSET);
- else if (regnum == SNIP_REGNUM)
- return (ustart + SNIP_OFFSET);
- else if (regnum == SFIP_REGNUM)
- return (ustart + SFIP_OFFSET);
- else if (target_is_m88110)
- return (ustart + ((int) &u.pt_x0 - (int) &u) + /* Must be X register */
- sizeof (u.pt_x0) * (regnum - X0_REGNUM));
- else
- return (blockend + REGISTER_SIZE * regnum);
-}
-
-#ifdef USE_PROC_FS
-
-#include <sys/procfs.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)
-{
- register int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi <= SP_REGNUM; regi++)
- supply_register (regi, (char *) (regp + regi));
-
- supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
- supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
- supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
- supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
- supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
- supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
- int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi <= R_R31; regi++)
- if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(int *) &registers[REGISTER_BYTE (regi)];
-
- if ((regno == -1) || (regno == SXIP_REGNUM))
- *(regp + R_XIP) = *(int *) &registers[REGISTER_BYTE (SXIP_REGNUM)];
- if ((regno == -1) || (regno == SNIP_REGNUM))
- *(regp + R_NIP) = *(int *) &registers[REGISTER_BYTE (SNIP_REGNUM)];
- if ((regno == -1) || (regno == SFIP_REGNUM))
- *(regp + R_FIP) = *(int *) &registers[REGISTER_BYTE (SFIP_REGNUM)];
- if ((regno == -1) || (regno == PSR_REGNUM))
- *(regp + R_PSR) = *(int *) &registers[REGISTER_BYTE (PSR_REGNUM)];
- if ((regno == -1) || (regno == FPSR_REGNUM))
- *(regp + R_FPSR) = *(int *) &registers[REGISTER_BYTE (FPSR_REGNUM)];
- if ((regno == -1) || (regno == FPCR_REGNUM))
- *(regp + R_FPCR) = *(int *) &registers[REGISTER_BYTE (FPCR_REGNUM)];
-}
-
-#endif /* USE_PROC_FS */
-
-/* This support adds the equivalent of adb's % command. When
- the `add-shared-symbol-files' command is given, this routine scans
- the dynamic linker's link map and reads the minimal symbols
- from each shared object file listed in the map. */
-
-struct link_map
-{
- unsigned long l_addr; /* address at which object is mapped */
- char *l_name; /* full name of loaded object */
- void *l_ld; /* dynamic structure of object */
- struct link_map *l_next; /* next link object */
- struct link_map *l_prev; /* previous link object */
-};
-
-#define LINKS_MAP_POINTER "_ld_tail"
-#define LIBC_FILE "/usr/lib/libc.so.1"
-#define SHARED_OFFSET 0xf0001000
-
-#ifndef PATH_MAX
-#define PATH_MAX 1023 /* maximum size of path name on OS */
-#endif
-
-void
-add_shared_symbol_files (void)
-{
- void *desc;
- struct link_map *ld_map, *lm, lms;
- struct minimal_symbol *minsym;
- struct objfile *objfile;
- char *path_name;
-
- if (ptid_equal (inferior_ptid, null_ptid))
- {
- warning ("The program has not yet been started.");
- return;
- }
-
- objfile = symbol_file_add (LIBC_FILE, 0, NULL, 0, OBJF_READNOW);
- minsym = lookup_minimal_symbol (LINKS_MAP_POINTER, objfile);
-
- ld_map = (struct link_map *)
- read_memory_integer (((int) SYMBOL_VALUE_ADDRESS (minsym) + SHARED_OFFSET), 4);
- lm = ld_map;
- while (lm)
- {
- int local_errno = 0;
-
- read_memory ((CORE_ADDR) lm, (char *) &lms, sizeof (struct link_map));
- if (lms.l_name)
- {
- if (target_read_string ((CORE_ADDR) lms.l_name, &path_name,
- PATH_MAX, &local_errno))
- {
- struct section_addr_info section_addrs;
- memset (&section_addrs, 0, sizeof (section_addrs));
- section_addrs.other[0].addr = lms.l_addr;
- section_addrs.other[0].name = ".text";
- symbol_file_add (path_name, 1, &section_addrs, 0, 0);
- xfree (path_name);
- }
- }
- /* traverse links in reverse order so that we get the
- the symbols the user actually gets. */
- lm = lms.l_prev;
- }
-
- /* Getting new symbols may change our opinion about what is
- frameless. */
- reinit_frame_cache ();
-}
-
-#if defined(_ES_MP)
-
-#include <sys/regset.h>
-
-unsigned int
-m88k_harris_core_register_addr (int regno, int reg_ptr)
-{
- unsigned int word_offset;
-
- switch (regno)
- {
- case PSR_REGNUM:
- word_offset = R_EPSR;
- break;
- case FPSR_REGNUM:
- word_offset = R_FPSR;
- break;
- case FPCR_REGNUM:
- word_offset = R_FPCR;
- break;
- case SXIP_REGNUM:
- word_offset = R_EXIP;
- break;
- case SNIP_REGNUM:
- word_offset = R_ENIP;
- break;
- case SFIP_REGNUM:
- word_offset = R_EFIP;
- break;
- default:
- if (regno <= FP_REGNUM)
- word_offset = regno;
- else
- word_offset = ((regno - X0_REGNUM) * 4);
- }
- return (word_offset * 4);
-}
-
-#endif /* _ES_MP */
-
-void
-_initialize_m88k_nat (void)
-{
-#ifdef _ES_MP
- /* Enable 88110 support, as we don't support the 88100 under ES/MP. */
-
- target_is_m88110 = 1;
-#elif defined(_CX_UX)
- /* Determine whether we're running on an 88100 or an 88110. */
- target_is_m88110 = (sinfo (SYSMACHINE, 0) == SYS5800);
-#endif /* _CX_UX */
-}
-
-#ifdef _ES_MP
-/* 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)
-{
- register int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi < R_R31; regi++)
- {
- supply_register (regi, (char *) (regp + regi));
- }
- supply_register (PSR_REGNUM, (char *) (regp + R_EPSR));
- supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
- supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
- supply_register (SXIP_REGNUM, (char *) (regp + R_EXIP));
- supply_register (SNIP_REGNUM, (char *) (regp + R_ENIP));
- supply_register (SFIP_REGNUM, (char *) (regp + R_EFIP));
-}
-
-/* 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)
-{
- register int regi;
- char *from;
-
- for (regi = FP0_REGNUM; regi <= FPLAST_REGNUM; regi++)
- {
- from = (char *) &((*fpregsetp)[regi - FP0_REGNUM]);
- supply_register (regi, from);
- }
-}
-
-#endif /* _ES_MP */
-
-#ifdef _CX_UX
-
-#include <sys/regset.h>
-
-unsigned int
-m88k_harris_core_register_addr (int regno, int reg_ptr)
-{
- unsigned int word_offset;
-
- switch (regno)
- {
- case PSR_REGNUM:
- word_offset = R_PSR;
- break;
- case FPSR_REGNUM:
- word_offset = R_FPSR;
- break;
- case FPCR_REGNUM:
- word_offset = R_FPCR;
- break;
- case SXIP_REGNUM:
- word_offset = R_XIP;
- break;
- case SNIP_REGNUM:
- word_offset = R_NIP;
- break;
- case SFIP_REGNUM:
- word_offset = R_FIP;
- break;
- default:
- if (regno <= FP_REGNUM)
- word_offset = regno;
- else
- word_offset = ((regno - X0_REGNUM) * 4) + R_X0;
- }
- return (word_offset * 4);
-}
-
-#endif /* _CX_UX */
diff --git a/contrib/gdb/gdb/doc/HPPA-cfg.texi b/contrib/gdb/gdb/doc/HPPA-cfg.texi
deleted file mode 100644
index 88a138cab8b0..000000000000
--- a/contrib/gdb/gdb/doc/HPPA-cfg.texi
+++ /dev/null
@@ -1,114 +0,0 @@
-@c GDB MANUAL configuration file.
-@c Copyright (c) 1993 Free Software Foundation, Inc.
-@c
-@c NOTE: While the GDB manual is configurable (by changing these
-@c switches), its configuration is ***NOT*** automatically tied in to
-@c source configuration---because the authors expect that, save in
-@c unusual cases, the most inclusive form of the manual is appropriate
-@c no matter how the program itself is configured.
-@c
-@c The only automatically-varying variable is the GDB version number,
-@c which the Makefile rewrites based on the VERSION variable from
-@c `../Makefile.in'.
-@c
-@c GDB version number is recorded in the variable GDBVN
-@include GDBvn.texi
-@c
-@c ----------------------------------------------------------------------
-@c PLATFORM FLAGS:
-@clear GENERIC
-@c
-@c HP PA-RISC target:
-@set HPPA
-@c
-@c Hitachi H8/300 target:
-@clear H8
-@c Hitachi H8/300 target ONLY:
-@clear H8EXCLUSIVE
-@c
-@c remote MIPS target:
-@clear MIPS
-@c
-@c SPARC target:
-@clear SPARC
-@c
-@c AMD 29000 target:
-@clear AMD29K
-@c
-@c Intel 960 target:
-@clear I960
-@c
-@c Tandem ST2000 (phone switch) target:
-@clear ST2000
-@c
-@c Zilog 8000 target:
-@clear Z8K
-@c
-@c Wind River Systems VxWorks environment:
-@clear VXWORKS
-@c
-@c ----------------------------------------------------------------------
-@c DOC FEATURE FLAGS:
-@c
-@c Bare-board target?
-@clear BARETARGET
-@c
-@c Restrict languages discussed to C?
-@c This is backward. As time permits, change this to language-specific
-@c switches for what to include.
-@clear CONLY
-@c Discuss Fortran?
-@clear FORTRAN
-@c
-@c Discuss Modula 2?
-@clear MOD2
-@c
-@c Specifically for host machine running DOS?
-@clear DOSHOST
-@c
-@c Talk about CPU simulator targets?
-@clear SIMS
-@c
-@c Remote serial line settings of interest?
-@set SERIAL
-@c
-@c Discuss features requiring Posix or similar OS environment?
-@set POSIX
-@c
-@c Discuss remote serial debugging stub?
-@clear REMOTESTUB
-@c
-@c Discuss gdbserver?
-@set GDBSERVER
-@c
-@c Discuss gdbserve.nlm?
-@set GDBSERVE
-@c
-@c Refrain from discussing how to configure sw and format doc?
-@clear PRECONFIGURED
-@c
-@c Refrain from referring to unfree publications?
-@set FSFDOC
-@c
-@c ----------------------------------------------------------------------
-@c STRINGS:
-@c
-@c Name of GDB program. Used also for (gdb) prompt string.
-@set GDBP gdb
-@c
-@c Name of GDB product. Used in running text.
-@set GDBN GDB
-@c
-@c Name of target.
-@set TARGET HP 9000 Systems
-@c
-@c Name of host. Should not be used in generic configs, but generic
-@c value may catch some flubs.
-@set HOST machine specific
-@c
-@c Name of GCC product
-@set NGCC GCC
-@c
-@c Name of GCC program
-@set GCC gcc
-
diff --git a/contrib/gdb/gdb/doc/h8-cfg.texi b/contrib/gdb/gdb/doc/h8-cfg.texi
deleted file mode 100644
index 823c7c244b5a..000000000000
--- a/contrib/gdb/gdb/doc/h8-cfg.texi
+++ /dev/null
@@ -1,47 +0,0 @@
-@c GDB version number is recorded in the variable GDBVN
-@include GDBvn.texi
-@c
-@set AGGLOMERATION
-@clear AMD29K
-@set BARETARGET
-@clear CONLY
-@set DOSHOST
-@clear FORTRAN
-@clear FSFDOC
-@clear GDBSERVER
-@clear GENERIC
-@set H8
-@set H8EXCLUSIVE
-@clear HAVE-FLOAT
-@clear I960
-@clear MOD2
-@clear NOVEL
-@clear POSIX
-@set PRECONFIGURED
-@clear REMOTESTUB
-@set SIMS
-@clear SERIAL
-@clear SPARC
-@clear ST2000
-@clear VXWORKS
-@clear Z8K
-@c ----------------------------------------------------------------------
-@c STRINGS:
-@c
-@c Name of GDB program. Used also for (gdb) prompt string.
-@set GDBP gdb
-@c
-@c Name of GDB product. Used in running text.
-@set GDBN GDB
-@c
-@c Name of GDB initialization file.
-@set GDBINIT .gdbinit
-@c
-@c Name of target.
-@set TARGET Hitachi Microprocessors
-@c
-@c Name of GCC product
-@set NGCC GCC
-@c
-@c Name of GCC program
-@set GCC gcc
diff --git a/contrib/gdb/gdb/doc/libgdb.texinfo b/contrib/gdb/gdb/doc/libgdb.texinfo
deleted file mode 100644
index 4fadcb2c9b58..000000000000
--- a/contrib/gdb/gdb/doc/libgdb.texinfo
+++ /dev/null
@@ -1,878 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename libgdb.info
-@settitle Libgdb
-@setchapternewpage off
-@c %**end of header
-
-@ifinfo
-This file documents libgdb, the GNU symbolic debugger in a library.
-
-This is Edition 0.3, Oct 1993, of @cite{Libgdb}.
-Copyright 1993 Cygnus Support
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-
-@end ignore
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions.
-@end ifinfo
-
-@c This title page illustrates only one of the
-@c two methods of forming a title page.
-
-@titlepage
-@title Libgdb
-@subtitle Version 0.3
-@subtitle Oct 1993
-@author Thomas Lord
-
-@c The following two commands
-@c start the copyright page.
-@page
-@vskip 0pt plus 1filll
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Copyright @copyright{} 1993 Cygnus Support
-@end titlepage
-
-@ifinfo
-@node Top, Overview, (dir), (dir)
-
-This info file documents libgdb: an API for GDB, the GNU symbolic debugger.
-
-@menu
-* Overview:: The basics of libgdb and this document.
-* Interpreter:: Libgdb is an Interpreter-Based Server.
-* Top Level:: You Provide the Top Level for the Libgdb
- Command Interpreter .
-* I/O:: How the Server's I/O Can be Used.
-* Invoking:: Invoking the Interpreter, Executing
- Commands.
-* Defining Commands:: How New Commands are Created.
-* Variables:: How Builtin Variables are Defined.
-* Asynchronous:: Scheduling Asynchronous Computations.
-* Commands:: Debugger Commands for Libgdb Applications
-@end menu
-
-@end ifinfo
-@node Overview, Interpreter, top, top
-@comment node-name, next, previous, up
-@chapter Overview
-@cindex overview
-@cindex definitions
-
-@heading Function and Purpose
-
-Libgdb is a package which provides an API to the functionality of GDB,
-the GNU symbolic debugger. It is specifically intended to support the
-development of a symbolic debugger with a graphic interface.
-
-
-@heading This Document
-
-This document is a specification of the libgdb API. It is written in
-the form of a programmer's manual. So the goal of this document is to
-explain what functions make up the API, and how they can be used in a
-running application.
-
-
-@heading Terminology
-
-In this document, @dfn{libgdb} refers to a library containing the
-functions defined herein, @dfn{application} refers to any program built
-with that library.
-
-
-@heading Dependencies
-
-Programs which are linked with libgdb must be linked with libbfd,
-libopcodes, libiberty, and libmmalloc.
-
-@heading Acknowledgments
-
-Essential contributions to this design were made by Stu Grossman, Jim
-Kingdon, and Rich Pixley.
-
-@node Interpreter, Top Level, Overview, Top
-@comment node-name, next, previous, up
-@chapter Libgdb is an Interpreter Based Server
-@cindex interpreter
-@cindex server
-
-To understand libgdb, it is necessary to understand how the library is
-structured. Historically, GDB is written as a small interpreter for a
-simple command language. The commands of the language perform useful
-debugging functions.
-
-Libgdb is built from GDB by turning the interpreter into a debugging
-server. The server reads debugging commands from any source and
-interprets them, directing the output arbitrarily.
-
-In addition to changing GDB from a tty-based program to a server, a
-number of new GDB commands have been added to make the server more
-useful for a program with a graphic interface.
-
-Finally, libgdb includes provisions for asynchronous processing within
-the application.
-
-Most operations that can be carried out with libgdb involve the GDB
-command interpreter. The usual mode of operation is that the operation
-is expressed as a string of GDB commands, which the interpreter is then
-invoked to carry out. The output from commands executed in this manner
-can be redirected in a variety of useful ways for further processing by
-the application.
-
-The command interpreter provides an extensive system of hooks so an
-application can monitor any aspect of the debugging library's state. An
-application can set its own breakpoints and attach commands and
-conditions to those. It is possible to attach hooks to any debugger
-command; the hooks are invoked whenever that command is about to be
-invoked. By means of these, the displays of a graphical interface can
-be kept fully up to date at all times.
-
-We show you how to define new primitives in the command language. By
-defining new primitives and using them in breakpoint scripts and command
-hooks, an application can schedule the execution of arbitrary C-code at
-almost any point of interest in the operation of libgdb.
-
-We show you how to define new GDB convenience variables for which your
-code computes a value on demand. Referring to such variables in a
-breakpoint condition is a convenient way to conditionalize breakpoints
-in novel ways.
-
-To summarize: in libgdb, the gdb command language is turned into a
-debugging server. The server takes commands as input, and the server's
-output is redirectable. An application uses libgdb by formatting
-debugging commands and invoking the interpreter. The application might
-maintain breakpoints, watchpoints and many kinds of hooks. An application
-can define new primitives for the interpreter.
-
-@node Top Level, I/O, Interpreter, Top
-@chapter You Provide the Top Level for the Libgdb Command Interpreter
-@cindex {top level}
-
-When you use libgdb, your code is providing a @dfn{top level} for the
-command language interpreter. The top level is significant because it
-provides commands for the the interpreter to execute. In addition, the
-top level is responsible for handling some kinds of errors, and
-performing certain cleanup operations on behalf of the interpreter.
-
-@heading Initialization
-
-Before calling any other libgdb functions, call this:
-
-@deftypefun void gdb_init (void)
-Perform one-time initialization for libgdb.
-@end deftypefun
-
-An application may wish to evaluate specific gdb commands as part of its
-own initialization. The details of how this can be accomplished are
-explained below.
-
-@heading The Top-Level Loop
-
-There is a strong presumption in libgdb that the application has
-the form of a loop. Here is what such a loop might look like:
-
-@example
-while (gdb_still_going ())
- @{
- if (!GDB_TOP_LEVEL ())
- @{
- char * command;
- gdb_start_top_loop ();
- command = process_events ();
- gdb_execute_command (command);
- gdb_finish_top_loop ();
- @}
- @}
-@end example
-
-The function @code{gdb_still_going} returns 1 until the gdb command
-`quit' is run.
-
-The macro @code{GDB_TOP_LEVEL} invokes setjmp to set the top level error
-handler. When a command results in an error, the interpreter exits with
-a longjmp. There is nothing special libgdb requires of the top level
-error handler other than it be present and that it restart the top level
-loop. Errors are explained in detail in a later chapter.
-
-Each time through the top level loop two important things happen: a
-debugger command is constructed on the basis of user input, and the
-interpreter is invoked to execute that command. In the sample code, the
-call to the imaginary function @code{process_events} represents the
-point at which a graphical interface should read input events until
-ready to execute a debugger command. The call to
-@code{gdb_execute_command} invokes the command interpreter (what happens
-to the output from the command will be explained later).
-
-Libgdb manages some resources using the top-level loop. The primary
-reason for this is error-handling: even if a command terminates with an
-error, it may already have allocated resources which need to be freed.
-The freeing of such resources takes place at the top-level, regardless
-of how the the command exits. The calls to @code{gdb_start_top_loop}
-and @code{gdb_finish_top_loop} let libgdb know when it is safe to
-perform operations associated with these resources.
-
-@heading Breakpoint Commands
-
-Breakpoint commands are scripts of GDB operations associated with
-particular breakpoints. When a breakpoint is reached, its associated
-commands are executed.
-
-Breakpoint commands are invoked by the libgdb function
-@code{gdb_finish_top_loop}.
-
-Notice that if control returns to the top-level error handler, the
-execution of breakpoint commands is bypassed. This can happen as a
-result of errors during either @code{gdb_execute_command} or
-@code{gdb_finish_top_loop}.
-
-@heading Application Initialization
-
-Sometimes it is inconvenient to execute commands via a command loop for
-example, the commands an application uses to initialize itself. An
-alternative to @code{execute_command} is @code{execute_catching_errors}.
-When @code{execute_catching_errors} is used, no top level error handler
-need be in effect, and it is not necessary to call
-@code{gdb_start_top_loop} or @code{gdb_finish_top_loop}.
-
-
-@heading Cleanup
-
-The debugger command ``quit'' performs all necessary cleanup for libgdb.
-After it has done so, it changes the return value of
-@code{gdb_still_going} to 0 and returns to the top level error handler.
-
-
-@node I/O, Invoking, Top Level, Top
-@comment node-name, next, previous, up
-@chapter How the Server's I/O Can be Used
-@cindex I/O
-
-In the last chapter it was pointed out that a libgdb application is
-responsible for providing commands for the interpreter to execute.
-However some commands require further input (for example, the ``quit''
-command might ask for confirmation). Almost all commands produce output
-of some kind. The purpose of this section is to explain how libgdb
-performs its I/O, and how an application can take advantage of
-this.
-
-
-@heading I/O Vectors
-
-Libgdb has no fixed strategy for I/O. Instead, all operations are
-performed by functions called via structures of function pointers.
-Applications supply theses structures and can change them at any
-time.
-
-@deftp Type {struct gdb_input_vector}
-@deftpx Type {struct gdb_output_vector}
-These structures contain a set of function pointers. Each function
-determines how a particular type of i/o is performed. The details of
-these strucutres are explained below.
-
-The application allocates these structures, initializes them to all bits
-zero, fills in the function pointers, and then registers names for them
-them with libgdb.
-@end deftp
-
-@deftypefun void gdb_name_input_vector (@var{name}, @var{vec})
-@deftypefunx void gdb_remove_input_vector (@var{name}, @var{vec})
-@deftypefunx void gdb_name_output_vector (@var{name}, @var{vec})
-@deftypefunx void gdb_remove_input_vector (@var{name}, @var{vec})
-@example
- char * @var{name};
- struct gdb_output_vector * @var{vec};
-@end example
-These functions are used to give and remove names to i/o vectors. Note
-that if a name is used twice, the most recent definition applies.
-@end deftypefun
-
-
-
-@subheading Output
-
-An output vector is a structure with at least these fields:
-
-@example
-struct gdb_output_vector
-@{
- /* output */
- void (*put_string) (struct gdb_output_vector *, char * str);
-@}
-@end example
-
-Use the function @code{memset} or something equivalent to initialize an
-output vector to all bits zero. Then fill in the function pointer with
-your function.
-
-A debugger command can produce three kinds of output: error messages
-(such as when trying to delete a non-existent breakpoint), informational
-messages (such as the notification printed when a breakpoint is hit),
-and the output specifically requested by a command (for example, the
-value printed by the ``print'' command). At any given time, then,
-libgdb has three output vectors. These are called the @dfn{error},
-@dfn{info}, @dfn{value} vector respectively.
-
-@subheading Input
-
-@example
-struct gdb_input_vector
-@{
- int (*query) (struct gdb_input_vector *,
- char * prompt,
- int quit_allowed);
- int * (*selection) (struct gdb_input_vector *,
- char * prompt,
- char ** choices);
- char * (*read_string) (struct gdb_input_vector *,
- char * prompt);
- char ** (*read_strings) (struct gdb_input_vector *,
- char * prompt);
-@}
-@end example
-
-Use the function @code{memset} or something equivalent to initialize an
-input vector to all bits zero. Then fill in the function pointers with
-your functions.
-
-There are four kinds of input requests explicitly made by libgdb.
-
-A @dfn{query} is a yes or no question. The user can respond to a query
-with an affirmative or negative answer, or by telling gdb to abort the
-command (in some cases an abort is not permitted). Query should return
-'y' or 'n' or 0 to abort.
-
-A @dfn{selection} is a list of options from which the user selects a subset.
-Selections should return a NULL terminated array of integers, which are
-indexes into the array of choices. It can return NULL instead to abort
-the command. The array returned by this function will be passed to
-@code{free} by libgdb.
-
-A @dfn{read_string} asks the user to supply an arbitrary string. It may
-return NULL to abort the command. The string returned by @code{read_string}
-should be allocated by @code{malloc}; it will be freed by libgdb.
-
-A @dfn{read_strings} asks the user to supply multiple lines of input
-(for example, the body of a command created using `define'). It, too,
-may return NULL to abort. The array and the strings returned by this
-function will be freed by libgdb.
-
-@heading I/O Redirection from the Application Top-Level
-
-@deftypefun struct gdb_io_vecs gdb_set_io (struct gdb_io_vecs *)
-@example
-
-struct gdb_io_vecs
-@{
- struct gdb_input_vector * input;
- struct gdb_output_vector * error;
- struct gdb_output_vector * info;
- struct gdb_output_vector * value;
-@}
-@end example
-
-This establishes a new set of i/o vectors, and returns the old setting.
-Any of the pointers in this structure may be NULL, indicating that the
-current value should be used.
-
-This function is useful for setting up i/o vectors before any libgdb
-commands have been invoked (hence before any input or output has taken
-place).
-@end deftypefun
-
-It is explained in a later chapter how to redirect output temporarily.
-(@xref{Invoking}.)
-
-@heading I/O Redirection in Debugger Commands
-
-A libgdb application creates input and output vectors and assigns them names.
-Which input and output vectors are used by libgdb is established by
-executing these debugger commands:
-
-@defun {set input-vector} name
-@defunx {set error-output-vector} name
-@defunx {set info-output-vector} name
-@defunx {set value-output-vector} name
-Choose an I/O vector by name.
-@end defun
-
-
-A few debugger commands are for use only within commands defined using
-the debugger command `define' (they have no effect at other times).
-These commands exist so that an application can maintain hooks which
-redirect output without affecting the global I/O vectors.
-
-@defun with-input-vector name
-@defunx with-error-output-vector name
-@defunx with-info-output-vector name
-@defunx with-value-output-vector name
-Set an I/O vector, but only temporarily. The setting has effect only
-within the command definition in which it occurs.
-@end defun
-
-
-@heading Initial Conditions
-
-When libgdb is initialized, a set of default I/O vectors is put in
-place. The default vectors are called @code{default-input-vector},
-@code{default-output-vector}, &c.
-
-The default query function always returns `y'. Other input functions
-always abort. The default output functions discard output silently.
-
-
-@node Invoking, Defining Commands, I/O, Top
-@chapter Invoking the Interpreter, Executing Commands
-@cindex {executing commands}
-@cindex {invoking the interpreter}
-
-This section introduces the libgdb functions which invoke the command
-interpreter.
-
-@deftypefun void gdb_execute_command (@var{command})
-@example
-char * @var{command};
-@end example
-Interpret the argument debugger command. An error handler must be set
-when this function is called. (@xref{Top Level}.)
-@end deftypefun
-
-It is possible to override the current I/O vectors for the duration of a
-single command:
-
-@deftypefun void gdb_execute_with_io (@var{command}, @var{vecs})
-@example
-char * @var{command};
-struct gdb_io_vecs * @var{vecs};
-
-struct gdb_io_vecs
-@{
- struct gdb_input_vector * input;
- struct gdb_output_vector * error;
- struct gdb_output_vector * info;
- struct gdb_output_vector * value;
-@}
-@end example
-
-Execute @var{command}, temporarily using the i/o vectors in @var{vecs}.
-
-Any of the vectors may be NULL, indicating that the current value should
-be used. An error handler must be in place when this function is used.
-@end deftypefun
-
-@deftypefun {struct gdb_str_output} gdb_execute_for_strings (@var{cmd})
-@example
-char * cmd;
-@end example
-@deftypefunx {struct gdb_str_output} gdb_execute_for_strings2 (@var{cmd}, @var{input})
-@example
-char * cmd;
-struct gdb_input_vector * input;
-@end example
-@page
-@example
-struct gdb_str_output
-@{
- char * error;
- char * info;
- char * value;
-@};
-@end example
-
-Execute @var{cmd}, collecting its output as strings. If no error
-occurs, all three strings will be present in the structure, the
-empty-string rather than NULL standing for no output of a particular
-kind.
-
-If the command aborts with an error, then the @code{value} field will be
-NULL, though the other two strings will be present.
-
-In all cases, the strings returned are allocated by malloc and should be
-freed by the caller.
-
-The first form listed uses the current input vector, but overrides the
-current output vector. The second form additionally allows the input
-vector to be overridden.
-
-This function does not require that an error handler be installed.
-@end deftypefun
-
-@deftypefun void execute_catching_errors (@var{command})
-@example
-char * @var{command};
-@end example
-Like @code{execute_command} except that no error handler is required.
-@end deftypefun
-
-@deftypefun void execute_with_text (@var{command}, @var{text})
-@example
-char * @var{command};
-char ** @var{text};
-@end example
-Like @code{execute_catching_errors}, except that the input vector is
-overridden. The new input vector handles only calls to @code{query} (by
-returning 'y') and calls to @code{read_strings} by returning a copy of
-@var{text} and the strings it points to.
-
-This form of execute_command is useful for commands like @code{define},
-@code{document}, and @code{commands}.
-@end deftypefun
-
-
-
-@node Defining Commands, Variables, Invoking, Top
-@comment node-name, next, previous, up
-@chapter How New Commands are Created
-@cindex {commands, defining}
-
-Applications are, of course, free to take advantage of the existing GDB
-macro definition capability (the @code{define} and @code{document}
-functions).
-
-In addition, an application can add new primitives to the GDB command
-language.
-
-@deftypefun void gdb_define_app_command (@var{name}, @var{fn}, @var{doc})
-@example
-char * @var{name};
-gdb_cmd_fn @var{fn};
-char * @var{doc};
-
-typedef void (*gdb_cmd_fn) (char * args);
-@end example
-
-Create a new command call @var{name}. The new command is in the
-@code{application} help class. When invoked, the command-line arguments
-to the command are passed as a single string.
-
-Calling this function twice with the same name replaces an earlier
-definition, but application commands can not replace builtin commands of
-the same name.
-
-The documentation string of the command is set to a copy the string
-@var{doc}.
-@end deftypefun
-
-@node Variables, Asynchronous, Defining Commands, Top
-@comment node-name, next, previous, up
-@chapter How Builtin Variables are Defined
-@cindex {variables, defining}
-
-Convenience variables provide a way for values maintained by libgdb to
-be referenced in expressions (e.g. @code{$bpnum}). Libgdb includes a
-means by which the application can define new, integer valued
-convenience variables:
-@page
-@deftypefun void gdb_define_int_var (@var{name}, @var{fn}, @var{fn_arg})
-@example
-char * @var{name};
-int (*@var{fn}) (void *);
-void * @var{fn_arg};
-@end example
-This function defines (or undefines) a convenience variable called @var{name}.
-If @var{fn} is NULL, the variable becomes undefined. Otherwise,
-@var{fn} is a function which, when passed @var{fn_arg} returns the value
-of the newly defined variable.
-
-No libgdb functions should be called by @var{fn}.
-@end deftypefun
-
-One use for this function is to create breakpoint conditions computed in
-novel ways. This is done by defining a convenience variable and
-referring to that variable in a breakpoint condition expression.
-
-
-@node Asynchronous, Commands, Variables, Top
-@chapter Scheduling Asynchronous Computations
-@cindex asynchronous
-
-
-A running libgdb function can take a long time. Libgdb includes a hook
-so that an application can run intermittently during long debugger
-operations.
-
-@deftypefun void gdb_set_poll_fn (@var{fn}, @var{fn_arg})
-@example
-void (*@var{fn})(void * fn_arg, int (*gdb_poll)());
-void * @var{fn_arg};
-@end example
-Arrange to call @var{fn} periodically during lengthy debugger operations.
-If @var{fn} is NULL, polling is turned off. @var{fn} should take two
-arguments: an opaque pointer passed as @var{fn_arg} to
-@code{gdb_set_poll_fn}, and a function pointer. The function pointer
-passed to @var{fn} is provided by libgdb and points to a function that
-returns 0 when the poll function should return. That is, when
-@code{(*gdb_poll)()} returns 0, libgdb is ready to continue @var{fn}
-should return quickly.
-
-It is possible that @code{(*gdb_poll)()} will return 0 the first time it
-is called, so it is reasonable for an application to do minimal processing
-before checking whether to return.
-
-No libgdb functions should be called from an application's poll function,
-with one exception: @code{gdb_request_quit}.
-@end deftypefun
-
-
-@deftypefun void gdb_request_quit (void)
-This function, if called from a poll function, requests that the
-currently executing libgdb command be interrupted as soon as possible,
-and that control be returned to the top-level via an error.
-
-The quit is not immediate. It will not occur until at least after the
-application's poll function returns.
-@end deftypefun
-
-@node Commands, Top, Asynchronous, Top
-@comment node-name, next, previous, up
-@chapter Debugger Commands for Libgdb Applications
-
-The debugger commands available to libgdb applications are the same commands
-available interactively via GDB. This section is an overview of the
-commands newly created as part of libgdb.
-
-This section is not by any means a complete reference to the GDB command
-language. See the GDB manual for such a reference.
-
-@menu
-* Command Hooks:: Setting Hooks to Execute With Debugger Commands.
-* View Commands:: View Commands Mirror Show Commands
-* Breakpoints:: The Application Can Have Its Own Breakpoints
-@end menu
-
-@node Command Hooks, View Commands, Commands, Commands
-@comment node-name, next, previous, up
-@section Setting Hooks to Execute With Debugger Commands.
-
-Debugger commands support hooks. A command hook is executed just before
-the interpreter invokes the hooked command.
-
-There are two hooks allowed for every command. By convention, one hook
-is for use by users, the other is for use by the application.
-
-A user hook is created for a command XYZZY by using
-@code{define-command} to create a command called @code{hook-XYZZY}.
-
-An application hook is created for a command XYZZY by using
-@code{define-command} to create a command called @code{apphook-XYZZY}.
-
-Application hooks are useful for interfaces which wish to continuously
-monitor certain aspects of debugger state. The application can set a
-hook on all commands that might modify the watched state. When the hook
-is executed, it can use i/o redirection to notify parts of the
-application that previous data may be out of date. After the top-level loop
-resumes, the application can recompute any values that may have changed.
-(@xref{I/O}.)
-
-@node View Commands, Breakpoints, Command Hooks, Commands
-@comment node-name, next, previous, up
-@section View Commands Mirror Show Commands
-
-The GDB command language contains many @code{set} and @code{show}
-commands. These commands are used to modify or examine parameters to
-the debugger.
-
-It is difficult to get the current state of a parameter from the
-@code{show} command because @code{show} is very verbose.
-
-@example
-(gdb) show check type
-Type checking is "auto; currently off".
-(gdb) show width
-Number of characters gdb thinks are in a line is 80.
-@end example
-
-For every @code{show} command, libgdb includes a @code{view} command.
-@code{view} is like @code{show} without the verbose commentary:
-
-@example
-(gdb) view check type
-auto; currently off
-(gdb) view width
-80
-@end example
-
-(The precise format of the ouput from @code{view} is subject to change.
-In particular, @code{view} may one-day print values which can be used as
-arguments to the corresponding @code{set} command.)
-
-@node Breakpoints, Structured Output, View Commands, Commands
-@comment node-name, next, previous, up
-@section The Application Can Have Its Own Breakpoints
-
-The GDB breakpoint commands were written with a strong presumption that
-all breakpoints are managed by a human user. Therefore, the command
-language contains commands like `delete' which affect all breakpoints
-without discrimination.
-
-In libgdb, there is added support for breakpoints and watchpoints which
-are set by the application and which should not be affected by ordinary,
-indiscriminate commands. These are called @dfn{protected} breakpoints.
-
-@deffn {Debugger Command} break-protected ...
-@deffnx {Debugger Command} watch-protected ...
-These work like @code{break} and @code{watch} except that the resulting
-breakpoint is given a negative number. Negative numbered breakpoints do
-not appear in the output of @code{info breakpoints} but do in that of
-@code{info all-breakpoints}. Negative numbered breakpoints are not
-affected by commands which ordinarily affect `all' breakpoints (e.g.
-@code{delete} with no arguments).
-
-Note that libgdb itself creates protected breakpoints, so programs
-should not rely on being able to allocate particular protected
-breakpoint numbers for themselves.
-@end deffn
-
-More than one breakpoint may be set at a given location. Libgdb adds
-the concept of @dfn{priority} to breakpoints. A priority is an integer,
-assigned to each breakpoint. When a breakpoint is reached, the
-conditions of all breakpoints at the same location are evaluated in
-order of ascending priority. When breakpoint commands are executed,
-they are also executed in ascending priority (until all have been
-executed, an error occurs, or one set of commands continues the
-target).
-
-@deffn {Debugger Command} priority n bplist
-Set the priority for breakpoints @var{bplist} to @var{n}.
-By default, breakpoints are assigned a priority of zero.
-@end deffn
-
-@node Structured Output, Commands, Breakpoints, Commands
-@comment node-name, next, previous, up
-@section Structured Output, The @code{Explain} Command
-
-(This section may be subject to considerable revision.)
-
-When GDB prints a the value of an expression, the printed representation
-contains information that can be usefully fed back into future commands
-and expressions. For example,
-
-@example
-(gdb) print foo
-$16 = @{v = 0x38ae0, v_length = 40@}
-@end example
-
-On the basis of this output, a user knows, for example, that
-@code{$16.v} refers to a pointer valued @code{0x38ae0}
-
-A new output command helps to make information like this available to
-the application.
-
-@deffn {Debugger Command} explain expression
-@deffnx {Debugger Command} explain /format expression
-Print the value of @var{expression} in the manner of the @code{print}
-command, but embed that output in a list syntax containing information
-about the structure of the output.
-@end deffn
-
-As an example, @code{explain argv} might produce this output:
-
-@example
-(exp-attribute
- ((expression "$19")
- (type "char **")
- (address "48560")
- (deref-expression "*$19"))
- "$19 = 0x3800\n")
-@end example
-
-The syntax of output from @code{explain} is:
-
-@example
-<explanation> := <quoted-string>
- | (exp-concat <explanation> <explanation>*)
- | (exp-attribute <property-list> <explanation>)
-
-<property-list> := ( <property-pair>* )
-
-<property-pair> := ( <property-name> <quoted-string> )
-@end example
-
-The string-concatenation of all of the @code{<quoted-string>} (except
-those in property lists) yields the output generated by the equivalent
-@code{print} command. Quoted strings may contain quotes and backslashes
-if they are escaped by backslash. "\n" in a quoted string stands for
-newline; unescaped newlines do not occur within the strings output by
-@code{explain}.
-
-Property names are made up of alphabetic characters, dashes, and
-underscores.
-
-The set of properties is open-ended. As GDB acquires support for new
-source languages and other new capabilities, new property types may be
-added to the output of this command. Future commands may offer
-applications some selectivity concerning which properties are reported.
-
-The initial set of properties defined includes:
-
-@itemize @bullet
-@item @code{expression}
-
-This is an expression, such as @code{$42} or @code{$42.x}. The
-expression can be used to refer to the value printed in the attributed
-part of the string.
-
-@item @code{type}
-
-This is a user-readable name for the type of the attributed value.
-
-@item @code{address}
-
-If the value is stored in a target register, this is a register number.
-If the value is stored in a GDB convenience variable, this is an integer
-that is unique among all the convenience variables. Otherwise, this is
-the address in the target where the value is stored.
-
-@item @code{deref-expression}
-
-If the attributed value is a pointer type, this is an expression that
-refers to the dereferenced value.
-@end itemize
-
-Here is a larger example, using the same object passed to @code{print}
-in an earlier example of this section.
-
-@example
-(gdb) explain foo
-(exp-attribute
- ( (expression "$16")
- (type "struct bytecode_vector")
- (address 14336) )
- (exp-concat
- "$16 = @{"
- (exp-attribute
- ( (expression "$16.v")
- (type "char *")
- (address 14336)
- (deref-expression "*$16.v") )
- "v = 0x38ae0")
- (exp-attribute
- ( (expression "$16.v_length")
- (type "int")
- (address 14340) )
- ", v_length = 40")
- "@}\n"))
-@end example
-
-It is undefined how libgdb will indent these lines of output or
-where newlines will be included.
-
-@bye
diff --git a/contrib/gdb/gdb/doc/refcard.dvi b/contrib/gdb/gdb/doc/refcard.dvi
deleted file mode 100644
index e152395d31db..000000000000
--- a/contrib/gdb/gdb/doc/refcard.dvi
+++ /dev/null
Binary files differ
diff --git a/contrib/gdb/gdb/doc/remote.texi b/contrib/gdb/gdb/doc/remote.texi
deleted file mode 100644
index 816b65837de9..000000000000
--- a/contrib/gdb/gdb/doc/remote.texi
+++ /dev/null
@@ -1,1708 +0,0 @@
-@c -*- Texinfo -*-
-@c Copyright (c) 1990 1991 1992 1993 Free Software Foundation, Inc.
-@c This file is part of the source for the GDB manual.
-@c This text diverted to "Remote Debugging" section in general case;
-@c however, if we're doing a manual specifically for one of these, it
-@c belongs up front (in "Getting In and Out" chapter).
-
-@ifset REMOTESTUB
-@node Remote Serial
-@subsection The @value{GDBN} remote serial protocol
-
-@cindex remote serial debugging, overview
-To debug a program running on another machine (the debugging
-@dfn{target} machine), you must first arrange for all the usual
-prerequisites for the program to run by itself. For example, for a C
-program, you need:
-
-@enumerate
-@item
-A startup routine to set up the C runtime environment; these usually
-have a name like @file{crt0}. The startup routine may be supplied by
-your hardware supplier, or you may have to write your own.
-
-@item
-You probably need a C subroutine library to support your program's
-subroutine calls, notably managing input and output.
-
-@item
-A way of getting your program to the other machine---for example, a
-download program. These are often supplied by the hardware
-manufacturer, but you may have to write your own from hardware
-documentation.
-@end enumerate
-
-The next step is to arrange for your program to use a serial port to
-communicate with the machine where @value{GDBN} is running (the @dfn{host}
-machine). In general terms, the scheme looks like this:
-
-@table @emph
-@item On the host,
-@value{GDBN} already understands how to use this protocol; when everything
-else is set up, you can simply use the @samp{target remote} command
-(@pxref{Targets,,Specifying a Debugging Target}).
-
-@item On the target,
-you must link with your program a few special-purpose subroutines that
-implement the @value{GDBN} remote serial protocol. The file containing these
-subroutines is called a @dfn{debugging stub}.
-
-@ifset GDBSERVER
-On certain remote targets, you can use an auxiliary program
-@code{gdbserver} instead of linking a stub into your program.
-@xref{Server,,Using the @code{gdbserver} program}, for details.
-@end ifset
-@end table
-
-The debugging stub is specific to the architecture of the remote
-machine; for example, use @file{sparc-stub.c} to debug programs on
-@sc{sparc} boards.
-
-@cindex remote serial stub list
-These working remote stubs are distributed with @value{GDBN}:
-
-@table @code
-
-@item i386-stub.c
-@kindex i386-stub.c
-@cindex Intel
-@cindex i386
-For Intel 386 and compatible architectures.
-
-@item m68k-stub.c
-@kindex m68k-stub.c
-@cindex Motorola 680x0
-@cindex m680x0
-For Motorola 680x0 architectures.
-
-@item sh-stub.c
-@kindex sh-stub.c
-@cindex Hitachi
-@cindex SH
-For Hitachi SH architectures.
-
-@item sparc-stub.c
-@kindex sparc-stub.c
-@cindex Sparc
-For @sc{sparc} architectures.
-
-@item sparcl-stub.c
-@kindex sparcl-stub.c
-@cindex Fujitsu
-@cindex SparcLite
-For Fujitsu @sc{sparclite} architectures.
-
-@end table
-
-The @file{README} file in the @value{GDBN} distribution may list other
-recently added stubs.
-
-@menu
-* Stub Contents:: What the stub can do for you
-* Bootstrapping:: What you must do for the stub
-* Debug Session:: Putting it all together
-* Protocol:: Outline of the communication protocol
-@ifset GDBSERVER
-* Server:: Using the `gdbserver' program
-@end ifset
-@ifset GDBSERVE
-* NetWare:: Using the `gdbserve.nlm' program
-@end ifset
-@end menu
-
-@node Stub Contents
-@subsubsection What the stub can do for you
-
-@cindex remote serial stub
-The debugging stub for your architecture supplies these three
-subroutines:
-
-@table @code
-@item set_debug_traps
-@kindex set_debug_traps
-@cindex remote serial stub, initialization
-This routine arranges for @code{handle_exception} to run when your
-program stops. You must call this subroutine explicitly near the
-beginning of your program.
-
-@item handle_exception
-@kindex handle_exception
-@cindex remote serial stub, main routine
-This is the central workhorse, but your program never calls it
-explicitly---the setup code arranges for @code{handle_exception} to
-run when a trap is triggered.
-
-@code{handle_exception} takes control when your program stops during
-execution (for example, on a breakpoint), and mediates communications
-with @value{GDBN} on the host machine. This is where the communications
-protocol is implemented; @code{handle_exception} acts as the @value{GDBN}
-representative on the target machine; it begins by sending summary
-information on the state of your program, then continues to execute,
-retrieving and transmitting any information @value{GDBN} needs, until you
-execute a @value{GDBN} command that makes your program resume; at that point,
-@code{handle_exception} returns control to your own code on the target
-machine.
-
-@item breakpoint
-@cindex @code{breakpoint} subroutine, remote
-Use this auxiliary subroutine to make your program contain a
-breakpoint. Depending on the particular situation, this may be the only
-way for @value{GDBN} to get control. For instance, if your target
-machine has some sort of interrupt button, you won't need to call this;
-pressing the interrupt button transfers control to
-@code{handle_exception}---in effect, to @value{GDBN}. On some machines,
-simply receiving characters on the serial port may also trigger a trap;
-again, in that situation, you don't need to call @code{breakpoint} from
-your own program---simply running @samp{target remote} from the host
-@value{GDBN} session gets control.
-
-Call @code{breakpoint} if none of these is true, or if you simply want
-to make certain your program stops at a predetermined point for the
-start of your debugging session.
-@end table
-
-@node Bootstrapping
-@subsubsection What you must do for the stub
-
-@cindex remote stub, support routines
-The debugging stubs that come with @value{GDBN} are set up for a particular
-chip architecture, but they have no information about the rest of your
-debugging target machine.
-
-First of all you need to tell the stub how to communicate with the
-serial port.
-
-@table @code
-@item int getDebugChar()
-@kindex getDebugChar
-Write this subroutine to read a single character from the serial port.
-It may be identical to @code{getchar} for your target system; a
-different name is used to allow you to distinguish the two if you wish.
-
-@item void putDebugChar(int)
-@kindex putDebugChar
-Write this subroutine to write a single character to the serial port.
-It may be identical to @code{putchar} for your target system; a
-different name is used to allow you to distinguish the two if you wish.
-@end table
-
-@cindex control C, and remote debugging
-@cindex interrupting remote targets
-If you want @value{GDBN} to be able to stop your program while it is
-running, you need to use an interrupt-driven serial driver, and arrange
-for it to stop when it receives a @code{^C} (@samp{\003}, the control-C
-character). That is the character which @value{GDBN} uses to tell the
-remote system to stop.
-
-Getting the debugging target to return the proper status to @value{GDBN}
-probably requires changes to the standard stub; one quick and dirty way
-is to just execute a breakpoint instruction (the ``dirty'' part is that
-@value{GDBN} reports a @code{SIGTRAP} instead of a @code{SIGINT}).
-
-Other routines you need to supply are:
-
-@table @code
-@item void exceptionHandler (int @var{exception_number}, void *@var{exception_address})
-@kindex exceptionHandler
-Write this function to install @var{exception_address} in the exception
-handling tables. You need to do this because the stub does not have any
-way of knowing what the exception handling tables on your target system
-are like (for example, the processor's table might be in @sc{rom},
-containing entries which point to a table in @sc{ram}).
-@var{exception_number} is the exception number which should be changed;
-its meaning is architecture-dependent (for example, different numbers
-might represent divide by zero, misaligned access, etc). When this
-exception occurs, control should be transferred directly to
-@var{exception_address}, and the processor state (stack, registers,
-and so on) should be just as it is when a processor exception occurs. So if
-you want to use a jump instruction to reach @var{exception_address}, it
-should be a simple jump, not a jump to subroutine.
-
-For the 386, @var{exception_address} should be installed as an interrupt
-gate so that interrupts are masked while the handler runs. The gate
-should be at privilege level 0 (the most privileged level). The
-@sc{sparc} and 68k stubs are able to mask interrup themselves without
-help from @code{exceptionHandler}.
-
-@item void flush_i_cache()
-@kindex flush_i_cache
-(sparc and sparclite only) Write this subroutine to flush the
-instruction cache, if any, on your target machine. If there is no
-instruction cache, this subroutine may be a no-op.
-
-On target machines that have instruction caches, @value{GDBN} requires this
-function to make certain that the state of your program is stable.
-@end table
-
-@noindent
-You must also make sure this library routine is available:
-
-@table @code
-@item void *memset(void *, int, int)
-@kindex memset
-This is the standard library function @code{memset} that sets an area of
-memory to a known value. If you have one of the free versions of
-@code{libc.a}, @code{memset} can be found there; otherwise, you must
-either obtain it from your hardware manufacturer, or write your own.
-@end table
-
-If you do not use the GNU C compiler, you may need other standard
-library subroutines as well; this varies from one stub to another,
-but in general the stubs are likely to use any of the common library
-subroutines which @code{gcc} generates as inline code.
-
-
-@node Debug Session
-@subsubsection Putting it all together
-
-@cindex remote serial debugging summary
-In summary, when your program is ready to debug, you must follow these
-steps.
-
-@enumerate
-@item
-Make sure you have the supporting low-level routines
-(@pxref{Bootstrapping,,What you must do for the stub}):
-@display
-@code{getDebugChar}, @code{putDebugChar},
-@code{flush_i_cache}, @code{memset}, @code{exceptionHandler}.
-@end display
-
-@item
-Insert these lines near the top of your program:
-
-@example
-set_debug_traps();
-breakpoint();
-@end example
-
-@item
-For the 680x0 stub only, you need to provide a variable called
-@code{exceptionHook}. Normally you just use:
-
-@example
-void (*exceptionHook)() = 0;
-@end example
-
-but if before calling @code{set_debug_traps}, you set it to point to a
-function in your program, that function is called when
-@code{@value{GDBN}} continues after stopping on a trap (for example, bus
-error). The function indicated by @code{exceptionHook} is called with
-one parameter: an @code{int} which is the exception number.
-
-@item
-Compile and link together: your program, the @value{GDBN} debugging stub for
-your target architecture, and the supporting subroutines.
-
-@item
-Make sure you have a serial connection between your target machine and
-the @value{GDBN} host, and identify the serial port on the host.
-
-@item
-@c The "remote" target now provides a `load' command, so we should
-@c document that. FIXME.
-Download your program to your target machine (or get it there by
-whatever means the manufacturer provides), and start it.
-
-@item
-To start remote debugging, run @value{GDBN} on the host machine, and specify
-as an executable file the program that is running in the remote machine.
-This tells @value{GDBN} how to find your program's symbols and the contents
-of its pure text.
-
-@cindex serial line, @code{target remote}
-Then establish communication using the @code{target remote} command.
-Its argument specifies how to communicate with the target
-machine---either via a devicename attached to a direct serial line, or a
-TCP port (usually to a terminal server which in turn has a serial line
-to the target). For example, to use a serial line connected to the
-device named @file{/dev/ttyb}:
-
-@example
-target remote /dev/ttyb
-@end example
-
-@cindex TCP port, @code{target remote}
-To use a TCP connection, use an argument of the form
-@code{@var{host}:port}. For example, to connect to port 2828 on a
-terminal server named @code{manyfarms}:
-
-@example
-target remote manyfarms:2828
-@end example
-@end enumerate
-
-Now you can use all the usual commands to examine and change data and to
-step and continue the remote program.
-
-To resume the remote program and stop debugging it, use the @code{detach}
-command.
-
-@cindex interrupting remote programs
-@cindex remote programs, interrupting
-Whenever @value{GDBN} is waiting for the remote program, if you type the
-interrupt character (often @key{C-C}), @value{GDBN} attempts to stop the
-program. This may or may not succeed, depending in part on the hardware
-and the serial drivers the remote system uses. If you type the
-interrupt character once again, @value{GDBN} displays this prompt:
-
-@example
-Interrupted while waiting for the program.
-Give up (and stop debugging it)? (y or n)
-@end example
-
-If you type @kbd{y}, @value{GDBN} abandons the remote debugging session.
-(If you decide you want to try again later, you can use @samp{target
-remote} again to connect once more.) If you type @kbd{n}, @value{GDBN}
-goes back to waiting.
-
-@node Protocol
-@subsubsection Communication protocol
-
-@cindex debugging stub, example
-@cindex remote stub, example
-@cindex stub example, remote debugging
-The stub files provided with @value{GDBN} implement the target side of the
-communication protocol, and the @value{GDBN} side is implemented in the
-@value{GDBN} source file @file{remote.c}. Normally, you can simply allow
-these subroutines to communicate, and ignore the details. (If you're
-implementing your own stub file, you can still ignore the details: start
-with one of the existing stub files. @file{sparc-stub.c} is the best
-organized, and therefore the easiest to read.)
-
-However, there may be occasions when you need to know something about
-the protocol---for example, if there is only one serial port to your
-target machine, you might want your program to do something special if
-it recognizes a packet meant for @value{GDBN}.
-
-@cindex protocol, @value{GDBN} remote serial
-@cindex serial protocol, @value{GDBN} remote
-@cindex remote serial protocol
-All @value{GDBN} commands and responses (other than acknowledgements, which
-are single characters) are sent as a packet which includes a
-checksum. A packet is introduced with the character @samp{$}, and ends
-with the character @samp{#} followed by a two-digit checksum:
-
-@example
-$@var{packet info}#@var{checksum}
-@end example
-
-@cindex checksum, for @value{GDBN} remote
-@noindent
-@var{checksum} is computed as the modulo 256 sum of the @var{packet
-info} characters.
-
-When either the host or the target machine receives a packet, the first
-response expected is an acknowledgement: a single character, either
-@samp{+} (to indicate the package was received correctly) or @samp{-}
-(to request retransmission).
-
-The host (@value{GDBN}) sends commands, and the target (the debugging stub
-incorporated in your program) sends data in response. The target also
-sends data when your program stops.
-
-Command packets are distinguished by their first character, which
-identifies the kind of command.
-
-These are some of the commands currently supported (for a complete list of
-commands, look in @file{gdb/remote.c.}):
-
-@table @code
-@item g
-Requests the values of CPU registers.
-
-@item G
-Sets the values of CPU registers.
-
-@item m@var{addr},@var{count}
-Read @var{count} bytes at location @var{addr}.
-
-@item M@var{addr},@var{count}:@dots{}
-Write @var{count} bytes at location @var{addr}.
-
-@need 500
-@item c
-@itemx c@var{addr}
-Resume execution at the current address (or at @var{addr} if supplied).
-
-@need 500
-@item s
-@itemx s@var{addr}
-Step the target program for one instruction, from either the current
-program counter or from @var{addr} if supplied.
-
-@item k
-Kill the target program.
-
-@item ?
-Report the most recent signal. To allow you to take advantage of the
-@value{GDBN} signal handling commands, one of the functions of the debugging
-stub is to report CPU traps as the corresponding POSIX signal values.
-
-@item T
-Allows the remote stub to send only the registers that @value{GDBN} needs
-to make a quick decision about single-stepping or conditional breakpoints.
-This eliminates the need to fetch the entire register set for each instruction
-being stepped through.
-
-@value{GDBN} now implements a write-through cache for registers and only
-re-reads the registers if the target has run.
-@end table
-
-@kindex set remotedebug
-@kindex show remotedebug
-@cindex packets, reporting on stdout
-@cindex serial connections, debugging
-If you have trouble with the serial connection, you can use the command
-@code{set remotedebug}. This makes @value{GDBN} report on all packets sent
-back and forth across the serial line to the remote machine. The
-packet-debugging information is printed on the @value{GDBN} standard output
-stream. @code{set remotedebug off} turns it off, and @code{show
-remotedebug} shows you its current state.
-
-@ifset GDBSERVER
-@node Server
-@subsubsection Using the @code{gdbserver} program
-
-@kindex gdbserver
-@cindex remote connection without stubs
-@code{gdbserver} is a control program for Unix-like systems, which
-allows you to connect your program with a remote @value{GDBN} via
-@code{target remote}---but without linking in the usual debugging stub.
-
-@code{gdbserver} is not a complete replacement for the debugging stubs,
-because it requires essentially the same operating-system facilities
-that @value{GDBN} itself does. In fact, a system that can run
-@code{gdbserver} to connect to a remote @value{GDBN} could also run
-@value{GDBN} locally! @code{gdbserver} is sometimes useful nevertheless,
-because it is a much smaller program than @value{GDBN} itself. It is
-also easier to port than all of @value{GDBN}, so you may be able to get
-started more quickly on a new system by using @code{gdbserver}.
-Finally, if you develop code for real-time systems, you may find that
-the tradeoffs involved in real-time operation make it more convenient to
-do as much development work as possible on another system, for example
-by cross-compiling. You can use @code{gdbserver} to make a similar
-choice for debugging.
-
-@value{GDBN} and @code{gdbserver} communicate via either a serial line
-or a TCP connection, using the standard @value{GDBN} remote serial
-protocol.
-
-@table @emph
-@item On the target machine,
-you need to have a copy of the program you want to debug.
-@code{gdbserver} does not need your program's symbol table, so you can
-strip the program if necessary to save space. @value{GDBN} on the host
-system does all the symbol handling.
-
-To use the server, you must tell it how to communicate with @value{GDBN};
-the name of your program; and the arguments for your program. The
-syntax is:
-
-@smallexample
-target> gdbserver @var{comm} @var{program} [ @var{args} @dots{} ]
-@end smallexample
-
-@var{comm} is either a device name (to use a serial line) or a TCP
-hostname and portnumber. For example, to debug Emacs with the argument
-@samp{foo.txt} and communicate with @value{GDBN} over the serial port
-@file{/dev/com1}:
-
-@smallexample
-target> gdbserver /dev/com1 emacs foo.txt
-@end smallexample
-
-@code{gdbserver} waits passively for the host @value{GDBN} to communicate
-with it.
-
-To use a TCP connection instead of a serial line:
-
-@smallexample
-target> gdbserver host:2345 emacs foo.txt
-@end smallexample
-
-The only difference from the previous example is the first argument,
-specifying that you are communicating with the host @value{GDBN} via
-TCP. The @samp{host:2345} argument means that @code{gdbserver} is to
-expect a TCP connection from machine @samp{host} to local TCP port 2345.
-(Currently, the @samp{host} part is ignored.) You can choose any number
-you want for the port number as long as it does not conflict with any
-TCP ports already in use on the target system (for example, @code{23} is
-reserved for @code{telnet}).@footnote{If you choose a port number that
-conflicts with another service, @code{gdbserver} prints an error message
-and exits.} You must use the same port number with the host @value{GDBN}
-@code{target remote} command.
-
-@item On the @value{GDBN} host machine,
-you need an unstripped copy of your program, since @value{GDBN} needs
-symbols and debugging information. Start up @value{GDBN} as usual,
-using the name of the local copy of your program as the first argument.
-(You may also need the @w{@samp{--baud}} option if the serial line is
-running at anything other than 9600 bps.) After that, use @code{target
-remote} to establish communications with @code{gdbserver}. Its argument
-is either a device name (usually a serial device, like
-@file{/dev/ttyb}), or a TCP port descriptor in the form
-@code{@var{host}:@var{PORT}}. For example:
-
-@smallexample
-(@value{GDBP}) target remote /dev/ttyb
-@end smallexample
-
-@noindent
-communicates with the server via serial line @file{/dev/ttyb}, and
-
-@smallexample
-(@value{GDBP}) target remote the-target:2345
-@end smallexample
-
-@noindent
-communicates via a TCP connection to port 2345 on host @w{@file{the-target}}.
-For TCP connections, you must start up @code{gdbserver} prior to using
-the @code{target remote} command. Otherwise you may get an error whose
-text depends on the host system, but which usually looks something like
-@samp{Connection refused}.
-@end table
-@end ifset
-
-@ifset GDBSERVE
-@node NetWare
-@subsubsection Using the @code{gdbserve.nlm} program
-
-@kindex gdbserve.nlm
-@code{gdbserve.nlm} is a control program for NetWare systems, which
-allows you to connect your program with a remote @value{GDBN} via
-@code{target remote}.
-
-@value{GDBN} and @code{gdbserve.nlm} communicate via a serial line,
-using the standard @value{GDBN} remote serial protocol.
-
-@table @emph
-@item On the target machine,
-you need to have a copy of the program you want to debug.
-@code{gdbserve.nlm} does not need your program's symbol table, so you
-can strip the program if necessary to save space. @value{GDBN} on the
-host system does all the symbol handling.
-
-To use the server, you must tell it how to communicate with
-@value{GDBN}; the name of your program; and the arguments for your
-program. The syntax is:
-
-@smallexample
-load gdbserve [ BOARD=@var{board} ] [ PORT=@var{port} ]
- [ BAUD=@var{baud} ] @var{program} [ @var{args} @dots{} ]
-@end smallexample
-
-@var{board} and @var{port} specify the serial line; @var{baud} specifies
-the baud rate used by the connection. @var{port} and @var{node} default
-to 0, @var{baud} defaults to 9600 bps.
-
-For example, to debug Emacs with the argument @samp{foo.txt}and
-communicate with @value{GDBN} over serial port number 2 or board 1
-using a 19200 bps connection:
-
-@smallexample
-load gdbserve BOARD=1 PORT=2 BAUD=19200 emacs foo.txt
-@end smallexample
-
-@item On the @value{GDBN} host machine,
-you need an unstripped copy of your program, since @value{GDBN} needs
-symbols and debugging information. Start up @value{GDBN} as usual,
-using the name of the local copy of your program as the first argument.
-(You may also need the @w{@samp{--baud}} option if the serial line is
-running at anything other than 9600 bps. After that, use @code{target
-remote} to establish communications with @code{gdbserve.nlm}. Its
-argument is a device name (usually a serial device, like
-@file{/dev/ttyb}). For example:
-
-@smallexample
-(@value{GDBP}) target remote /dev/ttyb
-@end smallexample
-
-@noindent
-communications with the server via serial line @file{/dev/ttyb}.
-@end table
-@end ifset
-
-@end ifset
-
-@ifset I960
-@node i960-Nindy Remote
-@subsection @value{GDBN} with a remote i960 (Nindy)
-
-@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
-
-@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:
-
-@example
-Attach /dev/ttyNN -- specify NN, or "quit" to quit:
-@end example
-
-@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
-@end ifset
-
-@ifset AMD29K
-@node UDI29K Remote
-@subsection The UDI protocol for AMD29K
-
-@cindex UDI
-@cindex AMD29K via UDI
-@value{GDBN} supports AMD's UDI (``Universal Debugger Interface'')
-protocol for debugging the a29k processor family. To use this
-configuration with AMD targets running the MiniMON monitor, you need the
-program @code{MONTIP}, available from AMD at no charge. You can also
-use @value{GDBN} with the UDI-conformant a29k simulator program
-@code{ISSTIP}, also available from AMD.
-
-@table @code
-@item target udi @var{keyword}
-@kindex udi
-Select the UDI interface to a remote a29k board or simulator, where
-@var{keyword} is an entry in the AMD configuration file @file{udi_soc}.
-This file contains keyword entries which specify parameters used to
-connect to a29k targets. If the @file{udi_soc} file is not in your
-working directory, you must set the environment variable @samp{UDICONF}
-to its pathname.
-@end table
-
-@node EB29K Remote
-@subsection The EBMON protocol for AMD29K
-
-@cindex EB29K board
-@cindex running 29K programs
-
-AMD distributes a 29K development board meant to fit in a PC, together
-with a DOS-hosted monitor program called @code{EBMON}. As a shorthand
-term, this development system is called the ``EB29K''. To use
-@value{GDBN} from a Unix system to run programs on the EB29K board, you
-must first connect a serial cable between the PC (which hosts the EB29K
-board) and a serial port on the Unix system. In the following, we
-assume you've hooked the cable between the PC's @file{COM1} port and
-@file{/dev/ttya} on the Unix system.
-
-@menu
-* Comms (EB29K):: Communications setup
-* gdb-EB29K:: EB29K cross-debugging
-* Remote Log:: Remote log
-@end menu
-
-@node Comms (EB29K)
-@subsubsection Communications setup
-
-The next step is to set up the PC's port, by doing something like this
-in DOS on the PC:
-
-@example
-C:\> MODE com1:9600,n,8,1,none
-@end example
-
-@noindent
-This example---run on an MS DOS 4.0 system---sets the PC port to 9600
-bps, no parity, eight data bits, one stop bit, and no ``retry'' action;
-you must match the communications parameters when establishing the Unix
-end of the connection as well.
-@c FIXME: Who knows what this "no retry action" crud from the DOS manual may
-@c mean? It's optional; leave it out? ---doc@cygnus.com, 25feb91
-
-To give control of the PC to the Unix side of the serial line, type
-the following at the DOS console:
-
-@example
-C:\> CTTY com1
-@end example
-
-@noindent
-(Later, if you wish to return control to the DOS console, you can use
-the command @code{CTTY con}---but you must send it over the device that
-had control, in our example over the @file{COM1} serial line).
-
-From the Unix host, use a communications program such as @code{tip} or
-@code{cu} to communicate with the PC; for example,
-
-@example
-cu -s 9600 -l /dev/ttya
-@end example
-
-@noindent
-The @code{cu} options shown specify, respectively, the linespeed and the
-serial port to use. If you use @code{tip} instead, your command line
-may look something like the following:
-
-@example
-tip -9600 /dev/ttya
-@end example
-
-@noindent
-Your system may require a different name where we show
-@file{/dev/ttya} as the argument to @code{tip}. The communications
-parameters, including which port to use, are associated with the
-@code{tip} argument in the ``remote'' descriptions file---normally the
-system table @file{/etc/remote}.
-@c FIXME: What if anything needs doing to match the "n,8,1,none" part of
-@c the DOS side's comms setup? cu can support -o (odd
-@c parity), -e (even parity)---apparently no settings for no parity or
-@c for character size. Taken from stty maybe...? John points out tip
-@c can set these as internal variables, eg ~s parity=none; man stty
-@c suggests that it *might* work to stty these options with stdin or
-@c stdout redirected... ---doc@cygnus.com, 25feb91
-
-@kindex EBMON
-Using the @code{tip} or @code{cu} connection, change the DOS working
-directory to the directory containing a copy of your 29K program, then
-start the PC program @code{EBMON} (an EB29K control program supplied
-with your board by AMD). You should see an initial display from
-@code{EBMON} similar to the one that follows, ending with the
-@code{EBMON} prompt @samp{#}---
-
-@example
-C:\> G:
-
-G:\> CD \usr\joe\work29k
-
-G:\USR\JOE\WORK29K> EBMON
-Am29000 PC Coprocessor Board Monitor, version 3.0-18
-Copyright 1990 Advanced Micro Devices, Inc.
-Written by Gibbons and Associates, Inc.
-
-Enter '?' or 'H' for help
-
-PC Coprocessor Type = EB29K
-I/O Base = 0x208
-Memory Base = 0xd0000
-
-Data Memory Size = 2048KB
-Available I-RAM Range = 0x8000 to 0x1fffff
-Available D-RAM Range = 0x80002000 to 0x801fffff
-
-PageSize = 0x400
-Register Stack Size = 0x800
-Memory Stack Size = 0x1800
-
-CPU PRL = 0x3
-Am29027 Available = No
-Byte Write Available = Yes
-
-# ~.
-@end example
-
-Then exit the @code{cu} or @code{tip} program (done in the example by
-typing @code{~.} at the @code{EBMON} prompt). @code{EBMON} keeps
-running, ready for @value{GDBN} to take over.
-
-For this example, we've assumed what is probably the most convenient
-way to make sure the same 29K program is on both the PC and the Unix
-system: a PC/NFS connection that establishes ``drive @code{G:}'' on the
-PC as a file system on the Unix host. If you do not have PC/NFS or
-something similar connecting the two systems, you must arrange some
-other way---perhaps floppy-disk transfer---of getting the 29K program
-from the Unix system to the PC; @value{GDBN} does @emph{not} download it over the
-serial line.
-
-@node gdb-EB29K
-@subsubsection EB29K cross-debugging
-
-Finally, @code{cd} to the directory containing an image of your 29K
-program on the Unix system, and start @value{GDBN}---specifying as argument the
-name of your 29K program:
-
-@example
-cd /usr/joe/work29k
-@value{GDBP} myfoo
-@end example
-
-@need 500
-Now you can use the @code{target} command:
-
-@example
-target amd-eb /dev/ttya 9600 MYFOO
-@c FIXME: test above 'target amd-eb' as spelled, with caps! caps are meant to
-@c emphasize that this is the name as seen by DOS (since I think DOS is
-@c single-minded about case of letters). ---doc@cygnus.com, 25feb91
-@end example
-
-@noindent
-In this example, we've assumed your program is in a file called
-@file{myfoo}. Note that the filename given as the last argument to
-@code{target amd-eb} should be the name of the program as it appears to DOS.
-In our example this is simply @code{MYFOO}, but in general it can include
-a DOS path, and depending on your transfer mechanism may not resemble
-the name on the Unix side.
-
-At this point, you can set any breakpoints you wish; when you are ready
-to see your program run on the 29K board, use the @value{GDBN} command
-@code{run}.
-
-To stop debugging the remote program, use the @value{GDBN} @code{detach}
-command.
-
-To return control of the PC to its console, use @code{tip} or @code{cu}
-once again, after your @value{GDBN} session has concluded, to attach to
-@code{EBMON}. You can then type the command @code{q} to shut down
-@code{EBMON}, returning control to the DOS command-line interpreter.
-Type @code{CTTY con} to return command input to the main DOS console,
-and type @kbd{~.} to leave @code{tip} or @code{cu}.
-
-@node Remote Log
-@subsubsection Remote log
-@kindex eb.log
-@cindex log file for EB29K
-
-The @code{target amd-eb} command creates a file @file{eb.log} in the
-current working directory, to help debug problems with the connection.
-@file{eb.log} records all the output from @code{EBMON}, including echoes
-of the commands sent to it. Running @samp{tail -f} on this file in
-another window often helps to understand trouble with @code{EBMON}, or
-unexpected events on the PC side of the connection.
-
-@end ifset
-
-@ifset ST2000
-@node ST2000 Remote
-@subsection @value{GDBN} with a Tandem ST2000
-
-To connect your ST2000 to the host system, see the manufacturer's
-manual. Once the ST2000 is physically attached, you can run:
-
-@example
-target st2000 @var{dev} @var{speed}
-@end example
-
-@noindent
-to establish it as your debugging environment. @var{dev} is normally
-the name of a serial device, such as @file{/dev/ttya}, connected to the
-ST2000 via a serial line. You can instead specify @var{dev} as a TCP
-connection (for example, to a serial line attached via a terminal
-concentrator) using the syntax @code{@var{hostname}:@var{portnumber}}.
-
-The @code{load} and @code{attach} commands are @emph{not} defined for
-this target; you must load your program into the ST2000 as you normally
-would for standalone operation. @value{GDBN} reads debugging information
-(such as symbols) from a separate, debugging version of the program
-available on your host computer.
-@c FIXME!! This is terribly vague; what little content is here is
-@c basically hearsay.
-
-@cindex ST2000 auxiliary commands
-These auxiliary @value{GDBN} commands are available to help you with the ST2000
-environment:
-
-@table @code
-@item st2000 @var{command}
-@kindex st2000 @var{cmd}
-@cindex STDBUG commands (ST2000)
-@cindex commands to STDBUG (ST2000)
-Send a @var{command} to the STDBUG monitor. See the manufacturer's
-manual for available commands.
-
-@item connect
-@cindex connect (to STDBUG)
-Connect the controlling terminal to the STDBUG command monitor. When
-you are done interacting with STDBUG, typing either of two character
-sequences gets you back to the @value{GDBN} command prompt:
-@kbd{@key{RET}~.} (Return, followed by tilde and period) or
-@kbd{@key{RET}~@key{C-d}} (Return, followed by tilde and control-D).
-@end table
-@end ifset
-
-@ifset VXWORKS
-@node VxWorks Remote
-@subsection @value{GDBN} and VxWorks
-@cindex VxWorks
-
-@value{GDBN} enables developers to spawn and debug tasks running on networked
-VxWorks targets from a Unix host. Already-running tasks spawned from
-the VxWorks shell can also be debugged. @value{GDBN} uses code that runs on
-both the Unix host and on the VxWorks target. The program
-@code{gdb} is installed and executed on the Unix host. (It may be
-installed with the name @code{vxgdb}, to distinguish it from a
-@value{GDBN} for debugging programs on the host itself.)
-
-@table @code
-@item VxWorks-timeout @var{args}
-@kindex vxworks-timeout
-All VxWorks-based targets now support the option @code{vxworks-timeout}.
-This option is set by the user, and @var{args} represents the number of
-seconds @value{GDBN} waits for responses to rpc's. You might use this if
-your VxWorks target is a slow software simulator or is on the far side
-of a thin network line.
-@end table
-
-The following information on connecting to VxWorks was current when
-this manual was produced; newer releases of VxWorks may use revised
-procedures.
-
-@kindex INCLUDE_RDB
-To use @value{GDBN} with VxWorks, you must rebuild your VxWorks kernel
-to include the remote debugging interface routines in the VxWorks
-library @file{rdb.a}. To do this, define @code{INCLUDE_RDB} in the
-VxWorks configuration file @file{configAll.h} and rebuild your VxWorks
-kernel. The resulting kernel contains @file{rdb.a}, and spawns the
-source debugging task @code{tRdbTask} when VxWorks is booted. For more
-information on configuring and remaking VxWorks, see the manufacturer's
-manual.
-@c VxWorks, see the @cite{VxWorks Programmer's Guide}.
-
-Once you have included @file{rdb.a} in your VxWorks system image and set
-your Unix execution search path to find @value{GDBN}, you are ready to
-run @value{GDBN}. From your Unix host, run @code{gdb} (or @code{vxgdb},
-depending on your installation).
-
-@value{GDBN} comes up showing the prompt:
-
-@example
-(vxgdb)
-@end example
-
-@menu
-* VxWorks Connection:: Connecting to VxWorks
-* VxWorks Download:: VxWorks download
-* VxWorks Attach:: Running tasks
-@end menu
-
-@node VxWorks Connection
-@subsubsection Connecting to VxWorks
-
-The @value{GDBN} command @code{target} lets you connect to a VxWorks target on the
-network. To connect to a target whose host name is ``@code{tt}'', type:
-
-@example
-(vxgdb) target vxworks tt
-@end example
-
-@need 750
-@value{GDBN} displays messages like these:
-
-@smallexample
-Attaching remote machine across net...
-Connected to tt.
-@end smallexample
-
-@need 1000
-@value{GDBN} then attempts to read the symbol tables of any object modules
-loaded into the VxWorks target since it was last booted. @value{GDBN} locates
-these files by searching the directories listed in the command search
-path (@pxref{Environment, ,Your program's environment}); if it fails
-to find an object file, it displays a message such as:
-
-@example
-prog.o: No such file or directory.
-@end example
-
-When this happens, add the appropriate directory to the search path with
-the @value{GDBN} command @code{path}, and execute the @code{target}
-command again.
-
-@node VxWorks Download
-@subsubsection VxWorks download
-
-@cindex download to VxWorks
-If you have connected to the VxWorks target and you want to debug an
-object that has not yet been loaded, you can use the @value{GDBN}
-@code{load} command to download a file from Unix to VxWorks
-incrementally. The object file given as an argument to the @code{load}
-command is actually opened twice: first by the VxWorks target in order
-to download the code, then by @value{GDBN} in order to read the symbol
-table. This can lead to problems if the current working directories on
-the two systems differ. If both systems have NFS mounted the same
-filesystems, you can avoid these problems by using absolute paths.
-Otherwise, it is simplest to set the working directory on both systems
-to the directory in which the object file resides, and then to reference
-the file by its name, without any path. For instance, a program
-@file{prog.o} may reside in @file{@var{vxpath}/vw/demo/rdb} in VxWorks
-and in @file{@var{hostpath}/vw/demo/rdb} on the host. To load this
-program, type this on VxWorks:
-
-@example
--> cd "@var{vxpath}/vw/demo/rdb"
-@end example
-v
-Then, in @value{GDBN}, type:
-
-@example
-(vxgdb) cd @var{hostpath}/vw/demo/rdb
-(vxgdb) load prog.o
-@end example
-
-@value{GDBN} displays a response similar to this:
-
-@smallexample
-Reading symbol data from wherever/vw/demo/rdb/prog.o... done.
-@end smallexample
-
-You can also use the @code{load} command to reload an object module
-after editing and recompiling the corresponding source file. Note that
-this makes @value{GDBN} delete all currently-defined breakpoints,
-auto-displays, and convenience variables, and to clear the value
-history. (This is necessary in order to preserve the integrity of
-debugger data structures that reference the target system's symbol
-table.)
-
-@node VxWorks Attach
-@subsubsection Running tasks
-
-@cindex running VxWorks tasks
-You can also attach to an existing task using the @code{attach} command as
-follows:
-
-@example
-(vxgdb) attach @var{task}
-@end example
-
-@noindent
-where @var{task} is the VxWorks hexadecimal task ID. The task can be running
-or suspended when you attach to it. Running tasks are suspended at
-the time of attachment.
-@end ifset
-
-@ifset SPARCLET
-@node Sparclet Remote
-@subsection @value{GDBN} and Sparclet
-@cindex Sparclet
-
-@value{GDBN} enables developers to debug tasks running on
-Sparclet targets from a Unix host.
-@value{GDBN} uses code that runs on
-both the Unix host and on the Sparclet target. The program
-@code{gdb} is installed and executed on the Unix host.
-
-@table @code
-@item timeout @var{args}
-@kindex remotetimeout
-@value{GDBN} now supports the option @code{remotetimeout}.
-This option is set by the user, and @var{args} represents the number of
-seconds @value{GDBN} waits for responses.
-@end table
-
-@kindex Compiling
-When compiling for debugging, include the options "-g" to get debug
-information and "-Ttext" to relocate the program to where you wish to
-load it on the target. You may also want to add the options "-n" or
-"-N" in order to reduce the size of the sections.
-
-@example
-sparclet-aout-gcc prog.c -Ttext 0x12010000 -g -o prog -N
-@end example
-
-You can use objdump to verify that the addresses are what you intended.
-
-@example
-sparclet-aout-objdump --headers --syms prog
-@end example
-
-@kindex Running
-Once you have set
-your Unix execution search path to find @value{GDBN}, you are ready to
-run @value{GDBN}. From your Unix host, run @code{gdb}
-(or @code{sparclet-aout-gdb}, depending on your installation).
-
-@value{GDBN} comes up showing the prompt:
-
-@example
-(gdbslet)
-@end example
-
-@menu
-* Sparclet File:: Setting the file to debug
-* Sparclet Connection:: Connecting to Sparclet
-* Sparclet Download:: Sparclet download
-* Sparclet Execution:: Running and debugging
-@end menu
-
-@node Sparclet File
-@subsubsection Setting file to debug
-
-The @value{GDBN} command @code{file} lets you choose with program to debug.
-
-@example
-(gdbslet) file prog
-@end example
-
-@need 1000
-@value{GDBN} then attempts to read the symbol table of @file{prog}.
-@value{GDBN} locates
-the file by searching the directories listed in the command search
-path.
-If the file was compiled with debug information (option "-g"), source
-files will be searched as well.
-@value{GDBN} locates
-the source files by searching the directories listed in the directory search
-path (@pxref{Environment, ,Your program's environment}).
-If it fails
-to find a file, it displays a message such as:
-
-@example
-prog: No such file or directory.
-@end example
-
-When this happens, add the appropriate directories to the search paths with
-the @value{GDBN} commands @code{path} and @code{dir}, and execute the
-@code{target} command again.
-
-@node Sparclet Connection
-@subsubsection Connecting to Sparclet
-
-The @value{GDBN} command @code{target} lets you connect to a Sparclet target.
-To connect to a target on serial port ``@code{ttya}'', type:
-
-@example
-(gdbslet) target sparclet /dev/ttya
-Remote target sparclet connected to /dev/ttya
-main () at ../prog.c:3
-@end example
-
-@need 750
-@value{GDBN} displays messages like these:
-
-@smallexample
-Connected to ttya.
-@end smallexample
-
-@node Sparclet Download
-@subsubsection Sparclet download
-
-@cindex download to Sparclet
-Once connected to the Sparclet target,
-you can use the @value{GDBN}
-@code{load} command to download the file from the host to the target.
-The file name and load offset should be given as arguments to the @code{load}
-command.
-Since the file format is aout, the program must be loaded to the starting
-address. You can use objdump to find out what this value is. The load
-offset is an offset which is added to the VMA (virtual memory address)
-of each of the file's sections.
-For instance, if the program
-@file{prog} was linked to text address 0x1201000, with data at 0x12010160
-and bss at 0x12010170, in @value{GDBN}, type:
-
-@example
-(gdbslet) load prog 0x12010000
-Loading section .text, size 0xdb0 vma 0x12010000
-@end example
-
-If the code is loaded at a different address then what the program was linked
-to, you may need to use the @code{section} and @code{add-symbol-file} commands
-to tell @value{GDBN} where to map the symbol table.
-
-@node Sparclet Execution
-@subsubsection Running and debugging
-
-@cindex running and debugging Sparclet programs
-You can now begin debugging the task using @value{GDBN}'s execution control
-commands, @code{b}, @code{step}, @code{run}, etc. See the @value{GDBN}
-manual for the list of commands.
-
-@example
-(gdbslet) b main
-Breakpoint 1 at 0x12010000: file prog.c, line 3.
-(gdbslet) run
-Starting program: prog
-Breakpoint 1, main (argc=1, argv=0xeffff21c) at prog.c:3
-3 char *symarg = 0;
-(gdbslet) step
-4 char *execarg = "hello!";
-(gdbslet)
-@end example
-
-@end ifset
-
-@ifset H8
-@node Hitachi Remote
-@subsection @value{GDBN} and Hitachi microprocessors
-@value{GDBN} needs to know these things to talk to your
-Hitachi SH, H8/300, or H8/500:
-
-@enumerate
-@item
-that you want to use @samp{target hms}, the remote debugging interface
-for Hitachi microprocessors, or @samp{target e7000}, the in-circuit
-emulator for the Hitachi SH and the Hitachi 300H. (@samp{target hms} is
-the default when GDB is configured specifically for the Hitachi SH,
-H8/300, or H8/500.)
-
-@item
-what serial device connects your host to your Hitachi board (the first
-serial device available on your host is the default).
-
-@ifclear H8EXCLUSIVE
-@c this is only for Unix hosts, not of interest to Hitachi
-@item
-what speed to use over the serial device.
-@end ifclear
-@end enumerate
-
-@menu
-* Hitachi Boards:: Connecting to Hitachi boards.
-* Hitachi ICE:: Using the E7000 In-Circuit Emulator.
-* Hitachi Special:: Special @value{GDBN} commands for Hitachi micros.
-@end menu
-
-@node Hitachi Boards
-@subsubsection Connecting to Hitachi boards
-
-@ifclear H8EXCLUSIVE
-@c only for Unix hosts
-@kindex device
-@cindex serial device, Hitachi micros
-Use the special @code{@value{GDBP}} command @samp{device @var{port}} if you
-need to explicitly set the serial device. The default @var{port} is the
-first available port on your host. This is only necessary on Unix
-hosts, where it is typically something like @file{/dev/ttya}.
-
-@kindex speed
-@cindex serial line speed, Hitachi micros
-@code{@value{GDBP}} has another special command to set the communications
-speed: @samp{speed @var{bps}}. This command also is only used from Unix
-hosts; on DOS hosts, set the line speed as usual from outside GDB with
-the DOS @kbd{mode} command (for instance, @w{@samp{mode
-com2:9600,n,8,1,p}} for a 9600 bps connection).
-
-The @samp{device} and @samp{speed} commands are available only when you
-use a Unix host to debug your Hitachi microprocessor programs. If you
-use a DOS host,
-@end ifclear
-@value{GDBN} depends on an auxiliary terminate-and-stay-resident program
-called @code{asynctsr} to communicate with the development board
-through a PC serial port. You must also use the DOS @code{mode} command
-to set up the serial port on the DOS side.
-
-@ifset DOSHOST
-The following sample session illustrates the steps needed to start a
-program under @value{GDBN} control on an H8/300. The example uses a
-sample H8/300 program called @file{t.x}. The procedure is the same for
-the Hitachi SH and the H8/500.
-
-First hook up your development board. In this example, we use a
-board attached to serial port @code{COM2}; if you use a different serial
-port, substitute its name in the argument of the @code{mode} command.
-When you call @code{asynctsr}, the auxiliary comms program used by the
-degugger, you give it just the numeric part of the serial port's name;
-for example, @samp{asyncstr 2} below runs @code{asyncstr} on
-@code{COM2}.
-
-@example
-C:\H8300\TEST> asynctsr 2
-C:\H8300\TEST> mode com2:9600,n,8,1,p
-
-Resident portion of MODE loaded
-
-COM2: 9600, n, 8, 1, p
-
-@end example
-
-@quotation
-@emph{Warning:} We have noticed a bug in PC-NFS that conflicts with
-@code{asynctsr}. If you also run PC-NFS on your DOS host, you may need to
-disable it, or even boot without it, to use @code{asynctsr} to control
-your development board.
-@end quotation
-
-@kindex target hms
-Now that serial communications are set up, and the development board is
-connected, you can start up @value{GDBN}. Call @code{@value{GDBP}} with
-the name of your program as the argument. @code{@value{GDBP}} prompts
-you, as usual, with the prompt @samp{(@value{GDBP})}. Use two special
-commands to begin your debugging session: @samp{target hms} to specify
-cross-debugging to the Hitachi board, and the @code{load} command to
-download your program to the board. @code{load} displays the names of
-the program's sections, and a @samp{*} for each 2K of data downloaded.
-(If you want to refresh @value{GDBN} data on symbols or on the
-executable file without downloading, use the @value{GDBN} commands
-@code{file} or @code{symbol-file}. These commands, and @code{load}
-itself, are described in @ref{Files,,Commands to specify files}.)
-
-@smallexample
-(eg-C:\H8300\TEST) @value{GDBP} t.x
-GDB is free software and you are welcome to distribute copies
- of it under certain conditions; type "show copying" to see
- the conditions.
-There is absolutely no warranty for GDB; type "show warranty"
-for details.
-GDB @value{GDBVN}, Copyright 1992 Free Software Foundation, Inc...
-(gdb) target hms
-Connected to remote H8/300 HMS system.
-(gdb) load t.x
-.text : 0x8000 .. 0xabde ***********
-.data : 0xabde .. 0xad30 *
-.stack : 0xf000 .. 0xf014 *
-@end smallexample
-
-At this point, you're ready to run or debug your program. From here on,
-you can use all the usual @value{GDBN} commands. The @code{break} command
-sets breakpoints; the @code{run} command starts your program;
-@code{print} or @code{x} display data; the @code{continue} command
-resumes execution after stopping at a breakpoint. You can use the
-@code{help} command at any time to find out more about @value{GDBN} commands.
-
-Remember, however, that @emph{operating system} facilities aren't
-available on your development board; for example, if your program hangs,
-you can't send an interrupt---but you can press the @sc{reset} switch!
-
-Use the @sc{reset} button on the development board
-@itemize @bullet
-@item
-to interrupt your program (don't use @kbd{ctl-C} on the DOS host---it has
-no way to pass an interrupt signal to the development board); and
-
-@item
-to return to the @value{GDBN} command prompt after your program finishes
-normally. The communications protocol provides no other way for @value{GDBN}
-to detect program completion.
-@end itemize
-
-In either case, @value{GDBN} sees the effect of a @sc{reset} on the
-development board as a ``normal exit'' of your program.
-@end ifset
-
-@node Hitachi ICE
-@subsubsection Using the E7000 in-circuit emulator
-
-@kindex target e7000
-You can use the E7000 in-circuit emulator to develop code for either the
-Hitachi SH or the H8/300H. Use one of these forms of the @samp{target
-e7000} command to connect @value{GDBN} to your E7000:
-
-@table @code
-@item target e7000 @var{port} @var{speed}
-Use this form if your E7000 is connected to a serial port. The
-@var{port} argument identifies what serial port to use (for example,
-@samp{com2}). The third argument is the line speed in bits per second
-(for example, @samp{9600}).
-
-@item target e7000 @var{hostname}
-If your E7000 is installed as a host on a TCP/IP network, you can just
-specify its hostname; @value{GDBN} uses @code{telnet} to connect.
-@end table
-
-@node Hitachi Special
-@subsubsection Special @value{GDBN} commands for Hitachi micros
-
-Some @value{GDBN} commands are available only on the H8/300 or the
-H8/500 configurations:
-
-@table @code
-@kindex set machine
-@kindex show machine
-@item set machine h8300
-@itemx set machine h8300h
-Condition @value{GDBN} for one of the two variants of the H8/300
-architecture with @samp{set machine}. You can use @samp{show machine}
-to check which variant is currently in effect.
-
-@kindex set memory @var{mod}
-@cindex memory models, H8/500
-@item set memory @var{mod}
-@itemx show memory
-Specify which H8/500 memory model (@var{mod}) you are using with
-@samp{set memory}; check which memory model is in effect with @samp{show
-memory}. The accepted values for @var{mod} are @code{small},
-@code{big}, @code{medium}, and @code{compact}.
-@end table
-
-@end ifset
-
-@ifset MIPS
-@node MIPS Remote
-@subsection @value{GDBN} and remote MIPS boards
-
-@cindex MIPS boards
-@value{GDBN} can use the MIPS remote debugging protocol to talk to a
-MIPS board attached to a serial line. This is available when
-you configure @value{GDBN} with @samp{--target=mips-idt-ecoff}.
-
-@need 1000
-Use these @value{GDBN} commands to specify the connection to your target board:
-
-@table @code
-@item target mips @var{port}
-@kindex target mips @var{port}
-To run a program on the board, start up @code{@value{GDBP}} with the
-name of your program as the argument. To connect to the board, use the
-command @samp{target mips @var{port}}, where @var{port} is the name of
-the serial port connected to the board. If the program has not already
-been downloaded to the board, you may use the @code{load} command to
-download it. You can then use all the usual @value{GDBN} commands.
-
-For example, this sequence connects to the target board through a serial
-port, and loads and runs a program called @var{prog} through the
-debugger:
-
-@example
-host$ @value{GDBP} @var{prog}
-GDB is free software and @dots{}
-(gdb) target mips /dev/ttyb
-(gdb) load @var{prog}
-(gdb) run
-@end example
-
-@item target mips @var{hostname}:@var{portnumber}
-On some @value{GDBN} host configurations, you can specify a TCP
-connection (for instance, to a serial line managed by a terminal
-concentrator) instead of a serial port, using the syntax
-@samp{@var{hostname}:@var{portnumber}}.
-
-@item target pmon @var{port}
-@kindex target pmon @var{port}
-
-@item target ddb @var{port}
-@kindex target ddb @var{port}
-
-@item target lsi @var{port}
-@kindex target lsi @var{port}
-
-@end table
-
-
-@noindent
-@value{GDBN} also supports these special commands for MIPS targets:
-
-@table @code
-@item set processor @var{args}
-@itemx show processor
-@kindex set processor @var{args}
-@kindex show processor
-Use the @code{set processor} command to set the type of MIPS
-processor when you want to access processor-type-specific registers.
-For example, @code{set processor @var{r3041}} tells @value{GDBN}
-to use the CPO registers appropriate for the 3041 chip.
-Use the @code{show processor} command to see what MIPS processor @value{GDBN}
-is using. Use the @code{info reg} command to see what registers
-@value{GDBN} is using.
-
-@item set mipsfpu double
-@itemx set mipsfpu single
-@itemx set mipsfpu none
-@itemx show mipsfpu
-@kindex set mipsfpu
-@kindex show mipsfpu
-@cindex MIPS remote floating point
-@cindex floating point, MIPS remote
-If your target board does not support the MIPS floating point
-coprocessor, you should use the command @samp{set mipsfpu none} (if you
-need this, you may wish to put the command in your @value{GDBINIT}
-file). This tells @value{GDBN} how to find the return value of
-functions which return floating point values. It also allows
-@value{GDBN} to avoid saving the floating point registers when calling
-functions on the board. If you are using a floating point coprocessor
-with only single precision floating point support, as on the @sc{r4650}
-processor, use the command @samp{set mipsfpu single}. The default
-double precision floating point coprocessor may be selected using
-@samp{set mipsfpu double}.
-
-In previous versions the only choices were double precision or no
-floating point, so @samp{set mipsfpu on} will select double precision
-and @samp{set mipsfpu off} will select no floating point.
-
-As usual, you can inquire about the @code{mipsfpu} variable with
-@samp{show mipsfpu}.
-
-@item set remotedebug @var{n}
-@itemx show remotedebug
-@kindex set remotedebug
-@kindex show remotedebug
-@cindex @code{remotedebug}, MIPS protocol
-@cindex MIPS @code{remotedebug} protocol
-@c FIXME! For this to be useful, you must know something about the MIPS
-@c FIXME...protocol. Where is it described?
-You can see some debugging information about communications with the board
-by setting the @code{remotedebug} variable. If you set it to @code{1} using
-@samp{set remotedebug 1}, every packet is displayed. If you set it
-to @code{2}, every character is displayed. You can check the current value
-at any time with the command @samp{show remotedebug}.
-
-@item set timeout @var{seconds}
-@itemx set retransmit-timeout @var{seconds}
-@itemx show timeout
-@itemx show retransmit-timeout
-@cindex @code{timeout}, MIPS protocol
-@cindex @code{retransmit-timeout}, MIPS protocol
-@kindex set timeout
-@kindex show timeout
-@kindex set retransmit-timeout
-@kindex show retransmit-timeout
-You can control the timeout used while waiting for a packet, in the MIPS
-remote protocol, with the @code{set timeout @var{seconds}} command. The
-default is 5 seconds. Similarly, you can control the timeout used while
-waiting for an acknowledgement of a packet with the @code{set
-retransmit-timeout @var{seconds}} command. The default is 3 seconds.
-You can inspect both values with @code{show timeout} and @code{show
-retransmit-timeout}. (These commands are @emph{only} available when
-@value{GDBN} is configured for @samp{--target=mips-idt-ecoff}.)
-
-The timeout set by @code{set timeout} does not apply when @value{GDBN}
-is waiting for your program to stop. In that case, @value{GDBN} waits
-forever because it has no way of knowing how long the program is going
-to run before stopping.
-@end table
-@end ifset
-
-@ifset SIMS
-@node Simulator
-@subsection Simulated CPU target
-
-@ifset GENERIC
-@cindex simulator
-@cindex simulator, Z8000
-@cindex Z8000 simulator
-@cindex simulator, H8/300 or H8/500
-@cindex H8/300 or H8/500 simulator
-@cindex simulator, Hitachi SH
-@cindex Hitachi SH simulator
-@cindex CPU simulator
-For some configurations, @value{GDBN} includes a CPU simulator that you
-can use instead of a hardware CPU to debug your programs.
-Currently, simulators are available for ARM, D10V, D30V, FR30, H8/300,
-H8/500, i960, M32R, MIPS, MN10200, MN10300, PowerPC, SH, Sparc, V850,
-W65, and Z8000.
-@end ifset
-
-@ifclear GENERIC
-@ifset H8
-@cindex simulator, H8/300 or H8/500
-@cindex Hitachi H8/300 or H8/500 simulator
-@cindex simulator, Hitachi SH
-@cindex Hitachi SH simulator
-When configured for debugging Hitachi microprocessor targets,
-@value{GDBN} includes a CPU simulator for the target chip (a Hitachi SH,
-H8/300, or H8/500).
-@end ifset
-
-@ifset Z8K
-@cindex simulator, Z8000
-@cindex Zilog Z8000 simulator
-When configured for debugging Zilog Z8000 targets, @value{GDBN} includes
-a Z8000 simulator.
-@end ifset
-@end ifclear
-
-@ifset Z8K
-For the Z8000 family, @samp{target sim} simulates either the Z8002 (the
-unsegmented variant of the Z8000 architecture) or the Z8001 (the
-segmented variant). The simulator recognizes which architecture is
-appropriate by inspecting the object code.
-@end ifset
-
-@table @code
-@item target sim @var{args}
-@kindex sim
-@kindex target sim
-Debug programs on a simulated CPU. If the simulator supports setup
-options, specify them via @var{args}.
-@end table
-
-@noindent
-After specifying this target, you can debug programs for the simulated
-CPU in the same style as programs for your host computer; use the
-@code{file} command to load a new program image, the @code{run} command
-to run your program, and so on.
-
-As well as making available all the usual machine registers (see
-@code{info reg}), the Z8000 simulator provides three additional items
-of information as specially named registers:
-
-@table @code
-@item cycles
-Counts clock-ticks in the simulator.
-
-@item insts
-Counts instructions run in the simulator.
-
-@item time
-Execution time in 60ths of a second.
-@end table
-
-You can refer to these values in @value{GDBN} expressions with the usual
-conventions; for example, @w{@samp{b fputc if $cycles>5000}} sets a
-conditional breakpoint that suspends only after at least 5000
-simulated clock ticks.
-@end ifset
-
-@c need to add much more detail about sims!
diff --git a/contrib/gdb/gdb/f-exp.tab.c b/contrib/gdb/gdb/f-exp.tab.c
deleted file mode 100644
index c4932484bf32..000000000000
--- a/contrib/gdb/gdb/f-exp.tab.c
+++ /dev/null
@@ -1,2155 +0,0 @@
-
-/* A Bison parser, made from f-exp.y
- by GNU Bison version 1.27
- */
-
-#define YYBISON 1 /* Identify Bison output. */
-
-#define INT 257
-#define FLOAT 258
-#define STRING_LITERAL 259
-#define BOOLEAN_LITERAL 260
-#define NAME 261
-#define TYPENAME 262
-#define NAME_OR_INT 263
-#define SIZEOF 264
-#define ERROR 265
-#define INT_KEYWORD 266
-#define INT_S2_KEYWORD 267
-#define LOGICAL_S1_KEYWORD 268
-#define LOGICAL_S2_KEYWORD 269
-#define LOGICAL_KEYWORD 270
-#define REAL_KEYWORD 271
-#define REAL_S8_KEYWORD 272
-#define REAL_S16_KEYWORD 273
-#define COMPLEX_S8_KEYWORD 274
-#define COMPLEX_S16_KEYWORD 275
-#define COMPLEX_S32_KEYWORD 276
-#define BOOL_AND 277
-#define BOOL_OR 278
-#define BOOL_NOT 279
-#define CHARACTER 280
-#define VARIABLE 281
-#define ASSIGN_MODIFY 282
-#define ABOVE_COMMA 283
-#define EQUAL 284
-#define NOTEQUAL 285
-#define LESSTHAN 286
-#define GREATERTHAN 287
-#define LEQ 288
-#define GEQ 289
-#define LSH 290
-#define RSH 291
-#define UNARY 292
-
-#line 43 "f-exp.y"
-
-
-#include "defs.h"
-#include "gdb_string.h"
-#include "expression.h"
-#include "value.h"
-#include "parser-defs.h"
-#include "language.h"
-#include "f-lang.h"
-#include "bfd.h" /* Required by objfiles.h. */
-#include "symfile.h" /* Required by objfiles.h. */
-#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
-
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
- as well as gratuitiously global symbol names, so we can have multiple
- yacc generated parsers in gdb. Note that these are only the variables
- produced by yacc. If other parser generators (bison, byacc, etc) produce
- additional global names that conflict at link time, then those parser
- generators need to be fixed instead of adding those names to this list. */
-
-#define yymaxdepth f_maxdepth
-#define yyparse f_parse
-#define yylex f_lex
-#define yyerror f_error
-#define yylval f_lval
-#define yychar f_char
-#define yydebug f_debug
-#define yypact f_pact
-#define yyr1 f_r1
-#define yyr2 f_r2
-#define yydef f_def
-#define yychk f_chk
-#define yypgo f_pgo
-#define yyact f_act
-#define yyexca f_exca
-#define yyerrflag f_errflag
-#define yynerrs f_nerrs
-#define yyps f_ps
-#define yypv f_pv
-#define yys f_s
-#define yy_yys f_yys
-#define yystate f_state
-#define yytmp f_tmp
-#define yyv f_v
-#define yy_yyv f_yyv
-#define yyval f_val
-#define yylloc f_lloc
-#define yyreds f_reds /* With YYDEBUG defined */
-#define yytoks f_toks /* With YYDEBUG defined */
-#define yylhs f_yylhs
-#define yylen f_yylen
-#define yydefred f_yydefred
-#define yydgoto f_yydgoto
-#define yysindex f_yysindex
-#define yyrindex f_yyrindex
-#define yygindex f_yygindex
-#define yytable f_yytable
-#define yycheck f_yycheck
-
-#ifndef YYDEBUG
-#define YYDEBUG 1 /* Default to no yydebug support */
-#endif
-
-int yyparse PARAMS ((void));
-
-static int yylex PARAMS ((void));
-
-void yyerror PARAMS ((char *));
-
-static void growbuf_by_size PARAMS ((int));
-
-static int match_string_literal PARAMS ((void));
-
-
-#line 122 "f-exp.y"
-typedef union
- {
- LONGEST lval;
- struct {
- LONGEST val;
- struct type *type;
- } typed_val;
- DOUBLEST dval;
- struct symbol *sym;
- struct type *tval;
- struct stoken sval;
- struct ttype tsym;
- struct symtoken ssym;
- int voidval;
- struct block *bval;
- enum exp_opcode opcode;
- struct internalvar *ivar;
-
- struct type **tvec;
- int *ivec;
- } YYSTYPE;
-#line 144 "f-exp.y"
-
-/* YYSTYPE gets defined by %union */
-static int parse_number PARAMS ((char *, int, int, YYSTYPE *));
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
-#endif
-
-
-
-#define YYFINAL 125
-#define YYFLAG -32768
-#define YYNTBASE 55
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 292 ? yytranslate[x] : 71)
-
-static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 49, 35, 2, 51,
- 52, 47, 45, 29, 46, 2, 48, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 54, 2, 2,
- 31, 2, 32, 44, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 34, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 33, 2, 53, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 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, 30, 36, 37, 38, 39, 40, 41, 42,
- 43, 50
-};
-
-#if YYDEBUG != 0
-static const short yyprhs[] = { 0,
- 0, 2, 4, 6, 10, 13, 16, 19, 22, 25,
- 28, 29, 35, 36, 38, 40, 44, 48, 52, 56,
- 61, 65, 69, 73, 77, 81, 85, 89, 93, 97,
- 101, 105, 109, 113, 117, 121, 125, 129, 133, 137,
- 141, 145, 147, 149, 151, 153, 155, 160, 162, 164,
- 166, 168, 170, 173, 175, 178, 180, 183, 185, 189,
- 192, 194, 197, 201, 203, 205, 207, 209, 211, 213,
- 215, 217, 219, 221, 223, 225, 227, 229, 231, 235,
- 237, 239, 241
-};
-
-static const short yyrhs[] = { 57,
- 0, 56, 0, 63, 0, 51, 57, 52, 0, 47,
- 57, 0, 35, 57, 0, 46, 57, 0, 25, 57,
- 0, 53, 57, 0, 10, 57, 0, 0, 57, 51,
- 58, 59, 52, 0, 0, 57, 0, 60, 0, 59,
- 29, 57, 0, 57, 54, 57, 0, 57, 29, 57,
- 0, 51, 61, 52, 0, 51, 63, 52, 57, 0,
- 57, 44, 57, 0, 57, 47, 57, 0, 57, 48,
- 57, 0, 57, 49, 57, 0, 57, 45, 57, 0,
- 57, 46, 57, 0, 57, 42, 57, 0, 57, 43,
- 57, 0, 57, 36, 57, 0, 57, 37, 57, 0,
- 57, 40, 57, 0, 57, 41, 57, 0, 57, 38,
- 57, 0, 57, 39, 57, 0, 57, 35, 57, 0,
- 57, 34, 57, 0, 57, 33, 57, 0, 57, 23,
- 57, 0, 57, 24, 57, 0, 57, 31, 57, 0,
- 57, 28, 57, 0, 3, 0, 9, 0, 4, 0,
- 62, 0, 27, 0, 10, 51, 63, 52, 0, 6,
- 0, 5, 0, 70, 0, 64, 0, 68, 0, 68,
- 65, 0, 47, 0, 47, 65, 0, 35, 0, 35,
- 65, 0, 66, 0, 51, 65, 52, 0, 66, 67,
- 0, 67, 0, 51, 52, 0, 51, 69, 52, 0,
- 8, 0, 12, 0, 13, 0, 26, 0, 16, 0,
- 15, 0, 14, 0, 17, 0, 18, 0, 19, 0,
- 20, 0, 21, 0, 22, 0, 8, 0, 63, 0,
- 69, 29, 63, 0, 7, 0, 8, 0, 9, 0,
- 7, 0
-};
-
-#endif
-
-#if YYDEBUG != 0
-static const short yyrline[] = { 0,
- 221, 222, 225, 231, 236, 239, 242, 246, 250, 254,
- 263, 265, 271, 274, 278, 281, 285, 290, 294, 298,
- 306, 310, 314, 318, 322, 326, 330, 334, 338, 342,
- 346, 350, 354, 358, 362, 366, 370, 374, 379, 383,
- 387, 393, 400, 409, 416, 419, 422, 430, 437, 445,
- 489, 492, 493, 536, 538, 540, 542, 544, 547, 549,
- 551, 555, 557, 562, 564, 566, 568, 570, 572, 574,
- 576, 578, 580, 582, 584, 586, 590, 594, 599, 606,
- 608, 610, 614
-};
-#endif
-
-
-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-
-static const char * const yytname[] = { "$","error","$undefined.","INT","FLOAT",
-"STRING_LITERAL","BOOLEAN_LITERAL","NAME","TYPENAME","NAME_OR_INT","SIZEOF",
-"ERROR","INT_KEYWORD","INT_S2_KEYWORD","LOGICAL_S1_KEYWORD","LOGICAL_S2_KEYWORD",
-"LOGICAL_KEYWORD","REAL_KEYWORD","REAL_S8_KEYWORD","REAL_S16_KEYWORD","COMPLEX_S8_KEYWORD",
-"COMPLEX_S16_KEYWORD","COMPLEX_S32_KEYWORD","BOOL_AND","BOOL_OR","BOOL_NOT",
-"CHARACTER","VARIABLE","ASSIGN_MODIFY","','","ABOVE_COMMA","'='","'?'","'|'",
-"'^'","'&'","EQUAL","NOTEQUAL","LESSTHAN","GREATERTHAN","LEQ","GEQ","LSH","RSH",
-"'@'","'+'","'-'","'*'","'/'","'%'","UNARY","'('","')'","'~'","':'","start",
-"type_exp","exp","@1","arglist","substring","complexnum","variable","type","ptype",
-"abs_decl","direct_abs_decl","func_mod","typebase","nonempty_typelist","name_not_typename", NULL
-};
-#endif
-
-static const short yyr1[] = { 0,
- 55, 55, 56, 57, 57, 57, 57, 57, 57, 57,
- 58, 57, 59, 59, 59, 59, 60, 61, 57, 57,
- 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
- 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
- 57, 57, 57, 57, 57, 57, 57, 57, 57, 62,
- 63, 64, 64, 65, 65, 65, 65, 65, 66, 66,
- 66, 67, 67, 68, 68, 68, 68, 68, 68, 68,
- 68, 68, 68, 68, 68, 68, -1, 69, 69, -1,
- -1, -1, 70
-};
-
-static const short yyr2[] = { 0,
- 1, 1, 1, 3, 2, 2, 2, 2, 2, 2,
- 0, 5, 0, 1, 1, 3, 3, 3, 3, 4,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 1, 1, 1, 1, 1, 4, 1, 1, 1,
- 1, 1, 2, 1, 2, 1, 2, 1, 3, 2,
- 1, 2, 3, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
- 1, 1, 1
-};
-
-static const short yydefact[] = { 0,
- 42, 44, 49, 48, 83, 64, 43, 0, 65, 66,
- 70, 69, 68, 71, 72, 73, 74, 75, 76, 0,
- 67, 46, 0, 0, 0, 0, 0, 2, 1, 45,
- 3, 51, 52, 50, 0, 10, 8, 6, 7, 5,
- 0, 0, 0, 9, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 11, 56, 54, 0, 53,
- 58, 61, 0, 0, 4, 19, 0, 38, 39, 41,
- 40, 37, 36, 35, 29, 30, 33, 34, 31, 32,
- 27, 28, 21, 25, 26, 22, 23, 24, 13, 57,
- 55, 62, 78, 0, 0, 0, 60, 47, 18, 20,
- 14, 0, 15, 59, 0, 63, 0, 0, 12, 79,
- 17, 16, 0, 0, 0
-};
-
-static const short yydefgoto[] = { 123,
- 28, 41, 99, 112, 113, 42, 30, 103, 32, 70,
- 71, 72, 33, 105, 34
-};
-
-static const short yypact[] = { 75,
--32768,-32768,-32768,-32768,-32768,-32768,-32768, 126,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 135,
--32768,-32768, 135, 135, 135, 75, 135,-32768, 309,-32768,
--32768,-32768, -34,-32768, 75, -49, -49, -49, -49, -49,
- 279, -46, -45, -49, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135,-32768, -34, -34, 206,-32768,
- -42,-32768, -36, 135,-32768,-32768, 135, 355, 336, 309,
- 309, 390, 407, 161, 221, 221, -11, -11, -11, -11,
- 22, 22, 58, -37, -37, -49, -49, -49, 135,-32768,
--32768,-32768,-32768, -33, -26, 230,-32768, 186, 309, -49,
- 250, -24,-32768,-32768, 397,-32768, 135, 135,-32768,-32768,
- 309, 309, 15, 18,-32768
-};
-
-static const short yypgoto[] = {-32768,
--32768, 0,-32768,-32768,-32768,-32768,-32768, 4,-32768, -25,
--32768, -50,-32768,-32768,-32768
-};
-
-
-#define YYLAST 458
-
-
-static const short yytable[] = { 29,
- 67, 66, 115, 31, 118, 76, 77, 36, 106, 63,
- 64, 65, 68, 66, 124, 108, 69, 125, 114, 37,
- 107, 0, 38, 39, 40, 116, 44, 119, 0, 43,
- 58, 59, 60, 61, 62, 63, 64, 65, 73, 66,
- 0, 100, 101, 104, 78, 79, 80, 81, 82, 83,
- 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
- 94, 95, 96, 97, 98, 60, 61, 62, 63, 64,
- 65, 0, 66, 109, 0, 0, 110, 1, 2, 3,
- 4, 5, 6, 7, 8, 0, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 0, 111, 20,
- 21, 22, 61, 62, 63, 64, 65, 110, 66, 23,
- 0, 0, 0, 0, 0, 0, 121, 122, 120, 0,
- 24, 25, 0, 0, 0, 26, 0, 27, 1, 2,
- 3, 4, 5, 0, 7, 8, 0, 1, 2, 3,
- 4, 5, 0, 7, 8, 0, 0, 0, 0, 0,
- 20, 0, 22, 0, 0, 0, 0, 0, 0, 20,
- 23, 22, 0, 0, 0, 0, 0, 0, 0, 23,
- 0, 24, 25, 0, 0, 0, 35, 0, 27, 0,
- 24, 25, 0, 0, 0, 26, 0, 27, 1, 2,
- 3, 4, 5, 0, 7, 8, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 20, 66, 22, 6, 0, 0, 0, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 0, 0,
- 0, 21, 0, 0, 0, 0, 26, 6, 27, 0,
- 67, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 68, 0, 0, 21, 69, 102, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 0, 66, 45, 46, 0, 0, 0, 47, 0, 0,
- 48, 102, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
- 66, 45, 46, 117, 0, 0, 47, 74, 0, 48,
- 0, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 0, 66,
- 75, 45, 46, 0, 0, 0, 47, 0, 0, 48,
- 0, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 45, 66,
- 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
- 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, 65, 0, 66, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 65, 6, 66, 0, 0, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 0,
- 0, 0, 21, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
- 66, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 0, 66
-};
-
-static const short yycheck[] = { 0,
- 35, 51, 29, 0, 29, 52, 52, 8, 51, 47,
- 48, 49, 47, 51, 0, 52, 51, 0, 52, 20,
- 71, -1, 23, 24, 25, 52, 27, 52, -1, 26,
- 42, 43, 44, 45, 46, 47, 48, 49, 35, 51,
- -1, 67, 68, 69, 45, 46, 47, 48, 49, 50,
- 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, 65, 44, 45, 46, 47, 48,
- 49, -1, 51, 74, -1, -1, 77, 3, 4, 5,
- 6, 7, 8, 9, 10, -1, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, -1, 99, 25,
- 26, 27, 45, 46, 47, 48, 49, 108, 51, 35,
- -1, -1, -1, -1, -1, -1, 117, 118, 115, -1,
- 46, 47, -1, -1, -1, 51, -1, 53, 3, 4,
- 5, 6, 7, -1, 9, 10, -1, 3, 4, 5,
- 6, 7, -1, 9, 10, -1, -1, -1, -1, -1,
- 25, -1, 27, -1, -1, -1, -1, -1, -1, 25,
- 35, 27, -1, -1, -1, -1, -1, -1, -1, 35,
- -1, 46, 47, -1, -1, -1, 51, -1, 53, -1,
- 46, 47, -1, -1, -1, 51, -1, 53, 3, 4,
- 5, 6, 7, -1, 9, 10, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 25, 51, 27, 8, -1, -1, -1, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, -1, -1,
- -1, 26, -1, -1, -1, -1, 51, 8, 53, -1,
- 35, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 47, -1, -1, 26, 51, 52, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- -1, 51, 23, 24, -1, -1, -1, 28, -1, -1,
- 31, 52, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, -1,
- 51, 23, 24, 54, -1, -1, 28, 29, -1, 31,
- -1, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, -1, 51,
- 52, 23, 24, -1, -1, -1, 28, -1, -1, 31,
- -1, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 23, 51,
- -1, -1, -1, -1, -1, -1, -1, -1, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, -1, 51, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 8, 51, -1, -1, 12, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, -1,
- -1, -1, 26, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, -1,
- 51, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, -1, 51
-};
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/lib/bison.simple"
-/* This file comes from bison-1.27. */
-
-/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
-#ifndef YYSTACK_USE_ALLOCA
-#ifdef alloca
-#define YYSTACK_USE_ALLOCA
-#else /* alloca not defined */
-#ifdef __GNUC__
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
-#define YYSTACK_USE_ALLOCA
-#include <alloca.h>
-#else /* not sparc */
-/* We think this test detects Watcom and Microsoft C. */
-/* This used to test MSDOS, but that is a bad idea
- since that symbol is in the user namespace. */
-#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
-#if 0 /* No need for xmalloc.h, which pollutes the namespace;
- instead, just don't use alloca. */
-#endif
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
-/* I don't know what this was needed for, but it pollutes the namespace.
- So I turned it off. rms, 2 May 1997. */
- #pragma alloca
-#define YYSTACK_USE_ALLOCA
-#else /* not MSDOS, or __TURBOC__, or _AIX */
-#if 0
-#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
- and on HPUX 10. Eventually we can turn this on. */
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#endif /* __hpux */
-#endif
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc */
-#endif /* not GNU C */
-#endif /* alloca not defined */
-#endif /* YYSTACK_USE_ALLOCA not defined */
-
-#ifdef YYSTACK_USE_ALLOCA
-#define YYSTACK_ALLOC alloca
-#else
-#define YYSTACK_ALLOC xmalloc
-#endif
-
-/* Note: there must be only one dollar sign in this file.
- It is replaced by the list of actions, each action
- as one case of the switch. */
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY -2
-#define YYEOF 0
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
-/* Like YYERROR except do call yyerror.
- This remains here temporarily to ease the
- transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
-#define YYFAIL goto yyerrlab
-#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(token, value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { yychar = (token), yylval = (value); \
- yychar1 = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
- goto yybackup; \
- } \
- else \
- { yyerror ("syntax error: cannot back up"); YYERROR; } \
-while (0)
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-#ifndef YYPURE
-#define YYLEX yylex()
-#endif
-
-#ifdef YYPURE
-#ifdef YYLSP_NEEDED
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval, &yylloc)
-#endif
-#else /* not YYLSP_NEEDED */
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval)
-#endif
-#endif /* not YYLSP_NEEDED */
-#endif
-
-/* If nonreentrant, generate the variables here */
-
-#ifndef YYPURE
-
-int yychar; /* the lookahead symbol */
-YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
-
-#ifdef YYLSP_NEEDED
-YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
-#endif
-
-int yynerrs; /* number of parse errors so far */
-#endif /* not YYPURE */
-
-#if YYDEBUG != 0
-int yydebug; /* nonzero means print parse trace */
-/* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
-#endif
-
-/* YYINITDEPTH indicates the initial size of the parser's stacks */
-
-#ifndef YYINITDEPTH
-#define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
-
-#if YYMAXDEPTH == 0
-#undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 10000
-#endif
-
-/* Define __yy_memcpy. Note that the size argument
- should be passed with type unsigned int, because that is what the non-GCC
- definitions require. With GCC, __builtin_memcpy takes an arg
- of type size_t, but it can handle unsigned int. */
-
-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
-#else /* not GNU C or C++ */
-#ifndef __cplusplus
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (to, from, count)
- char *to;
- char *from;
- unsigned int count;
-{
- register char *f = from;
- register char *t = to;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#else /* __cplusplus */
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (char *to, char *from, unsigned int count)
-{
- register char *t = to;
- register char *f = from;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#endif
-#endif
-
-#line 216 "/usr/lib/bison.simple"
-
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
- into yyparse. The argument should have type void *.
- It should actually point to an object.
- Grammar actions can access the variable by casting it
- to the proper pointer type. */
-
-#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
-#define YYPARSE_PARAM_ARG
-#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-#ifdef YYPARSE_PARAM
-int yyparse (void *);
-#else
-int yyparse (void);
-#endif
-#endif
-
-int
-yyparse(YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
-{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */
-
- short yyssa[YYINITDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
-
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to xreallocate them elsewhere */
-
-#ifdef YYLSP_NEEDED
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
-#else
-#define YYPOPSTACK (yyvsp--, yyssp--)
-#endif
-
- int yystacksize = YYINITDEPTH;
- int yyfree_stacks = 0;
-
-#ifdef YYPURE
- int yychar;
- YYSTYPE yylval;
- int yynerrs;
-#ifdef YYLSP_NEEDED
- YYLTYPE yylloc;
-#endif
-#endif
-
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
-
- int yylen;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
-#endif
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
-
- yyssp = yyss - 1;
- yyvsp = yyvs;
-#ifdef YYLSP_NEEDED
- yylsp = yyls;
-#endif
-
-/* Push a new state, which is found in yystate . */
-/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks. */
-yynewstate:
-
- *++yyssp = yystate;
-
- if (yyssp >= yyss + yystacksize - 1)
- {
- /* Give user a chance to xreallocate the stack */
- /* Use copies of these so that the &'s don't force the real ones into memory. */
- YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
-#ifdef YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
-#endif
-
- /* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
-#ifdef YYLSP_NEEDED
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
-#else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
-#endif
-
- yyss = yyss1; yyvs = yyvs1;
-#ifdef YYLSP_NEEDED
- yyls = yyls1;
-#endif
-#else /* no yyoverflow */
- /* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- {
- yyerror("parser stack overflow");
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 2;
- }
- yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
- yystacksize = YYMAXDEPTH;
-#ifndef YYSTACK_USE_ALLOCA
- yyfree_stacks = 1;
-#endif
- yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1,
- size * (unsigned int) sizeof (*yyssp));
- yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1,
- size * (unsigned int) sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1,
- size * (unsigned int) sizeof (*yylsp));
-#endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
-#ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
-
- if (yyssp >= yyss + yystacksize - 1)
- YYABORT;
- }
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
-#endif
-
- goto yybackup;
- yybackup:
-
-/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
-/* yyresume: */
-
- /* First try to decide what to do without reference to lookahead token. */
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
-
- if (yychar == YYEMPTY)
- {
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
-#endif
- yychar = YYLEX;
- }
-
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
- {
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
-#endif
- }
- else
- {
- yychar1 = YYTRANSLATE(yychar);
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise meaning
- of a token, for further debugging info. */
-#ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
-#endif
- fprintf (stderr, ")\n");
- }
-#endif
- }
-
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
- goto yydefault;
-
- yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrlab;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Shift the lookahead token. */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
-#endif
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
-
- yystate = yyn;
- goto yynewstate;
-
-/* Do the default action for the current state. */
-yydefault:
-
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
-
-/* Do a reduction. yyn is the number of a rule to reduce with. */
-yyreduce:
- yylen = yyr2[yyn];
- if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- int i;
-
- fprintf (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
-
- /* Print the symbols being reduced, and their result. */
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
-#endif
-
-
- switch (yyn) {
-
-case 3:
-#line 226 "f-exp.y"
-{ write_exp_elt_opcode(OP_TYPE);
- write_exp_elt_type(yyvsp[0].tval);
- write_exp_elt_opcode(OP_TYPE); ;
- break;}
-case 4:
-#line 232 "f-exp.y"
-{ ;
- break;}
-case 5:
-#line 237 "f-exp.y"
-{ write_exp_elt_opcode (UNOP_IND); ;
- break;}
-case 6:
-#line 240 "f-exp.y"
-{ write_exp_elt_opcode (UNOP_ADDR); ;
- break;}
-case 7:
-#line 243 "f-exp.y"
-{ write_exp_elt_opcode (UNOP_NEG); ;
- break;}
-case 8:
-#line 247 "f-exp.y"
-{ write_exp_elt_opcode (UNOP_LOGICAL_NOT); ;
- break;}
-case 9:
-#line 251 "f-exp.y"
-{ write_exp_elt_opcode (UNOP_COMPLEMENT); ;
- break;}
-case 10:
-#line 255 "f-exp.y"
-{ write_exp_elt_opcode (UNOP_SIZEOF); ;
- break;}
-case 11:
-#line 264 "f-exp.y"
-{ start_arglist (); ;
- break;}
-case 12:
-#line 266 "f-exp.y"
-{ write_exp_elt_opcode (OP_F77_UNDETERMINED_ARGLIST);
- write_exp_elt_longcst ((LONGEST) end_arglist ());
- write_exp_elt_opcode (OP_F77_UNDETERMINED_ARGLIST); ;
- break;}
-case 14:
-#line 275 "f-exp.y"
-{ arglist_len = 1; ;
- break;}
-case 15:
-#line 279 "f-exp.y"
-{ arglist_len = 2;;
- break;}
-case 16:
-#line 282 "f-exp.y"
-{ arglist_len++; ;
- break;}
-case 17:
-#line 286 "f-exp.y"
-{ ;
- break;}
-case 18:
-#line 291 "f-exp.y"
-{ ;
- break;}
-case 19:
-#line 295 "f-exp.y"
-{ write_exp_elt_opcode(OP_COMPLEX); ;
- break;}
-case 20:
-#line 299 "f-exp.y"
-{ write_exp_elt_opcode (UNOP_CAST);
- write_exp_elt_type (yyvsp[-2].tval);
- write_exp_elt_opcode (UNOP_CAST); ;
- break;}
-case 21:
-#line 307 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_REPEAT); ;
- break;}
-case 22:
-#line 311 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_MUL); ;
- break;}
-case 23:
-#line 315 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_DIV); ;
- break;}
-case 24:
-#line 319 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_REM); ;
- break;}
-case 25:
-#line 323 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_ADD); ;
- break;}
-case 26:
-#line 327 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_SUB); ;
- break;}
-case 27:
-#line 331 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_LSH); ;
- break;}
-case 28:
-#line 335 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_RSH); ;
- break;}
-case 29:
-#line 339 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_EQUAL); ;
- break;}
-case 30:
-#line 343 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_NOTEQUAL); ;
- break;}
-case 31:
-#line 347 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_LEQ); ;
- break;}
-case 32:
-#line 351 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_GEQ); ;
- break;}
-case 33:
-#line 355 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_LESS); ;
- break;}
-case 34:
-#line 359 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_GTR); ;
- break;}
-case 35:
-#line 363 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_AND); ;
- break;}
-case 36:
-#line 367 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_XOR); ;
- break;}
-case 37:
-#line 371 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_IOR); ;
- break;}
-case 38:
-#line 375 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_LOGICAL_AND); ;
- break;}
-case 39:
-#line 380 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_LOGICAL_OR); ;
- break;}
-case 40:
-#line 384 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_ASSIGN); ;
- break;}
-case 41:
-#line 388 "f-exp.y"
-{ write_exp_elt_opcode (BINOP_ASSIGN_MODIFY);
- write_exp_elt_opcode (yyvsp[-1].opcode);
- write_exp_elt_opcode (BINOP_ASSIGN_MODIFY); ;
- break;}
-case 42:
-#line 394 "f-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (yyvsp[0].typed_val.type);
- write_exp_elt_longcst ((LONGEST)(yyvsp[0].typed_val.val));
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 43:
-#line 401 "f-exp.y"
-{ YYSTYPE val;
- parse_number (yyvsp[0].ssym.stoken.ptr, yyvsp[0].ssym.stoken.length, 0, &val);
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (val.typed_val.type);
- write_exp_elt_longcst ((LONGEST)val.typed_val.val);
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 44:
-#line 410 "f-exp.y"
-{ write_exp_elt_opcode (OP_DOUBLE);
- write_exp_elt_type (builtin_type_f_real_s8);
- write_exp_elt_dblcst (yyvsp[0].dval);
- write_exp_elt_opcode (OP_DOUBLE); ;
- break;}
-case 47:
-#line 423 "f-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_f_integer);
- CHECK_TYPEDEF (yyvsp[-1].tval);
- write_exp_elt_longcst ((LONGEST) TYPE_LENGTH (yyvsp[-1].tval));
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 48:
-#line 431 "f-exp.y"
-{ write_exp_elt_opcode (OP_BOOL);
- write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
- write_exp_elt_opcode (OP_BOOL);
- ;
- break;}
-case 49:
-#line 438 "f-exp.y"
-{
- write_exp_elt_opcode (OP_STRING);
- write_exp_string (yyvsp[0].sval);
- write_exp_elt_opcode (OP_STRING);
- ;
- break;}
-case 50:
-#line 446 "f-exp.y"
-{ struct symbol *sym = yyvsp[0].ssym.sym;
-
- if (sym)
- {
- if (symbol_read_needs_frame (sym))
- {
- if (innermost_block == 0 ||
- contained_in (block_found,
- innermost_block))
- innermost_block = block_found;
- }
- write_exp_elt_opcode (OP_VAR_VALUE);
- /* We want to use the selected frame, not
- another more inner frame which happens to
- be in the same block. */
- write_exp_elt_block (NULL);
- write_exp_elt_sym (sym);
- write_exp_elt_opcode (OP_VAR_VALUE);
- break;
- }
- else
- {
- struct minimal_symbol *msymbol;
- register char *arg = copy_name (yyvsp[0].ssym.stoken);
-
- msymbol =
- lookup_minimal_symbol (arg, NULL, NULL);
- if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
- else if (!have_full_symbols () && !have_partial_symbols ())
- error ("No symbol table is loaded. Use the \"file\" command.");
- else
- error ("No symbol \"%s\" in current context.",
- copy_name (yyvsp[0].ssym.stoken));
- }
- ;
- break;}
-case 53:
-#line 494 "f-exp.y"
-{
- /* This is where the interesting stuff happens. */
- int done = 0;
- int array_size;
- struct type *follow_type = yyvsp[-1].tval;
- struct type *range_type;
-
- while (!done)
- switch (pop_type ())
- {
- case tp_end:
- done = 1;
- break;
- case tp_pointer:
- follow_type = lookup_pointer_type (follow_type);
- break;
- case tp_reference:
- follow_type = lookup_reference_type (follow_type);
- break;
- case tp_array:
- array_size = pop_type_int ();
- if (array_size != -1)
- {
- range_type =
- create_range_type ((struct type *) NULL,
- builtin_type_f_integer, 0,
- array_size - 1);
- follow_type =
- create_array_type ((struct type *) NULL,
- follow_type, range_type);
- }
- else
- follow_type = lookup_pointer_type (follow_type);
- break;
- case tp_function:
- follow_type = lookup_function_type (follow_type);
- break;
- }
- yyval.tval = follow_type;
- ;
- break;}
-case 54:
-#line 537 "f-exp.y"
-{ push_type (tp_pointer); yyval.voidval = 0; ;
- break;}
-case 55:
-#line 539 "f-exp.y"
-{ push_type (tp_pointer); yyval.voidval = yyvsp[0].voidval; ;
- break;}
-case 56:
-#line 541 "f-exp.y"
-{ push_type (tp_reference); yyval.voidval = 0; ;
- break;}
-case 57:
-#line 543 "f-exp.y"
-{ push_type (tp_reference); yyval.voidval = yyvsp[0].voidval; ;
- break;}
-case 59:
-#line 548 "f-exp.y"
-{ yyval.voidval = yyvsp[-1].voidval; ;
- break;}
-case 60:
-#line 550 "f-exp.y"
-{ push_type (tp_function); ;
- break;}
-case 61:
-#line 552 "f-exp.y"
-{ push_type (tp_function); ;
- break;}
-case 62:
-#line 556 "f-exp.y"
-{ yyval.voidval = 0; ;
- break;}
-case 63:
-#line 558 "f-exp.y"
-{ free ((PTR)yyvsp[-1].tvec); yyval.voidval = 0; ;
- break;}
-case 64:
-#line 563 "f-exp.y"
-{ yyval.tval = yyvsp[0].tsym.type; ;
- break;}
-case 65:
-#line 565 "f-exp.y"
-{ yyval.tval = builtin_type_f_integer; ;
- break;}
-case 66:
-#line 567 "f-exp.y"
-{ yyval.tval = builtin_type_f_integer_s2; ;
- break;}
-case 67:
-#line 569 "f-exp.y"
-{ yyval.tval = builtin_type_f_character; ;
- break;}
-case 68:
-#line 571 "f-exp.y"
-{ yyval.tval = builtin_type_f_logical;;
- break;}
-case 69:
-#line 573 "f-exp.y"
-{ yyval.tval = builtin_type_f_logical_s2;;
- break;}
-case 70:
-#line 575 "f-exp.y"
-{ yyval.tval = builtin_type_f_logical_s1;;
- break;}
-case 71:
-#line 577 "f-exp.y"
-{ yyval.tval = builtin_type_f_real;;
- break;}
-case 72:
-#line 579 "f-exp.y"
-{ yyval.tval = builtin_type_f_real_s8;;
- break;}
-case 73:
-#line 581 "f-exp.y"
-{ yyval.tval = builtin_type_f_real_s16;;
- break;}
-case 74:
-#line 583 "f-exp.y"
-{ yyval.tval = builtin_type_f_complex_s8;;
- break;}
-case 75:
-#line 585 "f-exp.y"
-{ yyval.tval = builtin_type_f_complex_s16;;
- break;}
-case 76:
-#line 587 "f-exp.y"
-{ yyval.tval = builtin_type_f_complex_s32;;
- break;}
-case 78:
-#line 595 "f-exp.y"
-{ yyval.tvec = (struct type **) xmalloc (sizeof (struct type *) * 2);
- yyval.ivec[0] = 1; /* Number of types in vector */
- yyval.tvec[1] = yyvsp[0].tval;
- ;
- break;}
-case 79:
-#line 600 "f-exp.y"
-{ int len = sizeof (struct type *) * (++(yyvsp[-2].ivec[0]) + 1);
- yyval.tvec = (struct type **) xrealloc ((char *) yyvsp[-2].tvec, len);
- yyval.tvec[yyval.ivec[0]] = yyvsp[0].tval;
- ;
- break;}
-case 80:
-#line 607 "f-exp.y"
-{ yyval.sval = yyvsp[0].ssym.stoken; ;
- break;}
-case 81:
-#line 609 "f-exp.y"
-{ yyval.sval = yyvsp[0].tsym.stoken; ;
- break;}
-case 82:
-#line 611 "f-exp.y"
-{ yyval.sval = yyvsp[0].ssym.stoken; ;
- break;}
-}
- /* the action file gets copied in in place of this dollarsign */
-#line 542 "/usr/lib/bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-#ifdef YYLSP_NEEDED
- yylsp -= yylen;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
- *++yyvsp = yyval;
-
-#ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
-#endif
-
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTBASE];
-
- goto yynewstate;
-
-yyerrlab: /* here on detecting error */
-
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
- {
- ++yynerrs;
-
-#ifdef YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (yyn > YYFLAG && yyn < YYLAST)
- {
- int size = 0;
- char *msg;
- int x, count;
-
- count = 0;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) xmalloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
-
- if (count < 5)
- {
- count = 0;
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- {
- strcat(msg, count == 0 ? ", expecting `" : " or `");
- strcat(msg, yytname[x]);
- strcat(msg, "'");
- count++;
- }
- }
- yyerror(msg);
- free(msg);
- }
- else
- yyerror ("parse error; also virtual memory exceeded");
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror("parse error");
- }
-
- goto yyerrlab1;
-yyerrlab1: /* here on error raised explicitly by an action */
-
- if (yyerrstatus == 3)
- {
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
-
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
-
- yychar = YYEMPTY;
- }
-
- /* Else will try to reuse lookahead token
- after shifting the error token. */
-
- yyerrstatus = 3; /* Each real token shifted decrements this */
-
- goto yyerrhandle;
-
-yyerrdefault: /* current state does not do anything special for the error token. */
-
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
-#endif
-
-yyerrpop: /* pop the current state because it cannot handle the error token */
-
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
-#ifdef YYLSP_NEEDED
- yylsp--;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
-yyerrhandle:
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
-
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
-
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrpop;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
-#endif
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- yystate = yyn;
- goto yynewstate;
-
- yyacceptlab:
- /* YYACCEPT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 0;
-
- yyabortlab:
- /* YYABORT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 1;
-}
-#line 624 "f-exp.y"
-
-
-/* Take care of parsing a number (anything that starts with a digit).
- Set yylval and return the token type; update lexptr.
- LEN is the number of characters in it. */
-
-/*** Needs some error checking for the float case ***/
-
-static int
-parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
- int parsed_float;
- YYSTYPE *putithere;
-{
- register LONGEST n = 0;
- register LONGEST prevn = 0;
- register int i;
- register int c;
- register int base = input_radix;
- int unsigned_p = 0;
- int long_p = 0;
- ULONGEST high_bit;
- struct type *signed_type;
- struct type *unsigned_type;
-
- if (parsed_float)
- {
- /* It's a float since it contains a point or an exponent. */
- /* [dD] is not understood as an exponent by atof, change it to 'e'. */
- char *tmp, *tmp2;
-
- tmp = strsave (p);
- for (tmp2 = tmp; *tmp2; ++tmp2)
- if (*tmp2 == 'd' || *tmp2 == 'D')
- *tmp2 = 'e';
- putithere->dval = atof (tmp);
- free (tmp);
- return FLOAT;
- }
-
- /* Handle base-switching prefixes 0x, 0t, 0d, 0 */
- if (p[0] == '0')
- switch (p[1])
- {
- case 'x':
- case 'X':
- if (len >= 3)
- {
- p += 2;
- base = 16;
- len -= 2;
- }
- break;
-
- case 't':
- case 'T':
- case 'd':
- case 'D':
- if (len >= 3)
- {
- p += 2;
- base = 10;
- len -= 2;
- }
- break;
-
- default:
- base = 8;
- break;
- }
-
- while (len-- > 0)
- {
- c = *p++;
- if (c >= 'A' && c <= 'Z')
- c += 'a' - 'A';
- if (c != 'l' && c != 'u')
- n *= base;
- if (c >= '0' && c <= '9')
- n += i = c - '0';
- else
- {
- if (base > 10 && c >= 'a' && c <= 'f')
- n += i = c - 'a' + 10;
- else if (len == 0 && c == 'l')
- long_p = 1;
- else if (len == 0 && c == 'u')
- unsigned_p = 1;
- else
- return ERROR; /* Char not a digit */
- }
- if (i >= base)
- return ERROR; /* Invalid digit in this base */
-
- /* Portably test for overflow (only works for nonzero values, so make
- a second check for zero). */
- if ((prevn >= n) && n != 0)
- unsigned_p=1; /* Try something unsigned */
- /* If range checking enabled, portably test for unsigned overflow. */
- if (RANGE_CHECK && n != 0)
- {
- if ((unsigned_p && (unsigned)prevn >= (unsigned)n))
- range_error("Overflow on numeric constant.");
- }
- prevn = n;
- }
-
- /* If the number is too big to be an int, or it's got an l suffix
- then it's a long. Work out if this has to be a long by
- shifting right and and seeing if anything remains, and the
- target int size is different to the target long size.
-
- In the expression below, we could have tested
- (n >> TARGET_INT_BIT)
- to see if it was zero,
- but too many compilers warn about that, when ints and longs
- are the same size. So we shift it twice, with fewer bits
- each time, for the same result. */
-
- if ((TARGET_INT_BIT != TARGET_LONG_BIT
- && ((n >> 2) >> (TARGET_INT_BIT-2))) /* Avoid shift warning */
- || long_p)
- {
- high_bit = ((ULONGEST)1) << (TARGET_LONG_BIT-1);
- unsigned_type = builtin_type_unsigned_long;
- signed_type = builtin_type_long;
- }
- else
- {
- high_bit = ((ULONGEST)1) << (TARGET_INT_BIT-1);
- unsigned_type = builtin_type_unsigned_int;
- signed_type = builtin_type_int;
- }
-
- putithere->typed_val.val = n;
-
- /* If the high bit of the worked out type is set then this number
- has to be unsigned. */
-
- if (unsigned_p || (n & high_bit))
- putithere->typed_val.type = unsigned_type;
- else
- putithere->typed_val.type = signed_type;
-
- return INT;
-}
-
-struct token
-{
- char *operator;
- int token;
- enum exp_opcode opcode;
-};
-
-static const struct token dot_ops[] =
-{
- { ".and.", BOOL_AND, BINOP_END },
- { ".AND.", BOOL_AND, BINOP_END },
- { ".or.", BOOL_OR, BINOP_END },
- { ".OR.", BOOL_OR, BINOP_END },
- { ".not.", BOOL_NOT, BINOP_END },
- { ".NOT.", BOOL_NOT, BINOP_END },
- { ".eq.", EQUAL, BINOP_END },
- { ".EQ.", EQUAL, BINOP_END },
- { ".eqv.", EQUAL, BINOP_END },
- { ".NEQV.", NOTEQUAL, BINOP_END },
- { ".neqv.", NOTEQUAL, BINOP_END },
- { ".EQV.", EQUAL, BINOP_END },
- { ".ne.", NOTEQUAL, BINOP_END },
- { ".NE.", NOTEQUAL, BINOP_END },
- { ".le.", LEQ, BINOP_END },
- { ".LE.", LEQ, BINOP_END },
- { ".ge.", GEQ, BINOP_END },
- { ".GE.", GEQ, BINOP_END },
- { ".gt.", GREATERTHAN, BINOP_END },
- { ".GT.", GREATERTHAN, BINOP_END },
- { ".lt.", LESSTHAN, BINOP_END },
- { ".LT.", LESSTHAN, BINOP_END },
- { NULL, 0, 0 }
-};
-
-struct f77_boolean_val
-{
- char *name;
- int value;
-};
-
-static const struct f77_boolean_val boolean_values[] =
-{
- { ".true.", 1 },
- { ".TRUE.", 1 },
- { ".false.", 0 },
- { ".FALSE.", 0 },
- { NULL, 0 }
-};
-
-static const struct token f77_keywords[] =
-{
- { "complex_16", COMPLEX_S16_KEYWORD, BINOP_END },
- { "complex_32", COMPLEX_S32_KEYWORD, BINOP_END },
- { "character", CHARACTER, BINOP_END },
- { "integer_2", INT_S2_KEYWORD, BINOP_END },
- { "logical_1", LOGICAL_S1_KEYWORD, BINOP_END },
- { "logical_2", LOGICAL_S2_KEYWORD, BINOP_END },
- { "complex_8", COMPLEX_S8_KEYWORD, BINOP_END },
- { "integer", INT_KEYWORD, BINOP_END },
- { "logical", LOGICAL_KEYWORD, BINOP_END },
- { "real_16", REAL_S16_KEYWORD, BINOP_END },
- { "complex", COMPLEX_S8_KEYWORD, BINOP_END },
- { "sizeof", SIZEOF, BINOP_END },
- { "real_8", REAL_S8_KEYWORD, BINOP_END },
- { "real", REAL_KEYWORD, BINOP_END },
- { NULL, 0, 0 }
-};
-
-/* Implementation of a dynamically expandable buffer for processing input
- characters acquired through lexptr and building a value to return in
- yylval. Ripped off from ch-exp.y */
-
-static char *tempbuf; /* Current buffer contents */
-static int tempbufsize; /* Size of allocated buffer */
-static int tempbufindex; /* Current index into buffer */
-
-#define GROWBY_MIN_SIZE 64 /* Minimum amount to grow buffer by */
-
-#define CHECKBUF(size) \
- do { \
- if (tempbufindex + (size) >= tempbufsize) \
- { \
- growbuf_by_size (size); \
- } \
- } while (0);
-
-
-/* Grow the static temp buffer if necessary, including allocating the first one
- on demand. */
-
-static void
-growbuf_by_size (count)
- int count;
-{
- int growby;
-
- growby = max (count, GROWBY_MIN_SIZE);
- tempbufsize += growby;
- if (tempbuf == NULL)
- tempbuf = (char *) xmalloc (tempbufsize);
- else
- tempbuf = (char *) xrealloc (tempbuf, tempbufsize);
-}
-
-/* Blatantly ripped off from ch-exp.y. This routine recognizes F77
- string-literals.
-
- Recognize a string literal. A string literal is a nonzero sequence
- of characters enclosed in matching single quotes, except that
- a single character inside single quotes is a character literal, which
- we reject as a string literal. To embed the terminator character inside
- a string, it is simply doubled (I.E. 'this''is''one''string') */
-
-static int
-match_string_literal ()
-{
- char *tokptr = lexptr;
-
- for (tempbufindex = 0, tokptr++; *tokptr != '\0'; tokptr++)
- {
- CHECKBUF (1);
- if (*tokptr == *lexptr)
- {
- if (*(tokptr + 1) == *lexptr)
- tokptr++;
- else
- break;
- }
- tempbuf[tempbufindex++] = *tokptr;
- }
- if (*tokptr == '\0' /* no terminator */
- || tempbufindex == 0) /* no string */
- return 0;
- else
- {
- tempbuf[tempbufindex] = '\0';
- yylval.sval.ptr = tempbuf;
- yylval.sval.length = tempbufindex;
- lexptr = ++tokptr;
- return STRING_LITERAL;
- }
-}
-
-/* Read one token, getting characters through lexptr. */
-
-static int
-yylex ()
-{
- int c;
- int namelen;
- unsigned int i,token;
- char *tokstart;
-
- retry:
-
- tokstart = lexptr;
-
- /* First of all, let us make sure we are not dealing with the
- special tokens .true. and .false. which evaluate to 1 and 0. */
-
- if (*lexptr == '.')
- {
- for (i = 0; boolean_values[i].name != NULL; i++)
- {
- if STREQN (tokstart, boolean_values[i].name,
- strlen (boolean_values[i].name))
- {
- lexptr += strlen (boolean_values[i].name);
- yylval.lval = boolean_values[i].value;
- return BOOLEAN_LITERAL;
- }
- }
- }
-
- /* See if it is a special .foo. operator */
-
- for (i = 0; dot_ops[i].operator != NULL; i++)
- if (STREQN (tokstart, dot_ops[i].operator, strlen (dot_ops[i].operator)))
- {
- lexptr += strlen (dot_ops[i].operator);
- yylval.opcode = dot_ops[i].opcode;
- return dot_ops[i].token;
- }
-
- switch (c = *tokstart)
- {
- case 0:
- return 0;
-
- case ' ':
- case '\t':
- case '\n':
- lexptr++;
- goto retry;
-
- case '\'':
- token = match_string_literal ();
- if (token != 0)
- return (token);
- break;
-
- case '(':
- paren_depth++;
- lexptr++;
- return c;
-
- case ')':
- if (paren_depth == 0)
- return 0;
- paren_depth--;
- lexptr++;
- return c;
-
- case ',':
- if (comma_terminates && paren_depth == 0)
- return 0;
- lexptr++;
- return c;
-
- case '.':
- /* Might be a floating point number. */
- if (lexptr[1] < '0' || lexptr[1] > '9')
- goto symbol; /* Nope, must be a symbol. */
- /* FALL THRU into number case. */
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- /* It's a number. */
- int got_dot = 0, got_e = 0, got_d = 0, toktype;
- register char *p = tokstart;
- int hex = input_radix > 10;
-
- if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
- {
- p += 2;
- hex = 1;
- }
- else if (c == '0' && (p[1]=='t' || p[1]=='T' || p[1]=='d' || p[1]=='D'))
- {
- p += 2;
- hex = 0;
- }
-
- for (;; ++p)
- {
- if (!hex && !got_e && (*p == 'e' || *p == 'E'))
- got_dot = got_e = 1;
- else if (!hex && !got_d && (*p == 'd' || *p == 'D'))
- got_dot = got_d = 1;
- else if (!hex && !got_dot && *p == '.')
- got_dot = 1;
- else if (((got_e && (p[-1] == 'e' || p[-1] == 'E'))
- || (got_d && (p[-1] == 'd' || p[-1] == 'D')))
- && (*p == '-' || *p == '+'))
- /* This is the sign of the exponent, not the end of the
- number. */
- continue;
- /* We will take any letters or digits. parse_number will
- complain if past the radix, or if L or U are not final. */
- else if ((*p < '0' || *p > '9')
- && ((*p < 'a' || *p > 'z')
- && (*p < 'A' || *p > 'Z')))
- break;
- }
- toktype = parse_number (tokstart, p - tokstart, got_dot|got_e|got_d,
- &yylval);
- if (toktype == ERROR)
- {
- char *err_copy = (char *) alloca (p - tokstart + 1);
-
- memcpy (err_copy, tokstart, p - tokstart);
- err_copy[p - tokstart] = 0;
- error ("Invalid number \"%s\".", err_copy);
- }
- lexptr = p;
- return toktype;
- }
-
- case '+':
- case '-':
- case '*':
- case '/':
- case '%':
- case '|':
- case '&':
- case '^':
- case '~':
- case '!':
- case '@':
- case '<':
- case '>':
- case '[':
- case ']':
- case '?':
- case ':':
- case '=':
- case '{':
- case '}':
- symbol:
- lexptr++;
- return c;
- }
-
- if (!(c == '_' || c == '$'
- || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
- /* We must have come across a bad character (e.g. ';'). */
- error ("Invalid character '%c' in expression.", c);
-
- namelen = 0;
- for (c = tokstart[namelen];
- (c == '_' || c == '$' || (c >= '0' && c <= '9')
- || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
- c = tokstart[++namelen]);
-
- /* The token "if" terminates the expression and is NOT
- removed from the input stream. */
-
- if (namelen == 2 && tokstart[0] == 'i' && tokstart[1] == 'f')
- return 0;
-
- lexptr += namelen;
-
- /* Catch specific keywords. */
-
- for (i = 0; f77_keywords[i].operator != NULL; i++)
- if (STREQN(tokstart, f77_keywords[i].operator,
- strlen(f77_keywords[i].operator)))
- {
- /* lexptr += strlen(f77_keywords[i].operator); */
- yylval.opcode = f77_keywords[i].opcode;
- return f77_keywords[i].token;
- }
-
- yylval.sval.ptr = tokstart;
- yylval.sval.length = namelen;
-
- if (*tokstart == '$')
- {
- write_dollar_variable (yylval.sval);
- return VARIABLE;
- }
-
- /* Use token-type TYPENAME for symbols that happen to be defined
- currently as names of types; NAME for other symbols.
- The caller is not constrained to care about the distinction. */
- {
- char *tmp = copy_name (yylval.sval);
- struct symbol *sym;
- int is_a_field_of_this = 0;
- int hextype;
-
- sym = lookup_symbol (tmp, expression_context_block,
- VAR_NAMESPACE,
- current_language->la_language == language_cplus
- ? &is_a_field_of_this : NULL,
- NULL);
- if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
- {
- yylval.tsym.type = SYMBOL_TYPE (sym);
- return TYPENAME;
- }
- if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0)
- return TYPENAME;
-
- /* Input names that aren't symbols but ARE valid hex numbers,
- when the input radix permits them, can be names or numbers
- depending on the parse. Note we support radixes > 16 here. */
- if (!sym
- && ((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10)
- || (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10)))
- {
- YYSTYPE newlval; /* Its value is ignored. */
- hextype = parse_number (tokstart, namelen, 0, &newlval);
- if (hextype == INT)
- {
- yylval.ssym.sym = sym;
- yylval.ssym.is_a_field_of_this = is_a_field_of_this;
- return NAME_OR_INT;
- }
- }
-
- /* Any other kind of symbol */
- yylval.ssym.sym = sym;
- yylval.ssym.is_a_field_of_this = is_a_field_of_this;
- return NAME;
- }
-}
-
-void
-yyerror (msg)
- char *msg;
-{
- error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
-}
diff --git a/contrib/gdb/gdb/gdba.el b/contrib/gdb/gdb/gdba.el
deleted file mode 100644
index 0f7158642280..000000000000
--- a/contrib/gdb/gdb/gdba.el
+++ /dev/null
@@ -1,2607 +0,0 @@
-(defmacro gud (form)
- (` (save-excursion (set-buffer "*gud-a.out*") (, form))))
-
-(defun dbug (foo &optional fun)
- (save-excursion
- (set-buffer (get-buffer-create "*trace*"))
- (goto-char (point-max))
- (insert "***" (symbol-name foo) "\n")
- (if fun
- (funcall fun))))
-
-
-;;; gud.el --- Grand Unified Debugger mode for gdb, sdb, dbx, or xdb
-;;; under Emacs
-
-;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
-;; Maintainer: FSF
-;; Version: 1.3
-;; Keywords: unix, tools
-
-;; Copyright (C) 1992, 1993 Free Software Foundation, Inc.
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software; you can redistribute 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.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; if not, write to the Free Software
-;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-
-;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu>
-;; It was later rewritten by rms. Some ideas were due to Masanobu.
-;; Grand Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com>
-;; The overloading code was then rewritten by Barry Warsaw <bwarsaw@cen.com>,
-;; who also hacked the mode to use comint.el. Shane Hartman <shane@spr.com>
-;; added support for xdb (HPUX debugger).
-
-;; Cygnus Support added support for gdb's --annotate=2.
-
-;;; Code:
-
-(require 'comint)
-(require 'etags)
-
-;; ======================================================================
-;; GUD commands must be visible in C buffers visited by GUD
-
-(defvar gud-key-prefix "\C-x\C-a"
- "Prefix of all GUD commands valid in C buffers.")
-
-(global-set-key (concat gud-key-prefix "\C-l") 'gud-refresh)
-(global-set-key "\C-x " 'gud-break) ;; backward compatibility hack
-
-;; ======================================================================
-;; the overloading mechanism
-
-(defun gud-overload-functions (gud-overload-alist)
- "Overload functions defined in GUD-OVERLOAD-ALIST.
-This association list has elements of the form
- (ORIGINAL-FUNCTION-NAME OVERLOAD-FUNCTION)"
- (mapcar
- (function (lambda (p) (fset (car p) (symbol-function (cdr p)))))
- gud-overload-alist))
-
-(defun gud-massage-args (file args)
- (error "GUD not properly entered."))
-
-(defun gud-marker-filter (str)
- (error "GUD not properly entered."))
-
-(defun gud-find-file (f)
- (error "GUD not properly entered."))
-
-;; ======================================================================
-;; command definition
-
-;; This macro is used below to define some basic debugger interface commands.
-;; Of course you may use `gud-def' with any other debugger command, including
-;; user defined ones.
-
-;; A macro call like (gud-def FUNC NAME KEY DOC) expands to a form
-;; which defines FUNC to send the command NAME to the debugger, gives
-;; it the docstring DOC, and binds that function to KEY in the GUD
-;; major mode. The function is also bound in the global keymap with the
-;; GUD prefix.
-
-(defmacro gud-def (func cmd key &optional doc)
- "Define FUNC to be a command sending STR and bound to KEY, with
-optional doc string DOC. Certain %-escapes in the string arguments
-are interpreted specially if present. These are:
-
- %f name (without directory) of current source file.
- %d directory of current source file.
- %l number of current source line
- %e text of the C lvalue or function-call expression surrounding point.
- %a text of the hexadecimal address surrounding point
- %p prefix argument to the command (if any) as a number
-
- The `current' source file is the file of the current buffer (if
-we're in a C file) or the source file current at the last break or
-step (if we're in the GUD buffer).
- The `current' line is that of the current buffer (if we're in a
-source file) or the source line number at the last break or step (if
-we're in the GUD buffer)."
- (list 'progn
- (list 'defun func '(arg)
- (or doc "")
- '(interactive "p")
- (list 'gud-call cmd 'arg))
- (if key
- (list 'define-key
- '(current-local-map)
- (concat "\C-c" key)
- (list 'quote func)))
- (if key
- (list 'global-set-key
- (list 'concat 'gud-key-prefix key)
- (list 'quote func)))))
-
-;; Where gud-display-frame should put the debugging arrow. This is
-;; set by the marker-filter, which scans the debugger's output for
-;; indications of the current program counter.
-(defvar gud-last-frame nil)
-
-;; Used by gud-refresh, which should cause gud-display-frame to redisplay
-;; the last frame, even if it's been called before and gud-last-frame has
-;; been set to nil.
-(defvar gud-last-last-frame nil)
-
-;; All debugger-specific information is collected here.
-;; Here's how it works, in case you ever need to add a debugger to the mode.
-;;
-;; Each entry must define the following at startup:
-;;
-;;<name>
-;; comint-prompt-regexp
-;; gud-<name>-massage-args
-;; gud-<name>-marker-filter
-;; gud-<name>-find-file
-;;
-;; The job of the massage-args method is to modify the given list of
-;; debugger arguments before running the debugger.
-;;
-;; The job of the marker-filter method is to detect file/line markers in
-;; strings and set the global gud-last-frame to indicate what display
-;; action (if any) should be triggered by the marker. Note that only
-;; whatever the method *returns* is displayed in the buffer; thus, you
-;; can filter the debugger's output, interpreting some and passing on
-;; the rest.
-;;
-;; The job of the find-file method is to visit and return the buffer indicated
-;; by the car of gud-tag-frame. This may be a file name, a tag name, or
-;; something else.
-
-;; ======================================================================
-;; gdb functions
-
-;;; History of argument lists passed to gdb.
-(defvar gud-gdb-history nil)
-
-(defun gud-gdb-massage-args (file args)
- (cons "--annotate=2" (cons file args)))
-
-
-;;
-;; In this world, there are gdb instance objects (of unspecified
-;; representation) and buffers associated with those objects.
-;;
-
-;;
-;; gdb-instance objects
-;;
-
-(defun make-gdb-instance (proc)
- "Create a gdb instance object from a gdb process."
- (setq last-proc proc)
- (let ((instance (cons 'gdb-instance proc)))
- (save-excursion
- (set-buffer (process-buffer proc))
- (setq gdb-buffer-instance instance)
- (progn
- (mapcar 'make-variable-buffer-local gdb-instance-variables)
- (setq gdb-buffer-type 'gud)
- ;; If we're taking over the buffer of another process,
- ;; take over it's ancillery buffers as well.
- ;;
- (let ((dead (or old-gdb-buffer-instance)))
- (mapcar
- (function
- (lambda (b)
- (progn
- (set-buffer b)
- (if (eq dead gdb-buffer-instance)
- (setq gdb-buffer-instance instance)))))
- (buffer-list)))))
- instance))
-
-(defun gdb-instance-process (inst) (cdr inst))
-
-;;; The list of instance variables is built up by the expansions of
-;;; DEF-GDB-VARIABLE
-;;;
-(defvar gdb-instance-variables '()
- "A list of variables that are local to the gud buffer associated
-with a gdb instance.")
-
-(defmacro def-gdb-variable
- (name accessor setter &optional default doc)
- (`
- (progn
- (defvar (, name) (, default) (, (or doc "undocumented")))
- (if (not (memq '(, name) gdb-instance-variables))
- (setq gdb-instance-variables
- (cons '(, name) gdb-instance-variables)))
- (, (and accessor
- (`
- (defun (, accessor) (instance)
- (let
- ((buffer (gdb-get-instance-buffer instance 'gud)))
- (and buffer
- (save-excursion
- (set-buffer buffer)
- (, name))))))))
- (, (and setter
- (`
- (defun (, setter) (instance val)
- (let
- ((buffer (gdb-get-instance-buffer instance 'gud)))
- (and buffer
- (save-excursion
- (set-buffer buffer)
- (setq (, name) val)))))))))))
-
-(defmacro def-gdb-var (root-symbol &optional default doc)
- (let* ((root (symbol-name root-symbol))
- (accessor (intern (concat "gdb-instance-" root)))
- (setter (intern (concat "set-gdb-instance-" root)))
- (var-name (intern (concat "gdb-" root))))
- (` (def-gdb-variable
- (, var-name) (, accessor) (, setter)
- (, default) (, doc)))))
-
-(def-gdb-var buffer-instance nil
- "In an instance buffer, the buffer's instance.")
-
-(def-gdb-var buffer-type nil
- "One of the symbols bound in gdb-instance-buffer-rules")
-
-(def-gdb-var burst ""
- "A string of characters from gdb that have not yet been processed.")
-
-(def-gdb-var input-queue ()
- "A list of high priority gdb command objects.")
-
-(def-gdb-var idle-input-queue ()
- "A list of low priority gdb command objects.")
-
-(def-gdb-var prompting nil
- "True when gdb is idle with no pending input.")
-
-(def-gdb-var output-sink 'user
- "The disposition of the output of the current gdb command.
-Possible values are these symbols:
-
- user -- gdb output should be copied to the gud buffer
- for the user to see.
-
- inferior -- gdb output should be copied to the inferior-io buffer
-
- pre-emacs -- output should be ignored util the post-prompt
- annotation is received. Then the output-sink
- becomes:...
- emacs -- output should be collected in the partial-output-buffer
- for subsequent processing by a command. This is the
- disposition of output generated by commands that
- gud mode sends to gdb on its own behalf.
- post-emacs -- ignore input until the prompt annotation is
- received, then go to USER disposition.
-")
-
-(def-gdb-var current-item nil
- "The most recent command item sent to gdb.")
-
-(def-gdb-var pending-triggers '()
- "A list of trigger functions that have run later than their output
-handlers.")
-
-(defun in-gdb-instance-context (instance form)
- "Funcall `form' in the gud buffer of `instance'"
- (save-excursion
- (set-buffer (gdb-get-instance-buffer instance 'gud))
- (funcall form)))
-
-;; end of instance vars
-
-;;
-;; finding instances
-;;
-
-(defun gdb-proc->instance (proc)
- (save-excursion
- (set-buffer (process-buffer proc))
- gdb-buffer-instance))
-
-(defun gdb-mru-instance-buffer ()
- "Return the most recently used (non-auxiliary) gdb gud buffer."
- (save-excursion
- (gdb-goto-first-gdb-instance (buffer-list))))
-
-(defun gdb-goto-first-gdb-instance (blist)
- "Use gdb-mru-instance-buffer -- not this."
- (and blist
- (progn
- (set-buffer (car blist))
- (or (and gdb-buffer-instance
- (eq gdb-buffer-type 'gud)
- (car blist))
- (gdb-goto-first-gdb-instance (cdr blist))))))
-
-(defun buffer-gdb-instance (buf)
- (save-excursion
- (set-buffer buf)
- gdb-buffer-instance))
-
-(defun gdb-needed-default-instance ()
- "Return the most recently used gdb instance or signal an error."
- (let ((buffer (gdb-mru-instance-buffer)))
- (or (and buffer (buffer-gdb-instance buffer))
- (error "No instance of gdb found."))))
-
-(defun gdb-instance-target-string (instance)
- "The apparent name of the program being debugged by a gdb instance.
-For sure this the root string used in smashing together the gud
-buffer's name, even if that doesn't happen to be the name of a
-program."
- (in-gdb-instance-context
- instance
- (function (lambda () gud-target-name))))
-
-
-
-;;
-;; Instance Buffers.
-;;
-
-;; More than one buffer can be associated with a gdb instance.
-;;
-;; Each buffer has a TYPE -- a symbol that identifies the function
-;; of that particular buffer.
-;;
-;; The usual gud interaction buffer is given the type `gud' and
-;; is constructed specially.
-;;
-;; Others are constructed by gdb-get-create-instance-buffer and
-;; named according to the rules set forth in the gdb-instance-buffer-rules-assoc
-
-(defun gdb-get-instance-buffer (instance key)
- "Return the instance buffer for `instance' tagged with type `key'.
-The key should be one of the cars in `gdb-instance-buffer-rules-assoc'."
- (save-excursion
- (gdb-look-for-tagged-buffer instance key (buffer-list))))
-
-(defun gdb-get-create-instance-buffer (instance key)
- "Create a new gdb instance buffer of the type specified by `key'.
-The key should be one of the cars in `gdb-instance-buffer-rules-assoc'."
- (or (gdb-get-instance-buffer instance key)
- (let* ((rules (assoc key gdb-instance-buffer-rules-assoc))
- (name (funcall (gdb-rules-name-maker rules) instance))
- (new (get-buffer-create name)))
- (save-excursion
- (set-buffer new)
- (make-variable-buffer-local 'gdb-buffer-type)
- (setq gdb-buffer-type key)
- (make-variable-buffer-local 'gdb-buffer-instance)
- (setq gdb-buffer-instance instance)
- (if (cdr (cdr rules))
- (funcall (car (cdr (cdr rules)))))
- new))))
-
-(defun gdb-rules-name-maker (rules) (car (cdr rules)))
-
-(defun gdb-look-for-tagged-buffer (instance key bufs)
- (let ((retval nil))
- (while (and (not retval) bufs)
- (set-buffer (car bufs))
- (if (and (eq gdb-buffer-instance instance)
- (eq gdb-buffer-type key))
- (setq retval (car bufs)))
- (setq bufs (cdr bufs))
- )
- retval))
-
-(defun gdb-instance-buffer-p (buf)
- (save-excursion
- (set-buffer buf)
- (and gdb-buffer-type
- (not (eq gdb-buffer-type 'gud)))))
-
-;;
-;; This assoc maps buffer type symbols to rules. Each rule is a list of
-;; at least one and possible more functions. The functions have these
-;; roles in defining a buffer type:
-;;
-;; NAME - take an instance, return a name for this type buffer for that
-;; instance.
-;; The remaining function(s) are optional:
-;;
-;; MODE - called in new new buffer with no arguments, should establish
-;; the proper mode for the buffer.
-;;
-
-(defvar gdb-instance-buffer-rules-assoc '())
-
-(defun gdb-set-instance-buffer-rules (buffer-type &rest rules)
- (let ((binding (assoc buffer-type gdb-instance-buffer-rules-assoc)))
- (if binding
- (setcdr binding rules)
- (setq gdb-instance-buffer-rules-assoc
- (cons (cons buffer-type rules)
- gdb-instance-buffer-rules-assoc)))))
-
-(gdb-set-instance-buffer-rules 'gud 'error) ; gud buffers are an exception to the rules
-
-;;
-;; partial-output buffers
-;;
-;; These accumulate output from a command executed on
-;; behalf of emacs (rather than the user).
-;;
-
-(gdb-set-instance-buffer-rules 'gdb-partial-output-buffer
- 'gdb-partial-output-name)
-
-(defun gdb-partial-output-name (instance)
- (concat "*partial-output-"
- (gdb-instance-target-string instance)
- "*"))
-
-
-(gdb-set-instance-buffer-rules 'gdb-inferior-io
- 'gdb-inferior-io-name
- 'gud-inferior-io-mode)
-
-(defun gdb-inferior-io-name (instance)
- (concat "*input/output of "
- (gdb-instance-target-string instance)
- "*"))
-
-(defvar gdb-inferior-io-mode-map (copy-keymap comint-mode-map))
-(define-key comint-mode-map "\C-c\C-c" 'gdb-inferior-io-interrupt)
-(define-key comint-mode-map "\C-c\C-z" 'gdb-inferior-io-stop)
-(define-key comint-mode-map "\C-c\C-\\" 'gdb-inferior-io-quit)
-(define-key comint-mode-map "\C-c\C-d" 'gdb-inferior-io-eof)
-
-(defun gud-inferior-io-mode ()
- "Major mode for gud inferior-io.
-
-\\{comint-mode-map}"
- ;; We want to use comint because it has various nifty and familiar
- ;; features. We don't need a process, but comint wants one, so create
- ;; a dummy one.
- (make-comint (substring (buffer-name) 1 (- (length (buffer-name)) 1))
- "/bin/cat")
- (setq major-mode 'gud-inferior-io-mode)
- (setq mode-name "Debuggee I/O")
- (setq comint-input-sender 'gud-inferior-io-sender)
-)
-
-(defun gud-inferior-io-sender (proc string)
- (save-excursion
- (set-buffer (process-buffer proc))
- (let ((instance gdb-buffer-instance))
- (set-buffer (gdb-get-instance-buffer instance 'gud))
- (let ((gud-proc (get-buffer-process (current-buffer))))
- (process-send-string gud-proc string)
- (process-send-string gud-proc "\n")
- ))
- ))
-
-(defun gdb-inferior-io-interrupt (instance)
- "Interrupt the program being debugged."
- (interactive (list (gdb-needed-default-instance)))
- (interrupt-process
- (get-buffer-process (gdb-get-instance-buffer instance 'gud)) comint-ptyp))
-
-(defun gdb-inferior-io-quit (instance)
- "Send quit signal to the program being debugged."
- (interactive (list (gdb-needed-default-instance)))
- (quit-process
- (get-buffer-process (gdb-get-instance-buffer instance 'gud)) comint-ptyp))
-
-(defun gdb-inferior-io-stop (instance)
- "Stop the program being debugged."
- (interactive (list (gdb-needed-default-instance)))
- (stop-process
- (get-buffer-process (gdb-get-instance-buffer instance 'gud)) comint-ptyp))
-
-(defun gdb-inferior-io-eof (instance)
- "Send end-of-file to the program being debugged."
- (interactive (list (gdb-needed-default-instance)))
- (process-send-eof
- (get-buffer-process (gdb-get-instance-buffer instance 'gud))))
-
-
-;;
-;; gdb communications
-;;
-
-;; INPUT: things sent to gdb
-;;
-;; Each instance has a high and low priority
-;; input queue. Low priority input is sent only
-;; when the high priority queue is idle.
-;;
-;; The queues are lists. Each element is either
-;; a string (indicating user or user-like input)
-;; or a list of the form:
-;;
-;; (INPUT-STRING HANDLER-FN)
-;;
-;;
-;; The handler function will be called from the
-;; partial-output buffer when the command completes.
-;; This is the way to write commands which
-;; invoke gdb commands autonomously.
-;;
-;; These lists are consumed tail first.
-;;
-
-(defun gdb-send (proc string)
- "A comint send filter for gdb.
-This filter may simply queue output for a later time."
- (let ((instance (gdb-proc->instance proc)))
- (gdb-instance-enqueue-input instance (concat string "\n"))))
-
-;; Note: Stuff enqueued here will be sent to the next prompt, even if it
-;; is a query, or other non-top-level prompt. To guarantee stuff will get
-;; sent to the top-level prompt, currently it must be put in the idle queue.
-;; ^^^^^^^^^
-;; [This should encourage gud extentions that invoke gdb commands to let
-;; the user go first; it is not a bug. -t]
-;;
-
-(defun gdb-instance-enqueue-input (instance item)
- (if (gdb-instance-prompting instance)
- (progn
- (gdb-send-item instance item)
- (set-gdb-instance-prompting instance nil))
- (set-gdb-instance-input-queue
- instance
- (cons item (gdb-instance-input-queue instance)))))
-
-(defun gdb-instance-dequeue-input (instance)
- (let ((queue (gdb-instance-input-queue instance)))
- (and queue
- (if (not (cdr queue))
- (let ((answer (car queue)))
- (set-gdb-instance-input-queue instance '())
- answer)
- (gdb-take-last-elt queue)))))
-
-(defun gdb-instance-enqueue-idle-input (instance item)
- (if (and (gdb-instance-prompting instance)
- (not (gdb-instance-input-queue instance)))
- (progn
- (gdb-send-item instance item)
- (set-gdb-instance-prompting instance nil))
- (set-gdb-instance-idle-input-queue
- instance
- (cons item (gdb-instance-idle-input-queue instance)))))
-
-(defun gdb-instance-dequeue-idle-input (instance)
- (let ((queue (gdb-instance-idle-input-queue instance)))
- (and queue
- (if (not (cdr queue))
- (let ((answer (car queue)))
- (set-gdb-instance-idle-input-queue instance '())
- answer)
- (gdb-take-last-elt queue)))))
-
-; Don't use this in general.
-(defun gdb-take-last-elt (l)
- (if (cdr (cdr l))
- (gdb-take-last-elt (cdr l))
- (let ((answer (car (cdr l))))
- (setcdr l '())
- answer)))
-
-
-;;
-;; output -- things gdb prints to emacs
-;;
-;; GDB output is a stream interrupted by annotations.
-;; Annotations can be recognized by their beginning
-;; with \C-j\C-z\C-z<tag><opt>\C-j
-;;
-;; The tag is a string obeying symbol syntax.
-;;
-;; The optional part `<opt>' can be either the empty string
-;; or a space followed by more data relating to the annotation.
-;; For example, the SOURCE annotation is followed by a filename,
-;; line number and various useless goo. This data must not include
-;; any newlines.
-;;
-
-
-(defun gud-gdb-marker-filter (string)
- "A gud marker filter for gdb."
- ;; Bogons don't tell us the process except through scoping crud.
- (let ((instance (gdb-proc->instance proc)))
- (gdb-output-burst instance string)))
-
-(defvar gdb-annotation-rules
- '(("frames-invalid" gdb-invalidate-frames)
- ("breakpoints-invalid" gdb-invalidate-breakpoints)
- ("pre-prompt" gdb-pre-prompt)
- ("prompt" gdb-prompt)
- ("commands" gdb-subprompt)
- ("overload-choice" gdb-subprompt)
- ("query" gdb-subprompt)
- ("prompt-for-continue" gdb-subprompt)
- ("post-prompt" gdb-post-prompt)
- ("source" gdb-source)
- ("starting" gdb-starting)
- ("exited" gdb-stopping)
- ("signalled" gdb-stopping)
- ("signal" gdb-stopping)
- ("breakpoint" gdb-stopping)
- ("watchpoint" gdb-stopping)
- ("stopped" gdb-stopped)
- )
- "An assoc mapping annotation tags to functions which process them.")
-
-
-(defun gdb-ignore-annotation (instance args)
- nil)
-
-(defconst gdb-source-spec-regexp
- "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:0x[a-f0-9]*")
-
-;; Do not use this except as an annotation handler."
-(defun gdb-source (instance args)
- (string-match gdb-source-spec-regexp args)
- ;; Extract the frame position from the marker.
- (setq gud-last-frame
- (cons
- (substring args (match-beginning 1) (match-end 1))
- (string-to-int (substring args
- (match-beginning 2)
- (match-end 2))))))
-
-;; An annotation handler for `prompt'.
-;; This sends the next command (if any) to gdb.
-(defun gdb-prompt (instance ignored)
- (let ((sink (gdb-instance-output-sink instance)))
- (cond
- ((eq sink 'user) t)
- ((eq sink 'post-emacs)
- (set-gdb-instance-output-sink instance 'user))
- (t
- (set-gdb-instance-output-sink instance 'user)
- (error "Phase error in gdb-prompt (got %s)" sink))))
- (let ((highest (gdb-instance-dequeue-input instance)))
- (if highest
- (gdb-send-item instance highest)
- (let ((lowest (gdb-instance-dequeue-idle-input instance)))
- (if lowest
- (gdb-send-item instance lowest)
- (progn
- (set-gdb-instance-prompting instance t)
- (gud-display-frame)))))))
-
-;; An annotation handler for non-top-level prompts.
-(defun gdb-subprompt (instance ignored)
- (let ((highest (gdb-instance-dequeue-input instance)))
- (if highest
- (gdb-send-item instance highest)
- (set-gdb-instance-prompting instance t))))
-
-(defun gdb-send-item (instance item)
- (set-gdb-instance-current-item instance item)
- (if (stringp item)
- (progn
- (set-gdb-instance-output-sink instance 'user)
- (process-send-string (gdb-instance-process instance)
- item))
- (progn
- (gdb-clear-partial-output instance)
- (set-gdb-instance-output-sink instance 'pre-emacs)
- (process-send-string (gdb-instance-process instance)
- (car item)))))
-
-;; An annotation handler for `pre-prompt'.
-;; This terminates the collection of output from a previous
-;; command if that happens to be in effect.
-(defun gdb-pre-prompt (instance ignored)
- (let ((sink (gdb-instance-output-sink instance)))
- (cond
- ((eq sink 'user) t)
- ((eq sink 'emacs)
- (set-gdb-instance-output-sink instance 'post-emacs)
- (let ((handler
- (car (cdr (gdb-instance-current-item instance)))))
- (save-excursion
- (set-buffer (gdb-get-create-instance-buffer
- instance 'gdb-partial-output-buffer))
- (funcall handler))))
- (t
- (set-gdb-instance-output-sink instance 'user)
- (error "Output sink phase error 1.")))))
-
-;; An annotation handler for `starting'. This says that I/O for the subprocess
-;; is now the program being debugged, not GDB.
-(defun gdb-starting (instance ignored)
- (let ((sink (gdb-instance-output-sink instance)))
- (cond
- ((eq sink 'user)
- (set-gdb-instance-output-sink instance 'inferior)
- ;; FIXME: need to send queued input
- )
- (t (error "Unexpected `starting' annotation")))))
-
-;; An annotation handler for `exited' and other annotations which say that
-;; I/O for the subprocess is now GDB, not the program being debugged.
-(defun gdb-stopping (instance ignored)
- (let ((sink (gdb-instance-output-sink instance)))
- (cond
- ((eq sink 'inferior)
- (set-gdb-instance-output-sink instance 'user)
- )
- (t (error "Unexpected stopping annotation")))))
-
-;; An annotation handler for `stopped'. It is just like gdb-stopping, except
-;; that if we already set the output sink to 'user in gdb-stopping, that is
-;; fine.
-(defun gdb-stopped (instance ignored)
- (let ((sink (gdb-instance-output-sink instance)))
- (cond
- ((eq sink 'inferior)
- (set-gdb-instance-output-sink instance 'user)
- )
- ((eq sink 'user)
- t)
- (t (error "Unexpected stopping annotation")))))
-
-;; An annotation handler for `post-prompt'.
-;; This begins the collection of output from the current
-;; command if that happens to be appropriate."
-(defun gdb-post-prompt (instance ignored)
- (gdb-invalidate-registers instance ignored)
- (let ((sink (gdb-instance-output-sink instance)))
- (cond
- ((eq sink 'user) t)
- ((eq sink 'pre-emacs)
- (set-gdb-instance-output-sink instance 'emacs))
-
- (t
- (set-gdb-instance-output-sink instance 'user)
- (error "Output sink phase error 3.")))))
-
-;; Handle a burst of output from a gdb instance.
-;; This function is (indirectly) used as a gud-marker-filter.
-;; It must return output (if any) to be insterted in the gud
-;; buffer.
-
-(defun gdb-output-burst (instance string)
- "Handle a burst of output from a gdb instance.
-This function is (indirectly) used as a gud-marker-filter.
-It must return output (if any) to be insterted in the gud
-buffer."
-
- (save-match-data
- (let (
- ;; Recall the left over burst from last time
- (burst (concat (gdb-instance-burst instance) string))
- ;; Start accumulating output for the gud buffer
- (output ""))
-
- ;; Process all the complete markers in this chunk.
-
- (while (string-match "\n\032\032\\(.*\\)\n" burst)
- (let ((annotation (substring burst
- (match-beginning 1)
- (match-end 1))))
-
- ;; Stuff prior to the match is just ordinary output.
- ;; It is either concatenated to OUTPUT or directed
- ;; elsewhere.
- (setq output
- (gdb-concat-output
- instance
- output
- (substring burst 0 (match-beginning 0))))
-
- ;; Take that stuff off the burst.
- (setq burst (substring burst (match-end 0)))
-
- ;; Parse the tag from the annotation, and maybe its arguments.
- (string-match "\\(\\S-*\\) ?\\(.*\\)" annotation)
- (let* ((annotation-type (substring annotation
- (match-beginning 1)
- (match-end 1)))
- (annotation-arguments (substring annotation
- (match-beginning 2)
- (match-end 2)))
- (annotation-rule (assoc annotation-type
- gdb-annotation-rules)))
- ;; Call the handler for this annotation.
- (if annotation-rule
- (funcall (car (cdr annotation-rule))
- instance
- annotation-arguments)
- ;; Else the annotation is not recognized. Ignore it silently,
- ;; so that GDB can add new annotations without causing
- ;; us to blow up.
- ))))
-
-
- ;; Does the remaining text end in a partial line?
- ;; If it does, then keep part of the burst until we get more.
- (if (string-match "\n\\'\\|\n\032\\'\\|\n\032\032.*\\'"
- burst)
- (progn
- ;; Everything before the potential marker start can be output.
- (setq output
- (gdb-concat-output
- instance
- output
- (substring burst 0 (match-beginning 0))))
-
- ;; Everything after, we save, to combine with later input.
- (setq burst (substring burst (match-beginning 0))))
-
- ;; In case we know the burst contains no partial annotations:
- (progn
- (setq output (gdb-concat-output instance output burst))
- (setq burst "")))
-
- ;; Save the remaining burst for the next call to this function.
- (set-gdb-instance-burst instance burst)
- output)))
-
-(defun gdb-concat-output (instance so-far new)
- (let ((sink (gdb-instance-output-sink instance)))
- (cond
- ((eq sink 'user) (concat so-far new))
- ((or (eq sink 'pre-emacs) (eq sink 'post-emacs)) so-far)
- ((eq sink 'emacs)
- (gdb-append-to-partial-output instance new)
- so-far)
- ((eq sink 'inferior)
- (gdb-append-to-inferior-io instance new)
- so-far)
- (t (error "Bogon output sink %S" sink)))))
-
-(defun gdb-append-to-partial-output (instance string)
- (save-excursion
- (set-buffer
- (gdb-get-create-instance-buffer
- instance 'gdb-partial-output-buffer))
- (goto-char (point-max))
- (insert string)))
-
-(defun gdb-clear-partial-output (instance)
- (save-excursion
- (set-buffer
- (gdb-get-create-instance-buffer
- instance 'gdb-partial-output-buffer))
- (delete-region (point-min) (point-max))))
-
-(defun gdb-append-to-inferior-io (instance string)
- (save-excursion
- (set-buffer
- (gdb-get-create-instance-buffer
- instance 'gdb-inferior-io))
- (goto-char (point-max))
- (insert-before-markers string))
- (gud-display-buffer
- (gdb-get-create-instance-buffer instance
- 'gdb-inferior-io)))
-
-(defun gdb-clear-inferior-io (instance)
- (save-excursion
- (set-buffer
- (gdb-get-create-instance-buffer
- instance 'gdb-inferior-io))
- (delete-region (point-min) (point-max))))
-
-
-
-;; One trick is to have a command who's output is always available in
-;; a buffer of it's own, and is always up to date. We build several
-;; buffers of this type.
-;;
-;; There are two aspects to this: gdb has to tell us when the output
-;; for that command might have changed, and we have to be able to run
-;; the command behind the user's back.
-;;
-;; The idle input queue and the output phasing associated with
-;; the instance variable `(gdb-instance-output-sink instance)' help
-;; us to run commands behind the user's back.
-;;
-;; Below is the code for specificly managing buffers of output from one
-;; command.
-;;
-
-
-;; The trigger function is suitable for use in the assoc GDB-ANNOTATION-RULES
-;; It adds an idle input for the command we are tracking. It should be the
-;; annotation rule binding of whatever gdb sends to tell us this command
-;; might have changed it's output.
-;;
-;; NAME is the fucntion name. DEMAND-PREDICATE tests if output is really needed.
-;; GDB-COMMAND is a string of such. OUTPUT-HANDLER is the function bound to the
-;; input in the input queue (see comment about ``gdb communications'' above).
-(defmacro def-gdb-auto-update-trigger (name demand-predicate gdb-command output-handler)
- (`
- (defun (, name) (instance &optional ignored)
- (if (and ((, demand-predicate) instance)
- (not (member '(, name)
- (gdb-instance-pending-triggers instance))))
- (progn
- (gdb-instance-enqueue-idle-input
- instance
- (list (, gdb-command) '(, output-handler)))
- (set-gdb-instance-pending-triggers
- instance
- (cons '(, name)
- (gdb-instance-pending-triggers instance))))))))
-
-(defmacro def-gdb-auto-update-handler (name trigger buf-key)
- (`
- (defun (, name) ()
- (set-gdb-instance-pending-triggers
- instance
- (delq '(, trigger)
- (gdb-instance-pending-triggers instance)))
- (let ((buf (gdb-get-instance-buffer instance
- '(, buf-key))))
- (and buf
- (save-excursion
- (set-buffer buf)
- (let ((p (point))
- (buffer-read-only nil))
- (delete-region (point-min) (point-max))
- (insert-buffer (gdb-get-create-instance-buffer
- instance
- 'gdb-partial-output-buffer))
- (goto-char p))))))))
-
-(defmacro def-gdb-auto-updated-buffer
- (buffer-key trigger-name gdb-command output-handler-name)
- (`
- (progn
- (def-gdb-auto-update-trigger (, trigger-name)
- ;; The demand predicate:
- (lambda (instance)
- (gdb-get-instance-buffer instance '(, buffer-key)))
- (, gdb-command)
- (, output-handler-name))
- (def-gdb-auto-update-handler (, output-handler-name)
- (, trigger-name) (, buffer-key)))))
-
-
-
-;;
-;; Breakpoint buffers
-;;
-;; These display the output of `info breakpoints'.
-;;
-
-
-(gdb-set-instance-buffer-rules 'gdb-breakpoints-buffer
- 'gdb-breakpoints-buffer-name
- 'gud-breakpoints-mode)
-
-(def-gdb-auto-updated-buffer gdb-breakpoints-buffer
- ;; This defines the auto update rule for buffers of type
- ;; `gdb-breakpoints-buffer'.
- ;;
- ;; It defines a function to serve as the annotation handler that
- ;; handles the `foo-invalidated' message. That function is called:
- gdb-invalidate-breakpoints
-
- ;; To update the buffer, this command is sent to gdb.
- "server info breakpoints\n"
-
- ;; This also defines a function to be the handler for the output
- ;; from the command above. That function will copy the output into
- ;; the appropriately typed buffer. That function will be called:
- gdb-info-breakpoints-handler)
-
-(defun gdb-breakpoints-buffer-name (instance)
- (save-excursion
- (set-buffer (process-buffer (gdb-instance-process instance)))
- (concat "*breakpoints of " (gdb-instance-target-string instance) "*")))
-
-(defun gud-display-breakpoints-buffer (instance)
- (interactive (list (gdb-needed-default-instance)))
- (gud-display-buffer
- (gdb-get-create-instance-buffer instance
- 'gdb-breakpoints-buffer)))
-
-(defun gud-frame-breakpoints-buffer (instance)
- (interactive (list (gdb-needed-default-instance)))
- (gud-frame-buffer
- (gdb-get-create-instance-buffer instance
- 'gdb-breakpoints-buffer)))
-
-(defvar gud-breakpoints-mode-map nil)
-(setq gud-breakpoints-mode-map (make-keymap))
-(suppress-keymap gud-breakpoints-mode-map)
-(define-key gud-breakpoints-mode-map " " 'gud-toggle-bp-this-line)
-(define-key gud-breakpoints-mode-map "d" 'gud-delete-bp-this-line)
-
-(defun gud-breakpoints-mode ()
- "Major mode for gud breakpoints.
-
-\\{gud-breakpoints-mode-map}"
- (setq major-mode 'gud-breakpoints-mode)
- (setq mode-name "Breakpoints")
- (use-local-map gud-breakpoints-mode-map)
- (setq buffer-read-only t)
- (gdb-invalidate-breakpoints gdb-buffer-instance))
-
-(defun gud-toggle-bp-this-line ()
- (interactive)
- (save-excursion
- (beginning-of-line 1)
- (if (not (looking-at "\\([0-9]*\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)"))
- (error "Not recognized as breakpoint line (demo foo).")
- (gdb-instance-enqueue-idle-input
- gdb-buffer-instance
- (list
- (concat
- (if (eq ?y (char-after (match-beginning 2)))
- "server disable "
- "server enable ")
- (buffer-substring (match-beginning 0)
- (match-end 1))
- "\n")
- '(lambda () nil)))
- )))
-
-(defun gud-delete-bp-this-line ()
- (interactive)
- (save-excursion
- (beginning-of-line 1)
- (if (not (looking-at "\\([0-9]*\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)"))
- (error "Not recognized as breakpoint line (demo foo).")
- (gdb-instance-enqueue-idle-input
- gdb-buffer-instance
- (list
- (concat
- "server delete "
- (buffer-substring (match-beginning 0)
- (match-end 1))
- "\n")
- '(lambda () nil)))
- )))
-
-
-
-
-;;
-;; Frames buffers. These display a perpetually correct bactracktrace
-;; (from the command `where').
-;;
-;; Alas, if your stack is deep, they are costly.
-;;
-
-(gdb-set-instance-buffer-rules 'gdb-stack-buffer
- 'gdb-stack-buffer-name
- 'gud-frames-mode)
-
-(def-gdb-auto-updated-buffer gdb-stack-buffer
- gdb-invalidate-frames
- "server where\n"
- gdb-info-frames-handler)
-
-(defun gdb-stack-buffer-name (instance)
- (save-excursion
- (set-buffer (process-buffer (gdb-instance-process instance)))
- (concat "*stack frames of "
- (gdb-instance-target-string instance) "*")))
-
-(defun gud-display-stack-buffer (instance)
- (interactive (list (gdb-needed-default-instance)))
- (gud-display-buffer
- (gdb-get-create-instance-buffer instance
- 'gdb-stack-buffer)))
-
-(defun gud-frame-stack-buffer (instance)
- (interactive (list (gdb-needed-default-instance)))
- (gud-frame-buffer
- (gdb-get-create-instance-buffer instance
- 'gdb-stack-buffer)))
-
-(defvar gud-frames-mode-map nil)
-(setq gud-frames-mode-map (make-keymap))
-(suppress-keymap gud-frames-mode-map)
-(define-key gud-frames-mode-map [mouse-2]
- 'gud-frames-select-by-mouse)
-
-(defun gud-frames-mode ()
- "Major mode for gud frames.
-
-\\{gud-frames-mode-map}"
- (setq major-mode 'gud-frames-mode)
- (setq mode-name "Frames")
- (setq buffer-read-only t)
- (use-local-map gud-frames-mode-map)
- (gdb-invalidate-frames gdb-buffer-instance))
-
-(defun gud-get-frame-number ()
- (save-excursion
- (let* ((pos (re-search-backward "^#\\([0-9]*\\)" nil t))
- (n (or (and pos
- (string-to-int
- (buffer-substring (match-beginning 1)
- (match-end 1))))
- 0)))
- n)))
-
-(defun gud-frames-select-by-mouse (e)
- (interactive "e")
- (let (selection)
- (save-excursion
- (set-buffer (window-buffer (posn-window (event-end e))))
- (save-excursion
- (goto-char (posn-point (event-end e)))
- (setq selection (gud-get-frame-number))))
- (select-window (posn-window (event-end e)))
- (save-excursion
- (set-buffer (gdb-get-instance-buffer (gdb-needed-default-instance) 'gud))
- (gud-call "fr %p" selection)
- (gud-display-frame))))
-
-
-;;
-;; Registers buffers
-;;
-
-(def-gdb-auto-updated-buffer gdb-registers-buffer
- gdb-invalidate-registers
- "server info registers\n"
- gdb-info-registers-handler)
-
-(gdb-set-instance-buffer-rules 'gdb-registers-buffer
- 'gdb-registers-buffer-name
- 'gud-registers-mode)
-
-(defvar gud-registers-mode-map nil)
-(setq gud-registers-mode-map (make-keymap))
-(suppress-keymap gud-registers-mode-map)
-
-(defun gud-registers-mode ()
- "Major mode for gud registers.
-
-\\{gud-registers-mode-map}"
- (setq major-mode 'gud-registers-mode)
- (setq mode-name "Registers")
- (setq buffer-read-only t)
- (use-local-map gud-registers-mode-map)
- (gdb-invalidate-registers gdb-buffer-instance))
-
-(defun gdb-registers-buffer-name (instance)
- (save-excursion
- (set-buffer (process-buffer (gdb-instance-process instance)))
- (concat "*registers of " (gdb-instance-target-string instance) "*")))
-
-(defun gud-display-registers-buffer (instance)
- (interactive (list (gdb-needed-default-instance)))
- (gud-display-buffer
- (gdb-get-create-instance-buffer instance
- 'gdb-registers-buffer)))
-
-(defun gud-frame-registers-buffer (instance)
- (interactive (list (gdb-needed-default-instance)))
- (gud-frame-buffer
- (gdb-get-create-instance-buffer instance
- 'gdb-registers-buffer)))
-
-
-
-;;;; Menu windows:
-
-
-;; MENU-LIST is ((option option option...) (option option ...)...)
-;;
-(defun gud-display-menu (menu-list)
- (setq fill-column (min 120 (- (window-width)
- (min 8 (window-width)))))
- (while menu-list
- (mapcar (function (lambda (x) (insert (symbol-name x) " "))) (car menu-list))
- (fill-paragraph nil)
- (insert "\n\n")
- (setq menu-list (cdr menu-list)))
- (goto-char (point-min))
- (while (re-search-forward "\\([^ \n]+\\)\\(\n\\| \\)" nil t)
- (put-text-property (match-beginning 1) (match-end 1)
- 'mouse-face 'highlight))
- (goto-char (point-min)))
-
-(defun gud-goto-menu (menu)
- (setq gud-menu-position menu)
- (let ((buffer-read-only nil))
- (delete-region (point-min) (point-max))
- (gud-display-menu menu)))
-
-(defun gud-menu-pick (event)
- "Choose an item from a gdb command menu."
- (interactive "e")
- (let (choice)
- (save-excursion
- (set-buffer (window-buffer (posn-window (event-start event))))
- (goto-char (posn-point (event-start event)))
- (let (beg end)
- (skip-chars-forward "^ \t\n")
- (setq end (point))
- (skip-chars-backward "^ \t\n")
- (setq beg (point))
- (setq choice (buffer-substring beg end))
- (message choice)
- (gud-invoke-menu (intern choice))))))
-
-(defun gud-invoke-menu (symbol)
- (let ((meaning (assoc symbol gud-menu-rules)))
- (cond
- ((and (consp meaning)
- (consp (car (cdr meaning))))
- (gud-goto-menu (car (cdr meaning))))
- (meaning (call-interactively (car (cdr meaning)))))))
-
-
-
-(gdb-set-instance-buffer-rules 'gdb-command-buffer
- 'gdb-command-buffer-name
- 'gud-command-mode)
-
-(defvar gud-command-mode-map nil)
-(setq gud-command-mode-map (make-keymap))
-(suppress-keymap gud-command-mode-map)
-(define-key gud-command-mode-map [mouse-2] 'gud-menu-pick)
-
-(defun gud-command-mode ()
- "Major mode for gud menu.
-
-\\{gud-command-mode-map}" (interactive) (setq major-mode 'gud-command-mode)
- (setq mode-name "Menu") (setq buffer-read-only t) (use-local-map
- gud-command-mode-map) (make-variable-buffer-local 'gud-menu-position)
- (if (not gud-menu-position) (gud-goto-menu gud-running-menu)))
-
-(defun gdb-command-buffer-name (instance)
- (save-excursion
- (set-buffer (process-buffer (gdb-instance-process instance)))
- (concat "*menu of " (gdb-instance-target-string instance) "*")))
-
-(defun gud-display-command-buffer (instance)
- (interactive (list (gdb-needed-default-instance)))
- (gud-display-buffer
- (gdb-get-create-instance-buffer instance
- 'gdb-command-buffer)
- 6))
-
-(defun gud-frame-command-buffer (instance)
- (interactive (list (gdb-needed-default-instance)))
- (gud-frame-buffer
- (gdb-get-create-instance-buffer instance
- 'gdb-command-buffer)))
-
-(defvar gud-selected-menu-titles ())
-(setq gud-selected-menu-titles
- '(RUNNING STACK DATA BREAKPOINTS FILES))
-
-(setq gud-running-menu
- (list
- '(RUNNING stack breakpoints files)
- '(target run next step continue finish stepi kill help-running)))
-
-(setq gud-stack-menu
- (list
- '(running STACK breakpoints files)
- '(up down frame backtrace return help-stack)))
-
-(setq gud-data-menu
- (list
- '(running stack DATA breakpoints files)
- '(whatis ptype print set display undisplay disassemble help-data)))
-
-(setq gud-breakpoints-menu
- (list
- '(running stack BREAKPOINTS files)
- '(awatch rwatch watch break delete enable disable condition ignore help-breakpoints)))
-
-(setq gud-files-menu
- (list
- '(running stack breakpoints FILES)
- '(file core-file help-files)
- '(exec-file load symbol-file add-symbol-file sharedlibrary)))
-
-(setq gud-menu-rules
- (list
- (list 'running gud-running-menu)
- (list 'RUNNING gud-running-menu)
- (list 'stack gud-stack-menu)
- (list 'STACK gud-stack-menu)
- (list 'data gud-data-menu)
- (list 'DATA gud-data-menu)
- (list 'breakpoints gud-breakpoints-menu)
- (list 'BREAKPOINTS gud-breakpoints-menu)
- (list 'files gud-files-menu)
- (list 'FILES gud-files-menu)
-
- (list 'target 'gud-target)
- (list 'kill 'gud-kill)
- (list 'stepi 'gud-stepi)
- (list 'step 'gud-step)
- (list 'next 'gud-next)
- (list 'finish 'gud-finish)
- (list 'continue 'gud-cont)
- (list 'run 'gud-run)
-
- (list 'backtrace 'gud-backtrace)
- (list 'frame 'gud-frame)
- (list 'down 'gud-down)
- (list 'up 'gud-up)
- (list 'return 'gud-return)
-
- (list 'file 'gud-file)
- (list 'core-file 'gud-core-file)
- (list 'cd 'gud-cd)
-
- (list 'exec-file 'gud-exec-file)
- (list 'load 'gud-load)
- (list 'symbol-file 'gud-symbol-file)
- (list 'add-symbol-file 'gud-add-symbol-file)
- (list 'sharedlibrary 'gud-sharedlibrary)
- ))
-
-
-
-
-(defun gdb-call-showing-gud (instance command)
- (gud-display-gud-buffer instance)
- (comint-input-sender (gdb-instance-process instance) command))
-
-(defvar gud-target-history ())
-
-(defun gud-temp-buffer-show (buf)
- (let ((ow (selected-window)))
- (unwind-protect
- (progn
- (pop-to-buffer buf)
-
- ;; This insertion works around a bug in emacs.
- ;; The bug is that all the empty space after a
- ;; highlighted word that terminates a buffer
- ;; gets highlighted. That's really ugly, so
- ;; make sure a highlighted word can't ever
- ;; terminate the buffer.
- (goto-char (point-max))
- (insert "\n")
- (goto-char (point-min))
-
- (if (< (window-height) 10)
- (enlarge-window (- 10 (window-height)))))
- (select-window ow))))
-
-(defun gud-target (instance command)
- (interactive
- (let* ((instance (gdb-needed-default-instance))
- (temp-buffer-show-function (function gud-temp-buffer-show))
- (target-name (completing-read (format "Target type: ")
- '(("remote")
- ("core")
- ("child")
- ("exec"))
- nil
- t
- nil
- 'gud-target-history)))
- (list instance
- (cond
- ((equal target-name "child") "run")
-
- ((equal target-name "core")
- (concat "target core "
- (read-file-name "core file: "
- nil
- "core"
- t)))
-
- ((equal target-name "exec")
- (concat "target exec "
- (read-file-name "exec file: "
- nil
- "a.out"
- t)))
-
- ((equal target-name "remote")
- (concat "target remote "
- (read-file-name "serial line for remote: "
- "/dev/"
- "ttya"
- t)))
-
- (t "echo No such target command!")))))
-
- (gud-display-gud-buffer instance)
- (apply comint-input-sender
- (list (gdb-instance-process instance) command)))
-
-(defun gud-backtrace ()
- (interactive)
- (let ((instance (gdb-needed-default-instance)))
- (gud-display-gud-buffer instance)
- (apply comint-input-sender
- (list (gdb-instance-process instance)
- "backtrace"))))
-
-(defun gud-frame ()
- (interactive)
- (let ((instance (gdb-needed-default-instance)))
- (apply comint-input-sender
- (list (gdb-instance-process instance)
- "frame"))))
-
-(defun gud-return (instance command)
- (interactive
- (let ((temp-buffer-show-function (function gud-temp-buffer-show)))
- (list (gdb-needed-default-instance)
- (concat "return " (read-string "Expression to return: ")))))
- (gud-display-gud-buffer instance)
- (apply comint-input-sender
- (list (gdb-instance-process instance) command)))
-
-
-(defun gud-file (instance command)
- (interactive
- (let ((temp-buffer-show-function (function gud-temp-buffer-show)))
- (list (gdb-needed-default-instance)
- (concat "file " (read-file-name "Executable to debug: "
- nil
- "a.out"
- t)))))
- (gud-display-gud-buffer instance)
- (apply comint-input-sender
- (list (gdb-instance-process instance) command)))
-
-(defun gud-core-file (instance command)
- (interactive
- (let ((temp-buffer-show-function (function gud-temp-buffer-show)))
- (list (gdb-needed-default-instance)
- (concat "core " (read-file-name "Core file to debug: "
- nil
- "core-file"
- t)))))
- (gud-display-gud-buffer instance)
- (apply comint-input-sender
- (list (gdb-instance-process instance) command)))
-
-(defun gud-cd (dir)
- (interactive "FChange GDB's default directory: ")
- (let ((instance (gdb-needed-default-instance)))
- (save-excursion
- (set-buffer (gdb-get-instance-buffer instance 'gud))
- (cd dir))
- (gud-display-gud-buffer instance)
- (apply comint-input-sender
- (list (gdb-instance-process instance)
- (concat "cd " dir)))))
-
-
-(defun gud-exec-file (instance command)
- (interactive
- (let ((temp-buffer-show-function (function gud-temp-buffer-show)))
- (list (gdb-needed-default-instance)
- (concat "exec-file " (read-file-name "Init memory from executable: "
- nil
- "a.out"
- t)))))
- (gud-display-gud-buffer instance)
- (apply comint-input-sender
- (list (gdb-instance-process instance) command)))
-
-(defun gud-load (instance command)
- (interactive
- (let ((temp-buffer-show-function (function gud-temp-buffer-show)))
- (list (gdb-needed-default-instance)
- (concat "load " (read-file-name "Dynamicly load from file: "
- nil
- "a.out"
- t)))))
- (gud-display-gud-buffer instance)
- (apply comint-input-sender
- (list (gdb-instance-process instance) command)))
-
-(defun gud-symbol-file (instance command)
- (interactive
- (let ((temp-buffer-show-function (function gud-temp-buffer-show)))
- (list (gdb-needed-default-instance)
- (concat "symbol-file " (read-file-name "Read symbol table from file: "
- nil
- "a.out"
- t)))))
- (gud-display-gud-buffer instance)
- (apply comint-input-sender
- (list (gdb-instance-process instance) command)))
-
-
-(defun gud-add-symbol-file (instance command)
- (interactive
- (let ((temp-buffer-show-function (function gud-temp-buffer-show)))
- (list (gdb-needed-default-instance)
- (concat "add-symbol-file "
- (read-file-name "Add symbols from file: "
- nil
- "a.out"
- t)))))
- (gud-display-gud-buffer instance)
- (apply comint-input-sender
- (list (gdb-instance-process instance) command)))
-
-
-(defun gud-sharedlibrary (instance command)
- (interactive
- (let ((temp-buffer-show-function (function gud-temp-buffer-show)))
- (list (gdb-needed-default-instance)
- (concat "sharedlibrary "
- (read-string "Load symbols for files matching regexp: ")))))
- (gud-display-gud-buffer instance)
- (apply comint-input-sender
- (list (gdb-instance-process instance) command)))
-
-
-
-
-
-;;;; Window management
-
-
-;;; FIXME: This should only return true for buffers in the current instance
-(defun gud-protected-buffer-p (buffer)
- "Is BUFFER a buffer which we want to leave displayed?"
- (save-excursion
- (set-buffer buffer)
- (or gdb-buffer-type
- overlay-arrow-position)))
-
-;;; The way we abuse the dedicated-p flag is pretty gross, but seems
-;;; to do the right thing. Seeing as there is no way for Lisp code to
-;;; get at the use_time field of a window, I'm not sure there exists a
-;;; more elegant solution without writing C code.
-
-(defun gud-display-buffer (buf &optional size)
- (let ((must-split nil)
- (answer nil))
- (unwind-protect
- (progn
- (walk-windows
- '(lambda (win)
- (if (gud-protected-buffer-p (window-buffer win))
- (set-window-dedicated-p win t))))
- (setq answer (get-buffer-window buf))
- (if (not answer)
- (let ((window (get-lru-window)))
- (if window
- (progn
- (set-window-buffer window buf)
- (setq answer window))
- (setq must-split t)))))
- (walk-windows
- '(lambda (win)
- (if (gud-protected-buffer-p (window-buffer win))
- (set-window-dedicated-p win nil)))))
- (if must-split
- (let* ((largest (get-largest-window))
- (cur-size (window-height largest))
- (new-size (and size (< size cur-size) (- cur-size size))))
- (setq answer (split-window largest new-size))
- (set-window-buffer answer buf)))
- answer))
-
-(defun existing-source-window (buffer)
- (catch 'found
- (save-excursion
- (walk-windows
- (function
- (lambda (win)
- (if (and overlay-arrow-position
- (eq (window-buffer win)
- (marker-buffer overlay-arrow-position)))
- (progn
- (set-window-buffer win buffer)
- (throw 'found win))))))
- nil)))
-
-(defun gud-display-source-buffer (buffer)
- (or (existing-source-window buffer)
- (gud-display-buffer buffer)))
-
-(defun gud-frame-buffer (buf)
- (save-excursion
- (set-buffer buf)
- (make-frame)))
-
-
-
-;;; Shared keymap initialization:
-
-(defun make-windows-menu (map)
- (define-key map [menu-bar displays]
- (cons "GDB-Windows" (make-sparse-keymap "GDB-Windows")))
- (define-key map [menu-bar displays gdb]
- '("Gdb" . gud-display-gud-buffer))
- (define-key map [menu-bar displays registers]
- '("Registers" . gud-display-registers-buffer))
- (define-key map [menu-bar displays frames]
- '("Stack" . gud-display-stack-buffer))
- (define-key map [menu-bar displays breakpoints]
- '("Breakpoints" . gud-display-breakpoints-buffer))
- (define-key map [menu-bar displays commands]
- '("Commands" . gud-display-command-buffer)))
-
-(defun gud-display-gud-buffer (instance)
- (interactive (list (gdb-needed-default-instance)))
- (gud-display-buffer
- (gdb-get-create-instance-buffer instance 'gud)))
-
-(make-windows-menu gud-breakpoints-mode-map)
-(make-windows-menu gud-frames-mode-map)
-(make-windows-menu gud-registers-mode-map)
-
-
-
-(defun make-frames-menu (map)
- (define-key map [menu-bar frames]
- (cons "GDB-Frames" (make-sparse-keymap "GDB-Frames")))
- (define-key map [menu-bar frames gdb]
- '("Gdb" . gud-frame-gud-buffer))
- (define-key map [menu-bar frames registers]
- '("Registers" . gud-frame-registers-buffer))
- (define-key map [menu-bar frames frames]
- '("Stack" . gud-frame-stack-buffer))
- (define-key map [menu-bar frames breakpoints]
- '("Breakpoints" . gud-frame-breakpoints-buffer))
- (define-key map [menu-bar displays commands]
- '("Commands" . gud-display-command-buffer)))
-
-(defun gud-frame-gud-buffer (instance)
- (interactive (list (gdb-needed-default-instance)))
- (gud-frame-buffer
- (gdb-get-create-instance-buffer instance 'gud)))
-
-(make-frames-menu gud-breakpoints-mode-map)
-(make-frames-menu gud-frames-mode-map)
-(make-frames-menu gud-registers-mode-map)
-
-
-(defun gud-gdb-find-file (f)
- (find-file-noselect f))
-
-;;;###autoload
-(defun gdb (command-line)
- "Run gdb on program FILE in buffer *gud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger."
- (interactive
- (list (read-from-minibuffer "Run gdb (like this): "
- (if (consp gud-gdb-history)
- (car gud-gdb-history)
- "gdb ")
- nil nil
- '(gud-gdb-history . 1))))
- (gud-overload-functions
- '((gud-massage-args . gud-gdb-massage-args)
- (gud-marker-filter . gud-gdb-marker-filter)
- (gud-find-file . gud-gdb-find-file)
- ))
-
- (let* ((words (gud-chop-words command-line))
- (program (car words))
- (file-word (let ((w (cdr words)))
- (while (and w (= ?- (aref (car w) 0)))
- (setq w (cdr w)))
- (car w)))
- (args (delq file-word (cdr words)))
- (file (expand-file-name file-word))
- (filepart (file-name-nondirectory file))
- (buffer-name (concat "*gud-" filepart "*")))
- (setq gdb-first-time (not (get-buffer-process buffer-name))))
-
- (gud-common-init command-line)
-
- (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.")
- (gud-def gud-tbreak "tbreak %f:%l" "\C-t" "Set breakpoint at current line.")
- (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
- (gud-def gud-kill "kill" nil "Kill the program.")
- (gud-def gud-run "run" nil "Run the program.")
- (gud-def gud-stepi "stepi %p" "\C-i" "Step one instruction with display.")
- (gud-def gud-step "step %p" "\C-s" "Step one source line with display.")
- (gud-def gud-next "next %p" "\C-n" "Step one line (skip functions).")
- (gud-def gud-finish "finish" "\C-f" "Finish executing current function.")
- (gud-def gud-cont "cont" "\C-r" "Continue with display.")
- (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
- (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
- (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.")
-
- (setq comint-prompt-regexp "^(.*gdb[+]?) *")
- (setq comint-input-sender 'gdb-send)
- (run-hooks 'gdb-mode-hook)
- (let ((instance
- (make-gdb-instance (get-buffer-process (current-buffer)))
- ))
- (if gdb-first-time (gdb-clear-inferior-io instance)))
- )
-
-
-;; ======================================================================
-;; sdb functions
-
-;;; History of argument lists passed to sdb.
-(defvar gud-sdb-history nil)
-
-(defvar gud-sdb-needs-tags (not (file-exists-p "/var"))
- "If nil, we're on a System V Release 4 and don't need the tags hack.")
-
-(defvar gud-sdb-lastfile nil)
-
-(defun gud-sdb-massage-args (file args)
- (cons file args))
-
-(defun gud-sdb-marker-filter (string)
- (cond
- ;; System V Release 3.2 uses this format
- ((string-match "\\(^0x\\w* in \\|^\\|\n\\)\\([^:\n]*\\):\\([0-9]*\\):.*\n"
- string)
- (setq gud-last-frame
- (cons
- (substring string (match-beginning 2) (match-end 2))
- (string-to-int
- (substring string (match-beginning 3) (match-end 3))))))
- ;; System V Release 4.0
- ((string-match "^\\(BREAKPOINT\\|STEPPED\\) process [0-9]+ function [^ ]+ in \\(.+\\)\n"
- string)
- (setq gud-sdb-lastfile
- (substring string (match-beginning 2) (match-end 2))))
- ((and gud-sdb-lastfile (string-match "^\\([0-9]+\\):" string))
- (setq gud-last-frame
- (cons
- gud-sdb-lastfile
- (string-to-int
- (substring string (match-beginning 1) (match-end 1))))))
- (t
- (setq gud-sdb-lastfile nil)))
- string)
-
-(defun gud-sdb-find-file (f)
- (if gud-sdb-needs-tags
- (find-tag-noselect f)
- (find-file-noselect f)))
-
-;;;###autoload
-(defun sdb (command-line)
- "Run sdb on program FILE in buffer *gud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger."
- (interactive
- (list (read-from-minibuffer "Run sdb (like this): "
- (if (consp gud-sdb-history)
- (car gud-sdb-history)
- "sdb ")
- nil nil
- '(gud-sdb-history . 1))))
- (if (and gud-sdb-needs-tags
- (not (and (boundp 'tags-file-name) (file-exists-p tags-file-name))))
- (error "The sdb support requires a valid tags table to work."))
- (gud-overload-functions '((gud-massage-args . gud-sdb-massage-args)
- (gud-marker-filter . gud-sdb-marker-filter)
- (gud-find-file . gud-sdb-find-file)
- ))
-
- (gud-common-init command-line)
-
- (gud-def gud-break "%l b" "\C-b" "Set breakpoint at current line.")
- (gud-def gud-tbreak "%l c" "\C-t" "Set temporary breakpoint at current line.")
- (gud-def gud-remove "%l d" "\C-d" "Remove breakpoint at current line")
- (gud-def gud-step "s %p" "\C-s" "Step one source line with display.")
- (gud-def gud-stepi "i %p" "\C-i" "Step one instruction with display.")
- (gud-def gud-next "S %p" "\C-n" "Step one line (skip functions).")
- (gud-def gud-cont "c" "\C-r" "Continue with display.")
- (gud-def gud-print "%e/" "\C-p" "Evaluate C expression at point.")
-
- (setq comint-prompt-regexp "\\(^\\|\n\\)\\*")
- (run-hooks 'sdb-mode-hook)
- )
-
-;; ======================================================================
-;; dbx functions
-
-;;; History of argument lists passed to dbx.
-(defvar gud-dbx-history nil)
-
-(defun gud-dbx-massage-args (file args)
- (cons file args))
-
-(defun gud-dbx-marker-filter (string)
- (if (or (string-match
- "stopped in .* at line \\([0-9]*\\) in file \"\\([^\"]*\\)\""
- string)
- (string-match
- "signal .* in .* at line \\([0-9]*\\) in file \"\\([^\"]*\\)\""
- string))
- (setq gud-last-frame
- (cons
- (substring string (match-beginning 2) (match-end 2))
- (string-to-int
- (substring string (match-beginning 1) (match-end 1))))))
- string)
-
-(defun gud-dbx-find-file (f)
- (find-file-noselect f))
-
-;;;###autoload
-(defun dbx (command-line)
- "Run dbx on program FILE in buffer *gud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger."
- (interactive
- (list (read-from-minibuffer "Run dbx (like this): "
- (if (consp gud-dbx-history)
- (car gud-dbx-history)
- "dbx ")
- nil nil
- '(gud-dbx-history . 1))))
- (gud-overload-functions '((gud-massage-args . gud-dbx-massage-args)
- (gud-marker-filter . gud-dbx-marker-filter)
- (gud-find-file . gud-dbx-find-file)
- ))
-
- (gud-common-init command-line)
-
- (gud-def gud-break "file \"%d%f\"\nstop at %l"
- "\C-b" "Set breakpoint at current line.")
-;; (gud-def gud-break "stop at \"%f\":%l"
-;; "\C-b" "Set breakpoint at current line.")
- (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
- (gud-def gud-step "step %p" "\C-s" "Step one line with display.")
- (gud-def gud-stepi "stepi %p" "\C-i" "Step one instruction with display.")
- (gud-def gud-next "next %p" "\C-n" "Step one line (skip functions).")
- (gud-def gud-cont "cont" "\C-r" "Continue with display.")
- (gud-def gud-up "up %p" "<" "Up (numeric arg) stack frames.")
- (gud-def gud-down "down %p" ">" "Down (numeric arg) stack frames.")
- (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.")
-
- (setq comint-prompt-regexp "^[^)]*dbx) *")
- (run-hooks 'dbx-mode-hook)
- )
-
-;; ======================================================================
-;; xdb (HP PARISC debugger) functions
-
-;;; History of argument lists passed to xdb.
-(defvar gud-xdb-history nil)
-
-(defvar gud-xdb-directories nil
- "*A list of directories that xdb should search for source code.
-If nil, only source files in the program directory
-will be known to xdb.
-
-The file names should be absolute, or relative to the directory
-containing the executable being debugged.")
-
-(defun gud-xdb-massage-args (file args)
- (nconc (let ((directories gud-xdb-directories)
- (result nil))
- (while directories
- (setq result (cons (car directories) (cons "-d" result)))
- (setq directories (cdr directories)))
- (nreverse (cons file result)))
- args))
-
-(defun gud-xdb-file-name (f)
- "Transform a relative pathname to a full pathname in xdb mode"
- (let ((result nil))
- (if (file-exists-p f)
- (setq result (expand-file-name f))
- (let ((directories gud-xdb-directories))
- (while directories
- (let ((path (concat (car directories) "/" f)))
- (if (file-exists-p path)
- (setq result (expand-file-name path)
- directories nil)))
- (setq directories (cdr directories)))))
- result))
-
-;; xdb does not print the lines all at once, so we have to accumulate them
-(defvar gud-xdb-accumulation "")
-
-(defun gud-xdb-marker-filter (string)
- (let (result)
- (if (or (string-match comint-prompt-regexp string)
- (string-match ".*\012" string))
- (setq result (concat gud-xdb-accumulation string)
- gud-xdb-accumulation "")
- (setq gud-xdb-accumulation (concat gud-xdb-accumulation string)))
- (if result
- (if (or (string-match "\\([^\n \t:]+\\): [^:]+: \\([0-9]+\\):" result)
- (string-match "[^: \t]+:[ \t]+\\([^:]+\\): [^:]+: \\([0-9]+\\):"
- result))
- (let ((line (string-to-int
- (substring result (match-beginning 2) (match-end 2))))
- (file (gud-xdb-file-name
- (substring result (match-beginning 1) (match-end 1)))))
- (if file
- (setq gud-last-frame (cons file line))))))
- (or result "")))
-
-(defun gud-xdb-find-file (f)
- (let ((realf (gud-xdb-file-name f)))
- (if realf (find-file-noselect realf))))
-
-;;;###autoload
-(defun xdb (command-line)
- "Run xdb on program FILE in buffer *gud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger.
-
-You can set the variable 'gud-xdb-directories' to a list of program source
-directories if your program contains sources from more than one directory."
- (interactive
- (list (read-from-minibuffer "Run xdb (like this): "
- (if (consp gud-xdb-history)
- (car gud-xdb-history)
- "xdb ")
- nil nil
- '(gud-xdb-history . 1))))
- (gud-overload-functions '((gud-massage-args . gud-xdb-massage-args)
- (gud-marker-filter . gud-xdb-marker-filter)
- (gud-find-file . gud-xdb-find-file)))
-
- (gud-common-init command-line)
-
- (gud-def gud-break "b %f:%l" "\C-b" "Set breakpoint at current line.")
- (gud-def gud-tbreak "b %f:%l\\t" "\C-t"
- "Set temporary breakpoint at current line.")
- (gud-def gud-remove "db" "\C-d" "Remove breakpoint at current line")
- (gud-def gud-step "s %p" "\C-s" "Step one line with display.")
- (gud-def gud-next "S %p" "\C-n" "Step one line (skip functions).")
- (gud-def gud-cont "c" "\C-r" "Continue with display.")
- (gud-def gud-up "up %p" "<" "Up (numeric arg) stack frames.")
- (gud-def gud-down "down %p" ">" "Down (numeric arg) stack frames.")
- (gud-def gud-finish "bu\\t" "\C-f" "Finish executing current function.")
- (gud-def gud-print "p %e" "\C-p" "Evaluate C expression at point.")
-
- (setq comint-prompt-regexp "^>")
- (make-local-variable 'gud-xdb-accumulation)
- (setq gud-xdb-accumulation "")
- (run-hooks 'xdb-mode-hook))
-
-;; ======================================================================
-;; perldb functions
-
-;;; History of argument lists passed to perldb.
-(defvar gud-perldb-history nil)
-
-(defun gud-perldb-massage-args (file args)
- (cons "-d" (cons file (cons "-emacs" args))))
-
-;; There's no guarantee that Emacs will hand the filter the entire
-;; marker at once; it could be broken up across several strings. We
-;; might even receive a big chunk with several markers in it. If we
-;; receive a chunk of text which looks like it might contain the
-;; beginning of a marker, we save it here between calls to the
-;; filter.
-(defvar gud-perldb-marker-acc "")
-
-(defun gud-perldb-marker-filter (string)
- (save-match-data
- (setq gud-perldb-marker-acc (concat gud-perldb-marker-acc string))
- (let ((output ""))
-
- ;; Process all the complete markers in this chunk.
- (while (string-match "^\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
- gud-perldb-marker-acc)
- (setq
-
- ;; Extract the frame position from the marker.
- gud-last-frame
- (cons (substring gud-perldb-marker-acc (match-beginning 1) (match-end 1))
- (string-to-int (substring gud-perldb-marker-acc
- (match-beginning 2)
- (match-end 2))))
-
- ;; Append any text before the marker to the output we're going
- ;; to return - we don't include the marker in this text.
- output (concat output
- (substring gud-perldb-marker-acc 0 (match-beginning 0)))
-
- ;; Set the accumulator to the remaining text.
- gud-perldb-marker-acc (substring gud-perldb-marker-acc (match-end 0))))
-
- ;; Does the remaining text look like it might end with the
- ;; beginning of another marker? If it does, then keep it in
- ;; gud-perldb-marker-acc until we receive the rest of it. Since we
- ;; know the full marker regexp above failed, it's pretty simple to
- ;; test for marker starts.
- (if (string-match "^\032.*\\'" gud-perldb-marker-acc)
- (progn
- ;; Everything before the potential marker start can be output.
- (setq output (concat output (substring gud-perldb-marker-acc
- 0 (match-beginning 0))))
-
- ;; Everything after, we save, to combine with later input.
- (setq gud-perldb-marker-acc
- (substring gud-perldb-marker-acc (match-beginning 0))))
-
- (setq output (concat output gud-perldb-marker-acc)
- gud-perldb-marker-acc ""))
-
- output)))
-
-(defun gud-perldb-find-file (f)
- (find-file-noselect f))
-
-;;;###autoload
-(defun perldb (command-line)
- "Run perldb on program FILE in buffer *gud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger."
- (interactive
- (list (read-from-minibuffer "Run perldb (like this): "
- (if (consp gud-perldb-history)
- (car gud-perldb-history)
- "perl ")
- nil nil
- '(gud-perldb-history . 1))))
- (gud-overload-functions '((gud-massage-args . gud-perldb-massage-args)
- (gud-marker-filter . gud-perldb-marker-filter)
- (gud-find-file . gud-perldb-find-file)
- ))
-
- (gud-common-init command-line)
-
- (gud-def gud-break "b %l" "\C-b" "Set breakpoint at current line.")
- (gud-def gud-remove "d %l" "\C-d" "Remove breakpoint at current line")
- (gud-def gud-step "s" "\C-s" "Step one source line with display.")
- (gud-def gud-next "n" "\C-n" "Step one line (skip functions).")
- (gud-def gud-cont "c" "\C-r" "Continue with display.")
-; (gud-def gud-finish "finish" "\C-f" "Finish executing current function.")
-; (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
-; (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
- (gud-def gud-print "%e" "\C-p" "Evaluate perl expression at point.")
-
- (setq comint-prompt-regexp "^ DB<[0-9]+> ")
- (run-hooks 'perldb-mode-hook)
- )
-
-;;
-;; End of debugger-specific information
-;;
-
-
-;;; When we send a command to the debugger via gud-call, it's annoying
-;;; to see the command and the new prompt inserted into the debugger's
-;;; buffer; we have other ways of knowing the command has completed.
-;;;
-;;; If the buffer looks like this:
-;;; --------------------
-;;; (gdb) set args foo bar
-;;; (gdb) -!-
-;;; --------------------
-;;; (the -!- marks the location of point), and we type `C-x SPC' in a
-;;; source file to set a breakpoint, we want the buffer to end up like
-;;; this:
-;;; --------------------
-;;; (gdb) set args foo bar
-;;; Breakpoint 1 at 0x92: file make-docfile.c, line 49.
-;;; (gdb) -!-
-;;; --------------------
-;;; Essentially, the old prompt is deleted, and the command's output
-;;; and the new prompt take its place.
-;;;
-;;; Not echoing the command is easy enough; you send it directly using
-;;; comint-input-sender, and it never enters the buffer. However,
-;;; getting rid of the old prompt is trickier; you don't want to do it
-;;; when you send the command, since that will result in an annoying
-;;; flicker as the prompt is deleted, redisplay occurs while Emacs
-;;; waits for a response from the debugger, and the new prompt is
-;;; inserted. Instead, we'll wait until we actually get some output
-;;; from the subprocess before we delete the prompt. If the command
-;;; produced no output other than a new prompt, that prompt will most
-;;; likely be in the first chunk of output received, so we will delete
-;;; the prompt and then replace it with an identical one. If the
-;;; command produces output, the prompt is moving anyway, so the
-;;; flicker won't be annoying.
-;;;
-;;; So - when we want to delete the prompt upon receipt of the next
-;;; chunk of debugger output, we position gud-delete-prompt-marker at
-;;; the start of the prompt; the process filter will notice this, and
-;;; delete all text between it and the process output marker. If
-;;; gud-delete-prompt-marker points nowhere, we leave the current
-;;; prompt alone.
-(defvar gud-delete-prompt-marker nil)
-
-
-(defvar gdbish-comint-mode-map (copy-keymap comint-mode-map))
-(define-key gdbish-comint-mode-map "\C-c\M-\C-r" 'gud-display-registers-buffer)
-(define-key gdbish-comint-mode-map "\C-c\M-\C-f" 'gud-display-stack-buffer)
-(define-key gdbish-comint-mode-map "\C-c\M-\C-b" 'gud-display-breakpoints-buffer)
-
-(make-windows-menu gdbish-comint-mode-map)
-(make-frames-menu gdbish-comint-mode-map)
-
-(defun gud-mode ()
- "Major mode for interacting with an inferior debugger process.
-
- You start it up with one of the commands M-x gdb, M-x sdb, M-x dbx,
-or M-x xdb. Each entry point finishes by executing a hook; `gdb-mode-hook',
-`sdb-mode-hook', `dbx-mode-hook' or `xdb-mode-hook' respectively.
-
-After startup, the following commands are available in both the GUD
-interaction buffer and any source buffer GUD visits due to a breakpoint stop
-or step operation:
-
-\\[gud-break] sets a breakpoint at the current file and line. In the
-GUD buffer, the current file and line are those of the last breakpoint or
-step. In a source buffer, they are the buffer's file and current line.
-
-\\[gud-remove] removes breakpoints on the current file and line.
-
-\\[gud-refresh] displays in the source window the last line referred to
-in the gud buffer.
-
-\\[gud-step], \\[gud-next], and \\[gud-stepi] do a step-one-line,
-step-one-line (not entering function calls), and step-one-instruction
-and then update the source window with the current file and position.
-\\[gud-cont] continues execution.
-
-\\[gud-print] tries to find the largest C lvalue or function-call expression
-around point, and sends it to the debugger for value display.
-
-The above commands are common to all supported debuggers except xdb which
-does not support stepping instructions.
-
-Under gdb, sdb and xdb, \\[gud-tbreak] behaves exactly like \\[gud-break],
-except that the breakpoint is temporary; that is, it is removed when
-execution stops on it.
-
-Under gdb, dbx, and xdb, \\[gud-up] pops up through an enclosing stack
-frame. \\[gud-down] drops back down through one.
-
-If you are using gdb or xdb, \\[gud-finish] runs execution to the return from
-the current function and stops.
-
-All the keystrokes above are accessible in the GUD buffer
-with the prefix C-c, and in all buffers through the prefix C-x C-a.
-
-All pre-defined functions for which the concept make sense repeat
-themselves the appropriate number of times if you give a prefix
-argument.
-
-You may use the `gud-def' macro in the initialization hook to define other
-commands.
-
-Other commands for interacting with the debugger process are inherited from
-comint mode, which see."
- (interactive)
- (comint-mode)
- (setq major-mode 'gud-mode)
- (setq mode-name "Debugger")
- (setq mode-line-process '(": %s"))
- (use-local-map (copy-keymap gdbish-comint-mode-map))
- (setq gud-last-frame nil)
- (make-local-variable 'comint-prompt-regexp)
- (make-local-variable 'gud-delete-prompt-marker)
- (setq gud-delete-prompt-marker (make-marker))
- (run-hooks 'gud-mode-hook)
-)
-
-(defvar gud-comint-buffer nil)
-
-;; Chop STRING into words separated by SPC or TAB and return a list of them.
-(defun gud-chop-words (string)
- (let ((i 0) (beg 0)
- (len (length string))
- (words nil))
- (while (< i len)
- (if (memq (aref string i) '(?\t ? ))
- (progn
- (setq words (cons (substring string beg i) words)
- beg (1+ i))
- (while (and (< beg len) (memq (aref string beg) '(?\t ? )))
- (setq beg (1+ beg)))
- (setq i (1+ beg)))
- (setq i (1+ i))))
- (if (< beg len)
- (setq words (cons (substring string beg) words)))
- (nreverse words)))
-
-(defvar gud-target-name "--unknown--"
- "The apparent name of the program being debugged in a gud buffer.
-For sure this the root string used in smashing together the gud
-buffer's name, even if that doesn't happen to be the name of a
-program.")
-
-;; Perform initializations common to all debuggers.
-(defun gud-common-init (command-line)
- (let* ((words (gud-chop-words command-line))
- (program (car words))
- (file-word (let ((w (cdr words)))
- (while (and w (= ?- (aref (car w) 0)))
- (setq w (cdr w)))
- (car w)))
- (args (delq file-word (cdr words)))
- (file (expand-file-name file-word))
- (filepart (file-name-nondirectory file))
- (buffer-name (concat "*gud-" filepart "*")))
- (switch-to-buffer buffer-name)
- (setq default-directory (file-name-directory file))
- (or (bolp) (newline))
- (insert "Current directory is " default-directory "\n")
- (let ((old-instance gdb-buffer-instance))
- (apply 'make-comint (concat "gud-" filepart) program nil
- (gud-massage-args file args))
- (gud-mode)
- (make-variable-buffer-local 'old-gdb-buffer-instance)
- (setq old-gdb-buffer-instance old-instance))
- (make-variable-buffer-local 'gud-target-name)
- (setq gud-target-name filepart))
- (set-process-filter (get-buffer-process (current-buffer)) 'gud-filter)
- (set-process-sentinel (get-buffer-process (current-buffer)) 'gud-sentinel)
- (gud-set-buffer)
- )
-
-(defun gud-set-buffer ()
- (cond ((eq major-mode 'gud-mode)
- (setq gud-comint-buffer (current-buffer)))))
-
-;; These functions are responsible for inserting output from your debugger
-;; into the buffer. The hard work is done by the method that is
-;; the value of gud-marker-filter.
-
-(defun gud-filter (proc string)
- ;; Here's where the actual buffer insertion is done
- (let ((inhibit-quit t))
- (save-excursion
- (set-buffer (process-buffer proc))
- (let (moving output-after-point)
- (save-excursion
- (goto-char (process-mark proc))
- ;; If we have been so requested, delete the debugger prompt.
- (if (marker-buffer gud-delete-prompt-marker)
- (progn
- (delete-region (point) gud-delete-prompt-marker)
- (set-marker gud-delete-prompt-marker nil)))
- (insert-before-markers (gud-marker-filter string))
- (setq moving (= (point) (process-mark proc)))
- (setq output-after-point (< (point) (process-mark proc)))
- ;; Check for a filename-and-line number.
- ;; Don't display the specified file
- ;; unless (1) point is at or after the position where output appears
- ;; and (2) this buffer is on the screen.
- (if (and gud-last-frame
- (not output-after-point)
- (get-buffer-window (current-buffer)))
- (gud-display-frame)))
- (if moving (goto-char (process-mark proc)))))))
-
-(defun gud-proc-died (proc)
- ;; Stop displaying an arrow in a source file.
- (setq overlay-arrow-position nil)
-
- ;; Kill the dummy process, so that C-x C-c won't worry about it.
- (save-excursion
- (set-buffer (process-buffer proc))
- (kill-process
- (get-buffer-process
- (gdb-get-instance-buffer gdb-buffer-instance 'gdb-inferior-io))))
- )
-
-(defun gud-sentinel (proc msg)
- (cond ((null (buffer-name (process-buffer proc)))
- ;; buffer killed
- (gud-proc-died proc)
- (set-process-buffer proc nil))
- ((memq (process-status proc) '(signal exit))
- (gud-proc-died proc)
-
- ;; Fix the mode line.
- (setq mode-line-process
- (concat ": "
- (symbol-name (process-status proc))))
- (let* ((obuf (current-buffer)))
- ;; save-excursion isn't the right thing if
- ;; process-buffer is current-buffer
- (unwind-protect
- (progn
- ;; Write something in *compilation* and hack its mode line,
- (set-buffer (process-buffer proc))
- ;; Force mode line redisplay soon
- (set-buffer-modified-p (buffer-modified-p))
- (if (eobp)
- (insert ?\n mode-name " " msg)
- (save-excursion
- (goto-char (point-max))
- (insert ?\n mode-name " " msg)))
- ;; If buffer and mode line will show that the process
- ;; is dead, we can delete it now. Otherwise it
- ;; will stay around until M-x list-processes.
- (delete-process proc))
- ;; Restore old buffer, but don't restore old point
- ;; if obuf is the gud buffer.
- (set-buffer obuf))))))
-
-(defun gud-display-frame ()
- "Find and obey the last filename-and-line marker from the debugger.
-Obeying it means displaying in another window the specified file and line."
- (interactive)
- (if gud-last-frame
- (progn
-; (gud-set-buffer)
- (gud-display-line (car gud-last-frame) (cdr gud-last-frame))
- (setq gud-last-last-frame gud-last-frame
- gud-last-frame nil))))
-
-;; Make sure the file named TRUE-FILE is in a buffer that appears on the screen
-;; and that its line LINE is visible.
-;; Put the overlay-arrow on the line LINE in that buffer.
-;; Most of the trickiness in here comes from wanting to preserve the current
-;; region-restriction if that's possible. We use an explicit display-buffer
-;; to get around the fact that this is called inside a save-excursion.
-
-(defun gud-display-line (true-file line)
- (let* ((buffer (gud-find-file true-file))
- (window (gud-display-source-buffer buffer))
- (pos))
- (if (not window)
- (error "foo bar baz"))
-;;; (if (equal buffer (current-buffer))
-;;; nil
-;;; (setq buffer-read-only nil))
- (save-excursion
-;;; (setq buffer-read-only t)
- (set-buffer buffer)
- (save-restriction
- (widen)
- (goto-line line)
- (setq pos (point))
- (setq overlay-arrow-string "=>")
- (or overlay-arrow-position
- (setq overlay-arrow-position (make-marker)))
- (set-marker overlay-arrow-position (point) (current-buffer)))
- (cond ((or (< pos (point-min)) (> pos (point-max)))
- (widen)
- (goto-char pos))))
- (set-window-point window overlay-arrow-position)))
-
-;;; The gud-call function must do the right thing whether its invoking
-;;; keystroke is from the GUD buffer itself (via major-mode binding)
-;;; or a C buffer. In the former case, we want to supply data from
-;;; gud-last-frame. Here's how we do it:
-
-(defun gud-format-command (str arg)
- (let ((insource (not (eq (current-buffer) gud-comint-buffer))))
- (if (string-match "\\(.*\\)%f\\(.*\\)" str)
- (setq str (concat
- (substring str (match-beginning 1) (match-end 1))
- (file-name-nondirectory (if insource
- (buffer-file-name)
- (car gud-last-frame)))
- (substring str (match-beginning 2) (match-end 2)))))
- (if (string-match "\\(.*\\)%d\\(.*\\)" str)
- (setq str (concat
- (substring str (match-beginning 1) (match-end 1))
- (file-name-directory (if insource
- (buffer-file-name)
- (car gud-last-frame)))
- (substring str (match-beginning 2) (match-end 2)))))
- (if (string-match "\\(.*\\)%l\\(.*\\)" str)
- (setq str (concat
- (substring str (match-beginning 1) (match-end 1))
- (if insource
- (save-excursion
- (beginning-of-line)
- (save-restriction (widen)
- (1+ (count-lines 1 (point)))))
- (cdr gud-last-frame))
- (substring str (match-beginning 2) (match-end 2)))))
- (if (string-match "\\(.*\\)%e\\(.*\\)" str)
- (setq str (concat
- (substring str (match-beginning 1) (match-end 1))
- (find-c-expr)
- (substring str (match-beginning 2) (match-end 2)))))
- (if (string-match "\\(.*\\)%a\\(.*\\)" str)
- (setq str (concat
- (substring str (match-beginning 1) (match-end 1))
- (gud-read-address)
- (substring str (match-beginning 2) (match-end 2)))))
- (if (string-match "\\(.*\\)%p\\(.*\\)" str)
- (setq str (concat
- (substring str (match-beginning 1) (match-end 1))
- (if arg (int-to-string arg) "")
- (substring str (match-beginning 2) (match-end 2)))))
- )
- str
- )
-
-(defun gud-read-address ()
- "Return a string containing the core-address found in the buffer at point."
- (save-excursion
- (let ((pt (point)) found begin)
- (setq found (if (search-backward "0x" (- pt 7) t) (point)))
- (cond
- (found (forward-char 2)
- (buffer-substring found
- (progn (re-search-forward "[^0-9a-f]")
- (forward-char -1)
- (point))))
- (t (setq begin (progn (re-search-backward "[^0-9]")
- (forward-char 1)
- (point)))
- (forward-char 1)
- (re-search-forward "[^0-9]")
- (forward-char -1)
- (buffer-substring begin (point)))))))
-
-(defun gud-call (fmt &optional arg)
- (let ((msg (gud-format-command fmt arg)))
- (message "Command: %s" msg)
- (sit-for 0)
- (gud-basic-call msg)))
-
-(defun gud-basic-call (command)
- "Invoke the debugger COMMAND displaying source in other window."
- (interactive)
- (gud-set-buffer)
- (let ((proc (get-buffer-process gud-comint-buffer)))
-
- ;; Arrange for the current prompt to get deleted.
- (save-excursion
- (set-buffer gud-comint-buffer)
- (goto-char (process-mark proc))
- (beginning-of-line)
- (if (looking-at comint-prompt-regexp)
- (set-marker gud-delete-prompt-marker (point)))
- (apply comint-input-sender (list proc command)))))
-
-(defun gud-refresh (&optional arg)
- "Fix up a possibly garbled display, and redraw the arrow."
- (interactive "P")
- (recenter arg)
- (or gud-last-frame (setq gud-last-frame gud-last-last-frame))
- (gud-display-frame))
-
-;;; Code for parsing expressions out of C code. The single entry point is
-;;; find-c-expr, which tries to return an lvalue expression from around point.
-;;;
-;;; The rest of this file is a hacked version of gdbsrc.el by
-;;; Debby Ayers <ayers@asc.slb.com>,
-;;; Rich Schaefer <schaefer@asc.slb.com> Schlumberger, Austin, Tx.
-
-(defun find-c-expr ()
- "Returns the C expr that surrounds point."
- (interactive)
- (save-excursion
- (let ((p) (expr) (test-expr))
- (setq p (point))
- (setq expr (expr-cur))
- (setq test-expr (expr-prev))
- (while (expr-compound test-expr expr)
- (setq expr (cons (car test-expr) (cdr expr)))
- (goto-char (car expr))
- (setq test-expr (expr-prev)))
- (goto-char p)
- (setq test-expr (expr-next))
- (while (expr-compound expr test-expr)
- (setq expr (cons (car expr) (cdr test-expr)))
- (setq test-expr (expr-next))
- )
- (buffer-substring (car expr) (cdr expr)))))
-
-(defun expr-cur ()
- "Returns the expr that point is in; point is set to beginning of expr.
-The expr is represented as a cons cell, where the car specifies the point in
-the current buffer that marks the beginning of the expr and the cdr specifies
-the character after the end of the expr."
- (let ((p (point)) (begin) (end))
- (expr-backward-sexp)
- (setq begin (point))
- (expr-forward-sexp)
- (setq end (point))
- (if (>= p end)
- (progn
- (setq begin p)
- (goto-char p)
- (expr-forward-sexp)
- (setq end (point))
- )
- )
- (goto-char begin)
- (cons begin end)))
-
-(defun expr-backward-sexp ()
- "Version of `backward-sexp' that catches errors."
- (condition-case nil
- (backward-sexp)
- (error t)))
-
-(defun expr-forward-sexp ()
- "Version of `forward-sexp' that catches errors."
- (condition-case nil
- (forward-sexp)
- (error t)))
-
-(defun expr-prev ()
- "Returns the previous expr, point is set to beginning of that expr.
-The expr is represented as a cons cell, where the car specifies the point in
-the current buffer that marks the beginning of the expr and the cdr specifies
-the character after the end of the expr"
- (let ((begin) (end))
- (expr-backward-sexp)
- (setq begin (point))
- (expr-forward-sexp)
- (setq end (point))
- (goto-char begin)
- (cons begin end)))
-
-(defun expr-next ()
- "Returns the following expr, point is set to beginning of that expr.
-The expr is represented as a cons cell, where the car specifies the point in
-the current buffer that marks the beginning of the expr and the cdr specifies
-the character after the end of the expr."
- (let ((begin) (end))
- (expr-forward-sexp)
- (expr-forward-sexp)
- (setq end (point))
- (expr-backward-sexp)
- (setq begin (point))
- (cons begin end)))
-
-(defun expr-compound-sep (span-start span-end)
- "Returns '.' for '->' & '.', returns ' ' for white space,
-returns '?' for other punctuation."
- (let ((result ? )
- (syntax))
- (while (< span-start span-end)
- (setq syntax (char-syntax (char-after span-start)))
- (cond
- ((= syntax ? ) t)
- ((= syntax ?.) (setq syntax (char-after span-start))
- (cond
- ((= syntax ?.) (setq result ?.))
- ((and (= syntax ?-) (= (char-after (+ span-start 1)) ?>))
- (setq result ?.)
- (setq span-start (+ span-start 1)))
- (t (setq span-start span-end)
- (setq result ??)))))
- (setq span-start (+ span-start 1)))
- result))
-
-(defun expr-compound (first second)
- "Non-nil if concatenating FIRST and SECOND makes a single C token.
-The two exprs are represented as a cons cells, where the car
-specifies the point in the current buffer that marks the beginning of the
-expr and the cdr specifies the character after the end of the expr.
-Link exprs of the form:
- Expr -> Expr
- Expr . Expr
- Expr (Expr)
- Expr [Expr]
- (Expr) Expr
- [Expr] Expr"
- (let ((span-start (cdr first))
- (span-end (car second))
- (syntax))
- (setq syntax (expr-compound-sep span-start span-end))
- (cond
- ((= (car first) (car second)) nil)
- ((= (cdr first) (cdr second)) nil)
- ((= syntax ?.) t)
- ((= syntax ? )
- (setq span-start (char-after (- span-start 1)))
- (setq span-end (char-after span-end))
- (cond
- ((= span-start ?) ) t )
- ((= span-start ?] ) t )
- ((= span-end ?( ) t )
- ((= span-end ?[ ) t )
- (t nil))
- )
- (t nil))))
-
-(provide 'gud)
-
-;;; gud.el ends here
diff --git a/contrib/gdb/gdb/gdbserver/low-linux.c b/contrib/gdb/gdb/gdbserver/low-linux.c
deleted file mode 100644
index 106021057a3c..000000000000
--- a/contrib/gdb/gdb/gdbserver/low-linux.c
+++ /dev/null
@@ -1,451 +0,0 @@
-/* Low level interface to ptrace, for the remote server for GDB.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include <sys/wait.h>
-#include "frame.h"
-#include "inferior.h"
-
-#include <stdio.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <sys/user.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#if 0
-#include <sgtty.h>
-#endif
-#include <fcntl.h>
-
-/***************Begin MY defs*********************/
-int quit_flag = 0;
-char registers[REGISTER_BYTES];
-
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-
-char buf2[MAX_REGISTER_RAW_SIZE];
-/***************End MY defs*********************/
-
-#include <sys/ptrace.h>
-
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
-#include <sys/reg.h>
-#endif
-
-extern char **environ;
-extern int errno;
-extern int inferior_pid;
-void quit (), perror_with_name ();
-int query ();
-
-/* Start an inferior process and returns its pid.
- ALLARGS is a vector of program-name and args.
- ENV is the environment vector to pass. */
-
-int
-create_inferior (program, allargs)
- char *program;
- char **allargs;
-{
- int pid;
-
- pid = fork ();
- if (pid < 0)
- perror_with_name ("fork");
-
- if (pid == 0)
- {
- ptrace (PTRACE_TRACEME, 0, 0, 0);
-
- execv (program, allargs);
-
- fprintf (stderr, "Cannot exec %s: %s.\n", program,
- errno < sys_nerr ? sys_errlist[errno] : "unknown error");
- fflush (stderr);
- _exit (0177);
- }
-
- return pid;
-}
-
-/* Kill the inferior process. Make us have no inferior. */
-
-void
-kill_inferior ()
-{
- if (inferior_pid == 0)
- return;
- ptrace (PTRACE_KILL, inferior_pid, 0, 0);
- wait (0);
- /*************inferior_died ();****VK**************/
-}
-
-/* Return nonzero if the given thread is still alive. */
-int
-mythread_alive (pid)
- int pid;
-{
- return 1;
-}
-
-/* Wait for process, returns status */
-
-unsigned char
-mywait (status)
- char *status;
-{
- int pid;
- union wait w;
-
- pid = wait (&w);
- if (pid != inferior_pid)
- perror_with_name ("wait");
-
- if (WIFEXITED (w))
- {
- fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
- *status = 'W';
- return ((unsigned char) WEXITSTATUS (w));
- }
- else if (!WIFSTOPPED (w))
- {
- fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
- *status = 'X';
- return ((unsigned char) WTERMSIG (w));
- }
-
- fetch_inferior_registers (0);
-
- *status = 'T';
- return ((unsigned char) WSTOPSIG (w));
-}
-
-/* Resume execution of the inferior process.
- If STEP is nonzero, single-step it.
- If SIGNAL is nonzero, give it that signal. */
-
-void
-myresume (step, signal)
- int step;
- int signal;
-{
- errno = 0;
- ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal);
- if (errno)
- perror_with_name ("ptrace");
-}
-
-
-#if !defined (offsetof)
-#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-#endif
-
-/* U_REGS_OFFSET is the offset of the registers within the u area. */
-#if !defined (U_REGS_OFFSET)
-#define U_REGS_OFFSET \
- ptrace (PT_READ_U, inferior_pid, \
- (PTRACE_ARG3_TYPE) (offsetof (struct user, u_ar0)), 0) \
- - KERNEL_U_ADDR
-#endif
-
-#ifndef TARGET_M68K
-/* this table must line up with REGISTER_NAMES in tm-i386v.h */
-/* symbols like 'EAX' come from <sys/reg.h> */
-static int regmap[] =
-{
- EAX, ECX, EDX, EBX,
- UESP, EBP, ESI, EDI,
- EIP, EFL, CS, SS,
- DS, ES, FS, GS,
-};
-
-int
-i386_register_u_addr (blockend, regnum)
- int blockend;
- int regnum;
-{
-#if 0
- /* this will be needed if fp registers are reinstated */
- /* for now, you can look at them with 'info float'
- * sys5 wont let you change them with ptrace anyway
- */
- if (regnum >= FP0_REGNUM && regnum <= FP7_REGNUM)
- {
- int ubase, fpstate;
- struct user u;
- ubase = blockend + 4 * (SS + 1) - KSTKSZ;
- fpstate = ubase + ((char *)&u.u_fpstate - (char *)&u);
- return (fpstate + 0x1c + 10 * (regnum - FP0_REGNUM));
- }
- else
-#endif
- return (blockend + 4 * regmap[regnum]);
-
-}
-#else /* TARGET_M68K */
-/* This table must line up with REGISTER_NAMES in tm-m68k.h */
-static int regmap[] =
-{
-#ifdef PT_D0
- PT_D0, PT_D1, PT_D2, PT_D3, PT_D4, PT_D5, PT_D6, PT_D7,
- PT_A0, PT_A1, PT_A2, PT_A3, PT_A4, PT_A5, PT_A6, PT_USP,
- PT_SR, PT_PC,
-#else
- 14, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15,
- 17, 18,
-#endif
-#ifdef PT_FP0
- PT_FP0, PT_FP1, PT_FP2, PT_FP3, PT_FP4, PT_FP5, PT_FP6, PT_FP7,
- PT_FPCR, PT_FPSR, PT_FPIAR
-#else
- 21, 24, 27, 30, 33, 36, 39, 42, 45, 46, 47
-#endif
-};
-
-/* BLOCKEND is the value of u.u_ar0, and points to the place where GS
- is stored. */
-
-int
-m68k_linux_register_u_addr (blockend, regnum)
- int blockend;
- int regnum;
-{
- return (blockend + 4 * regmap[regnum]);
-}
-#endif
-
-CORE_ADDR
-register_addr (regno, blockend)
- int regno;
- CORE_ADDR blockend;
-{
- CORE_ADDR addr;
-
- if (regno < 0 || regno >= ARCH_NUM_REGS)
- error ("Invalid register number %d.", regno);
-
- REGISTER_U_ADDR (addr, blockend, regno);
-
- return addr;
-}
-
-/* Fetch one register. */
-
-static void
-fetch_register (regno)
- int regno;
-{
- register unsigned int regaddr;
- register int i;
-
- /* Offset of registers within the u area. */
- unsigned int offset;
-
- offset = U_REGS_OFFSET;
-
- regaddr = register_addr (regno, offset);
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- errno = 0;
- *(int *) &registers[ regno * 4 + i] = ptrace (PTRACE_PEEKUSR, inferior_pid,
- (PTRACE_ARG3_TYPE) regaddr, 0);
- regaddr += sizeof (int);
- if (errno != 0)
- {
- /* Warning, not error, in case we are attached; sometimes the
- kernel doesn't let us at the registers. */
- char *err = strerror (errno);
- char *msg = alloca (strlen (err) + 128);
- sprintf (msg, "reading register %d: %s", regno, err);
- error (msg);
- goto error_exit;
- }
- }
- error_exit:;
-}
-
-/* Fetch all registers, or just one, from the child process. */
-
-void
-fetch_inferior_registers (regno)
- int regno;
-{
- if (regno == -1 || regno == 0)
- for (regno = 0; regno < NUM_REGS-NUM_FREGS; regno++)
- fetch_register (regno);
- else
- fetch_register (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 (regno)
- int regno;
-{
- register unsigned int regaddr;
- register int i;
- unsigned int offset = U_REGS_OFFSET;
-
- if (regno >= 0)
- {
-#if 0
- if (CANNOT_STORE_REGISTER (regno))
- return;
-#endif
- regaddr = register_addr (regno, offset);
- errno = 0;
-#if 0
- if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
- {
- scratch = *(int *) &registers[REGISTER_BYTE (regno)] | 0x3;
- ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- scratch, 0);
- if (errno != 0)
- {
- /* Error, even if attached. Failing to write these two
- registers is pretty serious. */
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- else
-#endif
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof(int))
- {
- errno = 0;
- ptrace (PTRACE_POKEUSR, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- *(int *) &registers[REGISTER_BYTE (regno) + i]);
- if (errno != 0)
- {
- /* Warning, not error, in case we are attached; sometimes the
- kernel doesn't let us at the registers. */
- char *err = strerror (errno);
- char *msg = alloca (strlen (err) + 128);
- sprintf (msg, "writing register %d: %s",
- regno, err);
- error (msg);
- return;
- }
- regaddr += sizeof(int);
- }
- }
- else
- for (regno = 0; regno < NUM_REGS-NUM_FREGS; regno++)
- store_inferior_registers (regno);
-}
-
-/* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory
- in the NEW_SUN_PTRACE case.
- It ought to be straightforward. But it appears that writing did
- not write the data that I specified. I cannot understand where
- it got the data that it actually did write. */
-
-/* Copy LEN bytes from inferior's memory starting at MEMADDR
- to debugger memory starting at MYADDR. */
-
-void
-read_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
-
- /* Read all the longwords */
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- buffer[i] = ptrace (PTRACE_PEEKTEXT, inferior_pid, addr, 0);
- }
-
- /* Copy appropriate bytes out of the buffer. */
- memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
- to inferior's memory at MEMADDR.
- On failure (cannot write the inferior)
- returns the value of errno. */
-
-int
-write_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
- extern int errno;
-
- /* Fill start and end extra bytes of buffer with existing memory data. */
-
- buffer[0] = ptrace (PTRACE_PEEKTEXT, inferior_pid, addr, 0);
-
- if (count > 1)
- {
- buffer[count - 1]
- = ptrace (PTRACE_PEEKTEXT, inferior_pid,
- addr + (count - 1) * sizeof (int), 0);
- }
-
- /* Copy data to be written over corresponding part of buffer */
-
- memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
-
- /* Write the entire buffer. */
-
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- errno = 0;
- ptrace (PTRACE_POKETEXT, inferior_pid, addr, buffer[i]);
- if (errno)
- return errno;
- }
-
- return 0;
-}
-
-void
-initialize ()
-{
- inferior_pid = 0;
-}
-
-int
-have_inferior_p ()
-{
- return inferior_pid != 0;
-}
diff --git a/contrib/gdb/gdb/gnu-nat.c b/contrib/gdb/gdb/gnu-nat.c
deleted file mode 100644
index e48b536aff4f..000000000000
--- a/contrib/gdb/gdb/gnu-nat.c
+++ /dev/null
@@ -1,3357 +0,0 @@
-/* Interface GDB to the GNU Hurd.
- Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
-
- Some code and ideas from m3-nat.c by Jukka Virtanen <jtv@hut.fi>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public 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 <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdio.h>
-#include "gdb_string.h"
-#include <sys/ptrace.h>
-
-#include <mach.h>
-#include <mach_error.h>
-#include <mach/exception.h>
-#include <mach/message.h>
-#include <mach/notify.h>
-#include <mach/vm_attributes.h>
-
-#include <hurd.h>
-#include <hurd/interrupt.h>
-#include <hurd/msg.h>
-#include <hurd/msg_request.h>
-#include <hurd/process.h>
-#include <hurd/process_request.h>
-#include <hurd/signal.h>
-#include <hurd/sigpreempt.h>
-
-#include <portinfo.h>
-
-#include "defs.h"
-#include "inferior.h"
-#include "symtab.h"
-#include "value.h"
-#include "language.h"
-#include "target.h"
-#include "gdb_wait.h"
-#include "gdbcmd.h"
-#include "gdbcore.h"
-#include "gdbthread.h"
-#include "gdb_assert.h"
-
-#include "gnu-nat.h"
-
-#include "exc_request_S.h"
-#include "notify_S.h"
-#include "process_reply_S.h"
-#include "msg_reply_S.h"
-#include "exc_request_U.h"
-#include "msg_U.h"
-
-static process_t proc_server = MACH_PORT_NULL;
-
-/* If we've sent a proc_wait_request to the proc server, the pid of the
- process we asked about. We can only ever have one outstanding. */
-int proc_wait_pid = 0;
-
-/* The number of wait requests we've sent, and expect replies from. */
-int proc_waits_pending = 0;
-
-int gnu_debug_flag = 0;
-
-/* Forward decls */
-
-extern struct target_ops gnu_ops;
-
-struct inf *make_inf ();
-void inf_clear_wait (struct inf *inf);
-void inf_cleanup (struct inf *inf);
-void inf_startup (struct inf *inf, int pid);
-int inf_update_suspends (struct inf *inf);
-void inf_set_pid (struct inf *inf, pid_t pid);
-void inf_validate_procs (struct inf *inf);
-void inf_steal_exc_ports (struct inf *inf);
-void inf_restore_exc_ports (struct inf *inf);
-struct proc *inf_tid_to_proc (struct inf *inf, int tid);
-inline void inf_set_threads_resume_sc (struct inf *inf,
- struct proc *run_thread,
- int run_others);
-inline int inf_set_threads_resume_sc_for_signal_thread (struct inf *inf);
-inline void inf_suspend (struct inf *inf);
-inline void inf_resume (struct inf *inf);
-void inf_set_step_thread (struct inf *inf, struct proc *proc);
-void inf_detach (struct inf *inf);
-void inf_attach (struct inf *inf, int pid);
-void inf_signal (struct inf *inf, enum target_signal sig);
-void inf_continue (struct inf *inf);
-
-#define inf_debug(_inf, msg, args...) \
- do { struct inf *__inf = (_inf); \
- debug ("{inf %d %p}: " msg, __inf->pid, __inf , ##args); } while (0)
-
-void proc_abort (struct proc *proc, int force);
-struct proc *make_proc (struct inf *inf, mach_port_t port, int tid);
-struct proc *_proc_free (struct proc *proc);
-int proc_update_sc (struct proc *proc);
-error_t proc_get_exception_port (struct proc *proc, mach_port_t * port);
-error_t proc_set_exception_port (struct proc *proc, mach_port_t port);
-static mach_port_t _proc_get_exc_port (struct proc *proc);
-void proc_steal_exc_port (struct proc *proc, mach_port_t exc_port);
-void proc_restore_exc_port (struct proc *proc);
-int proc_trace (struct proc *proc, int set);
-
-/* Evaluate RPC_EXPR in a scope with the variables MSGPORT and REFPORT bound
- to INF's msg port and task port respectively. If it has no msg port,
- EIEIO is returned. INF must refer to a running process! */
-#define INF_MSGPORT_RPC(inf, rpc_expr) \
- HURD_MSGPORT_RPC (proc_getmsgport (proc_server, inf->pid, &msgport), \
- (refport = inf->task->port, 0), 0, \
- msgport ? (rpc_expr) : EIEIO)
-
-/* Like INF_MSGPORT_RPC, but will also resume the signal thread to ensure
- there's someone around to deal with the RPC (and resuspend things
- afterwards). This effects INF's threads' resume_sc count. */
-#define INF_RESUME_MSGPORT_RPC(inf, rpc_expr) \
- (inf_set_threads_resume_sc_for_signal_thread (inf) \
- ? ({ error_t __e; \
- inf_resume (inf); \
- __e = INF_MSGPORT_RPC (inf, rpc_expr); \
- inf_suspend (inf); \
- __e; }) \
- : EIEIO)
-
-
-/* The state passed by an exception message. */
-struct exc_state
- {
- int exception; /* The exception code */
- int code, subcode;
- mach_port_t handler; /* The real exception port to handle this. */
- mach_port_t reply; /* The reply port from the exception call. */
- };
-
-/* The results of the last wait an inf did. */
-struct inf_wait
- {
- struct target_waitstatus status; /* The status returned to gdb. */
- struct exc_state exc; /* The exception that caused us to return. */
- struct proc *thread; /* The thread in question. */
- int suppress; /* Something trivial happened. */
- };
-
-/* The state of an inferior. */
-struct inf
- {
- /* Fields describing the current inferior. */
-
- struct proc *task; /* The mach task. */
- struct proc *threads; /* A linked list of all threads in TASK. */
-
- /* True if THREADS needn't be validated by querying the task. We assume that
- we and the task in question are the only ones frobbing the thread list,
- so as long as we don't let any code run, we don't have to worry about
- THREADS changing. */
- int threads_up_to_date;
-
- pid_t pid; /* The real system PID. */
-
- struct inf_wait wait; /* What to return from target_wait. */
-
- /* One thread proc in INF may be in `single-stepping mode'. This is it. */
- struct proc *step_thread;
-
- /* The thread we think is the signal thread. */
- struct proc *signal_thread;
-
- mach_port_t event_port; /* Where we receive various msgs. */
-
- /* True if we think at least one thread in the inferior could currently be
- running. */
- unsigned int running:1;
-
- /* True if the process has stopped (in the proc server sense). Note that
- since a proc server `stop' leaves the signal thread running, the inf can
- be RUNNING && STOPPED... */
- unsigned int stopped:1;
-
- /* True if the inferior has no message port. */
- unsigned int nomsg:1;
-
- /* True if the inferior is traced. */
- unsigned int traced:1;
-
- /* True if we shouldn't try waiting for the inferior, usually because we
- can't for some reason. */
- unsigned int no_wait:1;
-
- /* When starting a new inferior, we don't try to validate threads until all
- the proper execs have been done. This is a count of how many execs we
- expect to happen. */
- unsigned pending_execs;
-
- /* Fields describing global state */
-
- /* The task suspend count used when gdb has control. This is normally 1 to
- make things easier for us, but sometimes (like when attaching to vital
- system servers) it may be desirable to let the task continue to run
- (pausing individual threads as necessary). */
- int pause_sc;
-
- /* The task suspend count left when detaching from a task. */
- int detach_sc;
-
- /* The initial values used for the run_sc and pause_sc of newly discovered
- threads -- see the definition of those fields in struct proc. */
- int default_thread_run_sc;
- int default_thread_pause_sc;
- int default_thread_detach_sc;
-
- /* True if the process should be traced when started/attached. Newly
- started processes *must* be traced at first to exec them properly, but
- if this is false, tracing is turned off as soon it has done so. */
- int want_signals;
-
- /* True if exceptions from the inferior process should be trapped. This
- must be on to use breakpoints. */
- int want_exceptions;
- };
-
-
-int
-__proc_pid (struct proc *proc)
-{
- return proc->inf->pid;
-}
-
-
-/* Update PROC's real suspend count to match it's desired one. Returns true
- if we think PROC is now in a runnable state. */
-int
-proc_update_sc (struct proc *proc)
-{
- int running;
- int err = 0;
- int delta = proc->sc - proc->cur_sc;
-
- if (delta)
- proc_debug (proc, "sc: %d --> %d", proc->cur_sc, proc->sc);
-
- if (proc->sc == 0 && proc->state_changed)
- /* Since PROC may start running, we must write back any state changes. */
- {
- gdb_assert (proc_is_thread (proc));
- proc_debug (proc, "storing back changed thread state");
- err = thread_set_state (proc->port, THREAD_STATE_FLAVOR,
- (thread_state_t) &proc->state, THREAD_STATE_SIZE);
- if (!err)
- proc->state_changed = 0;
- }
-
- if (delta > 0)
- {
- while (delta-- > 0 && !err)
- {
- if (proc_is_task (proc))
- err = task_suspend (proc->port);
- else
- err = thread_suspend (proc->port);
- }
- }
- else
- {
- while (delta++ < 0 && !err)
- {
- if (proc_is_task (proc))
- err = task_resume (proc->port);
- else
- err = thread_resume (proc->port);
- }
- }
- if (!err)
- proc->cur_sc = proc->sc;
-
- /* If we got an error, then the task/thread has disappeared. */
- running = !err && proc->sc == 0;
-
- proc_debug (proc, "is %s", err ? "dead" : running ? "running" : "suspended");
- if (err)
- proc_debug (proc, "err = %s", strerror (err));
-
- if (running)
- {
- proc->aborted = 0;
- proc->state_valid = proc->state_changed = 0;
- proc->fetched_regs = 0;
- }
-
- return running;
-}
-
-
-/* Thread_abort is called on PROC if needed. PROC must be a thread proc.
- If PROC is deemed `precious', then nothing is done unless FORCE is true.
- In particular, a thread is precious if it's running (in which case forcing
- it includes suspending it first), or if it has an exception pending. */
-void
-proc_abort (struct proc *proc, int force)
-{
- gdb_assert (proc_is_thread (proc));
-
- if (!proc->aborted)
- {
- struct inf *inf = proc->inf;
- int running = (proc->cur_sc == 0 && inf->task->cur_sc == 0);
-
- if (running && force)
- {
- proc->sc = 1;
- inf_update_suspends (proc->inf);
- running = 0;
- warning ("Stopped %s.", proc_string (proc));
- }
- else if (proc == inf->wait.thread && inf->wait.exc.reply && !force)
- /* An exception is pending on PROC, which don't mess with. */
- running = 1;
-
- if (!running)
- /* We only abort the thread if it's not actually running. */
- {
- thread_abort (proc->port);
- proc_debug (proc, "aborted");
- proc->aborted = 1;
- }
- else
- proc_debug (proc, "not aborting");
- }
-}
-
-/* Make sure that the state field in PROC is up to date, and return a pointer
- to it, or 0 if something is wrong. If WILL_MODIFY is true, makes sure
- that the thread is stopped and aborted first, and sets the state_changed
- field in PROC to true. */
-thread_state_t
-proc_get_state (struct proc *proc, int will_modify)
-{
- int was_aborted = proc->aborted;
-
- proc_debug (proc, "updating state info%s",
- will_modify ? " (with intention to modify)" : "");
-
- proc_abort (proc, will_modify);
-
- if (!was_aborted && proc->aborted)
- /* PROC's state may have changed since we last fetched it. */
- proc->state_valid = 0;
-
- if (!proc->state_valid)
- {
- mach_msg_type_number_t state_size = THREAD_STATE_SIZE;
- error_t err =
- thread_get_state (proc->port, THREAD_STATE_FLAVOR,
- (thread_state_t) &proc->state, &state_size);
- proc_debug (proc, "getting thread state");
- proc->state_valid = !err;
- }
-
- if (proc->state_valid)
- {
- if (will_modify)
- proc->state_changed = 1;
- return (thread_state_t) &proc->state;
- }
- else
- return 0;
-}
-
-
-/* Set PORT to PROC's exception port. */
-error_t
-proc_get_exception_port (struct proc * proc, mach_port_t * port)
-{
- if (proc_is_task (proc))
- return task_get_exception_port (proc->port, port);
- else
- return thread_get_exception_port (proc->port, port);
-}
-
-/* Set PROC's exception port to PORT. */
-error_t
-proc_set_exception_port (struct proc * proc, mach_port_t port)
-{
- proc_debug (proc, "setting exception port: %d", port);
- if (proc_is_task (proc))
- return task_set_exception_port (proc->port, port);
- else
- return thread_set_exception_port (proc->port, port);
-}
-
-/* Get PROC's exception port, cleaning up a bit if proc has died. */
-static mach_port_t
-_proc_get_exc_port (struct proc *proc)
-{
- mach_port_t exc_port;
- error_t err = proc_get_exception_port (proc, &exc_port);
-
- if (err)
- /* PROC must be dead. */
- {
- if (proc->exc_port)
- mach_port_deallocate (mach_task_self (), proc->exc_port);
- proc->exc_port = MACH_PORT_NULL;
- if (proc->saved_exc_port)
- mach_port_deallocate (mach_task_self (), proc->saved_exc_port);
- proc->saved_exc_port = MACH_PORT_NULL;
- }
-
- return exc_port;
-}
-
-/* Replace PROC's exception port with EXC_PORT, unless it's already been
- done. Stash away any existing exception port so we can restore it later. */
-void
-proc_steal_exc_port (struct proc *proc, mach_port_t exc_port)
-{
- mach_port_t cur_exc_port = _proc_get_exc_port (proc);
-
- if (cur_exc_port)
- {
- error_t err = 0;
-
- proc_debug (proc, "inserting exception port: %d", exc_port);
-
- if (cur_exc_port != exc_port)
- /* Put in our exception port. */
- err = proc_set_exception_port (proc, exc_port);
-
- if (err || cur_exc_port == proc->exc_port)
- /* We previously set the exception port, and it's still set. So we
- just keep the old saved port which is what the proc set. */
- {
- if (cur_exc_port)
- mach_port_deallocate (mach_task_self (), cur_exc_port);
- }
- else
- /* Keep a copy of PROC's old exception port so it can be restored. */
- {
- if (proc->saved_exc_port)
- mach_port_deallocate (mach_task_self (), proc->saved_exc_port);
- proc->saved_exc_port = cur_exc_port;
- }
-
- proc_debug (proc, "saved exception port: %d", proc->saved_exc_port);
-
- if (!err)
- proc->exc_port = exc_port;
- else
- warning ("Error setting exception port for %s: %s",
- proc_string (proc), strerror (err));
- }
-}
-
-/* If we previously replaced PROC's exception port, put back what we
- found there at the time, unless *our* exception port has since been
- overwritten, in which case who knows what's going on. */
-void
-proc_restore_exc_port (struct proc *proc)
-{
- mach_port_t cur_exc_port = _proc_get_exc_port (proc);
-
- if (cur_exc_port)
- {
- error_t err = 0;
-
- proc_debug (proc, "restoring real exception port");
-
- if (proc->exc_port == cur_exc_port)
- /* Our's is still there. */
- err = proc_set_exception_port (proc, proc->saved_exc_port);
-
- if (proc->saved_exc_port)
- mach_port_deallocate (mach_task_self (), proc->saved_exc_port);
- proc->saved_exc_port = MACH_PORT_NULL;
-
- if (!err)
- proc->exc_port = MACH_PORT_NULL;
- else
- warning ("Error setting exception port for %s: %s",
- proc_string (proc), strerror (err));
- }
-}
-
-
-/* Turns hardware tracing in PROC on or off when SET is true or false,
- respectively. Returns true on success. */
-int
-proc_trace (struct proc *proc, int set)
-{
- thread_state_t state = proc_get_state (proc, 1);
-
- if (!state)
- return 0; /* the thread must be dead. */
-
- proc_debug (proc, "tracing %s", set ? "on" : "off");
-
- if (set)
- {
- /* XXX We don't get the exception unless the thread has its own
- exception port???? */
- if (proc->exc_port == MACH_PORT_NULL)
- proc_steal_exc_port (proc, proc->inf->event_port);
- THREAD_STATE_SET_TRACED (state);
- }
- else
- THREAD_STATE_CLEAR_TRACED (state);
-
- return 1;
-}
-
-
-/* A variable from which to assign new TIDs. */
-static int next_thread_id = 1;
-
-/* Returns a new proc structure with the given fields. Also adds a
- notification for PORT becoming dead to be sent to INF's notify port. */
-struct proc *
-make_proc (struct inf *inf, mach_port_t port, int tid)
-{
- error_t err;
- mach_port_t prev_port = MACH_PORT_NULL;
- struct proc *proc = xmalloc (sizeof (struct proc));
-
- proc->port = port;
- proc->tid = tid;
- proc->inf = inf;
- proc->next = 0;
- proc->saved_exc_port = MACH_PORT_NULL;
- proc->exc_port = MACH_PORT_NULL;
-
- proc->sc = 0;
- proc->cur_sc = 0;
-
- /* Note that these are all the values for threads; the task simply uses the
- corresponding field in INF directly. */
- proc->run_sc = inf->default_thread_run_sc;
- proc->pause_sc = inf->default_thread_pause_sc;
- proc->detach_sc = inf->default_thread_detach_sc;
- proc->resume_sc = proc->run_sc;
-
- proc->aborted = 0;
- proc->dead = 0;
- proc->state_valid = 0;
- proc->state_changed = 0;
-
- proc_debug (proc, "is new");
-
- /* Get notified when things die. */
- err =
- mach_port_request_notification (mach_task_self (), port,
- MACH_NOTIFY_DEAD_NAME, 1,
- inf->event_port,
- MACH_MSG_TYPE_MAKE_SEND_ONCE,
- &prev_port);
- if (err)
- warning ("Couldn't request notification for port %d: %s",
- port, strerror (err));
- else
- {
- proc_debug (proc, "notifications to: %d", inf->event_port);
- if (prev_port != MACH_PORT_NULL)
- mach_port_deallocate (mach_task_self (), prev_port);
- }
-
- if (inf->want_exceptions)
- {
- if (proc_is_task (proc))
- /* Make the task exception port point to us. */
- proc_steal_exc_port (proc, inf->event_port);
- else
- /* Just clear thread exception ports -- they default to the
- task one. */
- proc_steal_exc_port (proc, MACH_PORT_NULL);
- }
-
- return proc;
-}
-
-/* Frees PROC and any resources it uses, and returns the value of PROC's
- next field. */
-struct proc *
-_proc_free (struct proc *proc)
-{
- struct inf *inf = proc->inf;
- struct proc *next = proc->next;
-
- proc_debug (proc, "freeing...");
-
- if (proc == inf->step_thread)
- /* Turn off single stepping. */
- inf_set_step_thread (inf, 0);
- if (proc == inf->wait.thread)
- inf_clear_wait (inf);
- if (proc == inf->signal_thread)
- inf->signal_thread = 0;
-
- if (proc->port != MACH_PORT_NULL)
- {
- if (proc->exc_port != MACH_PORT_NULL)
- /* Restore the original exception port. */
- proc_restore_exc_port (proc);
- if (proc->cur_sc != 0)
- /* Resume the thread/task. */
- {
- proc->sc = 0;
- proc_update_sc (proc);
- }
- mach_port_deallocate (mach_task_self (), proc->port);
- }
-
- xfree (proc);
- return next;
-}
-
-
-struct inf *
-make_inf (void)
-{
- struct inf *inf = xmalloc (sizeof (struct inf));
-
- inf->task = 0;
- inf->threads = 0;
- inf->threads_up_to_date = 0;
- inf->pid = 0;
- inf->wait.status.kind = TARGET_WAITKIND_SPURIOUS;
- inf->wait.thread = 0;
- inf->wait.exc.handler = MACH_PORT_NULL;
- inf->wait.exc.reply = MACH_PORT_NULL;
- inf->step_thread = 0;
- inf->signal_thread = 0;
- inf->event_port = MACH_PORT_NULL;
- inf->running = 0;
- inf->stopped = 0;
- inf->nomsg = 1;
- inf->traced = 0;
- inf->no_wait = 0;
- inf->pending_execs = 0;
- inf->pause_sc = 1;
- inf->detach_sc = 0;
- inf->default_thread_run_sc = 0;
- inf->default_thread_pause_sc = 0;
- inf->default_thread_detach_sc = 0;
- inf->want_signals = 1; /* By default */
- inf->want_exceptions = 1; /* By default */
-
- return inf;
-}
-
-/* Clear INF's target wait status. */
-void
-inf_clear_wait (struct inf *inf)
-{
- inf_debug (inf, "clearing wait");
- inf->wait.status.kind = TARGET_WAITKIND_SPURIOUS;
- inf->wait.thread = 0;
- inf->wait.suppress = 0;
- if (inf->wait.exc.handler != MACH_PORT_NULL)
- {
- mach_port_deallocate (mach_task_self (), inf->wait.exc.handler);
- inf->wait.exc.handler = MACH_PORT_NULL;
- }
- if (inf->wait.exc.reply != MACH_PORT_NULL)
- {
- mach_port_deallocate (mach_task_self (), inf->wait.exc.reply);
- inf->wait.exc.reply = MACH_PORT_NULL;
- }
-}
-
-
-void
-inf_cleanup (struct inf *inf)
-{
- inf_debug (inf, "cleanup");
-
- inf_clear_wait (inf);
-
- inf_set_pid (inf, -1);
- inf->pid = 0;
- inf->running = 0;
- inf->stopped = 0;
- inf->nomsg = 1;
- inf->traced = 0;
- inf->no_wait = 0;
- inf->pending_execs = 0;
-
- if (inf->event_port)
- {
- mach_port_destroy (mach_task_self (), inf->event_port);
- inf->event_port = MACH_PORT_NULL;
- }
-}
-
-void
-inf_startup (struct inf *inf, int pid)
-{
- error_t err;
-
- inf_debug (inf, "startup: pid = %d", pid);
-
- inf_cleanup (inf);
-
- /* Make the port on which we receive all events. */
- err = mach_port_allocate (mach_task_self (),
- MACH_PORT_RIGHT_RECEIVE, &inf->event_port);
- if (err)
- error ("Error allocating event port: %s", strerror (err));
-
- /* Make a send right for it, so we can easily copy it for other people. */
- mach_port_insert_right (mach_task_self (), inf->event_port,
- inf->event_port, MACH_MSG_TYPE_MAKE_SEND);
- inf_set_pid (inf, pid);
-}
-
-
-/* Close current process, if any, and attach INF to process PORT. */
-void
-inf_set_pid (struct inf *inf, pid_t pid)
-{
- task_t task_port;
- struct proc *task = inf->task;
-
- inf_debug (inf, "setting pid: %d", pid);
-
- if (pid < 0)
- task_port = MACH_PORT_NULL;
- else
- {
- error_t err = proc_pid2task (proc_server, pid, &task_port);
- if (err)
- error ("Error getting task for pid %d: %s", pid, strerror (err));
- }
-
- inf_debug (inf, "setting task: %d", task_port);
-
- if (inf->pause_sc)
- task_suspend (task_port);
-
- if (task && task->port != task_port)
- {
- inf->task = 0;
- inf_validate_procs (inf); /* Trash all the threads. */
- _proc_free (task); /* And the task. */
- }
-
- if (task_port != MACH_PORT_NULL)
- {
- inf->task = make_proc (inf, task_port, PROC_TID_TASK);
- inf->threads_up_to_date = 0;
- }
-
- if (inf->task)
- {
- inf->pid = pid;
- if (inf->pause_sc)
- /* Reflect task_suspend above. */
- inf->task->sc = inf->task->cur_sc = 1;
- }
- else
- inf->pid = -1;
-}
-
-
-/* Validates INF's stopped, nomsg and traced field from the actual
- proc server state. Note that the traced field is only updated from
- the proc server state if we do not have a message port. If we do
- have a message port we'd better look at the tracemask itself. */
-static void
-inf_validate_procinfo (struct inf *inf)
-{
- char *noise;
- mach_msg_type_number_t noise_len = 0;
- struct procinfo *pi;
- mach_msg_type_number_t pi_len = 0;
- int info_flags = 0;
- error_t err =
- proc_getprocinfo (proc_server, inf->pid, &info_flags,
- (procinfo_t *) &pi, &pi_len, &noise, &noise_len);
-
- if (!err)
- {
- inf->stopped = !!(pi->state & PI_STOPPED);
- inf->nomsg = !!(pi->state & PI_NOMSG);
- if (inf->nomsg)
- inf->traced = !!(pi->state & PI_TRACED);
- vm_deallocate (mach_task_self (), (vm_address_t) pi, pi_len);
- if (noise_len > 0)
- vm_deallocate (mach_task_self (), (vm_address_t) noise, noise_len);
- }
-}
-
-/* Validates INF's task suspend count. If it's higher than we expect,
- verify with the user before `stealing' the extra count. */
-static void
-inf_validate_task_sc (struct inf *inf)
-{
- char *noise;
- mach_msg_type_number_t noise_len = 0;
- struct procinfo *pi;
- mach_msg_type_number_t pi_len = 0;
- int info_flags = PI_FETCH_TASKINFO;
- int suspend_count = -1;
- error_t err;
-
- retry:
- err = proc_getprocinfo (proc_server, inf->pid, &info_flags,
- (procinfo_t *) &pi, &pi_len, &noise, &noise_len);
- if (err)
- {
- inf->task->dead = 1; /* oh well */
- return;
- }
-
- if (inf->task->cur_sc < pi->taskinfo.suspend_count && suspend_count == -1)
- {
- /* The proc server might have suspended the task while stopping
- it. This happens when the task is handling a traced signal.
- Refetch the suspend count. The proc server should be
- finished stopping the task by now. */
- suspend_count = pi->taskinfo.suspend_count;
- goto retry;
- }
-
- suspend_count = pi->taskinfo.suspend_count;
-
- vm_deallocate (mach_task_self (), (vm_address_t) pi, pi_len);
- if (noise_len > 0)
- vm_deallocate (mach_task_self (), (vm_address_t) pi, pi_len);
-
- if (inf->task->cur_sc < suspend_count)
- {
- int abort;
-
- target_terminal_ours (); /* Allow I/O. */
- abort = !query ("Pid %d has an additional task suspend count of %d;"
- " clear it? ", inf->pid,
- suspend_count - inf->task->cur_sc);
- target_terminal_inferior (); /* Give it back to the child. */
-
- if (abort)
- error ("Additional task suspend count left untouched.");
-
- inf->task->cur_sc = suspend_count;
- }
-}
-
-/* Turns tracing for INF on or off, depending on ON, unless it already
- is. If INF is running, the resume_sc count of INF's threads will
- be modified, and the signal thread will briefly be run to change
- the trace state. */
-void
-inf_set_traced (struct inf *inf, int on)
-{
- if (on == inf->traced)
- return;
-
- if (inf->task && !inf->task->dead)
- /* Make it take effect immediately. */
- {
- sigset_t mask = on ? ~(sigset_t) 0 : 0;
- error_t err =
- INF_RESUME_MSGPORT_RPC (inf, msg_set_init_int (msgport, refport,
- INIT_TRACEMASK, mask));
- if (err == EIEIO)
- {
- if (on)
- warning ("Can't modify tracing state for pid %d: %s",
- inf->pid, "No signal thread");
- inf->traced = on;
- }
- else if (err)
- warning ("Can't modify tracing state for pid %d: %s",
- inf->pid, strerror (err));
- else
- inf->traced = on;
- }
- else
- inf->traced = on;
-}
-
-
-/* Makes all the real suspend count deltas of all the procs in INF
- match the desired values. Careful to always do thread/task suspend
- counts in the safe order. Returns true if at least one thread is
- thought to be running. */
-int
-inf_update_suspends (struct inf *inf)
-{
- struct proc *task = inf->task;
- /* We don't have to update INF->threads even though we're iterating over it
- because we'll change a thread only if it already has an existing proc
- entry. */
-
- inf_debug (inf, "updating suspend counts");
-
- if (task)
- {
- struct proc *thread;
- int task_running = (task->sc == 0), thread_running = 0;
-
- if (task->sc > task->cur_sc)
- /* The task is becoming _more_ suspended; do before any threads. */
- task_running = proc_update_sc (task);
-
- if (inf->pending_execs)
- /* When we're waiting for an exec, things may be happening behind our
- back, so be conservative. */
- thread_running = 1;
-
- /* Do all the thread suspend counts. */
- for (thread = inf->threads; thread; thread = thread->next)
- thread_running |= proc_update_sc (thread);
-
- if (task->sc != task->cur_sc)
- /* We didn't do the task first, because we wanted to wait for the
- threads; do it now. */
- task_running = proc_update_sc (task);
-
- inf_debug (inf, "%srunning...",
- (thread_running && task_running) ? "" : "not ");
-
- inf->running = thread_running && task_running;
-
- /* Once any thread has executed some code, we can't depend on the
- threads list any more. */
- if (inf->running)
- inf->threads_up_to_date = 0;
-
- return inf->running;
- }
-
- return 0;
-}
-
-
-/* Converts a GDB pid to a struct proc. */
-struct proc *
-inf_tid_to_thread (struct inf *inf, int tid)
-{
- struct proc *thread = inf->threads;
-
- while (thread)
- if (thread->tid == tid)
- return thread;
- else
- thread = thread->next;
- return 0;
-}
-
-/* Converts a thread port to a struct proc. */
-struct proc *
-inf_port_to_thread (struct inf *inf, mach_port_t port)
-{
- struct proc *thread = inf->threads;
- while (thread)
- if (thread->port == port)
- return thread;
- else
- thread = thread->next;
- return 0;
-}
-
-
-/* Make INF's list of threads be consistent with reality of TASK. */
-void
-inf_validate_procs (struct inf *inf)
-{
- thread_array_t threads;
- mach_msg_type_number_t num_threads, i;
- struct proc *task = inf->task;
-
- /* If no threads are currently running, this function will guarantee that
- things are up to date. The exception is if there are zero threads --
- then it is almost certainly in an odd state, and probably some outside
- agent will create threads. */
- inf->threads_up_to_date = inf->threads ? !inf->running : 0;
-
- if (task)
- {
- error_t err = task_threads (task->port, &threads, &num_threads);
- inf_debug (inf, "fetching threads");
- if (err)
- /* TASK must be dead. */
- {
- task->dead = 1;
- task = 0;
- }
- }
-
- if (!task)
- {
- num_threads = 0;
- inf_debug (inf, "no task");
- }
-
- {
- /* Make things normally linear. */
- mach_msg_type_number_t search_start = 0;
- /* Which thread in PROCS corresponds to each task thread, & the task. */
- struct proc *matched[num_threads + 1];
- /* The last thread in INF->threads, so we can add to the end. */
- struct proc *last = 0;
- /* The current thread we're considering. */
- struct proc *thread = inf->threads;
-
- bzero (matched, sizeof (matched));
-
- while (thread)
- {
- mach_msg_type_number_t left;
-
- for (i = search_start, left = num_threads; left; i++, left--)
- {
- if (i >= num_threads)
- i -= num_threads; /* I wrapped around. */
- if (thread->port == threads[i])
- /* We already know about this thread. */
- {
- matched[i] = thread;
- last = thread;
- thread = thread->next;
- search_start++;
- break;
- }
- }
-
- if (!left)
- {
- proc_debug (thread, "died!");
- thread->port = MACH_PORT_NULL;
- thread = _proc_free (thread); /* THREAD is dead. */
- (last ? last->next : inf->threads) = thread;
- }
- }
-
- for (i = 0; i < num_threads; i++)
- {
- if (matched[i])
- /* Throw away the duplicate send right. */
- mach_port_deallocate (mach_task_self (), threads[i]);
- else
- /* THREADS[I] is a thread we don't know about yet! */
- {
- thread = make_proc (inf, threads[i], next_thread_id++);
- (last ? last->next : inf->threads) = thread;
- last = thread;
- proc_debug (thread, "new thread: %d", threads[i]);
- add_thread (pid_to_ptid (thread->tid)); /* Tell GDB's generic thread code. */
- }
- }
-
- vm_deallocate (mach_task_self (),
- (vm_address_t) threads, (num_threads * sizeof (thread_t)));
- }
-}
-
-
-/* Makes sure that INF's thread list is synced with the actual process. */
-inline int
-inf_update_procs (struct inf *inf)
-{
- if (!inf->task)
- return 0;
- if (!inf->threads_up_to_date)
- inf_validate_procs (inf);
- return !!inf->task;
-}
-
-/* Sets the resume_sc of each thread in inf. That of RUN_THREAD is set to 0,
- and others are set to their run_sc if RUN_OTHERS is true, and otherwise
- their pause_sc. */
-inline void
-inf_set_threads_resume_sc (struct inf *inf,
- struct proc *run_thread, int run_others)
-{
- struct proc *thread;
- inf_update_procs (inf);
- for (thread = inf->threads; thread; thread = thread->next)
- if (thread == run_thread)
- thread->resume_sc = 0;
- else if (run_others)
- thread->resume_sc = thread->run_sc;
- else
- thread->resume_sc = thread->pause_sc;
-}
-
-
-/* Cause INF to continue execution immediately; individual threads may still
- be suspended (but their suspend counts will be updated). */
-inline void
-inf_resume (struct inf *inf)
-{
- struct proc *thread;
-
- inf_update_procs (inf);
-
- for (thread = inf->threads; thread; thread = thread->next)
- thread->sc = thread->resume_sc;
-
- if (inf->task)
- {
- if (!inf->pending_execs)
- /* Try to make sure our task count is correct -- in the case where
- we're waiting for an exec though, things are too volatile, so just
- assume things will be reasonable (which they usually will be). */
- inf_validate_task_sc (inf);
- inf->task->sc = 0;
- }
-
- inf_update_suspends (inf);
-}
-
-/* Cause INF to stop execution immediately; individual threads may still
- be running. */
-inline void
-inf_suspend (struct inf *inf)
-{
- struct proc *thread;
-
- inf_update_procs (inf);
-
- for (thread = inf->threads; thread; thread = thread->next)
- thread->sc = thread->pause_sc;
-
- if (inf->task)
- inf->task->sc = inf->pause_sc;
-
- inf_update_suspends (inf);
-}
-
-
-/* INF has one thread PROC that is in single-stepping mode. This
- function changes it to be PROC, changing any old step_thread to be
- a normal one. A PROC of 0 clears any existing value. */
-void
-inf_set_step_thread (struct inf *inf, struct proc *thread)
-{
- gdb_assert (!thread || proc_is_thread (thread));
-
- if (thread)
- inf_debug (inf, "setting step thread: %d/%d", inf->pid, thread->tid);
- else
- inf_debug (inf, "clearing step thread");
-
- if (inf->step_thread != thread)
- {
- if (inf->step_thread && inf->step_thread->port != MACH_PORT_NULL)
- if (!proc_trace (inf->step_thread, 0))
- return;
- if (thread && proc_trace (thread, 1))
- inf->step_thread = thread;
- else
- inf->step_thread = 0;
- }
-}
-
-
-/* Set up the thread resume_sc's so that only the signal thread is running
- (plus whatever other thread are set to always run). Returns true if we
- did so, or false if we can't find a signal thread. */
-inline int
-inf_set_threads_resume_sc_for_signal_thread (struct inf *inf)
-{
- if (inf->signal_thread)
- {
- inf_set_threads_resume_sc (inf, inf->signal_thread, 0);
- return 1;
- }
- else
- return 0;
-}
-
-static void
-inf_update_signal_thread (struct inf *inf)
-{
- /* XXX for now we assume that if there's a msgport, the 2nd thread is
- the signal thread. */
- inf->signal_thread = inf->threads ? inf->threads->next : 0;
-}
-
-
-/* Detachs from INF's inferior task, letting it run once again... */
-void
-inf_detach (struct inf *inf)
-{
- struct proc *task = inf->task;
-
- inf_debug (inf, "detaching...");
-
- inf_clear_wait (inf);
- inf_set_step_thread (inf, 0);
-
- if (task)
- {
- struct proc *thread;
-
- inf_validate_procinfo (inf);
-
- inf_set_traced (inf, 0);
- if (inf->stopped)
- {
- if (inf->nomsg)
- inf_continue (inf);
- else
- inf_signal (inf, TARGET_SIGNAL_0);
- }
-
- proc_restore_exc_port (task);
- task->sc = inf->detach_sc;
-
- for (thread = inf->threads; thread; thread = thread->next)
- {
- proc_restore_exc_port (thread);
- thread->sc = thread->detach_sc;
- }
-
- inf_update_suspends (inf);
- }
-
- inf_cleanup (inf);
-}
-
-/* Attaches INF to the process with process id PID, returning it in a
- suspended state suitable for debugging. */
-void
-inf_attach (struct inf *inf, int pid)
-{
- inf_debug (inf, "attaching: %d", pid);
-
- if (inf->pid)
- inf_detach (inf);
-
- inf_startup (inf, pid);
-}
-
-
-/* Makes sure that we've got our exception ports entrenched in the process. */
-void
-inf_steal_exc_ports (struct inf *inf)
-{
- struct proc *thread;
-
- inf_debug (inf, "stealing exception ports");
-
- inf_set_step_thread (inf, 0); /* The step thread is special. */
-
- proc_steal_exc_port (inf->task, inf->event_port);
- for (thread = inf->threads; thread; thread = thread->next)
- proc_steal_exc_port (thread, MACH_PORT_NULL);
-}
-
-/* Makes sure the process has its own exception ports. */
-void
-inf_restore_exc_ports (struct inf *inf)
-{
- struct proc *thread;
-
- inf_debug (inf, "restoring exception ports");
-
- inf_set_step_thread (inf, 0); /* The step thread is special. */
-
- proc_restore_exc_port (inf->task);
- for (thread = inf->threads; thread; thread = thread->next)
- proc_restore_exc_port (thread);
-}
-
-
-/* Deliver signal SIG to INF. If INF is stopped, delivering a signal, even
- signal 0, will continue it. INF is assumed to be in a paused state, and
- the resume_sc's of INF's threads may be affected. */
-void
-inf_signal (struct inf *inf, enum target_signal sig)
-{
- error_t err = 0;
- int host_sig = target_signal_to_host (sig);
-
-#define NAME target_signal_to_name (sig)
-
- if (host_sig >= _NSIG)
- /* A mach exception. Exceptions are encoded in the signal space by
- putting them after _NSIG; this assumes they're positive (and not
- extremely large)! */
- {
- struct inf_wait *w = &inf->wait;
- if (w->status.kind == TARGET_WAITKIND_STOPPED
- && w->status.value.sig == sig
- && w->thread && !w->thread->aborted)
- /* We're passing through the last exception we received. This is
- kind of bogus, because exceptions are per-thread whereas gdb
- treats signals as per-process. We just forward the exception to
- the correct handler, even it's not for the same thread as TID --
- i.e., we pretend it's global. */
- {
- struct exc_state *e = &w->exc;
- inf_debug (inf, "passing through exception:"
- " task = %d, thread = %d, exc = %d"
- ", code = %d, subcode = %d",
- w->thread->port, inf->task->port,
- e->exception, e->code, e->subcode);
- err =
- exception_raise_request (e->handler,
- e->reply, MACH_MSG_TYPE_MOVE_SEND_ONCE,
- w->thread->port, inf->task->port,
- e->exception, e->code, e->subcode);
- }
- else
- error ("Can't forward spontaneous exception (%s).", NAME);
- }
- else
- /* A Unix signal. */
- if (inf->stopped)
- /* The process is stopped and expecting a signal. Just send off a
- request and let it get handled when we resume everything. */
- {
- inf_debug (inf, "sending %s to stopped process", NAME);
- err =
- INF_MSGPORT_RPC (inf,
- msg_sig_post_untraced_request (msgport,
- inf->event_port,
- MACH_MSG_TYPE_MAKE_SEND_ONCE,
- host_sig, 0,
- refport));
- if (!err)
- /* Posting an untraced signal automatically continues it.
- We clear this here rather than when we get the reply
- because we'd rather assume it's not stopped when it
- actually is, than the reverse. */
- inf->stopped = 0;
- }
- else
- /* It's not expecting it. We have to let just the signal thread
- run, and wait for it to get into a reasonable state before we
- can continue the rest of the process. When we finally resume the
- process the signal we request will be the very first thing that
- happens. */
- {
- inf_debug (inf, "sending %s to unstopped process"
- " (so resuming signal thread)", NAME);
- err =
- INF_RESUME_MSGPORT_RPC (inf,
- msg_sig_post_untraced (msgport, host_sig,
- 0, refport));
- }
-
- if (err == EIEIO)
- /* Can't do too much... */
- warning ("Can't deliver signal %s: No signal thread.", NAME);
- else if (err)
- warning ("Delivering signal %s: %s", NAME, strerror (err));
-
-#undef NAME
-}
-
-
-/* Continue INF without delivering a signal. This is meant to be used
- when INF does not have a message port. */
-void
-inf_continue (struct inf *inf)
-{
- process_t proc;
- error_t err = proc_pid2proc (proc_server, inf->pid, &proc);
-
- if (!err)
- {
- inf_debug (inf, "continuing process");
-
- err = proc_mark_cont (proc);
- if (!err)
- {
- struct proc *thread;
-
- for (thread = inf->threads; thread; thread = thread->next)
- thread_resume (thread->port);
-
- inf->stopped = 0;
- }
- }
-
- if (err)
- warning ("Can't continue process: %s", strerror (err));
-}
-
-
-/* The inferior used for all gdb target ops. */
-struct inf *current_inferior = 0;
-
-/* The inferior being waited for by gnu_wait. Since GDB is decidely not
- multi-threaded, we don't bother to lock this. */
-struct inf *waiting_inf;
-
-/* Wait for something to happen in the inferior, returning what in STATUS. */
-static ptid_t
-gnu_wait (ptid_t tid, struct target_waitstatus *status)
-{
- struct msg
- {
- mach_msg_header_t hdr;
- mach_msg_type_t type;
- int data[8000];
- } msg;
- error_t err;
- struct proc *thread;
- struct inf *inf = current_inferior;
-
- extern int exc_server (mach_msg_header_t *, mach_msg_header_t *);
- extern int msg_reply_server (mach_msg_header_t *, mach_msg_header_t *);
- extern int notify_server (mach_msg_header_t *, mach_msg_header_t *);
- extern int process_reply_server (mach_msg_header_t *, mach_msg_header_t *);
-
- gdb_assert (inf->task);
-
- if (!inf->threads && !inf->pending_execs)
- /* No threads! Assume that maybe some outside agency is frobbing our
- task, and really look for new threads. If we can't find any, just tell
- the user to try again later. */
- {
- inf_validate_procs (inf);
- if (!inf->threads && !inf->task->dead)
- error ("There are no threads; try again later.");
- }
-
- waiting_inf = inf;
-
- inf_debug (inf, "waiting for: %d", PIDGET (tid));
-
-rewait:
- if (proc_wait_pid != inf->pid && !inf->no_wait)
- /* Always get information on events from the proc server. */
- {
- inf_debug (inf, "requesting wait on pid %d", inf->pid);
-
- if (proc_wait_pid)
- /* The proc server is single-threaded, and only allows a single
- outstanding wait request, so we have to cancel the previous one. */
- {
- inf_debug (inf, "cancelling previous wait on pid %d", proc_wait_pid);
- interrupt_operation (proc_server, 0);
- }
-
- err =
- proc_wait_request (proc_server, inf->event_port, inf->pid, WUNTRACED);
- if (err)
- warning ("wait request failed: %s", strerror (err));
- else
- {
- inf_debug (inf, "waits pending: %d", proc_waits_pending);
- proc_wait_pid = inf->pid;
- /* Even if proc_waits_pending was > 0 before, we still won't
- get any other replies, because it was either from a
- different INF, or a different process attached to INF --
- and the event port, which is the wait reply port, changes
- when you switch processes. */
- proc_waits_pending = 1;
- }
- }
-
- inf_clear_wait (inf);
-
- /* What can happen? (1) Dead name notification; (2) Exceptions arrive;
- (3) wait reply from the proc server. */
-
- inf_debug (inf, "waiting for an event...");
- err = mach_msg (&msg.hdr, MACH_RCV_MSG | MACH_RCV_INTERRUPT,
- 0, sizeof (struct msg), inf->event_port,
- MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-
- /* Re-suspend the task. */
- inf_suspend (inf);
-
- if (!inf->task && inf->pending_execs)
- /* When doing an exec, it's possible that the old task wasn't reused
- (e.g., setuid execs). So if the task seems to have disappeared,
- attempt to refetch it, as the pid should still be the same. */
- inf_set_pid (inf, inf->pid);
-
- if (err == EMACH_RCV_INTERRUPTED)
- inf_debug (inf, "interrupted");
- else if (err)
- error ("Couldn't wait for an event: %s", strerror (err));
- else
- {
- struct
- {
- mach_msg_header_t hdr;
- mach_msg_type_t err_type;
- kern_return_t err;
- char noise[200];
- }
- reply;
-
- inf_debug (inf, "event: msgid = %d", msg.hdr.msgh_id);
-
- /* Handle what we got. */
- if (!notify_server (&msg.hdr, &reply.hdr)
- && !exc_server (&msg.hdr, &reply.hdr)
- && !process_reply_server (&msg.hdr, &reply.hdr)
- && !msg_reply_server (&msg.hdr, &reply.hdr))
- /* Whatever it is, it's something strange. */
- error ("Got a strange event, msg id = %d.", msg.hdr.msgh_id);
-
- if (reply.err)
- error ("Handling event, msgid = %d: %s",
- msg.hdr.msgh_id, strerror (reply.err));
- }
-
- if (inf->pending_execs)
- /* We're waiting for the inferior to finish execing. */
- {
- struct inf_wait *w = &inf->wait;
- enum target_waitkind kind = w->status.kind;
-
- if (kind == TARGET_WAITKIND_SPURIOUS)
- /* Since gdb is actually counting the number of times the inferior
- stops, expecting one stop per exec, we only return major events
- while execing. */
- {
- w->suppress = 1;
- inf_debug (inf, "pending_execs = %d, ignoring minor event",
- inf->pending_execs);
- }
- else if (kind == TARGET_WAITKIND_STOPPED
- && w->status.value.sig == TARGET_SIGNAL_TRAP)
- /* Ah hah! A SIGTRAP from the inferior while starting up probably
- means we've succesfully completed an exec! */
- {
- if (--inf->pending_execs == 0)
- /* We're done! */
- {
-#if 0 /* do we need this? */
- prune_threads (1); /* Get rid of the old shell threads */
- renumber_threads (0); /* Give our threads reasonable names. */
-#endif
- }
- inf_debug (inf, "pending exec completed, pending_execs => %d",
- inf->pending_execs);
- }
- else if (kind == TARGET_WAITKIND_STOPPED)
- /* It's possible that this signal is because of a crashed process
- being handled by the hurd crash server; in this case, the process
- will have an extra task suspend, which we need to know about.
- Since the code in inf_resume that normally checks for this is
- disabled while INF->pending_execs, we do the check here instead. */
- inf_validate_task_sc (inf);
- }
-
- if (inf->wait.suppress)
- /* Some totally spurious event happened that we don't consider
- worth returning to gdb. Just keep waiting. */
- {
- inf_debug (inf, "suppressing return, rewaiting...");
- inf_resume (inf);
- goto rewait;
- }
-
- /* Pass back out our results. */
- bcopy (&inf->wait.status, status, sizeof (*status));
-
- thread = inf->wait.thread;
- if (thread)
- tid = pid_to_ptid (thread->tid);
- else
- thread = inf_tid_to_thread (inf, PIDGET (tid));
-
- if (!thread || thread->port == MACH_PORT_NULL)
- {
- /* TID is dead; try and find a new thread. */
- if (inf_update_procs (inf) && inf->threads)
- tid = pid_to_ptid (inf->threads->tid); /* The first available thread. */
- else
- tid = inferior_ptid; /* let wait_for_inferior handle exit case */
- }
-
- if (thread && PIDGET (tid) >= 0 && status->kind != TARGET_WAITKIND_SPURIOUS
- && inf->pause_sc == 0 && thread->pause_sc == 0)
- /* If something actually happened to THREAD, make sure we
- suspend it. */
- {
- thread->sc = 1;
- inf_update_suspends (inf);
- }
-
- inf_debug (inf, "returning tid = %d, status = %s (%d)", PIDGET (tid),
- status->kind == TARGET_WAITKIND_EXITED ? "EXITED"
- : status->kind == TARGET_WAITKIND_STOPPED ? "STOPPED"
- : status->kind == TARGET_WAITKIND_SIGNALLED ? "SIGNALLED"
- : status->kind == TARGET_WAITKIND_LOADED ? "LOADED"
- : status->kind == TARGET_WAITKIND_SPURIOUS ? "SPURIOUS"
- : "?",
- status->value.integer);
-
- return tid;
-}
-
-
-/* The rpc handler called by exc_server. */
-error_t
-S_exception_raise_request (mach_port_t port, mach_port_t reply_port,
- thread_t thread_port, task_t task_port,
- int exception, int code, int subcode)
-{
- struct inf *inf = waiting_inf;
- struct proc *thread = inf_port_to_thread (inf, thread_port);
-
- inf_debug (waiting_inf,
- "thread = %d, task = %d, exc = %d, code = %d, subcode = %d",
- thread_port, task_port, exception, code, subcode);
-
- if (!thread)
- /* We don't know about thread? */
- {
- inf_update_procs (inf);
- thread = inf_port_to_thread (inf, thread_port);
- if (!thread)
- /* Give up, the generating thread is gone. */
- return 0;
- }
-
- mach_port_deallocate (mach_task_self (), thread_port);
- mach_port_deallocate (mach_task_self (), task_port);
-
- if (!thread->aborted)
- /* THREAD hasn't been aborted since this exception happened (abortion
- clears any exception state), so it must be real. */
- {
- /* Store away the details; this will destroy any previous info. */
- inf->wait.thread = thread;
-
- inf->wait.status.kind = TARGET_WAITKIND_STOPPED;
-
- if (exception == EXC_BREAKPOINT)
- /* GDB likes to get SIGTRAP for breakpoints. */
- {
- inf->wait.status.value.sig = TARGET_SIGNAL_TRAP;
- mach_port_deallocate (mach_task_self (), reply_port);
- }
- else
- /* Record the exception so that we can forward it later. */
- {
- if (thread->exc_port == port)
- {
- inf_debug (waiting_inf, "Handler is thread exception port <%d>",
- thread->saved_exc_port);
- inf->wait.exc.handler = thread->saved_exc_port;
- }
- else
- {
- inf_debug (waiting_inf, "Handler is task exception port <%d>",
- inf->task->saved_exc_port);
- inf->wait.exc.handler = inf->task->saved_exc_port;
- gdb_assert (inf->task->exc_port == port);
- }
- if (inf->wait.exc.handler != MACH_PORT_NULL)
- /* Add a reference to the exception handler. */
- mach_port_mod_refs (mach_task_self (),
- inf->wait.exc.handler, MACH_PORT_RIGHT_SEND,
- 1);
-
- inf->wait.exc.exception = exception;
- inf->wait.exc.code = code;
- inf->wait.exc.subcode = subcode;
- inf->wait.exc.reply = reply_port;
-
- /* Exceptions are encoded in the signal space by putting them after
- _NSIG; this assumes they're positive (and not extremely large)! */
- inf->wait.status.value.sig =
- target_signal_from_host (_NSIG + exception);
- }
- }
- else
- /* A supppressed exception, which ignore. */
- {
- inf->wait.suppress = 1;
- mach_port_deallocate (mach_task_self (), reply_port);
- }
-
- return 0;
-}
-
-
-/* Fill in INF's wait field after a task has died without giving us more
- detailed information. */
-void
-inf_task_died_status (struct inf *inf)
-{
- warning ("Pid %d died with unknown exit status, using SIGKILL.", inf->pid);
- inf->wait.status.kind = TARGET_WAITKIND_SIGNALLED;
- inf->wait.status.value.sig = TARGET_SIGNAL_KILL;
-}
-
-/* Notify server routines. The only real one is dead name notification. */
-error_t
-do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
-{
- struct inf *inf = waiting_inf;
-
- inf_debug (waiting_inf, "port = %d", dead_port);
-
- if (inf->task && inf->task->port == dead_port)
- {
- proc_debug (inf->task, "is dead");
- inf->task->port = MACH_PORT_NULL;
- if (proc_wait_pid == inf->pid)
- /* We have a wait outstanding on the process, which will return more
- detailed information, so delay until we get that. */
- inf->wait.suppress = 1;
- else
- /* We never waited for the process (maybe it wasn't a child), so just
- pretend it got a SIGKILL. */
- inf_task_died_status (inf);
- }
- else
- {
- struct proc *thread = inf_port_to_thread (inf, dead_port);
- if (thread)
- {
- proc_debug (thread, "is dead");
- thread->port = MACH_PORT_NULL;
- }
-
- if (inf->task->dead)
- /* Since the task is dead, its threads are dying with it. */
- inf->wait.suppress = 1;
- }
-
- mach_port_deallocate (mach_task_self (), dead_port);
- inf->threads_up_to_date = 0; /* Just in case */
-
- return 0;
-}
-
-
-static error_t
-ill_rpc (char *fun)
-{
- warning ("illegal rpc: %s", fun);
- return 0;
-}
-
-error_t
-do_mach_notify_no_senders (mach_port_t notify, mach_port_mscount_t count)
-{
- return ill_rpc (__FUNCTION__);
-}
-
-error_t
-do_mach_notify_port_deleted (mach_port_t notify, mach_port_t name)
-{
- return ill_rpc (__FUNCTION__);
-}
-
-error_t
-do_mach_notify_msg_accepted (mach_port_t notify, mach_port_t name)
-{
- return ill_rpc (__FUNCTION__);
-}
-
-error_t
-do_mach_notify_port_destroyed (mach_port_t notify, mach_port_t name)
-{
- return ill_rpc (__FUNCTION__);
-}
-
-error_t
-do_mach_notify_send_once (mach_port_t notify)
-{
- return ill_rpc (__FUNCTION__);
-}
-
-
-/* Process_reply server routines. We only use process_wait_reply. */
-
-error_t
-S_proc_wait_reply (mach_port_t reply, error_t err,
- int status, int sigcode, rusage_t rusage, pid_t pid)
-{
- struct inf *inf = waiting_inf;
-
- inf_debug (inf, "err = %s, pid = %d, status = 0x%x, sigcode = %d",
- err ? strerror (err) : "0", pid, status, sigcode);
-
- if (err && proc_wait_pid && (!inf->task || !inf->task->port))
- /* Ack. The task has died, but the task-died notification code didn't
- tell anyone because it thought a more detailed reply from the
- procserver was forthcoming. However, we now learn that won't
- happen... So we have to act like the task just died, and this time,
- tell the world. */
- inf_task_died_status (inf);
-
- if (--proc_waits_pending == 0)
- /* PROC_WAIT_PID represents the most recent wait. We will always get
- replies in order because the proc server is single threaded. */
- proc_wait_pid = 0;
-
- inf_debug (inf, "waits pending now: %d", proc_waits_pending);
-
- if (err)
- {
- if (err != EINTR)
- {
- warning ("Can't wait for pid %d: %s", inf->pid, strerror (err));
- inf->no_wait = 1;
-
- /* Since we can't see the inferior's signals, don't trap them. */
- inf_set_traced (inf, 0);
- }
- }
- else if (pid == inf->pid)
- {
- store_waitstatus (&inf->wait.status, status);
- if (inf->wait.status.kind == TARGET_WAITKIND_STOPPED)
- /* The process has sent us a signal, and stopped itself in a sane
- state pending our actions. */
- {
- inf_debug (inf, "process has stopped itself");
- inf->stopped = 1;
- }
- }
- else
- inf->wait.suppress = 1; /* Something odd happened. Ignore. */
-
- return 0;
-}
-
-error_t
-S_proc_setmsgport_reply (mach_port_t reply, error_t err,
- mach_port_t old_msg_port)
-{
- return ill_rpc (__FUNCTION__);
-}
-
-error_t
-S_proc_getmsgport_reply (mach_port_t reply, error_t err, mach_port_t msg_port)
-{
- return ill_rpc (__FUNCTION__);
-}
-
-
-/* Msg_reply server routines. We only use msg_sig_post_untraced_reply. */
-
-error_t
-S_msg_sig_post_untraced_reply (mach_port_t reply, error_t err)
-{
- struct inf *inf = waiting_inf;
-
- if (err == EBUSY)
- /* EBUSY is what we get when the crash server has grabbed control of the
- process and doesn't like what signal we tried to send it. Just act
- like the process stopped (using a signal of 0 should mean that the
- *next* time the user continues, it will pass signal 0, which the crash
- server should like). */
- {
- inf->wait.status.kind = TARGET_WAITKIND_STOPPED;
- inf->wait.status.value.sig = TARGET_SIGNAL_0;
- }
- else if (err)
- warning ("Signal delivery failed: %s", strerror (err));
-
- if (err)
- /* We only get this reply when we've posted a signal to a process which we
- thought was stopped, and which we expected to continue after the signal.
- Given that the signal has failed for some reason, it's reasonable to
- assume it's still stopped. */
- inf->stopped = 1;
- else
- inf->wait.suppress = 1;
-
- return 0;
-}
-
-error_t
-S_msg_sig_post_reply (mach_port_t reply, error_t err)
-{
- return ill_rpc (__FUNCTION__);
-}
-
-
-/* Returns the number of messages queued for the receive right PORT. */
-static mach_port_msgcount_t
-port_msgs_queued (mach_port_t port)
-{
- struct mach_port_status status;
- error_t err =
- mach_port_get_receive_status (mach_task_self (), port, &status);
-
- if (err)
- return 0;
- else
- return status.mps_msgcount;
-}
-
-
-/* Resume execution of the inferior process.
-
- If STEP is nonzero, single-step it.
- If SIGNAL is nonzero, give it that signal.
-
- TID STEP:
- -1 true Single step the current thread allowing other threads to run.
- -1 false Continue the current thread allowing other threads to run.
- X true Single step the given thread, don't allow any others to run.
- X false Continue the given thread, do not allow any others to run.
- (Where X, of course, is anything except -1)
-
- Note that a resume may not `take' if there are pending exceptions/&c
- still unprocessed from the last resume we did (any given resume may result
- in multiple events returned by wait).
- */
-static void
-gnu_resume (ptid_t tid, int step, enum target_signal sig)
-{
- struct proc *step_thread = 0;
- struct inf *inf = current_inferior;
-
- inf_debug (inf, "tid = %d, step = %d, sig = %d", PIDGET (tid), step, sig);
-
- inf_validate_procinfo (inf);
-
- if (sig != TARGET_SIGNAL_0 || inf->stopped)
- {
- if (sig == TARGET_SIGNAL_0 && inf->nomsg)
- inf_continue (inf);
- else
- inf_signal (inf, sig);
- }
- else if (inf->wait.exc.reply != MACH_PORT_NULL)
- /* We received an exception to which we have chosen not to forward, so
- abort the faulting thread, which will perhaps retake it. */
- {
- proc_abort (inf->wait.thread, 1);
- warning ("Aborting %s with unforwarded exception %s.",
- proc_string (inf->wait.thread),
- target_signal_to_name (inf->wait.status.value.sig));
- }
-
- if (port_msgs_queued (inf->event_port))
- /* If there are still messages in our event queue, don't bother resuming
- the process, as we're just going to stop it right away anyway. */
- return;
-
- inf_update_procs (inf);
-
- if (PIDGET (tid) < 0)
- /* Allow all threads to run, except perhaps single-stepping one. */
- {
- inf_debug (inf, "running all threads; tid = %d", PIDGET (inferior_ptid));
- tid = inferior_ptid; /* What to step. */
- inf_set_threads_resume_sc (inf, 0, 1);
- }
- else
- /* Just allow a single thread to run. */
- {
- struct proc *thread = inf_tid_to_thread (inf, PIDGET (tid));
- if (!thread)
- error ("Can't run single thread id %d: no such thread!");
- inf_debug (inf, "running one thread: %d/%d", inf->pid, thread->tid);
- inf_set_threads_resume_sc (inf, thread, 0);
- }
-
- if (step)
- {
- step_thread = inf_tid_to_thread (inf, PIDGET (tid));
- if (!step_thread)
- warning ("Can't step thread id %d: no such thread.", PIDGET (tid));
- else
- inf_debug (inf, "stepping thread: %d/%d", inf->pid, step_thread->tid);
- }
- if (step_thread != inf->step_thread)
- inf_set_step_thread (inf, step_thread);
-
- inf_debug (inf, "here we go...");
- inf_resume (inf);
-}
-
-
-static void
-gnu_kill_inferior (void)
-{
- struct proc *task = current_inferior->task;
- if (task)
- {
- proc_debug (task, "terminating...");
- task_terminate (task->port);
- inf_set_pid (current_inferior, -1);
- }
- target_mourn_inferior ();
-}
-
-/* Clean up after the inferior dies. */
-static void
-gnu_mourn_inferior (void)
-{
- inf_debug (current_inferior, "rip");
- inf_detach (current_inferior);
- unpush_target (&gnu_ops);
- generic_mourn_inferior ();
-}
-
-
-/* Fork an inferior process, and start debugging it. */
-
-/* Set INFERIOR_PID to the first thread available in the child, if any. */
-static int
-inf_pick_first_thread (void)
-{
- if (current_inferior->task && current_inferior->threads)
- /* The first thread. */
- return current_inferior->threads->tid;
- else
- /* What may be the next thread. */
- return next_thread_id;
-}
-
-static struct inf *
-cur_inf (void)
-{
- if (!current_inferior)
- current_inferior = make_inf ();
- return current_inferior;
-}
-
-static void
-gnu_create_inferior (char *exec_file, char *allargs, char **env)
-{
- struct inf *inf = cur_inf ();
-
- void trace_me ()
- {
- /* We're in the child; make this process stop as soon as it execs. */
- inf_debug (inf, "tracing self");
- if (ptrace (PTRACE_TRACEME) != 0)
- error ("ptrace (PTRACE_TRACEME) failed!");
- }
- void attach_to_child (int pid)
- {
- /* Attach to the now stopped child, which is actually a shell... */
- inf_debug (inf, "attaching to child: %d", pid);
-
- inf_attach (inf, pid);
-
- attach_flag = 0;
- push_target (&gnu_ops);
-
- inf->pending_execs = 2;
- inf->nomsg = 1;
- inf->traced = 1;
-
- /* Now let the child run again, knowing that it will stop immediately
- because of the ptrace. */
- inf_resume (inf);
- inferior_ptid = pid_to_ptid (inf_pick_first_thread ());
-
- startup_inferior (inf->pending_execs);
- }
-
- inf_debug (inf, "creating inferior");
-
- fork_inferior (exec_file, allargs, env, trace_me, attach_to_child,
- NULL, NULL);
-
- inf_validate_procinfo (inf);
- inf_update_signal_thread (inf);
- inf_set_traced (inf, inf->want_signals);
-
- /* Execing the process will have trashed our exception ports; steal them
- back (or make sure they're restored if the user wants that). */
- if (inf->want_exceptions)
- inf_steal_exc_ports (inf);
- else
- inf_restore_exc_ports (inf);
-
- /* Here we go! */
- proceed ((CORE_ADDR) -1, 0, 0);
-}
-
-/* Mark our target-struct as eligible for stray "run" and "attach"
- commands. */
-static int
-gnu_can_run (void)
-{
- return 1;
-}
-
-
-#ifdef ATTACH_DETACH
-
-/* Attach to process PID, then initialize for debugging it
- and wait for the trace-trap that results from attaching. */
-static void
-gnu_attach (char *args, int from_tty)
-{
- int pid;
- char *exec_file;
- struct inf *inf = cur_inf ();
-
- if (!args)
- error_no_arg ("process-id to attach");
-
- pid = atoi (args);
-
- if (pid == getpid ()) /* Trying to masturbate? */
- error ("I refuse to debug myself!");
-
- if (from_tty)
- {
- exec_file = (char *) get_exec_file (0);
-
- if (exec_file)
- printf_unfiltered ("Attaching to program `%s', pid %d\n",
- exec_file, pid);
- else
- printf_unfiltered ("Attaching to pid %d\n", pid);
-
- gdb_flush (gdb_stdout);
- }
-
- inf_debug (inf, "attaching to pid: %d", pid);
-
- inf_attach (inf, pid);
- inf_update_procs (inf);
-
- inferior_ptid = pid_to_ptid (inf_pick_first_thread ());
-
- attach_flag = 1;
- push_target (&gnu_ops);
-
- /* We have to initialize the terminal settings now, since the code
- below might try to restore them. */
- target_terminal_init ();
-
- /* If the process was stopped before we attached, make it continue the next
- time the user does a continue. */
- inf_validate_procinfo (inf);
-
- inf_update_signal_thread (inf);
- inf_set_traced (inf, inf->want_signals);
-
-#if 0 /* Do we need this? */
- renumber_threads (0); /* Give our threads reasonable names. */
-#endif
-}
-
-
-/* Take a program previously attached to and detaches it.
- The program resumes execution and will no longer stop
- on signals, etc. We'd better not have left any breakpoints
- in the program or it'll die when it hits one. For this
- to work, it may be necessary for the process to have been
- previously attached. It *might* work if the program was
- started via fork. */
-static void
-gnu_detach (char *args, int from_tty)
-{
- if (from_tty)
- {
- char *exec_file = get_exec_file (0);
- if (exec_file)
- printf_unfiltered ("Detaching from program `%s' pid %d\n",
- exec_file, current_inferior->pid);
- else
- printf_unfiltered ("Detaching from pid %d\n", current_inferior->pid);
- gdb_flush (gdb_stdout);
- }
-
- inf_detach (current_inferior);
-
- inferior_ptid = null_ptid;
-
- unpush_target (&gnu_ops); /* Pop out of handling an inferior */
-}
-#endif /* ATTACH_DETACH */
-
-
-static void
-gnu_terminal_init_inferior (void)
-{
- gdb_assert (current_inferior);
- terminal_init_inferior_with_pgrp (current_inferior->pid);
-}
-
-/* Get ready to modify the registers array. On machines which store
- individual registers, this doesn't need to do anything. On machines
- which store all the registers in one fell swoop, this makes sure
- that registers contains all the registers from the program being
- debugged. */
-static void
-gnu_prepare_to_store (void)
-{
-#ifdef CHILD_PREPARE_TO_STORE
- CHILD_PREPARE_TO_STORE ();
-#endif
-}
-
-static void
-gnu_open (char *arg, int from_tty)
-{
- error ("Use the \"run\" command to start a Unix child process.");
-}
-
-static void
-gnu_stop (void)
-{
- error ("to_stop target function not implemented");
-}
-
-static char *
-gnu_pid_to_exec_file (int pid)
-{
- error ("to_pid_to_exec_file target function not implemented");
- return NULL;
-}
-
-
-static int
-gnu_thread_alive (ptid_t tid)
-{
- inf_update_procs (current_inferior);
- return !!inf_tid_to_thread (current_inferior, PIDGET (tid));
-}
-
-
-/* Read inferior task's LEN bytes from ADDR and copy it to MYADDR in
- gdb's address space. Return 0 on failure; number of bytes read
- otherwise. */
-int
-gnu_read_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
-{
- error_t err;
- vm_address_t low_address = (vm_address_t) trunc_page (addr);
- vm_size_t aligned_length =
- (vm_size_t) round_page (addr + length) - low_address;
- pointer_t copied;
- int copy_count;
-
- /* Get memory from inferior with page aligned addresses */
- err = vm_read (task, low_address, aligned_length, &copied, &copy_count);
- if (err)
- return 0;
-
- err = hurd_safe_copyin (myaddr, (void *) addr - low_address + copied, length);
- if (err)
- {
- warning ("Read from inferior faulted: %s", strerror (err));
- length = 0;
- }
-
- err = vm_deallocate (mach_task_self (), copied, copy_count);
- if (err)
- warning ("gnu_read_inferior vm_deallocate failed: %s", strerror (err));
-
- return length;
-}
-
-#define CHK_GOTO_OUT(str,ret) \
- do if (ret != KERN_SUCCESS) { errstr = #str; goto out; } while(0)
-
-struct vm_region_list
-{
- struct vm_region_list *next;
- vm_prot_t protection;
- vm_address_t start;
- vm_size_t length;
-};
-
-struct obstack region_obstack;
-
-/* Write gdb's LEN bytes from MYADDR and copy it to ADDR in inferior
- task's address space. */
-int
-gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
-{
- error_t err = 0;
- vm_address_t low_address = (vm_address_t) trunc_page (addr);
- vm_size_t aligned_length =
- (vm_size_t) round_page (addr + length) - low_address;
- pointer_t copied;
- int copy_count;
- int deallocate = 0;
-
- char *errstr = "Bug in gnu_write_inferior";
-
- struct vm_region_list *region_element;
- struct vm_region_list *region_head = (struct vm_region_list *) NULL;
-
- /* Get memory from inferior with page aligned addresses */
- err = vm_read (task,
- low_address,
- aligned_length,
- &copied,
- &copy_count);
- CHK_GOTO_OUT ("gnu_write_inferior vm_read failed", err);
-
- deallocate++;
-
- err = hurd_safe_copyout ((void *) addr - low_address + copied,
- myaddr, length);
- CHK_GOTO_OUT ("Write to inferior faulted", err);
-
- obstack_init (&region_obstack);
-
- /* Do writes atomically.
- First check for holes and unwritable memory. */
- {
- vm_size_t remaining_length = aligned_length;
- vm_address_t region_address = low_address;
-
- struct vm_region_list *scan;
-
- while (region_address < low_address + aligned_length)
- {
- vm_prot_t protection;
- vm_prot_t max_protection;
- vm_inherit_t inheritance;
- boolean_t shared;
- mach_port_t object_name;
- vm_offset_t offset;
- vm_size_t region_length = remaining_length;
- vm_address_t old_address = region_address;
-
- err = vm_region (task,
- &region_address,
- &region_length,
- &protection,
- &max_protection,
- &inheritance,
- &shared,
- &object_name,
- &offset);
- CHK_GOTO_OUT ("vm_region failed", err);
-
- /* Check for holes in memory */
- if (old_address != region_address)
- {
- warning ("No memory at 0x%x. Nothing written",
- old_address);
- err = KERN_SUCCESS;
- length = 0;
- goto out;
- }
-
- if (!(max_protection & VM_PROT_WRITE))
- {
- warning ("Memory at address 0x%x is unwritable. Nothing written",
- old_address);
- err = KERN_SUCCESS;
- length = 0;
- goto out;
- }
-
- /* Chain the regions for later use */
- region_element =
- (struct vm_region_list *)
- obstack_alloc (&region_obstack, sizeof (struct vm_region_list));
-
- region_element->protection = protection;
- region_element->start = region_address;
- region_element->length = region_length;
-
- /* Chain the regions along with protections */
- region_element->next = region_head;
- region_head = region_element;
-
- region_address += region_length;
- remaining_length = remaining_length - region_length;
- }
-
- /* If things fail after this, we give up.
- Somebody is messing up inferior_task's mappings. */
-
- /* Enable writes to the chained vm regions */
- for (scan = region_head; scan; scan = scan->next)
- {
- if (!(scan->protection & VM_PROT_WRITE))
- {
- err = vm_protect (task,
- scan->start,
- scan->length,
- FALSE,
- scan->protection | VM_PROT_WRITE);
- CHK_GOTO_OUT ("vm_protect: enable write failed", err);
- }
- }
-
- err = vm_write (task,
- low_address,
- copied,
- aligned_length);
- CHK_GOTO_OUT ("vm_write failed", err);
-
- /* Set up the original region protections, if they were changed */
- for (scan = region_head; scan; scan = scan->next)
- {
- if (!(scan->protection & VM_PROT_WRITE))
- {
- err = vm_protect (task,
- scan->start,
- scan->length,
- FALSE,
- scan->protection);
- CHK_GOTO_OUT ("vm_protect: enable write failed", err);
- }
- }
- }
-
-out:
- if (deallocate)
- {
- obstack_free (&region_obstack, 0);
-
- (void) vm_deallocate (mach_task_self (),
- copied,
- copy_count);
- }
-
- if (err != KERN_SUCCESS)
- {
- warning ("%s: %s", errstr, mach_error_string (err));
- return 0;
- }
-
- return length;
-}
-
-
-/* Return 0 on failure, number of bytes handled otherwise. TARGET
- is ignored. */
-static int
-gnu_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib,
- struct target_ops *target)
-{
- task_t task = (current_inferior
- ? (current_inferior->task
- ? current_inferior->task->port : 0)
- : 0);
-
- if (task == MACH_PORT_NULL)
- return 0;
- else
- {
- inf_debug (current_inferior, "%s %p[%d] %s %p",
- write ? "writing" : "reading", memaddr, len,
- write ? "<--" : "-->", myaddr);
- if (write)
- return gnu_write_inferior (task, memaddr, myaddr, len);
- else
- return gnu_read_inferior (task, memaddr, myaddr, len);
- }
-}
-
-
-/* Return printable description of proc. */
-char *
-proc_string (struct proc *proc)
-{
- static char tid_str[80];
- if (proc_is_task (proc))
- sprintf (tid_str, "process %d", proc->inf->pid);
- else
- sprintf (tid_str, "thread %d.%d",
- proc->inf->pid, pid_to_thread_id (MERGEPID (proc->tid, 0)));
- return tid_str;
-}
-
-static char *
-gnu_pid_to_str (ptid_t ptid)
-{
- struct inf *inf = current_inferior;
- int tid = PIDGET (ptid);
- struct proc *thread = inf_tid_to_thread (inf, tid);
-
- if (thread)
- return proc_string (thread);
- else
- {
- static char tid_str[80];
- sprintf (tid_str, "bogus thread id %d", tid);
- return tid_str;
- }
-}
-
-
-extern void gnu_store_registers (int regno);
-extern void gnu_fetch_registers (int regno);
-
-struct target_ops gnu_ops;
-
-static void
-init_gnu_ops (void)
-{
- gnu_ops.to_shortname = "GNU"; /* to_shortname */
- gnu_ops.to_longname = "GNU Hurd process"; /* to_longname */
- gnu_ops.to_doc = "GNU Hurd process"; /* to_doc */
- gnu_ops.to_open = gnu_open; /* to_open */
- gnu_ops.to_close = 0; /* to_close */
- gnu_ops.to_attach = gnu_attach; /* to_attach */
- gnu_ops.to_post_attach = NULL;
- gnu_ops.to_require_attach = NULL; /* to_require_attach */
- gnu_ops.to_detach = gnu_detach; /* to_detach */
- gnu_ops.to_require_detach = NULL; /* to_require_detach */
- gnu_ops.to_resume = gnu_resume; /* to_resume */
- gnu_ops.to_wait = gnu_wait; /* to_wait */
- gnu_ops.to_post_wait = NULL; /* to_post_wait */
- gnu_ops.to_fetch_registers = gnu_fetch_registers; /* to_fetch_registers */
- gnu_ops.to_store_registers = gnu_store_registers; /* to_store_registers */
- gnu_ops.to_prepare_to_store = gnu_prepare_to_store; /* to_prepare_to_store */
- gnu_ops.to_xfer_memory = gnu_xfer_memory; /* to_xfer_memory */
- gnu_ops.to_files_info = 0; /* to_files_info */
- gnu_ops.to_insert_breakpoint = memory_insert_breakpoint;
- gnu_ops.to_remove_breakpoint = memory_remove_breakpoint;
- gnu_ops.to_terminal_init = gnu_terminal_init_inferior;
- gnu_ops.to_terminal_inferior = terminal_inferior;
- gnu_ops.to_terminal_ours_for_output = terminal_ours_for_output;
- gnu_ops.to_terminal_ours = terminal_ours;
- gnu_ops.to_terminal_info = child_terminal_info;
- gnu_ops.to_kill = gnu_kill_inferior; /* to_kill */
- gnu_ops.to_load = 0; /* to_load */
- gnu_ops.to_lookup_symbol = 0; /* to_lookup_symbol */
- gnu_ops.to_create_inferior = gnu_create_inferior; /* to_create_inferior */
- gnu_ops.to_post_startup_inferior = NULL; /* to_post_startup_inferior */
- /* to_acknowledge_created_inferior */
- gnu_ops.to_acknowledge_created_inferior = NULL;
- /* to_clone_and_follow_inferior */
- gnu_ops.to_clone_and_follow_inferior = NULL;
- /* to_post_follow_inferior_by_clone */
- gnu_ops.to_post_follow_inferior_by_clone = NULL;
- gnu_ops.to_insert_fork_catchpoint = NULL;
- gnu_ops.to_remove_fork_catchpoint = NULL;
- gnu_ops.to_insert_vfork_catchpoint = NULL;
- gnu_ops.to_remove_vfork_catchpoint = NULL;
- gnu_ops.to_has_forked = NULL; /* to_has_forked */
- gnu_ops.to_has_vforked = NULL; /* to_has_vforked */
- gnu_ops.to_can_follow_vfork_prior_to_exec = NULL;
- gnu_ops.to_post_follow_vfork = NULL; /* to_post_follow_vfork */
- gnu_ops.to_insert_exec_catchpoint = NULL;
- gnu_ops.to_remove_exec_catchpoint = NULL;
- gnu_ops.to_has_execd = NULL;
- gnu_ops.to_reported_exec_events_per_exec_call = NULL;
- gnu_ops.to_has_exited = NULL;
- gnu_ops.to_mourn_inferior = gnu_mourn_inferior; /* to_mourn_inferior */
- gnu_ops.to_can_run = gnu_can_run; /* to_can_run */
- gnu_ops.to_notice_signals = 0; /* to_notice_signals */
- gnu_ops.to_thread_alive = gnu_thread_alive; /* to_thread_alive */
- gnu_ops.to_pid_to_str = gnu_pid_to_str; /* to_pid_to_str */
- gnu_ops.to_stop = gnu_stop; /* to_stop */
- gnu_ops.to_pid_to_exec_file = gnu_pid_to_exec_file; /* to_pid_to_exec_file */
- gnu_ops.to_stratum = process_stratum; /* to_stratum */
- gnu_ops.DONT_USE = 0; /* to_next */
- gnu_ops.to_has_all_memory = 1; /* to_has_all_memory */
- gnu_ops.to_has_memory = 1; /* to_has_memory */
- gnu_ops.to_has_stack = 1; /* to_has_stack */
- gnu_ops.to_has_registers = 1; /* to_has_registers */
- gnu_ops.to_has_execution = 1; /* to_has_execution */
- gnu_ops.to_sections = 0; /* sections */
- gnu_ops.to_sections_end = 0; /* sections_end */
- gnu_ops.to_magic = OPS_MAGIC; /* to_magic */
-} /* init_gnu_ops */
-
-
-/* User task commands. */
-
-struct cmd_list_element *set_task_cmd_list = 0;
-struct cmd_list_element *show_task_cmd_list = 0;
-/* User thread commands. */
-
-/* Commands with a prefix of `set/show thread'. */
-extern struct cmd_list_element *thread_cmd_list;
-struct cmd_list_element *set_thread_cmd_list = NULL;
-struct cmd_list_element *show_thread_cmd_list = NULL;
-
-/* Commands with a prefix of `set/show thread default'. */
-struct cmd_list_element *set_thread_default_cmd_list = NULL;
-struct cmd_list_element *show_thread_default_cmd_list = NULL;
-
-static void
-set_thread_cmd (char *args, int from_tty)
-{
- printf_unfiltered ("\"set thread\" must be followed by the name of a thread property, or \"default\".\n");
-}
-
-static void
-show_thread_cmd (char *args, int from_tty)
-{
- printf_unfiltered ("\"show thread\" must be followed by the name of a thread property, or \"default\".\n");
-}
-
-static void
-set_thread_default_cmd (char *args, int from_tty)
-{
- printf_unfiltered ("\"set thread default\" must be followed by the name of a thread property.\n");
-}
-
-static void
-show_thread_default_cmd (char *args, int from_tty)
-{
- printf_unfiltered ("\"show thread default\" must be followed by the name of a thread property.\n");
-}
-
-static int
-parse_int_arg (char *args, char *cmd_prefix)
-{
- if (args)
- {
- char *arg_end;
- int val = strtoul (args, &arg_end, 10);
- if (*args && *arg_end == '\0')
- return val;
- }
- error ("Illegal argument for \"%s\" command, should be an integer.", cmd_prefix);
-}
-
-static int
-_parse_bool_arg (char *args, char *t_val, char *f_val, char *cmd_prefix)
-{
- if (!args || strcmp (args, t_val) == 0)
- return 1;
- else if (strcmp (args, f_val) == 0)
- return 0;
- else
- error ("Illegal argument for \"%s\" command, should be \"%s\" or \"%s\".",
- cmd_prefix, t_val, f_val);
-}
-
-#define parse_bool_arg(args, cmd_prefix) \
- _parse_bool_arg (args, "on", "off", cmd_prefix)
-
-static void
-check_empty (char *args, char *cmd_prefix)
-{
- if (args)
- error ("Garbage after \"%s\" command: `%s'", cmd_prefix, args);
-}
-
-/* Returns the alive thread named by INFERIOR_PID, or signals an error. */
-static struct proc *
-cur_thread (void)
-{
- struct inf *inf = cur_inf ();
- struct proc *thread = inf_tid_to_thread (inf, PIDGET (inferior_ptid));
- if (!thread)
- error ("No current thread.");
- return thread;
-}
-
-/* Returns the current inferior, but signals an error if it has no task. */
-static struct inf *
-active_inf (void)
-{
- struct inf *inf = cur_inf ();
- if (!inf->task)
- error ("No current process.");
- return inf;
-}
-
-
-static void
-set_task_pause_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
- int old_sc = inf->pause_sc;
-
- inf->pause_sc = parse_bool_arg (args, "set task pause");
-
- if (old_sc == 0 && inf->pause_sc != 0)
- /* If the task is currently unsuspended, immediately suspend it,
- otherwise wait until the next time it gets control. */
- inf_suspend (inf);
-}
-
-static void
-show_task_pause_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
- check_empty (args, "show task pause");
- printf_unfiltered ("The inferior task %s suspended while gdb has control.\n",
- inf->task
- ? (inf->pause_sc == 0 ? "isn't" : "is")
- : (inf->pause_sc == 0 ? "won't be" : "will be"));
-}
-
-static void
-set_task_detach_sc_cmd (char *args, int from_tty)
-{
- cur_inf ()->detach_sc = parse_int_arg (args, "set task detach-suspend-count");
-}
-
-static void
-show_task_detach_sc_cmd (char *args, int from_tty)
-{
- check_empty (args, "show task detach-suspend-count");
- printf_unfiltered ("The inferior task will be left with a suspend count of %d when detaching.\n",
- cur_inf ()->detach_sc);
-}
-
-
-static void
-set_thread_default_pause_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
- inf->default_thread_pause_sc =
- parse_bool_arg (args, "set thread default pause") ? 0 : 1;
-}
-
-static void
-show_thread_default_pause_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
- int sc = inf->default_thread_pause_sc;
- check_empty (args, "show thread default pause");
- printf_unfiltered ("New threads %s suspended while gdb has control%s.\n",
- sc ? "are" : "aren't",
- !sc && inf->pause_sc ? " (but the task is)" : "");
-}
-
-static void
-set_thread_default_run_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
- inf->default_thread_run_sc =
- parse_bool_arg (args, "set thread default run") ? 0 : 1;
-}
-
-static void
-show_thread_default_run_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
- check_empty (args, "show thread default run");
- printf_unfiltered ("New threads %s allowed to run.\n",
- inf->default_thread_run_sc == 0 ? "are" : "aren't");
-}
-
-static void
-set_thread_default_detach_sc_cmd (char *args, int from_tty)
-{
- cur_inf ()->default_thread_detach_sc =
- parse_int_arg (args, "set thread default detach-suspend-count");
-}
-
-static void
-show_thread_default_detach_sc_cmd (char *args, int from_tty)
-{
- check_empty (args, "show thread default detach-suspend-count");
- printf_unfiltered ("New threads will get a detach-suspend-count of %d.\n",
- cur_inf ()->default_thread_detach_sc);
-}
-
-
-/* Steal a send right called NAME in the inferior task, and make it PROC's
- saved exception port. */
-static void
-steal_exc_port (struct proc *proc, mach_port_t name)
-{
- error_t err;
- mach_port_t port;
- mach_msg_type_name_t port_type;
-
- if (!proc || !proc->inf->task)
- error ("No inferior task.");
-
- err = mach_port_extract_right (proc->inf->task->port,
- name, MACH_MSG_TYPE_COPY_SEND,
- &port, &port_type);
- if (err)
- error ("Couldn't extract send right %d from inferior: %s",
- name, strerror (err));
-
- if (proc->saved_exc_port)
- /* Get rid of our reference to the old one. */
- mach_port_deallocate (mach_task_self (), proc->saved_exc_port);
-
- proc->saved_exc_port = port;
-
- if (!proc->exc_port)
- /* If PROC is a thread, we may not have set its exception port before.
- We can't use proc_steal_exc_port because it also sets saved_exc_port. */
- {
- proc->exc_port = proc->inf->event_port;
- err = proc_set_exception_port (proc, proc->exc_port);
- error ("Can't set exception port for %s: %s",
- proc_string (proc), strerror (err));
- }
-}
-
-static void
-set_task_exc_port_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
- if (!args)
- error ("No argument to \"set task exception-port\" command.");
- steal_exc_port (inf->task, parse_and_eval_address (args));
-}
-
-static void
-set_stopped_cmd (char *args, int from_tty)
-{
- cur_inf ()->stopped = _parse_bool_arg (args, "yes", "no", "set stopped");
-}
-
-static void
-show_stopped_cmd (char *args, int from_tty)
-{
- struct inf *inf = active_inf ();
- check_empty (args, "show stopped");
- printf_unfiltered ("The inferior process %s stopped.\n",
- inf->stopped ? "is" : "isn't");
-}
-
-static void
-set_sig_thread_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
-
- if (!args || (!isdigit (*args) && strcmp (args, "none") != 0))
- error ("Illegal argument to \"set signal-thread\" command.\n"
- "Should be an integer thread ID, or `none'.");
-
- if (strcmp (args, "none") == 0)
- inf->signal_thread = 0;
- else
- {
- int tid = PIDGET (thread_id_to_pid (atoi (args)));
- if (tid < 0)
- error ("Thread ID %s not known. Use the \"info threads\" command to\n"
- "see the IDs of currently known threads.", args);
- inf->signal_thread = inf_tid_to_thread (inf, tid);
- }
-}
-
-static void
-show_sig_thread_cmd (char *args, int from_tty)
-{
- struct inf *inf = active_inf ();
- check_empty (args, "show signal-thread");
- if (inf->signal_thread)
- printf_unfiltered ("The signal thread is %s.\n",
- proc_string (inf->signal_thread));
- else
- printf_unfiltered ("There is no signal thread.\n");
-}
-
-
-static void
-set_signals_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
-
- inf->want_signals = parse_bool_arg (args, "set signals");
-
- if (inf->task && inf->want_signals != inf->traced)
- /* Make this take effect immediately in a running process. */
- inf_set_traced (inf, inf->want_signals);
-}
-
-static void
-show_signals_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
- check_empty (args, "show signals");
- printf_unfiltered ("The inferior process's signals %s intercepted.\n",
- inf->task
- ? (inf->traced ? "are" : "aren't")
- : (inf->want_signals ? "will be" : "won't be"));
-}
-
-static void
-set_exceptions_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
- int val = parse_bool_arg (args, "set exceptions");
-
- if (inf->task && inf->want_exceptions != val)
- /* Make this take effect immediately in a running process. */
- /* XXX */ ;
-
- inf->want_exceptions = val;
-}
-
-static void
-show_exceptions_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
- check_empty (args, "show exceptions");
- printf_unfiltered ("Exceptions in the inferior %s trapped.\n",
- inf->task
- ? (inf->want_exceptions ? "are" : "aren't")
- : (inf->want_exceptions ? "will be" : "won't be"));
-}
-
-
-static void
-set_task_cmd (char *args, int from_tty)
-{
- printf_unfiltered ("\"set task\" must be followed by the name"
- " of a task property.\n");
-}
-
-static void
-show_task_cmd (char *args, int from_tty)
-{
- struct inf *inf = cur_inf ();
-
- check_empty (args, "show task");
-
- show_signals_cmd (0, from_tty);
- show_exceptions_cmd (0, from_tty);
- show_task_pause_cmd (0, from_tty);
-
- if (inf->pause_sc == 0)
- show_thread_default_pause_cmd (0, from_tty);
- show_thread_default_run_cmd (0, from_tty);
-
- if (inf->task)
- {
- show_stopped_cmd (0, from_tty);
- show_sig_thread_cmd (0, from_tty);
- }
-
- if (inf->detach_sc != 0)
- show_task_detach_sc_cmd (0, from_tty);
- if (inf->default_thread_detach_sc != 0)
- show_thread_default_detach_sc_cmd (0, from_tty);
-}
-
-
-static void
-set_noninvasive_cmd (char *args, int from_tty)
-{
- /* Invert the sense of the arg for each component. */
- char *inv_args = parse_bool_arg (args, "set noninvasive") ? "off" : "on";
-
- set_task_pause_cmd (inv_args, from_tty);
- set_signals_cmd (inv_args, from_tty);
- set_exceptions_cmd (inv_args, from_tty);
-}
-
-
-static void
-info_port_rights (char *args, mach_port_type_t only)
-{
- struct inf *inf = active_inf ();
- struct value *vmark = value_mark ();
-
- if (args)
- /* Explicit list of port rights. */
- {
- while (*args)
- {
- struct value *val = parse_to_comma_and_eval (&args);
- long right = value_as_long (val);
- error_t err =
- print_port_info (right, 0, inf->task->port, PORTINFO_DETAILS,
- stdout);
- if (err)
- error ("%ld: %s.", right, strerror (err));
- }
- }
- else
- /* Print all of them. */
- {
- error_t err =
- print_task_ports_info (inf->task->port, only, PORTINFO_DETAILS,
- stdout);
- if (err)
- error ("%s.", strerror (err));
- }
-
- value_free_to_mark (vmark);
-}
-
-static void
-info_send_rights_cmd (char *args, int from_tty)
-{
- info_port_rights (args, MACH_PORT_TYPE_SEND);
-}
-
-static void
-info_recv_rights_cmd (char *args, int from_tty)
-{
- info_port_rights (args, MACH_PORT_TYPE_RECEIVE);
-}
-
-static void
-info_port_sets_cmd (char *args, int from_tty)
-{
- info_port_rights (args, MACH_PORT_TYPE_PORT_SET);
-}
-
-static void
-info_dead_names_cmd (char *args, int from_tty)
-{
- info_port_rights (args, MACH_PORT_TYPE_DEAD_NAME);
-}
-
-static void
-info_port_rights_cmd (char *args, int from_tty)
-{
- info_port_rights (args, ~0);
-}
-
-
-static void
-add_task_commands (void)
-{
- add_cmd ("pause", class_run, set_thread_default_pause_cmd,
- "Set whether the new threads are suspended while gdb has control.\n\
-This property normally has no effect because the whole task is\n\
-suspended, however, that may be disabled with \"set task pause off\".\n\
-The default value is \"off\".",
- &set_thread_default_cmd_list);
- add_cmd ("pause", no_class, show_thread_default_pause_cmd,
- "Show whether new threads are suspended while gdb has control.",
- &show_thread_default_cmd_list);
-
- add_cmd ("run", class_run, set_thread_default_run_cmd,
- "Set whether new threads are allowed to run \
-(once gdb has noticed them).",
- &set_thread_default_cmd_list);
- add_cmd ("run", no_class, show_thread_default_run_cmd,
- "Show whether new threads are allowed to run \
-(once gdb has noticed them).",
- &show_thread_default_cmd_list);
-
- add_cmd ("detach-suspend-count", class_run, set_thread_default_detach_sc_cmd,
- "Set the default detach-suspend-count value for new threads.",
- &set_thread_default_cmd_list);
- add_cmd ("detach-suspend-count", no_class, show_thread_default_detach_sc_cmd,
- "Show the default detach-suspend-count value for new threads.",
- &show_thread_default_cmd_list);
-
- add_cmd ("signals", class_run, set_signals_cmd,
- "Set whether the inferior process's signals will be intercepted.\n\
-Mach exceptions (such as breakpoint traps) are not affected.",
- &setlist);
- add_alias_cmd ("sigs", "signals", class_run, 1, &setlist);
- add_cmd ("signals", no_class, show_signals_cmd,
- "Show whether the inferior process's signals will be intercepted.",
- &showlist);
- add_alias_cmd ("sigs", "signals", no_class, 1, &showlist);
-
- add_cmd ("signal-thread", class_run, set_sig_thread_cmd,
- "Set the thread that gdb thinks is the libc signal thread.\n\
-This thread is run when delivering a signal to a non-stopped process.",
- &setlist);
- add_alias_cmd ("sigthread", "signal-thread", class_run, 1, &setlist);
- add_cmd ("signal-thread", no_class, show_sig_thread_cmd,
- "Set the thread that gdb thinks is the libc signal thread.",
- &showlist);
- add_alias_cmd ("sigthread", "signal-thread", no_class, 1, &showlist);
-
- add_cmd ("stopped", class_run, set_stopped_cmd,
- "Set whether gdb thinks the inferior process is stopped \
-as with SIGSTOP.\n\
-Stopped process will be continued by sending them a signal.",
- &setlist);
- add_cmd ("stopped", no_class, show_signals_cmd,
- "Show whether gdb thinks the inferior process is stopped \
-as with SIGSTOP.",
- &showlist);
-
- add_cmd ("exceptions", class_run, set_exceptions_cmd,
- "Set whether exceptions in the inferior process will be trapped.\n\
-When exceptions are turned off, neither breakpoints nor single-stepping\n\
-will work.",
- &setlist);
- /* Allow `set exc' despite conflict with `set exception-port'. */
- add_alias_cmd ("exc", "exceptions", class_run, 1, &setlist);
- add_cmd ("exceptions", no_class, show_exceptions_cmd,
- "Show whether exceptions in the inferior process will be trapped.",
- &showlist);
-
- add_prefix_cmd ("task", no_class, set_task_cmd,
- "Command prefix for setting task attributes.",
- &set_task_cmd_list, "set task ", 0, &setlist);
- add_prefix_cmd ("task", no_class, show_task_cmd,
- "Command prefix for showing task attributes.",
- &show_task_cmd_list, "show task ", 0, &showlist);
-
- add_cmd ("pause", class_run, set_task_pause_cmd,
- "Set whether the task is suspended while gdb has control.\n\
-A value of \"on\" takes effect immediately, otherwise nothing happens\n\
-until the next time the program is continued.\n\
-When setting this to \"off\", \"set thread default pause on\" can be\n\
-used to pause individual threads by default instead.",
- &set_task_cmd_list);
- add_cmd ("pause", no_class, show_task_pause_cmd,
- "Show whether the task is suspended while gdb has control.",
- &show_task_cmd_list);
-
- add_cmd ("detach-suspend-count", class_run, set_task_detach_sc_cmd,
- "Set the suspend count will leave on the thread when detaching.",
- &set_task_cmd_list);
- add_cmd ("detach-suspend-count", no_class, show_task_detach_sc_cmd,
- "Show the suspend count will leave on the thread when detaching.",
- &show_task_cmd_list);
-
- add_cmd ("exception-port", no_class, set_task_exc_port_cmd,
- "Set the task exception port to which we forward exceptions.\n\
-The argument should be the value of the send right in the task.",
- &set_task_cmd_list);
- add_alias_cmd ("excp", "exception-port", no_class, 1, &set_task_cmd_list);
- add_alias_cmd ("exc-port", "exception-port", no_class, 1,
- &set_task_cmd_list);
-
- /* A convenient way of turning on all options require to noninvasively
- debug running tasks. */
- add_cmd ("noninvasive", no_class, set_noninvasive_cmd,
- "Set task options so that we interfere as little as possible.\n\
-This is the same as setting `task pause', `exceptions', and\n\
-`signals' to the opposite value.",
- &setlist);
-
- /* Commands to show information about the task's ports. */
- add_cmd ("send-rights", class_info, info_send_rights_cmd,
- "Show information about the task's send rights",
- &infolist);
- add_cmd ("receive-rights", class_info, info_recv_rights_cmd,
- "Show information about the task's receive rights",
- &infolist);
- add_cmd ("port-rights", class_info, info_port_rights_cmd,
- "Show information about the task's port rights",
- &infolist);
- add_cmd ("port-sets", class_info, info_port_sets_cmd,
- "Show information about the task's port sets",
- &infolist);
- add_cmd ("dead-names", class_info, info_dead_names_cmd,
- "Show information about the task's dead names",
- &infolist);
- add_info_alias ("ports", "port-rights", 1);
- add_info_alias ("port", "port-rights", 1);
- add_info_alias ("psets", "port-sets", 1);
-}
-
-
-static void
-set_thread_pause_cmd (char *args, int from_tty)
-{
- struct proc *thread = cur_thread ();
- int old_sc = thread->pause_sc;
- thread->pause_sc = parse_bool_arg (args, "set thread pause");
- if (old_sc == 0 && thread->pause_sc != 0 && thread->inf->pause_sc == 0)
- /* If the task is currently unsuspended, immediately suspend it,
- otherwise wait until the next time it gets control. */
- inf_suspend (thread->inf);
-}
-
-static void
-show_thread_pause_cmd (char *args, int from_tty)
-{
- struct proc *thread = cur_thread ();
- int sc = thread->pause_sc;
- check_empty (args, "show task pause");
- printf_unfiltered ("Thread %s %s suspended while gdb has control%s.\n",
- proc_string (thread),
- sc ? "is" : "isn't",
- !sc && thread->inf->pause_sc ? " (but the task is)" : "");
-}
-
-static void
-set_thread_run_cmd (char *args, int from_tty)
-{
- struct proc *thread = cur_thread ();
- thread->run_sc = parse_bool_arg (args, "set thread run") ? 0 : 1;
-}
-
-static void
-show_thread_run_cmd (char *args, int from_tty)
-{
- struct proc *thread = cur_thread ();
- check_empty (args, "show thread run");
- printf_unfiltered ("Thread %s %s allowed to run.",
- proc_string (thread),
- thread->run_sc == 0 ? "is" : "isn't");
-}
-
-static void
-set_thread_detach_sc_cmd (char *args, int from_tty)
-{
- cur_thread ()->detach_sc = parse_int_arg (args,
- "set thread detach-suspend-count");
-}
-
-static void
-show_thread_detach_sc_cmd (char *args, int from_tty)
-{
- struct proc *thread = cur_thread ();
- check_empty (args, "show thread detach-suspend-count");
- printf_unfiltered ("Thread %s will be left with a suspend count"
- " of %d when detaching.\n",
- proc_string (thread),
- thread->detach_sc);
-}
-
-static void
-set_thread_exc_port_cmd (char *args, int from_tty)
-{
- struct proc *thread = cur_thread ();
- if (!args)
- error ("No argument to \"set thread exception-port\" command.");
- steal_exc_port (thread, parse_and_eval_address (args));
-}
-
-#if 0
-static void
-show_thread_cmd (char *args, int from_tty)
-{
- struct proc *thread = cur_thread ();
- check_empty (args, "show thread");
- show_thread_run_cmd (0, from_tty);
- show_thread_pause_cmd (0, from_tty);
- if (thread->detach_sc != 0)
- show_thread_detach_sc_cmd (0, from_tty);
-}
-#endif
-
-static void
-thread_takeover_sc_cmd (char *args, int from_tty)
-{
- struct proc *thread = cur_thread ();
- thread_basic_info_data_t _info;
- thread_basic_info_t info = &_info;
- mach_msg_type_number_t info_len = THREAD_BASIC_INFO_COUNT;
- error_t err =
- thread_info (thread->port, THREAD_BASIC_INFO, (int *) &info, &info_len);
- if (err)
- error ("%s.", strerror (err));
- thread->sc = info->suspend_count;
- if (from_tty)
- printf_unfiltered ("Suspend count was %d.\n", thread->sc);
- if (info != &_info)
- vm_deallocate (mach_task_self (), (vm_address_t) info,
- info_len * sizeof (int));
-}
-
-
-static void
-add_thread_commands (void)
-{
- add_prefix_cmd ("thread", no_class, set_thread_cmd,
- "Command prefix for setting thread properties.",
- &set_thread_cmd_list, "set thread ", 0, &setlist);
- add_prefix_cmd ("default", no_class, show_thread_cmd,
- "Command prefix for setting default thread properties.",
- &set_thread_default_cmd_list, "set thread default ", 0,
- &set_thread_cmd_list);
- add_prefix_cmd ("thread", no_class, set_thread_default_cmd,
- "Command prefix for showing thread properties.",
- &show_thread_cmd_list, "show thread ", 0, &showlist);
- add_prefix_cmd ("default", no_class, show_thread_default_cmd,
- "Command prefix for showing default thread properties.",
- &show_thread_default_cmd_list, "show thread default ", 0,
- &show_thread_cmd_list);
-
- add_cmd ("pause", class_run, set_thread_pause_cmd,
- "Set whether the current thread is suspended \
-while gdb has control.\n\
-A value of \"on\" takes effect immediately, otherwise nothing happens\n\
-until the next time the program is continued. This property normally\n\
-has no effect because the whole task is suspended, however, that may\n\
-be disabled with \"set task pause off\".\n\
-The default value is \"off\".",
- &set_thread_cmd_list);
- add_cmd ("pause", no_class, show_thread_pause_cmd,
- "Show whether the current thread is suspended \
-while gdb has control.",
- &show_thread_cmd_list);
-
- add_cmd ("run", class_run, set_thread_run_cmd,
- "Set whether the current thread is allowed to run.",
- &set_thread_cmd_list);
- add_cmd ("run", no_class, show_thread_run_cmd,
- "Show whether the current thread is allowed to run.",
- &show_thread_cmd_list);
-
- add_cmd ("detach-suspend-count", class_run, set_thread_detach_sc_cmd,
- "Set the suspend count will leave on the thread when detaching.\n\
-Note that this is relative to suspend count when gdb noticed the thread;\n\
-use the `thread takeover-suspend-count' to force it to an absolute value.",
- &set_thread_cmd_list);
- add_cmd ("detach-suspend-count", no_class, show_thread_detach_sc_cmd,
- "Show the suspend count will leave on the thread when detaching.\n\
-Note that this is relative to suspend count when gdb noticed the thread;\n\
-use the `thread takeover-suspend-count' to force it to an absolute value.",
- &show_thread_cmd_list);
-
- add_cmd ("exception-port", no_class, set_thread_exc_port_cmd,
- "Set the thread exception port to which we forward exceptions.\n\
-This overrides the task exception port.\n\
-The argument should be the value of the send right in the task.",
- &set_thread_cmd_list);
- add_alias_cmd ("excp", "exception-port", no_class, 1, &set_thread_cmd_list);
- add_alias_cmd ("exc-port", "exception-port", no_class, 1,
- &set_thread_cmd_list);
-
- add_cmd ("takeover-suspend-count", no_class, thread_takeover_sc_cmd,
- "Force the threads absolute suspend-count to be gdb's.\n\
-Prior to giving this command, gdb's thread suspend-counts are relative\n\
-to the thread's initial suspend-count when gdb notices the threads.",
- &thread_cmd_list);
-}
-
-
-void
-_initialize_gnu_nat (void)
-{
- proc_server = getproc ();
-
- init_gnu_ops ();
- add_target (&gnu_ops);
-
- add_task_commands ();
- add_thread_commands ();
- add_set_cmd ("gnu-debug", class_maintenance,
- var_boolean, (char *) &gnu_debug_flag,
- "Set debugging output for the gnu backend.", &maintenancelist);
-}
-
-#ifdef FLUSH_INFERIOR_CACHE
-
-/* When over-writing code on some machines the I-Cache must be flushed
- explicitly, because it is not kept coherent by the lazy hardware.
- This definitely includes breakpoints, for instance, or else we
- end up looping in mysterious Bpt traps */
-
-void
-flush_inferior_icache (CORE_ADDR pc, int amount)
-{
- vm_machine_attribute_val_t flush = MATTR_VAL_ICACHE_FLUSH;
- error_t ret;
-
- ret = vm_machine_attribute (current_inferior->task->port,
- pc,
- amount,
- MATTR_CACHE,
- &flush);
- if (ret != KERN_SUCCESS)
- warning ("Error flushing inferior's cache : %s", strerror (ret));
-}
-#endif /* FLUSH_INFERIOR_CACHE */
diff --git a/contrib/gdb/gdb/gnu-nat.h b/contrib/gdb/gdb/gnu-nat.h
deleted file mode 100644
index cc430835f2c8..000000000000
--- a/contrib/gdb/gdb/gnu-nat.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Common things used by the various *gnu-nat.c files
- Copyright 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
-
- The GNU Hurd is free software; you can redistribute 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.
-
- The GNU Hurd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public 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 __GNU_NAT_H__
-#define __GNU_NAT_H__
-
-#include <unistd.h>
-#include <mach.h>
-
-struct inf;
-
-extern struct inf *current_inferior;
-
-/* Converts a GDB pid to a struct proc. */
-struct proc *inf_tid_to_thread (struct inf *inf, int tid);
-
-/* Makes sure that INF's thread list is synced with the actual process. */
-int inf_update_procs (struct inf *inf);
-
-/* A proc is either a thread, or the task (there can only be one task proc
- because it always has the same TID, PROC_TID_TASK). */
-struct proc
- {
- thread_t port; /* The task or thread port. */
- int tid; /* The GDB pid (actually a thread id). */
- int num; /* An id number for threads, to print. */
-
- mach_port_t saved_exc_port; /* The task/thread's real exception port. */
- mach_port_t exc_port; /* Our replacement, which for. */
-
- int sc; /* Desired suspend count. */
- int cur_sc; /* Implemented suspend count. */
- int run_sc; /* Default sc when the program is running. */
- int pause_sc; /* Default sc when gdb has control. */
- int resume_sc; /* Sc resulting from the last resume. */
- int detach_sc; /* SC to leave around when detaching
- from program. */
-
- thread_state_data_t state; /* Registers, &c. */
- int state_valid:1; /* True if STATE is up to date. */
- int state_changed:1;
-
- int aborted:1; /* True if thread_abort has been called. */
- int dead:1; /* We happen to know it's actually dead. */
-
- /* Bit mask of registers fetched by gdb. This is used when we re-fetch
- STATE after aborting the thread, to detect that gdb may have out-of-date
- information. */
- unsigned long fetched_regs;
-
- struct inf *inf; /* Where we come from. */
-
- struct proc *next;
- };
-
-/* The task has a thread entry with this TID. */
-#define PROC_TID_TASK (-1)
-
-#define proc_is_task(proc) ((proc)->tid == PROC_TID_TASK)
-#define proc_is_thread(proc) ((proc)->tid != PROC_TID_TASK)
-
-extern int __proc_pid (struct proc *proc);
-
-/* Make sure that the state field in PROC is up to date, and return a
- pointer to it, or 0 if something is wrong. If WILL_MODIFY is true,
- makes sure that the thread is stopped and aborted first, and sets
- the state_changed field in PROC to true. */
-extern thread_state_t proc_get_state (struct proc *proc, int will_modify);
-
-/* Return printable description of proc. */
-extern char *proc_string (struct proc *proc);
-
-#define proc_debug(_proc, msg, args...) \
- do { struct proc *__proc = (_proc); \
- debug ("{proc %d/%d %p}: " msg, \
- __proc_pid (__proc), __proc->tid, __proc , ##args); } while (0)
-
-extern int gnu_debug_flag;
-
-#define debug(msg, args...) \
- do { if (gnu_debug_flag) \
- fprintf_unfiltered (gdb_stdlog, "%s: " msg "\r\n", __FUNCTION__ , ##args); } while (0)
-
-#endif /* __GNU_NAT_H__ */
diff --git a/contrib/gdb/gdb/gnu-regex.c b/contrib/gdb/gdb/gnu-regex.c
deleted file mode 100644
index 84db70f79520..000000000000
--- a/contrib/gdb/gdb/gnu-regex.c
+++ /dev/null
@@ -1,5797 +0,0 @@
-/* Extended regular expression matching and search library,
- version 0.12.
- (Implements POSIX draft P1003.2/D11.2, except for some of the
- internationalization features.)
- Copyright (C) 1993, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
-
- NOTE: The canonical source of this file is maintained with the
- GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
-
- This program is free software; you can redistribute 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. */
-
-/* AIX requires this to be the first thing in the file. */
-#if defined _AIX && !defined REGEX_MALLOC
- #pragma alloca
-#endif
-
-#undef _GNU_SOURCE
-#define _GNU_SOURCE
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifndef PARAMS
-# if defined __GNUC__ || (defined __STDC__ && __STDC__)
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif /* GCC. */
-#endif /* Not PARAMS. */
-
-#if defined STDC_HEADERS && !defined emacs
-# include <stddef.h>
-#else
-/* We need this for `gnu-regex.h', and perhaps for the Emacs include files. */
-# include <sys/types.h>
-#endif
-
-/* For platform which support the ISO C amendement 1 functionality we
- support user defined character classes. */
-#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
- /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
-# include <wchar.h>
-# include <wctype.h>
-#endif
-
-/* This is for other GNU distributions with internationalized messages. */
-/* CYGNUS LOCAL: ../intl will handle this for us */
-#ifdef ENABLE_NLS
-# include <libintl.h>
-#else
-# define gettext(msgid) (msgid)
-#endif
-
-#ifndef gettext_noop
-/* This define is so xgettext can find the internationalizable
- strings. */
-# define gettext_noop(String) String
-#endif
-
-/* The `emacs' switch turns on certain matching commands
- that make sense only in Emacs. */
-#ifdef emacs
-
-# include "lisp.h"
-# include "buffer.h"
-# include "syntax.h"
-
-#else /* not emacs */
-
-/* If we are not linking with Emacs proper,
- we can't use the relocating allocator
- even if config.h says that we can. */
-# undef REL_ALLOC
-
-# if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-# else
-char *malloc ();
-char *realloc ();
-# endif
-
-/* When used in Emacs's lib-src, we need to get bzero and bcopy somehow.
- If nothing else has been done, use the method below. */
-# ifdef INHIBIT_STRING_HEADER
-# if !(defined HAVE_BZERO && defined HAVE_BCOPY)
-# if !defined bzero && !defined bcopy
-# undef INHIBIT_STRING_HEADER
-# endif
-# endif
-# endif
-
-/* This is the normal way of making sure we have a bcopy and a bzero.
- This is used in most programs--a few other programs avoid this
- by defining INHIBIT_STRING_HEADER. */
-# ifndef INHIBIT_STRING_HEADER
-# if defined HAVE_STRING_H || defined STDC_HEADERS || defined _LIBC
-# include <string.h>
-# ifndef bzero
-# ifndef _LIBC
-# define bzero(s, n) (memset (s, '\0', n), (s))
-# else
-# define bzero(s, n) __bzero (s, n)
-# endif
-# endif
-# else
-# include <strings.h>
-# ifndef memcmp
-# define memcmp(s1, s2, n) bcmp (s1, s2, n)
-# endif
-# ifndef memcpy
-# define memcpy(d, s, n) (bcopy (s, d, n), (d))
-# endif
-# endif
-# endif
-
-/* Define the syntax stuff for \<, \>, etc. */
-
-/* This must be nonzero for the wordchar and notwordchar pattern
- commands in re_match_2. */
-# ifndef Sword
-# define Sword 1
-# endif
-
-# ifdef SWITCH_ENUM_BUG
-# define SWITCH_ENUM_CAST(x) ((int)(x))
-# else
-# define SWITCH_ENUM_CAST(x) (x)
-# endif
-
-/* How many characters in the character set. */
-# define CHAR_SET_SIZE 256
-
-/* GDB LOCAL: define _REGEX_RE_COMP to get BSD style re_comp and re_exec */
-#ifndef _REGEX_RE_COMP
-#define _REGEX_RE_COMP
-#endif
-
-# ifdef SYNTAX_TABLE
-
-extern char *re_syntax_table;
-
-# else /* not SYNTAX_TABLE */
-
-static char re_syntax_table[CHAR_SET_SIZE];
-
-static void
-init_syntax_once ()
-{
- register int c;
- static int done = 0;
-
- if (done)
- return;
-
- bzero (re_syntax_table, sizeof re_syntax_table);
-
- for (c = 'a'; c <= 'z'; c++)
- re_syntax_table[c] = Sword;
-
- for (c = 'A'; c <= 'Z'; c++)
- re_syntax_table[c] = Sword;
-
- for (c = '0'; c <= '9'; c++)
- re_syntax_table[c] = Sword;
-
- re_syntax_table['_'] = Sword;
-
- done = 1;
-}
-
-# endif /* not SYNTAX_TABLE */
-
-# define SYNTAX(c) re_syntax_table[c]
-
-#endif /* not emacs */
-
-/* Get the interface, including the syntax bits. */
-/* CYGNUS LOCAL: call it gnu-regex.h, not regex.h, to avoid name conflicts */
-#include "gnu-regex.h"
-
-/* isalpha etc. are used for the character classes. */
-#include <ctype.h>
-
-/* Jim Meyering writes:
-
- "... Some ctype macros are valid only for character codes that
- isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
- using /bin/cc or gcc but without giving an ansi option). So, all
- ctype uses should be through macros like ISPRINT... If
- STDC_HEADERS is defined, then autoconf has verified that the ctype
- macros don't need to be guarded with references to isascii. ...
- Defining isascii to 1 should let any compiler worth its salt
- eliminate the && through constant folding."
- Solaris defines some of these symbols so we must undefine them first. */
-
-#undef ISASCII
-#if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
-# define ISASCII(c) 1
-#else
-# define ISASCII(c) isascii(c)
-#endif
-
-#ifdef isblank
-# define ISBLANK(c) (ISASCII (c) && isblank (c))
-#else
-# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
-#endif
-#ifdef isgraph
-# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
-#else
-# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
-#endif
-
-#undef ISPRINT
-#define ISPRINT(c) (ISASCII (c) && isprint (c))
-#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
-#define ISALNUM(c) (ISASCII (c) && isalnum (c))
-#define ISALPHA(c) (ISASCII (c) && isalpha (c))
-#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
-#define ISLOWER(c) (ISASCII (c) && islower (c))
-#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
-#define ISSPACE(c) (ISASCII (c) && isspace (c))
-#define ISUPPER(c) (ISASCII (c) && isupper (c))
-#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
-
-#ifndef NULL
-# define NULL (void *)0
-#endif
-
-/* We remove any previous definition of `SIGN_EXTEND_CHAR',
- since ours (we hope) works properly with all combinations of
- machines, compilers, `char' and `unsigned char' argument types.
- (Per Bothner suggested the basic approach.) */
-#undef SIGN_EXTEND_CHAR
-#if __STDC__
-# define SIGN_EXTEND_CHAR(c) ((signed char) (c))
-#else /* not __STDC__ */
-/* As in Harbison and Steele. */
-# define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
-#endif
-
-/* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we
- use `alloca' instead of `malloc'. This is because using malloc in
- re_search* or re_match* could cause memory leaks when C-g is used in
- Emacs; also, malloc is slower and causes storage fragmentation. On
- the other hand, malloc is more portable, and easier to debug.
-
- Because we sometimes use alloca, some routines have to be macros,
- not functions -- `alloca'-allocated space disappears at the end of the
- function it is called in. */
-
-#ifdef REGEX_MALLOC
-
-# define REGEX_ALLOCATE malloc
-# define REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize)
-# define REGEX_FREE free
-
-#else /* not REGEX_MALLOC */
-
-/* Emacs already defines alloca, sometimes. */
-# ifndef alloca
-
-/* Make alloca work the best possible way. */
-# ifdef __GNUC__
-# define alloca __builtin_alloca
-# else /* not __GNUC__ */
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# endif /* HAVE_ALLOCA_H */
-# endif /* not __GNUC__ */
-
-# endif /* not alloca */
-
-# define REGEX_ALLOCATE alloca
-
-/* Assumes a `char *destination' variable. */
-# define REGEX_REALLOCATE(source, osize, nsize) \
- (destination = (char *) alloca (nsize), \
- memcpy (destination, source, osize))
-
-/* No need to do anything to free, after alloca. */
-# define REGEX_FREE(arg) ((void)0) /* Do nothing! But inhibit gcc warning. */
-
-#endif /* not REGEX_MALLOC */
-
-/* Define how to allocate the failure stack. */
-
-#if defined REL_ALLOC && defined REGEX_MALLOC
-
-# define REGEX_ALLOCATE_STACK(size) \
- r_alloc (&failure_stack_ptr, (size))
-# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
- r_re_alloc (&failure_stack_ptr, (nsize))
-# define REGEX_FREE_STACK(ptr) \
- r_alloc_free (&failure_stack_ptr)
-
-#else /* not using relocating allocator */
-
-# ifdef REGEX_MALLOC
-
-# define REGEX_ALLOCATE_STACK malloc
-# define REGEX_REALLOCATE_STACK(source, osize, nsize) realloc (source, nsize)
-# define REGEX_FREE_STACK free
-
-# else /* not REGEX_MALLOC */
-
-# define REGEX_ALLOCATE_STACK alloca
-
-# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
- REGEX_REALLOCATE (source, osize, nsize)
-/* No need to explicitly free anything. */
-# define REGEX_FREE_STACK(arg)
-
-# endif /* not REGEX_MALLOC */
-#endif /* not using relocating allocator */
-
-
-/* True if `size1' is non-NULL and PTR is pointing anywhere inside
- `string1' or just past its end. This works if PTR is NULL, which is
- a good thing. */
-#define FIRST_STRING_P(ptr) \
- (size1 && string1 <= (ptr) && (ptr) <= string1 + size1)
-
-/* (Re)Allocate N items of type T using malloc, or fail. */
-#define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t)))
-#define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t)))
-#define RETALLOC_IF(addr, n, t) \
- if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t)
-#define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t)))
-
-#define BYTEWIDTH 8 /* In bits. */
-
-#define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
-
-#undef MAX
-#undef MIN
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-
-typedef char boolean;
-#define false 0
-#define true 1
-
-static int re_match_2_internal PARAMS ((struct re_pattern_buffer *bufp,
- const char *string1, int size1,
- const char *string2, int size2,
- int pos,
- struct re_registers *regs,
- int stop));
-
-/* These are the command codes that appear in compiled regular
- expressions. Some opcodes are followed by argument bytes. A
- command code can specify any interpretation whatsoever for its
- arguments. Zero bytes may appear in the compiled regular expression. */
-
-typedef enum
-{
- no_op = 0,
-
- /* Succeed right away--no more backtracking. */
- succeed,
-
- /* Followed by one byte giving n, then by n literal bytes. */
- exactn,
-
- /* Matches any (more or less) character. */
- anychar,
-
- /* Matches any one char belonging to specified set. First
- following byte is number of bitmap bytes. Then come bytes
- for a bitmap saying which chars are in. Bits in each byte
- are ordered low-bit-first. A character is in the set if its
- bit is 1. A character too large to have a bit in the map is
- automatically not in the set. */
- charset,
-
- /* Same parameters as charset, but match any character that is
- not one of those specified. */
- charset_not,
-
- /* Start remembering the text that is matched, for storing in a
- register. Followed by one byte with the register number, in
- the range 0 to one less than the pattern buffer's re_nsub
- field. Then followed by one byte with the number of groups
- inner to this one. (This last has to be part of the
- start_memory only because we need it in the on_failure_jump
- of re_match_2.) */
- start_memory,
-
- /* Stop remembering the text that is matched and store it in a
- memory register. Followed by one byte with the register
- number, in the range 0 to one less than `re_nsub' in the
- pattern buffer, and one byte with the number of inner groups,
- just like `start_memory'. (We need the number of inner
- groups here because we don't have any easy way of finding the
- corresponding start_memory when we're at a stop_memory.) */
- stop_memory,
-
- /* Match a duplicate of something remembered. Followed by one
- byte containing the register number. */
- duplicate,
-
- /* Fail unless at beginning of line. */
- begline,
-
- /* Fail unless at end of line. */
- endline,
-
- /* Succeeds if at beginning of buffer (if emacs) or at beginning
- of string to be matched (if not). */
- begbuf,
-
- /* Analogously, for end of buffer/string. */
- endbuf,
-
- /* Followed by two byte relative address to which to jump. */
- jump,
-
- /* Same as jump, but marks the end of an alternative. */
- jump_past_alt,
-
- /* Followed by two-byte relative address of place to resume at
- in case of failure. */
- on_failure_jump,
-
- /* Like on_failure_jump, but pushes a placeholder instead of the
- current string position when executed. */
- on_failure_keep_string_jump,
-
- /* Throw away latest failure point and then jump to following
- two-byte relative address. */
- pop_failure_jump,
-
- /* Change to pop_failure_jump if know won't have to backtrack to
- match; otherwise change to jump. This is used to jump
- back to the beginning of a repeat. If what follows this jump
- clearly won't match what the repeat does, such that we can be
- sure that there is no use backtracking out of repetitions
- already matched, then we change it to a pop_failure_jump.
- Followed by two-byte address. */
- maybe_pop_jump,
-
- /* Jump to following two-byte address, and push a dummy failure
- point. This failure point will be thrown away if an attempt
- is made to use it for a failure. A `+' construct makes this
- before the first repeat. Also used as an intermediary kind
- of jump when compiling an alternative. */
- dummy_failure_jump,
-
- /* Push a dummy failure point and continue. Used at the end of
- alternatives. */
- push_dummy_failure,
-
- /* Followed by two-byte relative address and two-byte number n.
- After matching N times, jump to the address upon failure. */
- succeed_n,
-
- /* Followed by two-byte relative address, and two-byte number n.
- Jump to the address N times, then fail. */
- jump_n,
-
- /* Set the following two-byte relative address to the
- subsequent two-byte number. The address *includes* the two
- bytes of number. */
- set_number_at,
-
- wordchar, /* Matches any word-constituent character. */
- notwordchar, /* Matches any char that is not a word-constituent. */
-
- wordbeg, /* Succeeds if at word beginning. */
- wordend, /* Succeeds if at word end. */
-
- wordbound, /* Succeeds if at a word boundary. */
- notwordbound /* Succeeds if not at a word boundary. */
-
-#ifdef emacs
- ,before_dot, /* Succeeds if before point. */
- at_dot, /* Succeeds if at point. */
- after_dot, /* Succeeds if after point. */
-
- /* Matches any character whose syntax is specified. Followed by
- a byte which contains a syntax code, e.g., Sword. */
- syntaxspec,
-
- /* Matches any character whose syntax is not that specified. */
- notsyntaxspec
-#endif /* emacs */
-} re_opcode_t;
-
-/* Common operations on the compiled pattern. */
-
-/* Store NUMBER in two contiguous bytes starting at DESTINATION. */
-
-#define STORE_NUMBER(destination, number) \
- do { \
- (destination)[0] = (number) & 0377; \
- (destination)[1] = (number) >> 8; \
- } while (0)
-
-/* Same as STORE_NUMBER, except increment DESTINATION to
- the byte after where the number is stored. Therefore, DESTINATION
- must be an lvalue. */
-
-#define STORE_NUMBER_AND_INCR(destination, number) \
- do { \
- STORE_NUMBER (destination, number); \
- (destination) += 2; \
- } while (0)
-
-/* Put into DESTINATION a number stored in two contiguous bytes starting
- at SOURCE. */
-
-#define EXTRACT_NUMBER(destination, source) \
- do { \
- (destination) = *(source) & 0377; \
- (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \
- } while (0)
-
-#ifdef DEBUG
-static void extract_number _RE_ARGS ((int *dest, unsigned char *source));
-static void
-extract_number (dest, source)
- int *dest;
- unsigned char *source;
-{
- int temp = SIGN_EXTEND_CHAR (*(source + 1));
- *dest = *source & 0377;
- *dest += temp << 8;
-}
-
-# ifndef EXTRACT_MACROS /* To debug the macros. */
-# undef EXTRACT_NUMBER
-# define EXTRACT_NUMBER(dest, src) extract_number (&dest, src)
-# endif /* not EXTRACT_MACROS */
-
-#endif /* DEBUG */
-
-/* Same as EXTRACT_NUMBER, except increment SOURCE to after the number.
- SOURCE must be an lvalue. */
-
-#define EXTRACT_NUMBER_AND_INCR(destination, source) \
- do { \
- EXTRACT_NUMBER (destination, source); \
- (source) += 2; \
- } while (0)
-
-#ifdef DEBUG
-static void extract_number_and_incr _RE_ARGS ((int *destination,
- unsigned char **source));
-static void
-extract_number_and_incr (destination, source)
- int *destination;
- unsigned char **source;
-{
- extract_number (destination, *source);
- *source += 2;
-}
-
-# ifndef EXTRACT_MACROS
-# undef EXTRACT_NUMBER_AND_INCR
-# define EXTRACT_NUMBER_AND_INCR(dest, src) \
- extract_number_and_incr (&dest, &src)
-# endif /* not EXTRACT_MACROS */
-
-#endif /* DEBUG */
-
-/* If DEBUG is defined, Regex prints many voluminous messages about what
- it is doing (if the variable `debug' is nonzero). If linked with the
- main program in `iregex.c', you can enter patterns and strings
- interactively. And if linked with the main program in `main.c' and
- the other test files, you can run the already-written tests. */
-
-#ifdef DEBUG
-
-/* We use standard I/O for debugging. */
-# include <stdio.h>
-
-/* It is useful to test things that ``must'' be true when debugging. */
-# include <assert.h>
-
-static int debug = 0;
-
-# define DEBUG_STATEMENT(e) e
-# define DEBUG_PRINT1(x) if (debug) printf (x)
-# define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2)
-# define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3)
-# define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4)
-# define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) \
- if (debug) print_partial_compiled_pattern (s, e)
-# define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \
- if (debug) print_double_string (w, s1, sz1, s2, sz2)
-
-
-/* Print the fastmap in human-readable form. */
-
-void
-print_fastmap (fastmap)
- char *fastmap;
-{
- unsigned was_a_range = 0;
- unsigned i = 0;
-
- while (i < (1 << BYTEWIDTH))
- {
- if (fastmap[i++])
- {
- was_a_range = 0;
- putchar (i - 1);
- while (i < (1 << BYTEWIDTH) && fastmap[i])
- {
- was_a_range = 1;
- i++;
- }
- if (was_a_range)
- {
- printf ("-");
- putchar (i - 1);
- }
- }
- }
- putchar ('\n');
-}
-
-
-/* Print a compiled pattern string in human-readable form, starting at
- the START pointer into it and ending just before the pointer END. */
-
-void
-print_partial_compiled_pattern (start, end)
- unsigned char *start;
- unsigned char *end;
-{
- int mcnt, mcnt2;
- unsigned char *p1;
- unsigned char *p = start;
- unsigned char *pend = end;
-
- if (start == NULL)
- {
- printf ("(null)\n");
- return;
- }
-
- /* Loop over pattern commands. */
- while (p < pend)
- {
- printf ("%d:\t", p - start);
-
- switch ((re_opcode_t) *p++)
- {
- case no_op:
- printf ("/no_op");
- break;
-
- case exactn:
- mcnt = *p++;
- printf ("/exactn/%d", mcnt);
- do
- {
- putchar ('/');
- putchar (*p++);
- }
- while (--mcnt);
- break;
-
- case start_memory:
- mcnt = *p++;
- printf ("/start_memory/%d/%d", mcnt, *p++);
- break;
-
- case stop_memory:
- mcnt = *p++;
- printf ("/stop_memory/%d/%d", mcnt, *p++);
- break;
-
- case duplicate:
- printf ("/duplicate/%d", *p++);
- break;
-
- case anychar:
- printf ("/anychar");
- break;
-
- case charset:
- case charset_not:
- {
- register int c, last = -100;
- register int in_range = 0;
-
- printf ("/charset [%s",
- (re_opcode_t) *(p - 1) == charset_not ? "^" : "");
-
- assert (p + *p < pend);
-
- for (c = 0; c < 256; c++)
- if (c / 8 < *p
- && (p[1 + (c/8)] & (1 << (c % 8))))
- {
- /* Are we starting a range? */
- if (last + 1 == c && ! in_range)
- {
- putchar ('-');
- in_range = 1;
- }
- /* Have we broken a range? */
- else if (last + 1 != c && in_range)
- {
- putchar (last);
- in_range = 0;
- }
-
- if (! in_range)
- putchar (c);
-
- last = c;
- }
-
- if (in_range)
- putchar (last);
-
- putchar (']');
-
- p += 1 + *p;
- }
- break;
-
- case begline:
- printf ("/begline");
- break;
-
- case endline:
- printf ("/endline");
- break;
-
- case on_failure_jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/on_failure_jump to %d", p + mcnt - start);
- break;
-
- case on_failure_keep_string_jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/on_failure_keep_string_jump to %d", p + mcnt - start);
- break;
-
- case dummy_failure_jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/dummy_failure_jump to %d", p + mcnt - start);
- break;
-
- case push_dummy_failure:
- printf ("/push_dummy_failure");
- break;
-
- case maybe_pop_jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/maybe_pop_jump to %d", p + mcnt - start);
- break;
-
- case pop_failure_jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/pop_failure_jump to %d", p + mcnt - start);
- break;
-
- case jump_past_alt:
- extract_number_and_incr (&mcnt, &p);
- printf ("/jump_past_alt to %d", p + mcnt - start);
- break;
-
- case jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/jump to %d", p + mcnt - start);
- break;
-
- case succeed_n:
- extract_number_and_incr (&mcnt, &p);
- p1 = p + mcnt;
- extract_number_and_incr (&mcnt2, &p);
- printf ("/succeed_n to %d, %d times", p1 - start, mcnt2);
- break;
-
- case jump_n:
- extract_number_and_incr (&mcnt, &p);
- p1 = p + mcnt;
- extract_number_and_incr (&mcnt2, &p);
- printf ("/jump_n to %d, %d times", p1 - start, mcnt2);
- break;
-
- case set_number_at:
- extract_number_and_incr (&mcnt, &p);
- p1 = p + mcnt;
- extract_number_and_incr (&mcnt2, &p);
- printf ("/set_number_at location %d to %d", p1 - start, mcnt2);
- break;
-
- case wordbound:
- printf ("/wordbound");
- break;
-
- case notwordbound:
- printf ("/notwordbound");
- break;
-
- case wordbeg:
- printf ("/wordbeg");
- break;
-
- case wordend:
- printf ("/wordend");
-
-# ifdef emacs
- case before_dot:
- printf ("/before_dot");
- break;
-
- case at_dot:
- printf ("/at_dot");
- break;
-
- case after_dot:
- printf ("/after_dot");
- break;
-
- case syntaxspec:
- printf ("/syntaxspec");
- mcnt = *p++;
- printf ("/%d", mcnt);
- break;
-
- case notsyntaxspec:
- printf ("/notsyntaxspec");
- mcnt = *p++;
- printf ("/%d", mcnt);
- break;
-# endif /* emacs */
-
- case wordchar:
- printf ("/wordchar");
- break;
-
- case notwordchar:
- printf ("/notwordchar");
- break;
-
- case begbuf:
- printf ("/begbuf");
- break;
-
- case endbuf:
- printf ("/endbuf");
- break;
-
- default:
- printf ("?%d", *(p-1));
- }
-
- putchar ('\n');
- }
-
- printf ("%d:\tend of pattern.\n", p - start);
-}
-
-
-void
-print_compiled_pattern (bufp)
- struct re_pattern_buffer *bufp;
-{
- unsigned char *buffer = bufp->buffer;
-
- print_partial_compiled_pattern (buffer, buffer + bufp->used);
- printf ("%ld bytes used/%ld bytes allocated.\n",
- bufp->used, bufp->allocated);
-
- if (bufp->fastmap_accurate && bufp->fastmap)
- {
- printf ("fastmap: ");
- print_fastmap (bufp->fastmap);
- }
-
- printf ("re_nsub: %d\t", bufp->re_nsub);
- printf ("regs_alloc: %d\t", bufp->regs_allocated);
- printf ("can_be_null: %d\t", bufp->can_be_null);
- printf ("newline_anchor: %d\n", bufp->newline_anchor);
- printf ("no_sub: %d\t", bufp->no_sub);
- printf ("not_bol: %d\t", bufp->not_bol);
- printf ("not_eol: %d\t", bufp->not_eol);
- printf ("syntax: %lx\n", bufp->syntax);
- /* Perhaps we should print the translate table? */
-}
-
-
-void
-print_double_string (where, string1, size1, string2, size2)
- const char *where;
- const char *string1;
- const char *string2;
- int size1;
- int size2;
-{
- int this_char;
-
- if (where == NULL)
- printf ("(null)");
- else
- {
- if (FIRST_STRING_P (where))
- {
- for (this_char = where - string1; this_char < size1; this_char++)
- putchar (string1[this_char]);
-
- where = string2;
- }
-
- for (this_char = where - string2; this_char < size2; this_char++)
- putchar (string2[this_char]);
- }
-}
-
-void
-printchar (c)
- int c;
-{
- putc (c, stderr);
-}
-
-#else /* not DEBUG */
-
-# undef assert
-# define assert(e)
-
-# define DEBUG_STATEMENT(e)
-# define DEBUG_PRINT1(x)
-# define DEBUG_PRINT2(x1, x2)
-# define DEBUG_PRINT3(x1, x2, x3)
-# define DEBUG_PRINT4(x1, x2, x3, x4)
-# define DEBUG_PRINT_COMPILED_PATTERN(p, s, e)
-# define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)
-
-#endif /* not DEBUG */
-
-/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
- also be assigned to arbitrarily: each pattern buffer stores its own
- syntax, so it can be changed between regex compilations. */
-/* This has no initializer because initialized variables in Emacs
- become read-only after dumping. */
-reg_syntax_t re_syntax_options;
-
-
-/* Specify the precise syntax of regexps for compilation. This provides
- for compatibility for various utilities which historically have
- different, incompatible syntaxes.
-
- The argument SYNTAX is a bit mask comprised of the various bits
- defined in gnu-regex.h. We return the old syntax. */
-
-reg_syntax_t
-re_set_syntax (syntax)
- reg_syntax_t syntax;
-{
- reg_syntax_t ret = re_syntax_options;
-
- re_syntax_options = syntax;
-#ifdef DEBUG
- if (syntax & RE_DEBUG)
- debug = 1;
- else if (debug) /* was on but now is not */
- debug = 0;
-#endif /* DEBUG */
- return ret;
-}
-#ifdef _LIBC
-weak_alias (__re_set_syntax, re_set_syntax)
-#endif
-
-/* This table gives an error message for each of the error codes listed
- in gnu-regex.h. Obviously the order here has to be same as there.
- POSIX doesn't require that we do anything for REG_NOERROR,
- but why not be nice? */
-
-static const char *re_error_msgid[] =
- {
- gettext_noop ("Success"), /* REG_NOERROR */
- gettext_noop ("No match"), /* REG_NOMATCH */
- gettext_noop ("Invalid regular expression"), /* REG_BADPAT */
- gettext_noop ("Invalid collation character"), /* REG_ECOLLATE */
- gettext_noop ("Invalid character class name"), /* REG_ECTYPE */
- gettext_noop ("Trailing backslash"), /* REG_EESCAPE */
- gettext_noop ("Invalid back reference"), /* REG_ESUBREG */
- gettext_noop ("Unmatched [ or [^"), /* REG_EBRACK */
- gettext_noop ("Unmatched ( or \\("), /* REG_EPAREN */
- gettext_noop ("Unmatched \\{"), /* REG_EBRACE */
- gettext_noop ("Invalid content of \\{\\}"), /* REG_BADBR */
- gettext_noop ("Invalid range end"), /* REG_ERANGE */
- gettext_noop ("Memory exhausted"), /* REG_ESPACE */
- gettext_noop ("Invalid preceding regular expression"), /* REG_BADRPT */
- gettext_noop ("Premature end of regular expression"), /* REG_EEND */
- gettext_noop ("Regular expression too big"), /* REG_ESIZE */
- gettext_noop ("Unmatched ) or \\)"), /* REG_ERPAREN */
- };
-
-/* Avoiding alloca during matching, to placate r_alloc. */
-
-/* Define MATCH_MAY_ALLOCATE unless we need to make sure that the
- searching and matching functions should not call alloca. On some
- systems, alloca is implemented in terms of malloc, and if we're
- using the relocating allocator routines, then malloc could cause a
- relocation, which might (if the strings being searched are in the
- ralloc heap) shift the data out from underneath the regexp
- routines.
-
- Here's another reason to avoid allocation: Emacs
- processes input from X in a signal handler; processing X input may
- call malloc; if input arrives while a matching routine is calling
- malloc, then we're scrod. But Emacs can't just block input while
- calling matching routines; then we don't notice interrupts when
- they come in. So, Emacs blocks input around all regexp calls
- except the matching calls, which it leaves unprotected, in the
- faith that they will not malloc. */
-
-/* Normally, this is fine. */
-#define MATCH_MAY_ALLOCATE
-
-/* When using GNU C, we are not REALLY using the C alloca, no matter
- what config.h may say. So don't take precautions for it. */
-#ifdef __GNUC__
-# undef C_ALLOCA
-#endif
-
-/* The match routines may not allocate if (1) they would do it with malloc
- and (2) it's not safe for them to use malloc.
- Note that if REL_ALLOC is defined, matching would not use malloc for the
- failure stack, but we would still use it for the register vectors;
- so REL_ALLOC should not affect this. */
-#if (defined C_ALLOCA || defined REGEX_MALLOC) && defined emacs
-# undef MATCH_MAY_ALLOCATE
-#endif
-
-
-/* Failure stack declarations and macros; both re_compile_fastmap and
- re_match_2 use a failure stack. These have to be macros because of
- REGEX_ALLOCATE_STACK. */
-
-
-/* Number of failure points for which to initially allocate space
- when matching. If this number is exceeded, we allocate more
- space, so it is not a hard limit. */
-#ifndef INIT_FAILURE_ALLOC
-# define INIT_FAILURE_ALLOC 5
-#endif
-
-/* Roughly the maximum number of failure points on the stack. Would be
- exactly that if always used MAX_FAILURE_ITEMS items each time we failed.
- This is a variable only so users of regex can assign to it; we never
- change it ourselves. */
-
-#ifdef INT_IS_16BIT
-
-# if defined MATCH_MAY_ALLOCATE
-/* 4400 was enough to cause a crash on Alpha OSF/1,
- whose default stack limit is 2mb. */
-long int re_max_failures = 4000;
-# else
-long int re_max_failures = 2000;
-# endif
-
-union fail_stack_elt
-{
- unsigned char *pointer;
- long int integer;
-};
-
-typedef union fail_stack_elt fail_stack_elt_t;
-
-typedef struct
-{
- fail_stack_elt_t *stack;
- unsigned long int size;
- unsigned long int avail; /* Offset of next open position. */
-} fail_stack_type;
-
-#else /* not INT_IS_16BIT */
-
-# if defined MATCH_MAY_ALLOCATE
-/* 4400 was enough to cause a crash on Alpha OSF/1,
- whose default stack limit is 2mb. */
-int re_max_failures = 20000;
-# else
-int re_max_failures = 2000;
-# endif
-
-union fail_stack_elt
-{
- unsigned char *pointer;
- int integer;
-};
-
-typedef union fail_stack_elt fail_stack_elt_t;
-
-typedef struct
-{
- fail_stack_elt_t *stack;
- unsigned size;
- unsigned avail; /* Offset of next open position. */
-} fail_stack_type;
-
-#endif /* INT_IS_16BIT */
-
-#define FAIL_STACK_EMPTY() (fail_stack.avail == 0)
-#define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0)
-#define FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size)
-
-
-/* Define macros to initialize and free the failure stack.
- Do `return -2' if the alloc fails. */
-
-#ifdef MATCH_MAY_ALLOCATE
-# define INIT_FAIL_STACK() \
- do { \
- fail_stack.stack = (fail_stack_elt_t *) \
- REGEX_ALLOCATE_STACK (INIT_FAILURE_ALLOC * sizeof (fail_stack_elt_t)); \
- \
- if (fail_stack.stack == NULL) \
- return -2; \
- \
- fail_stack.size = INIT_FAILURE_ALLOC; \
- fail_stack.avail = 0; \
- } while (0)
-
-# define RESET_FAIL_STACK() REGEX_FREE_STACK (fail_stack.stack)
-#else
-# define INIT_FAIL_STACK() \
- do { \
- fail_stack.avail = 0; \
- } while (0)
-
-# define RESET_FAIL_STACK()
-#endif
-
-
-/* Double the size of FAIL_STACK, up to approximately `re_max_failures' items.
-
- Return 1 if succeeds, and 0 if either ran out of memory
- allocating space for it or it was already too large.
-
- REGEX_REALLOCATE_STACK requires `destination' be declared. */
-
-#define DOUBLE_FAIL_STACK(fail_stack) \
- ((fail_stack).size > (unsigned) (re_max_failures * MAX_FAILURE_ITEMS) \
- ? 0 \
- : ((fail_stack).stack = (fail_stack_elt_t *) \
- REGEX_REALLOCATE_STACK ((fail_stack).stack, \
- (fail_stack).size * sizeof (fail_stack_elt_t), \
- ((fail_stack).size << 1) * sizeof (fail_stack_elt_t)), \
- \
- (fail_stack).stack == NULL \
- ? 0 \
- : ((fail_stack).size <<= 1, \
- 1)))
-
-
-/* Push pointer POINTER on FAIL_STACK.
- Return 1 if was able to do so and 0 if ran out of memory allocating
- space to do so. */
-#define PUSH_PATTERN_OP(POINTER, FAIL_STACK) \
- ((FAIL_STACK_FULL () \
- && !DOUBLE_FAIL_STACK (FAIL_STACK)) \
- ? 0 \
- : ((FAIL_STACK).stack[(FAIL_STACK).avail++].pointer = POINTER, \
- 1))
-
-/* Push a pointer value onto the failure stack.
- Assumes the variable `fail_stack'. Probably should only
- be called from within `PUSH_FAILURE_POINT'. */
-#define PUSH_FAILURE_POINTER(item) \
- fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (item)
-
-/* This pushes an integer-valued item onto the failure stack.
- Assumes the variable `fail_stack'. Probably should only
- be called from within `PUSH_FAILURE_POINT'. */
-#define PUSH_FAILURE_INT(item) \
- fail_stack.stack[fail_stack.avail++].integer = (item)
-
-/* Push a fail_stack_elt_t value onto the failure stack.
- Assumes the variable `fail_stack'. Probably should only
- be called from within `PUSH_FAILURE_POINT'. */
-#define PUSH_FAILURE_ELT(item) \
- fail_stack.stack[fail_stack.avail++] = (item)
-
-/* These three POP... operations complement the three PUSH... operations.
- All assume that `fail_stack' is nonempty. */
-#define POP_FAILURE_POINTER() fail_stack.stack[--fail_stack.avail].pointer
-#define POP_FAILURE_INT() fail_stack.stack[--fail_stack.avail].integer
-#define POP_FAILURE_ELT() fail_stack.stack[--fail_stack.avail]
-
-/* Used to omit pushing failure point id's when we're not debugging. */
-#ifdef DEBUG
-# define DEBUG_PUSH PUSH_FAILURE_INT
-# define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_INT ()
-#else
-# define DEBUG_PUSH(item)
-# define DEBUG_POP(item_addr)
-#endif
-
-
-/* Push the information about the state we will need
- if we ever fail back to it.
-
- Requires variables fail_stack, regstart, regend, reg_info, and
- num_regs_pushed be declared. DOUBLE_FAIL_STACK requires `destination'
- be declared.
-
- Does `return FAILURE_CODE' if runs out of memory. */
-
-#define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \
- do { \
- char *destination; \
- /* Must be int, so when we don't save any registers, the arithmetic \
- of 0 + -1 isn't done as unsigned. */ \
- /* Can't be int, since there is not a shred of a guarantee that int \
- is wide enough to hold a value of something to which pointer can \
- be assigned */ \
- active_reg_t this_reg; \
- \
- DEBUG_STATEMENT (failure_id++); \
- DEBUG_STATEMENT (nfailure_points_pushed++); \
- DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \
- DEBUG_PRINT2 (" Before push, next avail: %d\n", (fail_stack).avail);\
- DEBUG_PRINT2 (" size: %d\n", (fail_stack).size);\
- \
- DEBUG_PRINT2 (" slots needed: %ld\n", NUM_FAILURE_ITEMS); \
- DEBUG_PRINT2 (" available: %d\n", REMAINING_AVAIL_SLOTS); \
- \
- /* Ensure we have enough space allocated for what we will push. */ \
- while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \
- { \
- if (!DOUBLE_FAIL_STACK (fail_stack)) \
- return failure_code; \
- \
- DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \
- (fail_stack).size); \
- DEBUG_PRINT2 (" slots available: %d\n", REMAINING_AVAIL_SLOTS);\
- } \
- \
- /* Push the info, starting with the registers. */ \
- DEBUG_PRINT1 ("\n"); \
- \
- if (1) \
- for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \
- this_reg++) \
- { \
- DEBUG_PRINT2 (" Pushing reg: %lu\n", this_reg); \
- DEBUG_STATEMENT (num_regs_pushed++); \
- \
- DEBUG_PRINT2 (" start: %p\n", regstart[this_reg]); \
- PUSH_FAILURE_POINTER (regstart[this_reg]); \
- \
- DEBUG_PRINT2 (" end: %p\n", regend[this_reg]); \
- PUSH_FAILURE_POINTER (regend[this_reg]); \
- \
- DEBUG_PRINT2 (" info: %p\n ", \
- reg_info[this_reg].word.pointer); \
- DEBUG_PRINT2 (" match_null=%d", \
- REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \
- DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \
- DEBUG_PRINT2 (" matched_something=%d", \
- MATCHED_SOMETHING (reg_info[this_reg])); \
- DEBUG_PRINT2 (" ever_matched=%d", \
- EVER_MATCHED_SOMETHING (reg_info[this_reg])); \
- DEBUG_PRINT1 ("\n"); \
- PUSH_FAILURE_ELT (reg_info[this_reg].word); \
- } \
- \
- DEBUG_PRINT2 (" Pushing low active reg: %ld\n", lowest_active_reg);\
- PUSH_FAILURE_INT (lowest_active_reg); \
- \
- DEBUG_PRINT2 (" Pushing high active reg: %ld\n", highest_active_reg);\
- PUSH_FAILURE_INT (highest_active_reg); \
- \
- DEBUG_PRINT2 (" Pushing pattern %p:\n", pattern_place); \
- DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \
- PUSH_FAILURE_POINTER (pattern_place); \
- \
- DEBUG_PRINT2 (" Pushing string %p: `", string_place); \
- DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \
- size2); \
- DEBUG_PRINT1 ("'\n"); \
- PUSH_FAILURE_POINTER (string_place); \
- \
- DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \
- DEBUG_PUSH (failure_id); \
- } while (0)
-
-/* This is the number of items that are pushed and popped on the stack
- for each register. */
-#define NUM_REG_ITEMS 3
-
-/* Individual items aside from the registers. */
-#ifdef DEBUG
-# define NUM_NONREG_ITEMS 5 /* Includes failure point id. */
-#else
-# define NUM_NONREG_ITEMS 4
-#endif
-
-/* We push at most this many items on the stack. */
-/* We used to use (num_regs - 1), which is the number of registers
- this regexp will save; but that was changed to 5
- to avoid stack overflow for a regexp with lots of parens. */
-#define MAX_FAILURE_ITEMS (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
-
-/* We actually push this many items. */
-#define NUM_FAILURE_ITEMS \
- (((0 \
- ? 0 : highest_active_reg - lowest_active_reg + 1) \
- * NUM_REG_ITEMS) \
- + NUM_NONREG_ITEMS)
-
-/* How many items can still be added to the stack without overflowing it. */
-#define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail)
-
-
-/* Pops what PUSH_FAIL_STACK pushes.
-
- We restore into the parameters, all of which should be lvalues:
- STR -- the saved data position.
- PAT -- the saved pattern position.
- LOW_REG, HIGH_REG -- the highest and lowest active registers.
- REGSTART, REGEND -- arrays of string positions.
- REG_INFO -- array of information about each subexpression.
-
- Also assumes the variables `fail_stack' and (if debugging), `bufp',
- `pend', `string1', `size1', `string2', and `size2'. */
-
-#define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\
-{ \
- DEBUG_STATEMENT (unsigned failure_id;) \
- active_reg_t this_reg; \
- const unsigned char *string_temp; \
- \
- assert (!FAIL_STACK_EMPTY ()); \
- \
- /* Remove failure points and point to how many regs pushed. */ \
- DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \
- DEBUG_PRINT2 (" Before pop, next avail: %d\n", fail_stack.avail); \
- DEBUG_PRINT2 (" size: %d\n", fail_stack.size); \
- \
- assert (fail_stack.avail >= NUM_NONREG_ITEMS); \
- \
- DEBUG_POP (&failure_id); \
- DEBUG_PRINT2 (" Popping failure id: %u\n", failure_id); \
- \
- /* If the saved string location is NULL, it came from an \
- on_failure_keep_string_jump opcode, and we want to throw away the \
- saved NULL, thus retaining our current position in the string. */ \
- string_temp = POP_FAILURE_POINTER (); \
- if (string_temp != NULL) \
- str = (const char *) string_temp; \
- \
- DEBUG_PRINT2 (" Popping string %p: `", str); \
- DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \
- DEBUG_PRINT1 ("'\n"); \
- \
- pat = (unsigned char *) POP_FAILURE_POINTER (); \
- DEBUG_PRINT2 (" Popping pattern %p:\n", pat); \
- DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \
- \
- /* Restore register info. */ \
- high_reg = (active_reg_t) POP_FAILURE_INT (); \
- DEBUG_PRINT2 (" Popping high active reg: %ld\n", high_reg); \
- \
- low_reg = (active_reg_t) POP_FAILURE_INT (); \
- DEBUG_PRINT2 (" Popping low active reg: %ld\n", low_reg); \
- \
- if (1) \
- for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \
- { \
- DEBUG_PRINT2 (" Popping reg: %ld\n", this_reg); \
- \
- reg_info[this_reg].word = POP_FAILURE_ELT (); \
- DEBUG_PRINT2 (" info: %p\n", \
- reg_info[this_reg].word.pointer); \
- \
- regend[this_reg] = (const char *) POP_FAILURE_POINTER (); \
- DEBUG_PRINT2 (" end: %p\n", regend[this_reg]); \
- \
- regstart[this_reg] = (const char *) POP_FAILURE_POINTER (); \
- DEBUG_PRINT2 (" start: %p\n", regstart[this_reg]); \
- } \
- else \
- { \
- for (this_reg = highest_active_reg; this_reg > high_reg; this_reg--) \
- { \
- reg_info[this_reg].word.integer = 0; \
- regend[this_reg] = 0; \
- regstart[this_reg] = 0; \
- } \
- highest_active_reg = high_reg; \
- } \
- \
- set_regs_matched_done = 0; \
- DEBUG_STATEMENT (nfailure_points_popped++); \
-} /* POP_FAILURE_POINT */
-
-
-
-/* Structure for per-register (a.k.a. per-group) information.
- Other register information, such as the
- starting and ending positions (which are addresses), and the list of
- inner groups (which is a bits list) are maintained in separate
- variables.
-
- We are making a (strictly speaking) nonportable assumption here: that
- the compiler will pack our bit fields into something that fits into
- the type of `word', i.e., is something that fits into one item on the
- failure stack. */
-
-
-/* Declarations and macros for re_match_2. */
-
-typedef union
-{
- fail_stack_elt_t word;
- struct
- {
- /* This field is one if this group can match the empty string,
- zero if not. If not yet determined, `MATCH_NULL_UNSET_VALUE'. */
-#define MATCH_NULL_UNSET_VALUE 3
- unsigned match_null_string_p : 2;
- unsigned is_active : 1;
- unsigned matched_something : 1;
- unsigned ever_matched_something : 1;
- } bits;
-} register_info_type;
-
-#define REG_MATCH_NULL_STRING_P(R) ((R).bits.match_null_string_p)
-#define IS_ACTIVE(R) ((R).bits.is_active)
-#define MATCHED_SOMETHING(R) ((R).bits.matched_something)
-#define EVER_MATCHED_SOMETHING(R) ((R).bits.ever_matched_something)
-
-
-/* Call this when have matched a real character; it sets `matched' flags
- for the subexpressions which we are currently inside. Also records
- that those subexprs have matched. */
-#define SET_REGS_MATCHED() \
- do \
- { \
- if (!set_regs_matched_done) \
- { \
- active_reg_t r; \
- set_regs_matched_done = 1; \
- for (r = lowest_active_reg; r <= highest_active_reg; r++) \
- { \
- MATCHED_SOMETHING (reg_info[r]) \
- = EVER_MATCHED_SOMETHING (reg_info[r]) \
- = 1; \
- } \
- } \
- } \
- while (0)
-
-/* Registers are set to a sentinel when they haven't yet matched. */
-static char reg_unset_dummy;
-#define REG_UNSET_VALUE (&reg_unset_dummy)
-#define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
-
-/* Subroutine declarations and macros for regex_compile. */
-
-static reg_errcode_t regex_compile _RE_ARGS ((const char *pattern, size_t size,
- reg_syntax_t syntax,
- struct re_pattern_buffer *bufp));
-static void store_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc, int arg));
-static void store_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg1, int arg2));
-static void insert_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg, unsigned char *end));
-static void insert_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg1, int arg2, unsigned char *end));
-static boolean at_begline_loc_p _RE_ARGS ((const char *pattern, const char *p,
- reg_syntax_t syntax));
-static boolean at_endline_loc_p _RE_ARGS ((const char *p, const char *pend,
- reg_syntax_t syntax));
-static reg_errcode_t compile_range _RE_ARGS ((const char **p_ptr,
- const char *pend,
- char *translate,
- reg_syntax_t syntax,
- unsigned char *b));
-
-/* Fetch the next character in the uncompiled pattern---translating it
- if necessary. Also cast from a signed character in the constant
- string passed to us by the user to an unsigned char that we can use
- as an array index (in, e.g., `translate'). */
-#ifndef PATFETCH
-# define PATFETCH(c) \
- do {if (p == pend) return REG_EEND; \
- c = (unsigned char) *p++; \
- if (translate) c = (unsigned char) translate[c]; \
- } while (0)
-#endif
-
-/* Fetch the next character in the uncompiled pattern, with no
- translation. */
-#define PATFETCH_RAW(c) \
- do {if (p == pend) return REG_EEND; \
- c = (unsigned char) *p++; \
- } while (0)
-
-/* Go backwards one character in the pattern. */
-#define PATUNFETCH p--
-
-
-/* If `translate' is non-null, return translate[D], else just D. We
- cast the subscript to translate because some data is declared as
- `char *', to avoid warnings when a string constant is passed. But
- when we use a character as a subscript we must make it unsigned. */
-#ifndef TRANSLATE
-# define TRANSLATE(d) \
- (translate ? (char) translate[(unsigned char) (d)] : (d))
-#endif
-
-
-/* Macros for outputting the compiled pattern into `buffer'. */
-
-/* If the buffer isn't allocated when it comes in, use this. */
-#define INIT_BUF_SIZE 32
-
-/* Make sure we have at least N more bytes of space in buffer. */
-#define GET_BUFFER_SPACE(n) \
- while ((unsigned long) (b - bufp->buffer + (n)) > bufp->allocated) \
- EXTEND_BUFFER ()
-
-/* Make sure we have one more byte of buffer space and then add C to it. */
-#define BUF_PUSH(c) \
- do { \
- GET_BUFFER_SPACE (1); \
- *b++ = (unsigned char) (c); \
- } while (0)
-
-
-/* Ensure we have two more bytes of buffer space and then append C1 and C2. */
-#define BUF_PUSH_2(c1, c2) \
- do { \
- GET_BUFFER_SPACE (2); \
- *b++ = (unsigned char) (c1); \
- *b++ = (unsigned char) (c2); \
- } while (0)
-
-
-/* As with BUF_PUSH_2, except for three bytes. */
-#define BUF_PUSH_3(c1, c2, c3) \
- do { \
- GET_BUFFER_SPACE (3); \
- *b++ = (unsigned char) (c1); \
- *b++ = (unsigned char) (c2); \
- *b++ = (unsigned char) (c3); \
- } while (0)
-
-
-/* Store a jump with opcode OP at LOC to location TO. We store a
- relative address offset by the three bytes the jump itself occupies. */
-#define STORE_JUMP(op, loc, to) \
- store_op1 (op, loc, (int) ((to) - (loc) - 3))
-
-/* Likewise, for a two-argument jump. */
-#define STORE_JUMP2(op, loc, to, arg) \
- store_op2 (op, loc, (int) ((to) - (loc) - 3), arg)
-
-/* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
-#define INSERT_JUMP(op, loc, to) \
- insert_op1 (op, loc, (int) ((to) - (loc) - 3), b)
-
-/* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
-#define INSERT_JUMP2(op, loc, to, arg) \
- insert_op2 (op, loc, (int) ((to) - (loc) - 3), arg, b)
-
-
-/* This is not an arbitrary limit: the arguments which represent offsets
- into the pattern are two bytes long. So if 2^16 bytes turns out to
- be too small, many things would have to change. */
-/* Any other compiler which, like MSC, has allocation limit below 2^16
- bytes will have to use approach similar to what was done below for
- MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up
- reallocating to 0 bytes. Such thing is not going to work too well.
- You have been warned!! */
-#if defined _MSC_VER && !defined WIN32
-/* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
- The REALLOC define eliminates a flurry of conversion warnings,
- but is not required. */
-# define MAX_BUF_SIZE 65500L
-# define REALLOC(p,s) realloc ((p), (size_t) (s))
-#else
-# define MAX_BUF_SIZE (1L << 16)
-# define REALLOC(p,s) realloc ((p), (s))
-#endif
-
-/* Extend the buffer by twice its current size via realloc and
- reset the pointers that pointed into the old block to point to the
- correct places in the new one. If extending the buffer results in it
- being larger than MAX_BUF_SIZE, then flag memory exhausted. */
-#define EXTEND_BUFFER() \
- do { \
- unsigned char *old_buffer = bufp->buffer; \
- if (bufp->allocated == MAX_BUF_SIZE) \
- return REG_ESIZE; \
- bufp->allocated <<= 1; \
- if (bufp->allocated > MAX_BUF_SIZE) \
- bufp->allocated = MAX_BUF_SIZE; \
- bufp->buffer = (unsigned char *) REALLOC (bufp->buffer, bufp->allocated);\
- if (bufp->buffer == NULL) \
- return REG_ESPACE; \
- /* If the buffer moved, move all the pointers into it. */ \
- if (old_buffer != bufp->buffer) \
- { \
- b = (b - old_buffer) + bufp->buffer; \
- begalt = (begalt - old_buffer) + bufp->buffer; \
- if (fixup_alt_jump) \
- fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer;\
- if (laststart) \
- laststart = (laststart - old_buffer) + bufp->buffer; \
- if (pending_exact) \
- pending_exact = (pending_exact - old_buffer) + bufp->buffer; \
- } \
- } while (0)
-
-
-/* Since we have one byte reserved for the register number argument to
- {start,stop}_memory, the maximum number of groups we can report
- things about is what fits in that byte. */
-#define MAX_REGNUM 255
-
-/* But patterns can have more than `MAX_REGNUM' registers. We just
- ignore the excess. */
-typedef unsigned regnum_t;
-
-
-/* Macros for the compile stack. */
-
-/* Since offsets can go either forwards or backwards, this type needs to
- be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1. */
-/* int may be not enough when sizeof(int) == 2. */
-typedef long pattern_offset_t;
-
-typedef struct
-{
- pattern_offset_t begalt_offset;
- pattern_offset_t fixup_alt_jump;
- pattern_offset_t inner_group_offset;
- pattern_offset_t laststart_offset;
- regnum_t regnum;
-} compile_stack_elt_t;
-
-
-typedef struct
-{
- compile_stack_elt_t *stack;
- unsigned size;
- unsigned avail; /* Offset of next open position. */
-} compile_stack_type;
-
-
-#define INIT_COMPILE_STACK_SIZE 32
-
-#define COMPILE_STACK_EMPTY (compile_stack.avail == 0)
-#define COMPILE_STACK_FULL (compile_stack.avail == compile_stack.size)
-
-/* The next available element. */
-#define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail])
-
-
-/* Set the bit for character C in a list. */
-#define SET_LIST_BIT(c) \
- (b[((unsigned char) (c)) / BYTEWIDTH] \
- |= 1 << (((unsigned char) c) % BYTEWIDTH))
-
-
-/* Get the next unsigned number in the uncompiled pattern. */
-#define GET_UNSIGNED_NUMBER(num) \
- { if (p != pend) \
- { \
- PATFETCH (c); \
- while (ISDIGIT (c)) \
- { \
- if (num < 0) \
- num = 0; \
- num = num * 10 + c - '0'; \
- if (p == pend) \
- break; \
- PATFETCH (c); \
- } \
- } \
- }
-
-#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
-/* The GNU C library provides support for user-defined character classes
- and the functions from ISO C amendement 1. */
-# ifdef CHARCLASS_NAME_MAX
-# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
-# else
-/* This shouldn't happen but some implementation might still have this
- problem. Use a reasonable default value. */
-# define CHAR_CLASS_MAX_LENGTH 256
-# endif
-
-# ifdef _LIBC
-# define IS_CHAR_CLASS(string) __wctype (string)
-# else
-# define IS_CHAR_CLASS(string) wctype (string)
-# endif
-#else
-# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
-
-# define IS_CHAR_CLASS(string) \
- (STREQ (string, "alpha") || STREQ (string, "upper") \
- || STREQ (string, "lower") || STREQ (string, "digit") \
- || STREQ (string, "alnum") || STREQ (string, "xdigit") \
- || STREQ (string, "space") || STREQ (string, "print") \
- || STREQ (string, "punct") || STREQ (string, "graph") \
- || STREQ (string, "cntrl") || STREQ (string, "blank"))
-#endif
-
-#ifndef MATCH_MAY_ALLOCATE
-
-/* If we cannot allocate large objects within re_match_2_internal,
- we make the fail stack and register vectors global.
- The fail stack, we grow to the maximum size when a regexp
- is compiled.
- The register vectors, we adjust in size each time we
- compile a regexp, according to the number of registers it needs. */
-
-static fail_stack_type fail_stack;
-
-/* Size with which the following vectors are currently allocated.
- That is so we can make them bigger as needed,
- but never make them smaller. */
-static int regs_allocated_size;
-
-static const char ** regstart, ** regend;
-static const char ** old_regstart, ** old_regend;
-static const char **best_regstart, **best_regend;
-static register_info_type *reg_info;
-static const char **reg_dummy;
-static register_info_type *reg_info_dummy;
-
-/* Make the register vectors big enough for NUM_REGS registers,
- but don't make them smaller. */
-
-static
-regex_grow_registers (num_regs)
- int num_regs;
-{
- if (num_regs > regs_allocated_size)
- {
- RETALLOC_IF (regstart, num_regs, const char *);
- RETALLOC_IF (regend, num_regs, const char *);
- RETALLOC_IF (old_regstart, num_regs, const char *);
- RETALLOC_IF (old_regend, num_regs, const char *);
- RETALLOC_IF (best_regstart, num_regs, const char *);
- RETALLOC_IF (best_regend, num_regs, const char *);
- RETALLOC_IF (reg_info, num_regs, register_info_type);
- RETALLOC_IF (reg_dummy, num_regs, const char *);
- RETALLOC_IF (reg_info_dummy, num_regs, register_info_type);
-
- regs_allocated_size = num_regs;
- }
-}
-
-#endif /* not MATCH_MAY_ALLOCATE */
-
-static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type
- compile_stack,
- regnum_t regnum));
-
-/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
- Returns one of error codes defined in `gnu-regex.h', or zero for success.
-
- Assumes the `allocated' (and perhaps `buffer') and `translate'
- fields are set in BUFP on entry.
-
- If it succeeds, results are put in BUFP (if it returns an error, the
- contents of BUFP are undefined):
- `buffer' is the compiled pattern;
- `syntax' is set to SYNTAX;
- `used' is set to the length of the compiled pattern;
- `fastmap_accurate' is zero;
- `re_nsub' is the number of subexpressions in PATTERN;
- `not_bol' and `not_eol' are zero;
-
- The `fastmap' and `newline_anchor' fields are neither
- examined nor set. */
-
-/* Return, freeing storage we allocated. */
-#define FREE_STACK_RETURN(value) \
- return (free (compile_stack.stack), value)
-
-static reg_errcode_t
-regex_compile (pattern, size, syntax, bufp)
- const char *pattern;
- size_t size;
- reg_syntax_t syntax;
- struct re_pattern_buffer *bufp;
-{
- /* We fetch characters from PATTERN here. Even though PATTERN is
- `char *' (i.e., signed), we declare these variables as unsigned, so
- they can be reliably used as array indices. */
- register unsigned char c, c1;
-
- /* A random temporary spot in PATTERN. */
- const char *p1;
-
- /* Points to the end of the buffer, where we should append. */
- register unsigned char *b;
-
- /* Keeps track of unclosed groups. */
- compile_stack_type compile_stack;
-
- /* Points to the current (ending) position in the pattern. */
- const char *p = pattern;
- const char *pend = pattern + size;
-
- /* How to translate the characters in the pattern. */
- RE_TRANSLATE_TYPE translate = bufp->translate;
-
- /* Address of the count-byte of the most recently inserted `exactn'
- command. This makes it possible to tell if a new exact-match
- character can be added to that command or if the character requires
- a new `exactn' command. */
- unsigned char *pending_exact = 0;
-
- /* Address of start of the most recently finished expression.
- This tells, e.g., postfix * where to find the start of its
- operand. Reset at the beginning of groups and alternatives. */
- unsigned char *laststart = 0;
-
- /* Address of beginning of regexp, or inside of last group. */
- unsigned char *begalt;
-
- /* Place in the uncompiled pattern (i.e., the {) to
- which to go back if the interval is invalid. */
- const char *beg_interval;
-
- /* Address of the place where a forward jump should go to the end of
- the containing expression. Each alternative of an `or' -- except the
- last -- ends with a forward jump of this sort. */
- unsigned char *fixup_alt_jump = 0;
-
- /* Counts open-groups as they are encountered. Remembered for the
- matching close-group on the compile stack, so the same register
- number is put in the stop_memory as the start_memory. */
- regnum_t regnum = 0;
-
-#ifdef DEBUG
- DEBUG_PRINT1 ("\nCompiling pattern: ");
- if (debug)
- {
- unsigned debug_count;
-
- for (debug_count = 0; debug_count < size; debug_count++)
- putchar (pattern[debug_count]);
- putchar ('\n');
- }
-#endif /* DEBUG */
-
- /* Initialize the compile stack. */
- compile_stack.stack = TALLOC (INIT_COMPILE_STACK_SIZE, compile_stack_elt_t);
- if (compile_stack.stack == NULL)
- return REG_ESPACE;
-
- compile_stack.size = INIT_COMPILE_STACK_SIZE;
- compile_stack.avail = 0;
-
- /* Initialize the pattern buffer. */
- bufp->syntax = syntax;
- bufp->fastmap_accurate = 0;
- bufp->not_bol = bufp->not_eol = 0;
-
- /* Set `used' to zero, so that if we return an error, the pattern
- printer (for debugging) will think there's no pattern. We reset it
- at the end. */
- bufp->used = 0;
-
- /* Always count groups, whether or not bufp->no_sub is set. */
- bufp->re_nsub = 0;
-
-#if !defined emacs && !defined SYNTAX_TABLE
- /* Initialize the syntax table. */
- init_syntax_once ();
-#endif
-
- if (bufp->allocated == 0)
- {
- if (bufp->buffer)
- { /* If zero allocated, but buffer is non-null, try to realloc
- enough space. This loses if buffer's address is bogus, but
- that is the user's responsibility. */
- RETALLOC (bufp->buffer, INIT_BUF_SIZE, unsigned char);
- }
- else
- { /* Caller did not allocate a buffer. Do it for them. */
- bufp->buffer = TALLOC (INIT_BUF_SIZE, unsigned char);
- }
- if (!bufp->buffer) FREE_STACK_RETURN (REG_ESPACE);
-
- bufp->allocated = INIT_BUF_SIZE;
- }
-
- begalt = b = bufp->buffer;
-
- /* Loop through the uncompiled pattern until we're at the end. */
- while (p != pend)
- {
- PATFETCH (c);
-
- switch (c)
- {
- case '^':
- {
- if ( /* If at start of pattern, it's an operator. */
- p == pattern + 1
- /* If context independent, it's an operator. */
- || syntax & RE_CONTEXT_INDEP_ANCHORS
- /* Otherwise, depends on what's come before. */
- || at_begline_loc_p (pattern, p, syntax))
- BUF_PUSH (begline);
- else
- goto normal_char;
- }
- break;
-
-
- case '$':
- {
- if ( /* If at end of pattern, it's an operator. */
- p == pend
- /* If context independent, it's an operator. */
- || syntax & RE_CONTEXT_INDEP_ANCHORS
- /* Otherwise, depends on what's next. */
- || at_endline_loc_p (p, pend, syntax))
- BUF_PUSH (endline);
- else
- goto normal_char;
- }
- break;
-
-
- case '+':
- case '?':
- if ((syntax & RE_BK_PLUS_QM)
- || (syntax & RE_LIMITED_OPS))
- goto normal_char;
- handle_plus:
- case '*':
- /* If there is no previous pattern... */
- if (!laststart)
- {
- if (syntax & RE_CONTEXT_INVALID_OPS)
- FREE_STACK_RETURN (REG_BADRPT);
- else if (!(syntax & RE_CONTEXT_INDEP_OPS))
- goto normal_char;
- }
-
- {
- /* Are we optimizing this jump? */
- boolean keep_string_p = false;
-
- /* 1 means zero (many) matches is allowed. */
- char zero_times_ok = 0, many_times_ok = 0;
-
- /* If there is a sequence of repetition chars, collapse it
- down to just one (the right one). We can't combine
- interval operators with these because of, e.g., `a{2}*',
- which should only match an even number of `a's. */
-
- for (;;)
- {
- zero_times_ok |= c != '+';
- many_times_ok |= c != '?';
-
- if (p == pend)
- break;
-
- PATFETCH (c);
-
- if (c == '*'
- || (!(syntax & RE_BK_PLUS_QM) && (c == '+' || c == '?')))
- ;
-
- else if (syntax & RE_BK_PLUS_QM && c == '\\')
- {
- if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
-
- PATFETCH (c1);
- if (!(c1 == '+' || c1 == '?'))
- {
- PATUNFETCH;
- PATUNFETCH;
- break;
- }
-
- c = c1;
- }
- else
- {
- PATUNFETCH;
- break;
- }
-
- /* If we get here, we found another repeat character. */
- }
-
- /* Star, etc. applied to an empty pattern is equivalent
- to an empty pattern. */
- if (!laststart)
- break;
-
- /* Now we know whether or not zero matches is allowed
- and also whether or not two or more matches is allowed. */
- if (many_times_ok)
- { /* More than one repetition is allowed, so put in at the
- end a backward relative jump from `b' to before the next
- jump we're going to put in below (which jumps from
- laststart to after this jump).
-
- But if we are at the `*' in the exact sequence `.*\n',
- insert an unconditional jump backwards to the .,
- instead of the beginning of the loop. This way we only
- push a failure point once, instead of every time
- through the loop. */
- assert (p - 1 > pattern);
-
- /* Allocate the space for the jump. */
- GET_BUFFER_SPACE (3);
-
- /* We know we are not at the first character of the pattern,
- because laststart was nonzero. And we've already
- incremented `p', by the way, to be the character after
- the `*'. Do we have to do something analogous here
- for null bytes, because of RE_DOT_NOT_NULL? */
- if (TRANSLATE (*(p - 2)) == TRANSLATE ('.')
- && zero_times_ok
- && p < pend && TRANSLATE (*p) == TRANSLATE ('\n')
- && !(syntax & RE_DOT_NEWLINE))
- { /* We have .*\n. */
- STORE_JUMP (jump, b, laststart);
- keep_string_p = true;
- }
- else
- /* Anything else. */
- STORE_JUMP (maybe_pop_jump, b, laststart - 3);
-
- /* We've added more stuff to the buffer. */
- b += 3;
- }
-
- /* On failure, jump from laststart to b + 3, which will be the
- end of the buffer after this jump is inserted. */
- GET_BUFFER_SPACE (3);
- INSERT_JUMP (keep_string_p ? on_failure_keep_string_jump
- : on_failure_jump,
- laststart, b + 3);
- pending_exact = 0;
- b += 3;
-
- if (!zero_times_ok)
- {
- /* At least one repetition is required, so insert a
- `dummy_failure_jump' before the initial
- `on_failure_jump' instruction of the loop. This
- effects a skip over that instruction the first time
- we hit that loop. */
- GET_BUFFER_SPACE (3);
- INSERT_JUMP (dummy_failure_jump, laststart, laststart + 6);
- b += 3;
- }
- }
- break;
-
-
- case '.':
- laststart = b;
- BUF_PUSH (anychar);
- break;
-
-
- case '[':
- {
- boolean had_char_class = false;
-
- if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-
- /* Ensure that we have enough space to push a charset: the
- opcode, the length count, and the bitset; 34 bytes in all. */
- GET_BUFFER_SPACE (34);
-
- laststart = b;
-
- /* We test `*p == '^' twice, instead of using an if
- statement, so we only need one BUF_PUSH. */
- BUF_PUSH (*p == '^' ? charset_not : charset);
- if (*p == '^')
- p++;
-
- /* Remember the first position in the bracket expression. */
- p1 = p;
-
- /* Push the number of bytes in the bitmap. */
- BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
-
- /* Clear the whole map. */
- bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH);
-
- /* charset_not matches newline according to a syntax bit. */
- if ((re_opcode_t) b[-2] == charset_not
- && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
- SET_LIST_BIT ('\n');
-
- /* Read in characters and ranges, setting map bits. */
- for (;;)
- {
- if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-
- PATFETCH (c);
-
- /* \ might escape characters inside [...] and [^...]. */
- if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
- {
- if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
-
- PATFETCH (c1);
- SET_LIST_BIT (c1);
- continue;
- }
-
- /* Could be the end of the bracket expression. If it's
- not (i.e., when the bracket expression is `[]' so
- far), the ']' character bit gets set way below. */
- if (c == ']' && p != p1 + 1)
- break;
-
- /* Look ahead to see if it's a range when the last thing
- was a character class. */
- if (had_char_class && c == '-' && *p != ']')
- FREE_STACK_RETURN (REG_ERANGE);
-
- /* Look ahead to see if it's a range when the last thing
- was a character: if this is a hyphen not at the
- beginning or the end of a list, then it's the range
- operator. */
- if (c == '-'
- && !(p - 2 >= pattern && p[-2] == '[')
- && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
- && *p != ']')
- {
- reg_errcode_t ret
- = compile_range (&p, pend, translate, syntax, b);
- if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
- }
-
- else if (p[0] == '-' && p[1] != ']')
- { /* This handles ranges made up of characters only. */
- reg_errcode_t ret;
-
- /* Move past the `-'. */
- PATFETCH (c1);
-
- ret = compile_range (&p, pend, translate, syntax, b);
- if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
- }
-
- /* See if we're at the beginning of a possible character
- class. */
-
- else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
- { /* Leave room for the null. */
- char str[CHAR_CLASS_MAX_LENGTH + 1];
-
- PATFETCH (c);
- c1 = 0;
-
- /* If pattern is `[[:'. */
- if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-
- for (;;)
- {
- PATFETCH (c);
- if ((c == ':' && *p == ']') || p == pend
- || c1 == CHAR_CLASS_MAX_LENGTH)
- break;
- str[c1++] = c;
- }
- str[c1] = '\0';
-
- /* If isn't a word bracketed by `[:' and `:]':
- undo the ending character, the letters, and leave
- the leading `:' and `[' (but set bits for them). */
- if (c == ':' && *p == ']')
- {
-/* CYGNUS LOCAL: Skip this code if we don't have btowc(). btowc() is */
-/* defined in the 1994 Amendment 1 to ISO C and may not be present on */
-/* systems where we have wchar.h and wctype.h. */
-#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_BTOWC)
- boolean is_lower = STREQ (str, "lower");
- boolean is_upper = STREQ (str, "upper");
- wctype_t wt;
- int ch;
-
- wt = IS_CHAR_CLASS (str);
- if (wt == 0)
- FREE_STACK_RETURN (REG_ECTYPE);
-
- /* Throw away the ] at the end of the character
- class. */
- PATFETCH (c);
-
- if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-
- for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
- {
-# ifdef _LIBC
- if (__iswctype (__btowc (ch), wt))
- SET_LIST_BIT (ch);
-#else
- if (iswctype (btowc (ch), wt))
- SET_LIST_BIT (ch);
-#endif
-
- if (translate && (is_upper || is_lower)
- && (ISUPPER (ch) || ISLOWER (ch)))
- SET_LIST_BIT (ch);
- }
-
- had_char_class = true;
-#else
- int ch;
- boolean is_alnum = STREQ (str, "alnum");
- boolean is_alpha = STREQ (str, "alpha");
- boolean is_blank = STREQ (str, "blank");
- boolean is_cntrl = STREQ (str, "cntrl");
- boolean is_digit = STREQ (str, "digit");
- boolean is_graph = STREQ (str, "graph");
- boolean is_lower = STREQ (str, "lower");
- boolean is_print = STREQ (str, "print");
- boolean is_punct = STREQ (str, "punct");
- boolean is_space = STREQ (str, "space");
- boolean is_upper = STREQ (str, "upper");
- boolean is_xdigit = STREQ (str, "xdigit");
-
- if (!IS_CHAR_CLASS (str))
- FREE_STACK_RETURN (REG_ECTYPE);
-
- /* Throw away the ] at the end of the character
- class. */
- PATFETCH (c);
-
- if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-
- for (ch = 0; ch < 1 << BYTEWIDTH; ch++)
- {
- /* This was split into 3 if's to
- avoid an arbitrary limit in some compiler. */
- if ( (is_alnum && ISALNUM (ch))
- || (is_alpha && ISALPHA (ch))
- || (is_blank && ISBLANK (ch))
- || (is_cntrl && ISCNTRL (ch)))
- SET_LIST_BIT (ch);
- if ( (is_digit && ISDIGIT (ch))
- || (is_graph && ISGRAPH (ch))
- || (is_lower && ISLOWER (ch))
- || (is_print && ISPRINT (ch)))
- SET_LIST_BIT (ch);
- if ( (is_punct && ISPUNCT (ch))
- || (is_space && ISSPACE (ch))
- || (is_upper && ISUPPER (ch))
- || (is_xdigit && ISXDIGIT (ch)))
- SET_LIST_BIT (ch);
- if ( translate && (is_upper || is_lower)
- && (ISUPPER (ch) || ISLOWER (ch)))
- SET_LIST_BIT (ch);
- }
- had_char_class = true;
-#endif /* libc || wctype.h */
- }
- else
- {
- c1++;
- while (c1--)
- PATUNFETCH;
- SET_LIST_BIT ('[');
- SET_LIST_BIT (':');
- had_char_class = false;
- }
- }
- else
- {
- had_char_class = false;
- SET_LIST_BIT (c);
- }
- }
-
- /* Discard any (non)matching list bytes that are all 0 at the
- end of the map. Decrease the map-length byte too. */
- while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
- b[-1]--;
- b += b[-1];
- }
- break;
-
-
- case '(':
- if (syntax & RE_NO_BK_PARENS)
- goto handle_open;
- else
- goto normal_char;
-
-
- case ')':
- if (syntax & RE_NO_BK_PARENS)
- goto handle_close;
- else
- goto normal_char;
-
-
- case '\n':
- if (syntax & RE_NEWLINE_ALT)
- goto handle_alt;
- else
- goto normal_char;
-
-
- case '|':
- if (syntax & RE_NO_BK_VBAR)
- goto handle_alt;
- else
- goto normal_char;
-
-
- case '{':
- if (syntax & RE_INTERVALS && syntax & RE_NO_BK_BRACES)
- goto handle_interval;
- else
- goto normal_char;
-
-
- case '\\':
- if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
-
- /* Do not translate the character after the \, so that we can
- distinguish, e.g., \B from \b, even if we normally would
- translate, e.g., B to b. */
- PATFETCH_RAW (c);
-
- switch (c)
- {
- case '(':
- if (syntax & RE_NO_BK_PARENS)
- goto normal_backslash;
-
- handle_open:
- bufp->re_nsub++;
- regnum++;
-
- if (COMPILE_STACK_FULL)
- {
- RETALLOC (compile_stack.stack, compile_stack.size << 1,
- compile_stack_elt_t);
- if (compile_stack.stack == NULL) return REG_ESPACE;
-
- compile_stack.size <<= 1;
- }
-
- /* These are the values to restore when we hit end of this
- group. They are all relative offsets, so that if the
- whole pattern moves because of realloc, they will still
- be valid. */
- COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer;
- COMPILE_STACK_TOP.fixup_alt_jump
- = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0;
- COMPILE_STACK_TOP.laststart_offset = b - bufp->buffer;
- COMPILE_STACK_TOP.regnum = regnum;
-
- /* We will eventually replace the 0 with the number of
- groups inner to this one. But do not push a
- start_memory for groups beyond the last one we can
- represent in the compiled pattern. */
- if (regnum <= MAX_REGNUM)
- {
- COMPILE_STACK_TOP.inner_group_offset = b - bufp->buffer + 2;
- BUF_PUSH_3 (start_memory, regnum, 0);
- }
-
- compile_stack.avail++;
-
- fixup_alt_jump = 0;
- laststart = 0;
- begalt = b;
- /* If we've reached MAX_REGNUM groups, then this open
- won't actually generate any code, so we'll have to
- clear pending_exact explicitly. */
- pending_exact = 0;
- break;
-
-
- case ')':
- if (syntax & RE_NO_BK_PARENS) goto normal_backslash;
-
- if (COMPILE_STACK_EMPTY)
- {
- if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
- goto normal_backslash;
- else
- FREE_STACK_RETURN (REG_ERPAREN);
- }
-
- handle_close:
- if (fixup_alt_jump)
- { /* Push a dummy failure point at the end of the
- alternative for a possible future
- `pop_failure_jump' to pop. See comments at
- `push_dummy_failure' in `re_match_2'. */
- BUF_PUSH (push_dummy_failure);
-
- /* We allocated space for this jump when we assigned
- to `fixup_alt_jump', in the `handle_alt' case below. */
- STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1);
- }
-
- /* See similar code for backslashed left paren above. */
- if (COMPILE_STACK_EMPTY)
- {
- if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
- goto normal_char;
- else
- FREE_STACK_RETURN (REG_ERPAREN);
- }
-
- /* Since we just checked for an empty stack above, this
- ``can't happen''. */
- assert (compile_stack.avail != 0);
- {
- /* We don't just want to restore into `regnum', because
- later groups should continue to be numbered higher,
- as in `(ab)c(de)' -- the second group is #2. */
- regnum_t this_group_regnum;
-
- compile_stack.avail--;
- begalt = bufp->buffer + COMPILE_STACK_TOP.begalt_offset;
- fixup_alt_jump
- = COMPILE_STACK_TOP.fixup_alt_jump
- ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1
- : 0;
- laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset;
- this_group_regnum = COMPILE_STACK_TOP.regnum;
- /* If we've reached MAX_REGNUM groups, then this open
- won't actually generate any code, so we'll have to
- clear pending_exact explicitly. */
- pending_exact = 0;
-
- /* We're at the end of the group, so now we know how many
- groups were inside this one. */
- if (this_group_regnum <= MAX_REGNUM)
- {
- unsigned char *inner_group_loc
- = bufp->buffer + COMPILE_STACK_TOP.inner_group_offset;
-
- *inner_group_loc = regnum - this_group_regnum;
- BUF_PUSH_3 (stop_memory, this_group_regnum,
- regnum - this_group_regnum);
- }
- }
- break;
-
-
- case '|': /* `\|'. */
- if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR)
- goto normal_backslash;
- handle_alt:
- if (syntax & RE_LIMITED_OPS)
- goto normal_char;
-
- /* Insert before the previous alternative a jump which
- jumps to this alternative if the former fails. */
- GET_BUFFER_SPACE (3);
- INSERT_JUMP (on_failure_jump, begalt, b + 6);
- pending_exact = 0;
- b += 3;
-
- /* The alternative before this one has a jump after it
- which gets executed if it gets matched. Adjust that
- jump so it will jump to this alternative's analogous
- jump (put in below, which in turn will jump to the next
- (if any) alternative's such jump, etc.). The last such
- jump jumps to the correct final destination. A picture:
- _____ _____
- | | | |
- | v | v
- a | b | c
-
- If we are at `b', then fixup_alt_jump right now points to a
- three-byte space after `a'. We'll put in the jump, set
- fixup_alt_jump to right after `b', and leave behind three
- bytes which we'll fill in when we get to after `c'. */
-
- if (fixup_alt_jump)
- STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
-
- /* Mark and leave space for a jump after this alternative,
- to be filled in later either by next alternative or
- when know we're at the end of a series of alternatives. */
- fixup_alt_jump = b;
- GET_BUFFER_SPACE (3);
- b += 3;
-
- laststart = 0;
- begalt = b;
- break;
-
-
- case '{':
- /* If \{ is a literal. */
- if (!(syntax & RE_INTERVALS)
- /* If we're at `\{' and it's not the open-interval
- operator. */
- || ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
- || (p - 2 == pattern && p == pend))
- goto normal_backslash;
-
- handle_interval:
- {
- /* If got here, then the syntax allows intervals. */
-
- /* At least (most) this many matches must be made. */
- int lower_bound = -1, upper_bound = -1;
-
- beg_interval = p - 1;
-
- if (p == pend)
- {
- if (syntax & RE_NO_BK_BRACES)
- goto unfetch_interval;
- else
- FREE_STACK_RETURN (REG_EBRACE);
- }
-
- GET_UNSIGNED_NUMBER (lower_bound);
-
- if (c == ',')
- {
- GET_UNSIGNED_NUMBER (upper_bound);
- if (upper_bound < 0) upper_bound = RE_DUP_MAX;
- }
- else
- /* Interval such as `{1}' => match exactly once. */
- upper_bound = lower_bound;
-
- if (lower_bound < 0 || upper_bound > RE_DUP_MAX
- || lower_bound > upper_bound)
- {
- if (syntax & RE_NO_BK_BRACES)
- goto unfetch_interval;
- else
- FREE_STACK_RETURN (REG_BADBR);
- }
-
- if (!(syntax & RE_NO_BK_BRACES))
- {
- if (c != '\\') FREE_STACK_RETURN (REG_EBRACE);
-
- PATFETCH (c);
- }
-
- if (c != '}')
- {
- if (syntax & RE_NO_BK_BRACES)
- goto unfetch_interval;
- else
- FREE_STACK_RETURN (REG_BADBR);
- }
-
- /* We just parsed a valid interval. */
-
- /* If it's invalid to have no preceding re. */
- if (!laststart)
- {
- if (syntax & RE_CONTEXT_INVALID_OPS)
- FREE_STACK_RETURN (REG_BADRPT);
- else if (syntax & RE_CONTEXT_INDEP_OPS)
- laststart = b;
- else
- goto unfetch_interval;
- }
-
- /* If the upper bound is zero, don't want to succeed at
- all; jump from `laststart' to `b + 3', which will be
- the end of the buffer after we insert the jump. */
- if (upper_bound == 0)
- {
- GET_BUFFER_SPACE (3);
- INSERT_JUMP (jump, laststart, b + 3);
- b += 3;
- }
-
- /* Otherwise, we have a nontrivial interval. When
- we're all done, the pattern will look like:
- set_number_at <jump count> <upper bound>
- set_number_at <succeed_n count> <lower bound>
- succeed_n <after jump addr> <succeed_n count>
- <body of loop>
- jump_n <succeed_n addr> <jump count>
- (The upper bound and `jump_n' are omitted if
- `upper_bound' is 1, though.) */
- else
- { /* If the upper bound is > 1, we need to insert
- more at the end of the loop. */
- unsigned nbytes = 10 + (upper_bound > 1) * 10;
-
- GET_BUFFER_SPACE (nbytes);
-
- /* Initialize lower bound of the `succeed_n', even
- though it will be set during matching by its
- attendant `set_number_at' (inserted next),
- because `re_compile_fastmap' needs to know.
- Jump to the `jump_n' we might insert below. */
- INSERT_JUMP2 (succeed_n, laststart,
- b + 5 + (upper_bound > 1) * 5,
- lower_bound);
- b += 5;
-
- /* Code to initialize the lower bound. Insert
- before the `succeed_n'. The `5' is the last two
- bytes of this `set_number_at', plus 3 bytes of
- the following `succeed_n'. */
- insert_op2 (set_number_at, laststart, 5, lower_bound, b);
- b += 5;
-
- if (upper_bound > 1)
- { /* More than one repetition is allowed, so
- append a backward jump to the `succeed_n'
- that starts this interval.
-
- When we've reached this during matching,
- we'll have matched the interval once, so
- jump back only `upper_bound - 1' times. */
- STORE_JUMP2 (jump_n, b, laststart + 5,
- upper_bound - 1);
- b += 5;
-
- /* The location we want to set is the second
- parameter of the `jump_n'; that is `b-2' as
- an absolute address. `laststart' will be
- the `set_number_at' we're about to insert;
- `laststart+3' the number to set, the source
- for the relative address. But we are
- inserting into the middle of the pattern --
- so everything is getting moved up by 5.
- Conclusion: (b - 2) - (laststart + 3) + 5,
- i.e., b - laststart.
-
- We insert this at the beginning of the loop
- so that if we fail during matching, we'll
- reinitialize the bounds. */
- insert_op2 (set_number_at, laststart, b - laststart,
- upper_bound - 1, b);
- b += 5;
- }
- }
- pending_exact = 0;
- beg_interval = NULL;
- }
- break;
-
- unfetch_interval:
- /* If an invalid interval, match the characters as literals. */
- assert (beg_interval);
- p = beg_interval;
- beg_interval = NULL;
-
- /* normal_char and normal_backslash need `c'. */
- PATFETCH (c);
-
- if (!(syntax & RE_NO_BK_BRACES))
- {
- if (p > pattern && p[-1] == '\\')
- goto normal_backslash;
- }
- goto normal_char;
-
-#ifdef emacs
- /* There is no way to specify the before_dot and after_dot
- operators. rms says this is ok. --karl */
- case '=':
- BUF_PUSH (at_dot);
- break;
-
- case 's':
- laststart = b;
- PATFETCH (c);
- BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]);
- break;
-
- case 'S':
- laststart = b;
- PATFETCH (c);
- BUF_PUSH_2 (notsyntaxspec, syntax_spec_code[c]);
- break;
-#endif /* emacs */
-
-
- case 'w':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- laststart = b;
- BUF_PUSH (wordchar);
- break;
-
-
- case 'W':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- laststart = b;
- BUF_PUSH (notwordchar);
- break;
-
-
- case '<':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (wordbeg);
- break;
-
- case '>':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (wordend);
- break;
-
- case 'b':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (wordbound);
- break;
-
- case 'B':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (notwordbound);
- break;
-
- case '`':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (begbuf);
- break;
-
- case '\'':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (endbuf);
- break;
-
- case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- if (syntax & RE_NO_BK_REFS)
- goto normal_char;
-
- c1 = c - '0';
-
- if (c1 > regnum)
- FREE_STACK_RETURN (REG_ESUBREG);
-
- /* Can't back reference to a subexpression if inside of it. */
- if (group_in_compile_stack (compile_stack, (regnum_t) c1))
- goto normal_char;
-
- laststart = b;
- BUF_PUSH_2 (duplicate, c1);
- break;
-
-
- case '+':
- case '?':
- if (syntax & RE_BK_PLUS_QM)
- goto handle_plus;
- else
- goto normal_backslash;
-
- default:
- normal_backslash:
- /* You might think it would be useful for \ to mean
- not to translate; but if we don't translate it
- it will never match anything. */
- c = TRANSLATE (c);
- goto normal_char;
- }
- break;
-
-
- default:
- /* Expects the character in `c'. */
- normal_char:
- /* If no exactn currently being built. */
- if (!pending_exact
-
- /* If last exactn not at current position. */
- || pending_exact + *pending_exact + 1 != b
-
- /* We have only one byte following the exactn for the count. */
- || *pending_exact == (1 << BYTEWIDTH) - 1
-
- /* If followed by a repetition operator. */
- || *p == '*' || *p == '^'
- || ((syntax & RE_BK_PLUS_QM)
- ? *p == '\\' && (p[1] == '+' || p[1] == '?')
- : (*p == '+' || *p == '?'))
- || ((syntax & RE_INTERVALS)
- && ((syntax & RE_NO_BK_BRACES)
- ? *p == '{'
- : (p[0] == '\\' && p[1] == '{'))))
- {
- /* Start building a new exactn. */
-
- laststart = b;
-
- BUF_PUSH_2 (exactn, 0);
- pending_exact = b - 1;
- }
-
- BUF_PUSH (c);
- (*pending_exact)++;
- break;
- } /* switch (c) */
- } /* while p != pend */
-
-
- /* Through the pattern now. */
-
- if (fixup_alt_jump)
- STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
-
- if (!COMPILE_STACK_EMPTY)
- FREE_STACK_RETURN (REG_EPAREN);
-
- /* If we don't want backtracking, force success
- the first time we reach the end of the compiled pattern. */
- if (syntax & RE_NO_POSIX_BACKTRACKING)
- BUF_PUSH (succeed);
-
- free (compile_stack.stack);
-
- /* We have succeeded; set the length of the buffer. */
- bufp->used = b - bufp->buffer;
-
-#ifdef DEBUG
- if (debug)
- {
- DEBUG_PRINT1 ("\nCompiled pattern: \n");
- print_compiled_pattern (bufp);
- }
-#endif /* DEBUG */
-
-#ifndef MATCH_MAY_ALLOCATE
- /* Initialize the failure stack to the largest possible stack. This
- isn't necessary unless we're trying to avoid calling alloca in
- the search and match routines. */
- {
- int num_regs = bufp->re_nsub + 1;
-
- /* Since DOUBLE_FAIL_STACK refuses to double only if the current size
- is strictly greater than re_max_failures, the largest possible stack
- is 2 * re_max_failures failure points. */
- if (fail_stack.size < (2 * re_max_failures * MAX_FAILURE_ITEMS))
- {
- fail_stack.size = (2 * re_max_failures * MAX_FAILURE_ITEMS);
-
-# ifdef emacs
- if (! fail_stack.stack)
- fail_stack.stack
- = (fail_stack_elt_t *) xmalloc (fail_stack.size
- * sizeof (fail_stack_elt_t));
- else
- fail_stack.stack
- = (fail_stack_elt_t *) xrealloc (fail_stack.stack,
- (fail_stack.size
- * sizeof (fail_stack_elt_t)));
-# else /* not emacs */
- if (! fail_stack.stack)
- fail_stack.stack
- = (fail_stack_elt_t *) malloc (fail_stack.size
- * sizeof (fail_stack_elt_t));
- else
- fail_stack.stack
- = (fail_stack_elt_t *) realloc (fail_stack.stack,
- (fail_stack.size
- * sizeof (fail_stack_elt_t)));
-# endif /* not emacs */
- }
-
- regex_grow_registers (num_regs);
- }
-#endif /* not MATCH_MAY_ALLOCATE */
-
- return REG_NOERROR;
-} /* regex_compile */
-
-/* Subroutines for `regex_compile'. */
-
-/* Store OP at LOC followed by two-byte integer parameter ARG. */
-
-static void
-store_op1 (op, loc, arg)
- re_opcode_t op;
- unsigned char *loc;
- int arg;
-{
- *loc = (unsigned char) op;
- STORE_NUMBER (loc + 1, arg);
-}
-
-
-/* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */
-
-static void
-store_op2 (op, loc, arg1, arg2)
- re_opcode_t op;
- unsigned char *loc;
- int arg1, arg2;
-{
- *loc = (unsigned char) op;
- STORE_NUMBER (loc + 1, arg1);
- STORE_NUMBER (loc + 3, arg2);
-}
-
-
-/* Copy the bytes from LOC to END to open up three bytes of space at LOC
- for OP followed by two-byte integer parameter ARG. */
-
-static void
-insert_op1 (op, loc, arg, end)
- re_opcode_t op;
- unsigned char *loc;
- int arg;
- unsigned char *end;
-{
- register unsigned char *pfrom = end;
- register unsigned char *pto = end + 3;
-
- while (pfrom != loc)
- *--pto = *--pfrom;
-
- store_op1 (op, loc, arg);
-}
-
-
-/* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */
-
-static void
-insert_op2 (op, loc, arg1, arg2, end)
- re_opcode_t op;
- unsigned char *loc;
- int arg1, arg2;
- unsigned char *end;
-{
- register unsigned char *pfrom = end;
- register unsigned char *pto = end + 5;
-
- while (pfrom != loc)
- *--pto = *--pfrom;
-
- store_op2 (op, loc, arg1, arg2);
-}
-
-
-/* P points to just after a ^ in PATTERN. Return true if that ^ comes
- after an alternative or a begin-subexpression. We assume there is at
- least one character before the ^. */
-
-static boolean
-at_begline_loc_p (pattern, p, syntax)
- const char *pattern, *p;
- reg_syntax_t syntax;
-{
- const char *prev = p - 2;
- boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
-
- return
- /* After a subexpression? */
- (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash))
- /* After an alternative? */
- || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash));
-}
-
-
-/* The dual of at_begline_loc_p. This one is for $. We assume there is
- at least one character after the $, i.e., `P < PEND'. */
-
-static boolean
-at_endline_loc_p (p, pend, syntax)
- const char *p, *pend;
- reg_syntax_t syntax;
-{
- const char *next = p;
- boolean next_backslash = *next == '\\';
- const char *next_next = p + 1 < pend ? p + 1 : 0;
-
- return
- /* Before a subexpression? */
- (syntax & RE_NO_BK_PARENS ? *next == ')'
- : next_backslash && next_next && *next_next == ')')
- /* Before an alternative? */
- || (syntax & RE_NO_BK_VBAR ? *next == '|'
- : next_backslash && next_next && *next_next == '|');
-}
-
-
-/* Returns true if REGNUM is in one of COMPILE_STACK's elements and
- false if it's not. */
-
-static boolean
-group_in_compile_stack (compile_stack, regnum)
- compile_stack_type compile_stack;
- regnum_t regnum;
-{
- int this_element;
-
- for (this_element = compile_stack.avail - 1;
- this_element >= 0;
- this_element--)
- if (compile_stack.stack[this_element].regnum == regnum)
- return true;
-
- return false;
-}
-
-
-/* Read the ending character of a range (in a bracket expression) from the
- uncompiled pattern *P_PTR (which ends at PEND). We assume the
- starting character is in `P[-2]'. (`P[-1]' is the character `-'.)
- Then we set the translation of all bits between the starting and
- ending characters (inclusive) in the compiled pattern B.
-
- Return an error code.
-
- We use these short variable names so we can use the same macros as
- `regex_compile' itself. */
-
-static reg_errcode_t
-compile_range (p_ptr, pend, translate, syntax, b)
- const char **p_ptr, *pend;
- RE_TRANSLATE_TYPE translate;
- reg_syntax_t syntax;
- unsigned char *b;
-{
- unsigned this_char;
-
- const char *p = *p_ptr;
- unsigned int range_start, range_end;
-
- if (p == pend)
- return REG_ERANGE;
-
- /* Even though the pattern is a signed `char *', we need to fetch
- with unsigned char *'s; if the high bit of the pattern character
- is set, the range endpoints will be negative if we fetch using a
- signed char *.
-
- We also want to fetch the endpoints without translating them; the
- appropriate translation is done in the bit-setting loop below. */
- /* The SVR4 compiler on the 3B2 had trouble with unsigned const char *. */
- range_start = ((const unsigned char *) p)[-2];
- range_end = ((const unsigned char *) p)[0];
-
- /* Have to increment the pointer into the pattern string, so the
- caller isn't still at the ending character. */
- (*p_ptr)++;
-
- /* If the start is after the end, the range is empty. */
- if (range_start > range_end)
- return syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR;
-
- /* Here we see why `this_char' has to be larger than an `unsigned
- char' -- the range is inclusive, so if `range_end' == 0xff
- (assuming 8-bit characters), we would otherwise go into an infinite
- loop, since all characters <= 0xff. */
- for (this_char = range_start; this_char <= range_end; this_char++)
- {
- SET_LIST_BIT (TRANSLATE (this_char));
- }
-
- return REG_NOERROR;
-}
-
-/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
- BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible
- characters can start a string that matches the pattern. This fastmap
- is used by re_search to skip quickly over impossible starting points.
-
- The caller must supply the address of a (1 << BYTEWIDTH)-byte data
- area as BUFP->fastmap.
-
- We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in
- the pattern buffer.
-
- Returns 0 if we succeed, -2 if an internal error. */
-
-int
-re_compile_fastmap (bufp)
- struct re_pattern_buffer *bufp;
-{
- int j, k;
-#ifdef MATCH_MAY_ALLOCATE
- fail_stack_type fail_stack;
-#endif
-#ifndef REGEX_MALLOC
- char *destination;
-#endif
-
- register char *fastmap = bufp->fastmap;
- unsigned char *pattern = bufp->buffer;
- unsigned char *p = pattern;
- register unsigned char *pend = pattern + bufp->used;
-
-#ifdef REL_ALLOC
- /* This holds the pointer to the failure stack, when
- it is allocated relocatably. */
- fail_stack_elt_t *failure_stack_ptr;
-#endif
-
- /* Assume that each path through the pattern can be null until
- proven otherwise. We set this false at the bottom of switch
- statement, to which we get only if a particular path doesn't
- match the empty string. */
- boolean path_can_be_null = true;
-
- /* We aren't doing a `succeed_n' to begin with. */
- boolean succeed_n_p = false;
-
- assert (fastmap != NULL && p != NULL);
-
- INIT_FAIL_STACK ();
- bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */
- bufp->fastmap_accurate = 1; /* It will be when we're done. */
- bufp->can_be_null = 0;
-
- while (1)
- {
- if (p == pend || *p == succeed)
- {
- /* We have reached the (effective) end of pattern. */
- if (!FAIL_STACK_EMPTY ())
- {
- bufp->can_be_null |= path_can_be_null;
-
- /* Reset for next path. */
- path_can_be_null = true;
-
- p = fail_stack.stack[--fail_stack.avail].pointer;
-
- continue;
- }
- else
- break;
- }
-
- /* We should never be about to go beyond the end of the pattern. */
- assert (p < pend);
-
- switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
- {
-
- /* I guess the idea here is to simply not bother with a fastmap
- if a backreference is used, since it's too hard to figure out
- the fastmap for the corresponding group. Setting
- `can_be_null' stops `re_search_2' from using the fastmap, so
- that is all we do. */
- case duplicate:
- bufp->can_be_null = 1;
- goto done;
-
-
- /* Following are the cases which match a character. These end
- with `break'. */
-
- case exactn:
- fastmap[p[1]] = 1;
- break;
-
-
- case charset:
- for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
- if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))
- fastmap[j] = 1;
- break;
-
-
- case charset_not:
- /* Chars beyond end of map must be allowed. */
- for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++)
- fastmap[j] = 1;
-
- for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
- if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))))
- fastmap[j] = 1;
- break;
-
-
- case wordchar:
- for (j = 0; j < (1 << BYTEWIDTH); j++)
- if (SYNTAX (j) == Sword)
- fastmap[j] = 1;
- break;
-
-
- case notwordchar:
- for (j = 0; j < (1 << BYTEWIDTH); j++)
- if (SYNTAX (j) != Sword)
- fastmap[j] = 1;
- break;
-
-
- case anychar:
- {
- int fastmap_newline = fastmap['\n'];
-
- /* `.' matches anything ... */
- for (j = 0; j < (1 << BYTEWIDTH); j++)
- fastmap[j] = 1;
-
- /* ... except perhaps newline. */
- if (!(bufp->syntax & RE_DOT_NEWLINE))
- fastmap['\n'] = fastmap_newline;
-
- /* Return if we have already set `can_be_null'; if we have,
- then the fastmap is irrelevant. Something's wrong here. */
- else if (bufp->can_be_null)
- goto done;
-
- /* Otherwise, have to check alternative paths. */
- break;
- }
-
-#ifdef emacs
- case syntaxspec:
- k = *p++;
- for (j = 0; j < (1 << BYTEWIDTH); j++)
- if (SYNTAX (j) == (enum syntaxcode) k)
- fastmap[j] = 1;
- break;
-
-
- case notsyntaxspec:
- k = *p++;
- for (j = 0; j < (1 << BYTEWIDTH); j++)
- if (SYNTAX (j) != (enum syntaxcode) k)
- fastmap[j] = 1;
- break;
-
-
- /* All cases after this match the empty string. These end with
- `continue'. */
-
-
- case before_dot:
- case at_dot:
- case after_dot:
- continue;
-#endif /* emacs */
-
-
- case no_op:
- case begline:
- case endline:
- case begbuf:
- case endbuf:
- case wordbound:
- case notwordbound:
- case wordbeg:
- case wordend:
- case push_dummy_failure:
- continue;
-
-
- case jump_n:
- case pop_failure_jump:
- case maybe_pop_jump:
- case jump:
- case jump_past_alt:
- case dummy_failure_jump:
- EXTRACT_NUMBER_AND_INCR (j, p);
- p += j;
- if (j > 0)
- continue;
-
- /* Jump backward implies we just went through the body of a
- loop and matched nothing. Opcode jumped to should be
- `on_failure_jump' or `succeed_n'. Just treat it like an
- ordinary jump. For a * loop, it has pushed its failure
- point already; if so, discard that as redundant. */
- if ((re_opcode_t) *p != on_failure_jump
- && (re_opcode_t) *p != succeed_n)
- continue;
-
- p++;
- EXTRACT_NUMBER_AND_INCR (j, p);
- p += j;
-
- /* If what's on the stack is where we are now, pop it. */
- if (!FAIL_STACK_EMPTY ()
- && fail_stack.stack[fail_stack.avail - 1].pointer == p)
- fail_stack.avail--;
-
- continue;
-
-
- case on_failure_jump:
- case on_failure_keep_string_jump:
- handle_on_failure_jump:
- EXTRACT_NUMBER_AND_INCR (j, p);
-
- /* For some patterns, e.g., `(a?)?', `p+j' here points to the
- end of the pattern. We don't want to push such a point,
- since when we restore it above, entering the switch will
- increment `p' past the end of the pattern. We don't need
- to push such a point since we obviously won't find any more
- fastmap entries beyond `pend'. Such a pattern can match
- the null string, though. */
- if (p + j < pend)
- {
- if (!PUSH_PATTERN_OP (p + j, fail_stack))
- {
- RESET_FAIL_STACK ();
- return -2;
- }
- }
- else
- bufp->can_be_null = 1;
-
- if (succeed_n_p)
- {
- EXTRACT_NUMBER_AND_INCR (k, p); /* Skip the n. */
- succeed_n_p = false;
- }
-
- continue;
-
-
- case succeed_n:
- /* Get to the number of times to succeed. */
- p += 2;
-
- /* Increment p past the n for when k != 0. */
- EXTRACT_NUMBER_AND_INCR (k, p);
- if (k == 0)
- {
- p -= 4;
- succeed_n_p = true; /* Spaghetti code alert. */
- goto handle_on_failure_jump;
- }
- continue;
-
-
- case set_number_at:
- p += 4;
- continue;
-
-
- case start_memory:
- case stop_memory:
- p += 2;
- continue;
-
-
- default:
- abort (); /* We have listed all the cases. */
- } /* switch *p++ */
-
- /* Getting here means we have found the possible starting
- characters for one path of the pattern -- and that the empty
- string does not match. We need not follow this path further.
- Instead, look at the next alternative (remembered on the
- stack), or quit if no more. The test at the top of the loop
- does these things. */
- path_can_be_null = false;
- p = pend;
- } /* while p */
-
- /* Set `can_be_null' for the last path (also the first path, if the
- pattern is empty). */
- bufp->can_be_null |= path_can_be_null;
-
- done:
- RESET_FAIL_STACK ();
- return 0;
-} /* re_compile_fastmap */
-#ifdef _LIBC
-weak_alias (__re_compile_fastmap, re_compile_fastmap)
-#endif
-
-/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
- ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use
- this memory for recording register information. STARTS and ENDS
- must be allocated using the malloc library routine, and must each
- be at least NUM_REGS * sizeof (regoff_t) bytes long.
-
- If NUM_REGS == 0, then subsequent matches should allocate their own
- register data.
-
- Unless this function is called, the first search or match using
- PATTERN_BUFFER will allocate its own register data, without
- freeing the old data. */
-
-void
-re_set_registers (bufp, regs, num_regs, starts, ends)
- struct re_pattern_buffer *bufp;
- struct re_registers *regs;
- unsigned num_regs;
- regoff_t *starts, *ends;
-{
- if (num_regs)
- {
- bufp->regs_allocated = REGS_REALLOCATE;
- regs->num_regs = num_regs;
- regs->start = starts;
- regs->end = ends;
- }
- else
- {
- bufp->regs_allocated = REGS_UNALLOCATED;
- regs->num_regs = 0;
- regs->start = regs->end = (regoff_t *) 0;
- }
-}
-#ifdef _LIBC
-weak_alias (__re_set_registers, re_set_registers)
-#endif
-
-/* Searching routines. */
-
-/* Like re_search_2, below, but only one string is specified, and
- doesn't let you say where to stop matching. */
-
-int
-re_search (bufp, string, size, startpos, range, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int size, startpos, range;
- struct re_registers *regs;
-{
- return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
- regs, size);
-}
-#ifdef _LIBC
-weak_alias (__re_search, re_search)
-#endif
-
-
-/* Using the compiled pattern in BUFP->buffer, first tries to match the
- virtual concatenation of STRING1 and STRING2, starting first at index
- STARTPOS, then at STARTPOS + 1, and so on.
-
- STRING1 and STRING2 have length SIZE1 and SIZE2, respectively.
-
- RANGE is how far to scan while trying to match. RANGE = 0 means try
- only at STARTPOS; in general, the last start tried is STARTPOS +
- RANGE.
-
- In REGS, return the indices of the virtual concatenation of STRING1
- and STRING2 that matched the entire BUFP->buffer and its contained
- subexpressions.
-
- Do not consider matching one past the index STOP in the virtual
- concatenation of STRING1 and STRING2.
-
- We return either the position in the strings at which the match was
- found, -1 if no match, or -2 if error (such as failure
- stack overflow). */
-
-int
-re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int startpos;
- int range;
- struct re_registers *regs;
- int stop;
-{
- int val;
- register char *fastmap = bufp->fastmap;
- register RE_TRANSLATE_TYPE translate = bufp->translate;
- int total_size = size1 + size2;
- int endpos = startpos + range;
-
- /* Check for out-of-range STARTPOS. */
- if (startpos < 0 || startpos > total_size)
- return -1;
-
- /* Fix up RANGE if it might eventually take us outside
- the virtual concatenation of STRING1 and STRING2.
- Make sure we won't move STARTPOS below 0 or above TOTAL_SIZE. */
- if (endpos < 0)
- range = 0 - startpos;
- else if (endpos > total_size)
- range = total_size - startpos;
-
- /* If the search isn't to be a backwards one, don't waste time in a
- search for a pattern that must be anchored. */
- if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == begbuf && range > 0)
- {
- if (startpos > 0)
- return -1;
- else
- range = 1;
- }
-
-#ifdef emacs
- /* In a forward search for something that starts with \=.
- don't keep searching past point. */
- if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0)
- {
- range = PT - startpos;
- if (range <= 0)
- return -1;
- }
-#endif /* emacs */
-
- /* Update the fastmap now if not correct already. */
- if (fastmap && !bufp->fastmap_accurate)
- if (re_compile_fastmap (bufp) == -2)
- return -2;
-
- /* Loop through the string, looking for a place to start matching. */
- for (;;)
- {
- /* If a fastmap is supplied, skip quickly over characters that
- cannot be the start of a match. If the pattern can match the
- null string, however, we don't need to skip characters; we want
- the first null string. */
- if (fastmap && startpos < total_size && !bufp->can_be_null)
- {
- if (range > 0) /* Searching forwards. */
- {
- register const char *d;
- register int lim = 0;
- int irange = range;
-
- if (startpos < size1 && startpos + range >= size1)
- lim = range - (size1 - startpos);
-
- d = (startpos >= size1 ? string2 - size1 : string1) + startpos;
-
- /* Written out as an if-else to avoid testing `translate'
- inside the loop. */
- if (translate)
- while (range > lim
- && !fastmap[(unsigned char)
- translate[(unsigned char) *d++]])
- range--;
- else
- while (range > lim && !fastmap[(unsigned char) *d++])
- range--;
-
- startpos += irange - range;
- }
- else /* Searching backwards. */
- {
- register char c = (size1 == 0 || startpos >= size1
- ? string2[startpos - size1]
- : string1[startpos]);
-
- if (!fastmap[(unsigned char) TRANSLATE (c)])
- goto advance;
- }
- }
-
- /* If can't match the null string, and that's all we have left, fail. */
- if (range >= 0 && startpos == total_size && fastmap
- && !bufp->can_be_null)
- return -1;
-
- val = re_match_2_internal (bufp, string1, size1, string2, size2,
- startpos, regs, stop);
-#ifndef REGEX_MALLOC
-# ifdef C_ALLOCA
- alloca (0);
-# endif
-#endif
-
- if (val >= 0)
- return startpos;
-
- if (val == -2)
- return -2;
-
- advance:
- if (!range)
- break;
- else if (range > 0)
- {
- range--;
- startpos++;
- }
- else
- {
- range++;
- startpos--;
- }
- }
- return -1;
-} /* re_search_2 */
-#ifdef _LIBC
-weak_alias (__re_search_2, re_search_2)
-#endif
-
-/* This converts PTR, a pointer into one of the search strings `string1'
- and `string2' into an offset from the beginning of that string. */
-#define POINTER_TO_OFFSET(ptr) \
- (FIRST_STRING_P (ptr) \
- ? ((regoff_t) ((ptr) - string1)) \
- : ((regoff_t) ((ptr) - string2 + size1)))
-
-/* Macros for dealing with the split strings in re_match_2. */
-
-#define MATCHING_IN_FIRST_STRING (dend == end_match_1)
-
-/* Call before fetching a character with *d. This switches over to
- string2 if necessary. */
-#define PREFETCH() \
- while (d == dend) \
- { \
- /* End of string2 => fail. */ \
- if (dend == end_match_2) \
- goto fail; \
- /* End of string1 => advance to string2. */ \
- d = string2; \
- dend = end_match_2; \
- }
-
-
-/* Test if at very beginning or at very end of the virtual concatenation
- of `string1' and `string2'. If only one string, it's `string2'. */
-#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2)
-#define AT_STRINGS_END(d) ((d) == end2)
-
-
-/* Test if D points to a character which is word-constituent. We have
- two special cases to check for: if past the end of string1, look at
- the first character in string2; and if before the beginning of
- string2, look at the last character in string1. */
-#define WORDCHAR_P(d) \
- (SYNTAX ((d) == end1 ? *string2 \
- : (d) == string2 - 1 ? *(end1 - 1) : *(d)) \
- == Sword)
-
-/* Disabled due to a compiler bug -- see comment at case wordbound */
-#if 0
-/* Test if the character before D and the one at D differ with respect
- to being word-constituent. */
-#define AT_WORD_BOUNDARY(d) \
- (AT_STRINGS_BEG (d) || AT_STRINGS_END (d) \
- || WORDCHAR_P (d - 1) != WORDCHAR_P (d))
-#endif
-
-/* Free everything we malloc. */
-#ifdef MATCH_MAY_ALLOCATE
-# define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL
-# define FREE_VARIABLES() \
- do { \
- REGEX_FREE_STACK (fail_stack.stack); \
- FREE_VAR (regstart); \
- FREE_VAR (regend); \
- FREE_VAR (old_regstart); \
- FREE_VAR (old_regend); \
- FREE_VAR (best_regstart); \
- FREE_VAR (best_regend); \
- FREE_VAR (reg_info); \
- FREE_VAR (reg_dummy); \
- FREE_VAR (reg_info_dummy); \
- } while (0)
-#else
-# define FREE_VARIABLES() ((void)0) /* Do nothing! But inhibit gcc warning. */
-#endif /* not MATCH_MAY_ALLOCATE */
-
-/* These values must meet several constraints. They must not be valid
- register values; since we have a limit of 255 registers (because
- we use only one byte in the pattern for the register number), we can
- use numbers larger than 255. They must differ by 1, because of
- NUM_FAILURE_ITEMS above. And the value for the lowest register must
- be larger than the value for the highest register, so we do not try
- to actually save any registers when none are active. */
-#define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH)
-#define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1)
-
-/* Matching routines. */
-
-#ifndef emacs /* Emacs never uses this. */
-/* re_match is like re_match_2 except it takes only a single string. */
-
-int
-re_match (bufp, string, size, pos, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int size, pos;
- struct re_registers *regs;
-{
- int result = re_match_2_internal (bufp, NULL, 0, string, size,
- pos, regs, size);
-# ifndef REGEX_MALLOC
-# ifdef C_ALLOCA
- alloca (0);
-# endif
-# endif
- return result;
-}
-# ifdef _LIBC
-weak_alias (__re_match, re_match)
-# endif
-#endif /* not emacs */
-
-static boolean group_match_null_string_p _RE_ARGS ((unsigned char **p,
- unsigned char *end,
- register_info_type *reg_info));
-static boolean alt_match_null_string_p _RE_ARGS ((unsigned char *p,
- unsigned char *end,
- register_info_type *reg_info));
-static boolean common_op_match_null_string_p _RE_ARGS ((unsigned char **p,
- unsigned char *end,
- register_info_type *reg_info));
-static int bcmp_translate _RE_ARGS ((const char *s1, const char *s2,
- int len, char *translate));
-
-/* re_match_2 matches the compiled pattern in BUFP against the
- the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
- and SIZE2, respectively). We start matching at POS, and stop
- matching at STOP.
-
- If REGS is non-null and the `no_sub' field of BUFP is nonzero, we
- store offsets for the substring each group matched in REGS. See the
- documentation for exactly how many groups we fill.
-
- We return -1 if no match, -2 if an internal error (such as the
- failure stack overflowing). Otherwise, we return the length of the
- matched substring. */
-
-int
-re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int pos;
- struct re_registers *regs;
- int stop;
-{
- int result = re_match_2_internal (bufp, string1, size1, string2, size2,
- pos, regs, stop);
-#ifndef REGEX_MALLOC
-# ifdef C_ALLOCA
- alloca (0);
-# endif
-#endif
- return result;
-}
-#ifdef _LIBC
-weak_alias (__re_match_2, re_match_2)
-#endif
-
-/* This is a separate function so that we can force an alloca cleanup
- afterwards. */
-static int
-re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int pos;
- struct re_registers *regs;
- int stop;
-{
- /* General temporaries. */
- int mcnt;
- unsigned char *p1;
-
- /* Just past the end of the corresponding string. */
- const char *end1, *end2;
-
- /* Pointers into string1 and string2, just past the last characters in
- each to consider matching. */
- const char *end_match_1, *end_match_2;
-
- /* Where we are in the data, and the end of the current string. */
- const char *d, *dend;
-
- /* Where we are in the pattern, and the end of the pattern. */
- unsigned char *p = bufp->buffer;
- register unsigned char *pend = p + bufp->used;
-
- /* Mark the opcode just after a start_memory, so we can test for an
- empty subpattern when we get to the stop_memory. */
- unsigned char *just_past_start_mem = 0;
-
- /* We use this to map every character in the string. */
- RE_TRANSLATE_TYPE translate = bufp->translate;
-
- /* Failure point stack. Each place that can handle a failure further
- down the line pushes a failure point on this stack. It consists of
- restart, regend, and reg_info for all registers corresponding to
- the subexpressions we're currently inside, plus the number of such
- registers, and, finally, two char *'s. The first char * is where
- to resume scanning the pattern; the second one is where to resume
- scanning the strings. If the latter is zero, the failure point is
- a ``dummy''; if a failure happens and the failure point is a dummy,
- it gets discarded and the next next one is tried. */
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
- fail_stack_type fail_stack;
-#endif
-#ifdef DEBUG
- static unsigned failure_id = 0;
- unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0;
-#endif
-
-#ifdef REL_ALLOC
- /* This holds the pointer to the failure stack, when
- it is allocated relocatably. */
- fail_stack_elt_t *failure_stack_ptr;
-#endif
-
- /* We fill all the registers internally, independent of what we
- return, for use in backreferences. The number here includes
- an element for register zero. */
- size_t num_regs = bufp->re_nsub + 1;
-
- /* The currently active registers. */
- active_reg_t lowest_active_reg = NO_LOWEST_ACTIVE_REG;
- active_reg_t highest_active_reg = NO_HIGHEST_ACTIVE_REG;
-
- /* Information on the contents of registers. These are pointers into
- the input strings; they record just what was matched (on this
- attempt) by a subexpression part of the pattern, that is, the
- regnum-th regstart pointer points to where in the pattern we began
- matching and the regnum-th regend points to right after where we
- stopped matching the regnum-th subexpression. (The zeroth register
- keeps track of what the whole pattern matches.) */
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- const char **regstart, **regend;
-#endif
-
- /* If a group that's operated upon by a repetition operator fails to
- match anything, then the register for its start will need to be
- restored because it will have been set to wherever in the string we
- are when we last see its open-group operator. Similarly for a
- register's end. */
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- const char **old_regstart, **old_regend;
-#endif
-
- /* The is_active field of reg_info helps us keep track of which (possibly
- nested) subexpressions we are currently in. The matched_something
- field of reg_info[reg_num] helps us tell whether or not we have
- matched any of the pattern so far this time through the reg_num-th
- subexpression. These two fields get reset each time through any
- loop their register is in. */
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
- register_info_type *reg_info;
-#endif
-
- /* The following record the register info as found in the above
- variables when we find a match better than any we've seen before.
- This happens as we backtrack through the failure points, which in
- turn happens only if we have not yet matched the entire string. */
- unsigned best_regs_set = false;
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- const char **best_regstart, **best_regend;
-#endif
-
- /* Logically, this is `best_regend[0]'. But we don't want to have to
- allocate space for that if we're not allocating space for anything
- else (see below). Also, we never need info about register 0 for
- any of the other register vectors, and it seems rather a kludge to
- treat `best_regend' differently than the rest. So we keep track of
- the end of the best match so far in a separate variable. We
- initialize this to NULL so that when we backtrack the first time
- and need to test it, it's not garbage. */
- const char *match_end = NULL;
-
- /* This helps SET_REGS_MATCHED avoid doing redundant work. */
- int set_regs_matched_done = 0;
-
- /* Used when we pop values we don't care about. */
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- const char **reg_dummy;
- register_info_type *reg_info_dummy;
-#endif
-
-#ifdef DEBUG
- /* Counts the total number of registers pushed. */
- unsigned num_regs_pushed = 0;
-#endif
-
- DEBUG_PRINT1 ("\n\nEntering re_match_2.\n");
-
- INIT_FAIL_STACK ();
-
-#ifdef MATCH_MAY_ALLOCATE
- /* Do not bother to initialize all the register variables if there are
- no groups in the pattern, as it takes a fair amount of time. If
- there are groups, we include space for register 0 (the whole
- pattern), even though we never use it, since it simplifies the
- array indexing. We should fix this. */
- if (bufp->re_nsub)
- {
- regstart = REGEX_TALLOC (num_regs, const char *);
- regend = REGEX_TALLOC (num_regs, const char *);
- old_regstart = REGEX_TALLOC (num_regs, const char *);
- old_regend = REGEX_TALLOC (num_regs, const char *);
- best_regstart = REGEX_TALLOC (num_regs, const char *);
- best_regend = REGEX_TALLOC (num_regs, const char *);
- reg_info = REGEX_TALLOC (num_regs, register_info_type);
- reg_dummy = REGEX_TALLOC (num_regs, const char *);
- reg_info_dummy = REGEX_TALLOC (num_regs, register_info_type);
-
- if (!(regstart && regend && old_regstart && old_regend && reg_info
- && best_regstart && best_regend && reg_dummy && reg_info_dummy))
- {
- FREE_VARIABLES ();
- return -2;
- }
- }
- else
- {
- /* We must initialize all our variables to NULL, so that
- `FREE_VARIABLES' doesn't try to free them. */
- regstart = regend = old_regstart = old_regend = best_regstart
- = best_regend = reg_dummy = NULL;
- reg_info = reg_info_dummy = (register_info_type *) NULL;
- }
-#endif /* MATCH_MAY_ALLOCATE */
-
- /* The starting position is bogus. */
- if (pos < 0 || pos > size1 + size2)
- {
- FREE_VARIABLES ();
- return -1;
- }
-
- /* Initialize subexpression text positions to -1 to mark ones that no
- start_memory/stop_memory has been seen for. Also initialize the
- register information struct. */
- for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
- {
- regstart[mcnt] = regend[mcnt]
- = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE;
-
- REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE;
- IS_ACTIVE (reg_info[mcnt]) = 0;
- MATCHED_SOMETHING (reg_info[mcnt]) = 0;
- EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0;
- }
-
- /* We move `string1' into `string2' if the latter's empty -- but not if
- `string1' is null. */
- if (size2 == 0 && string1 != NULL)
- {
- string2 = string1;
- size2 = size1;
- string1 = 0;
- size1 = 0;
- }
- end1 = string1 + size1;
- end2 = string2 + size2;
-
- /* Compute where to stop matching, within the two strings. */
- if (stop <= size1)
- {
- end_match_1 = string1 + stop;
- end_match_2 = string2;
- }
- else
- {
- end_match_1 = end1;
- end_match_2 = string2 + stop - size1;
- }
-
- /* `p' scans through the pattern as `d' scans through the data.
- `dend' is the end of the input string that `d' points within. `d'
- is advanced into the following input string whenever necessary, but
- this happens before fetching; therefore, at the beginning of the
- loop, `d' can be pointing at the end of a string, but it cannot
- equal `string2'. */
- if (size1 > 0 && pos <= size1)
- {
- d = string1 + pos;
- dend = end_match_1;
- }
- else
- {
- d = string2 + pos - size1;
- dend = end_match_2;
- }
-
- DEBUG_PRINT1 ("The compiled pattern is:\n");
- DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend);
- DEBUG_PRINT1 ("The string to match is: `");
- DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
- DEBUG_PRINT1 ("'\n");
-
- /* This loops over pattern commands. It exits by returning from the
- function if the match is complete, or it drops through if the match
- fails at this starting point in the input data. */
- for (;;)
- {
-#ifdef _LIBC
- DEBUG_PRINT2 ("\n%p: ", p);
-#else
- DEBUG_PRINT2 ("\n0x%x: ", p);
-#endif
-
- if (p == pend)
- { /* End of pattern means we might have succeeded. */
- DEBUG_PRINT1 ("end of pattern ... ");
-
- /* If we haven't matched the entire string, and we want the
- longest match, try backtracking. */
- if (d != end_match_2)
- {
- /* 1 if this match ends in the same string (string1 or string2)
- as the best previous match. */
- boolean same_str_p = (FIRST_STRING_P (match_end)
- == MATCHING_IN_FIRST_STRING);
- /* 1 if this match is the best seen so far. */
- boolean best_match_p;
-
- /* AIX compiler got confused when this was combined
- with the previous declaration. */
- if (same_str_p)
- best_match_p = d > match_end;
- else
- best_match_p = !MATCHING_IN_FIRST_STRING;
-
- DEBUG_PRINT1 ("backtracking.\n");
-
- if (!FAIL_STACK_EMPTY ())
- { /* More failure points to try. */
-
- /* If exceeds best match so far, save it. */
- if (!best_regs_set || best_match_p)
- {
- best_regs_set = true;
- match_end = d;
-
- DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
-
- for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
- {
- best_regstart[mcnt] = regstart[mcnt];
- best_regend[mcnt] = regend[mcnt];
- }
- }
- goto fail;
- }
-
- /* If no failure points, don't restore garbage. And if
- last match is real best match, don't restore second
- best one. */
- else if (best_regs_set && !best_match_p)
- {
- restore_best_regs:
- /* Restore best match. It may happen that `dend ==
- end_match_1' while the restored d is in string2.
- For example, the pattern `x.*y.*z' against the
- strings `x-' and `y-z-', if the two strings are
- not consecutive in memory. */
- DEBUG_PRINT1 ("Restoring best registers.\n");
-
- d = match_end;
- dend = ((d >= string1 && d <= end1)
- ? end_match_1 : end_match_2);
-
- for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
- {
- regstart[mcnt] = best_regstart[mcnt];
- regend[mcnt] = best_regend[mcnt];
- }
- }
- } /* d != end_match_2 */
-
- succeed_label:
- DEBUG_PRINT1 ("Accepting match.\n");
-
- /* If caller wants register contents data back, do it. */
- if (regs && !bufp->no_sub)
- {
- /* Have the register data arrays been allocated? */
- if (bufp->regs_allocated == REGS_UNALLOCATED)
- { /* No. So allocate them with malloc. We need one
- extra element beyond `num_regs' for the `-1' marker
- GNU code uses. */
- regs->num_regs = MAX (RE_NREGS, num_regs + 1);
- regs->start = TALLOC (regs->num_regs, regoff_t);
- regs->end = TALLOC (regs->num_regs, regoff_t);
- if (regs->start == NULL || regs->end == NULL)
- {
- FREE_VARIABLES ();
- return -2;
- }
- bufp->regs_allocated = REGS_REALLOCATE;
- }
- else if (bufp->regs_allocated == REGS_REALLOCATE)
- { /* Yes. If we need more elements than were already
- allocated, reallocate them. If we need fewer, just
- leave it alone. */
- if (regs->num_regs < num_regs + 1)
- {
- regs->num_regs = num_regs + 1;
- RETALLOC (regs->start, regs->num_regs, regoff_t);
- RETALLOC (regs->end, regs->num_regs, regoff_t);
- if (regs->start == NULL || regs->end == NULL)
- {
- FREE_VARIABLES ();
- return -2;
- }
- }
- }
- else
- {
- /* These braces fend off a "empty body in an else-statement"
- warning under GCC when assert expands to nothing. */
- assert (bufp->regs_allocated == REGS_FIXED);
- }
-
- /* Convert the pointer data in `regstart' and `regend' to
- indices. Register zero has to be set differently,
- since we haven't kept track of any info for it. */
- if (regs->num_regs > 0)
- {
- regs->start[0] = pos;
- regs->end[0] = (MATCHING_IN_FIRST_STRING
- ? ((regoff_t) (d - string1))
- : ((regoff_t) (d - string2 + size1)));
- }
-
- /* Go through the first `min (num_regs, regs->num_regs)'
- registers, since that is all we initialized. */
- for (mcnt = 1; (unsigned) mcnt < MIN (num_regs, regs->num_regs);
- mcnt++)
- {
- if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
- regs->start[mcnt] = regs->end[mcnt] = -1;
- else
- {
- regs->start[mcnt]
- = (regoff_t) POINTER_TO_OFFSET (regstart[mcnt]);
- regs->end[mcnt]
- = (regoff_t) POINTER_TO_OFFSET (regend[mcnt]);
- }
- }
-
- /* If the regs structure we return has more elements than
- were in the pattern, set the extra elements to -1. If
- we (re)allocated the registers, this is the case,
- because we always allocate enough to have at least one
- -1 at the end. */
- for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++)
- regs->start[mcnt] = regs->end[mcnt] = -1;
- } /* regs && !bufp->no_sub */
-
- DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
- nfailure_points_pushed, nfailure_points_popped,
- nfailure_points_pushed - nfailure_points_popped);
- DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
-
- mcnt = d - pos - (MATCHING_IN_FIRST_STRING
- ? string1
- : string2 - size1);
-
- DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
-
- FREE_VARIABLES ();
- return mcnt;
- }
-
- /* Otherwise match next pattern command. */
- switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
- {
- /* Ignore these. Used to ignore the n of succeed_n's which
- currently have n == 0. */
- case no_op:
- DEBUG_PRINT1 ("EXECUTING no_op.\n");
- break;
-
- case succeed:
- DEBUG_PRINT1 ("EXECUTING succeed.\n");
- goto succeed_label;
-
- /* Match the next n pattern characters exactly. The following
- byte in the pattern defines n, and the n bytes after that
- are the characters to match. */
- case exactn:
- mcnt = *p++;
- DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
-
- /* This is written out as an if-else so we don't waste time
- testing `translate' inside the loop. */
- if (translate)
- {
- do
- {
- PREFETCH ();
- if ((unsigned char) translate[(unsigned char) *d++]
- != (unsigned char) *p++)
- goto fail;
- }
- while (--mcnt);
- }
- else
- {
- do
- {
- PREFETCH ();
- if (*d++ != (char) *p++) goto fail;
- }
- while (--mcnt);
- }
- SET_REGS_MATCHED ();
- break;
-
-
- /* Match any character except possibly a newline or a null. */
- case anychar:
- DEBUG_PRINT1 ("EXECUTING anychar.\n");
-
- PREFETCH ();
-
- if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n')
- || (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000'))
- goto fail;
-
- SET_REGS_MATCHED ();
- DEBUG_PRINT2 (" Matched `%d'.\n", *d);
- d++;
- break;
-
-
- case charset:
- case charset_not:
- {
- register unsigned char c;
- boolean not = (re_opcode_t) *(p - 1) == charset_not;
-
- DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : "");
-
- PREFETCH ();
- c = TRANSLATE (*d); /* The character to match. */
-
- /* Cast to `unsigned' instead of `unsigned char' in case the
- bit list is a full 32 bytes long. */
- if (c < (unsigned) (*p * BYTEWIDTH)
- && p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
- not = !not;
-
- p += 1 + *p;
-
- if (!not) goto fail;
-
- SET_REGS_MATCHED ();
- d++;
- break;
- }
-
-
- /* The beginning of a group is represented by start_memory.
- The arguments are the register number in the next byte, and the
- number of groups inner to this one in the next. The text
- matched within the group is recorded (in the internal
- registers data structure) under the register number. */
- case start_memory:
- DEBUG_PRINT3 ("EXECUTING start_memory %d (%d):\n", *p, p[1]);
-
- /* Find out if this group can match the empty string. */
- p1 = p; /* To send to group_match_null_string_p. */
-
- if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE)
- REG_MATCH_NULL_STRING_P (reg_info[*p])
- = group_match_null_string_p (&p1, pend, reg_info);
-
- /* Save the position in the string where we were the last time
- we were at this open-group operator in case the group is
- operated upon by a repetition operator, e.g., with `(a*)*b'
- against `ab'; then we want to ignore where we are now in
- the string in case this attempt to match fails. */
- old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
- ? REG_UNSET (regstart[*p]) ? d : regstart[*p]
- : regstart[*p];
- DEBUG_PRINT2 (" old_regstart: %d\n",
- POINTER_TO_OFFSET (old_regstart[*p]));
-
- regstart[*p] = d;
- DEBUG_PRINT2 (" regstart: %d\n", POINTER_TO_OFFSET (regstart[*p]));
-
- IS_ACTIVE (reg_info[*p]) = 1;
- MATCHED_SOMETHING (reg_info[*p]) = 0;
-
- /* Clear this whenever we change the register activity status. */
- set_regs_matched_done = 0;
-
- /* This is the new highest active register. */
- highest_active_reg = *p;
-
- /* If nothing was active before, this is the new lowest active
- register. */
- if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
- lowest_active_reg = *p;
-
- /* Move past the register number and inner group count. */
- p += 2;
- just_past_start_mem = p;
-
- break;
-
-
- /* The stop_memory opcode represents the end of a group. Its
- arguments are the same as start_memory's: the register
- number, and the number of inner groups. */
- case stop_memory:
- DEBUG_PRINT3 ("EXECUTING stop_memory %d (%d):\n", *p, p[1]);
-
- /* We need to save the string position the last time we were at
- this close-group operator in case the group is operated
- upon by a repetition operator, e.g., with `((a*)*(b*)*)*'
- against `aba'; then we want to ignore where we are now in
- the string in case this attempt to match fails. */
- old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
- ? REG_UNSET (regend[*p]) ? d : regend[*p]
- : regend[*p];
- DEBUG_PRINT2 (" old_regend: %d\n",
- POINTER_TO_OFFSET (old_regend[*p]));
-
- regend[*p] = d;
- DEBUG_PRINT2 (" regend: %d\n", POINTER_TO_OFFSET (regend[*p]));
-
- /* This register isn't active anymore. */
- IS_ACTIVE (reg_info[*p]) = 0;
-
- /* Clear this whenever we change the register activity status. */
- set_regs_matched_done = 0;
-
- /* If this was the only register active, nothing is active
- anymore. */
- if (lowest_active_reg == highest_active_reg)
- {
- lowest_active_reg = NO_LOWEST_ACTIVE_REG;
- highest_active_reg = NO_HIGHEST_ACTIVE_REG;
- }
- else
- { /* We must scan for the new highest active register, since
- it isn't necessarily one less than now: consider
- (a(b)c(d(e)f)g). When group 3 ends, after the f), the
- new highest active register is 1. */
- unsigned char r = *p - 1;
- while (r > 0 && !IS_ACTIVE (reg_info[r]))
- r--;
-
- /* If we end up at register zero, that means that we saved
- the registers as the result of an `on_failure_jump', not
- a `start_memory', and we jumped to past the innermost
- `stop_memory'. For example, in ((.)*) we save
- registers 1 and 2 as a result of the *, but when we pop
- back to the second ), we are at the stop_memory 1.
- Thus, nothing is active. */
- if (r == 0)
- {
- lowest_active_reg = NO_LOWEST_ACTIVE_REG;
- highest_active_reg = NO_HIGHEST_ACTIVE_REG;
- }
- else
- highest_active_reg = r;
- }
-
- /* If just failed to match something this time around with a
- group that's operated on by a repetition operator, try to
- force exit from the ``loop'', and restore the register
- information for this group that we had before trying this
- last match. */
- if ((!MATCHED_SOMETHING (reg_info[*p])
- || just_past_start_mem == p - 1)
- && (p + 2) < pend)
- {
- boolean is_a_jump_n = false;
-
- p1 = p + 2;
- mcnt = 0;
- switch ((re_opcode_t) *p1++)
- {
- case jump_n:
- is_a_jump_n = true;
- case pop_failure_jump:
- case maybe_pop_jump:
- case jump:
- case dummy_failure_jump:
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- if (is_a_jump_n)
- p1 += 2;
- break;
-
- default:
- /* do nothing */ ;
- }
- p1 += mcnt;
-
- /* If the next operation is a jump backwards in the pattern
- to an on_failure_jump right before the start_memory
- corresponding to this stop_memory, exit from the loop
- by forcing a failure after pushing on the stack the
- on_failure_jump's jump in the pattern, and d. */
- if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump
- && (re_opcode_t) p1[3] == start_memory && p1[4] == *p)
- {
- /* If this group ever matched anything, then restore
- what its registers were before trying this last
- failed match, e.g., with `(a*)*b' against `ab' for
- regstart[1], and, e.g., with `((a*)*(b*)*)*'
- against `aba' for regend[3].
-
- Also restore the registers for inner groups for,
- e.g., `((a*)(b*))*' against `aba' (register 3 would
- otherwise get trashed). */
-
- if (EVER_MATCHED_SOMETHING (reg_info[*p]))
- {
- unsigned r;
-
- EVER_MATCHED_SOMETHING (reg_info[*p]) = 0;
-
- /* Restore this and inner groups' (if any) registers. */
- for (r = *p; r < (unsigned) *p + (unsigned) *(p + 1);
- r++)
- {
- regstart[r] = old_regstart[r];
-
- /* xx why this test? */
- if (old_regend[r] >= regstart[r])
- regend[r] = old_regend[r];
- }
- }
- p1++;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- PUSH_FAILURE_POINT (p1 + mcnt, d, -2);
-
- goto fail;
- }
- }
-
- /* Move past the register number and the inner group count. */
- p += 2;
- break;
-
-
- /* \<digit> has been turned into a `duplicate' command which is
- followed by the numeric value of <digit> as the register number. */
- case duplicate:
- {
- register const char *d2, *dend2;
- int regno = *p++; /* Get which register to match against. */
- DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
-
- /* Can't back reference a group which we've never matched. */
- if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno]))
- goto fail;
-
- /* Where in input to try to start matching. */
- d2 = regstart[regno];
-
- /* Where to stop matching; if both the place to start and
- the place to stop matching are in the same string, then
- set to the place to stop, otherwise, for now have to use
- the end of the first string. */
-
- dend2 = ((FIRST_STRING_P (regstart[regno])
- == FIRST_STRING_P (regend[regno]))
- ? regend[regno] : end_match_1);
- for (;;)
- {
- /* If necessary, advance to next segment in register
- contents. */
- while (d2 == dend2)
- {
- if (dend2 == end_match_2) break;
- if (dend2 == regend[regno]) break;
-
- /* End of string1 => advance to string2. */
- d2 = string2;
- dend2 = regend[regno];
- }
- /* At end of register contents => success */
- if (d2 == dend2) break;
-
- /* If necessary, advance to next segment in data. */
- PREFETCH ();
-
- /* How many characters left in this segment to match. */
- mcnt = dend - d;
-
- /* Want how many consecutive characters we can match in
- one shot, so, if necessary, adjust the count. */
- if (mcnt > dend2 - d2)
- mcnt = dend2 - d2;
-
- /* Compare that many; failure if mismatch, else move
- past them. */
- if (translate
- ? bcmp_translate (d, d2, mcnt, translate)
- : memcmp (d, d2, mcnt))
- goto fail;
- d += mcnt, d2 += mcnt;
-
- /* Do this because we've match some characters. */
- SET_REGS_MATCHED ();
- }
- }
- break;
-
-
- /* begline matches the empty string at the beginning of the string
- (unless `not_bol' is set in `bufp'), and, if
- `newline_anchor' is set, after newlines. */
- case begline:
- DEBUG_PRINT1 ("EXECUTING begline.\n");
-
- if (AT_STRINGS_BEG (d))
- {
- if (!bufp->not_bol) break;
- }
- else if (d[-1] == '\n' && bufp->newline_anchor)
- {
- break;
- }
- /* In all other cases, we fail. */
- goto fail;
-
-
- /* endline is the dual of begline. */
- case endline:
- DEBUG_PRINT1 ("EXECUTING endline.\n");
-
- if (AT_STRINGS_END (d))
- {
- if (!bufp->not_eol) break;
- }
-
- /* We have to ``prefetch'' the next character. */
- else if ((d == end1 ? *string2 : *d) == '\n'
- && bufp->newline_anchor)
- {
- break;
- }
- goto fail;
-
-
- /* Match at the very beginning of the data. */
- case begbuf:
- DEBUG_PRINT1 ("EXECUTING begbuf.\n");
- if (AT_STRINGS_BEG (d))
- break;
- goto fail;
-
-
- /* Match at the very end of the data. */
- case endbuf:
- DEBUG_PRINT1 ("EXECUTING endbuf.\n");
- if (AT_STRINGS_END (d))
- break;
- goto fail;
-
-
- /* on_failure_keep_string_jump is used to optimize `.*\n'. It
- pushes NULL as the value for the string on the stack. Then
- `pop_failure_point' will keep the current value for the
- string, instead of restoring it. To see why, consider
- matching `foo\nbar' against `.*\n'. The .* matches the foo;
- then the . fails against the \n. But the next thing we want
- to do is match the \n against the \n; if we restored the
- string value, we would be back at the foo.
-
- Because this is used only in specific cases, we don't need to
- check all the things that `on_failure_jump' does, to make
- sure the right things get saved on the stack. Hence we don't
- share its code. The only reason to push anything on the
- stack at all is that otherwise we would have to change
- `anychar's code to do something besides goto fail in this
- case; that seems worse than this. */
- case on_failure_keep_string_jump:
- DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
-
- EXTRACT_NUMBER_AND_INCR (mcnt, p);
-#ifdef _LIBC
- DEBUG_PRINT3 (" %d (to %p):\n", mcnt, p + mcnt);
-#else
- DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt);
-#endif
-
- PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
- break;
-
-
- /* Uses of on_failure_jump:
-
- Each alternative starts with an on_failure_jump that points
- to the beginning of the next alternative. Each alternative
- except the last ends with a jump that in effect jumps past
- the rest of the alternatives. (They really jump to the
- ending jump of the following alternative, because tensioning
- these jumps is a hassle.)
-
- Repeats start with an on_failure_jump that points past both
- the repetition text and either the following jump or
- pop_failure_jump back to this on_failure_jump. */
- case on_failure_jump:
- on_failure:
- DEBUG_PRINT1 ("EXECUTING on_failure_jump");
-
- EXTRACT_NUMBER_AND_INCR (mcnt, p);
-#ifdef _LIBC
- DEBUG_PRINT3 (" %d (to %p)", mcnt, p + mcnt);
-#else
- DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt);
-#endif
-
- /* If this on_failure_jump comes right before a group (i.e.,
- the original * applied to a group), save the information
- for that group and all inner ones, so that if we fail back
- to this point, the group's information will be correct.
- For example, in \(a*\)*\1, we need the preceding group,
- and in \(zz\(a*\)b*\)\2, we need the inner group. */
-
- /* We can't use `p' to check ahead because we push
- a failure point to `p + mcnt' after we do this. */
- p1 = p;
-
- /* We need to skip no_op's before we look for the
- start_memory in case this on_failure_jump is happening as
- the result of a completed succeed_n, as in \(a\)\{1,3\}b\1
- against aba. */
- while (p1 < pend && (re_opcode_t) *p1 == no_op)
- p1++;
-
- if (p1 < pend && (re_opcode_t) *p1 == start_memory)
- {
- /* We have a new highest active register now. This will
- get reset at the start_memory we are about to get to,
- but we will have saved all the registers relevant to
- this repetition op, as described above. */
- highest_active_reg = *(p1 + 1) + *(p1 + 2);
- if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
- lowest_active_reg = *(p1 + 1);
- }
-
- DEBUG_PRINT1 (":\n");
- PUSH_FAILURE_POINT (p + mcnt, d, -2);
- break;
-
-
- /* A smart repeat ends with `maybe_pop_jump'.
- We change it to either `pop_failure_jump' or `jump'. */
- case maybe_pop_jump:
- EXTRACT_NUMBER_AND_INCR (mcnt, p);
- DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt);
- {
- register unsigned char *p2 = p;
-
- /* Compare the beginning of the repeat with what in the
- pattern follows its end. If we can establish that there
- is nothing that they would both match, i.e., that we
- would have to backtrack because of (as in, e.g., `a*a')
- then we can change to pop_failure_jump, because we'll
- never have to backtrack.
-
- This is not true in the case of alternatives: in
- `(a|ab)*' we do need to backtrack to the `ab' alternative
- (e.g., if the string was `ab'). But instead of trying to
- detect that here, the alternative has put on a dummy
- failure point which is what we will end up popping. */
-
- /* Skip over open/close-group commands.
- If what follows this loop is a ...+ construct,
- look at what begins its body, since we will have to
- match at least one of that. */
- while (1)
- {
- if (p2 + 2 < pend
- && ((re_opcode_t) *p2 == stop_memory
- || (re_opcode_t) *p2 == start_memory))
- p2 += 3;
- else if (p2 + 6 < pend
- && (re_opcode_t) *p2 == dummy_failure_jump)
- p2 += 6;
- else
- break;
- }
-
- p1 = p + mcnt;
- /* p1[0] ... p1[2] are the `on_failure_jump' corresponding
- to the `maybe_finalize_jump' of this case. Examine what
- follows. */
-
- /* If we're at the end of the pattern, we can change. */
- if (p2 == pend)
- {
- /* Consider what happens when matching ":\(.*\)"
- against ":/". I don't really understand this code
- yet. */
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT1
- (" End of pattern: change to `pop_failure_jump'.\n");
- }
-
- else if ((re_opcode_t) *p2 == exactn
- || (bufp->newline_anchor && (re_opcode_t) *p2 == endline))
- {
- register unsigned char c
- = *p2 == (unsigned char) endline ? '\n' : p2[2];
-
- if ((re_opcode_t) p1[3] == exactn && p1[5] != c)
- {
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",
- c, p1[5]);
- }
-
- else if ((re_opcode_t) p1[3] == charset
- || (re_opcode_t) p1[3] == charset_not)
- {
- int not = (re_opcode_t) p1[3] == charset_not;
-
- if (c < (unsigned char) (p1[4] * BYTEWIDTH)
- && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
- not = !not;
-
- /* `not' is equal to 1 if c would match, which means
- that we can't change to pop_failure_jump. */
- if (!not)
- {
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
- }
- }
- }
- else if ((re_opcode_t) *p2 == charset)
- {
-#ifdef DEBUG
- register unsigned char c
- = *p2 == (unsigned char) endline ? '\n' : p2[2];
-#endif
-
-#if 0
- if ((re_opcode_t) p1[3] == exactn
- && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
- && (p2[2 + p1[5] / BYTEWIDTH]
- & (1 << (p1[5] % BYTEWIDTH)))))
-#else
- if ((re_opcode_t) p1[3] == exactn
- && ! ((int) p2[1] * BYTEWIDTH > (int) p1[4]
- && (p2[2 + p1[4] / BYTEWIDTH]
- & (1 << (p1[4] % BYTEWIDTH)))))
-#endif
- {
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",
- c, p1[5]);
- }
-
- else if ((re_opcode_t) p1[3] == charset_not)
- {
- int idx;
- /* We win if the charset_not inside the loop
- lists every character listed in the charset after. */
- for (idx = 0; idx < (int) p2[1]; idx++)
- if (! (p2[2 + idx] == 0
- || (idx < (int) p1[4]
- && ((p2[2 + idx] & ~ p1[5 + idx]) == 0))))
- break;
-
- if (idx == p2[1])
- {
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
- }
- }
- else if ((re_opcode_t) p1[3] == charset)
- {
- int idx;
- /* We win if the charset inside the loop
- has no overlap with the one after the loop. */
- for (idx = 0;
- idx < (int) p2[1] && idx < (int) p1[4];
- idx++)
- if ((p2[2 + idx] & p1[5 + idx]) != 0)
- break;
-
- if (idx == p2[1] || idx == p1[4])
- {
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
- }
- }
- }
- }
- p -= 2; /* Point at relative address again. */
- if ((re_opcode_t) p[-1] != pop_failure_jump)
- {
- p[-1] = (unsigned char) jump;
- DEBUG_PRINT1 (" Match => jump.\n");
- goto unconditional_jump;
- }
- /* Note fall through. */
-
-
- /* The end of a simple repeat has a pop_failure_jump back to
- its matching on_failure_jump, where the latter will push a
- failure point. The pop_failure_jump takes off failure
- points put on by this pop_failure_jump's matching
- on_failure_jump; we got through the pattern to here from the
- matching on_failure_jump, so didn't fail. */
- case pop_failure_jump:
- {
- /* We need to pass separate storage for the lowest and
- highest registers, even though we don't care about the
- actual values. Otherwise, we will restore only one
- register from the stack, since lowest will == highest in
- `pop_failure_point'. */
- active_reg_t dummy_low_reg, dummy_high_reg;
- unsigned char *pdummy;
- const char *sdummy;
-
- DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n");
- POP_FAILURE_POINT (sdummy, pdummy,
- dummy_low_reg, dummy_high_reg,
- reg_dummy, reg_dummy, reg_info_dummy);
- }
- /* Note fall through. */
-
- unconditional_jump:
-#ifdef _LIBC
- DEBUG_PRINT2 ("\n%p: ", p);
-#else
- DEBUG_PRINT2 ("\n0x%x: ", p);
-#endif
- /* Note fall through. */
-
- /* Unconditionally jump (without popping any failure points). */
- case jump:
- EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
- DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
- p += mcnt; /* Do the jump. */
-#ifdef _LIBC
- DEBUG_PRINT2 ("(to %p).\n", p);
-#else
- DEBUG_PRINT2 ("(to 0x%x).\n", p);
-#endif
- break;
-
-
- /* We need this opcode so we can detect where alternatives end
- in `group_match_null_string_p' et al. */
- case jump_past_alt:
- DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n");
- goto unconditional_jump;
-
-
- /* Normally, the on_failure_jump pushes a failure point, which
- then gets popped at pop_failure_jump. We will end up at
- pop_failure_jump, also, and with a pattern of, say, `a+', we
- are skipping over the on_failure_jump, so we have to push
- something meaningless for pop_failure_jump to pop. */
- case dummy_failure_jump:
- DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n");
- /* It doesn't matter what we push for the string here. What
- the code at `fail' tests is the value for the pattern. */
- PUSH_FAILURE_POINT (NULL, NULL, -2);
- goto unconditional_jump;
-
-
- /* At the end of an alternative, we need to push a dummy failure
- point in case we are followed by a `pop_failure_jump', because
- we don't want the failure point for the alternative to be
- popped. For example, matching `(a|ab)*' against `aab'
- requires that we match the `ab' alternative. */
- case push_dummy_failure:
- DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n");
- /* See comments just above at `dummy_failure_jump' about the
- two zeroes. */
- PUSH_FAILURE_POINT (NULL, NULL, -2);
- break;
-
- /* Have to succeed matching what follows at least n times.
- After that, handle like `on_failure_jump'. */
- case succeed_n:
- EXTRACT_NUMBER (mcnt, p + 2);
- DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt);
-
- assert (mcnt >= 0);
- /* Originally, this is how many times we HAVE to succeed. */
- if (mcnt > 0)
- {
- mcnt--;
- p += 2;
- STORE_NUMBER_AND_INCR (p, mcnt);
-#ifdef _LIBC
- DEBUG_PRINT3 (" Setting %p to %d.\n", p - 2, mcnt);
-#else
- DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p - 2, mcnt);
-#endif
- }
- else if (mcnt == 0)
- {
-#ifdef _LIBC
- DEBUG_PRINT2 (" Setting two bytes from %p to no_op.\n", p+2);
-#else
- DEBUG_PRINT2 (" Setting two bytes from 0x%x to no_op.\n", p+2);
-#endif
- p[2] = (unsigned char) no_op;
- p[3] = (unsigned char) no_op;
- goto on_failure;
- }
- break;
-
- case jump_n:
- EXTRACT_NUMBER (mcnt, p + 2);
- DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt);
-
- /* Originally, this is how many times we CAN jump. */
- if (mcnt)
- {
- mcnt--;
- STORE_NUMBER (p + 2, mcnt);
-#ifdef _LIBC
- DEBUG_PRINT3 (" Setting %p to %d.\n", p + 2, mcnt);
-#else
- DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p + 2, mcnt);
-#endif
- goto unconditional_jump;
- }
- /* If don't have to jump any more, skip over the rest of command. */
- else
- p += 4;
- break;
-
- case set_number_at:
- {
- DEBUG_PRINT1 ("EXECUTING set_number_at.\n");
-
- EXTRACT_NUMBER_AND_INCR (mcnt, p);
- p1 = p + mcnt;
- EXTRACT_NUMBER_AND_INCR (mcnt, p);
-#ifdef _LIBC
- DEBUG_PRINT3 (" Setting %p to %d.\n", p1, mcnt);
-#else
- DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt);
-#endif
- STORE_NUMBER (p1, mcnt);
- break;
- }
-
-#if 0
- /* The DEC Alpha C compiler 3.x generates incorrect code for the
- test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of
- AT_WORD_BOUNDARY, so this code is disabled. Expanding the
- macro and introducing temporary variables works around the bug. */
-
- case wordbound:
- DEBUG_PRINT1 ("EXECUTING wordbound.\n");
- if (AT_WORD_BOUNDARY (d))
- break;
- goto fail;
-
- case notwordbound:
- DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
- if (AT_WORD_BOUNDARY (d))
- goto fail;
- break;
-#else
- case wordbound:
- {
- boolean prevchar, thischar;
-
- DEBUG_PRINT1 ("EXECUTING wordbound.\n");
- if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
- break;
-
- prevchar = WORDCHAR_P (d - 1);
- thischar = WORDCHAR_P (d);
- if (prevchar != thischar)
- break;
- goto fail;
- }
-
- case notwordbound:
- {
- boolean prevchar, thischar;
-
- DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
- if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
- goto fail;
-
- prevchar = WORDCHAR_P (d - 1);
- thischar = WORDCHAR_P (d);
- if (prevchar != thischar)
- goto fail;
- break;
- }
-#endif
-
- case wordbeg:
- DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
- if (WORDCHAR_P (d) && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
- break;
- goto fail;
-
- case wordend:
- DEBUG_PRINT1 ("EXECUTING wordend.\n");
- if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1)
- && (!WORDCHAR_P (d) || AT_STRINGS_END (d)))
- break;
- goto fail;
-
-#ifdef emacs
- case before_dot:
- DEBUG_PRINT1 ("EXECUTING before_dot.\n");
- if (PTR_CHAR_POS ((unsigned char *) d) >= point)
- goto fail;
- break;
-
- case at_dot:
- DEBUG_PRINT1 ("EXECUTING at_dot.\n");
- if (PTR_CHAR_POS ((unsigned char *) d) != point)
- goto fail;
- break;
-
- case after_dot:
- DEBUG_PRINT1 ("EXECUTING after_dot.\n");
- if (PTR_CHAR_POS ((unsigned char *) d) <= point)
- goto fail;
- break;
-
- case syntaxspec:
- DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
- mcnt = *p++;
- goto matchsyntax;
-
- case wordchar:
- DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n");
- mcnt = (int) Sword;
- matchsyntax:
- PREFETCH ();
- /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
- d++;
- if (SYNTAX (d[-1]) != (enum syntaxcode) mcnt)
- goto fail;
- SET_REGS_MATCHED ();
- break;
-
- case notsyntaxspec:
- DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt);
- mcnt = *p++;
- goto matchnotsyntax;
-
- case notwordchar:
- DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n");
- mcnt = (int) Sword;
- matchnotsyntax:
- PREFETCH ();
- /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
- d++;
- if (SYNTAX (d[-1]) == (enum syntaxcode) mcnt)
- goto fail;
- SET_REGS_MATCHED ();
- break;
-
-#else /* not emacs */
- case wordchar:
- DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n");
- PREFETCH ();
- if (!WORDCHAR_P (d))
- goto fail;
- SET_REGS_MATCHED ();
- d++;
- break;
-
- case notwordchar:
- DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
- PREFETCH ();
- if (WORDCHAR_P (d))
- goto fail;
- SET_REGS_MATCHED ();
- d++;
- break;
-#endif /* not emacs */
-
- default:
- abort ();
- }
- continue; /* Successfully executed one pattern command; keep going. */
-
-
- /* We goto here if a matching operation fails. */
- fail:
- if (!FAIL_STACK_EMPTY ())
- { /* A restart point is known. Restore to that state. */
- DEBUG_PRINT1 ("\nFAIL:\n");
- POP_FAILURE_POINT (d, p,
- lowest_active_reg, highest_active_reg,
- regstart, regend, reg_info);
-
- /* If this failure point is a dummy, try the next one. */
- if (!p)
- goto fail;
-
- /* If we failed to the end of the pattern, don't examine *p. */
- assert (p <= pend);
- if (p < pend)
- {
- boolean is_a_jump_n = false;
-
- /* If failed to a backwards jump that's part of a repetition
- loop, need to pop this failure point and use the next one. */
- switch ((re_opcode_t) *p)
- {
- case jump_n:
- is_a_jump_n = true;
- case maybe_pop_jump:
- case pop_failure_jump:
- case jump:
- p1 = p + 1;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- p1 += mcnt;
-
- if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n)
- || (!is_a_jump_n
- && (re_opcode_t) *p1 == on_failure_jump))
- goto fail;
- break;
- default:
- /* do nothing */ ;
- }
- }
-
- if (d >= string1 && d <= end1)
- dend = end_match_1;
- }
- else
- break; /* Matching at this starting point really fails. */
- } /* for (;;) */
-
- if (best_regs_set)
- goto restore_best_regs;
-
- FREE_VARIABLES ();
-
- return -1; /* Failure to match. */
-} /* re_match_2 */
-
-/* Subroutine definitions for re_match_2. */
-
-
-/* We are passed P pointing to a register number after a start_memory.
-
- Return true if the pattern up to the corresponding stop_memory can
- match the empty string, and false otherwise.
-
- If we find the matching stop_memory, sets P to point to one past its number.
- Otherwise, sets P to an undefined byte less than or equal to END.
-
- We don't handle duplicates properly (yet). */
-
-static boolean
-group_match_null_string_p (p, end, reg_info)
- unsigned char **p, *end;
- register_info_type *reg_info;
-{
- int mcnt;
- /* Point to after the args to the start_memory. */
- unsigned char *p1 = *p + 2;
-
- while (p1 < end)
- {
- /* Skip over opcodes that can match nothing, and return true or
- false, as appropriate, when we get to one that can't, or to the
- matching stop_memory. */
-
- switch ((re_opcode_t) *p1)
- {
- /* Could be either a loop or a series of alternatives. */
- case on_failure_jump:
- p1++;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-
- /* If the next operation is not a jump backwards in the
- pattern. */
-
- if (mcnt >= 0)
- {
- /* Go through the on_failure_jumps of the alternatives,
- seeing if any of the alternatives cannot match nothing.
- The last alternative starts with only a jump,
- whereas the rest start with on_failure_jump and end
- with a jump, e.g., here is the pattern for `a|b|c':
-
- /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6
- /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3
- /exactn/1/c
-
- So, we have to first go through the first (n-1)
- alternatives and then deal with the last one separately. */
-
-
- /* Deal with the first (n-1) alternatives, which start
- with an on_failure_jump (see above) that jumps to right
- past a jump_past_alt. */
-
- while ((re_opcode_t) p1[mcnt-3] == jump_past_alt)
- {
- /* `mcnt' holds how many bytes long the alternative
- is, including the ending `jump_past_alt' and
- its number. */
-
- if (!alt_match_null_string_p (p1, p1 + mcnt - 3,
- reg_info))
- return false;
-
- /* Move to right after this alternative, including the
- jump_past_alt. */
- p1 += mcnt;
-
- /* Break if it's the beginning of an n-th alternative
- that doesn't begin with an on_failure_jump. */
- if ((re_opcode_t) *p1 != on_failure_jump)
- break;
-
- /* Still have to check that it's not an n-th
- alternative that starts with an on_failure_jump. */
- p1++;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- if ((re_opcode_t) p1[mcnt-3] != jump_past_alt)
- {
- /* Get to the beginning of the n-th alternative. */
- p1 -= 3;
- break;
- }
- }
-
- /* Deal with the last alternative: go back and get number
- of the `jump_past_alt' just before it. `mcnt' contains
- the length of the alternative. */
- EXTRACT_NUMBER (mcnt, p1 - 2);
-
- if (!alt_match_null_string_p (p1, p1 + mcnt, reg_info))
- return false;
-
- p1 += mcnt; /* Get past the n-th alternative. */
- } /* if mcnt > 0 */
- break;
-
-
- case stop_memory:
- assert (p1[1] == **p);
- *p = p1 + 2;
- return true;
-
-
- default:
- if (!common_op_match_null_string_p (&p1, end, reg_info))
- return false;
- }
- } /* while p1 < end */
-
- return false;
-} /* group_match_null_string_p */
-
-
-/* Similar to group_match_null_string_p, but doesn't deal with alternatives:
- It expects P to be the first byte of a single alternative and END one
- byte past the last. The alternative can contain groups. */
-
-static boolean
-alt_match_null_string_p (p, end, reg_info)
- unsigned char *p, *end;
- register_info_type *reg_info;
-{
- int mcnt;
- unsigned char *p1 = p;
-
- while (p1 < end)
- {
- /* Skip over opcodes that can match nothing, and break when we get
- to one that can't. */
-
- switch ((re_opcode_t) *p1)
- {
- /* It's a loop. */
- case on_failure_jump:
- p1++;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- p1 += mcnt;
- break;
-
- default:
- if (!common_op_match_null_string_p (&p1, end, reg_info))
- return false;
- }
- } /* while p1 < end */
-
- return true;
-} /* alt_match_null_string_p */
-
-
-/* Deals with the ops common to group_match_null_string_p and
- alt_match_null_string_p.
-
- Sets P to one after the op and its arguments, if any. */
-
-static boolean
-common_op_match_null_string_p (p, end, reg_info)
- unsigned char **p, *end;
- register_info_type *reg_info;
-{
- int mcnt;
- boolean ret;
- int reg_no;
- unsigned char *p1 = *p;
-
- switch ((re_opcode_t) *p1++)
- {
- case no_op:
- case begline:
- case endline:
- case begbuf:
- case endbuf:
- case wordbeg:
- case wordend:
- case wordbound:
- case notwordbound:
-#ifdef emacs
- case before_dot:
- case at_dot:
- case after_dot:
-#endif
- break;
-
- case start_memory:
- reg_no = *p1;
- assert (reg_no > 0 && reg_no <= MAX_REGNUM);
- ret = group_match_null_string_p (&p1, end, reg_info);
-
- /* Have to set this here in case we're checking a group which
- contains a group and a back reference to it. */
-
- if (REG_MATCH_NULL_STRING_P (reg_info[reg_no]) == MATCH_NULL_UNSET_VALUE)
- REG_MATCH_NULL_STRING_P (reg_info[reg_no]) = ret;
-
- if (!ret)
- return false;
- break;
-
- /* If this is an optimized succeed_n for zero times, make the jump. */
- case jump:
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- if (mcnt >= 0)
- p1 += mcnt;
- else
- return false;
- break;
-
- case succeed_n:
- /* Get to the number of times to succeed. */
- p1 += 2;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-
- if (mcnt == 0)
- {
- p1 -= 4;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- p1 += mcnt;
- }
- else
- return false;
- break;
-
- case duplicate:
- if (!REG_MATCH_NULL_STRING_P (reg_info[*p1]))
- return false;
- break;
-
- case set_number_at:
- p1 += 4;
-
- default:
- /* All other opcodes mean we cannot match the empty string. */
- return false;
- }
-
- *p = p1;
- return true;
-} /* common_op_match_null_string_p */
-
-
-/* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN
- bytes; nonzero otherwise. */
-
-static int
-bcmp_translate (s1, s2, len, translate)
- const char *s1, *s2;
- register int len;
- RE_TRANSLATE_TYPE translate;
-{
- register const unsigned char *p1 = (const unsigned char *) s1;
- register const unsigned char *p2 = (const unsigned char *) s2;
- while (len)
- {
- if (translate[*p1++] != translate[*p2++]) return 1;
- len--;
- }
- return 0;
-}
-
-/* Entry points for GNU code. */
-
-/* re_compile_pattern is the GNU regular expression compiler: it
- compiles PATTERN (of length SIZE) and puts the result in BUFP.
- Returns 0 if the pattern was valid, otherwise an error string.
-
- Assumes the `allocated' (and perhaps `buffer') and `translate' fields
- are set in BUFP on entry.
-
- We call regex_compile to do the actual compilation. */
-
-const char *
-re_compile_pattern (pattern, length, bufp)
- const char *pattern;
- size_t length;
- struct re_pattern_buffer *bufp;
-{
- reg_errcode_t ret;
-
- /* GNU code is written to assume at least RE_NREGS registers will be set
- (and at least one extra will be -1). */
- bufp->regs_allocated = REGS_UNALLOCATED;
-
- /* And GNU code determines whether or not to get register information
- by passing null for the REGS argument to re_match, etc., not by
- setting no_sub. */
- bufp->no_sub = 0;
-
- /* Match anchors at newline. */
- bufp->newline_anchor = 1;
-
- ret = regex_compile (pattern, length, re_syntax_options, bufp);
-
- if (!ret)
- return NULL;
- return gettext (re_error_msgid[(int) ret]);
-}
-#ifdef _LIBC
-weak_alias (__re_compile_pattern, re_compile_pattern)
-#endif
-
-/* Entry points compatible with 4.2 BSD regex library. We don't define
- them unless specifically requested. */
-
-#if defined _REGEX_RE_COMP || defined _LIBC
-
-/* BSD has one and only one pattern buffer. */
-static struct re_pattern_buffer re_comp_buf;
-
-char *
-#ifdef _LIBC
-/* Make these definitions weak in libc, so POSIX programs can redefine
- these names if they don't use our functions, and still use
- regcomp/regexec below without link errors. */
-weak_function
-#endif
-re_comp (s)
- const char *s;
-{
- reg_errcode_t ret;
-
- if (!s)
- {
- if (!re_comp_buf.buffer)
- return gettext ("No previous regular expression");
- return 0;
- }
-
- if (!re_comp_buf.buffer)
- {
- re_comp_buf.buffer = (unsigned char *) malloc (200);
- if (re_comp_buf.buffer == NULL)
- return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
- re_comp_buf.allocated = 200;
-
- re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
- if (re_comp_buf.fastmap == NULL)
- return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
- }
-
- /* Since `re_exec' always passes NULL for the `regs' argument, we
- don't need to initialize the pattern buffer fields which affect it. */
-
- /* Match anchors at newlines. */
- re_comp_buf.newline_anchor = 1;
-
- ret = regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
-
- if (!ret)
- return NULL;
-
- /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
- return (char *) gettext (re_error_msgid[(int) ret]);
-}
-
-
-int
-#ifdef _LIBC
-weak_function
-#endif
-re_exec (s)
- const char *s;
-{
- const int len = strlen (s);
- return
- 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
-}
-
-#endif /* _REGEX_RE_COMP */
-
-/* POSIX.2 functions. Don't define these for Emacs. */
-
-#ifndef emacs
-
-/* regcomp takes a regular expression as a string and compiles it.
-
- PREG is a regex_t *. We do not expect any fields to be initialized,
- since POSIX says we shouldn't. Thus, we set
-
- `buffer' to the compiled pattern;
- `used' to the length of the compiled pattern;
- `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
- REG_EXTENDED bit in CFLAGS is set; otherwise, to
- RE_SYNTAX_POSIX_BASIC;
- `newline_anchor' to REG_NEWLINE being set in CFLAGS;
- `fastmap' and `fastmap_accurate' to zero;
- `re_nsub' to the number of subexpressions in PATTERN.
-
- PATTERN is the address of the pattern string.
-
- CFLAGS is a series of bits which affect compilation.
-
- If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we
- use POSIX basic syntax.
-
- If REG_NEWLINE is set, then . and [^...] don't match newline.
- Also, regexec will try a match beginning after every newline.
-
- If REG_ICASE is set, then we considers upper- and lowercase
- versions of letters to be equivalent when matching.
-
- If REG_NOSUB is set, then when PREG is passed to regexec, that
- routine will report only success or failure, and nothing about the
- registers.
-
- It returns 0 if it succeeds, nonzero if it doesn't. (See gnu-regex.h for
- the return codes and their meanings.) */
-
-int
-regcomp (preg, pattern, cflags)
- regex_t *preg;
- const char *pattern;
- int cflags;
-{
- reg_errcode_t ret;
- reg_syntax_t syntax
- = (cflags & REG_EXTENDED) ?
- RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC;
-
- /* regex_compile will allocate the space for the compiled pattern. */
- preg->buffer = 0;
- preg->allocated = 0;
- preg->used = 0;
-
- /* Don't bother to use a fastmap when searching. This simplifies the
- REG_NEWLINE case: if we used a fastmap, we'd have to put all the
- characters after newlines into the fastmap. This way, we just try
- every character. */
- preg->fastmap = 0;
-
- if (cflags & REG_ICASE)
- {
- unsigned i;
-
- preg->translate
- = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
- * sizeof (*(RE_TRANSLATE_TYPE)0));
- if (preg->translate == NULL)
- return (int) REG_ESPACE;
-
- /* Map uppercase characters to corresponding lowercase ones. */
- for (i = 0; i < CHAR_SET_SIZE; i++)
- preg->translate[i] = ISUPPER (i) ? tolower (i) : i;
- }
- else
- preg->translate = NULL;
-
- /* If REG_NEWLINE is set, newlines are treated differently. */
- if (cflags & REG_NEWLINE)
- { /* REG_NEWLINE implies neither . nor [^...] match newline. */
- syntax &= ~RE_DOT_NEWLINE;
- syntax |= RE_HAT_LISTS_NOT_NEWLINE;
- /* It also changes the matching behavior. */
- preg->newline_anchor = 1;
- }
- else
- preg->newline_anchor = 0;
-
- preg->no_sub = !!(cflags & REG_NOSUB);
-
- /* POSIX says a null character in the pattern terminates it, so we
- can use strlen here in compiling the pattern. */
- ret = regex_compile (pattern, strlen (pattern), syntax, preg);
-
- /* POSIX doesn't distinguish between an unmatched open-group and an
- unmatched close-group: both are REG_EPAREN. */
- if (ret == REG_ERPAREN) ret = REG_EPAREN;
-
- return (int) ret;
-}
-#ifdef _LIBC
-weak_alias (__regcomp, regcomp)
-#endif
-
-
-/* regexec searches for a given pattern, specified by PREG, in the
- string STRING.
-
- If NMATCH is zero or REG_NOSUB was set in the cflags argument to
- `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at
- least NMATCH elements, and we set them to the offsets of the
- corresponding matched substrings.
-
- EFLAGS specifies `execution flags' which affect matching: if
- REG_NOTBOL is set, then ^ does not match at the beginning of the
- string; if REG_NOTEOL is set, then $ does not match at the end.
-
- We return 0 if we find a match and REG_NOMATCH if not. */
-
-int
-regexec (preg, string, nmatch, pmatch, eflags)
- const regex_t *preg;
- const char *string;
- size_t nmatch;
- regmatch_t pmatch[];
- int eflags;
-{
- int ret;
- struct re_registers regs;
- regex_t private_preg;
- int len = strlen (string);
- boolean want_reg_info = !preg->no_sub && nmatch > 0;
-
- private_preg = *preg;
-
- private_preg.not_bol = !!(eflags & REG_NOTBOL);
- private_preg.not_eol = !!(eflags & REG_NOTEOL);
-
- /* The user has told us exactly how many registers to return
- information about, via `nmatch'. We have to pass that on to the
- matching routines. */
- private_preg.regs_allocated = REGS_FIXED;
-
- if (want_reg_info)
- {
- regs.num_regs = nmatch;
- regs.start = TALLOC (nmatch, regoff_t);
- regs.end = TALLOC (nmatch, regoff_t);
- if (regs.start == NULL || regs.end == NULL)
- return (int) REG_NOMATCH;
- }
-
- /* Perform the searching operation. */
- ret = re_search (&private_preg, string, len,
- /* start: */ 0, /* range: */ len,
- want_reg_info ? &regs : (struct re_registers *) 0);
-
- /* Copy the register information to the POSIX structure. */
- if (want_reg_info)
- {
- if (ret >= 0)
- {
- unsigned r;
-
- for (r = 0; r < nmatch; r++)
- {
- pmatch[r].rm_so = regs.start[r];
- pmatch[r].rm_eo = regs.end[r];
- }
- }
-
- /* If we needed the temporary register info, free the space now. */
- free (regs.start);
- free (regs.end);
- }
-
- /* We want zero return to mean success, unlike `re_search'. */
- return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH;
-}
-#ifdef _LIBC
-weak_alias (__regexec, regexec)
-#endif
-
-
-/* Returns a message corresponding to an error code, ERRCODE, returned
- from either regcomp or regexec. We don't use PREG here. */
-
-size_t
-__regerror (errcode, preg, errbuf, errbuf_size)
- int errcode;
- const regex_t *preg;
- char *errbuf;
- size_t errbuf_size;
-{
- const char *msg;
- size_t msg_size;
-
- if (errcode < 0
- || errcode >= (int) (sizeof (re_error_msgid)
- / sizeof (re_error_msgid[0])))
- /* Only error codes returned by the rest of the code should be passed
- to this routine. If we are given anything else, or if other regex
- code generates an invalid error code, then the program has a bug.
- Dump core so we can fix it. */
- abort ();
-
- msg = gettext (re_error_msgid[errcode]);
-
- msg_size = strlen (msg) + 1; /* Includes the null. */
-
- if (errbuf_size != 0)
- {
- if (msg_size > errbuf_size)
- {
-#if defined HAVE_MEMPCPY || defined _LIBC
- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
-#else
- memcpy (errbuf, msg, errbuf_size - 1);
- errbuf[errbuf_size - 1] = 0;
-#endif
- }
- else
- memcpy (errbuf, msg, msg_size);
- }
-
- return msg_size;
-}
-#ifdef _LIBC
-weak_alias (__regerror, regerror)
-#endif
-
-
-/* Free dynamically allocated space used by PREG. */
-
-void
-regfree (preg)
- regex_t *preg;
-{
- if (preg->buffer != NULL)
- free (preg->buffer);
- preg->buffer = NULL;
-
- preg->allocated = 0;
- preg->used = 0;
-
- if (preg->fastmap != NULL)
- free (preg->fastmap);
- preg->fastmap = NULL;
- preg->fastmap_accurate = 0;
-
- if (preg->translate != NULL)
- free (preg->translate);
- preg->translate = NULL;
-}
-#ifdef _LIBC
-weak_alias (__regfree, regfree)
-#endif
-
-#endif /* not emacs */
diff --git a/contrib/gdb/gdb/gnu-regex.h b/contrib/gdb/gdb/gnu-regex.h
deleted file mode 100644
index 9153ea1b07d0..000000000000
--- a/contrib/gdb/gdb/gnu-regex.h
+++ /dev/null
@@ -1,576 +0,0 @@
-/* Definitions for data structures and routines for the regular
- expression library, version 0.12.
- Copyright (C) 1985,89,90,91,92,93,95,96,97,98 Free Software Foundation, Inc.
-
- NOTE: The canonical source of this file is maintained with the
- GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
-
- This program is free software; you can redistribute 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 _REGEX_H
-#define _REGEX_H 1
-
-/* Allow the use in C++ code. */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* POSIX says that <sys/types.h> must be included (by the caller) before
- <regex.h>. */
-
-#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
-/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
- should be there. */
-# include <stddef.h>
-#endif
-
-/* GDB LOCAL: define _REGEX_RE_COMP to get BSD style re_comp and re_exec */
-#ifndef _REGEX_RE_COMP
-#define _REGEX_RE_COMP
-#endif
-
-/* The following two types have to be signed and unsigned integer type
- wide enough to hold a value of a pointer. For most ANSI compilers
- ptrdiff_t and size_t should be likely OK. Still size of these two
- types is 2 for Microsoft C. Ugh... */
-typedef long int s_reg_t;
-typedef unsigned long int active_reg_t;
-
-/* The following bits are used to determine the regexp syntax we
- recognize. The set/not-set meanings are chosen so that Emacs syntax
- remains the value 0. The bits are given in alphabetical order, and
- the definitions shifted by one from the previous bit; thus, when we
- add or remove a bit, only one other definition need change. */
-typedef unsigned long int reg_syntax_t;
-
-/* If this bit is not set, then \ inside a bracket expression is literal.
- If set, then such a \ quotes the following character. */
-#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
-
-/* If this bit is not set, then + and ? are operators, and \+ and \? are
- literals.
- If set, then \+ and \? are operators and + and ? are literals. */
-#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
-
-/* If this bit is set, then character classes are supported. They are:
- [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
- [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
- If not set, then character classes are not supported. */
-#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
-
-/* If this bit is set, then ^ and $ are always anchors (outside bracket
- expressions, of course).
- If this bit is not set, then it depends:
- ^ is an anchor if it is at the beginning of a regular
- expression or after an open-group or an alternation operator;
- $ is an anchor if it is at the end of a regular expression, or
- before a close-group or an alternation operator.
-
- This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
- POSIX draft 11.2 says that * etc. in leading positions is undefined.
- We already implemented a previous draft which made those constructs
- invalid, though, so we haven't changed the code back. */
-#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
-
-/* If this bit is set, then special characters are always special
- regardless of where they are in the pattern.
- If this bit is not set, then special characters are special only in
- some contexts; otherwise they are ordinary. Specifically,
- * + ? and intervals are only special when not after the beginning,
- open-group, or alternation operator. */
-#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
-
-/* If this bit is set, then *, +, ?, and { cannot be first in an re or
- immediately after an alternation or begin-group operator. */
-#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
-
-/* If this bit is set, then . matches newline.
- If not set, then it doesn't. */
-#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
-
-/* If this bit is set, then . doesn't match NUL.
- If not set, then it does. */
-#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
-
-/* If this bit is set, nonmatching lists [^...] do not match newline.
- If not set, they do. */
-#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
-
-/* If this bit is set, either \{...\} or {...} defines an
- interval, depending on RE_NO_BK_BRACES.
- If not set, \{, \}, {, and } are literals. */
-#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
-
-/* If this bit is set, +, ? and | aren't recognized as operators.
- If not set, they are. */
-#define RE_LIMITED_OPS (RE_INTERVALS << 1)
-
-/* If this bit is set, newline is an alternation operator.
- If not set, newline is literal. */
-#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
-
-/* If this bit is set, then `{...}' defines an interval, and \{ and \}
- are literals.
- If not set, then `\{...\}' defines an interval. */
-#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
-
-/* If this bit is set, (...) defines a group, and \( and \) are literals.
- If not set, \(...\) defines a group, and ( and ) are literals. */
-#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
-
-/* If this bit is set, then \<digit> matches <digit>.
- If not set, then \<digit> is a back-reference. */
-#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
-
-/* If this bit is set, then | is an alternation operator, and \| is literal.
- If not set, then \| is an alternation operator, and | is literal. */
-#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
-
-/* If this bit is set, then an ending range point collating higher
- than the starting range point, as in [z-a], is invalid.
- If not set, then when ending range point collates higher than the
- starting range point, the range is ignored. */
-#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
-
-/* If this bit is set, then an unmatched ) is ordinary.
- If not set, then an unmatched ) is invalid. */
-#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
-
-/* If this bit is set, succeed as soon as we match the whole pattern,
- without further backtracking. */
-#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
-
-/* If this bit is set, do not process the GNU regex operators.
- If not set, then the GNU regex operators are recognized. */
-#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
-
-/* If this bit is set, turn on internal regex debugging.
- If not set, and debugging was on, turn it off.
- This only works if regex.c is compiled -DDEBUG.
- We define this bit always, so that all that's needed to turn on
- debugging is to recompile regex.c; the calling code can always have
- this bit set, and it won't affect anything in the normal case. */
-#define RE_DEBUG (RE_NO_GNU_OPS << 1)
-
-/* This global variable defines the particular regexp syntax to use (for
- some interfaces). When a regexp is compiled, the syntax used is
- stored in the pattern buffer, so changing this does not affect
- already-compiled regexps. */
-extern reg_syntax_t re_syntax_options;
-
-/* Define combinations of the above bits for the standard possibilities.
- (The [[[ comments delimit what gets put into the Texinfo file, so
- don't delete them!) */
-/* [[[begin syntaxes]]] */
-#define RE_SYNTAX_EMACS 0
-
-#define RE_SYNTAX_AWK \
- (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
- | RE_NO_BK_PARENS | RE_NO_BK_REFS \
- | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
- | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
- | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
-
-#define RE_SYNTAX_GNU_AWK \
- ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
- & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS))
-
-#define RE_SYNTAX_POSIX_AWK \
- (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
- | RE_INTERVALS | RE_NO_GNU_OPS)
-
-#define RE_SYNTAX_GREP \
- (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
- | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
- | RE_NEWLINE_ALT)
-
-#define RE_SYNTAX_EGREP \
- (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
- | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
- | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
- | RE_NO_BK_VBAR)
-
-#define RE_SYNTAX_POSIX_EGREP \
- (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
-
-/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
-#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
-
-#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
-
-/* Syntax bits common to both basic and extended POSIX regex syntax. */
-#define _RE_SYNTAX_POSIX_COMMON \
- (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
- | RE_INTERVALS | RE_NO_EMPTY_RANGES)
-
-#define RE_SYNTAX_POSIX_BASIC \
- (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
-
-/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
- RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
- isn't minimal, since other operators, such as \`, aren't disabled. */
-#define RE_SYNTAX_POSIX_MINIMAL_BASIC \
- (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
-
-#define RE_SYNTAX_POSIX_EXTENDED \
- (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
- | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
- | RE_NO_BK_PARENS | RE_NO_BK_VBAR \
- | RE_UNMATCHED_RIGHT_PAREN_ORD)
-
-/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS
- replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */
-#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
- (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
- | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
- | RE_NO_BK_PARENS | RE_NO_BK_REFS \
- | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
-/* [[[end syntaxes]]] */
-
-/* Maximum number of duplicates an interval can allow. Some systems
- (erroneously) define this in other header files, but we want our
- value, so remove any previous define. */
-#ifdef RE_DUP_MAX
-# undef RE_DUP_MAX
-#endif
-/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */
-#define RE_DUP_MAX (0x7fff)
-
-
-/* POSIX `cflags' bits (i.e., information for `regcomp'). */
-
-/* If this bit is set, then use extended regular expression syntax.
- If not set, then use basic regular expression syntax. */
-#define REG_EXTENDED 1
-
-/* If this bit is set, then ignore case when matching.
- If not set, then case is significant. */
-#define REG_ICASE (REG_EXTENDED << 1)
-
-/* If this bit is set, then anchors do not match at newline
- characters in the string.
- If not set, then anchors do match at newlines. */
-#define REG_NEWLINE (REG_ICASE << 1)
-
-/* If this bit is set, then report only success or fail in regexec.
- If not set, then returns differ between not matching and errors. */
-#define REG_NOSUB (REG_NEWLINE << 1)
-
-
-/* POSIX `eflags' bits (i.e., information for regexec). */
-
-/* If this bit is set, then the beginning-of-line operator doesn't match
- the beginning of the string (presumably because it's not the
- beginning of a line).
- If not set, then the beginning-of-line operator does match the
- beginning of the string. */
-#define REG_NOTBOL 1
-
-/* Like REG_NOTBOL, except for the end-of-line. */
-#define REG_NOTEOL (1 << 1)
-
-
-/* If any error codes are removed, changed, or added, update the
- `re_error_msg' table in regex.c. */
-typedef enum
-{
-#if (_XOPEN_SOURCE - 0) == 500
- REG_NOSYS = -1, /* This will never happen for this implementation. */
-#endif
-
- REG_NOERROR = 0, /* Success. */
- REG_NOMATCH, /* Didn't find a match (for regexec). */
-
- /* POSIX regcomp return error codes. (In the order listed in the
- standard.) */
- REG_BADPAT, /* Invalid pattern. */
- REG_ECOLLATE, /* Not implemented. */
- REG_ECTYPE, /* Invalid character class name. */
- REG_EESCAPE, /* Trailing backslash. */
- REG_ESUBREG, /* Invalid back reference. */
- REG_EBRACK, /* Unmatched left bracket. */
- REG_EPAREN, /* Parenthesis imbalance. */
- REG_EBRACE, /* Unmatched \{. */
- REG_BADBR, /* Invalid contents of \{\}. */
- REG_ERANGE, /* Invalid range end. */
- REG_ESPACE, /* Ran out of memory. */
- REG_BADRPT, /* No preceding re for repetition op. */
-
- /* Error codes we've added. */
- REG_EEND, /* Premature end. */
- REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
- REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
-} reg_errcode_t;
-
-/* This data structure represents a compiled pattern. Before calling
- the pattern compiler, the fields `buffer', `allocated', `fastmap',
- `translate', and `no_sub' can be set. After the pattern has been
- compiled, the `re_nsub' field is available. All other fields are
- private to the regex routines. */
-
-#ifndef RE_TRANSLATE_TYPE
-# define RE_TRANSLATE_TYPE char *
-#endif
-
-struct re_pattern_buffer
-{
-/* [[[begin pattern_buffer]]] */
- /* Space that holds the compiled pattern. It is declared as
- `unsigned char *' because its elements are
- sometimes used as array indexes. */
- unsigned char *buffer;
-
- /* Number of bytes to which `buffer' points. */
- unsigned long int allocated;
-
- /* Number of bytes actually used in `buffer'. */
- unsigned long int used;
-
- /* Syntax setting with which the pattern was compiled. */
- reg_syntax_t syntax;
-
- /* Pointer to a fastmap, if any, otherwise zero. re_search uses
- the fastmap, if there is one, to skip over impossible
- starting points for matches. */
- char *fastmap;
-
- /* Either a translate table to apply to all characters before
- comparing them, or zero for no translation. The translation
- is applied to a pattern when it is compiled and to a string
- when it is matched. */
- RE_TRANSLATE_TYPE translate;
-
- /* Number of subexpressions found by the compiler. */
- size_t re_nsub;
-
- /* Zero if this pattern cannot match the empty string, one else.
- Well, in truth it's used only in `re_search_2', to see
- whether or not we should use the fastmap, so we don't set
- this absolutely perfectly; see `re_compile_fastmap' (the
- `duplicate' case). */
- unsigned can_be_null : 1;
-
- /* If REGS_UNALLOCATED, allocate space in the `regs' structure
- for `max (RE_NREGS, re_nsub + 1)' groups.
- If REGS_REALLOCATE, reallocate space if necessary.
- If REGS_FIXED, use what's there. */
-#define REGS_UNALLOCATED 0
-#define REGS_REALLOCATE 1
-#define REGS_FIXED 2
- unsigned regs_allocated : 2;
-
- /* Set to zero when `regex_compile' compiles a pattern; set to one
- by `re_compile_fastmap' if it updates the fastmap. */
- unsigned fastmap_accurate : 1;
-
- /* If set, `re_match_2' does not return information about
- subexpressions. */
- unsigned no_sub : 1;
-
- /* If set, a beginning-of-line anchor doesn't match at the
- beginning of the string. */
- unsigned not_bol : 1;
-
- /* Similarly for an end-of-line anchor. */
- unsigned not_eol : 1;
-
- /* If true, an anchor at a newline matches. */
- unsigned newline_anchor : 1;
-
-/* [[[end pattern_buffer]]] */
-};
-
-typedef struct re_pattern_buffer regex_t;
-
-/* Type for byte offsets within the string. POSIX mandates this. */
-typedef int regoff_t;
-
-
-/* This is the structure we store register match data in. See
- regex.texinfo for a full description of what registers match. */
-struct re_registers
-{
- unsigned num_regs;
- regoff_t *start;
- regoff_t *end;
-};
-
-
-/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
- `re_match_2' returns information about at least this many registers
- the first time a `regs' structure is passed. */
-#ifndef RE_NREGS
-# define RE_NREGS 30
-#endif
-
-
-/* POSIX specification for registers. Aside from the different names than
- `re_registers', POSIX uses an array of structures, instead of a
- structure of arrays. */
-typedef struct
-{
- regoff_t rm_so; /* Byte offset from string's start to substring's start. */
- regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
-} regmatch_t;
-
-/* Declarations for routines. */
-
-/* To avoid duplicating every routine declaration -- once with a
- prototype (if we are ANSI), and once without (if we aren't) -- we
- use the following macro to declare argument types. This
- unfortunately clutters up the declarations a bit, but I think it's
- worth it. */
-
-#if __STDC__
-
-# define _RE_ARGS(args) args
-
-#else /* not __STDC__ */
-
-# define _RE_ARGS(args) ()
-
-#endif /* not __STDC__ */
-
-/* Sets the current default syntax to SYNTAX, and return the old syntax.
- You can also simply assign to the `re_syntax_options' variable. */
-extern reg_syntax_t __re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
-extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
-
-/* Compile the regular expression PATTERN, with length LENGTH
- and syntax given by the global `re_syntax_options', into the buffer
- BUFFER. Return NULL if successful, and an error string if not. */
-extern const char *__re_compile_pattern
- _RE_ARGS ((const char *pattern, size_t length,
- struct re_pattern_buffer *buffer));
-extern const char *re_compile_pattern
- _RE_ARGS ((const char *pattern, size_t length,
- struct re_pattern_buffer *buffer));
-
-
-/* Compile a fastmap for the compiled pattern in BUFFER; used to
- accelerate searches. Return 0 if successful and -2 if was an
- internal error. */
-extern int __re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
-extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
-
-
-/* Search in the string STRING (with length LENGTH) for the pattern
- compiled into BUFFER. Start searching at position START, for RANGE
- characters. Return the starting position of the match, -1 for no
- match, or -2 for an internal error. Also return register
- information in REGS (if REGS and BUFFER->no_sub are nonzero). */
-extern int __re_search
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- int length, int start, int range, struct re_registers *regs));
-extern int re_search
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- int length, int start, int range, struct re_registers *regs));
-
-
-/* Like `re_search', but search in the concatenation of STRING1 and
- STRING2. Also, stop searching at index START + STOP. */
-extern int __re_search_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, int range, struct re_registers *regs, int stop));
-extern int re_search_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, int range, struct re_registers *regs, int stop));
-
-
-/* Like `re_search', but return how many characters in STRING the regexp
- in BUFFER matched, starting at position START. */
-extern int __re_match
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- int length, int start, struct re_registers *regs));
-extern int re_match
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- int length, int start, struct re_registers *regs));
-
-
-/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
-extern int __re_match_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, struct re_registers *regs, int stop));
-extern int re_match_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, struct re_registers *regs, int stop));
-
-
-/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
- ENDS. Subsequent matches using BUFFER and REGS will use this memory
- for recording register information. STARTS and ENDS must be
- allocated with malloc, and must each be at least `NUM_REGS * sizeof
- (regoff_t)' bytes long.
-
- If NUM_REGS == 0, then subsequent matches should allocate their own
- register data.
-
- Unless this function is called, the first search or match using
- PATTERN_BUFFER will allocate its own register data, without
- freeing the old data. */
-extern void __re_set_registers
- _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
- unsigned num_regs, regoff_t *starts, regoff_t *ends));
-extern void re_set_registers
- _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
- unsigned num_regs, regoff_t *starts, regoff_t *ends));
-
-#ifdef _REGEX_RE_COMP
-# ifndef _CRAY
-/* 4.2 bsd compatibility. */
-extern char *re_comp _RE_ARGS ((const char *));
-extern int re_exec _RE_ARGS ((const char *));
-# endif
-#endif
-
-/* POSIX compatibility. */
-extern int __regcomp _RE_ARGS ((regex_t *__preg, const char *__pattern,
- int __cflags));
-extern int regcomp _RE_ARGS ((regex_t *__preg, const char *__pattern,
- int __cflags));
-
-extern int __regexec _RE_ARGS ((const regex_t *__preg,
- const char *__string, size_t __nmatch,
- regmatch_t __pmatch[], int __eflags));
-extern int regexec _RE_ARGS ((const regex_t *__preg,
- const char *__string, size_t __nmatch,
- regmatch_t __pmatch[], int __eflags));
-
-extern size_t __regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
- char *__errbuf, size_t __errbuf_size));
-extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
- char *__errbuf, size_t __errbuf_size));
-
-extern void __regfree _RE_ARGS ((regex_t *__preg));
-extern void regfree _RE_ARGS ((regex_t *__preg));
-
-
-#ifdef __cplusplus
-}
-#endif /* C++ */
-
-#endif /* regex.h */
-
-/*
-Local variables:
-make-backup-files: t
-version-control: t
-trim-versions-without-asking: nil
-End:
-*/
diff --git a/contrib/gdb/gdb/go32-xdep.c b/contrib/gdb/gdb/go32-xdep.c
deleted file mode 100644
index 01c817a6b41b..000000000000
--- a/contrib/gdb/gdb/go32-xdep.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Host-dependent code for dos running GO32 for GDB, the GNU debugger.
- 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. */
-
-#include <stdio.h>
-
-int
-sigsetmask (mask)
- int mask;
-{
- return 0;
-}
-
-void
-strlwr (str)
- char *str;
-{
- for (; *str; str++)
- *str = tolower(*str);
-}
diff --git a/contrib/gdb/gdb/hp-psymtab-read.c b/contrib/gdb/gdb/hp-psymtab-read.c
deleted file mode 100644
index 5926ada3f3e7..000000000000
--- a/contrib/gdb/gdb/hp-psymtab-read.c
+++ /dev/null
@@ -1,2381 +0,0 @@
-/* Read hp debug symbols and convert to internal format, for GDB.
- Copyright 1993, 1996, 1998, 1999 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- Written by the Center for Software Science at the University of Utah
- and by Cygnus Support. */
-
-/* Common include file for hp_symtab_read.c and hp_psymtab_read.c.
- This has nested includes of a bunch of stuff. */
-#include "hpread.h"
-#include "demangle.h"
-
-/* To generate dumping code, uncomment this define. The dumping
- itself is controlled by routine-local statics called "dumping". */
-/* #define DUMPING 1 */
-
-/* To use the quick look-up tables, uncomment this define. */
-#define QUICK_LOOK_UP 1
-
-/* To call PXDB to process un-processed files, uncomment this define. */
-#define USE_PXDB 1
-
-/* Forward procedure declarations */
-
-void hpread_symfile_init
- PARAMS ((struct objfile *));
-
-void
-do_pxdb PARAMS ((bfd *));
-
-void hpread_build_psymtabs
- PARAMS ((struct objfile *, struct section_offsets *, int));
-
-void hpread_symfile_finish
- PARAMS ((struct objfile *));
-
-static union dnttentry *hpread_get_gntt
- PARAMS ((int, struct objfile *));
-
-static unsigned long hpread_get_textlow
- PARAMS ((int, int, struct objfile *, int));
-
-static struct partial_symtab *hpread_start_psymtab
- PARAMS ((struct objfile *, struct section_offsets *, char *, CORE_ADDR, int,
- struct partial_symbol **, struct partial_symbol **));
-
-static struct partial_symtab *hpread_end_psymtab
- PARAMS ((struct partial_symtab *, char **, int, int, CORE_ADDR,
- struct partial_symtab **, int));
-
-/* End of forward routine declarations */
-
-#ifdef USE_PXDB
-
-/* NOTE use of system files! May not be portable. */
-
-#define PXDB_SVR4 "/opt/langtools/bin/pxdb"
-#define PXDB_BSD "/usr/bin/pxdb"
-
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-/* check for the existance of a file, given its full pathname */
-int
-file_exists (filename)
- char *filename;
-{
- if (filename)
- return (access (filename, F_OK) == 0);
- return 0;
-}
-
-
-/* Translate from the "hp_language" enumeration in hp-symtab.h
- used in the debug info to gdb's generic enumeration in defs.h. */
-static enum language
-trans_lang (in_lang)
- enum hp_language in_lang;
-{
- if (in_lang == HP_LANGUAGE_C)
- return language_c;
-
- else if (in_lang == HP_LANGUAGE_CPLUSPLUS)
- return language_cplus;
-
- else if (in_lang == HP_LANGUAGE_F77)
- return language_fortran;
-
- else
- return language_unknown;
-}
-
-static char main_string[] = "main";
-
-/* Call PXDB to process our file.
-
- Approach copied from DDE's "dbgk_run_pxdb". Note: we
- don't check for BSD location of pxdb, nor for existance
- of pxdb itself, etc.
-
- NOTE: uses system function and string functions directly.
-
- Return value: 1 if ok, 0 if not */
-int
-hpread_call_pxdb (file_name)
- char *file_name;
-{
- char *p;
- int status;
- int retval;
-
- if (file_exists (PXDB_SVR4))
- {
- p = malloc (strlen (PXDB_SVR4) + strlen (file_name) + 2);
- strcpy (p, PXDB_SVR4);
- strcat (p, " ");
- strcat (p, file_name);
-
- warning ("File not processed by pxdb--about to process now.\n");
- status = system (p);
-
- retval = (status == 0);
- }
- else
- {
- warning ("pxdb not found at standard location: /opt/langtools/bin\ngdb will not be able to debug %s.\nPlease install pxdb at the above location and then restart gdb.\nYou can also run pxdb on %s with the command\n\"pxdb %s\" and then restart gdb.", file_name, file_name, file_name);
-
- retval = 0;
- }
- return retval;
-} /* hpread_call_pxdb */
-
-
-/* Return 1 if the file turns out to need pre-processing
- by PXDB, and we have thus called PXDB to do this processing
- and the file therefore needs to be re-loaded. Otherwise
- return 0. */
-int
-hpread_pxdb_needed (sym_bfd)
- bfd *sym_bfd;
-{
- asection *pinfo_section, *debug_section, *header_section;
- unsigned int do_pxdb;
- char *buf;
- bfd_size_type header_section_size;
-
- unsigned long tmp;
- unsigned int pxdbed;
-
- header_section = bfd_get_section_by_name (sym_bfd, "$HEADER$");
- if (!header_section)
- {
- return 0; /* No header at all, can't recover... */
- }
-
- debug_section = bfd_get_section_by_name (sym_bfd, "$DEBUG$");
- pinfo_section = bfd_get_section_by_name (sym_bfd, "$PINFO$");
-
- if (pinfo_section && !debug_section)
- {
- /* Debug info with DOC, has different header format.
- this only happens if the file was pxdbed and compiled optimized
- otherwise the PINFO section is not there. */
- header_section_size = bfd_section_size (objfile->obfd, header_section);
-
- if (header_section_size == (bfd_size_type) sizeof (DOC_info_PXDB_header))
- {
- buf = alloca (sizeof (DOC_info_PXDB_header));
-
- if (!bfd_get_section_contents (sym_bfd,
- header_section,
- buf, 0,
- header_section_size))
- error ("bfd_get_section_contents\n");
-
- tmp = bfd_get_32 (sym_bfd, (bfd_byte *) (buf + sizeof (int) * 4));
- pxdbed = (tmp >> 31) & 0x1;
-
- if (!pxdbed)
- error ("file debug header info invalid\n");
- do_pxdb = 0;
- }
-
- else
- error ("invalid $HEADER$ size in executable \n");
- }
-
- else
- {
-
- /* this can be three different cases:
- 1. pxdbed and not doc
- - DEBUG and HEADER sections are there
- - header is PXDB_header type
- - pxdbed flag is set to 1
-
- 2. not pxdbed and doc
- - DEBUG and HEADER sections are there
- - header is DOC_info_header type
- - pxdbed flag is set to 0
-
- 3. not pxdbed and not doc
- - DEBUG and HEADER sections are there
- - header is XDB_header type
- - pxdbed flag is set to 0
-
- NOTE: the pxdbed flag is meaningful also in the not
- already pxdb processed version of the header,
- because in case on non-already processed by pxdb files
- that same bit in the header would be always zero.
- Why? Because the bit is the leftmost bit of a word
- which contains a 'length' which is always a positive value
- so that bit is never set to 1 (otherwise it would be negative)
-
- Given the above, we have two choices : either we ignore the
- size of the header itself and just look at the pxdbed field,
- or we check the size and then we (for safety and paranoia related
- issues) check the bit.
- The first solution is used by DDE, the second by PXDB itself.
- I am using the second one here, because I already wrote it,
- and it is the end of a long day.
- Also, using the first approach would still involve size issues
- because we need to read in the contents of the header section, and
- give the correct amount of stuff we want to read to the
- get_bfd_section_contents function. */
-
- /* decide which case depending on the size of the header section.
- The size is as defined in hp-symtab.h */
-
- header_section_size = bfd_section_size (objfile->obfd, header_section);
-
- if (header_section_size == (bfd_size_type) sizeof (PXDB_header)) /* pxdb and not doc */
- {
-
- buf = alloca (sizeof (PXDB_header));
- if (!bfd_get_section_contents (sym_bfd,
- header_section,
- buf, 0,
- header_section_size))
- error ("bfd_get_section_contents\n");
-
- tmp = bfd_get_32 (sym_bfd, (bfd_byte *) (buf + sizeof (int) * 3));
- pxdbed = (tmp >> 31) & 0x1;
-
- if (pxdbed)
- do_pxdb = 0;
- else
- error ("file debug header invalid\n");
- }
- else /*not pxdbed and doc OR not pxdbed and non doc */
- do_pxdb = 1;
- }
-
- if (do_pxdb)
- {
- return 1;
- }
- else
- {
- return 0;
- }
-} /* hpread_pxdb_needed */
-
-#endif
-
-/* Check whether the file needs to be preprocessed by pxdb.
- If so, call pxdb. */
-
-void
-do_pxdb (sym_bfd)
- bfd *sym_bfd;
-{
- /* The following code is HP-specific. The "right" way of
- doing this is unknown, but we bet would involve a target-
- specific pre-file-load check using a generic mechanism. */
-
- /* This code will not be executed if the file is not in SOM
- format (i.e. if compiled with gcc) */
- if (hpread_pxdb_needed (sym_bfd))
- {
- /*This file has not been pre-processed. Preprocess now */
-
- if (hpread_call_pxdb (sym_bfd->filename))
- {
- /* The call above has changed the on-disk file,
- we can close the file anyway, because the
- symbols will be reread in when the target is run */
- bfd_close (sym_bfd);
- }
- }
-}
-
-
-
-#ifdef QUICK_LOOK_UP
-
-/* Code to handle quick lookup-tables follows. */
-
-
-/* Some useful macros */
-#define VALID_FILE(i) ((i) < pxdb_header_p->fd_entries)
-#define VALID_MODULE(i) ((i) < pxdb_header_p->md_entries)
-#define VALID_PROC(i) ((i) < pxdb_header_p->pd_entries)
-#define VALID_CLASS(i) ((i) < pxdb_header_p->cd_entries)
-
-#define FILE_START(i) (qFD[i].adrStart)
-#define MODULE_START(i) (qMD[i].adrStart)
-#define PROC_START(i) (qPD[i].adrStart)
-
-#define FILE_END(i) (qFD[i].adrEnd)
-#define MODULE_END(i) (qMD[i].adrEnd)
-#define PROC_END(i) (qPD[i].adrEnd)
-
-#define FILE_ISYM(i) (qFD[i].isym)
-#define MODULE_ISYM(i) (qMD[i].isym)
-#define PROC_ISYM(i) (qPD[i].isym)
-
-#define VALID_CURR_FILE (curr_fd < pxdb_header_p->fd_entries)
-#define VALID_CURR_MODULE (curr_md < pxdb_header_p->md_entries)
-#define VALID_CURR_PROC (curr_pd < pxdb_header_p->pd_entries)
-#define VALID_CURR_CLASS (curr_cd < pxdb_header_p->cd_entries)
-
-#define CURR_FILE_START (qFD[curr_fd].adrStart)
-#define CURR_MODULE_START (qMD[curr_md].adrStart)
-#define CURR_PROC_START (qPD[curr_pd].adrStart)
-
-#define CURR_FILE_END (qFD[curr_fd].adrEnd)
-#define CURR_MODULE_END (qMD[curr_md].adrEnd)
-#define CURR_PROC_END (qPD[curr_pd].adrEnd)
-
-#define CURR_FILE_ISYM (qFD[curr_fd].isym)
-#define CURR_MODULE_ISYM (qMD[curr_md].isym)
-#define CURR_PROC_ISYM (qPD[curr_pd].isym)
-
-#define TELL_OBJFILE \
- do { \
- if( !told_objfile ) { \
- told_objfile = 1; \
- warning ("\nIn object file \"%s\":\n", \
- objfile->name); \
- } \
- } while (0)
-
-
-
-/* Keeping track of the start/end symbol table (LNTT) indices of
- psymtabs created so far */
-
-typedef struct
- {
- int start;
- int end;
- }
-pst_syms_struct;
-
-static pst_syms_struct *pst_syms_array = 0;
-
-static pst_syms_count = 0;
-static pst_syms_size = 0;
-
-/* used by the TELL_OBJFILE macro */
-static boolean told_objfile = 0;
-
-/* Set up psymtab symbol index stuff */
-static void
-init_pst_syms ()
-{
- pst_syms_count = 0;
- pst_syms_size = 20;
- pst_syms_array = (pst_syms_struct *) xmalloc (20 * sizeof (pst_syms_struct));
-}
-
-/* Clean up psymtab symbol index stuff */
-static void
-clear_pst_syms ()
-{
- pst_syms_count = 0;
- pst_syms_size = 0;
- free (pst_syms_array);
- pst_syms_array = 0;
-}
-
-/* Add information about latest psymtab to symbol index table */
-static void
-record_pst_syms (start_sym, end_sym)
- int start_sym;
- int end_sym;
-{
- if (++pst_syms_count > pst_syms_size)
- {
- pst_syms_array = (pst_syms_struct *) xrealloc (pst_syms_array,
- 2 * pst_syms_size * sizeof (pst_syms_struct));
- pst_syms_size *= 2;
- }
- pst_syms_array[pst_syms_count - 1].start = start_sym;
- pst_syms_array[pst_syms_count - 1].end = end_sym;
-}
-
-/* Find a suitable symbol table index which can serve as the upper
- bound of a psymtab that starts at INDEX
-
- This scans backwards in the psymtab symbol index table to find a
- "hole" in which the given index can fit. This is a heuristic!!
- We don't search the entire table to check for multiple holes,
- we don't care about overlaps, etc.
-
- Return 0 => not found */
-static int
-find_next_pst_start (index)
- int index;
-{
- int i;
-
- for (i = pst_syms_count - 1; i >= 0; i--)
- if (pst_syms_array[i].end <= index)
- return (i == pst_syms_count - 1) ? 0 : pst_syms_array[i + 1].start - 1;
-
- if (pst_syms_array[0].start > index)
- return pst_syms_array[0].start - 1;
-
- return 0;
-}
-
-
-
-/* Utility functions to find the ending symbol index for a psymtab */
-
-/* Find the next file entry that begins beyond INDEX, and return
- its starting symbol index - 1.
- QFD is the file table, CURR_FD is the file entry from where to start,
- PXDB_HEADER_P as in hpread_quick_traverse (to allow macros to work).
-
- Return 0 => not found */
-static int
-find_next_file_isym (index, qFD, curr_fd, pxdb_header_p)
- int index;
- quick_file_entry *qFD;
- int curr_fd;
- PXDB_header_ptr pxdb_header_p;
-{
- while (VALID_CURR_FILE)
- {
- if (CURR_FILE_ISYM >= index)
- return CURR_FILE_ISYM - 1;
- curr_fd++;
- }
- return 0;
-}
-
-/* Find the next procedure entry that begins beyond INDEX, and return
- its starting symbol index - 1.
- QPD is the procedure table, CURR_PD is the proc entry from where to start,
- PXDB_HEADER_P as in hpread_quick_traverse (to allow macros to work).
-
- Return 0 => not found */
-static int
-find_next_proc_isym (index, qPD, curr_pd, pxdb_header_p)
- int index;
- quick_procedure_entry *qPD;
- int curr_pd;
- PXDB_header_ptr pxdb_header_p;
-{
- while (VALID_CURR_PROC)
- {
- if (CURR_PROC_ISYM >= index)
- return CURR_PROC_ISYM - 1;
- curr_pd++;
- }
- return 0;
-}
-
-/* Find the next module entry that begins beyond INDEX, and return
- its starting symbol index - 1.
- QMD is the module table, CURR_MD is the modue entry from where to start,
- PXDB_HEADER_P as in hpread_quick_traverse (to allow macros to work).
-
- Return 0 => not found */
-static int
-find_next_module_isym (index, qMD, curr_md, pxdb_header_p)
- int index;
- quick_module_entry *qMD;
- int curr_md;
- PXDB_header_ptr pxdb_header_p;
-{
- while (VALID_CURR_MODULE)
- {
- if (CURR_MODULE_ISYM >= index)
- return CURR_MODULE_ISYM - 1;
- curr_md++;
- }
- return 0;
-}
-
-/* Scan and record partial symbols for all functions starting from index
- pointed to by CURR_PD_P, and between code addresses START_ADR and END_ADR.
- Other parameters are explained in comments below. */
-
-/* This used to be inline in hpread_quick_traverse, but now that we do essentially the
- same thing for two different cases (modules and module-less files), it's better
- organized in a separate routine, although it does take lots of arguments. pai/1997-10-08 */
-
-static int
-scan_procs (curr_pd_p, qPD, max_procs, start_adr, end_adr, pst, vt_bits, objfile, section_offsets)
- int *curr_pd_p; /* pointer to current proc index */
- quick_procedure_entry *qPD; /* the procedure quick lookup table */
- int max_procs; /* number of entries in proc. table */
- CORE_ADDR start_adr; /* beginning of code range for current psymtab */
- CORE_ADDR end_adr; /* end of code range for current psymtab */
- struct partial_symtab *pst; /* current psymtab */
- char *vt_bits; /* strings table of SOM debug space */
- struct objfile *objfile; /* current object file */
- struct section_offsets *section_offsets; /* not really used for HP-UX currently */
-{
- union dnttentry *dn_bufp;
- int symbol_count = 0; /* Total number of symbols in this psymtab */
- int curr_pd = *curr_pd_p; /* Convenience variable -- avoid dereferencing pointer all the time */
-
-#ifdef DUMPING
- /* Turn this on for lots of debugging information in this routine */
- static int dumping = 0;
-#endif
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("Scan_procs called, addresses %x to %x, proc %x\n", start_adr, end_adr, curr_pd);
- }
-#endif
-
- while ((CURR_PROC_START <= end_adr) && (curr_pd < max_procs))
- {
-
- char *rtn_name; /* mangled name */
- char *rtn_dem_name; /* qualified demangled name */
- char *class_name;
- int class;
-
- if ((trans_lang ((enum hp_language) qPD[curr_pd].language) == language_cplus) &&
- vt_bits[(long) qPD[curr_pd].sbAlias]) /* not a null string */
- {
- /* Get mangled name for the procedure, and demangle it */
- rtn_name = &vt_bits[(long) qPD[curr_pd].sbAlias];
- rtn_dem_name = cplus_demangle (rtn_name, DMGL_ANSI | DMGL_PARAMS);
- }
- else
- {
- rtn_name = &vt_bits[(long) qPD[curr_pd].sbProc];
- rtn_dem_name = NULL;
- }
-
- /* Hack to get around HP C/C++ compilers' insistence on providing
- "_MAIN_" as an alternate name for "main" */
- if ((strcmp (rtn_name, "_MAIN_") == 0) &&
- (strcmp (&vt_bits[(long) qPD[curr_pd].sbProc], "main") == 0))
- rtn_dem_name = rtn_name = main_string;
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("..add %s (demangled %s), index %x to this psymtab\n", rtn_name, rtn_dem_name, curr_pd);
- }
-#endif
-
- /* Check for module-spanning routines. */
- if (CURR_PROC_END > end_adr)
- {
- TELL_OBJFILE;
- warning ("Procedure \"%s\" [0x%x] spans file or module boundaries.", rtn_name, curr_pd);
- }
-
- /* Add this routine symbol to the list in the objfile.
- Unfortunately we have to go to the LNTT to determine the
- correct list to put it on. An alternative (which the
- code used to do) would be to not check and always throw
- it on the "static" list. But if we go that route, then
- symbol_lookup() needs to be tweaked a bit to account
- for the fact that the function might not be found on
- the correct list in the psymtab. - RT */
- dn_bufp = hpread_get_lntt (qPD[curr_pd].isym, objfile);
- if (dn_bufp->dfunc.global)
- add_psymbol_with_dem_name_to_list (rtn_name,
- strlen (rtn_name),
- rtn_dem_name,
- strlen (rtn_dem_name),
- VAR_NAMESPACE,
- LOC_BLOCK, /* "I am a routine" */
- &objfile->global_psymbols,
- (qPD[curr_pd].adrStart + /* Starting address of rtn */
- ANOFFSET (section_offsets, SECT_OFF_TEXT)),
- 0, /* core addr?? */
- trans_lang ((enum hp_language) qPD[curr_pd].language),
- objfile);
- else
- add_psymbol_with_dem_name_to_list (rtn_name,
- strlen (rtn_name),
- rtn_dem_name,
- strlen (rtn_dem_name),
- VAR_NAMESPACE,
- LOC_BLOCK, /* "I am a routine" */
- &objfile->static_psymbols,
- (qPD[curr_pd].adrStart + /* Starting address of rtn */
- ANOFFSET (section_offsets, SECT_OFF_TEXT)),
- 0, /* core addr?? */
- trans_lang ((enum hp_language) qPD[curr_pd].language),
- objfile);
-
- symbol_count++;
- *curr_pd_p = ++curr_pd; /* bump up count & reflect in caller */
- } /* loop over procedures */
-
-#ifdef DUMPING
- if (dumping)
- {
- if (symbol_count == 0)
- printf ("Scan_procs: no symbols found!\n");
- }
-#endif
-
- return symbol_count;
-}
-
-
-/* Traverse the quick look-up tables, building a set of psymtabs.
-
- This constructs a psymtab for modules and files in the quick lookup
- tables.
-
- Mostly, modules correspond to compilation units, so we try to
- create psymtabs that correspond to modules; however, in some cases
- a file can result in a compiled object which does not have a module
- entry for it, so in such cases we create a psymtab for the file. */
-
-int
-hpread_quick_traverse (objfile, section_offsets, gntt_bits, vt_bits, pxdb_header_p)
- struct objfile *objfile; /* The object file descriptor */
- struct section_offsets *section_offsets; /* ?? Null for HP */
- char *gntt_bits; /* GNTT entries, loaded in from the file */
- char *vt_bits; /* VT (string) entries ditto. */
- PXDB_header_ptr pxdb_header_p; /* Pointer to pxdb header ditto */
-{
- struct partial_symtab *pst;
-
- char *addr;
-
- quick_procedure_entry *qPD;
- quick_file_entry *qFD;
- quick_module_entry *qMD;
- quick_class_entry *qCD;
-
- int idx;
- int i;
- CORE_ADDR start_adr; /* current psymtab's starting code addr */
- CORE_ADDR end_adr; /* current psymtab's ending code addr */
- CORE_ADDR next_mod_adr; /* next module's starting code addr */
- int curr_pd; /* current procedure */
- int curr_fd; /* current file */
- int curr_md; /* current module */
- int start_sym; /* current psymtab's starting symbol index */
- int end_sym; /* current psymtab's ending symbol index */
- int max_LNTT_sym_index;
- int syms_in_pst;
- B_TYPE *class_entered;
-
- struct partial_symbol **global_syms; /* We'll be filling in the "global" */
- struct partial_symbol **static_syms; /* and "static" tables in the objfile
- as we go, so we need a pair of
- current pointers. */
-
-#ifdef DUMPING
- /* Turn this on for lots of debugging information in this routine.
- You get a blow-by-blow account of quick lookup table reading */
- static int dumping = 0;
-#endif
-
- pst = (struct partial_symtab *) 0;
-
- /* Clear out some globals */
- init_pst_syms ();
- told_objfile = 0;
-
- /* Demangling style -- if EDG style already set, don't change it,
- as HP style causes some problems with the KAI EDG compiler */
- if (current_demangling_style != edg_demangling)
- {
- /* Otherwise, ensure that we are using HP style demangling */
- set_demangling_style (HP_DEMANGLING_STYLE_STRING);
- }
-
- /* First we need to find the starting points of the quick
- look-up tables in the GNTT. */
-
- addr = gntt_bits;
-
- qPD = (quick_procedure_entry_ptr) addr;
- addr += pxdb_header_p->pd_entries * sizeof (quick_procedure_entry);
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("\n Printing routines as we see them\n");
- for (i = 0; VALID_PROC (i); i++)
- {
- idx = (long) qPD[i].sbProc;
- printf ("%s %x..%x\n", &vt_bits[idx],
- (int) PROC_START (i),
- (int) PROC_END (i));
- }
- }
-#endif
-
- qFD = (quick_file_entry_ptr) addr;
- addr += pxdb_header_p->fd_entries * sizeof (quick_file_entry);
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("\n Printing files as we see them\n");
- for (i = 0; VALID_FILE (i); i++)
- {
- idx = (long) qFD[i].sbFile;
- printf ("%s %x..%x\n", &vt_bits[idx],
- (int) FILE_START (i),
- (int) FILE_END (i));
- }
- }
-#endif
-
- qMD = (quick_module_entry_ptr) addr;
- addr += pxdb_header_p->md_entries * sizeof (quick_module_entry);
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("\n Printing modules as we see them\n");
- for (i = 0; i < pxdb_header_p->md_entries; i++)
- {
- idx = (long) qMD[i].sbMod;
- printf ("%s\n", &vt_bits[idx]);
- }
- }
-#endif
-
- qCD = (quick_class_entry_ptr) addr;
- addr += pxdb_header_p->cd_entries * sizeof (quick_class_entry);
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("\n Printing classes as we see them\n");
- for (i = 0; VALID_CLASS (i); i++)
- {
- idx = (long) qCD[i].sbClass;
- printf ("%s\n", &vt_bits[idx]);
- }
-
- printf ("\n Done with dump, on to build!\n");
- }
-#endif
-
- /* We need this index only while hp-symtab-read.c expects
- a byte offset to the end of the LNTT entries for a given
- psymtab. Thus the need for it should go away someday.
-
- When it goes away, then we won't have any need to load the
- LNTT from the objfile at psymtab-time, and start-up will be
- faster. To make that work, we'll need some way to create
- a null pst for the "globals" pseudo-module. */
- max_LNTT_sym_index = LNTT_SYMCOUNT (objfile);
-
- /* Scan the module descriptors and make a psymtab for each.
-
- We know the MDs, FDs and the PDs are in order by starting
- address. We use that fact to traverse all three arrays in
- parallel, knowing when the next PD is in a new file
- and we need to create a new psymtab. */
- curr_pd = 0; /* Current procedure entry */
- curr_fd = 0; /* Current file entry */
- curr_md = 0; /* Current module entry */
-
- start_adr = 0; /* Current psymtab code range */
- end_adr = 0;
-
- start_sym = 0; /* Current psymtab symbol range */
- end_sym = 0;
-
- syms_in_pst = 0; /* Symbol count for psymtab */
-
- /* Psts actually just have pointers into the objfile's
- symbol table, not their own symbol tables. */
- global_syms = objfile->global_psymbols.list;
- static_syms = objfile->static_psymbols.list;
-
-
- /* First skip over pseudo-entries with address 0. These represent inlined
- routines and abstract (uninstantiated) template routines.
- FIXME: These should be read in and available -- even if we can't set
- breakpoints, etc., there's some information that can be presented
- to the user. pai/1997-10-08 */
-
- while (VALID_CURR_PROC && (CURR_PROC_START == 0))
- curr_pd++;
-
- /* Loop over files, modules, and procedures in code address order. Each
- time we enter an iteration of this loop, curr_pd points to the first
- unprocessed procedure, curr_fd points to the first unprocessed file, and
- curr_md to the first unprocessed module. Each iteration of this loop
- updates these as required -- any or all of them may be bumpd up
- each time around. When we exit this loop, we are done with all files
- and modules in the tables -- there may still be some procedures, however.
-
- Note: This code used to loop only over module entries, under the assumption
- that files can occur via inclusions and are thus unreliable, while a
- compiled object always corresponds to a module. With CTTI in the HP aCC
- compiler, it turns out that compiled objects may have only files and no
- modules; so we have to loop over files and modules, creating psymtabs for
- either as appropriate. Unfortunately there are some problems (notably:
- 1. the lack of "SRC_FILE_END" entries in the LNTT, 2. the lack of pointers
- to the ending symbol indices of a module or a file) which make it quite hard
- to do this correctly. Currently it uses a bunch of heuristics to start and
- end psymtabs; they seem to work well with most objects generated by aCC, but
- who knows when that will change... */
-
- while (VALID_CURR_FILE || VALID_CURR_MODULE)
- {
-
- char *mod_name_string;
- char *full_name_string;
-
- /* First check for modules like "version.c", which have no code
- in them but still have qMD entries. They also have no qFD or
- qPD entries. Their start address is -1 and their end address
- is 0. */
- if (VALID_CURR_MODULE && (CURR_MODULE_START == -1) && (CURR_MODULE_END == 0))
- {
-
- mod_name_string = &vt_bits[(long) qMD[curr_md].sbMod];
-
-#ifdef DUMPING
- if (dumping)
- printf ("Module with data only %s\n", mod_name_string);
-#endif
-
- /* We'll skip the rest (it makes error-checking easier), and
- just make an empty pst. Right now empty psts are not put
- in the pst chain, so all this is for naught, but later it
- might help. */
-
- pst = hpread_start_psymtab (objfile,
- section_offsets, /* ?? */
- mod_name_string,
- CURR_MODULE_START, /* Low text address: bogus! */
- (CURR_MODULE_ISYM * sizeof (struct dntt_type_block)),
- /* ldsymoff */
- global_syms,
- static_syms);
-
- pst = hpread_end_psymtab (pst,
- NULL, /* psymtab_include_list */
- 0, /* includes_used */
- end_sym * sizeof (struct dntt_type_block),
- /* byte index in LNTT of end
- = capping symbol offset
- = LDSYMOFF of nextfile */
- 0, /* text high */
- NULL, /* dependency_list */
- 0); /* dependencies_used */
-
- global_syms = objfile->global_psymbols.next;
- static_syms = objfile->static_psymbols.next;
-
- curr_md++;
- }
- else if (VALID_CURR_MODULE &&
- ((CURR_MODULE_START == 0) || (CURR_MODULE_START == -1) ||
- (CURR_MODULE_END == 0) || (CURR_MODULE_END == -1)))
- {
- TELL_OBJFILE;
- warning ("Module \"%s\" [0x%x] has non-standard addresses. It starts at 0x%x, ends at 0x%x, and will be skipped.",
- mod_name_string, curr_md, start_adr, end_adr);
- /* On to next module */
- curr_md++;
- }
- else
- {
- /* First check if we are looking at a file with code in it
- that does not overlap the current module's code range */
-
- if (VALID_CURR_FILE ? (VALID_CURR_MODULE ? (CURR_FILE_END < CURR_MODULE_START) : 1) : 0)
- {
-
- /* Looking at file not corresponding to any module,
- create a psymtab for it */
- full_name_string = &vt_bits[(long) qFD[curr_fd].sbFile];
- start_adr = CURR_FILE_START;
- end_adr = CURR_FILE_END;
- start_sym = CURR_FILE_ISYM;
-
- /* Check if there are any procedures not handled until now, that
- begin before the start address of this file, and if so, adjust
- this module's start address to include them. This handles routines that
- are in between file or module ranges for some reason (probably
- indicates a compiler bug */
-
- if (CURR_PROC_START < start_adr)
- {
- TELL_OBJFILE;
- warning ("Found procedure \"%s\" [0x%x] that is not in any file or module.",
- &vt_bits[(long) qPD[curr_pd].sbProc], curr_pd);
- start_adr = CURR_PROC_START;
- if (CURR_PROC_ISYM < start_sym)
- start_sym = CURR_PROC_ISYM;
- }
-
- /* Sometimes (compiler bug -- COBOL) the module end address is higher
- than the start address of the next module, so check for that and
- adjust accordingly */
-
- if (VALID_FILE (curr_fd + 1) && (FILE_START (curr_fd + 1) <= end_adr))
- {
- TELL_OBJFILE;
- warning ("File \"%s\" [0x%x] has ending address after starting address of next file; adjusting ending address down.",
- full_name_string, curr_fd);
- end_adr = FILE_START (curr_fd + 1) - 1; /* Is -4 (or -8 for 64-bit) better? */
- }
- if (VALID_MODULE (curr_md) && (CURR_MODULE_START <= end_adr))
- {
- TELL_OBJFILE;
- warning ("File \"%s\" [0x%x] has ending address after starting address of next module; adjusting ending address down.",
- full_name_string, curr_fd);
- end_adr = CURR_MODULE_START - 1; /* Is -4 (or -8 for 64-bit) better? */
- }
-
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("Make new psymtab for file %s (%x to %x).\n",
- full_name_string, start_adr, end_adr);
- }
-#endif
- /* Create the basic psymtab, connecting it in the list
- for this objfile and pointing its symbol entries
- to the current end of the symbol areas in the objfile.
-
- The "ldsymoff" parameter is the byte offset in the LNTT
- of the first symbol in this file. Some day we should
- turn this into an index (fix in hp-symtab-read.c as well).
- And it's not even the right byte offset, as we're using
- the size of a union! FIXME! */
- pst = hpread_start_psymtab (objfile,
- section_offsets, /* ?? */
- full_name_string,
- start_adr, /* Low text address */
- (start_sym * sizeof (struct dntt_type_block)),
- /* ldsymoff */
- global_syms,
- static_syms);
-
- /* Set up to only enter each class referenced in this module once. */
- class_entered = malloc (B_BYTES (pxdb_header_p->cd_entries));
- B_CLRALL (class_entered, pxdb_header_p->cd_entries);
-
- /* Scan the procedure descriptors for procedures in the current
- file, based on the starting addresses. */
-
- syms_in_pst = scan_procs (&curr_pd, qPD, pxdb_header_p->pd_entries,
- start_adr, end_adr,
- pst, vt_bits, objfile, section_offsets);
-
- /* Get ending symbol offset */
-
- end_sym = 0;
- /* First check for starting index before previous psymtab */
- if (pst_syms_count && start_sym < pst_syms_array[pst_syms_count - 1].end)
- {
- end_sym = find_next_pst_start (start_sym);
- }
- /* Look for next start index of a file or module, or procedure */
- if (!end_sym)
- {
- int next_file_isym = find_next_file_isym (start_sym, qFD, curr_fd + 1, pxdb_header_p);
- int next_module_isym = find_next_module_isym (start_sym, qMD, curr_md, pxdb_header_p);
- int next_proc_isym = find_next_proc_isym (start_sym, qPD, curr_pd, pxdb_header_p);
-
- if (next_file_isym && next_module_isym)
- {
- /* pick lower of next file or module start index */
- end_sym = min (next_file_isym, next_module_isym);
- }
- else
- {
- /* one of them is zero, pick the other */
- end_sym = max (next_file_isym, next_module_isym);
- }
-
- /* As a precaution, check next procedure index too */
- if (!end_sym)
- end_sym = next_proc_isym;
- else
- end_sym = min (end_sym, next_proc_isym);
- }
-
- /* Couldn't find procedure, file, or module, use globals as default */
- if (!end_sym)
- end_sym = pxdb_header_p->globals;
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("File psymtab indices: %x to %x\n", start_sym, end_sym);
- }
-#endif
-
- pst = hpread_end_psymtab (pst,
- NULL, /* psymtab_include_list */
- 0, /* includes_used */
- end_sym * sizeof (struct dntt_type_block),
- /* byte index in LNTT of end
- = capping symbol offset
- = LDSYMOFF of nextfile */
- end_adr, /* text high */
- NULL, /* dependency_list */
- 0); /* dependencies_used */
-
- record_pst_syms (start_sym, end_sym);
-
- if (NULL == pst)
- warning ("No symbols in psymtab for file \"%s\" [0x%x].", full_name_string, curr_fd);
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("Made new psymtab for file %s (%x to %x), sym %x to %x.\n",
- full_name_string, start_adr, end_adr, CURR_FILE_ISYM, end_sym);
- }
-#endif
- /* Prepare for the next psymtab. */
- global_syms = objfile->global_psymbols.next;
- static_syms = objfile->static_psymbols.next;
- free (class_entered);
-
- curr_fd++;
- } /* Psymtab for file */
- else
- {
- /* We have a module for which we create a psymtab */
-
- mod_name_string = &vt_bits[(long) qMD[curr_md].sbMod];
-
- /* We will include the code ranges of any files that happen to
- overlap with this module */
-
- /* So, first pick the lower of the file's and module's start addresses */
- start_adr = CURR_MODULE_START;
- if (VALID_CURR_FILE)
- {
- if (CURR_FILE_START < CURR_MODULE_START)
- {
- TELL_OBJFILE;
- warning ("File \"%s\" [0x%x] crosses beginning of module \"%s\".",
- &vt_bits[(long) qFD[curr_fd].sbFile],
- curr_fd, mod_name_string);
-
- start_adr = CURR_FILE_START;
- }
- }
-
- /* Also pick the lower of the file's and the module's start symbol indices */
- start_sym = CURR_MODULE_ISYM;
- if (VALID_CURR_FILE && (CURR_FILE_ISYM < CURR_MODULE_ISYM))
- start_sym = CURR_FILE_ISYM;
-
- /* For the end address, we scan through the files till we find one
- that overlaps the current module but ends beyond it; if no such file exists we
- simply use the module's start address.
- (Note, if file entries themselves overlap
- we take the longest overlapping extension beyond the end of the module...)
- We assume that modules never overlap. */
-
- end_adr = CURR_MODULE_END;
-
- if (VALID_CURR_FILE)
- {
- while (VALID_CURR_FILE && (CURR_FILE_START < end_adr))
- {
-
-#ifdef DUMPING
- if (dumping)
- printf ("Maybe skipping file %s which overlaps with module %s\n",
- &vt_bits[(long) qFD[curr_fd].sbFile], mod_name_string);
-#endif
- if (CURR_FILE_END > end_adr)
- {
- TELL_OBJFILE;
- warning ("File \"%s\" [0x%x] crosses end of module \"%s\".",
- &vt_bits[(long) qFD[curr_fd].sbFile],
- curr_fd, mod_name_string);
- end_adr = CURR_FILE_END;
- }
- curr_fd++;
- }
- curr_fd--; /* back up after going too far */
- }
-
- /* Sometimes (compiler bug -- COBOL) the module end address is higher
- than the start address of the next module, so check for that and
- adjust accordingly */
-
- if (VALID_MODULE (curr_md + 1) && (MODULE_START (curr_md + 1) <= end_adr))
- {
- TELL_OBJFILE;
- warning ("Module \"%s\" [0x%x] has ending address after starting address of next module; adjusting ending address down.",
- mod_name_string, curr_md);
- end_adr = MODULE_START (curr_md + 1) - 1; /* Is -4 (or -8 for 64-bit) better? */
- }
- if (VALID_FILE (curr_fd + 1) && (FILE_START (curr_fd + 1) <= end_adr))
- {
- TELL_OBJFILE;
- warning ("Module \"%s\" [0x%x] has ending address after starting address of next file; adjusting ending address down.",
- mod_name_string, curr_md);
- end_adr = FILE_START (curr_fd + 1) - 1; /* Is -4 (or -8 for 64-bit) better? */
- }
-
- /* Use one file to get the full name for the module. This
- situation can arise if there is executable code in a #include
- file. Each file with code in it gets a qFD. Files which don't
- contribute code don't get a qFD, even if they include files
- which do, e.g.:
-
- body.c: rtn.h:
- int x; int main() {
- #include "rtn.h" return x;
- }
-
- There will a qFD for "rtn.h",and a qMD for "body.c",
- but no qMD for "rtn.h" or qFD for "body.c"!
-
- We pick the name of the last file to overlap with this
- module. C convention is to put include files first. In a
- perfect world, we could check names and use the file whose full
- path name ends with the module name. */
-
- if (VALID_CURR_FILE)
- full_name_string = &vt_bits[(long) qFD[curr_fd].sbFile];
- else
- full_name_string = mod_name_string;
-
- /* Check if there are any procedures not handled until now, that
- begin before the start address we have now, and if so, adjust
- this psymtab's start address to include them. This handles routines that
- are in between file or module ranges for some reason (probably
- indicates a compiler bug */
-
- if (CURR_PROC_START < start_adr)
- {
- TELL_OBJFILE;
- warning ("Found procedure \"%s\" [0x%x] that is not in any file or module.",
- &vt_bits[(long) qPD[curr_pd].sbProc], curr_pd);
- start_adr = CURR_PROC_START;
- if (CURR_PROC_ISYM < start_sym)
- start_sym = CURR_PROC_ISYM;
- }
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("Make new psymtab for module %s (%x to %x), using file %s\n",
- mod_name_string, start_adr, end_adr, full_name_string);
- }
-#endif
- /* Create the basic psymtab, connecting it in the list
- for this objfile and pointing its symbol entries
- to the current end of the symbol areas in the objfile.
-
- The "ldsymoff" parameter is the byte offset in the LNTT
- of the first symbol in this file. Some day we should
- turn this into an index (fix in hp-symtab-read.c as well).
- And it's not even the right byte offset, as we're using
- the size of a union! FIXME! */
- pst = hpread_start_psymtab (objfile,
- section_offsets, /* ?? */
- full_name_string,
- start_adr, /* Low text address */
- (start_sym * sizeof (struct dntt_type_block)),
- /* ldsymoff */
- global_syms,
- static_syms);
-
- /* Set up to only enter each class referenced in this module once. */
- class_entered = malloc (B_BYTES (pxdb_header_p->cd_entries));
- B_CLRALL (class_entered, pxdb_header_p->cd_entries);
-
- /* Scan the procedure descriptors for procedures in the current
- module, based on the starting addresses. */
-
- syms_in_pst = scan_procs (&curr_pd, qPD, pxdb_header_p->pd_entries,
- start_adr, end_adr,
- pst, vt_bits, objfile, section_offsets);
-
- /* Get ending symbol offset */
-
- end_sym = 0;
- /* First check for starting index before previous psymtab */
- if (pst_syms_count && start_sym < pst_syms_array[pst_syms_count - 1].end)
- {
- end_sym = find_next_pst_start (start_sym);
- }
- /* Look for next start index of a file or module, or procedure */
- if (!end_sym)
- {
- int next_file_isym = find_next_file_isym (start_sym, qFD, curr_fd + 1, pxdb_header_p);
- int next_module_isym = find_next_module_isym (start_sym, qMD, curr_md + 1, pxdb_header_p);
- int next_proc_isym = find_next_proc_isym (start_sym, qPD, curr_pd, pxdb_header_p);
-
- if (next_file_isym && next_module_isym)
- {
- /* pick lower of next file or module start index */
- end_sym = min (next_file_isym, next_module_isym);
- }
- else
- {
- /* one of them is zero, pick the other */
- end_sym = max (next_file_isym, next_module_isym);
- }
-
- /* As a precaution, check next procedure index too */
- if (!end_sym)
- end_sym = next_proc_isym;
- else
- end_sym = min (end_sym, next_proc_isym);
- }
-
- /* Couldn't find procedure, file, or module, use globals as default */
- if (!end_sym)
- end_sym = pxdb_header_p->globals;
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("Module psymtab indices: %x to %x\n", start_sym, end_sym);
- }
-#endif
-
- pst = hpread_end_psymtab (pst,
- NULL, /* psymtab_include_list */
- 0, /* includes_used */
- end_sym * sizeof (struct dntt_type_block),
- /* byte index in LNTT of end
- = capping symbol offset
- = LDSYMOFF of nextfile */
- end_adr, /* text high */
- NULL, /* dependency_list */
- 0); /* dependencies_used */
-
- record_pst_syms (start_sym, end_sym);
-
- if (NULL == pst)
- warning ("No symbols in psymtab for module \"%s\" [0x%x].", mod_name_string, curr_md);
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("Made new psymtab for module %s (%x to %x), sym %x to %x.\n",
- mod_name_string, start_adr, end_adr, CURR_MODULE_ISYM, end_sym);
- }
-#endif
-
- /* Prepare for the next psymtab. */
- global_syms = objfile->global_psymbols.next;
- static_syms = objfile->static_psymbols.next;
- free (class_entered);
-
- curr_md++;
- curr_fd++;
- } /* psymtab for module */
- } /* psymtab for non-bogus file or module */
- } /* End of while loop over all files & modules */
-
- /* There may be some routines after all files and modules -- these will get
- inserted in a separate new module of their own */
- if (VALID_CURR_PROC)
- {
- start_adr = CURR_PROC_START;
- end_adr = qPD[pxdb_header_p->pd_entries - 1].adrEnd;
- TELL_OBJFILE;
- warning ("Found functions beyond end of all files and modules [0x%x].", curr_pd);
-#ifdef DUMPING
- if (dumping)
- {
- printf ("Orphan functions at end, PD %d and beyond (%x to %x)\n",
- curr_pd, start_adr, end_adr);
- }
-#endif
- pst = hpread_start_psymtab (objfile,
- section_offsets, /* ?? */
- "orphans",
- start_adr, /* Low text address */
- (CURR_PROC_ISYM * sizeof (struct dntt_type_block)),
- /* ldsymoff */
- global_syms,
- static_syms);
-
- scan_procs (&curr_pd, qPD, pxdb_header_p->pd_entries,
- start_adr, end_adr,
- pst, vt_bits, objfile, section_offsets);
-
- pst = hpread_end_psymtab (pst,
- NULL, /* psymtab_include_list */
- 0, /* includes_used */
- pxdb_header_p->globals * sizeof (struct dntt_type_block),
- /* byte index in LNTT of end
- = capping symbol offset
- = LDSYMOFF of nextfile */
- end_adr, /* text high */
- NULL, /* dependency_list */
- 0); /* dependencies_used */
- }
-
-
-#ifdef NEVER_NEVER
- /* Now build psts for non-module things (in the tail of
- the LNTT, after the last END MODULE entry).
-
- If null psts were kept on the chain, this would be
- a solution. FIXME */
- pst = hpread_start_psymtab (objfile,
- section_offsets,
- "globals",
- 0,
- (pxdb_header_p->globals
- * sizeof (struct dntt_type_block)),
- objfile->global_psymbols.next,
- objfile->static_psymbols.next);
- hpread_end_psymtab (pst,
- NULL, 0,
- (max_LNTT_sym_index * sizeof (struct dntt_type_block)),
- 0,
- NULL, 0);
-#endif
-
- clear_pst_syms ();
-
- return 1;
-
-} /* End of hpread_quick_traverse. */
-
-
-/* Get appropriate header, based on pxdb type.
- Return value: 1 if ok, 0 if not */
-int
-hpread_get_header (objfile, pxdb_header_p)
- struct objfile *objfile;
- PXDB_header_ptr pxdb_header_p;
-{
- asection *pinfo_section, *debug_section, *header_section;
-
-#ifdef DUMPING
- /* Turn on for debugging information */
- static int dumping = 0;
-#endif
-
- header_section = bfd_get_section_by_name (objfile->obfd, "$HEADER$");
- if (!header_section)
- {
- /* We don't have either PINFO or DEBUG sections. But
- stuff like "libc.sl" has no debug info. There's no
- need to warn the user of this, as it may be ok. The
- caller will figure it out and issue any needed
- messages. */
-#ifdef DUMPING
- if (dumping)
- printf ("==No debug info at all for %s.\n", objfile->name);
-#endif
-
- return 0;
- }
-
- /* We would like either a $DEBUG$ or $PINFO$ section.
- Once we know which, we can understand the header
- data (which we have defined to suit the more common
- $DEBUG$ case). */
- debug_section = bfd_get_section_by_name (objfile->obfd, "$DEBUG$");
- pinfo_section = bfd_get_section_by_name (objfile->obfd, "$PINFO$");
- if (debug_section)
- {
- /* The expected case: normal pxdb header. */
- bfd_get_section_contents (objfile->obfd, header_section,
- pxdb_header_p, 0, sizeof (PXDB_header));
-
- if (!pxdb_header_p->pxdbed)
- {
- /* This shouldn't happen if we check in "symfile.c". */
- return 0;
- } /* DEBUG section */
- }
-
- else if (pinfo_section)
- {
- /* The DOC case; we need to translate this into a
- regular header. */
- DOC_info_PXDB_header doc_header;
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("==OOps, PINFO, let's try to handle this, %s.\n", objfile->name);
- }
-#endif
-
- bfd_get_section_contents (objfile->obfd,
- header_section,
- &doc_header, 0,
- sizeof (DOC_info_PXDB_header));
-
- if (!doc_header.pxdbed)
- {
- /* This shouldn't happen if we check in "symfile.c". */
- warning ("File \"%s\" not processed by pxdb!", objfile->name);
- return 0;
- }
-
- /* Copy relevent fields to standard header passed in. */
- pxdb_header_p->pd_entries = doc_header.pd_entries;
- pxdb_header_p->fd_entries = doc_header.fd_entries;
- pxdb_header_p->md_entries = doc_header.md_entries;
- pxdb_header_p->pxdbed = doc_header.pxdbed;
- pxdb_header_p->bighdr = doc_header.bighdr;
- pxdb_header_p->sa_header = doc_header.sa_header;
- pxdb_header_p->inlined = doc_header.inlined;
- pxdb_header_p->globals = doc_header.globals;
- pxdb_header_p->time = doc_header.time;
- pxdb_header_p->pg_entries = doc_header.pg_entries;
- pxdb_header_p->functions = doc_header.functions;
- pxdb_header_p->files = doc_header.files;
- pxdb_header_p->cd_entries = doc_header.cd_entries;
- pxdb_header_p->aa_entries = doc_header.aa_entries;
- pxdb_header_p->oi_entries = doc_header.oi_entries;
- pxdb_header_p->version = doc_header.version;
- } /* PINFO section */
-
- else
- {
-#ifdef DUMPING
- if (dumping)
- printf ("==No debug info at all for %s.\n", objfile->name);
-#endif
-
- return 0;
-
- }
-
- return 1;
-} /* End of hpread_get_header */
-#endif /* QUICK_LOOK_UP */
-
-
-/* Initialization for reading native HP C debug symbols from OBJFILE.
-
- Its only purpose in life is to set up the symbol reader's private
- per-objfile data structures, and read in the raw contents of the debug
- sections (attaching pointers to the debug info into the private data
- structures).
-
- Since BFD doesn't know how to read debug symbols in a format-independent
- way (and may never do so...), we have to do it ourselves. Note we may
- be called on a file without native HP C debugging symbols.
-
- FIXME, there should be a cleaner peephole into the BFD environment
- here. */
-void
-hpread_symfile_init (objfile)
- struct objfile *objfile;
-{
- asection *vt_section, *slt_section, *lntt_section, *gntt_section;
-
- /* Allocate struct to keep track of the symfile */
- objfile->sym_private = (PTR)
- xmmalloc (objfile->md, sizeof (struct hpread_symfile_info));
- memset (objfile->sym_private, 0, sizeof (struct hpread_symfile_info));
-
- /* We haven't read in any types yet. */
- TYPE_VECTOR (objfile) = 0;
-
- /* Read in data from the $GNTT$ subspace. */
- gntt_section = bfd_get_section_by_name (objfile->obfd, "$GNTT$");
- if (!gntt_section)
- return;
-
- GNTT (objfile)
- = obstack_alloc (&objfile->symbol_obstack,
- bfd_section_size (objfile->obfd, gntt_section));
-
- bfd_get_section_contents (objfile->obfd, gntt_section, GNTT (objfile),
- 0, bfd_section_size (objfile->obfd, gntt_section));
-
- GNTT_SYMCOUNT (objfile)
- = bfd_section_size (objfile->obfd, gntt_section)
- / sizeof (struct dntt_type_block);
-
- /* Read in data from the $LNTT$ subspace. Also keep track of the number
- of LNTT symbols.
-
- FIXME: this could be moved into the psymtab-to-symtab expansion
- code, and save startup time. At the moment this data is
- still used, though. We'd need a way to tell hp-symtab-read.c
- whether or not to load the LNTT. */
- lntt_section = bfd_get_section_by_name (objfile->obfd, "$LNTT$");
- if (!lntt_section)
- return;
-
- LNTT (objfile)
- = obstack_alloc (&objfile->symbol_obstack,
- bfd_section_size (objfile->obfd, lntt_section));
-
- bfd_get_section_contents (objfile->obfd, lntt_section, LNTT (objfile),
- 0, bfd_section_size (objfile->obfd, lntt_section));
-
- LNTT_SYMCOUNT (objfile)
- = bfd_section_size (objfile->obfd, lntt_section)
- / sizeof (struct dntt_type_block);
-
- /* Read in data from the $SLT$ subspace. $SLT$ contains information
- on source line numbers. */
- slt_section = bfd_get_section_by_name (objfile->obfd, "$SLT$");
- if (!slt_section)
- return;
-
- SLT (objfile) =
- obstack_alloc (&objfile->symbol_obstack,
- bfd_section_size (objfile->obfd, slt_section));
-
- bfd_get_section_contents (objfile->obfd, slt_section, SLT (objfile),
- 0, bfd_section_size (objfile->obfd, slt_section));
-
- /* Read in data from the $VT$ subspace. $VT$ contains things like
- names and constants. Keep track of the number of symbols in the VT. */
- vt_section = bfd_get_section_by_name (objfile->obfd, "$VT$");
- if (!vt_section)
- return;
-
- VT_SIZE (objfile) = bfd_section_size (objfile->obfd, vt_section);
-
- VT (objfile) =
- (char *) obstack_alloc (&objfile->symbol_obstack,
- VT_SIZE (objfile));
-
- bfd_get_section_contents (objfile->obfd, vt_section, VT (objfile),
- 0, VT_SIZE (objfile));
-}
-
-/* Scan and build partial symbols for a symbol file.
-
- The minimal symbol table (either SOM or HP a.out) has already been
- read in; all we need to do is setup partial symbols based on the
- native debugging information.
-
- Note that the minimal table is produced by the linker, and has
- only global routines in it; the psymtab is based on compiler-
- generated debug information and has non-global
- routines in it as well as files and class information.
-
- We assume hpread_symfile_init has been called to initialize the
- symbol reader's private data structures.
-
- SECTION_OFFSETS contains offsets relative to which the symbols in the
- various sections are (depending where the sections were actually loaded).
- MAINLINE is true if we are reading the main symbol table (as
- opposed to a shared lib or dynamically loaded file). */
-void
-hpread_build_psymtabs (objfile, section_offsets, mainline)
- struct objfile *objfile;
- struct section_offsets *section_offsets;
- int mainline;
-{
-
-#ifdef DUMPING
- /* Turn this on to get debugging output. */
- static int dumping = 0;
-#endif
-
- char *namestring;
- int past_first_source_file = 0;
- struct cleanup *old_chain;
-
- int hp_symnum, symcount, i;
- int scan_start = 0;
-
- union dnttentry *dn_bufp;
- unsigned long valu;
- char *p;
- int texthigh = 0;
- int have_name = 0;
-
- /* Current partial symtab */
- struct partial_symtab *pst;
-
- /* List of current psymtab's include files */
- char **psymtab_include_list;
- int includes_allocated;
- int includes_used;
-
- /* Index within current psymtab dependency list */
- struct partial_symtab **dependency_list;
- int dependencies_used, dependencies_allocated;
-
- /* Just in case the stabs reader left turds lying around. */
- free_pending_blocks ();
- make_cleanup ((make_cleanup_func) really_free_pendings, 0);
-
- pst = (struct partial_symtab *) 0;
-
- /* We shouldn't use alloca, instead use malloc/free. Doing so avoids
- a number of problems with cross compilation and creating useless holes
- in the stack when we have to allocate new entries. FIXME. */
-
- includes_allocated = 30;
- includes_used = 0;
- psymtab_include_list = (char **) alloca (includes_allocated *
- sizeof (char *));
-
- dependencies_allocated = 30;
- dependencies_used = 0;
- dependency_list =
- (struct partial_symtab **) alloca (dependencies_allocated *
- sizeof (struct partial_symtab *));
-
- old_chain = make_cleanup ((make_cleanup_func) free_objfile, objfile);
-
- last_source_file = 0;
-
-#ifdef QUICK_LOOK_UP
- {
- /* Begin code for new-style loading of quick look-up tables. */
-
- /* elz: this checks whether the file has beeen processed by pxdb.
- If not we would like to try to read the psymbols in
- anyway, but it turns out to be not so easy. So this could
- actually be commented out, but I leave it in, just in case
- we decide to add support for non-pxdb-ed stuff in the future. */
- PXDB_header pxdb_header;
- int found_modules_in_program;
-
- if (hpread_get_header (objfile, &pxdb_header))
- {
- /* Build a minimal table. No types, no global variables,
- no include files.... */
-#ifdef DUMPING
- if (dumping)
- printf ("\nNew method for %s\n", objfile->name);
-#endif
-
- /* elz: quick_traverse returns true if it found
- some modules in the main source file, other
- than those in end.c
- In C and C++, all the files have MODULES entries
- in the LNTT, and the quick table traverse is all
- based on finding these MODULES entries. Without
- those it cannot work.
- It happens that F77 programs don't have MODULES
- so the quick traverse gets confused. F90 programs
- have modules, and the quick method still works.
- So, if modules (other than those in end.c) are
- not found we give up on the quick table stuff,
- and fall back on the slower method */
- found_modules_in_program = hpread_quick_traverse (objfile,
- section_offsets,
- GNTT (objfile),
- VT (objfile),
- &pxdb_header);
-
- discard_cleanups (old_chain);
-
- /* Set up to scan the global section of the LNTT.
-
- This field is not always correct: if there are
- no globals, it will point to the last record in
- the regular LNTT, which is usually an END MODULE.
-
- Since it might happen that there could be a file
- with just one global record, there's no way to
- tell other than by looking at the record, so that's
- done below. */
- if (found_modules_in_program)
- scan_start = pxdb_header.globals;
- }
-#ifdef DUMPING
- else
- {
- if (dumping)
- printf ("\nGoing on to old method for %s\n", objfile->name);
- }
-#endif
- }
-#endif /* QUICK_LOOK_UP */
-
- /* Make two passes, one over the GNTT symbols, the other for the
- LNTT symbols.
-
- JB comment: above isn't true--they only make one pass, over
- the LNTT. */
- for (i = 0; i < 1; i++)
- {
- int within_function = 0;
-
- if (i)
- symcount = GNTT_SYMCOUNT (objfile);
- else
- symcount = LNTT_SYMCOUNT (objfile);
-
-
- for (hp_symnum = scan_start; hp_symnum < symcount; hp_symnum++)
- {
- QUIT;
- if (i)
- dn_bufp = hpread_get_gntt (hp_symnum, objfile);
- else
- dn_bufp = hpread_get_lntt (hp_symnum, objfile);
-
- if (dn_bufp->dblock.extension)
- continue;
-
- /* Only handle things which are necessary for minimal symbols.
- everything else is ignored. */
- switch (dn_bufp->dblock.kind)
- {
- case DNTT_TYPE_SRCFILE:
- {
-#ifdef QUICK_LOOK_UP
- if (scan_start == hp_symnum
- && symcount == hp_symnum + 1)
- {
- /* If there are NO globals in an executable,
- PXDB's index to the globals will point to
- the last record in the file, which
- could be this record. (this happened for F77 libraries)
- ignore it and be done! */
- continue;
- }
-#endif /* QUICK_LOOK_UP */
-
- /* A source file of some kind. Note this may simply
- be an included file. */
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
-
- /* Check if this is the source file we are already working
- with. */
- if (pst && !strcmp (namestring, pst->filename))
- continue;
-
- /* Check if this is an include file, if so check if we have
- already seen it. Add it to the include list */
- p = strrchr (namestring, '.');
- if (!strcmp (p, ".h"))
- {
- int j, found;
-
- found = 0;
- for (j = 0; j < includes_used; j++)
- if (!strcmp (namestring, psymtab_include_list[j]))
- {
- found = 1;
- break;
- }
- if (found)
- continue;
-
- /* Add it to the list of includes seen so far and
- allocate more include space if necessary. */
- psymtab_include_list[includes_used++] = namestring;
- if (includes_used >= includes_allocated)
- {
- char **orig = psymtab_include_list;
-
- psymtab_include_list = (char **)
- alloca ((includes_allocated *= 2) *
- sizeof (char *));
- memcpy ((PTR) psymtab_include_list, (PTR) orig,
- includes_used * sizeof (char *));
- }
- continue;
- }
-
- if (pst)
- {
- if (!have_name)
- {
- pst->filename = (char *)
- obstack_alloc (&pst->objfile->psymbol_obstack,
- strlen (namestring) + 1);
- strcpy (pst->filename, namestring);
- have_name = 1;
- continue;
- }
- continue;
- }
-
- /* This is a bonafide new source file.
- End the current partial symtab and start a new one. */
-
- if (pst && past_first_source_file)
- {
- hpread_end_psymtab (pst, psymtab_include_list,
- includes_used,
- (hp_symnum
- * sizeof (struct dntt_type_block)),
- texthigh,
- dependency_list, dependencies_used);
- pst = (struct partial_symtab *) 0;
- includes_used = 0;
- dependencies_used = 0;
- }
- else
- past_first_source_file = 1;
-
- valu = hpread_get_textlow (i, hp_symnum, objfile, symcount);
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT);
- pst = hpread_start_psymtab (objfile, section_offsets,
- namestring, valu,
- (hp_symnum
- * sizeof (struct dntt_type_block)),
- objfile->global_psymbols.next,
- objfile->static_psymbols.next);
- texthigh = valu;
- have_name = 1;
- continue;
- }
-
- case DNTT_TYPE_MODULE:
- /* A source file. It's still unclear to me what the
- real difference between a DNTT_TYPE_SRCFILE and DNTT_TYPE_MODULE
- is supposed to be. */
-
- /* First end the previous psymtab */
- if (pst)
- {
- hpread_end_psymtab (pst, psymtab_include_list, includes_used,
- ((hp_symnum - 1)
- * sizeof (struct dntt_type_block)),
- texthigh,
- dependency_list, dependencies_used);
- pst = (struct partial_symtab *) 0;
- includes_used = 0;
- dependencies_used = 0;
- have_name = 0;
- }
-
- /* Now begin a new module and a new psymtab for it */
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
- valu = hpread_get_textlow (i, hp_symnum, objfile, symcount);
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT);
- if (!pst)
- {
- pst = hpread_start_psymtab (objfile, section_offsets,
- namestring, valu,
- (hp_symnum
- * sizeof (struct dntt_type_block)),
- objfile->global_psymbols.next,
- objfile->static_psymbols.next);
- texthigh = valu;
- have_name = 0;
- }
- continue;
-
- case DNTT_TYPE_FUNCTION:
- case DNTT_TYPE_ENTRY:
- /* The beginning of a function. DNTT_TYPE_ENTRY may also denote
- a secondary entry point. */
- valu = dn_bufp->dfunc.hiaddr + ANOFFSET (section_offsets,
- SECT_OFF_TEXT);
- if (valu > texthigh)
- texthigh = valu;
- valu = dn_bufp->dfunc.lowaddr +
- ANOFFSET (section_offsets, SECT_OFF_TEXT);
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
- if (dn_bufp->dfunc.global)
- add_psymbol_to_list (namestring, strlen (namestring),
- VAR_NAMESPACE, LOC_BLOCK,
- &objfile->global_psymbols, valu,
- 0, language_unknown, objfile);
- else
- add_psymbol_to_list (namestring, strlen (namestring),
- VAR_NAMESPACE, LOC_BLOCK,
- &objfile->static_psymbols, valu,
- 0, language_unknown, objfile);
- within_function = 1;
- continue;
-
- case DNTT_TYPE_DOC_FUNCTION:
- valu = dn_bufp->ddocfunc.hiaddr + ANOFFSET (section_offsets,
- SECT_OFF_TEXT);
- if (valu > texthigh)
- texthigh = valu;
- valu = dn_bufp->ddocfunc.lowaddr +
- ANOFFSET (section_offsets, SECT_OFF_TEXT);
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
- if (dn_bufp->ddocfunc.global)
- add_psymbol_to_list (namestring, strlen (namestring),
- VAR_NAMESPACE, LOC_BLOCK,
- &objfile->global_psymbols, valu,
- 0, language_unknown, objfile);
- else
- add_psymbol_to_list (namestring, strlen (namestring),
- VAR_NAMESPACE, LOC_BLOCK,
- &objfile->static_psymbols, valu,
- 0, language_unknown, objfile);
- within_function = 1;
- continue;
-
- case DNTT_TYPE_BEGIN:
- case DNTT_TYPE_END:
- /* We don't check MODULE end here, because there can be
- symbols beyond the module end which properly belong to the
- current psymtab -- so we wait till the next MODULE start */
-
-
-#ifdef QUICK_LOOK_UP
- if (scan_start == hp_symnum
- && symcount == hp_symnum + 1)
- {
- /* If there are NO globals in an executable,
- PXDB's index to the globals will point to
- the last record in the file, which is
- probably an END MODULE, i.e. this record.
- ignore it and be done! */
- continue;
- }
-#endif /* QUICK_LOOK_UP */
-
- /* Scope block begin/end. We only care about function
- and file blocks right now. */
-
- if ((dn_bufp->dend.endkind == DNTT_TYPE_FUNCTION) ||
- (dn_bufp->dend.endkind == DNTT_TYPE_DOC_FUNCTION))
- within_function = 0;
- continue;
-
- case DNTT_TYPE_SVAR:
- case DNTT_TYPE_DVAR:
- case DNTT_TYPE_TYPEDEF:
- case DNTT_TYPE_TAGDEF:
- {
- /* Variables, typedefs an the like. */
- enum address_class storage;
- namespace_enum namespace;
-
- /* Don't add locals to the partial symbol table. */
- if (within_function
- && (dn_bufp->dblock.kind == DNTT_TYPE_SVAR
- || dn_bufp->dblock.kind == DNTT_TYPE_DVAR))
- continue;
-
- /* TAGDEFs go into the structure namespace. */
- if (dn_bufp->dblock.kind == DNTT_TYPE_TAGDEF)
- namespace = STRUCT_NAMESPACE;
- else
- namespace = VAR_NAMESPACE;
-
- /* What kind of "storage" does this use? */
- if (dn_bufp->dblock.kind == DNTT_TYPE_SVAR)
- storage = LOC_STATIC;
- else if (dn_bufp->dblock.kind == DNTT_TYPE_DVAR
- && dn_bufp->ddvar.regvar)
- storage = LOC_REGISTER;
- else if (dn_bufp->dblock.kind == DNTT_TYPE_DVAR)
- storage = LOC_LOCAL;
- else
- storage = LOC_UNDEF;
-
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
- if (!pst)
- {
- pst = hpread_start_psymtab (objfile, section_offsets,
- "globals", 0,
- (hp_symnum
- * sizeof (struct dntt_type_block)),
- objfile->global_psymbols.next,
- objfile->static_psymbols.next);
- }
-
- /* Compute address of the data symbol */
- valu = dn_bufp->dsvar.location;
- /* Relocate in case it's in a shared library */
- if (storage == LOC_STATIC)
- valu += ANOFFSET (section_offsets, SECT_OFF_DATA);
-
- /* Luckily, dvar, svar, typedef, and tagdef all
- have their "global" bit in the same place, so it works
- (though it's bad programming practice) to reference
- "dsvar.global" even though we may be looking at
- any of the above four types. */
- if (dn_bufp->dsvar.global)
- {
- add_psymbol_to_list (namestring, strlen (namestring),
- namespace, storage,
- &objfile->global_psymbols,
- valu,
- 0, language_unknown, objfile);
- }
- else
- {
- add_psymbol_to_list (namestring, strlen (namestring),
- namespace, storage,
- &objfile->static_psymbols,
- valu,
- 0, language_unknown, objfile);
- }
-
- /* For TAGDEF's, the above code added the tagname to the
- struct namespace. This will cause tag "t" to be found
- on a reference of the form "(struct t) x". But for
- C++ classes, "t" will also be a typename, which we
- want to find on a reference of the form "ptype t".
- Therefore, we also add "t" to the var namespace.
- Do the same for enum's due to the way aCC generates
- debug info for these (see more extended comment
- in hp-symtab-read.c).
- We do the same for templates, so that "ptype t"
- where "t" is a template also works. */
- if (dn_bufp->dblock.kind == DNTT_TYPE_TAGDEF &&
- dn_bufp->dtype.type.dnttp.index < LNTT_SYMCOUNT (objfile))
- {
- int global = dn_bufp->dtag.global;
- /* Look ahead to see if it's a C++ class */
- dn_bufp = hpread_get_lntt (dn_bufp->dtype.type.dnttp.index, objfile);
- if (dn_bufp->dblock.kind == DNTT_TYPE_CLASS ||
- dn_bufp->dblock.kind == DNTT_TYPE_ENUM ||
- dn_bufp->dblock.kind == DNTT_TYPE_TEMPLATE)
- {
- if (global)
- {
- add_psymbol_to_list (namestring, strlen (namestring),
- VAR_NAMESPACE, storage,
- &objfile->global_psymbols,
- dn_bufp->dsvar.location,
- 0, language_unknown, objfile);
- }
- else
- {
- add_psymbol_to_list (namestring, strlen (namestring),
- VAR_NAMESPACE, storage,
- &objfile->static_psymbols,
- dn_bufp->dsvar.location,
- 0, language_unknown, objfile);
- }
- }
- }
- }
- continue;
-
- case DNTT_TYPE_MEMENUM:
- case DNTT_TYPE_CONST:
- /* Constants and members of enumerated types. */
- SET_NAMESTRING (dn_bufp, &namestring, objfile);
- if (!pst)
- {
- pst = hpread_start_psymtab (objfile, section_offsets,
- "globals", 0,
- (hp_symnum
- * sizeof (struct dntt_type_block)),
- objfile->global_psymbols.next,
- objfile->static_psymbols.next);
- }
- if (dn_bufp->dconst.global)
- add_psymbol_to_list (namestring, strlen (namestring),
- VAR_NAMESPACE, LOC_CONST,
- &objfile->global_psymbols, 0,
- 0, language_unknown, objfile);
- else
- add_psymbol_to_list (namestring, strlen (namestring),
- VAR_NAMESPACE, LOC_CONST,
- &objfile->static_psymbols, 0,
- 0, language_unknown, objfile);
- continue;
- default:
- continue;
- }
- }
- }
-
- /* End any pending partial symbol table. */
- if (pst)
- {
- hpread_end_psymtab (pst, psymtab_include_list, includes_used,
- hp_symnum * sizeof (struct dntt_type_block),
- 0, dependency_list, dependencies_used);
- }
-
- discard_cleanups (old_chain);
-}
-
-/* Perform any local cleanups required when we are done with a particular
- objfile. I.E, we are in the process of discarding all symbol information
- for an objfile, freeing up all memory held for it, and unlinking the
- objfile struct from the global list of known objfiles. */
-
-void
-hpread_symfile_finish (objfile)
- struct objfile *objfile;
-{
- if (objfile->sym_private != NULL)
- {
- mfree (objfile->md, objfile->sym_private);
- }
-}
-
-
-/* The remaining functions are all for internal use only. */
-
-/* Various small functions to get entries in the debug symbol sections. */
-
-union dnttentry *
-hpread_get_lntt (index, objfile)
- int index;
- struct objfile *objfile;
-{
- return (union dnttentry *)
- &(LNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
-}
-
-static union dnttentry *
-hpread_get_gntt (index, objfile)
- int index;
- struct objfile *objfile;
-{
- return (union dnttentry *)
- &(GNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
-}
-
-union sltentry *
-hpread_get_slt (index, objfile)
- int index;
- struct objfile *objfile;
-{
- return (union sltentry *) &(SLT (objfile)[index * sizeof (union sltentry)]);
-}
-
-/* Get the low address associated with some symbol (typically the start
- of a particular source file or module). Since that information is not
- stored as part of the DNTT_TYPE_MODULE or DNTT_TYPE_SRCFILE symbol we must infer it from
- the existance of DNTT_TYPE_FUNCTION symbols. */
-
-static unsigned long
-hpread_get_textlow (global, index, objfile, symcount)
- int global;
- int index;
- struct objfile *objfile;
- int symcount;
-{
- union dnttentry *dn_bufp;
- struct minimal_symbol *msymbol;
-
- /* Look for a DNTT_TYPE_FUNCTION symbol. */
- if (index < symcount) /* symcount is the number of symbols in */
- { /* the dbinfo, LNTT table */
- do
- {
- if (global)
- dn_bufp = hpread_get_gntt (index++, objfile);
- else
- dn_bufp = hpread_get_lntt (index++, objfile);
- }
- while (dn_bufp->dblock.kind != DNTT_TYPE_FUNCTION
- && dn_bufp->dblock.kind != DNTT_TYPE_DOC_FUNCTION
- && dn_bufp->dblock.kind != DNTT_TYPE_END
- && index < symcount);
- }
-
- /* Avoid going past a DNTT_TYPE_END when looking for a DNTT_TYPE_FUNCTION. This
- might happen when a sourcefile has no functions. */
- if (dn_bufp->dblock.kind == DNTT_TYPE_END)
- return 0;
-
- /* Avoid going past the end of the LNTT file */
- if (index == symcount)
- return 0;
-
- /* The minimal symbols are typically more accurate for some reason. */
- if (dn_bufp->dblock.kind == DNTT_TYPE_FUNCTION)
- msymbol = lookup_minimal_symbol (dn_bufp->dfunc.name + VT (objfile), NULL,
- objfile);
- else /* must be a DNTT_TYPE_DOC_FUNCTION */
- msymbol = lookup_minimal_symbol (dn_bufp->ddocfunc.name + VT (objfile), NULL,
- objfile);
-
- if (msymbol)
- return SYMBOL_VALUE_ADDRESS (msymbol);
- else
- return dn_bufp->dfunc.lowaddr;
-}
-
-/* Allocate and partially fill a partial symtab. It will be
- completely filled at the end of the symbol list.
-
- SYMFILE_NAME is the name of the symbol-file we are reading from, and ADDR
- is the address relative to which its symbols are (incremental) or 0
- (normal). */
-
-static struct partial_symtab *
-hpread_start_psymtab (objfile, section_offsets,
- filename, textlow, ldsymoff, global_syms, static_syms)
- struct objfile *objfile;
- struct section_offsets *section_offsets;
- char *filename;
- CORE_ADDR textlow;
- int ldsymoff;
- struct partial_symbol **global_syms;
- struct partial_symbol **static_syms;
-{
- int offset = ANOFFSET (section_offsets, SECT_OFF_TEXT);
- extern void hpread_psymtab_to_symtab ();
- struct partial_symtab *result =
- start_psymtab_common (objfile, section_offsets,
- filename, textlow, global_syms, static_syms);
-
- result->textlow += offset;
- result->read_symtab_private = (char *)
- obstack_alloc (&objfile->psymbol_obstack, sizeof (struct symloc));
- LDSYMOFF (result) = ldsymoff;
- result->read_symtab = hpread_psymtab_to_symtab;
-
- return result;
-}
-
-
-/* Close off the current usage of PST.
- Returns PST or NULL if the partial symtab was empty and thrown away.
-
- capping_symbol_offset --Byte index in LNTT or GNTT of the
- last symbol processed during the build
- of the previous pst.
-
- FIXME: List variables and peculiarities of same. */
-
-static struct partial_symtab *
-hpread_end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
- capping_text, dependency_list, number_dependencies)
- struct partial_symtab *pst;
- char **include_list;
- int num_includes;
- int capping_symbol_offset;
- CORE_ADDR capping_text;
- struct partial_symtab **dependency_list;
- int number_dependencies;
-{
- int i;
- struct objfile *objfile = pst->objfile;
- int offset = ANOFFSET (pst->section_offsets, SECT_OFF_TEXT);
-
-#ifdef DUMPING
- /* Turn on to see what kind of a psymtab we've built. */
- static int dumping = 0;
-#endif
-
- if (capping_symbol_offset != -1)
- LDSYMLEN (pst) = capping_symbol_offset - LDSYMOFF (pst);
- else
- LDSYMLEN (pst) = 0;
- pst->texthigh = capping_text + offset;
-
- pst->n_global_syms =
- objfile->global_psymbols.next - (objfile->global_psymbols.list + pst->globals_offset);
- pst->n_static_syms =
- objfile->static_psymbols.next - (objfile->static_psymbols.list + pst->statics_offset);
-
-#ifdef DUMPING
- if (dumping)
- {
- printf ("\nPst %s, LDSYMOFF %x (%x), LDSYMLEN %x (%x), globals %d, statics %d\n",
- pst->filename,
- LDSYMOFF (pst),
- LDSYMOFF (pst) / sizeof (struct dntt_type_block),
- LDSYMLEN (pst),
- LDSYMLEN (pst) / sizeof (struct dntt_type_block),
- pst->n_global_syms, pst->n_static_syms);
- }
-#endif
-
- pst->number_of_dependencies = number_dependencies;
- if (number_dependencies)
- {
- pst->dependencies = (struct partial_symtab **)
- obstack_alloc (&objfile->psymbol_obstack,
- number_dependencies * sizeof (struct partial_symtab *));
- memcpy (pst->dependencies, dependency_list,
- number_dependencies * sizeof (struct partial_symtab *));
- }
- else
- pst->dependencies = 0;
-
- for (i = 0; i < num_includes; i++)
- {
- struct partial_symtab *subpst =
- allocate_psymtab (include_list[i], objfile);
-
- subpst->section_offsets = pst->section_offsets;
- subpst->read_symtab_private =
- (char *) obstack_alloc (&objfile->psymbol_obstack,
- sizeof (struct symloc));
- LDSYMOFF (subpst) =
- LDSYMLEN (subpst) =
- subpst->textlow =
- subpst->texthigh = 0;
-
- /* We could save slight bits of space by only making one of these,
- shared by the entire set of include files. FIXME-someday. */
- subpst->dependencies = (struct partial_symtab **)
- obstack_alloc (&objfile->psymbol_obstack,
- sizeof (struct partial_symtab *));
- subpst->dependencies[0] = pst;
- subpst->number_of_dependencies = 1;
-
- subpst->globals_offset =
- subpst->n_global_syms =
- subpst->statics_offset =
- subpst->n_static_syms = 0;
-
- subpst->readin = 0;
- subpst->symtab = 0;
- subpst->read_symtab = pst->read_symtab;
- }
-
- sort_pst_symbols (pst);
-
- /* If there is already a psymtab or symtab for a file of this name, remove it.
- (If there is a symtab, more drastic things also happen.)
- This happens in VxWorks. */
- free_named_symtabs (pst->filename);
-
- if (num_includes == 0
- && number_dependencies == 0
- && pst->n_global_syms == 0
- && pst->n_static_syms == 0)
- {
- /* Throw away this psymtab, it's empty. We can't deallocate it, since
- it is on the obstack, but we can forget to chain it on the list.
- Empty psymtabs happen as a result of header files which don't have
- any symbols in them. There can be a lot of them. But this check
- is wrong, in that a psymtab with N_SLINE entries but nothing else
- is not empty, but we don't realize that. Fixing that without slowing
- things down might be tricky.
- It's also wrong if we're using the quick look-up tables, as
- we can get empty psymtabs from modules with no routines in
- them. */
-
- discard_psymtab (pst);
-
- /* Indicate that psymtab was thrown away. */
- pst = (struct partial_symtab *) NULL;
-
- }
- return pst;
-}
-
-
-/* End of hp-psymtab-read.c */
-
-/* Set indentation to 4 spaces for Emacs; this file is
- mostly non-GNU-ish in its style :-( */
-#if 0
-***Local Variables:
-***c - basic - offset:4
-*** End:
-#endif
-
-
diff --git a/contrib/gdb/gdb/hp-symtab-read.c b/contrib/gdb/gdb/hp-symtab-read.c
deleted file mode 100644
index 90d4a10c6bc9..000000000000
--- a/contrib/gdb/gdb/hp-symtab-read.c
+++ /dev/null
@@ -1,3988 +0,0 @@
-/* Read hp debug symbols and convert to internal format, for GDB.
- Copyright 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.
-
- Written by the Center for Software Science at the University of Utah
- and by Cygnus Support. */
-
-/* Common include for hp-symtab-read.c and hp-psymtab-read.c.
- * Note this has nested includes for a bunch of stuff.
- */
-#include "defs.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "hpread.h"
-#include "demangle.h"
-#include "complaints.h"
-
-
-
-
-static struct complaint hpread_unhandled_end_common_complaint =
-{
- "unhandled symbol in hp-symtab-read.c: DNTT_TYPE_COMMON/DNTT_TYPE_END.\n", 0, 0
-};
-
-static struct complaint hpread_unhandled_type_complaint =
-{
- "hpread_type_translate: unhandled type code.", 0, 0
-};
-
-static struct complaint hpread_struct_complaint =
-{
- "hpread_read_struct_type: expected SVAR type...", 0, 0
-};
-
-static struct complaint hpread_array_complaint =
-{
- "error in hpread_array_type.", 0, 0
-};
-
-static struct complaint hpread_type_lookup_complaint =
-{
- "error in hpread_type_lookup().", 0, 0
-};
-
-
-static struct complaint hpread_unexpected_end_complaint =
-{
- "internal error in hp-symtab-read.c: Unexpected DNTT_TYPE_END kind.", 0, 0
-};
-
-static struct complaint hpread_tagdef_complaint =
-{
- "error processing class tagdef", 0, 0
-};
-
-static struct complaint hpread_unhandled_common_complaint =
-{
- "unhandled symbol in hp-symtab-read.c: DNTT_TYPE_COMMON.", 0, 0
-};
-
-static struct complaint hpread_unhandled_blockdata_complaint =
-{
- "unhandled symbol in hp-symtab-read.c: DNTT_TYPE_BLOCKDATA.", 0, 0
-};
-
-
-/* Forward procedure declarations */
-
-static unsigned long hpread_get_scope_start
- PARAMS ((sltpointer, struct objfile *));
-
-static unsigned long hpread_get_line
- PARAMS ((sltpointer, struct objfile *));
-
-static CORE_ADDR hpread_get_location
- PARAMS ((sltpointer, struct objfile *));
-
-static void hpread_psymtab_to_symtab_1
- PARAMS ((struct partial_symtab *));
-
-void hpread_psymtab_to_symtab
- PARAMS ((struct partial_symtab *));
-
-static struct symtab *hpread_expand_symtab
- PARAMS ((struct objfile *, int, int, CORE_ADDR, int,
- struct section_offsets *, char *));
-
-static int hpread_type_translate
- PARAMS ((dnttpointer));
-
-static struct type **hpread_lookup_type
- PARAMS ((dnttpointer, struct objfile *));
-
-static struct type *hpread_alloc_type
- PARAMS ((dnttpointer, struct objfile *));
-
-static struct type *hpread_read_enum_type
- PARAMS ((dnttpointer, union dnttentry *, struct objfile *));
-
-static struct type *hpread_read_function_type
- PARAMS ((dnttpointer, union dnttentry *, struct objfile *, int));
-
-static struct type *hpread_read_doc_function_type
- PARAMS ((dnttpointer, union dnttentry *, struct objfile *, int));
-
-static struct type *hpread_read_struct_type
- PARAMS ((dnttpointer, union dnttentry *, struct objfile *));
-
-static struct type *hpread_get_nth_template_arg
- PARAMS ((struct objfile *, int));
-
-static struct type * hpread_read_templ_arg_type
- PARAMS ((dnttpointer, union dnttentry *, struct objfile *, char *));
-
-static struct type *hpread_read_set_type
- PARAMS ((dnttpointer, union dnttentry *, struct objfile *));
-
-static struct type * hpread_read_array_type
- PARAMS ((dnttpointer, union dnttentry *dn_bufp, struct objfile *objfile));
-
-static struct type *hpread_read_subrange_type
- PARAMS ((dnttpointer, union dnttentry *, struct objfile *));
-
-static struct type * hpread_type_lookup
- PARAMS ((dnttpointer, struct objfile *));
-
-static sltpointer hpread_record_lines
- PARAMS ((struct subfile *, sltpointer, sltpointer,
- struct objfile *, CORE_ADDR));
-
-static void hpread_process_one_debug_symbol
- PARAMS ((union dnttentry *, char *, struct section_offsets *,
- struct objfile *, CORE_ADDR, int, char *, int, int * ));
-
-static int hpread_get_scope_depth
- PARAMS ((union dnttentry *, struct objfile *, int));
-
-static void fix_static_member_physnames
- PARAMS ((struct type *, char *, struct objfile *));
-
-static void fixup_class_method_type
- PARAMS ((struct type *, struct type *, struct objfile *));
-
-static void hpread_adjust_bitoffsets PARAMS ((struct type *, int));
-
-static dnttpointer hpread_get_next_skip_over_anon_unions
- PARAMS ((int, dnttpointer, union dnttentry **, struct objfile *));
-
-/* Global to indicate presence of HP-compiled objects,
- in particular, SOM executable file with SOM debug info
- Defined in symtab.c, used in hppa-tdep.c. */
-extern int hp_som_som_object_present;
-
-/* Static used to indicate a class type that requires a
- fix-up of one of its method types */
-static struct type * fixup_class = NULL;
-
-/* Static used to indicate the method type that is to be
- used to fix-up the type for fixup_class */
-static struct type * fixup_method = NULL;
-
-
-
-/* Get the nesting depth for the source line identified by INDEX. */
-
-static unsigned long
-hpread_get_scope_start (index, objfile)
- sltpointer index;
- struct objfile *objfile;
-{
- union sltentry *sl_bufp;
-
- sl_bufp = hpread_get_slt (index, objfile);
- return sl_bufp->sspec.backptr.dnttp.index;
-}
-
-/* Get the source line number the the line identified by INDEX. */
-
-static unsigned long
-hpread_get_line (index, objfile)
- sltpointer index;
- struct objfile *objfile;
-{
- union sltentry *sl_bufp;
-
- sl_bufp = hpread_get_slt (index, objfile);
- return sl_bufp->snorm.line;
-}
-
-/* Find the code address associated with a given sltpointer */
-
-static CORE_ADDR
-hpread_get_location (index, objfile)
- sltpointer index;
- struct objfile *objfile;
-{
- union sltentry *sl_bufp;
- int i;
-
- /* code location of special sltentrys is determined from context */
- sl_bufp = hpread_get_slt (index, objfile);
-
- if (sl_bufp->snorm.sltdesc == SLT_END)
- {
- /* find previous normal sltentry and get address */
- for (i = 0; ((sl_bufp->snorm.sltdesc != SLT_NORMAL) &&
- (sl_bufp->snorm.sltdesc != SLT_NORMAL_OFFSET) &&
- (sl_bufp->snorm.sltdesc != SLT_EXIT)); i++)
- sl_bufp = hpread_get_slt (index - i, objfile);
- if (sl_bufp->snorm.sltdesc == SLT_NORMAL_OFFSET)
- return sl_bufp->snormoff.address;
- else
- return sl_bufp->snorm.address;
- }
-
- /* find next normal sltentry and get address */
- for (i = 0; ((sl_bufp->snorm.sltdesc != SLT_NORMAL) &&
- (sl_bufp->snorm.sltdesc != SLT_NORMAL_OFFSET) &&
- (sl_bufp->snorm.sltdesc != SLT_EXIT)); i++)
- sl_bufp = hpread_get_slt (index + i, objfile);
- if (sl_bufp->snorm.sltdesc == SLT_NORMAL_OFFSET)
- return sl_bufp->snormoff.address;
- else
- return sl_bufp->snorm.address;
-}
-
-
-/* Return 1 if an HP debug symbol of type KIND has a name associated with
- * it, else return 0. (This function is not currently used, but I'll
- * leave it here in case it proves useful later on. - RT).
- */
-
-int
-hpread_has_name (kind)
- enum dntt_entry_type kind;
-{
- switch (kind)
- {
- case DNTT_TYPE_SRCFILE:
- case DNTT_TYPE_MODULE:
- case DNTT_TYPE_FUNCTION:
- case DNTT_TYPE_DOC_FUNCTION:
- case DNTT_TYPE_ENTRY:
- case DNTT_TYPE_IMPORT:
- case DNTT_TYPE_LABEL:
- case DNTT_TYPE_FPARAM:
- case DNTT_TYPE_SVAR:
- case DNTT_TYPE_DVAR:
- case DNTT_TYPE_CONST:
- case DNTT_TYPE_TYPEDEF:
- case DNTT_TYPE_TAGDEF:
- case DNTT_TYPE_MEMENUM:
- case DNTT_TYPE_FIELD:
- case DNTT_TYPE_SA:
- case DNTT_TYPE_BLOCKDATA:
- case DNTT_TYPE_MEMFUNC:
- case DNTT_TYPE_DOC_MEMFUNC:
- return 1;
-
- case DNTT_TYPE_BEGIN:
- case DNTT_TYPE_END:
- case DNTT_TYPE_POINTER:
- case DNTT_TYPE_ENUM:
- case DNTT_TYPE_SET:
- case DNTT_TYPE_ARRAY:
- case DNTT_TYPE_STRUCT:
- case DNTT_TYPE_UNION:
- case DNTT_TYPE_VARIANT:
- case DNTT_TYPE_FILE:
- case DNTT_TYPE_FUNCTYPE:
- case DNTT_TYPE_SUBRANGE:
- case DNTT_TYPE_WITH:
- case DNTT_TYPE_COMMON:
- case DNTT_TYPE_COBSTRUCT:
- case DNTT_TYPE_XREF:
- case DNTT_TYPE_MACRO:
- case DNTT_TYPE_CLASS_SCOPE:
- case DNTT_TYPE_REFERENCE:
- case DNTT_TYPE_PTRMEM:
- case DNTT_TYPE_PTRMEMFUNC:
- case DNTT_TYPE_CLASS:
- case DNTT_TYPE_GENFIELD:
- case DNTT_TYPE_VFUNC:
- case DNTT_TYPE_MEMACCESS:
- case DNTT_TYPE_INHERITANCE:
- case DNTT_TYPE_FRIEND_CLASS:
- case DNTT_TYPE_FRIEND_FUNC:
- case DNTT_TYPE_MODIFIER:
- case DNTT_TYPE_OBJECT_ID:
- case DNTT_TYPE_TEMPLATE:
- case DNTT_TYPE_TEMPLATE_ARG:
- case DNTT_TYPE_FUNC_TEMPLATE:
- case DNTT_TYPE_LINK:
- /* DNTT_TYPE_DYN_ARRAY_DESC ? */
- /* DNTT_TYPE_DESC_SUBRANGE ? */
- /* DNTT_TYPE_BEGIN_EXT ? */
- /* DNTT_TYPE_INLN ? */
- /* DNTT_TYPE_INLN_LIST ? */
- /* DNTT_TYPE_ALIAS ? */
- default:
- return 0;
- }
-}
-
-/* Do the dirty work of reading in the full symbol from a partial symbol
- table. */
-
-static void
-hpread_psymtab_to_symtab_1 (pst)
- struct partial_symtab *pst;
-{
- struct cleanup *old_chain;
- int i;
-
- /* Get out quick if passed junk. */
- if (!pst)
- return;
-
- /* Complain if we've already read in this symbol table. */
- if (pst->readin)
- {
- fprintf (stderr, "Psymtab for %s already read in. Shouldn't happen.\n",
- pst->filename);
- return;
- }
-
- /* Read in all partial symtabs on which this one is dependent */
- for (i = 0; i < pst->number_of_dependencies; i++)
- if (!pst->dependencies[i]->readin)
- {
- /* Inform about additional files that need to be read in. */
- if (info_verbose)
- {
- fputs_filtered (" ", gdb_stdout);
- wrap_here ("");
- fputs_filtered ("and ", gdb_stdout);
- wrap_here ("");
- printf_filtered ("%s...", pst->dependencies[i]->filename);
- wrap_here (""); /* Flush output */
- gdb_flush (gdb_stdout);
- }
- hpread_psymtab_to_symtab_1 (pst->dependencies[i]);
- }
-
- /* If it's real... */
- if (LDSYMLEN (pst))
- {
- /* Init stuff necessary for reading in symbols */
- buildsym_init ();
- old_chain = make_cleanup (really_free_pendings, 0);
-
- pst->symtab =
- hpread_expand_symtab (pst->objfile, LDSYMOFF (pst), LDSYMLEN (pst),
- pst->textlow, pst->texthigh - pst->textlow,
- pst->section_offsets, pst->filename);
- sort_symtab_syms (pst->symtab);
-
- do_cleanups (old_chain);
- }
-
- pst->readin = 1;
-}
-
-/* Read in all of the symbols for a given psymtab for real.
- Be verbose about it if the user wants that. */
-
-void
-hpread_psymtab_to_symtab (pst)
- struct partial_symtab *pst;
-{
- /* Get out quick if given junk. */
- if (!pst)
- return;
-
- /* Sanity check. */
- if (pst->readin)
- {
- fprintf (stderr, "Psymtab for %s already read in. Shouldn't happen.\n",
- pst->filename);
- return;
- }
-
- /* elz: setting the flag to indicate that the code of the target
- was compiled using an HP compiler (aCC, cc)
- the processing_acc_compilation variable is declared in the
- file buildsym.h, the HP_COMPILED_TARGET is defined to be equal
- to 3 in the file tm_hppa.h*/
-
- processing_gcc_compilation = 0;
-
- if (LDSYMLEN (pst) || pst->number_of_dependencies)
- {
- /* Print the message now, before reading the string table,
- to avoid disconcerting pauses. */
- if (info_verbose)
- {
- printf_filtered ("Reading in symbols for %s...", pst->filename);
- gdb_flush (gdb_stdout);
- }
-
- hpread_psymtab_to_symtab_1 (pst);
-
- /* 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);
-
- /* Finish up the debug error message. */
- if (info_verbose)
- printf_filtered ("done.\n");
- }
-}
-
-/* Read in a defined section of a specific object file's symbols.
-
- DESC is the file descriptor for the file, positioned at the
- beginning of the symtab
- SYM_OFFSET is the offset within the file of
- the beginning of the symbols we want to read
- SYM_SIZE is the size of the symbol info to read in.
- TEXT_OFFSET is the beginning of the text segment we are reading symbols for
- TEXT_SIZE is the size of the text segment read in.
- SECTION_OFFSETS are the relocation offsets which get added to each symbol. */
-
-static struct symtab *
-hpread_expand_symtab (objfile, sym_offset, sym_size, text_offset, text_size,
- section_offsets, filename)
- struct objfile *objfile;
- int sym_offset;
- int sym_size;
- CORE_ADDR text_offset;
- int text_size;
- struct section_offsets *section_offsets;
- char *filename;
-{
- char *namestring;
- union dnttentry *dn_bufp;
- unsigned max_symnum;
- int at_module_boundary = 0;
- /* 1 => at end, -1 => at beginning */
-
- int sym_index = sym_offset / sizeof (struct dntt_type_block);
-
- current_objfile = objfile;
- subfile_stack = 0;
-
- last_source_file = 0;
-
- /* Demangling style -- if EDG style already set, don't change it,
- as HP style causes some problems with the KAI EDG compiler */
- if (current_demangling_style != edg_demangling) {
- /* Otherwise, ensure that we are using HP style demangling */
- set_demangling_style (HP_DEMANGLING_STYLE_STRING);
- }
-
- dn_bufp = hpread_get_lntt (sym_index, objfile);
- if (!((dn_bufp->dblock.kind == (unsigned char) DNTT_TYPE_SRCFILE) ||
- (dn_bufp->dblock.kind == (unsigned char) DNTT_TYPE_MODULE)))
- {
- start_symtab ("globals", NULL, 0);
- record_debugformat ("HP");
- }
-
- /* The psymtab builder (hp-psymtab-read.c) is the one that
- * determined the "sym_size" argument (i.e. how many DNTT symbols
- * are in this symtab), which we use to compute "max_symnum"
- * (point in DNTT to which we read).
- *
- * Perhaps this should be changed so that
- * process_one_debug_symbol() "knows" when
- * to stop reading (based on reading from the MODULE to the matching
- * END), and take out this reliance on a #-syms being passed in...
- * (I'm worried about the reliability of this number). But I'll
- * leave it as-is, for now. - RT
- *
- * The change above has been made. I've left the "for" loop control
- * in to prepare for backing this out again. -JB
- */
- max_symnum = sym_size / sizeof (struct dntt_type_block);
- /* No reason to multiply on pst side and divide on sym side... FIXME */
-
- /* Read in and process each debug symbol within the specified range.
- */
- for (symnum = 0;
- symnum < max_symnum;
- symnum++)
- {
- QUIT; /* Allow this to be interruptable */
- dn_bufp = hpread_get_lntt (sym_index + symnum, objfile);
-
- if (dn_bufp->dblock.extension)
- continue;
-
- /* 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,
- filename, symnum + sym_index,
- &at_module_boundary
- );
-
- /* OLD COMMENTS: This routine is only called for psts. All psts
- * correspond to MODULES. If we ever do lazy-reading of globals
- * from the LNTT, then there will be a pst which ends when the
- * LNTT ends, and not at an END MODULE entry. Then we'll have
- * to re-visit this break.
-
- if( at_end_of_module )
- break;
-
- */
-
- /* We no longer break out of the loop when we reach the end of a
- module. The reason is that with CTTI, the compiler can generate
- function symbols (for template function instantiations) which are not
- in any module; typically they show up beyond a module's end, and
- before the next module's start. We include them in the current
- module. However, we still don't trust the MAX_SYMNUM value from
- the psymtab, so we break out if we enter a new module. */
-
- if (at_module_boundary == -1)
- break;
- }
-
- current_objfile = NULL;
- hp_som_som_object_present = 1; /* Indicate we've processed an HP SOM SOM file */
-
- return end_symtab (text_offset + text_size, objfile, 0);
-}
-
-
-
-
-/* Convert basic types from HP debug format into GDB internal format. */
-
-static int
-hpread_type_translate (typep)
- dnttpointer typep;
-{
- if (!typep.dntti.immediate) {
- error ("error in hpread_type_translate\n.");
- return;
- }
-
- switch (typep.dntti.type)
- {
- case HP_TYPE_BOOLEAN:
- case HP_TYPE_BOOLEAN_S300_COMPAT:
- case HP_TYPE_BOOLEAN_VAX_COMPAT:
- return FT_BOOLEAN;
- case HP_TYPE_CHAR: /* C signed char, C++ plain char */
-
- case HP_TYPE_WIDE_CHAR:
- return FT_CHAR;
- case HP_TYPE_INT:
- if (typep.dntti.bitlength <= 8)
- return FT_SIGNED_CHAR; /* C++ signed char */
- if (typep.dntti.bitlength <= 16)
- return FT_SHORT;
- if (typep.dntti.bitlength <= 32)
- return FT_INTEGER;
- return FT_LONG_LONG;
- case HP_TYPE_LONG:
- if (typep.dntti.bitlength <= 8)
- return FT_SIGNED_CHAR; /* C++ signed char. */
- return FT_LONG;
- case HP_TYPE_UNSIGNED_LONG:
- if (typep.dntti.bitlength <= 8)
- return FT_UNSIGNED_CHAR; /* C/C++ unsigned char */
- if (typep.dntti.bitlength <= 16)
- return FT_UNSIGNED_SHORT;
- if (typep.dntti.bitlength <= 32)
- return FT_UNSIGNED_LONG;
- return FT_UNSIGNED_LONG_LONG;
- case HP_TYPE_UNSIGNED_INT:
- if (typep.dntti.bitlength <= 8)
- return FT_UNSIGNED_CHAR;
- if (typep.dntti.bitlength <= 16)
- return FT_UNSIGNED_SHORT;
- if (typep.dntti.bitlength <= 32)
- return FT_UNSIGNED_INTEGER;
- return FT_UNSIGNED_LONG_LONG;
- case HP_TYPE_REAL:
- case HP_TYPE_REAL_3000:
- case HP_TYPE_DOUBLE:
- if (typep.dntti.bitlength == 64)
- return FT_DBL_PREC_FLOAT;
- if (typep.dntti.bitlength == 128)
- return FT_EXT_PREC_FLOAT;
- return FT_FLOAT;
- case HP_TYPE_COMPLEX:
- case HP_TYPE_COMPLEXS3000:
- if (typep.dntti.bitlength == 128)
- return FT_DBL_PREC_COMPLEX;
- if (typep.dntti.bitlength == 192)
- return FT_EXT_PREC_COMPLEX;
- return FT_COMPLEX;
- case HP_TYPE_VOID:
- return FT_VOID;
- case HP_TYPE_STRING200:
- case HP_TYPE_LONGSTRING200:
- case HP_TYPE_FTN_STRING_SPEC:
- case HP_TYPE_MOD_STRING_SPEC:
- case HP_TYPE_MOD_STRING_3000:
- case HP_TYPE_FTN_STRING_S300_COMPAT:
- case HP_TYPE_FTN_STRING_VAX_COMPAT:
- return FT_STRING;
- case HP_TYPE_TEMPLATE_ARG:
- return FT_TEMPLATE_ARG;
- case HP_TYPE_TEXT:
- case HP_TYPE_FLABEL:
- case HP_TYPE_PACKED_DECIMAL:
- case HP_TYPE_ANYPOINTER:
- case HP_TYPE_GLOBAL_ANYPOINTER:
- case HP_TYPE_LOCAL_ANYPOINTER:
- default:
- warning ("hpread_type_translate: unhandled type code.\n");
- return FT_VOID;
- }
-}
-
-/* Given a position in the DNTT, return a pointer to the
- * already-built "struct type" (if any), for the type defined
- * at that position.
- */
-
-static struct type **
-hpread_lookup_type (hp_type, objfile)
- dnttpointer hp_type;
- struct objfile *objfile;
-{
- unsigned old_len;
- int index = hp_type.dnttp.index;
- int size_changed = 0;
-
- /* The immediate flag indicates this doesn't actually point to
- * a type DNTT.
- */
- if (hp_type.dntti.immediate)
- return NULL;
-
- /* For each objfile, we maintain a "type vector".
- * This an array of "struct type *"'s with one pointer per DNTT index.
- * Given a DNTT index, we look in this array to see if we have
- * already processed this DNTT and if it is a type definition.
- * If so, then we can locate a pointer to the already-built
- * "struct type", and not build it again.
- *
- * The need for this arises because our DNTT-walking code wanders
- * around. In particular, it will encounter the same type multiple
- * times (once for each object of that type). We don't want to
- * built multiple "struct type"'s for the same thing.
- *
- * Having said this, I should point out that this type-vector is
- * an expensive way to keep track of this. If most DNTT entries are
- * 3 words, the type-vector will be 1/3 the size of the DNTT itself.
- * Alternative solutions:
- * - Keep a compressed or hashed table. Less memory, but more expensive
- * to search and update.
- * - (Suggested by JB): Overwrite the DNTT entry itself
- * with the info. Create a new type code "ALREADY_BUILT", and modify
- * the DNTT to have that type code and point to the already-built entry.
- * -RT
- */
-
- if (index < LNTT_SYMCOUNT (objfile))
- {
- if (index >= TYPE_VECTOR_LENGTH (objfile))
- {
- old_len = TYPE_VECTOR_LENGTH (objfile);
-
- /* See if we need to allocate a type-vector. */
- if (old_len == 0)
- {
- TYPE_VECTOR_LENGTH(objfile) = LNTT_SYMCOUNT (objfile) + GNTT_SYMCOUNT (objfile);
- TYPE_VECTOR (objfile) = (struct type **)
- xmmalloc (objfile->md, TYPE_VECTOR_LENGTH (objfile) * sizeof (struct type *));
- memset (&TYPE_VECTOR (objfile)[old_len], 0,
- (TYPE_VECTOR_LENGTH (objfile) - old_len) *
- sizeof (struct type *));
- }
-
- /* See if we need to resize type-vector. With my change to
- * initially allocate a correct-size type-vector, this code
- * should no longer trigger.
- */
- while (index >= TYPE_VECTOR_LENGTH (objfile)) {
- TYPE_VECTOR_LENGTH (objfile) *= 2;
- size_changed = 1;
- }
- if (size_changed) {
- TYPE_VECTOR (objfile) = (struct type **)
- xmrealloc (objfile -> md,
- (char *) TYPE_VECTOR (objfile),
- (TYPE_VECTOR_LENGTH (objfile) * sizeof (struct type *)));
-
- memset (&TYPE_VECTOR (objfile)[old_len], 0,
- (TYPE_VECTOR_LENGTH (objfile) - old_len) *
- sizeof (struct type *));
- }
-
- }
- return &TYPE_VECTOR (objfile)[index];
- }
- else
- return NULL;
-}
-
-/* Possibly allocate a GDB internal type so we can internalize HP_TYPE.
- Note we'll just return the address of a GDB internal type if we already
- have it lying around. */
-
-static struct type *
-hpread_alloc_type (hp_type, objfile)
- dnttpointer hp_type;
- struct objfile *objfile;
-{
- struct type **type_addr;
-
- type_addr = hpread_lookup_type (hp_type, objfile);
- if (*type_addr == 0) {
- *type_addr = alloc_type (objfile);
-
- /* A hack - if we really are a C++ class symbol, then this default
- * will get overriden later on.
- */
- TYPE_CPLUS_SPECIFIC (*type_addr)
- = (struct cplus_struct_type *) &cplus_struct_default;
- }
-
- return *type_addr;
-}
-
-/* Read a native enumerated type and return it in GDB internal form. */
-
-static struct type *
-hpread_read_enum_type (hp_type, dn_bufp, objfile)
- dnttpointer hp_type;
- union dnttentry *dn_bufp;
- struct objfile *objfile;
-{
- struct type *type;
- struct pending **symlist, *osyms, *syms;
- struct pending *local_list = NULL;
- int o_nsyms, nsyms = 0;
- dnttpointer mem;
- union dnttentry *memp;
- char *name;
- long n;
- struct symbol *sym;
-
- /* Allocate a GDB type. If we've already read in this enum type,
- * it'll return the already built GDB type, so stop here.
- * (Note: I added this check, to conform with what's done for
- * struct, union, class.
- * I assume this is OK. - RT)
- */
- type = hpread_alloc_type (hp_type, objfile);
- if (TYPE_CODE (type) == TYPE_CODE_ENUM)
- return type;
-
- /* HP C supports "sized enums", where a specifier such as "short" or
- "char" can be used to get enums of different sizes. So don't assume
- an enum is always 4 bytes long. pai/1997-08-21 */
- TYPE_LENGTH (type) = dn_bufp->denum.bitlength / 8;
-
- symlist = &file_symbols;
- osyms = *symlist;
- o_nsyms = osyms ? osyms->nsyms : 0;
-
- /* Get a name for each member and add it to our list of members.
- * The list of "mem" SOM records we are walking should all be
- * SOM type DNTT_TYPE_MEMENUM (not checked).
- */
- mem = dn_bufp->denum.firstmem;
- while (mem.word && mem.word != DNTTNIL)
- {
- memp = hpread_get_lntt (mem.dnttp.index, objfile);
-
- name = VT (objfile) + memp->dmember.name;
- sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
- sizeof (struct symbol));
- memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
- &objfile->symbol_obstack);
- SYMBOL_CLASS (sym) = LOC_CONST;
- SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
- SYMBOL_VALUE (sym) = memp->dmember.value;
- add_symbol_to_list (sym, symlist);
- nsyms++;
- mem = memp->dmember.nextmem;
- }
-
- /* Now that we know more about the enum, fill in more info. */
- TYPE_CODE (type) = TYPE_CODE_ENUM;
- TYPE_FLAGS (type) &= ~TYPE_FLAG_STUB;
- TYPE_NFIELDS (type) = nsyms;
- TYPE_FIELDS (type) = (struct field *)
- obstack_alloc (&objfile->type_obstack, sizeof (struct field) * nsyms);
-
- /* Find the symbols for the members and put them into the type.
- The symbols can be found in the symlist that we put them on
- to cause them to be defined. osyms contains the old value
- of that symlist; everything up to there was defined by us.
-
- Note that we preserve the order of the enum constants, so
- that in something like "enum {FOO, LAST_THING=FOO}" we print
- FOO, not LAST_THING. */
- for (syms = *symlist, n = 0; syms; syms = syms->next)
- {
- int j = 0;
- if (syms == osyms)
- j = o_nsyms;
- for (; j < syms->nsyms; j++, n++)
- {
- struct symbol *xsym = syms->symbol[j];
- SYMBOL_TYPE (xsym) = type;
- TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
- TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (xsym);
- TYPE_FIELD_BITSIZE (type, n) = 0;
- }
- if (syms == osyms)
- break;
- }
-
- return type;
-}
-
-/* Read and internalize a native function debug symbol. */
-
-static struct type *
-hpread_read_function_type (hp_type, dn_bufp, objfile, newblock)
- dnttpointer hp_type;
- union dnttentry *dn_bufp;
- struct objfile *objfile;
- int newblock;
-{
- struct type *type, *type1;
- struct pending *syms;
- struct pending *local_list = NULL;
- int nsyms = 0;
- dnttpointer param;
- union dnttentry *paramp;
- char *name;
- long n;
- struct symbol *sym;
- int record_args = 1;
-
- /* See if we've already read in this type. */
- type = hpread_alloc_type (hp_type, objfile);
- if (TYPE_CODE (type) == TYPE_CODE_FUNC)
- {
- record_args = 0; /* already read in, don't modify type */
- }
- else
- {
- /* Nope, so read it in and store it away. */
- if (dn_bufp->dblock.kind == DNTT_TYPE_FUNCTION ||
- dn_bufp->dblock.kind == DNTT_TYPE_MEMFUNC)
- type1 = lookup_function_type (hpread_type_lookup (dn_bufp->dfunc.retval,
- objfile));
- else if (dn_bufp->dblock.kind == DNTT_TYPE_FUNCTYPE)
- type1 = lookup_function_type (hpread_type_lookup (dn_bufp->dfunctype.retval,
- objfile));
- else /* expect DNTT_TYPE_FUNC_TEMPLATE */
- type1 = lookup_function_type (hpread_type_lookup (dn_bufp->dfunc_template.retval,
- objfile));
- memcpy ((char *) type, (char *) type1, sizeof (struct type));
-
- /* Mark it -- in the middle of processing */
- TYPE_FLAGS (type) |= TYPE_FLAG_INCOMPLETE;
- }
-
- /* Now examine each parameter noting its type, location, and a
- wealth of other information. */
- if (dn_bufp->dblock.kind == DNTT_TYPE_FUNCTION ||
- dn_bufp->dblock.kind == DNTT_TYPE_MEMFUNC)
- param = dn_bufp->dfunc.firstparam;
- else if (dn_bufp->dblock.kind == DNTT_TYPE_FUNCTYPE)
- param = dn_bufp->dfunctype.firstparam;
- else /* expect DNTT_TYPE_FUNC_TEMPLATE */
- param = dn_bufp->dfunc_template.firstparam;
- while (param.word && param.word != DNTTNIL)
- {
- paramp = hpread_get_lntt (param.dnttp.index, objfile);
- nsyms++;
- param = paramp->dfparam.nextparam;
-
- /* Get the name. */
- name = VT (objfile) + paramp->dfparam.name;
- sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
- sizeof (struct symbol));
- (void) memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
- &objfile->symbol_obstack);
-
- /* Figure out where it lives. */
- if (paramp->dfparam.regparam)
- SYMBOL_CLASS (sym) = LOC_REGPARM;
- else if (paramp->dfparam.indirect)
- SYMBOL_CLASS (sym) = LOC_REF_ARG;
- else
- SYMBOL_CLASS (sym) = LOC_ARG;
- SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
- if (paramp->dfparam.copyparam)
- {
- SYMBOL_VALUE (sym) = paramp->dfparam.location ;
-#ifdef HPREAD_ADJUST_STACK_ADDRESS
- SYMBOL_VALUE (sym)
- += HPREAD_ADJUST_STACK_ADDRESS (CURRENT_FUNCTION_VALUE (objfile));
-#endif
- /* This is likely a pass-by-invisible reference parameter,
- Hack on the symbol class to make GDB happy. */
- /* ??rehrauer: This appears to be broken w/r/t to passing
- C values of type float and struct. Perhaps this ought
- to be highighted as a special case, but for now, just
- allowing these to be LOC_ARGs seems to work fine.
- */
-#if 0
- SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;
-#endif
- }
- else
- SYMBOL_VALUE (sym) = paramp->dfparam.location;
-
- /* Get its type. */
- SYMBOL_TYPE (sym) = hpread_type_lookup (paramp->dfparam.type, objfile);
- /* Add it to the symbol list. */
- /* Note 1 (RT) At the moment, add_symbol_to_list() is also being
- * called on FPARAM symbols from the process_one_debug_symbol()
- * level... so parameters are getting added twice! (this shows
- * up in the symbol dump you get from "maint print symbols ...").
- * Note 2 (RT) I took out the processing of FPARAM from the
- * process_one_debug_symbol() level, so at the moment parameters are only
- * being processed here. This seems to have no ill effect.
- */
- /* Note 3 (pai/1997-08-11) I removed the add_symbol_to_list() which put
- each fparam on the local_symbols list from here. Now we use the
- local_list to which fparams are added below, and set the param_symbols
- global to point to that at the end of this routine. */
- /* elz: I added this new list of symbols which is local to the function.
- this list is the one which is actually used to build the type for the
- function rather than the gloabal list pointed to by symlist.
- Using a global list to keep track of the parameters is wrong, because
- this function is called recursively if one parameter happend to be
- a function itself with more parameters in it. Adding parameters to the
- same global symbol list would not work!
- Actually it did work in case of cc compiled programs where you do
- not check the parameter lists of the arguments. */
- add_symbol_to_list (sym, &local_list);
-
- }
-
- /* If type was read in earlier, don't bother with modifying
- the type struct */
- if (!record_args)
- goto finish;
-
- /* Note how many parameters we found. */
- TYPE_NFIELDS (type) = nsyms;
- TYPE_FIELDS (type) = (struct field *)
- obstack_alloc (&objfile->type_obstack,
- sizeof (struct field) * nsyms);
-
- /* Find the symbols for the parameters and
- use them to fill parameter-type information into the function-type.
- The parameter symbols can be found in the local_list that we just put them on. */
- /* Note that we preserve the order of the parameters, so
- that in something like "enum {FOO, LAST_THING=FOO}" we print
- FOO, not LAST_THING. */
-
- /* get the parameters types from the local list not the global list
- so that the type can be correctly constructed for functions which
- have function as parameters */
- for (syms = local_list, n = 0; syms; syms = syms->next)
- {
- int j = 0;
- for (j=0; j < syms->nsyms; j++, n++)
- {
- struct symbol *xsym = syms->symbol[j];
- TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
- TYPE_FIELD_TYPE (type, n) = SYMBOL_TYPE (xsym);
- TYPE_FIELD_BITPOS (type, n) = n;
- TYPE_FIELD_BITSIZE (type, n) = 0;
- }
- }
- /* Mark it as having been processed */
- TYPE_FLAGS (type) &= ~(TYPE_FLAG_INCOMPLETE);
-
- /* Check whether we need to fix-up a class type with this function's type */
- if (fixup_class && (fixup_method == type))
- {
- fixup_class_method_type (fixup_class, fixup_method, objfile);
- fixup_class = NULL;
- fixup_method = NULL;
- }
-
- /* Set the param list of this level of the context stack
- to our local list. Do this only if this function was
- called for creating a new block, and not if it was called
- simply to get the function type. This prevents recursive
- invocations from trashing param_symbols. */
-finish:
- if (newblock)
- param_symbols = local_list;
-
- return type;
-}
-
-
-/* Read and internalize a native DOC function debug symbol. */
-/* This is almost identical to hpread_read_function_type(), except
- * for references to dn_bufp->ddocfunc instead of db_bufp->dfunc.
- * Since debug information for DOC functions is more likely to be
- * volatile, please leave it this way.
- */
-static struct type *
-hpread_read_doc_function_type (hp_type, dn_bufp, objfile, newblock)
- dnttpointer hp_type;
- union dnttentry *dn_bufp;
- struct objfile *objfile;
- int newblock;
-{
- struct type *type, *type1;
- struct pending *syms;
- struct pending *local_list = NULL;
- int nsyms = 0;
- dnttpointer param;
- union dnttentry *paramp;
- char *name;
- long n;
- struct symbol *sym;
- int record_args = 1;
-
- /* See if we've already read in this type. */
- type = hpread_alloc_type (hp_type, objfile);
- if (TYPE_CODE (type) == TYPE_CODE_FUNC)
- {
- record_args = 0; /* already read in, don't modify type */
- }
- else
- {
- /* Nope, so read it in and store it away. */
- if (dn_bufp->dblock.kind == DNTT_TYPE_DOC_FUNCTION ||
- dn_bufp->dblock.kind == DNTT_TYPE_DOC_MEMFUNC)
- type1 = lookup_function_type (hpread_type_lookup (dn_bufp->ddocfunc.retval,
- objfile));
- memcpy ((char *) type, (char *) type1, sizeof (struct type));
-
- /* Mark it -- in the middle of processing */
- TYPE_FLAGS (type) |= TYPE_FLAG_INCOMPLETE;
- }
-
- /* Now examine each parameter noting its type, location, and a
- wealth of other information. */
- if (dn_bufp->dblock.kind == DNTT_TYPE_DOC_FUNCTION ||
- dn_bufp->dblock.kind == DNTT_TYPE_DOC_MEMFUNC)
- param = dn_bufp->ddocfunc.firstparam;
- while (param.word && param.word != DNTTNIL)
- {
- paramp = hpread_get_lntt (param.dnttp.index, objfile);
- nsyms++;
- param = paramp->dfparam.nextparam;
-
- /* Get the name. */
- name = VT (objfile) + paramp->dfparam.name;
- sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
- sizeof (struct symbol));
- (void) memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = name;
-
- /* Figure out where it lives. */
- if (paramp->dfparam.regparam)
- SYMBOL_CLASS (sym) = LOC_REGPARM;
- else if (paramp->dfparam.indirect)
- SYMBOL_CLASS (sym) = LOC_REF_ARG;
- else
- SYMBOL_CLASS (sym) = LOC_ARG;
- SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
- if (paramp->dfparam.copyparam)
- {
- SYMBOL_VALUE (sym) = paramp->dfparam.location ;
-#ifdef HPREAD_ADJUST_STACK_ADDRESS
- SYMBOL_VALUE (sym)
- += HPREAD_ADJUST_STACK_ADDRESS (CURRENT_FUNCTION_VALUE (objfile));
-#endif
- /* This is likely a pass-by-invisible reference parameter,
- Hack on the symbol class to make GDB happy. */
- /* ??rehrauer: This appears to be broken w/r/t to passing
- C values of type float and struct. Perhaps this ought
- to be highighted as a special case, but for now, just
- allowing these to be LOC_ARGs seems to work fine.
- */
-#if 0
- SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;
-#endif
- }
- else
- SYMBOL_VALUE (sym) = paramp->dfparam.location;
-
- /* Get its type. */
- SYMBOL_TYPE (sym) = hpread_type_lookup (paramp->dfparam.type, objfile);
- /* Add it to the symbol list. */
- /* Note 1 (RT) At the moment, add_symbol_to_list() is also being
- * called on FPARAM symbols from the process_one_debug_symbol()
- * level... so parameters are getting added twice! (this shows
- * up in the symbol dump you get from "maint print symbols ...").
- * Note 2 (RT) I took out the processing of FPARAM from the
- * process_one_debug_symbol() level, so at the moment parameters are only
- * being processed here. This seems to have no ill effect.
- */
- /* Note 3 (pai/1997-08-11) I removed the add_symbol_to_list() which put
- each fparam on the local_symbols list from here. Now we use the
- local_list to which fparams are added below, and set the param_symbols
- global to point to that at the end of this routine. */
-
- /* elz: I added this new list of symbols which is local to the function.
- this list is the one which is actually used to build the type for the
- function rather than the gloabal list pointed to by symlist.
- Using a global list to keep track of the parameters is wrong, because
- this function is called recursively if one parameter happend to be
- a function itself with more parameters in it. Adding parameters to the
- same global symbol list would not work!
- Actually it did work in case of cc compiled programs where you do not check the
- parameter lists of the arguments. */
- add_symbol_to_list (sym, &local_list);
- }
-
- /* If type was read in earlier, don't bother with modifying
- the type struct */
- if (!record_args)
- goto finish;
-
- /* Note how many parameters we found. */
- TYPE_NFIELDS (type) = nsyms;
- TYPE_FIELDS (type) = (struct field *)
- obstack_alloc (&objfile->type_obstack,
- sizeof (struct field) * nsyms);
-
- /* Find the symbols for the parameters and
- use them to fill parameter-type information into the function-type.
- The parameter symbols can be found in the local_list that we just put them on. */
- /* Note that we preserve the order of the parameters, so
- that in something like "enum {FOO, LAST_THING=FOO}" we print
- FOO, not LAST_THING. */
-
- /* get the parameters types from the local list not the global list
- so that the type can be correctly constructed for functions which
- have function as parameters
- */
- for (syms = local_list, n = 0; syms; syms = syms->next)
- {
- int j = 0;
- for (j = 0; j < syms->nsyms; j++, n++)
- {
- struct symbol *xsym = syms->symbol[j];
- TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
- TYPE_FIELD_TYPE (type, n) = SYMBOL_TYPE (xsym);
- TYPE_FIELD_BITPOS (type, n) = n;
- TYPE_FIELD_BITSIZE (type, n) = 0;
- }
- }
-
- /* Mark it as having been processed */
- TYPE_FLAGS (type) &= ~(TYPE_FLAG_INCOMPLETE);
-
- /* Check whether we need to fix-up a class type with this function's type */
- if (fixup_class && (fixup_method == type))
- {
- fixup_class_method_type (fixup_class, fixup_method, objfile);
- fixup_class = NULL;
- fixup_method = NULL;
- }
-
- /* Set the param list of this level of the context stack
- to our local list. Do this only if this function was
- called for creating a new block, and not if it was called
- simply to get the function type. This prevents recursive
- invocations from trashing param_symbols. */
-finish:
- if (newblock)
- param_symbols = local_list;
-
- return type;
-}
-
-
-
-/* A file-level variable which keeps track of the current-template
- * being processed. Set in hpread_read_struct_type() while processing
- * a template type. Referred to in hpread_get_nth_templ_arg().
- * Yes, this is a kludge, but it arises from the kludge that already
- * exists in symtab.h, namely the fact that they encode
- * "template argument n" with fundamental type FT_TEMPLATE_ARG and
- * bitlength n. This means that deep in processing fundamental types
- * I need to ask the question "what template am I in the middle of?".
- * The alternative to stuffing a global would be to pass an argument
- * down the chain of calls just for this purpose.
- *
- * There may be problems handling nested templates... tough.
- */
-static struct type * current_template = NULL;
-
-/* Read in and internalize a structure definition.
- * This same routine is called for struct, union, and class types.
- * Also called for templates, since they build a very similar
- * type entry as for class types.
- */
-
-static struct type *
-hpread_read_struct_type (hp_type, dn_bufp, objfile)
- dnttpointer hp_type;
- union dnttentry *dn_bufp;
- struct objfile *objfile;
-{
- /* The data members get linked together into a list of struct nextfield's */
- struct nextfield
- {
- struct nextfield *next;
- struct field field;
- unsigned char attributes; /* store visibility and virtuality info */
-# define ATTR_VIRTUAL 1
-# define ATTR_PRIVATE 2
-# define ATTR_PROTECT 3
- };
-
-
- /* The methods get linked together into a list of struct next_fn_field's */
- struct next_fn_field
- {
- struct next_fn_field *next;
- struct fn_fieldlist field;
- struct fn_field fn_field;
- int num_fn_fields;
- };
-
- /* The template args get linked together into a list of struct next_template's */
- struct next_template
- {
- struct next_template *next;
- struct template_arg arg;
- };
-
- /* The template instantiations get linked together into a list of these... */
- struct next_instantiation
- {
- struct next_instantiation * next;
- struct type * t;
- };
-
- struct type *type;
- struct type *baseclass;
- struct type *memtype;
- struct nextfield *list = 0, *tmp_list = 0;
- struct next_fn_field *fn_list = 0;
- struct next_fn_field *fn_p;
- struct next_template *t_new, *t_list = 0;
- struct nextfield *new;
- struct next_fn_field *fn_new;
- struct next_instantiation *i_new, *i_list = 0;
- int n, nfields = 0, n_fn_fields = 0, n_fn_fields_total = 0;
- int n_base_classes = 0, n_templ_args = 0;
- int ninstantiations = 0;
- dnttpointer field, fn_field, parent;
- union dnttentry *fieldp, *fn_fieldp, *parentp;
- int i;
- int static_member = 0;
- int const_member = 0;
- int volatile_member = 0;
- unsigned long vtbl_offset;
- int need_bitvectors = 0;
- char * method_name = NULL;
- char * method_alias = NULL;
-
-
- /* Is it something we've already dealt with? */
- type = hpread_alloc_type (hp_type, objfile);
- if ((TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
- (TYPE_CODE (type) == TYPE_CODE_UNION) ||
- (TYPE_CODE (type) == TYPE_CODE_CLASS) ||
- (TYPE_CODE (type) == TYPE_CODE_TEMPLATE))
- return type;
-
- /* Get the basic type correct. */
- if (dn_bufp->dblock.kind == DNTT_TYPE_STRUCT)
- {
- TYPE_CODE (type) = TYPE_CODE_STRUCT;
- TYPE_LENGTH (type) = dn_bufp->dstruct.bitlength / 8;
- }
- else if (dn_bufp->dblock.kind == DNTT_TYPE_UNION)
- {
- TYPE_CODE (type) = TYPE_CODE_UNION;
- TYPE_LENGTH (type) = dn_bufp->dunion.bitlength / 8;
- }
- else if (dn_bufp->dblock.kind == DNTT_TYPE_CLASS)
- {
- TYPE_CODE (type) = TYPE_CODE_CLASS;
- TYPE_LENGTH (type) = dn_bufp->dclass.bitlength / 8;
-
- /* Overrides the TYPE_CPLUS_SPECIFIC(type) with allocated memory
- * rather than &cplus_struct_default.
- */
- allocate_cplus_struct_type(type);
-
- /* Fill in declared-type.
- * (The C++ compiler will emit TYPE_CODE_CLASS
- * for all 3 of "class", "struct"
- * "union", and we have to look at the "class_decl" field if we
- * want to know how it was really declared)
- */
- /* (0==class, 1==union, 2==struct) */
- TYPE_DECLARED_TYPE(type) = dn_bufp->dclass.class_decl;
- }
- else if (dn_bufp->dblock.kind == DNTT_TYPE_TEMPLATE)
- {
- /* Get the basic type correct. */
- TYPE_CODE (type) = TYPE_CODE_TEMPLATE;
- allocate_cplus_struct_type(type);
- TYPE_DECLARED_TYPE(type) = DECLARED_TYPE_TEMPLATE;
- }
- else
- return type;
-
-
- TYPE_FLAGS (type) &= ~TYPE_FLAG_STUB;
-
- /* For classes, read the parent list.
- * Question (RT): Do we need to do this for templates also?
- */
- if (dn_bufp->dblock.kind == DNTT_TYPE_CLASS) {
-
- /* First read the parent-list (classes from which we derive fields) */
- parent = dn_bufp->dclass.parentlist;
- while (parent.word && parent.word != DNTTNIL) {
- parentp = hpread_get_lntt (parent.dnttp.index, objfile);
-
- /* "parentp" should point to a DNTT_TYPE_INHERITANCE record */
-
- /* Get space to record the next field/data-member. */
- new = (struct nextfield *) alloca (sizeof (struct nextfield));
- new->next = list;
- list = new;
-
- FIELD_BITSIZE (list->field) = 0;
-
- /* The "classname" field is actually a DNTT pointer to the base class */
- baseclass = hpread_type_lookup (parentp->dinheritance.classname,
- objfile);
- FIELD_TYPE (list->field) = baseclass;
-
- list->field.name = type_name_no_tag(FIELD_TYPE (list->field));
-
- list->attributes = 0;
-
- /* Check for virtuality of base, and set the
- * offset of the base subobject within the object.
- * (Offset set to -1 for virtual bases (for now).)
- */
- if (parentp->dinheritance.Virtual)
- {
- B_SET(&(list->attributes), ATTR_VIRTUAL);
- parentp->dinheritance.offset = -1;
- }
- else
- FIELD_BITPOS (list->field) = parentp->dinheritance.offset;
-
- /* Check visibility */
- switch (parentp->dinheritance.visibility)
- {
- case 1:
- B_SET(&(list->attributes), ATTR_PROTECT);
- break;
- case 2:
- B_SET(&(list->attributes), ATTR_PRIVATE);
- break;
- }
-
- n_base_classes++;
- nfields++;
-
- parent = parentp->dinheritance.next;
- }
- }
-
- /* For templates, read the template argument list.
- * This must be done before processing the member list, because
- * the member list may refer back to this. E.g.:
- * template <class T1, class T2> class q2 {
- * public:
- * T1 a;
- * T2 b;
- * };
- * We need to read the argument list "T1", "T2" first.
- */
- if (dn_bufp->dblock.kind == DNTT_TYPE_TEMPLATE) {
- /* Kludge alert: This stuffs a global "current_template" which
- * is referred to by hpread_get_nth_templ_arg(). The global
- * is cleared at the end of this routine.
- */
- current_template = type;
-
- /* Read in the argument list */
- field = dn_bufp->dtemplate.arglist;
- while (field.word && field.word != DNTTNIL) {
- /* Get this template argument*/
- fieldp = hpread_get_lntt (field.dnttp.index, objfile);
- if (fieldp->dblock.kind != DNTT_TYPE_TEMPLATE_ARG)
- {
- warning ("Invalid debug info: Template argument entry is of wrong kind");
- break;
- }
- /* Bump the count */
- n_templ_args++;
- /* Allocate and fill in a struct next_template */
- t_new = (struct next_template *) alloca (sizeof (struct next_template));
- t_new->next = t_list;
- t_list = t_new;
- t_list->arg.name = VT (objfile) + fieldp->dtempl_arg.name;
- t_list->arg.type = hpread_read_templ_arg_type(field, fieldp,
- objfile, t_list->arg.name);
- /* Walk to the next template argument */
- field = fieldp->dtempl_arg.nextarg;
- }
- }
-
- TYPE_NTEMPLATE_ARGS(type) = n_templ_args;
-
- if (n_templ_args > 0)
- TYPE_TEMPLATE_ARGS(type) = (struct template_arg *)
- obstack_alloc (&objfile->type_obstack, sizeof (struct template_arg) * n_templ_args);
- for (n = n_templ_args; t_list; t_list = t_list->next)
- {
- n -= 1;
- TYPE_TEMPLATE_ARG(type, n) = t_list->arg;
- }
-
- /* Next read in and internalize all the fields/members. */
- if (dn_bufp->dblock.kind == DNTT_TYPE_STRUCT)
- field = dn_bufp->dstruct.firstfield;
- else if (dn_bufp->dblock.kind == DNTT_TYPE_UNION)
- field = dn_bufp->dunion.firstfield;
- else if (dn_bufp->dblock.kind == DNTT_TYPE_CLASS)
- field = dn_bufp->dclass.memberlist;
- else if (dn_bufp->dblock.kind == DNTT_TYPE_TEMPLATE)
- field = dn_bufp->dtemplate.memberlist;
- else
- field.word = DNTTNIL;
-
- while (field.word && field.word != DNTTNIL)
- {
- fieldp = hpread_get_lntt (field.dnttp.index, objfile);
-
- /* At this point "fieldp" may point to either a DNTT_TYPE_FIELD
- * or a DNTT_TYPE_GENFIELD record.
- */
- vtbl_offset = 0;
- static_member = 0;
- const_member = 0;
- volatile_member = 0;
-
- if (fieldp->dblock.kind == DNTT_TYPE_GENFIELD) {
-
- /* The type will be GENFIELD if the field is a method or
- * a static member (or some other cases -- see below)
- */
-
- /* Follow a link to get to the record for the field. */
- fn_field = fieldp->dgenfield.field;
- fn_fieldp = hpread_get_lntt(fn_field.dnttp.index, objfile);
-
- /* Virtual funcs are indicated by a VFUNC which points to the
- * real entry
- */
- if (fn_fieldp->dblock.kind == DNTT_TYPE_VFUNC) {
- vtbl_offset = fn_fieldp->dvfunc.vtbl_offset;
- fn_field = fn_fieldp->dvfunc.funcptr;
- fn_fieldp = hpread_get_lntt(fn_field.dnttp.index, objfile);
- }
-
- /* A function's entry may be preceded by a modifier which
- * labels it static/constant/volatile.
- */
- if (fn_fieldp->dblock.kind == DNTT_TYPE_MODIFIER) {
- static_member = fn_fieldp->dmodifier.m_static;
- const_member = fn_fieldp->dmodifier.m_const;
- volatile_member = fn_fieldp->dmodifier.m_volatile;
- fn_field = fn_fieldp->dmodifier.type;
- fn_fieldp = hpread_get_lntt(fn_field.dnttp.index, objfile);
- }
-
- /* Check whether we have a method */
- if ((fn_fieldp->dblock.kind == DNTT_TYPE_MEMFUNC) ||
- (fn_fieldp->dblock.kind == DNTT_TYPE_FUNCTION) ||
- (fn_fieldp->dblock.kind == DNTT_TYPE_DOC_MEMFUNC) ||
- (fn_fieldp->dblock.kind == DNTT_TYPE_DOC_FUNCTION)) {
- /* Method found */
-
- short ix = 0;
-
- /* Look up function type of method */
- memtype = hpread_type_lookup (fn_field, objfile);
-
- /* Methods can be seen before classes in the SOM records.
- If we are processing this class because it's a parameter of a
- method, at this point the method's type is actually incomplete;
- we'll have to fix it up later; mark the class for this. */
-
- if (TYPE_INCOMPLETE (memtype))
- {
- TYPE_FLAGS (type) |= TYPE_FLAG_INCOMPLETE;
- if (fixup_class)
- warning ("Two classes to fix up for method?? Type information may be incorrect for some classes.");
- if (fixup_method)
- warning ("Two methods to be fixed up at once?? Type information may be incorrect for some classes.");
- fixup_class = type; /* remember this class has to be fixed up */
- fixup_method = memtype; /* remember the method type to be used in fixup */
- }
-
- /* HP aCC generates operator names without the "operator" keyword, and
- generates null strings as names for operators that are
- user-defined type conversions to basic types (e.g. operator int ()).
- So try to reconstruct name as best as possible. */
-
- method_name = (char *) (VT (objfile) + fn_fieldp->dfunc.name);
- method_alias = (char *) (VT (objfile) + fn_fieldp->dfunc.alias);
-
- if (!method_name || /* no name */
- !*method_name || /* or null name */
- cplus_mangle_opname (method_name, DMGL_ANSI)) /* or name is an operator like "<" */
- {
- char * tmp_name = cplus_demangle (method_alias, DMGL_ANSI);
- char * op_string = strstr (tmp_name, "operator");
- method_name = xmalloc (strlen (op_string) + 1); /* don't overwrite VT! */
- strcpy (method_name, op_string);
- }
-
- /* First check if a method of the same name has already been seen. */
- fn_p = fn_list;
- while (fn_p)
- {
- if (STREQ (fn_p->field.name, method_name))
- break;
- fn_p = fn_p->next;
- }
-
- /* If no such method was found, allocate a new entry in the list */
- if (!fn_p)
- {
- /* Get space to record this member function */
- /* Note: alloca used; this will disappear on routine exit */
- fn_new = (struct next_fn_field *) alloca (sizeof (struct next_fn_field));
- fn_new->next = fn_list;
- fn_list = fn_new;
-
- /* Fill in the fields of the struct nextfield */
-
- /* Record the (unmangled) method name */
- fn_list->field.name = method_name;
- /* Initial space for overloaded methods */
- /* Note: xmalloc is used; this will persist after this routine exits */
- fn_list->field.fn_fields = (struct fn_field *) xmalloc (5 * (sizeof (struct fn_field)));
- fn_list->field.length = 1; /* Init # of overloaded instances */
- fn_list->num_fn_fields = 5; /* # of entries for which space allocated */
- fn_p = fn_list;
- ix = 0; /* array index for fn_field */
- /* Bump the total count of the distinctly named methods */
- n_fn_fields++;
- }
- else /* Another overloaded instance of an already seen method name */
- {
- if (++(fn_p->field.length) > fn_p->num_fn_fields)
- {
- /* Increase space allocated for overloaded instances */
- fn_p->field.fn_fields
- = (struct fn_field *) xrealloc (fn_p->field.fn_fields,
- (fn_p->num_fn_fields + 5) * sizeof (struct fn_field));
- fn_p->num_fn_fields += 5;
- }
- ix = fn_p->field.length -1; /* array index for fn_field */
- }
-
- /* "physname" is intended to be the name of this overloaded instance. */
- if ((fn_fieldp->dfunc.language == HP_LANGUAGE_CPLUSPLUS) &&
- method_alias &&
- *method_alias) /* not a null string */
- fn_p->field.fn_fields[ix].physname = method_alias;
- else
- fn_p->field.fn_fields[ix].physname = method_name;
- /* What's expected here is the function type */
- /* But mark it as NULL if the method was incompletely processed
- We'll fix this up later when the method is fully processed */
- if (TYPE_INCOMPLETE (memtype))
- {
- fn_p->field.fn_fields[ix].type = NULL;
- fn_p->field.fn_fields[ix].args = NULL;
- }
- else
- {
- fn_p->field.fn_fields[ix].type = memtype;
-
- /* The argument list */
- fn_p->field.fn_fields[ix].type->type_specific.arg_types =
- (struct type **) obstack_alloc(&objfile->type_obstack,
- sizeof(struct type *) * (memtype->nfields + 1));
- for (i = 0; i < memtype->nfields; i++)
- fn_p->field.fn_fields[ix].type->type_specific.arg_types[i] = memtype->fields[i].type;
- /* void termination */
- fn_p->field.fn_fields[ix].type->type_specific.arg_types[memtype->nfields] = builtin_type_void;
-
- /* pai: It's not clear why this args field has to be set. Perhaps
- * it should be eliminated entirely. */
- fn_p->field.fn_fields[ix].args =
- (struct type **) obstack_alloc(&objfile->type_obstack,
- sizeof(struct type *) * (memtype->nfields + 1));
- for (i = 0; i < memtype->nfields; i++)
- fn_p->field.fn_fields[ix].args[i] = memtype->fields[i].type;
- /* null-terminated, unlike arg_types above e*/
- fn_p->field.fn_fields[ix].args[memtype->nfields] = NULL;
- }
- /* For virtual functions, fill in the voffset field with the
- * virtual table offset. (This is just copied over from the
- * SOM record; not sure if it is what GDB expects here...).
- * But if the function is a static method, set it to 1.
- *
- * Note that we have to add 1 because 1 indicates a static
- * method, and 0 indicates a non-static, non-virtual method */
-
- if (static_member)
- fn_p->field.fn_fields[ix].voffset = VOFFSET_STATIC;
- else
- fn_p->field.fn_fields[ix].voffset = vtbl_offset ? vtbl_offset + 1 : 0;
-
- /* Also fill in the fcontext field with the current
- * class. (The latter isn't quite right: should be the baseclass
- * that defines the virtual function... Note we do have
- * a variable "baseclass" that we could stuff into the fcontext
- * field, but "baseclass" isn't necessarily right either,
- * since the virtual function could have been defined more
- * than one level up).
- */
-
- if (vtbl_offset != 0)
- fn_p->field.fn_fields[ix].fcontext = type;
- else
- fn_p->field.fn_fields[ix].fcontext = NULL;
-
- /* Other random fields pertaining to this method */
- fn_p->field.fn_fields[ix].is_const = const_member;
- fn_p->field.fn_fields[ix].is_volatile = volatile_member; /* ?? */
- switch (fieldp->dgenfield.visibility) {
- case 1:
- fn_p->field.fn_fields[ix].is_protected = 1;
- fn_p->field.fn_fields[ix].is_private = 0;
- break;
- case 2:
- fn_p->field.fn_fields[ix].is_protected = 0;
- fn_p->field.fn_fields[ix].is_private = 1;
- break;
- default: /* public */
- fn_p->field.fn_fields[ix].is_protected = 0;
- fn_p->field.fn_fields[ix].is_private = 0;
- }
- fn_p->field.fn_fields[ix].is_stub = 0;
-
- /* HP aCC emits both MEMFUNC and FUNCTION entries for a method;
- if the class points to the FUNCTION, there is usually separate
- code for the method; but if we have a MEMFUNC, the method has
- been inlined (and there is usually no FUNCTION entry)
- FIXME Not sure if this test is accurate. pai/1997-08-22 */
- if ((fn_fieldp->dblock.kind == DNTT_TYPE_MEMFUNC) ||
- (fn_fieldp->dblock.kind == DNTT_TYPE_DOC_MEMFUNC))
- fn_p->field.fn_fields[ix].is_inlined = 1;
- else
- fn_p->field.fn_fields[ix].is_inlined = 0;
-
- fn_p->field.fn_fields[ix].dummy = 0;
-
- /* Bump the total count of the member functions */
- n_fn_fields_total++;
-
- } else if (fn_fieldp->dblock.kind == DNTT_TYPE_SVAR) {
- /* This case is for static data members of classes */
-
- /* pai:: FIXME -- check that "staticmem" bit is set */
-
- /* Get space to record this static member */
- new = (struct nextfield *) alloca (sizeof (struct nextfield));
- new->next = list;
- list = new;
-
- list->field.name = VT (objfile) + fn_fieldp->dsvar.name;
- FIELD_BITSIZE (list->field) = -1; /* indicates static member */
- SET_FIELD_PHYSNAME (list->field, 0); /* initialize to empty */
- memtype = hpread_type_lookup (fn_fieldp->dsvar.type, objfile);
-
- FIELD_TYPE (list->field) = memtype;
- list->attributes = 0;
- switch (fieldp->dgenfield.visibility) {
- case 1:
- B_SET(&(list->attributes), ATTR_PROTECT);
- break;
- case 2:
- B_SET(&(list->attributes), ATTR_PRIVATE);
- break;
- }
- nfields++;
- }
-
- else if (fn_fieldp->dblock.kind == DNTT_TYPE_FIELD)
- {
- /* FIELDs follow GENFIELDs for fields of anonymous unions.
- Code below is replicated from the case for FIELDs further
- below, except that fieldp is replaced by fn_fieldp */
- if (!fn_fieldp->dfield.a_union)
- warning ("Debug info inconsistent: FIELD of anonymous union doesn't have a_union bit set");
- /* Get space to record the next field/data-member. */
- new = (struct nextfield *) alloca (sizeof (struct nextfield));
- new->next = list;
- list = new;
-
- list->field.name = VT (objfile) + fn_fieldp->dfield.name;
- FIELD_BITPOS (list->field) = fn_fieldp->dfield.bitoffset;
- if (fn_fieldp->dfield.bitlength % 8)
- list->field.bitsize = fn_fieldp->dfield.bitlength;
- else
- list->field.bitsize = 0;
-
- memtype = hpread_type_lookup (fn_fieldp->dfield.type, objfile);
- list->field.type = memtype;
- list->attributes = 0;
- switch (fn_fieldp->dfield.visibility) {
- case 1:
- B_SET(&(list->attributes), ATTR_PROTECT);
- break;
- case 2:
- B_SET(&(list->attributes), ATTR_PRIVATE);
- break;
- }
- nfields++;
- }
- else if (fn_fieldp->dblock.kind == DNTT_TYPE_SVAR)
- {
- /* Field of anonymous union; union is not inside a class */
- if (!fn_fieldp->dsvar.a_union)
- warning ("Debug info inconsistent: SVAR field in anonymous union doesn't have a_union bit set");
- /* Get space to record the next field/data-member. */
- new = (struct nextfield *) alloca (sizeof (struct nextfield));
- new->next = list;
- list = new;
-
- list->field.name = VT (objfile) + fn_fieldp->dsvar.name;
- FIELD_BITPOS (list->field) = 0; /* FIXME is this always true? */
- FIELD_BITSIZE (list->field) = 0; /* use length from type */
- memtype = hpread_type_lookup (fn_fieldp->dsvar.type, objfile);
- list->field.type = memtype;
- list->attributes = 0;
- /* No info to set visibility -- always public */
- nfields++;
- }
- else if (fn_fieldp->dblock.kind == DNTT_TYPE_DVAR)
- {
- /* Field of anonymous union; union is not inside a class */
- if (!fn_fieldp->ddvar.a_union)
- warning ("Debug info inconsistent: DVAR field in anonymous union doesn't have a_union bit set");
- /* Get space to record the next field/data-member. */
- new = (struct nextfield *) alloca (sizeof (struct nextfield));
- new->next = list;
- list = new;
-
- list->field.name = VT (objfile) + fn_fieldp->ddvar.name;
- FIELD_BITPOS (list->field) = 0; /* FIXME is this always true? */
- FIELD_BITSIZE (list->field) = 0; /* use length from type */
- memtype = hpread_type_lookup (fn_fieldp->ddvar.type, objfile);
- list->field.type = memtype;
- list->attributes = 0;
- /* No info to set visibility -- always public */
- nfields++;
- }
- else { /* Not a method, nor a static data member, nor an anon union field */
-
- /* This case is for miscellaneous type entries (local enums,
- local function templates, etc.) that can be present
- inside a class. */
-
- /* Enums -- will be handled by other code that takes care
- of DNTT_TYPE_ENUM; here we see only DNTT_TYPE_MEMENUM so
- it's not clear we could have handled them here at all. */
- /* FUNC_TEMPLATE: is handled by other code (??). */
- /* MEMACCESS: modified access for inherited member. Not
- sure what to do with this, ignoriing it at present. */
-
- /* What other entries can appear following a GENFIELD which
- we do not handle above? (MODIFIER, VFUNC handled above.) */
-
- if ((fn_fieldp->dblock.kind != DNTT_TYPE_MEMACCESS) &&
- (fn_fieldp->dblock.kind != DNTT_TYPE_MEMENUM) &&
- (fn_fieldp->dblock.kind != DNTT_TYPE_FUNC_TEMPLATE))
- warning ("Internal error: Unexpected debug record kind %d found following DNTT_GENFIELD",
- fn_fieldp->dblock.kind);
- }
- /* walk to the next FIELD or GENFIELD */
- field = fieldp->dgenfield.nextfield;
-
- }
- else if (fieldp->dblock.kind == DNTT_TYPE_FIELD) {
-
- /* Ordinary structure/union/class field */
- struct type * anon_union_type;
-
- /* Get space to record the next field/data-member. */
- new = (struct nextfield *) alloca (sizeof (struct nextfield));
- new->next = list;
- list = new;
-
- list->field.name = VT (objfile) + fieldp->dfield.name;
-
-
- /* A FIELD by itself (without a GENFIELD) can also be a static member */
- if (fieldp->dfield.staticmem)
- {
- FIELD_BITPOS (list->field) = -1;
- FIELD_BITSIZE (list->field) = 0;
- }
- else /* Non-static data member */
- {
- FIELD_BITPOS (list->field) = fieldp->dfield.bitoffset;
- if (fieldp->dfield.bitlength % 8)
- FIELD_BITSIZE (list->field) = fieldp->dfield.bitlength;
- else
- FIELD_BITSIZE (list->field) = 0;
- }
-
- memtype = hpread_type_lookup (fieldp->dfield.type, objfile);
- FIELD_TYPE (list->field) = memtype;
- list->attributes = 0;
- switch (fieldp->dfield.visibility) {
- case 1:
- B_SET(&(list->attributes), ATTR_PROTECT);
- break;
- case 2:
- B_SET(&(list->attributes), ATTR_PRIVATE);
- break;
- }
- nfields++;
-
-
- /* Note 1: First, we have to check if the current field is an anonymous
- union. If it is, then *its* fields are threaded along in the
- nextfield chain. :-( This was supposed to help debuggers, but is
- really just a nuisance since we deal with anonymous unions anyway by
- checking that the name is null. So anyway, we skip over the fields
- of the anonymous union. pai/1997-08-22 */
- /* Note 2: In addition, the bitoffsets for the fields of the anon union
- are relative to the enclosing struct, *NOT* relative to the anon
- union! This is an even bigger nuisance -- we have to go in and munge
- the anon union's type information appropriately. pai/1997-08-22 */
-
- /* Both tasks noted above are done by a separate function. This takes us
- to the next FIELD or GENFIELD, skipping anon unions, and recursively
- processing intermediate types. */
- field = hpread_get_next_skip_over_anon_unions (1, field, &fieldp, objfile);
-
- } else {
- /* neither field nor genfield ?? is this possible?? */
- /* pai:: FIXME walk to the next -- how? */
- warning ("Internal error: unexpected DNTT kind %d encountered as field of struct");
- warning ("Skipping remaining fields of struct");
- break; /* get out of loop of fields */
- }
- }
-
- /* If it's a template, read in the instantiation list */
- if (dn_bufp->dblock.kind == DNTT_TYPE_TEMPLATE) {
- ninstantiations = 0;
- field = dn_bufp->dtemplate.expansions;
- while (field.word && field.word != DNTTNIL) {
- fieldp = hpread_get_lntt (field.dnttp.index, objfile);
-
- /* The expansions or nextexp should point to a tagdef */
- if (fieldp->dblock.kind != DNTT_TYPE_TAGDEF)
- break;
-
- i_new = (struct next_instantiation *) alloca (sizeof (struct next_instantiation));
- i_new->next = i_list;
- i_list = i_new;
- i_list->t = hpread_type_lookup (field, objfile);
- ninstantiations++;
-
- /* And the "type" field of that should point to a class */
- field = fieldp->dtag.type;
- fieldp = hpread_get_lntt (field.dnttp.index, objfile);
- if (fieldp->dblock.kind != DNTT_TYPE_CLASS)
- break;
-
- /* Get the next expansion */
- field = fieldp->dclass.nextexp;
- }
- }
- TYPE_NINSTANTIATIONS(type) = ninstantiations;
- if (ninstantiations > 0)
- TYPE_INSTANTIATIONS(type) = (struct type **)
- obstack_alloc (&objfile->type_obstack, sizeof (struct type *) * ninstantiations);
- for (n = ninstantiations; i_list; i_list = i_list->next)
- {
- n -= 1;
- TYPE_INSTANTIATION(type, n) = i_list->t;
- }
-
-
- /* Copy the field-list to GDB's symbol table */
- TYPE_NFIELDS (type) = nfields;
- TYPE_N_BASECLASSES (type) = n_base_classes;
- TYPE_FIELDS (type) = (struct field *)
- obstack_alloc (&objfile->type_obstack, sizeof (struct field) * nfields);
- /* Copy the saved-up fields into the field vector. */
- for (n = nfields, tmp_list = list; tmp_list; tmp_list = tmp_list->next)
- {
- n -= 1;
- TYPE_FIELD (type, n) = tmp_list->field;
- }
-
- /* Copy the "function-field-list" (i.e., the list of member
- * functions in the class) to GDB's symbol table
- */
- TYPE_NFN_FIELDS (type) = n_fn_fields;
- TYPE_NFN_FIELDS_TOTAL (type) = n_fn_fields_total;
- TYPE_FN_FIELDLISTS(type) = (struct fn_fieldlist *)
- obstack_alloc (&objfile->type_obstack, sizeof (struct fn_fieldlist) * n_fn_fields);
- for (n = n_fn_fields; fn_list; fn_list = fn_list->next)
- {
- n -= 1;
- TYPE_FN_FIELDLIST(type, n) = fn_list->field;
- }
-
- /* pai:: FIXME -- perhaps each bitvector should be created individually */
- for (n = nfields, tmp_list = list; tmp_list; tmp_list = tmp_list->next)
- {
- n -= 1;
- if (tmp_list->attributes)
- {
- need_bitvectors = 1;
- break;
- }
- }
-
- if (need_bitvectors)
- {
- /* pai:: this step probably redundant */
- ALLOCATE_CPLUS_STRUCT_TYPE (type);
-
- TYPE_FIELD_VIRTUAL_BITS (type) =
- (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields));
- B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), nfields);
-
- TYPE_FIELD_PRIVATE_BITS (type) =
- (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields));
- B_CLRALL (TYPE_FIELD_PRIVATE_BITS (type), nfields);
-
- TYPE_FIELD_PROTECTED_BITS (type) =
- (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields));
- B_CLRALL (TYPE_FIELD_PROTECTED_BITS (type), nfields);
-
- /* this field vector isn't actually used with HP aCC */
- TYPE_FIELD_IGNORE_BITS (type) =
- (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields));
- B_CLRALL (TYPE_FIELD_IGNORE_BITS (type), nfields);
-
- while (nfields-- > 0)
- {
- if (B_TST(&(list->attributes),ATTR_VIRTUAL))
- SET_TYPE_FIELD_VIRTUAL (type, nfields);
- if (B_TST(&(list->attributes),ATTR_PRIVATE))
- SET_TYPE_FIELD_PRIVATE (type, nfields);
- if (B_TST(&(list->attributes),ATTR_PROTECT))
- SET_TYPE_FIELD_PROTECTED (type, nfields);
-
- list = list->next;
- }
- }
- else
- {
- TYPE_FIELD_VIRTUAL_BITS(type) = NULL;
- TYPE_FIELD_PROTECTED_BITS(type) = NULL;
- TYPE_FIELD_PRIVATE_BITS(type) = NULL;
- }
-
- if (has_vtable(type))
- {
- /* Allocate space for class runtime information */
- TYPE_RUNTIME_PTR(type) = (struct runtime_info *) xmalloc (sizeof(struct runtime_info));
- /* Set flag for vtable */
- TYPE_VTABLE(type) = 1;
- /* The first non-virtual base class with a vtable. */
- TYPE_PRIMARY_BASE(type) = primary_base_class(type);
- /* The virtual base list. */
- TYPE_VIRTUAL_BASE_LIST(type) = virtual_base_list(type);
- }
- else
- TYPE_RUNTIME_PTR(type) = NULL;
-
- /* If this is a local type (C++ - declared inside a function), record file name & line # */
- if (hpread_get_scope_depth (dn_bufp, objfile, 1 /* no need for real depth */))
- {
- TYPE_LOCALTYPE_PTR (type) = (struct local_type_info *) xmalloc (sizeof (struct local_type_info));
- TYPE_LOCALTYPE_FILE (type) = (char *) xmalloc (strlen (current_subfile->name) + 1);
- strcpy (TYPE_LOCALTYPE_FILE (type), current_subfile->name);
- if (current_subfile->line_vector && (current_subfile->line_vector->nitems > 0))
- TYPE_LOCALTYPE_LINE (type) = current_subfile->line_vector->item[current_subfile->line_vector->nitems - 1].line;
- else
- TYPE_LOCALTYPE_LINE (type) = 0;
- }
- else
- TYPE_LOCALTYPE_PTR (type) = NULL;
-
- /* Clear the global saying what template we are in the middle of processing */
- current_template = NULL;
-
- return type;
-}
-
-/* Adjust the physnames for each static member of a struct
- or class type to be something like "A::x"; then various
- other pieces of code that do a lookup_symbol on the phyname
- work correctly.
- TYPE is a pointer to the struct/class type
- NAME is a char * (string) which is the class/struct name
- Void return */
-
-static void
-fix_static_member_physnames (type, class_name, objfile)
- struct type * type;
- char * class_name;
- struct objfile * objfile;
-{
- int i;
-
- /* We fix the member names only for classes or structs */
- if (TYPE_CODE (type) != TYPE_CODE_STRUCT)
- return;
-
- for (i=0; i < TYPE_NFIELDS (type); i++)
- if (TYPE_FIELD_STATIC (type, i))
- {
- if (TYPE_FIELD_STATIC_PHYSNAME (type, i))
- return; /* physnames are already set */
-
- SET_FIELD_PHYSNAME (type->fields[i],
- obstack_alloc (&objfile->type_obstack,
- strlen (class_name) + strlen (TYPE_FIELD_NAME (type, i)) + 3));
- strcpy (TYPE_FIELD_STATIC_PHYSNAME (type, i), class_name);
- strcat (TYPE_FIELD_STATIC_PHYSNAME (type, i), "::");
- strcat (TYPE_FIELD_STATIC_PHYSNAME (type, i), TYPE_FIELD_NAME (type, i));
- }
-}
-
-/* Fix-up the type structure for a CLASS so that the type entry
- * for a method (previously marked with a null type in hpread_read_struct_type()
- * is set correctly to METHOD.
- * OBJFILE is as for other such functions.
- * Void return. */
-
-static void
-fixup_class_method_type (class, method, objfile)
- struct type * class;
- struct type * method;
- struct objfile * objfile;
-{
- int i, j, k;
-
- if (!class || !method || !objfile)
- return;
-
- /* Only for types that have methods */
- if ((TYPE_CODE (class) != TYPE_CODE_CLASS) &&
- (TYPE_CODE (class) != TYPE_CODE_UNION))
- return;
-
- /* Loop over all methods and find the one marked with a NULL type */
- for (i = 0; i < TYPE_NFN_FIELDS (class); i++)
- for (j = 0; j < TYPE_FN_FIELDLIST_LENGTH (class, i); j++)
- if (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j) == NULL)
- {
- /* Set the method type */
- TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j) = method;
- /* The argument list */
- (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j))->type_specific.arg_types
- = (struct type **) obstack_alloc(&objfile->type_obstack,
- sizeof(struct type *) * (method->nfields + 1));
- for (k = 0; k < method->nfields; k++)
- (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j))->type_specific.arg_types[k] = method->fields[k].type;
- /* void termination */
- (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j))->type_specific.arg_types[method->nfields] = builtin_type_void;
-
- /* pai: It's not clear why this args field has to be set. Perhaps
- * it should be eliminated entirely. */
- (TYPE_FN_FIELD (TYPE_FN_FIELDLIST1 (class, i), j)).args
- = (struct type **) obstack_alloc(&objfile->type_obstack,
- sizeof(struct type *) * (method->nfields + 1));
- for (k = 0; k < method->nfields; k++)
- (TYPE_FN_FIELD (TYPE_FN_FIELDLIST1 (class, i), j)).args[k] = method->fields[k].type;
- /* null-terminated, unlike arg_types above */
- (TYPE_FN_FIELD (TYPE_FN_FIELDLIST1 (class, i), j)).args[method->nfields] = NULL;
-
- /* Break out of both loops -- only one method to fix up in a class */
- goto finish;
- }
-
-finish:
- TYPE_FLAGS (class) &= ~TYPE_FLAG_INCOMPLETE;
-}
-
-
-/* If we're in the middle of processing a template, get a pointer
- * to the Nth template argument.
- * An example may make this clearer:
- * template <class T1, class T2> class q2 {
- * public:
- * T1 a;
- * T2 b;
- * };
- * The type for "a" will be "first template arg" and
- * the type for "b" will be "second template arg".
- * We need to look these up in order to fill in "a" and "b"'s type.
- * This is called from hpread_type_lookup().
- */
-static struct type *
-hpread_get_nth_template_arg(objfile, n)
- struct objfile *objfile;
- int n;
-{
- if (current_template != NULL)
- return TYPE_TEMPLATE_ARG(current_template, n).type;
- else
- return lookup_fundamental_type (objfile, FT_TEMPLATE_ARG);
-}
-
-/* Read in and internalize a TEMPL_ARG (template arg) symbol. */
-
-static struct type *
-hpread_read_templ_arg_type (hp_type, dn_bufp, objfile, name)
- dnttpointer hp_type;
- union dnttentry *dn_bufp;
- struct objfile *objfile;
- char * name;
-{
- struct type *type;
-
- /* See if it's something we've already deal with. */
- type = hpread_alloc_type (hp_type, objfile);
- if (TYPE_CODE (type) == TYPE_CODE_TEMPLATE_ARG)
- return type;
-
- /* Nope. Fill in the appropriate fields. */
- TYPE_CODE (type) = TYPE_CODE_TEMPLATE_ARG;
- TYPE_LENGTH (type) = 0;
- TYPE_NFIELDS (type) = 0;
- TYPE_NAME (type) = name;
- return type;
-}
-
-/* Read in and internalize a set debug symbol. */
-
-static struct type *
-hpread_read_set_type (hp_type, dn_bufp, objfile)
- dnttpointer hp_type;
- union dnttentry *dn_bufp;
- struct objfile *objfile;
-{
- struct type *type;
-
- /* See if it's something we've already deal with. */
- type = hpread_alloc_type (hp_type, objfile);
- if (TYPE_CODE (type) == TYPE_CODE_SET)
- return type;
-
- /* Nope. Fill in the appropriate fields. */
- TYPE_CODE (type) = TYPE_CODE_SET;
- TYPE_LENGTH (type) = dn_bufp->dset.bitlength / 8;
- TYPE_NFIELDS (type) = 0;
- TYPE_TARGET_TYPE (type) = hpread_type_lookup (dn_bufp->dset.subtype,
- objfile);
- return type;
-}
-
-/* Read in and internalize an array debug symbol. */
-
-static struct type *
-hpread_read_array_type (hp_type, dn_bufp, objfile)
- dnttpointer hp_type;
- union dnttentry *dn_bufp;
- struct objfile *objfile;
-{
- struct type *type;
-
- /* Allocate an array type symbol.
- * Why no check for already-read here, like in the other
- * hpread_read_xxx_type routines? Because it kept us
- * from properly determining the size of the array!
- */
- type = hpread_alloc_type (hp_type, objfile);
-
- TYPE_CODE (type) = TYPE_CODE_ARRAY;
-
- /* Although the hp-symtab.h does not *require* this to be the case,
- * GDB is assuming that "arrayisbytes" and "elemisbytes" be consistent.
- * I.e., express both array-length and element-length in bits,
- * or express both array-length and element-length in bytes.
- */
- if (!((dn_bufp->darray.arrayisbytes && dn_bufp->darray.elemisbytes) ||
- (!dn_bufp->darray.arrayisbytes && !dn_bufp->darray.elemisbytes))) {
- warning ("error in hpread_array_type.\n");
- return;
- } else if (dn_bufp->darray.arraylength == 0x7fffffff) {
- /* The HP debug format represents char foo[]; as an array with
- * length 0x7fffffff. Internally GDB wants to represent this
- * as an array of length zero.
- */
- TYPE_LENGTH (type) = 0;
- } else if (dn_bufp->darray.arrayisbytes)
- TYPE_LENGTH (type) = dn_bufp->darray.arraylength;
- else /* arraylength is in bits */
- TYPE_LENGTH (type) = dn_bufp->darray.arraylength / 8;
-
- TYPE_TARGET_TYPE (type) = hpread_type_lookup (dn_bufp->darray.elemtype,
- objfile);
-
- /* The one "field" is used to store the subscript type */
- /* Since C and C++ multi-dimensional arrays are simply represented
- * as: array of array of ..., we only need one subscript-type
- * per array. This subscript type is typically a subrange of integer.
- * If this gets extended to support languages like Pascal, then
- * we need to fix this to represent multi-dimensional arrays properly.
- */
- TYPE_NFIELDS (type) = 1;
- TYPE_FIELDS (type) = (struct field *)
- obstack_alloc (&objfile->type_obstack, sizeof (struct field));
- TYPE_FIELD_TYPE (type, 0) = hpread_type_lookup (dn_bufp->darray.indextype,
- objfile);
- return type;
-}
-
-/* Read in and internalize a subrange debug symbol. */
-static struct type *
-hpread_read_subrange_type (hp_type, dn_bufp, objfile)
- dnttpointer hp_type;
- union dnttentry *dn_bufp;
- struct objfile *objfile;
-{
- struct type *type;
-
- /* Is it something we've already dealt with. */
- type = hpread_alloc_type (hp_type, objfile);
- if (TYPE_CODE (type) == TYPE_CODE_RANGE)
- return type;
-
- /* Nope, internalize it. */
- TYPE_CODE (type) = TYPE_CODE_RANGE;
- TYPE_LENGTH (type) = dn_bufp->dsubr.bitlength / 8;
- TYPE_NFIELDS (type) = 2;
- TYPE_FIELDS (type)
- = (struct field *) obstack_alloc (&objfile->type_obstack,
- 2 * sizeof (struct field));
-
- if (dn_bufp->dsubr.dyn_low)
- TYPE_FIELD_BITPOS (type, 0) = 0;
- else
- TYPE_FIELD_BITPOS (type, 0) = dn_bufp->dsubr.lowbound;
-
- if (dn_bufp->dsubr.dyn_high)
- TYPE_FIELD_BITPOS (type, 1) = -1;
- else
- TYPE_FIELD_BITPOS (type, 1) = dn_bufp->dsubr.highbound;
- TYPE_TARGET_TYPE (type) = hpread_type_lookup (dn_bufp->dsubr.subtype,
- objfile);
- return type;
-}
-
-/* struct type * hpread_type_lookup(hp_type, objfile)
- * Arguments:
- * hp_type: A pointer into the DNTT specifying what type we
- * are about to "look up"., or else [for fundamental types
- * like int, float, ...] an "immediate" structure describing
- * the type.
- * objfile: ?
- * Return value: A pointer to a "struct type" (representation of a
- * type in GDB's internal symbol table - see gdbtypes.h)
- * Routine description:
- * There are a variety of places when scanning the DNTT when we
- * need to interpret a "type" field. The simplest and most basic
- * example is when we're processing the symbol table record
- * for a data symbol (a SVAR or DVAR record). That has
- * a "type" field specifying the type of the data symbol. That
- * "type" field is either an "immediate" type specification (for the
- * fundamental types) or a DNTT pointer (for more complicated types).
- * For the more complicated types, we may or may not have already
- * processed the pointed-to type. (Multiple data symbols can of course
- * share the same type).
- * The job of hpread_type_lookup() is to process this "type" field.
- * Most of the real work is done in subroutines. Here we interpret
- * the immediate flag. If not immediate, chase the DNTT pointer to
- * find our way to the SOM record describing the type, switch on
- * the SOM kind, and then call an appropriate subroutine depending
- * on what kind of type we are constructing. (e.g., an array type,
- * a struct/class type, etc).
- */
-static struct type *
-hpread_type_lookup (hp_type, objfile)
- dnttpointer hp_type;
- struct objfile *objfile;
-{
- union dnttentry *dn_bufp;
- struct type * tmp_type;
-
- /* First see if it's a simple builtin type. */
- if (hp_type.dntti.immediate)
- /* If this is a template argument, the argument number is
- * encoded in the bitlength. All other cases, just return
- * GDB's representation of this fundamental type.
- */
- if (hp_type.dntti.type == HP_TYPE_TEMPLATE_ARG)
- return hpread_get_nth_template_arg(objfile, hp_type.dntti.bitlength);
- else
- return lookup_fundamental_type (objfile, hpread_type_translate (hp_type));
-
- /* Not a builtin type. We'll have to read it in. */
- if (hp_type.dnttp.index < LNTT_SYMCOUNT (objfile))
- dn_bufp = hpread_get_lntt (hp_type.dnttp.index, objfile);
- else
- /* This is a fancy way of returning NULL */
- return lookup_fundamental_type (objfile, FT_VOID);
-
- switch (dn_bufp->dblock.kind)
- {
- case DNTT_TYPE_SRCFILE:
- case DNTT_TYPE_MODULE:
- case DNTT_TYPE_ENTRY:
- case DNTT_TYPE_BEGIN:
- case DNTT_TYPE_END:
- case DNTT_TYPE_IMPORT:
- case DNTT_TYPE_LABEL:
- case DNTT_TYPE_FPARAM:
- case DNTT_TYPE_SVAR:
- case DNTT_TYPE_DVAR:
- case DNTT_TYPE_CONST:
- case DNTT_TYPE_MEMENUM:
- case DNTT_TYPE_VARIANT:
- case DNTT_TYPE_FILE:
- case DNTT_TYPE_WITH:
- case DNTT_TYPE_COMMON:
- case DNTT_TYPE_COBSTRUCT:
- case DNTT_TYPE_XREF:
- case DNTT_TYPE_SA:
- case DNTT_TYPE_MACRO:
- case DNTT_TYPE_BLOCKDATA:
- case DNTT_TYPE_CLASS_SCOPE:
- case DNTT_TYPE_MEMACCESS:
- case DNTT_TYPE_INHERITANCE:
- case DNTT_TYPE_OBJECT_ID:
- case DNTT_TYPE_FRIEND_CLASS:
- case DNTT_TYPE_FRIEND_FUNC:
- /* These are not types - something went wrong. */
- /* This is a fancy way of returning NULL */
- return lookup_fundamental_type (objfile, FT_VOID);
-
- case DNTT_TYPE_FUNCTION:
- /* We wind up here when dealing with class member functions
- * (called from hpread_read_struct_type(), i.e. when processing
- * the class definition itself).
- */
- return hpread_read_function_type (hp_type, dn_bufp, objfile, 0);
-
- case DNTT_TYPE_DOC_FUNCTION:
- return hpread_read_doc_function_type (hp_type, dn_bufp, objfile, 0);
-
- case DNTT_TYPE_TYPEDEF:
- {
- /* A typedef - chase it down by making a recursive call */
- struct type *structtype = hpread_type_lookup (dn_bufp->dtype.type,
- objfile);
-
- /* The following came from the base hpread.c that we inherited.
- * It is WRONG so I have commented it out. - RT
- *...
-
- char *suffix;
- suffix = VT (objfile) + dn_bufp->dtype.name;
- TYPE_NAME (structtype) = suffix;
-
- * ... further explanation ....
- *
- * What we have here is a typedef pointing to a typedef.
- * E.g.,
- * typedef int foo;
- * typedef foo fum;
- *
- * What we desire to build is (these are pictures
- * of "struct type"'s):
- *
- * +---------+ +----------+ +------------+
- * | typedef | | typedef | | fund. type |
- * | type| -> | type| -> | |
- * | "fum" | | "foo" | | "int" |
- * +---------+ +----------+ +------------+
- *
- * What this commented-out code is doing is smashing the
- * name of pointed-to-type to be the same as the pointed-from
- * type. So we wind up with something like:
- *
- * +---------+ +----------+ +------------+
- * | typedef | | typedef | | fund. type |
- * | type| -> | type| -> | |
- * | "fum" | | "fum" | | "fum" |
- * +---------+ +----------+ +------------+
- *
- */
-
- return structtype;
- }
-
- case DNTT_TYPE_TAGDEF:
- {
- /* Just a little different from above. We have to tack on
- * an identifier of some kind (struct, union, enum, class, etc).
- */
- struct type *structtype = hpread_type_lookup (dn_bufp->dtype.type,
- objfile);
- char *prefix, *suffix;
- suffix = VT (objfile) + dn_bufp->dtype.name;
-
- /* Lookup the next type in the list. It should be a structure,
- * union, class, enum, or template type.
- * We will need to attach that to our name.
- */
- if (dn_bufp->dtype.type.dnttp.index < LNTT_SYMCOUNT (objfile))
- dn_bufp = hpread_get_lntt (dn_bufp->dtype.type.dnttp.index, objfile);
- else {
- complain (&hpread_type_lookup_complaint);
- return;
- }
-
- if (dn_bufp->dblock.kind == DNTT_TYPE_STRUCT) {
- prefix = "struct ";
- } else if (dn_bufp->dblock.kind == DNTT_TYPE_UNION) {
- prefix = "union ";
- } else if (dn_bufp->dblock.kind == DNTT_TYPE_CLASS) {
- /* Further field for CLASS saying how it was really declared */
- /* 0==class, 1==union, 2==struct */
- if (dn_bufp->dclass.class_decl == 0)
- prefix = "class ";
- else if (dn_bufp->dclass.class_decl == 1)
- prefix = "union ";
- else if (dn_bufp->dclass.class_decl == 2)
- prefix = "struct ";
- else
- prefix = "";
- } else if (dn_bufp->dblock.kind == DNTT_TYPE_ENUM) {
- prefix = "enum ";
- } else if (dn_bufp->dblock.kind == DNTT_TYPE_TEMPLATE) {
- prefix = "template ";
- } else {
- prefix = "";
- }
-
- /* Build the correct name. */
- structtype->name
- = (char *) obstack_alloc (&objfile->type_obstack,
- strlen (prefix) + strlen (suffix) + 1);
- TYPE_NAME (structtype) = strcpy (TYPE_NAME (structtype), prefix);
- TYPE_NAME (structtype) = strcat (TYPE_NAME (structtype), suffix);
- TYPE_TAG_NAME (structtype) = suffix;
-
- /* For classes/structs, we have to set the static member "physnames"
- to point to strings like "Class::Member" */
- if (TYPE_CODE (structtype) == TYPE_CODE_STRUCT)
- fix_static_member_physnames (structtype, suffix, objfile);
-
- return structtype;
- }
-
- case DNTT_TYPE_POINTER:
- /* Pointer type - call a routine in gdbtypes.c that constructs
- * the appropriate GDB type.
- */
- return make_pointer_type (
- hpread_type_lookup (dn_bufp->dptr.pointsto,
- objfile),
- NULL);
-
- case DNTT_TYPE_REFERENCE:
- /* C++ reference type - call a routine in gdbtypes.c that constructs
- * the appropriate GDB type.
- */
- return make_reference_type (
- hpread_type_lookup (dn_bufp->dreference.pointsto,
- objfile),
- NULL);
-
- case DNTT_TYPE_ENUM:
- return hpread_read_enum_type (hp_type, dn_bufp, objfile);
- case DNTT_TYPE_SET:
- return hpread_read_set_type (hp_type, dn_bufp, objfile);
- case DNTT_TYPE_SUBRANGE:
- return hpread_read_subrange_type (hp_type, dn_bufp, objfile);
- case DNTT_TYPE_ARRAY:
- return hpread_read_array_type (hp_type, dn_bufp, objfile);
- case DNTT_TYPE_STRUCT:
- case DNTT_TYPE_UNION:
- return hpread_read_struct_type (hp_type, dn_bufp, objfile);
- case DNTT_TYPE_FIELD:
- return hpread_type_lookup (dn_bufp->dfield.type, objfile);
-
- case DNTT_TYPE_FUNCTYPE:
- /* Here we want to read the function SOMs and return a
- * type for it. We get here, for instance, when processing
- * pointer-to-function type.
- */
- return hpread_read_function_type (hp_type, dn_bufp, objfile, 0);
-
- case DNTT_TYPE_PTRMEM:
- /* Declares a C++ pointer-to-data-member type.
- * The "pointsto" field defines the class,
- * while the "memtype" field defines the pointed-to-type.
- */
- {
- struct type * ptrmemtype;
- struct type * class_type;
- struct type * memtype;
- memtype = hpread_type_lookup (dn_bufp->dptrmem.memtype,
- objfile),
- class_type = hpread_type_lookup (dn_bufp->dptrmem.pointsto,
- objfile),
- ptrmemtype = alloc_type(objfile);
- smash_to_member_type(ptrmemtype, class_type, memtype);
- return make_pointer_type(ptrmemtype, NULL);
- }
- break;
-
- case DNTT_TYPE_PTRMEMFUNC:
- /* Defines a C++ pointer-to-function-member type.
- * The "pointsto" field defines the class,
- * while the "memtype" field defines the pointed-to-type.
- */
- {
- struct type * ptrmemtype;
- struct type * class_type;
- struct type * functype;
- struct type * retvaltype;
- int nargs;
- int i;
- struct type ** args_type;
- class_type = hpread_type_lookup (dn_bufp->dptrmem.pointsto,
- objfile);
- functype = hpread_type_lookup (dn_bufp->dptrmem.memtype,
- objfile);
- retvaltype = TYPE_TARGET_TYPE (functype);
- nargs = TYPE_NFIELDS (functype);
- args_type = (struct type **) xmalloc ((nargs+1) * sizeof (struct type *));
- for (i = 0; i < nargs; i++) {
- args_type[i] = TYPE_FIELD_TYPE (functype, i);
- }
- args_type[nargs] = NULL;
- ptrmemtype = alloc_type(objfile);
- smash_to_method_type(ptrmemtype, class_type, retvaltype, args_type);
- return make_pointer_type(ptrmemtype, NULL);
- }
- break;
-
- case DNTT_TYPE_CLASS:
- return hpread_read_struct_type (hp_type, dn_bufp, objfile);
-
- case DNTT_TYPE_GENFIELD:
- /* Chase pointer from GENFIELD to FIELD, and make recursive
- * call on that.
- */
- return hpread_type_lookup (dn_bufp->dgenfield.field, objfile);
-
- case DNTT_TYPE_VFUNC:
- /* C++ virtual function.
- * We get here in the course of processing a class type which
- * contains virtual functions. Just go through another level
- * of indirection to get to the pointed-to function SOM.
- */
- return hpread_type_lookup (dn_bufp->dvfunc.funcptr, objfile);
-
- case DNTT_TYPE_MODIFIER:
- /* Check the modifiers and then just make a recursive call on
- * the "type" pointed to by the modifier DNTT.
- *
- * pai:: FIXME -- do we ever want to handle "m_duplicate" and
- * "m_void" modifiers? Is static_flag really needed here?
- * (m_static used for methods of classes, elsewhere).
- */
- tmp_type = make_cv_type (dn_bufp->dmodifier.m_const,
- dn_bufp->dmodifier.m_volatile,
- hpread_type_lookup (dn_bufp->dmodifier.type, objfile),
- 0);
- return tmp_type;
-
-
- case DNTT_TYPE_MEMFUNC:
- /* Member function. Treat like a function.
- * I think we get here in the course of processing a
- * pointer-to-member-function type...
- */
- return hpread_read_function_type (hp_type, dn_bufp, objfile, 0);
-
- case DNTT_TYPE_DOC_MEMFUNC:
- return hpread_read_doc_function_type (hp_type, dn_bufp, objfile, 0);
-
- case DNTT_TYPE_TEMPLATE:
- /* Template - sort of the header for a template definition,
- * which like a class, points to a member list and also points
- * to a TEMPLATE_ARG list of type-arguments.
- */
- return hpread_read_struct_type (hp_type, dn_bufp, objfile);
-
- case DNTT_TYPE_TEMPLATE_ARG:
- {
- char * name;
- /* The TEMPLATE record points to an argument list of
- * TEMPLATE_ARG records, each of which describes one
- * of the type-arguments.
- */
- name = VT (objfile) + dn_bufp->dtempl_arg.name;
- return hpread_read_templ_arg_type (hp_type, dn_bufp, objfile, name);
- }
-
- case DNTT_TYPE_FUNC_TEMPLATE:
- /* We wind up here when processing a TEMPLATE type,
- * if the template has member function(s).
- * Treat it like a FUNCTION.
- */
- return hpread_read_function_type (hp_type, dn_bufp, objfile, 0);
-
- case DNTT_TYPE_LINK:
- /* The LINK record is used to link up templates with instantiations.
- * There is no type associated with the LINK record per se.
- */
- return lookup_fundamental_type (objfile, FT_VOID);
-
- /* Also not yet handled... */
- /* case DNTT_TYPE_DYN_ARRAY_DESC: */
- /* case DNTT_TYPE_DESC_SUBRANGE: */
- /* case DNTT_TYPE_BEGIN_EXT: */
- /* case DNTT_TYPE_INLN: */
- /* case DNTT_TYPE_INLN_LIST: */
- /* case DNTT_TYPE_ALIAS: */
- default:
- /* A fancy way of returning NULL */
- return lookup_fundamental_type (objfile, FT_VOID);
- }
-}
-
-static sltpointer
-hpread_record_lines (subfile, s_idx, e_idx, objfile, offset)
- struct subfile *subfile;
- sltpointer s_idx, e_idx;
- struct objfile *objfile;
- CORE_ADDR offset;
-{
- union sltentry *sl_bufp;
-
- while (s_idx <= e_idx)
- {
- sl_bufp = hpread_get_slt (s_idx, objfile);
- /* Only record "normal" entries in the SLT. */
- if (sl_bufp->snorm.sltdesc == SLT_NORMAL
- || sl_bufp->snorm.sltdesc == SLT_EXIT)
- record_line (subfile, sl_bufp->snorm.line,
- sl_bufp->snorm.address + offset);
- else if (sl_bufp->snorm.sltdesc == SLT_NORMAL_OFFSET)
- record_line (subfile, sl_bufp->snormoff.line,
- sl_bufp->snormoff.address + offset);
- s_idx++;
- }
- return e_idx;
-}
-
-/* Given a function "f" which is a member of a class, find
- * the classname that it is a member of. Used to construct
- * the name (e.g., "c::f") which GDB will put in the
- * "demangled name" field of the function's symbol.
- * Called from hpread_process_one_debug_symbol()
- * If "f" is not a member function, return NULL.
- */
-char * class_of (functype)
-struct type * functype;
-{
- struct type * first_param_type;
- char * first_param_name;
- struct type * pointed_to_type;
- char * class_name;
-
- /* Check that the function has a first argument "this",
- * and that "this" is a pointer to a class. If not,
- * functype is not a member function, so return NULL.
- */
- if (TYPE_NFIELDS(functype) == 0)
- return NULL;
- first_param_name = TYPE_FIELD_NAME (functype, 0);
- if (first_param_name == NULL)
- return NULL; /* paranoia */
- if (strcmp(first_param_name, "this"))
- return NULL;
- first_param_type = TYPE_FIELD_TYPE (functype, 0);
- if (first_param_type == NULL)
- return NULL; /* paranoia */
- if (TYPE_CODE(first_param_type) != TYPE_CODE_PTR)
- return NULL;
-
- /* Get the thing that "this" points to, check that
- * it's a class, and get its class name.
- */
- pointed_to_type = TYPE_TARGET_TYPE(first_param_type);
- if (pointed_to_type == NULL)
- return NULL; /* paranoia */
- if (TYPE_CODE(pointed_to_type) != TYPE_CODE_CLASS)
- return NULL;
- class_name = TYPE_NAME(pointed_to_type);
- if (class_name == NULL)
- return NULL; /* paranoia */
-
- /* The class name may be of the form "class c", in which case
- * we want to strip off the leading "class ".
- */
- if (strncmp(class_name, "class ", 6) == 0)
- class_name += 6;
-
- return class_name;
-}
-
-/* Internalize one native debug symbol.
- * Called in a loop from hpread_expand_symtab().
- * Arguments:
- * dn_bufp:
- * name:
- * section_offsets:
- * objfile:
- * text_offset:
- * text_size:
- * filename:
- * index: Index of this symbol
- * at_module_boundary_p Pointer to boolean flag to control caller's loop.
- */
-
-static void
-hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
- text_offset, text_size, filename,
- index, at_module_boundary_p
- )
- union dnttentry *dn_bufp;
- char *name;
- struct section_offsets *section_offsets;
- struct objfile *objfile;
- CORE_ADDR text_offset;
- int text_size;
- char *filename;
- int index;
- int *at_module_boundary_p;
-{
- unsigned long desc;
- int type;
- CORE_ADDR valu;
- int offset = ANOFFSET (section_offsets, SECT_OFF_TEXT);
- int data_offset = ANOFFSET (section_offsets, SECT_OFF_DATA);
- union dnttentry *dn_temp;
- dnttpointer hp_type;
- struct symbol *sym;
- struct context_stack *new;
- char * class_scope_name;
- extern int is_in_import_list (); /* in somread.c */
-
- /* Allocate one GDB debug symbol and fill in some default values. */
- sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
- sizeof (struct symbol));
- memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = obsavestring (name, strlen (name), &objfile->symbol_obstack);
- SYMBOL_LANGUAGE (sym) = language_auto;
- SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
- SYMBOL_LINE (sym) = 0;
- SYMBOL_VALUE (sym) = 0;
- SYMBOL_CLASS (sym) = LOC_TYPEDEF;
-
- /* Just a trick in case the SOM debug symbol is a type definition.
- * There are routines that are set up to build a GDB type symbol, given
- * a SOM dnttpointer. So we set up a dummy SOM dnttpointer "hp_type".
- * This allows us to call those same routines.
- */
- hp_type.dnttp.extension = 1;
- hp_type.dnttp.immediate = 0;
- hp_type.dnttp.global = 0;
- hp_type.dnttp.index = index;
-
- /* This "type" is the type of SOM record.
- * Switch on SOM type.
- */
- type = dn_bufp->dblock.kind;
- switch (type)
- {
- case DNTT_TYPE_SRCFILE:
- /* This type of symbol indicates from which source file or
- * include file any following data comes. It may indicate:
- *
- * o The start of an entirely new source file (and thus
- * a new module)
- *
- * o The start of a different source file due to #include
- *
- * o The end of an include file and the return to the original
- * file. Thus if "foo.c" includes "bar.h", we see first
- * a SRCFILE for foo.c, then one for bar.h, and then one for
- * foo.c again.
- *
- * If it indicates the start of a new module then we must
- * finish the symbol table of the previous module
- * (if any) and start accumulating a new symbol table.
- */
-
- valu = text_offset;
- if (!last_source_file ) {
- /*
- * A note on "last_source_file": this is a char* pointing
- * to the actual file name. "start_symtab" sets it,
- * "end_symtab" clears it.
- *
- * So if "last_source_file" is NULL, then either this is
- * the first record we are looking at, or a previous call
- * to "end_symtab()" was made to close out the previous
- * module. Since we're now quitting the scan loop when we
- * see a MODULE END record, we should never get here, except
- * in the case that we're not using the quick look-up tables
- * and have to use the old system as a fall-back.
- */
- start_symtab (name, NULL, valu);
- record_debugformat ("HP");
- SL_INDEX (objfile) = dn_bufp->dsfile.address;
- }
-
- else {
- /* Either a new include file, or a SRCFILE record
- * saying we are back in the main source (or out of
- * a nested include file) again.
- */
- SL_INDEX (objfile) = hpread_record_lines (current_subfile,
- SL_INDEX (objfile),
- dn_bufp->dsfile.address,
- objfile, offset);
- }
-
- /* A note on "start_subfile". This routine will check
- * the name we pass it and look for an existing subfile
- * of that name. There's thus only one sub-file for the
- * actual source (e.g. for "foo.c" in foo.c), despite the
- * fact that we'll see lots of SRCFILE entries for foo.c
- * inside foo.c.
- */
- start_subfile (name, NULL);
- break;
-
- case DNTT_TYPE_MODULE:
- /*
- * We no longer ignore DNTT_TYPE_MODULE symbols. The module
- * represents the meaningful semantic structure of a compilation
- * unit. We expect to start the psymtab-to-symtab expansion
- * looking at a MODULE entry, and to end it at the corresponding
- * END MODULE entry.
- *
- *--Begin outdated comments
- *
- * This record signifies the start of a new source module
- * In C/C++ there is no explicit "module" construct in the language,
- * but each compilation unit is implicitly a module and they
- * do emit the DNTT_TYPE_MODULE records.
- * The end of the module is marked by a matching DNTT_TYPE_END record.
- *
- * The reason GDB gets away with ignoring the DNTT_TYPE_MODULE record
- * is it notices the DNTT_TYPE_END record for the previous
- * module (see comments under DNTT_TYPE_END case), and then treats
- * the next DNTT_TYPE_SRCFILE record as if it were the module-start record.
- * (i.e., it makes a start_symtab() call).
- * This scheme seems a little convoluted, but I'll leave it
- * alone on the principle "if it ain't broke don't fix
- * it". (RT).
- *
- *-- End outdated comments
- */
-
- valu = text_offset;
- if (!last_source_file )
- {
- /* Start of a new module. We know this because "last_source_file"
- * is NULL, which can only happen the first time or if we just
- * made a call to end_symtab() to close out the previous module.
- */
- start_symtab (name, NULL, valu);
- SL_INDEX (objfile) = dn_bufp->dmodule.address;
- }
- else
- {
- /* This really shouldn't happen if we're using the quick
- * look-up tables, as it would mean we'd scanned past an
- * END MODULE entry. But if we're not using the tables,
- * we started the module on the SRCFILE entry, so it's ok.
- * For now, accept this.
- */
- /* warning( "Error expanding psymtab, missed module end, found entry for %s",
- * name );
- */
- *at_module_boundary_p = -1;
- }
-
- start_subfile (name, NULL);
- break;
-
- case DNTT_TYPE_FUNCTION:
- case DNTT_TYPE_ENTRY:
- /* A function or secondary entry point. */
- valu = dn_bufp->dfunc.lowaddr + offset;
-
- /* Record lines up to this point. */
- SL_INDEX (objfile) = hpread_record_lines (current_subfile,
- SL_INDEX (objfile),
- dn_bufp->dfunc.address,
- objfile, offset);
-
- WITHIN_FUNCTION (objfile) = 1;
- CURRENT_FUNCTION_VALUE (objfile) = valu;
-
- /* Stack must be empty now. */
- if (context_stack_depth != 0)
- complain (&lbrac_unmatched_complaint, (char *) symnum);
- new = push_context (0, valu);
-
- /* Built a type for the function. This includes processing
- * the symbol records for the function parameters.
- */
- SYMBOL_CLASS (sym) = LOC_BLOCK;
- SYMBOL_TYPE (sym) = hpread_read_function_type (hp_type, dn_bufp, objfile, 1);
-
- /* 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.
- */
- if ((dn_bufp->dfunc.language == HP_LANGUAGE_CPLUSPLUS) &&
- dn_bufp->dfunc.alias && /* has an alias */
- *(char *)(VT (objfile) + dn_bufp->dfunc.alias)) /* not a null string */
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->dfunc.alias;
- else
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->dfunc.name;
-
- /* Special hack to get around HP compilers' insistence on
- * reporting "main" as "_MAIN_" for C/C++ */
- if ((strcmp (SYMBOL_NAME (sym), "_MAIN_") == 0) &&
- (strcmp (VT (objfile) + dn_bufp->dfunc.name, "main") == 0))
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->dfunc.name;
-
- /* The SYMBOL_CPLUS_DEMANGLED_NAME field is expected to
- * be the demangled name.
- */
- if (dn_bufp->dfunc.language == HP_LANGUAGE_CPLUSPLUS)
- {
- /* SYMBOL_INIT_DEMANGLED_NAME is a macro which winds up
- * calling the demangler in libiberty (cplus_demangle()) to
- * do the job. This generally does the job, even though
- * it's intended for the GNU compiler and not the aCC compiler
- * Note that SYMBOL_INIT_DEMANGLED_NAME calls the
- * demangler with arguments DMGL_PARAMS | DMGL_ANSI.
- * Generally, we don't want params when we display
- * a demangled name, but when I took out the DMGL_PARAMS,
- * some things broke, so I'm leaving it in here, and
- * working around the issue in stack.c. - RT
- */
- SYMBOL_INIT_DEMANGLED_NAME (sym, &objfile->symbol_obstack);
- if ((SYMBOL_NAME (sym) == VT (objfile) + dn_bufp->dfunc.alias) &&
- (!SYMBOL_CPLUS_DEMANGLED_NAME(sym))) {
-
- /* Well, the symbol name is mangled, but the
- * demangler in libiberty failed so the demangled
- * field is still NULL. Try to
- * do the job ourselves based on the "name" field
- * in the SOM record. A complication here is that
- * the name field contains only the function name
- * (like "f"), whereas we want the class qualification
- * (as in "c::f"). Try to reconstruct that.
- */
- char * basename;
- char * classname;
- char * dem_name;
- basename = VT (objfile) + dn_bufp->dfunc.name;
- classname = class_of(SYMBOL_TYPE(sym));
- if (classname) {
- dem_name = xmalloc(strlen(basename)+strlen(classname)+3);
- strcpy(dem_name, classname);
- strcat(dem_name, "::");
- strcat(dem_name, basename);
- SYMBOL_CPLUS_DEMANGLED_NAME(sym) = dem_name;
- SYMBOL_LANGUAGE (sym) = language_cplus;
- }
- }
- }
-
- /* Add the function symbol to the list of symbols in this blockvector */
- if (dn_bufp->dfunc.global)
- add_symbol_to_list (sym, &global_symbols);
- else
- add_symbol_to_list (sym, &file_symbols);
- new->name = sym;
-
- /* Search forward to the next BEGIN and also read
- * in the line info up to that point.
- * Not sure why this is needed.
- * In HP FORTRAN this code is harmful since there
- * may not be a BEGIN after the FUNCTION.
- * So I made it C/C++ specific. - RT
- */
- if (dn_bufp->dfunc.language == HP_LANGUAGE_C ||
- dn_bufp->dfunc.language == HP_LANGUAGE_CPLUSPLUS) {
- while (dn_bufp->dblock.kind != DNTT_TYPE_BEGIN)
- {
- dn_bufp = hpread_get_lntt (++index, objfile);
- if (dn_bufp->dblock.extension)
- continue;
- }
- SL_INDEX (objfile) = hpread_record_lines (current_subfile,
- SL_INDEX (objfile),
- dn_bufp->dbegin.address,
- objfile, offset);
- SYMBOL_LINE (sym) = hpread_get_line (dn_bufp->dbegin.address, objfile);
- }
- record_line (current_subfile, SYMBOL_LINE (sym), valu);
- break;
-
- case DNTT_TYPE_DOC_FUNCTION:
- valu = dn_bufp->ddocfunc.lowaddr + offset;
-
- /* Record lines up to this point. */
- SL_INDEX (objfile) = hpread_record_lines (current_subfile,
- SL_INDEX (objfile),
- dn_bufp->ddocfunc.address,
- objfile, offset);
-
- WITHIN_FUNCTION (objfile) = 1;
- CURRENT_FUNCTION_VALUE (objfile) = valu;
- /* Stack must be empty now. */
- if (context_stack_depth != 0)
- complain (&lbrac_unmatched_complaint, (char *) symnum);
- new = push_context (0, valu);
-
- /* Built a type for the function. This includes processing
- * the symbol records for the function parameters.
- */
- SYMBOL_CLASS (sym) = LOC_BLOCK;
- SYMBOL_TYPE (sym) = hpread_read_doc_function_type (hp_type, dn_bufp, objfile, 1);
-
- /* 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.
- */
- if ((dn_bufp->ddocfunc.language == HP_LANGUAGE_CPLUSPLUS) &&
- dn_bufp->ddocfunc.alias && /* has an alias */
- *(char *)(VT (objfile) + dn_bufp->ddocfunc.alias)) /* not a null string */
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->ddocfunc.alias;
- else
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->ddocfunc.name;
-
- /* Special hack to get around HP compilers' insistence on
- * reporting "main" as "_MAIN_" for C/C++ */
- if ((strcmp (SYMBOL_NAME (sym), "_MAIN_") == 0) &&
- (strcmp (VT (objfile) + dn_bufp->ddocfunc.name, "main") == 0))
- SYMBOL_NAME (sym) = VT (objfile) + dn_bufp->ddocfunc.name;
-
- if (dn_bufp->ddocfunc.language == HP_LANGUAGE_CPLUSPLUS) {
-
- /* SYMBOL_INIT_DEMANGLED_NAME is a macro which winds up
- * calling the demangler in libiberty (cplus_demangle()) to
- * do the job. This generally does the job, even though
- * it's intended for the GNU compiler and not the aCC compiler
- * Note that SYMBOL_INIT_DEMANGLED_NAME calls the
- * demangler with arguments DMGL_PARAMS | DMGL_ANSI.
- * Generally, we don't want params when we display
- * a demangled name, but when I took out the DMGL_PARAMS,
- * some things broke, so I'm leaving it in here, and
- * working around the issue in stack.c. - RT
- */
- SYMBOL_INIT_DEMANGLED_NAME (sym, &objfile->symbol_obstack);
-
- if ((SYMBOL_NAME (sym) == VT (objfile) + dn_bufp->ddocfunc.alias) &&
- (!SYMBOL_CPLUS_DEMANGLED_NAME(sym))) {
-
- /* Well, the symbol name is mangled, but the
- * demangler in libiberty failed so the demangled
- * field is still NULL. Try to
- * do the job ourselves based on the "name" field
- * in the SOM record. A complication here is that
- * the name field contains only the function name
- * (like "f"), whereas we want the class qualification
- * (as in "c::f"). Try to reconstruct that.
- */
- char * basename;
- char * classname;
- char * dem_name;
- basename = VT (objfile) + dn_bufp->ddocfunc.name;
- classname = class_of(SYMBOL_TYPE(sym));
- if (classname) {
- dem_name = xmalloc(strlen(basename)+strlen(classname)+3);
- strcpy(dem_name, classname);
- strcat(dem_name, "::");
- strcat(dem_name, basename);
- SYMBOL_CPLUS_DEMANGLED_NAME(sym) = dem_name;
- SYMBOL_LANGUAGE (sym) = language_cplus;
- }
- }
- }
-
- /* Add the function symbol to the list of symbols in this blockvector */
- if (dn_bufp->ddocfunc.global)
- add_symbol_to_list (sym, &global_symbols);
- else
- add_symbol_to_list (sym, &file_symbols);
- new->name = sym;
-
- /* Search forward to the next BEGIN and also read
- * in the line info up to that point.
- * Not sure why this is needed.
- * In HP FORTRAN this code is harmful since there
- * may not be a BEGIN after the FUNCTION.
- * So I made it C/C++ specific. - RT
- */
- if (dn_bufp->ddocfunc.language == HP_LANGUAGE_C ||
- dn_bufp->ddocfunc.language == HP_LANGUAGE_CPLUSPLUS) {
- while (dn_bufp->dblock.kind != DNTT_TYPE_BEGIN)
- {
- dn_bufp = hpread_get_lntt (++index, objfile);
- if (dn_bufp->dblock.extension)
- continue;
- }
- SL_INDEX (objfile) = hpread_record_lines (current_subfile,
- SL_INDEX (objfile),
- dn_bufp->dbegin.address,
- objfile, offset);
- SYMBOL_LINE (sym) = hpread_get_line (dn_bufp->dbegin.address, objfile);
- }
- record_line (current_subfile, SYMBOL_LINE (sym), valu);
- break;
-
- case DNTT_TYPE_BEGIN:
- /* Begin a new scope. */
- if (context_stack_depth == 1 /* this means we're at function level */ &&
- context_stack[0].name != NULL /* this means it's a function */ &&
- context_stack[0].depth == 0 /* this means it's the first BEGIN
- we've seen after the FUNCTION */
- )
- {
- /* This is the first BEGIN after a FUNCTION.
- * We ignore this one, since HP compilers always insert
- * at least one BEGIN, i.e. it's:
- *
- * FUNCTION
- * argument symbols
- * BEGIN
- * local symbols
- * (possibly nested BEGIN ... END's if there are inner { } blocks)
- * END
- * END
- *
- * By ignoring this first BEGIN, the local symbols get treated
- * as belonging to the function scope, and "print func::local_sym"
- * works (which is what we want).
- */
-
- /* All we do here is increase the depth count associated with
- * the FUNCTION entry in the context stack. This ensures that
- * the next BEGIN we see (if any), representing a real nested { }
- * block, will get processed.
- */
-
- context_stack[0].depth++;
-
- } else {
-
- /* Record lines up to this SLT pointer. */
- SL_INDEX (objfile) = hpread_record_lines (current_subfile,
- SL_INDEX (objfile),
- dn_bufp->dbegin.address,
- objfile, offset);
- /* Calculate start address of new scope */
- valu = hpread_get_location (dn_bufp->dbegin.address, objfile);
- valu += offset; /* Relocate for dynamic loading */
- /* We use the scope start DNTT index as nesting depth identifier! */
- desc = hpread_get_scope_start (dn_bufp->dbegin.address, objfile);
- new = push_context (desc, valu);
- }
- break;
-
- case DNTT_TYPE_END:
- /* End a scope. */
-
- /* Valid end kinds are:
- * MODULE
- * FUNCTION
- * WITH
- * COMMON
- * BEGIN
- * CLASS_SCOPE
- */
-
- SL_INDEX (objfile) = hpread_record_lines (current_subfile,
- SL_INDEX (objfile),
- dn_bufp->dend.address,
- objfile, offset);
- switch (dn_bufp->dend.endkind)
- {
- case DNTT_TYPE_MODULE:
- /* Ending a module ends the symbol table for that module.
- * Calling end_symtab() has the side effect of clearing the
- * last_source_file pointer, which in turn signals
- * process_one_debug_symbol() to treat the next DNTT_TYPE_SRCFILE
- * record as a module-begin.
- */
- valu = text_offset + text_size + offset;
-
- /* Tell our caller that we're done with expanding the
- * debug information for a module.
- */
- *at_module_boundary_p = 1;
-
- /* Don't do this, as our caller will do it!
- *
- * (void) end_symtab (valu, objfile, 0);
- */
- break;
-
- case DNTT_TYPE_FUNCTION:
- /* Ending a function, well, ends the function's scope. */
- dn_temp = hpread_get_lntt (dn_bufp->dend.beginscope.dnttp.index,
- objfile);
- valu = dn_temp->dfunc.hiaddr + offset;
- /* Insert func params into local list */
- merge_symbol_lists (&param_symbols, &local_symbols);
- new = pop_context ();
- /* Make a block for the local symbols within. */
- finish_block (new->name, &local_symbols, new->old_blocks,
- new->start_addr, valu, objfile);
- WITHIN_FUNCTION (objfile) = 0; /* This may have to change for Pascal */
- local_symbols = new->locals;
- param_symbols = new->params;
- break;
-
- case DNTT_TYPE_BEGIN:
- if (context_stack_depth == 1 &&
- context_stack[0].name != NULL &&
- context_stack[0].depth == 1)
- {
- /* This is the END corresponding to the
- * BEGIN which we ignored - see DNTT_TYPE_BEGIN case above.
- */
- context_stack[0].depth--;
- } else {
- /* Ending a local scope. */
- valu = hpread_get_location (dn_bufp->dend.address, objfile);
- /* Why in the hell is this needed? */
- valu += offset + 9; /* Relocate for dynamic loading */
- new = pop_context ();
- desc = dn_bufp->dend.beginscope.dnttp.index;
- if (desc != new->depth)
- complain (&lbrac_mismatch_complaint, (char *) symnum);
-
- /* Make a block for the local symbols within. */
- finish_block (new->name, &local_symbols, new->old_blocks,
- new->start_addr, valu, objfile);
- local_symbols = new->locals;
- param_symbols = new->params;
- }
- break;
-
- case DNTT_TYPE_WITH:
- /* Since we ignore the DNTT_TYPE_WITH that starts the scope,
- * we can ignore the DNTT_TYPE_END that ends it.
- */
- break;
-
- case DNTT_TYPE_COMMON:
- /* End a FORTRAN common block. We don't currently handle these */
- complain (&hpread_unhandled_end_common_complaint);
- break;
-
- case DNTT_TYPE_CLASS_SCOPE:
-
- /* pai: FIXME Not handling nested classes for now -- must
- * maintain a stack */
- class_scope_name = NULL;
-
-#if 0
- /* End a class scope */
- valu = hpread_get_location (dn_bufp->dend.address, objfile);
- /* Why in the hell is this needed? */
- valu += offset + 9; /* Relocate for dynamic loading */
- new = pop_context ();
- desc = dn_bufp->dend.beginscope.dnttp.index;
- if (desc != new->depth)
- complain (&lbrac_mismatch_complaint, (char *) symnum);
- /* Make a block for the local symbols within. */
- finish_block (new->name, &local_symbols, new->old_blocks,
- new->start_addr, valu, objfile);
- local_symbols = new->locals;
- param_symbols = new->params;
-#endif
- break;
-
- default:
- complain (&hpread_unexpected_end_complaint);
- break;
- }
- break;
-
- /* DNTT_TYPE_IMPORT is not handled */
-
- case DNTT_TYPE_LABEL:
- SYMBOL_NAMESPACE (sym) = LABEL_NAMESPACE;
- break;
-
- case DNTT_TYPE_FPARAM:
- /* Function parameters. */
- /* Note 1: This code was present in the 4.16 sources, and then
- removed, because fparams are handled in
- hpread_read_function_type(). However, while fparam symbols
- are indeed handled twice, this code here cannot be removed
- because then they don't get added to the local symbol list of
- the function's code block, which leads to a failure to look
- up locals, "this"-relative member names, etc. So I've put
- this code back in. pai/1997-07-21 */
- /* Note 2: To fix a defect, we stopped adding FPARAMS to local_symbols
- in hpread_read_function_type(), so FPARAMS had to be handled
- here. I changed the location to be the appropriate argument
- kinds rather than LOC_LOCAL. pai/1997-08-08 */
- /* Note 3: Well, the fix in Note 2 above broke argument printing
- in traceback frames, and further it makes assumptions about the
- order of the FPARAM entries from HP compilers (cc and aCC in particular
- generate them in reverse orders -- fixing one breaks for the other).
- So I've added code in hpread_read_function_type() to add fparams
- to a param_symbols list for the current context level. These are
- then merged into local_symbols when a function end is reached.
- pai/1997-08-11 */
-
- break; /* do nothing; handled in hpread_read_function_type() */
-
-#if 0 /* Old code */
- if (dn_bufp->dfparam.regparam)
- SYMBOL_CLASS (sym) = LOC_REGISTER;
- else if (dn_bufp->dfparam.indirect)
- SYMBOL_CLASS (sym) = LOC_REF_ARG;
- else
- SYMBOL_CLASS (sym) = LOC_ARG;
- SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
- if (dn_bufp->dfparam.copyparam)
- {
- SYMBOL_VALUE (sym) = dn_bufp->dfparam.location;
-#ifdef HPREAD_ADJUST_STACK_ADDRESS
- SYMBOL_VALUE (sym)
- += HPREAD_ADJUST_STACK_ADDRESS (CURRENT_FUNCTION_VALUE (objfile));
-#endif
- }
- else
- SYMBOL_VALUE (sym) = dn_bufp->dfparam.location;
- SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dfparam.type, objfile);
- add_symbol_to_list (sym, &fparam_symbols);
- break;
-#endif
-
- case DNTT_TYPE_SVAR:
- /* Static variables. */
- SYMBOL_CLASS (sym) = LOC_STATIC;
-
- /* Note: There is a case that arises with globals in shared
- * libraries where we need to set the address to LOC_INDIRECT.
- * This case is if you have a global "g" in one library, and
- * it is referenced "extern <type> g;" in another library.
- * If we're processing the symbols for the referencing library,
- * we'll see a global "g", but in this case the address given
- * in the symbol table contains a pointer to the real "g".
- * We use the storage class LOC_INDIRECT to indicate this. RT
- */
- if (is_in_import_list (SYMBOL_NAME(sym), objfile))
- SYMBOL_CLASS (sym) = LOC_INDIRECT;
-
- SYMBOL_VALUE_ADDRESS (sym) = dn_bufp->dsvar.location + data_offset;
- SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dsvar.type, objfile);
-
- if (dn_bufp->dsvar.global)
- add_symbol_to_list (sym, &global_symbols);
-
- else if (WITHIN_FUNCTION (objfile))
- add_symbol_to_list (sym, &local_symbols);
-
- else
- add_symbol_to_list (sym, &file_symbols);
-
- if (dn_bufp->dsvar.thread_specific)
- {
- /* Thread-local variable.
- */
- SYMBOL_CLASS (sym) = LOC_THREAD_LOCAL_STATIC;
- SYMBOL_BASEREG (sym) = CR27_REGNUM;
-
- if( objfile->flags & OBJF_SHARED ) {
- /*
- * This variable is not only thread local but
- * in a shared library.
- *
- * Alas, the shared lib structures are private
- * to "somsolib.c". But C lets us point to one.
- */
- struct so_list *so;
-
- if( objfile->obj_private == NULL )
- error( "Internal error in reading shared library information." );
-
- so = ((obj_private_data_t *)(objfile->obj_private))->so_info;
- if( so == NULL )
- error( "Internal error in reading shared library information." );
-
- /* Thread-locals in shared libraries do NOT have the
- * standard offset ("data_offset"), so we re-calculate
- * where to look for this variable, using a call-back
- * to interpret the private shared-library data.
- */
- SYMBOL_VALUE_ADDRESS(sym) = dn_bufp->dsvar.location +
- so_lib_thread_start_addr( so );
- }
- }
- break;
-
- case DNTT_TYPE_DVAR:
- /* Dynamic variables. */
- if (dn_bufp->ddvar.regvar)
- SYMBOL_CLASS (sym) = LOC_REGISTER;
- else
- SYMBOL_CLASS (sym) = LOC_LOCAL;
-
- SYMBOL_VALUE (sym) = dn_bufp->ddvar.location;
-#ifdef HPREAD_ADJUST_STACK_ADDRESS
- SYMBOL_VALUE (sym)
- += HPREAD_ADJUST_STACK_ADDRESS (CURRENT_FUNCTION_VALUE (objfile));
-#endif
- SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->ddvar.type, objfile);
- if (dn_bufp->ddvar.global)
- add_symbol_to_list (sym, &global_symbols);
- else if (WITHIN_FUNCTION (objfile))
- add_symbol_to_list (sym, &local_symbols);
- else
- add_symbol_to_list (sym, &file_symbols);
- break;
-
- case DNTT_TYPE_CONST:
- /* A constant (pascal?). */
- SYMBOL_CLASS (sym) = LOC_CONST;
- SYMBOL_VALUE (sym) = dn_bufp->dconst.location;
- SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dconst.type, objfile);
- if (dn_bufp->dconst.global)
- add_symbol_to_list (sym, &global_symbols);
- else if (WITHIN_FUNCTION (objfile))
- add_symbol_to_list (sym, &local_symbols);
- else
- add_symbol_to_list (sym, &file_symbols);
- break;
-
- case DNTT_TYPE_TYPEDEF:
- /* A typedef. We do want to process these, since a name is
- * added to the namespace for the typedef'ed name.
- */
- SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
- SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dtype.type, objfile);
- if (dn_bufp->dtype.global)
- add_symbol_to_list (sym, &global_symbols);
- else if (WITHIN_FUNCTION (objfile))
- add_symbol_to_list (sym, &local_symbols);
- else
- add_symbol_to_list (sym, &file_symbols);
- break;
-
- case DNTT_TYPE_TAGDEF:
- {
- int global = dn_bufp->dtag.global;
- /* Structure, union, enum, template, or class tag definition */
- /* We do want to process these, since a name is
- * added to the namespace for the tag name (and if C++ class,
- * for the typename also).
- */
- SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE;
-
- /* The tag contains in its "type" field a pointer to the
- * DNTT_TYPE_STRUCT, DNTT_TYPE_UNION, DNTT_TYPE_ENUM,
- * DNTT_TYPE_CLASS or DNTT_TYPE_TEMPLATE
- * record that actually defines the type.
- */
- SYMBOL_TYPE (sym) = hpread_type_lookup (dn_bufp->dtype.type, objfile);
- TYPE_NAME (sym->type) = SYMBOL_NAME (sym);
- TYPE_TAG_NAME (sym->type) = SYMBOL_NAME (sym);
- if (dn_bufp->dtag.global)
- add_symbol_to_list (sym, &global_symbols);
- else if (WITHIN_FUNCTION (objfile))
- add_symbol_to_list (sym, &local_symbols);
- else
- add_symbol_to_list (sym, &file_symbols);
-
- /* If this is a C++ class, then we additionally
- * need to define a typedef for the
- * class type. E.g., so that the name "c" becomes visible as
- * a type name when the user says "class c { ... }".
- * In order to figure this out, we need to chase down the "type"
- * field to get to the DNTT_TYPE_CLASS record.
- *
- * We also add the typename for ENUM. Though this isn't
- * strictly correct, it is necessary because of the debug info
- * generated by the aCC compiler, in which we cannot
- * distinguish between:
- * enum e { ... };
- * and
- * typedef enum { ... } e;
- * I.e., the compiler emits the same debug info for the above
- * two cases, in both cases "e" appearing as a tagdef.
- * Therefore go ahead and generate the typename so that
- * "ptype e" will work in the above cases.
- *
- * We also add the typename for TEMPLATE, so as to allow "ptype t"
- * when "t" is a template name.
- */
- if (dn_bufp->dtype.type.dnttp.index < LNTT_SYMCOUNT (objfile))
- dn_bufp = hpread_get_lntt (dn_bufp->dtag.type.dnttp.index, objfile);
- else {
- complain (&hpread_tagdef_complaint);
- return;
- }
- if (dn_bufp->dblock.kind == DNTT_TYPE_CLASS ||
- dn_bufp->dblock.kind == DNTT_TYPE_ENUM ||
- dn_bufp->dblock.kind == DNTT_TYPE_TEMPLATE) {
- struct symbol *newsym;
-
- newsym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
- sizeof (struct symbol));
- memset (newsym, 0, sizeof (struct symbol));
- SYMBOL_NAME (newsym) = name;
- SYMBOL_LANGUAGE (newsym) = language_auto;
- SYMBOL_NAMESPACE (newsym) = VAR_NAMESPACE;
- SYMBOL_LINE (newsym) = 0;
- SYMBOL_VALUE (newsym) = 0;
- SYMBOL_CLASS (newsym) = LOC_TYPEDEF;
- SYMBOL_TYPE (newsym) = sym->type;
- if (global)
- add_symbol_to_list (newsym, &global_symbols);
- else if (WITHIN_FUNCTION (objfile))
- add_symbol_to_list (newsym, &local_symbols);
- else
- add_symbol_to_list (newsym, &file_symbols);
- }
- }
- break;
-
- case DNTT_TYPE_POINTER:
- /* Declares a pointer type. Should not be necessary to do anything
- * with the type at this level; these are processed
- * at the hpread_type_lookup() level.
- */
- break;
-
- case DNTT_TYPE_ENUM:
- /* Declares an enum type. Should not be necessary to do anything
- * with the type at this level; these are processed
- * at the hpread_type_lookup() level.
- */
- break;
-
- case DNTT_TYPE_MEMENUM:
- /* Member of enum */
- /* Ignored at this level, but hpread_read_enum_type() will take
- * care of walking the list of enumeration members.
- */
- break;
-
- case DNTT_TYPE_SET:
- /* Declares a set type. Should not be necessary to do anything
- * with the type at this level; these are processed
- * at the hpread_type_lookup() level.
- */
- break;
-
- case DNTT_TYPE_SUBRANGE:
- /* Declares a subrange type. Should not be necessary to do anything
- * with the type at this level; these are processed
- * at the hpread_type_lookup() level.
- */
- break;
-
- case DNTT_TYPE_ARRAY:
- /* Declares an array type. Should not be necessary to do anything
- * with the type at this level; these are processed
- * at the hpread_type_lookup() level.
- */
- break;
-
- case DNTT_TYPE_STRUCT:
- case DNTT_TYPE_UNION:
- /* Declares an struct/union type.
- * Should not be necessary to do anything
- * with the type at this level; these are processed
- * at the hpread_type_lookup() level.
- */
- break;
-
- case DNTT_TYPE_FIELD:
- /* Structure/union/class field */
- /* Ignored at this level, but hpread_read_struct_type() will take
- * care of walking the list of structure/union/class members.
- */
- break;
-
- /* DNTT_TYPE_VARIANT is not handled by GDB */
-
- /* DNTT_TYPE_FILE is not handled by GDB */
-
- case DNTT_TYPE_FUNCTYPE:
- /* Function type */
- /* Ignored at this level, handled within hpread_type_lookup() */
- break;
-
- case DNTT_TYPE_WITH:
- /* This is emitted within methods to indicate "with <class>"
- * scoping rules (i.e., indicate that the class data members
- * are directly visible).
- * However, since GDB already infers this by looking at the
- * "this" argument, interpreting the DNTT_TYPE_WITH
- * symbol record is unnecessary.
- */
- break;
-
- case DNTT_TYPE_COMMON:
- /* FORTRAN common. Not yet handled. */
- complain (&hpread_unhandled_common_complaint);
- break;
-
- /* DNTT_TYPE_COBSTRUCT is not handled by GDB. */
- /* DNTT_TYPE_XREF is not handled by GDB. */
- /* DNTT_TYPE_SA is not handled by GDB. */
- /* DNTT_TYPE_MACRO is not handled by GDB */
-
- case DNTT_TYPE_BLOCKDATA:
- /* Not sure what this is - part of FORTRAN support maybe?
- * Anyway, not yet handled.
- */
- complain (&hpread_unhandled_blockdata_complaint);
- break;
-
- case DNTT_TYPE_CLASS_SCOPE:
-
-
-
- /* The compiler brackets member functions with a CLASS_SCOPE/END
- * pair of records, presumably to put them in a different scope
- * from the module scope where they are normally defined.
- * E.g., in the situation:
- * void f() { ... }
- * void c::f() { ...}
- * The member function "c::f" will be bracketed by a CLASS_SCOPE/END.
- * This causes "break f" at the module level to pick the
- * the file-level function f(), not the member function
- * (which needs to be referenced via "break c::f").
- *
- * Here we record the class name to generate the demangled names of
- * member functions later.
- *
- * FIXME Not being used now for anything -- cplus_demangle seems
- * enough for getting the class-qualified names of functions. We
- * may need this for handling nested classes and types. */
-
- /* pai: FIXME Not handling nested classes for now -- need to
- * maintain a stack */
-
- dn_temp = hpread_get_lntt (dn_bufp->dclass_scope.type.dnttp.index, objfile);
- if (dn_temp->dblock.kind == DNTT_TYPE_TAGDEF)
- class_scope_name = VT (objfile) + dn_temp->dtag.name;
- else
- class_scope_name = NULL;
-
-#if 0
-
- /* Begin a new scope. */
- SL_INDEX (objfile) = hpread_record_lines (current_subfile,
- SL_INDEX (objfile),
- dn_bufp->dclass_scope.address,
- objfile, offset);
- valu = hpread_get_location (dn_bufp->dclass_scope.address, objfile);
- valu += offset; /* Relocate for dynamic loading */
- desc = hpread_get_scope_start (dn_bufp->dclass_scope.address, objfile);
- /* We use the scope start DNTT index as the nesting depth identifier! */
- new = push_context (desc, valu);
-#endif
- break;
-
- case DNTT_TYPE_REFERENCE:
- /* Declares a C++ reference type. Should not be necessary to do anything
- * with the type at this level; these are processed
- * at the hpread_type_lookup() level.
- */
- break;
-
- case DNTT_TYPE_PTRMEM:
- /* Declares a C++ pointer-to-data-member type. This does not
- * need to be handled at this level; being a type description it
- * is instead handled at the hpread_type_lookup() level.
- */
- break;
-
- case DNTT_TYPE_PTRMEMFUNC:
- /* Declares a C++ pointer-to-function-member type. This does not
- * need to be handled at this level; being a type description it
- * is instead handled at the hpread_type_lookup() level.
- */
- break;
-
- case DNTT_TYPE_CLASS:
- /* Declares a class type.
- * Should not be necessary to do anything
- * with the type at this level; these are processed
- * at the hpread_type_lookup() level.
- */
- break;
-
- case DNTT_TYPE_GENFIELD:
- /* I believe this is used for class member functions */
- /* Ignored at this level, but hpread_read_struct_type() will take
- * care of walking the list of class members.
- */
- break;
-
- case DNTT_TYPE_VFUNC:
- /* Virtual function */
- /* This does not have to be handled at this level; handled in
- * the course of processing class symbols.
- */
- break;
-
- case DNTT_TYPE_MEMACCESS:
- /* DDE ignores this symbol table record.
- * It has something to do with "modified access" to class members.
- * I'll assume we can safely ignore it too.
- */
- break;
-
- case DNTT_TYPE_INHERITANCE:
- /* These don't have to be handled here, since they are handled
- * within hpread_read_struct_type() in the process of constructing
- * a class type.
- */
- break;
-
- case DNTT_TYPE_FRIEND_CLASS:
- case DNTT_TYPE_FRIEND_FUNC:
- /* These can safely be ignored, as GDB doesn't need this
- * info. DDE only uses it in "describe". We may later want
- * to extend GDB's "ptype" to give this info, but for now
- * it seems safe enough to ignore it.
- */
- break;
-
- case DNTT_TYPE_MODIFIER:
- /* Intended to supply "modified access" to a type */
- /* From the way DDE handles this, it looks like it always
- * modifies a type. Therefore it is safe to ignore it at this
- * level, and handle it in hpread_type_lookup().
- */
- break;
-
- case DNTT_TYPE_OBJECT_ID:
- /* Just ignore this - that's all DDE does */
- break;
-
- case DNTT_TYPE_MEMFUNC:
- /* Member function */
- /* This does not have to be handled at this level; handled in
- * the course of processing class symbols.
- */
- break;
-
- case DNTT_TYPE_DOC_MEMFUNC:
- /* Member function */
- /* This does not have to be handled at this level; handled in
- * the course of processing class symbols.
- */
- break;
-
- case DNTT_TYPE_TEMPLATE:
- /* Template - sort of the header for a template definition,
- * which like a class, points to a member list and also points
- * to a TEMPLATE_ARG list of type-arguments.
- * We do not need to process TEMPLATE records at this level though.
- */
- break;
-
- case DNTT_TYPE_TEMPLATE_ARG:
- /* The TEMPLATE record points to an argument list of
- * TEMPLATE_ARG records, each of which describes one
- * of the type-arguments.
- * We do not need to process TEMPLATE_ARG records at this level though.
- */
- break;
-
- case DNTT_TYPE_FUNC_TEMPLATE:
- /* This will get emitted for member functions of templates.
- * But we don't need to process this record at this level though,
- * we will process it in the course of processing a TEMPLATE
- * record.
- */
- break;
-
- case DNTT_TYPE_LINK:
- /* The LINK record is used to link up templates with instantiations. */
- /* It is not clear why this is needed, and furthermore aCC does
- * not appear to generate this, so I think we can safely ignore it. - RT
- */
- break;
-
- /* DNTT_TYPE_DYN_ARRAY_DESC is not handled by GDB */
- /* DNTT_TYPE_DESC_SUBRANGE is not handled by GDB */
- /* DNTT_TYPE_BEGIN_EXT is not handled by GDB */
- /* DNTT_TYPE_INLN is not handled by GDB */
- /* DNTT_TYPE_INLN_LIST is not handled by GDB */
- /* DNTT_TYPE_ALIAS is not handled by GDB */
-
- default:
- break;
- }
-}
-
-/* Get nesting depth for a DNTT entry.
- * DN_BUFP points to a DNTT entry.
- * OBJFILE is the object file.
- * REPORT_NESTED is a flag; if 0, real nesting depth is
- * reported, if it is 1, the function simply returns a
- * non-zero value if the nesting depth is anything > 0.
- *
- * Return value is an integer. 0 => not a local type / name
- * positive return => type or name is local to some
- * block or function.
- */
-
-
-/* elz: ATTENTION: FIXME: NOTE: WARNING!!!!
- this function now returns 0 right away. It was taking too much time
- at start up. Now, though, the local types are not handled correctly.
-*/
-
-
-static int
-hpread_get_scope_depth (dn_bufp, objfile, report_nested)
- union dnttentry * dn_bufp;
- struct objfile * objfile;
- int report_nested;
-{
- register int index;
- register union dnttentry * dn_tmp;
- register short depth = 0;
-/****************************/
- return 0;
-/****************************/
-
- index = (((char *) dn_bufp) - LNTT (objfile)) / (sizeof (struct dntt_type_block));
-
- while (--index >= 0)
- {
- dn_tmp = hpread_get_lntt (index, objfile);
- switch (dn_tmp->dblock.kind)
- {
- case DNTT_TYPE_MODULE:
- return depth;
- case DNTT_TYPE_END:
- /* index is signed int; dnttp.index is 29-bit unsigned int! */
- index = (int) dn_tmp->dend.beginscope.dnttp.index;
- break;
- case DNTT_TYPE_BEGIN:
- case DNTT_TYPE_FUNCTION:
- case DNTT_TYPE_DOC_FUNCTION:
- case DNTT_TYPE_WITH:
- case DNTT_TYPE_COMMON:
- case DNTT_TYPE_CLASS_SCOPE:
- depth++;
- if (report_nested)
- return 1;
- break;
- default:
- break;
- }
- }
- return depth;
-}
-
-/* Adjust the bitoffsets for all fields of an anonymous union of
- type TYPE by negative BITS. This handles HP aCC's hideous habit
- of giving members of anonymous unions bit offsets relative to the
- enclosing structure instead of relative to the union itself. */
-
-static void
-hpread_adjust_bitoffsets (type, bits)
- struct type * type;
- int bits;
-{
- register int i;
-
- /* This is done only for unions; caller had better check that
- it is an anonymous one. */
- if (TYPE_CODE (type) != TYPE_CODE_UNION)
- return;
-
- /* Adjust each field; since this is a union, there are no base
- classes. Also no static membes. Also, no need for recursion as
- the members of this union if themeselves structs or unions, have
- the correct bitoffsets; if an anonymous union is a member of this
- anonymous union, the code in hpread_read_struct_type() will
- adjust for that. */
-
- for (i = 0; i < TYPE_NFIELDS (type); i++)
- TYPE_FIELD_BITPOS (type, i) -= bits;
-}
-
-/* Because of quirks in HP compilers' treatment of anonymous unions inside
- classes, we have to chase through a chain of threaded FIELD entries.
- If we encounter an anonymous union in the chain, we must recursively skip over
- that too.
-
- This function does a "next" in the chain of FIELD entries, but transparently
- skips over anonymous unions' fields (recursively).
-
- Inputs are the number of times to do "next" at the top level, the dnttpointer
- (FIELD) and entry pointer (FIELDP) for the dntt record corresponding to it,
- and the ubiquitous objfile parameter. (Note: FIELDP is a **.) Return value
- is a dnttpointer for the new field after all the skipped ones */
-
-static dnttpointer
-hpread_get_next_skip_over_anon_unions (skip_fields, field, fieldp, objfile)
- int skip_fields;
- dnttpointer field;
- union dnttentry ** fieldp;
- struct objfile * objfile;
-{
- struct type * anon_type;
- register int i;
- int bitoffset;
- char * name;
-
- for (i=0; i < skip_fields; i++)
- {
- /* Get type of item we're looking at now; recursively processes the types
- of these intermediate items we skip over, so they aren't lost. */
- anon_type = hpread_type_lookup ((*fieldp)->dfield.type, objfile);
- anon_type = CHECK_TYPEDEF (anon_type);
- bitoffset = (*fieldp)->dfield.bitoffset;
- name = VT (objfile) + (*fieldp)->dfield.name;
- /* First skip over one item to avoid stack death on recursion */
- field = (*fieldp)->dfield.nextfield;
- *fieldp = hpread_get_lntt (field.dnttp.index, objfile);
- /* Do we have another anonymous union? If so, adjust the bitoffsets
- of its members and skip over its members. */
- if ((TYPE_CODE (anon_type) == TYPE_CODE_UNION) &&
- (!name || STREQ (name, "")))
- {
- hpread_adjust_bitoffsets (anon_type, bitoffset);
- field = hpread_get_next_skip_over_anon_unions (TYPE_NFIELDS (anon_type), field, fieldp, objfile);
- }
- }
- return field;
-}
-
-
diff --git a/contrib/gdb/gdb/hpread.h b/contrib/gdb/gdb/hpread.h
deleted file mode 100644
index 7864dd651502..000000000000
--- a/contrib/gdb/gdb/hpread.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/* hpread.h
- * Common include file for:
- * hp_symtab_read.c
- * hp_psymtab_read.c
- */
-
-/* Copyright 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.
-
- Written by the Center for Software Science at the University of Utah
- and by Cygnus Support. */
-
-#include "defs.h"
-#include "bfd.h"
-#include "gdb_string.h"
-#include "hp-symtab.h"
-#include "syms.h"
-#include "symtab.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "buildsym.h"
-#include "complaints.h"
-#include "gdb-stabs.h"
-#include "gdbtypes.h"
-#include "demangle.h"
-
-/* Private information attached to an objfile which we use to find
- and internalize the HP C debug symbols within that objfile. */
-
-struct hpread_symfile_info
-{
- /* The contents of each of the debug sections (there are 4 of them). */
- char *gntt;
- char *lntt;
- char *slt;
- char *vt;
-
- /* We keep the size of the $VT$ section for range checking. */
- unsigned int vt_size;
-
- /* Some routines still need to know the number of symbols in the
- main debug sections ($LNTT$ and $GNTT$). */
- unsigned int lntt_symcount;
- unsigned int gntt_symcount;
-
- /* To keep track of all the types we've processed. */
- struct type **type_vector;
- int type_vector_length;
-
- /* Keeps track of the beginning of a range of source lines. */
- sltpointer sl_index;
-
- /* Some state variables we'll need. */
- int within_function;
-
- /* Keep track of the current function's address. We may need to look
- up something based on this address. */
- unsigned int current_function_value;
-};
-
-/* Accessor macros to get at the fields. */
-#define HPUX_SYMFILE_INFO(o) \
- ((struct hpread_symfile_info *)((o)->sym_private))
-#define GNTT(o) (HPUX_SYMFILE_INFO(o)->gntt)
-#define LNTT(o) (HPUX_SYMFILE_INFO(o)->lntt)
-#define SLT(o) (HPUX_SYMFILE_INFO(o)->slt)
-#define VT(o) (HPUX_SYMFILE_INFO(o)->vt)
-#define VT_SIZE(o) (HPUX_SYMFILE_INFO(o)->vt_size)
-#define LNTT_SYMCOUNT(o) (HPUX_SYMFILE_INFO(o)->lntt_symcount)
-#define GNTT_SYMCOUNT(o) (HPUX_SYMFILE_INFO(o)->gntt_symcount)
-#define TYPE_VECTOR(o) (HPUX_SYMFILE_INFO(o)->type_vector)
-#define TYPE_VECTOR_LENGTH(o) (HPUX_SYMFILE_INFO(o)->type_vector_length)
-#define SL_INDEX(o) (HPUX_SYMFILE_INFO(o)->sl_index)
-#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)) \
- { \
- complain (&string_table_offset_complaint, (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. */
-
-struct symloc
-{
- /* The offset within the file symbol table of first local symbol for
- this file. */
-
- int ldsymoff;
-
- /* Length (in bytes) of the section of the symbol table devoted to
- this file's symbols (actually, the section bracketed may contain
- more than just this file's symbols). If ldsymlen is 0, the only
- reason for this thing's existence is the dependency list.
- Nothing else will happen when it is read in. */
-
- int ldsymlen;
-};
-
-#define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
-#define LDSYMLEN(p) (((struct symloc *)((p)->read_symtab_private))->ldsymlen)
-#define SYMLOC(p) ((struct symloc *)((p)->read_symtab_private))
-
-/* FIXME: Shouldn't this stuff be in a .h file somewhere? */
-/* Nonzero means give verbose info on gdb action. */
-extern int info_verbose;
-
-/* Complaints about the symbols we have encountered. */
-extern struct complaint string_table_offset_complaint;
-extern struct complaint lbrac_unmatched_complaint;
-extern struct complaint lbrac_mismatch_complaint;
-
-extern union sltentry *hpread_get_slt
- PARAMS ((int, struct objfile *));
-
-extern union dnttentry *hpread_get_lntt
- PARAMS ((int, struct objfile *));
-
-int hpread_has_name
- PARAMS ((enum dntt_entry_type));
-
-/* end of hpread.h */
diff --git a/contrib/gdb/gdb/i386gnu-nat.c b/contrib/gdb/gdb/i386gnu-nat.c
deleted file mode 100644
index 9188ea4c654f..000000000000
--- a/contrib/gdb/gdb/i386gnu-nat.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/* Low level interface to i386 running the GNU Hurd.
- Copyright 1992, 1995, 1996, 1998, 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 "floatformat.h"
-#include "regcache.h"
-
-#include "gdb_assert.h"
-#include <errno.h>
-#include <stdio.h>
-
-#include <mach.h>
-#include <mach_error.h>
-#include <mach/message.h>
-#include <mach/exception.h>
-
-#include "i386-tdep.h"
-
-#include "gnu-nat.h"
-#include "i387-nat.h"
-
-
-/* Offset to the thread_state_t location where REG is stored. */
-#define REG_OFFSET(reg) offsetof (struct i386_thread_state, reg)
-
-/* At REG_OFFSET[N] is the offset to the thread_state_t location where
- the GDB register N is stored. */
-static int reg_offset[] =
-{
- REG_OFFSET (eax), REG_OFFSET (ecx), REG_OFFSET (edx), REG_OFFSET (ebx),
- REG_OFFSET (uesp), REG_OFFSET (ebp), REG_OFFSET (esi), REG_OFFSET (edi),
- REG_OFFSET (eip), REG_OFFSET (efl), REG_OFFSET (cs), REG_OFFSET (ss),
- REG_OFFSET (ds), REG_OFFSET (es), REG_OFFSET (fs), REG_OFFSET (gs)
-};
-
-#define REG_ADDR(state, regnum) ((char *)(state) + reg_offset[regnum])
-
-
-/* Get the whole floating-point state of THREAD and record the
- values of the corresponding (pseudo) registers. */
-static void
-fetch_fpregs (struct proc *thread)
-{
- mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
- struct i386_float_state state;
- error_t err;
-
- err = thread_get_state (thread->port, i386_FLOAT_STATE,
- (thread_state_t) &state, &count);
- if (err)
- {
- warning ("Couldn't fetch floating-point state from %s",
- proc_string (thread));
- return;
- }
-
- if (!state.initialized)
- /* The floating-point state isn't initialized. */
- {
- int i;
-
- for (i = FP0_REGNUM; i <= FOP_REGNUM; i++)
- supply_register (i, NULL);
-
- return;
- }
-
- /* Supply the floating-point registers. */
- i387_supply_fsave (state.hw_state);
-}
-
-/* Fetch register REGNO, or all regs if REGNO is -1. */
-void
-gnu_fetch_registers (int regno)
-{
- struct proc *thread;
-
- /* Make sure we know about new threads. */
- inf_update_procs (current_inferior);
-
- thread = inf_tid_to_thread (current_inferior, PIDGET (inferior_ptid));
- if (!thread)
- error ("Can't fetch registers from thread %d: No such thread",
- PIDGET (inferior_ptid));
-
- if (regno < NUM_GREGS || regno == -1)
- {
- thread_state_t state;
-
- /* This does the dirty work for us. */
- state = proc_get_state (thread, 0);
- if (!state)
- {
- warning ("Couldn't fetch registers from %s",
- proc_string (thread));
- return;
- }
-
- if (regno == -1)
- {
- int i;
-
- proc_debug (thread, "fetching all register");
-
- for (i = 0; i < NUM_GREGS; i++)
- supply_register (i, REG_ADDR (state, i));
- thread->fetched_regs = ~0;
- }
- else
- {
- proc_debug (thread, "fetching register %s", REGISTER_NAME (regno));
-
- supply_register (regno, REG_ADDR (state, regno));
- thread->fetched_regs |= (1 << regno);
- }
- }
-
- if (regno >= NUM_GREGS || regno == -1)
- {
- proc_debug (thread, "fetching floating-point registers");
-
- fetch_fpregs (thread);
- }
-}
-
-
-/* Store the whole floating-point state into THREAD using information
- from the corresponding (pseudo) registers. */
-static void
-store_fpregs (struct proc *thread, int regno)
-{
- mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
- struct i386_float_state state;
- error_t err;
-
- err = thread_get_state (thread->port, i386_FLOAT_STATE,
- (thread_state_t) &state, &count);
- if (err)
- {
- warning ("Couldn't fetch floating-point state from %s",
- proc_string (thread));
- return;
- }
-
- /* FIXME: kettenis/2001-07-15: Is this right? Should we somehow
- take into account REGISTER_VALID like the old code did? */
- i387_fill_fsave (state.hw_state, regno);
-
- err = thread_set_state (thread->port, i386_FLOAT_STATE,
- (thread_state_t) &state, i386_FLOAT_STATE_COUNT);
- if (err)
- {
- warning ("Couldn't store floating-point state into %s",
- proc_string (thread));
- return;
- }
-}
-
-/* Store at least register REGNO, or all regs if REGNO == -1. */
-void
-gnu_store_registers (int regno)
-{
- struct proc *thread;
-
- /* Make sure we know about new threads. */
- inf_update_procs (current_inferior);
-
- thread = inf_tid_to_thread (current_inferior, PIDGET (inferior_ptid));
- if (!thread)
- error ("Couldn't store registers into thread %d: No such thread",
- PIDGET (inferior_ptid));
-
- if (regno < NUM_GREGS || regno == -1)
- {
- thread_state_t state;
- thread_state_data_t old_state;
- int was_aborted = thread->aborted;
- int was_valid = thread->state_valid;
- int trace;
-
- if (!was_aborted && was_valid)
- memcpy (&old_state, &thread->state, sizeof (old_state));
-
- state = proc_get_state (thread, 1);
- if (!state)
- {
- warning ("Couldn't store registers into %s", proc_string (thread));
- return;
- }
-
- /* Save the T bit. We might try to restore the %eflags register
- below, but changing the T bit would seriously confuse GDB. */
- trace = ((struct i386_thread_state *)state)->efl & 0x100;
-
- if (!was_aborted && was_valid)
- /* See which registers have changed after aborting the thread. */
- {
- int check_regno;
-
- for (check_regno = 0; check_regno < NUM_GREGS; check_regno++)
- if ((thread->fetched_regs & (1 << check_regno))
- && memcpy (REG_ADDR (&old_state, check_regno),
- REG_ADDR (state, check_regno),
- REGISTER_RAW_SIZE (check_regno)))
- /* Register CHECK_REGNO has changed! Ack! */
- {
- warning ("Register %s changed after the thread was aborted",
- REGISTER_NAME (check_regno));
- if (regno >= 0 && regno != check_regno)
- /* Update GDB's copy of the register. */
- supply_register (check_regno, REG_ADDR (state, check_regno));
- else
- warning ("... also writing this register! Suspicious...");
- }
- }
-
-#define fill(state, regno) \
- memcpy (REG_ADDR(state, regno), &registers[REGISTER_BYTE (regno)], \
- REGISTER_RAW_SIZE (regno))
-
- if (regno == -1)
- {
- int i;
-
- proc_debug (thread, "storing all registers");
-
- for (i = 0; i < NUM_GREGS; i++)
- if (register_valid[i])
- fill (state, i);
- }
- else
- {
- proc_debug (thread, "storing register %s", REGISTER_NAME (regno));
-
- gdb_assert (register_valid[regno]);
- fill (state, regno);
- }
-
- /* Restore the T bit. */
- ((struct i386_thread_state *)state)->efl &= ~0x100;
- ((struct i386_thread_state *)state)->efl |= trace;
- }
-
-#undef fill
-
- if (regno >= NUM_GREGS || regno == -1)
- {
- proc_debug (thread, "storing floating-point registers");
-
- store_fpregs (thread, regno);
- }
-}
diff --git a/contrib/gdb/gdb/irix4-nat.c b/contrib/gdb/gdb/irix4-nat.c
deleted file mode 100644
index 0f447767af2f..000000000000
--- a/contrib/gdb/gdb/irix4-nat.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/* Native support for the SGI Iris running IRIX version 4, for GDB.
- Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1996, 1999, 2000,
- 2001 Free Software Foundation, Inc.
- Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
- and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
- Implemented for Irix 4.x by Garrett A. Wollman.
-
- 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/time.h>
-#include <sys/procfs.h>
-#include <setjmp.h> /* For JB_XXX. */
-
-/* Prototypes for supply_gregset etc. */
-#include "gregset.h"
-
-/* Size of elements in jmpbuf */
-
-#define JB_ELEMENT_SIZE 4
-
-typedef unsigned int greg_t; /* why isn't this defined? */
-
-static void fetch_core_registers (char *, unsigned int, int, CORE_ADDR);
-
-/*
- * See the comment in m68k-tdep.c regarding the utility of these functions.
- */
-
-void
-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};
-
- /* FIXME: somewhere, there should be a #define for the meaning
- of this magic number 32; we should use that. */
- for (regi = 0; regi < 32; regi++)
- supply_register (regi, (char *) (regp + regi));
-
- supply_register (PC_REGNUM, (char *) &(gregsetp->gp_pc));
- supply_register (HI_REGNUM, (char *) &(gregsetp->gp_mdhi));
- supply_register (LO_REGNUM, (char *) &(gregsetp->gp_mdlo));
- supply_register (CAUSE_REGNUM, (char *) &(gregsetp->gp_cause));
-
- /* Fill inaccessible registers with zero. */
- supply_register (BADVADDR_REGNUM, zerobuf);
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
- int regi;
- register greg_t *regp = (greg_t *) (gregsetp->gp_regs);
-
- /* same FIXME as above wrt 32 */
- for (regi = 0; regi < 32; regi++)
- if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(greg_t *) & registers[REGISTER_BYTE (regi)];
-
- if ((regno == -1) || (regno == PC_REGNUM))
- gregsetp->gp_pc = *(greg_t *) & registers[REGISTER_BYTE (PC_REGNUM)];
-
- if ((regno == -1) || (regno == CAUSE_REGNUM))
- gregsetp->gp_cause = *(greg_t *) & registers[REGISTER_BYTE (CAUSE_REGNUM)];
-
- if ((regno == -1) || (regno == HI_REGNUM))
- gregsetp->gp_mdhi = *(greg_t *) & registers[REGISTER_BYTE (HI_REGNUM)];
-
- if ((regno == -1) || (regno == LO_REGNUM))
- gregsetp->gp_mdlo = *(greg_t *) & registers[REGISTER_BYTE (LO_REGNUM)];
-}
-
-/*
- * Now we do the same thing for floating-point registers.
- * We don't bother to condition on FP0_REGNUM since any
- * reasonable MIPS configuration has an R3010 in it.
- *
- * Again, see the comments in m68k-tdep.c.
- */
-
-void
-supply_fpregset (fpregset_t *fpregsetp)
-{
- register int regi;
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
- {0};
-
- for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi,
- (char *) &fpregsetp->fp_r.fp_regs[regi]);
-
- supply_register (FCRCS_REGNUM, (char *) &fpregsetp->fp_csr);
-
- /* FIXME: how can we supply FCRIR_REGNUM? SGI doesn't tell us. */
- supply_register (FCRIR_REGNUM, zerobuf);
-}
-
-void
-fill_fpregset (fpregset_t *fpregsetp, int regno)
-{
- int regi;
- char *from, *to;
-
- for (regi = FP0_REGNUM; regi < FP0_REGNUM + 32; regi++)
- {
- if ((regno == -1) || (regno == regi))
- {
- from = (char *) &registers[REGISTER_BYTE (regi)];
- to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
- memcpy (to, from, REGISTER_RAW_SIZE (regi));
- }
- }
-
- if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) &registers[REGISTER_BYTE (FCRCS_REGNUM)];
-}
-
-
-/* Figure out where the longjmp will land.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
- This routine returns true on success. */
-
-int
-get_longjmp_target (CORE_ADDR *pc)
-{
- char *buf;
- CORE_ADDR jb_addr;
-
- buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
- jb_addr = read_register (A0_REGNUM);
-
- if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
- return 0;
-
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
- return 1;
-}
-
-/* Provide registers to GDB from a core file.
-
- CORE_REG_SECT points to an array of bytes, which were obtained from
- a core file which BFD thinks might contain register contents.
- CORE_REG_SIZE is its size.
-
- Normally, WHICH says which register set corelow suspects this is:
- 0 --- the general-purpose register set
- 2 --- the floating-point register set
- However, for Irix 4, WHICH isn't used.
-
- REG_ADDR is also unused. */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
- int which, CORE_ADDR reg_addr)
-{
- if (core_reg_size != REGISTER_BYTES)
- {
- warning ("wrong size gregset struct in core file");
- return;
- }
-
- memcpy ((char *) registers, core_reg_sect, core_reg_size);
-}
-
-
-/* Register that we are able to handle irix4 core file formats.
- FIXME: is this really bfd_target_unknown_flavour? */
-
-static struct core_fns irix4_core_fns =
-{
- bfd_target_unknown_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
-void
-_initialize_core_irix4 (void)
-{
- add_core_fns (&irix4_core_fns);
-}
diff --git a/contrib/gdb/gdb/irix5-nat.c b/contrib/gdb/gdb/irix5-nat.c
deleted file mode 100644
index 459abe3879c8..000000000000
--- a/contrib/gdb/gdb/irix5-nat.c
+++ /dev/null
@@ -1,1320 +0,0 @@
-/* Native support for the SGI Iris running IRIX version 5, for GDB.
- Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
- 1999, 2000, 2001 Free Software Foundation, Inc.
- Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
- and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
- Implemented for Irix 4.x by Garrett A. Wollman.
- Modified for Irix 5.x by Ian Lance Taylor.
-
- 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 "target.h"
-#include "regcache.h"
-
-#include "gdb_string.h"
-#include <sys/time.h>
-#include <sys/procfs.h>
-#include <setjmp.h> /* For JB_XXX. */
-
-/* Prototypes for supply_gregset etc. */
-#include "gregset.h"
-
-static void fetch_core_registers (char *, unsigned int, int, CORE_ADDR);
-
-/* Size of elements in jmpbuf */
-
-#define JB_ELEMENT_SIZE 4
-
-/*
- * See the comment in m68k-tdep.c regarding the utility of these functions.
- *
- * These definitions are from the MIPS SVR4 ABI, so they may work for
- * any MIPS SVR4 target.
- */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
- register int regi;
- register greg_t *regp = &(*gregsetp)[0];
- int gregoff = sizeof (greg_t) - MIPS_REGSIZE;
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
- {0};
-
- for (regi = 0; regi <= CTX_RA; regi++)
- supply_register (regi, (char *) (regp + regi) + gregoff);
-
- supply_register (PC_REGNUM, (char *) (regp + CTX_EPC) + gregoff);
- supply_register (HI_REGNUM, (char *) (regp + CTX_MDHI) + gregoff);
- supply_register (LO_REGNUM, (char *) (regp + CTX_MDLO) + gregoff);
- supply_register (CAUSE_REGNUM, (char *) (regp + CTX_CAUSE) + gregoff);
-
- /* Fill inaccessible registers with zero. */
- supply_register (BADVADDR_REGNUM, zerobuf);
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
- int regi;
- register greg_t *regp = &(*gregsetp)[0];
-
- /* Under Irix6, if GDB is built with N32 ABI and is debugging an O32
- executable, we have to sign extend the registers to 64 bits before
- filling in the gregset structure. */
-
- for (regi = 0; regi <= CTX_RA; regi++)
- if ((regno == -1) || (regno == regi))
- *(regp + regi) =
- extract_signed_integer (&registers[REGISTER_BYTE (regi)],
- REGISTER_RAW_SIZE (regi));
-
- if ((regno == -1) || (regno == PC_REGNUM))
- *(regp + CTX_EPC) =
- extract_signed_integer (&registers[REGISTER_BYTE (PC_REGNUM)],
- REGISTER_RAW_SIZE (PC_REGNUM));
-
- if ((regno == -1) || (regno == CAUSE_REGNUM))
- *(regp + CTX_CAUSE) =
- extract_signed_integer (&registers[REGISTER_BYTE (CAUSE_REGNUM)],
- REGISTER_RAW_SIZE (CAUSE_REGNUM));
-
- if ((regno == -1) || (regno == HI_REGNUM))
- *(regp + CTX_MDHI) =
- extract_signed_integer (&registers[REGISTER_BYTE (HI_REGNUM)],
- REGISTER_RAW_SIZE (HI_REGNUM));
-
- if ((regno == -1) || (regno == LO_REGNUM))
- *(regp + CTX_MDLO) =
- extract_signed_integer (&registers[REGISTER_BYTE (LO_REGNUM)],
- REGISTER_RAW_SIZE (LO_REGNUM));
-}
-
-/*
- * Now we do the same thing for floating-point registers.
- * We don't bother to condition on FP0_REGNUM since any
- * reasonable MIPS configuration has an R3010 in it.
- *
- * Again, see the comments in m68k-tdep.c.
- */
-
-void
-supply_fpregset (fpregset_t *fpregsetp)
-{
- register int regi;
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
- {0};
-
- /* FIXME, this is wrong for the N32 ABI which has 64 bit FP regs. */
-
- for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi,
- (char *) &fpregsetp->fp_r.fp_regs[regi]);
-
- supply_register (FCRCS_REGNUM, (char *) &fpregsetp->fp_csr);
-
- /* FIXME: how can we supply FCRIR_REGNUM? SGI doesn't tell us. */
- supply_register (FCRIR_REGNUM, zerobuf);
-}
-
-void
-fill_fpregset (fpregset_t *fpregsetp, int regno)
-{
- int regi;
- char *from, *to;
-
- /* FIXME, this is wrong for the N32 ABI which has 64 bit FP regs. */
-
- for (regi = FP0_REGNUM; regi < FP0_REGNUM + 32; regi++)
- {
- if ((regno == -1) || (regno == regi))
- {
- from = (char *) &registers[REGISTER_BYTE (regi)];
- to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
- memcpy (to, from, REGISTER_RAW_SIZE (regi));
- }
- }
-
- if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) &registers[REGISTER_BYTE (FCRCS_REGNUM)];
-}
-
-
-/* Figure out where the longjmp will land.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
- This routine returns true on success. */
-
-int
-get_longjmp_target (CORE_ADDR *pc)
-{
- char *buf;
- CORE_ADDR jb_addr;
-
- buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
- jb_addr = read_register (A0_REGNUM);
-
- if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
- return 0;
-
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
- return 1;
-}
-
-/* Provide registers to GDB from a core file.
-
- CORE_REG_SECT points to an array of bytes, which were obtained from
- a core file which BFD thinks might contain register contents.
- CORE_REG_SIZE is its size.
-
- Normally, WHICH says which register set corelow suspects this is:
- 0 --- the general-purpose register set
- 2 --- the floating-point register set
- However, for Irix 5, WHICH isn't used.
-
- REG_ADDR is also unused. */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
- int which, CORE_ADDR reg_addr)
-{
- if (core_reg_size == REGISTER_BYTES)
- {
- memcpy ((char *) registers, core_reg_sect, core_reg_size);
- }
- else if (MIPS_REGSIZE == 4 &&
- core_reg_size == (2 * MIPS_REGSIZE) * NUM_REGS)
- {
- /* This is a core file from a N32 executable, 64 bits are saved
- for all registers. */
- char *srcp = core_reg_sect;
- char *dstp = registers;
- int regno;
-
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- if (regno >= FP0_REGNUM && regno < (FP0_REGNUM + 32))
- {
- /* FIXME, this is wrong, N32 has 64 bit FP regs, but GDB
- currently assumes that they are 32 bit. */
- *dstp++ = *srcp++;
- *dstp++ = *srcp++;
- *dstp++ = *srcp++;
- *dstp++ = *srcp++;
- if (REGISTER_RAW_SIZE (regno) == 4)
- {
- /* copying 4 bytes from eight bytes?
- I don't see how this can be right... */
- srcp += 4;
- }
- else
- {
- /* copy all 8 bytes (sizeof(double)) */
- *dstp++ = *srcp++;
- *dstp++ = *srcp++;
- *dstp++ = *srcp++;
- *dstp++ = *srcp++;
- }
- }
- else
- {
- srcp += 4;
- *dstp++ = *srcp++;
- *dstp++ = *srcp++;
- *dstp++ = *srcp++;
- *dstp++ = *srcp++;
- }
- }
- }
- else
- {
- warning ("wrong size gregset struct in core file");
- return;
- }
-
- registers_fetched ();
-}
-
-/* Irix 5 uses what appears to be a unique form of shared library
- support. This is a copy of solib.c modified for Irix 5. */
-/* FIXME: Most of this code could be merged with osfsolib.c and solib.c
- by using next_link_map_member and xfer_link_map_member in solib.c. */
-
-#include <sys/types.h>
-#include <signal.h>
-#include <sys/param.h>
-#include <fcntl.h>
-
-/* <obj.h> includes <sym.h> and <symconst.h>, which causes conflicts
- with our versions of those files included by tm-mips.h. Prevent
- <obj.h> from including them with some appropriate defines. */
-#define __SYM_H__
-#define __SYMCONST_H__
-#include <obj.h>
-#ifdef HAVE_OBJLIST_H
-#include <objlist.h>
-#endif
-
-#ifdef NEW_OBJ_INFO_MAGIC
-#define HANDLE_NEW_OBJ_LIST
-#endif
-
-#include "symtab.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "command.h"
-#include "frame.h"
-#include "gdb_regex.h"
-#include "inferior.h"
-#include "language.h"
-#include "gdbcmd.h"
-
-/* The symbol which starts off the list of shared libraries. */
-#define DEBUG_BASE "__rld_obj_head"
-
-/* Irix 6.x introduces a new variant of object lists.
- To be able to debug O32 executables under Irix 6, we have to handle both
- variants. */
-
-typedef enum
-{
- OBJ_LIST_OLD, /* Pre Irix 6.x object list. */
- OBJ_LIST_32, /* 32 Bit Elf32_Obj_Info. */
- OBJ_LIST_64 /* 64 Bit Elf64_Obj_Info, FIXME not yet implemented. */
-}
-obj_list_variant;
-
-/* Define our own link_map structure.
- This will help to share code with osfsolib.c and solib.c. */
-
-struct link_map
- {
- obj_list_variant l_variant; /* which variant of object list */
- CORE_ADDR l_lladdr; /* addr in inferior list was read from */
- CORE_ADDR l_next; /* address of next object list entry */
- };
-
-/* Irix 5 shared objects are pre-linked to particular addresses
- although the dynamic linker may have to relocate them if the
- address ranges of the libraries used by the main program clash.
- The offset is the difference between the address where the object
- is mapped and the binding address of the shared library. */
-#define LM_OFFSET(so) ((so) -> offset)
-/* Loaded address of shared library. */
-#define LM_ADDR(so) ((so) -> lmstart)
-
-char shadow_contents[BREAKPOINT_MAX]; /* Stash old bkpt addr contents */
-
-struct so_list
- {
- struct so_list *next; /* next structure in linked list */
- struct link_map lm;
- CORE_ADDR offset; /* prelink to load address offset */
- char *so_name; /* shared object lib name */
- CORE_ADDR lmstart; /* lower addr bound of mapped object */
- CORE_ADDR lmend; /* upper addr bound of mapped object */
- char symbols_loaded; /* flag: symbols read in yet? */
- char from_tty; /* flag: print msgs? */
- struct objfile *objfile; /* objfile for loaded lib */
- struct section_table *sections;
- struct section_table *sections_end;
- struct section_table *textsection;
- bfd *abfd;
- };
-
-static struct so_list *so_list_head; /* List of known shared objects */
-static CORE_ADDR debug_base; /* Base of dynamic linker structures */
-static CORE_ADDR breakpoint_addr; /* Address where end bkpt is set */
-
-/* Local function prototypes */
-
-static void sharedlibrary_command (char *, int);
-
-static int enable_break (void);
-
-static int disable_break (void);
-
-static void info_sharedlibrary_command (char *, int);
-
-static int symbol_add_stub (void *);
-
-static struct so_list *find_solib (struct so_list *);
-
-static struct link_map *first_link_map_member (void);
-
-static struct link_map *next_link_map_member (struct so_list *);
-
-static void xfer_link_map_member (struct so_list *, struct link_map *);
-
-static CORE_ADDR locate_base (void);
-
-static int solib_map_sections (void *);
-
-/*
-
- LOCAL FUNCTION
-
- solib_map_sections -- open bfd and build sections for shared lib
-
- SYNOPSIS
-
- static int solib_map_sections (struct so_list *so)
-
- DESCRIPTION
-
- Given a pointer to one of the shared objects in our list
- of mapped objects, use the recorded name to open a bfd
- descriptor for the object, build a section table, and then
- relocate all the section addresses by the base address at
- which the shared object was mapped.
-
- FIXMES
-
- In most (all?) cases the shared object file name recorded in the
- dynamic linkage tables will be a fully qualified pathname. For
- cases where it isn't, do we really mimic the systems search
- mechanism correctly in the below code (particularly the tilde
- expansion stuff?).
- */
-
-static int
-solib_map_sections (void *arg)
-{
- struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */
- char *filename;
- char *scratch_pathname;
- int scratch_chan;
- struct section_table *p;
- struct cleanup *old_chain;
- bfd *abfd;
-
- filename = tilde_expand (so->so_name);
- old_chain = make_cleanup (xfree, filename);
-
- scratch_chan = openp (getenv ("PATH"), 1, filename, O_RDONLY, 0,
- &scratch_pathname);
- if (scratch_chan < 0)
- {
- scratch_chan = openp (getenv ("LD_LIBRARY_PATH"), 1, filename,
- O_RDONLY, 0, &scratch_pathname);
- }
- if (scratch_chan < 0)
- {
- perror_with_name (filename);
- }
- /* Leave scratch_pathname allocated. abfd->name will point to it. */
-
- abfd = bfd_fdopenr (scratch_pathname, gnutarget, scratch_chan);
- if (!abfd)
- {
- close (scratch_chan);
- error ("Could not open `%s' as an executable file: %s",
- scratch_pathname, bfd_errmsg (bfd_get_error ()));
- }
- /* Leave bfd open, core_xfer_memory and "info files" need it. */
- so->abfd = abfd;
- abfd->cacheable = 1;
-
- if (!bfd_check_format (abfd, bfd_object))
- {
- error ("\"%s\": not in executable format: %s.",
- scratch_pathname, bfd_errmsg (bfd_get_error ()));
- }
- if (build_section_table (abfd, &so->sections, &so->sections_end))
- {
- error ("Can't find the file sections in `%s': %s",
- bfd_get_filename (exec_bfd), bfd_errmsg (bfd_get_error ()));
- }
-
- for (p = so->sections; p < so->sections_end; p++)
- {
- /* Relocate the section binding addresses as recorded in the shared
- object's file by the offset to get the address to which the
- object was actually mapped. */
- p->addr += LM_OFFSET (so);
- p->endaddr += LM_OFFSET (so);
- so->lmend = (CORE_ADDR) max (p->endaddr, so->lmend);
- if (STREQ (p->the_bfd_section->name, ".text"))
- {
- so->textsection = p;
- }
- }
-
- /* Free the file names, close the file now. */
- do_cleanups (old_chain);
-
- /* must be non-zero */
- return (1);
-}
-
-/*
-
- LOCAL FUNCTION
-
- locate_base -- locate the base address of dynamic linker structs
-
- SYNOPSIS
-
- CORE_ADDR locate_base (void)
-
- DESCRIPTION
-
- For both the SunOS and SVR4 shared library implementations, if the
- inferior executable has been linked dynamically, there is a single
- address somewhere in the inferior's data space which is the key to
- locating all of the dynamic linker's runtime structures. This
- address is the value of the symbol defined by the macro DEBUG_BASE.
- The job of this function is to find and return that address, or to
- return 0 if there is no such address (the executable is statically
- linked for example).
-
- For SunOS, the job is almost trivial, since the dynamic linker and
- all of it's structures are statically linked to the executable at
- link time. Thus the symbol for the address we are looking for has
- already been added to the minimal symbol table for the executable's
- objfile at the time the symbol file's symbols were read, and all we
- have to do is look it up there. Note that we explicitly do NOT want
- to find the copies in the shared library.
-
- The SVR4 version is much more complicated because the dynamic linker
- and it's structures are located in the shared C library, which gets
- run as the executable's "interpreter" by the kernel. We have to go
- to a lot more work to discover the address of DEBUG_BASE. Because
- of this complexity, we cache the value we find and return that value
- on subsequent invocations. Note there is no copy in the executable
- symbol tables.
-
- Irix 5 is basically like SunOS.
-
- Note that we can assume nothing about the process state at the time
- we need to find this address. We may be stopped on the first instruc-
- tion of the interpreter (C shared library), the first instruction of
- the executable itself, or somewhere else entirely (if we attached
- to the process for example).
-
- */
-
-static CORE_ADDR
-locate_base (void)
-{
- struct minimal_symbol *msymbol;
- CORE_ADDR address = 0;
-
- msymbol = lookup_minimal_symbol (DEBUG_BASE, NULL, symfile_objfile);
- if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0))
- {
- address = SYMBOL_VALUE_ADDRESS (msymbol);
- }
- return (address);
-}
-
-/*
-
- LOCAL FUNCTION
-
- first_link_map_member -- locate first member in dynamic linker's map
-
- SYNOPSIS
-
- static struct link_map *first_link_map_member (void)
-
- DESCRIPTION
-
- Read in a copy of the first member in the inferior's dynamic
- link map from the inferior's dynamic linker structures, and return
- a pointer to the link map descriptor.
- */
-
-static struct link_map *
-first_link_map_member (void)
-{
- struct obj_list *listp;
- struct obj_list list_old;
- struct link_map *lm;
- static struct link_map first_lm;
- CORE_ADDR lladdr;
- CORE_ADDR next_lladdr;
-
- /* We have not already read in the dynamic linking structures
- from the inferior, lookup the address of the base structure. */
- debug_base = locate_base ();
- if (debug_base == 0)
- return NULL;
-
- /* Get address of first list entry. */
- read_memory (debug_base, (char *) &listp, sizeof (struct obj_list *));
-
- if (listp == NULL)
- return NULL;
-
- /* Get first list entry. */
- /* The MIPS Sign extends addresses. */
- lladdr = host_pointer_to_address (listp);
- read_memory (lladdr, (char *) &list_old, sizeof (struct obj_list));
-
- /* The first entry in the list is the object file we are debugging,
- so skip it. */
- next_lladdr = host_pointer_to_address (list_old.next);
-
-#ifdef HANDLE_NEW_OBJ_LIST
- if (list_old.data == NEW_OBJ_INFO_MAGIC)
- {
- Elf32_Obj_Info list_32;
-
- read_memory (lladdr, (char *) &list_32, sizeof (Elf32_Obj_Info));
- if (list_32.oi_size != sizeof (Elf32_Obj_Info))
- return NULL;
- next_lladdr = (CORE_ADDR) list_32.oi_next;
- }
-#endif
-
- if (next_lladdr == 0)
- return NULL;
-
- first_lm.l_lladdr = next_lladdr;
- lm = &first_lm;
- return lm;
-}
-
-/*
-
- LOCAL FUNCTION
-
- next_link_map_member -- locate next member in dynamic linker's map
-
- SYNOPSIS
-
- static struct link_map *next_link_map_member (so_list_ptr)
-
- DESCRIPTION
-
- Read in a copy of the next member in the inferior's dynamic
- link map from the inferior's dynamic linker structures, and return
- a pointer to the link map descriptor.
- */
-
-static struct link_map *
-next_link_map_member (struct so_list *so_list_ptr)
-{
- struct link_map *lm = &so_list_ptr->lm;
- CORE_ADDR next_lladdr = lm->l_next;
- static struct link_map next_lm;
-
- if (next_lladdr == 0)
- {
- /* We have hit the end of the list, so check to see if any were
- added, but be quiet if we can't read from the target any more. */
- int status = 0;
-
- if (lm->l_variant == OBJ_LIST_OLD)
- {
- struct obj_list list_old;
-
- status = target_read_memory (lm->l_lladdr,
- (char *) &list_old,
- sizeof (struct obj_list));
- next_lladdr = host_pointer_to_address (list_old.next);
- }
-#ifdef HANDLE_NEW_OBJ_LIST
- else if (lm->l_variant == OBJ_LIST_32)
- {
- Elf32_Obj_Info list_32;
- status = target_read_memory (lm->l_lladdr,
- (char *) &list_32,
- sizeof (Elf32_Obj_Info));
- next_lladdr = (CORE_ADDR) list_32.oi_next;
- }
-#endif
-
- if (status != 0 || next_lladdr == 0)
- return NULL;
- }
-
- next_lm.l_lladdr = next_lladdr;
- lm = &next_lm;
- return lm;
-}
-
-/*
-
- LOCAL FUNCTION
-
- xfer_link_map_member -- set local variables from dynamic linker's map
-
- SYNOPSIS
-
- static void xfer_link_map_member (so_list_ptr, lm)
-
- DESCRIPTION
-
- Read in a copy of the requested member in the inferior's dynamic
- link map from the inferior's dynamic linker structures, and fill
- in the necessary so_list_ptr elements.
- */
-
-static void
-xfer_link_map_member (struct so_list *so_list_ptr, struct link_map *lm)
-{
- struct obj_list list_old;
- CORE_ADDR lladdr = lm->l_lladdr;
- struct link_map *new_lm = &so_list_ptr->lm;
- int errcode;
-
- read_memory (lladdr, (char *) &list_old, sizeof (struct obj_list));
-
- new_lm->l_variant = OBJ_LIST_OLD;
- new_lm->l_lladdr = lladdr;
- new_lm->l_next = host_pointer_to_address (list_old.next);
-
-#ifdef HANDLE_NEW_OBJ_LIST
- if (list_old.data == NEW_OBJ_INFO_MAGIC)
- {
- Elf32_Obj_Info list_32;
-
- read_memory (lladdr, (char *) &list_32, sizeof (Elf32_Obj_Info));
- if (list_32.oi_size != sizeof (Elf32_Obj_Info))
- return;
- new_lm->l_variant = OBJ_LIST_32;
- new_lm->l_next = (CORE_ADDR) list_32.oi_next;
-
- target_read_string ((CORE_ADDR) list_32.oi_pathname,
- &so_list_ptr->so_name,
- list_32.oi_pathname_len + 1, &errcode);
- if (errcode != 0)
- memory_error (errcode, (CORE_ADDR) list_32.oi_pathname);
-
- LM_ADDR (so_list_ptr) = (CORE_ADDR) list_32.oi_ehdr;
- LM_OFFSET (so_list_ptr) =
- (CORE_ADDR) list_32.oi_ehdr - (CORE_ADDR) list_32.oi_orig_ehdr;
- }
- else
-#endif
- {
-#if defined (_MIPS_SIM_NABI32) && _MIPS_SIM == _MIPS_SIM_NABI32
- /* If we are compiling GDB under N32 ABI, the alignments in
- the obj struct are different from the O32 ABI and we will get
- wrong values when accessing the struct.
- As a workaround we use fixed values which are good for
- Irix 6.2. */
- char buf[432];
-
- read_memory ((CORE_ADDR) list_old.data, buf, sizeof (buf));
-
- target_read_string (extract_address (&buf[236], 4),
- &so_list_ptr->so_name,
- INT_MAX, &errcode);
- if (errcode != 0)
- memory_error (errcode, extract_address (&buf[236], 4));
-
- LM_ADDR (so_list_ptr) = extract_address (&buf[196], 4);
- LM_OFFSET (so_list_ptr) =
- extract_address (&buf[196], 4) - extract_address (&buf[248], 4);
-#else
- struct obj obj_old;
-
- read_memory ((CORE_ADDR) list_old.data, (char *) &obj_old,
- sizeof (struct obj));
-
- target_read_string ((CORE_ADDR) obj_old.o_path,
- &so_list_ptr->so_name,
- INT_MAX, &errcode);
- if (errcode != 0)
- memory_error (errcode, (CORE_ADDR) obj_old.o_path);
-
- LM_ADDR (so_list_ptr) = (CORE_ADDR) obj_old.o_praw;
- LM_OFFSET (so_list_ptr) =
- (CORE_ADDR) obj_old.o_praw - obj_old.o_base_address;
-#endif
- }
-
- catch_errors (solib_map_sections, (char *) so_list_ptr,
- "Error while mapping shared library sections:\n",
- RETURN_MASK_ALL);
-}
-
-
-/*
-
- LOCAL FUNCTION
-
- find_solib -- step through list of shared objects
-
- SYNOPSIS
-
- struct so_list *find_solib (struct so_list *so_list_ptr)
-
- DESCRIPTION
-
- This module contains the routine which finds the names of any
- loaded "images" in the current process. The argument in must be
- NULL on the first call, and then the returned value must be passed
- in on subsequent calls. This provides the capability to "step" down
- the list of loaded objects. On the last object, a NULL value is
- returned.
- */
-
-static struct so_list *
-find_solib (struct so_list *so_list_ptr)
-{
- struct so_list *so_list_next = NULL;
- struct link_map *lm = NULL;
- struct so_list *new;
-
- if (so_list_ptr == NULL)
- {
- /* We are setting up for a new scan through the loaded images. */
- if ((so_list_next = so_list_head) == NULL)
- {
- /* Find the first link map list member. */
- lm = first_link_map_member ();
- }
- }
- else
- {
- /* We have been called before, and are in the process of walking
- the shared library list. Advance to the next shared object. */
- lm = next_link_map_member (so_list_ptr);
- so_list_next = so_list_ptr->next;
- }
- if ((so_list_next == NULL) && (lm != NULL))
- {
- new = (struct so_list *) xmalloc (sizeof (struct so_list));
- memset ((char *) new, 0, sizeof (struct so_list));
- /* Add the new node as the next node in the list, or as the root
- node if this is the first one. */
- if (so_list_ptr != NULL)
- {
- so_list_ptr->next = new;
- }
- else
- {
- so_list_head = new;
- }
- so_list_next = new;
- xfer_link_map_member (new, lm);
- }
- return (so_list_next);
-}
-
-/* A small stub to get us past the arg-passing pinhole of catch_errors. */
-
-static int
-symbol_add_stub (void *arg)
-{
- register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
- CORE_ADDR text_addr = 0;
- struct section_addr_info section_addrs;
-
- memset (&section_addrs, 0, sizeof (section_addrs));
- if (so->textsection)
- text_addr = so->textsection->addr;
- else if (so->abfd != NULL)
- {
- asection *lowest_sect;
-
- /* If we didn't find a mapped non zero sized .text section, set up
- text_addr so that the relocation in symbol_file_add does no harm. */
-
- lowest_sect = bfd_get_section_by_name (so->abfd, ".text");
- if (lowest_sect == NULL)
- bfd_map_over_sections (so->abfd, find_lowest_section,
- (PTR) &lowest_sect);
- if (lowest_sect)
- text_addr = bfd_section_vma (so->abfd, lowest_sect) + LM_OFFSET (so);
- }
-
-
- section_addrs.other[0].name = ".text";
- section_addrs.other[0].addr = text_addr;
- so->objfile = symbol_file_add (so->so_name, so->from_tty,
- &section_addrs, 0, 0);
- /* must be non-zero */
- return (1);
-}
-
-/*
-
- GLOBAL FUNCTION
-
- solib_add -- add a shared library file to the symtab and section list
-
- SYNOPSIS
-
- void solib_add (char *arg_string, int from_tty,
- struct target_ops *target, int readsyms)
-
- DESCRIPTION
-
- */
-
-void
-solib_add (char *arg_string, int from_tty, struct target_ops *target, int readsyms)
-{
- register struct so_list *so = NULL; /* link map state variable */
-
- /* Last shared library that we read. */
- struct so_list *so_last = NULL;
-
- char *re_err;
- int count;
- int old;
-
- if (!readsyms)
- return;
-
- if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL)
- {
- error ("Invalid regexp: %s", re_err);
- }
-
- /* Add the shared library sections to the section table of the
- specified target, if any. */
- if (target)
- {
- /* Count how many new section_table entries there are. */
- so = NULL;
- count = 0;
- while ((so = find_solib (so)) != NULL)
- {
- if (so->so_name[0])
- {
- count += so->sections_end - so->sections;
- }
- }
-
- if (count)
- {
- old = target_resize_to_sections (target, count);
-
- /* Add these section table entries to the target's table. */
- while ((so = find_solib (so)) != NULL)
- {
- if (so->so_name[0])
- {
- count = so->sections_end - so->sections;
- memcpy ((char *) (target->to_sections + old),
- so->sections,
- (sizeof (struct section_table)) * count);
- old += count;
- }
- }
- }
- }
-
- /* Now add the symbol files. */
- while ((so = find_solib (so)) != NULL)
- {
- if (so->so_name[0] && re_exec (so->so_name))
- {
- so->from_tty = from_tty;
- if (so->symbols_loaded)
- {
- if (from_tty)
- {
- printf_unfiltered ("Symbols already loaded for %s\n", so->so_name);
- }
- }
- else if (catch_errors
- (symbol_add_stub, (char *) so,
- "Error while reading shared library symbols:\n",
- RETURN_MASK_ALL))
- {
- so_last = so;
- so->symbols_loaded = 1;
- }
- }
- }
-
- /* Getting new symbols may change our opinion about what is
- frameless. */
- if (so_last)
- reinit_frame_cache ();
-}
-
-/*
-
- LOCAL FUNCTION
-
- info_sharedlibrary_command -- code for "info sharedlibrary"
-
- SYNOPSIS
-
- static void info_sharedlibrary_command ()
-
- DESCRIPTION
-
- Walk through the shared library list and print information
- about each attached library.
- */
-
-static void
-info_sharedlibrary_command (char *ignore, int from_tty)
-{
- register struct so_list *so = NULL; /* link map state variable */
- int header_done = 0;
-
- if (exec_bfd == NULL)
- {
- printf_unfiltered ("No executable file.\n");
- return;
- }
- while ((so = find_solib (so)) != NULL)
- {
- if (so->so_name[0])
- {
- if (!header_done)
- {
- printf_unfiltered ("%-12s%-12s%-12s%s\n", "From", "To", "Syms Read",
- "Shared Object Library");
- header_done++;
- }
- printf_unfiltered ("%-12s",
- local_hex_string_custom ((unsigned long) LM_ADDR (so),
- "08l"));
- printf_unfiltered ("%-12s",
- local_hex_string_custom ((unsigned long) so->lmend,
- "08l"));
- printf_unfiltered ("%-12s", so->symbols_loaded ? "Yes" : "No");
- printf_unfiltered ("%s\n", so->so_name);
- }
- }
- if (so_list_head == NULL)
- {
- printf_unfiltered ("No shared libraries loaded at this time.\n");
- }
-}
-
-/*
-
- GLOBAL FUNCTION
-
- solib_address -- check to see if an address is in a shared lib
-
- SYNOPSIS
-
- char *solib_address (CORE_ADDR address)
-
- DESCRIPTION
-
- Provides a hook for other gdb routines to discover whether or
- not a particular address is within the mapped address space of
- a shared library. Any address between the base mapping address
- and the first address beyond the end of the last mapping, is
- considered to be within the shared library address space, for
- our purposes.
-
- For example, this routine is called at one point to disable
- breakpoints which are in shared libraries that are not currently
- mapped in.
- */
-
-char *
-solib_address (CORE_ADDR address)
-{
- register struct so_list *so = 0; /* link map state variable */
-
- while ((so = find_solib (so)) != NULL)
- {
- if (so->so_name[0])
- {
- if ((address >= (CORE_ADDR) LM_ADDR (so)) &&
- (address < (CORE_ADDR) so->lmend))
- return (so->so_name);
- }
- }
- return (0);
-}
-
-/* Called by free_all_symtabs */
-
-void
-clear_solib (void)
-{
- struct so_list *next;
- char *bfd_filename;
-
- disable_breakpoints_in_shlibs (1);
-
- while (so_list_head)
- {
- if (so_list_head->sections)
- {
- xfree (so_list_head->sections);
- }
- if (so_list_head->abfd)
- {
- remove_target_sections (so_list_head->abfd);
- bfd_filename = bfd_get_filename (so_list_head->abfd);
- if (!bfd_close (so_list_head->abfd))
- warning ("cannot close \"%s\": %s",
- bfd_filename, bfd_errmsg (bfd_get_error ()));
- }
- else
- /* This happens for the executable on SVR4. */
- bfd_filename = NULL;
-
- next = so_list_head->next;
- if (bfd_filename)
- xfree (bfd_filename);
- xfree (so_list_head->so_name);
- xfree (so_list_head);
- so_list_head = next;
- }
- debug_base = 0;
-}
-
-/*
-
- LOCAL FUNCTION
-
- disable_break -- remove the "mapping changed" breakpoint
-
- SYNOPSIS
-
- static int disable_break ()
-
- DESCRIPTION
-
- Removes the breakpoint that gets hit when the dynamic linker
- completes a mapping change.
-
- */
-
-static int
-disable_break (void)
-{
- int status = 1;
-
-
- /* Note that breakpoint address and original contents are in our address
- space, so we just need to write the original contents back. */
-
- if (memory_remove_breakpoint (breakpoint_addr, shadow_contents) != 0)
- {
- status = 0;
- }
-
- /* For the SVR4 version, we always know the breakpoint address. For the
- SunOS version we don't know it until the above code is executed.
- Grumble if we are stopped anywhere besides the breakpoint address. */
-
- if (stop_pc != breakpoint_addr)
- {
- warning ("stopped at unknown breakpoint while handling shared libraries");
- }
-
- return (status);
-}
-
-/*
-
- LOCAL FUNCTION
-
- enable_break -- arrange for dynamic linker to hit breakpoint
-
- SYNOPSIS
-
- int enable_break (void)
-
- DESCRIPTION
-
- This functions inserts a breakpoint at the entry point of the
- main executable, where all shared libraries are mapped in.
- */
-
-static int
-enable_break (void)
-{
- if (symfile_objfile != NULL
- && target_insert_breakpoint (symfile_objfile->ei.entry_point,
- shadow_contents) == 0)
- {
- breakpoint_addr = symfile_objfile->ei.entry_point;
- return 1;
- }
-
- return 0;
-}
-
-/*
-
- GLOBAL FUNCTION
-
- solib_create_inferior_hook -- shared library startup support
-
- SYNOPSIS
-
- void solib_create_inferior_hook()
-
- DESCRIPTION
-
- When gdb starts up the inferior, it nurses it along (through the
- shell) until it is ready to execute it's first instruction. At this
- point, this function gets called via expansion of the macro
- SOLIB_CREATE_INFERIOR_HOOK.
-
- For SunOS executables, this first instruction is typically the
- one at "_start", or a similar text label, regardless of whether
- the executable is statically or dynamically linked. The runtime
- startup code takes care of dynamically linking in any shared
- libraries, once gdb allows the inferior to continue.
-
- For SVR4 executables, this first instruction is either the first
- instruction in the dynamic linker (for dynamically linked
- executables) or the instruction at "start" for statically linked
- executables. For dynamically linked executables, the system
- first exec's /lib/libc.so.N, which contains the dynamic linker,
- and starts it running. The dynamic linker maps in any needed
- shared libraries, maps in the actual user executable, and then
- jumps to "start" in the user executable.
-
- For both SunOS shared libraries, and SVR4 shared libraries, we
- can arrange to cooperate with the dynamic linker to discover the
- names of shared libraries that are dynamically linked, and the
- base addresses to which they are linked.
-
- This function is responsible for discovering those names and
- addresses, and saving sufficient information about them to allow
- their symbols to be read at a later time.
-
- FIXME
-
- Between enable_break() and disable_break(), this code does not
- properly handle hitting breakpoints which the user might have
- set in the startup code or in the dynamic linker itself. Proper
- handling will probably have to wait until the implementation is
- changed to use the "breakpoint handler function" method.
-
- Also, what if child has exit()ed? Must exit loop somehow.
- */
-
-void
-solib_create_inferior_hook (void)
-{
- if (!enable_break ())
- {
- warning ("shared library handler failed to enable breakpoint");
- return;
- }
-
- /* Now run the target. It will eventually hit the breakpoint, at
- which point all of the libraries will have been mapped in and we
- can go groveling around in the dynamic linker structures to find
- out what we need to know about them. */
-
- clear_proceed_status ();
- stop_soon_quietly = 1;
- stop_signal = TARGET_SIGNAL_0;
- do
- {
- target_resume (pid_to_ptid (-1), 0, stop_signal);
- wait_for_inferior ();
- }
- while (stop_signal != TARGET_SIGNAL_TRAP);
-
- /* We are now either at the "mapping complete" breakpoint (or somewhere
- else, a condition we aren't prepared to deal with anyway), so adjust
- the PC as necessary after a breakpoint, disable the breakpoint, and
- add any shared libraries that were mapped in. */
-
- if (DECR_PC_AFTER_BREAK)
- {
- stop_pc -= DECR_PC_AFTER_BREAK;
- write_register (PC_REGNUM, stop_pc);
- }
-
- if (!disable_break ())
- {
- warning ("shared library handler failed to disable breakpoint");
- }
-
- /* solib_add will call reinit_frame_cache.
- But we are stopped in the startup code and we might not have symbols
- for the startup code, so heuristic_proc_start could be called
- and will put out an annoying warning.
- Delaying the resetting of stop_soon_quietly until after symbol loading
- suppresses the warning. */
- solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add);
- stop_soon_quietly = 0;
-}
-
-/*
-
- LOCAL FUNCTION
-
- sharedlibrary_command -- handle command to explicitly add library
-
- SYNOPSIS
-
- static void sharedlibrary_command (char *args, int from_tty)
-
- DESCRIPTION
-
- */
-
-static void
-sharedlibrary_command (char *args, int from_tty)
-{
- dont_repeat ();
- solib_add (args, from_tty, (struct target_ops *) 0, 1);
-}
-
-void
-_initialize_solib (void)
-{
- add_com ("sharedlibrary", class_files, sharedlibrary_command,
- "Load shared object library symbols for files matching REGEXP.");
- add_info ("sharedlibrary", info_sharedlibrary_command,
- "Status of loaded shared object libraries.");
-
- add_show_from_set
- (add_set_cmd ("auto-solib-add", class_support, var_boolean,
- (char *) &auto_solib_add,
- "Set autoloading of shared library symbols.\n\
-If \"on\", symbols from all shared object libraries will be loaded\n\
-automatically when the inferior begins execution, when the dynamic linker\n\
-informs gdb that a new library has been loaded, or when attaching to the\n\
-inferior. Otherwise, symbols must be loaded manually, using `sharedlibrary'.",
- &setlist),
- &showlist);
-}
-
-
-/* Register that we are able to handle irix5 core file formats.
- This really is bfd_target_unknown_flavour */
-
-static struct core_fns irix5_core_fns =
-{
- bfd_target_unknown_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
-void
-_initialize_core_irix5 (void)
-{
- add_core_fns (&irix5_core_fns);
-}
diff --git a/contrib/gdb/gdb/isi-xdep.c b/contrib/gdb/gdb/isi-xdep.c
deleted file mode 100644
index 8773c83ea7a9..000000000000
--- a/contrib/gdb/gdb/isi-xdep.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <machine/reg.h>
-int rloc[] = {
- R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, FP, SP, PS, PC
-};
diff --git a/contrib/gdb/gdb/jv-exp.tab.c b/contrib/gdb/gdb/jv-exp.tab.c
deleted file mode 100644
index 39920caea20e..000000000000
--- a/contrib/gdb/gdb/jv-exp.tab.c
+++ /dev/null
@@ -1,2351 +0,0 @@
-
-/* A Bison parser, made from jv-exp.y
- by GNU Bison version 1.25
- */
-
-#define YYBISON 1 /* Identify Bison output. */
-
-#define INTEGER_LITERAL 258
-#define FLOATING_POINT_LITERAL 259
-#define IDENTIFIER 260
-#define STRING_LITERAL 261
-#define BOOLEAN_LITERAL 262
-#define TYPENAME 263
-#define NAME_OR_INT 264
-#define ERROR 265
-#define LONG 266
-#define SHORT 267
-#define BYTE 268
-#define INT 269
-#define CHAR 270
-#define BOOLEAN 271
-#define DOUBLE 272
-#define FLOAT 273
-#define VARIABLE 274
-#define ASSIGN_MODIFY 275
-#define THIS 276
-#define SUPER 277
-#define NEW 278
-#define OROR 279
-#define ANDAND 280
-#define EQUAL 281
-#define NOTEQUAL 282
-#define LEQ 283
-#define GEQ 284
-#define LSH 285
-#define RSH 286
-#define INCREMENT 287
-#define DECREMENT 288
-
-#line 38 "jv-exp.y"
-
-
-#include "defs.h"
-#include "gdb_string.h"
-#include <ctype.h>
-#include "expression.h"
-#include "value.h"
-#include "parser-defs.h"
-#include "language.h"
-#include "jv-lang.h"
-#include "bfd.h" /* Required by objfiles.h. */
-#include "symfile.h" /* Required by objfiles.h. */
-#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
-
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
- as well as gratuitiously global symbol names, so we can have multiple
- yacc generated parsers in gdb. Note that these are only the variables
- produced by yacc. If other parser generators (bison, byacc, etc) produce
- additional global names that conflict at link time, then those parser
- generators need to be fixed instead of adding those names to this list. */
-
-#define yymaxdepth java_maxdepth
-#define yyparse java_parse
-#define yylex java_lex
-#define yyerror java_error
-#define yylval java_lval
-#define yychar java_char
-#define yydebug java_debug
-#define yypact java_pact
-#define yyr1 java_r1
-#define yyr2 java_r2
-#define yydef java_def
-#define yychk java_chk
-#define yypgo java_pgo
-#define yyact java_act
-#define yyexca java_exca
-#define yyerrflag java_errflag
-#define yynerrs java_nerrs
-#define yyps java_ps
-#define yypv java_pv
-#define yys java_s
-#define yy_yys java_yys
-#define yystate java_state
-#define yytmp java_tmp
-#define yyv java_v
-#define yy_yyv java_yyv
-#define yyval java_val
-#define yylloc java_lloc
-#define yyreds java_reds /* With YYDEBUG defined */
-#define yytoks java_toks /* With YYDEBUG defined */
-#define yylhs java_yylhs
-#define yylen java_yylen
-#define yydefred java_yydefred
-#define yydgoto java_yydgoto
-#define yysindex java_yysindex
-#define yyrindex java_yyrindex
-#define yygindex java_yygindex
-#define yytable java_yytable
-#define yycheck java_yycheck
-
-#ifndef YYDEBUG
-#define YYDEBUG 0 /* Default to no yydebug support */
-#endif
-
-int
-yyparse PARAMS ((void));
-
-static int
-yylex PARAMS ((void));
-
-void
-yyerror PARAMS ((char *));
-
-static struct type * java_type_from_name PARAMS ((struct stoken));
-static void push_expression_name PARAMS ((struct stoken));
-static void push_fieldnames PARAMS ((struct stoken));
-
-static struct expression *copy_exp PARAMS ((struct expression *, int));
-static void insert_exp PARAMS ((int, struct expression *));
-
-
-#line 124 "jv-exp.y"
-typedef union
- {
- LONGEST lval;
- struct {
- LONGEST val;
- struct type *type;
- } typed_val_int;
- struct {
- DOUBLEST dval;
- struct type *type;
- } typed_val_float;
- struct symbol *sym;
- struct type *tval;
- struct stoken sval;
- struct ttype tsym;
- struct symtoken ssym;
- struct block *bval;
- enum exp_opcode opcode;
- struct internalvar *ivar;
- int *ivec;
- } YYSTYPE;
-#line 146 "jv-exp.y"
-
-/* YYSTYPE gets defined by %union */
-static int
-parse_number PARAMS ((char *, int, int, YYSTYPE *));
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
-#endif
-
-
-
-#define YYFINAL 208
-#define YYFLAG -32768
-#define YYNTBASE 57
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 288 ? yytranslate[x] : 112)
-
-static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 55, 2, 2, 2, 44, 31, 2, 49,
- 50, 42, 40, 24, 41, 47, 43, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 56, 2, 34,
- 25, 35, 26, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 48, 2, 53, 30, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 51, 29, 52, 54, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 27, 28,
- 32, 33, 36, 37, 38, 39, 45, 46
-};
-
-#if YYDEBUG != 0
-static const short yyprhs[] = { 0,
- 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
- 20, 22, 24, 26, 28, 30, 32, 34, 36, 38,
- 40, 42, 44, 46, 48, 51, 54, 56, 58, 60,
- 62, 64, 66, 70, 72, 76, 78, 80, 82, 84,
- 88, 90, 92, 94, 96, 100, 102, 104, 110, 112,
- 116, 117, 119, 124, 129, 131, 134, 138, 141, 145,
- 147, 148, 152, 156, 161, 168, 175, 180, 185, 190,
- 192, 194, 196, 198, 200, 203, 206, 208, 210, 213,
- 216, 219, 221, 224, 227, 229, 232, 235, 237, 243,
- 248, 254, 256, 260, 264, 268, 270, 274, 278, 280,
- 284, 288, 290, 294, 298, 302, 306, 308, 312, 316,
- 318, 322, 324, 328, 330, 334, 336, 340, 342, 346,
- 348, 354, 356, 358, 362, 366, 368, 370, 372, 374
-};
-
-static const short yyrhs[] = { 73,
- 0, 58, 0, 59, 0, 62, 0, 68, 0, 6,
- 0, 3, 0, 9, 0, 4, 0, 7, 0, 60,
- 0, 63, 0, 16, 0, 64, 0, 65, 0, 13,
- 0, 12, 0, 14, 0, 11, 0, 15, 0, 18,
- 0, 17, 0, 69, 0, 66, 0, 62, 84, 0,
- 69, 84, 0, 5, 0, 72, 0, 71, 0, 72,
- 0, 5, 0, 9, 0, 69, 47, 71, 0, 111,
- 0, 73, 24, 111, 0, 75, 0, 81, 0, 61,
- 0, 21, 0, 49, 111, 50, 0, 78, 0, 86,
- 0, 87, 0, 88, 0, 76, 79, 77, 0, 51,
- 0, 52, 0, 23, 67, 49, 80, 50, 0, 111,
- 0, 79, 24, 111, 0, 0, 79, 0, 23, 62,
- 82, 85, 0, 23, 66, 82, 85, 0, 83, 0,
- 82, 83, 0, 48, 111, 53, 0, 48, 53, 0,
- 84, 48, 53, 0, 84, 0, 0, 74, 47, 71,
- 0, 19, 47, 71, 0, 69, 49, 80, 50, 0,
- 74, 47, 71, 49, 80, 50, 0, 22, 47, 71,
- 49, 80, 50, 0, 69, 48, 111, 53, 0, 19,
- 48, 111, 53, 0, 75, 48, 111, 53, 0, 74,
- 0, 69, 0, 19, 0, 90, 0, 91, 0, 89,
- 45, 0, 89, 46, 0, 93, 0, 94, 0, 40,
- 92, 0, 41, 92, 0, 42, 92, 0, 95, 0,
- 45, 92, 0, 46, 92, 0, 89, 0, 54, 92,
- 0, 55, 92, 0, 96, 0, 49, 62, 85, 50,
- 92, 0, 49, 111, 50, 95, 0, 49, 69, 84,
- 50, 95, 0, 92, 0, 97, 42, 92, 0, 97,
- 43, 92, 0, 97, 44, 92, 0, 97, 0, 98,
- 40, 97, 0, 98, 41, 97, 0, 98, 0, 99,
- 38, 98, 0, 99, 39, 98, 0, 99, 0, 100,
- 34, 99, 0, 100, 35, 99, 0, 100, 36, 99,
- 0, 100, 37, 99, 0, 100, 0, 101, 32, 100,
- 0, 101, 33, 100, 0, 101, 0, 102, 31, 101,
- 0, 102, 0, 103, 30, 102, 0, 103, 0, 104,
- 29, 103, 0, 104, 0, 105, 28, 104, 0, 105,
- 0, 106, 27, 105, 0, 106, 0, 106, 26, 111,
- 56, 107, 0, 107, 0, 109, 0, 110, 25, 107,
- 0, 110, 20, 107, 0, 70, 0, 19, 0, 86,
- 0, 88, 0, 108, 0
-};
-
-#endif
-
-#if YYDEBUG != 0
-static const short yyrline[] = { 0,
- 203, 204, 207, 215, 217, 220, 229, 235, 243, 248,
- 253, 263, 265, 269, 271, 274, 277, 279, 281, 283,
- 287, 290, 301, 306, 310, 313, 317, 319, 322, 324,
- 327, 329, 332, 356, 357, 361, 363, 366, 368, 371,
- 372, 373, 374, 375, 376, 383, 388, 393, 398, 401,
- 405, 408, 411, 414, 418, 420, 423, 427, 430, 434,
- 436, 440, 443, 448, 451, 453, 457, 475, 477, 481,
- 483, 485, 487, 488, 491, 496, 501, 503, 504, 505,
- 507, 509, 512, 517, 522, 524, 526, 528, 531, 536,
- 557, 564, 566, 568, 570, 574, 576, 578, 582, 584,
- 586, 591, 593, 595, 597, 599, 604, 606, 608, 612,
- 614, 618, 620, 623, 625, 629, 631, 635, 637, 641,
- 643, 647, 649, 652, 655, 661, 664, 666, 667, 671
-};
-#endif
-
-
-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-
-static const char * const yytname[] = { "$","error","$undefined.","INTEGER_LITERAL",
-"FLOATING_POINT_LITERAL","IDENTIFIER","STRING_LITERAL","BOOLEAN_LITERAL","TYPENAME",
-"NAME_OR_INT","ERROR","LONG","SHORT","BYTE","INT","CHAR","BOOLEAN","DOUBLE",
-"FLOAT","VARIABLE","ASSIGN_MODIFY","THIS","SUPER","NEW","','","'='","'?'","OROR",
-"ANDAND","'|'","'^'","'&'","EQUAL","NOTEQUAL","'<'","'>'","LEQ","GEQ","LSH",
-"RSH","'+'","'-'","'*'","'/'","'%'","INCREMENT","DECREMENT","'.'","'['","'('",
-"')'","'{'","'}'","']'","'~'","'!'","':'","start","type_exp","PrimitiveOrArrayType",
-"StringLiteral","Literal","PrimitiveType","NumericType","IntegralType","FloatingPointType",
-"ClassOrInterfaceType","ClassType","ArrayType","Name","ForcedName","SimpleName",
-"QualifiedName","exp1","Primary","PrimaryNoNewArray","lcurly","rcurly","ClassInstanceCreationExpression",
-"ArgumentList","ArgumentList_opt","ArrayCreationExpression","DimExprs","DimExpr",
-"Dims","Dims_opt","FieldAccess","MethodInvocation","ArrayAccess","PostfixExpression",
-"PostIncrementExpression","PostDecrementExpression","UnaryExpression","PreIncrementExpression",
-"PreDecrementExpression","UnaryExpressionNotPlusMinus","CastExpression","MultiplicativeExpression",
-"AdditiveExpression","ShiftExpression","RelationalExpression","EqualityExpression",
-"AndExpression","ExclusiveOrExpression","InclusiveOrExpression","ConditionalAndExpression",
-"ConditionalOrExpression","ConditionalExpression","AssignmentExpression","Assignment",
-"LeftHandSide","Expression", NULL
-};
-#endif
-
-static const short yyr1[] = { 0,
- 57, 57, 58, 59, 59, 60, 61, 61, 61, 61,
- 61, 62, 62, 63, 63, 64, 64, 64, 64, 64,
- 65, 65, 66, 67, 68, 68, 69, 69, 70, 70,
- 71, 71, 72, 73, 73, 74, 74, 75, 75, 75,
- 75, 75, 75, 75, 75, 76, 77, 78, 79, 79,
- 80, 80, 81, 81, 82, 82, 83, 84, 84, 85,
- 85, 86, 86, 87, 87, 87, 88, 88, 88, 89,
- 89, 89, 89, 89, 90, 91, 92, 92, 92, 92,
- 92, 92, 93, 94, 95, 95, 95, 95, 96, 96,
- 96, 97, 97, 97, 97, 98, 98, 98, 99, 99,
- 99, 100, 100, 100, 100, 100, 101, 101, 101, 102,
- 102, 103, 103, 104, 104, 105, 105, 106, 106, 107,
- 107, 108, 108, 109, 109, 110, 110, 110, 110, 111
-};
-
-static const short yyr2[] = { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 2, 2, 1, 1, 1, 1,
- 1, 1, 3, 1, 3, 1, 1, 1, 1, 3,
- 1, 1, 1, 1, 3, 1, 1, 5, 1, 3,
- 0, 1, 4, 4, 1, 2, 3, 2, 3, 1,
- 0, 3, 3, 4, 6, 6, 4, 4, 4, 1,
- 1, 1, 1, 1, 2, 2, 1, 1, 2, 2,
- 2, 1, 2, 2, 1, 2, 2, 1, 5, 4,
- 5, 1, 3, 3, 3, 1, 3, 3, 1, 3,
- 3, 1, 3, 3, 3, 3, 1, 3, 3, 1,
- 3, 1, 3, 1, 3, 1, 3, 1, 3, 1,
- 5, 1, 1, 3, 3, 1, 1, 1, 1, 1
-};
-
-static const short yydefact[] = { 0,
- 7, 9, 27, 6, 10, 8, 19, 17, 16, 18,
- 20, 13, 22, 21, 72, 39, 0, 0, 0, 0,
- 0, 0, 0, 0, 46, 0, 0, 2, 3, 11,
- 38, 4, 12, 14, 15, 5, 71, 126, 29, 28,
- 1, 70, 36, 0, 41, 37, 42, 43, 44, 85,
- 73, 74, 92, 77, 78, 82, 88, 96, 99, 102,
- 107, 110, 112, 114, 116, 118, 120, 122, 130, 123,
- 0, 34, 0, 0, 0, 27, 0, 24, 0, 23,
- 28, 8, 72, 71, 42, 44, 79, 80, 81, 83,
- 84, 61, 71, 0, 86, 87, 0, 25, 0, 0,
- 51, 26, 0, 0, 0, 0, 49, 75, 76, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 31, 32, 63, 0, 0, 0, 61, 55, 61, 51,
- 0, 60, 0, 0, 40, 58, 0, 33, 0, 52,
- 0, 35, 62, 0, 0, 47, 45, 93, 94, 95,
- 97, 98, 100, 101, 103, 104, 105, 106, 108, 109,
- 111, 113, 115, 117, 0, 119, 125, 124, 68, 51,
- 0, 0, 56, 53, 54, 0, 0, 0, 90, 59,
- 67, 64, 51, 69, 50, 0, 0, 57, 48, 89,
- 91, 0, 121, 66, 65, 0, 0, 0
-};
-
-static const short yydefgoto[] = { 206,
- 28, 29, 30, 31, 32, 33, 34, 35, 78, 79,
- 36, 84, 38, 39, 81, 41, 42, 43, 44, 157,
- 45, 150, 151, 46, 137, 138, 142, 143, 85, 48,
- 86, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 107
-};
-
-static const short yypact[] = { 206,
--32768,-32768, -5,-32768,-32768, -3,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768, 1,-32768, -34, 225, 312, 312,
- 312, 312, 312, 206,-32768, 312, 312,-32768,-32768,-32768,
--32768, -23,-32768,-32768,-32768,-32768, 34,-32768,-32768, 7,
- 4, -28, -17, 365,-32768,-32768, 15,-32768, 21, 74,
--32768,-32768,-32768,-32768,-32768,-32768,-32768, 45, 44, 86,
- 35, 96, 3, 23, 8, 51, 104,-32768,-32768,-32768,
- 32,-32768, 46, 365, 46,-32768, 25, 25, 14, 55,
--32768,-32768, 87, 47,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, -23, 34, 40,-32768,-32768, 57, 50, 46, 259,
- 365, 50, 365, 46, 365, -13,-32768,-32768,-32768, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 365, 312, 312, 312,
--32768,-32768,-32768, 61, 59, 365, 56,-32768, 56, 365,
- 365, 50, 66, 43, 372,-32768, 69,-32768, 73, 108,
- 106,-32768, 111, 109, 365,-32768,-32768,-32768,-32768,-32768,
- 45, 45, 44, 44, 86, 86, 86, 86, 35, 35,
- 96, 3, 23, 8, 107, 51,-32768,-32768,-32768, 365,
- 112, 259,-32768,-32768,-32768, 114, 312, 372,-32768,-32768,
--32768,-32768, 365,-32768,-32768, 312, 116,-32768,-32768,-32768,
--32768, 118,-32768,-32768,-32768, 169, 170,-32768
-};
-
-static const short yypgoto[] = {-32768,
--32768,-32768,-32768,-32768, -8,-32768,-32768,-32768,-32768,-32768,
--32768, 5,-32768, -66, 0,-32768,-32768,-32768,-32768,-32768,
--32768, 127, -126,-32768, 94, -94, -29, -40, 6,-32768,
- 12,-32768,-32768,-32768, 39,-32768,-32768, -141,-32768, 24,
- 28, -42, 36, 52, 53, 49, 58, 48,-32768, -128,
--32768,-32768,-32768, 18
-};
-
-
-#define YYLAST 427
-
-
-static const short yytable[] = { 40,
- 177, 178, 98, 189, 37, 47, 133, 102, 135, 77,
- 155, 49, 75, 186, -31, 92, -32, 72, 104, -31,
- -127, -32, 80, 40, 97, -127, -30, 103, 93, 47,
- 105, -30, 148, 123, -128, 49, 125, 153, 156, -128,
- -129, 94, 183, 40, 183, -129, 201, 73, 74, 47,
- 131, 129, 124, 197, 132, 49, 130, 87, 88, 89,
- 90, 91, 140, 144, 95, 96, 202, 203, 117, 118,
- 119, 120, 136, 40, 165, 166, 167, 168, 126, 47,
- 99, 100, 101, 113, 114, 49, 110, 111, 112, 145,
- 147, 134, 188, 99, 141, 101, 184, 147, 185, 40,
- 40, 99, 40, 182, 40, 47, 47, 180, 47, 146,
- 47, 49, 49, 179, 49, 187, 49, 149, 108, 109,
- 152, 190, 154, 115, 116, 191, 40, 121, 122, 127,
- 128, 155, 47, 73, 74, 40, 161, 162, 49, 40,
- 40, 47, 163, 164, 175, 47, 47, 49, 158, 159,
- 160, 49, 49, 181, 40, 192, 169, 170, 149, 193,
- 47, 194, 196, 199, 198, 204, 49, 205, 207, 208,
- 106, 139, 195, 173, 171, 176, 172, 0, 0, 40,
- 0, 40, 0, 174, 0, 47, 0, 47, 0, 0,
- 0, 49, 40, 49, 0, 0, 0, 0, 47, 181,
- 0, 0, 0, 0, 49, 0, 0, 0, 1, 2,
- 3, 4, 5, 0, 6, 0, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 200, 16, 17, 18, 76,
- 0, 0, 0, 0, 0, 7, 8, 9, 10, 11,
- 12, 13, 14, 0, 0, 19, 20, 21, 0, 0,
- 22, 23, 0, 0, 24, 0, 25, 0, 0, 26,
- 27, 1, 2, 3, 4, 5, 0, 6, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 15, 0, 16,
- 17, 18, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 19, 20,
- 21, 0, 0, 22, 23, 0, 0, 24, 0, 25,
- 0, 146, 26, 27, 1, 2, 76, 4, 5, 0,
- 82, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 83, 0, 16, 17, 18, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 19, 20, 21, 0, 0, 22, 23, 0, 0,
- 24, 0, 25, 0, 0, 26, 27, 1, 2, 3,
- 4, 5, 0, 6, 1, 2, 76, 4, 5, 0,
- 82, 0, 0, 15, 0, 16, 17, 18, 0, 0,
- 83, 0, 16, 17, 18, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 19, 20, 21, 0, 0, 22,
- 23, 0, 0, 24, 0, 25, 0, 0, 26, 27,
- 24, 0, 25, 0, 0, 26, 27
-};
-
-static const short yycheck[] = { 0,
- 129, 130, 32, 145, 0, 0, 73, 37, 75, 18,
- 24, 0, 47, 140, 20, 24, 20, 0, 47, 25,
- 20, 25, 18, 24, 48, 25, 20, 24, 24, 24,
- 48, 25, 99, 31, 20, 24, 29, 104, 52, 25,
- 20, 24, 137, 44, 139, 25, 188, 47, 48, 44,
- 5, 20, 30, 180, 9, 44, 25, 19, 20, 21,
- 22, 23, 49, 93, 26, 27, 193, 196, 34, 35,
- 36, 37, 48, 74, 117, 118, 119, 120, 28, 74,
- 47, 48, 49, 40, 41, 74, 42, 43, 44, 50,
- 48, 74, 50, 47, 48, 49, 137, 48, 139, 100,
- 101, 47, 103, 48, 105, 100, 101, 49, 103, 53,
- 105, 100, 101, 53, 103, 50, 105, 100, 45, 46,
- 103, 53, 105, 38, 39, 53, 127, 32, 33, 26,
- 27, 24, 127, 47, 48, 136, 113, 114, 127, 140,
- 141, 136, 115, 116, 127, 140, 141, 136, 110, 111,
- 112, 140, 141, 136, 155, 50, 121, 122, 141, 49,
- 155, 53, 56, 50, 53, 50, 155, 50, 0, 0,
- 44, 78, 155, 125, 123, 128, 124, -1, -1, 180,
- -1, 182, -1, 126, -1, 180, -1, 182, -1, -1,
- -1, 180, 193, 182, -1, -1, -1, -1, 193, 182,
- -1, -1, -1, -1, 193, -1, -1, -1, 3, 4,
- 5, 6, 7, -1, 9, -1, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 187, 21, 22, 23, 5,
- -1, -1, -1, -1, -1, 11, 12, 13, 14, 15,
- 16, 17, 18, -1, -1, 40, 41, 42, -1, -1,
- 45, 46, -1, -1, 49, -1, 51, -1, -1, 54,
- 55, 3, 4, 5, 6, 7, -1, 9, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 19, -1, 21,
- 22, 23, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 40, 41,
- 42, -1, -1, 45, 46, -1, -1, 49, -1, 51,
- -1, 53, 54, 55, 3, 4, 5, 6, 7, -1,
- 9, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 19, -1, 21, 22, 23, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 40, 41, 42, -1, -1, 45, 46, -1, -1,
- 49, -1, 51, -1, -1, 54, 55, 3, 4, 5,
- 6, 7, -1, 9, 3, 4, 5, 6, 7, -1,
- 9, -1, -1, 19, -1, 21, 22, 23, -1, -1,
- 19, -1, 21, 22, 23, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 40, 41, 42, -1, -1, 45,
- 46, -1, -1, 49, -1, 51, -1, -1, 54, 55,
- 49, -1, 51, -1, -1, 54, 55
-};
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/stone/jimb/main-98r2/share/bison.simple"
-
-/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-#ifndef alloca
-#ifdef __GNUC__
-#define alloca __builtin_alloca
-#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
-#include <alloca.h>
-#else /* not sparc */
-#if defined (MSDOS) && !defined (__TURBOC__)
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
- #pragma alloca
-#else /* not MSDOS, __TURBOC__, or _AIX */
-#ifdef __hpux
-#ifdef __cplusplus
-extern "C" {
-void *alloca (unsigned int);
-};
-#else /* not __cplusplus */
-void *alloca ();
-#endif /* not __cplusplus */
-#endif /* __hpux */
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc. */
-#endif /* not GNU C. */
-#endif /* alloca not defined. */
-
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
-/* Note: there must be only one dollar sign in this file.
- It is replaced by the list of actions, each action
- as one case of the switch. */
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY -2
-#define YYEOF 0
-#define YYACCEPT return(0)
-#define YYABORT return(1)
-#define YYERROR goto yyerrlab1
-/* Like YYERROR except do call yyerror.
- This remains here temporarily to ease the
- transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
-#define YYFAIL goto yyerrlab
-#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(token, value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { yychar = (token), yylval = (value); \
- yychar1 = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
- goto yybackup; \
- } \
- else \
- { yyerror ("syntax error: cannot back up"); YYERROR; } \
-while (0)
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-#ifndef YYPURE
-#define YYLEX yylex()
-#endif
-
-#ifdef YYPURE
-#ifdef YYLSP_NEEDED
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval, &yylloc)
-#endif
-#else /* not YYLSP_NEEDED */
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval)
-#endif
-#endif /* not YYLSP_NEEDED */
-#endif
-
-/* If nonreentrant, generate the variables here */
-
-#ifndef YYPURE
-
-int yychar; /* the lookahead symbol */
-YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
-
-#ifdef YYLSP_NEEDED
-YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
-#endif
-
-int yynerrs; /* number of parse errors so far */
-#endif /* not YYPURE */
-
-#if YYDEBUG != 0
-int yydebug; /* nonzero means print parse trace */
-/* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
-#endif
-
-/* YYINITDEPTH indicates the initial size of the parser's stacks */
-
-#ifndef YYINITDEPTH
-#define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
-
-#if YYMAXDEPTH == 0
-#undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 10000
-#endif
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-int yyparse (void);
-#endif
-
-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
-#else /* not GNU C or C++ */
-#ifndef __cplusplus
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (to, from, count)
- char *to;
- char *from;
- int count;
-{
- register char *f = from;
- register char *t = to;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#else /* __cplusplus */
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (char *to, char *from, int count)
-{
- register char *f = from;
- register char *t = to;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#endif
-#endif
-
-#line 196 "/stone/jimb/main-98r2/share/bison.simple"
-
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
- into yyparse. The argument should have type void *.
- It should actually point to an object.
- Grammar actions can access the variable by casting it
- to the proper pointer type. */
-
-#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
-#define YYPARSE_PARAM_ARG
-#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
-
-int
-yyparse(YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
-{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */
-
- short yyssa[YYINITDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
-
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to xreallocate them elsewhere */
-
-#ifdef YYLSP_NEEDED
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
-#else
-#define YYPOPSTACK (yyvsp--, yyssp--)
-#endif
-
- int yystacksize = YYINITDEPTH;
-
-#ifdef YYPURE
- int yychar;
- YYSTYPE yylval;
- int yynerrs;
-#ifdef YYLSP_NEEDED
- YYLTYPE yylloc;
-#endif
-#endif
-
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
-
- int yylen;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
-#endif
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
-
- yyssp = yyss - 1;
- yyvsp = yyvs;
-#ifdef YYLSP_NEEDED
- yylsp = yyls;
-#endif
-
-/* Push a new state, which is found in yystate . */
-/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks. */
-yynewstate:
-
- *++yyssp = yystate;
-
- if (yyssp >= yyss + yystacksize - 1)
- {
- /* Give user a chance to xreallocate the stack */
- /* Use copies of these so that the &'s don't force the real ones into memory. */
- YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
-#ifdef YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
-#endif
-
- /* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
-#ifdef YYLSP_NEEDED
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
-#else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
-#endif
-
- yyss = yyss1; yyvs = yyvs1;
-#ifdef YYLSP_NEEDED
- yyls = yyls1;
-#endif
-#else /* no yyoverflow */
- /* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- {
- yyerror("parser stack overflow");
- return 2;
- }
- yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
- yystacksize = YYMAXDEPTH;
- yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
-#endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
-#ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
-
- if (yyssp >= yyss + yystacksize - 1)
- YYABORT;
- }
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
-#endif
-
- goto yybackup;
- yybackup:
-
-/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
-/* yyresume: */
-
- /* First try to decide what to do without reference to lookahead token. */
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
-
- if (yychar == YYEMPTY)
- {
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
-#endif
- yychar = YYLEX;
- }
-
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
- {
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
-#endif
- }
- else
- {
- yychar1 = YYTRANSLATE(yychar);
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise meaning
- of a token, for further debugging info. */
-#ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
-#endif
- fprintf (stderr, ")\n");
- }
-#endif
- }
-
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
- goto yydefault;
-
- yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrlab;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Shift the lookahead token. */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
-#endif
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
-
- yystate = yyn;
- goto yynewstate;
-
-/* Do the default action for the current state. */
-yydefault:
-
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
-
-/* Do a reduction. yyn is the number of a rule to reduce with. */
-yyreduce:
- yylen = yyr2[yyn];
- if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- int i;
-
- fprintf (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
-
- /* Print the symbols being reduced, and their result. */
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
-#endif
-
-
- switch (yyn) {
-
-case 3:
-#line 208 "jv-exp.y"
-{
- write_exp_elt_opcode(OP_TYPE);
- write_exp_elt_type(yyvsp[0].tval);
- write_exp_elt_opcode(OP_TYPE);
- ;
- break;}
-case 6:
-#line 222 "jv-exp.y"
-{
- write_exp_elt_opcode (OP_STRING);
- write_exp_string (yyvsp[0].sval);
- write_exp_elt_opcode (OP_STRING);
- ;
- break;}
-case 7:
-#line 231 "jv-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (yyvsp[0].typed_val_int.type);
- write_exp_elt_longcst ((LONGEST)(yyvsp[0].typed_val_int.val));
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 8:
-#line 236 "jv-exp.y"
-{ YYSTYPE val;
- parse_number (yyvsp[0].sval.ptr, yyvsp[0].sval.length, 0, &val);
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (val.typed_val_int.type);
- write_exp_elt_longcst ((LONGEST)val.typed_val_int.val);
- write_exp_elt_opcode (OP_LONG);
- ;
- break;}
-case 9:
-#line 244 "jv-exp.y"
-{ write_exp_elt_opcode (OP_DOUBLE);
- write_exp_elt_type (yyvsp[0].typed_val_float.type);
- write_exp_elt_dblcst (yyvsp[0].typed_val_float.dval);
- write_exp_elt_opcode (OP_DOUBLE); ;
- break;}
-case 10:
-#line 249 "jv-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (java_boolean_type);
- write_exp_elt_longcst ((LONGEST)yyvsp[0].lval);
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 13:
-#line 266 "jv-exp.y"
-{ yyval.tval = java_boolean_type; ;
- break;}
-case 16:
-#line 276 "jv-exp.y"
-{ yyval.tval = java_byte_type; ;
- break;}
-case 17:
-#line 278 "jv-exp.y"
-{ yyval.tval = java_short_type; ;
- break;}
-case 18:
-#line 280 "jv-exp.y"
-{ yyval.tval = java_int_type; ;
- break;}
-case 19:
-#line 282 "jv-exp.y"
-{ yyval.tval = java_long_type; ;
- break;}
-case 20:
-#line 284 "jv-exp.y"
-{ yyval.tval = java_char_type; ;
- break;}
-case 21:
-#line 289 "jv-exp.y"
-{ yyval.tval = java_float_type; ;
- break;}
-case 22:
-#line 291 "jv-exp.y"
-{ yyval.tval = java_double_type; ;
- break;}
-case 23:
-#line 303 "jv-exp.y"
-{ yyval.tval = java_type_from_name (yyvsp[0].sval); ;
- break;}
-case 25:
-#line 312 "jv-exp.y"
-{ yyval.tval = java_array_type (yyvsp[-1].tval, yyvsp[0].lval); ;
- break;}
-case 26:
-#line 314 "jv-exp.y"
-{ yyval.tval = java_array_type (java_type_from_name (yyvsp[-1].sval), yyvsp[0].lval); ;
- break;}
-case 33:
-#line 334 "jv-exp.y"
-{ yyval.sval.length = yyvsp[-2].sval.length + yyvsp[0].sval.length + 1;
- if (yyvsp[-2].sval.ptr + yyvsp[-2].sval.length + 1 == yyvsp[0].sval.ptr
- && yyvsp[-2].sval.ptr[yyvsp[-2].sval.length] == '.')
- yyval.sval.ptr = yyvsp[-2].sval.ptr; /* Optimization. */
- else
- {
- yyval.sval.ptr = (char *) xmalloc (yyval.sval.length + 1);
- make_cleanup (free, yyval.sval.ptr);
- sprintf (yyval.sval.ptr, "%.*s.%.*s",
- yyvsp[-2].sval.length, yyvsp[-2].sval.ptr, yyvsp[0].sval.length, yyvsp[0].sval.ptr);
- } ;
- break;}
-case 35:
-#line 358 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_COMMA); ;
- break;}
-case 39:
-#line 369 "jv-exp.y"
-{ write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS); ;
- break;}
-case 45:
-#line 377 "jv-exp.y"
-{ write_exp_elt_opcode (OP_ARRAY);
- write_exp_elt_longcst ((LONGEST) 0);
- write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
- write_exp_elt_opcode (OP_ARRAY); ;
- break;}
-case 46:
-#line 385 "jv-exp.y"
-{ start_arglist (); ;
- break;}
-case 47:
-#line 390 "jv-exp.y"
-{ yyval.lval = end_arglist () - 1; ;
- break;}
-case 48:
-#line 395 "jv-exp.y"
-{ error ("FIXME - ClassInstanceCreationExpression"); ;
- break;}
-case 49:
-#line 400 "jv-exp.y"
-{ arglist_len = 1; ;
- break;}
-case 50:
-#line 402 "jv-exp.y"
-{ arglist_len++; ;
- break;}
-case 51:
-#line 407 "jv-exp.y"
-{ arglist_len = 0; ;
- break;}
-case 53:
-#line 413 "jv-exp.y"
-{ error ("FIXME - ArrayCreatiionExpression"); ;
- break;}
-case 54:
-#line 415 "jv-exp.y"
-{ error ("FIXME - ArrayCreatiionExpression"); ;
- break;}
-case 58:
-#line 429 "jv-exp.y"
-{ yyval.lval = 1; ;
- break;}
-case 59:
-#line 431 "jv-exp.y"
-{ yyval.lval = yyvsp[-2].lval + 1; ;
- break;}
-case 61:
-#line 437 "jv-exp.y"
-{ yyval.lval = 0; ;
- break;}
-case 62:
-#line 442 "jv-exp.y"
-{ push_fieldnames (yyvsp[0].sval); ;
- break;}
-case 63:
-#line 444 "jv-exp.y"
-{ push_fieldnames (yyvsp[0].sval); ;
- break;}
-case 64:
-#line 450 "jv-exp.y"
-{ error ("method invocation not implemented"); ;
- break;}
-case 65:
-#line 452 "jv-exp.y"
-{ error ("method invocation not implemented"); ;
- break;}
-case 66:
-#line 454 "jv-exp.y"
-{ error ("method invocation not implemented"); ;
- break;}
-case 67:
-#line 459 "jv-exp.y"
-{
- /* Emit code for the Name now, then exchange it in the
- expout array with the Expression's code. We could
- introduce a OP_SWAP code or a reversed version of
- BINOP_SUBSCRIPT, but that makes the rest of GDB pay
- for our parsing kludges. */
- struct expression *name_expr;
-
- push_expression_name (yyvsp[-3].sval);
- name_expr = copy_exp (expout, expout_ptr);
- expout_ptr -= name_expr->nelts;
- insert_exp (expout_ptr-length_of_subexp (expout, expout_ptr),
- name_expr);
- free (name_expr);
- write_exp_elt_opcode (BINOP_SUBSCRIPT);
- ;
- break;}
-case 68:
-#line 476 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_SUBSCRIPT); ;
- break;}
-case 69:
-#line 478 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_SUBSCRIPT); ;
- break;}
-case 71:
-#line 484 "jv-exp.y"
-{ push_expression_name (yyvsp[0].sval); ;
- break;}
-case 75:
-#line 493 "jv-exp.y"
-{ write_exp_elt_opcode (UNOP_POSTINCREMENT); ;
- break;}
-case 76:
-#line 498 "jv-exp.y"
-{ write_exp_elt_opcode (UNOP_POSTDECREMENT); ;
- break;}
-case 80:
-#line 506 "jv-exp.y"
-{ write_exp_elt_opcode (UNOP_NEG); ;
- break;}
-case 81:
-#line 508 "jv-exp.y"
-{ write_exp_elt_opcode (UNOP_IND); ;
- break;}
-case 83:
-#line 514 "jv-exp.y"
-{ write_exp_elt_opcode (UNOP_PREINCREMENT); ;
- break;}
-case 84:
-#line 519 "jv-exp.y"
-{ write_exp_elt_opcode (UNOP_PREDECREMENT); ;
- break;}
-case 86:
-#line 525 "jv-exp.y"
-{ write_exp_elt_opcode (UNOP_COMPLEMENT); ;
- break;}
-case 87:
-#line 527 "jv-exp.y"
-{ write_exp_elt_opcode (UNOP_LOGICAL_NOT); ;
- break;}
-case 89:
-#line 533 "jv-exp.y"
-{ write_exp_elt_opcode (UNOP_CAST);
- write_exp_elt_type (java_array_type (yyvsp[-3].tval, yyvsp[-2].lval));
- write_exp_elt_opcode (UNOP_CAST); ;
- break;}
-case 90:
-#line 537 "jv-exp.y"
-{
- int exp_size = expout_ptr;
- int last_exp_size = length_of_subexp(expout, expout_ptr);
- struct type *type;
- int i;
- int base = expout_ptr - last_exp_size - 3;
- if (base < 0 || expout->elts[base+2].opcode != OP_TYPE)
- error ("invalid cast expression");
- type = expout->elts[base+1].type;
- /* Remove the 'Expression' and slide the
- UnaryExpressionNotPlusMinus down to replace it. */
- for (i = 0; i < last_exp_size; i++)
- expout->elts[base + i] = expout->elts[base + i + 3];
- expout_ptr -= 3;
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
- type = lookup_pointer_type (type);
- write_exp_elt_opcode (UNOP_CAST);
- write_exp_elt_type (type);
- write_exp_elt_opcode (UNOP_CAST);
- ;
- break;}
-case 91:
-#line 558 "jv-exp.y"
-{ write_exp_elt_opcode (UNOP_CAST);
- write_exp_elt_type (java_array_type (java_type_from_name (yyvsp[-3].sval), yyvsp[-2].lval));
- write_exp_elt_opcode (UNOP_CAST); ;
- break;}
-case 93:
-#line 567 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_MUL); ;
- break;}
-case 94:
-#line 569 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_DIV); ;
- break;}
-case 95:
-#line 571 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_REM); ;
- break;}
-case 97:
-#line 577 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_ADD); ;
- break;}
-case 98:
-#line 579 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_SUB); ;
- break;}
-case 100:
-#line 585 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_LSH); ;
- break;}
-case 101:
-#line 587 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_RSH); ;
- break;}
-case 103:
-#line 594 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_LESS); ;
- break;}
-case 104:
-#line 596 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_GTR); ;
- break;}
-case 105:
-#line 598 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_LEQ); ;
- break;}
-case 106:
-#line 600 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_GEQ); ;
- break;}
-case 108:
-#line 607 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_EQUAL); ;
- break;}
-case 109:
-#line 609 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_NOTEQUAL); ;
- break;}
-case 111:
-#line 615 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_AND); ;
- break;}
-case 113:
-#line 621 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_XOR); ;
- break;}
-case 115:
-#line 626 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_IOR); ;
- break;}
-case 117:
-#line 632 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_LOGICAL_AND); ;
- break;}
-case 119:
-#line 638 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_LOGICAL_OR); ;
- break;}
-case 121:
-#line 644 "jv-exp.y"
-{ write_exp_elt_opcode (TERNOP_COND); ;
- break;}
-case 124:
-#line 654 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_ASSIGN); ;
- break;}
-case 125:
-#line 656 "jv-exp.y"
-{ write_exp_elt_opcode (BINOP_ASSIGN_MODIFY);
- write_exp_elt_opcode (yyvsp[-1].opcode);
- write_exp_elt_opcode (BINOP_ASSIGN_MODIFY); ;
- break;}
-case 126:
-#line 663 "jv-exp.y"
-{ push_expression_name (yyvsp[0].sval); ;
- break;}
-}
- /* the action file gets copied in in place of this dollarsign */
-#line 498 "/stone/jimb/main-98r2/share/bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-#ifdef YYLSP_NEEDED
- yylsp -= yylen;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
- *++yyvsp = yyval;
-
-#ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
-#endif
-
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTBASE];
-
- goto yynewstate;
-
-yyerrlab: /* here on detecting error */
-
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
- {
- ++yynerrs;
-
-#ifdef YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (yyn > YYFLAG && yyn < YYLAST)
- {
- int size = 0;
- char *msg;
- int x, count;
-
- count = 0;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) xmalloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
-
- if (count < 5)
- {
- count = 0;
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- {
- strcat(msg, count == 0 ? ", expecting `" : " or `");
- strcat(msg, yytname[x]);
- strcat(msg, "'");
- count++;
- }
- }
- yyerror(msg);
- free(msg);
- }
- else
- yyerror ("parse error; also virtual memory exceeded");
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror("parse error");
- }
-
- goto yyerrlab1;
-yyerrlab1: /* here on error raised explicitly by an action */
-
- if (yyerrstatus == 3)
- {
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
-
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
-
- yychar = YYEMPTY;
- }
-
- /* Else will try to reuse lookahead token
- after shifting the error token. */
-
- yyerrstatus = 3; /* Each real token shifted decrements this */
-
- goto yyerrhandle;
-
-yyerrdefault: /* current state does not do anything special for the error token. */
-
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
-#endif
-
-yyerrpop: /* pop the current state because it cannot handle the error token */
-
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
-#ifdef YYLSP_NEEDED
- yylsp--;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
-yyerrhandle:
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
-
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
-
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrpop;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
-#endif
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- yystate = yyn;
- goto yynewstate;
-}
-#line 675 "jv-exp.y"
-
-/* Take care of parsing a number (anything that starts with a digit).
- Set yylval and return the token type; update lexptr.
- LEN is the number of characters in it. */
-
-/*** Needs some error checking for the float case ***/
-
-static int
-parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
- int parsed_float;
- YYSTYPE *putithere;
-{
- register ULONGEST n = 0;
- ULONGEST limit, limit_div_base;
-
- register int c;
- register int base = input_radix;
-
- struct type *type;
-
- if (parsed_float)
- {
- /* It's a float since it contains a point or an exponent. */
- char c;
- int num = 0; /* number of tokens scanned by scanf */
- char saved_char = p[len];
-
- p[len] = 0; /* null-terminate the token */
- if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval, &c);
- else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval, &c);
- else
- {
-#ifdef SCANF_HAS_LONG_DOUBLE
- num = sscanf (p, "%Lg%c", &putithere->typed_val_float.dval, &c);
-#else
- /* Scan it into a double, then assign it to the long double.
- This at least wins with values representable in the range
- of doubles. */
- double temp;
- num = sscanf (p, "%lg%c", &temp, &c);
- putithere->typed_val_float.dval = temp;
-#endif
- }
- p[len] = saved_char; /* restore the input stream */
- if (num != 1) /* check scanf found ONLY a float ... */
- return ERROR;
- /* See if it has `f' or `d' suffix (float or double). */
-
- c = tolower (p[len - 1]);
-
- if (c == 'f' || c == 'F')
- putithere->typed_val_float.type = builtin_type_float;
- else if (isdigit (c) || c == '.' || c == 'd' || c == 'D')
- putithere->typed_val_float.type = builtin_type_double;
- else
- return ERROR;
-
- return FLOATING_POINT_LITERAL;
- }
-
- /* Handle base-switching prefixes 0x, 0t, 0d, 0 */
- if (p[0] == '0')
- switch (p[1])
- {
- case 'x':
- case 'X':
- if (len >= 3)
- {
- p += 2;
- base = 16;
- len -= 2;
- }
- break;
-
- case 't':
- case 'T':
- case 'd':
- case 'D':
- if (len >= 3)
- {
- p += 2;
- base = 10;
- len -= 2;
- }
- break;
-
- default:
- base = 8;
- break;
- }
-
- c = p[len-1];
- limit = (ULONGEST)0xffffffff;
- if (c == 'l' || c == 'L')
- {
- type = java_long_type;
- len--;
- /* A paranoid calculation of (1<<64)-1. */
- limit = ((limit << 16) << 16) | limit;
- }
- else
- {
- type = java_int_type;
- }
- limit_div_base = limit / (ULONGEST) base;
-
- while (--len >= 0)
- {
- c = *p++;
- if (c >= '0' && c <= '9')
- c -= '0';
- else if (c >= 'A' && c <= 'Z')
- c -= 'A' - 10;
- else if (c >= 'a' && c <= 'z')
- c -= 'a' - 10;
- else
- return ERROR; /* Char not a digit */
- if (c >= base)
- return ERROR;
- if (n > limit_div_base
- || (n *= base) > limit - c)
- error ("Numeric constant too large.");
- n += c;
- }
-
- putithere->typed_val_int.val = n;
- putithere->typed_val_int.type = type;
- return INTEGER_LITERAL;
-}
-
-struct token
-{
- char *operator;
- int token;
- enum exp_opcode opcode;
-};
-
-static const struct token tokentab3[] =
- {
- {">>=", ASSIGN_MODIFY, BINOP_RSH},
- {"<<=", ASSIGN_MODIFY, BINOP_LSH}
- };
-
-static const struct token tokentab2[] =
- {
- {"+=", ASSIGN_MODIFY, BINOP_ADD},
- {"-=", ASSIGN_MODIFY, BINOP_SUB},
- {"*=", ASSIGN_MODIFY, BINOP_MUL},
- {"/=", ASSIGN_MODIFY, BINOP_DIV},
- {"%=", ASSIGN_MODIFY, BINOP_REM},
- {"|=", ASSIGN_MODIFY, BINOP_BITWISE_IOR},
- {"&=", ASSIGN_MODIFY, BINOP_BITWISE_AND},
- {"^=", ASSIGN_MODIFY, BINOP_BITWISE_XOR},
- {"++", INCREMENT, BINOP_END},
- {"--", DECREMENT, BINOP_END},
- {"&&", ANDAND, BINOP_END},
- {"||", OROR, BINOP_END},
- {"<<", LSH, BINOP_END},
- {">>", RSH, BINOP_END},
- {"==", EQUAL, BINOP_END},
- {"!=", NOTEQUAL, BINOP_END},
- {"<=", LEQ, BINOP_END},
- {">=", GEQ, BINOP_END}
- };
-
-/* Read one token, getting characters through lexptr. */
-
-static int
-yylex ()
-{
- int c;
- int namelen;
- unsigned int i;
- char *tokstart;
- char *tokptr;
- int tempbufindex;
- static char *tempbuf;
- static int tempbufsize;
-
- retry:
-
- tokstart = lexptr;
- /* See if it is a special token of length 3. */
- for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
- if (STREQN (tokstart, tokentab3[i].operator, 3))
- {
- lexptr += 3;
- yylval.opcode = tokentab3[i].opcode;
- return tokentab3[i].token;
- }
-
- /* See if it is a special token of length 2. */
- for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
- if (STREQN (tokstart, tokentab2[i].operator, 2))
- {
- lexptr += 2;
- yylval.opcode = tokentab2[i].opcode;
- return tokentab2[i].token;
- }
-
- switch (c = *tokstart)
- {
- case 0:
- return 0;
-
- case ' ':
- case '\t':
- case '\n':
- lexptr++;
- goto retry;
-
- case '\'':
- /* We either have a character constant ('0' or '\177' for example)
- or we have a quoted symbol reference ('foo(int,int)' in C++
- for example). */
- lexptr++;
- c = *lexptr++;
- if (c == '\\')
- c = parse_escape (&lexptr);
- else if (c == '\'')
- error ("Empty character constant.");
-
- yylval.typed_val_int.val = c;
- yylval.typed_val_int.type = builtin_type_char;
-
- c = *lexptr++;
- if (c != '\'')
- {
- namelen = skip_quoted (tokstart) - tokstart;
- if (namelen > 2)
- {
- lexptr = tokstart + namelen;
- if (lexptr[-1] != '\'')
- error ("Unmatched single quote.");
- namelen -= 2;
- tokstart++;
- goto tryname;
- }
- error ("Invalid character constant.");
- }
- return INTEGER_LITERAL;
-
- case '(':
- paren_depth++;
- lexptr++;
- return c;
-
- case ')':
- if (paren_depth == 0)
- return 0;
- paren_depth--;
- lexptr++;
- return c;
-
- case ',':
- if (comma_terminates && paren_depth == 0)
- return 0;
- lexptr++;
- return c;
-
- case '.':
- /* Might be a floating point number. */
- if (lexptr[1] < '0' || lexptr[1] > '9')
- goto symbol; /* Nope, must be a symbol. */
- /* FALL THRU into number case. */
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- /* It's a number. */
- int got_dot = 0, got_e = 0, toktype;
- register char *p = tokstart;
- int hex = input_radix > 10;
-
- if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
- {
- p += 2;
- hex = 1;
- }
- else if (c == '0' && (p[1]=='t' || p[1]=='T' || p[1]=='d' || p[1]=='D'))
- {
- p += 2;
- hex = 0;
- }
-
- for (;; ++p)
- {
- /* This test includes !hex because 'e' is a valid hex digit
- and thus does not indicate a floating point number when
- the radix is hex. */
- if (!hex && !got_e && (*p == 'e' || *p == 'E'))
- got_dot = got_e = 1;
- /* This test does not include !hex, because a '.' always indicates
- a decimal floating point number regardless of the radix. */
- else if (!got_dot && *p == '.')
- got_dot = 1;
- else if (got_e && (p[-1] == 'e' || p[-1] == 'E')
- && (*p == '-' || *p == '+'))
- /* This is the sign of the exponent, not the end of the
- number. */
- continue;
- /* We will take any letters or digits. parse_number will
- complain if past the radix, or if L or U are not final. */
- else if ((*p < '0' || *p > '9')
- && ((*p < 'a' || *p > 'z')
- && (*p < 'A' || *p > 'Z')))
- break;
- }
- toktype = parse_number (tokstart, p - tokstart, got_dot|got_e, &yylval);
- if (toktype == ERROR)
- {
- char *err_copy = (char *) alloca (p - tokstart + 1);
-
- memcpy (err_copy, tokstart, p - tokstart);
- err_copy[p - tokstart] = 0;
- error ("Invalid number \"%s\".", err_copy);
- }
- lexptr = p;
- return toktype;
- }
-
- case '+':
- case '-':
- case '*':
- case '/':
- case '%':
- case '|':
- case '&':
- case '^':
- case '~':
- case '!':
- case '<':
- case '>':
- case '[':
- case ']':
- case '?':
- case ':':
- case '=':
- case '{':
- case '}':
- symbol:
- lexptr++;
- return c;
-
- case '"':
-
- /* Build the gdb internal form of the input string in tempbuf,
- translating any standard C escape forms seen. Note that the
- buffer is null byte terminated *only* for the convenience of
- debugging gdb itself and printing the buffer contents when
- the buffer contains no embedded nulls. Gdb does not depend
- upon the buffer being null byte terminated, it uses the length
- string instead. This allows gdb to handle C strings (as well
- as strings in other languages) with embedded null bytes */
-
- tokptr = ++tokstart;
- tempbufindex = 0;
-
- do {
- /* Grow the static temp buffer if necessary, including allocating
- the first one on demand. */
- if (tempbufindex + 1 >= tempbufsize)
- {
- tempbuf = (char *) xrealloc (tempbuf, tempbufsize += 64);
- }
- switch (*tokptr)
- {
- case '\0':
- case '"':
- /* Do nothing, loop will terminate. */
- break;
- case '\\':
- tokptr++;
- c = parse_escape (&tokptr);
- if (c == -1)
- {
- continue;
- }
- tempbuf[tempbufindex++] = c;
- break;
- default:
- tempbuf[tempbufindex++] = *tokptr++;
- break;
- }
- } while ((*tokptr != '"') && (*tokptr != '\0'));
- if (*tokptr++ != '"')
- {
- error ("Unterminated string in expression.");
- }
- tempbuf[tempbufindex] = '\0'; /* See note above */
- yylval.sval.ptr = tempbuf;
- yylval.sval.length = tempbufindex;
- lexptr = tokptr;
- return (STRING_LITERAL);
- }
-
- if (!(c == '_' || c == '$'
- || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
- /* We must have come across a bad character (e.g. ';'). */
- error ("Invalid character '%c' in expression.", c);
-
- /* It's a name. See how long it is. */
- namelen = 0;
- for (c = tokstart[namelen];
- (c == '_'
- || c == '$'
- || (c >= '0' && c <= '9')
- || (c >= 'a' && c <= 'z')
- || (c >= 'A' && c <= 'Z')
- || c == '<');
- )
- {
- if (c == '<')
- {
- int i = namelen;
- while (tokstart[++i] && tokstart[i] != '>');
- if (tokstart[i] == '>')
- namelen = i;
- }
- c = tokstart[++namelen];
- }
-
- /* The token "if" terminates the expression and is NOT
- removed from the input stream. */
- if (namelen == 2 && tokstart[0] == 'i' && tokstart[1] == 'f')
- {
- return 0;
- }
-
- lexptr += namelen;
-
- tryname:
-
- /* Catch specific keywords. Should be done with a data structure. */
- switch (namelen)
- {
- case 7:
- if (STREQN (tokstart, "boolean", 7))
- return BOOLEAN;
- break;
- case 6:
- if (STREQN (tokstart, "double", 6))
- return DOUBLE;
- break;
- case 5:
- if (STREQN (tokstart, "short", 5))
- return SHORT;
- if (STREQN (tokstart, "false", 5))
- {
- yylval.lval = 0;
- return BOOLEAN_LITERAL;
- }
- if (STREQN (tokstart, "super", 5))
- return SUPER;
- if (STREQN (tokstart, "float", 5))
- return FLOAT;
- break;
- case 4:
- if (STREQN (tokstart, "long", 4))
- return LONG;
- if (STREQN (tokstart, "byte", 4))
- return BYTE;
- if (STREQN (tokstart, "char", 4))
- return CHAR;
- if (STREQN (tokstart, "true", 4))
- {
- yylval.lval = 1;
- return BOOLEAN_LITERAL;
- }
- if (current_language->la_language == language_cplus
- && STREQN (tokstart, "this", 4))
- {
- static const char this_name[] =
- { CPLUS_MARKER, 't', 'h', 'i', 's', '\0' };
-
- if (lookup_symbol (this_name, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL))
- return THIS;
- }
- break;
- case 3:
- if (STREQN (tokstart, "int", 3))
- return INT;
- if (STREQN (tokstart, "new", 3))
- return NEW;
- break;
- default:
- break;
- }
-
- yylval.sval.ptr = tokstart;
- yylval.sval.length = namelen;
-
- if (*tokstart == '$')
- {
- write_dollar_variable (yylval.sval);
- return VARIABLE;
- }
-
- /* Input names that aren't symbols but ARE valid hex numbers,
- when the input radix permits them, can be names or numbers
- depending on the parse. Note we support radixes > 16 here. */
- if (((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10) ||
- (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10)))
- {
- YYSTYPE newlval; /* Its value is ignored. */
- int hextype = parse_number (tokstart, namelen, 0, &newlval);
- if (hextype == INTEGER_LITERAL)
- return NAME_OR_INT;
- }
- return IDENTIFIER;
-}
-
-void
-yyerror (msg)
- char *msg;
-{
- error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
-}
-
-static struct type *
-java_type_from_name (name)
- struct stoken name;
-
-{
- char *tmp = copy_name (name);
- struct type *typ = java_lookup_class (tmp);
- if (typ == NULL || TYPE_CODE (typ) != TYPE_CODE_STRUCT)
- error ("No class named %s.", tmp);
- return typ;
-}
-
-/* If NAME is a valid variable name in this scope, push it and return 1.
- Otherwise, return 0. */
-
-static int
-push_variable (name)
- struct stoken name;
-
-{
- char *tmp = copy_name (name);
- int is_a_field_of_this = 0;
- struct symbol *sym;
- sym = lookup_symbol (tmp, expression_context_block, VAR_NAMESPACE,
- &is_a_field_of_this, (struct symtab **) NULL);
- if (sym && SYMBOL_CLASS (sym) != LOC_TYPEDEF)
- {
- if (symbol_read_needs_frame (sym))
- {
- if (innermost_block == 0 ||
- contained_in (block_found, innermost_block))
- innermost_block = block_found;
- }
-
- write_exp_elt_opcode (OP_VAR_VALUE);
- /* We want to use the selected frame, not another more inner frame
- which happens to be in the same block. */
- write_exp_elt_block (NULL);
- write_exp_elt_sym (sym);
- write_exp_elt_opcode (OP_VAR_VALUE);
- return 1;
- }
- if (is_a_field_of_this)
- {
- /* it hangs off of `this'. Must not inadvertently convert from a
- method call to data ref. */
- if (innermost_block == 0 ||
- contained_in (block_found, innermost_block))
- innermost_block = block_found;
- write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (OP_THIS);
- write_exp_elt_opcode (STRUCTOP_PTR);
- write_exp_string (name);
- write_exp_elt_opcode (STRUCTOP_PTR);
- return 1;
- }
- return 0;
-}
-
-/* Assuming a reference expression has been pushed, emit the
- STRUCTOP_STRUCT ops to access the field named NAME. If NAME is a
- qualified name (has '.'), generate a field access for each part. */
-
-static void
-push_fieldnames (name)
- struct stoken name;
-{
- int i;
- struct stoken token;
- token.ptr = name.ptr;
- for (i = 0; ; i++)
- {
- if (i == name.length || name.ptr[i] == '.')
- {
- /* token.ptr is start of current field name. */
- token.length = &name.ptr[i] - token.ptr;
- write_exp_elt_opcode (STRUCTOP_STRUCT);
- write_exp_string (token);
- write_exp_elt_opcode (STRUCTOP_STRUCT);
- token.ptr += token.length + 1;
- }
- if (i >= name.length)
- break;
- }
-}
-
-/* Helper routine for push_expression_name.
- Handle a qualified name, where DOT_INDEX is the index of the first '.' */
-
-static void
-push_qualified_expression_name (name, dot_index)
- struct stoken name;
- int dot_index;
-{
- struct stoken token;
- char *tmp;
- struct type *typ;
-
- token.ptr = name.ptr;
- token.length = dot_index;
-
- if (push_variable (token))
- {
- token.ptr = name.ptr + dot_index + 1;
- token.length = name.length - dot_index - 1;
- push_fieldnames (token);
- return;
- }
-
- token.ptr = name.ptr;
- for (;;)
- {
- token.length = dot_index;
- tmp = copy_name (token);
- typ = java_lookup_class (tmp);
- if (typ != NULL)
- {
- if (dot_index == name.length)
- {
- write_exp_elt_opcode(OP_TYPE);
- write_exp_elt_type(typ);
- write_exp_elt_opcode(OP_TYPE);
- return;
- }
- dot_index++; /* Skip '.' */
- name.ptr += dot_index;
- name.length -= dot_index;
- dot_index = 0;
- while (dot_index < name.length && name.ptr[dot_index] != '.')
- dot_index++;
- token.ptr = name.ptr;
- token.length = dot_index;
- write_exp_elt_opcode (OP_SCOPE);
- write_exp_elt_type (typ);
- write_exp_string (token);
- write_exp_elt_opcode (OP_SCOPE);
- if (dot_index < name.length)
- {
- dot_index++;
- name.ptr += dot_index;
- name.length -= dot_index;
- push_fieldnames (name);
- }
- return;
- }
- else if (dot_index >= name.length)
- break;
- dot_index++; /* Skip '.' */
- while (dot_index < name.length && name.ptr[dot_index] != '.')
- dot_index++;
- }
- error ("unknown type `%.*s'", name.length, name.ptr);
-}
-
-/* Handle Name in an expression (or LHS).
- Handle VAR, TYPE, TYPE.FIELD1....FIELDN and VAR.FIELD1....FIELDN. */
-
-static void
-push_expression_name (name)
- struct stoken name;
-{
- char *tmp;
- struct type *typ;
- char *ptr;
- int i;
-
- for (i = 0; i < name.length; i++)
- {
- if (name.ptr[i] == '.')
- {
- /* It's a Qualified Expression Name. */
- push_qualified_expression_name (name, i);
- return;
- }
- }
-
- /* It's a Simple Expression Name. */
-
- if (push_variable (name))
- return;
- tmp = copy_name (name);
- typ = java_lookup_class (tmp);
- if (typ != NULL)
- {
- write_exp_elt_opcode(OP_TYPE);
- write_exp_elt_type(typ);
- write_exp_elt_opcode(OP_TYPE);
- }
- else
- {
- struct minimal_symbol *msymbol;
-
- msymbol = lookup_minimal_symbol (tmp, NULL, NULL);
- if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
- else if (!have_full_symbols () && !have_partial_symbols ())
- error ("No symbol table is loaded. Use the \"file\" command.");
- else
- error ("No symbol \"%s\" in current context.", tmp);
- }
-
-}
-
-
-/* The following two routines, copy_exp and insert_exp, aren't specific to
- Java, so they could go in parse.c, but their only purpose is to support
- the parsing kludges we use in this file, so maybe it's best to isolate
- them here. */
-
-/* Copy the expression whose last element is at index ENDPOS - 1 in EXPR
- into a freshly xmalloc'ed struct expression. Its language_defn is set
- to null. */
-static struct expression *
-copy_exp (expr, endpos)
- struct expression *expr;
- int endpos;
-{
- int len = length_of_subexp (expr, endpos);
- struct expression *new
- = (struct expression *) xmalloc (sizeof (*new) + EXP_ELEM_TO_BYTES (len));
- new->nelts = len;
- memcpy (new->elts, expr->elts + endpos - len, EXP_ELEM_TO_BYTES (len));
- new->language_defn = 0;
-
- return new;
-}
-
-/* Insert the expression NEW into the current expression (expout) at POS. */
-static void
-insert_exp (pos, new)
- int pos;
- struct expression *new;
-{
- int newlen = new->nelts;
-
- /* Grow expout if necessary. In this function's only use at present,
- this should never be necessary. */
- if (expout_ptr + newlen > expout_size)
- {
- expout_size = max (expout_size * 2, expout_ptr + newlen + 10);
- expout = (struct expression *)
- xrealloc ((char *) expout, (sizeof (struct expression)
- + EXP_ELEM_TO_BYTES (expout_size)));
- }
-
- {
- int i;
-
- for (i = expout_ptr - 1; i >= pos; i--)
- expout->elts[i + newlen] = expout->elts[i];
- }
-
- memcpy (expout->elts + pos, new->elts, EXP_ELEM_TO_BYTES (newlen));
- expout_ptr += newlen;
-}
diff --git a/contrib/gdb/gdb/kdb-start.c b/contrib/gdb/gdb/kdb-start.c
deleted file mode 100644
index 7a4acb712089..000000000000
--- a/contrib/gdb/gdb/kdb-start.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Main loop for the standalone kernel debugger, for GDB, the GNU Debugger.
- Copyright 1989, 1991, 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. */
-
-#include "defs.h"
-
-static char *args[] =
-{"kdb", "kdb-symbols", 0};
-
-static char *environment[] =
-{0};
-
-char **environ;
-
-start ()
-{
- INIT_STACK (kdb_stack_beg, kdb_stack_end);
-
- environ = environment;
-
- main (2, args, environment);
-}
diff --git a/contrib/gdb/gdb/lynx-nat.c b/contrib/gdb/gdb/lynx-nat.c
deleted file mode 100644
index 9cd1672d3362..000000000000
--- a/contrib/gdb/gdb/lynx-nat.c
+++ /dev/null
@@ -1,829 +0,0 @@
-/* Native-dependent code for LynxOS.
- Copyright 1993, 1994, 1995, 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 "target.h"
-#include "gdbcore.h"
-#include "regcache.h"
-
-#include <sys/ptrace.h>
-#include <sys/wait.h>
-#include <sys/fpp.h>
-
-static unsigned long registers_addr (int pid);
-static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
-
-#define X(ENTRY)(offsetof(struct econtext, ENTRY))
-
-#ifdef I386
-/* Mappings from tm-i386v.h */
-
-static int regmap[] =
-{
- X (eax),
- X (ecx),
- X (edx),
- X (ebx),
- X (esp), /* sp */
- X (ebp), /* fp */
- X (esi),
- X (edi),
- X (eip), /* pc */
- X (flags), /* ps */
- X (cs),
- X (ss),
- X (ds),
- X (es),
- X (ecode), /* Lynx doesn't give us either fs or gs, so */
- X (fault), /* we just substitute these two in the hopes
- that they are useful. */
-};
-#endif /* I386 */
-
-#ifdef M68K
-/* Mappings from tm-m68k.h */
-
-static int regmap[] =
-{
- X (regs[0]), /* d0 */
- X (regs[1]), /* d1 */
- X (regs[2]), /* d2 */
- X (regs[3]), /* d3 */
- X (regs[4]), /* d4 */
- X (regs[5]), /* d5 */
- X (regs[6]), /* d6 */
- X (regs[7]), /* d7 */
- X (regs[8]), /* a0 */
- X (regs[9]), /* a1 */
- X (regs[10]), /* a2 */
- X (regs[11]), /* a3 */
- X (regs[12]), /* a4 */
- X (regs[13]), /* a5 */
- X (regs[14]), /* fp */
- offsetof (st_t, usp) - offsetof (st_t, ec), /* sp */
- X (status), /* ps */
- X (pc),
-
- X (fregs[0 * 3]), /* fp0 */
- X (fregs[1 * 3]), /* fp1 */
- X (fregs[2 * 3]), /* fp2 */
- X (fregs[3 * 3]), /* fp3 */
- X (fregs[4 * 3]), /* fp4 */
- X (fregs[5 * 3]), /* fp5 */
- X (fregs[6 * 3]), /* fp6 */
- X (fregs[7 * 3]), /* fp7 */
-
- X (fcregs[0]), /* fpcontrol */
- X (fcregs[1]), /* fpstatus */
- X (fcregs[2]), /* fpiaddr */
- X (ssw), /* fpcode */
- X (fault), /* fpflags */
-};
-#endif /* M68K */
-
-#ifdef SPARC
-/* Mappings from tm-sparc.h */
-
-#define FX(ENTRY)(offsetof(struct fcontext, ENTRY))
-
-static int regmap[] =
-{
- -1, /* g0 */
- X (g1),
- X (g2),
- X (g3),
- X (g4),
- -1, /* g5->g7 aren't saved by Lynx */
- -1,
- -1,
-
- X (o[0]),
- X (o[1]),
- X (o[2]),
- X (o[3]),
- X (o[4]),
- X (o[5]),
- X (o[6]), /* sp */
- X (o[7]), /* ra */
-
- -1, -1, -1, -1, -1, -1, -1, -1, /* l0 -> l7 */
-
- -1, -1, -1, -1, -1, -1, -1, -1, /* i0 -> i7 */
-
- FX (f.fregs[0]), /* f0 */
- FX (f.fregs[1]),
- FX (f.fregs[2]),
- FX (f.fregs[3]),
- FX (f.fregs[4]),
- FX (f.fregs[5]),
- FX (f.fregs[6]),
- FX (f.fregs[7]),
- FX (f.fregs[8]),
- FX (f.fregs[9]),
- FX (f.fregs[10]),
- FX (f.fregs[11]),
- FX (f.fregs[12]),
- FX (f.fregs[13]),
- FX (f.fregs[14]),
- FX (f.fregs[15]),
- FX (f.fregs[16]),
- FX (f.fregs[17]),
- FX (f.fregs[18]),
- FX (f.fregs[19]),
- FX (f.fregs[20]),
- FX (f.fregs[21]),
- FX (f.fregs[22]),
- FX (f.fregs[23]),
- FX (f.fregs[24]),
- FX (f.fregs[25]),
- FX (f.fregs[26]),
- FX (f.fregs[27]),
- FX (f.fregs[28]),
- FX (f.fregs[29]),
- FX (f.fregs[30]),
- FX (f.fregs[31]),
-
- X (y),
- X (psr),
- X (wim),
- X (tbr),
- X (pc),
- X (npc),
- FX (fsr), /* fpsr */
- -1, /* cpsr */
-};
-#endif /* SPARC */
-
-#ifdef rs6000
-
-static int regmap[] =
-{
- X (iregs[0]), /* r0 */
- X (iregs[1]),
- X (iregs[2]),
- X (iregs[3]),
- X (iregs[4]),
- X (iregs[5]),
- X (iregs[6]),
- X (iregs[7]),
- X (iregs[8]),
- X (iregs[9]),
- X (iregs[10]),
- X (iregs[11]),
- X (iregs[12]),
- X (iregs[13]),
- X (iregs[14]),
- X (iregs[15]),
- X (iregs[16]),
- X (iregs[17]),
- X (iregs[18]),
- X (iregs[19]),
- X (iregs[20]),
- X (iregs[21]),
- X (iregs[22]),
- X (iregs[23]),
- X (iregs[24]),
- X (iregs[25]),
- X (iregs[26]),
- X (iregs[27]),
- X (iregs[28]),
- X (iregs[29]),
- X (iregs[30]),
- X (iregs[31]),
-
- X (fregs[0]), /* f0 */
- X (fregs[1]),
- X (fregs[2]),
- X (fregs[3]),
- X (fregs[4]),
- X (fregs[5]),
- X (fregs[6]),
- X (fregs[7]),
- X (fregs[8]),
- X (fregs[9]),
- X (fregs[10]),
- X (fregs[11]),
- X (fregs[12]),
- X (fregs[13]),
- X (fregs[14]),
- X (fregs[15]),
- X (fregs[16]),
- X (fregs[17]),
- X (fregs[18]),
- X (fregs[19]),
- X (fregs[20]),
- X (fregs[21]),
- X (fregs[22]),
- X (fregs[23]),
- X (fregs[24]),
- X (fregs[25]),
- X (fregs[26]),
- X (fregs[27]),
- X (fregs[28]),
- X (fregs[29]),
- X (fregs[30]),
- X (fregs[31]),
-
- X (srr0), /* IAR (PC) */
- X (srr1), /* MSR (PS) */
- X (cr), /* CR */
- X (lr), /* LR */
- X (ctr), /* CTR */
- X (xer), /* XER */
- X (mq) /* MQ */
-};
-
-#endif /* rs6000 */
-
-#ifdef SPARC
-
-/* This routine handles some oddball cases for Sparc registers and LynxOS.
- In partucular, it causes refs to G0, g5->7, and all fp regs to return zero.
- It also handles knows where to find the I & L regs on the stack. */
-
-void
-fetch_inferior_registers (int regno)
-{
- int whatregs = 0;
-
-#define WHATREGS_FLOAT 1
-#define WHATREGS_GEN 2
-#define WHATREGS_STACK 4
-
- if (regno == -1)
- whatregs = WHATREGS_FLOAT | WHATREGS_GEN | WHATREGS_STACK;
- else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
- whatregs = WHATREGS_STACK;
- else if (regno >= FP0_REGNUM && regno < FP0_REGNUM + 32)
- whatregs = WHATREGS_FLOAT;
- else
- whatregs = WHATREGS_GEN;
-
- if (whatregs & WHATREGS_GEN)
- {
- struct econtext ec; /* general regs */
- char buf[MAX_REGISTER_RAW_SIZE];
- int retval;
- int i;
-
- errno = 0;
- retval = ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & ec, 0);
- if (errno)
- perror_with_name ("ptrace(PTRACE_GETREGS)");
-
- memset (buf, 0, REGISTER_RAW_SIZE (G0_REGNUM));
- supply_register (G0_REGNUM, buf);
- supply_register (TBR_REGNUM, (char *) &ec.tbr);
-
- memcpy (&registers[REGISTER_BYTE (G1_REGNUM)], &ec.g1,
- 4 * REGISTER_RAW_SIZE (G1_REGNUM));
- for (i = G1_REGNUM; i <= G1_REGNUM + 3; i++)
- register_valid[i] = 1;
-
- supply_register (PS_REGNUM, (char *) &ec.psr);
- supply_register (Y_REGNUM, (char *) &ec.y);
- supply_register (PC_REGNUM, (char *) &ec.pc);
- supply_register (NPC_REGNUM, (char *) &ec.npc);
- supply_register (WIM_REGNUM, (char *) &ec.wim);
-
- memcpy (&registers[REGISTER_BYTE (O0_REGNUM)], ec.o,
- 8 * REGISTER_RAW_SIZE (O0_REGNUM));
- for (i = O0_REGNUM; i <= O0_REGNUM + 7; i++)
- register_valid[i] = 1;
- }
-
- if (whatregs & WHATREGS_STACK)
- {
- CORE_ADDR sp;
- int i;
-
- sp = read_register (SP_REGNUM);
-
- target_read_memory (sp + FRAME_SAVED_I0,
- &registers[REGISTER_BYTE (I0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (I0_REGNUM));
- for (i = I0_REGNUM; i <= I7_REGNUM; i++)
- register_valid[i] = 1;
-
- target_read_memory (sp + FRAME_SAVED_L0,
- &registers[REGISTER_BYTE (L0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (L0_REGNUM));
- for (i = L0_REGNUM; i <= L0_REGNUM + 7; i++)
- register_valid[i] = 1;
- }
-
- if (whatregs & WHATREGS_FLOAT)
- {
- struct fcontext fc; /* fp regs */
- int retval;
- int i;
-
- errno = 0;
- retval = ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & fc, 0);
- if (errno)
- perror_with_name ("ptrace(PTRACE_GETFPREGS)");
-
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], fc.f.fregs,
- 32 * REGISTER_RAW_SIZE (FP0_REGNUM));
- for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
- register_valid[i] = 1;
-
- supply_register (FPS_REGNUM, (char *) &fc.fsr);
- }
-}
-
-/* This routine handles storing of the I & L regs for the Sparc. The trick
- here is that they actually live on the stack. The really tricky part is
- that when changing the stack pointer, the I & L regs must be written to
- where the new SP points, otherwise the regs will be incorrect when the
- process is started up again. We assume that the I & L regs are valid at
- this point. */
-
-void
-store_inferior_registers (int regno)
-{
- int whatregs = 0;
-
- if (regno == -1)
- whatregs = WHATREGS_FLOAT | WHATREGS_GEN | WHATREGS_STACK;
- else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
- whatregs = WHATREGS_STACK;
- else if (regno >= FP0_REGNUM && regno < FP0_REGNUM + 32)
- whatregs = WHATREGS_FLOAT;
- else if (regno == SP_REGNUM)
- whatregs = WHATREGS_STACK | WHATREGS_GEN;
- else
- whatregs = WHATREGS_GEN;
-
- if (whatregs & WHATREGS_GEN)
- {
- struct econtext ec; /* general regs */
- int retval;
-
- ec.tbr = read_register (TBR_REGNUM);
- memcpy (&ec.g1, &registers[REGISTER_BYTE (G1_REGNUM)],
- 4 * REGISTER_RAW_SIZE (G1_REGNUM));
-
- ec.psr = read_register (PS_REGNUM);
- ec.y = read_register (Y_REGNUM);
- ec.pc = read_register (PC_REGNUM);
- ec.npc = read_register (NPC_REGNUM);
- ec.wim = read_register (WIM_REGNUM);
-
- memcpy (ec.o, &registers[REGISTER_BYTE (O0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (O0_REGNUM));
-
- errno = 0;
- retval = ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & ec, 0);
- if (errno)
- perror_with_name ("ptrace(PTRACE_SETREGS)");
- }
-
- if (whatregs & WHATREGS_STACK)
- {
- int regoffset;
- CORE_ADDR sp;
-
- sp = read_register (SP_REGNUM);
-
- if (regno == -1 || regno == SP_REGNUM)
- {
- if (!register_valid[L0_REGNUM + 5])
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
- target_write_memory (sp + FRAME_SAVED_I0,
- &registers[REGISTER_BYTE (I0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (I0_REGNUM));
-
- target_write_memory (sp + FRAME_SAVED_L0,
- &registers[REGISTER_BYTE (L0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (L0_REGNUM));
- }
- else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
- {
- if (!register_valid[regno])
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
- if (regno >= L0_REGNUM && regno <= L0_REGNUM + 7)
- regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (L0_REGNUM)
- + FRAME_SAVED_L0;
- else
- regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (I0_REGNUM)
- + FRAME_SAVED_I0;
- target_write_memory (sp + regoffset,
- &registers[REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno));
- }
- }
-
- if (whatregs & WHATREGS_FLOAT)
- {
- struct fcontext fc; /* fp regs */
- int retval;
-
-/* We read fcontext first so that we can get good values for fq_t... */
- errno = 0;
- retval = ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & fc, 0);
- if (errno)
- perror_with_name ("ptrace(PTRACE_GETFPREGS)");
-
- memcpy (fc.f.fregs, &registers[REGISTER_BYTE (FP0_REGNUM)],
- 32 * REGISTER_RAW_SIZE (FP0_REGNUM));
-
- fc.fsr = read_register (FPS_REGNUM);
-
- errno = 0;
- retval = ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & fc, 0);
- if (errno)
- perror_with_name ("ptrace(PTRACE_SETFPREGS)");
- }
-}
-#endif /* SPARC */
-
-#if defined (I386) || defined (M68K) || defined (rs6000)
-
-/* Return the offset relative to the start of the per-thread data to the
- saved context block. */
-
-static unsigned long
-registers_addr (int pid)
-{
- CORE_ADDR stblock;
- int ecpoff = offsetof (st_t, ecp);
- CORE_ADDR ecp;
-
- errno = 0;
- stblock = (CORE_ADDR) ptrace (PTRACE_THREADUSER, pid, (PTRACE_ARG3_TYPE) 0,
- 0);
- if (errno)
- perror_with_name ("ptrace(PTRACE_THREADUSER)");
-
- ecp = (CORE_ADDR) ptrace (PTRACE_PEEKTHREAD, pid, (PTRACE_ARG3_TYPE) ecpoff,
- 0);
- if (errno)
- perror_with_name ("ptrace(PTRACE_PEEKTHREAD)");
-
- return ecp - stblock;
-}
-
-/* Fetch one or more registers from the inferior. REGNO == -1 to get
- them all. We actually fetch more than requested, when convenient,
- marking them as valid so we won't fetch them again. */
-
-void
-fetch_inferior_registers (int regno)
-{
- int reglo, reghi;
- int i;
- unsigned long ecp;
-
- if (regno == -1)
- {
- reglo = 0;
- reghi = NUM_REGS - 1;
- }
- else
- reglo = reghi = regno;
-
- ecp = registers_addr (PIDGET (inferior_ptid));
-
- for (regno = reglo; regno <= reghi; regno++)
- {
- char buf[MAX_REGISTER_RAW_SIZE];
- int ptrace_fun = PTRACE_PEEKTHREAD;
-
-#ifdef M68K
- 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);
- }
-}
-
-/* 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)
-{
- int reglo, reghi;
- int i;
- unsigned long ecp;
-
- if (regno == -1)
- {
- reglo = 0;
- reghi = NUM_REGS - 1;
- }
- else
- reglo = reghi = regno;
-
- ecp = registers_addr (PIDGET (inferior_ptid));
-
- for (regno = reglo; regno <= reghi; regno++)
- {
- int ptrace_fun = PTRACE_POKEUSER;
-
- if (CANNOT_STORE_REGISTER (regno))
- continue;
-
-#ifdef M68K
- ptrace_fun = regno == SP_REGNUM ? PTRACE_POKEUSP : PTRACE_POKEUSER;
-#endif
-
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- unsigned int reg;
-
- reg = *(unsigned int *) &registers[REGISTER_BYTE (regno) + i];
-
- errno = 0;
- ptrace (ptrace_fun, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) (ecp + regmap[regno] + i), reg);
- if (errno)
- perror_with_name ("ptrace(PTRACE_POKEUSP)");
- }
- }
-}
-#endif /* defined (I386) || defined (M68K) || defined (rs6000) */
-
-/* Wait for child to do something. Return pid of child, or -1 in case
- of error; store status through argument pointer OURSTATUS. */
-
-ptid_t
-child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
-{
- int save_errno;
- int thread;
- union wait status;
- int pid;
-
- while (1)
- {
- int sig;
-
- set_sigint_trap (); /* Causes SIGINT to be passed on to the
- attached process. */
- pid = wait (&status);
-
- save_errno = errno;
-
- clear_sigint_trap ();
-
- if (pid == -1)
- {
- if (save_errno == EINTR)
- continue;
- fprintf_unfiltered (gdb_stderr, "Child process unexpectedly missing: %s.\n",
- safe_strerror (save_errno));
- /* Claim it exited with unknown signal. */
- ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
- ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
- return -1;
- }
-
- if (pid != PIDGET (inferior_ptid)) /* Some other process?!? */
- continue;
-
- thread = status.w_tid; /* Get thread id from status */
-
- /* Initial thread value can only be acquired via wait, so we have to
- resort to this hack. */
-
- if (TIDGET (inferior_ptid) == 0 && thread != 0)
- {
- inferior_ptid = MERGEPID (PIDGET (inferior_ptid), thread);
- add_thread (inferior_ptid);
- }
-
- ptid = BUILDPID (pid, thread);
-
- /* We've become a single threaded process again. */
- if (thread == 0)
- inferior_ptid = ptid;
-
- /* Check for thread creation. */
- if (WIFSTOPPED (status)
- && WSTOPSIG (status) == SIGTRAP
- && !in_thread_list (ptid))
- {
- int realsig;
-
- realsig = ptrace (PTRACE_GETTRACESIG, PIDGET (ptid),
- (PTRACE_ARG3_TYPE) 0, 0);
-
- if (realsig == SIGNEWTHREAD)
- {
- /* It's a new thread notification. We don't want to much with
- realsig -- the code in wait_for_inferior expects SIGTRAP. */
- ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
- ourstatus->value.sig = TARGET_SIGNAL_0;
- return ptid;
- }
- else
- error ("Signal for unknown thread was not SIGNEWTHREAD");
- }
-
- /* Check for thread termination. */
- else if (WIFSTOPPED (status)
- && WSTOPSIG (status) == SIGTRAP
- && in_thread_list (ptid))
- {
- int realsig;
-
- realsig = ptrace (PTRACE_GETTRACESIG, PIDGET (ptid),
- (PTRACE_ARG3_TYPE) 0, 0);
-
- if (realsig == SIGTHREADEXIT)
- {
- ptrace (PTRACE_CONT, PIDGET (ptid), (PTRACE_ARG3_TYPE) 0, 0);
- continue;
- }
- }
-
-#ifdef SPARC
- /* SPARC Lynx uses an byte reversed wait status; we must use the
- host macros to access it. These lines just a copy of
- store_waitstatus. We can't use CHILD_SPECIAL_WAITSTATUS
- because target.c can't include the Lynx <sys/wait.h>. */
- if (WIFEXITED (status))
- {
- ourstatus->kind = TARGET_WAITKIND_EXITED;
- ourstatus->value.integer = WEXITSTATUS (status);
- }
- else if (!WIFSTOPPED (status))
- {
- ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
- ourstatus->value.sig =
- target_signal_from_host (WTERMSIG (status));
- }
- else
- {
- ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig =
- target_signal_from_host (WSTOPSIG (status));
- }
-#else
- store_waitstatus (ourstatus, status.w_status);
-#endif
-
- return ptid;
- }
-}
-
-/* Return nonzero if the given thread is still alive. */
-int
-child_thread_alive (ptid_t ptid)
-{
- int pid = PIDGET (ptid);
-
- /* Arggh. Apparently pthread_kill only works for threads within
- the process that calls pthread_kill.
-
- We want to avoid the lynx signal extensions as they simply don't
- map well to the generic gdb interface we want to keep.
-
- All we want to do is determine if a particular thread is alive;
- it appears as if we can just make a harmless thread specific
- ptrace call to do that. */
- return (ptrace (PTRACE_THREADUSER, pid, 0, 0) != -1);
-}
-
-/* Resume execution of the inferior process.
- If STEP is nonzero, single-step it.
- If SIGNAL is nonzero, give it that signal. */
-
-void
-child_resume (ptid_t ptid, int step, enum target_signal signal)
-{
- int func;
- int pid = PIDGET (ptid);
-
- errno = 0;
-
- /* If pid == -1, then we want to step/continue all threads, else
- we only want to step/continue a single thread. */
- if (pid == -1)
- {
- pid = PIDGET (inferior_ptid);
- func = step ? PTRACE_SINGLESTEP : PTRACE_CONT;
- }
- else
- func = step ? PTRACE_SINGLESTEP_ONE : PTRACE_CONT_ONE;
-
-
- /* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where
- it was. (If GDB wanted it to start some other way, we have already
- written a new PC value to the child.)
-
- If this system does not support PT_STEP, a higher level function will
- have called single_step() to transmute the step request into a
- continue request (by setting breakpoints on all possible successor
- instructions), so we don't have to worry about that here. */
-
- ptrace (func, pid, (PTRACE_ARG3_TYPE) 1, target_signal_to_host (signal));
-
- if (errno)
- perror_with_name ("ptrace");
-}
-
-/* Convert a Lynx process ID to a string. Returns the string in a static
- buffer. */
-
-char *
-child_pid_to_str (ptid_t ptid)
-{
- static char buf[40];
-
- sprintf (buf, "process %d thread %d", PIDGET (ptid), TIDGET (ptid));
-
- return buf;
-}
-
-/* Extract the register values out of the core file and store
- them where `read_register' will find them.
-
- CORE_REG_SECT points to the register values themselves, read into memory.
- CORE_REG_SIZE is the size of that area.
- WHICH says which set of registers we are handling (0 = int, 2 = float
- on machines where they are discontiguous).
- REG_ADDR is the offset from u.u_ar0 to the register values relative to
- core_reg_sect. This is used with old-fashioned core files to
- locate the registers in a large upage-plus-stack ".reg" section.
- Original upage address X is at location core_reg_sect+x+reg_addr.
- */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
- CORE_ADDR reg_addr)
-{
- struct st_entry s;
- unsigned int regno;
-
- for (regno = 0; regno < NUM_REGS; regno++)
- if (regmap[regno] != -1)
- supply_register (regno, core_reg_sect + offsetof (st_t, ec)
- + regmap[regno]);
-
-#ifdef SPARC
-/* Fetching this register causes all of the I & L regs to be read from the
- stack and validated. */
-
- fetch_inferior_registers (I0_REGNUM);
-#endif
-}
-
-
-/* Register that we are able to handle lynx core file formats.
- FIXME: is this really bfd_target_unknown_flavour? */
-
-static struct core_fns lynx_core_fns =
-{
- bfd_target_unknown_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
-void
-_initialize_core_lynx (void)
-{
- add_core_fns (&lynx_core_fns);
-}
diff --git a/contrib/gdb/gdb/m2-exp.tab.c b/contrib/gdb/gdb/m2-exp.tab.c
deleted file mode 100644
index eefdf807ef7c..000000000000
--- a/contrib/gdb/gdb/m2-exp.tab.c
+++ /dev/null
@@ -1,2162 +0,0 @@
-
-/* A Bison parser, made from m2-exp.y
- by GNU Bison version 1.27
- */
-
-#define YYBISON 1 /* Identify Bison output. */
-
-#define INT 257
-#define HEX 258
-#define ERROR 259
-#define UINT 260
-#define M2_TRUE 261
-#define M2_FALSE 262
-#define CHAR 263
-#define FLOAT 264
-#define STRING 265
-#define NAME 266
-#define BLOCKNAME 267
-#define IDENT 268
-#define VARNAME 269
-#define TYPENAME 270
-#define SIZE 271
-#define CAP 272
-#define ORD 273
-#define HIGH 274
-#define ABS 275
-#define MIN_FUNC 276
-#define MAX_FUNC 277
-#define FLOAT_FUNC 278
-#define VAL 279
-#define CHR 280
-#define ODD 281
-#define TRUNC 282
-#define INC 283
-#define DEC 284
-#define INCL 285
-#define EXCL 286
-#define COLONCOLON 287
-#define INTERNAL_VAR 288
-#define ABOVE_COMMA 289
-#define ASSIGN 290
-#define LEQ 291
-#define GEQ 292
-#define NOTEQUAL 293
-#define IN 294
-#define OROR 295
-#define LOGICAL_AND 296
-#define DIV 297
-#define MOD 298
-#define UNARY 299
-#define DOT 300
-#define NOT 301
-#define QID 302
-
-#line 40 "m2-exp.y"
-
-
-#include "defs.h"
-#include "gdb_string.h"
-#include "expression.h"
-#include "language.h"
-#include "value.h"
-#include "parser-defs.h"
-#include "m2-lang.h"
-#include "bfd.h" /* Required by objfiles.h. */
-#include "symfile.h" /* Required by objfiles.h. */
-#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
-
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
- as well as gratuitiously global symbol names, so we can have multiple
- yacc generated parsers in gdb. Note that these are only the variables
- produced by yacc. If other parser generators (bison, byacc, etc) produce
- additional global names that conflict at link time, then those parser
- generators need to be fixed instead of adding those names to this list. */
-
-#define yymaxdepth m2_maxdepth
-#define yyparse m2_parse
-#define yylex m2_lex
-#define yyerror m2_error
-#define yylval m2_lval
-#define yychar m2_char
-#define yydebug m2_debug
-#define yypact m2_pact
-#define yyr1 m2_r1
-#define yyr2 m2_r2
-#define yydef m2_def
-#define yychk m2_chk
-#define yypgo m2_pgo
-#define yyact m2_act
-#define yyexca m2_exca
-#define yyerrflag m2_errflag
-#define yynerrs m2_nerrs
-#define yyps m2_ps
-#define yypv m2_pv
-#define yys m2_s
-#define yy_yys m2_yys
-#define yystate m2_state
-#define yytmp m2_tmp
-#define yyv m2_v
-#define yy_yyv m2_yyv
-#define yyval m2_val
-#define yylloc m2_lloc
-#define yyreds m2_reds /* With YYDEBUG defined */
-#define yytoks m2_toks /* With YYDEBUG defined */
-#define yylhs m2_yylhs
-#define yylen m2_yylen
-#define yydefred m2_yydefred
-#define yydgoto m2_yydgoto
-#define yysindex m2_yysindex
-#define yyrindex m2_yyrindex
-#define yygindex m2_yygindex
-#define yytable m2_yytable
-#define yycheck m2_yycheck
-
-#ifndef YYDEBUG
-#define YYDEBUG 0 /* Default to no yydebug support */
-#endif
-
-int
-yyparse PARAMS ((void));
-
-static int
-yylex PARAMS ((void));
-
-void
-yyerror PARAMS ((char *));
-
-#if 0
-static char *
-make_qualname PARAMS ((char *, char *));
-#endif
-
-static int
-parse_number PARAMS ((int));
-
-/* The sign of the number being parsed. */
-static int number_sign = 1;
-
-/* The block that the module specified by the qualifer on an identifer is
- contained in, */
-#if 0
-static struct block *modblock=0;
-#endif
-
-
-#line 135 "m2-exp.y"
-typedef union
- {
- LONGEST lval;
- ULONGEST ulval;
- DOUBLEST dval;
- struct symbol *sym;
- struct type *tval;
- struct stoken sval;
- int voidval;
- struct block *bval;
- enum exp_opcode opcode;
- struct internalvar *ivar;
-
- struct type **tvec;
- int *ivec;
- } YYSTYPE;
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
-#endif
-
-
-
-#define YYFINAL 181
-#define YYFLAG -32768
-#define YYNTBASE 68
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 302 ? yytranslate[x] : 82)
-
-static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 44, 2, 2, 48, 2, 60,
- 64, 52, 50, 35, 51, 2, 53, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 38,
- 42, 39, 2, 49, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 59, 2, 67, 57, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 65, 2, 66, 62, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 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, 32, 33, 34, 36, 37,
- 40, 41, 43, 45, 46, 47, 54, 55, 56, 58,
- 61, 63
-};
-
-#if YYDEBUG != 0
-static const short yyprhs[] = { 0,
- 0, 2, 4, 6, 9, 10, 14, 17, 20, 22,
- 24, 29, 34, 39, 44, 49, 54, 59, 66, 71,
- 76, 81, 84, 89, 96, 101, 108, 112, 114, 118,
- 125, 132, 136, 141, 142, 148, 149, 155, 156, 158,
- 162, 164, 168, 173, 178, 182, 186, 190, 194, 198,
- 202, 206, 210, 214, 218, 222, 226, 230, 234, 238,
- 242, 246, 250, 252, 254, 256, 258, 260, 262, 264,
- 269, 271, 273, 275, 279, 281, 283, 287, 289
-};
-
-static const short yyrhs[] = { 70,
- 0, 69, 0, 81, 0, 70, 57, 0, 0, 51,
- 71, 70, 0, 50, 70, 0, 72, 70, 0, 61,
- 0, 62, 0, 18, 60, 70, 64, 0, 19, 60,
- 70, 64, 0, 21, 60, 70, 64, 0, 20, 60,
- 70, 64, 0, 22, 60, 81, 64, 0, 23, 60,
- 81, 64, 0, 24, 60, 70, 64, 0, 25, 60,
- 81, 35, 70, 64, 0, 26, 60, 70, 64, 0,
- 27, 60, 70, 64, 0, 28, 60, 70, 64, 0,
- 17, 70, 0, 29, 60, 70, 64, 0, 29, 60,
- 70, 35, 70, 64, 0, 30, 60, 70, 64, 0,
- 30, 60, 70, 35, 70, 64, 0, 70, 58, 12,
- 0, 73, 0, 70, 45, 73, 0, 31, 60, 70,
- 35, 70, 64, 0, 32, 60, 70, 35, 70, 64,
- 0, 65, 76, 66, 0, 81, 65, 76, 66, 0,
- 0, 70, 59, 74, 77, 67, 0, 0, 70, 60,
- 75, 76, 64, 0, 0, 70, 0, 76, 35, 70,
- 0, 70, 0, 77, 35, 70, 0, 65, 81, 66,
- 70, 0, 81, 60, 70, 64, 0, 60, 70, 64,
- 0, 70, 49, 70, 0, 70, 52, 70, 0, 70,
- 53, 70, 0, 70, 54, 70, 0, 70, 55, 70,
- 0, 70, 50, 70, 0, 70, 51, 70, 0, 70,
- 42, 70, 0, 70, 43, 70, 0, 70, 44, 70,
- 0, 70, 40, 70, 0, 70, 41, 70, 0, 70,
- 38, 70, 0, 70, 39, 70, 0, 70, 47, 70,
- 0, 70, 46, 70, 0, 70, 37, 70, 0, 7,
- 0, 8, 0, 3, 0, 6, 0, 9, 0, 10,
- 0, 80, 0, 17, 60, 81, 64, 0, 11, 0,
- 79, 0, 13, 0, 78, 33, 13, 0, 79, 0,
- 34, 0, 78, 33, 12, 0, 12, 0, 16, 0
-};
-
-#endif
-
-#if YYDEBUG != 0
-static const short yyrline[] = { 0,
- 204, 205, 208, 217, 220, 222, 227, 231, 235, 236,
- 239, 243, 247, 251, 255, 261, 267, 271, 277, 281,
- 285, 289, 294, 298, 304, 308, 314, 320, 323, 327,
- 331, 334, 336, 342, 347, 353, 357, 363, 366, 370,
- 375, 380, 385, 391, 397, 405, 409, 413, 417, 421,
- 425, 429, 433, 437, 439, 443, 447, 451, 455, 459,
- 463, 467, 474, 480, 486, 493, 502, 510, 517, 520,
- 527, 534, 538, 547, 559, 567, 571, 587, 638
-};
-#endif
-
-
-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-
-static const char * const yytname[] = { "$","error","$undefined.","INT","HEX",
-"ERROR","UINT","M2_TRUE","M2_FALSE","CHAR","FLOAT","STRING","NAME","BLOCKNAME",
-"IDENT","VARNAME","TYPENAME","SIZE","CAP","ORD","HIGH","ABS","MIN_FUNC","MAX_FUNC",
-"FLOAT_FUNC","VAL","CHR","ODD","TRUNC","INC","DEC","INCL","EXCL","COLONCOLON",
-"INTERNAL_VAR","','","ABOVE_COMMA","ASSIGN","'<'","'>'","LEQ","GEQ","'='","NOTEQUAL",
-"'#'","IN","OROR","LOGICAL_AND","'&'","'@'","'+'","'-'","'*'","'/'","DIV","MOD",
-"UNARY","'^'","DOT","'['","'('","NOT","'~'","QID","')'","'{'","'}'","']'","start",
-"type_exp","exp","@1","not_exp","set","@2","@3","arglist","non_empty_arglist",
-"block","fblock","variable","type", NULL
-};
-#endif
-
-static const short yyr1[] = { 0,
- 68, 68, 69, 70, 71, 70, 70, 70, 72, 72,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
- 70, 73, 73, 74, 70, 75, 70, 76, 76, 76,
- 77, 77, 70, 70, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
- 70, 78, 79, 79, 80, 80, 80, 80, 81
-};
-
-static const short yyr2[] = { 0,
- 1, 1, 1, 2, 0, 3, 2, 2, 1, 1,
- 4, 4, 4, 4, 4, 4, 4, 6, 4, 4,
- 4, 2, 4, 6, 4, 6, 3, 1, 3, 6,
- 6, 3, 4, 0, 5, 0, 5, 0, 1, 3,
- 1, 3, 4, 4, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 1, 1, 1, 1, 1, 1, 1, 4,
- 1, 1, 1, 3, 1, 1, 3, 1, 1
-};
-
-static const short yydefact[] = { 0,
- 65, 66, 63, 64, 67, 68, 71, 78, 73, 79,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 76, 0, 5, 0,
- 9, 10, 38, 2, 1, 0, 28, 0, 75, 69,
- 3, 0, 22, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,
- 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 4, 0, 34, 36, 8, 0, 0,
- 38, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 6, 45, 0,
- 32, 0, 62, 58, 59, 56, 57, 53, 54, 55,
- 38, 29, 0, 61, 60, 46, 51, 52, 47, 48,
- 49, 50, 27, 0, 38, 77, 74, 0, 0, 70,
- 11, 12, 14, 13, 15, 16, 17, 0, 19, 20,
- 21, 0, 23, 0, 25, 0, 0, 40, 43, 41,
- 0, 0, 44, 33, 0, 0, 0, 0, 0, 0,
- 35, 37, 18, 24, 26, 30, 31, 42, 0, 0,
- 0
-};
-
-static const short yydefgoto[] = { 179,
- 34, 63, 61, 36, 37, 134, 135, 64, 161, 38,
- 39, 40, 44
-};
-
-static const short yypact[] = { 155,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
- 215, -27, -22, -20, -19, 14, 24, 26, 27, 28,
- 29, 31, 32, 33, 35, 36,-32768, 155,-32768, 155,
--32768,-32768, 155,-32768, 742, 155,-32768, -6, -4,-32768,
- -34, 155, 5, -34, 155, 155, 155, 155, 44, 44,
- 155, 44, 155, 155, 155, 155, 155, 155, 155, 5,
- 155, 272, 742, -31, -41, 155, 155, 155, 155, 155,
- 155, 155, 155, -15, 155, 155, 155, 155, 155, 155,
- 155, 155, 155,-32768, 85,-32768,-32768, 5, -5, 155,
- 155, -21, 300, 328, 356, 384, 34, 39, 412, 64,
- 440, 468, 496, 78, 244, 692, 718, 5,-32768, 155,
--32768, 155, 766, -37, -37, -37, -37, -37, -37, -37,
- 155,-32768, 40, 141, 201, 777, 786, 786, 5, 5,
- 5, 5,-32768, 155, 155,-32768,-32768, 524, -29,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768, 155,-32768,-32768,
--32768, 155,-32768, 155,-32768, 155, 155, 742, 5, 742,
- -33, -32,-32768,-32768, 552, 580, 608, 636, 664, 155,
--32768,-32768,-32768,-32768,-32768,-32768,-32768, 742, 100, 106,
--32768
-};
-
-static const short yypgoto[] = {-32768,
--32768, 0,-32768,-32768, 37,-32768,-32768, -86,-32768,-32768,
--32768,-32768, 52
-};
-
-
-#define YYLAST 846
-
-
-static const short yytable[] = { 35,
- 10, 170, 110, 110, 139, 110, 136, 137, 75, 76,
- 43, 77, 78, 79, 80, 81, 82, 83, 90, 84,
- 85, 86, 87, 91, 112, 90, 89, 60, -72, 62,
- 91, 172, 45, 171, 111, 88, 164, 46, 90, 47,
- 48, 62, 140, 91, 93, 94, 95, 96, 162, 121,
- 99, 41, 101, 102, 103, 104, 105, 106, 107, 10,
- 108, 84, 85, 86, 87, 113, 114, 115, 116, 117,
- 118, 119, 120, 49, 124, 125, 126, 127, 128, 129,
- 130, 131, 132, 50, 65, 51, 52, 53, 54, 138,
- 55, 56, 57, 92, 58, 59, 133, 145, 148, 180,
- 97, 98, 146, 100, 91, 181, 0, 0, 0, 158,
- 122, 159, 152, 0, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 123, 77, 78, 79, 80,
- 81, 82, 83, 160, 84, 85, 86, 87, 0, 0,
- 0, 153, 0, 0, 0, 0, 0, 165, 0, 0,
- 0, 166, 0, 167, 0, 168, 169, 1, 0, 0,
- 2, 3, 4, 5, 6, 7, 8, 9, 0, 178,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 76, 27, 77,
- 78, 79, 80, 81, 82, 83, 0, 84, 85, 86,
- 87, 0, 0, 0, 28, 29, 0, 0, 0, 0,
- 0, 0, 0, 0, 30, 31, 32, 1, 0, 33,
- 2, 3, 4, 5, 6, 7, 8, 9, 0, 0,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 0, 27, 77,
- 78, 79, 80, 81, 82, 83, 0, 84, 85, 86,
- 87, 0, 0, 0, 28, 29, 0, 0, 0, 0,
- 0, 0, 0, 0, 42, 31, 32, 0, 154, 33,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
- 76, 0, 77, 78, 79, 80, 81, 82, 83, 0,
- 84, 85, 86, 87, 0, 0, 0, 155, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
- 77, 78, 79, 80, 81, 82, 83, 0, 84, 85,
- 86, 87, 0, 0, 0, 109, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 76, 0, 77, 78,
- 79, 80, 81, 82, 83, 0, 84, 85, 86, 87,
- 0, 0, 0, 141, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 0, 77, 78, 79, 80,
- 81, 82, 83, 0, 84, 85, 86, 87, 0, 0,
- 0, 142, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 0, 77, 78, 79, 80, 81, 82,
- 83, 0, 84, 85, 86, 87, 0, 0, 0, 143,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
- 76, 0, 77, 78, 79, 80, 81, 82, 83, 0,
- 84, 85, 86, 87, 0, 0, 0, 144, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
- 77, 78, 79, 80, 81, 82, 83, 0, 84, 85,
- 86, 87, 0, 0, 0, 147, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 76, 0, 77, 78,
- 79, 80, 81, 82, 83, 0, 84, 85, 86, 87,
- 0, 0, 0, 149, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 0, 77, 78, 79, 80,
- 81, 82, 83, 0, 84, 85, 86, 87, 0, 0,
- 0, 150, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 0, 77, 78, 79, 80, 81, 82,
- 83, 0, 84, 85, 86, 87, 0, 0, 0, 151,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
- 76, 0, 77, 78, 79, 80, 81, 82, 83, 0,
- 84, 85, 86, 87, 0, 0, 0, 163, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
- 77, 78, 79, 80, 81, 82, 83, 0, 84, 85,
- 86, 87, 0, 0, 0, 173, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 76, 0, 77, 78,
- 79, 80, 81, 82, 83, 0, 84, 85, 86, 87,
- 0, 0, 0, 174, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 0, 77, 78, 79, 80,
- 81, 82, 83, 0, 84, 85, 86, 87, 0, 0,
- 0, 175, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 0, 77, 78, 79, 80, 81, 82,
- 83, 0, 84, 85, 86, 87, 0, 0, 0, 176,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
- 76, 0, 77, 78, 79, 80, 81, 82, 83, 0,
- 84, 85, 86, 87, 0, 0, 156, 177, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
- 77, 78, 79, 80, 81, 82, 83, 0, 84, 85,
- 86, 87, 157, 0, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 0, 77, 78, 79, 80,
- 81, 82, 83, 0, 84, 85, 86, 87, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
- 77, 78, 79, 80, 81, 82, 83, 0, 84, 85,
- 86, 87,-32768, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 0, 77, 78, 79, 80, 81, 82,
- 83, 0, 84, 85, 86, 87, 78, 79, 80, 81,
- 82, 83, 0, 84, 85, 86, 87, 80, 81, 82,
- 83, 0, 84, 85, 86, 87
-};
-
-static const short yycheck[] = { 0,
- 16, 35, 35, 35, 91, 35, 12, 13, 46, 47,
- 11, 49, 50, 51, 52, 53, 54, 55, 60, 57,
- 58, 59, 60, 65, 66, 60, 33, 28, 33, 30,
- 65, 64, 60, 67, 66, 36, 66, 60, 60, 60,
- 60, 42, 64, 65, 45, 46, 47, 48, 135, 65,
- 51, 0, 53, 54, 55, 56, 57, 58, 59, 16,
- 61, 57, 58, 59, 60, 66, 67, 68, 69, 70,
- 71, 72, 73, 60, 75, 76, 77, 78, 79, 80,
- 81, 82, 83, 60, 33, 60, 60, 60, 60, 90,
- 60, 60, 60, 42, 60, 60, 12, 64, 35, 0,
- 49, 50, 64, 52, 65, 0, -1, -1, -1, 110,
- 74, 112, 35, -1, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 74, 49, 50, 51, 52,
- 53, 54, 55, 134, 57, 58, 59, 60, -1, -1,
- -1, 64, -1, -1, -1, -1, -1, 148, -1, -1,
- -1, 152, -1, 154, -1, 156, 157, 3, -1, -1,
- 6, 7, 8, 9, 10, 11, 12, 13, -1, 170,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 47, 34, 49,
- 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
- 60, -1, -1, -1, 50, 51, -1, -1, -1, -1,
- -1, -1, -1, -1, 60, 61, 62, 3, -1, 65,
- 6, 7, 8, 9, 10, 11, 12, 13, -1, -1,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, -1, 34, 49,
- 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
- 60, -1, -1, -1, 50, 51, -1, -1, -1, -1,
- -1, -1, -1, -1, 60, 61, 62, -1, 35, 65,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, 50, 51, 52, 53, 54, 55, -1,
- 57, 58, 59, 60, -1, -1, -1, 64, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
- 49, 50, 51, 52, 53, 54, 55, -1, 57, 58,
- 59, 60, -1, -1, -1, 64, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, -1, 49, 50,
- 51, 52, 53, 54, 55, -1, 57, 58, 59, 60,
- -1, -1, -1, 64, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, -1, 49, 50, 51, 52,
- 53, 54, 55, -1, 57, 58, 59, 60, -1, -1,
- -1, 64, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, 50, 51, 52, 53, 54,
- 55, -1, 57, 58, 59, 60, -1, -1, -1, 64,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, 50, 51, 52, 53, 54, 55, -1,
- 57, 58, 59, 60, -1, -1, -1, 64, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
- 49, 50, 51, 52, 53, 54, 55, -1, 57, 58,
- 59, 60, -1, -1, -1, 64, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, -1, 49, 50,
- 51, 52, 53, 54, 55, -1, 57, 58, 59, 60,
- -1, -1, -1, 64, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, -1, 49, 50, 51, 52,
- 53, 54, 55, -1, 57, 58, 59, 60, -1, -1,
- -1, 64, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, 50, 51, 52, 53, 54,
- 55, -1, 57, 58, 59, 60, -1, -1, -1, 64,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, 50, 51, 52, 53, 54, 55, -1,
- 57, 58, 59, 60, -1, -1, -1, 64, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
- 49, 50, 51, 52, 53, 54, 55, -1, 57, 58,
- 59, 60, -1, -1, -1, 64, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, -1, 49, 50,
- 51, 52, 53, 54, 55, -1, 57, 58, 59, 60,
- -1, -1, -1, 64, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, -1, 49, 50, 51, 52,
- 53, 54, 55, -1, 57, 58, 59, 60, -1, -1,
- -1, 64, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, 50, 51, 52, 53, 54,
- 55, -1, 57, 58, 59, 60, -1, -1, -1, 64,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, 50, 51, 52, 53, 54, 55, -1,
- 57, 58, 59, 60, -1, -1, 35, 64, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
- 49, 50, 51, 52, 53, 54, 55, -1, 57, 58,
- 59, 60, 35, -1, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, -1, 49, 50, 51, 52,
- 53, 54, 55, -1, 57, 58, 59, 60, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
- 49, 50, 51, 52, 53, 54, 55, -1, 57, 58,
- 59, 60, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, 50, 51, 52, 53, 54,
- 55, -1, 57, 58, 59, 60, 50, 51, 52, 53,
- 54, 55, -1, 57, 58, 59, 60, 52, 53, 54,
- 55, -1, 57, 58, 59, 60
-};
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/lib/bison.simple"
-/* This file comes from bison-1.27. */
-
-/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
-#ifndef YYSTACK_USE_ALLOCA
-#ifdef alloca
-#define YYSTACK_USE_ALLOCA
-#else /* alloca not defined */
-#ifdef __GNUC__
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
-#define YYSTACK_USE_ALLOCA
-#include <alloca.h>
-#else /* not sparc */
-/* We think this test detects Watcom and Microsoft C. */
-/* This used to test MSDOS, but that is a bad idea
- since that symbol is in the user namespace. */
-#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
-#if 0 /* No need for xmalloc.h, which pollutes the namespace;
- instead, just don't use alloca. */
-#endif
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
-/* I don't know what this was needed for, but it pollutes the namespace.
- So I turned it off. rms, 2 May 1997. */
- #pragma alloca
-#define YYSTACK_USE_ALLOCA
-#else /* not MSDOS, or __TURBOC__, or _AIX */
-#if 0
-#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
- and on HPUX 10. Eventually we can turn this on. */
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#endif /* __hpux */
-#endif
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc */
-#endif /* not GNU C */
-#endif /* alloca not defined */
-#endif /* YYSTACK_USE_ALLOCA not defined */
-
-#ifdef YYSTACK_USE_ALLOCA
-#define YYSTACK_ALLOC alloca
-#else
-#define YYSTACK_ALLOC xmalloc
-#endif
-
-/* Note: there must be only one dollar sign in this file.
- It is replaced by the list of actions, each action
- as one case of the switch. */
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY -2
-#define YYEOF 0
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
-/* Like YYERROR except do call yyerror.
- This remains here temporarily to ease the
- transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
-#define YYFAIL goto yyerrlab
-#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(token, value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { yychar = (token), yylval = (value); \
- yychar1 = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
- goto yybackup; \
- } \
- else \
- { yyerror ("syntax error: cannot back up"); YYERROR; } \
-while (0)
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-#ifndef YYPURE
-#define YYLEX yylex()
-#endif
-
-#ifdef YYPURE
-#ifdef YYLSP_NEEDED
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval, &yylloc)
-#endif
-#else /* not YYLSP_NEEDED */
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval)
-#endif
-#endif /* not YYLSP_NEEDED */
-#endif
-
-/* If nonreentrant, generate the variables here */
-
-#ifndef YYPURE
-
-int yychar; /* the lookahead symbol */
-YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
-
-#ifdef YYLSP_NEEDED
-YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
-#endif
-
-int yynerrs; /* number of parse errors so far */
-#endif /* not YYPURE */
-
-#if YYDEBUG != 0
-int yydebug; /* nonzero means print parse trace */
-/* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
-#endif
-
-/* YYINITDEPTH indicates the initial size of the parser's stacks */
-
-#ifndef YYINITDEPTH
-#define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
-
-#if YYMAXDEPTH == 0
-#undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 10000
-#endif
-
-/* Define __yy_memcpy. Note that the size argument
- should be passed with type unsigned int, because that is what the non-GCC
- definitions require. With GCC, __builtin_memcpy takes an arg
- of type size_t, but it can handle unsigned int. */
-
-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
-#else /* not GNU C or C++ */
-#ifndef __cplusplus
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (to, from, count)
- char *to;
- char *from;
- unsigned int count;
-{
- register char *f = from;
- register char *t = to;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#else /* __cplusplus */
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (char *to, char *from, unsigned int count)
-{
- register char *t = to;
- register char *f = from;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#endif
-#endif
-
-#line 216 "/usr/lib/bison.simple"
-
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
- into yyparse. The argument should have type void *.
- It should actually point to an object.
- Grammar actions can access the variable by casting it
- to the proper pointer type. */
-
-#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
-#define YYPARSE_PARAM_ARG
-#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-#ifdef YYPARSE_PARAM
-int yyparse (void *);
-#else
-int yyparse (void);
-#endif
-#endif
-
-int
-yyparse(YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
-{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */
-
- short yyssa[YYINITDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
-
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to xreallocate them elsewhere */
-
-#ifdef YYLSP_NEEDED
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
-#else
-#define YYPOPSTACK (yyvsp--, yyssp--)
-#endif
-
- int yystacksize = YYINITDEPTH;
- int yyfree_stacks = 0;
-
-#ifdef YYPURE
- int yychar;
- YYSTYPE yylval;
- int yynerrs;
-#ifdef YYLSP_NEEDED
- YYLTYPE yylloc;
-#endif
-#endif
-
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
-
- int yylen;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
-#endif
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
-
- yyssp = yyss - 1;
- yyvsp = yyvs;
-#ifdef YYLSP_NEEDED
- yylsp = yyls;
-#endif
-
-/* Push a new state, which is found in yystate . */
-/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks. */
-yynewstate:
-
- *++yyssp = yystate;
-
- if (yyssp >= yyss + yystacksize - 1)
- {
- /* Give user a chance to xreallocate the stack */
- /* Use copies of these so that the &'s don't force the real ones into memory. */
- YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
-#ifdef YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
-#endif
-
- /* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
-#ifdef YYLSP_NEEDED
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
-#else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
-#endif
-
- yyss = yyss1; yyvs = yyvs1;
-#ifdef YYLSP_NEEDED
- yyls = yyls1;
-#endif
-#else /* no yyoverflow */
- /* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- {
- yyerror("parser stack overflow");
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 2;
- }
- yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
- yystacksize = YYMAXDEPTH;
-#ifndef YYSTACK_USE_ALLOCA
- yyfree_stacks = 1;
-#endif
- yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1,
- size * (unsigned int) sizeof (*yyssp));
- yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1,
- size * (unsigned int) sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1,
- size * (unsigned int) sizeof (*yylsp));
-#endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
-#ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
-
- if (yyssp >= yyss + yystacksize - 1)
- YYABORT;
- }
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
-#endif
-
- goto yybackup;
- yybackup:
-
-/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
-/* yyresume: */
-
- /* First try to decide what to do without reference to lookahead token. */
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
-
- if (yychar == YYEMPTY)
- {
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
-#endif
- yychar = YYLEX;
- }
-
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
- {
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
-#endif
- }
- else
- {
- yychar1 = YYTRANSLATE(yychar);
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise meaning
- of a token, for further debugging info. */
-#ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
-#endif
- fprintf (stderr, ")\n");
- }
-#endif
- }
-
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
- goto yydefault;
-
- yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrlab;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Shift the lookahead token. */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
-#endif
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
-
- yystate = yyn;
- goto yynewstate;
-
-/* Do the default action for the current state. */
-yydefault:
-
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
-
-/* Do a reduction. yyn is the number of a rule to reduce with. */
-yyreduce:
- yylen = yyr2[yyn];
- if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- int i;
-
- fprintf (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
-
- /* Print the symbols being reduced, and their result. */
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
-#endif
-
-
- switch (yyn) {
-
-case 3:
-#line 209 "m2-exp.y"
-{ write_exp_elt_opcode(OP_TYPE);
- write_exp_elt_type(yyvsp[0].tval);
- write_exp_elt_opcode(OP_TYPE);
- ;
- break;}
-case 4:
-#line 218 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_IND); ;
- break;}
-case 5:
-#line 221 "m2-exp.y"
-{ number_sign = -1; ;
- break;}
-case 6:
-#line 223 "m2-exp.y"
-{ number_sign = 1;
- write_exp_elt_opcode (UNOP_NEG); ;
- break;}
-case 7:
-#line 228 "m2-exp.y"
-{ write_exp_elt_opcode(UNOP_PLUS); ;
- break;}
-case 8:
-#line 232 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_LOGICAL_NOT); ;
- break;}
-case 11:
-#line 240 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_CAP); ;
- break;}
-case 12:
-#line 244 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_ORD); ;
- break;}
-case 13:
-#line 248 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_ABS); ;
- break;}
-case 14:
-#line 252 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_HIGH); ;
- break;}
-case 15:
-#line 256 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_MIN);
- write_exp_elt_type (yyvsp[-1].tval);
- write_exp_elt_opcode (UNOP_MIN); ;
- break;}
-case 16:
-#line 262 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_MAX);
- write_exp_elt_type (yyvsp[-1].tval);
- write_exp_elt_opcode (UNOP_MIN); ;
- break;}
-case 17:
-#line 268 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_FLOAT); ;
- break;}
-case 18:
-#line 272 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_VAL);
- write_exp_elt_type (yyvsp[-3].tval);
- write_exp_elt_opcode (BINOP_VAL); ;
- break;}
-case 19:
-#line 278 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_CHR); ;
- break;}
-case 20:
-#line 282 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_ODD); ;
- break;}
-case 21:
-#line 286 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_TRUNC); ;
- break;}
-case 22:
-#line 290 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_SIZEOF); ;
- break;}
-case 23:
-#line 295 "m2-exp.y"
-{ write_exp_elt_opcode(UNOP_PREINCREMENT); ;
- break;}
-case 24:
-#line 299 "m2-exp.y"
-{ write_exp_elt_opcode(BINOP_ASSIGN_MODIFY);
- write_exp_elt_opcode(BINOP_ADD);
- write_exp_elt_opcode(BINOP_ASSIGN_MODIFY); ;
- break;}
-case 25:
-#line 305 "m2-exp.y"
-{ write_exp_elt_opcode(UNOP_PREDECREMENT);;
- break;}
-case 26:
-#line 309 "m2-exp.y"
-{ write_exp_elt_opcode(BINOP_ASSIGN_MODIFY);
- write_exp_elt_opcode(BINOP_SUB);
- write_exp_elt_opcode(BINOP_ASSIGN_MODIFY); ;
- break;}
-case 27:
-#line 315 "m2-exp.y"
-{ write_exp_elt_opcode (STRUCTOP_STRUCT);
- write_exp_string (yyvsp[0].sval);
- write_exp_elt_opcode (STRUCTOP_STRUCT); ;
- break;}
-case 29:
-#line 324 "m2-exp.y"
-{ error("Sets are not implemented.");;
- break;}
-case 30:
-#line 328 "m2-exp.y"
-{ error("Sets are not implemented.");;
- break;}
-case 31:
-#line 332 "m2-exp.y"
-{ error("Sets are not implemented.");;
- break;}
-case 32:
-#line 335 "m2-exp.y"
-{ error("Sets are not implemented.");;
- break;}
-case 33:
-#line 337 "m2-exp.y"
-{ error("Sets are not implemented.");;
- break;}
-case 34:
-#line 346 "m2-exp.y"
-{ start_arglist(); ;
- break;}
-case 35:
-#line 348 "m2-exp.y"
-{ write_exp_elt_opcode (MULTI_SUBSCRIPT);
- write_exp_elt_longcst ((LONGEST) end_arglist());
- write_exp_elt_opcode (MULTI_SUBSCRIPT); ;
- break;}
-case 36:
-#line 356 "m2-exp.y"
-{ start_arglist (); ;
- break;}
-case 37:
-#line 358 "m2-exp.y"
-{ write_exp_elt_opcode (OP_FUNCALL);
- write_exp_elt_longcst ((LONGEST) end_arglist ());
- write_exp_elt_opcode (OP_FUNCALL); ;
- break;}
-case 39:
-#line 367 "m2-exp.y"
-{ arglist_len = 1; ;
- break;}
-case 40:
-#line 371 "m2-exp.y"
-{ arglist_len++; ;
- break;}
-case 41:
-#line 376 "m2-exp.y"
-{ arglist_len = 1; ;
- break;}
-case 42:
-#line 381 "m2-exp.y"
-{ arglist_len++; ;
- break;}
-case 43:
-#line 386 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_MEMVAL);
- write_exp_elt_type (yyvsp[-2].tval);
- write_exp_elt_opcode (UNOP_MEMVAL); ;
- break;}
-case 44:
-#line 392 "m2-exp.y"
-{ write_exp_elt_opcode (UNOP_CAST);
- write_exp_elt_type (yyvsp[-3].tval);
- write_exp_elt_opcode (UNOP_CAST); ;
- break;}
-case 45:
-#line 398 "m2-exp.y"
-{ ;
- break;}
-case 46:
-#line 406 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_REPEAT); ;
- break;}
-case 47:
-#line 410 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_MUL); ;
- break;}
-case 48:
-#line 414 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_DIV); ;
- break;}
-case 49:
-#line 418 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_INTDIV); ;
- break;}
-case 50:
-#line 422 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_REM); ;
- break;}
-case 51:
-#line 426 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_ADD); ;
- break;}
-case 52:
-#line 430 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_SUB); ;
- break;}
-case 53:
-#line 434 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_EQUAL); ;
- break;}
-case 54:
-#line 438 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_NOTEQUAL); ;
- break;}
-case 55:
-#line 440 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_NOTEQUAL); ;
- break;}
-case 56:
-#line 444 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_LEQ); ;
- break;}
-case 57:
-#line 448 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_GEQ); ;
- break;}
-case 58:
-#line 452 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_LESS); ;
- break;}
-case 59:
-#line 456 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_GTR); ;
- break;}
-case 60:
-#line 460 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_LOGICAL_AND); ;
- break;}
-case 61:
-#line 464 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_LOGICAL_OR); ;
- break;}
-case 62:
-#line 468 "m2-exp.y"
-{ write_exp_elt_opcode (BINOP_ASSIGN); ;
- break;}
-case 63:
-#line 475 "m2-exp.y"
-{ write_exp_elt_opcode (OP_BOOL);
- write_exp_elt_longcst ((LONGEST) yyvsp[0].ulval);
- write_exp_elt_opcode (OP_BOOL); ;
- break;}
-case 64:
-#line 481 "m2-exp.y"
-{ write_exp_elt_opcode (OP_BOOL);
- write_exp_elt_longcst ((LONGEST) yyvsp[0].ulval);
- write_exp_elt_opcode (OP_BOOL); ;
- break;}
-case 65:
-#line 487 "m2-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_m2_int);
- write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 66:
-#line 494 "m2-exp.y"
-{
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_m2_card);
- write_exp_elt_longcst ((LONGEST) yyvsp[0].ulval);
- write_exp_elt_opcode (OP_LONG);
- ;
- break;}
-case 67:
-#line 503 "m2-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_m2_char);
- write_exp_elt_longcst ((LONGEST) yyvsp[0].ulval);
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 68:
-#line 511 "m2-exp.y"
-{ write_exp_elt_opcode (OP_DOUBLE);
- write_exp_elt_type (builtin_type_m2_real);
- write_exp_elt_dblcst (yyvsp[0].dval);
- write_exp_elt_opcode (OP_DOUBLE); ;
- break;}
-case 70:
-#line 521 "m2-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_int);
- write_exp_elt_longcst ((LONGEST) TYPE_LENGTH (yyvsp[-1].tval));
- write_exp_elt_opcode (OP_LONG); ;
- break;}
-case 71:
-#line 528 "m2-exp.y"
-{ write_exp_elt_opcode (OP_M2_STRING);
- write_exp_string (yyvsp[0].sval);
- write_exp_elt_opcode (OP_M2_STRING); ;
- break;}
-case 72:
-#line 535 "m2-exp.y"
-{ yyval.bval = SYMBOL_BLOCK_VALUE(yyvsp[0].sym); ;
- break;}
-case 73:
-#line 539 "m2-exp.y"
-{ struct symbol *sym
- = lookup_symbol (copy_name (yyvsp[0].sval), expression_context_block,
- VAR_NAMESPACE, 0, NULL);
- yyval.sym = sym;;
- break;}
-case 74:
-#line 548 "m2-exp.y"
-{ struct symbol *tem
- = lookup_symbol (copy_name (yyvsp[0].sval), yyvsp[-2].bval,
- VAR_NAMESPACE, 0, NULL);
- if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
- error ("No function \"%s\" in specified context.",
- copy_name (yyvsp[0].sval));
- yyval.sym = tem;
- ;
- break;}
-case 75:
-#line 560 "m2-exp.y"
-{ write_exp_elt_opcode(OP_VAR_VALUE);
- write_exp_elt_block (NULL);
- write_exp_elt_sym (yyvsp[0].sym);
- write_exp_elt_opcode (OP_VAR_VALUE); ;
- break;}
-case 77:
-#line 572 "m2-exp.y"
-{ struct symbol *sym;
- sym = lookup_symbol (copy_name (yyvsp[0].sval), yyvsp[-2].bval,
- VAR_NAMESPACE, 0, NULL);
- if (sym == 0)
- error ("No symbol \"%s\" in specified context.",
- copy_name (yyvsp[0].sval));
-
- write_exp_elt_opcode (OP_VAR_VALUE);
- /* block_found is set by lookup_symbol. */
- write_exp_elt_block (block_found);
- write_exp_elt_sym (sym);
- write_exp_elt_opcode (OP_VAR_VALUE); ;
- break;}
-case 78:
-#line 588 "m2-exp.y"
-{ struct symbol *sym;
- int is_a_field_of_this;
-
- sym = lookup_symbol (copy_name (yyvsp[0].sval),
- expression_context_block,
- VAR_NAMESPACE,
- &is_a_field_of_this,
- NULL);
- if (sym)
- {
- if (symbol_read_needs_frame (sym))
- {
- if (innermost_block == 0 ||
- contained_in (block_found,
- innermost_block))
- innermost_block = block_found;
- }
-
- write_exp_elt_opcode (OP_VAR_VALUE);
- /* We want to use the selected frame, not
- another more inner frame which happens to
- be in the same block. */
- write_exp_elt_block (NULL);
- write_exp_elt_sym (sym);
- write_exp_elt_opcode (OP_VAR_VALUE);
- }
- else
- {
- struct minimal_symbol *msymbol;
- register char *arg = copy_name (yyvsp[0].sval);
-
- msymbol =
- lookup_minimal_symbol (arg, NULL, NULL);
- if (msymbol != NULL)
- {
- write_exp_msymbol
- (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
- else if (!have_full_symbols () && !have_partial_symbols ())
- error ("No symbol table is loaded. Use the \"symbol-file\" command.");
- else
- error ("No symbol \"%s\" in current context.",
- copy_name (yyvsp[0].sval));
- }
- ;
- break;}
-case 79:
-#line 639 "m2-exp.y"
-{ yyval.tval = lookup_typename (copy_name (yyvsp[0].sval),
- expression_context_block, 0); ;
- break;}
-}
- /* the action file gets copied in in place of this dollarsign */
-#line 542 "/usr/lib/bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-#ifdef YYLSP_NEEDED
- yylsp -= yylen;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
- *++yyvsp = yyval;
-
-#ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
-#endif
-
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTBASE];
-
- goto yynewstate;
-
-yyerrlab: /* here on detecting error */
-
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
- {
- ++yynerrs;
-
-#ifdef YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (yyn > YYFLAG && yyn < YYLAST)
- {
- int size = 0;
- char *msg;
- int x, count;
-
- count = 0;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) xmalloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
-
- if (count < 5)
- {
- count = 0;
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- {
- strcat(msg, count == 0 ? ", expecting `" : " or `");
- strcat(msg, yytname[x]);
- strcat(msg, "'");
- count++;
- }
- }
- yyerror(msg);
- free(msg);
- }
- else
- yyerror ("parse error; also virtual memory exceeded");
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror("parse error");
- }
-
- goto yyerrlab1;
-yyerrlab1: /* here on error raised explicitly by an action */
-
- if (yyerrstatus == 3)
- {
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
-
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
-
- yychar = YYEMPTY;
- }
-
- /* Else will try to reuse lookahead token
- after shifting the error token. */
-
- yyerrstatus = 3; /* Each real token shifted decrements this */
-
- goto yyerrhandle;
-
-yyerrdefault: /* current state does not do anything special for the error token. */
-
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
-#endif
-
-yyerrpop: /* pop the current state because it cannot handle the error token */
-
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
-#ifdef YYLSP_NEEDED
- yylsp--;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
-yyerrhandle:
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
-
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
-
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrpop;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
-#endif
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- yystate = yyn;
- goto yynewstate;
-
- yyacceptlab:
- /* YYACCEPT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 0;
-
- yyabortlab:
- /* YYABORT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 1;
-}
-#line 644 "m2-exp.y"
-
-
-#if 0 /* FIXME! */
-int
-overflow(a,b)
- long a,b;
-{
- return (MAX_OF_TYPE(builtin_type_m2_int) - b) < a;
-}
-
-int
-uoverflow(a,b)
- unsigned long a,b;
-{
- return (MAX_OF_TYPE(builtin_type_m2_card) - b) < a;
-}
-#endif /* FIXME */
-
-/* Take care of parsing a number (anything that starts with a digit).
- Set yylval and return the token type; update lexptr.
- LEN is the number of characters in it. */
-
-/*** Needs some error checking for the float case ***/
-
-static int
-parse_number (olen)
- int olen;
-{
- register char *p = lexptr;
- register LONGEST n = 0;
- register LONGEST prevn = 0;
- register int c,i,ischar=0;
- register int base = input_radix;
- register int len = olen;
- int unsigned_p = number_sign == 1 ? 1 : 0;
-
- if(p[len-1] == 'H')
- {
- base = 16;
- len--;
- }
- else if(p[len-1] == 'C' || p[len-1] == 'B')
- {
- base = 8;
- ischar = p[len-1] == 'C';
- len--;
- }
-
- /* Scan the number */
- for (c = 0; c < len; c++)
- {
- if (p[c] == '.' && base == 10)
- {
- /* It's a float since it contains a point. */
- yylval.dval = atof (p);
- lexptr += len;
- return FLOAT;
- }
- if (p[c] == '.' && base != 10)
- error("Floating point numbers must be base 10.");
- if (base == 10 && (p[c] < '0' || p[c] > '9'))
- error("Invalid digit \'%c\' in number.",p[c]);
- }
-
- while (len-- > 0)
- {
- c = *p++;
- n *= base;
- if( base == 8 && (c == '8' || c == '9'))
- error("Invalid digit \'%c\' in octal number.",c);
- if (c >= '0' && c <= '9')
- i = c - '0';
- else
- {
- if (base == 16 && c >= 'A' && c <= 'F')
- i = c - 'A' + 10;
- else
- return ERROR;
- }
- n+=i;
- if(i >= base)
- return ERROR;
- if(!unsigned_p && number_sign == 1 && (prevn >= n))
- unsigned_p=1; /* Try something unsigned */
- /* Don't do the range check if n==i and i==0, since that special
- case will give an overflow error. */
- if(RANGE_CHECK && n!=i && i)
- {
- if((unsigned_p && (unsigned)prevn >= (unsigned)n) ||
- ((!unsigned_p && number_sign==-1) && -prevn <= -n))
- range_error("Overflow on numeric constant.");
- }
- prevn=n;
- }
-
- lexptr = p;
- if(*p == 'B' || *p == 'C' || *p == 'H')
- lexptr++; /* Advance past B,C or H */
-
- if (ischar)
- {
- yylval.ulval = n;
- return CHAR;
- }
- else if ( unsigned_p && number_sign == 1)
- {
- yylval.ulval = n;
- return UINT;
- }
- else if((unsigned_p && (n<0))) {
- range_error("Overflow on numeric constant -- number too large.");
- /* But, this can return if range_check == range_warn. */
- }
- yylval.lval = n;
- return INT;
-}
-
-
-/* Some tokens */
-
-static struct
-{
- char name[2];
- int token;
-} tokentab2[] =
-{
- { {'<', '>'}, NOTEQUAL },
- { {':', '='}, ASSIGN },
- { {'<', '='}, LEQ },
- { {'>', '='}, GEQ },
- { {':', ':'}, COLONCOLON },
-
-};
-
-/* Some specific keywords */
-
-struct keyword {
- char keyw[10];
- int token;
-};
-
-static struct keyword keytab[] =
-{
- {"OR" , OROR },
- {"IN", IN },/* Note space after IN */
- {"AND", LOGICAL_AND},
- {"ABS", ABS },
- {"CHR", CHR },
- {"DEC", DEC },
- {"NOT", NOT },
- {"DIV", DIV },
- {"INC", INC },
- {"MAX", MAX_FUNC },
- {"MIN", MIN_FUNC },
- {"MOD", MOD },
- {"ODD", ODD },
- {"CAP", CAP },
- {"ORD", ORD },
- {"VAL", VAL },
- {"EXCL", EXCL },
- {"HIGH", HIGH },
- {"INCL", INCL },
- {"SIZE", SIZE },
- {"FLOAT", FLOAT_FUNC },
- {"TRUNC", TRUNC },
-};
-
-
-/* Read one token, getting characters through lexptr. */
-
-/* This is where we will check to make sure that the language and the operators used are
- compatible */
-
-static int
-yylex ()
-{
- register int c;
- register int namelen;
- register int i;
- register char *tokstart;
- register char quote;
-
- retry:
-
- tokstart = lexptr;
-
-
- /* See if it is a special token of length 2 */
- for( i = 0 ; i < (int) (sizeof tokentab2 / sizeof tokentab2[0]) ; i++)
- if(STREQN(tokentab2[i].name, tokstart, 2))
- {
- lexptr += 2;
- return tokentab2[i].token;
- }
-
- switch (c = *tokstart)
- {
- case 0:
- return 0;
-
- case ' ':
- case '\t':
- case '\n':
- lexptr++;
- goto retry;
-
- case '(':
- paren_depth++;
- lexptr++;
- return c;
-
- case ')':
- if (paren_depth == 0)
- return 0;
- paren_depth--;
- lexptr++;
- return c;
-
- case ',':
- if (comma_terminates && paren_depth == 0)
- return 0;
- lexptr++;
- return c;
-
- case '.':
- /* Might be a floating point number. */
- if (lexptr[1] >= '0' && lexptr[1] <= '9')
- break; /* Falls into number code. */
- else
- {
- lexptr++;
- return DOT;
- }
-
-/* These are character tokens that appear as-is in the YACC grammar */
- case '+':
- case '-':
- case '*':
- case '/':
- case '^':
- case '<':
- case '>':
- case '[':
- case ']':
- case '=':
- case '{':
- case '}':
- case '#':
- case '@':
- case '~':
- case '&':
- lexptr++;
- return c;
-
- case '\'' :
- case '"':
- quote = c;
- for (namelen = 1; (c = tokstart[namelen]) != quote && c != '\0'; namelen++)
- if (c == '\\')
- {
- c = tokstart[++namelen];
- if (c >= '0' && c <= '9')
- {
- c = tokstart[++namelen];
- if (c >= '0' && c <= '9')
- c = tokstart[++namelen];
- }
- }
- if(c != quote)
- error("Unterminated string or character constant.");
- yylval.sval.ptr = tokstart + 1;
- yylval.sval.length = namelen - 1;
- lexptr += namelen + 1;
-
- if(namelen == 2) /* Single character */
- {
- yylval.ulval = tokstart[1];
- return CHAR;
- }
- else
- return STRING;
- }
-
- /* Is it a number? */
- /* Note: We have already dealt with the case of the token '.'.
- See case '.' above. */
- if ((c >= '0' && c <= '9'))
- {
- /* It's a number. */
- int got_dot = 0, got_e = 0;
- register char *p = tokstart;
- int toktype;
-
- for (++p ;; ++p)
- {
- if (!got_e && (*p == 'e' || *p == 'E'))
- got_dot = got_e = 1;
- else if (!got_dot && *p == '.')
- got_dot = 1;
- else if (got_e && (p[-1] == 'e' || p[-1] == 'E')
- && (*p == '-' || *p == '+'))
- /* This is the sign of the exponent, not the end of the
- number. */
- continue;
- else if ((*p < '0' || *p > '9') &&
- (*p < 'A' || *p > 'F') &&
- (*p != 'H')) /* Modula-2 hexadecimal number */
- break;
- }
- toktype = parse_number (p - tokstart);
- if (toktype == ERROR)
- {
- char *err_copy = (char *) alloca (p - tokstart + 1);
-
- memcpy (err_copy, tokstart, p - tokstart);
- err_copy[p - tokstart] = 0;
- error ("Invalid number \"%s\".", err_copy);
- }
- lexptr = p;
- return toktype;
- }
-
- if (!(c == '_' || c == '$'
- || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
- /* We must have come across a bad character (e.g. ';'). */
- error ("Invalid character '%c' in expression.", c);
-
- /* It's a name. See how long it is. */
- namelen = 0;
- for (c = tokstart[namelen];
- (c == '_' || c == '$' || (c >= '0' && c <= '9')
- || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
- c = tokstart[++namelen])
- ;
-
- /* The token "if" terminates the expression and is NOT
- removed from the input stream. */
- if (namelen == 2 && tokstart[0] == 'i' && tokstart[1] == 'f')
- {
- return 0;
- }
-
- lexptr += namelen;
-
- /* Lookup special keywords */
- for(i = 0 ; i < (int) (sizeof(keytab) / sizeof(keytab[0])) ; i++)
- if(namelen == strlen(keytab[i].keyw) && STREQN(tokstart,keytab[i].keyw,namelen))
- return keytab[i].token;
-
- yylval.sval.ptr = tokstart;
- yylval.sval.length = namelen;
-
- if (*tokstart == '$')
- {
- write_dollar_variable (yylval.sval);
- return INTERNAL_VAR;
- }
-
- /* Use token-type BLOCKNAME for symbols that happen to be defined as
- functions. If this is not so, then ...
- Use token-type TYPENAME for symbols that happen to be defined
- currently as names of types; NAME for other symbols.
- The caller is not constrained to care about the distinction. */
- {
-
-
- char *tmp = copy_name (yylval.sval);
- struct symbol *sym;
-
- if (lookup_partial_symtab (tmp))
- return BLOCKNAME;
- sym = lookup_symbol (tmp, expression_context_block,
- VAR_NAMESPACE, 0, NULL);
- if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
- return BLOCKNAME;
- if (lookup_typename (copy_name (yylval.sval), expression_context_block, 1))
- return TYPENAME;
-
- if(sym)
- {
- switch(sym->aclass)
- {
- case LOC_STATIC:
- case LOC_REGISTER:
- case LOC_ARG:
- case LOC_REF_ARG:
- case LOC_REGPARM:
- case LOC_REGPARM_ADDR:
- case LOC_LOCAL:
- case LOC_LOCAL_ARG:
- case LOC_BASEREG:
- case LOC_BASEREG_ARG:
- case LOC_CONST:
- case LOC_CONST_BYTES:
- case LOC_OPTIMIZED_OUT:
- return NAME;
-
- case LOC_TYPEDEF:
- return TYPENAME;
-
- case LOC_BLOCK:
- return BLOCKNAME;
-
- case LOC_UNDEF:
- error("internal: Undefined class in m2lex()");
-
- case LOC_LABEL:
- case LOC_UNRESOLVED:
- error("internal: Unforseen case in m2lex()");
-
- default:
- error ("unhandled token in m2lex()");
- break;
- }
- }
- else
- {
- /* Built-in BOOLEAN type. This is sort of a hack. */
- if(STREQN(tokstart,"TRUE",4))
- {
- yylval.ulval = 1;
- return M2_TRUE;
- }
- else if(STREQN(tokstart,"FALSE",5))
- {
- yylval.ulval = 0;
- return M2_FALSE;
- }
- }
-
- /* Must be another type of name... */
- return NAME;
- }
-}
-
-#if 0 /* Unused */
-static char *
-make_qualname(mod,ident)
- char *mod, *ident;
-{
- char *new = xmalloc(strlen(mod)+strlen(ident)+2);
-
- strcpy(new,mod);
- strcat(new,".");
- strcat(new,ident);
- return new;
-}
-#endif /* 0 */
-
-void
-yyerror (msg)
- char *msg;
-{
- error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
-}
diff --git a/contrib/gdb/gdb/m32r-rom.c b/contrib/gdb/gdb/m32r-rom.c
deleted file mode 100644
index b4bfefdf2103..000000000000
--- a/contrib/gdb/gdb/m32r-rom.c
+++ /dev/null
@@ -1,626 +0,0 @@
-/* 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.");
-}
diff --git a/contrib/gdb/gdb/m32r-stub.c b/contrib/gdb/gdb/m32r-stub.c
deleted file mode 100644
index cb956264d675..000000000000
--- a/contrib/gdb/gdb/m32r-stub.c
+++ /dev/null
@@ -1,1711 +0,0 @@
-/****************************************************************************
-
- 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;
-
- if (!finish_from_step())
- 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
- ld r1, @r0+ ; restore cr0 == PSW
- mvtc r1, cr0
- 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
diff --git a/contrib/gdb/gdb/m32r-tdep.c b/contrib/gdb/gdb/m32r-tdep.c
deleted file mode 100644
index 4b883fb213ef..000000000000
--- a/contrib/gdb/gdb/m32r-tdep.c
+++ /dev/null
@@ -1,705 +0,0 @@
-/* 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 "obstack.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 (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 = generic_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 (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return generic_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 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 (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 (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 (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 (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return generic_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;
-}
diff --git a/contrib/gdb/gdb/m68k-stub.c b/contrib/gdb/gdb/m68k-stub.c
deleted file mode 100644
index 54e06b13ccb6..000000000000
--- a/contrib/gdb/gdb/m68k-stub.c
+++ /dev/null
@@ -1,1098 +0,0 @@
-/****************************************************************************
-
- 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 $
- *
- * 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 breakpoint instruction
- * is hardwired to trap #1 because not to do so is a compatibility problem--
- * there either should be a standard breakpoint instruction, or the protocol
- * should be extended to provide some means to communicate which breakpoint
- * instruction is in use (or have the stub insert the breakpoint).
- *
- * Some explanation is probably necessary to explain how exceptions are
- * handled. When an exception is encountered the 68000 pushes the current
- * program counter and status register onto the supervisor stack and then
- * transfers execution to a location specified in it's vector table.
- * The handlers for the exception vectors are hardwired to jmp to an address
- * given by the relation: (exception - 256) * 6. These are decending
- * addresses starting from -6, -12, -18, ... By allowing 6 bytes for
- * each entry, a jsr, jmp, bsr, ... can be used to enter the exception
- * handler. Using a jsr to handle an exception has an added benefit of
- * allowing a single handler to service several exceptions and use the
- * return address as the key differentiation. The vector number can be
- * computed from the return address by [ exception = (addr + 1530) / 6 ].
- * The sole purpose of the routine _catchException is to compute the
- * exception number and push it on the stack in place of the return address.
- * The external function exceptionHandler() is
- * used to attach a specific handler to a specific m68k exception.
- * For 68020 machines, the ability to have a return address around just
- * so the vector can be determined is not necessary because the '020 pushes an
- * extra word onto the stack containing the vector offset
- *
- * 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
- *
- * 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
- *
- ****************************************************************************/
-
-#include <stdio.h>
-#include <string.h>
-#include <setjmp.h>
-
-/************************************************************************
- *
- * external low-level support routines
- */
-typedef void (*ExceptionHook)(int); /* pointer to function with int parm */
-typedef void (*Function)(); /* pointer to a function */
-
-extern void putDebugChar(); /* write a single character */
-extern int getDebugChar(); /* read and return a single char */
-
-extern Function exceptionHandler(); /* assign an exception handler */
-extern ExceptionHook exceptionHook; /* hook variable for errors/exceptions */
-
-/************************/
-/* FORWARD DECLARATIONS */
-/************************/
-static void
-initializeRemcomErrorFrame ();
-
-/************************************************************************/
-/* 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 char hexchars[]="0123456789abcdef";
-
-/* there are 180 bytes of registers on a 68020 w/68881 */
-/* many of the fpa registers are 12 byte (96 bit) registers */
-#define NUMREGBYTES 180
-enum regnames {D0,D1,D2,D3,D4,D5,D6,D7,
- A0,A1,A2,A3,A4,A5,A6,A7,
- PS,PC,
- FP0,FP1,FP2,FP3,FP4,FP5,FP6,FP7,
- FPCONTROL,FPSTATUS,FPIADDR
- };
-
-
-/* We keep a whole frame cache here. "Why?", I hear you cry, "doesn't
- GDB handle that sort of thing?" Well, yes, I believe the only
- reason for this cache is to save and restore floating point state
- (fsave/frestore). A cleaner way to do this would be to make the
- fsave data part of the registers which GDB deals with like any
- other registers. This should not be a performance problem if the
- ability to read individual registers is added to the protocol. */
-
-typedef struct FrameStruct
-{
- struct FrameStruct *previous;
- int exceptionPC; /* pc value when this frame created */
- int exceptionVector; /* cpu vector causing exception */
- short frameSize; /* size of cpu frame in words */
- short sr; /* for 68000, this not always sr */
- int pc;
- short format;
- int fsaveHeader;
- int morejunk[0]; /* exception frame, fp save... */
-} Frame;
-
-#define FRAMESIZE 500
-int gdbFrameStack[FRAMESIZE];
-static Frame *lastFrame;
-
-/*
- * these should not be static cuz they can be used outside this module
- */
-int registers[NUMREGBYTES/4];
-int superStack;
-
-#define STACKSIZE 10000
-int remcomStack[STACKSIZE/sizeof(int)];
-static int* stackPtr = &remcomStack[STACKSIZE/sizeof(int) - 1];
-
-/*
- * In many cases, the system will want to continue exception processing
- * when a continue command is given.
- * oldExceptionHook is a function to invoke in this case.
- */
-
-static ExceptionHook oldExceptionHook;
-
-#ifdef mc68020
-/* the size of the exception stack on the 68020 varies with the type of
- * exception. The following table is the number of WORDS used
- * for each exception format.
- */
-const short exceptionSize[] = { 4,4,6,4,4,4,4,4,29,10,16,46,12,4,4,4 };
-#endif
-
-#ifdef mc68332
-static const short exceptionSize[] = { 4,4,6,4,4,4,4,4,4,4,4,4,16,4,4,4 };
-#endif
-
-/************* jump buffer used for setjmp/longjmp **************************/
-jmp_buf remcomEnv;
-
-/*************************** ASSEMBLY CODE MACROS *************************/
-/* */
-
-#ifdef __HAVE_68881__
-/* do an fsave, then remember the address to begin a restore from */
-#define SAVE_FP_REGS() asm(" fsave a0@-"); \
- asm(" fmovemx fp0-fp7,_registers+72"); \
- asm(" fmoveml fpcr/fpsr/fpi,_registers+168");
-#define RESTORE_FP_REGS() \
-asm(" \n\
- fmoveml _registers+168,fpcr/fpsr/fpi \n\
- fmovemx _registers+72,fp0-fp7 \n\
- cmpl #-1,a0@ | skip frestore flag set ? \n\
- beq skip_frestore \n\
- frestore a0@+ \n\
-skip_frestore: \n\
-");
-
-#else
-#define SAVE_FP_REGS()
-#define RESTORE_FP_REGS()
-#endif /* __HAVE_68881__ */
-
-void return_to_super();
-void return_to_user();
-
-asm("
-.text
-.globl _return_to_super
-_return_to_super:
- movel _registers+60,sp /* get new stack pointer */
- movel _lastFrame,a0 /* get last frame info */
- bra return_to_any
-
-.globl _return_to_user
-_return_to_user:
- movel _registers+60,a0 /* get usp */
- movel a0,usp /* set usp */
- movel _superStack,sp /* get original stack pointer */
-
-return_to_any:
- movel _lastFrame,a0 /* get last frame info */
- movel a0@+,_lastFrame /* link in previous frame */
- addql #8,a0 /* skip over pc, vector#*/
- movew a0@+,d0 /* get # of words in cpu frame */
- addw d0,a0 /* point to end of data */
- addw d0,a0 /* point to end of data */
- movel a0,a1
-#
-# copy the stack frame
- subql #1,d0
-copyUserLoop:
- movew a1@-,sp@-
- dbf d0,copyUserLoop
-");
- RESTORE_FP_REGS()
- asm(" moveml _registers,d0-d7/a0-a6");
- asm(" rte"); /* pop and go! */
-
-#define DISABLE_INTERRUPTS() asm(" oriw #0x0700,sr");
-#define BREAKPOINT() asm(" trap #1");
-
-/* this function is called immediately when a level 7 interrupt occurs */
-/* if the previous interrupt level was 7 then we're already servicing */
-/* this interrupt and an rte is in order to return to the debugger. */
-/* For the 68000, the offset for sr is 6 due to the jsr return address */
-asm("
-.text
-.globl __debug_level7
-__debug_level7:
- movew d0,sp@-");
-#if defined (mc68020) || defined (mc68332)
-asm(" movew sp@(2),d0");
-#else
-asm(" movew sp@(6),d0");
-#endif
-asm(" andiw #0x700,d0
- cmpiw #0x700,d0
- beq _already7
- movew sp@+,d0
- bra __catchException
-_already7:
- movew sp@+,d0");
-#if !defined (mc68020) && !defined (mc68332)
-asm(" lea sp@(4),sp"); /* pull off 68000 return address */
-#endif
-asm(" rte");
-
-extern void _catchException ();
-
-#if defined (mc68020) || defined (mc68332)
-/* This function is called when a 68020 exception occurs. It saves
- * all the cpu and fpcp regs in the _registers array, creates a frame on a
- * linked list of frames which has the cpu and fpcp stack frames needed
- * to properly restore the context of these processors, and invokes
- * an exception handler (remcom_handler).
- *
- * stack on entry: stack on exit:
- * N bytes of junk exception # MSWord
- * Exception Format Word exception # MSWord
- * Program counter LSWord
- * Program counter MSWord
- * Status Register
- *
- *
- */
-asm("
-.text
-.globl __catchException
-__catchException:");
-DISABLE_INTERRUPTS();
-asm("
- moveml d0-d7/a0-a6,_registers /* save registers */
- movel _lastFrame,a0 /* last frame pointer */
-");
-SAVE_FP_REGS();
-asm("
- lea _registers,a5 /* get address of registers */
- movew sp@,d1 /* get status register */
- movew d1,a5@(66) /* save sr */
- movel sp@(2),a4 /* save pc in a4 for later use */
- movel a4,a5@(68) /* save pc in _regisers[] */
-
-#
-# figure out how many bytes in the stack frame
- movew sp@(6),d0 /* get '020 exception format */
- movew d0,d2 /* make a copy of format word */
- andiw #0xf000,d0 /* mask off format type */
- rolw #5,d0 /* rotate into the low byte *2 */
- lea _exceptionSize,a1
- addw d0,a1 /* index into the table */
- movew a1@,d0 /* get number of words in frame */
- movew d0,d3 /* save it */
- subw d0,a0 /* adjust save pointer */
- subw d0,a0 /* adjust save pointer(bytes) */
- movel a0,a1 /* copy save pointer */
- subql #1,d0 /* predecrement loop counter */
-#
-# copy the frame
-saveFrameLoop:
- movew sp@+,a1@+
- dbf d0,saveFrameLoop
-#
-# now that the stack has been clenaed,
-# save the a7 in use at time of exception
- movel sp,_superStack /* save supervisor sp */
- andiw #0x2000,d1 /* were we in supervisor mode ? */
- beq userMode
- movel a7,a5@(60) /* save a7 */
- bra a7saveDone
-userMode:
- movel usp,a1
- movel a1,a5@(60) /* save user stack pointer */
-a7saveDone:
-
-#
-# save size of frame
- movew d3,a0@-
-
-#
-# compute exception number
- andl #0xfff,d2 /* mask off vector offset */
- lsrw #2,d2 /* divide by 4 to get vect num */
- movel d2,a0@- /* save it */
-#
-# save pc causing exception
- movel a4,a0@-
-#
-# save old frame link and set the new value
- movel _lastFrame,a1 /* last frame pointer */
- movel a1,a0@- /* save pointer to prev frame */
- movel a0,_lastFrame
-
- movel d2,sp@- /* push exception num */
- movel _exceptionHook,a0 /* get address of handler */
- jbsr a0@ /* and call it */
- clrl sp@ /* replace exception num parm with frame ptr */
- jbsr __returnFromException /* jbsr, but never returns */
-");
-#else /* mc68000 */
-/* This function is called when an exception occurs. It translates the
- * return address found on the stack into an exception vector # which
- * is then handled by either handle_exception or a system handler.
- * _catchException provides a front end for both.
- *
- * stack on entry: stack on exit:
- * Program counter MSWord exception # MSWord
- * Program counter LSWord exception # MSWord
- * Status Register
- * Return Address MSWord
- * Return Address LSWord
- */
-asm("
-.text
-.globl __catchException
-__catchException:");
-DISABLE_INTERRUPTS();
-asm("
- moveml d0-d7/a0-a6,_registers /* save registers */
- movel _lastFrame,a0 /* last frame pointer */
-");
-SAVE_FP_REGS();
-asm("
- lea _registers,a5 /* get address of registers */
- movel sp@+,d2 /* pop return address */
- addl #1530,d2 /* convert return addr to */
- divs #6,d2 /* exception number */
- extl d2
-
- moveql #3,d3 /* assume a three word frame */
-
- cmpiw #3,d2 /* bus error or address error ? */
- bgt normal /* if >3 then normal error */
- movel sp@+,a0@- /* copy error info to frame buff*/
- movel sp@+,a0@- /* these are never used */
- moveql #7,d3 /* this is a 7 word frame */
-
-normal:
- movew sp@+,d1 /* pop status register */
- movel sp@+,a4 /* pop program counter */
- movew d1,a5@(66) /* save sr */
- movel a4,a5@(68) /* save pc in _regisers[] */
- movel a4,a0@- /* copy pc to frame buffer */
- movew d1,a0@- /* copy sr to frame buffer */
-
- movel sp,_superStack /* save supervisor sp */
-
- andiw #0x2000,d1 /* were we in supervisor mode ? */
- beq userMode
- movel a7,a5@(60) /* save a7 */
- bra saveDone
-userMode:
- movel usp,a1 /* save user stack pointer */
- movel a1,a5@(60) /* save user stack pointer */
-saveDone:
-
- movew d3,a0@- /* push frame size in words */
- movel d2,a0@- /* push vector number */
- movel a4,a0@- /* push exception pc */
-
-#
-# save old frame link and set the new value
- movel _lastFrame,a1 /* last frame pointer */
- movel a1,a0@- /* save pointer to prev frame */
- movel a0,_lastFrame
-
- movel d2,sp@- /* push exception num */
- movel _exceptionHook,a0 /* get address of handler */
- jbsr a0@ /* and call it */
- clrl sp@ /* replace exception num parm with frame ptr */
- jbsr __returnFromException /* jbsr, but never returns */
-");
-#endif
-
-
-/*
- * remcomHandler is a front end for handle_exception. It moves the
- * stack pointer into an area reserved for debugger use in case the
- * breakpoint happened in supervisor mode.
- */
-asm("_remcomHandler:");
-asm(" addl #4,sp"); /* pop off return address */
-asm(" movel sp@+,d0"); /* get the exception number */
-asm(" movel _stackPtr,sp"); /* move to remcom stack area */
-asm(" movel d0,sp@-"); /* push exception onto stack */
-asm(" jbsr _handle_exception"); /* this never returns */
-asm(" rts"); /* return */
-
-void
-_returnFromException (Frame * frame)
-{
- /* if no passed in frame, use the last one */
- if (!frame)
- {
- frame = lastFrame;
- frame->frameSize = 4;
- frame->format = 0;
- frame->fsaveHeader = -1; /* restore regs, but we dont have fsave info */
- }
-
-#if !defined (mc68020) && !defined (mc68332)
- /* a 68000 cannot use the internal info pushed onto a bus error
- * or address error frame when doing an RTE so don't put this info
- * onto the stack or the stack will creep every time this happens.
- */
- frame->frameSize = 3;
-#endif
-
- /* throw away any frames in the list after this frame */
- lastFrame = frame;
-
- frame->sr = registers[(int) PS];
- frame->pc = registers[(int) PC];
-
- if (registers[(int) PS] & 0x2000)
- {
- /* return to supervisor mode... */
- return_to_super ();
- }
- else
- { /* return to user mode */
- return_to_user ();
- }
-}
-
-int
-hex (ch)
- 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);
-}
-
-static char remcomInBuffer[BUFMAX];
-static char remcomOutBuffer[BUFMAX];
-
-/* 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)
- {
- fprintf (stderr,
- "bad checksum. My count = 0x%x, sent=0x%x. buf=%s\n",
- checksum, xmitcsum, 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. */
-
-void
-putpacket (buffer)
- 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 () != '+');
-
-}
-
-void
-debug_error (format, parm)
- char *format;
- char *parm;
-{
- if (remote_debug)
- fprintf (stderr, format, parm);
-}
-
-/* convert the memory pointed to by mem into hex, placing result in buf */
-/* return a pointer to the last char put in buf (null) */
-char *
-mem2hex (mem, buf, count)
- char *mem;
- char *buf;
- int count;
-{
- int i;
- unsigned char ch;
- for (i = 0; i < count; i++)
- {
- ch = *mem++;
- *buf++ = hexchars[ch >> 4];
- *buf++ = hexchars[ch % 16];
- }
- *buf = 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 */
-char *
-hex2mem (buf, mem, count)
- char *buf;
- char *mem;
- int count;
-{
- int i;
- unsigned char ch;
- for (i = 0; i < count; i++)
- {
- ch = hex (*buf++) << 4;
- ch = ch + hex (*buf++);
- *mem++ = ch;
- }
- return (mem);
-}
-
-/* a bus error has occurred, perform a longjmp
- to return execution and allow handling of the error */
-
-void
-handle_buserror ()
-{
- longjmp (remcomEnv, 1);
-}
-
-/* this function takes the 68000 exception number and attempts to
- translate this number into a unix compatible signal value */
-int
-computeSignal (exceptionVector)
- int exceptionVector;
-{
- int sigval;
- switch (exceptionVector)
- {
- case 2:
- sigval = 10;
- break; /* bus error */
- case 3:
- sigval = 10;
- break; /* address error */
- case 4:
- sigval = 4;
- break; /* illegal instruction */
- case 5:
- sigval = 8;
- break; /* zero divide */
- case 6:
- sigval = 8;
- break; /* chk instruction */
- case 7:
- sigval = 8;
- break; /* trapv instruction */
- case 8:
- sigval = 11;
- break; /* privilege violation */
- case 9:
- sigval = 5;
- break; /* trace trap */
- case 10:
- sigval = 4;
- break; /* line 1010 emulator */
- case 11:
- sigval = 4;
- break; /* line 1111 emulator */
-
- /* Coprocessor protocol violation. Using a standard MMU or FPU
- this cannot be triggered by software. Call it a SIGBUS. */
- case 13:
- sigval = 10;
- break;
-
- case 31:
- sigval = 2;
- break; /* interrupt */
- case 33:
- sigval = 5;
- break; /* breakpoint */
-
- /* This is a trap #8 instruction. Apparently it is someone's software
- convention for some sort of SIGFPE condition. Whose? How many
- people are being screwed by having this code the way it is?
- Is there a clean solution? */
- case 40:
- sigval = 8;
- break; /* floating point err */
-
- case 48:
- sigval = 8;
- break; /* floating point err */
- case 49:
- sigval = 8;
- break; /* floating point err */
- case 50:
- sigval = 8;
- break; /* zero divide */
- case 51:
- sigval = 8;
- break; /* underflow */
- case 52:
- sigval = 8;
- break; /* operand error */
- case 53:
- sigval = 8;
- break; /* overflow */
- case 54:
- sigval = 8;
- break; /* NAN */
- default:
- sigval = 7; /* "software generated" */
- }
- return (sigval);
-}
-
-/**********************************************/
-/* WHILE WE FIND NICE HEX CHARS, BUILD AN INT */
-/* RETURN NUMBER OF CHARS PROCESSED */
-/**********************************************/
-int
-hexToInt (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);
-}
-
-/*
- * This function does all command procesing for interfacing to gdb.
- */
-void
-handle_exception (int exceptionVector)
-{
- int sigval, stepping;
- int addr, length;
- char *ptr;
- int newPC;
- Frame *frame;
-
- if (remote_debug)
- printf ("vector=%d, sr=0x%x, pc=0x%x\n",
- exceptionVector, registers[PS], registers[PC]);
-
- /* reply to host that an exception has occurred */
- sigval = computeSignal (exceptionVector);
- remcomOutBuffer[0] = 'S';
- remcomOutBuffer[1] = hexchars[sigval >> 4];
- remcomOutBuffer[2] = hexchars[sigval % 16];
- remcomOutBuffer[3] = 0;
-
- putpacket (remcomOutBuffer);
-
- stepping = 0;
-
- while (1 == 1)
- {
- remcomOutBuffer[0] = 0;
- ptr = getpacket ();
- switch (*ptr++)
- {
- 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 ((char *) registers, remcomOutBuffer, NUMREGBYTES);
- break;
- case 'G': /* set the value of the CPU registers - return OK */
- hex2mem (ptr, (char *) registers, NUMREGBYTES);
- strcpy (remcomOutBuffer, "OK");
- break;
-
- /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
- case 'm':
- if (setjmp (remcomEnv) == 0)
- {
- exceptionHandler (2, handle_buserror);
-
- /* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */
- if (hexToInt (&ptr, &addr))
- if (*(ptr++) == ',')
- if (hexToInt (&ptr, &length))
- {
- ptr = 0;
- mem2hex ((char *) addr, remcomOutBuffer, length);
- }
-
- if (ptr)
- {
- strcpy (remcomOutBuffer, "E01");
- }
- }
- else
- {
- exceptionHandler (2, _catchException);
- strcpy (remcomOutBuffer, "E03");
- debug_error ("bus error");
- }
-
- /* restore handler for bus error */
- exceptionHandler (2, _catchException);
- break;
-
- /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
- case 'M':
- if (setjmp (remcomEnv) == 0)
- {
- exceptionHandler (2, handle_buserror);
-
- /* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */
- if (hexToInt (&ptr, &addr))
- if (*(ptr++) == ',')
- if (hexToInt (&ptr, &length))
- if (*(ptr++) == ':')
- {
- hex2mem (ptr, (char *) addr, length);
- ptr = 0;
- strcpy (remcomOutBuffer, "OK");
- }
- if (ptr)
- {
- strcpy (remcomOutBuffer, "E02");
- }
- }
- else
- {
- exceptionHandler (2, _catchException);
- strcpy (remcomOutBuffer, "E03");
- debug_error ("bus error");
- }
-
- /* restore handler for bus error */
- exceptionHandler (2, _catchException);
- break;
-
- /* cAA..AA Continue at address AA..AA(optional) */
- /* sAA..AA Step one instruction from AA..AA(optional) */
- case 's':
- stepping = 1;
- case 'c':
- /* try to read optional parameter, pc unchanged if no parm */
- if (hexToInt (&ptr, &addr))
- registers[PC] = addr;
-
- newPC = registers[PC];
-
- /* clear the trace bit */
- registers[PS] &= 0x7fff;
-
- /* set the trace bit if we're stepping */
- if (stepping)
- registers[PS] |= 0x8000;
-
- /*
- * look for newPC in the linked list of exception frames.
- * if it is found, use the old frame it. otherwise,
- * fake up a dummy frame in returnFromException().
- */
- if (remote_debug)
- printf ("new pc = 0x%x\n", newPC);
- frame = lastFrame;
- while (frame)
- {
- if (remote_debug)
- printf ("frame at 0x%x has pc=0x%x, except#=%d\n",
- frame, frame->exceptionPC, frame->exceptionVector);
- if (frame->exceptionPC == newPC)
- break; /* bingo! a match */
- /*
- * for a breakpoint instruction, the saved pc may
- * be off by two due to re-executing the instruction
- * replaced by the trap instruction. Check for this.
- */
- if ((frame->exceptionVector == 33) &&
- (frame->exceptionPC == (newPC + 2)))
- break;
- if (frame == frame->previous)
- {
- frame = 0; /* no match found */
- break;
- }
- frame = frame->previous;
- }
-
- /*
- * If we found a match for the PC AND we are not returning
- * as a result of a breakpoint (33),
- * trace exception (9), nmi (31), jmp to
- * the old exception handler as if this code never ran.
- */
- if (frame)
- {
- if ((frame->exceptionVector != 9) &&
- (frame->exceptionVector != 31) &&
- (frame->exceptionVector != 33))
- {
- /*
- * invoke the previous handler.
- */
- if (oldExceptionHook)
- (*oldExceptionHook) (frame->exceptionVector);
- newPC = registers[PC]; /* pc may have changed */
- if (newPC != frame->exceptionPC)
- {
- if (remote_debug)
- printf ("frame at 0x%x has pc=0x%x, except#=%d\n",
- frame, frame->exceptionPC,
- frame->exceptionVector);
- /* re-use the last frame, we're skipping it (longjump?) */
- frame = (Frame *) 0;
- _returnFromException (frame); /* this is a jump */
- }
- }
- }
-
- /* if we couldn't find a frame, create one */
- if (frame == 0)
- {
- frame = lastFrame - 1;
-
- /* by using a bunch of print commands with breakpoints,
- it's possible for the frame stack to creep down. If it creeps
- too far, give up and reset it to the top. Normal use should
- not see this happen.
- */
- if ((unsigned int) (frame - 2) < (unsigned int) &gdbFrameStack)
- {
- initializeRemcomErrorFrame ();
- frame = lastFrame;
- }
- frame->previous = lastFrame;
- lastFrame = frame;
- frame = 0; /* null so _return... will properly initialize it */
- }
-
- _returnFromException (frame); /* this is a jump */
-
- break;
-
- /* kill the program */
- case 'k': /* do nothing */
- break;
- } /* switch */
-
- /* reply to the request */
- putpacket (remcomOutBuffer);
- }
-}
-
-
-void
-initializeRemcomErrorFrame (void)
-{
- lastFrame = ((Frame *) & gdbFrameStack[FRAMESIZE - 1]) - 1;
- lastFrame->previous = lastFrame;
-}
-
-/* this function is used to set up exception handlers for tracing and
- breakpoints */
-void
-set_debug_traps ()
-{
- extern void _debug_level7 ();
- extern void remcomHandler ();
- int exception;
-
- initializeRemcomErrorFrame ();
- stackPtr = &remcomStack[STACKSIZE / sizeof (int) - 1];
-
- for (exception = 2; exception <= 23; exception++)
- exceptionHandler (exception, _catchException);
-
- /* level 7 interrupt */
- exceptionHandler (31, _debug_level7);
-
- /* breakpoint exception (trap #1) */
- exceptionHandler (33, _catchException);
-
- /* This is a trap #8 instruction. Apparently it is someone's software
- convention for some sort of SIGFPE condition. Whose? How many
- people are being screwed by having this code the way it is?
- Is there a clean solution? */
- exceptionHandler (40, _catchException);
-
- /* 48 to 54 are floating point coprocessor errors */
- for (exception = 48; exception <= 54; exception++)
- exceptionHandler (exception, _catchException);
-
- if (oldExceptionHook != remcomHandler)
- {
- oldExceptionHook = exceptionHook;
- exceptionHook = remcomHandler;
- }
-
- 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. */
-
-void
-breakpoint ()
-{
- if (initialized)
- BREAKPOINT ();
-}
diff --git a/contrib/gdb/gdb/m68k-tdep.c b/contrib/gdb/gdb/m68k-tdep.c
deleted file mode 100644
index 1c4bc4d4d1f5..000000000000
--- a/contrib/gdb/gdb/m68k-tdep.c
+++ /dev/null
@@ -1,685 +0,0 @@
-/* Target dependent code for the Motorola 68000 series.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 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 "symtab.h"
-#include "gdbcore.h"
-#include "value.h"
-#include "gdb_string.h"
-#include "inferior.h"
-#include "regcache.h"
-
-
-#define P_LINKL_FP 0x480e
-#define P_LINKW_FP 0x4e56
-#define P_PEA_FP 0x4856
-#define P_MOVL_SP_FP 0x2c4f
-#define P_MOVL 0x207c
-#define P_JSR 0x4eb9
-#define P_BSR 0x61ff
-#define P_LEAL 0x43fb
-#define P_MOVML 0x48ef
-#define P_FMOVM 0xf237
-#define P_TRAP 0x4e40
-
-/* The only reason this is here is the tm-altos.h reference below. It
- was moved back here from tm-m68k.h. FIXME? */
-
-extern CORE_ADDR
-altos_skip_prologue (CORE_ADDR pc)
-{
- register int op = read_memory_integer (pc, 2);
- if (op == P_LINKW_FP)
- pc += 4; /* Skip link #word */
- else if (op == P_LINKL_FP)
- pc += 6; /* Skip link #long */
- /* Not sure why branches are here. */
- /* From tm-altos.h */
- else if (op == 0060000)
- pc += 4; /* Skip bra #word */
- else if (op == 00600377)
- pc += 6; /* skip bra #long */
- else if ((op & 0177400) == 0060000)
- pc += 2; /* skip bra #char */
- return pc;
-}
-
-int
-delta68_in_sigtramp (CORE_ADDR pc, char *name)
-{
- if (name != NULL)
- return strcmp (name, "_sigcode") == 0;
- else
- return 0;
-}
-
-CORE_ADDR
-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 (frame_info->signal_handler_caller)
- return frame_info->frame + 12;
- else if (frameless_look_for_prologue (frame_info))
- {
- /* Check for an interrupted system call */
- if (frame_info->next && frame_info->next->signal_handler_caller)
- return frame_info->next->frame + 16;
- else
- return frame_info->frame + 4;
- }
- else
- return frame_info->frame;
-}
-
-CORE_ADDR
-delta68_frame_saved_pc (struct frame_info *frame_info)
-{
- return read_memory_integer (delta68_frame_args_address (frame_info) + 4, 4);
-}
-
-/* Return number of args passed to a frame.
- Can return -1, meaning no way to tell. */
-
-int
-isi_frame_num_args (struct frame_info *fi)
-{
- int val;
- CORE_ADDR pc = FRAME_SAVED_PC (fi);
- int insn = 0177777 & read_memory_integer (pc, 2);
- val = 0;
- if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */
- val = read_memory_integer (pc + 2, 2);
- else if ((insn & 0170777) == 0050217 /* addql #N, sp */
- || (insn & 0170777) == 0050117) /* addqw */
- {
- val = (insn >> 9) & 7;
- if (val == 0)
- val = 8;
- }
- else if (insn == 0157774) /* addal #WW, sp */
- val = read_memory_integer (pc + 2, 4);
- val >>= 2;
- return val;
-}
-
-int
-delta68_frame_num_args (struct frame_info *fi)
-{
- int val;
- CORE_ADDR pc = FRAME_SAVED_PC (fi);
- int insn = 0177777 & read_memory_integer (pc, 2);
- val = 0;
- if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */
- val = read_memory_integer (pc + 2, 2);
- else if ((insn & 0170777) == 0050217 /* addql #N, sp */
- || (insn & 0170777) == 0050117) /* addqw */
- {
- val = (insn >> 9) & 7;
- if (val == 0)
- val = 8;
- }
- else if (insn == 0157774) /* addal #WW, sp */
- val = read_memory_integer (pc + 2, 4);
- val >>= 2;
- return val;
-}
-
-int
-news_frame_num_args (struct frame_info *fi)
-{
- int val;
- CORE_ADDR pc = FRAME_SAVED_PC (fi);
- int insn = 0177777 & read_memory_integer (pc, 2);
- val = 0;
- if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */
- val = read_memory_integer (pc + 2, 2);
- else if ((insn & 0170777) == 0050217 /* addql #N, sp */
- || (insn & 0170777) == 0050117) /* addqw */
- {
- val = (insn >> 9) & 7;
- if (val == 0)
- val = 8;
- }
- else if (insn == 0157774) /* addal #WW, sp */
- val = read_memory_integer (pc + 2, 4);
- val >>= 2;
- return val;
-}
-
-/* Push an empty stack frame, to record the current PC, etc. */
-
-void
-m68k_push_dummy_frame (void)
-{
- register CORE_ADDR sp = read_register (SP_REGNUM);
- register int regnum;
- char raw_buffer[12];
-
- sp = push_word (sp, read_register (PC_REGNUM));
- sp = push_word (sp, read_register (FP_REGNUM));
- write_register (FP_REGNUM, sp);
-
- /* Always save the floating-point registers, whether they exist on
- this target or not. */
- for (regnum = FP0_REGNUM + 7; regnum >= FP0_REGNUM; regnum--)
- {
- read_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 12);
- sp = push_bytes (sp, raw_buffer, 12);
- }
-
- for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--)
- {
- sp = push_word (sp, read_register (regnum));
- }
- sp = push_word (sp, read_register (PS_REGNUM));
- write_register (SP_REGNUM, sp);
-}
-
-/* Discard from the stack the innermost frame,
- restoring all saved registers. */
-
-void
-m68k_pop_frame (void)
-{
- register struct frame_info *frame = get_current_frame ();
- register CORE_ADDR fp;
- register int regnum;
- struct frame_saved_regs fsr;
- char raw_buffer[12];
-
- fp = FRAME_FP (frame);
- get_frame_saved_regs (frame, &fsr);
- for (regnum = FP0_REGNUM + 7; regnum >= FP0_REGNUM; regnum--)
- {
- if (fsr.regs[regnum])
- {
- read_memory (fsr.regs[regnum], raw_buffer, 12);
- write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 12);
- }
- }
- for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--)
- {
- if (fsr.regs[regnum])
- {
- write_register (regnum, read_memory_integer (fsr.regs[regnum], 4));
- }
- }
- if (fsr.regs[PS_REGNUM])
- {
- write_register (PS_REGNUM, read_memory_integer (fsr.regs[PS_REGNUM], 4));
- }
- write_register (FP_REGNUM, read_memory_integer (fp, 4));
- write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
- write_register (SP_REGNUM, fp + 8);
- flush_cached_frames ();
-}
-
-
-/* Given an ip value corresponding to the start of a function,
- return the ip of the first instruction after the function
- prologue. This is the generic m68k support. Machines which
- require something different can override the SKIP_PROLOGUE
- macro to point elsewhere.
-
- Some instructions which typically may appear in a function
- prologue include:
-
- A link instruction, word form:
-
- link.w %a6,&0 4e56 XXXX
-
- A link instruction, long form:
-
- link.l %fp,&F%1 480e XXXX XXXX
-
- A movm instruction to preserve integer regs:
-
- movm.l &M%1,(4,%sp) 48ef XXXX XXXX
-
- A fmovm instruction to preserve float regs:
-
- fmovm &FPM%1,(FPO%1,%sp) f237 XXXX XXXX XXXX XXXX
-
- Some profiling setup code (FIXME, not recognized yet):
-
- lea.l (.L3,%pc),%a1 43fb XXXX XXXX XXXX
- bsr _mcount 61ff XXXX XXXX
-
- */
-
-CORE_ADDR
-m68k_skip_prologue (CORE_ADDR ip)
-{
- register CORE_ADDR limit;
- struct symtab_and_line sal;
- register int op;
-
- /* Find out if there is a known limit for the extent of the prologue.
- If so, ensure we don't go past it. If not, assume "infinity". */
-
- sal = find_pc_line (ip, 0);
- limit = (sal.end) ? sal.end : (CORE_ADDR) ~ 0;
-
- while (ip < limit)
- {
- op = read_memory_integer (ip, 2);
- op &= 0xFFFF;
-
- if (op == P_LINKW_FP)
- ip += 4; /* Skip link.w */
- else if (op == P_PEA_FP)
- ip += 2; /* Skip pea %fp */
- else if (op == P_MOVL_SP_FP)
- ip += 2; /* Skip move.l %sp, %fp */
- else if (op == P_LINKL_FP)
- ip += 6; /* Skip link.l */
- else if (op == P_MOVML)
- ip += 6; /* Skip movm.l */
- else if (op == P_FMOVM)
- ip += 10; /* Skip fmovm */
- else
- break; /* Found unknown code, bail out. */
- }
- return (ip);
-}
-
-void
-m68k_find_saved_regs (struct frame_info *frame_info,
- struct frame_saved_regs *saved_regs)
-{
- register int regnum;
- register int regmask;
- register CORE_ADDR next_addr;
- register CORE_ADDR pc;
-
- /* First possible address for a pc in a call dummy for this frame. */
- CORE_ADDR possible_call_dummy_start =
- (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 4 - 8 * 12;
-
- int nextinsn;
- memset (saved_regs, 0, sizeof (*saved_regs));
- if ((frame_info)->pc >= possible_call_dummy_start
- && (frame_info)->pc <= (frame_info)->frame)
- {
-
- /* It is a call dummy. We could just stop now, since we know
- what the call dummy saves and where. But this code proceeds
- to parse the "prologue" which is part of the call dummy.
- This is needlessly complex and confusing. FIXME. */
-
- next_addr = (frame_info)->frame;
- pc = possible_call_dummy_start;
- }
- else
- {
- pc = get_pc_function_start ((frame_info)->pc);
-
- nextinsn = read_memory_integer (pc, 2);
- if (P_PEA_FP == nextinsn
- && P_MOVL_SP_FP == read_memory_integer (pc + 2, 2))
- {
- /* pea %fp
- move.l %sp, %fp */
- next_addr = frame_info->frame;
- pc += 4;
- }
- else if (P_LINKL_FP == nextinsn)
- /* link.l %fp */
- /* 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);
- pc += 6;
- }
- else if (P_LINKW_FP == nextinsn)
- /* link.w %fp */
- /* 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);
- pc += 4;
- }
- else
- goto lose;
-
- /* If have an addal #-n, sp next, adjust next_addr. */
- if ((0177777 & read_memory_integer (pc, 2)) == 0157774)
- next_addr += read_memory_integer (pc += 2, 4), pc += 4;
- }
-
- for ( ; ; )
- {
- nextinsn = 0xffff & read_memory_integer (pc, 2);
- regmask = read_memory_integer (pc + 2, 2);
- /* fmovemx to -(sp) */
- if (0xf227 == nextinsn && (regmask & 0xff00) == 0xe000)
- {
- /* Regmask's low bit is for register fp7, the first pushed */
- for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
- if (regmask & 1)
- saved_regs->regs[regnum] = (next_addr -= 12);
- pc += 4;
- }
- /* fmovemx to (fp + displacement) */
- else if (0171056 == nextinsn && (regmask & 0xff00) == 0xf000)
- {
- register CORE_ADDR addr;
-
- addr = (frame_info)->frame + 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)
- {
- saved_regs->regs[regnum] = addr;
- addr += 12;
- }
- pc += 6;
- }
- /* moveml to (sp) */
- else if (0044327 == nextinsn)
- {
- /* Regmask's low bit is for register 0, the first written */
- for (regnum = 0; regnum < 16; regnum++, regmask >>= 1)
- if (regmask & 1)
- {
- saved_regs->regs[regnum] = next_addr;
- next_addr += 4;
- }
- pc += 4;
- }
- /* moveml to (fp + displacement) */
- else if (0044356 == nextinsn)
- {
- register CORE_ADDR addr;
-
- addr = (frame_info)->frame + 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)
- {
- saved_regs->regs[regnum] = addr;
- addr += 4;
- }
- pc += 6;
- }
- /* moveml to -(sp) */
- else if (0044347 == nextinsn)
- {
- /* Regmask's low bit is for register 15, the first pushed */
- for (regnum = 16; --regnum >= 0; regmask >>= 1)
- if (regmask & 1)
- saved_regs->regs[regnum] = (next_addr -= 4);
- pc += 4;
- }
- /* movl r,-(sp) */
- else if (0x2f00 == (0xfff0 & nextinsn))
- {
- regnum = 0xf & nextinsn;
- saved_regs->regs[regnum] = (next_addr -= 4);
- pc += 2;
- }
- /* fmovemx to index of sp */
- else if (0xf236 == nextinsn && (regmask & 0xff00) == 0xf000)
- {
- /* Regmask's low bit is for register fp0, the first written */
- for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
- if (regmask & 1)
- {
- saved_regs->regs[regnum] = next_addr;
- next_addr += 12;
- }
- pc += 10;
- }
- /* clrw -(sp); movw ccr,-(sp) */
- else if (0x4267 == nextinsn && 0x42e7 == regmask)
- {
- saved_regs->regs[PS_REGNUM] = (next_addr -= 4);
- pc += 4;
- }
- else
- break;
- }
-lose:;
- saved_regs->regs[SP_REGNUM] = (frame_info)->frame + 8;
- saved_regs->regs[FP_REGNUM] = (frame_info)->frame;
- saved_regs->regs[PC_REGNUM] = (frame_info)->frame + 4;
-#ifdef SIG_SP_FP_OFFSET
- /* Adjust saved SP_REGNUM for fake _sigtramp frames. */
- if (frame_info->signal_handler_caller && frame_info->next)
- saved_regs->regs[SP_REGNUM] = frame_info->next->frame + SIG_SP_FP_OFFSET;
-#endif
-}
-
-
-#ifdef USE_PROC_FS /* Target dependent support for /proc */
-
-#include <sys/procfs.h>
-
-/* Prototypes for supply_gregset etc. */
-#include "gregset.h"
-
-/* The /proc interface divides the target machine's register set up into
- two different sets, the general register set (gregset) and the floating
- point register set (fpregset). For each set, there is an ioctl to get
- the current register set and another ioctl to set the current values.
-
- The actual structure passed through the ioctl interface is, of course,
- naturally machine dependent, and is different for each set of registers.
- For the m68k for example, the general register set is typically defined
- by:
-
- typedef int gregset_t[18];
-
- #define R_D0 0
- ...
- #define R_PS 17
-
- and the floating point set by:
-
- typedef struct fpregset {
- int f_pcr;
- int f_psr;
- int f_fpiaddr;
- int f_fpregs[8][3]; (8 regs, 96 bits each)
- } fpregset_t;
-
- These routines provide the packing and unpacking of gregset_t and
- fpregset_t formatted data.
-
- */
-
-/* Atari SVR4 has R_SR but not R_PS */
-
-#if !defined (R_PS) && defined (R_SR)
-#define R_PS R_SR
-#endif
-
-/* 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)
-{
- register int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi < R_PC; regi++)
- {
- supply_register (regi, (char *) (regp + regi));
- }
- supply_register (PS_REGNUM, (char *) (regp + R_PS));
- supply_register (PC_REGNUM, (char *) (regp + R_PC));
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
- register int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi < R_PC; regi++)
- {
- if ((regno == -1) || (regno == regi))
- {
- *(regp + regi) = *(int *) &registers[REGISTER_BYTE (regi)];
- }
- }
- if ((regno == -1) || (regno == PS_REGNUM))
- {
- *(regp + R_PS) = *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
- }
- if ((regno == -1) || (regno == PC_REGNUM))
- {
- *(regp + R_PC) = *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
- }
-}
-
-#if defined (FP0_REGNUM)
-
-/* 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)
-{
- register int regi;
- char *from;
-
- for (regi = FP0_REGNUM; regi < FPC_REGNUM; regi++)
- {
- from = (char *) &(fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
- supply_register (regi, from);
- }
- supply_register (FPC_REGNUM, (char *) &(fpregsetp->f_pcr));
- supply_register (FPS_REGNUM, (char *) &(fpregsetp->f_psr));
- supply_register (FPI_REGNUM, (char *) &(fpregsetp->f_fpiaddr));
-}
-
-/* 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;
-
- for (regi = FP0_REGNUM; regi < FPC_REGNUM; regi++)
- {
- if ((regno == -1) || (regno == regi))
- {
- from = (char *) &registers[REGISTER_BYTE (regi)];
- to = (char *) &(fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
- memcpy (to, from, REGISTER_RAW_SIZE (regi));
- }
- }
- if ((regno == -1) || (regno == FPC_REGNUM))
- {
- fpregsetp->f_pcr = *(int *) &registers[REGISTER_BYTE (FPC_REGNUM)];
- }
- if ((regno == -1) || (regno == FPS_REGNUM))
- {
- fpregsetp->f_psr = *(int *) &registers[REGISTER_BYTE (FPS_REGNUM)];
- }
- if ((regno == -1) || (regno == FPI_REGNUM))
- {
- fpregsetp->f_fpiaddr = *(int *) &registers[REGISTER_BYTE (FPI_REGNUM)];
- }
-}
-
-#endif /* defined (FP0_REGNUM) */
-
-#endif /* USE_PROC_FS */
-
-/* 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 PC.
- This routine returns true on success. */
-
-/* NOTE: cagney/2000-11-08: For this function to be fully multi-arched
- the macro's JB_PC and JB_ELEMENT_SIZE would need to be moved into
- the ``struct gdbarch_tdep'' object and then set on a target ISA/ABI
- dependant basis. */
-
-int
-m68k_get_longjmp_target (CORE_ADDR *pc)
-{
-#if defined (JB_PC) && defined (JB_ELEMENT_SIZE)
- char *buf;
- CORE_ADDR sp, jb_addr;
-
- buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
- sp = read_register (SP_REGNUM);
-
- if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack */
- buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
- return 0;
-
- jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
- if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
- return 0;
-
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
- return 1;
-#else
- internal_error (__FILE__, __LINE__,
- "m68k_get_longjmp_target: not implemented");
- return 0;
-#endif
-}
-
-/* Immediately after a function call, return the saved pc before the frame
- is setup. For sun3's, we check for the common case of being inside of a
- system call, and if so, we know that Sun pushes the call # on the stack
- prior to doing the trap. */
-
-CORE_ADDR
-m68k_saved_pc_after_call (struct frame_info *frame)
-{
-#ifdef SYSCALL_TRAP
- int op;
-
- op = read_memory_integer (frame->pc - SYSCALL_TRAP_OFFSET, 2);
-
- if (op == SYSCALL_TRAP)
- return read_memory_integer (read_register (SP_REGNUM) + 4, 4);
- else
-#endif /* SYSCALL_TRAP */
- return read_memory_integer (read_register (SP_REGNUM), 4);
-}
-
-
-void
-_initialize_m68k_tdep (void)
-{
- tm_print_insn = print_insn_m68k;
-}
diff --git a/contrib/gdb/gdb/m68klinux-nat.c b/contrib/gdb/gdb/m68klinux-nat.c
deleted file mode 100644
index 82a6124a7aab..000000000000
--- a/contrib/gdb/gdb/m68klinux-nat.c
+++ /dev/null
@@ -1,710 +0,0 @@
-/* Motorola m68k native support for GNU/Linux.
-
- Copyright 1996, 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. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "language.h"
-#include "gdbcore.h"
-#include "regcache.h"
-
-#ifdef USG
-#include <sys/types.h>
-#endif
-
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include <sys/ptrace.h>
-#include <sys/user.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <sys/procfs.h>
-
-#ifdef HAVE_SYS_REG_H
-#include <sys/reg.h>
-#endif
-
-#include <sys/file.h>
-#include "gdb_stat.h"
-
-#include "floatformat.h"
-
-#include "target.h"
-
-
-/* This table must line up with REGISTER_NAMES in tm-m68k.h */
-static const int regmap[] =
-{
- PT_D0, PT_D1, PT_D2, PT_D3, PT_D4, PT_D5, PT_D6, PT_D7,
- PT_A0, PT_A1, PT_A2, PT_A3, PT_A4, PT_A5, PT_A6, PT_USP,
- PT_SR, PT_PC,
- /* PT_FP0, ..., PT_FP7 */
- 21, 24, 27, 30, 33, 36, 39, 42,
- /* PT_FPCR, PT_FPSR, PT_FPIAR */
- 45, 46, 47
-};
-
-/* Which ptrace request retrieves which registers?
- These apply to the corresponding SET requests as well. */
-#define NUM_GREGS (18)
-#define MAX_NUM_REGS (NUM_GREGS + 11)
-
-int
-getregs_supplies (int regno)
-{
- return 0 <= regno && regno < NUM_GREGS;
-}
-
-int
-getfpregs_supplies (int regno)
-{
- return FP0_REGNUM <= regno && regno <= FPI_REGNUM;
-}
-
-/* Does the current host support the GETREGS request? */
-int have_ptrace_getregs =
-#ifdef HAVE_PTRACE_GETREGS
- 1
-#else
- 0
-#endif
-;
-
-
-
-/* BLOCKEND is the value of u.u_ar0, and points to the place where GS
- is stored. */
-
-int
-m68k_linux_register_u_addr (int blockend, int regnum)
-{
- return (blockend + 4 * regmap[regnum]);
-}
-
-
-/* Fetching registers directly from the U area, one at a time. */
-
-/* FIXME: This duplicates code from `inptrace.c'. The problem is that we
- define FETCH_INFERIOR_REGISTERS since we want to use our own versions
- of {fetch,store}_inferior_registers that use the GETREGS request. This
- means that the code in `infptrace.c' is #ifdef'd out. But we need to
- fall back on that code when GDB is running on top of a kernel that
- doesn't support the GETREGS request. */
-
-#ifndef PT_READ_U
-#define PT_READ_U PTRACE_PEEKUSR
-#endif
-#ifndef PT_WRITE_U
-#define PT_WRITE_U PTRACE_POKEUSR
-#endif
-
-/* Default the type of the ptrace transfer to int. */
-#ifndef PTRACE_XFER_TYPE
-#define PTRACE_XFER_TYPE int
-#endif
-
-/* Fetch one register. */
-
-static void
-fetch_register (int regno)
-{
- /* This isn't really an address. But ptrace thinks of it as one. */
- CORE_ADDR regaddr;
- char mess[128]; /* For messages */
- register int i;
- unsigned int offset; /* Offset of registers within the u area. */
- char buf[MAX_REGISTER_RAW_SIZE];
- int tid;
-
- if (CANNOT_FETCH_REGISTER (regno))
- {
- memset (buf, '\0', REGISTER_RAW_SIZE (regno)); /* Supply zeroes */
- supply_register (regno, buf);
- return;
- }
-
- /* Overload thread id onto process id */
- if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* no thread id, just use process id */
-
- offset = U_REGS_OFFSET;
-
- regaddr = register_addr (regno, offset);
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
- {
- errno = 0;
- *(PTRACE_XFER_TYPE *) & buf[i] = ptrace (PT_READ_U, tid,
- (PTRACE_ARG3_TYPE) regaddr, 0);
- regaddr += sizeof (PTRACE_XFER_TYPE);
- if (errno != 0)
- {
- sprintf (mess, "reading register %s (#%d)",
- REGISTER_NAME (regno), regno);
- perror_with_name (mess);
- }
- }
- supply_register (regno, buf);
-}
-
-/* Fetch register values from the inferior.
- If REGNO is negative, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-old_fetch_inferior_registers (int regno)
-{
- if (regno >= 0)
- {
- fetch_register (regno);
- }
- else
- {
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- fetch_register (regno);
- }
- }
-}
-
-/* Store one register. */
-
-static void
-store_register (int regno)
-{
- /* This isn't really an address. But ptrace thinks of it as one. */
- CORE_ADDR regaddr;
- char mess[128]; /* For messages */
- register int i;
- unsigned int offset; /* Offset of registers within the u area. */
- int tid;
- char *buf = alloca (MAX_REGISTER_RAW_SIZE);
-
- if (CANNOT_STORE_REGISTER (regno))
- {
- return;
- }
-
- /* Overload thread id onto process id */
- if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* no thread id, just use process id */
-
- offset = U_REGS_OFFSET;
-
- regaddr = register_addr (regno, offset);
-
- /* Put the contents of regno into a local buffer */
- regcache_collect (regno, buf);
-
- /* Store the local buffer into the inferior a chunk at the time. */
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
- {
- errno = 0;
- ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) regaddr,
- *(PTRACE_XFER_TYPE *) (buf + i));
- regaddr += sizeof (PTRACE_XFER_TYPE);
- if (errno != 0)
- {
- sprintf (mess, "writing register %s (#%d)",
- REGISTER_NAME (regno), regno);
- perror_with_name (mess);
- }
- }
-}
-
-/* Store our register values back into the inferior.
- If REGNO is negative, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-old_store_inferior_registers (int regno)
-{
- if (regno >= 0)
- {
- store_register (regno);
- }
- else
- {
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- store_register (regno);
- }
- }
-}
-
-/* Given a pointer to a general register set in /proc format
- (elf_gregset_t *), unpack the register contents and supply
- them as gdb's idea of the current register values. */
-
-
-/* Note both m68k-tdep.c and m68klinux-nat.c contain definitions
- for supply_gregset and supply_fpregset. The definitions
- in m68k-tdep.c are valid if USE_PROC_FS is defined. Otherwise,
- the definitions in m68klinux-nat.c will be used. This is a
- bit of a hack. The supply_* routines do not belong in
- *_tdep.c files. But, there are several lynx ports that currently
- depend on these definitions. */
-
-#ifndef USE_PROC_FS
-
-/* Prototypes for supply_gregset etc. */
-#include "gregset.h"
-
-void
-supply_gregset (elf_gregset_t *gregsetp)
-{
- elf_greg_t *regp = (elf_greg_t *) gregsetp;
- int regi;
-
- for (regi = D0_REGNUM; regi <= SP_REGNUM; regi++)
- supply_register (regi, (char *) &regp[regmap[regi]]);
- supply_register (PS_REGNUM, (char *) &regp[PT_SR]);
- supply_register (PC_REGNUM, (char *) &regp[PT_PC]);
-}
-
-/* Fill register REGNO (if it is a general-purpose register) in
- *GREGSETPS with the value in GDB's register array. If REGNO is -1,
- do this for all registers. */
-void
-fill_gregset (elf_gregset_t *gregsetp, int regno)
-{
- elf_greg_t *regp = (elf_greg_t *) gregsetp;
- int i;
-
- for (i = 0; i < NUM_GREGS; i++)
- if ((regno == -1 || regno == i))
- regcache_collect (i, regp + regmap[i]);
-}
-
-#ifdef HAVE_PTRACE_GETREGS
-
-/* Fetch all general-purpose registers from process/thread TID and
- store their values in GDB's register array. */
-
-static void
-fetch_regs (int tid)
-{
- elf_gregset_t regs;
-
- if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)
- {
- if (errno == EIO)
- {
- /* The kernel we're running on doesn't support the GETREGS
- request. Reset `have_ptrace_getregs'. */
- have_ptrace_getregs = 0;
- return;
- }
-
- perror_with_name ("Couldn't get registers");
- }
-
- supply_gregset (&regs);
-}
-
-/* Store all valid general-purpose registers in GDB's register array
- into the process/thread specified by TID. */
-
-static void
-store_regs (int tid, int regno)
-{
- elf_gregset_t regs;
-
- if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)
- perror_with_name ("Couldn't get registers");
-
- fill_gregset (&regs, regno);
-
- if (ptrace (PTRACE_SETREGS, tid, 0, (int) &regs) < 0)
- perror_with_name ("Couldn't write registers");
-}
-
-#else
-
-static void fetch_regs (int tid) {}
-static void store_regs (int tid, int regno) {}
-
-#endif
-
-
-/* Transfering floating-point registers between GDB, inferiors and cores. */
-
-/* What is the address of fpN within the floating-point register set F? */
-#define FPREG_ADDR(f, n) ((char *) &(f)->fpregs[(n) * 3])
-
-/* Fill GDB's register array with the floating-point register values in
- *FPREGSETP. */
-
-void
-supply_fpregset (elf_fpregset_t *fpregsetp)
-{
- int regi;
-
- for (regi = FP0_REGNUM; regi < FPC_REGNUM; regi++)
- supply_register (regi, FPREG_ADDR (fpregsetp, regi - FP0_REGNUM));
- supply_register (FPC_REGNUM, (char *) &fpregsetp->fpcntl[0]);
- supply_register (FPS_REGNUM, (char *) &fpregsetp->fpcntl[1]);
- supply_register (FPI_REGNUM, (char *) &fpregsetp->fpcntl[2]);
-}
-
-/* Fill register REGNO (if it is a floating-point register) in
- *FPREGSETP with the value in GDB's register array. If REGNO is -1,
- do this for all registers. */
-
-void
-fill_fpregset (elf_fpregset_t *fpregsetp, int regno)
-{
- int i;
-
- /* Fill in the floating-point registers. */
- for (i = FP0_REGNUM; i < FP0_REGNUM + 8; i++)
- if (regno == -1 || regno == i)
- regcache_collect (regno, FPREG_ADDR (fpregsetp, regno - FP0_REGNUM));
-
- /* Fill in the floating-point control registers. */
- for (i = FPC_REGNUM; i <= FPI_REGNUM; i++)
- if (regno == -1 || regno == i)
- regcache_collect (regno, (char *) &fpregsetp->fpcntl[regno - FPC_REGNUM]);
-}
-
-#ifdef HAVE_PTRACE_GETREGS
-
-/* Fetch all floating-point registers from process/thread TID and store
- thier values in GDB's register array. */
-
-static void
-fetch_fpregs (int tid)
-{
- elf_fpregset_t fpregs;
-
- if (ptrace (PTRACE_GETFPREGS, tid, 0, (int) &fpregs) < 0)
- perror_with_name ("Couldn't get floating point status");
-
- supply_fpregset (&fpregs);
-}
-
-/* Store all valid floating-point registers in GDB's register array
- into the process/thread specified by TID. */
-
-static void
-store_fpregs (int tid, int regno)
-{
- elf_fpregset_t fpregs;
-
- if (ptrace (PTRACE_GETFPREGS, tid, 0, (int) &fpregs) < 0)
- perror_with_name ("Couldn't get floating point status");
-
- fill_fpregset (&fpregs, regno);
-
- if (ptrace (PTRACE_SETFPREGS, tid, 0, (int) &fpregs) < 0)
- perror_with_name ("Couldn't write floating point status");
-}
-
-#else
-
-static void fetch_fpregs (int tid) {}
-static void store_fpregs (int tid, int regno) {}
-
-#endif
-
-#endif
-
-/* Transferring arbitrary registers between GDB and inferior. */
-
-/* Fetch register REGNO from the child process. If REGNO is -1, do
- this for all registers (including the floating point and SSE
- registers). */
-
-void
-fetch_inferior_registers (int regno)
-{
- int tid;
-
- /* Use the old method of peeking around in `struct user' if the
- GETREGS request isn't available. */
- if (! have_ptrace_getregs)
- {
- old_fetch_inferior_registers (regno);
- return;
- }
-
- /* GNU/Linux LWP ID's are process ID's. */
- if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* Not a threaded program. */
-
- /* Use the PTRACE_GETFPXREGS request whenever possible, since it
- transfers more registers in one system call, and we'll cache the
- results. But remember that fetch_fpxregs can fail, and return
- zero. */
- if (regno == -1)
- {
- fetch_regs (tid);
-
- /* The call above might reset `have_ptrace_getregs'. */
- if (! have_ptrace_getregs)
- {
- old_fetch_inferior_registers (-1);
- return;
- }
-
- fetch_fpregs (tid);
- return;
- }
-
- if (getregs_supplies (regno))
- {
- fetch_regs (tid);
- return;
- }
-
- if (getfpregs_supplies (regno))
- {
- fetch_fpregs (tid);
- return;
- }
-
- internal_error (__FILE__, __LINE__,
- "Got request for bad register number %d.", regno);
-}
-
-/* Store register REGNO back into the child process. If REGNO is -1,
- do this for all registers (including the floating point and SSE
- registers). */
-void
-store_inferior_registers (int regno)
-{
- int tid;
-
- /* Use the old method of poking around in `struct user' if the
- SETREGS request isn't available. */
- if (! have_ptrace_getregs)
- {
- old_store_inferior_registers (regno);
- return;
- }
-
- /* GNU/Linux LWP ID's are process ID's. */
- if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* Not a threaded program. */
-
- /* Use the PTRACE_SETFPREGS requests whenever possible, since it
- transfers more registers in one system call. But remember that
- store_fpregs can fail, and return zero. */
- if (regno == -1)
- {
- store_regs (tid, regno);
- store_fpregs (tid, regno);
- return;
- }
-
- if (getregs_supplies (regno))
- {
- store_regs (tid, regno);
- return;
- }
-
- if (getfpregs_supplies (regno))
- {
- store_fpregs (tid, regno);
- return;
- }
-
- internal_error (__FILE__, __LINE__,
- "Got request to store bad register number %d.", regno);
-}
-
-/* Interpreting register set info found in core files. */
-
-/* Provide registers to GDB from a core file.
-
- (We can't use the generic version of this function in
- core-regset.c, because we need to use elf_gregset_t instead of
- gregset_t.)
-
- CORE_REG_SECT points to an array of bytes, which are the contents
- of a `note' from a core file which BFD thinks might contain
- register contents. CORE_REG_SIZE is its size.
-
- WHICH says which register set corelow suspects this is:
- 0 --- the general-purpose register set, in elf_gregset_t format
- 2 --- the floating-point register set, in elf_fpregset_t format
-
- REG_ADDR isn't used on GNU/Linux. */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
- int which, CORE_ADDR reg_addr)
-{
- elf_gregset_t gregset;
- elf_fpregset_t fpregset;
-
- switch (which)
- {
- case 0:
- if (core_reg_size != sizeof (gregset))
- warning ("Wrong size gregset in core file.");
- else
- {
- memcpy (&gregset, core_reg_sect, sizeof (gregset));
- supply_gregset (&gregset);
- }
- break;
-
- case 2:
- if (core_reg_size != sizeof (fpregset))
- warning ("Wrong size fpregset in core file.");
- else
- {
- memcpy (&fpregset, core_reg_sect, sizeof (fpregset));
- supply_fpregset (&fpregset);
- }
- break;
-
- default:
- /* We've covered all the kinds of registers we know about here,
- so this must be something we wouldn't know what to do with
- anyway. Just ignore it. */
- break;
- }
-}
-
-
-int
-kernel_u_size (void)
-{
- return (sizeof (struct user));
-}
-
-/* Check whether insn1 and insn2 are parts of a signal trampoline. */
-
-#define IS_SIGTRAMP(insn1, insn2) \
- (/* addaw #20,sp; moveq #119,d0; trap #0 */ \
- (insn1 == 0xdefc0014 && insn2 == 0x70774e40) \
- /* moveq #119,d0; trap #0 */ \
- || insn1 == 0x70774e40)
-
-#define IS_RT_SIGTRAMP(insn1, insn2) \
- (/* movel #173,d0; trap #0 */ \
- (insn1 == 0x203c0000 && insn2 == 0x00ad4e40) \
- /* moveq #82,d0; notb d0; trap #0 */ \
- || (insn1 == 0x70524600 && (insn2 >> 16) == 0x4e40))
-
-/* Return non-zero if PC points into the signal trampoline. For the sake
- of m68k_linux_frame_saved_pc we also distinguish between non-RT and RT
- signal trampolines. */
-
-int
-m68k_linux_in_sigtramp (CORE_ADDR pc)
-{
- CORE_ADDR sp;
- char buf[12];
- unsigned long insn0, insn1, insn2;
-
- if (read_memory_nobpt (pc - 4, buf, sizeof (buf)))
- return 0;
- insn1 = extract_unsigned_integer (buf + 4, 4);
- insn2 = extract_unsigned_integer (buf + 8, 4);
- if (IS_SIGTRAMP (insn1, insn2))
- return 1;
- if (IS_RT_SIGTRAMP (insn1, insn2))
- return 2;
-
- insn0 = extract_unsigned_integer (buf, 4);
- if (IS_SIGTRAMP (insn0, insn1))
- return 1;
- if (IS_RT_SIGTRAMP (insn0, insn1))
- return 2;
-
- insn0 = (insn0 << 16) | (insn1 >> 16);
- insn1 = (insn1 << 16) | (insn2 >> 16);
- if (IS_SIGTRAMP (insn0, insn1))
- return 1;
- if (IS_RT_SIGTRAMP (insn0, insn1))
- return 2;
-
- return 0;
-}
-
-/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>. */
-#define SIGCONTEXT_PC_OFFSET 26
-
-/* Offset to saved PC in ucontext, from <asm/ucontext.h>. */
-#define UCONTEXT_PC_OFFSET 88
-
-/* Get saved user PC for sigtramp from sigcontext or ucontext. */
-
-static CORE_ADDR
-m68k_linux_sigtramp_saved_pc (struct frame_info *frame)
-{
- CORE_ADDR sigcontext_addr;
- char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
- int ptrbytes = TARGET_PTR_BIT / TARGET_CHAR_BIT;
- int sigcontext_offs = (2 * TARGET_INT_BIT) / TARGET_CHAR_BIT;
-
- /* Get sigcontext address, it is the third parameter on the stack. */
- if (frame->next)
- sigcontext_addr = read_memory_integer (FRAME_ARGS_ADDRESS (frame->next)
- + FRAME_ARGS_SKIP
- + sigcontext_offs,
- ptrbytes);
- else
- sigcontext_addr = read_memory_integer (read_register (SP_REGNUM)
- + sigcontext_offs,
- ptrbytes);
-
- /* Don't cause a memory_error when accessing sigcontext in case the
- stack layout has changed or the stack is corrupt. */
- if (m68k_linux_in_sigtramp (frame->pc) == 2)
- target_read_memory (sigcontext_addr + UCONTEXT_PC_OFFSET, buf, ptrbytes);
- else
- target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET, buf, ptrbytes);
- return extract_unsigned_integer (buf, ptrbytes);
-}
-
-/* Return the saved program counter for FRAME. */
-
-CORE_ADDR
-m68k_linux_frame_saved_pc (struct frame_info *frame)
-{
- if (frame->signal_handler_caller)
- return m68k_linux_sigtramp_saved_pc (frame);
-
- return read_memory_integer (frame->frame + 4, 4);
-}
-
-/* Register that we are able to handle GNU/Linux ELF core file
- formats. */
-
-static struct core_fns linux_elf_core_fns =
-{
- bfd_target_elf_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
-void
-_initialize_m68k_linux_nat ()
-{
- add_core_fns (&linux_elf_core_fns);
-}
diff --git a/contrib/gdb/gdb/m68knbsd-nat.c b/contrib/gdb/gdb/m68knbsd-nat.c
deleted file mode 100644
index ec986eeb3640..000000000000
--- a/contrib/gdb/gdb/m68knbsd-nat.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Native-dependent code for Motorola m68k's running NetBSD, for GDB.
- Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-#include <machine/frame.h>
-#include "inferior.h"
-#include "gdbcore.h"
-#include "regcache.h"
-
-void
-fetch_inferior_registers (int regno)
-{
- struct reg inferior_registers;
- struct fpreg inferior_fp_registers;
-
- ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
- memcpy (&registers[REGISTER_BYTE (0)], &inferior_registers,
- sizeof (inferior_registers));
-
- ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
- sizeof (inferior_fp_registers));
-
- registers_fetched ();
-}
-
-void
-store_inferior_registers (int regno)
-{
- struct reg inferior_registers;
- struct fpreg inferior_fp_registers;
-
- memcpy (&inferior_registers, &registers[REGISTER_BYTE (0)],
- sizeof (inferior_registers));
- ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
-
- memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
- sizeof (inferior_fp_registers));
- ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
-}
-
-struct md_core
-{
- struct reg intreg;
- struct fpreg freg;
-};
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
- CORE_ADDR ignore)
-{
- struct md_core *core_reg = (struct md_core *) core_reg_sect;
-
- /* Integer registers */
- memcpy (&registers[REGISTER_BYTE (0)],
- &core_reg->intreg, sizeof (struct reg));
- /* Floating point registers */
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)],
- &core_reg->freg, sizeof (struct fpreg));
-}
-
-/* Register that we are able to handle m68knbsd core file formats.
- FIXME: is this really bfd_target_unknown_flavour? */
-
-static struct core_fns m68knbsd_core_fns =
-{
- bfd_target_unknown_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
-void
-_initialize_m68knbsd_nat (void)
-{
- add_core_fns (&m68knbsd_core_fns);
-}
diff --git a/contrib/gdb/gdb/m88k-nat.c b/contrib/gdb/gdb/m88k-nat.c
deleted file mode 100644
index b631cda2735b..000000000000
--- a/contrib/gdb/gdb/m88k-nat.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/* Native-dependent Motorola 88xxx support for GDB, the GNU Debugger.
- Copyright 1988, 1990, 1991, 1992, 1993, 1995, 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"
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include "gdbcore.h"
-#include <sys/user.h>
-
-#ifndef USER /* added to support BCS ptrace_user */
-#define USER ptrace_user
-#endif
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <sys/file.h>
-#include "gdb_stat.h"
-
-#include "symtab.h"
-#include "setjmp.h"
-#include "value.h"
-
-#ifdef DELTA88
-#include <sys/ptrace.h>
-
-/* define offsets to the pc instruction offsets in ptrace_user struct */
-#define SXIP_OFFSET ((char *)&u.pt_sigframe.sig_sxip - (char *)&u)
-#define SNIP_OFFSET ((char *)&u.pt_sigframe.sig_snip - (char *)&u)
-#define SFIP_OFFSET ((char *)&u.pt_sigframe.sig_sfip - (char *)&u)
-#else
-/* define offsets to the pc instruction offsets in ptrace_user struct */
-#define SXIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sxip - (char *)&u)
-#define SNIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_snip - (char *)&u)
-#define SFIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sfip - (char *)&u)
-#endif
-
-extern int have_symbol_file_p ();
-
-extern jmp_buf stack_jmp;
-
-extern int errno;
-
-void
-fetch_inferior_registers (int regno)
-{
- register unsigned int regaddr;
- char buf[MAX_REGISTER_RAW_SIZE];
- register int i;
-
- struct USER u;
- unsigned int offset;
-
- offset = (char *) &u.pt_r0 - (char *) &u;
- regaddr = offset; /* byte offset to r0; */
-
-/* offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- /*regaddr = register_addr (regno, offset); */
- /* 88k enhancement */
-
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0);
- regaddr += sizeof (int);
- }
- supply_register (regno, buf);
- }
- /* now load up registers 36 - 38; special pc registers */
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
- supply_register (SXIP_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
- supply_register (SNIP_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
- supply_register (SFIP_REGNUM, buf);
-}
-
-/* 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)
-{
- register unsigned int regaddr;
- char buf[80];
-
- struct USER u;
-
- unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
-
- regaddr = offset;
-
- /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
- svr3 doesn't run on an 88110, or the kernel isolates the different (not
- completely sure this is true, but seems to be. */
- if (regno >= 0)
- {
- /* regaddr = register_addr (regno, offset); */
- if (regno < PC_REGNUM)
- {
- regaddr = offset + regno * sizeof (int);
- errno = 0;
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- else if (regno == SXIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
- else if (regno == SNIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
- else if (regno == SFIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
- else
- printf_unfiltered ("Bad register number for store_inferior routine\n");
- }
- else
- {
- for (regno = 0; regno < PC_REGNUM; regno++)
- {
- /* regaddr = register_addr (regno, offset); */
- errno = 0;
- regaddr = offset + regno * sizeof (int);
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
- }
-}
-
-
-/* blockend is the address of the end of the user structure */
-m88k_register_u_addr (int blockend, int regnum)
-{
- struct USER u;
- int ustart = blockend - sizeof (struct USER);
- switch (regnum)
- {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 20:
- case 21:
- case 22:
- case 23:
- case 24:
- case 25:
- case 26:
- case 27:
- case 28:
- case 29:
- case 30:
- case 31:
- return (ustart + ((int) &u.pt_r0 - (int) &u) + REGISTER_SIZE * regnum);
- case PSR_REGNUM:
- return (ustart + ((int) &u.pt_psr - (int) &u));
- case FPSR_REGNUM:
- return (ustart + ((int) &u.pt_fpsr - (int) &u));
- case FPCR_REGNUM:
- return (ustart + ((int) &u.pt_fpcr - (int) &u));
- case SXIP_REGNUM:
- return (ustart + SXIP_OFFSET);
- case SNIP_REGNUM:
- return (ustart + SNIP_OFFSET);
- case SFIP_REGNUM:
- return (ustart + SFIP_OFFSET);
- default:
- if (regnum < NUM_REGS)
- /* The register is one of those which is not defined...
- give it zero */
- return (ustart + ((int) &u.pt_r0 - (int) &u));
- else
- return (blockend + REGISTER_SIZE * regnum);
- }
-}
-
-#ifdef USE_PROC_FS
-
-#include <sys/procfs.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)
-{
- register int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi <= SP_REGNUM; regi++)
- supply_register (regi, (char *) (regp + regi));
-
- supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
- supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
- supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
- supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
- supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
- supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
- int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi <= R_R31; regi++)
- if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(int *) &registers[REGISTER_BYTE (regi)];
-
- if ((regno == -1) || (regno == SXIP_REGNUM))
- *(regp + R_XIP) = *(int *) &registers[REGISTER_BYTE (SXIP_REGNUM)];
- if ((regno == -1) || (regno == SNIP_REGNUM))
- *(regp + R_NIP) = *(int *) &registers[REGISTER_BYTE (SNIP_REGNUM)];
- if ((regno == -1) || (regno == SFIP_REGNUM))
- *(regp + R_FIP) = *(int *) &registers[REGISTER_BYTE (SFIP_REGNUM)];
- if ((regno == -1) || (regno == PSR_REGNUM))
- *(regp + R_PSR) = *(int *) &registers[REGISTER_BYTE (PSR_REGNUM)];
- if ((regno == -1) || (regno == FPSR_REGNUM))
- *(regp + R_FPSR) = *(int *) &registers[REGISTER_BYTE (FPSR_REGNUM)];
- if ((regno == -1) || (regno == FPCR_REGNUM))
- *(regp + R_FPCR) = *(int *) &registers[REGISTER_BYTE (FPCR_REGNUM)];
-}
-
-#endif /* USE_PROC_FS */
diff --git a/contrib/gdb/gdb/m88k-tdep.c b/contrib/gdb/gdb/m88k-tdep.c
deleted file mode 100644
index 86ca0982bfe9..000000000000
--- a/contrib/gdb/gdb/m88k-tdep.c
+++ /dev/null
@@ -1,634 +0,0 @@
-/* Target-machine dependent code for Motorola 88000 series, for GDB.
- Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 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 "value.h"
-#include "gdbcore.h"
-#include "symtab.h"
-#include "setjmp.h"
-#include "value.h"
-#include "regcache.h"
-
-/* Size of an instruction */
-#define BYTES_PER_88K_INSN 4
-
-void frame_find_saved_regs ();
-
-/* Is this target an m88110? Otherwise assume m88100. This has
- relevance for the ways in which we screw with instruction pointers. */
-
-int target_is_m88110 = 0;
-
-/* The type of a register. */
-struct type *
-m88k_register_type (int regnum)
-{
- if (regnum >= XFP_REGNUM)
- return builtin_type_m88110_ext;
- else if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
- return builtin_type_void_func_ptr;
- else
- return builtin_type_int32;
-}
-
-
-/* The m88k kernel aligns all instructions on 4-byte boundaries. The
- kernel also uses the least significant two bits for its own hocus
- pocus. When gdb receives an address from the kernel, it needs to
- preserve those right-most two bits, but gdb also needs to be careful
- to realize that those two bits are not really a part of the address
- of an instruction. Shrug. */
-
-CORE_ADDR
-m88k_addr_bits_remove (CORE_ADDR addr)
-{
- return ((addr) & ~3);
-}
-
-
-/* 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 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
-frame_chain (struct frame_info *thisframe)
-{
-
- frame_find_saved_regs (thisframe, (struct frame_saved_regs *) 0);
- /* NOTE: this depends on frame_find_saved_regs returning the VALUE, not
- the ADDRESS, of SP_REGNUM. It also depends on the cache of
- frame_find_saved_regs results. */
- if (thisframe->fsr->regs[SP_REGNUM])
- return thisframe->fsr->regs[SP_REGNUM];
- else
- return thisframe->frame; /* Leaf fn -- next frame up has same SP. */
-}
-
-int
-frameless_function_invocation (struct frame_info *frame)
-{
-
- frame_find_saved_regs (frame, (struct frame_saved_regs *) 0);
- /* NOTE: this depends on frame_find_saved_regs returning the VALUE, not
- the ADDRESS, of SP_REGNUM. It also depends on the cache of
- frame_find_saved_regs results. */
- if (frame->fsr->regs[SP_REGNUM])
- return 0; /* Frameful -- return addr saved somewhere */
- else
- return 1; /* Frameless -- no saved return address */
-}
-
-void
-init_extra_frame_info (int fromleaf, struct frame_info *frame)
-{
- frame->fsr = 0; /* Not yet allocated */
- frame->args_pointer = 0; /* Unknown */
- frame->locals_pointer = 0; /* Unknown */
-}
-
-/* Examine an m88k function prologue, recording the addresses at which
- registers are saved explicitly by the prologue code, and returning
- the address of the first instruction after the prologue (but not
- after the instruction at address LIMIT, as explained below).
-
- LIMIT places an upper bound on addresses of the instructions to be
- examined. If the prologue code scan reaches LIMIT, the scan is
- aborted and LIMIT is returned. This is used, when examining the
- prologue for the current frame, to keep examine_prologue () from
- claiming that a given register has been saved when in fact the
- instruction that saves it has not yet been executed. LIMIT is used
- at other times to stop the scan when we hit code after the true
- function prologue (e.g. for the first source line) which might
- otherwise be mistaken for function prologue.
-
- The format of the function prologue matched by this routine is
- derived from examination of the source to gcc 1.95, particularly
- the routine output_prologue () in config/out-m88k.c.
-
- subu r31,r31,n # stack pointer update
-
- (st rn,r31,offset)? # save incoming regs
- (st.d rn,r31,offset)?
-
- (addu r30,r31,n)? # frame pointer update
-
- (pic sequence)? # PIC code prologue
-
- (or rn,rm,0)? # Move parameters to other regs
- */
-
-/* Macros for extracting fields from instructions. */
-
-#define BITMASK(pos, width) (((0x1 << (width)) - 1) << (pos))
-#define EXTRACT_FIELD(val, pos, width) ((val) >> (pos) & BITMASK (0, width))
-#define SUBU_OFFSET(x) ((unsigned)(x & 0xFFFF))
-#define ST_OFFSET(x) ((unsigned)((x) & 0xFFFF))
-#define ST_SRC(x) EXTRACT_FIELD ((x), 21, 5)
-#define ADDU_OFFSET(x) ((unsigned)(x & 0xFFFF))
-
-/*
- * prologue_insn_tbl is a table of instructions which may comprise a
- * function prologue. Associated with each table entry (corresponding
- * to a single instruction or group of instructions), is an action.
- * This action is used by examine_prologue (below) to determine
- * the state of certain machine registers and where the stack frame lives.
- */
-
-enum prologue_insn_action
-{
- PIA_SKIP, /* don't care what the instruction does */
- PIA_NOTE_ST, /* note register stored and where */
- PIA_NOTE_STD, /* note pair of registers stored and where */
- PIA_NOTE_SP_ADJUSTMENT, /* note stack pointer adjustment */
- PIA_NOTE_FP_ASSIGNMENT, /* note frame pointer assignment */
- PIA_NOTE_PROLOGUE_END, /* no more prologue */
-};
-
-struct prologue_insns
- {
- unsigned long insn;
- unsigned long mask;
- enum prologue_insn_action action;
- };
-
-struct prologue_insns prologue_insn_tbl[] =
-{
- /* Various register move instructions */
- {0x58000000, 0xf800ffff, PIA_SKIP}, /* or/or.u with immed of 0 */
- {0xf4005800, 0xfc1fffe0, PIA_SKIP}, /* or rd, r0, rs */
- {0xf4005800, 0xfc00ffff, PIA_SKIP}, /* or rd, rs, r0 */
-
- /* Stack pointer setup: "subu sp, sp, n" where n is a multiple of 8 */
- {0x67ff0000, 0xffff0007, PIA_NOTE_SP_ADJUSTMENT},
-
- /* Frame pointer assignment: "addu r30, r31, n" */
- {0x63df0000, 0xffff0000, PIA_NOTE_FP_ASSIGNMENT},
-
- /* Store to stack instructions; either "st rx, sp, n" or "st.d rx, sp, n" */
- {0x241f0000, 0xfc1f0000, PIA_NOTE_ST}, /* st rx, sp, n */
- {0x201f0000, 0xfc1f0000, PIA_NOTE_STD}, /* st.d rs, sp, n */
-
- /* Instructions needed for setting up r25 for pic code. */
- {0x5f200000, 0xffff0000, PIA_SKIP}, /* or.u r25, r0, offset_high */
- {0xcc000002, 0xffffffff, PIA_SKIP}, /* bsr.n Lab */
- {0x5b390000, 0xffff0000, PIA_SKIP}, /* or r25, r25, offset_low */
- {0xf7396001, 0xffffffff, PIA_SKIP}, /* Lab: addu r25, r25, r1 */
-
- /* Various branch or jump instructions which have a delay slot -- these
- do not form part of the prologue, but the instruction in the delay
- slot might be a store instruction which should be noted. */
- {0xc4000000, 0xe4000000, PIA_NOTE_PROLOGUE_END},
- /* br.n, bsr.n, bb0.n, or bb1.n */
- {0xec000000, 0xfc000000, PIA_NOTE_PROLOGUE_END}, /* bcnd.n */
- {0xf400c400, 0xfffff7e0, PIA_NOTE_PROLOGUE_END} /* jmp.n or jsr.n */
-
-};
-
-
-/* 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. */
-
-#define NEXT_PROLOGUE_INSN(addr, lim, pword1) \
- (((addr) < (lim)) ? next_insn (addr, pword1) : 0)
-
-/* Read the m88k instruction at 'memaddr' and return the address of
- the next instruction after that, or 0 if 'memaddr' is not the
- address of a valid instruction. The instruction
- is stored at 'pword1'. */
-
-CORE_ADDR
-next_insn (CORE_ADDR memaddr, unsigned long *pword1)
-{
- *pword1 = read_memory_integer (memaddr, BYTES_PER_88K_INSN);
- return memaddr + BYTES_PER_88K_INSN;
-}
-
-/* Read a register from frames called by us (or from the hardware regs). */
-
-static int
-read_next_frame_reg (struct frame_info *frame, int regno)
-{
- for (; frame; frame = frame->next)
- {
- if (regno == SP_REGNUM)
- return FRAME_FP (frame);
- else if (frame->fsr->regs[regno])
- return read_memory_integer (frame->fsr->regs[regno], 4);
- }
- return read_register (regno);
-}
-
-/* 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. */
-
-static CORE_ADDR
-examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
- CORE_ADDR frame_sp, struct frame_saved_regs *fsr,
- struct frame_info *fi)
-{
- register CORE_ADDR next_ip;
- register int src;
- unsigned long insn;
- int size, offset;
- char must_adjust[32]; /* If set, must adjust offsets in fsr */
- int sp_offset = -1; /* -1 means not set (valid must be mult of 8) */
- int fp_offset = -1; /* -1 means not set */
- CORE_ADDR frame_fp;
- CORE_ADDR prologue_end = 0;
-
- memset (must_adjust, '\0', sizeof (must_adjust));
- next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
-
- while (next_ip)
- {
- struct prologue_insns *pip;
-
- for (pip = prologue_insn_tbl; (insn & pip->mask) != pip->insn;)
- if (++pip >= prologue_insn_tbl + sizeof prologue_insn_tbl)
- goto end_of_prologue_found; /* not a prologue insn */
-
- switch (pip->action)
- {
- case PIA_NOTE_ST:
- case PIA_NOTE_STD:
- if (sp_offset != -1)
- {
- src = ST_SRC (insn);
- offset = ST_OFFSET (insn);
- must_adjust[src] = 1;
- fsr->regs[src++] = offset; /* Will be adjusted later */
- if (pip->action == PIA_NOTE_STD && src < 32)
- {
- offset += 4;
- must_adjust[src] = 1;
- fsr->regs[src++] = offset;
- }
- }
- else
- goto end_of_prologue_found;
- break;
- case PIA_NOTE_SP_ADJUSTMENT:
- if (sp_offset == -1)
- sp_offset = -SUBU_OFFSET (insn);
- else
- goto end_of_prologue_found;
- break;
- case PIA_NOTE_FP_ASSIGNMENT:
- if (fp_offset == -1)
- fp_offset = ADDU_OFFSET (insn);
- else
- goto end_of_prologue_found;
- break;
- case PIA_NOTE_PROLOGUE_END:
- if (!prologue_end)
- prologue_end = ip;
- break;
- case PIA_SKIP:
- default:
- /* Do nothing */
- break;
- }
-
- ip = next_ip;
- next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
- }
-
-end_of_prologue_found:
-
- if (prologue_end)
- ip = prologue_end;
-
- /* We're done with the prologue. If we don't care about the stack
- frame itself, just return. (Note that fsr->regs has been trashed,
- but the one caller who calls with fi==0 passes a dummy there.) */
-
- if (fi == 0)
- return ip;
-
- /*
- OK, now we have:
-
- sp_offset original (before any alloca calls) displacement of SP
- (will be negative).
-
- fp_offset displacement from original SP to the FP for this frame
- or -1.
-
- fsr->regs[0..31] displacement from original SP to the stack
- location where reg[0..31] is stored.
-
- must_adjust[0..31] set if corresponding offset was set.
-
- If alloca has been called between the function prologue and the current
- IP, then the current SP (frame_sp) will not be the original SP as set by
- the function prologue. If the current SP is not the original SP, then the
- compiler will have allocated an FP for this frame, fp_offset will be set,
- and we can use it to calculate the original SP.
-
- Then, we figure out where the arguments and locals are, and relocate the
- offsets in fsr->regs to absolute addresses. */
-
- if (fp_offset != -1)
- {
- /* We have a frame pointer, so get it, and base our calc's on it. */
- frame_fp = (CORE_ADDR) read_next_frame_reg (fi->next, ACTUAL_FP_REGNUM);
- frame_sp = frame_fp - fp_offset;
- }
- else
- {
- /* We have no frame pointer, therefore frame_sp is still the same value
- as set by prologue. But where is the frame itself? */
- if (must_adjust[SRP_REGNUM])
- {
- /* Function header saved SRP (r1), the return address. Frame starts
- 4 bytes down from where it was saved. */
- frame_fp = frame_sp + fsr->regs[SRP_REGNUM] - 4;
- fi->locals_pointer = frame_fp;
- }
- else
- {
- /* Function header didn't save SRP (r1), so we are in a leaf fn or
- are otherwise confused. */
- frame_fp = -1;
- }
- }
-
- /* The locals are relative to the FP (whether it exists as an allocated
- register, or just as an assumed offset from the SP) */
- fi->locals_pointer = frame_fp;
-
- /* The arguments are just above the SP as it was before we adjusted it
- on entry. */
- fi->args_pointer = frame_sp - sp_offset;
-
- /* Now that we know the SP value used by the prologue, we know where
- it saved all the registers. */
- for (src = 0; src < 32; src++)
- if (must_adjust[src])
- fsr->regs[src] += frame_sp;
-
- /* The saved value of the SP is always known. */
- /* (we hope...) */
- if (fsr->regs[SP_REGNUM] != 0
- && fsr->regs[SP_REGNUM] != frame_sp - sp_offset)
- fprintf_unfiltered (gdb_stderr, "Bad saved SP value %lx != %lx, offset %x!\n",
- fsr->regs[SP_REGNUM],
- frame_sp - sp_offset, sp_offset);
-
- fsr->regs[SP_REGNUM] = frame_sp - sp_offset;
-
- return (ip);
-}
-
-/* Given an ip value corresponding to the start of a function,
- return the ip of the first instruction after the function
- prologue. */
-
-CORE_ADDR
-m88k_skip_prologue (CORE_ADDR ip)
-{
- struct frame_saved_regs saved_regs_dummy;
- struct symtab_and_line sal;
- CORE_ADDR limit;
-
- sal = find_pc_line (ip, 0);
- limit = (sal.end) ? sal.end : 0xffffffff;
-
- return (examine_prologue (ip, limit, (CORE_ADDR) 0, &saved_regs_dummy,
- (struct frame_info *) 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_obstack, since it is
- fairly expensive. */
-
-void
-frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
-{
- register struct frame_saved_regs *cache_fsr;
- CORE_ADDR ip;
- struct symtab_and_line sal;
- CORE_ADDR limit;
-
- if (!fi->fsr)
- {
- cache_fsr = (struct frame_saved_regs *)
- frame_obstack_alloc (sizeof (struct frame_saved_regs));
- memset (cache_fsr, '\0', sizeof (struct frame_saved_regs));
- fi->fsr = cache_fsr;
-
- /* Find the start and end of the function prologue. If the PC
- is in the function prologue, we only consider the part that
- has executed already. In the case where the PC is not in
- the function prologue, we set limit to two instructions beyond
- where the prologue ends in case if any of the prologue instructions
- were moved into a delay slot of a branch instruction. */
-
- ip = get_pc_function_start (fi->pc);
- sal = find_pc_line (ip, 0);
- limit = (sal.end && sal.end < fi->pc) ? sal.end + 2 * BYTES_PER_88K_INSN
- : fi->pc;
-
- /* This will fill in fields in *fi as well as in cache_fsr. */
-#ifdef SIGTRAMP_FRAME_FIXUP
- if (fi->signal_handler_caller)
- SIGTRAMP_FRAME_FIXUP (fi->frame);
-#endif
- examine_prologue (ip, limit, fi->frame, cache_fsr, fi);
-#ifdef SIGTRAMP_SP_FIXUP
- if (fi->signal_handler_caller && fi->fsr->regs[SP_REGNUM])
- SIGTRAMP_SP_FIXUP (fi->fsr->regs[SP_REGNUM]);
-#endif
- }
-
- if (fsr)
- *fsr = *fi->fsr;
-}
-
-/* Return the address of the locals block for the frame
- described by FI. Returns 0 if the address is unknown.
- NOTE! Frame locals are referred to by negative offsets from the
- argument pointer, so this is the same as frame_args_address(). */
-
-CORE_ADDR
-frame_locals_address (struct frame_info *fi)
-{
- struct frame_saved_regs fsr;
-
- if (fi->args_pointer) /* Cached value is likely there. */
- return fi->args_pointer;
-
- /* Nope, generate it. */
-
- get_frame_saved_regs (fi, &fsr);
-
- return fi->args_pointer;
-}
-
-/* Return the address of the argument block for the frame
- described by FI. Returns 0 if the address is unknown. */
-
-CORE_ADDR
-frame_args_address (struct frame_info *fi)
-{
- struct frame_saved_regs fsr;
-
- if (fi->args_pointer) /* Cached value is likely there. */
- return fi->args_pointer;
-
- /* Nope, generate it. */
-
- get_frame_saved_regs (fi, &fsr);
-
- return fi->args_pointer;
-}
-
-/* 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
-frame_saved_pc (struct frame_info *frame)
-{
- return read_next_frame_reg (frame, SRP_REGNUM);
-}
-
-
-#define DUMMY_FRAME_SIZE 192
-
-static void
-write_word (CORE_ADDR sp, ULONGEST word)
-{
- register int len = REGISTER_SIZE;
- char buffer[MAX_REGISTER_RAW_SIZE];
-
- store_unsigned_integer (buffer, len, word);
- write_memory (sp, buffer, len);
-}
-
-void
-m88k_push_dummy_frame (void)
-{
- register CORE_ADDR sp = read_register (SP_REGNUM);
- register int rn;
- int offset;
-
- sp -= DUMMY_FRAME_SIZE; /* allocate a bunch of space */
-
- for (rn = 0, offset = 0; rn <= SP_REGNUM; rn++, offset += 4)
- write_word (sp + offset, read_register (rn));
-
- write_word (sp + offset, read_register (SXIP_REGNUM));
- offset += 4;
-
- write_word (sp + offset, read_register (SNIP_REGNUM));
- offset += 4;
-
- write_word (sp + offset, read_register (SFIP_REGNUM));
- offset += 4;
-
- write_word (sp + offset, read_register (PSR_REGNUM));
- offset += 4;
-
- write_word (sp + offset, read_register (FPSR_REGNUM));
- offset += 4;
-
- write_word (sp + offset, read_register (FPCR_REGNUM));
- offset += 4;
-
- write_register (SP_REGNUM, sp);
- write_register (ACTUAL_FP_REGNUM, sp);
-}
-
-void
-pop_frame (void)
-{
- register struct frame_info *frame = get_current_frame ();
- register int regnum;
- struct frame_saved_regs fsr;
-
- get_frame_saved_regs (frame, &fsr);
-
- if (PC_IN_CALL_DUMMY (read_pc (), read_register (SP_REGNUM), frame->frame))
- {
- /* FIXME: I think get_frame_saved_regs should be handling this so
- that we can deal with the saved registers properly (e.g. frame
- 1 is a call dummy, the user types "frame 2" and then "print $ps"). */
- register CORE_ADDR sp = read_register (ACTUAL_FP_REGNUM);
- int offset;
-
- for (regnum = 0, offset = 0; regnum <= SP_REGNUM; regnum++, offset += 4)
- (void) write_register (regnum, read_memory_integer (sp + offset, 4));
-
- write_register (SXIP_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- write_register (SNIP_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- write_register (SFIP_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- write_register (PSR_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- write_register (FPSR_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- write_register (FPCR_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- }
- else
- {
- for (regnum = FP_REGNUM; regnum > 0; regnum--)
- if (fsr.regs[regnum])
- write_register (regnum,
- read_memory_integer (fsr.regs[regnum], 4));
- write_pc (frame_saved_pc (frame));
- }
- reinit_frame_cache ();
-}
-
-void
-_initialize_m88k_tdep (void)
-{
- tm_print_insn = print_insn_m88k;
-}
diff --git a/contrib/gdb/gdb/mon960-rom.c b/contrib/gdb/gdb/mon960-rom.c
deleted file mode 100644
index 2b7fe5fd58d1..000000000000
--- a/contrib/gdb/gdb/mon960-rom.c
+++ /dev/null
@@ -1,260 +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() */
-
-#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/contrib/gdb/gdb/mpw-config.in b/contrib/gdb/gdb/mpw-config.in
deleted file mode 100644
index ed07878338bc..000000000000
--- a/contrib/gdb/gdb/mpw-config.in
+++ /dev/null
@@ -1,81 +0,0 @@
-# Configuration fragment for GDB.
-
-If "{host_canonical}" =~ /m68k-apple-mpw/
- forward-include "{srcdir}"config:m68k:xm-mpw.h xm.h
- Set siow_lib '"{Libraries}"SIOW.o'
-
-Else If "{host_canonical}" =~ /powerpc-apple-mpw/
- forward-include "{srcdir}"config:powerpc:xm-mpw.h xm.h
- Set siow_lib '"{PPCLibraries}"PPCSIOW.o'
-
-End If
-
-Set xdepfiles '"{o}"mac-xdep.c.o'
-
-Set enable_cflags ""
-
-# Make a copy of this file and give it a different name, so it
-# won't be confused with GDB's serial.h.
-
-Duplicate -y "{CIncludes}"Serial.h MacSerial.h
-
-Echo "/* dummy */" >termio.h
-
-If "{target_canonical}" =~ /m68k-apple-macos/
- forward-include "{srcdir}"config:m68k:tm-mac.h tm.h
- forward-include "{srcdir}"config:m68k:tm-m68k.h 'm68k/tm-m68k.h'
- Set tdepfiles '"{o}"m68k-tdep.c.o'
-
-Else If "{target_canonical}" =~ /powerpc-apple-macos/
- forward-include "{srcdir}"config:powerpc:tm-macos.h tm.h
- forward-include "{srcdir}"config:rs6000:tm-rs6000.h 'rs6000/tm-rs6000.h'
- Set tdepfiles '"{o}"rs6000-tdep.c.o "{o}"xcoffread.c.o'
-
-Else If "{target_canonical}" =~ /i386-unknown-go32/
- forward-include "{srcdir}"config:i386:tm-i386v.h tm.h
- Set tdepfiles '"{o}"i386-tdep.c.o'
-
-Else If "{target_canonical}" =~ /mips-idt-ecoff/
- forward-include "{srcdir}"config:mips:tm-embed.h tm.h
- forward-include "{srcdir}"config:mips:tm-bigmips.h 'mips/tm-bigmips.h'
- forward-include "{srcdir}"config:mips:tm-mips.h 'mips/tm-mips.h'
- Set tdepfiles '"{o}"mips-tdep.c.o "{o}"remote-mips.c.o'
-
-Else If "{target_canonical}" =~ /sh-hitachi-hms/
- forward-include "{srcdir}"config:sh:tm-sh.h tm.h
- Set tdepfiles '"{o}"sh-tdep.c.o'
-
-End If
-
-If "{target_canonical}" =~ /m68k-apple-macos/
- forward-include "{srcdir}"config:m68k:nm-macos.h nm.h
- Set natdepfiles '"{o}"mac-nat.c.o'
-
-Else If "{target_canonical}" =~ /powerpc-apple-macos/
- forward-include "{srcdir}"config:powerpc:nm-macos.h nm.h
- Set natdepfiles '"{o}"mac-nat.c.o'
-
-Else
- forward-include "{srcdir}"config:nm-empty.h nm.h
- Set natdepfiles ' '
-
-End If
-
-Echo '# From mpw-config.in' > "{o}"mk.tmp
-Echo "TDEPFILES = " {tdepfiles} >> "{o}"mk.tmp
-Echo "XDEPFILES = " {xdepfiles} >> "{o}"mk.tmp
-Echo "NATDEPFILES = " {natdepfiles} >> "{o}"mk.tmp
-Echo "XM_ADD_FILES = " >> "{o}"mk.tmp
-Echo "TM_ADD_FILES = " >> "{o}"mk.tmp
-Echo "NAT_ADD_FILES = " >> "{o}"mk.tmp
-Echo "XM_CDEPS = " >> "{o}"mk.tmp
-Echo "TM_CDEPS = " >> "{o}"mk.tmp
-Echo "NAT_CDEPS = " >> "{o}"mk.tmp
-Echo "SIOW_LIB = " {siow_lib} >> "{o}"mk.tmp
-Echo "ENABLE_CFLAGS = " {enable_cflags} >> "{o}"mk.tmp
-Echo '# End from mpw-config.in' >> "{o}"mk.tmp
-
-Echo '/* config.h. Generated by mpw-configure. */' > "{o}"config.new
-Echo '#include "mpw.h"' >> "{o}"config.new
-
-MoveIfChange "{o}"config.new "{o}"config.h
diff --git a/contrib/gdb/gdb/mpw-make.sed b/contrib/gdb/gdb/mpw-make.sed
deleted file mode 100644
index ce6a9ecdb155..000000000000
--- a/contrib/gdb/gdb/mpw-make.sed
+++ /dev/null
@@ -1,178 +0,0 @@
-# Sed commands that finish translating the GDB Unix Makefile to MPW syntax.
-
-/^host_alias =/s/^/#/
-/^target_alias =/s/^/#/
-
-/^host_makefile_frag@$/d
-/^target_makefile_frag@$/d
-
-/@ENABLE_CFLAGS@/s/@ENABLE_CFLAGS@/{ENABLE_CFLAGS}/g
-/^ENABLE_CFLAGS=/s/^/#/
-
-# Edit all the symbolic definitions pointing to various libraries and such.
-
-/^INCLUDE_DIR = /s/"{srcdir}":include/"{topsrcdir}"include:/
-
-/^MMALLOC_DIR = /s/::mmalloc/mmalloc:/
-/^MMALLOC_SRC = /s/"{srcdir}"/"{topsrcdir}"/
-/^MMALLOC =/s/=.*$/=/
-/MMALLOC_CFLAGS =/s/=.*$/= -u USE_MMALLOC/
-
-/^BFD_DIR = /s/::bfd/bfd:/
-/^BFD = /s/{BFD_DIR}:libbfd/{BFD_DIR}libbfd/
-/^BFD_SRC = /s/"{srcdir}"/"{topsrcdir}"/
-
-/^READLINE_DIR = /s/::readline/readline:/
-/^READLINE =/s/=.*$/=/
-/^READLINE_SRC = /s/"{srcdir}"/"{topsrcdir}"/
-
-/^INCLUDE_CFLAGS = /s/$/ -i "{topsrcdir}"include:mpw: -i ::extra-include:/
-
-/^SER_HARDWIRE =/s/ser-unix/ser-mac/
-
-/^TERMCAP =/s/ =.*$/ =/
-
-# Whack out various autoconf vars that we don't need.
-/@CONFIG_LDFLAGS@/s/@CONFIG_LDFLAGS@//g
-/@HLDFLAGS@/s/@HLDFLAGS@//g
-/@DEFS@/s/@DEFS@//g
-/@YACC@/s/@YACC@/byacc/g
-/@ENABLE_OBS@/s/@ENABLE_OBS@//g
-/@ENABLE_CLIBS@/s/@ENABLE_CLIBS@//g
-/@LIBS@/s/@LIBS@//g
-
-# Whack out autoconf hook for thread debugging.
-/@THREAD_DB_OBS@/s/@THREAD_DB_OBS@//g
-
-# Fix up paths to include directories.
-/INCLUDE_DIR/s/"{s}"{INCLUDE_DIR}/{INCLUDE_DIR}/g
-/INCLUDE_DIR/s/{INCLUDE_DIR}:/{INCLUDE_DIR}/g
-/INCLUDE_DIR/s/"{INCLUDE_DIR}":/"{INCLUDE_DIR}"/g
-
-/{BFD_DIR}/s/"{BFD_DIR}":/"{BFD_DIR}"/g
-/{BFD_DIR}/s/\([ ]\){BFD_DIR}/\1::{BFD_DIR}/g
-/{BFD_DIR}/s/\([ ]\)"{BFD_DIR}"/\1::"{BFD_DIR}"/g
-
-/{BFD_SRC}/s/"{s}"{BFD_SRC}/{BFD_SRC}/g
-/{BFD_SRC}/s/{BFD_SRC}:/{BFD_SRC}/g
-
-/{READLINE_SRC}/s/"{s}"{READLINE_SRC}/{READLINE_SRC}/g
-
-/^readline_headers =/,/^$/c\
-readline_headers =\
-
-
-# This isn't really useful, and seems to cause nonsensical complaints.
-/{ALLDEPFILES}/s/{ALLDEPFILES}//g
-
-/^copying.c \\Option-f /,/^$/d
-
-# Fix the syntax of bits of C code that go into version.c.
-/char /s/'char .Option-x/'char */
-
-# Point at files in the obj dir rather than src dir.
-/version/s/"{s}"version\.c/"{o}"version.c/g
-/version/s/^version\.c/"{o}"version.c/
-/config/s/"{s}"config\.h/"{o}"config.h/g
-/config/s/^config\.h/"{o}"config.h/
-/xm/s/"{s}"xm\.h/"{o}"xm.h/g
-/xm/s/^xm\.h/"{o}"xm.h/
-/tm/s/"{s}"tm\.h/"{o}"tm.h/g
-/tm/s/^tm\.h/"{o}"tm.h/
-/nm/s/"{s}"nm\.h/"{o}"nm.h/g
-/nm/s/^nm\.h/"{o}"nm.h/
-
-/exp.tab.c/s/"{s}"\([a-z0-9]*\)-exp\.tab\.c/"{o}"\1-exp.tab.c/g
-/exp.tab.c/s/^\([a-z0-9]*\)-exp\.tab\.c/"{o}"\1-exp.tab.c/
-
-/y.tab/s/"{s}"y.tab\.c/"{o}"y.tab.c/g
-/y.tab/s/^y.tab\.c/"{o}"y.tab.c/
-
-/init/s/"{s}"init\.c-tmp/"{o}"init.c-tmp/g
-/init/s/^init\.c-tmp/"{o}"init.c-tmp/
-/init/s/"{s}"init\.c/"{o}"init.c/g
-/init/s/^init\.c/"{o}"init.c/
-
-# Fix up the generation of version.c.
-/"{o}"version.c \\Option-f Makefile/,/^$/c\
-"{o}"version.c \\Option-f Makefile\
- echo -n 'char *version = "' >"{o}"version.c\
- echo -n "{VERSION}" >>"{o}"version.c\
- echo '";' >>"{o}"version.c\
- echo -n 'char *host_name = "' >>"{o}"version.c\
- echo -n "{host_alias}" >>"{o}"version.c\
- echo '";' >>"{o}"version.c\
- echo -n 'char *target_name = "' >>"{o}"version.c\
- echo -n "{target_alias}" >>"{o}"version.c\
- echo '";' >>"{o}"version.c\
-
-
-/ansidecl/s/include "{s}""ansidecl.h"/include "ansidecl.h"/
-
-# Open-brace in a command causes much confusion; replace with the
-# result from a script.
-/initialize_all_files ()/c\
- Echo -n 'void initialize_all_files () ' >> "{o}"init.c-tmp\
- open-brace >> "{o}"init.c-tmp
-
-# Replace the whole sed bit for init.c; it's simpler that way...
-/echo {OBS} {TSOBS}/,/echo '}'/c\
- For i in {OBS} {TSOBS}\
- Set filename "`Echo {i} | sed \\Option-d\
- -e '/^Onindy.c.o/d' \\Option-d\
- -e '/^nindy.c.o/d' \\Option-d\
- -e '/ttyflush.c.o/d' \\Option-d\
- -e '/xdr_ld.c.o/d' \\Option-d\
- -e '/xdr_ptrace.c.o/d' \\Option-d\
- -e '/xdr_rdb.c.o/d' \\Option-d\
- -e '/udr.c.o/d' \\Option-d\
- -e '/udip2soc.c.o/d' \\Option-d\
- -e '/udi2go32.c.o/d' \\Option-d\
- -e '/version.c.o/d' \\Option-d\
- -e '/[a-z0-9A-Z_]*-exp.tab.c.o/d' \\Option-d\
- -e 's/\\.c\\.o/.c/' \\Option-d\
- -e 's/^://'`"\
- If "{filename}" != ""\
- sed <"{s}""{filename}" >>"{o}"init.c-tmp -n \\Option-d\
- -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\\([a-z_0-9A-Z]*\\).*/ {extern void \\1 (); \\1 ();}/p'\
- End If\
- End For\
- Echo '}' >>"{o}"init.c-tmp
-
-# Fix the main compile/link command.
-/{CC_LD} {INTERNAL_LDFLAGS} -o gdb/,/"{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {LOADLIBES}/c\
- {CC_LD} {INTERNAL_LDFLAGS} -o gdb{PROG_EXT} "{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {LOADLIBES} {EXTRALIBS}\
- {MAKEPEF} gdb{PROG_EXT} -o gdb {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\
- {REZ} "{s}"mac-gdb.r -o gdb -append -d PROG_NAME='"'gdb'"' -d VERSION_STRING='"'{version}'"'\
-
-# Replace the install actions with MPW-friendly script.
-/^install \\Option-f /,/^$/c\
-install \\Option-f all install-only\
-\
-install-only \\Option-f \
- NewFolderRecursive "{bindir}"\
- Duplicate -y gdb "{bindir}"gdb\
- If "`Exists SiowGDB`" != ""\
- Duplicate -y SiowGDB "{bindir}"SiowGDB\
- End If\
-
-
-# Don't do any recursive subdir stuff.
-/ subdir_do/s/{MAKE}/null-command/
-
-# Edit out actions that only confuse MPW Make.
-/^config.status \\Option-f/,/^$/d
-/^Makefile \\Option-f/,/^$/d
-
-# Don't test config.h dependencies.
-/^"{o}"config.h \\Option-f/s/^/#/
-
-# Add an action to build SIOWgdb.
-$a\
-SIOWgdb \\Option-f {OBS} {TSOBS} {ADD_DEPS} {CDEPS} "{o}"init.c.o\
- Delete -i -y SIOWgdb\
- {CC_LD} {INTERNAL_LDFLAGS} -t 'APPL' -c 'gdb ' -o SIOWgdb{PROG_EXT} "{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {SIOW_LIB} {LOADLIBES} {EXTRALIBS}\
- {MAKEPEF} SIOWgdb{PROG_EXT} -o SIOWgdb -ft 'APPL' -fc 'gdb ' {MAKEPEF_FLAGS} \
- {REZ} -o SIOWgdb "{RIncludes}"siow.r -append -d __kPrefSize=5000 -d __kMinSize=2000 -d APPNAME='"'SIOWgdb'"' \
- {REZ} "{s}"mac-gdb.r -o SIOWgdb -append -d VERSION_STRING='"'{version}'"'\
-
diff --git a/contrib/gdb/gdb/news-xdep.c b/contrib/gdb/gdb/news-xdep.c
deleted file mode 100644
index 7f57aeb1d46a..000000000000
--- a/contrib/gdb/gdb/news-xdep.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Low level interface to ptrace, for GDB when running under Unix.
- Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifdef __GNUC__
-/* Bad implement execle(3). It's depend for "/bin/cc".
-
- main()
- {
- printf("execle:\n");
- execle(FILE, ARGS, envp);
- exit(1);
- }
-
- GCC:
- link a6,#0
- pea LC5 ; call printf
- jbsr _printf
- ; ; (not popd stack)
- pea _envp ; call execle
- clrl sp@-
- pea LC4
- pea LC4
- pea LC4
- pea LC3
- pea LC6
- jbsr _execle
- addw #32,sp ; delayed pop !!
-
- /bin/cc:
- link.l fp,#L23
- movem.l #L24,(sp)
- pea L26 ; call printf
- jbsr _printf
- addq.l #4,sp ; <--- popd stack !!
- pea _envp ; call execle
- clr.l -(sp)
- pea L32
-
- */
-
-execle(name, args)
- char *name, *args;
-{
- register char **env = &args;
- while (*env++)
- ;
- execve(name, (char **)&args, (char **)*env);
-}
-#endif
diff --git a/contrib/gdb/gdb/nindy-tdep.c b/contrib/gdb/gdb/nindy-tdep.c
deleted file mode 100644
index 1f35062e2bd2..000000000000
--- a/contrib/gdb/gdb/nindy-tdep.c
+++ /dev/null
@@ -1,78 +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 (sf, 0, VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL);
- 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/contrib/gdb/gdb/ns32k-tdep.c b/contrib/gdb/gdb/ns32k-tdep.c
deleted file mode 100644
index e9bbfc479a98..000000000000
--- a/contrib/gdb/gdb/ns32k-tdep.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/* Print NS 32000 instructions for GDB, the GNU debugger.
- Copyright 1986, 1988, 1991, 1992, 1994, 1995, 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 "gdbcore.h"
-
-static int sign_extend (int value, int bits);
-
-void
-_initialize_ns32k_tdep (void)
-{
- tm_print_insn = print_insn_ns32k;
-}
-
-/* Advance PC across any function entry prologue instructions
- to reach some "real" code. */
-
-CORE_ADDR
-umax_skip_prologue (CORE_ADDR pc)
-{
- register unsigned char op = read_memory_integer (pc, 1);
- if (op == 0x82)
- {
- op = read_memory_integer (pc + 2, 1);
- if ((op & 0x80) == 0)
- pc += 3;
- else if ((op & 0xc0) == 0x80)
- pc += 4;
- else
- pc += 6;
- }
- return pc;
-}
-
-/* Return number of args passed to a frame.
- Can return -1, meaning no way to tell.
- Encore's C compiler often reuses same area on stack for args,
- so this will often not work properly. If the arg names
- are known, it's likely most of them will be printed. */
-
-int
-umax_frame_num_args (struct frame_info *fi)
-{
- int numargs;
- CORE_ADDR pc;
- CORE_ADDR enter_addr;
- unsigned int insn;
- unsigned int addr_mode;
- int width;
-
- numargs = -1;
- enter_addr = ns32k_get_enter_addr ((fi)->pc);
- if (enter_addr > 0)
- {
- pc = ((enter_addr == 1)
- ? SAVED_PC_AFTER_CALL (fi)
- : FRAME_SAVED_PC (fi));
- insn = read_memory_integer (pc, 2);
- addr_mode = (insn >> 11) & 0x1f;
- insn = insn & 0x7ff;
- if ((insn & 0x7fc) == 0x57c
- && addr_mode == 0x14) /* immediate */
- {
- if (insn == 0x57c) /* adjspb */
- width = 1;
- else if (insn == 0x57d) /* adjspw */
- width = 2;
- else if (insn == 0x57f) /* adjspd */
- width = 4;
- else
- internal_error (__FILE__, __LINE__, "bad else");
- numargs = read_memory_integer (pc + 2, width);
- if (width > 1)
- flip_bytes (&numargs, width);
- numargs = -sign_extend (numargs, width * 8) / 4;
- }
- }
- return numargs;
-}
-
-static int
-sign_extend (int value, int bits)
-{
- value = value & ((1 << bits) - 1);
- return (value & (1 << (bits - 1))
- ? value | (~((1 << bits) - 1))
- : value);
-}
-
-void
-flip_bytes (void *p, int count)
-{
- char tmp;
- char *ptr = 0;
-
- while (count > 0)
- {
- tmp = *ptr;
- ptr[0] = ptr[count - 1];
- ptr[count - 1] = tmp;
- ptr++;
- count -= 2;
- }
-}
-
-/* Return the number of locals in the current frame given a pc
- pointing to the enter instruction. This is used in the macro
- FRAME_FIND_SAVED_REGS. */
-
-int
-ns32k_localcount (CORE_ADDR enter_pc)
-{
- unsigned char localtype;
- int localcount;
-
- localtype = read_memory_integer (enter_pc + 2, 1);
- if ((localtype & 0x80) == 0)
- localcount = localtype;
- else if ((localtype & 0xc0) == 0x80)
- localcount = (((localtype & 0x3f) << 8)
- | (read_memory_integer (enter_pc + 3, 1) & 0xff));
- else
- localcount = (((localtype & 0x3f) << 24)
- | ((read_memory_integer (enter_pc + 3, 1) & 0xff) << 16)
- | ((read_memory_integer (enter_pc + 4, 1) & 0xff) << 8)
- | (read_memory_integer (enter_pc + 5, 1) & 0xff));
- return localcount;
-}
-
-
-/* Nonzero if instruction at PC is a return instruction. */
-
-static int
-ns32k_about_to_return (CORE_ADDR pc)
-{
- return (read_memory_integer (pc, 1) == 0x12);
-}
-
-
-/*
- * Get the address of the enter opcode for the function
- * containing PC, if there is an enter for the function,
- * and if the pc is between the enter and exit.
- * Returns positive address if pc is between enter/exit,
- * 1 if pc before enter or after exit, 0 otherwise.
- */
-
-CORE_ADDR
-ns32k_get_enter_addr (CORE_ADDR pc)
-{
- CORE_ADDR enter_addr;
- unsigned char op;
-
- if (pc == 0)
- return 0;
-
- if (ns32k_about_to_return (pc))
- return 1; /* after exit */
-
- enter_addr = get_pc_function_start (pc);
-
- if (pc == enter_addr)
- return 1; /* before enter */
-
- op = read_memory_integer (enter_addr, 1);
-
- if (op != 0x82)
- return 0; /* function has no enter/exit */
-
- return enter_addr; /* pc is between enter and exit */
-}
diff --git a/contrib/gdb/gdb/ns32km3-nat.c b/contrib/gdb/gdb/ns32km3-nat.c
deleted file mode 100644
index cdafb9ce0d44..000000000000
--- a/contrib/gdb/gdb/ns32km3-nat.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/* Low level interface to ns532 running mach 3.0.
- Copyright (C) 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. */
-
-#include "defs.h"
-#include "inferior.h"
-
-#include <stdio.h>
-
-#include <mach.h>
-#include <mach/message.h>
-#include <mach/exception.h>
-#include <mach_error.h>
-
-#define private static
-
-
-/* Find offsets to thread states at compile time.
- * If your compiler does not grok this, calculate offsets
- * offsets yourself and use them (or get a compatible compiler :-)
- */
-
-#define REG_N_OFFSET(reg) (int)(&((struct ns532_combined_state *)0)->ts.reg)
-#define REG_F_OFFSET(reg) (int)(&((struct ns532_combined_state *)0)->fs.reg)
-
-/* at reg_offset[i] is the offset to the ns532_combined_state
- * location where the gdb registers[i] is stored.
- */
-
-static int reg_offset[] =
-{
- REG_N_OFFSET(r0), REG_N_OFFSET(r1), REG_N_OFFSET(r2), REG_N_OFFSET(r3),
- REG_N_OFFSET(r4), REG_N_OFFSET(r5), REG_N_OFFSET(r6), REG_N_OFFSET(r7),
- REG_F_OFFSET(l0a), REG_F_OFFSET(l0b),REG_F_OFFSET(l2a),REG_F_OFFSET(l2b),
- REG_F_OFFSET(l4a), REG_F_OFFSET(l4b),REG_F_OFFSET(l6a),REG_F_OFFSET(l6b),
- REG_N_OFFSET(sp), REG_N_OFFSET(fp), REG_N_OFFSET(pc), REG_N_OFFSET(psr),
- REG_F_OFFSET(fsr),
- REG_F_OFFSET(l0a), REG_F_OFFSET(l1a),REG_F_OFFSET(l2a),REG_F_OFFSET(l3a),
- REG_F_OFFSET(l4a), REG_F_OFFSET(l5a),REG_F_OFFSET(l6a),REG_F_OFFSET(l7a),
-};
-
-#define REG_ADDRESS(state,regnum) ((char *)(state)+reg_offset[regnum])
-
-/* Fetch COUNT contiguous registers from thread STATE starting from REGNUM
- * Caller knows that the regs handled in one transaction are of same size.
- */
-#define FETCH_REGS(state, regnum, count) \
- memcpy (&registers[REGISTER_BYTE (regnum)], \
- (char *)state+reg_offset[ regnum ], \
- count*REGISTER_SIZE)
-
-/* Store COUNT contiguous registers to thread STATE starting from REGNUM */
-#define STORE_REGS(state, regnum, count) \
- memcpy ((char *)state+reg_offset[ regnum ], \
- &registers[REGISTER_BYTE (regnum)], \
- count*REGISTER_SIZE)
-
-/*
- * Fetch inferiors registers for gdb.
- * REGNO specifies which (as gdb views it) register, -1 for all.
- */
-
-void
-fetch_inferior_registers (regno)
- int regno;
-{
- kern_return_t ret;
- thread_state_data_t state;
- unsigned int stateCnt = NS532_COMBINED_STATE_COUNT;
- int index;
-
- if (! MACH_PORT_VALID (current_thread))
- error ("fetch inferior registers: Invalid thread");
-
- if (must_suspend_thread)
- setup_thread (current_thread, 1);
-
- ret = thread_get_state (current_thread,
- NS532_COMBINED_STATE,
- state,
- &stateCnt);
-
- if (ret != KERN_SUCCESS)
- warning ("fetch_inferior_registers: %s ",
- mach_error_string (ret));
-#if 0
- /* It may be more effective to store validate all of them,
- * since we fetched them all anyway
- */
- else if (regno != -1)
- supply_register (regno, (char *)state+reg_offset[regno]);
-#endif
- else
- {
- for (index = 0; index < NUM_REGS; index++)
- supply_register (index, (char *)state+reg_offset[index]);
- }
-
- if (must_suspend_thread)
- setup_thread (current_thread, 0);
-}
-
-/* Store our register values back into the inferior.
- * If REGNO is -1, do this for all registers.
- * Otherwise, REGNO specifies which register
- *
- * On mach3 all registers are always saved in one call.
- */
-void
-store_inferior_registers (regno)
- int regno;
-{
- kern_return_t ret;
- thread_state_data_t state;
- unsigned int stateCnt = NS532_COMBINED_STATE_COUNT;
- register int index;
-
- if (! MACH_PORT_VALID (current_thread))
- error ("store inferior registers: Invalid thread");
-
- if (must_suspend_thread)
- setup_thread (current_thread, 1);
-
- /* Fetch the state of the current thread */
- ret = thread_get_state (current_thread,
- NS532_COMBINED_STATE,
- state,
- &stateCnt);
-
- if (ret != KERN_SUCCESS)
- {
- warning ("store_inferior_registers (get): %s",
- mach_error_string (ret));
- if (must_suspend_thread)
- setup_thread (current_thread, 0);
- return;
- }
-
- /* move gdb's registers to thread's state
- *
- * Since we save all registers anyway, save the ones
- * that gdb thinks are valid (e.g. ignore the regno
- * parameter)
- */
-#if 0
- if (regno != -1)
- STORE_REGS (state, regno, 1);
- else
-#endif
- {
- for (index = 0; index < NUM_REGS; index++)
- STORE_REGS (state, index, 1);
- }
-
- /* Write gdb's current view of register to the thread
- */
- ret = thread_set_state (current_thread,
- NS532_COMBINED_STATE,
- state,
- NS532_COMBINED_STATE_COUNT);
-
- if (ret != KERN_SUCCESS)
- warning ("store_inferior_registers (set): %s",
- mach_error_string (ret));
-
- if (must_suspend_thread)
- setup_thread (current_thread, 0);
-}
diff --git a/contrib/gdb/gdb/ns32knbsd-nat.c b/contrib/gdb/gdb/ns32knbsd-nat.c
deleted file mode 100644
index fd6e6197efc3..000000000000
--- a/contrib/gdb/gdb/ns32knbsd-nat.c
+++ /dev/null
@@ -1,364 +0,0 @@
-/* Functions specific to running gdb native on an ns32k running NetBSD
- Copyright 1989, 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
-
- 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 <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-#include <machine/frame.h>
-#include <machine/pcb.h>
-
-#include "defs.h"
-#include "inferior.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "regcache.h"
-
-#define RF(dst, src) \
- memcpy(&registers[REGISTER_BYTE(dst)], &src, sizeof(src))
-
-#define RS(src, dst) \
- memcpy(&dst, &registers[REGISTER_BYTE(src)], sizeof(dst))
-
-void
-fetch_inferior_registers (int regno)
-{
- struct reg inferior_registers;
- struct fpreg inferior_fpregisters;
-
- ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
- ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fpregisters, 0);
-
- RF (R0_REGNUM + 0, inferior_registers.r_r0);
- RF (R0_REGNUM + 1, inferior_registers.r_r1);
- RF (R0_REGNUM + 2, inferior_registers.r_r2);
- RF (R0_REGNUM + 3, inferior_registers.r_r3);
- RF (R0_REGNUM + 4, inferior_registers.r_r4);
- RF (R0_REGNUM + 5, inferior_registers.r_r5);
- RF (R0_REGNUM + 6, inferior_registers.r_r6);
- RF (R0_REGNUM + 7, inferior_registers.r_r7);
-
- RF (SP_REGNUM, inferior_registers.r_sp);
- RF (FP_REGNUM, inferior_registers.r_fp);
- RF (PC_REGNUM, inferior_registers.r_pc);
- RF (PS_REGNUM, inferior_registers.r_psr);
-
- RF (FPS_REGNUM, inferior_fpregisters.r_fsr);
- RF (FP0_REGNUM + 0, inferior_fpregisters.r_freg[0]);
- RF (FP0_REGNUM + 2, inferior_fpregisters.r_freg[2]);
- RF (FP0_REGNUM + 4, inferior_fpregisters.r_freg[4]);
- RF (FP0_REGNUM + 6, inferior_fpregisters.r_freg[6]);
- RF (LP0_REGNUM + 1, inferior_fpregisters.r_freg[1]);
- RF (LP0_REGNUM + 3, inferior_fpregisters.r_freg[3]);
- RF (LP0_REGNUM + 5, inferior_fpregisters.r_freg[5]);
- RF (LP0_REGNUM + 7, inferior_fpregisters.r_freg[7]);
- registers_fetched ();
-}
-
-void
-store_inferior_registers (int regno)
-{
- struct reg inferior_registers;
- struct fpreg inferior_fpregisters;
-
- RS (R0_REGNUM + 0, inferior_registers.r_r0);
- RS (R0_REGNUM + 1, inferior_registers.r_r1);
- RS (R0_REGNUM + 2, inferior_registers.r_r2);
- RS (R0_REGNUM + 3, inferior_registers.r_r3);
- RS (R0_REGNUM + 4, inferior_registers.r_r4);
- RS (R0_REGNUM + 5, inferior_registers.r_r5);
- RS (R0_REGNUM + 6, inferior_registers.r_r6);
- RS (R0_REGNUM + 7, inferior_registers.r_r7);
-
- RS (SP_REGNUM, inferior_registers.r_sp);
- RS (FP_REGNUM, inferior_registers.r_fp);
- RS (PC_REGNUM, inferior_registers.r_pc);
- RS (PS_REGNUM, inferior_registers.r_psr);
-
- RS (FPS_REGNUM, inferior_fpregisters.r_fsr);
- RS (FP0_REGNUM + 0, inferior_fpregisters.r_freg[0]);
- RS (FP0_REGNUM + 2, inferior_fpregisters.r_freg[2]);
- RS (FP0_REGNUM + 4, inferior_fpregisters.r_freg[4]);
- RS (FP0_REGNUM + 6, inferior_fpregisters.r_freg[6]);
- RS (LP0_REGNUM + 1, inferior_fpregisters.r_freg[1]);
- RS (LP0_REGNUM + 3, inferior_fpregisters.r_freg[3]);
- RS (LP0_REGNUM + 5, inferior_fpregisters.r_freg[5]);
- RS (LP0_REGNUM + 7, inferior_fpregisters.r_freg[7]);
-
- ptrace (PT_SETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
- ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) & inferior_fpregisters, 0);
-}
-
-
-/* XXX - Add this to machine/regs.h instead? */
-struct coreregs
-{
- struct reg intreg;
- struct fpreg freg;
-};
-
-/* Get registers from a core file. REG_ADDR is unused. */
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
- unsigned int reg_addr)
-{
- struct coreregs *core_reg;
-
- core_reg = (struct coreregs *) core_reg_sect;
-
- /*
- * We have *all* registers
- * in the first core section.
- * Ignore which.
- */
-
- if (core_reg_size < sizeof (*core_reg))
- {
- fprintf_unfiltered (gdb_stderr, "Couldn't read regs from core file\n");
- return;
- }
-
- /* Integer registers */
- RF (R0_REGNUM + 0, core_reg->intreg.r_r0);
- RF (R0_REGNUM + 1, core_reg->intreg.r_r1);
- RF (R0_REGNUM + 2, core_reg->intreg.r_r2);
- RF (R0_REGNUM + 3, core_reg->intreg.r_r3);
- RF (R0_REGNUM + 4, core_reg->intreg.r_r4);
- RF (R0_REGNUM + 5, core_reg->intreg.r_r5);
- RF (R0_REGNUM + 6, core_reg->intreg.r_r6);
- RF (R0_REGNUM + 7, core_reg->intreg.r_r7);
-
- RF (SP_REGNUM, core_reg->intreg.r_sp);
- RF (FP_REGNUM, core_reg->intreg.r_fp);
- RF (PC_REGNUM, core_reg->intreg.r_pc);
- RF (PS_REGNUM, core_reg->intreg.r_psr);
-
- /* Floating point registers */
- RF (FPS_REGNUM, core_reg->freg.r_fsr);
- RF (FP0_REGNUM + 0, core_reg->freg.r_freg[0]);
- RF (FP0_REGNUM + 2, core_reg->freg.r_freg[2]);
- RF (FP0_REGNUM + 4, core_reg->freg.r_freg[4]);
- RF (FP0_REGNUM + 6, core_reg->freg.r_freg[6]);
- RF (LP0_REGNUM + 1, core_reg->freg.r_freg[1]);
- RF (LP0_REGNUM + 3, core_reg->freg.r_freg[3]);
- RF (LP0_REGNUM + 5, core_reg->freg.r_freg[5]);
- RF (LP0_REGNUM + 7, core_reg->freg.r_freg[7]);
- registers_fetched ();
-}
-
-/* Register that we are able to handle ns32knbsd core file formats.
- FIXME: is this really bfd_target_unknown_flavour? */
-
-static struct core_fns nat_core_fns =
-{
- bfd_target_unknown_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
-void
-_initialize_ns32knbsd_nat (void)
-{
- add_core_fns (&nat_core_fns);
-}
-
-
-/*
- * kernel_u_size() is not helpful on NetBSD because
- * the "u" struct is NOT in the core dump file.
- */
-
-#ifdef FETCH_KCORE_REGISTERS
-/*
- * Get registers from a kernel crash dump or live kernel.
- * Called by kcore-nbsd.c:get_kcore_registers().
- */
-void
-fetch_kcore_registers (struct pcb *pcb)
-{
- struct switchframe sf;
- struct reg intreg;
- int dummy;
-
- /* Integer registers */
- if (target_read_memory ((CORE_ADDR) pcb->pcb_ksp, (char *) &sf, sizeof sf))
- error ("Cannot read integer registers.");
-
- /* We use the psr at kernel entry */
- if (target_read_memory ((CORE_ADDR) pcb->pcb_onstack, (char *) &intreg, sizeof intreg))
- error ("Cannot read processor status register.");
-
- dummy = 0;
- RF (R0_REGNUM + 0, dummy);
- RF (R0_REGNUM + 1, dummy);
- RF (R0_REGNUM + 2, dummy);
- RF (R0_REGNUM + 3, sf.sf_r3);
- RF (R0_REGNUM + 4, sf.sf_r4);
- RF (R0_REGNUM + 5, sf.sf_r5);
- RF (R0_REGNUM + 6, sf.sf_r6);
- RF (R0_REGNUM + 7, sf.sf_r7);
-
- dummy = pcb->pcb_kfp + 8;
- RF (SP_REGNUM, dummy);
- RF (FP_REGNUM, sf.sf_fp);
- RF (PC_REGNUM, sf.sf_pc);
- RF (PS_REGNUM, intreg.r_psr);
-
- /* Floating point registers */
- RF (FPS_REGNUM, pcb->pcb_fsr);
- RF (FP0_REGNUM + 0, pcb->pcb_freg[0]);
- RF (FP0_REGNUM + 2, pcb->pcb_freg[2]);
- RF (FP0_REGNUM + 4, pcb->pcb_freg[4]);
- RF (FP0_REGNUM + 6, pcb->pcb_freg[6]);
- RF (LP0_REGNUM + 1, pcb->pcb_freg[1]);
- RF (LP0_REGNUM + 3, pcb->pcb_freg[3]);
- RF (LP0_REGNUM + 5, pcb->pcb_freg[5]);
- RF (LP0_REGNUM + 7, pcb->pcb_freg[7]);
- registers_fetched ();
-}
-#endif /* FETCH_KCORE_REGISTERS */
-
-void
-clear_regs (void)
-{
- double zero = 0.0;
- int null = 0;
-
- /* Integer registers */
- RF (R0_REGNUM + 0, null);
- RF (R0_REGNUM + 1, null);
- RF (R0_REGNUM + 2, null);
- RF (R0_REGNUM + 3, null);
- RF (R0_REGNUM + 4, null);
- RF (R0_REGNUM + 5, null);
- RF (R0_REGNUM + 6, null);
- RF (R0_REGNUM + 7, null);
-
- RF (SP_REGNUM, null);
- RF (FP_REGNUM, null);
- RF (PC_REGNUM, null);
- RF (PS_REGNUM, null);
-
- /* Floating point registers */
- RF (FPS_REGNUM, zero);
- RF (FP0_REGNUM + 0, zero);
- RF (FP0_REGNUM + 2, zero);
- RF (FP0_REGNUM + 4, zero);
- RF (FP0_REGNUM + 6, zero);
- RF (LP0_REGNUM + 0, zero);
- RF (LP0_REGNUM + 1, zero);
- RF (LP0_REGNUM + 2, zero);
- RF (LP0_REGNUM + 3, zero);
- return;
-}
-
-/* Return number of args passed to a frame.
- Can return -1, meaning no way to tell. */
-
-int
-frame_num_args (struct frame_info *fi)
-{
- CORE_ADDR enter_addr;
- CORE_ADDR argp;
- int inst;
- int args;
- int i;
-
- if (read_memory_integer (fi->frame, 4) == 0 && fi->pc < 0x10000)
- {
- /* main is always called with three args */
- return (3);
- }
- enter_addr = ns32k_get_enter_addr (fi->pc);
- if (enter_addr = 0)
- return (-1);
- argp = enter_addr == 1 ? SAVED_PC_AFTER_CALL (fi) : FRAME_SAVED_PC (fi);
- for (i = 0; i < 16; i++)
- {
- /*
- * After a bsr gcc may emit the following instructions
- * to remove the arguments from the stack:
- * cmpqd 0,tos - to remove 4 bytes from the stack
- * cmpd tos,tos - to remove 8 bytes from the stack
- * adjsp[bwd] -n - to remove n bytes from the stack
- * Gcc sometimes delays emitting these instructions and
- * may even throw a branch between our feet.
- */
- inst = read_memory_integer (argp, 4);
- args = read_memory_integer (argp + 2, 4);
- if ((inst & 0xff) == 0xea)
- { /* br */
- args = ((inst >> 8) & 0xffffff) | (args << 24);
- if (args & 0x80)
- {
- if (args & 0x40)
- {
- args = ntohl (args);
- }
- else
- {
- args = ntohs (args & 0xffff);
- if (args & 0x2000)
- args |= 0xc000;
- }
- }
- else
- {
- args = args & 0xff;
- if (args & 0x40)
- args |= 0x80;
- }
- argp += args;
- continue;
- }
- if ((inst & 0xffff) == 0xb81f) /* cmpqd 0,tos */
- return (1);
- else if ((inst & 0xffff) == 0xbdc7) /* cmpd tos,tos */
- return (2);
- else if ((inst & 0xfffc) == 0xa57c)
- { /* adjsp[bwd] */
- switch (inst & 3)
- {
- case 0:
- args = ((args & 0xff) + 0x80);
- break;
- case 1:
- args = ((ntohs (args) & 0xffff) + 0x8000);
- break;
- case 3:
- args = -ntohl (args);
- break;
- default:
- return (-1);
- }
- if (args / 4 > 10 || (args & 3) != 0)
- continue;
- return (args / 4);
- }
- argp += 1;
- }
- return (-1);
-}
diff --git a/contrib/gdb/gdb/op50-rom.c b/contrib/gdb/gdb/op50-rom.c
deleted file mode 100644
index a256c91455b8..000000000000
--- a/contrib/gdb/gdb/op50-rom.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Remote target glue for the Oki op50n based eval board.
-
- Copyright 1995, 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"
-
-static void op50n_open (char *args, int from_tty);
-
-/*
- * this array of registers need to match the indexes used by GDB. The
- * whole reason this exists is cause the various ROM monitors use
- * different strings than GDB does, and doesn't support all the
- * registers either. So, typing "info reg sp" becomes a "r30".
- */
-
-static char *op50n_regnames[NUM_REGS] =
-{
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
- "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
- "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
- "cr11", "p", NULL, NULL, NULL, "cr15", "cr19", "cr20",
- "cr21", "cr22", NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, "cr0", "cr8", "cr9", "cr10", "cr12",
- "cr13", "cr24", "cr25", "cr26",
-};
-
-/*
- * Define the monitor command strings. Since these are passed directly
- * through to a printf style function, we need can include formatting
- * strings. We also need a CR or LF on the end.
- */
-
-static struct target_ops op50n_ops;
-
-static char *op50n_inits[] =
-{".\r", NULL};
-
-static struct monitor_ops op50n_cmds;
-
-static void
-init_op50n_cmds (void)
-{
- op50n_cmds.flags = MO_CLR_BREAK_USES_ADDR /*| MO_GETMEM_READ_SINGLE */ ; /* flags */
- op50n_cmds.init = op50n_inits; /* Init strings */
- op50n_cmds.cont = "g\r"; /* continue command */
- op50n_cmds.step = "t\r"; /* single step */
- op50n_cmds.stop = "\003.\r"; /* Interrupt char */
- op50n_cmds.set_break = "b %x\r"; /* set a breakpoint */
- op50n_cmds.clr_break = "b %x;0\r"; /* clear breakpoint at addr */
- op50n_cmds.clr_all_break = "bx\r"; /* clear all breakpoints */
- op50n_cmds.fill = "fx %x s%x %x\r"; /* memory fill cmd (addr, len, val) */
- op50n_cmds.setmem.cmdb = "sx %x %x\r"; /* setmem.cmdb (addr, value) */
- op50n_cmds.setmem.cmdw = "sh %x %x\r"; /* setmem.cmdw (addr, value) */
- op50n_cmds.setmem.cmdl = "s %x %x\r"; /* setmem.cmdl (addr, value) */
- op50n_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
- op50n_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */
- op50n_cmds.setmem.term = NULL; /* setmem.term */
- op50n_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */
-#if 0
- {
- "sx %x\r", /* getmem.cmdb (addr, len) */
- "sh %x\r", /* getmem.cmdw (addr, len) */
- "s %x\r", /* getmem.cmdl (addr, len) */
- NULL, /* getmem.cmdll (addr, len) */
- " : ", /* getmem.resp_delim */
- " ", /* getmem.term */
- ".\r", /* getmem.term_cmd */
- };
-#else
- op50n_cmds.getmem.cmdb = "dx %x s%x\r"; /* getmem.cmdb (addr, len) */
- op50n_cmds.getmem.cmdw = NULL; /* getmem.cmdw (addr, len) */
- op50n_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, len) */
- op50n_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
- op50n_cmds.getmem.resp_delim = " : "; /* getmem.resp_delim */
- op50n_cmds.getmem.term = NULL; /* getmem.term */
- op50n_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
-#endif
- op50n_cmds.setreg.cmd = "x %s %x\r"; /* setreg.cmd (name, value) */
- op50n_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
- op50n_cmds.setreg.term = NULL; /* setreg.term */
- op50n_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
- op50n_cmds.getreg.cmd = "x %s\r"; /* getreg.cmd (name) */
- op50n_cmds.getreg.resp_delim = "="; /* getreg.resp_delim */
- op50n_cmds.getreg.term = " "; /* getreg.term */
- op50n_cmds.getreg.term_cmd = ".\r"; /* getreg.term_cmd */
- op50n_cmds.dump_registers = NULL; /* dump_registers */
- op50n_cmds.register_pattern = NULL; /* register_pattern */
- op50n_cmds.supply_register = NULL; /* supply_register */
- op50n_cmds.load_routine = NULL; /* load routine */
- op50n_cmds.load = "r 0\r"; /* download command */
- op50n_cmds.loadresp = NULL; /* load response */
- op50n_cmds.prompt = "\n#"; /* monitor command prompt */
- op50n_cmds.line_term = "\r"; /* end-of-command delimitor */
- op50n_cmds.cmd_end = NULL; /* optional command terminator */
- op50n_cmds.target = &op50n_ops; /* target operations */
- op50n_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
- op50n_cmds.regnames = op50n_regnames; /* register names */
- op50n_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
-};
-
-static void
-op50n_open (char *args, int from_tty)
-{
- monitor_open (args, &op50n_cmds, from_tty);
-}
-
-void
-_initialize_op50n (void)
-{
- init_op50n_cmds ();
- init_monitor_ops (&op50n_ops);
-
- op50n_ops.to_shortname = "op50n";
- op50n_ops.to_longname = "Oki's debug monitor for the Op50n Eval board";
- op50n_ops.to_doc = "Debug on a Oki OP50N eval board.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- op50n_ops.to_open = op50n_open;
-
- add_target (&op50n_ops);
-}
diff --git a/contrib/gdb/gdb/os9kread.c b/contrib/gdb/gdb/os9kread.c
deleted file mode 100644
index 498498ba2b51..000000000000
--- a/contrib/gdb/gdb/os9kread.c
+++ /dev/null
@@ -1,1621 +0,0 @@
-/* Read os9/os9k 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
- 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 module provides three functions: os9k_symfile_init,
- which initializes to read a symbol file; os9k_new_init, which
- discards existing cached information when all symbols are being
- discarded; and os9k_symfile_read, which reads a symbol table
- from a file.
-
- os9k_symfile_read only does the minimum work necessary for letting the
- user "name" things symbolically; it does not read the entire symtab.
- Instead, it reads the external and static symbols and puts them in partial
- symbol tables. When more extensive information is requested of a
- file, the corresponding partial symbol table is mutated into a full
- fledged symbol table by going back and reading the symbols
- for real. os9k_psymtab_to_symtab() is the function that does this */
-
-#include "defs.h"
-#include "gdb_string.h"
-#include "gdb_assert.h"
-#include <stdio.h>
-
-#if defined(USG) || defined(__CYGNUSCLIB__)
-#include <sys/types.h>
-#include <fcntl.h>
-#endif
-
-#include "obstack.h"
-#include "gdb_stat.h"
-#include "symtab.h"
-#include "breakpoint.h"
-#include "command.h"
-#include "target.h"
-#include "gdbcore.h" /* for bfd stuff */
-#include "libaout.h" /* FIXME Secret internal BFD stuff for a.out */
-#include "symfile.h"
-#include "objfiles.h"
-#include "buildsym.h"
-#include "gdb-stabs.h"
-#include "demangle.h"
-#include "language.h" /* Needed inside partial-stab.h */
-#include "complaints.h"
-#include "os9k.h"
-#include "stabsread.h"
-
-extern void _initialize_os9kread (void);
-
-/* Each partial symbol table entry contains a pointer to private data for the
- read_symtab() function to use when expanding a partial symbol table entry
- to a full symbol table entry.
-
- For dbxread this structure contains the offset within the file symbol table
- of first local symbol for this file, and count of the section
- of the symbol table devoted to this file's symbols (actually, the section
- bracketed may contain more than just this file's symbols). It also contains
- further information needed to locate the symbols if they are in an ELF file.
-
- If ldsymcnt is 0, the only reason for this thing's existence is the
- dependency list. Nothing else will happen when it is read in. */
-
-#define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
-#define LDSYMCNT(p) (((struct symloc *)((p)->read_symtab_private))->ldsymnum)
-
-struct symloc
- {
- int ldsymoff;
- int ldsymnum;
- };
-
-/* Remember what we deduced to be the source language of this psymtab. */
-static enum language psymtab_language = language_unknown;
-
-/* keep partial symbol table file nested depth */
-static int psymfile_depth = 0;
-
-/* keep symbol table file nested depth */
-static int symfile_depth = 0;
-
-extern int previous_stab_code;
-
-/* Name of last function encountered. Used in Solaris to approximate
- object file boundaries. */
-static char *last_function_name;
-
-/* Complaints about the symbols we have encountered. */
-extern struct complaint lbrac_complaint;
-
-extern struct complaint unknown_symtype_complaint;
-
-extern struct complaint unknown_symchar_complaint;
-
-extern struct complaint lbrac_rbrac_complaint;
-
-extern struct complaint repeated_header_complaint;
-
-extern struct complaint repeated_header_name_complaint;
-
-#if 0
-static struct complaint lbrac_unmatched_complaint =
-{"unmatched Increment Block Entry before symtab pos %d", 0, 0};
-
-static struct complaint lbrac_mismatch_complaint =
-{"IBE/IDE symbol mismatch at symtab pos %d", 0, 0};
-#endif
-
-/* Local function prototypes */
-
-static void read_minimal_symbols (struct objfile *);
-
-static void os9k_read_ofile_symtab (struct partial_symtab *);
-
-static void os9k_psymtab_to_symtab (struct partial_symtab *);
-
-static void os9k_psymtab_to_symtab_1 (struct partial_symtab *);
-
-static void read_os9k_psymtab (struct objfile *, CORE_ADDR, int);
-
-static int fill_sym (FILE *, bfd *);
-
-static void os9k_symfile_init (struct objfile *);
-
-static void os9k_new_init (struct objfile *);
-
-static void os9k_symfile_read (struct objfile *, int);
-
-static void os9k_symfile_finish (struct objfile *);
-
-static void
-os9k_process_one_symbol (int, int, CORE_ADDR, char *,
- struct section_offsets *, struct objfile *);
-
-static struct partial_symtab *os9k_start_psymtab (struct objfile *, char *,
- CORE_ADDR, int, int,
- struct partial_symbol **,
- struct partial_symbol **);
-
-static struct partial_symtab *os9k_end_psymtab (struct partial_symtab *,
- char **, int, int, CORE_ADDR,
- struct partial_symtab **,
- int);
-
-static void record_minimal_symbol (char *, CORE_ADDR, int, struct objfile *);
-
-#define HANDLE_RBRAC(val) \
- if ((val) > pst->texthigh) pst->texthigh = (val);
-
-#define SWAP_STBHDR(hdrp, abfd) \
- { \
- (hdrp)->fmtno = bfd_get_16(abfd, (unsigned char *)&(hdrp)->fmtno); \
- (hdrp)->crc = bfd_get_32(abfd, (unsigned char *)&(hdrp)->crc); \
- (hdrp)->offset = bfd_get_32(abfd, (unsigned char *)&(hdrp)->offset); \
- (hdrp)->nsym = bfd_get_32(abfd, (unsigned char *)&(hdrp)->nsym); \
- }
-#define SWAP_STBSYM(symp, abfd) \
- { \
- (symp)->value = bfd_get_32(abfd, (unsigned char *)&(symp)->value); \
- (symp)->type = bfd_get_16(abfd, (unsigned char *)&(symp)->type); \
- (symp)->stroff = bfd_get_32(abfd, (unsigned char *)&(symp)->stroff); \
- }
-#define N_DATA 0
-#define N_BSS 1
-#define N_RDATA 2
-#define N_IDATA 3
-#define N_TEXT 4
-#define N_ABS 6
-
-static void
-record_minimal_symbol (char *name, CORE_ADDR address, int type,
- struct objfile *objfile)
-{
- enum minimal_symbol_type ms_type;
-
- switch (type)
- {
- case N_TEXT:
- ms_type = mst_text;
- address += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
- break;
- case N_DATA:
- ms_type = mst_data;
- break;
- case N_BSS:
- ms_type = mst_bss;
- break;
- case N_RDATA:
- ms_type = mst_bss;
- break;
- case N_IDATA:
- ms_type = mst_data;
- break;
- case N_ABS:
- ms_type = mst_abs;
- break;
- default:
- ms_type = mst_unknown;
- break;
- }
-
- prim_record_minimal_symbol (name, address, ms_type, objfile);
-}
-
-/* read and process .stb file and store in minimal symbol table */
-typedef char mhhdr[80];
-struct stbhdr
- {
- mhhdr comhdr;
- char *name;
- short fmtno;
- int crc;
- int offset;
- int nsym;
- char *pad;
- };
-struct stbsymbol
- {
- int value;
- short type;
- int stroff;
- };
-#define STBSYMSIZE 10
-
-static void
-read_minimal_symbols (struct objfile *objfile)
-{
- FILE *fp;
- bfd *abfd;
- struct stbhdr hdr;
- struct stbsymbol sym;
- int ch, i, j, off;
- char buf[64], buf1[128];
-
- fp = objfile->auxf1;
- if (fp == NULL)
- return;
- abfd = objfile->obfd;
- fread (&hdr.comhdr[0], sizeof (mhhdr), 1, fp);
- i = 0;
- ch = getc (fp);
- while (ch != -1)
- {
- buf[i] = (char) ch;
- i++;
- if (ch == 0)
- break;
- ch = getc (fp);
- };
- if (i % 2)
- ch = getc (fp);
- hdr.name = &buf[0];
-
- fread (&hdr.fmtno, sizeof (hdr.fmtno), 1, fp);
- fread (&hdr.crc, sizeof (hdr.crc), 1, fp);
- fread (&hdr.offset, sizeof (hdr.offset), 1, fp);
- fread (&hdr.nsym, sizeof (hdr.nsym), 1, fp);
- SWAP_STBHDR (&hdr, abfd);
-
- /* read symbols */
- init_minimal_symbol_collection ();
- off = hdr.offset;
- for (i = hdr.nsym; i > 0; i--)
- {
- fseek (fp, (long) off, 0);
- fread (&sym.value, sizeof (sym.value), 1, fp);
- fread (&sym.type, sizeof (sym.type), 1, fp);
- fread (&sym.stroff, sizeof (sym.stroff), 1, fp);
- SWAP_STBSYM (&sym, abfd);
- fseek (fp, (long) sym.stroff, 0);
- j = 0;
- ch = getc (fp);
- while (ch != -1)
- {
- buf1[j] = (char) ch;
- j++;
- if (ch == 0)
- break;
- ch = getc (fp);
- };
- record_minimal_symbol (buf1, sym.value, sym.type & 7, objfile);
- off += STBSYMSIZE;
- };
- install_minimal_symbols (objfile);
- return;
-}
-
-/* Scan and build partial symbols for a symbol file.
- We have been initialized by a call to os9k_symfile_init, which
- put all the relevant info into a "struct os9k_symfile_info",
- hung off the objfile structure.
-
- MAINLINE is true if we are reading the main symbol
- table (as opposed to a shared lib or dynamically loaded file). */
-
-static void
-os9k_symfile_read (struct objfile *objfile, int mainline)
-{
- bfd *sym_bfd;
- struct cleanup *back_to;
-
- sym_bfd = objfile->obfd;
- /* If we are reinitializing, or if we have never loaded syms yet, init */
- if (mainline
- || (objfile->global_psymbols.size == 0
- && objfile->static_psymbols.size == 0))
- init_psymbol_list (objfile, DBX_SYMCOUNT (objfile));
-
- free_pending_blocks ();
- back_to = make_cleanup (really_free_pendings, 0);
-
- make_cleanup_discard_minimal_symbols ();
- read_minimal_symbols (objfile);
-
- /* Now that the symbol table data of the executable file are all in core,
- process them and define symbols accordingly. */
- read_os9k_psymtab (objfile,
- DBX_TEXT_ADDR (objfile),
- DBX_TEXT_SIZE (objfile));
-
- do_cleanups (back_to);
-}
-
-/* Initialize anything that needs initializing when a completely new
- symbol file is specified (not just adding some symbols from another
- file, e.g. a shared library). */
-
-static void
-os9k_new_init (struct objfile *ignore)
-{
- stabsread_new_init ();
- buildsym_new_init ();
- psymfile_depth = 0;
-/*
- init_header_files ();
- */
-}
-
-/* os9k_symfile_init ()
- It is passed a struct objfile which contains, among other things,
- the BFD for the file whose symbols are being read, and a slot for a pointer
- to "private data" which we fill with goodies.
-
- Since BFD doesn't know how to read debug symbols in a format-independent
- way (and may never do so...), we have to do it ourselves. We will never
- be called unless this is an a.out (or very similar) file.
- FIXME, there should be a cleaner peephole into the BFD environment here. */
-
-static void
-os9k_symfile_init (struct objfile *objfile)
-{
- bfd *sym_bfd = objfile->obfd;
- char *name = bfd_get_filename (sym_bfd);
- char dbgname[512], stbname[512];
- FILE *symfile = 0;
- FILE *minfile = 0;
- asection *text_sect;
-
- strcpy (dbgname, name);
- strcat (dbgname, ".dbg");
- strcpy (stbname, name);
- strcat (stbname, ".stb");
-
- if ((symfile = fopen (dbgname, "r")) == NULL)
- {
- warning ("Symbol file %s not found", dbgname);
- }
- objfile->auxf2 = symfile;
-
- if ((minfile = fopen (stbname, "r")) == NULL)
- {
- warning ("Symbol file %s not found", stbname);
- }
- objfile->auxf1 = minfile;
-
- /* Allocate struct to keep track of the symfile */
- objfile->sym_stab_info = (struct dbx_symfile_info *)
- xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));
- DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;
-
- text_sect = bfd_get_section_by_name (sym_bfd, ".text");
- if (!text_sect)
- error ("Can't find .text section in file");
- DBX_TEXT_ADDR (objfile) = bfd_section_vma (sym_bfd, text_sect);
- DBX_TEXT_SIZE (objfile) = bfd_section_size (sym_bfd, text_sect);
-
- DBX_SYMBOL_SIZE (objfile) = 0; /* variable size symbol */
- DBX_SYMCOUNT (objfile) = 0; /* used to be bfd_get_symcount(sym_bfd) */
- DBX_SYMTAB_OFFSET (objfile) = 0; /* used to be SYMBOL_TABLE_OFFSET */
-}
-
-/* Perform any local cleanups required when we are done with a particular
- objfile. I.E, we are in the process of discarding all symbol information
- for an objfile, freeing up all memory held for it, and unlinking the
- objfile struct from the global list of known objfiles. */
-
-static void
-os9k_symfile_finish (struct objfile *objfile)
-{
- if (objfile->sym_stab_info != NULL)
- {
- xmfree (objfile->md, objfile->sym_stab_info);
- }
-/*
- free_header_files ();
- */
-}
-
-
-struct st_dbghdr
-{
- int sync;
- short rev;
- int crc;
- short os;
- short cpu;
-};
-#define SYNC (int)0xefbefeca
-
-#define SWAP_DBGHDR(hdrp, abfd) \
- { \
- (hdrp)->sync = bfd_get_32(abfd, (unsigned char *)&(hdrp)->sync); \
- (hdrp)->rev = bfd_get_16(abfd, (unsigned char *)&(hdrp)->rev); \
- (hdrp)->crc = bfd_get_32(abfd, (unsigned char *)&(hdrp)->crc); \
- (hdrp)->os = bfd_get_16(abfd, (unsigned char *)&(hdrp)->os); \
- (hdrp)->cpu = bfd_get_16(abfd, (unsigned char *)&(hdrp)->cpu); \
- }
-
-#define N_SYM_CMPLR 0
-#define N_SYM_SLINE 1
-#define N_SYM_SYM 2
-#define N_SYM_LBRAC 3
-#define N_SYM_RBRAC 4
-#define N_SYM_SE 5
-
-struct internal_symstruct
- {
- short n_type;
- short n_desc;
- long n_value;
- char *n_strx;
- };
-static struct internal_symstruct symbol;
-static struct internal_symstruct *symbuf = &symbol;
-static char strbuf[4096];
-static struct st_dbghdr dbghdr;
-static short cmplrid;
-
-#define VER_PRE_ULTRAC ((short)4)
-#define VER_ULTRAC ((short)5)
-
-static int
-fill_sym (FILE *dbg_file, bfd *abfd)
-{
- short si, nmask;
- long li;
- int ii;
- char *p;
-
- int nbytes = fread (&si, sizeof (si), 1, dbg_file);
- if (nbytes == 0)
- return 0;
- if (nbytes < 0)
- perror_with_name ("reading .dbg file.");
- symbuf->n_desc = 0;
- symbuf->n_value = 0;
- symbuf->n_strx = NULL;
- symbuf->n_type = bfd_get_16 (abfd, (unsigned char *) &si);
- symbuf->n_type = 0xf & symbuf->n_type;
- switch (symbuf->n_type)
- {
- case N_SYM_CMPLR:
- fread (&si, sizeof (si), 1, dbg_file);
- symbuf->n_desc = bfd_get_16 (abfd, (unsigned char *) &si);
- cmplrid = symbuf->n_desc & 0xff;
- break;
- case N_SYM_SLINE:
- fread (&li, sizeof (li), 1, dbg_file);
- symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
- fread (&li, sizeof (li), 1, dbg_file);
- li = bfd_get_32 (abfd, (unsigned char *) &li);
- symbuf->n_strx = (char *) (li >> 12);
- symbuf->n_desc = li & 0xfff;
- break;
- case N_SYM_SYM:
- fread (&li, sizeof (li), 1, dbg_file);
- symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
- si = 0;
- do
- {
- ii = getc (dbg_file);
- strbuf[si++] = (char) ii;
- }
- while (ii != 0 || si % 2 != 0);
- symbuf->n_strx = strbuf;
- p = (char *) strchr (strbuf, ':');
- if (!p)
- break;
- if ((p[1] == 'F' || p[1] == 'f') && cmplrid == VER_PRE_ULTRAC)
- {
- fread (&si, sizeof (si), 1, dbg_file);
- nmask = bfd_get_16 (abfd, (unsigned char *) &si);
- for (ii = 0; ii < nmask; ii++)
- fread (&si, sizeof (si), 1, dbg_file);
- }
- break;
- case N_SYM_LBRAC:
- fread (&li, sizeof (li), 1, dbg_file);
- symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
- break;
- case N_SYM_RBRAC:
- fread (&li, sizeof (li), 1, dbg_file);
- symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
- break;
- case N_SYM_SE:
- break;
- }
- return 1;
-}
-
-/* Given pointers to an a.out symbol table in core containing dbx
- style data, setup partial_symtab's describing each source file for
- which debugging information is available.
- SYMFILE_NAME is the name of the file we are reading from. */
-
-static void
-read_os9k_psymtab (struct objfile *objfile, CORE_ADDR text_addr, int text_size)
-{
- register struct internal_symstruct *bufp = 0; /* =0 avoids gcc -Wall glitch */
- register char *namestring;
- int past_first_source_file = 0;
- CORE_ADDR last_o_file_start = 0;
-#if 0
- struct cleanup *back_to;
-#endif
- bfd *abfd;
- FILE *fp;
-
- /* End of the text segment of the executable file. */
- static CORE_ADDR end_of_text_addr;
-
- /* Current partial symtab */
- static struct partial_symtab *pst = 0;
-
- /* List of current psymtab's include files */
- char **psymtab_include_list;
- int includes_allocated;
- int includes_used;
-
- /* Index within current psymtab dependency list */
- struct partial_symtab **dependency_list;
- int dependencies_used, dependencies_allocated;
-
- includes_allocated = 30;
- includes_used = 0;
- psymtab_include_list = (char **) alloca (includes_allocated *
- sizeof (char *));
-
- dependencies_allocated = 30;
- dependencies_used = 0;
- dependency_list =
- (struct partial_symtab **) alloca (dependencies_allocated *
- sizeof (struct partial_symtab *));
-
- last_source_file = NULL;
-
-#ifdef END_OF_TEXT_DEFAULT
- end_of_text_addr = END_OF_TEXT_DEFAULT;
-#else
- end_of_text_addr = text_addr + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))
- + text_size; /* Relocate */
-#endif
-
- abfd = objfile->obfd;
- fp = objfile->auxf2;
- if (!fp)
- return;
-
- fread (&dbghdr.sync, sizeof (dbghdr.sync), 1, fp);
- fread (&dbghdr.rev, sizeof (dbghdr.rev), 1, fp);
- fread (&dbghdr.crc, sizeof (dbghdr.crc), 1, fp);
- fread (&dbghdr.os, sizeof (dbghdr.os), 1, fp);
- fread (&dbghdr.cpu, sizeof (dbghdr.cpu), 1, fp);
- SWAP_DBGHDR (&dbghdr, abfd);
-
- symnum = 0;
- while (1)
- {
- int ret;
- long cursymoffset;
-
- /* Get the symbol for this run and pull out some info */
- QUIT; /* allow this to be interruptable */
- cursymoffset = ftell (objfile->auxf2);
- ret = fill_sym (objfile->auxf2, abfd);
- if (ret <= 0)
- break;
- else
- symnum++;
- bufp = symbuf;
-
- /* Special case to speed up readin. */
- if (bufp->n_type == (short) N_SYM_SLINE)
- continue;
-
-#define CUR_SYMBOL_VALUE bufp->n_value
- /* partial-stab.h */
-
- switch (bufp->n_type)
- {
- char *p;
-
- case N_SYM_CMPLR:
- continue;
-
- case N_SYM_SE:
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
- if (psymfile_depth == 1 && pst)
- {
- os9k_end_psymtab (pst, psymtab_include_list, includes_used,
- symnum, CUR_SYMBOL_VALUE,
- dependency_list, dependencies_used);
- pst = (struct partial_symtab *) 0;
- includes_used = 0;
- dependencies_used = 0;
- }
- psymfile_depth--;
- continue;
-
- case N_SYM_SYM: /* Typedef or automatic variable. */
- namestring = bufp->n_strx;
- p = (char *) strchr (namestring, ':');
- if (!p)
- continue; /* Not a debugging symbol. */
-
- /* Main processing section for debugging symbols which
- the initial read through the symbol tables needs to worry
- about. If we reach this point, the symbol which we are
- considering is definitely one we are interested in.
- p must also contain the (valid) index into the namestring
- which indicates the debugging type symbol. */
-
- switch (p[1])
- {
- case 'S':
- {
- unsigned long valu;
- enum language tmp_language;
- char *str, *p;
- int n;
-
- valu = CUR_SYMBOL_VALUE;
- if (valu)
- valu += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
- past_first_source_file = 1;
-
- p = strchr (namestring, ':');
- if (p)
- n = p - namestring;
- else
- n = strlen (namestring);
- str = alloca (n + 1);
- strncpy (str, namestring, n);
- str[n] = '\0';
-
- if (psymfile_depth == 0)
- {
- if (!pst)
- pst = os9k_start_psymtab (objfile,
- str, valu,
- cursymoffset,
- symnum - 1,
- objfile->global_psymbols.next,
- objfile->static_psymbols.next);
- }
- else
- { /* this is a include file */
- tmp_language = deduce_language_from_filename (str);
- if (tmp_language != language_unknown
- && (tmp_language != language_c
- || psymtab_language != language_cplus))
- psymtab_language = tmp_language;
-
-/*
- if (pst && STREQ (str, pst->filename))
- continue;
- {
- register int i;
- for (i = 0; i < includes_used; i++)
- if (STREQ (str, psymtab_include_list[i]))
- {
- i = -1;
- break;
- }
- if (i == -1)
- continue;
- }
- */
-
- psymtab_include_list[includes_used++] = str;
- if (includes_used >= includes_allocated)
- {
- char **orig = psymtab_include_list;
-
- psymtab_include_list = (char **)
- alloca ((includes_allocated *= 2) * sizeof (char *));
- memcpy ((PTR) psymtab_include_list, (PTR) orig,
- includes_used * sizeof (char *));
- }
-
- }
- psymfile_depth++;
- continue;
- }
-
- case 'v':
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_STATIC,
- &objfile->static_psymbols,
- 0, CUR_SYMBOL_VALUE,
- psymtab_language, objfile);
- continue;
- case 'V':
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_STATIC,
- &objfile->global_psymbols,
- 0, CUR_SYMBOL_VALUE,
- psymtab_language, objfile);
- continue;
-
- case 'T':
- if (p != namestring) /* a name is there, not just :T... */
- {
- add_psymbol_to_list (namestring, p - namestring,
- STRUCT_NAMESPACE, LOC_TYPEDEF,
- &objfile->static_psymbols,
- CUR_SYMBOL_VALUE, 0,
- psymtab_language, objfile);
- if (p[2] == 't')
- {
- /* Also a typedef with the same name. */
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_TYPEDEF,
- &objfile->static_psymbols,
- CUR_SYMBOL_VALUE, 0, 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,
- CUR_SYMBOL_VALUE, 0, psymtab_language,
- objfile);
- }
- }
- goto check_enum;
- case 't':
- if (p != namestring) /* a name is there, not just :T... */
- {
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_TYPEDEF,
- &objfile->static_psymbols,
- CUR_SYMBOL_VALUE, 0,
- psymtab_language, objfile);
- }
- check_enum:
- /* If this is an enumerated type, we need to
- add all the enum constants to the partial symbol
- table. This does not cover enums without names, e.g.
- "enum {a, b} c;" in C, but fortunately those are
- rare. There is no way for GDB to find those from the
- enum type without spending too much time on it. Thus
- to solve this problem, the compiler needs to put out the
- enum in a nameless type. GCC2 does this. */
-
- /* We are looking for something of the form
- <name> ":" ("t" | "T") [<number> "="] "e" <size>
- {<constant> ":" <value> ","} ";". */
-
- /* Skip over the colon and the 't' or 'T'. */
- p += 2;
- /* This type may be given a number. Also, numbers can come
- in pairs like (0,26). Skip over it. */
- while ((*p >= '0' && *p <= '9')
- || *p == '(' || *p == ',' || *p == ')'
- || *p == '=')
- p++;
-
- if (*p++ == 'e')
- {
- /* We have found an enumerated type. skip size */
- while (*p >= '0' && *p <= '9')
- p++;
- /* According to comments in read_enum_type
- a comma could end it instead of a semicolon.
- I don't know where that happens.
- Accept either. */
- while (*p && *p != ';' && *p != ',')
- {
- char *q;
-
- /* Check for and handle cretinous dbx symbol name
- continuation!
- if (*p == '\\')
- p = next_symbol_text (objfile);
- */
-
- /* Point to the character after the name
- of the enum constant. */
- for (q = p; *q && *q != ':'; q++)
- ;
- /* Note that the value doesn't matter for
- enum constants in psymtabs, just in symtabs. */
- add_psymbol_to_list (p, q - p,
- VAR_NAMESPACE, LOC_CONST,
- &objfile->static_psymbols, 0,
- 0, psymtab_language, objfile);
- /* Point past the name. */
- p = q;
- /* Skip over the value. */
- while (*p && *p != ',')
- p++;
- /* Advance past the comma. */
- if (*p)
- p++;
- }
- }
- continue;
- case 'c':
- /* Constant, e.g. from "const" in Pascal. */
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_CONST,
- &objfile->static_psymbols, CUR_SYMBOL_VALUE,
- 0, psymtab_language, objfile);
- continue;
-
- case 'f':
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
- if (pst && pst->textlow == 0)
- pst->textlow = CUR_SYMBOL_VALUE;
-
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_BLOCK,
- &objfile->static_psymbols, CUR_SYMBOL_VALUE,
- 0, psymtab_language, objfile);
- continue;
-
- case 'F':
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
- if (pst && pst->textlow == 0)
- pst->textlow = CUR_SYMBOL_VALUE;
-
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_BLOCK,
- &objfile->global_psymbols, CUR_SYMBOL_VALUE,
- 0, psymtab_language, objfile);
- continue;
-
- case 'p':
- case 'l':
- case 's':
- continue;
-
- case ':':
- /* It is a C++ nested symbol. We don't need to record it
- (I don't think); if we try to look up foo::bar::baz,
- then symbols for the symtab containing foo should get
- read in, I think. */
- /* Someone says sun cc puts out symbols like
- /foo/baz/maclib::/usr/local/bin/maclib,
- which would get here with a symbol type of ':'. */
- continue;
-
- default:
- /* Unexpected symbol descriptor. The second and subsequent stabs
- of a continued stab can show up here. The question is
- whether they ever can mimic a normal stab--it would be
- nice if not, since we certainly don't want to spend the
- time searching to the end of every string looking for
- a backslash. */
-
- complain (&unknown_symchar_complaint, p[1]);
- continue;
- }
-
- case N_SYM_RBRAC:
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-#ifdef HANDLE_RBRAC
- HANDLE_RBRAC (CUR_SYMBOL_VALUE);
- continue;
-#endif
- case N_SYM_LBRAC:
- continue;
-
- default:
- /* If we haven't found it yet, ignore it. It's probably some
- new type we don't know about yet. */
- complain (&unknown_symtype_complaint,
- local_hex_string ((unsigned long) bufp->n_type));
- continue;
- }
- }
-
- DBX_SYMCOUNT (objfile) = symnum;
-
- /* If there's stuff to be cleaned up, clean it up. */
- if (DBX_SYMCOUNT (objfile) > 0
-/*FIXME, does this have a bug at start address 0? */
- && last_o_file_start
- && objfile->ei.entry_point < bufp->n_value
- && objfile->ei.entry_point >= last_o_file_start)
- {
- objfile->ei.entry_file_lowpc = last_o_file_start;
- objfile->ei.entry_file_highpc = bufp->n_value;
- }
-
- if (pst)
- {
- os9k_end_psymtab (pst, psymtab_include_list, includes_used,
- symnum, end_of_text_addr,
- dependency_list, dependencies_used);
- }
-/*
- do_cleanups (back_to);
- */
-}
-
-/* Allocate and partially fill a partial symtab. It will be
- completely filled at the end of the symbol list.
-
- SYMFILE_NAME is the name of the symbol-file we are reading from, and ADDR
- is the address relative to which its symbols are (incremental) or 0
- (normal). */
-
-
-static struct partial_symtab *
-os9k_start_psymtab (struct objfile *objfile, char *filename, CORE_ADDR textlow,
- int ldsymoff, int ldsymcnt,
- struct partial_symbol **global_syms,
- struct partial_symbol **static_syms)
-{
- struct partial_symtab *result =
- start_psymtab_common (objfile, objfile->section_offsets,
- filename, textlow, global_syms, static_syms);
-
- result->read_symtab_private = (char *)
- obstack_alloc (&objfile->psymbol_obstack, sizeof (struct symloc));
-
- LDSYMOFF (result) = ldsymoff;
- LDSYMCNT (result) = ldsymcnt;
- result->read_symtab = os9k_psymtab_to_symtab;
-
- /* Deduce the source language from the filename for this psymtab. */
- psymtab_language = deduce_language_from_filename (filename);
- return result;
-}
-
-/* Close off the current usage of PST.
- Returns PST or NULL if the partial symtab was empty and thrown away.
- FIXME: List variables and peculiarities of same. */
-
-static struct partial_symtab *
-os9k_end_psymtab (struct partial_symtab *pst, char **include_list,
- int num_includes, int capping_symbol_cnt,
- CORE_ADDR capping_text,
- struct partial_symtab **dependency_list,
- int number_dependencies)
-{
- int i;
- struct partial_symtab *p1;
- struct objfile *objfile = pst->objfile;
-
- if (capping_symbol_cnt != -1)
- LDSYMCNT (pst) = capping_symbol_cnt - LDSYMCNT (pst);
-
- /* Under Solaris, the N_SO symbols always have a value of 0,
- instead of the usual address of the .o file. Therefore,
- we have to do some tricks to fill in texthigh and textlow.
- The first trick is in partial-stab.h: if we see a static
- or global function, and the textlow for the current pst
- is still 0, then we use that function's address for
- the textlow of the pst.
-
- Now, to fill in texthigh, we remember the last function seen
- in the .o file (also in partial-stab.h). Also, there's a hack in
- bfd/elf.c and gdb/elfread.c to pass the ELF st_size field
- to here via the misc_info field. Therefore, we can fill in
- a reliable texthigh by taking the address plus size of the
- last function in the file.
-
- Unfortunately, that does not cover the case where the last function
- in the file is static. See the paragraph below for more comments
- on this situation.
-
- Finally, if we have a valid textlow for the current file, we run
- down the partial_symtab_list filling in previous texthighs that
- are still unknown. */
-
- if (pst->texthigh == 0 && last_function_name)
- {
- char *p;
- int n;
- struct minimal_symbol *minsym;
-
- p = strchr (last_function_name, ':');
- if (p == NULL)
- p = last_function_name;
- n = p - last_function_name;
- p = alloca (n + 1);
- strncpy (p, last_function_name, n);
- p[n] = 0;
-
- minsym = lookup_minimal_symbol (p, NULL, objfile);
-
- if (minsym)
- {
- pst->texthigh = SYMBOL_VALUE_ADDRESS (minsym) + (long) MSYMBOL_INFO (minsym);
- }
- else
- {
- /* This file ends with a static function, and it's
- difficult to imagine how hard it would be to track down
- the elf symbol. Luckily, most of the time no one will notice,
- since the next file will likely be compiled with -g, so
- the code below will copy the first fuction's start address
- back to our texthigh variable. (Also, if this file is the
- last one in a dynamically linked program, texthigh already
- has the right value.) If the next file isn't compiled
- with -g, then the last function in this file winds up owning
- all of the text space up to the next -g file, or the end (minus
- shared libraries). This only matters for single stepping,
- and even then it will still work, except that it will single
- step through all of the covered functions, instead of setting
- breakpoints around them as it usualy does. This makes it
- pretty slow, but at least it doesn't fail.
-
- We can fix this with a fairly big change to bfd, but we need
- to coordinate better with Cygnus if we want to do that. FIXME. */
- }
- last_function_name = NULL;
- }
-
- /* this test will be true if the last .o file is only data */
- if (pst->textlow == 0)
- pst->textlow = pst->texthigh;
-
- /* If we know our own starting text address, then walk through all other
- psymtabs for this objfile, and if any didn't know their ending text
- address, set it to our starting address. Take care to not set our
- own ending address to our starting address, nor to set addresses on
- `dependency' files that have both textlow and texthigh zero. */
- if (pst->textlow)
- {
- ALL_OBJFILE_PSYMTABS (objfile, p1)
- {
- if (p1->texthigh == 0 && p1->textlow != 0 && p1 != pst)
- {
- p1->texthigh = pst->textlow;
- /* if this file has only data, then make textlow match texthigh */
- if (p1->textlow == 0)
- p1->textlow = p1->texthigh;
- }
- }
- }
-
- /* End of kludge for patching Solaris textlow and texthigh. */
-
- pst->n_global_syms =
- objfile->global_psymbols.next - (objfile->global_psymbols.list + pst->globals_offset);
- pst->n_static_syms =
- objfile->static_psymbols.next - (objfile->static_psymbols.list + pst->statics_offset);
-
- pst->number_of_dependencies = number_dependencies;
- if (number_dependencies)
- {
- pst->dependencies = (struct partial_symtab **)
- obstack_alloc (&objfile->psymbol_obstack,
- number_dependencies * sizeof (struct partial_symtab *));
- memcpy (pst->dependencies, dependency_list,
- number_dependencies * sizeof (struct partial_symtab *));
- }
- else
- pst->dependencies = 0;
-
- for (i = 0; i < num_includes; i++)
- {
- struct partial_symtab *subpst =
- allocate_psymtab (include_list[i], objfile);
-
- subpst->section_offsets = pst->section_offsets;
- subpst->read_symtab_private =
- (char *) obstack_alloc (&objfile->psymbol_obstack,
- sizeof (struct symloc));
- LDSYMOFF (subpst) =
- LDSYMCNT (subpst) =
- subpst->textlow =
- subpst->texthigh = 0;
-
- /* We could save slight bits of space by only making one of these,
- shared by the entire set of include files. FIXME-someday. */
- subpst->dependencies = (struct partial_symtab **)
- obstack_alloc (&objfile->psymbol_obstack,
- sizeof (struct partial_symtab *));
- subpst->dependencies[0] = pst;
- subpst->number_of_dependencies = 1;
-
- subpst->globals_offset =
- subpst->n_global_syms =
- subpst->statics_offset =
- subpst->n_static_syms = 0;
-
- subpst->readin = 0;
- subpst->symtab = 0;
- subpst->read_symtab = pst->read_symtab;
- }
-
- sort_pst_symbols (pst);
-
- /* If there is already a psymtab or symtab for a file of this name,
- remove it.
- (If there is a symtab, more drastic things also happen.)
- This happens in VxWorks. */
- free_named_symtabs (pst->filename);
-
- if (num_includes == 0
- && number_dependencies == 0
- && pst->n_global_syms == 0
- && pst->n_static_syms == 0)
- {
- /* Throw away this psymtab, it's empty. We can't deallocate it, since
- it is on the obstack, but we can forget to chain it on the list. */
- /* Indicate that psymtab was thrown away. */
-
- discard_psymtab (pst);
-
- pst = (struct partial_symtab *) NULL;
- }
- return pst;
-}
-
-static void
-os9k_psymtab_to_symtab_1 (struct partial_symtab *pst)
-{
- struct cleanup *old_chain;
- int i;
-
- if (!pst)
- return;
-
- if (pst->readin)
- {
- fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. Shouldn't happen.\n",
- pst->filename);
- return;
- }
-
- /* Read in all partial symtabs on which this one is dependent */
- for (i = 0; i < pst->number_of_dependencies; i++)
- if (!pst->dependencies[i]->readin)
- {
- /* Inform about additional files that need to be read in. */
- if (info_verbose)
- {
- fputs_filtered (" ", gdb_stdout);
- wrap_here ("");
- fputs_filtered ("and ", gdb_stdout);
- wrap_here ("");
- printf_filtered ("%s...", pst->dependencies[i]->filename);
- wrap_here (""); /* Flush output */
- gdb_flush (gdb_stdout);
- }
- os9k_psymtab_to_symtab_1 (pst->dependencies[i]);
- }
-
- if (LDSYMCNT (pst)) /* Otherwise it's a dummy */
- {
- /* Init stuff necessary for reading in symbols */
- stabsread_init ();
- buildsym_init ();
- old_chain = make_cleanup (really_free_pendings, 0);
-
- /* Read in this file's symbols */
- os9k_read_ofile_symtab (pst);
- sort_symtab_syms (pst->symtab);
- do_cleanups (old_chain);
- }
-
- pst->readin = 1;
-}
-
-/* Read in all of the symbols for a given psymtab for real.
- Be verbose about it if the user wants that. */
-
-static void
-os9k_psymtab_to_symtab (struct partial_symtab *pst)
-{
- bfd *sym_bfd;
-
- if (!pst)
- return;
-
- if (pst->readin)
- {
- fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. Shouldn't happen.\n",
- pst->filename);
- return;
- }
-
- if (LDSYMCNT (pst) || pst->number_of_dependencies)
- {
- /* Print the message now, before reading the string table,
- to avoid disconcerting pauses. */
- if (info_verbose)
- {
- printf_filtered ("Reading in symbols for %s...", pst->filename);
- gdb_flush (gdb_stdout);
- }
-
- sym_bfd = pst->objfile->obfd;
- os9k_psymtab_to_symtab_1 (pst);
-
- /* 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);
-
- /* Finish up the debug error message. */
- if (info_verbose)
- printf_filtered ("done.\n");
- }
-}
-
-/* Read in a defined section of a specific object file's symbols. */
-static void
-os9k_read_ofile_symtab (struct partial_symtab *pst)
-{
- register struct internal_symstruct *bufp;
- unsigned char type;
- unsigned max_symnum;
- register bfd *abfd;
- struct objfile *objfile;
- int sym_offset; /* Offset to start of symbols to read */
- CORE_ADDR text_offset; /* Start of text segment for symbols */
- int text_size; /* Size of text segment for symbols */
- FILE *dbg_file;
-
- objfile = pst->objfile;
- sym_offset = LDSYMOFF (pst);
- max_symnum = LDSYMCNT (pst);
- text_offset = pst->textlow;
- text_size = pst->texthigh - pst->textlow;
-
- current_objfile = objfile;
- subfile_stack = NULL;
- last_source_file = NULL;
-
- abfd = objfile->obfd;
- dbg_file = objfile->auxf2;
-
-#if 0
- /* It is necessary to actually read one symbol *before* the start
- of this symtab's symbols, because the GCC_COMPILED_FLAG_SYMBOL
- occurs before the N_SO symbol.
- Detecting this in read_dbx_symtab
- would slow down initial readin, so we look for it here instead. */
- if (!processing_acc_compilation && sym_offset >= (int) symbol_size)
- {
- fseek (objefile->auxf2, sym_offset, SEEK_CUR);
- fill_sym (objfile->auxf2, abfd);
- bufp = symbuf;
-
- processing_gcc_compilation = 0;
- if (bufp->n_type == N_TEXT)
- {
- if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
- processing_gcc_compilation = 1;
- else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
- processing_gcc_compilation = 2;
- }
-
- /* Try to select a C++ demangling based on the compilation unit
- producer. */
-
- if (processing_gcc_compilation)
- {
- if (AUTO_DEMANGLING)
- {
- set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
- }
- }
- }
- else
- {
- /* 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);
- processing_gcc_compilation = 0;
- }
-#endif /* 0 */
-
- fseek (dbg_file, (long) sym_offset, 0);
-/*
- if (bufp->n_type != (unsigned char)N_SYM_SYM)
- error("First symbol in segment of executable not a source symbol");
- */
-
- for (symnum = 0; symnum < max_symnum; symnum++)
- {
- QUIT; /* Allow this to be interruptable */
- fill_sym (dbg_file, abfd);
- bufp = symbuf;
- type = bufp->n_type;
-
- os9k_process_one_symbol ((int) type, (int) bufp->n_desc,
- (CORE_ADDR) bufp->n_value, bufp->n_strx, pst->section_offsets, objfile);
-
- /* We skip checking for a new .o or -l file; that should never
- happen in this routine. */
-#if 0
- else
- if (type == N_TEXT)
- {
- /* I don't think this code will ever be executed, because
- the GCC_COMPILED_FLAG_SYMBOL usually is right before
- the N_SO symbol which starts this source file.
- However, there is no reason not to accept
- the GCC_COMPILED_FLAG_SYMBOL anywhere. */
-
- if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
- processing_gcc_compilation = 1;
- else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
- processing_gcc_compilation = 2;
-
- if (AUTO_DEMANGLING)
- {
- set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
- }
- }
- else if (type & N_EXT || type == (unsigned char) N_TEXT
- || type == (unsigned char) N_NBTEXT
- )
- {
- /* Global symbol: see if we came across a dbx defintion for
- a corresponding symbol. If so, store the value. Remove
- syms from the chain when their values are stored, but
- search the whole chain, as there may be several syms from
- different files with the same name. */
- /* This is probably not true. Since the files will be read
- in one at a time, each reference to a global symbol will
- be satisfied in each file as it appears. So we skip this
- section. */
- ;
- }
-#endif /* 0 */
- }
-
- current_objfile = NULL;
-
- /* In a Solaris elf file, this variable, which comes from the
- value of the N_SO symbol, will still be 0. Luckily, text_offset,
- which comes from pst->textlow is correct. */
- if (last_source_start_addr == 0)
- last_source_start_addr = text_offset;
- pst->symtab = end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
- end_stabs ();
-}
-
-
-/* This handles a single symbol from the symbol-file, building symbols
- into a GDB symtab. It takes these arguments and an implicit argument.
-
- TYPE is the type field of the ".stab" symbol entry.
- DESC is the desc field of the ".stab" entry.
- VALU is the value field of the ".stab" entry.
- NAME is the symbol name, in our address space.
- SECTION_OFFSETS is a set of amounts by which the sections of this object
- file were relocated when it was loaded into memory.
- All symbols that refer
- to memory locations need to be offset by these amounts.
- OBJFILE is the object file from which we are reading symbols.
- It is used in end_symtab. */
-
-static void
-os9k_process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
- struct section_offsets *section_offsets,
- struct objfile *objfile)
-{
- register struct context_stack *new;
- /* The stab type used for the definition of the last function.
- N_STSYM or N_GSYM for SunOS4 acc; N_FUN for other compilers. */
- static int function_stab_type = 0;
-
-#if 0
- /* Something is wrong if we see real data before
- seeing a source file name. */
- if (last_source_file == NULL && type != (unsigned char) N_SO)
- {
- /* Ignore any symbols which appear before an N_SO symbol.
- Currently no one puts symbols there, but we should deal
- gracefully with the case. A complain()t might be in order,
- but this should not be an error (). */
- return;
- }
-#endif /* 0 */
-
- switch (type)
- {
- case N_SYM_LBRAC:
- /* On most machines, the block addresses are relative to the
- N_SO, the linker did not relocate them (sigh). */
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
- new = push_context (desc, valu);
- break;
-
- case N_SYM_RBRAC:
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
- new = pop_context ();
-
-#if !defined (OS9K_VARIABLES_INSIDE_BLOCK)
-#define OS9K_VARIABLES_INSIDE_BLOCK(desc, gcc_p) 1
-#endif
-
- if (!OS9K_VARIABLES_INSIDE_BLOCK (desc, processing_gcc_compilation))
- local_symbols = new->locals;
-
- if (context_stack_depth > 1)
- {
- /* This is not the outermost LBRAC...RBRAC pair in the function,
- its local symbols preceded it, and are the ones just recovered
- from the context stack. Define the block for them (but don't
- bother if the block contains no symbols. Should we complain
- on blocks without symbols? I can't think of any useful purpose
- for them). */
- if (local_symbols != NULL)
- {
- /* Muzzle a compiler bug that makes end < start. (which
- compilers? Is this ever harmful?). */
- if (new->start_addr > valu)
- {
- complain (&lbrac_rbrac_complaint);
- new->start_addr = valu;
- }
- /* Make a block for the local symbols within. */
- finish_block (0, &local_symbols, new->old_blocks,
- new->start_addr, valu, objfile);
- }
- }
- else
- {
- if (context_stack_depth == 0)
- {
- within_function = 0;
- /* Make a block for the local symbols within. */
- finish_block (new->name, &local_symbols, new->old_blocks,
- new->start_addr, valu, objfile);
- }
- else
- {
- /* attach local_symbols to the end of new->locals */
- if (!new->locals)
- new->locals = local_symbols;
- else
- {
- struct pending *p;
-
- p = new->locals;
- while (p->next)
- p = p->next;
- p->next = local_symbols;
- }
- }
- }
-
- if (OS9K_VARIABLES_INSIDE_BLOCK (desc, processing_gcc_compilation))
- /* Now pop locals of block just finished. */
- local_symbols = new->locals;
- break;
-
-
- case N_SYM_SLINE:
- /* This type of "symbol" really just records
- one line-number -- core-address correspondence.
- Enter it in the line list for this symbol table. */
- /* Relocate for dynamic loading and for ELF acc fn-relative syms. */
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
- /* FIXME: loses if sizeof (char *) > sizeof (int) */
- gdb_assert (sizeof (name) <= sizeof (int));
- record_line (current_subfile, (int) name, valu);
- break;
-
- /* The following symbol types need to have the appropriate offset added
- to their value; then we process symbol definitions in the name. */
- case N_SYM_SYM:
-
- if (name)
- {
- char deftype;
- char *dirn, *n;
- char *p = strchr (name, ':');
- if (p == NULL)
- deftype = '\0';
- else
- deftype = p[1];
-
-
- switch (deftype)
- {
- case 'S':
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
- n = strrchr (name, '/');
- if (n != NULL)
- {
- *n = '\0';
- n++;
- dirn = name;
- }
- else
- {
- n = name;
- dirn = NULL;
- }
- *p = '\0';
- if (symfile_depth++ == 0)
- {
- if (last_source_file)
- {
- end_symtab (valu, objfile, SECT_OFF_TEXT (objfile));
- end_stabs ();
- }
- start_stabs ();
- os9k_stabs = 1;
- start_symtab (n, dirn, valu);
- record_debugformat ("OS9");
- }
- else
- {
- push_subfile ();
- start_subfile (n, dirn != NULL ? dirn : current_subfile->dirname);
- }
- break;
-
- case 'f':
- case 'F':
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
- function_stab_type = type;
-
- within_function = 1;
- new = push_context (0, valu);
- new->name = define_symbol (valu, name, desc, type, objfile);
- break;
-
- case 'V':
- case 'v':
- valu += ANOFFSET (section_offsets, SECT_OFF_DATA (objfile));
- define_symbol (valu, name, desc, type, objfile);
- break;
-
- default:
- define_symbol (valu, name, desc, type, objfile);
- break;
- }
- }
- break;
-
- case N_SYM_SE:
- if (--symfile_depth != 0)
- start_subfile (pop_subfile (), current_subfile->dirname);
- break;
-
- default:
- complain (&unknown_symtype_complaint,
- local_hex_string ((unsigned long) type));
- /* FALLTHROUGH */
- break;
-
- case N_SYM_CMPLR:
- break;
- }
- previous_stab_code = type;
-}
-
-static struct sym_fns os9k_sym_fns =
-{
- bfd_target_os9k_flavour,
- os9k_new_init, /* sym_new_init: init anything gbl to entire symtab */
- os9k_symfile_init, /* sym_init: read initial info, setup for sym_read() */
- os9k_symfile_read, /* sym_read: read a symbol file into symtab */
- os9k_symfile_finish, /* sym_finish: finished with file, cleanup */
- default_symfile_offsets, /* sym_offsets: parse user's offsets to internal form */
- NULL /* next: pointer to next struct sym_fns */
-};
-
-void
-_initialize_os9kread (void)
-{
- add_symtab_fns (&os9k_sym_fns);
-}
diff --git a/contrib/gdb/gdb/partial-stab.h b/contrib/gdb/gdb/partial-stab.h
deleted file mode 100644
index d74c1c9ca5f4..000000000000
--- a/contrib/gdb/gdb/partial-stab.h
+++ /dev/null
@@ -1,812 +0,0 @@
-/* Shared code to pre-read a stab (dbx-style), when building a psymtab.
- Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 1998
- Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* The following need to be defined:
- SET_NAMESTRING() --Set namestring to name of symbol.
- CUR_SYMBOL_TYPE --Type code of current symbol.
- CUR_SYMBOL_VALUE --Value field of current symbol. May be adjusted here.
- namestring - variable pointing to the name of the stab.
- section_offsets - variable pointing to the section offsets.
- pst - the partial symbol table being built.
-
- psymtab_include_list, includes_used, includes_allocated - list of include
- file names (N_SOL) seen so far.
- dependency_list, dependencies_used, dependencies_allocated - list of
- N_EXCL stabs seen so far.
-
- END_PSYMTAB -- end a partial symbol table.
- START_PSYMTAB -- start a partial symbol table.
- */
-
-/* End of macro definitions, now let's handle them symbols! */
-
- switch (CUR_SYMBOL_TYPE)
- {
- char *p;
- /*
- * Standard, external, non-debugger, symbols
- */
-
- case N_TEXT | N_EXT:
- case N_NBTEXT | N_EXT:
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_TEXT);
- goto record_it;
-
- case N_DATA | N_EXT:
- case N_NBDATA | N_EXT:
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
- goto record_it;
-
- case N_BSS:
- case N_BSS | N_EXT:
- case N_NBBSS | N_EXT:
- case N_SETV | N_EXT: /* FIXME, is this in BSS? */
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_BSS);
- goto record_it;
-
- case N_ABS | N_EXT:
- record_it:
-#ifdef DBXREAD_ONLY
- SET_NAMESTRING();
-
- bss_ext_symbol:
- record_minimal_symbol (namestring, CUR_SYMBOL_VALUE,
- CUR_SYMBOL_TYPE, objfile); /* Always */
-#endif /* DBXREAD_ONLY */
- continue;
-
- /* Standard, local, non-debugger, symbols */
-
- case N_NBTEXT:
-
- /* We need to be able to deal with both N_FN or N_TEXT,
- because we have no way of knowing whether the sys-supplied ld
- or GNU ld was used to make the executable. Sequents throw
- in another wrinkle -- they renumbered N_FN. */
-
- case N_FN:
- case N_FN_SEQ:
- case N_TEXT:
-#ifdef DBXREAD_ONLY
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_TEXT);
- SET_NAMESTRING();
- if ((namestring[0] == '-' && namestring[1] == 'l')
- || (namestring [(nsl = strlen (namestring)) - 1] == 'o'
- && namestring [nsl - 2] == '.'))
- {
- if (objfile -> ei.entry_point < CUR_SYMBOL_VALUE &&
- objfile -> ei.entry_point >= last_o_file_start)
- {
- objfile -> ei.entry_file_lowpc = last_o_file_start;
- objfile -> ei.entry_file_highpc = CUR_SYMBOL_VALUE;
- }
- if (past_first_source_file && pst
- /* The gould NP1 uses low values for .o and -l symbols
- which are not the address. */
- && CUR_SYMBOL_VALUE >= pst->textlow)
- {
- END_PSYMTAB (pst, psymtab_include_list, includes_used,
- symnum * symbol_size,
- CUR_SYMBOL_VALUE > pst->texthigh
- ? CUR_SYMBOL_VALUE : pst->texthigh,
- dependency_list, dependencies_used, textlow_not_set);
- pst = (struct partial_symtab *) 0;
- includes_used = 0;
- dependencies_used = 0;
- }
- else
- past_first_source_file = 1;
- last_o_file_start = CUR_SYMBOL_VALUE;
- }
- else
- goto record_it;
-#endif /* DBXREAD_ONLY */
- continue;
-
- case N_DATA:
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
- goto record_it;
-
- case N_UNDF | N_EXT:
-#ifdef DBXREAD_ONLY
- if (CUR_SYMBOL_VALUE != 0) {
- /* This is a "Fortran COMMON" symbol. See if the target
- environment knows where it has been relocated to. */
-
- CORE_ADDR reladdr;
-
- SET_NAMESTRING();
- if (target_lookup_symbol (namestring, &reladdr)) {
- continue; /* Error in lookup; ignore symbol for now. */
- }
- CUR_SYMBOL_TYPE ^= (N_BSS^N_UNDF); /* Define it as a bss-symbol */
- CUR_SYMBOL_VALUE = reladdr;
- goto bss_ext_symbol;
- }
-#endif /* DBXREAD_ONLY */
- continue; /* Just undefined, not COMMON */
-
- case N_UNDF:
-#ifdef DBXREAD_ONLY
- if (processing_acc_compilation && CUR_SYMBOL_STRX == 1) {
- /* Deal with relative offsets in the string table
- used in ELF+STAB under Solaris. If we want to use the
- n_strx field, which contains the name of the file,
- we must adjust file_string_table_offset *before* calling
- SET_NAMESTRING(). */
- past_first_source_file = 1;
- file_string_table_offset = next_file_string_table_offset;
- next_file_string_table_offset =
- file_string_table_offset + CUR_SYMBOL_VALUE;
- if (next_file_string_table_offset < file_string_table_offset)
- error ("string table offset backs up at %d", symnum);
- /* FIXME -- replace error() with complaint. */
- continue;
- }
-#endif /* DBXREAD_ONLY */
- continue;
-
- /* Lots of symbol types we can just ignore. */
-
- case N_ABS:
- case N_NBDATA:
- case N_NBBSS:
- continue;
-
- /* Keep going . . .*/
-
- /*
- * Special symbol types for GNU
- */
- case N_INDR:
- case N_INDR | N_EXT:
- case N_SETA:
- case N_SETA | N_EXT:
- case N_SETT:
- case N_SETT | N_EXT:
- case N_SETD:
- case N_SETD | N_EXT:
- case N_SETB:
- case N_SETB | N_EXT:
- case N_SETV:
- continue;
-
- /*
- * Debugger symbols
- */
-
- case N_SO: {
- unsigned long valu;
- static int prev_so_symnum = -10;
- static int first_so_symnum;
- char *p;
- int prev_textlow_not_set;
-
- valu = CUR_SYMBOL_VALUE + ANOFFSET (section_offsets, SECT_OFF_TEXT);
-
- prev_textlow_not_set = textlow_not_set;
-
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
- /* A zero value is probably an indication for the SunPRO 3.0
- compiler. end_psymtab explicitly tests for zero, so
- don't relocate it. */
-
- if (CUR_SYMBOL_VALUE == 0)
- {
- textlow_not_set = 1;
- valu = 0;
- }
- else
- textlow_not_set = 0;
-#else
- textlow_not_set = 0;
-#endif
- past_first_source_file = 1;
-
- if (prev_so_symnum != symnum - 1)
- { /* Here if prev stab wasn't N_SO */
- first_so_symnum = symnum;
-
- if (pst)
- {
- END_PSYMTAB (pst, psymtab_include_list, includes_used,
- symnum * symbol_size,
- valu > pst->texthigh ? valu : pst->texthigh,
- dependency_list, dependencies_used,
- prev_textlow_not_set);
- pst = (struct partial_symtab *) 0;
- includes_used = 0;
- dependencies_used = 0;
- }
- }
-
- prev_so_symnum = symnum;
-
- /* End the current partial symtab and start a new one */
-
- SET_NAMESTRING();
-
- /* Null name means end of .o file. Don't start a new one. */
- if (*namestring == '\000')
- continue;
-
- /* Some compilers (including gcc) emit a pair of initial N_SOs.
- The first one is a directory name; the second the file name.
- If pst exists, is empty, and has a filename ending in '/',
- we assume the previous N_SO was a directory name. */
-
- p = strrchr (namestring, '/');
- if (p && *(p+1) == '\000')
- continue; /* Simply ignore directory name SOs */
-
- /* Some other compilers (C++ ones in particular) emit useless
- SOs for non-existant .c files. We ignore all subsequent SOs that
- immediately follow the first. */
-
- if (!pst)
- pst = START_PSYMTAB (objfile, section_offsets,
- namestring, valu,
- first_so_symnum * symbol_size,
- objfile -> global_psymbols.next,
- objfile -> static_psymbols.next);
- continue;
- }
-
- case N_BINCL:
- {
-#ifdef DBXREAD_ONLY
- enum language tmp_language;
- /* Add this bincl to the bincl_list for future EXCLs. No
- need to save the string; it'll be around until
- read_dbx_symtab function returns */
-
- SET_NAMESTRING();
-
- tmp_language = deduce_language_from_filename (namestring);
-
- /* Only change the psymtab's language if we've learned
- something useful (eg. tmp_language is not language_unknown).
- In addition, to match what start_subfile does, never change
- from C++ to C. */
- if (tmp_language != language_unknown
- && (tmp_language != language_c
- || psymtab_language != language_cplus))
- psymtab_language = tmp_language;
-
- if (pst == NULL)
- {
- /* FIXME: we should not get here without a PST to work on.
- Attempt to recover. */
- complain (&unclaimed_bincl_complaint, namestring, symnum);
- continue;
- }
- add_bincl_to_list (pst, namestring, CUR_SYMBOL_VALUE);
-
- /* Mark down an include file in the current psymtab */
-
- goto record_include_file;
-
-#else /* DBXREAD_ONLY */
- continue;
-#endif
- }
-
- case N_SOL:
- {
- enum language tmp_language;
- /* Mark down an include file in the current psymtab */
-
- SET_NAMESTRING();
-
- tmp_language = deduce_language_from_filename (namestring);
-
- /* Only change the psymtab's language if we've learned
- something useful (eg. tmp_language is not language_unknown).
- In addition, to match what start_subfile does, never change
- from C++ to C. */
- if (tmp_language != language_unknown
- && (tmp_language != language_c
- || psymtab_language != language_cplus))
- psymtab_language = tmp_language;
-
- /* In C++, one may expect the same filename to come round many
- times, when code is coming alternately from the main file
- and from inline functions in other files. So I check to see
- if this is a file we've seen before -- either the main
- source file, or a previously included file.
-
- This seems to be a lot of time to be spending on N_SOL, but
- things like "break c-exp.y:435" need to work (I
- suppose the psymtab_include_list could be hashed or put
- in a binary tree, if profiling shows this is a major hog). */
- if (pst && STREQ (namestring, pst->filename))
- continue;
- {
- register int i;
- for (i = 0; i < includes_used; i++)
- if (STREQ (namestring, psymtab_include_list[i]))
- {
- i = -1;
- break;
- }
- if (i == -1)
- continue;
- }
-
-#ifdef DBXREAD_ONLY
- record_include_file:
-#endif
-
- psymtab_include_list[includes_used++] = namestring;
- if (includes_used >= includes_allocated)
- {
- char **orig = psymtab_include_list;
-
- psymtab_include_list = (char **)
- alloca ((includes_allocated *= 2) *
- sizeof (char *));
- memcpy ((PTR)psymtab_include_list, (PTR)orig,
- includes_used * sizeof (char *));
- }
- continue;
- }
- case N_LSYM: /* Typedef or automatic variable. */
- case N_STSYM: /* Data seg var -- static */
- case N_LCSYM: /* BSS " */
- case N_ROSYM: /* Read-only data seg var -- static. */
- case N_NBSTS: /* Gould nobase. */
- case N_NBLCS: /* symbols. */
- case N_FUN:
- case N_GSYM: /* Global (extern) variable; can be
- data or bss (sigh FIXME). */
-
- /* Following may probably be ignored; I'll leave them here
- for now (until I do Pascal and Modula 2 extensions). */
-
- case N_PC: /* I may or may not need this; I
- suspect not. */
- case N_M2C: /* I suspect that I can ignore this here. */
- case N_SCOPE: /* Same. */
-
- SET_NAMESTRING();
-
-#ifdef DBXREAD_ONLY
- /* See if this is an end of function stab. */
- if (CUR_SYMBOL_TYPE == N_FUN && *namestring == '\000')
- {
- unsigned long valu;
-
- /* It's value is the size (in bytes) of the function for
- function relative stabs, or the address of the function's
- end for old style stabs. */
- valu = CUR_SYMBOL_VALUE + last_function_start;
- if (pst->texthigh == 0 || valu > pst->texthigh)
- pst->texthigh = valu;
- break;
- }
-#endif
-
- p = (char *) strchr (namestring, ':');
- if (!p)
- continue; /* Not a debugging symbol. */
-
-
-
- /* Main processing section for debugging symbols which
- the initial read through the symbol tables needs to worry
- about. If we reach this point, the symbol which we are
- considering is definitely one we are interested in.
- p must also contain the (valid) index into the namestring
- which indicates the debugging type symbol. */
-
- switch (p[1])
- {
- case 'S':
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
-#ifdef STATIC_TRANSFORM_NAME
- namestring = STATIC_TRANSFORM_NAME (namestring);
-#endif
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_STATIC,
- &objfile->static_psymbols,
- 0, CUR_SYMBOL_VALUE,
- psymtab_language, objfile);
- continue;
- case 'G':
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
- /* The addresses in these entries are reported to be
- wrong. See the code that reads 'G's for symtabs. */
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_STATIC,
- &objfile->global_psymbols,
- 0, CUR_SYMBOL_VALUE,
- psymtab_language, objfile);
- continue;
-
- case 'T':
- if (p != namestring) /* a name is there, not just :T... */
- {
- add_psymbol_to_list (namestring, p - namestring,
- STRUCT_NAMESPACE, LOC_TYPEDEF,
- &objfile->static_psymbols,
- CUR_SYMBOL_VALUE, 0,
- psymtab_language, objfile);
- if (p[2] == 't')
- {
- /* Also a typedef with the same name. */
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_TYPEDEF,
- &objfile->static_psymbols,
- CUR_SYMBOL_VALUE, 0,
- 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,
- CUR_SYMBOL_VALUE, 0,
- psymtab_language, objfile);
- }
- }
- goto check_enum;
- case 't':
- if (p != namestring) /* a name is there, not just :T... */
- {
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_TYPEDEF,
- &objfile->static_psymbols,
- CUR_SYMBOL_VALUE, 0,
- psymtab_language, objfile);
- }
- check_enum:
- /* If this is an enumerated type, we need to
- add all the enum constants to the partial symbol
- table. This does not cover enums without names, e.g.
- "enum {a, b} c;" in C, but fortunately those are
- rare. There is no way for GDB to find those from the
- enum type without spending too much time on it. Thus
- to solve this problem, the compiler needs to put out the
- enum in a nameless type. GCC2 does this. */
-
- /* We are looking for something of the form
- <name> ":" ("t" | "T") [<number> "="] "e"
- {<constant> ":" <value> ","} ";". */
-
- /* Skip over the colon and the 't' or 'T'. */
- p += 2;
- /* This type may be given a number. Also, numbers can come
- in pairs like (0,26). Skip over it. */
- while ((*p >= '0' && *p <= '9')
- || *p == '(' || *p == ',' || *p == ')'
- || *p == '=')
- p++;
-
- if (*p++ == 'e')
- {
- /* The aix4 compiler emits extra crud before the members. */
- if (*p == '-')
- {
- /* Skip over the type (?). */
- while (*p != ':')
- p++;
-
- /* Skip over the colon. */
- p++;
- }
-
- /* We have found an enumerated type. */
- /* According to comments in read_enum_type
- a comma could end it instead of a semicolon.
- I don't know where that happens.
- Accept either. */
- while (*p && *p != ';' && *p != ',')
- {
- char *q;
-
- /* Check for and handle cretinous dbx symbol name
- continuation! */
- if (*p == '\\' || (*p == '?' && p[1] == '\0'))
- p = next_symbol_text (objfile);
-
- /* Point to the character after the name
- of the enum constant. */
- for (q = p; *q && *q != ':'; q++)
- ;
- /* Note that the value doesn't matter for
- enum constants in psymtabs, just in symtabs. */
- add_psymbol_to_list (p, q - p,
- VAR_NAMESPACE, LOC_CONST,
- &objfile->static_psymbols, 0,
- 0, psymtab_language, objfile);
- /* Point past the name. */
- p = q;
- /* Skip over the value. */
- while (*p && *p != ',')
- p++;
- /* Advance past the comma. */
- if (*p)
- p++;
- }
- }
- continue;
- case 'c':
- /* Constant, e.g. from "const" in Pascal. */
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_CONST,
- &objfile->static_psymbols, CUR_SYMBOL_VALUE,
- 0, psymtab_language, objfile);
- continue;
-
- case 'f':
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_TEXT);
-#ifdef DBXREAD_ONLY
- /* Keep track of the start of the last function so we
- can handle end of function symbols. */
- last_function_start = CUR_SYMBOL_VALUE;
- /* Kludges for ELF/STABS with Sun ACC */
- last_function_name = namestring;
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
- /* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
- value for the bottom of the text seg in those cases. */
- if (pst && textlow_not_set)
- {
- pst->textlow =
- find_stab_function_addr (namestring, pst, objfile);
- textlow_not_set = 0;
- }
-#endif
-#if 0
- if (startup_file_end == 0)
- startup_file_end = CUR_SYMBOL_VALUE;
-#endif
- /* End kludge. */
-
- /* In reordered executables this function may lie outside
- the bounds created by N_SO symbols. If that's the case
- use the address of this function as the low bound for
- the partial symbol table. */
- if (textlow_not_set
- || (CUR_SYMBOL_VALUE < pst->textlow
- && CUR_SYMBOL_VALUE
- != ANOFFSET (section_offsets, SECT_OFF_TEXT)))
- {
- pst->textlow = CUR_SYMBOL_VALUE;
- textlow_not_set = 0;
- }
-#endif /* DBXREAD_ONLY */
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_BLOCK,
- &objfile->static_psymbols,
- 0, CUR_SYMBOL_VALUE,
- psymtab_language, objfile);
- continue;
-
- /* Global functions were ignored here, but now they
- are put into the global psymtab like one would expect.
- They're also in the minimal symbol table. */
- case 'F':
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_TEXT);
-#ifdef DBXREAD_ONLY
- /* Keep track of the start of the last function so we
- can handle end of function symbols. */
- last_function_start = CUR_SYMBOL_VALUE;
- /* Kludges for ELF/STABS with Sun ACC */
- last_function_name = namestring;
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
- /* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
- value for the bottom of the text seg in those cases. */
- if (pst && textlow_not_set)
- {
- pst->textlow =
- find_stab_function_addr (namestring, pst, objfile);
- textlow_not_set = 0;
- }
-#endif
-#if 0
- if (startup_file_end == 0)
- startup_file_end = CUR_SYMBOL_VALUE;
-#endif
- /* End kludge. */
- /* In reordered executables this function may lie outside
- the bounds created by N_SO symbols. If that's the case
- use the address of this function as the low bound for
- the partial symbol table. */
- if (textlow_not_set
- || (CUR_SYMBOL_VALUE < pst->textlow
- && CUR_SYMBOL_VALUE
- != ANOFFSET (section_offsets, SECT_OFF_TEXT)))
- {
- pst->textlow = CUR_SYMBOL_VALUE;
- textlow_not_set = 0;
- }
-#endif /* DBXREAD_ONLY */
- add_psymbol_to_list (namestring, p - namestring,
- VAR_NAMESPACE, LOC_BLOCK,
- &objfile->global_psymbols,
- 0, CUR_SYMBOL_VALUE,
- psymtab_language, objfile);
- continue;
-
- /* Two things show up here (hopefully); static symbols of
- local scope (static used inside braces) or extensions
- of structure symbols. We can ignore both. */
- case 'V':
- case '(':
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- 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 */
- continue;
-
- case ':':
- /* It is a C++ nested symbol. We don't need to record it
- (I don't think); if we try to look up foo::bar::baz,
- then symbols for the symtab containing foo should get
- read in, I think. */
- /* Someone says sun cc puts out symbols like
- /foo/baz/maclib::/usr/local/bin/maclib,
- which would get here with a symbol type of ':'. */
- continue;
-
- default:
- /* Unexpected symbol descriptor. The second and subsequent stabs
- of a continued stab can show up here. The question is
- whether they ever can mimic a normal stab--it would be
- nice if not, since we certainly don't want to spend the
- time searching to the end of every string looking for
- a backslash. */
-
- complain (&unknown_symchar_complaint, p[1]);
-
- /* Ignore it; perhaps it is an extension that we don't
- know about. */
- continue;
- }
-
- case N_EXCL:
-#ifdef DBXREAD_ONLY
-
- SET_NAMESTRING();
-
- /* Find the corresponding bincl and mark that psymtab on the
- psymtab dependency list */
- {
- struct partial_symtab *needed_pst =
- find_corresponding_bincl_psymtab (namestring, CUR_SYMBOL_VALUE);
-
- /* If this include file was defined earlier in this file,
- leave it alone. */
- if (needed_pst == pst) continue;
-
- if (needed_pst)
- {
- int i;
- int found = 0;
-
- for (i = 0; i < dependencies_used; i++)
- if (dependency_list[i] == needed_pst)
- {
- found = 1;
- break;
- }
-
- /* If it's already in the list, skip the rest. */
- if (found) continue;
-
- dependency_list[dependencies_used++] = needed_pst;
- if (dependencies_used >= dependencies_allocated)
- {
- struct partial_symtab **orig = dependency_list;
- dependency_list =
- (struct partial_symtab **)
- alloca ((dependencies_allocated *= 2)
- * sizeof (struct partial_symtab *));
- memcpy ((PTR)dependency_list, (PTR)orig,
- (dependencies_used
- * sizeof (struct partial_symtab *)));
-#ifdef DEBUG_INFO
- fprintf_unfiltered (gdb_stderr, "Had to reallocate dependency list.\n");
- fprintf_unfiltered (gdb_stderr, "New dependencies allocated: %d\n",
- dependencies_allocated);
-#endif
- }
- }
- }
-#endif /* DBXREAD_ONLY */
- continue;
-
- case N_ENDM:
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
- /* Solaris 2 end of module, finish current partial symbol table.
- END_PSYMTAB will set pst->texthigh to the proper value, which
- is necessary if a module compiled without debugging info
- follows this module. */
- if (pst)
- {
- END_PSYMTAB (pst, psymtab_include_list, includes_used,
- symnum * symbol_size,
- (CORE_ADDR) 0,
- dependency_list, dependencies_used, textlow_not_set);
- pst = (struct partial_symtab *) 0;
- includes_used = 0;
- dependencies_used = 0;
- }
-#endif
- continue;
-
- case N_RBRAC:
-#ifdef HANDLE_RBRAC
- HANDLE_RBRAC(CUR_SYMBOL_VALUE);
- continue;
-#endif
- case N_EINCL:
- case N_DSLINE:
- case N_BSLINE:
- case N_SSYM: /* Claim: Structure or union element.
- Hopefully, I can ignore this. */
- case N_ENTRY: /* Alternate entry point; can ignore. */
- case N_MAIN: /* Can definitely ignore this. */
- case N_CATCH: /* These are GNU C++ extensions */
- case N_EHDECL: /* that can safely be ignored here. */
- case N_LENG:
- case N_BCOMM:
- case N_ECOMM:
- case N_ECOML:
- case N_FNAME:
- case N_SLINE:
- case N_RSYM:
- case N_PSYM:
- case N_LBRAC:
- case N_NSYMS: /* Ultrix 4.0: symbol count */
- case N_DEFD: /* GNU Modula-2 */
- case N_ALIAS: /* SunPro F77: alias name, ignore for now. */
-
- case N_OBJ: /* useless types from Solaris */
- case N_OPT:
- /* These symbols aren't interesting; don't worry about them */
-
- continue;
-
- default:
- /* If we haven't found it yet, ignore it. It's probably some
- new type we don't know about yet. */
- complain (&unknown_symtype_complaint,
- local_hex_string (CUR_SYMBOL_TYPE));
- continue;
- }
diff --git a/contrib/gdb/gdb/ptx4-nat.c b/contrib/gdb/gdb/ptx4-nat.c
deleted file mode 100644
index 65eef9d35183..000000000000
--- a/contrib/gdb/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 *) & 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/contrib/gdb/gdb/pyr-tdep.c b/contrib/gdb/gdb/pyr-tdep.c
deleted file mode 100644
index 85e9a072f3c4..000000000000
--- a/contrib/gdb/gdb/pyr-tdep.c
+++ /dev/null
@@ -1,452 +0,0 @@
-/* Pyramid target-dependent code for GDB.
- Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-
-/*** Prettier register printing. ***/
-
-/* Print registers in the same format as pyramid's dbx, adb, sdb. */
-pyr_print_registers(reg_buf, regnum)
- long *reg_buf[];
-{
- register int regno;
- int usp, ksp;
- struct user u;
-
- for (regno = 0; regno < 16; regno++) {
- printf_unfiltered/*_filtered*/ ("%6.6s: %8x %6.6s: %8x %6s: %8x %6s: %8x\n",
- REGISTER_NAME (regno), reg_buf[regno],
- REGISTER_NAME (regno+16), reg_buf[regno+16],
- REGISTER_NAME (regno+32), reg_buf[regno+32],
- REGISTER_NAME (regno+48), reg_buf[regno+48]);
- }
- usp = ptrace (3, inferior_pid,
- (PTRACE_ARG3_TYPE) ((char *)&u.u_pcb.pcb_usp) -
- ((char *)&u), 0);
- ksp = ptrace (3, inferior_pid,
- (PTRACE_ARG3_TYPE) ((char *)&u.u_pcb.pcb_ksp) -
- ((char *)&u), 0);
- printf_unfiltered/*_filtered*/ ("\n%6.6s: %8x %6.6s: %8x (%08x) %6.6s %8x\n",
- REGISTER_NAME (CSP_REGNUM),reg_buf[CSP_REGNUM],
- REGISTER_NAME (KSP_REGNUM), reg_buf[KSP_REGNUM], ksp,
- "usp", usp);
-}
-
-/* Print the register regnum, or all registers if regnum is -1.
- fpregs is currently ignored. */
-
-pyr_do_registers_info (regnum, fpregs)
- int regnum;
- int fpregs;
-{
- /* On a pyr, we know a virtual register can always fit in an long.
- Here (and elsewhere) we take advantage of that. Yuk. */
- long raw_regs[MAX_REGISTER_RAW_SIZE*NUM_REGS];
- register int i;
-
- for (i = 0 ; i < 64 ; i++) {
- read_relative_register_raw_bytes(i, raw_regs+i);
- }
- if (regnum == -1)
- pyr_print_registers (raw_regs, regnum);
- else
- for (i = 0; i < NUM_REGS; i++)
- if (i == regnum) {
- long val = raw_regs[i];
-
- fputs_filtered (REGISTER_NAME (i), gdb_stdout);
- printf_filtered(":");
- print_spaces_filtered (6 - strlen (REGISTER_NAME (i)), gdb_stdout);
- if (val == 0)
- printf_filtered ("0");
- else
- printf_filtered ("%s %d", local_hex_string_custom(val,"08"), val);
- printf_filtered("\n");
- }
-}
-
-/*** Debugging editions of various macros from m-pyr.h ****/
-
-CORE_ADDR frame_locals_address (frame)
- struct frame_info *frame;
-{
- register int addr = find_saved_register (frame,CFP_REGNUM);
- register int result = read_memory_integer (addr, 4);
-#ifdef PYRAMID_CONTROL_FRAME_DEBUGGING
- fprintf_unfiltered (gdb_stderr,
- "\t[[..frame_locals:%8x, %s= %x @%x fcfp= %x foo= %x\n\t gr13=%x pr13=%x tr13=%x @%x]]\n",
- frame->frame,
- REGISTER_NAME (CFP_REGNUM),
- result, addr,
- frame->frame_cfp, (CFP_REGNUM),
-
-
- read_register(13), read_register(29), read_register(61),
- find_saved_register(frame, 61));
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
-
- /* FIXME: I thought read_register (CFP_REGNUM) should be the right answer;
- or at least CFP_REGNUM relative to FRAME (ie, result).
- There seems to be a bug in the way the innermost frame is set up. */
-
- return ((frame->next) ? result: frame->frame_cfp);
-}
-
-CORE_ADDR frame_args_addr (frame)
- struct frame_info *frame;
-{
- register int addr = find_saved_register (frame,CFP_REGNUM);
- register int result = read_memory_integer (addr, 4);
-
-#ifdef PYRAMID_CONTROL_FRAME_DEBUGGING
- fprintf_unfiltered (gdb_stderr,
- "\t[[..frame_args:%8x, %s= %x @%x fcfp= %x r_r= %x\n\t gr13=%x pr13=%x tr13=%x @%x]]\n",
- frame->frame,
- REGISTER_NAME (CFP_REGNUM),
- result, addr,
- frame->frame_cfp, read_register(CFP_REGNUM),
-
- read_register(13), read_register(29), read_register(61),
- find_saved_register(frame, 61));
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
-
- /* FIXME: I thought read_register (CFP_REGNUM) should be the right answer;
- or at least CFP_REGNUM relative to FRAME (ie, result).
- There seems to be a bug in the way the innermost frame is set up. */
- return ((frame->next) ? result: frame->frame_cfp);
-}
-
-#include "symtab.h"
-#include "opcode/pyr.h"
-#include "gdbcore.h"
-
-
-/* A couple of functions used for debugging frame-handling on
- Pyramids. (The Pyramid-dependent handling of register values for
- windowed registers is known to be buggy.)
-
- When debugging, these functions can supplant the normal definitions of some
- of the macros in tm-pyramid.h The quantity of information produced
- when these functions are used makes the gdb unusable as a
- debugger for user programs. */
-
-extern unsigned pyr_saved_pc(), pyr_frame_chain();
-
-CORE_ADDR pyr_frame_chain(frame)
- CORE_ADDR frame;
-{
- int foo=frame - CONTROL_STACK_FRAME_SIZE;
- /* printf_unfiltered ("...following chain from %x: got %x\n", frame, foo);*/
- return foo;
-}
-
-CORE_ADDR pyr_saved_pc(frame)
- CORE_ADDR frame;
-{
- int foo=0;
- foo = read_memory_integer (((CORE_ADDR)(frame))+60, 4);
- printf_unfiltered ("..reading pc from frame 0x%0x+%d regs: got %0x\n",
- frame, 60/4, foo);
- return foo;
-}
-
-/* Pyramid instructions are never longer than this many bytes. */
-#define MAXLEN 24
-
-/* Number of elements in the opcode table. */
-/*const*/ static int nopcodes = (sizeof (pyr_opcodes) / sizeof( pyr_opcodes[0]));
-#define NOPCODES (nopcodes)
-
-/* Let's be byte-independent so we can use this as a cross-assembler. */
-
-#define NEXTLONG(p) \
- (p += 4, (((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1])
-
-/* Print one instruction at address MEMADDR in debugged memory,
- on STREAM. Returns length of the instruction, in bytes. */
-
-int
-pyr_print_insn (memaddr, stream)
- CORE_ADDR memaddr;
- GDB_FILE *stream;
-{
- unsigned char buffer[MAXLEN];
- register int i, nargs, insn_size =4;
- register unsigned char *p;
- register char *d;
- register int insn_opcode, operand_mode;
- register int index_multiplier, index_reg_regno, op_1_regno, op_2_regno ;
- long insn; /* first word of the insn, not broken down. */
- pyr_insn_format insn_decode; /* the same, broken out into op{code,erands} */
- long extra_1, extra_2;
-
- read_memory (memaddr, buffer, MAXLEN);
- insn_decode = *((pyr_insn_format *) buffer);
- insn = * ((int *) buffer);
- insn_opcode = insn_decode.operator;
- operand_mode = insn_decode.mode;
- index_multiplier = insn_decode.index_scale;
- index_reg_regno = insn_decode.index_reg;
- op_1_regno = insn_decode.operand_1;
- op_2_regno = insn_decode.operand_2;
-
-
- if (*((int *)buffer) == 0x0) {
- /* "halt" looks just like an invalid "jump" to the insn decoder,
- so is dealt with as a special case */
- fprintf_unfiltered (stream, "halt");
- return (4);
- }
-
- for (i = 0; i < NOPCODES; i++)
- if (pyr_opcodes[i].datum.code == insn_opcode)
- break;
-
- if (i == NOPCODES)
- /* FIXME: Handle unrecognised instructions better. */
- fprintf_unfiltered (stream, "???\t#%08x\t(op=%x mode =%x)",
- insn, insn_decode.operator, insn_decode.mode);
- else
- {
- /* Print the mnemonic for the instruction. Pyramid insn operands
- are so regular that we can deal with almost all of them
- separately.
- Unconditional branches are an exception: they are encoded as
- conditional branches (branch if false condition, I think)
- with no condition specified. The average user will not be
- aware of this. To maintain their illusion that an
- unconditional branch insn exists, we will have to FIXME to
- treat the insn mnemnonic of all branch instructions here as a
- special case: check the operands of branch insn and print an
- appropriate mnemonic. */
-
- fprintf_unfiltered (stream, "%s\t", pyr_opcodes[i].name);
-
- /* Print the operands of the insn (as specified in
- insn.operand_mode).
- Branch operands of branches are a special case: they are a word
- offset, not a byte offset. */
-
- if (insn_decode.operator == 0x01 || insn_decode.operator == 0x02) {
- register int bit_codes=(insn >> 16)&0xf;
- register int i;
- register int displacement = (insn & 0x0000ffff) << 2;
-
- static char cc_bit_names[] = "cvzn"; /* z,n,c,v: strange order? */
-
- /* Is bfc and no bits specified an unconditional branch?*/
- for (i=0;i<4;i++) {
- if ((bit_codes) & 0x1)
- fputc_unfiltered (cc_bit_names[i], stream);
- bit_codes >>= 1;
- }
-
- fprintf_unfiltered (stream, ",%0x",
- displacement + memaddr);
- return (insn_size);
- }
-
- switch (operand_mode) {
- case 0:
- fprintf_unfiltered (stream, "%s,%s",
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno));
- break;
-
- case 1:
- fprintf_unfiltered (stream, " 0x%0x,%s",
- op_1_regno,
- REGISTER_NAME (op_2_regno));
- break;
-
- case 2:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream, " $0x%0x,%s",
- extra_1,
- REGISTER_NAME (op_2_regno));
- break;
- case 3:
- fprintf_unfiltered (stream, " (%s),%s",
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno));
- break;
-
- case 4:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream, " 0x%0x(%s),%s",
- extra_1,
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno));
- break;
-
- /* S1 destination mode */
- case 5:
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? "%s,(%s)[%s*%1d]" : "%s,(%s)"),
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- case 6:
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? " $%#0x,(%s)[%s*%1d]"
- : " $%#0x,(%s)"),
- op_1_regno,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- case 7:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? " $%#0x,(%s)[%s*%1d]"
- : " $%#0x,(%s)"),
- extra_1,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- case 8:
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? " (%s),(%s)[%s*%1d]" : " (%s),(%s)"),
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- case 9:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno)
- ? "%#0x(%s),(%s)[%s*%1d]"
- : "%#0x(%s),(%s)"),
- extra_1,
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- /* S2 destination mode */
- case 10:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? "%s,%#0x(%s)[%s*%1d]" : "%s,%#0x(%s)"),
- REGISTER_NAME (op_1_regno),
- extra_1,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
- case 11:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno) ?
- " $%#0x,%#0x(%s)[%s*%1d]" : " $%#0x,%#0x(%s)"),
- op_1_regno,
- extra_1,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
- case 12:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- read_memory (memaddr+8, buffer, MAXLEN);
- insn_size += 4;
- extra_2 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno) ?
- " $%#0x,%#0x(%s)[%s*%1d]" : " $%#0x,%#0x(%s)"),
- extra_1,
- extra_2,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- case 13:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno)
- ? " (%s),%#0x(%s)[%s*%1d]"
- : " (%s),%#0x(%s)"),
- REGISTER_NAME (op_1_regno),
- extra_1,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
- case 14:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- read_memory (memaddr+8, buffer, MAXLEN);
- insn_size += 4;
- extra_2 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? "%#0x(%s),%#0x(%s)[%s*%1d]"
- : "%#0x(%s),%#0x(%s) "),
- extra_1,
- REGISTER_NAME (op_1_regno),
- extra_2,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- default:
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? "%s,%s [%s*%1d]" : "%s,%s"),
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- fprintf_unfiltered (stream,
- "\t\t# unknown mode in %08x",
- insn);
- break;
- } /* switch */
- }
-
- {
- return insn_size;
- }
- abort ();
-}
diff --git a/contrib/gdb/gdb/pyr-xdep.c b/contrib/gdb/gdb/pyr-xdep.c
deleted file mode 100644
index dd6d9a92400e..000000000000
--- a/contrib/gdb/gdb/pyr-xdep.c
+++ /dev/null
@@ -1,370 +0,0 @@
-/* Low level Pyramid interface to ptrace, for GDB when running under Unix.
- Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-/* #include <fcntl.h> Can we live without this? */
-
-#include "gdbcore.h"
-#include <sys/user.h> /* After a.out.h */
-#include <sys/file.h>
-#include "gdb_stat.h"
-
-
-void
-fetch_inferior_registers (regno)
- int regno;
-{
- register int datum;
- register unsigned int regaddr;
- int reg_buf[NUM_REGS+1];
- struct user u;
- register int skipped_frames = 0;
-
- registers_fetched ();
-
- for (regno = 0; regno < 64; regno++) {
- reg_buf[regno] = ptrace (3, inferior_pid, (PTRACE_ARG3_TYPE) regno, 0);
-
-#if defined(PYRAMID_CONTROL_FRAME_DEBUGGING)
- printf_unfiltered ("Fetching register %s, got %0x\n",
- REGISTER_NAME (regno),
- reg_buf[regno]);
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
-
- if (reg_buf[regno] == -1 && errno == EIO) {
- printf_unfiltered("fetch_interior_registers: fetching register %s\n",
- REGISTER_NAME (regno));
- errno = 0;
- }
- supply_register (regno, reg_buf+regno);
- }
- /* that leaves regs 64, 65, and 66 */
- datum = ptrace (3, inferior_pid,
- (PTRACE_ARG3_TYPE) (((char *)&u.u_pcb.pcb_csp) -
- ((char *)&u)), 0);
-
-
-
- /* FIXME: Find the Current Frame Pointer (CFP). CFP is a global
- register (ie, NOT windowed), that gets saved in a frame iff
- the code for that frame has a prologue (ie, "adsf N"). If
- there is a prologue, the adsf insn saves the old cfp in
- pr13, cfp is set to sp, and N bytes of locals are allocated
- (sp is decremented by n).
- This makes finding CFP hard. I guess the right way to do it
- is:
- - If this is the innermost frame, believe ptrace() or
- the core area.
- - Otherwise:
- Find the first insn of the current frame.
- - find the saved pc;
- - find the call insn that saved it;
- - figure out where the call is to;
- - if the first insn is an adsf, we got a frame
- pointer. */
-
-
- /* Normal processors have separate stack pointers for user and
- kernel mode. Getting the last user mode frame on such
- machines is easy: the kernel context of the ptrace()'d
- process is on the kernel stack, and the USP points to what
- we want. But Pyramids only have a single cfp for both user and
- kernel mode. And processes being ptrace()'d have some
- kernel-context control frames on their stack.
- To avoid tracing back into the kernel context of an inferior,
- we skip 0 or more contiguous control frames where the pc is
- in the kernel. */
-
- while (1) {
- register int inferior_saved_pc;
- inferior_saved_pc = ptrace (1, inferior_pid,
- (PTRACE_ARG3_TYPE) (datum+((32+15)*4)), 0);
- if (inferior_saved_pc > 0) break;
-#if defined(PYRAMID_CONTROL_FRAME_DEBUGGING)
- printf_unfiltered("skipping kernel frame %08x, pc=%08x\n", datum,
- inferior_saved_pc);
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
- skipped_frames++;
- datum -= CONTROL_STACK_FRAME_SIZE;
- }
-
- reg_buf[CSP_REGNUM] = datum;
- supply_register(CSP_REGNUM, reg_buf+CSP_REGNUM);
-#ifdef PYRAMID_CONTROL_FRAME_DEBUGGING
- if (skipped_frames) {
- fprintf_unfiltered (gdb_stderr,
- "skipped %d frames from %x to %x; cfp was %x, now %x\n",
- skipped_frames, reg_buf[CSP_REGNUM]);
- }
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
-}
-
-/* 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 (regno)
- int regno;
-{
- register unsigned int regaddr;
- char buf[80];
-
- if (regno >= 0)
- {
- if ((0 <= regno) && (regno < 64)) {
- /*regaddr = register_addr (regno, offset);*/
- regaddr = regno;
- errno = 0;
- ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- }
- else
- {
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- /*regaddr = register_addr (regno, offset);*/
- regaddr = regno;
- errno = 0;
- ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing all regs, number %d", regno);
- perror_with_name (buf);
- }
- }
-}
-
-/*** Extensions to core and dump files, for GDB. */
-
-extern unsigned int last_frame_offset;
-
-#ifdef PYRAMID_CORE
-
-/* Can't make definitions here static, since corefile.c needs them
- to do bounds checking on the core-file areas. O well. */
-
-/* have two stacks: one for data, one for register windows. */
-extern CORE_ADDR reg_stack_start;
-extern CORE_ADDR reg_stack_end;
-
-/* need this so we can find the global registers: they never get saved. */
-CORE_ADDR global_reg_offset;
-static CORE_ADDR last_frame_address;
-CORE_ADDR last_frame_offset;
-
-
-/* Address in core file of start of register window stack area.
- Don't know if is this any of meaningful, useful or necessary. */
-extern int reg_stack_offset;
-
-#endif /* PYRAMID_CORE */
-
-
-/* Work with core dump and executable files, for GDB.
- This code would be in corefile.c if it weren't machine-dependent. */
-
-void
-core_file_command (filename, from_tty)
- char *filename;
- int from_tty;
-{
- int val;
- extern char registers[];
-
- /* Discard all vestiges of any previous core file
- and mark data and stack spaces as empty. */
-
- if (corefile)
- free (corefile);
- corefile = 0;
-
- if (corechan >= 0)
- close (corechan);
- corechan = -1;
-
- data_start = 0;
- data_end = 0;
- stack_start = STACK_END_ADDR;
- stack_end = STACK_END_ADDR;
-
-#ifdef PYRAMID_CORE
- reg_stack_start = CONTROL_STACK_ADDR;
- reg_stack_end = CONTROL_STACK_ADDR; /* this isn't strictly true...*/
-#endif /* PYRAMID_CORE */
-
- /* Now, if a new core file was specified, open it and digest it. */
-
- if (filename)
- {
- filename = tilde_expand (filename);
- make_cleanup (free, filename);
-
- if (have_inferior_p ())
- error ("To look at a core file, you must kill the program with \"kill\".");
- corechan = open (filename, O_RDONLY, 0);
- if (corechan < 0)
- perror_with_name (filename);
- /* 4.2-style (and perhaps also sysV-style) core dump file. */
- {
- struct user u;
-
- unsigned int reg_offset;
-
- val = myread (corechan, &u, sizeof u);
- if (val < 0)
- perror_with_name ("Not a core file: reading upage");
- if (val != sizeof u)
- error ("Not a core file: could only read %d bytes", val);
- data_start = exec_data_start;
-
- data_end = data_start + NBPG * u.u_dsize;
- data_offset = NBPG * UPAGES;
- stack_offset = NBPG * (UPAGES + u.u_dsize);
-
- /* find registers in core file */
-#ifdef PYRAMID_PTRACE
- stack_start = stack_end - NBPG * u.u_ussize;
- reg_stack_offset = stack_offset + (NBPG *u.u_ussize);
- reg_stack_end = reg_stack_start + NBPG * u.u_cssize;
-
- last_frame_address = ((int) u.u_pcb.pcb_csp);
- last_frame_offset = reg_stack_offset + last_frame_address
- - CONTROL_STACK_ADDR ;
- global_reg_offset = (char *)&u - (char *)&u.u_pcb.pcb_gr0 ;
-
- /* skip any control-stack frames that were executed in the
- kernel. */
-
- while (1) {
- char buf[4];
- val = lseek (corechan, last_frame_offset+(47*4), 0);
- if (val < 0)
- perror_with_name (filename);
- val = myread (corechan, buf, sizeof buf);
- if (val < 0)
- perror_with_name (filename);
-
- if (*(int *)buf >= 0)
- break;
- printf_unfiltered ("skipping frame %s\n", local_hex_string (last_frame_address));
- last_frame_offset -= CONTROL_STACK_FRAME_SIZE;
- last_frame_address -= CONTROL_STACK_FRAME_SIZE;
- }
- reg_offset = last_frame_offset;
-
-#if 1 || defined(PYRAMID_CONTROL_FRAME_DEBUGGING)
- printf_unfiltered ("Control stack pointer = %s\n",
- local_hex_string (u.u_pcb.pcb_csp));
- printf_unfiltered ("offset to control stack %d outermost frame %d (%s)\n",
- reg_stack_offset, reg_offset, local_hex_string (last_frame_address));
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
-
-#else /* not PYRAMID_CORE */
- stack_start = stack_end - NBPG * u.u_ssize;
- reg_offset = (int) u.u_ar0 - KERNEL_U_ADDR;
-#endif /* not PYRAMID_CORE */
-
-#ifdef __not_on_pyr_yet
- /* Some machines put an absolute address in here and some put
- the offset in the upage of the regs. */
- reg_offset = (int) u.u_ar0;
- if (reg_offset > NBPG * UPAGES)
- reg_offset -= KERNEL_U_ADDR;
-#endif
-
- /* I don't know where to find this info.
- So, for now, mark it as not available. */
- N_SET_MAGIC (core_aouthdr, 0);
-
- /* Read the register values out of the core file and store
- them where `read_register' will find them. */
-
- {
- register int regno;
-
- for (regno = 0; regno < 64; regno++)
- {
- char buf[MAX_REGISTER_RAW_SIZE];
-
- val = lseek (corechan, register_addr (regno, reg_offset), 0);
- if (val < 0
- || (val = myread (corechan, buf, sizeof buf)) < 0)
- {
- char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno))
- + 30);
- strcpy (buffer, "Reading register ");
- strcat (buffer, REGISTER_NAME (regno));
-
- perror_with_name (buffer);
- }
-
- if (val < 0)
- perror_with_name (filename);
-#ifdef PYRAMID_CONTROL_FRAME_DEBUGGING
- printf_unfiltered ("[reg %s(%d), offset in file %s=0x%0x, addr =0x%0x, =%0x]\n",
- REGISTER_NAME (regno), regno, filename,
- register_addr(regno, reg_offset),
- regno * 4 + last_frame_address,
- *((int *)buf));
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
- supply_register (regno, buf);
- }
- }
- }
- if (filename[0] == '/')
- corefile = savestring (filename, strlen (filename));
- else
- {
- corefile = concat (current_directory, "/", filename, NULL);
- }
-
-#if 1 || defined(PYRAMID_CONTROL_FRAME_DEBUGGING)
- printf_unfiltered ("Providing CSP (%s) as nominal address of current frame.\n",
- local_hex_string(last_frame_address));
-#endif PYRAMID_CONTROL_FRAME_DEBUGGING
- /* FIXME: Which of the following is correct? */
-#if 0
- set_current_frame ( create_new_frame (read_register (FP_REGNUM),
- read_pc ()));
-#else
- set_current_frame ( create_new_frame (last_frame_address,
- read_pc ()));
-#endif
-
- select_frame (get_current_frame (), 0);
- validate_files ();
- }
- else if (from_tty)
- printf_unfiltered ("No core file now.\n");
-}
diff --git a/contrib/gdb/gdb/remote-adapt.c b/contrib/gdb/gdb/remote-adapt.c
deleted file mode 100644
index 7e87360d1784..000000000000
--- a/contrib/gdb/gdb/remote-adapt.c
+++ /dev/null
@@ -1,1524 +0,0 @@
-/* OBSOLETE /* Remote debugging interface for AMD 290*0 Adapt Monitor Version 2.1d18. */
-/* OBSOLETE Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, */
-/* OBSOLETE 2001 Free Software Foundation, Inc. */
-/* OBSOLETE Contributed by David Wood at New York University (wood@lab.ultra.nyu.edu). */
-/* OBSOLETE Adapted from work done at Cygnus Support in remote-eb.c. */
-/* OBSOLETE */
-/* OBSOLETE This file is part of GDB. */
-/* OBSOLETE */
-/* OBSOLETE This program is free software; you can redistribute it and/or modify */
-/* OBSOLETE it under the terms of the GNU General Public License as published by */
-/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
-/* OBSOLETE (at your option) any later version. */
-/* OBSOLETE */
-/* OBSOLETE This program is distributed in the hope that it will be useful, */
-/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* OBSOLETE GNU General Public License for more details. */
-/* OBSOLETE */
-/* OBSOLETE You should have received a copy of the GNU General Public License */
-/* OBSOLETE along with this program; if not, write to the Free Software */
-/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
-/* OBSOLETE Boston, MA 02111-1307, USA. */ */
-/* OBSOLETE */
-/* OBSOLETE /* This is like remote.c but is for an esoteric situation-- */
-/* OBSOLETE having a 29k board attached to an Adapt inline monitor. */
-/* OBSOLETE The monitor is connected via serial line to a unix machine */
-/* OBSOLETE running gdb. */
-/* OBSOLETE */
-/* OBSOLETE 3/91 - developed on Sun3 OS 4.1, by David Wood */
-/* OBSOLETE o - I can't get binary coff to load. */
-/* OBSOLETE o - I can't get 19200 baud rate to work. */
-/* OBSOLETE 7/91 o - Freeze mode tracing can be done on a 29050. */ */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE #include "defs.h" */
-/* OBSOLETE #include "gdb_string.h" */
-/* OBSOLETE #include "inferior.h" */
-/* OBSOLETE #include "value.h" */
-/* OBSOLETE #include <ctype.h> */
-/* OBSOLETE #include <fcntl.h> */
-/* OBSOLETE #include <signal.h> */
-/* OBSOLETE #include <errno.h> */
-/* OBSOLETE #include "terminal.h" */
-/* OBSOLETE #include "target.h" */
-/* OBSOLETE #include "gdbcore.h" */
-/* OBSOLETE #include "regcache.h" */
-/* OBSOLETE */
-/* OBSOLETE /* This processor is getting rusty but I am trying to keep it */
-/* OBSOLETE up to date at least with data structure changes. */
-/* OBSOLETE Activate this block to compile just this file. */
-/* OBSOLETE */ */
-/* OBSOLETE #define COMPILE_CHECK 0 */
-/* OBSOLETE #if COMPILE_CHECK */
-/* OBSOLETE #define Q_REGNUM 0 */
-/* OBSOLETE #define VAB_REGNUM 0 */
-/* OBSOLETE #define CPS_REGNUM 0 */
-/* OBSOLETE #define IPA_REGNUM 0 */
-/* OBSOLETE #define IPB_REGNUM 0 */
-/* OBSOLETE #define GR1_REGNUM 0 */
-/* OBSOLETE #define LR0_REGNUM 0 */
-/* OBSOLETE #define IPC_REGNUM 0 */
-/* OBSOLETE #define CR_REGNUM 0 */
-/* OBSOLETE #define BP_REGNUM 0 */
-/* OBSOLETE #define FC_REGNUM 0 */
-/* OBSOLETE #define INTE_REGNUM 0 */
-/* OBSOLETE #define EXO_REGNUM 0 */
-/* OBSOLETE #define GR96_REGNUM 0 */
-/* OBSOLETE #define NPC_REGNUM */
-/* OBSOLETE #define FPE_REGNUM 0 */
-/* OBSOLETE #define PC2_REGNUM 0 */
-/* OBSOLETE #define FPS_REGNUM 0 */
-/* OBSOLETE #define ALU_REGNUM 0 */
-/* OBSOLETE #define LRU_REGNUM 0 */
-/* OBSOLETE #define TERMINAL int */
-/* OBSOLETE #define RAW 1 */
-/* OBSOLETE #define ANYP 1 */
-/* OBSOLETE extern int a29k_freeze_mode; */
-/* OBSOLETE extern int processor_type; */
-/* OBSOLETE extern char *processor_name; */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /* External data declarations */ */
-/* OBSOLETE extern int stop_soon_quietly; /* for wait_for_inferior */ */
-/* OBSOLETE */
-/* OBSOLETE /* Forward data declarations */ */
-/* OBSOLETE extern struct target_ops adapt_ops; /* Forward declaration */ */
-/* OBSOLETE */
-/* OBSOLETE /* Forward function declarations */ */
-/* OBSOLETE static void adapt_fetch_registers (); */
-/* OBSOLETE static void adapt_store_registers (); */
-/* OBSOLETE static void adapt_close (); */
-/* OBSOLETE static int adapt_clear_breakpoints (); */
-/* OBSOLETE */
-/* OBSOLETE #define FREEZE_MODE (read_register(CPS_REGNUM) && 0x400) */
-/* OBSOLETE #define USE_SHADOW_PC ((processor_type == a29k_freeze_mode) && FREEZE_MODE) */
-/* OBSOLETE */
-/* OBSOLETE /* Can't seem to get binary coff working */ */
-/* OBSOLETE #define ASCII_COFF /* Adapt will be downloaded with ascii coff */ */
-/* OBSOLETE */
-/* OBSOLETE /* FIXME: Replace with `set remotedebug'. */ */
-/* OBSOLETE #define LOG_FILE "adapt.log" */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE FILE *log_file = NULL; */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE static int timeout = 5; */
-/* OBSOLETE static char *dev_name; */
-/* OBSOLETE */
-/* OBSOLETE /* Descriptor for I/O to remote machine. Initialize it to -1 so that */
-/* OBSOLETE adapt_open knows that we don't have a file open when the program */
-/* OBSOLETE starts. */ */
-/* OBSOLETE int adapt_desc = -1; */
-/* OBSOLETE */
-/* OBSOLETE /* stream which is fdopen'd from adapt_desc. Only valid when */
-/* OBSOLETE adapt_desc != -1. */ */
-/* OBSOLETE FILE *adapt_stream; */
-/* OBSOLETE */
-/* OBSOLETE #define ON 1 */
-/* OBSOLETE #define OFF 0 */
-/* OBSOLETE static void */
-/* OBSOLETE rawmode (int desc, int turnon) */
-/* OBSOLETE { */
-/* OBSOLETE */
-/* OBSOLETE TERMINAL sg; */
-/* OBSOLETE */
-/* OBSOLETE if (desc < 0) */
-/* OBSOLETE return; */
-/* OBSOLETE */
-/* OBSOLETE ioctl (desc, TIOCGETP, &sg); */
-/* OBSOLETE */
-/* OBSOLETE if (turnon) */
-/* OBSOLETE { */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE sg.c_lflag &= ~(ICANON); */
-/* OBSOLETE #else */
-/* OBSOLETE sg.sg_flags |= RAW; */
-/* OBSOLETE #endif */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE sg.c_lflag |= ICANON; */
-/* OBSOLETE #else */
-/* OBSOLETE sg.sg_flags &= ~(RAW); */
-/* OBSOLETE #endif */
-/* OBSOLETE } */
-/* OBSOLETE ioctl (desc, TIOCSETP, &sg); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Suck up all the input from the adapt */ */
-/* OBSOLETE slurp_input (void) */
-/* OBSOLETE { */
-/* OBSOLETE char buf[8]; */
-/* OBSOLETE */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE /* termio does the timeout for us. */ */
-/* OBSOLETE while (read (adapt_desc, buf, 8) > 0); */
-/* OBSOLETE #else */
-/* OBSOLETE alarm (timeout); */
-/* OBSOLETE while (read (adapt_desc, buf, 8) > 0); */
-/* OBSOLETE alarm (0); */
-/* OBSOLETE #endif */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Read a character from the remote system, doing all the fancy */
-/* OBSOLETE timeout stuff. */ */
-/* OBSOLETE static int */
-/* OBSOLETE readchar (void) */
-/* OBSOLETE { */
-/* OBSOLETE char buf; */
-/* OBSOLETE */
-/* OBSOLETE buf = '\0'; */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE /* termio does the timeout for us. */ */
-/* OBSOLETE read (adapt_desc, &buf, 1); */
-/* OBSOLETE #else */
-/* OBSOLETE alarm (timeout); */
-/* OBSOLETE if (read (adapt_desc, &buf, 1) < 0) */
-/* OBSOLETE { */
-/* OBSOLETE if (errno == EINTR) */
-/* OBSOLETE error ("Timeout reading from remote system."); */
-/* OBSOLETE else */
-/* OBSOLETE perror_with_name ("remote"); */
-/* OBSOLETE } */
-/* OBSOLETE alarm (0); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE if (buf == '\0') */
-/* OBSOLETE error ("Timeout reading from remote system."); */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE putc (buf & 0x7f, log_file); */
-/* OBSOLETE #endif */
-/* OBSOLETE return buf & 0x7f; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Keep discarding input from the remote system, until STRING is found. */
-/* OBSOLETE Let the user break out immediately. */ */
-/* OBSOLETE static void */
-/* OBSOLETE expect (char *string) */
-/* OBSOLETE { */
-/* OBSOLETE char *p = string; */
-/* OBSOLETE */
-/* OBSOLETE fflush (adapt_stream); */
-/* OBSOLETE immediate_quit++; */
-/* OBSOLETE while (1) */
-/* OBSOLETE { */
-/* OBSOLETE if (readchar () == *p) */
-/* OBSOLETE { */
-/* OBSOLETE p++; */
-/* OBSOLETE if (*p == '\0') */
-/* OBSOLETE { */
-/* OBSOLETE immediate_quit--; */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE p = string; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Keep discarding input until we see the adapt prompt. */
-/* OBSOLETE */
-/* OBSOLETE The convention for dealing with the prompt is that you */
-/* OBSOLETE o give your command */
-/* OBSOLETE o *then* wait for the prompt. */
-/* OBSOLETE */
-/* OBSOLETE Thus the last thing that a procedure does with the serial line */
-/* OBSOLETE will be an expect_prompt(). Exception: adapt_resume does not */
-/* OBSOLETE wait for the prompt, because the terminal is being handed over */
-/* OBSOLETE to the inferior. However, the next thing which happens after that */
-/* OBSOLETE is a adapt_wait which does wait for the prompt. */
-/* OBSOLETE Note that this includes abnormal exit, e.g. error(). This is */
-/* OBSOLETE necessary to prevent getting into states from which we can't */
-/* OBSOLETE recover. */ */
-/* OBSOLETE static void */
-/* OBSOLETE expect_prompt (void) */
-/* OBSOLETE { */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE /* This is a convenient place to do this. The idea is to do it often */
-/* OBSOLETE enough that we never lose much data if we terminate abnormally. */ */
-/* OBSOLETE fflush (log_file); */
-/* OBSOLETE #endif */
-/* OBSOLETE fflush (adapt_stream); */
-/* OBSOLETE expect ("\n# "); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Get a hex digit from the remote system & return its value. */
-/* OBSOLETE If ignore_space is nonzero, ignore spaces (not newline, tab, etc). */ */
-/* OBSOLETE static int */
-/* OBSOLETE get_hex_digit (int ignore_space) */
-/* OBSOLETE { */
-/* OBSOLETE int ch; */
-/* OBSOLETE while (1) */
-/* OBSOLETE { */
-/* OBSOLETE ch = readchar (); */
-/* OBSOLETE if (ch >= '0' && ch <= '9') */
-/* OBSOLETE return ch - '0'; */
-/* OBSOLETE else if (ch >= 'A' && ch <= 'F') */
-/* OBSOLETE return ch - 'A' + 10; */
-/* OBSOLETE else if (ch >= 'a' && ch <= 'f') */
-/* OBSOLETE return ch - 'a' + 10; */
-/* OBSOLETE else if (ch == ' ' && ignore_space) */
-/* OBSOLETE ; */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE error ("Invalid hex digit from remote system."); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Get a byte from adapt_desc and put it in *BYT. Accept any number */
-/* OBSOLETE leading spaces. */ */
-/* OBSOLETE static void */
-/* OBSOLETE get_hex_byte (char *byt) */
-/* OBSOLETE { */
-/* OBSOLETE int val; */
-/* OBSOLETE */
-/* OBSOLETE val = get_hex_digit (1) << 4; */
-/* OBSOLETE val |= get_hex_digit (0); */
-/* OBSOLETE *byt = val; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Read a 32-bit hex word from the adapt, preceded by a space */ */
-/* OBSOLETE static long */
-/* OBSOLETE get_hex_word (void) */
-/* OBSOLETE { */
-/* OBSOLETE long val; */
-/* OBSOLETE int j; */
-/* OBSOLETE */
-/* OBSOLETE val = 0; */
-/* OBSOLETE for (j = 0; j < 8; j++) */
-/* OBSOLETE val = (val << 4) + get_hex_digit (j == 0); */
-/* OBSOLETE return val; */
-/* OBSOLETE } */
-/* OBSOLETE /* Get N 32-bit hex words from remote, each preceded by a space */
-/* OBSOLETE and put them in registers starting at REGNO. */ */
-/* OBSOLETE static void */
-/* OBSOLETE get_hex_regs (int n, int regno) */
-/* OBSOLETE { */
-/* OBSOLETE long val; */
-/* OBSOLETE while (n--) */
-/* OBSOLETE { */
-/* OBSOLETE val = get_hex_word (); */
-/* OBSOLETE supply_register (regno++, (char *) &val); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE /* Called when SIGALRM signal sent due to alarm() timeout. */ */
-/* OBSOLETE #ifndef HAVE_TERMIO */
-/* OBSOLETE */
-/* OBSOLETE volatile int n_alarms; */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE adapt_timer (void) */
-/* OBSOLETE { */
-/* OBSOLETE #if 0 */
-/* OBSOLETE if (kiodebug) */
-/* OBSOLETE printf ("adapt_timer called\n"); */
-/* OBSOLETE #endif */
-/* OBSOLETE n_alarms++; */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /* malloc'd name of the program on the remote system. */ */
-/* OBSOLETE static char *prog_name = NULL; */
-/* OBSOLETE */
-/* OBSOLETE /* Number of SIGTRAPs we need to simulate. That is, the next */
-/* OBSOLETE NEED_ARTIFICIAL_TRAP calls to adapt_wait should just return */
-/* OBSOLETE SIGTRAP without actually waiting for anything. */ */
-/* OBSOLETE */
-/* OBSOLETE static int need_artificial_trap = 0; */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE adapt_kill (char *arg, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf (adapt_stream, "K"); */
-/* OBSOLETE fprintf (adapt_stream, "\r"); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE /* */
-/* OBSOLETE * Download a file specified in 'args', to the adapt. */
-/* OBSOLETE * FIXME: Assumes the file to download is a binary coff file. */
-/* OBSOLETE */ */
-/* OBSOLETE static void */
-/* OBSOLETE adapt_load (char *args, int fromtty) */
-/* OBSOLETE { */
-/* OBSOLETE FILE *fp; */
-/* OBSOLETE int n; */
-/* OBSOLETE char buffer[1024]; */
-/* OBSOLETE */
-/* OBSOLETE if (!adapt_stream) */
-/* OBSOLETE { */
-/* OBSOLETE printf_filtered ("Adapt not open. Use 'target' command to open adapt\n"); */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* OK, now read in the file. Y=read, C=COFF, T=dTe port */
-/* OBSOLETE 0=start address. */ */
-/* OBSOLETE */
-/* OBSOLETE #ifdef ASCII_COFF /* Ascii coff */ */
-/* OBSOLETE fprintf (adapt_stream, "YA T,0\r"); */
-/* OBSOLETE fflush (adapt_stream); /* Just in case */ */
-/* OBSOLETE /* FIXME: should check args for only 1 argument */ */
-/* OBSOLETE sprintf (buffer, "cat %s | btoa > /tmp/#adapt-btoa", args); */
-/* OBSOLETE system (buffer); */
-/* OBSOLETE fp = fopen ("/tmp/#adapt-btoa", "r"); */
-/* OBSOLETE rawmode (adapt_desc, OFF); */
-/* OBSOLETE while (n = fread (buffer, 1, 1024, fp)) */
-/* OBSOLETE { */
-/* OBSOLETE do */
-/* OBSOLETE { */
-/* OBSOLETE n -= write (adapt_desc, buffer, n); */
-/* OBSOLETE } */
-/* OBSOLETE while (n > 0); */
-/* OBSOLETE if (n < 0) */
-/* OBSOLETE { */
-/* OBSOLETE perror ("writing ascii coff"); */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE fclose (fp); */
-/* OBSOLETE rawmode (adapt_desc, ON); */
-/* OBSOLETE system ("rm /tmp/#adapt-btoa"); */
-/* OBSOLETE #else /* Binary coff - can't get it to work . */ */
-/* OBSOLETE fprintf (adapt_stream, "YC T,0\r"); */
-/* OBSOLETE fflush (adapt_stream); /* Just in case */ */
-/* OBSOLETE if (!(fp = fopen (args, "r"))) */
-/* OBSOLETE { */
-/* OBSOLETE printf_filtered ("Can't open %s\n", args); */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE while (n = fread (buffer, 1, 512, fp)) */
-/* OBSOLETE { */
-/* OBSOLETE do */
-/* OBSOLETE { */
-/* OBSOLETE n -= write (adapt_desc, buffer, n); */
-/* OBSOLETE } */
-/* OBSOLETE while (n > 0); */
-/* OBSOLETE if (n < 0) */
-/* OBSOLETE { */
-/* OBSOLETE perror ("writing ascii coff"); */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE fclose (fp); */
-/* OBSOLETE #endif */
-/* OBSOLETE expect_prompt (); /* Skip garbage that comes out */ */
-/* OBSOLETE fprintf (adapt_stream, "\r"); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* This is called not only when we first attach, but also when the */
-/* OBSOLETE user types "run" after having attached. */ */
-/* OBSOLETE void */
-/* OBSOLETE adapt_create_inferior (char *execfile, char *args, char **env) */
-/* OBSOLETE { */
-/* OBSOLETE int entry_pt; */
-/* OBSOLETE */
-/* OBSOLETE if (args && *args) */
-/* OBSOLETE error ("Can't pass arguments to remote adapt process."); */
-/* OBSOLETE */
-/* OBSOLETE if (execfile == 0 || exec_bfd == 0) */
-/* OBSOLETE error ("No executable file specified"); */
-/* OBSOLETE */
-/* OBSOLETE entry_pt = (int) bfd_get_start_address (exec_bfd); */
-/* OBSOLETE */
-/* OBSOLETE if (adapt_stream) */
-/* OBSOLETE { */
-/* OBSOLETE adapt_kill (NULL, NULL); */
-/* OBSOLETE adapt_clear_breakpoints (); */
-/* OBSOLETE init_wait_for_inferior (); */
-/* OBSOLETE /* Clear the input because what the adapt sends back is different */
-/* OBSOLETE * depending on whether it was running or not. */
-/* OBSOLETE */ */
-/* OBSOLETE slurp_input (); /* After this there should be a prompt */ */
-/* OBSOLETE fprintf (adapt_stream, "\r"); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE printf_filtered ("Do you want to download '%s' (y/n)? [y] : ", prog_name); */
-/* OBSOLETE { */
-/* OBSOLETE char buffer[10]; */
-/* OBSOLETE gets (buffer); */
-/* OBSOLETE if (*buffer != 'n') */
-/* OBSOLETE { */
-/* OBSOLETE adapt_load (prog_name, 0); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE #ifdef NOTDEF */
-/* OBSOLETE /* Set the PC and wait for a go/cont */ */
-/* OBSOLETE fprintf (adapt_stream, "G %x,N\r", entry_pt); */
-/* OBSOLETE printf_filtered ("Now use the 'continue' command to start.\n"); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE #else */
-/* OBSOLETE insert_breakpoints (); /* Needed to get correct instruction in cache */ */
-/* OBSOLETE proceed (entry_pt, TARGET_SIGNAL_DEFAULT, 0); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE printf_filtered ("Adapt not open yet.\n"); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Translate baud rates from integers to damn B_codes. Unix should */
-/* OBSOLETE have outgrown this crap years ago, but even POSIX wouldn't buck it. */ */
-/* OBSOLETE */
-/* OBSOLETE #ifndef B19200 */
-/* OBSOLETE #define B19200 EXTA */
-/* OBSOLETE #endif */
-/* OBSOLETE #ifndef B38400 */
-/* OBSOLETE #define B38400 EXTB */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE static struct */
-/* OBSOLETE { */
-/* OBSOLETE int rate, damn_b; */
-/* OBSOLETE } */
-/* OBSOLETE baudtab[] = */
-/* OBSOLETE { */
-/* OBSOLETE { */
-/* OBSOLETE 0, B0 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 50, B50 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 75, B75 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 110, B110 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 134, B134 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 150, B150 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 200, B200 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 300, B300 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 600, B600 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 1200, B1200 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 1800, B1800 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 2400, B2400 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 4800, B4800 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 9600, B9600 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 19200, B19200 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 38400, B38400 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE -1, -1 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE }; */
-/* OBSOLETE */
-/* OBSOLETE static int */
-/* OBSOLETE damn_b (int rate) */
-/* OBSOLETE { */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; baudtab[i].rate != -1; i++) */
-/* OBSOLETE if (rate == baudtab[i].rate) */
-/* OBSOLETE return baudtab[i].damn_b; */
-/* OBSOLETE return B38400; /* Random */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /* Open a connection to a remote debugger. */
-/* OBSOLETE NAME is the filename used for communication, then a space, */
-/* OBSOLETE then the baud rate. */
-/* OBSOLETE */ */
-/* OBSOLETE */
-/* OBSOLETE static int baudrate = 9600; */
-/* OBSOLETE static void */
-/* OBSOLETE adapt_open (char *name, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE TERMINAL sg; */
-/* OBSOLETE unsigned int prl; */
-/* OBSOLETE char *p; */
-/* OBSOLETE */
-/* OBSOLETE /* Find the first whitespace character, it separates dev_name from */
-/* OBSOLETE prog_name. */ */
-/* OBSOLETE if (name == 0) */
-/* OBSOLETE goto erroid; */
-/* OBSOLETE */
-/* OBSOLETE for (p = name; */
-/* OBSOLETE *p != '\0' && !isspace (*p); p++) */
-/* OBSOLETE ; */
-/* OBSOLETE if (*p == '\0') */
-/* OBSOLETE erroid: */
-/* OBSOLETE error ("\ */
-/* OBSOLETE Please include the name of the device for the serial port,\n\ */
-/* OBSOLETE the baud rate, and the name of the program to run on the remote system."); */
-/* OBSOLETE dev_name = (char *) xmalloc (p - name + 1); */
-/* OBSOLETE strncpy (dev_name, name, p - name); */
-/* OBSOLETE dev_name[p - name] = '\0'; */
-/* OBSOLETE */
-/* OBSOLETE /* Skip over the whitespace after dev_name */ */
-/* OBSOLETE for (; isspace (*p); p++) */
-/* OBSOLETE /*EMPTY */ ; */
-/* OBSOLETE */
-/* OBSOLETE if (1 != sscanf (p, "%d ", &baudrate)) */
-/* OBSOLETE goto erroid; */
-/* OBSOLETE */
-/* OBSOLETE /* Skip the number and then the spaces */ */
-/* OBSOLETE for (; isdigit (*p); p++) */
-/* OBSOLETE /*EMPTY */ ; */
-/* OBSOLETE for (; isspace (*p); p++) */
-/* OBSOLETE /*EMPTY */ ; */
-/* OBSOLETE */
-/* OBSOLETE if (prog_name != NULL) */
-/* OBSOLETE xfree (prog_name); */
-/* OBSOLETE prog_name = savestring (p, strlen (p)); */
-/* OBSOLETE */
-/* OBSOLETE adapt_close (0); */
-/* OBSOLETE */
-/* OBSOLETE adapt_desc = open (dev_name, O_RDWR); */
-/* OBSOLETE if (adapt_desc < 0) */
-/* OBSOLETE perror_with_name (dev_name); */
-/* OBSOLETE ioctl (adapt_desc, TIOCGETP, &sg); */
-/* OBSOLETE #if ! defined(COMPILE_CHECK) */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE sg.c_cc[VMIN] = 0; /* read with timeout. */ */
-/* OBSOLETE sg.c_cc[VTIME] = timeout * 10; */
-/* OBSOLETE sg.c_lflag &= ~(ICANON | ECHO); */
-/* OBSOLETE sg.c_cflag = (sg.c_cflag & ~CBAUD) | damn_b (baudrate); */
-/* OBSOLETE #else */
-/* OBSOLETE sg.sg_ispeed = damn_b (baudrate); */
-/* OBSOLETE sg.sg_ospeed = damn_b (baudrate); */
-/* OBSOLETE sg.sg_flags |= RAW | ANYP; */
-/* OBSOLETE sg.sg_flags &= ~ECHO; */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE ioctl (adapt_desc, TIOCSETP, &sg); */
-/* OBSOLETE adapt_stream = fdopen (adapt_desc, "r+"); */
-/* OBSOLETE #endif /* compile_check */ */
-/* OBSOLETE push_target (&adapt_ops); */
-/* OBSOLETE */
-/* OBSOLETE #ifndef HAVE_TERMIO */
-/* OBSOLETE #ifndef NO_SIGINTERRUPT */
-/* OBSOLETE /* Cause SIGALRM's to make reads fail with EINTR instead of resuming */
-/* OBSOLETE the read. */ */
-/* OBSOLETE if (siginterrupt (SIGALRM, 1) != 0) */
-/* OBSOLETE perror ("adapt_open: error in siginterrupt"); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /* Set up read timeout timer. */ */
-/* OBSOLETE if ((void (*)) signal (SIGALRM, adapt_timer) == (void (*)) -1) */
-/* OBSOLETE perror ("adapt_open: error in signal"); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE log_file = fopen (LOG_FILE, "w"); */
-/* OBSOLETE if (log_file == NULL) */
-/* OBSOLETE perror_with_name (LOG_FILE); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /* Put this port into NORMAL mode, send the 'normal' character */ */
-/* OBSOLETE write (adapt_desc, "", 1); /* Control A */ */
-/* OBSOLETE write (adapt_desc, "\r", 1); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE */
-/* OBSOLETE /* Hello? Are you there? */ */
-/* OBSOLETE write (adapt_desc, "\r", 1); */
-/* OBSOLETE */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE */
-/* OBSOLETE /* Clear any break points */ */
-/* OBSOLETE adapt_clear_breakpoints (); */
-/* OBSOLETE */
-/* OBSOLETE /* Print out some stuff, letting the user now what's going on */ */
-/* OBSOLETE printf_filtered ("Connected to an Adapt via %s.\n", dev_name); */
-/* OBSOLETE /* FIXME: can this restriction be removed? */ */
-/* OBSOLETE printf_filtered ("Remote debugging using virtual addresses works only\n"); */
-/* OBSOLETE printf_filtered ("\twhen virtual addresses map 1:1 to physical addresses.\n"); */
-/* OBSOLETE if (processor_type != a29k_freeze_mode) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf_filtered (gdb_stderr, */
-/* OBSOLETE "Freeze-mode debugging not available, and can only be done on an A29050.\n"); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Close out all files and local state before this target loses control. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE adapt_close (int quitting) */
-/* OBSOLETE { */
-/* OBSOLETE */
-/* OBSOLETE /* Clear any break points */ */
-/* OBSOLETE adapt_clear_breakpoints (); */
-/* OBSOLETE */
-/* OBSOLETE /* Put this port back into REMOTE mode */ */
-/* OBSOLETE if (adapt_stream) */
-/* OBSOLETE { */
-/* OBSOLETE fflush (adapt_stream); */
-/* OBSOLETE sleep (1); /* Let any output make it all the way back */ */
-/* OBSOLETE write (adapt_desc, "R\r", 2); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Due to a bug in Unix, fclose closes not only the stdio stream, */
-/* OBSOLETE but also the file descriptor. So we don't actually close */
-/* OBSOLETE adapt_desc. */ */
-/* OBSOLETE if (adapt_stream) */
-/* OBSOLETE fclose (adapt_stream); /* This also closes adapt_desc */ */
-/* OBSOLETE if (adapt_desc >= 0) */
-/* OBSOLETE /* close (adapt_desc); */ */
-/* OBSOLETE */
-/* OBSOLETE /* Do not try to close adapt_desc again, later in the program. */ */
-/* OBSOLETE adapt_stream = NULL; */
-/* OBSOLETE adapt_desc = -1; */
-/* OBSOLETE */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE if (log_file) */
-/* OBSOLETE { */
-/* OBSOLETE if (ferror (log_file)) */
-/* OBSOLETE printf_filtered ("Error writing log file.\n"); */
-/* OBSOLETE if (fclose (log_file) != 0) */
-/* OBSOLETE printf_filtered ("Error closing log file.\n"); */
-/* OBSOLETE log_file = NULL; */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Attach to the target that is already loaded and possibly running */ */
-/* OBSOLETE static void */
-/* OBSOLETE adapt_attach (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE printf_filtered ("Attaching to remote program %s.\n", prog_name); */
-/* OBSOLETE */
-/* OBSOLETE /* Send the adapt a kill. It is ok if it is not already running */ */
-/* OBSOLETE fprintf (adapt_stream, "K\r"); */
-/* OBSOLETE fflush (adapt_stream); */
-/* OBSOLETE expect_prompt (); /* Slurp the echo */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /* Terminate the open connection to the remote debugger. */
-/* OBSOLETE Use this when you want to detach and do something else */
-/* OBSOLETE with your gdb. */ */
-/* OBSOLETE void */
-/* OBSOLETE adapt_detach (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE */
-/* OBSOLETE if (adapt_stream) */
-/* OBSOLETE { /* Send it on its way (tell it to continue) */ */
-/* OBSOLETE adapt_clear_breakpoints (); */
-/* OBSOLETE fprintf (adapt_stream, "G\r"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE pop_target (); /* calls adapt_close to do the real work */ */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE printf_filtered ("Ending remote %s debugging\n", target_shortname); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Tell the remote machine to resume. */ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE adapt_resume (ptid_t ptid, int step, enum target_signal sig) */
-/* OBSOLETE { */
-/* OBSOLETE if (step) */
-/* OBSOLETE { */
-/* OBSOLETE write (adapt_desc, "t 1,s\r", 6); */
-/* OBSOLETE /* Wait for the echo. */ */
-/* OBSOLETE expect ("t 1,s\r\n"); */
-/* OBSOLETE /* Then comes a line containing the instruction we stepped to. */ */
-/* OBSOLETE expect ("@"); */
-/* OBSOLETE /* Then we get the prompt. */ */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE */
-/* OBSOLETE /* Force the next adapt_wait to return a trap. Not doing anything */
-/* OBSOLETE about I/O from the target means that the user has to type */
-/* OBSOLETE "continue" to see any. FIXME, this should be fixed. */ */
-/* OBSOLETE need_artificial_trap = 1; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE write (adapt_desc, "G\r", 2); */
-/* OBSOLETE /* Swallow the echo. */ */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Wait until the remote machine stops, then return, */
-/* OBSOLETE storing status in STATUS just as `wait' would. */ */
-/* OBSOLETE */
-/* OBSOLETE ptid_t */
-/* OBSOLETE adapt_wait (ptid_t ptid, struct target_waitstatus *status) */
-/* OBSOLETE { */
-/* OBSOLETE /* Strings to look for. '?' means match any single character. */
-/* OBSOLETE Note that with the algorithm we use, the initial character */
-/* OBSOLETE of the string cannot recur in the string, or we will not */
-/* OBSOLETE find some cases of the string in the input. */ */
-/* OBSOLETE */
-/* OBSOLETE static char bpt[] = "@"; */
-/* OBSOLETE /* It would be tempting to look for "\n[__exit + 0x8]\n" */
-/* OBSOLETE but that requires loading symbols with "yc i" and even if */
-/* OBSOLETE we did do that we don't know that the file has symbols. */ */
-/* OBSOLETE static char exitmsg[] = "@????????I JMPTI GR121,LR0"; */
-/* OBSOLETE char *bp = bpt; */
-/* OBSOLETE char *ep = exitmsg; */
-/* OBSOLETE */
-/* OBSOLETE /* Large enough for either sizeof (bpt) or sizeof (exitmsg) chars. */ */
-/* OBSOLETE char swallowed[50]; */
-/* OBSOLETE /* Current position in swallowed. */ */
-/* OBSOLETE char *swallowed_p = swallowed; */
-/* OBSOLETE */
-/* OBSOLETE int ch; */
-/* OBSOLETE int ch_handled; */
-/* OBSOLETE int old_timeout = timeout; */
-/* OBSOLETE int old_immediate_quit = immediate_quit; */
-/* OBSOLETE */
-/* OBSOLETE status->kind = TARGET_WAITKIND_EXITED; */
-/* OBSOLETE status->value.integer = 0; */
-/* OBSOLETE */
-/* OBSOLETE if (need_artificial_trap != 0) */
-/* OBSOLETE { */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; */
-/* OBSOLETE need_artificial_trap--; */
-/* OBSOLETE return inferior_ptid; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE timeout = 0; /* Don't time out -- user program is running. */ */
-/* OBSOLETE immediate_quit = 1; /* Helps ability to QUIT */ */
-/* OBSOLETE while (1) */
-/* OBSOLETE { */
-/* OBSOLETE QUIT; /* Let user quit and leave process running */ */
-/* OBSOLETE ch_handled = 0; */
-/* OBSOLETE ch = readchar (); */
-/* OBSOLETE if (ch == *bp) */
-/* OBSOLETE { */
-/* OBSOLETE bp++; */
-/* OBSOLETE if (*bp == '\0') */
-/* OBSOLETE break; */
-/* OBSOLETE ch_handled = 1; */
-/* OBSOLETE */
-/* OBSOLETE *swallowed_p++ = ch; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE bp = bpt; */
-/* OBSOLETE if (ch == *ep || *ep == '?') */
-/* OBSOLETE { */
-/* OBSOLETE ep++; */
-/* OBSOLETE if (*ep == '\0') */
-/* OBSOLETE break; */
-/* OBSOLETE */
-/* OBSOLETE if (!ch_handled) */
-/* OBSOLETE *swallowed_p++ = ch; */
-/* OBSOLETE ch_handled = 1; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE ep = exitmsg; */
-/* OBSOLETE if (!ch_handled) */
-/* OBSOLETE { */
-/* OBSOLETE char *p; */
-/* OBSOLETE /* Print out any characters which have been swallowed. */ */
-/* OBSOLETE for (p = swallowed; p < swallowed_p; ++p) */
-/* OBSOLETE putc (*p, stdout); */
-/* OBSOLETE swallowed_p = swallowed; */
-/* OBSOLETE putc (ch, stdout); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE if (*bp == '\0') */
-/* OBSOLETE { */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE status->kind = TARGET_WAITKIND_EXITED; */
-/* OBSOLETE status->value.integer = 0; */
-/* OBSOLETE } */
-/* OBSOLETE timeout = old_timeout; */
-/* OBSOLETE immediate_quit = old_immediate_quit; */
-/* OBSOLETE return inferior_ptid; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Return the name of register number REGNO */
-/* OBSOLETE in the form input and output by adapt. */
-/* OBSOLETE */
-/* OBSOLETE Returns a pointer to a static buffer containing the answer. */ */
-/* OBSOLETE static char * */
-/* OBSOLETE get_reg_name (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE static char buf[80]; */
-/* OBSOLETE if (regno >= GR96_REGNUM && regno < GR96_REGNUM + 32) */
-/* OBSOLETE sprintf (buf, "GR%03d", regno - GR96_REGNUM + 96); */
-/* OBSOLETE #if defined(GR64_REGNUM) */
-/* OBSOLETE else if (regno >= GR64_REGNUM && regno < GR64_REGNUM + 32) */
-/* OBSOLETE sprintf (buf, "GR%03d", regno - GR64_REGNUM + 64); */
-/* OBSOLETE #endif */
-/* OBSOLETE else if (regno >= LR0_REGNUM && regno < LR0_REGNUM + 128) */
-/* OBSOLETE sprintf (buf, "LR%03d", regno - LR0_REGNUM); */
-/* OBSOLETE else if (regno == Q_REGNUM) */
-/* OBSOLETE strcpy (buf, "SR131"); */
-/* OBSOLETE else if (regno >= BP_REGNUM && regno <= CR_REGNUM) */
-/* OBSOLETE sprintf (buf, "SR%03d", regno - BP_REGNUM + 133); */
-/* OBSOLETE else if (regno == ALU_REGNUM) */
-/* OBSOLETE strcpy (buf, "SR132"); */
-/* OBSOLETE else if (regno >= IPC_REGNUM && regno <= IPB_REGNUM) */
-/* OBSOLETE sprintf (buf, "SR%03d", regno - IPC_REGNUM + 128); */
-/* OBSOLETE else if (regno >= VAB_REGNUM && regno <= LRU_REGNUM) */
-/* OBSOLETE { */
-/* OBSOLETE /* When a 29050 is in freeze-mode, read shadow pcs instead */ */
-/* OBSOLETE if ((regno >= NPC_REGNUM && regno <= PC2_REGNUM) && USE_SHADOW_PC) */
-/* OBSOLETE sprintf (buf, "SR%03d", regno - NPC_REGNUM + 20); */
-/* OBSOLETE else */
-/* OBSOLETE sprintf (buf, "SR%03d", regno - VAB_REGNUM); */
-/* OBSOLETE } */
-/* OBSOLETE else if (regno == GR1_REGNUM) */
-/* OBSOLETE strcpy (buf, "GR001"); */
-/* OBSOLETE return buf; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Read the remote registers. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE adapt_fetch_registers (void) */
-/* OBSOLETE { */
-/* OBSOLETE int reg_index; */
-/* OBSOLETE int regnum_index; */
-/* OBSOLETE char tempbuf[10]; */
-/* OBSOLETE int sreg_buf[16]; */
-/* OBSOLETE int i, j; */
-/* OBSOLETE */
-/* OBSOLETE /* */
-/* OBSOLETE * Global registers */
-/* OBSOLETE */ */
-/* OBSOLETE #if defined(GR64_REGNUM) */
-/* OBSOLETE write (adapt_desc, "dw gr64,gr95\r", 13); */
-/* OBSOLETE for (reg_index = 64, regnum_index = GR64_REGNUM; */
-/* OBSOLETE reg_index < 96; */
-/* OBSOLETE reg_index += 4, regnum_index += 4) */
-/* OBSOLETE { */
-/* OBSOLETE sprintf (tempbuf, "GR%03d ", reg_index); */
-/* OBSOLETE expect (tempbuf); */
-/* OBSOLETE get_hex_regs (4, regnum_index); */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE write (adapt_desc, "dw gr96,gr127\r", 14); */
-/* OBSOLETE for (reg_index = 96, regnum_index = GR96_REGNUM; */
-/* OBSOLETE reg_index < 128; */
-/* OBSOLETE reg_index += 4, regnum_index += 4) */
-/* OBSOLETE { */
-/* OBSOLETE sprintf (tempbuf, "GR%03d ", reg_index); */
-/* OBSOLETE expect (tempbuf); */
-/* OBSOLETE get_hex_regs (4, regnum_index); */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* */
-/* OBSOLETE * Local registers */
-/* OBSOLETE */ */
-/* OBSOLETE for (i = 0; i < 128; i += 32) */
-/* OBSOLETE { */
-/* OBSOLETE /* The PC has a tendency to hang if we get these */
-/* OBSOLETE all in one fell swoop ("dw lr0,lr127"). */ */
-/* OBSOLETE sprintf (tempbuf, "dw lr%d\r", i); */
-/* OBSOLETE write (adapt_desc, tempbuf, strlen (tempbuf)); */
-/* OBSOLETE for (reg_index = i, regnum_index = LR0_REGNUM + i; */
-/* OBSOLETE reg_index < i + 32; */
-/* OBSOLETE reg_index += 4, regnum_index += 4) */
-/* OBSOLETE { */
-/* OBSOLETE sprintf (tempbuf, "LR%03d ", reg_index); */
-/* OBSOLETE expect (tempbuf); */
-/* OBSOLETE get_hex_regs (4, regnum_index); */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* */
-/* OBSOLETE * Special registers */
-/* OBSOLETE */ */
-/* OBSOLETE sprintf (tempbuf, "dw sr0\r"); */
-/* OBSOLETE write (adapt_desc, tempbuf, strlen (tempbuf)); */
-/* OBSOLETE for (i = 0; i < 4; i++) */
-/* OBSOLETE { /* SR0 - SR14 */ */
-/* OBSOLETE sprintf (tempbuf, "SR%3d", i * 4); */
-/* OBSOLETE expect (tempbuf); */
-/* OBSOLETE for (j = 0; j < (i == 3 ? 3 : 4); j++) */
-/* OBSOLETE sreg_buf[i * 4 + j] = get_hex_word (); */
-/* OBSOLETE } */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE /* */
-/* OBSOLETE * Read the pcs individually if we are in freeze mode. */
-/* OBSOLETE * See get_reg_name(), it translates the register names for the pcs to */
-/* OBSOLETE * the names of the shadow pcs. */
-/* OBSOLETE */ */
-/* OBSOLETE if (USE_SHADOW_PC) */
-/* OBSOLETE { */
-/* OBSOLETE sreg_buf[10] = read_register (NPC_REGNUM); /* pc0 */ */
-/* OBSOLETE sreg_buf[11] = read_register (PC_REGNUM); /* pc1 */ */
-/* OBSOLETE sreg_buf[12] = read_register (PC2_REGNUM); /* pc2 */ */
-/* OBSOLETE } */
-/* OBSOLETE for (i = 0; i < 14; i++) /* Supply vab -> lru */ */
-/* OBSOLETE supply_register (VAB_REGNUM + i, (char *) &sreg_buf[i]); */
-/* OBSOLETE sprintf (tempbuf, "dw sr128\r"); */
-/* OBSOLETE write (adapt_desc, tempbuf, strlen (tempbuf)); */
-/* OBSOLETE for (i = 0; i < 2; i++) */
-/* OBSOLETE { /* SR128 - SR135 */ */
-/* OBSOLETE sprintf (tempbuf, "SR%3d", 128 + i * 4); */
-/* OBSOLETE expect (tempbuf); */
-/* OBSOLETE for (j = 0; j < 4; j++) */
-/* OBSOLETE sreg_buf[i * 4 + j] = get_hex_word (); */
-/* OBSOLETE } */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE supply_register (IPC_REGNUM, (char *) &sreg_buf[0]); */
-/* OBSOLETE supply_register (IPA_REGNUM, (char *) &sreg_buf[1]); */
-/* OBSOLETE supply_register (IPB_REGNUM, (char *) &sreg_buf[2]); */
-/* OBSOLETE supply_register (Q_REGNUM, (char *) &sreg_buf[3]); */
-/* OBSOLETE /* Skip ALU */ */
-/* OBSOLETE supply_register (BP_REGNUM, (char *) &sreg_buf[5]); */
-/* OBSOLETE supply_register (FC_REGNUM, (char *) &sreg_buf[6]); */
-/* OBSOLETE supply_register (CR_REGNUM, (char *) &sreg_buf[7]); */
-/* OBSOLETE */
-/* OBSOLETE /* There doesn't seem to be any way to get these. */ */
-/* OBSOLETE { */
-/* OBSOLETE int val = -1; */
-/* OBSOLETE supply_register (FPE_REGNUM, (char *) &val); */
-/* OBSOLETE supply_register (INTE_REGNUM, (char *) &val); */
-/* OBSOLETE supply_register (FPS_REGNUM, (char *) &val); */
-/* OBSOLETE supply_register (EXO_REGNUM, (char *) &val); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE write (adapt_desc, "dw gr1,gr1\r", 11); */
-/* OBSOLETE expect ("GR001 "); */
-/* OBSOLETE get_hex_regs (1, GR1_REGNUM); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Fetch register REGNO, or all registers if REGNO is -1. */
-/* OBSOLETE */ */
-/* OBSOLETE static void */
-/* OBSOLETE adapt_fetch_register (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE if (regno == -1) */
-/* OBSOLETE adapt_fetch_registers (); */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE char *name = get_reg_name (regno); */
-/* OBSOLETE fprintf (adapt_stream, "dw %s,%s\r", name, name); */
-/* OBSOLETE expect (name); */
-/* OBSOLETE expect (" "); */
-/* OBSOLETE get_hex_regs (1, regno); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Store the remote registers from the contents of the block REGS. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE adapt_store_registers (void) */
-/* OBSOLETE { */
-/* OBSOLETE int i, j; */
-/* OBSOLETE */
-/* OBSOLETE fprintf (adapt_stream, "s gr1,%x\r", read_register (GR1_REGNUM)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE */
-/* OBSOLETE #if defined(GR64_REGNUM) */
-/* OBSOLETE for (j = 0; j < 32; j += 16) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf (adapt_stream, "s gr%d,", j + 64); */
-/* OBSOLETE for (i = 0; i < 15; ++i) */
-/* OBSOLETE fprintf (adapt_stream, "%x,", read_register (GR64_REGNUM + j + i)); */
-/* OBSOLETE fprintf (adapt_stream, "%x\r", read_register (GR64_REGNUM + j + 15)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE for (j = 0; j < 32; j += 16) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf (adapt_stream, "s gr%d,", j + 96); */
-/* OBSOLETE for (i = 0; i < 15; ++i) */
-/* OBSOLETE fprintf (adapt_stream, "%x,", read_register (GR96_REGNUM + j + i)); */
-/* OBSOLETE fprintf (adapt_stream, "%x\r", read_register (GR96_REGNUM + j + 15)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE for (j = 0; j < 128; j += 16) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf (adapt_stream, "s lr%d,", j); */
-/* OBSOLETE for (i = 0; i < 15; ++i) */
-/* OBSOLETE fprintf (adapt_stream, "%x,", read_register (LR0_REGNUM + j + i)); */
-/* OBSOLETE fprintf (adapt_stream, "%x\r", read_register (LR0_REGNUM + j + 15)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE fprintf (adapt_stream, "s sr128,%x,%x,%x\r", read_register (IPC_REGNUM), */
-/* OBSOLETE read_register (IPA_REGNUM), read_register (IPB_REGNUM)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE fprintf (adapt_stream, "s sr133,%x,%x,%x\r", read_register (BP_REGNUM), */
-/* OBSOLETE read_register (FC_REGNUM), read_register (CR_REGNUM)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE fprintf (adapt_stream, "s sr131,%x\r", read_register (Q_REGNUM)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE fprintf (adapt_stream, "s sr0,"); */
-/* OBSOLETE for (i = 0; i < 7; ++i) */
-/* OBSOLETE fprintf (adapt_stream, "%x,", read_register (VAB_REGNUM + i)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE fprintf (adapt_stream, "s sr7,"); */
-/* OBSOLETE for (i = 7; i < 14; ++i) */
-/* OBSOLETE fprintf (adapt_stream, "%x,", read_register (VAB_REGNUM + i)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Store register REGNO, or all if REGNO == -1. */
-/* OBSOLETE Return errno value. */ */
-/* OBSOLETE void */
-/* OBSOLETE adapt_store_register (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE /* printf("adapt_store_register() called.\n"); fflush(stdout); /* */ */
-/* OBSOLETE if (regno == -1) */
-/* OBSOLETE adapt_store_registers (); */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE char *name = get_reg_name (regno); */
-/* OBSOLETE fprintf (adapt_stream, "s %s,%x\r", name, read_register (regno)); */
-/* OBSOLETE /* Setting GR1 changes the numbers of all the locals, so */
-/* OBSOLETE invalidate the register cache. Do this *after* calling */
-/* OBSOLETE read_register, because we want read_register to return the */
-/* OBSOLETE value that write_register has just stuffed into the registers */
-/* OBSOLETE array, not the value of the register fetched from the */
-/* OBSOLETE inferior. */ */
-/* OBSOLETE if (regno == GR1_REGNUM) */
-/* OBSOLETE registers_changed (); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Get ready to modify the registers array. On machines which store */
-/* OBSOLETE individual registers, this doesn't need to do anything. On machines */
-/* OBSOLETE which store all the registers in one fell swoop, this makes sure */
-/* OBSOLETE that registers contains all the registers from the program being */
-/* OBSOLETE debugged. */ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE adapt_prepare_to_store (void) */
-/* OBSOLETE { */
-/* OBSOLETE /* Do nothing, since we can store individual regs */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static CORE_ADDR */
-/* OBSOLETE translate_addr (CORE_ADDR addr) */
-/* OBSOLETE { */
-/* OBSOLETE #if defined(KERNEL_DEBUGGING) */
-/* OBSOLETE /* Check for a virtual address in the kernel */ */
-/* OBSOLETE /* Assume physical address of ublock is in paddr_u register */ */
-/* OBSOLETE if (addr >= UVADDR) */
-/* OBSOLETE { */
-/* OBSOLETE /* PADDR_U register holds the physical address of the ublock */ */
-/* OBSOLETE CORE_ADDR i = (CORE_ADDR) read_register (PADDR_U_REGNUM); */
-/* OBSOLETE return (i + addr - (CORE_ADDR) UVADDR); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE return (addr); */
-/* OBSOLETE } */
-/* OBSOLETE #else */
-/* OBSOLETE return (addr); */
-/* OBSOLETE #endif */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /* FIXME! Merge these two. */ */
-/* OBSOLETE int */
-/* OBSOLETE adapt_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, */
-/* OBSOLETE struct mem_attrib *attrib ATTRIBUTE_UNUSED, */
-/* OBSOLETE struct target_ops *target ATTRIBUTE_UNUSED) */
-/* OBSOLETE { */
-/* OBSOLETE */
-/* OBSOLETE memaddr = translate_addr (memaddr); */
-/* OBSOLETE */
-/* OBSOLETE if (write) */
-/* OBSOLETE return adapt_write_inferior_memory (memaddr, myaddr, len); */
-/* OBSOLETE else */
-/* OBSOLETE return adapt_read_inferior_memory (memaddr, myaddr, len); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE adapt_files_info (void) */
-/* OBSOLETE { */
-/* OBSOLETE printf_filtered ("\tAttached to %s at %d baud and running program %s\n", */
-/* OBSOLETE dev_name, baudrate, prog_name); */
-/* OBSOLETE printf_filtered ("\ton an %s processor.\n", processor_name[processor_type]); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Copy LEN bytes of data from debugger memory at MYADDR */
-/* OBSOLETE to inferior's memory at MEMADDR. Returns errno value. */
-/* OBSOLETE * sb/sh instructions don't work on unaligned addresses, when TU=1. */
-/* OBSOLETE */ */
-/* OBSOLETE int */
-/* OBSOLETE adapt_write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len) */
-/* OBSOLETE { */
-/* OBSOLETE int i; */
-/* OBSOLETE unsigned int cps; */
-/* OBSOLETE */
-/* OBSOLETE /* Turn TU bit off so we can do 'sb' commands */ */
-/* OBSOLETE cps = read_register (CPS_REGNUM); */
-/* OBSOLETE if (cps & 0x00000800) */
-/* OBSOLETE write_register (CPS_REGNUM, cps & ~(0x00000800)); */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < len; i++) */
-/* OBSOLETE { */
-/* OBSOLETE if ((i % 16) == 0) */
-/* OBSOLETE fprintf (adapt_stream, "sb %x,", memaddr + i); */
-/* OBSOLETE if ((i % 16) == 15 || i == len - 1) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf (adapt_stream, "%x\r", ((unsigned char *) myaddr)[i]); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE fprintf (adapt_stream, "%x,", ((unsigned char *) myaddr)[i]); */
-/* OBSOLETE } */
-/* OBSOLETE /* Restore the old value of cps if the TU bit was on */ */
-/* OBSOLETE if (cps & 0x00000800) */
-/* OBSOLETE write_register (CPS_REGNUM, cps); */
-/* OBSOLETE return len; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Read LEN bytes from inferior memory at MEMADDR. Put the result */
-/* OBSOLETE at debugger address MYADDR. Returns errno value. */ */
-/* OBSOLETE int */
-/* OBSOLETE adapt_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len) */
-/* OBSOLETE { */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE /* Number of bytes read so far. */ */
-/* OBSOLETE int count; */
-/* OBSOLETE */
-/* OBSOLETE /* Starting address of this pass. */ */
-/* OBSOLETE unsigned long startaddr; */
-/* OBSOLETE */
-/* OBSOLETE /* Number of bytes to read in this pass. */ */
-/* OBSOLETE int len_this_pass; */
-/* OBSOLETE */
-/* OBSOLETE /* Note that this code works correctly if startaddr is just less */
-/* OBSOLETE than UINT_MAX (well, really CORE_ADDR_MAX if there was such a */
-/* OBSOLETE thing). That is, something like */
-/* OBSOLETE adapt_read_bytes (CORE_ADDR_MAX - 4, foo, 4) */
-/* OBSOLETE works--it never adds len to memaddr and gets 0. */ */
-/* OBSOLETE /* However, something like */
-/* OBSOLETE adapt_read_bytes (CORE_ADDR_MAX - 3, foo, 4) */
-/* OBSOLETE doesn't need to work. Detect it and give up if there's an attempt */
-/* OBSOLETE to do that. */ */
-/* OBSOLETE */
-/* OBSOLETE if (((memaddr - 1) + len) < memaddr) */
-/* OBSOLETE return EIO; */
-/* OBSOLETE */
-/* OBSOLETE startaddr = memaddr; */
-/* OBSOLETE count = 0; */
-/* OBSOLETE while (count < len) */
-/* OBSOLETE { */
-/* OBSOLETE len_this_pass = 16; */
-/* OBSOLETE if ((startaddr % 16) != 0) */
-/* OBSOLETE len_this_pass -= startaddr % 16; */
-/* OBSOLETE if (len_this_pass > (len - count)) */
-/* OBSOLETE len_this_pass = (len - count); */
-/* OBSOLETE */
-/* OBSOLETE fprintf (adapt_stream, "db %x,%x\r", startaddr, */
-/* OBSOLETE (startaddr - 1) + len_this_pass); */
-/* OBSOLETE */
-/* OBSOLETE #ifdef NOTDEF /* Why do this */ */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE /* Look for 8 hex digits. */ */
-/* OBSOLETE i = 0; */
-/* OBSOLETE while (1) */
-/* OBSOLETE { */
-/* OBSOLETE if (isxdigit (readchar ())) */
-/* OBSOLETE ++i; */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE error ("Hex digit expected from remote system."); */
-/* OBSOLETE } */
-/* OBSOLETE if (i >= 8) */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE #endif /* NOTDEF */ */
-/* OBSOLETE */
-/* OBSOLETE expect (" "); */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < len_this_pass; i++) */
-/* OBSOLETE get_hex_byte (&myaddr[count++]); */
-/* OBSOLETE */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE */
-/* OBSOLETE startaddr += len_this_pass; */
-/* OBSOLETE } */
-/* OBSOLETE return count; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE #define MAX_BREAKS 8 */
-/* OBSOLETE static int num_brkpts = 0; */
-/* OBSOLETE */
-/* OBSOLETE /* Insert a breakpoint at ADDR. SAVE is normally the address of the */
-/* OBSOLETE pattern buffer where the instruction that the breakpoint overwrites */
-/* OBSOLETE is saved. It is unused here since the Adapt Monitor is responsible */
-/* OBSOLETE for saving/restoring the original instruction. */ */
-/* OBSOLETE */
-/* OBSOLETE static int */
-/* OBSOLETE adapt_insert_breakpoint (CORE_ADDR addr, char *save) */
-/* OBSOLETE { */
-/* OBSOLETE if (num_brkpts < MAX_BREAKS) */
-/* OBSOLETE { */
-/* OBSOLETE num_brkpts++; */
-/* OBSOLETE fprintf (adapt_stream, "B %x", addr); */
-/* OBSOLETE fprintf (adapt_stream, "\r"); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE return (0); /* Success */ */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE fprintf_filtered (gdb_stderr, */
-/* OBSOLETE "Too many break points, break point not installed\n"); */
-/* OBSOLETE return (1); /* Failure */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Remove a breakpoint at ADDR. SAVE is normally the previously */
-/* OBSOLETE saved pattern, but is unused here as the Adapt Monitor is */
-/* OBSOLETE responsible for saving/restoring instructions. */ */
-/* OBSOLETE */
-/* OBSOLETE static int */
-/* OBSOLETE adapt_remove_breakpoint (CORE_ADDR addr, char *save) */
-/* OBSOLETE { */
-/* OBSOLETE if (num_brkpts > 0) */
-/* OBSOLETE { */
-/* OBSOLETE num_brkpts--; */
-/* OBSOLETE fprintf (adapt_stream, "BR %x", addr); */
-/* OBSOLETE fprintf (adapt_stream, "\r"); */
-/* OBSOLETE fflush (adapt_stream); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE return (0); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Clear the adapts notion of what the break points are */ */
-/* OBSOLETE static int */
-/* OBSOLETE adapt_clear_breakpoints (void) */
-/* OBSOLETE { */
-/* OBSOLETE if (adapt_stream) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf (adapt_stream, "BR"); /* Clear all break points */ */
-/* OBSOLETE fprintf (adapt_stream, "\r"); */
-/* OBSOLETE fflush (adapt_stream); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE num_brkpts = 0; */
-/* OBSOLETE } */
-/* OBSOLETE static void */
-/* OBSOLETE adapt_mourn (void) */
-/* OBSOLETE { */
-/* OBSOLETE adapt_clear_breakpoints (); */
-/* OBSOLETE pop_target (); /* Pop back to no-child state */ */
-/* OBSOLETE generic_mourn_inferior (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Display everthing we read in from the adapt until we match/see the */
-/* OBSOLETE * specified string */
-/* OBSOLETE */ */
-/* OBSOLETE static int */
-/* OBSOLETE display_until (char *str) */
-/* OBSOLETE { */
-/* OBSOLETE int i = 0, j, c; */
-/* OBSOLETE */
-/* OBSOLETE while (c = readchar ()) */
-/* OBSOLETE { */
-/* OBSOLETE if (c == str[i]) */
-/* OBSOLETE { */
-/* OBSOLETE i++; */
-/* OBSOLETE if (i == strlen (str)) */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE if (i) */
-/* OBSOLETE { */
-/* OBSOLETE for (j = 0; j < i; j++) /* Put everthing we matched */ */
-/* OBSOLETE putchar (str[j]); */
-/* OBSOLETE i = 0; */
-/* OBSOLETE } */
-/* OBSOLETE putchar (c); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /* Put a command string, in args, out to the adapt. The adapt is assumed to */
-/* OBSOLETE be in raw mode, all writing/reading done through adapt_desc. */
-/* OBSOLETE Ouput from the adapt is placed on the users terminal until the */
-/* OBSOLETE prompt from the adapt is seen. */
-/* OBSOLETE FIXME: Can't handle commands that take input. */ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE adapt_com (char *args, int fromtty) */
-/* OBSOLETE { */
-/* OBSOLETE if (!adapt_stream) */
-/* OBSOLETE { */
-/* OBSOLETE printf_filtered ("Adapt not open. Use the 'target' command to open.\n"); */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Clear all input so only command relative output is displayed */ */
-/* OBSOLETE slurp_input (); */
-/* OBSOLETE */
-/* OBSOLETE switch (islower (args[0]) ? toupper (args[0]) : args[0]) */
-/* OBSOLETE { */
-/* OBSOLETE default: */
-/* OBSOLETE printf_filtered ("Unknown/Unimplemented adapt command '%s'\n", args); */
-/* OBSOLETE break; */
-/* OBSOLETE case 'G': /* Go, begin execution */ */
-/* OBSOLETE write (adapt_desc, args, strlen (args)); */
-/* OBSOLETE write (adapt_desc, "\r", 1); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE break; */
-/* OBSOLETE case 'B': /* Break points, B or BR */ */
-/* OBSOLETE case 'C': /* Check current 29k status (running/halted) */ */
-/* OBSOLETE case 'D': /* Display data/registers */ */
-/* OBSOLETE case 'I': /* Input from i/o space */ */
-/* OBSOLETE case 'J': /* Jam an instruction */ */
-/* OBSOLETE case 'K': /* Kill, stop execution */ */
-/* OBSOLETE case 'L': /* Disassemble */ */
-/* OBSOLETE case 'O': /* Output to i/o space */ */
-/* OBSOLETE case 'T': /* Trace */ */
-/* OBSOLETE case 'P': /* Pulse an input line */ */
-/* OBSOLETE case 'X': /* Examine special purpose registers */ */
-/* OBSOLETE case 'Z': /* Display trace buffer */ */
-/* OBSOLETE write (adapt_desc, args, strlen (args)); */
-/* OBSOLETE write (adapt_desc, "\r", 1); */
-/* OBSOLETE expect (args); /* Don't display the command */ */
-/* OBSOLETE display_until ("# "); */
-/* OBSOLETE break; */
-/* OBSOLETE /* Begin commands that take input in the form 'c x,y[,z...]' */ */
-/* OBSOLETE case 'S': /* Set memory or register */ */
-/* OBSOLETE if (strchr (args, ',')) */
-/* OBSOLETE { /* Assume it is properly formatted */ */
-/* OBSOLETE write (adapt_desc, args, strlen (args)); */
-/* OBSOLETE write (adapt_desc, "\r", 1); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Define the target subroutine names */ */
-/* OBSOLETE */
-/* OBSOLETE struct target_ops adapt_ops; */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE init_adapt_ops (void) */
-/* OBSOLETE { */
-/* OBSOLETE adapt_ops.to_shortname = "adapt"; */
-/* OBSOLETE adapt_ops.to_longname = "Remote AMD `Adapt' target"; */
-/* OBSOLETE adapt_ops.to_doc = "Remote debug an AMD 290*0 using an `Adapt' monitor via RS232"; */
-/* OBSOLETE adapt_ops.to_open = adapt_open; */
-/* OBSOLETE adapt_ops.to_close = adapt_close; */
-/* OBSOLETE adapt_ops.to_attach = adapt_attach; */
-/* OBSOLETE adapt_ops.to_post_attach = NULL; */
-/* OBSOLETE adapt_ops.to_require_attach = NULL; */
-/* OBSOLETE adapt_ops.to_detach = adapt_detach; */
-/* OBSOLETE adapt_ops.to_require_detach = NULL; */
-/* OBSOLETE adapt_ops.to_resume = adapt_resume; */
-/* OBSOLETE adapt_ops.to_wait = adapt_wait; */
-/* OBSOLETE adapt_ops.to_post_wait = NULL; */
-/* OBSOLETE adapt_ops.to_fetch_registers = adapt_fetch_register; */
-/* OBSOLETE adapt_ops.to_store_registers = adapt_store_register; */
-/* OBSOLETE adapt_ops.to_prepare_to_store = adapt_prepare_to_store; */
-/* OBSOLETE adapt_ops.to_xfer_memory = adapt_xfer_inferior_memory; */
-/* OBSOLETE adapt_ops.to_files_info = adapt_files_info; */
-/* OBSOLETE adapt_ops.to_insert_breakpoint = adapt_insert_breakpoint; */
-/* OBSOLETE adapt_ops.to_remove_breakpoint = adapt_remove_breakpoint; */
-/* OBSOLETE adapt_ops.to_terminal_init = 0; */
-/* OBSOLETE adapt_ops.to_terminal_inferior = 0; */
-/* OBSOLETE adapt_ops.to_terminal_ours_for_output = 0; */
-/* OBSOLETE adapt_ops.to_terminal_ours = 0; */
-/* OBSOLETE adapt_ops.to_terminal_info = 0; */
-/* OBSOLETE adapt_ops.to_kill = adapt_kill; */
-/* OBSOLETE adapt_ops.to_load = adapt_load; */
-/* OBSOLETE adapt_ops.to_lookup_symbol = 0; */
-/* OBSOLETE adapt_ops.to_create_inferior = adapt_create_inferior; */
-/* OBSOLETE adapt_ops.to_post_startup_inferior = NULL; */
-/* OBSOLETE adapt_ops.to_acknowledge_created_inferior = NULL; */
-/* OBSOLETE adapt_ops.to_clone_and_follow_inferior = NULL; */
-/* OBSOLETE adapt_ops.to_post_follow_inferior_by_clone = NULL; */
-/* OBSOLETE adapt_ops.to_insert_fork_catchpoint = NULL; */
-/* OBSOLETE adapt_ops.to_remove_fork_catchpoint = NULL; */
-/* OBSOLETE adapt_ops.to_insert_vfork_catchpoint = NULL; */
-/* OBSOLETE adapt_ops.to_remove_vfork_catchpoint = NULL; */
-/* OBSOLETE adapt_ops.to_has_forked = NULL; */
-/* OBSOLETE adapt_ops.to_has_vforked = NULL; */
-/* OBSOLETE adapt_ops.to_can_follow_vfork_prior_to_exec = NULL; */
-/* OBSOLETE adapt_ops.to_post_follow_vfork = NULL; */
-/* OBSOLETE adapt_ops.to_insert_exec_catchpoint = NULL; */
-/* OBSOLETE adapt_ops.to_remove_exec_catchpoint = NULL; */
-/* OBSOLETE adapt_ops.to_has_execd = NULL; */
-/* OBSOLETE adapt_ops.to_reported_exec_events_per_exec_call = NULL; */
-/* OBSOLETE adapt_ops.to_has_exited = NULL; */
-/* OBSOLETE adapt_ops.to_mourn_inferior = adapt_mourn; */
-/* OBSOLETE adapt_ops.to_can_run = 0; */
-/* OBSOLETE adapt_ops.to_notice_signals = 0; */
-/* OBSOLETE adapt_ops.to_thread_alive = 0; */
-/* OBSOLETE adapt_ops.to_stop = 0; /* process_stratum; */ */
-/* OBSOLETE adapt_ops.to_pid_to_exec_file = NULL; */
-/* OBSOLETE adapt_ops.to_stratum = 0; */
-/* OBSOLETE adapt_ops.DONT_USE = 0; */
-/* OBSOLETE adapt_ops.to_has_all_memory = 1; */
-/* OBSOLETE adapt_ops.to_has_memory = 1; */
-/* OBSOLETE adapt_ops.to_has_stack = 1; */
-/* OBSOLETE adapt_ops.to_has_registers = 1; */
-/* OBSOLETE adapt_ops.to_has_execution = 0; */
-/* OBSOLETE adapt_ops.to_sections = 0; */
-/* OBSOLETE adapt_ops.to_sections_end = 0; */
-/* OBSOLETE adapt_ops.to_magic = OPS_MAGIC; */
-/* OBSOLETE } /* init_adapt_ops */ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE _initialize_remote_adapt (void) */
-/* OBSOLETE { */
-/* OBSOLETE init_adapt_ops (); */
-/* OBSOLETE add_target (&adapt_ops); */
-/* OBSOLETE add_com ("adapt <command>", class_obscure, adapt_com, */
-/* OBSOLETE "Send a command to the AMD Adapt remote monitor."); */
-/* OBSOLETE } */
diff --git a/contrib/gdb/gdb/remote-array.c b/contrib/gdb/gdb/remote-array.c
deleted file mode 100644
index 204aaed40a4c..000000000000
--- a/contrib/gdb/gdb/remote-array.c
+++ /dev/null
@@ -1,1457 +0,0 @@
-/* Remote debugging interface for Array Tech RAID controller..
-
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
- Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
-
- This module talks to a debug monitor called 'MONITOR', which
- We communicate with MONITOR via either a direct serial line, or a TCP
- (or possibly TELNET) stream to a terminal multiplexor,
- which in turn talks to the target board.
-
- 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 <ctype.h>
-#include <sys/types.h>
-#include "gdb_string.h"
-#include "command.h"
-#include "serial.h"
-#include "monitor.h"
-#include "remote-utils.h"
-#include "inferior.h"
-#include "version.h"
-#include "regcache.h"
-
-extern int baud_rate;
-
-#define ARRAY_PROMPT ">> "
-
-static void debuglogs (int, char *, ...);
-static void array_open ();
-static void array_close ();
-static void array_detach ();
-static void array_attach ();
-static void array_resume (ptid_t ptid, int step, enum target_signal sig);
-static void array_fetch_register ();
-static void array_store_register ();
-static void array_fetch_registers ();
-static void array_store_registers ();
-static void array_prepare_to_store ();
-static void array_files_info ();
-static void array_kill ();
-static void array_create_inferior ();
-static void array_mourn_inferior ();
-static void make_gdb_packet ();
-static int array_xfer_memory ();
-static ptid_t array_wait (ptid_t ptid,
- struct target_waitstatus *status);
-static int array_insert_breakpoint ();
-static int array_remove_breakpoint ();
-static int tohex ();
-static int to_hex ();
-static int from_hex ();
-static int array_send_packet ();
-static int array_get_packet ();
-static unsigned long ascii2hexword ();
-static void hexword2ascii ();
-
-#define LOG_FILE "monitor.log"
-#if defined (LOG_FILE)
-FILE *log_file;
-#endif
-
-static int timeout = 30;
-/* Having this larger than 400 causes us to be incompatible with m68k-stub.c
- and i386-stub.c. Normally, no one would notice because it only matters
- for writing large chunks of memory (e.g. in downloads). Also, this needs
- to be more than 400 if required to hold the registers (see below, where
- we round it up based on REGISTER_BYTES). */
-#define PBUFSIZ 400
-
-/*
- * Descriptor for I/O to remote machine. Initialize it to NULL so that
- * array_open knows that we don't have a file open when the program starts.
- */
-struct serial *array_desc = NULL;
-
-/*
- * this array of registers need to match the indexes used by GDB. The
- * whole reason this exists is cause the various ROM monitors use
- * different strings than GDB does, and doesn't support all the
- * registers either. So, typing "info reg sp" becomes a "r30".
- */
-extern char *tmp_mips_processor_type;
-extern int mips_set_processor_type ();
-
-static struct target_ops array_ops;
-
-static void
-init_array_ops (void)
-{
- array_ops.to_shortname = "array";
- array_ops.to_longname =
- "Debug using the standard GDB remote protocol for the Array Tech target.",
- array_ops.to_doc =
- "Debug using the standard GDB remote protocol for the Array Tech target.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- array_ops.to_open = array_open;
- array_ops.to_close = array_close;
- array_ops.to_attach = NULL;
- array_ops.to_post_attach = NULL;
- array_ops.to_require_attach = NULL;
- array_ops.to_detach = array_detach;
- array_ops.to_require_detach = NULL;
- array_ops.to_resume = array_resume;
- array_ops.to_wait = array_wait;
- array_ops.to_post_wait = NULL;
- array_ops.to_fetch_registers = array_fetch_registers;
- array_ops.to_store_registers = array_store_registers;
- array_ops.to_prepare_to_store = array_prepare_to_store;
- array_ops.to_xfer_memory = array_xfer_memory;
- array_ops.to_files_info = array_files_info;
- array_ops.to_insert_breakpoint = array_insert_breakpoint;
- array_ops.to_remove_breakpoint = array_remove_breakpoint;
- array_ops.to_terminal_init = 0;
- array_ops.to_terminal_inferior = 0;
- array_ops.to_terminal_ours_for_output = 0;
- array_ops.to_terminal_ours = 0;
- array_ops.to_terminal_info = 0;
- array_ops.to_kill = array_kill;
- array_ops.to_load = 0;
- array_ops.to_lookup_symbol = 0;
- array_ops.to_create_inferior = array_create_inferior;
- array_ops.to_post_startup_inferior = NULL;
- array_ops.to_acknowledge_created_inferior = NULL;
- array_ops.to_clone_and_follow_inferior = NULL;
- array_ops.to_post_follow_inferior_by_clone = NULL;
- array_ops.to_insert_fork_catchpoint = NULL;
- array_ops.to_remove_fork_catchpoint = NULL;
- array_ops.to_insert_vfork_catchpoint = NULL;
- array_ops.to_remove_vfork_catchpoint = NULL;
- array_ops.to_has_forked = NULL;
- array_ops.to_has_vforked = NULL;
- array_ops.to_can_follow_vfork_prior_to_exec = NULL;
- array_ops.to_post_follow_vfork = NULL;
- array_ops.to_insert_exec_catchpoint = NULL;
- array_ops.to_remove_exec_catchpoint = NULL;
- array_ops.to_has_execd = NULL;
- array_ops.to_reported_exec_events_per_exec_call = NULL;
- array_ops.to_has_exited = NULL;
- array_ops.to_mourn_inferior = array_mourn_inferior;
- array_ops.to_can_run = 0;
- array_ops.to_notice_signals = 0;
- array_ops.to_thread_alive = 0;
- array_ops.to_stop = 0;
- array_ops.to_pid_to_exec_file = NULL;
- array_ops.to_stratum = process_stratum;
- array_ops.DONT_USE = 0;
- array_ops.to_has_all_memory = 1;
- array_ops.to_has_memory = 1;
- array_ops.to_has_stack = 1;
- array_ops.to_has_registers = 1;
- array_ops.to_has_execution = 1;
- array_ops.to_sections = 0;
- array_ops.to_sections_end = 0;
- array_ops.to_magic = OPS_MAGIC;
-};
-
-/*
- * printf_monitor -- send data to monitor. Works just like printf.
- */
-static void
-printf_monitor (char *pattern,...)
-{
- va_list args;
- char buf[PBUFSIZ];
- int i;
-
- va_start (args, pattern);
-
- vsprintf (buf, pattern, args);
-
- debuglogs (1, "printf_monitor(), Sending: \"%s\".", buf);
-
- if (strlen (buf) > PBUFSIZ)
- error ("printf_monitor(): string too long");
- if (serial_write (array_desc, buf, strlen (buf)))
- fprintf (stderr, "serial_write failed: %s\n", safe_strerror (errno));
-}
-/*
- * write_monitor -- send raw data to monitor.
- */
-static void
-write_monitor (char data[], int len)
-{
- if (serial_write (array_desc, data, len))
- fprintf (stderr, "serial_write failed: %s\n", safe_strerror (errno));
-
- *(data + len + 1) = '\0';
- debuglogs (1, "write_monitor(), Sending: \"%s\".", data);
-
-}
-
-/*
- * debuglogs -- deal with debugging info to multiple sources. This takes
- * two real args, the first one is the level to be compared against
- * the sr_get_debug() value, the second arg is a printf buffer and args
- * to be formatted and printed. A CR is added after each string is printed.
- */
-static void
-debuglogs (int level, char *pattern,...)
-{
- va_list args;
- char *p;
- unsigned char buf[PBUFSIZ];
- char newbuf[PBUFSIZ];
- int i;
-
- va_start (args, pattern);
-
- if ((level < 0) || (level > 100))
- {
- error ("Bad argument passed to debuglogs(), needs debug level");
- return;
- }
-
- vsprintf (buf, pattern, args); /* format the string */
-
- /* convert some characters so it'll look right in the log */
- p = newbuf;
- for (i = 0; buf[i] != '\0'; i++)
- {
- if (i > PBUFSIZ)
- error ("Debug message too long");
- switch (buf[i])
- {
- case '\n': /* newlines */
- *p++ = '\\';
- *p++ = 'n';
- continue;
- case '\r': /* carriage returns */
- *p++ = '\\';
- *p++ = 'r';
- continue;
- case '\033': /* escape */
- *p++ = '\\';
- *p++ = 'e';
- continue;
- case '\t': /* tab */
- *p++ = '\\';
- *p++ = 't';
- continue;
- case '\b': /* backspace */
- *p++ = '\\';
- *p++ = 'b';
- continue;
- default: /* no change */
- *p++ = buf[i];
- }
-
- if (buf[i] < 26)
- { /* modify control characters */
- *p++ = '^';
- *p++ = buf[i] + 'A';
- continue;
- }
- if (buf[i] >= 128)
- { /* modify control characters */
- *p++ = '!';
- *p++ = buf[i] + 'A';
- continue;
- }
- }
- *p = '\0'; /* terminate the string */
-
- if (sr_get_debug () > level)
- printf_unfiltered ("%s\n", newbuf);
-
-#ifdef LOG_FILE /* write to the monitor log */
- if (log_file != 0x0)
- {
- fputs (newbuf, log_file);
- fputc ('\n', log_file);
- fflush (log_file);
- }
-#endif
-}
-
-/* readchar -- read a character from the remote system, doing all the fancy
- * timeout stuff.
- */
-static int
-readchar (int timeout)
-{
- int c;
-
- c = serial_readchar (array_desc, abs (timeout));
-
- if (sr_get_debug () > 5)
- {
- putchar (c & 0x7f);
- debuglogs (5, "readchar: timeout = %d\n", timeout);
- }
-
-#ifdef LOG_FILE
- if (isascii (c))
- putc (c & 0x7f, log_file);
-#endif
-
- if (c >= 0)
- return c & 0x7f;
-
- if (c == SERIAL_TIMEOUT)
- {
- if (timeout <= 0)
- return c; /* Polls shouldn't generate timeout errors */
- error ("Timeout reading from remote system.");
-#ifdef LOG_FILE
- fputs ("ERROR: Timeout reading from remote system", log_file);
-#endif
- }
- perror_with_name ("readchar");
-}
-
-/*
- * expect -- scan input from the remote system, until STRING is found.
- * If DISCARD is non-zero, then discard non-matching input, else print
- * it out. Let the user break out immediately.
- */
-static void
-expect (char *string, int discard)
-{
- char *p = string;
- int c;
-
-
- debuglogs (1, "Expecting \"%s\".", string);
-
- immediate_quit++;
- while (1)
- {
- c = readchar (timeout);
- if (!isascii (c))
- continue;
- if (c == *p++)
- {
- if (*p == '\0')
- {
- immediate_quit--;
- debuglogs (4, "Matched");
- return;
- }
- }
- else
- {
- if (!discard)
- {
- fputc_unfiltered (c, gdb_stdout);
- }
- p = string;
- }
- }
-}
-
-/* Keep discarding input until we see the MONITOR array_cmds->prompt.
-
- The convention for dealing with the expect_prompt is that you
- o give your command
- o *then* wait for the expect_prompt.
-
- Thus the last thing that a procedure does with the serial line
- will be an expect_prompt(). Exception: array_resume does not
- wait for the expect_prompt, because the terminal is being handed over
- to the inferior. However, the next thing which happens after that
- is a array_wait which does wait for the expect_prompt.
- Note that this includes abnormal exit, e.g. error(). This is
- necessary to prevent getting into states from which we can't
- recover. */
-static void
-expect_prompt (int discard)
-{
- expect (ARRAY_PROMPT, discard);
-}
-
-/*
- * junk -- ignore junk characters. Returns a 1 if junk, 0 otherwise
- */
-static int
-junk (char ch)
-{
- switch (ch)
- {
- case '\0':
- case ' ':
- case '-':
- case '\t':
- case '\r':
- case '\n':
- if (sr_get_debug () > 5)
- debuglogs (5, "Ignoring \'%c\'.", ch);
- return 1;
- default:
- if (sr_get_debug () > 5)
- debuglogs (5, "Accepting \'%c\'.", ch);
- return 0;
- }
-}
-
-/*
- * get_hex_digit -- Get a hex digit from the remote system & return its value.
- * If ignore is nonzero, ignore spaces, newline & tabs.
- */
-static int
-get_hex_digit (int ignore)
-{
- static int ch;
- while (1)
- {
- ch = readchar (timeout);
- if (junk (ch))
- continue;
- if (sr_get_debug () > 4)
- {
- debuglogs (4, "get_hex_digit() got a 0x%x(%c)", ch, ch);
- }
- else
- {
-#ifdef LOG_FILE /* write to the monitor log */
- if (log_file != 0x0)
- {
- fputs ("get_hex_digit() got a 0x", log_file);
- fputc (ch, log_file);
- fputc ('\n', log_file);
- fflush (log_file);
- }
-#endif
- }
-
- if (ch >= '0' && ch <= '9')
- return ch - '0';
- else if (ch >= 'A' && ch <= 'F')
- return ch - 'A' + 10;
- else if (ch >= 'a' && ch <= 'f')
- return ch - 'a' + 10;
- else if (ch == ' ' && ignore)
- ;
- else
- {
- expect_prompt (1);
- debuglogs (4, "Invalid hex digit from remote system. (0x%x)", ch);
- error ("Invalid hex digit from remote system. (0x%x)", ch);
- }
- }
-}
-
-/* get_hex_byte -- Get a byte from monitor and put it in *BYT.
- * Accept any number leading spaces.
- */
-static void
-get_hex_byte (char *byt)
-{
- int val;
-
- val = get_hex_digit (1) << 4;
- debuglogs (4, "get_hex_byte() -- Read first nibble 0x%x", val);
-
- val |= get_hex_digit (0);
- debuglogs (4, "get_hex_byte() -- Read second nibble 0x%x", val);
- *byt = val;
-
- debuglogs (4, "get_hex_byte() -- Read a 0x%x", val);
-}
-
-/*
- * get_hex_word -- Get N 32-bit words from remote, each preceded by a space,
- * and put them in registers starting at REGNO.
- */
-static int
-get_hex_word (void)
-{
- long val, newval;
- int i;
-
- val = 0;
-
- for (i = 0; i < 8; i++)
- val = (val << 4) + get_hex_digit (i == 0);
-
- debuglogs (4, "get_hex_word() got a 0x%x.", val);
-
- return val;
-}
-
-/* This is called not only when we first attach, but also when the
- user types "run" after having attached. */
-static void
-array_create_inferior (char *execfile, char *args, char **env)
-{
- int entry_pt;
-
- if (args && *args)
- error ("Can't pass arguments to remote MONITOR process");
-
- if (execfile == 0 || exec_bfd == 0)
- error ("No executable file specified");
-
- entry_pt = (int) bfd_get_start_address (exec_bfd);
-
-/* The "process" (board) is already stopped awaiting our commands, and
- the program is already downloaded. We just set its PC and go. */
-
- 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 ();
-
- /* insert_step_breakpoint (); FIXME, do we need this? */
-
- /* Let 'er rip... */
- proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0);
-}
-
-/*
- * array_open -- open a connection to a remote debugger.
- * NAME is the filename used for communication.
- */
-static int baudrate = 9600;
-static char dev_name[100];
-
-static void
-array_open (char *args, char *name, int from_tty)
-{
- char packet[PBUFSIZ];
-
- if (args == NULL)
- error ("Use `target %s DEVICE-NAME' to use a serial port, or \n\
-`target %s HOST-NAME:PORT-NUMBER' to use a network connection.", name, name);
-
-/* if (is_open) */
- array_close (0);
-
- target_preopen (from_tty);
- unpush_target (&array_ops);
-
- tmp_mips_processor_type = "lsi33k"; /* change the default from r3051 */
- mips_set_processor_type_command ("lsi33k", 0);
-
- strcpy (dev_name, args);
- array_desc = serial_open (dev_name);
-
- if (array_desc == NULL)
- perror_with_name (dev_name);
-
- if (baud_rate != -1)
- {
- if (serial_setbaudrate (array_desc, baud_rate))
- {
- serial_close (array_desc);
- perror_with_name (name);
- }
- }
-
- serial_raw (array_desc);
-
-#if defined (LOG_FILE)
- log_file = fopen (LOG_FILE, "w");
- if (log_file == NULL)
- perror_with_name (LOG_FILE);
- fprintf (log_file, "GDB %s (%s", version, host_name);
- fprintf (log_file, " --target %s)\n", array_ops.to_shortname);
- fprintf (log_file, "Remote target %s connected to %s\n\n", array_ops.to_shortname, dev_name);
-#endif
-
- /* see if the target is alive. For a ROM monitor, we can just try to force the
- expect_prompt to print a few times. For the GDB remote protocol, the application
- being debugged is sitting at a breakpoint and waiting for GDB to initialize
- the connection. We force it to give us an empty packet to see if it's alive.
- */
- debuglogs (3, "Trying to ACK the target's debug stub");
- /* unless your are on the new hardware, the old board won't initialize
- because the '@' doesn't flush output like it does on the new ROMS.
- */
- printf_monitor ("@"); /* ask for the last signal */
- expect_prompt (1); /* See if we get a expect_prompt */
-#ifdef TEST_ARRAY /* skip packet for testing */
- make_gdb_packet (packet, "?"); /* ask for a bogus packet */
- if (array_send_packet (packet) == 0)
- error ("Couldn't transmit packet\n");
- printf_monitor ("@\n"); /* force it to flush stdout */
- expect_prompt (1); /* See if we get a expect_prompt */
-#endif
- push_target (&array_ops);
- if (from_tty)
- printf ("Remote target %s connected to %s\n", array_ops.to_shortname, dev_name);
-}
-
-/*
- * array_close -- Close out all files and local state before this
- * target loses control.
- */
-
-static void
-array_close (int quitting)
-{
- serial_close (array_desc);
- array_desc = NULL;
-
- debuglogs (1, "array_close (quitting=%d)", quitting);
-
-#if defined (LOG_FILE)
- if (log_file)
- {
- if (ferror (log_file))
- printf_filtered ("Error writing log file.\n");
- if (fclose (log_file) != 0)
- printf_filtered ("Error closing log file.\n");
- }
-#endif
-}
-
-/*
- * array_detach -- terminate the open connection to the remote
- * debugger. Use this when you want to detach and do something
- * else with your gdb.
- */
-static void
-array_detach (int from_tty)
-{
-
- debuglogs (1, "array_detach ()");
-
- pop_target (); /* calls array_close to do the real work */
- if (from_tty)
- printf ("Ending remote %s debugging\n", target_shortname);
-}
-
-/*
- * array_attach -- attach GDB to the target.
- */
-static void
-array_attach (char *args, int from_tty)
-{
- if (from_tty)
- printf ("Starting remote %s debugging\n", target_shortname);
-
- debuglogs (1, "array_attach (args=%s)", args);
-
- printf_monitor ("go %x\n");
- /* swallow the echo. */
- expect ("go %x\n", 1);
-}
-
-/*
- * array_resume -- Tell the remote machine to resume.
- */
-static void
-array_resume (ptid_t ptid, int step, enum target_signal sig)
-{
- debuglogs (1, "array_resume (step=%d, sig=%d)", step, sig);
-
- if (step)
- {
- printf_monitor ("s\n");
- }
- else
- {
- printf_monitor ("go\n");
- }
-}
-
-#define TMPBUFSIZ 5
-
-/*
- * array_wait -- Wait until the remote machine stops, then return,
- * storing status in status just as `wait' would.
- */
-static ptid_t
-array_wait (ptid_t ptid, struct target_waitstatus *status)
-{
- int old_timeout = timeout;
- int result, i;
- char c;
- struct serial *tty_desc;
- serial_ttystate ttystate;
-
- debuglogs (1, "array_wait (), printing extraneous text.");
-
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = 0;
-
- timeout = 0; /* Don't time out -- user program is running. */
-
-#if !defined(__GO32__) && !defined(__MSDOS__) && !defined(_WIN32)
- tty_desc = serial_fdopen (0);
- ttystate = serial_get_tty_state (tty_desc);
- serial_raw (tty_desc);
-
- i = 0;
- /* poll on the serial port and the keyboard. */
- while (1)
- {
- c = readchar (timeout);
- if (c > 0)
- {
- if (c == *(ARRAY_PROMPT + i))
- {
- if (++i >= strlen (ARRAY_PROMPT))
- { /* matched the prompt */
- debuglogs (4, "array_wait(), got the expect_prompt.");
- break;
- }
- }
- else
- { /* not the prompt */
- i = 0;
- }
- fputc_unfiltered (c, gdb_stdout);
- gdb_flush (gdb_stdout);
- }
- c = serial_readchar (tty_desc, timeout);
- if (c > 0)
- {
- serial_write (array_desc, &c, 1);
- /* do this so it looks like there's keyboard echo */
- if (c == 3) /* exit on Control-C */
- break;
-#if 0
- fputc_unfiltered (c, gdb_stdout);
- gdb_flush (gdb_stdout);
-#endif
- }
- }
- serial_set_tty_state (tty_desc, ttystate);
-#else
- expect_prompt (1);
- debuglogs (4, "array_wait(), got the expect_prompt.");
-#endif
-
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
-
- timeout = old_timeout;
-
- return inferior_ptid;
-}
-
-/*
- * array_fetch_registers -- read the remote registers into the
- * block regs.
- */
-static void
-array_fetch_registers (int ignored)
-{
- char *reg = alloca (MAX_REGISTER_RAW_SIZE);
- int regno;
- char *p;
- char *packet = alloca (PBUFSIZ);
-
- debuglogs (1, "array_fetch_registers (ignored=%d)\n", ignored);
-
- memset (packet, 0, PBUFSIZ);
- make_gdb_packet (packet, "g");
- if (array_send_packet (packet) == 0)
- error ("Couldn't transmit packet\n");
- if (array_get_packet (packet) == 0)
- error ("Couldn't receive packet\n");
- /* FIXME: read bytes from packet */
- debuglogs (4, "array_fetch_registers: Got a \"%s\" back\n", packet);
- for (regno = 0; regno <= PC_REGNUM + 4; regno++)
- {
- /* supply register stores in target byte order, so swap here */
- /* FIXME: convert from ASCII hex to raw bytes */
- LONGEST i = ascii2hexword (packet + (regno * 8));
- debuglogs (5, "Adding register %d = %x\n", regno, i);
- store_unsigned_integer (&reg, REGISTER_RAW_SIZE (regno), i);
- supply_register (regno, (char *) &reg);
- }
-}
-
-/*
- * This is unused by targets like this one that use a
- * protocol based on GDB's remote protocol.
- */
-static void
-array_fetch_register (int ignored)
-{
- array_fetch_registers (0 /* ignored */);
-}
-
-/*
- * Get all the registers from the targets. They come back in a large array.
- */
-static void
-array_store_registers (int ignored)
-{
- int regno;
- unsigned long i;
- char packet[PBUFSIZ];
- char buf[PBUFSIZ];
- char num[9];
-
- debuglogs (1, "array_store_registers()");
-
- memset (packet, 0, PBUFSIZ);
- memset (buf, 0, PBUFSIZ);
- buf[0] = 'G';
-
- /* Unimplemented registers read as all bits zero. */
- /* FIXME: read bytes from packet */
- for (regno = 0; regno < 41; regno++)
- { /* FIXME */
- /* supply register stores in target byte order, so swap here */
- /* FIXME: convert from ASCII hex to raw bytes */
- i = (unsigned long) read_register (regno);
- hexword2ascii (num, i);
- strcpy (buf + (regno * 8) + 1, num);
- }
- *(buf + (regno * 8) + 2) = 0;
- make_gdb_packet (packet, buf);
- if (array_send_packet (packet) == 0)
- error ("Couldn't transmit packet\n");
- if (array_get_packet (packet) == 0)
- error ("Couldn't receive packet\n");
-
- registers_changed ();
-}
-
-/*
- * This is unused by targets like this one that use a
- * protocol based on GDB's remote protocol.
- */
-static void
-array_store_register (int ignored)
-{
- array_store_registers (0 /* ignored */);
-}
-
-/* Get ready to modify the registers array. On machines which store
- individual registers, this doesn't need to do anything. On machines
- which store all the registers in one fell swoop, this makes sure
- that registers contains all the registers from the program being
- debugged. */
-
-static void
-array_prepare_to_store (void)
-{
- /* Do nothing, since we can store individual regs */
-}
-
-static void
-array_files_info (void)
-{
- printf ("\tAttached to %s at %d baud.\n",
- dev_name, baudrate);
-}
-
-/*
- * array_write_inferior_memory -- Copy LEN bytes of data from debugger
- * memory at MYADDR to inferior's memory at MEMADDR. Returns length moved.
- */
-static int
-array_write_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
- unsigned long i;
- int j;
- char packet[PBUFSIZ];
- char buf[PBUFSIZ];
- char num[9];
- char *p;
-
- debuglogs (1, "array_write_inferior_memory (memaddr=0x%x, myaddr=0x%x, len=%d)", memaddr, myaddr, len);
- memset (buf, '\0', PBUFSIZ); /* this also sets the string terminator */
- p = buf;
-
- *p++ = 'M'; /* The command to write memory */
- hexword2ascii (num, memaddr); /* convert the address */
- strcpy (p, num); /* copy the address */
- p += 8;
- *p++ = ','; /* add comma delimeter */
- hexword2ascii (num, len); /* Get the length as a 4 digit number */
- *p++ = num[4];
- *p++ = num[5];
- *p++ = num[6];
- *p++ = num[7];
- *p++ = ':'; /* add the colon delimeter */
- for (j = 0; j < len; j++)
- { /* copy the data in after converting it */
- *p++ = tohex ((myaddr[j] >> 4) & 0xf);
- *p++ = tohex (myaddr[j] & 0xf);
- }
-
- make_gdb_packet (packet, buf);
- if (array_send_packet (packet) == 0)
- error ("Couldn't transmit packet\n");
- if (array_get_packet (packet) == 0)
- error ("Couldn't receive packet\n");
-
- return len;
-}
-
-/*
- * array_read_inferior_memory -- read LEN bytes from inferior memory
- * at MEMADDR. Put the result at debugger address MYADDR. Returns
- * length moved.
- */
-static int
-array_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- int j;
- char buf[20];
- char packet[PBUFSIZ];
- int count; /* Number of bytes read so far. */
- unsigned long startaddr; /* Starting address of this pass. */
- int len_this_pass; /* Number of bytes to read in this pass. */
-
- debuglogs (1, "array_read_inferior_memory (memaddr=0x%x, myaddr=0x%x, len=%d)", memaddr, myaddr, len);
-
- /* Note that this code works correctly if startaddr is just less
- than UINT_MAX (well, really CORE_ADDR_MAX if there was such a
- thing). That is, something like
- array_read_bytes (CORE_ADDR_MAX - 4, foo, 4)
- works--it never adds len To memaddr and gets 0. */
- /* However, something like
- array_read_bytes (CORE_ADDR_MAX - 3, foo, 4)
- doesn't need to work. Detect it and give up if there's an attempt
- to do that. */
- if (((memaddr - 1) + len) < memaddr)
- {
- errno = EIO;
- return 0;
- }
-
- for (count = 0, startaddr = memaddr; count < len; startaddr += len_this_pass)
- {
- /* Try to align to 16 byte boundry (why?) */
- len_this_pass = 16;
- if ((startaddr % 16) != 0)
- {
- len_this_pass -= startaddr % 16;
- }
- /* Only transfer bytes we need */
- if (len_this_pass > (len - count))
- {
- len_this_pass = (len - count);
- }
- /* Fetch the bytes */
- debuglogs (3, "read %d bytes from inferior address %x", len_this_pass,
- startaddr);
- sprintf (buf, "m%08lx,%04x", startaddr, len_this_pass);
- make_gdb_packet (packet, buf);
- if (array_send_packet (packet) == 0)
- {
- error ("Couldn't transmit packet\n");
- }
- if (array_get_packet (packet) == 0)
- {
- error ("Couldn't receive packet\n");
- }
- if (*packet == 0)
- {
- error ("Got no data in the GDB packet\n");
- }
- /* Pick packet apart and xfer bytes to myaddr */
- debuglogs (4, "array_read_inferior_memory: Got a \"%s\" back\n", packet);
- for (j = 0; j < len_this_pass; j++)
- {
- /* extract the byte values */
- myaddr[count++] = from_hex (*(packet + (j * 2))) * 16 + from_hex (*(packet + (j * 2) + 1));
- debuglogs (5, "myaddr[%d] set to %x\n", count - 1, myaddr[count - 1]);
- }
- }
- return (count);
-}
-
-/* Transfer LEN bytes between GDB address MYADDR and target address
- MEMADDR. If WRITE is non-zero, transfer them to the target,
- otherwise transfer them from the target. TARGET is unused.
-
- Returns the number of bytes transferred. */
-
-static int
-array_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib, struct target_ops *target)
-{
- if (write)
- return array_write_inferior_memory (memaddr, myaddr, len);
- else
- return array_read_inferior_memory (memaddr, myaddr, len);
-}
-
-static void
-array_kill (char *args, int from_tty)
-{
- return; /* ignore attempts to kill target system */
-}
-
-/* Clean up when a program exits.
- The program actually lives on in the remote processor's RAM, and may be
- run again without a download. Don't leave it full of breakpoint
- instructions. */
-
-static void
-array_mourn_inferior (void)
-{
- remove_breakpoints ();
- generic_mourn_inferior (); /* Do all the proper things now */
-}
-
-#define MAX_ARRAY_BREAKPOINTS 16
-
-static CORE_ADDR breakaddr[MAX_ARRAY_BREAKPOINTS] =
-{0};
-
-/*
- * array_insert_breakpoint -- add a breakpoint
- */
-static int
-array_insert_breakpoint (CORE_ADDR addr, char *shadow)
-{
- int i;
- int bp_size = 0;
- CORE_ADDR bp_addr = addr;
-
- debuglogs (1, "array_insert_breakpoint() addr = 0x%x", addr);
- BREAKPOINT_FROM_PC (&bp_addr, &bp_size);
-
- for (i = 0; i <= MAX_ARRAY_BREAKPOINTS; i++)
- {
- if (breakaddr[i] == 0)
- {
- breakaddr[i] = addr;
- if (sr_get_debug () > 4)
- printf ("Breakpoint at %s\n", paddr_nz (addr));
- array_read_inferior_memory (bp_addr, shadow, bp_size);
- printf_monitor ("b 0x%x\n", addr);
- expect_prompt (1);
- return 0;
- }
- }
-
- fprintf (stderr, "Too many breakpoints (> 16) for monitor\n");
- return 1;
-}
-
-/*
- * _remove_breakpoint -- Tell the monitor to remove a breakpoint
- */
-static int
-array_remove_breakpoint (CORE_ADDR addr, char *shadow)
-{
- int i;
-
- debuglogs (1, "array_remove_breakpoint() addr = 0x%x", addr);
-
- for (i = 0; i < MAX_ARRAY_BREAKPOINTS; i++)
- {
- if (breakaddr[i] == addr)
- {
- breakaddr[i] = 0;
- /* some monitors remove breakpoints based on the address */
- printf_monitor ("bd %x\n", i);
- expect_prompt (1);
- return 0;
- }
- }
- fprintf (stderr, "Can't find breakpoint associated with 0x%s\n",
- paddr_nz (addr));
- return 1;
-}
-
-static void
-array_stop (void)
-{
- debuglogs (1, "array_stop()");
- printf_monitor ("\003");
- expect_prompt (1);
-}
-
-/*
- * array_command -- put a command string, in args, out to MONITOR.
- * Output from MONITOR is placed on the users terminal until the
- * expect_prompt is seen. FIXME
- */
-static void
-monitor_command (char *args, int fromtty)
-{
- debuglogs (1, "monitor_command (args=%s)", args);
-
- if (array_desc == NULL)
- error ("monitor target not open.");
-
- if (!args)
- error ("Missing command.");
-
- printf_monitor ("%s\n", args);
- expect_prompt (0);
-}
-
-/*
- * make_gdb_packet -- make a GDB packet. The data is always ASCII.
- * A debug packet whose contents are <data>
- * is encapsulated for transmission in the form:
- *
- * $ <data> # CSUM1 CSUM2
- *
- * <data> must be ASCII alphanumeric and cannot include characters
- * '$' or '#'. If <data> starts with two characters followed by
- * ':', then the existing stubs interpret this as a sequence number.
- *
- * CSUM1 and CSUM2 are ascii hex representation of an 8-bit
- * checksum of <data>, the most significant nibble is sent first.
- * the hex digits 0-9,a-f are used.
- *
- */
-static void
-make_gdb_packet (char *buf, char *data)
-{
- int i;
- unsigned char csum = 0;
- int cnt;
- char *p;
-
- debuglogs (3, "make_gdb_packet(%s)\n", data);
- cnt = strlen (data);
- if (cnt > PBUFSIZ)
- error ("make_gdb_packet(): to much data\n");
-
- /* start with the packet header */
- p = buf;
- *p++ = '$';
-
- /* calculate the checksum */
- for (i = 0; i < cnt; i++)
- {
- csum += data[i];
- *p++ = data[i];
- }
-
- /* terminate the data with a '#' */
- *p++ = '#';
-
- /* add the checksum as two ascii digits */
- *p++ = tohex ((csum >> 4) & 0xf);
- *p++ = tohex (csum & 0xf);
- *p = 0x0; /* Null terminator on string */
-}
-
-/*
- * array_send_packet -- send a GDB packet to the target with error handling. We
- * get a '+' (ACK) back if the packet is received and the checksum
- * matches. Otherwise a '-' (NAK) is returned. It returns a 1 for a
- * successful transmition, or a 0 for a failure.
- */
-static int
-array_send_packet (char *packet)
-{
- int c, retries, i;
- char junk[PBUFSIZ];
-
- retries = 0;
-
-#if 0
- /* scan the packet to make sure it only contains valid characters.
- this may sound silly, but sometimes a garbled packet will hang
- the target board. We scan the whole thing, then print the error
- message.
- */
- for (i = 0; i < strlen (packet); i++)
- {
- debuglogs (5, "array_send_packet(): Scanning \'%c\'\n", packet[i]);
- /* legit hex numbers or command */
- if ((isxdigit (packet[i])) || (isalpha (packet[i])))
- continue;
- switch (packet[i])
- {
- case '+': /* ACK */
- case '-': /* NAK */
- case '#': /* end of packet */
- case '$': /* start of packet */
- continue;
- default: /* bogus character */
- retries++;
- debuglogs (4, "array_send_packet(): Found a non-ascii digit \'%c\' in the packet.\n", packet[i]);
- }
- }
-#endif
-
- if (retries > 0)
- error ("Can't send packet, found %d non-ascii characters", retries);
-
- /* ok, try to send the packet */
- retries = 0;
- while (retries++ <= 10)
- {
- printf_monitor ("%s", packet);
-
- /* read until either a timeout occurs (-2) or '+' is read */
- while (retries <= 10)
- {
- c = readchar (-timeout);
- debuglogs (3, "Reading a GDB protocol packet... Got a '%c'\n", c);
- switch (c)
- {
- case '+':
- debuglogs (3, "Got Ack\n");
- return 1;
- case SERIAL_TIMEOUT:
- debuglogs (3, "Timed out reading serial port\n");
- printf_monitor ("@"); /* resync with the monitor */
- expect_prompt (1); /* See if we get a expect_prompt */
- break; /* Retransmit buffer */
- case '-':
- debuglogs (3, "Got NAK\n");
- printf_monitor ("@"); /* resync with the monitor */
- expect_prompt (1); /* See if we get a expect_prompt */
- break;
- case '$':
- /* it's probably an old response, or the echo of our command.
- * just gobble up the packet and ignore it.
- */
- debuglogs (3, "Got a junk packet\n");
- i = 0;
- do
- {
- c = readchar (timeout);
- junk[i++] = c;
- }
- while (c != '#');
- c = readchar (timeout);
- junk[i++] = c;
- c = readchar (timeout);
- junk[i++] = c;
- junk[i++] = '\0';
- debuglogs (3, "Reading a junk packet, got a \"%s\"\n", junk);
- continue; /* Now, go look for next packet */
- default:
- continue;
- }
- retries++;
- debuglogs (3, "Retransmitting packet \"%s\"\n", packet);
- break; /* Here to retransmit */
- }
- } /* outer while */
- return 0;
-}
-
-/*
- * array_get_packet -- get a GDB packet from the target. Basically we read till we
- * see a '#', then check the checksum. It returns a 1 if it's gotten a
- * packet, or a 0 it the packet wasn't transmitted correctly.
- */
-static int
-array_get_packet (char *packet)
-{
- int c;
- int retries;
- unsigned char csum;
- unsigned char pktcsum;
- char *bp;
-
- csum = 0;
- bp = packet;
-
- memset (packet, 1, PBUFSIZ);
- retries = 0;
- while (retries <= 10)
- {
- do
- {
- c = readchar (timeout);
- if (c == SERIAL_TIMEOUT)
- {
- debuglogs (3, "array_get_packet: got time out from serial port.\n");
- }
- debuglogs (3, "Waiting for a '$', got a %c\n", c);
- }
- while (c != '$');
-
- retries = 0;
- while (retries <= 10)
- {
- c = readchar (timeout);
- debuglogs (3, "array_get_packet: got a '%c'\n", c);
- switch (c)
- {
- case SERIAL_TIMEOUT:
- debuglogs (3, "Timeout in mid-packet, retrying\n");
- return 0;
- case '$':
- debuglogs (3, "Saw new packet start in middle of old one\n");
- return 0; /* Start a new packet, count retries */
- case '#':
- *bp = '\0';
- pktcsum = from_hex (readchar (timeout)) << 4;
- pktcsum |= from_hex (readchar (timeout));
- if (csum == 0)
- debuglogs (3, "\nGDB packet checksum zero, must be a bogus packet\n");
- if (csum == pktcsum)
- {
- debuglogs (3, "\nGDB packet checksum correct, packet data is \"%s\",\n", packet);
- printf_monitor ("@");
- expect_prompt (1);
- return 1;
- }
- debuglogs (3, "Bad checksum, sentsum=0x%x, csum=0x%x\n", pktcsum, csum);
- return 0;
- case '*': /* Run length encoding */
- debuglogs (5, "Run length encoding in packet\n");
- csum += c;
- c = readchar (timeout);
- csum += c;
- c = c - ' ' + 3; /* Compute repeat count */
-
- if (c > 0 && c < 255 && bp + c - 1 < packet + PBUFSIZ - 1)
- {
- memset (bp, *(bp - 1), c);
- bp += c;
- continue;
- }
- *bp = '\0';
- printf_filtered ("Repeat count %d too large for buffer.\n", c);
- return 0;
-
- default:
- if ((!isxdigit (c)) && (!ispunct (c)))
- debuglogs (4, "Got a non-ascii digit \'%c\'.\\n", c);
- if (bp < packet + PBUFSIZ - 1)
- {
- *bp++ = c;
- csum += c;
- continue;
- }
-
- *bp = '\0';
- puts_filtered ("Remote packet too long.\n");
- return 0;
- }
- }
- }
- return 0; /* exceeded retries */
-}
-
-/*
- * ascii2hexword -- convert an ascii number represented by 8 digits to a hex value.
- */
-static unsigned long
-ascii2hexword (unsigned char *mem)
-{
- unsigned long val;
- int i;
- char buf[9];
-
- val = 0;
- for (i = 0; i < 8; i++)
- {
- val <<= 4;
- if (mem[i] >= 'A' && mem[i] <= 'F')
- val = val + mem[i] - 'A' + 10;
- if (mem[i] >= 'a' && mem[i] <= 'f')
- val = val + mem[i] - 'a' + 10;
- if (mem[i] >= '0' && mem[i] <= '9')
- val = val + mem[i] - '0';
- buf[i] = mem[i];
- }
- buf[8] = '\0';
- debuglogs (4, "ascii2hexword() got a 0x%x from %s(%x).\n", val, buf, mem);
- return val;
-}
-
-/*
- * ascii2hexword -- convert a hex value to an ascii number represented by 8
- * digits.
- */
-static void
-hexword2ascii (unsigned char *mem, unsigned long num)
-{
- int i;
- unsigned char ch;
-
- debuglogs (4, "hexword2ascii() converting %x ", num);
- for (i = 7; i >= 0; i--)
- {
- mem[i] = tohex ((num >> 4) & 0xf);
- mem[i] = tohex (num & 0xf);
- num = num >> 4;
- }
- mem[8] = '\0';
- debuglogs (4, "\tto a %s", mem);
-}
-
-/* Convert hex digit A to a number. */
-static int
-from_hex (int a)
-{
- if (a == 0)
- return 0;
-
- debuglogs (4, "from_hex got a 0x%x(%c)\n", a, a);
- if (a >= '0' && a <= '9')
- return a - '0';
- if (a >= 'a' && a <= 'f')
- return a - 'a' + 10;
- if (a >= 'A' && a <= 'F')
- return a - 'A' + 10;
- else
- {
- error ("Reply contains invalid hex digit 0x%x", a);
- }
-}
-
-/* Convert number NIB to a hex digit. */
-static int
-tohex (int nib)
-{
- if (nib < 10)
- return '0' + nib;
- else
- return 'a' + nib - 10;
-}
-
-/*
- * _initialize_remote_monitors -- setup a few addtitional commands that
- * are usually only used by monitors.
- */
-void
-_initialize_remote_monitors (void)
-{
- /* generic monitor command */
- add_com ("monitor", class_obscure, monitor_command,
- "Send a command to the debug monitor.");
-
-}
-
-/*
- * _initialize_array -- do any special init stuff for the target.
- */
-void
-_initialize_array (void)
-{
- init_array_ops ();
- add_target (&array_ops);
-}
diff --git a/contrib/gdb/gdb/remote-bug.c b/contrib/gdb/gdb/remote-bug.c
deleted file mode 100644
index f74ce9768e24..000000000000
--- a/contrib/gdb/gdb/remote-bug.c
+++ /dev/null
@@ -1,1027 +0,0 @@
-/* Remote debugging interface for Motorola's MVME187BUG monitor, an embedded
- monitor for the m88k.
-
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
- 2002 Free Software Foundation, Inc.
-
- Contributed by Cygnus Support. Written by K. Richard Pixley.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "inferior.h"
-#include "gdb_string.h"
-#include "regcache.h"
-#include <ctype.h>
-#include <fcntl.h>
-#include <setjmp.h>
-#include <errno.h>
-
-#include "terminal.h"
-#include "gdbcore.h"
-#include "gdbcmd.h"
-
-#include "serial.h"
-#include "remote-utils.h"
-
-/* External data declarations */
-extern int stop_soon_quietly; /* for wait_for_inferior */
-
-/* Forward data declarations */
-extern struct target_ops bug_ops; /* Forward declaration */
-
-/* Forward function declarations */
-static int bug_clear_breakpoints (void);
-
-static int bug_read_memory (CORE_ADDR memaddr,
- unsigned char *myaddr, int len);
-
-static int bug_write_memory (CORE_ADDR memaddr,
- unsigned char *myaddr, int len);
-
-/* This variable is somewhat arbitrary. It's here so that it can be
- set from within a running gdb. */
-
-static int srec_max_retries = 3;
-
-/* Each S-record download to the target consists of an S0 header
- record, some number of S3 data records, and one S7 termination
- record. I call this download a "frame". Srec_frame says how many
- bytes will be represented in each frame. */
-
-#define SREC_SIZE 160
-static int srec_frame = SREC_SIZE;
-
-/* This variable determines how many bytes will be represented in each
- S3 s-record. */
-
-static int srec_bytes = 40;
-
-/* At one point it appeared to me as though the bug monitor could not
- really be expected to receive two sequential characters at 9600
- baud reliably. Echo-pacing is an attempt to force data across the
- line even in this condition. Specifically, in echo-pace mode, each
- character is sent one at a time and we look for the echo before
- sending the next. This is excruciatingly slow. */
-
-static int srec_echo_pace = 0;
-
-/* How long to wait after an srec for a possible error message.
- Similar to the above, I tried sleeping after sending each S3 record
- in hopes that I might actually see error messages from the bug
- monitor. This might actually work if we were to use sleep
- intervals smaller than 1 second. */
-
-static int srec_sleep = 0;
-
-/* Every srec_noise records, flub the checksum. This is a debugging
- feature. Set the variable to something other than 1 in order to
- inject *deliberate* checksum errors. One might do this if one
- wanted to test error handling and recovery. */
-
-static int srec_noise = 0;
-
-/* Called when SIGALRM signal sent due to alarm() timeout. */
-
-/* Number of SIGTRAPs we need to simulate. That is, the next
- NEED_ARTIFICIAL_TRAP calls to bug_wait should just return
- SIGTRAP without actually waiting for anything. */
-
-static int need_artificial_trap = 0;
-
-/*
- * Download a file specified in 'args', to the bug.
- */
-
-static void
-bug_load (char *args, int fromtty)
-{
- bfd *abfd;
- asection *s;
- char buffer[1024];
-
- sr_check_open ();
-
- inferior_ptid = null_ptid;
- abfd = bfd_openr (args, 0);
- if (!abfd)
- {
- printf_filtered ("Unable to open file %s\n", args);
- return;
- }
-
- if (bfd_check_format (abfd, bfd_object) == 0)
- {
- printf_filtered ("File is not an object file\n");
- return;
- }
-
- s = abfd->sections;
- while (s != (asection *) NULL)
- {
- srec_frame = SREC_SIZE;
- if (s->flags & SEC_LOAD)
- {
- int i;
-
- char *buffer = xmalloc (srec_frame);
-
- printf_filtered ("%s\t: 0x%4lx .. 0x%4lx ", s->name, s->vma, s->vma + s->_raw_size);
- gdb_flush (gdb_stdout);
- for (i = 0; i < s->_raw_size; i += srec_frame)
- {
- if (srec_frame > s->_raw_size - i)
- srec_frame = s->_raw_size - i;
-
- bfd_get_section_contents (abfd, s, buffer, i, srec_frame);
- bug_write_memory (s->vma + i, buffer, srec_frame);
- printf_filtered ("*");
- gdb_flush (gdb_stdout);
- }
- printf_filtered ("\n");
- xfree (buffer);
- }
- s = s->next;
- }
- sprintf (buffer, "rs ip %lx", (unsigned long) abfd->start_address);
- sr_write_cr (buffer);
- gr_expect_prompt ();
-}
-
-#if 0
-static char *
-get_word (char **p)
-{
- char *s = *p;
- char *word;
- char *copy;
- size_t len;
-
- while (isspace (*s))
- s++;
-
- word = s;
-
- len = 0;
-
- while (*s && !isspace (*s))
- {
- s++;
- len++;
-
- }
- copy = xmalloc (len + 1);
- memcpy (copy, word, len);
- copy[len] = 0;
- *p = s;
- return copy;
-}
-#endif
-
-static struct gr_settings bug_settings =
-{
- "Bug>", /* prompt */
- &bug_ops, /* ops */
- bug_clear_breakpoints, /* clear_all_breakpoints */
- gr_generic_checkin, /* checkin */
-};
-
-static char *cpu_check_strings[] =
-{
- "=",
- "Invalid Register",
-};
-
-static void
-bug_open (char *args, int from_tty)
-{
- if (args == NULL)
- args = "";
-
- gr_open (args, from_tty, &bug_settings);
- /* decide *now* whether we are on an 88100 or an 88110 */
- sr_write_cr ("rs cr06");
- sr_expect ("rs cr06");
-
- switch (gr_multi_scan (cpu_check_strings, 0))
- {
- case 0: /* this is an m88100 */
- target_is_m88110 = 0;
- break;
- case 1: /* this is an m88110 */
- target_is_m88110 = 1;
- break;
- default:
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
- }
-}
-
-/* Tell the remote machine to resume. */
-
-void
-bug_resume (ptid_t ptid, int step, enum target_signal sig)
-{
- if (step)
- {
- sr_write_cr ("t");
-
- /* Force the next bug_wait to return a trap. Not doing anything
- about I/O from the target means that the user has to type
- "continue" to see any. FIXME, this should be fixed. */
- need_artificial_trap = 1;
- }
- else
- sr_write_cr ("g");
-
- return;
-}
-
-/* Wait until the remote machine stops, then return,
- storing status in STATUS just as `wait' would. */
-
-static char *wait_strings[] =
-{
- "At Breakpoint",
- "Exception: Data Access Fault (Local Bus Timeout)",
- "\r8??\?-Bug>", /* The '\?' avoids creating a trigraph */
- "\r197-Bug>",
- NULL,
-};
-
-ptid_t
-bug_wait (ptid_t ptid, struct target_waitstatus *status)
-{
- int old_timeout = sr_get_timeout ();
- int old_immediate_quit = immediate_quit;
-
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = 0;
-
- /* read off leftovers from resume so that the rest can be passed
- back out as stdout. */
- if (need_artificial_trap == 0)
- {
- sr_expect ("Effective address: ");
- (void) sr_get_hex_word ();
- sr_expect ("\r\n");
- }
-
- sr_set_timeout (-1); /* Don't time out -- user program is running. */
- immediate_quit = 1; /* Helps ability to QUIT */
-
- switch (gr_multi_scan (wait_strings, need_artificial_trap == 0))
- {
- case 0: /* breakpoint case */
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
- /* user output from the target can be discarded here. (?) */
- gr_expect_prompt ();
- break;
-
- case 1: /* bus error */
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_BUS;
- /* user output from the target can be discarded here. (?) */
- gr_expect_prompt ();
- break;
-
- case 2: /* normal case */
- case 3:
- if (need_artificial_trap != 0)
- {
- /* stepping */
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
- need_artificial_trap--;
- break;
- }
- else
- {
- /* exit case */
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = 0;
- break;
- }
-
- case -1: /* trouble */
- default:
- fprintf_filtered (gdb_stderr,
- "Trouble reading target during wait\n");
- break;
- }
-
- sr_set_timeout (old_timeout);
- immediate_quit = old_immediate_quit;
- return inferior_ptid;
-}
-
-/* Return the name of register number REGNO
- in the form input and output by bug.
-
- Returns a pointer to a static buffer containing the answer. */
-static char *
-get_reg_name (int regno)
-{
- static char *rn[] =
- {
- "r00", "r01", "r02", "r03", "r04", "r05", "r06", "r07",
- "r08", "r09", "r10", "r11", "r12", "r13", "r14", "r15",
- "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
- "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
-
- /* these get confusing because we omit a few and switch some ordering around. */
-
- "cr01", /* 32 = psr */
- "fcr62", /* 33 = fpsr */
- "fcr63", /* 34 = fpcr */
- "ip", /* this is something of a cheat. */
- /* 35 = sxip */
- "cr05", /* 36 = snip */
- "cr06", /* 37 = sfip */
-
- "x00", "x01", "x02", "x03", "x04", "x05", "x06", "x07",
- "x08", "x09", "x10", "x11", "x12", "x13", "x14", "x15",
- "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23",
- "x24", "x25", "x26", "x27", "x28", "x29", "x30", "x31",
- };
-
- return rn[regno];
-}
-
-#if 0 /* not currently used */
-/* Read from remote while the input matches STRING. Return zero on
- success, -1 on failure. */
-
-static int
-bug_scan (char *s)
-{
- int c;
-
- while (*s)
- {
- c = sr_readchar ();
- if (c != *s++)
- {
- fflush (stdout);
- printf ("\nNext character is '%c' - %d and s is \"%s\".\n", c, c, --s);
- return (-1);
- }
- }
-
- return (0);
-}
-#endif /* never */
-
-static int
-bug_srec_write_cr (char *s)
-{
- char *p = s;
-
- if (srec_echo_pace)
- for (p = s; *p; ++p)
- {
- if (sr_get_debug () > 0)
- printf ("%c", *p);
-
- do
- serial_write (sr_get_desc (), p, 1);
- while (sr_pollchar () != *p);
- }
- else
- {
- sr_write_cr (s);
-/* return(bug_scan (s) || bug_scan ("\n")); */
- }
-
- return (0);
-}
-
-/* Store register REGNO, or all if REGNO == -1. */
-
-static void
-bug_fetch_register (int regno)
-{
- sr_check_open ();
-
- if (regno == -1)
- {
- int i;
-
- for (i = 0; i < NUM_REGS; ++i)
- bug_fetch_register (i);
- }
- else if (target_is_m88110 && regno == SFIP_REGNUM)
- {
- /* m88110 has no sfip. */
- long l = 0;
- supply_register (regno, (char *) &l);
- }
- else if (regno < XFP_REGNUM)
- {
- char buffer[MAX_REGISTER_RAW_SIZE];
-
- sr_write ("rs ", 3);
- sr_write_cr (get_reg_name (regno));
- sr_expect ("=");
- store_unsigned_integer (buffer, REGISTER_RAW_SIZE (regno),
- sr_get_hex_word ());
- gr_expect_prompt ();
- supply_register (regno, buffer);
- }
- else
- {
- /* Float register so we need to parse a strange data format. */
- long p;
- unsigned char fpreg_buf[10];
-
- sr_write ("rs ", 3);
- sr_write (get_reg_name (regno), strlen (get_reg_name (regno)));
- sr_write_cr (";d");
- sr_expect ("rs");
- sr_expect (get_reg_name (regno));
- sr_expect (";d");
- sr_expect ("=");
-
- /* sign */
- p = sr_get_hex_digit (1);
- fpreg_buf[0] = p << 7;
-
- /* exponent */
- sr_expect ("_");
- p = sr_get_hex_digit (1);
- fpreg_buf[0] += (p << 4);
- fpreg_buf[0] += sr_get_hex_digit (1);
-
- fpreg_buf[1] = sr_get_hex_digit (1) << 4;
-
- /* fraction */
- sr_expect ("_");
- fpreg_buf[1] += sr_get_hex_digit (1);
-
- fpreg_buf[2] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[3] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[4] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[5] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[6] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[7] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[8] = 0;
- fpreg_buf[9] = 0;
-
- gr_expect_prompt ();
- supply_register (regno, fpreg_buf);
- }
-
- return;
-}
-
-/* Store register REGNO, or all if REGNO == -1. */
-
-static void
-bug_store_register (int regno)
-{
- char buffer[1024];
- sr_check_open ();
-
- if (regno == -1)
- {
- int i;
-
- for (i = 0; i < NUM_REGS; ++i)
- bug_store_register (i);
- }
- else
- {
- char *regname;
-
- regname = get_reg_name (regno);
-
- if (target_is_m88110 && regno == SFIP_REGNUM)
- return;
- else if (regno < XFP_REGNUM)
- sprintf (buffer, "rs %s %08lx",
- regname,
- (long) read_register (regno));
- else
- {
- unsigned char *fpreg_buf =
- (unsigned char *) &registers[REGISTER_BYTE (regno)];
-
- sprintf (buffer, "rs %s %1x_%02x%1x_%1x%02x%02x%02x%02x%02x%02x;d",
- regname,
- /* sign */
- (fpreg_buf[0] >> 7) & 0xf,
- /* exponent */
- fpreg_buf[0] & 0x7f,
- (fpreg_buf[1] >> 8) & 0xf,
- /* fraction */
- fpreg_buf[1] & 0xf,
- fpreg_buf[2],
- fpreg_buf[3],
- fpreg_buf[4],
- fpreg_buf[5],
- fpreg_buf[6],
- fpreg_buf[7]);
- }
-
- sr_write_cr (buffer);
- gr_expect_prompt ();
- }
-
- return;
-}
-
-/* Transfer LEN bytes between GDB address MYADDR and target address
- MEMADDR. If WRITE is non-zero, transfer them to the target,
- otherwise transfer them from the target. TARGET is unused.
-
- Returns the number of bytes transferred. */
-
-int
-bug_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib, struct target_ops *target)
-{
- int res;
-
- if (len <= 0)
- return 0;
-
- if (write)
- res = bug_write_memory (memaddr, myaddr, len);
- else
- res = bug_read_memory (memaddr, myaddr, len);
-
- return res;
-}
-
-static void
-start_load (void)
-{
- char *command;
-
- command = (srec_echo_pace ? "lo 0 ;x" : "lo 0");
-
- sr_write_cr (command);
- sr_expect (command);
- sr_expect ("\r\n");
- bug_srec_write_cr ("S0030000FC");
- return;
-}
-
-/* This is an extremely vulnerable and fragile function. I've made
- considerable attempts to make this deterministic, but I've
- certainly forgotten something. The trouble is that S-records are
- only a partial file format, not a protocol. Worse, apparently the
- m88k bug monitor does not run in real time while receiving
- S-records. Hence, we must pay excruciating attention to when and
- where error messages are returned, and what has actually been sent.
-
- Each call represents a chunk of memory to be sent to the target.
- We break that chunk into an S0 header record, some number of S3
- data records each containing srec_bytes, and an S7 termination
- record. */
-
-static char *srecord_strings[] =
-{
- "S-RECORD",
- "-Bug>",
- NULL,
-};
-
-static int
-bug_write_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
- int done;
- int checksum;
- int x;
- int retries;
- char *buffer = alloca ((srec_bytes + 8) << 1);
-
- retries = 0;
-
- do
- {
- done = 0;
-
- if (retries > srec_max_retries)
- return (-1);
-
- if (retries > 0)
- {
- if (sr_get_debug () > 0)
- printf ("\n<retrying...>\n");
-
- /* This gr_expect_prompt call is extremely important. Without
- it, we will tend to resend our packet so fast that it
- will arrive before the bug monitor is ready to receive
- it. This would lead to a very ugly resend loop. */
-
- gr_expect_prompt ();
- }
-
- start_load ();
-
- while (done < len)
- {
- int thisgo;
- int idx;
- char *buf = buffer;
- CORE_ADDR address;
-
- checksum = 0;
- thisgo = len - done;
- if (thisgo > srec_bytes)
- thisgo = srec_bytes;
-
- address = memaddr + done;
- sprintf (buf, "S3%02X%08lX", thisgo + 4 + 1, (long) address);
- buf += 12;
-
- checksum += (thisgo + 4 + 1
- + (address & 0xff)
- + ((address >> 8) & 0xff)
- + ((address >> 16) & 0xff)
- + ((address >> 24) & 0xff));
-
- for (idx = 0; idx < thisgo; idx++)
- {
- sprintf (buf, "%02X", myaddr[idx + done]);
- checksum += myaddr[idx + done];
- buf += 2;
- }
-
- if (srec_noise > 0)
- {
- /* FIXME-NOW: insert a deliberate error every now and then.
- This is intended for testing/debugging the error handling
- stuff. */
- static int counter = 0;
- if (++counter > srec_noise)
- {
- counter = 0;
- ++checksum;
- }
- }
-
- sprintf (buf, "%02X", ~checksum & 0xff);
- bug_srec_write_cr (buffer);
-
- if (srec_sleep != 0)
- sleep (srec_sleep);
-
- /* This pollchar is probably redundant to the gr_multi_scan
- below. Trouble is, we can't be sure when or where an
- error message will appear. Apparently, when running at
- full speed from a typical sun4, error messages tend to
- appear to arrive only *after* the s7 record. */
-
- if ((x = sr_pollchar ()) != 0)
- {
- if (sr_get_debug () > 0)
- printf ("\n<retrying...>\n");
-
- ++retries;
-
- /* flush any remaining input and verify that we are back
- at the prompt level. */
- gr_expect_prompt ();
- /* start all over again. */
- start_load ();
- done = 0;
- continue;
- }
-
- done += thisgo;
- }
-
- bug_srec_write_cr ("S7060000000000F9");
- ++retries;
-
- /* Having finished the load, we need to figure out whether we
- had any errors. */
- }
- while (gr_multi_scan (srecord_strings, 0) == 0);;
-
- return (0);
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
- to inferior's memory at MEMADDR. Returns errno value.
- * sb/sh instructions don't work on unaligned addresses, when TU=1.
- */
-
-/* Read LEN bytes from inferior memory at MEMADDR. Put the result
- at debugger address MYADDR. Returns errno value. */
-static int
-bug_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
- char request[100];
- char *buffer;
- char *p;
- char type;
- char size;
- unsigned char c;
- unsigned int inaddr;
- unsigned int checksum;
-
- sprintf (request, "du 0 %lx:&%d", (long) memaddr, len);
- sr_write_cr (request);
-
- p = buffer = alloca (len);
-
- /* scan up through the header */
- sr_expect ("S0030000FC");
-
- while (p < buffer + len)
- {
- /* scan off any white space. */
- while (sr_readchar () != 'S');;
-
- /* what kind of s-rec? */
- type = sr_readchar ();
-
- /* scan record size */
- sr_get_hex_byte (&size);
- checksum = size;
- --size;
- inaddr = 0;
-
- switch (type)
- {
- case '7':
- case '8':
- case '9':
- goto done;
-
- case '3':
- sr_get_hex_byte (&c);
- inaddr = (inaddr << 8) + c;
- checksum += c;
- --size;
- /* intentional fall through */
- case '2':
- sr_get_hex_byte (&c);
- inaddr = (inaddr << 8) + c;
- checksum += c;
- --size;
- /* intentional fall through */
- case '1':
- sr_get_hex_byte (&c);
- inaddr = (inaddr << 8) + c;
- checksum += c;
- --size;
- sr_get_hex_byte (&c);
- inaddr = (inaddr << 8) + c;
- checksum += c;
- --size;
- break;
-
- default:
- /* bonk */
- error ("reading s-records.");
- }
-
- if (inaddr < memaddr
- || (memaddr + len) < (inaddr + size))
- error ("srec out of memory range.");
-
- if (p != buffer + inaddr - memaddr)
- error ("srec out of sequence.");
-
- for (; size; --size, ++p)
- {
- sr_get_hex_byte (p);
- checksum += *p;
- }
-
- sr_get_hex_byte (&c);
- if (c != (~checksum & 0xff))
- error ("bad s-rec checksum");
- }
-
-done:
- gr_expect_prompt ();
- if (p != buffer + len)
- return (1);
-
- memcpy (myaddr, buffer, len);
- return (0);
-}
-
-#define MAX_BREAKS 16
-static int num_brkpts = 0;
-
-/* Insert a breakpoint at ADDR. SAVE is normally the address of the
- pattern buffer where the instruction that the breakpoint overwrites
- is saved. It is unused here since the bug is responsible for
- saving/restoring the original instruction. */
-
-static int
-bug_insert_breakpoint (CORE_ADDR addr, char *save)
-{
- sr_check_open ();
-
- if (num_brkpts < MAX_BREAKS)
- {
- char buffer[100];
-
- num_brkpts++;
- sprintf (buffer, "br %lx", (long) addr);
- sr_write_cr (buffer);
- gr_expect_prompt ();
- return (0);
- }
- else
- {
- fprintf_filtered (gdb_stderr,
- "Too many break points, break point not installed\n");
- return (1);
- }
-
-}
-
-/* Remove a breakpoint at ADDR. SAVE is normally the previously
- saved pattern, but is unused here since the bug is responsible
- for saving/restoring instructions. */
-
-static int
-bug_remove_breakpoint (CORE_ADDR addr, char *save)
-{
- if (num_brkpts > 0)
- {
- char buffer[100];
-
- num_brkpts--;
- sprintf (buffer, "nobr %lx", (long) addr);
- sr_write_cr (buffer);
- gr_expect_prompt ();
-
- }
- return (0);
-}
-
-/* Clear the bugs notion of what the break points are */
-static int
-bug_clear_breakpoints (void)
-{
-
- if (sr_is_open ())
- {
- sr_write_cr ("nobr");
- sr_expect ("nobr");
- gr_expect_prompt ();
- }
- num_brkpts = 0;
- return (0);
-}
-
-struct target_ops bug_ops;
-
-static void
-init_bug_ops (void)
-{
- bug_ops.to_shortname = "bug";
- "Remote BUG monitor",
- bug_ops.to_longname = "Use the mvme187 board running the BUG monitor connected by a serial line.";
- bug_ops.to_doc = " ";
- bug_ops.to_open = bug_open;
- bug_ops.to_close = gr_close;
- bug_ops.to_attach = 0;
- bug_ops.to_post_attach = NULL;
- bug_ops.to_require_attach = NULL;
- bug_ops.to_detach = gr_detach;
- bug_ops.to_require_detach = NULL;
- bug_ops.to_resume = bug_resume;
- bug_ops.to_wait = bug_wait;
- bug_ops.to_post_wait = NULL;
- bug_ops.to_fetch_registers = bug_fetch_register;
- bug_ops.to_store_registers = bug_store_register;
- bug_ops.to_prepare_to_store = gr_prepare_to_store;
- bug_ops.to_xfer_memory = bug_xfer_memory;
- bug_ops.to_files_info = gr_files_info;
- bug_ops.to_insert_breakpoint = bug_insert_breakpoint;
- bug_ops.to_remove_breakpoint = bug_remove_breakpoint;
- bug_ops.to_terminal_init = 0;
- bug_ops.to_terminal_inferior = 0;
- bug_ops.to_terminal_ours_for_output = 0;
- bug_ops.to_terminal_ours = 0;
- bug_ops.to_terminal_info = 0;
- bug_ops.to_kill = gr_kill;
- bug_ops.to_load = bug_load;
- bug_ops.to_lookup_symbol = 0;
- bug_ops.to_create_inferior = gr_create_inferior;
- bug_ops.to_post_startup_inferior = NULL;
- bug_ops.to_acknowledge_created_inferior = NULL;
- bug_ops.to_clone_and_follow_inferior = NULL;
- bug_ops.to_post_follow_inferior_by_clone = NULL;
- bug_ops.to_insert_fork_catchpoint = NULL;
- bug_ops.to_remove_fork_catchpoint = NULL;
- bug_ops.to_insert_vfork_catchpoint = NULL;
- bug_ops.to_remove_vfork_catchpoint = NULL;
- bug_ops.to_has_forked = NULL;
- bug_ops.to_has_vforked = NULL;
- bug_ops.to_can_follow_vfork_prior_to_exec = NULL;
- bug_ops.to_post_follow_vfork = NULL;
- bug_ops.to_insert_exec_catchpoint = NULL;
- bug_ops.to_remove_exec_catchpoint = NULL;
- bug_ops.to_has_execd = NULL;
- bug_ops.to_reported_exec_events_per_exec_call = NULL;
- bug_ops.to_has_exited = NULL;
- bug_ops.to_mourn_inferior = gr_mourn;
- bug_ops.to_can_run = 0;
- bug_ops.to_notice_signals = 0;
- bug_ops.to_thread_alive = 0;
- bug_ops.to_stop = 0;
- bug_ops.to_pid_to_exec_file = NULL;
- bug_ops.to_stratum = process_stratum;
- bug_ops.DONT_USE = 0;
- bug_ops.to_has_all_memory = 1;
- bug_ops.to_has_memory = 1;
- bug_ops.to_has_stack = 1;
- bug_ops.to_has_registers = 0;
- bug_ops.to_has_execution = 0;
- bug_ops.to_sections = 0;
- bug_ops.to_sections_end = 0;
- bug_ops.to_magic = OPS_MAGIC; /* Always the last thing */
-} /* init_bug_ops */
-
-void
-_initialize_remote_bug (void)
-{
- init_bug_ops ();
- add_target (&bug_ops);
-
- add_show_from_set
- (add_set_cmd ("srec-bytes", class_support, var_uinteger,
- (char *) &srec_bytes,
- "\
-Set the number of bytes represented in each S-record.\n\
-This affects the communication protocol with the remote target.",
- &setlist),
- &showlist);
-
- add_show_from_set
- (add_set_cmd ("srec-max-retries", class_support, var_uinteger,
- (char *) &srec_max_retries,
- "\
-Set the number of retries for shipping S-records.\n\
-This affects the communication protocol with the remote target.",
- &setlist),
- &showlist);
-
-#if 0
- /* This needs to set SREC_SIZE, not srec_frame which gets changed at the
- end of a download. But do we need the option at all? */
- add_show_from_set
- (add_set_cmd ("srec-frame", class_support, var_uinteger,
- (char *) &srec_frame,
- "\
-Set the number of bytes in an S-record frame.\n\
-This affects the communication protocol with the remote target.",
- &setlist),
- &showlist);
-#endif /* 0 */
-
- add_show_from_set
- (add_set_cmd ("srec-noise", class_support, var_zinteger,
- (char *) &srec_noise,
- "\
-Set number of S-record to send before deliberately flubbing a checksum.\n\
-Zero means flub none at all. This affects the communication protocol\n\
-with the remote target.",
- &setlist),
- &showlist);
-
- add_show_from_set
- (add_set_cmd ("srec-sleep", class_support, var_zinteger,
- (char *) &srec_sleep,
- "\
-Set number of seconds to sleep after an S-record for a possible error message to arrive.\n\
-This affects the communication protocol with the remote target.",
- &setlist),
- &showlist);
-
- add_show_from_set
- (add_set_cmd ("srec-echo-pace", class_support, var_boolean,
- (char *) &srec_echo_pace,
- "\
-Set echo-verification.\n\
-When on, use verification by echo when downloading S-records. This is\n\
-much slower, but generally more reliable.",
- &setlist),
- &showlist);
-}
diff --git a/contrib/gdb/gdb/remote-d10v.c b/contrib/gdb/gdb/remote-d10v.c
deleted file mode 100644
index d529b2180f6a..000000000000
--- a/contrib/gdb/gdb/remote-d10v.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/* Remote target communications for d10v connected via a serial line.
- Copyright 1988, 1991, 1992, 1993, 1994, 1995, 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 "defs.h"
-#include "gdb_string.h"
-#include <fcntl.h>
-#include "frame.h"
-#include "inferior.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "target.h"
-#include "wait.h"
-/*#include "terminal.h"*/
-#include "gdbcmd.h"
-#include "objfiles.h"
-#include "gdb-stabs.h"
-#include "gdbthread.h"
-
-#include "dcache.h"
-
-#ifdef USG
-#include <sys/types.h>
-#endif
-
-#include <signal.h>
-#include "serial.h"
-
-/* Prototypes for local functions */
-
-static void remote_d10v_open PARAMS ((char *name, int from_tty));
-
-/* Define the target subroutine names */
-static struct target_ops remote_d10v_ops;
-
-/* Open a connection to a remote debugger.
- NAME is the filename used for communication. */
-
-static void
-remote_d10v_open (name, from_tty)
- char *name;
- int from_tty;
-{
- pop_target ();
- push_remote_target (name, from_tty);
-}
-
-
-/* Translate a GDB virtual ADDR/LEN into a format the remote target
- understands. Returns number of bytes that can be transfered
- starting at taddr, ZERO if no bytes can be transfered. */
-int
-remote_d10v_translate_xfer_address (memaddr, nr_bytes, taddr)
- CORE_ADDR memaddr;
- int nr_bytes;
- CORE_ADDR *taddr;
-{
- CORE_ADDR phys;
- CORE_ADDR seg;
- CORE_ADDR off;
- char *from = "unknown";
- char *to = "unknown";
- unsigned short imap0 = read_register (IMAP0_REGNUM);
- unsigned short imap1 = read_register (IMAP1_REGNUM);
- unsigned short dmap = read_register (DMAP_REGNUM);
-
- /* GDB interprets addresses as:
-
- 0x00xxxxxx: Logical data address segment (DMAP translated memory)
- 0x01xxxxxx: Logical instruction address segment (IMAP translated memory)
- 0x10xxxxxx: Physical data memory segment (On-chip data memory)
- 0x11xxxxxx: Physical instruction memory segment (On-chip insn memory)
- 0x12xxxxxx: Phisical unified memory segment (Unified memory)
-
- The remote d10v board interprets addresses as:
-
- 0x00xxxxxx: Phisical unified memory segment (Unified memory)
- 0x01xxxxxx: Physical instruction memory segment (On-chip insn memory)
- 0x02xxxxxx: Physical data memory segment (On-chip data memory)
-
- Translate according to current IMAP/dmap registers */
-
- enum {
- targ_unified = 0x00000000,
- targ_insn = 0x01000000,
- targ_data = 0x02000000,
- };
-
- seg = (memaddr >> 24);
- off = (memaddr & 0xffffffL);
-
- switch (seg)
- {
- case 0x00: /* in logical data address segment */
- {
- from = "logical-data";
- if (off <= 0x7fffL)
- {
- /* On chip data */
- phys = targ_data + off;
- if (off + nr_bytes > 0x7fffL)
- /* don't cross VM boundary */
- nr_bytes = 0x7fffL - off + 1;
- to = "chip-data";
- }
- else if (off <= 0xbfffL)
- {
- short map = dmap;
- if (map & 0x1000)
- {
- /* Instruction memory */
- phys = targ_insn | ((map & 0xf) << 14) | (off & 0x3fff);
- to = "chip-insn";
- }
- else
- {
- /* Unified memory */
- phys = targ_unified | ((map & 0x3ff) << 14) | (off & 0x3fff);
- to = "unified";
- }
- if (off + nr_bytes > 0xbfffL)
- /* don't cross VM boundary */
- nr_bytes = (0xbfffL - off + 1);
- }
- else
- {
- /* Logical address out side of data segments, not supported */
- return (0);
- }
- break;
- }
-
- case 0x01: /* in logical instruction address segment */
- {
- short map;
- from = "logical-insn";
- if (off <= 0x1ffffL)
- {
- map = imap0;
- }
- else if (off <= 0x3ffffL)
- {
- map = imap1;
- }
- else
- {
- /* Logical address outside of IMAP[01] segment, not
- supported */
- return (0);
- }
- if ((off & 0x1ffff) + nr_bytes > 0x1ffffL)
- {
- /* don't cross VM boundary */
- nr_bytes = 0x1ffffL - (off & 0x1ffffL) + 1;
- }
- if (map & 0x1000)
- /* Instruction memory */
- {
- phys = targ_insn | off;
- to = "chip-insn";
- }
- else
- {
- phys = ((map & 0x7fL) << 17) + (off & 0x1ffffL);
- if (phys > 0xffffffL)
- /* Address outside of unified address segment */
- return (0);
- phys |= targ_unified;
- to = "unified";
- }
- break;
- }
-
- case 0x10: /* Physical data memory segment */
- from = "phys-data";
- phys = targ_data | off;
- to = "chip-data";
- break;
-
- case 0x11: /* Physical instruction memory */
- from = "phys-insn";
- phys = targ_insn | off;
- to = "chip-insn";
- break;
-
- case 0x12: /* Physical unified memory */
- from = "phys-unified";
- phys = targ_unified | off;
- to = "unified";
- break;
-
- default:
- return (0);
- }
-
-
- *taddr = phys;
- return nr_bytes;
-}
-
-
-void
-_initialize_remote_d10v ()
-{
- remote_d10v_ops.to_shortname = "d10v";
- remote_d10v_ops.to_longname = "Remote d10v serial target in gdb-specific protocol";
- remote_d10v_ops.to_doc = "Use a remote d10v via a serial line, using a gdb-specific protocol.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- remote_d10v_ops.to_open = remote_d10v_open;
-
- add_target (&remote_d10v_ops);
-}
diff --git a/contrib/gdb/gdb/remote-e7000.c b/contrib/gdb/gdb/remote-e7000.c
deleted file mode 100644
index dee664d8736b..000000000000
--- a/contrib/gdb/gdb/remote-e7000.c
+++ /dev/null
@@ -1,2227 +0,0 @@
-/* Remote debugging interface for Hitachi E7000 ICE, for GDB
-
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002 Free Software Foundation, Inc.
-
- Contributed by Cygnus Support.
-
- Written by Steve Chamberlain for 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. */
-
-/* The E7000 is an in-circuit emulator for the Hitachi H8/300-H and
- Hitachi-SH processor. It has serial port and a lan port.
-
- The monitor command set makes it difficult to load large ammounts of
- data over the lan without using ftp - so try not to issue load
- commands when communicating over ethernet; use the ftpload command.
-
- The monitor pauses for a second when dumping srecords to the serial
- line too, so we use a slower per byte mechanism but without the
- startup overhead. Even so, it's pretty slow... */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "gdbarch.h"
-#include "inferior.h"
-#include "target.h"
-#include "value.h"
-#include "command.h"
-#include "gdb_string.h"
-#include "gdbcmd.h"
-#include <sys/types.h>
-#include "serial.h"
-#include "remote-utils.h"
-#include "symfile.h"
-#include "regcache.h"
-#include <time.h>
-#include <ctype.h>
-
-
-#if 1
-#define HARD_BREAKPOINTS /* Now handled by set option. */
-#define BC_BREAKPOINTS use_hard_breakpoints
-#endif
-
-#define CTRLC 0x03
-#define ENQ 0x05
-#define ACK 0x06
-#define CTRLZ 0x1a
-
-/* This file is used by 2 different targets, sh-elf and h8300. The
- h8300 is not multiarched and doesn't use the registers defined in
- tm-sh.h. To avoid using a macro GDB_TARGET_IS_SH, we do runtime check
- of the target, which requires that these namse below are always
- defined also in the h8300 case. */
-
-#if !defined (PR_REGNUM)
-#define PR_REGNUM -1
-#endif
-#if !defined (GBR_REGNUM)
-#define GBR_REGNUM -1
-#endif
-#if !defined (VBR_REGNUM)
-#define VBR_REGNUM -1
-#endif
-#if !defined (MACH_REGNUM)
-#define MACH_REGNUM -1
-#endif
-#if !defined (MACL_REGNUM)
-#define MACL_REGNUM -1
-#endif
-#if !defined (SR_REGNUM)
-#define SR_REGNUM -1
-#endif
-
-extern void report_transfer_performance (unsigned long, time_t, time_t);
-
-extern char *sh_processor_type;
-
-/* Local function declarations. */
-
-static void e7000_close (int);
-
-static void e7000_fetch_register (int);
-
-static void e7000_store_register (int);
-
-static void e7000_command (char *, int);
-
-static void e7000_login_command (char *, int);
-
-static void e7000_ftp_command (char *, int);
-
-static void e7000_drain_command (char *, int);
-
-static void expect (char *);
-
-static void expect_full_prompt (void);
-
-static void expect_prompt (void);
-
-static int e7000_parse_device (char *args, char *dev_name, int baudrate);
-/* Variables. */
-
-static struct serial *e7000_desc;
-
-/* Allow user to chose between using hardware breakpoints or memory. */
-static int use_hard_breakpoints = 0; /* use sw breakpoints by default */
-
-/* Nonzero if using the tcp serial driver. */
-
-static int using_tcp; /* direct tcp connection to target */
-static int using_tcp_remote; /* indirect connection to target
- via tcp to controller */
-
-/* Nonzero if using the pc isa card. */
-
-static int using_pc;
-
-extern struct target_ops e7000_ops; /* Forward declaration */
-
-char *ENQSTRING = "\005";
-
-/* Nonzero if some routine (as opposed to the user) wants echoing.
- FIXME: Do this reentrantly with an extra parameter. */
-
-static int echo;
-
-static int ctrl_c;
-
-static int timeout = 20;
-
-/* Send data to e7000debug. */
-
-static void
-puts_e7000debug (char *buf)
-{
- if (!e7000_desc)
- error ("Use \"target e7000 ...\" first.");
-
- if (remote_debug)
- printf_unfiltered ("Sending %s\n", buf);
-
- if (serial_write (e7000_desc, buf, strlen (buf)))
- fprintf_unfiltered (gdb_stderr, "serial_write failed: %s\n", safe_strerror (errno));
-
- /* And expect to see it echoed, unless using the pc interface */
-#if 0
- if (!using_pc)
-#endif
- expect (buf);
-}
-
-static void
-putchar_e7000 (int x)
-{
- char b[1];
-
- b[0] = x;
- serial_write (e7000_desc, b, 1);
-}
-
-static void
-write_e7000 (char *s)
-{
- serial_write (e7000_desc, s, strlen (s));
-}
-
-static int
-normal (int x)
-{
- if (x == '\n')
- return '\r';
- return x;
-}
-
-/* Read a character from the remote system, doing all the fancy timeout
- stuff. Handles serial errors and EOF. If TIMEOUT == 0, and no chars,
- returns -1, else returns next char. Discards chars > 127. */
-
-static int
-readchar (int timeout)
-{
- int c;
-
- do
- {
- c = serial_readchar (e7000_desc, timeout);
- }
- while (c > 127);
-
- if (c == SERIAL_TIMEOUT)
- {
- if (timeout == 0)
- return -1;
- echo = 0;
- error ("Timeout reading from remote system.");
- }
- else if (c < 0)
- error ("Serial communication error");
-
- if (remote_debug)
- {
- putchar_unfiltered (c);
- gdb_flush (gdb_stdout);
- }
-
- return normal (c);
-}
-
-#if 0
-char *
-tl (int x)
-{
- static char b[8][10];
- static int p;
-
- p++;
- p &= 7;
- if (x >= ' ')
- {
- b[p][0] = x;
- b[p][1] = 0;
- }
- else
- {
- sprintf (b[p], "<%d>", x);
- }
-
- return b[p];
-}
-#endif
-
-/* Scan input from the remote system, until STRING is found. If
- DISCARD is non-zero, then discard non-matching input, else print it
- out. Let the user break out immediately. */
-
-static void
-expect (char *string)
-{
- char *p = string;
- int c;
- int nl = 0;
-
- while (1)
- {
- c = readchar (timeout);
-
- if (echo)
- {
- if (c == '\r' || c == '\n')
- {
- if (!nl)
- putchar_unfiltered ('\n');
- nl = 1;
- }
- else
- {
- nl = 0;
- putchar_unfiltered (c);
- }
- gdb_flush (gdb_stdout);
- }
- if (normal (c) == normal (*p++))
- {
- if (*p == '\0')
- return;
- }
- else
- {
- p = string;
-
- if (normal (c) == normal (string[0]))
- p++;
- }
- }
-}
-
-/* Keep discarding input until we see the e7000 prompt.
-
- The convention for dealing with the prompt is that you
- o give your command
- o *then* wait for the prompt.
-
- Thus the last thing that a procedure does with the serial line will
- be an expect_prompt(). Exception: e7000_resume does not wait for
- the prompt, because the terminal is being handed over to the
- inferior. However, the next thing which happens after that is a
- e7000_wait which does wait for the prompt. Note that this includes
- abnormal exit, e.g. error(). This is necessary to prevent getting
- into states from which we can't recover. */
-
-static void
-expect_prompt (void)
-{
- expect (":");
-}
-
-static void
-expect_full_prompt (void)
-{
- expect ("\r:");
-}
-
-static int
-convert_hex_digit (int ch)
-{
- if (ch >= '0' && ch <= '9')
- return ch - '0';
- else if (ch >= 'A' && ch <= 'F')
- return ch - 'A' + 10;
- else if (ch >= 'a' && ch <= 'f')
- return ch - 'a' + 10;
- return -1;
-}
-
-static int
-get_hex (int *start)
-{
- int value = convert_hex_digit (*start);
- int try;
-
- *start = readchar (timeout);
- while ((try = convert_hex_digit (*start)) >= 0)
- {
- value <<= 4;
- value += try;
- *start = readchar (timeout);
- }
- return value;
-}
-
-#if 0
-/* Get N 32-bit words from remote, each preceded by a space, and put
- them in registers starting at REGNO. */
-
-static void
-get_hex_regs (int n, int regno)
-{
- long val;
- int i;
-
- for (i = 0; i < n; i++)
- {
- int j;
-
- val = 0;
- for (j = 0; j < 8; j++)
- val = (val << 4) + get_hex_digit (j == 0);
- supply_register (regno++, (char *) &val);
- }
-}
-#endif
-
-/* This is called not only when we first attach, but also when the
- user types "run" after having attached. */
-
-static void
-e7000_create_inferior (char *execfile, char *args, char **env)
-{
- int entry_pt;
-
- if (args && *args)
- error ("Can't pass arguments to remote E7000DEBUG process");
-
- if (execfile == 0 || exec_bfd == 0)
- error ("No executable file specified");
-
- entry_pt = (int) bfd_get_start_address (exec_bfd);
-
-#ifdef CREATE_INFERIOR_HOOK
- CREATE_INFERIOR_HOOK (0); /* No process-ID */
-#endif
-
- /* The "process" (board) is already stopped awaiting our commands, and
- the program is already downloaded. We just set its PC and go. */
-
- 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 ();
-
- /* insert_step_breakpoint (); FIXME, do we need this? */
- proceed ((CORE_ADDR) entry_pt, -1, 0); /* Let 'er rip... */
-}
-
-/* Open a connection to a remote debugger. NAME is the filename used
- for communication. */
-
-static int baudrate = 9600;
-static char dev_name[100];
-
-static char *machine = "";
-static char *user = "";
-static char *passwd = "";
-static char *dir = "";
-
-/* Grab the next token and buy some space for it */
-
-static char *
-next (char **ptr)
-{
- char *p = *ptr;
- char *s;
- char *r;
- int l = 0;
-
- while (*p && *p == ' ')
- p++;
- s = p;
- while (*p && (*p != ' ' && *p != '\t'))
- {
- l++;
- p++;
- }
- r = xmalloc (l + 1);
- memcpy (r, s, l);
- r[l] = 0;
- *ptr = p;
- return r;
-}
-
-static void
-e7000_login_command (char *args, int from_tty)
-{
- if (args)
- {
- machine = next (&args);
- user = next (&args);
- passwd = next (&args);
- dir = next (&args);
- if (from_tty)
- {
- printf_unfiltered ("Set info to %s %s %s %s\n", machine, user, passwd, dir);
- }
- }
- else
- {
- error ("Syntax is ftplogin <machine> <user> <passwd> <directory>");
- }
-}
-
-/* Start an ftp transfer from the E7000 to a host */
-
-static void
-e7000_ftp_command (char *args, int from_tty)
-{
- /* FIXME: arbitrary limit on machine names and such. */
- char buf[200];
-
- int oldtimeout = timeout;
- timeout = remote_timeout;
-
- sprintf (buf, "ftp %s\r", machine);
- puts_e7000debug (buf);
- expect (" Username : ");
- sprintf (buf, "%s\r", user);
- puts_e7000debug (buf);
- expect (" Password : ");
- write_e7000 (passwd);
- write_e7000 ("\r");
- expect ("success\r");
- expect ("FTP>");
- sprintf (buf, "cd %s\r", dir);
- puts_e7000debug (buf);
- expect ("FTP>");
- sprintf (buf, "ll 0;s:%s\r", args);
- puts_e7000debug (buf);
- expect ("FTP>");
- puts_e7000debug ("bye\r");
- expect (":");
- timeout = oldtimeout;
-}
-
-static int
-e7000_parse_device (char *args, char *dev_name, int baudrate)
-{
- char junk[128];
- int n = 0;
- if (args && strcasecmp (args, "pc") == 0)
- {
- strcpy (dev_name, args);
- using_pc = 1;
- }
- else
- {
- /* FIXME! temp hack to allow use with port master -
- target tcp_remote <device> */
- if (args && strncmp (args, "tcp", 10) == 0)
- {
- char com_type[128];
- n = sscanf (args, " %s %s %d %s", com_type, dev_name, &baudrate, junk);
- using_tcp_remote = 1;
- n--;
- }
- else if (args)
- {
- n = sscanf (args, " %s %d %s", dev_name, &baudrate, junk);
- }
-
- if (n != 1 && n != 2)
- {
- error ("Bad arguments. Usage:\ttarget e7000 <device> <speed>\n\
-or \t\ttarget e7000 <host>[:<port>]\n\
-or \t\ttarget e7000 tcp_remote <host>[:<port>]\n\
-or \t\ttarget e7000 pc\n");
- }
-
-#if !defined(__GO32__) && !defined(_WIN32) && !defined(__CYGWIN__)
- /* FIXME! test for ':' is ambiguous */
- if (n == 1 && strchr (dev_name, ':') == 0)
- {
- /* Default to normal telnet port */
- /* serial_open will use this to determine tcp communication */
- strcat (dev_name, ":23");
- }
-#endif
- if (!using_tcp_remote && strchr (dev_name, ':'))
- using_tcp = 1;
- }
-
- return n;
-}
-
-/* Stub for catch_errors. */
-
-static int
-e7000_start_remote (void *dummy)
-{
- int loop;
- int sync;
- int try;
- int quit_trying;
-
- immediate_quit++; /* Allow user to interrupt it */
-
- /* Hello? Are you there? */
- sync = 0;
- loop = 0;
- try = 0;
- quit_trying = 20;
- putchar_e7000 (CTRLC);
- while (!sync && ++try <= quit_trying)
- {
- int c;
-
- printf_unfiltered ("[waiting for e7000...]\n");
-
- write_e7000 ("\r");
- c = readchar (1);
-
- /* FIXME! this didn't seem right-> while (c != SERIAL_TIMEOUT)
- * we get stuck in this loop ...
- * We may never timeout, and never sync up :-(
- */
- while (!sync && c != -1)
- {
- /* Dont echo cr's */
- if (c != '\r')
- {
- putchar_unfiltered (c);
- gdb_flush (gdb_stdout);
- }
- /* Shouldn't we either break here, or check for sync in inner loop? */
- if (c == ':')
- sync = 1;
-
- if (loop++ == 20)
- {
- putchar_e7000 (CTRLC);
- loop = 0;
- }
-
- QUIT;
-
- if (quit_flag)
- {
- putchar_e7000 (CTRLC);
- /* Was-> quit_flag = 0; */
- c = -1;
- quit_trying = try + 1; /* we don't want to try anymore */
- }
- else
- {
- c = readchar (1);
- }
- }
- }
-
- if (!sync)
- {
- fprintf_unfiltered (gdb_stderr, "Giving up after %d tries...\n", try);
- error ("Unable to synchronize with target.\n");
- }
-
- puts_e7000debug ("\r");
- expect_prompt ();
- puts_e7000debug ("b -\r"); /* Clear breakpoints */
- expect_prompt ();
-
- immediate_quit--;
-
-/* This is really the job of start_remote however, that makes an assumption
- that the target is about to print out a status message of some sort. That
- doesn't happen here. */
-
- flush_cached_frames ();
- registers_changed ();
- stop_pc = read_pc ();
- set_current_frame (create_new_frame (read_fp (), stop_pc));
- select_frame (get_current_frame (), 0);
- print_stack_frame (selected_frame, -1, 1);
-
- return 1;
-}
-
-static void
-e7000_open (char *args, int from_tty)
-{
- int n;
-
- target_preopen (from_tty);
-
- n = e7000_parse_device (args, dev_name, baudrate);
-
- push_target (&e7000_ops);
-
- e7000_desc = serial_open (dev_name);
-
- if (!e7000_desc)
- perror_with_name (dev_name);
-
- if (serial_setbaudrate (e7000_desc, baudrate))
- {
- serial_close (e7000_desc);
- perror_with_name (dev_name);
- }
- serial_raw (e7000_desc);
-
-#ifdef GDB_TARGET_IS_H8300
- h8300hmode = 1;
-#endif
-
- /* Start the remote connection; if error (0), discard this target.
- In particular, if the user quits, be sure to discard it
- (we'd be in an inconsistent state otherwise). */
- if (!catch_errors (e7000_start_remote, (char *) 0,
- "Couldn't establish connection to remote target\n", RETURN_MASK_ALL))
- if (from_tty)
- printf_filtered ("Remote target %s connected to %s\n", target_shortname,
- dev_name);
-}
-
-/* Close out all files and local state before this target loses control. */
-
-static void
-e7000_close (int quitting)
-{
- if (e7000_desc)
- {
- serial_close (e7000_desc);
- e7000_desc = 0;
- }
-}
-
-/* Terminate the open connection to the remote debugger. Use this
- when you want to detach and do something else with your gdb. */
-
-static void
-e7000_detach (char *arg, int from_tty)
-{
- pop_target (); /* calls e7000_close to do the real work */
- if (from_tty)
- printf_unfiltered ("Ending remote %s debugging\n", target_shortname);
-}
-
-/* Tell the remote machine to resume. */
-
-static void
-e7000_resume (ptid_t ptid, int step, enum target_signal sigal)
-{
- if (step)
- puts_e7000debug ("S\r");
- else
- puts_e7000debug ("G\r");
-}
-
-/* Read the remote registers into the block REGS.
-
- For the H8/300 a register dump looks like:
-
- PC=00021A CCR=80:I*******
- ER0 - ER3 0000000A 0000002E 0000002E 00000000
- ER4 - ER7 00000000 00000000 00000000 00FFEFF6
- 000218 MOV.B R1L,R2L
- STEP NORMAL END or
- BREAK POINT
- */
-
-char *want_h8300h = "PC=%p CCR=%c\n\
- ER0 - ER3 %0 %1 %2 %3\n\
- ER4 - ER7 %4 %5 %6 %7\n";
-
-char *want_nopc_h8300h = "%p CCR=%c\n\
- ER0 - ER3 %0 %1 %2 %3\n\
- ER4 - ER7 %4 %5 %6 %7";
-
-char *want_h8300s = "PC=%p CCR=%c\n\
- MACH=\n\
- ER0 - ER3 %0 %1 %2 %3\n\
- ER4 - ER7 %4 %5 %6 %7\n";
-
-char *want_nopc_h8300s = "%p CCR=%c EXR=%9\n\
- ER0 - ER3 %0 %1 %2 %3\n\
- ER4 - ER7 %4 %5 %6 %7";
-
-char *want_sh = "PC=%16 SR=%22\n\
-PR=%17 GBR=%18 VBR=%19\n\
-MACH=%20 MACL=%21\n\
-R0-7 %0 %1 %2 %3 %4 %5 %6 %7\n\
-R8-15 %8 %9 %10 %11 %12 %13 %14 %15\n";
-
-char *want_nopc_sh = "%16 SR=%22\n\
- PR=%17 GBR=%18 VBR=%19\n\
- MACH=%20 MACL=%21\n\
- R0-7 %0 %1 %2 %3 %4 %5 %6 %7\n\
- R8-15 %8 %9 %10 %11 %12 %13 %14 %15";
-
-char *want_sh3 = "PC=%16 SR=%22\n\
-PR=%17 GBR=%18 VBR=%19\n\
-MACH=%20 MACL=%21 SSR=%23 SPC=%24\n\
-R0-7 %0 %1 %2 %3 %4 %5 %6 %7\n\
-R8-15 %8 %9 %10 %11 %12 %13 %14 %15\n\
-R0_BANK0-R3_BANK0 %25 %26 %27 %28\n\
-R4_BANK0-R7_BANK0 %29 %30 %31 %32\n\
-R0_BANK1-R3_BANK1 %33 %34 %35 %36\n\
-R4_BANK1-R7_BANK1 %37 %38 %39 %40";
-
-char *want_nopc_sh3 = "%16 SR=%22\n\
- PR=%17 GBR=%18 VBR=%19\n\
- MACH=%20 MACL=%21 SSR=%22 SPC=%23\n\
- R0-7 %0 %1 %2 %3 %4 %5 %6 %7\n\
- R8-15 %8 %9 %10 %11 %12 %13 %14 %15\n\
- R0_BANK0-R3_BANK0 %25 %26 %27 %28\n\
- R4_BANK0-R7_BANK0 %29 %30 %31 %32\n\
- R0_BANK1-R3_BANK1 %33 %34 %35 %36\n\
- R4_BANK1-R7_BANK1 %37 %38 %39 %40";
-
-static int
-gch (void)
-{
- return readchar (timeout);
-}
-
-static unsigned int
-gbyte (void)
-{
- int high = convert_hex_digit (gch ());
- int low = convert_hex_digit (gch ());
-
- return (high << 4) + low;
-}
-
-void
-fetch_regs_from_dump (int (*nextchar) (), char *want)
-{
- int regno;
- char buf[MAX_REGISTER_RAW_SIZE];
-
- int thischar = nextchar ();
-
- if (want == NULL)
- internal_error (__FILE__, __LINE__, "Register set not selected.");
-
- while (*want)
- {
- switch (*want)
- {
- case '\n':
- /* Skip to end of line and then eat all new line type stuff */
- while (thischar != '\n' && thischar != '\r')
- thischar = nextchar ();
- while (thischar == '\n' || thischar == '\r')
- thischar = nextchar ();
- want++;
- break;
-
- case ' ':
- while (thischar == ' '
- || thischar == '\t'
- || thischar == '\r'
- || thischar == '\n')
- thischar = nextchar ();
- want++;
- break;
-
- default:
- if (*want == thischar)
- {
- want++;
- if (*want)
- thischar = nextchar ();
-
- }
- else if (thischar == ' ' || thischar == '\n' || thischar == '\r')
- {
- thischar = nextchar ();
- }
- else
- {
- error ("out of sync in fetch registers wanted <%s>, got <%c 0x%x>",
- want, thischar, thischar);
- }
-
- break;
- case '%':
- /* Got a register command */
- want++;
- switch (*want)
- {
-#ifdef PC_REGNUM
- case 'p':
- regno = PC_REGNUM;
- want++;
- break;
-#endif
-#ifdef CCR_REGNUM
- case 'c':
- regno = CCR_REGNUM;
- want++;
- break;
-#endif
-#ifdef SP_REGNUM
- case 's':
- regno = SP_REGNUM;
- want++;
- break;
-#endif
-#ifdef FP_REGNUM
- case 'f':
- regno = FP_REGNUM;
- want++;
- break;
-#endif
-
- default:
- if (isdigit (want[0]))
- {
- if (isdigit (want[1]))
- {
- regno = (want[0] - '0') * 10 + want[1] - '0';
- want += 2;
- }
- else
- {
- regno = want[0] - '0';
- want++;
- }
- }
-
- else
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
- }
- store_signed_integer (buf,
- REGISTER_RAW_SIZE (regno),
- (LONGEST) get_hex (&thischar));
- supply_register (regno, buf);
- break;
- }
- }
-}
-
-static void
-e7000_fetch_registers (void)
-{
- int regno;
- char *wanted = NULL;
-
- puts_e7000debug ("R\r");
-
- if (TARGET_ARCHITECTURE->arch == bfd_arch_sh)
- {
- wanted = want_sh;
- switch (TARGET_ARCHITECTURE->mach)
- {
- case bfd_mach_sh3:
- case bfd_mach_sh3e:
- case bfd_mach_sh4:
- wanted = want_sh3;
- }
- }
-#ifdef GDB_TARGET_IS_H8300
- if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
- {
- if (h8300smode)
- wanted = want_h8300s;
- else
- wanted = want_h8300h;
- }
-#endif
-
- fetch_regs_from_dump (gch, wanted);
-
- /* And supply the extra ones the simulator uses */
- for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
- {
- int buf = 0;
-
- supply_register (regno, (char *) (&buf));
- }
-}
-
-/* Fetch register REGNO, or all registers if REGNO is -1. Returns
- errno value. */
-
-static void
-e7000_fetch_register (int regno)
-{
- e7000_fetch_registers ();
-}
-
-/* Store the remote registers from the contents of the block REGS. */
-
-static void
-e7000_store_registers (void)
-{
- int regno;
-
- for (regno = 0; regno < NUM_REALREGS; regno++)
- e7000_store_register (regno);
-
- registers_changed ();
-}
-
-/* Store register REGNO, or all if REGNO == 0. Return errno value. */
-
-static void
-e7000_store_register (int regno)
-{
- char buf[200];
-
- if (regno == -1)
- {
- e7000_store_registers ();
- return;
- }
-
- if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
- {
- if (regno <= 7)
- {
- sprintf (buf, ".ER%d %s\r", regno, phex_nz (read_register (regno), 0));
- puts_e7000debug (buf);
- }
- else if (regno == PC_REGNUM)
- {
- sprintf (buf, ".PC %s\r", phex_nz (read_register (regno), 0));
- puts_e7000debug (buf);
- }
-#ifdef CCR_REGNUM
- else if (regno == CCR_REGNUM)
- {
- sprintf (buf, ".CCR %s\r", phex_nz (read_register (regno), 0));
- puts_e7000debug (buf);
- }
-#endif
- }
-
- else if (TARGET_ARCHITECTURE->arch == bfd_arch_sh)
- {
- if (regno == PC_REGNUM)
- {
- sprintf (buf, ".PC %s\r", phex_nz (read_register (regno), 0));
- puts_e7000debug (buf);
- }
-
- else if (regno == SR_REGNUM)
- {
- sprintf (buf, ".SR %s\r", phex_nz (read_register (regno), 0));
- puts_e7000debug (buf);
- }
-
- else if (regno == PR_REGNUM)
- {
- sprintf (buf, ".PR %s\r", phex_nz (read_register (regno), 0));
- puts_e7000debug (buf);
- }
-
- else if (regno == GBR_REGNUM)
- {
- sprintf (buf, ".GBR %s\r", phex_nz (read_register (regno), 0));
- puts_e7000debug (buf);
- }
-
- else if (regno == VBR_REGNUM)
- {
- sprintf (buf, ".VBR %s\r", phex_nz (read_register (regno), 0));
- puts_e7000debug (buf);
- }
-
- else if (regno == MACH_REGNUM)
- {
- sprintf (buf, ".MACH %s\r", phex_nz (read_register (regno), 0));
- puts_e7000debug (buf);
- }
-
- else if (regno == MACL_REGNUM)
- {
- sprintf (buf, ".MACL %s\r", phex_nz (read_register (regno), 0));
- puts_e7000debug (buf);
- }
- else
- {
- sprintf (buf, ".R%d %s\r", regno, phex_nz (read_register (regno), 0));
- puts_e7000debug (buf);
- }
- }
-
- expect_prompt ();
-}
-
-/* Get ready to modify the registers array. On machines which store
- individual registers, this doesn't need to do anything. On machines
- which store all the registers in one fell swoop, this makes sure
- that registers contains all the registers from the program being
- debugged. */
-
-static void
-e7000_prepare_to_store (void)
-{
- /* Do nothing, since we can store individual regs */
-}
-
-static void
-e7000_files_info (struct target_ops *ops)
-{
- printf_unfiltered ("\tAttached to %s at %d baud.\n", dev_name, baudrate);
-}
-
-static int
-stickbyte (char *where, unsigned int what)
-{
- static CONST char digs[] = "0123456789ABCDEF";
-
- where[0] = digs[(what >> 4) & 0xf];
- where[1] = digs[(what & 0xf) & 0xf];
-
- return what;
-}
-
-/* Write a small ammount of memory. */
-
-static int
-write_small (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
- int i;
- char buf[200];
-
- for (i = 0; i < len; i++)
- {
- if (((memaddr + i) & 3) == 0 && (i + 3 < len))
- {
- /* Can be done with a long word */
- sprintf (buf, "m %s %x%02x%02x%02x;l\r",
- paddr_nz (memaddr + i),
- myaddr[i], myaddr[i + 1], myaddr[i + 2], myaddr[i + 3]);
- puts_e7000debug (buf);
- i += 3;
- }
- else
- {
- sprintf (buf, "m %s %x\r", paddr_nz (memaddr + i), myaddr[i]);
- puts_e7000debug (buf);
- }
- }
-
- expect_prompt ();
-
- return len;
-}
-
-/* Write a large ammount of memory, this only works with the serial
- mode enabled. Command is sent as
-
- il ;s:s\r ->
- <- il ;s:s\r
- <- ENQ
- ACK ->
- <- LO s\r
- Srecords...
- ^Z ->
- <- ENQ
- ACK ->
- <- :
- */
-
-static int
-write_large (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
- int i;
-#define maxstride 128
- int stride;
-
- puts_e7000debug ("IL ;S:FK\r");
- expect (ENQSTRING);
- putchar_e7000 (ACK);
- expect ("LO FK\r");
-
- for (i = 0; i < len; i += stride)
- {
- char compose[maxstride * 2 + 50];
- int address = i + memaddr;
- int j;
- int check_sum;
- int where = 0;
- int alen;
-
- stride = len - i;
- if (stride > maxstride)
- stride = maxstride;
-
- compose[where++] = 'S';
- check_sum = 0;
- if (address >= 0xffffff)
- alen = 4;
- else if (address >= 0xffff)
- alen = 3;
- else
- alen = 2;
- /* Insert type. */
- compose[where++] = alen - 1 + '0';
- /* Insert length. */
- check_sum += stickbyte (compose + where, alen + stride + 1);
- where += 2;
- while (alen > 0)
- {
- alen--;
- check_sum += stickbyte (compose + where, address >> (8 * (alen)));
- where += 2;
- }
-
- for (j = 0; j < stride; j++)
- {
- check_sum += stickbyte (compose + where, myaddr[i + j]);
- where += 2;
- }
- stickbyte (compose + where, ~check_sum);
- where += 2;
- compose[where++] = '\r';
- compose[where++] = '\n';
- compose[where++] = 0;
-
- serial_write (e7000_desc, compose, where);
- j = readchar (0);
- if (j == -1)
- {
- /* This is ok - nothing there */
- }
- else if (j == ENQ)
- {
- /* Hmm, it's trying to tell us something */
- expect (":");
- error ("Error writing memory");
- }
- else
- {
- printf_unfiltered ("@%d}@", j);
- while ((j = readchar (0)) > 0)
- {
- printf_unfiltered ("@{%d}@", j);
- }
- }
- }
-
- /* Send the trailer record */
- write_e7000 ("S70500000000FA\r");
- putchar_e7000 (CTRLZ);
- expect (ENQSTRING);
- putchar_e7000 (ACK);
- expect (":");
-
- return len;
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR to inferior's
- memory at MEMADDR. Returns length moved.
-
- Can't use the Srecord load over ethernet, so don't use fast method
- then. */
-
-static int
-e7000_write_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
- if (len < 16 || using_tcp || using_pc)
- return write_small (memaddr, myaddr, len);
- else
- return write_large (memaddr, myaddr, len);
-}
-
-/* Read LEN bytes from inferior memory at MEMADDR. Put the result
- at debugger address MYADDR. Returns length moved.
-
- Small transactions we send
- m <addr>;l
- and receive
- 00000000 12345678 ?
- */
-
-static int
-e7000_read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
- int count;
- int c;
- int i;
- char buf[200];
- /* Starting address of this pass. */
-
-/* printf("READ INF %x %x %d\n", memaddr, myaddr, len); */
- if (((memaddr - 1) + len) < memaddr)
- {
- errno = EIO;
- return 0;
- }
-
- sprintf (buf, "m %s;l\r", paddr_nz (memaddr));
- puts_e7000debug (buf);
-
- for (count = 0; count < len; count += 4)
- {
- /* Suck away the address */
- c = gch ();
- while (c != ' ')
- c = gch ();
- c = gch ();
- if (c == '*')
- { /* Some kind of error */
- puts_e7000debug (".\r"); /* Some errors leave us in memory input mode */
- expect_full_prompt ();
- return -1;
- }
- while (c != ' ')
- c = gch ();
-
- /* Now read in the data */
- for (i = 0; i < 4; i++)
- {
- int b = gbyte ();
- if (count + i < len)
- {
- myaddr[count + i] = b;
- }
- }
-
- /* Skip the trailing ? and send a . to end and a cr for more */
- gch ();
- gch ();
- if (count + 4 >= len)
- puts_e7000debug (".\r");
- else
- puts_e7000debug ("\r");
-
- }
- expect_prompt ();
- return len;
-}
-
-
-
-/*
- For large transfers we used to send
-
-
- d <addr> <endaddr>\r
-
- and receive
- <ADDRESS> < D A T A > < ASCII CODE >
- 00000000 5F FD FD FF DF 7F DF FF 01 00 01 00 02 00 08 04 "_..............."
- 00000010 FF D7 FF 7F D7 F1 7F FF 00 05 00 00 08 00 40 00 "..............@."
- 00000020 7F FD FF F7 7F FF FF F7 00 00 00 00 00 00 00 00 "................"
-
- A cost in chars for each transaction of 80 + 5*n-bytes.
-
- Large transactions could be done with the srecord load code, but
- there is a pause for a second before dumping starts, which slows the
- average rate down!
- */
-
-static int
-e7000_read_inferior_memory_large (CORE_ADDR memaddr, unsigned char *myaddr,
- int len)
-{
- int count;
- int c;
- char buf[200];
-
- /* Starting address of this pass. */
-
- if (((memaddr - 1) + len) < memaddr)
- {
- errno = EIO;
- return 0;
- }
-
- sprintf (buf, "d %s %s\r", paddr_nz (memaddr), paddr_nz (memaddr + len - 1));
- puts_e7000debug (buf);
-
- count = 0;
- c = gch ();
-
- /* skip down to the first ">" */
- while (c != '>')
- c = gch ();
- /* now skip to the end of that line */
- while (c != '\r')
- c = gch ();
- c = gch ();
-
- while (count < len)
- {
- /* get rid of any white space before the address */
- while (c <= ' ')
- c = gch ();
-
- /* Skip the address */
- get_hex (&c);
-
- /* read in the bytes on the line */
- while (c != '"' && count < len)
- {
- if (c == ' ')
- c = gch ();
- else
- {
- myaddr[count++] = get_hex (&c);
- }
- }
- /* throw out the rest of the line */
- while (c != '\r')
- c = gch ();
- }
-
- /* wait for the ":" prompt */
- while (c != ':')
- c = gch ();
-
- return len;
-}
-
-#if 0
-
-static int
-fast_but_for_the_pause_e7000_read_inferior_memory (CORE_ADDR memaddr,
- char *myaddr, int len)
-{
- int loop;
- int c;
- char buf[200];
-
- if (((memaddr - 1) + len) < memaddr)
- {
- errno = EIO;
- return 0;
- }
-
- sprintf (buf, "is %x@%x:s\r", memaddr, len);
- puts_e7000debug (buf);
- gch ();
- c = gch ();
- if (c != ENQ)
- {
- /* Got an error */
- error ("Memory read error");
- }
- putchar_e7000 (ACK);
- expect ("SV s");
- loop = 1;
- while (loop)
- {
- int type;
- int length;
- int addr;
- int i;
-
- c = gch ();
- switch (c)
- {
- case ENQ: /* ENQ, at the end */
- loop = 0;
- break;
- case 'S':
- /* Start of an Srecord */
- type = gch ();
- length = gbyte ();
- switch (type)
- {
- case '7': /* Termination record, ignore */
- case '0':
- case '8':
- case '9':
- /* Header record - ignore it */
- while (length--)
- {
- gbyte ();
- }
- break;
- case '1':
- case '2':
- case '3':
- {
- int alen;
-
- alen = type - '0' + 1;
- addr = 0;
- while (alen--)
- {
- addr = (addr << 8) + gbyte ();
- length--;
- }
-
- for (i = 0; i < length - 1; i++)
- myaddr[i + addr - memaddr] = gbyte ();
-
- gbyte (); /* Ignore checksum */
- }
- }
- }
- }
-
- putchar_e7000 (ACK);
- expect ("TOP ADDRESS =");
- expect ("END ADDRESS =");
- expect (":");
-
- return len;
-}
-
-#endif
-
-/* Transfer LEN bytes between GDB address MYADDR and target address
- MEMADDR. If WRITE is non-zero, transfer them to the target,
- otherwise transfer them from the target. TARGET is unused.
-
- Returns the number of bytes transferred. */
-
-static int
-e7000_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
- int write, struct mem_attrib *attrib,
- struct target_ops *target)
-{
- if (write)
- return e7000_write_inferior_memory (memaddr, myaddr, len);
- else if (len < 16)
- return e7000_read_inferior_memory (memaddr, myaddr, len);
- else
- return e7000_read_inferior_memory_large (memaddr, myaddr, len);
-}
-
-static void
-e7000_kill (void)
-{
-}
-
-static void
-e7000_load (char *args, int from_tty)
-{
- struct cleanup *old_chain;
- asection *section;
- bfd *pbfd;
- bfd_vma entry;
-#define WRITESIZE 0x1000
- char buf[2 + 4 + 4 + WRITESIZE]; /* `DT' + <addr> + <len> + <data> */
- char *filename;
- int quiet;
- int nostart;
- time_t start_time, end_time; /* Start and end times of download */
- unsigned long data_count; /* Number of bytes transferred to memory */
- int oldtimeout = timeout;
-
- timeout = remote_timeout;
-
-
- /* FIXME! change test to test for type of download */
- if (!using_tcp)
- {
- generic_load (args, from_tty);
- return;
- }
-
- /* for direct tcp connections, we can do a fast binary download */
- buf[0] = 'D';
- buf[1] = 'T';
- quiet = 0;
- nostart = 0;
- filename = NULL;
-
- while (*args != '\000')
- {
- char *arg;
-
- while (isspace (*args))
- args++;
-
- arg = args;
-
- while ((*args != '\000') && !isspace (*args))
- args++;
-
- if (*args != '\000')
- *args++ = '\000';
-
- if (*arg != '-')
- filename = arg;
- else if (strncmp (arg, "-quiet", strlen (arg)) == 0)
- quiet = 1;
- else if (strncmp (arg, "-nostart", strlen (arg)) == 0)
- nostart = 1;
- else
- error ("unknown option `%s'", arg);
- }
-
- if (!filename)
- filename = get_exec_file (1);
-
- pbfd = bfd_openr (filename, gnutarget);
- if (pbfd == NULL)
- {
- perror_with_name (filename);
- return;
- }
- old_chain = make_cleanup_bfd_close (pbfd);
-
- if (!bfd_check_format (pbfd, bfd_object))
- error ("\"%s\" is not an object file: %s", filename,
- bfd_errmsg (bfd_get_error ()));
-
- start_time = time (NULL);
- data_count = 0;
-
- puts_e7000debug ("mw\r");
-
- expect ("\nOK");
-
- for (section = pbfd->sections; section; section = section->next)
- {
- if (bfd_get_section_flags (pbfd, section) & SEC_LOAD)
- {
- bfd_vma section_address;
- bfd_size_type section_size;
- file_ptr fptr;
-
- section_address = bfd_get_section_vma (pbfd, section);
- section_size = bfd_get_section_size_before_reloc (section);
-
- if (!quiet)
- printf_filtered ("[Loading section %s at 0x%s (%s bytes)]\n",
- bfd_get_section_name (pbfd, section),
- paddr_nz (section_address),
- paddr_u (section_size));
-
- fptr = 0;
-
- data_count += section_size;
-
- while (section_size > 0)
- {
- int count;
- static char inds[] = "|/-\\";
- static int k = 0;
-
- QUIT;
-
- count = min (section_size, WRITESIZE);
-
- buf[2] = section_address >> 24;
- buf[3] = section_address >> 16;
- buf[4] = section_address >> 8;
- buf[5] = section_address;
-
- buf[6] = count >> 24;
- buf[7] = count >> 16;
- buf[8] = count >> 8;
- buf[9] = count;
-
- bfd_get_section_contents (pbfd, section, buf + 10, fptr, count);
-
- if (serial_write (e7000_desc, buf, count + 10))
- fprintf_unfiltered (gdb_stderr,
- "e7000_load: serial_write failed: %s\n",
- safe_strerror (errno));
-
- expect ("OK");
-
- if (!quiet)
- {
- printf_unfiltered ("\r%c", inds[k++ % 4]);
- gdb_flush (gdb_stdout);
- }
-
- section_address += count;
- fptr += count;
- section_size -= count;
- }
- }
- }
-
- write_e7000 ("ED");
-
- expect_prompt ();
-
- end_time = time (NULL);
-
-/* 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 ();
-
- if (!nostart)
- {
- entry = bfd_get_start_address (pbfd);
-
- if (!quiet)
- printf_unfiltered ("[Starting %s at 0x%s]\n", filename, paddr_nz (entry));
-
-/* start_routine (entry); */
- }
-
- report_transfer_performance (data_count, start_time, end_time);
-
- do_cleanups (old_chain);
- timeout = oldtimeout;
-}
-
-/* Clean up when a program exits.
-
- The program actually lives on in the remote processor's RAM, and may be
- run again without a download. Don't leave it full of breakpoint
- instructions. */
-
-static void
-e7000_mourn_inferior (void)
-{
- remove_breakpoints ();
- unpush_target (&e7000_ops);
- generic_mourn_inferior (); /* Do all the proper things now */
-}
-
-#define MAX_BREAKPOINTS 200
-#ifdef HARD_BREAKPOINTS
-#define MAX_E7000DEBUG_BREAKPOINTS (BC_BREAKPOINTS ? 5 : MAX_BREAKPOINTS)
-#else
-#define MAX_E7000DEBUG_BREAKPOINTS MAX_BREAKPOINTS
-#endif
-
-/* Since we can change to soft breakpoints dynamically, we must define
- more than enough. Was breakaddr[MAX_E7000DEBUG_BREAKPOINTS]. */
-static CORE_ADDR breakaddr[MAX_BREAKPOINTS] =
-{0};
-
-static int
-e7000_insert_breakpoint (CORE_ADDR addr, char *shadow)
-{
- int i;
- char buf[200];
-#if 0
- static char nop[2] = NOP;
-#endif
-
- for (i = 0; i <= MAX_E7000DEBUG_BREAKPOINTS; i++)
- if (breakaddr[i] == 0)
- {
- breakaddr[i] = addr;
- /* Save old contents, and insert a nop in the space */
-#ifdef HARD_BREAKPOINTS
- if (BC_BREAKPOINTS)
- {
- sprintf (buf, "BC%d A=%s\r", i + 1, paddr_nz (addr));
- puts_e7000debug (buf);
- }
- else
- {
- sprintf (buf, "B %s\r", paddr_nz (addr));
- puts_e7000debug (buf);
- }
-#else
-#if 0
- e7000_read_inferior_memory (addr, shadow, 2);
- e7000_write_inferior_memory (addr, nop, 2);
-#endif
-
- sprintf (buf, "B %x\r", addr);
- puts_e7000debug (buf);
-#endif
- expect_prompt ();
- return 0;
- }
-
- error ("Too many breakpoints ( > %d) for the E7000\n",
- MAX_E7000DEBUG_BREAKPOINTS);
- return 1;
-}
-
-static int
-e7000_remove_breakpoint (CORE_ADDR addr, char *shadow)
-{
- int i;
- char buf[200];
-
- for (i = 0; i < MAX_E7000DEBUG_BREAKPOINTS; i++)
- if (breakaddr[i] == addr)
- {
- breakaddr[i] = 0;
-#ifdef HARD_BREAKPOINTS
- if (BC_BREAKPOINTS)
- {
- sprintf (buf, "BC%d - \r", i + 1);
- puts_e7000debug (buf);
- }
- else
- {
- sprintf (buf, "B - %s\r", paddr_nz (addr));
- puts_e7000debug (buf);
- }
- expect_prompt ();
-#else
- sprintf (buf, "B - %s\r", paddr_nz (addr));
- puts_e7000debug (buf);
- expect_prompt ();
-
-#if 0
- /* Replace the insn under the break */
- e7000_write_inferior_memory (addr, shadow, 2);
-#endif
-#endif
-
- return 0;
- }
-
- warning ("Can't find breakpoint associated with 0x%s\n", paddr_nz (addr));
- return 1;
-}
-
-/* Put a command string, in args, out to STDBUG. Output from STDBUG
- is placed on the users terminal until the prompt is seen. */
-
-static void
-e7000_command (char *args, int fromtty)
-{
- /* FIXME: arbitrary limit on length of args. */
- char buf[200];
-
- echo = 0;
-
- if (!e7000_desc)
- error ("e7000 target not open.");
- if (!args)
- {
- puts_e7000debug ("\r");
- }
- else
- {
- sprintf (buf, "%s\r", args);
- puts_e7000debug (buf);
- }
-
- echo++;
- ctrl_c = 2;
- expect_full_prompt ();
- echo--;
- ctrl_c = 0;
- printf_unfiltered ("\n");
-
- /* Who knows what the command did... */
- registers_changed ();
-}
-
-
-static void
-e7000_drain_command (char *args, int fromtty)
-{
- int c;
-
- puts_e7000debug ("end\r");
- putchar_e7000 (CTRLC);
-
- while ((c = readchar (1) != -1))
- {
- if (quit_flag)
- {
- putchar_e7000 (CTRLC);
- quit_flag = 0;
- }
- if (c > ' ' && c < 127)
- printf_unfiltered ("%c", c & 0xff);
- else
- printf_unfiltered ("<%x>", c & 0xff);
- }
-}
-
-#define NITEMS 7
-
-static int
-why_stop (void)
-{
- static char *strings[NITEMS] =
- {
- "STEP NORMAL",
- "BREAK POINT",
- "BREAK KEY",
- "BREAK CONDI",
- "CYCLE ACCESS",
- "ILLEGAL INSTRUCTION",
- "WRITE PROTECT",
- };
- char *p[NITEMS];
- int c;
- int i;
-
- for (i = 0; i < NITEMS; ++i)
- p[i] = strings[i];
-
- c = gch ();
- while (1)
- {
- for (i = 0; i < NITEMS; i++)
- {
- if (c == *(p[i]))
- {
- p[i]++;
- if (*(p[i]) == 0)
- {
- /* found one of the choices */
- return i;
- }
- }
- else
- p[i] = strings[i];
- }
-
- c = gch ();
- }
-}
-
-/* Suck characters, if a string match, then return the strings index
- otherwise echo them. */
-
-int
-expect_n (char **strings)
-{
- char *(ptr[10]);
- int n;
- int c;
- char saveaway[100];
- char *buffer = saveaway;
- /* Count number of expect strings */
-
- for (n = 0; strings[n]; n++)
- {
- ptr[n] = strings[n];
- }
-
- while (1)
- {
- int i;
- int gotone = 0;
-
- c = readchar (1);
- if (c == -1)
- {
- printf_unfiltered ("[waiting for e7000...]\n");
- }
-#ifdef __GO32__
- if (kbhit ())
- {
- int k = getkey ();
-
- if (k == 1)
- quit_flag = 1;
- }
-#endif
- if (quit_flag)
- {
- putchar_e7000 (CTRLC); /* interrupt the running program */
- quit_flag = 0;
- }
-
- for (i = 0; i < n; i++)
- {
- if (c == ptr[i][0])
- {
- ptr[i]++;
- if (ptr[i][0] == 0)
- {
- /* Gone all the way */
- return i;
- }
- gotone = 1;
- }
- else
- {
- ptr[i] = strings[i];
- }
- }
-
- if (gotone)
- {
- /* Save it up incase we find that there was no match */
- *buffer++ = c;
- }
- else
- {
- if (buffer != saveaway)
- {
- *buffer++ = 0;
- printf_unfiltered ("%s", buffer);
- buffer = saveaway;
- }
- if (c != -1)
- {
- putchar_unfiltered (c);
- gdb_flush (gdb_stdout);
- }
- }
- }
-}
-
-/* We subtract two from the pc here rather than use
- DECR_PC_AFTER_BREAK since the e7000 doesn't always add two to the
- pc, and the simulators never do. */
-
-static void
-sub2_from_pc (void)
-{
- char buf[4];
- char buf2[200];
-
- store_signed_integer (buf,
- REGISTER_RAW_SIZE (PC_REGNUM),
- read_register (PC_REGNUM) - 2);
- supply_register (PC_REGNUM, buf);
- sprintf (buf2, ".PC %s\r", phex_nz (read_register (PC_REGNUM), 0));
- puts_e7000debug (buf2);
-}
-
-#define WAS_SLEEP 0
-#define WAS_INT 1
-#define WAS_RUNNING 2
-#define WAS_OTHER 3
-
-static char *estrings[] =
-{
- "** SLEEP",
- "BREAK !",
- "** PC",
- "PC",
- NULL
-};
-
-/* Wait until the remote machine stops, then return, storing status in
- STATUS just as `wait' would. */
-
-static ptid_t
-e7000_wait (ptid_t ptid, struct target_waitstatus *status)
-{
- int stop_reason;
- int regno;
- int running_count = 0;
- int had_sleep = 0;
- int loop = 1;
- char *wanted_nopc = NULL;
-
- /* Then echo chars until PC= string seen */
- gch (); /* Drop cr */
- gch (); /* and space */
-
- while (loop)
- {
- switch (expect_n (estrings))
- {
- case WAS_OTHER:
- /* how did this happen ? */
- loop = 0;
- break;
- case WAS_SLEEP:
- had_sleep = 1;
- putchar_e7000 (CTRLC);
- loop = 0;
- break;
- case WAS_INT:
- loop = 0;
- break;
- case WAS_RUNNING:
- running_count++;
- if (running_count == 20)
- {
- printf_unfiltered ("[running...]\n");
- running_count = 0;
- }
- break;
- default:
- /* error? */
- break;
- }
- }
-
- /* Skip till the PC= */
- expect ("=");
-
- if (TARGET_ARCHITECTURE->arch == bfd_arch_sh)
- {
- wanted_nopc = want_nopc_sh;
- switch (TARGET_ARCHITECTURE->mach)
- {
- case bfd_mach_sh3:
- case bfd_mach_sh3e:
- case bfd_mach_sh4:
- wanted_nopc = want_nopc_sh3;
- }
- }
-#ifdef GDB_TARGET_IS_H8300
- if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
- {
- if (h8300smode)
- wanted_nopc = want_nopc_h8300s;
- else
- wanted_nopc = want_nopc_h8300h;
- }
-#endif
- fetch_regs_from_dump (gch, wanted_nopc);
-
- /* And supply the extra ones the simulator uses */
- for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
- {
- int buf = 0;
- supply_register (regno, (char *) &buf);
- }
-
- stop_reason = why_stop ();
- expect_full_prompt ();
-
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
-
- switch (stop_reason)
- {
- case 1: /* Breakpoint */
- write_pc (read_pc ()); /* PC is always off by 2 for breakpoints */
- status->value.sig = TARGET_SIGNAL_TRAP;
- break;
- case 0: /* Single step */
- status->value.sig = TARGET_SIGNAL_TRAP;
- break;
- case 2: /* Interrupt */
- if (had_sleep)
- {
- status->value.sig = TARGET_SIGNAL_TRAP;
- sub2_from_pc ();
- }
- else
- {
- status->value.sig = TARGET_SIGNAL_INT;
- }
- break;
- case 3:
- break;
- case 4:
- printf_unfiltered ("a cycle address error?\n");
- status->value.sig = TARGET_SIGNAL_UNKNOWN;
- break;
- case 5:
- status->value.sig = TARGET_SIGNAL_ILL;
- break;
- case 6:
- status->value.sig = TARGET_SIGNAL_SEGV;
- break;
- case 7: /* Anything else (NITEMS + 1) */
- printf_unfiltered ("a write protect error?\n");
- status->value.sig = TARGET_SIGNAL_UNKNOWN;
- break;
- default:
- /* Get the user's attention - this should never happen. */
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
- }
-
- return inferior_ptid;
-}
-
-/* Stop the running program. */
-
-static void
-e7000_stop (void)
-{
- /* Sending a ^C is supposed to stop the running program. */
- putchar_e7000 (CTRLC);
-}
-
-/* Define the target subroutine names. */
-
-struct target_ops e7000_ops;
-
-static void
-init_e7000_ops (void)
-{
- e7000_ops.to_shortname = "e7000";
- e7000_ops.to_longname = "Remote Hitachi e7000 target";
- e7000_ops.to_doc = "Use a remote Hitachi e7000 ICE connected by a serial line;\n\
-or a network connection.\n\
-Arguments are the name of the device for the serial line,\n\
-the speed to connect at in bits per second.\n\
-eg\n\
-target e7000 /dev/ttya 9600\n\
-target e7000 foobar";
- e7000_ops.to_open = e7000_open;
- e7000_ops.to_close = e7000_close;
- e7000_ops.to_attach = 0;
- e7000_ops.to_post_attach = NULL;
- e7000_ops.to_require_attach = NULL;
- e7000_ops.to_detach = e7000_detach;
- e7000_ops.to_require_detach = NULL;
- e7000_ops.to_resume = e7000_resume;
- e7000_ops.to_wait = e7000_wait;
- e7000_ops.to_post_wait = NULL;
- e7000_ops.to_fetch_registers = e7000_fetch_register;
- e7000_ops.to_store_registers = e7000_store_register;
- e7000_ops.to_prepare_to_store = e7000_prepare_to_store;
- e7000_ops.to_xfer_memory = e7000_xfer_inferior_memory;
- e7000_ops.to_files_info = e7000_files_info;
- e7000_ops.to_insert_breakpoint = e7000_insert_breakpoint;
- e7000_ops.to_remove_breakpoint = e7000_remove_breakpoint;
- e7000_ops.to_terminal_init = 0;
- e7000_ops.to_terminal_inferior = 0;
- e7000_ops.to_terminal_ours_for_output = 0;
- e7000_ops.to_terminal_ours = 0;
- e7000_ops.to_terminal_info = 0;
- e7000_ops.to_kill = e7000_kill;
- e7000_ops.to_load = e7000_load;
- e7000_ops.to_lookup_symbol = 0;
- e7000_ops.to_create_inferior = e7000_create_inferior;
- e7000_ops.to_post_startup_inferior = NULL;
- e7000_ops.to_acknowledge_created_inferior = NULL;
- e7000_ops.to_clone_and_follow_inferior = NULL;
- e7000_ops.to_post_follow_inferior_by_clone = NULL;
- e7000_ops.to_insert_fork_catchpoint = NULL;
- e7000_ops.to_remove_fork_catchpoint = NULL;
- e7000_ops.to_insert_vfork_catchpoint = NULL;
- e7000_ops.to_remove_vfork_catchpoint = NULL;
- e7000_ops.to_has_forked = NULL;
- e7000_ops.to_has_vforked = NULL;
- e7000_ops.to_can_follow_vfork_prior_to_exec = NULL;
- e7000_ops.to_post_follow_vfork = NULL;
- e7000_ops.to_insert_exec_catchpoint = NULL;
- e7000_ops.to_remove_exec_catchpoint = NULL;
- e7000_ops.to_has_execd = NULL;
- e7000_ops.to_reported_exec_events_per_exec_call = NULL;
- e7000_ops.to_has_exited = NULL;
- e7000_ops.to_mourn_inferior = e7000_mourn_inferior;
- e7000_ops.to_can_run = 0;
- e7000_ops.to_notice_signals = 0;
- e7000_ops.to_thread_alive = 0;
- e7000_ops.to_stop = e7000_stop;
- e7000_ops.to_pid_to_exec_file = NULL;
- e7000_ops.to_stratum = process_stratum;
- e7000_ops.DONT_USE = 0;
- e7000_ops.to_has_all_memory = 1;
- e7000_ops.to_has_memory = 1;
- e7000_ops.to_has_stack = 1;
- e7000_ops.to_has_registers = 1;
- e7000_ops.to_has_execution = 1;
- e7000_ops.to_sections = 0;
- e7000_ops.to_sections_end = 0;
- e7000_ops.to_magic = OPS_MAGIC;
-};
-
-void
-_initialize_remote_e7000 (void)
-{
- init_e7000_ops ();
- add_target (&e7000_ops);
-
- add_com ("e7000", class_obscure, e7000_command,
- "Send a command to the e7000 monitor.");
-
- add_com ("ftplogin", class_obscure, e7000_login_command,
- "Login to machine and change to directory.");
-
- add_com ("ftpload", class_obscure, e7000_ftp_command,
- "Fetch and load a file from previously described place.");
-
- add_com ("drain", class_obscure, e7000_drain_command,
- "Drain pending e7000 text buffers.");
-
- add_show_from_set (add_set_cmd ("usehardbreakpoints", no_class,
- var_integer, (char *) &use_hard_breakpoints,
- "Set use of hardware breakpoints for all breakpoints.\n", &setlist),
- &showlist);
-}
diff --git a/contrib/gdb/gdb/remote-eb.c b/contrib/gdb/gdb/remote-eb.c
deleted file mode 100644
index dcee34514f20..000000000000
--- a/contrib/gdb/gdb/remote-eb.c
+++ /dev/null
@@ -1,1088 +0,0 @@
-/* OBSOLETE /* Remote debugging interface for AMD 29000 EBMON on IBM PC, for GDB. */
-/* OBSOLETE Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001 */
-/* OBSOLETE Free Software Foundation, Inc. */
-/* OBSOLETE Contributed by Cygnus Support. Written by Jim Kingdon for Cygnus. */
-/* OBSOLETE */
-/* OBSOLETE This file is part of GDB. */
-/* OBSOLETE */
-/* OBSOLETE This program is free software; you can redistribute it and/or modify */
-/* OBSOLETE it under the terms of the GNU General Public License as published by */
-/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
-/* OBSOLETE (at your option) any later version. */
-/* OBSOLETE */
-/* OBSOLETE This program is distributed in the hope that it will be useful, */
-/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* OBSOLETE GNU General Public License for more details. */
-/* OBSOLETE */
-/* OBSOLETE You should have received a copy of the GNU General Public License */
-/* OBSOLETE along with this program; if not, write to the Free Software */
-/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
-/* OBSOLETE Boston, MA 02111-1307, USA. */ */
-/* OBSOLETE */
-/* OBSOLETE /* This is like remote.c but is for an esoteric situation-- */
-/* OBSOLETE having a a29k board in a PC hooked up to a unix machine with */
-/* OBSOLETE a serial line, and running ctty com1 on the PC, through which */
-/* OBSOLETE the unix machine can run ebmon. Not to mention that the PC */
-/* OBSOLETE has PC/NFS, so it can access the same executables that gdb can, */
-/* OBSOLETE over the net in real time. */ */
-/* OBSOLETE */
-/* OBSOLETE #include "defs.h" */
-/* OBSOLETE #include "gdb_string.h" */
-/* OBSOLETE #include "regcache.h" */
-/* OBSOLETE */
-/* OBSOLETE #include "inferior.h" */
-/* OBSOLETE #include "bfd.h" */
-/* OBSOLETE #include "symfile.h" */
-/* OBSOLETE #include "value.h" */
-/* OBSOLETE #include <ctype.h> */
-/* OBSOLETE #include <fcntl.h> */
-/* OBSOLETE #include <signal.h> */
-/* OBSOLETE #include <errno.h> */
-/* OBSOLETE #include "terminal.h" */
-/* OBSOLETE #include "target.h" */
-/* OBSOLETE #include "gdbcore.h" */
-/* OBSOLETE */
-/* OBSOLETE extern struct target_ops eb_ops; /* Forward declaration */ */
-/* OBSOLETE */
-/* OBSOLETE static void eb_close (); */
-/* OBSOLETE */
-/* OBSOLETE #define LOG_FILE "eb.log" */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE FILE *log_file; */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE static int timeout = 24; */
-/* OBSOLETE */
-/* OBSOLETE /* Descriptor for I/O to remote machine. Initialize it to -1 so that */
-/* OBSOLETE eb_open knows that we don't have a file open when the program */
-/* OBSOLETE starts. */ */
-/* OBSOLETE int eb_desc = -1; */
-/* OBSOLETE */
-/* OBSOLETE /* stream which is fdopen'd from eb_desc. Only valid when */
-/* OBSOLETE eb_desc != -1. */ */
-/* OBSOLETE FILE *eb_stream; */
-/* OBSOLETE */
-/* OBSOLETE /* Read a character from the remote system, doing all the fancy */
-/* OBSOLETE timeout stuff. */ */
-/* OBSOLETE static int */
-/* OBSOLETE readchar (void) */
-/* OBSOLETE { */
-/* OBSOLETE char buf; */
-/* OBSOLETE */
-/* OBSOLETE buf = '\0'; */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE /* termio does the timeout for us. */ */
-/* OBSOLETE read (eb_desc, &buf, 1); */
-/* OBSOLETE #else */
-/* OBSOLETE alarm (timeout); */
-/* OBSOLETE if (read (eb_desc, &buf, 1) < 0) */
-/* OBSOLETE { */
-/* OBSOLETE if (errno == EINTR) */
-/* OBSOLETE error ("Timeout reading from remote system."); */
-/* OBSOLETE else */
-/* OBSOLETE perror_with_name ("remote"); */
-/* OBSOLETE } */
-/* OBSOLETE alarm (0); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE if (buf == '\0') */
-/* OBSOLETE error ("Timeout reading from remote system."); */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE putc (buf & 0x7f, log_file); */
-/* OBSOLETE #endif */
-/* OBSOLETE return buf & 0x7f; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Keep discarding input from the remote system, until STRING is found. */
-/* OBSOLETE Let the user break out immediately. */ */
-/* OBSOLETE static void */
-/* OBSOLETE expect (char *string) */
-/* OBSOLETE { */
-/* OBSOLETE char *p = string; */
-/* OBSOLETE */
-/* OBSOLETE immediate_quit++; */
-/* OBSOLETE while (1) */
-/* OBSOLETE { */
-/* OBSOLETE if (readchar () == *p) */
-/* OBSOLETE { */
-/* OBSOLETE p++; */
-/* OBSOLETE if (*p == '\0') */
-/* OBSOLETE { */
-/* OBSOLETE immediate_quit--; */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE p = string; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Keep discarding input until we see the ebmon prompt. */
-/* OBSOLETE */
-/* OBSOLETE The convention for dealing with the prompt is that you */
-/* OBSOLETE o give your command */
-/* OBSOLETE o *then* wait for the prompt. */
-/* OBSOLETE */
-/* OBSOLETE Thus the last thing that a procedure does with the serial line */
-/* OBSOLETE will be an expect_prompt(). Exception: eb_resume does not */
-/* OBSOLETE wait for the prompt, because the terminal is being handed over */
-/* OBSOLETE to the inferior. However, the next thing which happens after that */
-/* OBSOLETE is a eb_wait which does wait for the prompt. */
-/* OBSOLETE Note that this includes abnormal exit, e.g. error(). This is */
-/* OBSOLETE necessary to prevent getting into states from which we can't */
-/* OBSOLETE recover. */ */
-/* OBSOLETE static void */
-/* OBSOLETE expect_prompt (void) */
-/* OBSOLETE { */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE /* This is a convenient place to do this. The idea is to do it often */
-/* OBSOLETE enough that we never lose much data if we terminate abnormally. */ */
-/* OBSOLETE fflush (log_file); */
-/* OBSOLETE #endif */
-/* OBSOLETE expect ("\n# "); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Get a hex digit from the remote system & return its value. */
-/* OBSOLETE If ignore_space is nonzero, ignore spaces (not newline, tab, etc). */ */
-/* OBSOLETE static int */
-/* OBSOLETE get_hex_digit (int ignore_space) */
-/* OBSOLETE { */
-/* OBSOLETE int ch; */
-/* OBSOLETE while (1) */
-/* OBSOLETE { */
-/* OBSOLETE ch = readchar (); */
-/* OBSOLETE if (ch >= '0' && ch <= '9') */
-/* OBSOLETE return ch - '0'; */
-/* OBSOLETE else if (ch >= 'A' && ch <= 'F') */
-/* OBSOLETE return ch - 'A' + 10; */
-/* OBSOLETE else if (ch >= 'a' && ch <= 'f') */
-/* OBSOLETE return ch - 'a' + 10; */
-/* OBSOLETE else if (ch == ' ' && ignore_space) */
-/* OBSOLETE ; */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE error ("Invalid hex digit from remote system."); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Get a byte from eb_desc and put it in *BYT. Accept any number */
-/* OBSOLETE leading spaces. */ */
-/* OBSOLETE static void */
-/* OBSOLETE get_hex_byte (char *byt) */
-/* OBSOLETE { */
-/* OBSOLETE int val; */
-/* OBSOLETE */
-/* OBSOLETE val = get_hex_digit (1) << 4; */
-/* OBSOLETE val |= get_hex_digit (0); */
-/* OBSOLETE *byt = val; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Get N 32-bit words from remote, each preceded by a space, */
-/* OBSOLETE and put them in registers starting at REGNO. */ */
-/* OBSOLETE static void */
-/* OBSOLETE get_hex_regs (int n, int regno) */
-/* OBSOLETE { */
-/* OBSOLETE long val; */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < n; i++) */
-/* OBSOLETE { */
-/* OBSOLETE int j; */
-/* OBSOLETE */
-/* OBSOLETE val = 0; */
-/* OBSOLETE for (j = 0; j < 8; j++) */
-/* OBSOLETE val = (val << 4) + get_hex_digit (j == 0); */
-/* OBSOLETE supply_register (regno++, (char *) &val); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Called when SIGALRM signal sent due to alarm() timeout. */ */
-/* OBSOLETE #ifndef HAVE_TERMIO */
-/* OBSOLETE */
-/* OBSOLETE volatile int n_alarms; */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE eb_timer (void) */
-/* OBSOLETE { */
-/* OBSOLETE #if 0 */
-/* OBSOLETE if (kiodebug) */
-/* OBSOLETE printf ("eb_timer called\n"); */
-/* OBSOLETE #endif */
-/* OBSOLETE n_alarms++; */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /* malloc'd name of the program on the remote system. */ */
-/* OBSOLETE static char *prog_name = NULL; */
-/* OBSOLETE */
-/* OBSOLETE /* Nonzero if we have loaded the file ("yc") and not yet issued a "gi" */
-/* OBSOLETE command. "gi" is supposed to happen exactly once for each "yc". */ */
-/* OBSOLETE static int need_gi = 0; */
-/* OBSOLETE */
-/* OBSOLETE /* Number of SIGTRAPs we need to simulate. That is, the next */
-/* OBSOLETE NEED_ARTIFICIAL_TRAP calls to eb_wait should just return */
-/* OBSOLETE SIGTRAP without actually waiting for anything. */ */
-/* OBSOLETE */
-/* OBSOLETE static int need_artificial_trap = 0; */
-/* OBSOLETE */
-/* OBSOLETE /* This is called not only when we first attach, but also when the */
-/* OBSOLETE user types "run" after having attached. */ */
-/* OBSOLETE static void */
-/* OBSOLETE eb_create_inferior (char *execfile, char *args, char **env) */
-/* OBSOLETE { */
-/* OBSOLETE int entry_pt; */
-/* OBSOLETE */
-/* OBSOLETE if (args && *args) */
-/* OBSOLETE error ("Can't pass arguments to remote EBMON process"); */
-/* OBSOLETE */
-/* OBSOLETE if (execfile == 0 || exec_bfd == 0) */
-/* OBSOLETE error ("No executable file specified"); */
-/* OBSOLETE */
-/* OBSOLETE entry_pt = (int) bfd_get_start_address (exec_bfd); */
-/* OBSOLETE */
-/* OBSOLETE { */
-/* OBSOLETE /* OK, now read in the file. Y=read, C=COFF, D=no symbols */
-/* OBSOLETE 0=start address, %s=filename. */ */
-/* OBSOLETE */
-/* OBSOLETE fprintf (eb_stream, "YC D,0:%s", prog_name); */
-/* OBSOLETE */
-/* OBSOLETE if (args != NULL) */
-/* OBSOLETE fprintf (eb_stream, " %s", args); */
-/* OBSOLETE */
-/* OBSOLETE fprintf (eb_stream, "\n"); */
-/* OBSOLETE fflush (eb_stream); */
-/* OBSOLETE */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE */
-/* OBSOLETE need_gi = 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* The "process" (board) is already stopped awaiting our commands, and */
-/* OBSOLETE the program is already downloaded. We just set its PC and go. */ */
-/* OBSOLETE */
-/* OBSOLETE clear_proceed_status (); */
-/* OBSOLETE */
-/* OBSOLETE /* Tell wait_for_inferior that we've started a new process. */ */
-/* OBSOLETE init_wait_for_inferior (); */
-/* OBSOLETE */
-/* OBSOLETE /* Set up the "saved terminal modes" of the inferior */
-/* OBSOLETE based on what modes we are starting it with. */ */
-/* OBSOLETE target_terminal_init (); */
-/* OBSOLETE */
-/* OBSOLETE /* Install inferior's terminal modes. */ */
-/* OBSOLETE target_terminal_inferior (); */
-/* OBSOLETE */
-/* OBSOLETE /* insert_step_breakpoint (); FIXME, do we need this? */ */
-/* OBSOLETE proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0); /* Let 'er rip... */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Translate baud rates from integers to damn B_codes. Unix should */
-/* OBSOLETE have outgrown this crap years ago, but even POSIX wouldn't buck it. */ */
-/* OBSOLETE */
-/* OBSOLETE #ifndef B19200 */
-/* OBSOLETE #define B19200 EXTA */
-/* OBSOLETE #endif */
-/* OBSOLETE #ifndef B38400 */
-/* OBSOLETE #define B38400 EXTB */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE struct */
-/* OBSOLETE { */
-/* OBSOLETE int rate, damn_b; */
-/* OBSOLETE } */
-/* OBSOLETE baudtab[] = */
-/* OBSOLETE { */
-/* OBSOLETE { */
-/* OBSOLETE 0, B0 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 50, B50 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 75, B75 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 110, B110 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 134, B134 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 150, B150 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 200, B200 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 300, B300 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 600, B600 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 1200, B1200 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 1800, B1800 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 2400, B2400 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 4800, B4800 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 9600, B9600 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 19200, B19200 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 38400, B38400 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE -1, -1 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE }; */
-/* OBSOLETE */
-/* OBSOLETE int */
-/* OBSOLETE damn_b (int rate) */
-/* OBSOLETE { */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; baudtab[i].rate != -1; i++) */
-/* OBSOLETE if (rate == baudtab[i].rate) */
-/* OBSOLETE return baudtab[i].damn_b; */
-/* OBSOLETE return B38400; /* Random */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /* Open a connection to a remote debugger. */
-/* OBSOLETE NAME is the filename used for communication, then a space, */
-/* OBSOLETE then the name of the program as we should name it to EBMON. */ */
-/* OBSOLETE */
-/* OBSOLETE static int baudrate = 9600; */
-/* OBSOLETE static char *dev_name; */
-/* OBSOLETE void */
-/* OBSOLETE eb_open (char *name, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE TERMINAL sg; */
-/* OBSOLETE */
-/* OBSOLETE char *p; */
-/* OBSOLETE */
-/* OBSOLETE target_preopen (from_tty); */
-/* OBSOLETE */
-/* OBSOLETE /* Find the first whitespace character, it separates dev_name from */
-/* OBSOLETE prog_name. */ */
-/* OBSOLETE if (name == 0) */
-/* OBSOLETE goto erroid; */
-/* OBSOLETE */
-/* OBSOLETE for (p = name; */
-/* OBSOLETE *p != '\0' && !isspace (*p); p++) */
-/* OBSOLETE ; */
-/* OBSOLETE if (*p == '\0') */
-/* OBSOLETE erroid: */
-/* OBSOLETE error ("\ */
-/* OBSOLETE Please include the name of the device for the serial port,\n\ */
-/* OBSOLETE the baud rate, and the name of the program to run on the remote system."); */
-/* OBSOLETE dev_name = alloca (p - name + 1); */
-/* OBSOLETE strncpy (dev_name, name, p - name); */
-/* OBSOLETE dev_name[p - name] = '\0'; */
-/* OBSOLETE */
-/* OBSOLETE /* Skip over the whitespace after dev_name */ */
-/* OBSOLETE for (; isspace (*p); p++) */
-/* OBSOLETE /*EMPTY */ ; */
-/* OBSOLETE */
-/* OBSOLETE if (1 != sscanf (p, "%d ", &baudrate)) */
-/* OBSOLETE goto erroid; */
-/* OBSOLETE */
-/* OBSOLETE /* Skip the number and then the spaces */ */
-/* OBSOLETE for (; isdigit (*p); p++) */
-/* OBSOLETE /*EMPTY */ ; */
-/* OBSOLETE for (; isspace (*p); p++) */
-/* OBSOLETE /*EMPTY */ ; */
-/* OBSOLETE */
-/* OBSOLETE if (prog_name != NULL) */
-/* OBSOLETE xfree (prog_name); */
-/* OBSOLETE prog_name = savestring (p, strlen (p)); */
-/* OBSOLETE */
-/* OBSOLETE eb_close (0); */
-/* OBSOLETE */
-/* OBSOLETE eb_desc = open (dev_name, O_RDWR); */
-/* OBSOLETE if (eb_desc < 0) */
-/* OBSOLETE perror_with_name (dev_name); */
-/* OBSOLETE ioctl (eb_desc, TIOCGETP, &sg); */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE sg.c_cc[VMIN] = 0; /* read with timeout. */ */
-/* OBSOLETE sg.c_cc[VTIME] = timeout * 10; */
-/* OBSOLETE sg.c_lflag &= ~(ICANON | ECHO); */
-/* OBSOLETE sg.c_cflag = (sg.c_cflag & ~CBAUD) | damn_b (baudrate); */
-/* OBSOLETE #else */
-/* OBSOLETE sg.sg_ispeed = damn_b (baudrate); */
-/* OBSOLETE sg.sg_ospeed = damn_b (baudrate); */
-/* OBSOLETE sg.sg_flags |= RAW | ANYP; */
-/* OBSOLETE sg.sg_flags &= ~ECHO; */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE ioctl (eb_desc, TIOCSETP, &sg); */
-/* OBSOLETE eb_stream = fdopen (eb_desc, "r+"); */
-/* OBSOLETE */
-/* OBSOLETE push_target (&eb_ops); */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE printf ("Remote %s debugging %s using %s\n", target_shortname, */
-/* OBSOLETE prog_name, dev_name); */
-/* OBSOLETE */
-/* OBSOLETE #ifndef HAVE_TERMIO */
-/* OBSOLETE #ifndef NO_SIGINTERRUPT */
-/* OBSOLETE /* Cause SIGALRM's to make reads fail with EINTR instead of resuming */
-/* OBSOLETE the read. */ */
-/* OBSOLETE if (siginterrupt (SIGALRM, 1) != 0) */
-/* OBSOLETE perror ("eb_open: error in siginterrupt"); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /* Set up read timeout timer. */ */
-/* OBSOLETE if ((void (*)) signal (SIGALRM, eb_timer) == (void (*)) -1) */
-/* OBSOLETE perror ("eb_open: error in signal"); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE log_file = fopen (LOG_FILE, "w"); */
-/* OBSOLETE if (log_file == NULL) */
-/* OBSOLETE perror_with_name (LOG_FILE); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /* Hello? Are you there? */ */
-/* OBSOLETE write (eb_desc, "\n", 1); */
-/* OBSOLETE */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Close out all files and local state before this target loses control. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE eb_close (int quitting) */
-/* OBSOLETE { */
-/* OBSOLETE */
-/* OBSOLETE /* Due to a bug in Unix, fclose closes not only the stdio stream, */
-/* OBSOLETE but also the file descriptor. So we don't actually close */
-/* OBSOLETE eb_desc. */ */
-/* OBSOLETE if (eb_stream) */
-/* OBSOLETE fclose (eb_stream); /* This also closes eb_desc */ */
-/* OBSOLETE if (eb_desc >= 0) */
-/* OBSOLETE /* close (eb_desc); */ */
-/* OBSOLETE */
-/* OBSOLETE /* Do not try to close eb_desc again, later in the program. */ */
-/* OBSOLETE eb_stream = NULL; */
-/* OBSOLETE eb_desc = -1; */
-/* OBSOLETE */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE if (log_file) */
-/* OBSOLETE { */
-/* OBSOLETE if (ferror (log_file)) */
-/* OBSOLETE printf ("Error writing log file.\n"); */
-/* OBSOLETE if (fclose (log_file) != 0) */
-/* OBSOLETE printf ("Error closing log file.\n"); */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Terminate the open connection to the remote debugger. */
-/* OBSOLETE Use this when you want to detach and do something else */
-/* OBSOLETE with your gdb. */ */
-/* OBSOLETE void */
-/* OBSOLETE eb_detach (int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE pop_target (); /* calls eb_close to do the real work */ */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE printf ("Ending remote %s debugging\n", target_shortname); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Tell the remote machine to resume. */ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE eb_resume (ptid_t ptid, int step, enum target_signal sig) */
-/* OBSOLETE { */
-/* OBSOLETE if (step) */
-/* OBSOLETE { */
-/* OBSOLETE write (eb_desc, "t 1,s\n", 6); */
-/* OBSOLETE /* Wait for the echo. */ */
-/* OBSOLETE expect ("t 1,s\r"); */
-/* OBSOLETE /* Then comes a line containing the instruction we stepped to. */ */
-/* OBSOLETE expect ("\n@"); */
-/* OBSOLETE /* Then we get the prompt. */ */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE */
-/* OBSOLETE /* Force the next eb_wait to return a trap. Not doing anything */
-/* OBSOLETE about I/O from the target means that the user has to type */
-/* OBSOLETE "continue" to see any. This should be fixed. */ */
-/* OBSOLETE need_artificial_trap = 1; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE if (need_gi) */
-/* OBSOLETE { */
-/* OBSOLETE need_gi = 0; */
-/* OBSOLETE write (eb_desc, "gi\n", 3); */
-/* OBSOLETE */
-/* OBSOLETE /* Swallow the echo of "gi". */ */
-/* OBSOLETE expect ("gi\r"); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE write (eb_desc, "GR\n", 3); */
-/* OBSOLETE /* Swallow the echo. */ */
-/* OBSOLETE expect ("GR\r"); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Wait until the remote machine stops, then return, */
-/* OBSOLETE storing status in STATUS just as `wait' would. */ */
-/* OBSOLETE */
-/* OBSOLETE ptid_t */
-/* OBSOLETE eb_wait (ptid_t ptid, struct target_waitstatus *status) */
-/* OBSOLETE { */
-/* OBSOLETE /* Strings to look for. '?' means match any single character. */
-/* OBSOLETE Note that with the algorithm we use, the initial character */
-/* OBSOLETE of the string cannot recur in the string, or we will not */
-/* OBSOLETE find some cases of the string in the input. */ */
-/* OBSOLETE */
-/* OBSOLETE static char bpt[] = "Invalid interrupt taken - #0x50 - "; */
-/* OBSOLETE /* It would be tempting to look for "\n[__exit + 0x8]\n" */
-/* OBSOLETE but that requires loading symbols with "yc i" and even if */
-/* OBSOLETE we did do that we don't know that the file has symbols. */ */
-/* OBSOLETE static char exitmsg[] = "\n@????????I JMPTI GR121,LR0"; */
-/* OBSOLETE char *bp = bpt; */
-/* OBSOLETE char *ep = exitmsg; */
-/* OBSOLETE */
-/* OBSOLETE /* Large enough for either sizeof (bpt) or sizeof (exitmsg) chars. */ */
-/* OBSOLETE char swallowed[50]; */
-/* OBSOLETE /* Current position in swallowed. */ */
-/* OBSOLETE char *swallowed_p = swallowed; */
-/* OBSOLETE */
-/* OBSOLETE int ch; */
-/* OBSOLETE int ch_handled; */
-/* OBSOLETE */
-/* OBSOLETE int old_timeout = timeout; */
-/* OBSOLETE */
-/* OBSOLETE status->kind = TARGET_WAITKIND_EXITED; */
-/* OBSOLETE status->value.integer = 0; */
-/* OBSOLETE */
-/* OBSOLETE if (need_artificial_trap != 0) */
-/* OBSOLETE { */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; */
-/* OBSOLETE need_artificial_trap--; */
-/* OBSOLETE return 0; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE timeout = 0; /* Don't time out -- user program is running. */ */
-/* OBSOLETE while (1) */
-/* OBSOLETE { */
-/* OBSOLETE ch_handled = 0; */
-/* OBSOLETE ch = readchar (); */
-/* OBSOLETE if (ch == *bp) */
-/* OBSOLETE { */
-/* OBSOLETE bp++; */
-/* OBSOLETE if (*bp == '\0') */
-/* OBSOLETE break; */
-/* OBSOLETE ch_handled = 1; */
-/* OBSOLETE */
-/* OBSOLETE *swallowed_p++ = ch; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE bp = bpt; */
-/* OBSOLETE */
-/* OBSOLETE if (ch == *ep || *ep == '?') */
-/* OBSOLETE { */
-/* OBSOLETE ep++; */
-/* OBSOLETE if (*ep == '\0') */
-/* OBSOLETE break; */
-/* OBSOLETE */
-/* OBSOLETE if (!ch_handled) */
-/* OBSOLETE *swallowed_p++ = ch; */
-/* OBSOLETE ch_handled = 1; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE ep = exitmsg; */
-/* OBSOLETE */
-/* OBSOLETE if (!ch_handled) */
-/* OBSOLETE { */
-/* OBSOLETE char *p; */
-/* OBSOLETE */
-/* OBSOLETE /* Print out any characters which have been swallowed. */ */
-/* OBSOLETE for (p = swallowed; p < swallowed_p; ++p) */
-/* OBSOLETE putc (*p, stdout); */
-/* OBSOLETE swallowed_p = swallowed; */
-/* OBSOLETE */
-/* OBSOLETE putc (ch, stdout); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE if (*bp == '\0') */
-/* OBSOLETE { */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE status->kind = TARGET_WAITKIND_EXITED; */
-/* OBSOLETE status->value.integer = 0; */
-/* OBSOLETE } */
-/* OBSOLETE timeout = old_timeout; */
-/* OBSOLETE */
-/* OBSOLETE return 0; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Return the name of register number REGNO */
-/* OBSOLETE in the form input and output by EBMON. */
-/* OBSOLETE */
-/* OBSOLETE Returns a pointer to a static buffer containing the answer. */ */
-/* OBSOLETE static char * */
-/* OBSOLETE get_reg_name (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE static char buf[80]; */
-/* OBSOLETE if (regno >= GR96_REGNUM && regno < GR96_REGNUM + 32) */
-/* OBSOLETE sprintf (buf, "GR%03d", regno - GR96_REGNUM + 96); */
-/* OBSOLETE else if (regno >= LR0_REGNUM && regno < LR0_REGNUM + 128) */
-/* OBSOLETE sprintf (buf, "LR%03d", regno - LR0_REGNUM); */
-/* OBSOLETE else if (regno == Q_REGNUM) */
-/* OBSOLETE strcpy (buf, "SR131"); */
-/* OBSOLETE else if (regno >= BP_REGNUM && regno <= CR_REGNUM) */
-/* OBSOLETE sprintf (buf, "SR%03d", regno - BP_REGNUM + 133); */
-/* OBSOLETE else if (regno == ALU_REGNUM) */
-/* OBSOLETE strcpy (buf, "SR132"); */
-/* OBSOLETE else if (regno >= IPC_REGNUM && regno <= IPB_REGNUM) */
-/* OBSOLETE sprintf (buf, "SR%03d", regno - IPC_REGNUM + 128); */
-/* OBSOLETE else if (regno >= VAB_REGNUM && regno <= LRU_REGNUM) */
-/* OBSOLETE sprintf (buf, "SR%03d", regno - VAB_REGNUM); */
-/* OBSOLETE else if (regno == GR1_REGNUM) */
-/* OBSOLETE strcpy (buf, "GR001"); */
-/* OBSOLETE return buf; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Read the remote registers into the block REGS. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE eb_fetch_registers (void) */
-/* OBSOLETE { */
-/* OBSOLETE int reg_index; */
-/* OBSOLETE int regnum_index; */
-/* OBSOLETE char tempbuf[10]; */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE #if 0 */
-/* OBSOLETE /* This should not be necessary, because one is supposed to read the */
-/* OBSOLETE registers only when the inferior is stopped (at least with */
-/* OBSOLETE ptrace() and why not make it the same for remote?). */ */
-/* OBSOLETE /* ^A is the "normal character" used to make sure we are talking to EBMON */
-/* OBSOLETE and not to the program being debugged. */ */
-/* OBSOLETE write (eb_desc, "\001\n"); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE write (eb_desc, "dw gr96,gr127\n", 14); */
-/* OBSOLETE for (reg_index = 96, regnum_index = GR96_REGNUM; */
-/* OBSOLETE reg_index < 128; */
-/* OBSOLETE reg_index += 4, regnum_index += 4) */
-/* OBSOLETE { */
-/* OBSOLETE sprintf (tempbuf, "GR%03d ", reg_index); */
-/* OBSOLETE expect (tempbuf); */
-/* OBSOLETE get_hex_regs (4, regnum_index); */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < 128; i += 32) */
-/* OBSOLETE { */
-/* OBSOLETE /* The PC has a tendency to hang if we get these */
-/* OBSOLETE all in one fell swoop ("dw lr0,lr127"). */ */
-/* OBSOLETE sprintf (tempbuf, "dw lr%d\n", i); */
-/* OBSOLETE write (eb_desc, tempbuf, strlen (tempbuf)); */
-/* OBSOLETE for (reg_index = i, regnum_index = LR0_REGNUM + i; */
-/* OBSOLETE reg_index < i + 32; */
-/* OBSOLETE reg_index += 4, regnum_index += 4) */
-/* OBSOLETE { */
-/* OBSOLETE sprintf (tempbuf, "LR%03d ", reg_index); */
-/* OBSOLETE expect (tempbuf); */
-/* OBSOLETE get_hex_regs (4, regnum_index); */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE write (eb_desc, "dw sr133,sr133\n", 15); */
-/* OBSOLETE expect ("SR133 "); */
-/* OBSOLETE get_hex_regs (1, BP_REGNUM); */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE write (eb_desc, "dw sr134,sr134\n", 15); */
-/* OBSOLETE expect ("SR134 "); */
-/* OBSOLETE get_hex_regs (1, FC_REGNUM); */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE write (eb_desc, "dw sr135,sr135\n", 15); */
-/* OBSOLETE expect ("SR135 "); */
-/* OBSOLETE get_hex_regs (1, CR_REGNUM); */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE write (eb_desc, "dw sr131,sr131\n", 15); */
-/* OBSOLETE expect ("SR131 "); */
-/* OBSOLETE get_hex_regs (1, Q_REGNUM); */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE write (eb_desc, "dw sr0,sr14\n", 12); */
-/* OBSOLETE for (reg_index = 0, regnum_index = VAB_REGNUM; */
-/* OBSOLETE regnum_index <= LRU_REGNUM; */
-/* OBSOLETE regnum_index += 4, reg_index += 4) */
-/* OBSOLETE { */
-/* OBSOLETE sprintf (tempbuf, "SR%03d ", reg_index); */
-/* OBSOLETE expect (tempbuf); */
-/* OBSOLETE get_hex_regs (reg_index == 12 ? 3 : 4, regnum_index); */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* There doesn't seem to be any way to get these. */ */
-/* OBSOLETE { */
-/* OBSOLETE int val = -1; */
-/* OBSOLETE supply_register (FPE_REGNUM, (char *) &val); */
-/* OBSOLETE supply_register (INTE_REGNUM, (char *) &val); */
-/* OBSOLETE supply_register (FPS_REGNUM, (char *) &val); */
-/* OBSOLETE supply_register (EXO_REGNUM, (char *) &val); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE write (eb_desc, "dw gr1,gr1\n", 11); */
-/* OBSOLETE expect ("GR001 "); */
-/* OBSOLETE get_hex_regs (1, GR1_REGNUM); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Fetch register REGNO, or all registers if REGNO is -1. */
-/* OBSOLETE Returns errno value. */ */
-/* OBSOLETE void */
-/* OBSOLETE eb_fetch_register (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE if (regno == -1) */
-/* OBSOLETE eb_fetch_registers (); */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE char *name = get_reg_name (regno); */
-/* OBSOLETE fprintf (eb_stream, "dw %s,%s\n", name, name); */
-/* OBSOLETE expect (name); */
-/* OBSOLETE expect (" "); */
-/* OBSOLETE get_hex_regs (1, regno); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Store the remote registers from the contents of the block REGS. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE eb_store_registers (void) */
-/* OBSOLETE { */
-/* OBSOLETE int i, j; */
-/* OBSOLETE fprintf (eb_stream, "s gr1,%x\n", read_register (GR1_REGNUM)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE */
-/* OBSOLETE for (j = 0; j < 32; j += 16) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf (eb_stream, "s gr%d,", j + 96); */
-/* OBSOLETE for (i = 0; i < 15; ++i) */
-/* OBSOLETE fprintf (eb_stream, "%x,", read_register (GR96_REGNUM + j + i)); */
-/* OBSOLETE fprintf (eb_stream, "%x\n", read_register (GR96_REGNUM + j + 15)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE for (j = 0; j < 128; j += 16) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf (eb_stream, "s lr%d,", j); */
-/* OBSOLETE for (i = 0; i < 15; ++i) */
-/* OBSOLETE fprintf (eb_stream, "%x,", read_register (LR0_REGNUM + j + i)); */
-/* OBSOLETE fprintf (eb_stream, "%x\n", read_register (LR0_REGNUM + j + 15)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE fprintf (eb_stream, "s sr133,%x,%x,%x\n", read_register (BP_REGNUM), */
-/* OBSOLETE read_register (FC_REGNUM), read_register (CR_REGNUM)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE fprintf (eb_stream, "s sr131,%x\n", read_register (Q_REGNUM)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE fprintf (eb_stream, "s sr0,"); */
-/* OBSOLETE for (i = 0; i < 11; ++i) */
-/* OBSOLETE fprintf (eb_stream, "%x,", read_register (VAB_REGNUM + i)); */
-/* OBSOLETE fprintf (eb_stream, "%x\n", read_register (VAB_REGNUM + 11)); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Store register REGNO, or all if REGNO == 0. */
-/* OBSOLETE Return errno value. */ */
-/* OBSOLETE void */
-/* OBSOLETE eb_store_register (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE if (regno == -1) */
-/* OBSOLETE eb_store_registers (); */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE char *name = get_reg_name (regno); */
-/* OBSOLETE fprintf (eb_stream, "s %s,%x\n", name, read_register (regno)); */
-/* OBSOLETE /* Setting GR1 changes the numbers of all the locals, so */
-/* OBSOLETE invalidate the register cache. Do this *after* calling */
-/* OBSOLETE read_register, because we want read_register to return the */
-/* OBSOLETE value that write_register has just stuffed into the registers */
-/* OBSOLETE array, not the value of the register fetched from the */
-/* OBSOLETE inferior. */ */
-/* OBSOLETE if (regno == GR1_REGNUM) */
-/* OBSOLETE registers_changed (); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Get ready to modify the registers array. On machines which store */
-/* OBSOLETE individual registers, this doesn't need to do anything. On machines */
-/* OBSOLETE which store all the registers in one fell swoop, this makes sure */
-/* OBSOLETE that registers contains all the registers from the program being */
-/* OBSOLETE debugged. */ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE eb_prepare_to_store (void) */
-/* OBSOLETE { */
-/* OBSOLETE /* Do nothing, since we can store individual regs */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Transfer LEN bytes between GDB address MYADDR and target address */
-/* OBSOLETE MEMADDR. If WRITE is non-zero, transfer them to the target, */
-/* OBSOLETE otherwise transfer them from the target. TARGET is unused. */
-/* OBSOLETE */
-/* OBSOLETE Returns the number of bytes transferred. */ */
-/* OBSOLETE */
-/* OBSOLETE int */
-/* OBSOLETE eb_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, */
-/* OBSOLETE struct mem_attrib *attrib ATTRIBUTE_UNUSED, */
-/* OBSOLETE struct target_ops *target ATTRIBUTE_UNUSED) */
-/* OBSOLETE { */
-/* OBSOLETE if (write) */
-/* OBSOLETE return eb_write_inferior_memory (memaddr, myaddr, len); */
-/* OBSOLETE else */
-/* OBSOLETE return eb_read_inferior_memory (memaddr, myaddr, len); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE eb_files_info (void) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("\tAttached to %s at %d baud and running program %s.\n", */
-/* OBSOLETE dev_name, baudrate, prog_name); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Copy LEN bytes of data from debugger memory at MYADDR */
-/* OBSOLETE to inferior's memory at MEMADDR. Returns length moved. */ */
-/* OBSOLETE int */
-/* OBSOLETE eb_write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len) */
-/* OBSOLETE { */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < len; i++) */
-/* OBSOLETE { */
-/* OBSOLETE if ((i % 16) == 0) */
-/* OBSOLETE fprintf (eb_stream, "sb %x,", memaddr + i); */
-/* OBSOLETE if ((i % 16) == 15 || i == len - 1) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf (eb_stream, "%x\n", ((unsigned char *) myaddr)[i]); */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE fprintf (eb_stream, "%x,", ((unsigned char *) myaddr)[i]); */
-/* OBSOLETE } */
-/* OBSOLETE return len; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Read LEN bytes from inferior memory at MEMADDR. Put the result */
-/* OBSOLETE at debugger address MYADDR. Returns length moved. */ */
-/* OBSOLETE int */
-/* OBSOLETE eb_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len) */
-/* OBSOLETE { */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE /* Number of bytes read so far. */ */
-/* OBSOLETE int count; */
-/* OBSOLETE */
-/* OBSOLETE /* Starting address of this pass. */ */
-/* OBSOLETE unsigned long startaddr; */
-/* OBSOLETE */
-/* OBSOLETE /* Number of bytes to read in this pass. */ */
-/* OBSOLETE int len_this_pass; */
-/* OBSOLETE */
-/* OBSOLETE /* Note that this code works correctly if startaddr is just less */
-/* OBSOLETE than UINT_MAX (well, really CORE_ADDR_MAX if there was such a */
-/* OBSOLETE thing). That is, something like */
-/* OBSOLETE eb_read_bytes (CORE_ADDR_MAX - 4, foo, 4) */
-/* OBSOLETE works--it never adds len to memaddr and gets 0. */ */
-/* OBSOLETE /* However, something like */
-/* OBSOLETE eb_read_bytes (CORE_ADDR_MAX - 3, foo, 4) */
-/* OBSOLETE doesn't need to work. Detect it and give up if there's an attempt */
-/* OBSOLETE to do that. */ */
-/* OBSOLETE if (((memaddr - 1) + len) < memaddr) */
-/* OBSOLETE { */
-/* OBSOLETE errno = EIO; */
-/* OBSOLETE return 0; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE startaddr = memaddr; */
-/* OBSOLETE count = 0; */
-/* OBSOLETE while (count < len) */
-/* OBSOLETE { */
-/* OBSOLETE len_this_pass = 16; */
-/* OBSOLETE if ((startaddr % 16) != 0) */
-/* OBSOLETE len_this_pass -= startaddr % 16; */
-/* OBSOLETE if (len_this_pass > (len - count)) */
-/* OBSOLETE len_this_pass = (len - count); */
-/* OBSOLETE */
-/* OBSOLETE fprintf (eb_stream, "db %x,%x\n", startaddr, */
-/* OBSOLETE (startaddr - 1) + len_this_pass); */
-/* OBSOLETE expect ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE /* Look for 8 hex digits. */ */
-/* OBSOLETE i = 0; */
-/* OBSOLETE while (1) */
-/* OBSOLETE { */
-/* OBSOLETE if (isxdigit (readchar ())) */
-/* OBSOLETE ++i; */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE error ("Hex digit expected from remote system."); */
-/* OBSOLETE } */
-/* OBSOLETE if (i >= 8) */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE expect (" "); */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < len_this_pass; i++) */
-/* OBSOLETE get_hex_byte (&myaddr[count++]); */
-/* OBSOLETE */
-/* OBSOLETE expect_prompt (); */
-/* OBSOLETE */
-/* OBSOLETE startaddr += len_this_pass; */
-/* OBSOLETE } */
-/* OBSOLETE return len; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE eb_kill (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE return; /* Ignore attempts to kill target system */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Clean up when a program exits. */
-/* OBSOLETE */
-/* OBSOLETE The program actually lives on in the remote processor's RAM, and may be */
-/* OBSOLETE run again without a download. Don't leave it full of breakpoint */
-/* OBSOLETE instructions. */ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE eb_mourn_inferior (void) */
-/* OBSOLETE { */
-/* OBSOLETE remove_breakpoints (); */
-/* OBSOLETE unpush_target (&eb_ops); */
-/* OBSOLETE generic_mourn_inferior (); /* Do all the proper things now */ */
-/* OBSOLETE } */
-/* OBSOLETE /* Define the target subroutine names */ */
-/* OBSOLETE */
-/* OBSOLETE struct target_ops eb_ops; */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE init_eb_ops (void) */
-/* OBSOLETE { */
-/* OBSOLETE eb_ops.to_shortname = "amd-eb"; */
-/* OBSOLETE eb_ops.to_longname = "Remote serial AMD EBMON target"; */
-/* OBSOLETE eb_ops.to_doc = "Use a remote computer running EBMON connected by a serial line.\n\ */
-/* OBSOLETE Arguments are the name of the device for the serial line,\n\ */
-/* OBSOLETE the speed to connect at in bits per second, and the filename of the\n\ */
-/* OBSOLETE executable as it exists on the remote computer. For example,\n\ */
-/* OBSOLETE target amd-eb /dev/ttya 9600 demo", */
-/* OBSOLETE eb_ops.to_open = eb_open; */
-/* OBSOLETE eb_ops.to_close = eb_close; */
-/* OBSOLETE eb_ops.to_attach = 0; */
-/* OBSOLETE eb_ops.to_post_attach = NULL; */
-/* OBSOLETE eb_ops.to_require_attach = NULL; */
-/* OBSOLETE eb_ops.to_detach = eb_detach; */
-/* OBSOLETE eb_ops.to_require_detach = NULL; */
-/* OBSOLETE eb_ops.to_resume = eb_resume; */
-/* OBSOLETE eb_ops.to_wait = eb_wait; */
-/* OBSOLETE eb_ops.to_post_wait = NULL; */
-/* OBSOLETE eb_ops.to_fetch_registers = eb_fetch_register; */
-/* OBSOLETE eb_ops.to_store_registers = eb_store_register; */
-/* OBSOLETE eb_ops.to_prepare_to_store = eb_prepare_to_store; */
-/* OBSOLETE eb_ops.to_xfer_memory = eb_xfer_inferior_memory; */
-/* OBSOLETE eb_ops.to_files_info = eb_files_info; */
-/* OBSOLETE eb_ops.to_insert_breakpoint = 0; */
-/* OBSOLETE eb_ops.to_remove_breakpoint = 0; /* Breakpoints */ */
-/* OBSOLETE eb_ops.to_terminal_init = 0; */
-/* OBSOLETE eb_ops.to_terminal_inferior = 0; */
-/* OBSOLETE eb_ops.to_terminal_ours_for_output = 0; */
-/* OBSOLETE eb_ops.to_terminal_ours = 0; */
-/* OBSOLETE eb_ops.to_terminal_info = 0; /* Terminal handling */ */
-/* OBSOLETE eb_ops.to_kill = eb_kill; */
-/* OBSOLETE eb_ops.to_load = generic_load; /* load */ */
-/* OBSOLETE eb_ops.to_lookup_symbol = 0; /* lookup_symbol */ */
-/* OBSOLETE eb_ops.to_create_inferior = eb_create_inferior; */
-/* OBSOLETE eb_ops.to_post_startup_inferior = NULL; */
-/* OBSOLETE eb_ops.to_acknowledge_created_inferior = NULL; */
-/* OBSOLETE eb_ops.to_clone_and_follow_inferior = NULL; */
-/* OBSOLETE eb_ops.to_post_follow_inferior_by_clone = NULL; */
-/* OBSOLETE eb_ops.to_insert_fork_catchpoint = NULL; */
-/* OBSOLETE eb_ops.to_remove_fork_catchpoint = NULL; */
-/* OBSOLETE eb_ops.to_insert_vfork_catchpoint = NULL; */
-/* OBSOLETE eb_ops.to_remove_vfork_catchpoint = NULL; */
-/* OBSOLETE eb_ops.to_has_forked = NULL; */
-/* OBSOLETE eb_ops.to_has_vforked = NULL; */
-/* OBSOLETE eb_ops.to_can_follow_vfork_prior_to_exec = NULL; */
-/* OBSOLETE eb_ops.to_post_follow_vfork = NULL; */
-/* OBSOLETE eb_ops.to_insert_exec_catchpoint = NULL; */
-/* OBSOLETE eb_ops.to_remove_exec_catchpoint = NULL; */
-/* OBSOLETE eb_ops.to_has_execd = NULL; */
-/* OBSOLETE eb_ops.to_reported_exec_events_per_exec_call = NULL; */
-/* OBSOLETE eb_ops.to_has_exited = NULL; */
-/* OBSOLETE eb_ops.to_mourn_inferior = eb_mourn_inferior; */
-/* OBSOLETE eb_ops.to_can_run = 0; /* can_run */ */
-/* OBSOLETE eb_ops.to_notice_signals = 0; /* notice_signals */ */
-/* OBSOLETE eb_ops.to_thread_alive = 0; /* thread-alive */ */
-/* OBSOLETE eb_ops.to_stop = 0; /* to_stop */ */
-/* OBSOLETE eb_ops.to_pid_to_exec_file = NULL; */
-/* OBSOLETE eb_ops.to_stratum = process_stratum; */
-/* OBSOLETE eb_ops.DONT_USE = 0; /* next */ */
-/* OBSOLETE eb_ops.to_has_all_memory = 1; */
-/* OBSOLETE eb_ops.to_has_memory = 1; */
-/* OBSOLETE eb_ops.to_has_stack = 1; */
-/* OBSOLETE eb_ops.to_has_registers = 1; */
-/* OBSOLETE eb_ops.to_has_execution = 1; /* all mem, mem, stack, regs, exec */ */
-/* OBSOLETE eb_ops.to_sections = 0; /* sections */ */
-/* OBSOLETE eb_ops.to_sections_end = 0; /* sections end */ */
-/* OBSOLETE eb_ops.to_magic = OPS_MAGIC; /* Always the last thing */ */
-/* OBSOLETE }; */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE _initialize_remote_eb (void) */
-/* OBSOLETE { */
-/* OBSOLETE init_eb_ops (); */
-/* OBSOLETE add_target (&eb_ops); */
-/* OBSOLETE } */
diff --git a/contrib/gdb/gdb/remote-es.c b/contrib/gdb/gdb/remote-es.c
deleted file mode 100644
index dabbcd8b91f0..000000000000
--- a/contrib/gdb/gdb/remote-es.c
+++ /dev/null
@@ -1,2127 +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);
- }
- 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);
- }
- 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);
- }
- 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);
- }
- 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);
- }
- 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);
- }
- 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);
- }
- 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);
- }
- 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);
- }
- 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 *) 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 (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 (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_post_attach = NULL;
- es1800_ops.to_require_attach = NULL;
- es1800_ops.to_detach = es1800_detach;
- es1800_ops.to_require_detach = NULL;
- es1800_ops.to_resume = es1800_resume;
- es1800_ops.to_wait = NULL;
- es1800_ops.to_post_wait = NULL;
- es1800_ops.to_fetch_registers = NULL;
- es1800_ops.to_store_registers = NULL;
- 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_terminal_init = NULL;
- es1800_ops.to_terminal_inferior = NULL;
- es1800_ops.to_terminal_ours_for_output = NULL;
- es1800_ops.to_terminal_ours = NULL;
- es1800_ops.to_terminal_info = NULL;
- es1800_ops.to_kill = NULL;
- es1800_ops.to_load = es1800_load;
- es1800_ops.to_lookup_symbol = NULL;
- es1800_ops.to_create_inferior = es1800_create_inferior;
- es1800_ops.to_post_startup_inferior = NULL;
- es1800_ops.to_acknowledge_created_inferior = NULL;
- es1800_ops.to_clone_and_follow_inferior = NULL;
- es1800_ops.to_post_follow_inferior_by_clone = NULL;
- es1800_ops.to_insert_fork_catchpoint = NULL;
- es1800_ops.to_remove_fork_catchpoint = NULL;
- es1800_ops.to_insert_vfork_catchpoint = NULL;
- es1800_ops.to_remove_vfork_catchpoint = NULL;
- es1800_ops.to_has_forked = NULL;
- es1800_ops.to_has_vforked = NULL;
- es1800_ops.to_can_follow_vfork_prior_to_exec = NULL;
- es1800_ops.to_post_follow_vfork = NULL;
- es1800_ops.to_insert_exec_catchpoint = NULL;
- es1800_ops.to_remove_exec_catchpoint = NULL;
- es1800_ops.to_has_execd = NULL;
- es1800_ops.to_reported_exec_events_per_exec_call = NULL;
- es1800_ops.to_has_exited = NULL;
- es1800_ops.to_mourn_inferior = NULL;
- es1800_ops.to_can_run = 0;
- es1800_ops.to_notice_signals = 0;
- es1800_ops.to_thread_alive = 0;
- es1800_ops.to_stop = 0;
- es1800_ops.to_pid_to_exec_file = NULL;
- es1800_ops.to_stratum = core_stratum;
- es1800_ops.DONT_USE = 0;
- es1800_ops.to_has_all_memory = 0;
- es1800_ops.to_has_memory = 1;
- es1800_ops.to_has_stack = 0;
- es1800_ops.to_has_registers = 0;
- es1800_ops.to_has_execution = 0;
- es1800_ops.to_sections = NULL;
- es1800_ops.to_sections_end = NULL;
- 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_close = NULL;
- es1800_child_ops.to_attach = es1800_attach;
- es1800_child_ops.to_post_attach = NULL;
- es1800_child_ops.to_require_attach = NULL;
- es1800_child_ops.to_detach = es1800_child_detach;
- es1800_child_ops.to_require_detach = NULL;
- es1800_child_ops.to_resume = es1800_resume;
- es1800_child_ops.to_wait = es1800_wait;
- es1800_child_ops.to_post_wait = NULL;
- 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_terminal_init = NULL;
- es1800_child_ops.to_terminal_inferior = NULL;
- es1800_child_ops.to_terminal_ours_for_output = NULL;
- es1800_child_ops.to_terminal_ours = NULL;
- es1800_child_ops.to_terminal_info = NULL;
- es1800_child_ops.to_kill = es1800_kill;
- es1800_child_ops.to_load = es1800_load;
- es1800_child_ops.to_lookup_symbol = NULL;
- es1800_child_ops.to_create_inferior = es1800_create_inferior;
- es1800_child_ops.to_post_startup_inferior = NULL;
- es1800_child_ops.to_acknowledge_created_inferior = NULL;
- es1800_child_ops.to_clone_and_follow_inferior = NULL;
- es1800_child_ops.to_post_follow_inferior_by_clone = NULL;
- es1800_child_ops.to_insert_fork_catchpoint = NULL;
- es1800_child_ops.to_remove_fork_catchpoint = NULL;
- es1800_child_ops.to_insert_vfork_catchpoint = NULL;
- es1800_child_ops.to_remove_vfork_catchpoint = NULL;
- es1800_child_ops.to_has_forked = NULL;
- es1800_child_ops.to_has_vforked = NULL;
- es1800_child_ops.to_can_follow_vfork_prior_to_exec = NULL;
- es1800_child_ops.to_post_follow_vfork = NULL;
- es1800_child_ops.to_insert_exec_catchpoint = NULL;
- es1800_child_ops.to_remove_exec_catchpoint = NULL;
- es1800_child_ops.to_has_execd = NULL;
- es1800_child_ops.to_reported_exec_events_per_exec_call = NULL;
- es1800_child_ops.to_has_exited = NULL;
- es1800_child_ops.to_mourn_inferior = es1800_mourn_inferior;
- es1800_child_ops.to_can_run = 0;
- es1800_child_ops.to_notice_signals = 0;
- es1800_child_ops.to_thread_alive = 0;
- es1800_child_ops.to_stop = 0;
- es1800_child_ops.to_pid_to_exec_file = NULL;
- es1800_child_ops.to_stratum = process_stratum;
- es1800_child_ops.DONT_USE = 0;
- 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_sections = NULL;
- es1800_child_ops.to_sections_end = NULL;
- 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/contrib/gdb/gdb/remote-est.c b/contrib/gdb/gdb/remote-est.c
deleted file mode 100644
index e045a8951cda..000000000000
--- a/contrib/gdb/gdb/remote-est.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/* Remote debugging interface for EST-300 ICE, for GDB
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
- Contributed by Cygnus Support.
-
- Written by Steve Chamberlain for Cygnus Support.
- Re-written by Stu Grossman 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. */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "monitor.h"
-#include "serial.h"
-#include "regcache.h"
-
-static void est_open (char *args, int from_tty);
-
-static void
-est_supply_register (char *regname, int regnamelen, char *val, int vallen)
-{
- int regno;
-
- if (regnamelen != 2)
- return;
-
- switch (regname[0])
- {
- case 'S':
- if (regname[1] != 'R')
- return;
- regno = PS_REGNUM;
- break;
- case 'P':
- if (regname[1] != 'C')
- return;
- regno = PC_REGNUM;
- break;
- case 'D':
- if (regname[1] < '0' || regname[1] > '7')
- return;
- regno = regname[1] - '0' + D0_REGNUM;
- break;
- case 'A':
- if (regname[1] < '0' || regname[1] > '7')
- return;
- regno = regname[1] - '0' + A0_REGNUM;
- break;
- default:
- return;
- }
-
- monitor_supply_register (regno, val);
-}
-
-/*
- * 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 a "r30".
- */
-
-static char *est_regnames[NUM_REGS] =
-{
- "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
- "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7",
- "SR", "PC",
-};
-
-/*
- * Define the monitor command strings. Since these are passed directly
- * through to a printf style function, we need can include formatting
- * strings. We also need a CR or LF on the end.
- */
-
-static struct target_ops est_ops;
-
-static char *est_inits[] =
-{"he\r", /* Resets the prompt, and clears repeated cmds */
- NULL};
-
-static struct monitor_ops est_cmds;
-
-static void
-init_est_cmds (void)
-{
- est_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_FILL_USES_ADDR | MO_NEED_REGDUMP_AFTER_CONT |
- MO_SREC_ACK | MO_SREC_ACK_PLUS;
- est_cmds.init = est_inits; /* Init strings */
- est_cmds.cont = "go\r"; /* continue command */
- est_cmds.step = "sidr\r"; /* single step */
- est_cmds.stop = "\003"; /* ^C interrupts the program */
- est_cmds.set_break = "sb %x\r"; /* set a breakpoint */
- est_cmds.clr_break = "rb %x\r"; /* clear a breakpoint */
- est_cmds.clr_all_break = "rb\r"; /* clear all breakpoints */
- est_cmds.fill = "bfb %x %x %x\r"; /* fill (start end val) */
- est_cmds.setmem.cmdb = "smb %x %x\r"; /* setmem.cmdb (addr, value) */
- est_cmds.setmem.cmdw = "smw %x %x\r"; /* setmem.cmdw (addr, value) */
- est_cmds.setmem.cmdl = "sml %x %x\r"; /* setmem.cmdl (addr, value) */
- est_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
- est_cmds.setmem.resp_delim = NULL; /* setreg.resp_delim */
- est_cmds.setmem.term = NULL; /* setreg.term */
- est_cmds.setmem.term_cmd = NULL; /* setreg.term_cmd */
- est_cmds.getmem.cmdb = "dmb %x %x\r"; /* getmem.cmdb (addr, len) */
- est_cmds.getmem.cmdw = "dmw %x %x\r"; /* getmem.cmdw (addr, len) */
- est_cmds.getmem.cmdl = "dml %x %x\r"; /* getmem.cmdl (addr, len) */
- est_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
- est_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */
- est_cmds.getmem.term = NULL; /* getmem.term */
- est_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
- est_cmds.setreg.cmd = "sr %s %x\r"; /* setreg.cmd (name, value) */
- est_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
- est_cmds.setreg.term = NULL; /* setreg.term */
- est_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
- est_cmds.getreg.cmd = "dr %s\r"; /* getreg.cmd (name) */
- est_cmds.getreg.resp_delim = " = "; /* getreg.resp_delim */
- est_cmds.getreg.term = NULL; /* getreg.term */
- est_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
- est_cmds.dump_registers = "dr\r"; /* dump_registers */
- est_cmds.register_pattern = "\\(\\w+\\) = \\([0-9a-fA-F]+\\)"; /* register_pattern */
- est_cmds.supply_register = est_supply_register; /* supply_register */
- est_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
- est_cmds.load = "dl\r"; /* download command */
- est_cmds.loadresp = "+"; /* load response */
- est_cmds.prompt = ">BKM>"; /* monitor command prompt */
- est_cmds.line_term = "\r"; /* end-of-line terminator */
- est_cmds.cmd_end = NULL; /* optional command terminator */
- est_cmds.target = &est_ops; /* target operations */
- est_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
- est_cmds.regnames = est_regnames; /* registers names */
- est_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
-} /* init_est_cmds */
-
-static void
-est_open (char *args, int from_tty)
-{
- monitor_open (args, &est_cmds, from_tty);
-}
-
-void
-_initialize_est (void)
-{
- init_est_cmds ();
- init_monitor_ops (&est_ops);
-
- est_ops.to_shortname = "est";
- est_ops.to_longname = "EST background debug monitor";
- est_ops.to_doc = "Debug via the EST BDM.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- est_ops.to_open = est_open;
-
- add_target (&est_ops);
-}
diff --git a/contrib/gdb/gdb/remote-hms.c b/contrib/gdb/gdb/remote-hms.c
deleted file mode 100644
index 4a2b088c5086..000000000000
--- a/contrib/gdb/gdb/remote-hms.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/* Remote debugging interface for Hitachi HMS Monitor Version 1.0
- Copyright 1995, 1996, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
- Contributed by Cygnus Support. Written by Steve Chamberlain
- (sac@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. */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "monitor.h"
-#include "serial.h"
-#include "regcache.h"
-
-static void hms_open (char *args, int from_tty);
-static void
-hms_supply_register (char *regname, int regnamelen, char *val, int vallen)
-{
- int regno;
-
- if (regnamelen != 2)
- return;
- if (regname[0] != 'P')
- return;
- /* We scan off all the registers in one go */
-
- val = monitor_supply_register (PC_REGNUM, val);
- /* Skip the ccr string */
- while (*val != '=' && *val)
- val++;
-
- val = monitor_supply_register (CCR_REGNUM, val + 1);
-
- /* Skip up to rest of regs */
- while (*val != '=' && *val)
- val++;
-
- for (regno = 0; regno < 7; regno++)
- {
- val = monitor_supply_register (regno, val + 1);
- }
-}
-
-/*
- * 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 a "r30".
- */
-
-static char *hms_regnames[NUM_REGS] =
-{
- "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "CCR", "PC"
-};
-
-/*
- * Define the monitor command strings. Since these are passed directly
- * through to a printf style function, we need can include formatting
- * strings. We also need a CR or LF on the end.
- */
-
-static struct target_ops hms_ops;
-
-static char *hms_inits[] =
-{"\003", /* Resets the prompt, and clears repeated cmds */
- NULL};
-
-static struct monitor_ops hms_cmds;
-
-static void
-init_hms_cmds (void)
-{
- hms_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_FILL_USES_ADDR | MO_GETMEM_NEEDS_RANGE;
- hms_cmds.init = hms_inits; /* Init strings */
- hms_cmds.cont = "g\r"; /* continue command */
- hms_cmds.step = "s\r"; /* single step */
- hms_cmds.stop = "\003"; /* ^C interrupts the program */
- hms_cmds.set_break = "b %x\r"; /* set a breakpoint */
- hms_cmds.clr_break = "b - %x\r"; /* clear a breakpoint */
- hms_cmds.clr_all_break = "b -\r"; /* clear all breakpoints */
- hms_cmds.fill = "f %x %x %x\r"; /* fill (start end val) */
- hms_cmds.setmem.cmdb = "m.b %x=%x\r"; /* setmem.cmdb (addr, value) */
- hms_cmds.setmem.cmdw = "m.w %x=%x\r"; /* setmem.cmdw (addr, value) */
- hms_cmds.setmem.cmdl = NULL; /* setmem.cmdl (addr, value) */
- hms_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
- hms_cmds.setmem.resp_delim = NULL; /* setreg.resp_delim */
- hms_cmds.setmem.term = NULL; /* setreg.term */
- hms_cmds.setmem.term_cmd = NULL; /* setreg.term_cmd */
- hms_cmds.getmem.cmdb = "m.b %x %x\r"; /* getmem.cmdb (addr, addr) */
- hms_cmds.getmem.cmdw = "m.w %x %x\r"; /* getmem.cmdw (addr, addr) */
- hms_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, addr) */
- hms_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, addr) */
- hms_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */
- hms_cmds.getmem.term = ">"; /* getmem.term */
- hms_cmds.getmem.term_cmd = "\003"; /* getmem.term_cmd */
- hms_cmds.setreg.cmd = "r %s=%x\r"; /* setreg.cmd (name, value) */
- hms_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
- hms_cmds.setreg.term = NULL; /* setreg.term */
- hms_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
- hms_cmds.getreg.cmd = "r %s\r"; /* getreg.cmd (name) */
- hms_cmds.getreg.resp_delim = " ("; /* getreg.resp_delim */
- hms_cmds.getreg.term = ":"; /* getreg.term */
- hms_cmds.getreg.term_cmd = "\003"; /* getreg.term_cmd */
- hms_cmds.dump_registers = "r\r"; /* dump_registers */
- hms_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\)"; /* register_pattern */
- hms_cmds.supply_register = hms_supply_register; /* supply_register */
- hms_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
- hms_cmds.load = "tl\r"; /* download command */
- hms_cmds.loadresp = NULL; /* load response */
- hms_cmds.prompt = ">"; /* monitor command prompt */
- hms_cmds.line_term = "\r"; /* end-of-command delimitor */
- hms_cmds.cmd_end = NULL; /* optional command terminator */
- hms_cmds.target = &hms_ops; /* target operations */
- hms_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
- hms_cmds.regnames = hms_regnames; /* registers names */
- hms_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
-} /* init_hms-cmds */
-
-static void
-hms_open (char *args, int from_tty)
-{
- monitor_open (args, &hms_cmds, from_tty);
-}
-
-int write_dos_tick_delay;
-
-void
-_initialize_remote_hms (void)
-{
- init_hms_cmds ();
- init_monitor_ops (&hms_ops);
-
- hms_ops.to_shortname = "hms";
- hms_ops.to_longname = "Hitachi Microsystems H8/300 debug monitor";
- hms_ops.to_doc = "Debug via the HMS monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- hms_ops.to_open = hms_open;
- /* By trial and error I've found that this delay doesn't break things */
- write_dos_tick_delay = 1;
- add_target (&hms_ops);
-}
diff --git a/contrib/gdb/gdb/remote-mm.c b/contrib/gdb/gdb/remote-mm.c
deleted file mode 100644
index 1cd630ea7446..000000000000
--- a/contrib/gdb/gdb/remote-mm.c
+++ /dev/null
@@ -1,1848 +0,0 @@
-/* OBSOLETE /* Remote debugging interface for Am290*0 running MiniMON monitor, for GDB. */
-/* OBSOLETE Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, */
-/* OBSOLETE 2001 Free Software Foundation, Inc. */
-/* OBSOLETE Originally written by Daniel Mann at AMD. */
-/* OBSOLETE */
-/* OBSOLETE This file is part of GDB. */
-/* OBSOLETE */
-/* OBSOLETE This program is free software; you can redistribute it and/or modify */
-/* OBSOLETE it under the terms of the GNU General Public License as published by */
-/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
-/* OBSOLETE (at your option) any later version. */
-/* OBSOLETE */
-/* OBSOLETE This program is distributed in the hope that it will be useful, */
-/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* OBSOLETE GNU General Public License for more details. */
-/* OBSOLETE */
-/* OBSOLETE You should have received a copy of the GNU General Public License */
-/* OBSOLETE along with this program; if not, write to the Free Software */
-/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
-/* OBSOLETE Boston, MA 02111-1307, USA. */ */
-/* OBSOLETE */
-/* OBSOLETE /* This is like remote.c but ecpects MiniMON to be running on the Am29000 */
-/* OBSOLETE target hardware. */
-/* OBSOLETE - David Wood (wood@lab.ultra.nyu.edu) at New York University adapted this */
-/* OBSOLETE file to gdb 3.95. I was unable to get this working on sun3os4 */
-/* OBSOLETE with termio, only with sgtty. Because we are only attempting to */
-/* OBSOLETE use this module to debug our kernel, which is already loaded when */
-/* OBSOLETE gdb is started up, I did not code up the file downloading facilities. */
-/* OBSOLETE As a result this module has only the stubs to download files. */
-/* OBSOLETE You should get tagged at compile time if you need to make any */
-/* OBSOLETE changes/additions. */ */
-/* OBSOLETE */
-/* OBSOLETE #include "defs.h" */
-/* OBSOLETE #include "inferior.h" */
-/* OBSOLETE #include "value.h" */
-/* OBSOLETE #include <ctype.h> */
-/* OBSOLETE #include <fcntl.h> */
-/* OBSOLETE #include <signal.h> */
-/* OBSOLETE #include <errno.h> */
-/* OBSOLETE #include "gdb_string.h" */
-/* OBSOLETE #include "terminal.h" */
-/* OBSOLETE #include "minimon.h" */
-/* OBSOLETE #include "target.h" */
-/* OBSOLETE #include "regcache.h" */
-/* OBSOLETE */
-/* OBSOLETE /* Offset of member MEMBER in a struct of type TYPE. */ */
-/* OBSOLETE #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER) */
-/* OBSOLETE */
-/* OBSOLETE #define DRAIN_INPUT() (msg_recv_serial((union msg_t*)0)) */
-/* OBSOLETE */
-/* OBSOLETE extern int stop_soon_quietly; /* for wait_for_inferior */ */
-/* OBSOLETE */
-/* OBSOLETE static void mm_resume (ptid_t ptid, int step, enum target_signal sig) */
-/* OBSOLETE static void mm_fetch_registers (); */
-/* OBSOLETE static int fetch_register (); */
-/* OBSOLETE static void mm_store_registers (); */
-/* OBSOLETE static int store_register (); */
-/* OBSOLETE static int regnum_to_srnum (); */
-/* OBSOLETE static void mm_close (); */
-/* OBSOLETE static char *msg_str (); */
-/* OBSOLETE static char *error_msg_str (); */
-/* OBSOLETE static int expect_msg (); */
-/* OBSOLETE static void init_target_mm (); */
-/* OBSOLETE static int mm_memory_space (); */
-/* OBSOLETE */
-/* OBSOLETE #define FREEZE_MODE (read_register(CPS_REGNUM) && 0x400) */
-/* OBSOLETE #define USE_SHADOW_PC ((processor_type == a29k_freeze_mode) && FREEZE_MODE) */
-/* OBSOLETE */
-/* OBSOLETE /* FIXME: Replace with `set remotedebug'. */ */
-/* OBSOLETE #define LLOG_FILE "minimon.log" */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE FILE *log_file; */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /* */
-/* OBSOLETE * Size of message buffers. I couldn't get memory reads to work when */
-/* OBSOLETE * the byte_count was larger than 512 (it may be a baud rate problem). */
-/* OBSOLETE */ */
-/* OBSOLETE #define BUFER_SIZE 512 */
-/* OBSOLETE /* */
-/* OBSOLETE * Size of data area in message buffer on the TARGET (remote system). */
-/* OBSOLETE */ */
-/* OBSOLETE #define MAXDATA_T (target_config.max_msg_size - \ */
-/* OBSOLETE offsetof(struct write_r_msg_t,data[0])) */
-/* OBSOLETE /* */
-/* OBSOLETE * Size of data area in message buffer on the HOST (gdb). */
-/* OBSOLETE */ */
-/* OBSOLETE #define MAXDATA_H (BUFER_SIZE - offsetof(struct write_r_msg_t,data[0])) */
-/* OBSOLETE /* */
-/* OBSOLETE * Defined as the minimum size of data areas of the two message buffers */
-/* OBSOLETE */ */
-/* OBSOLETE #define MAXDATA (MAXDATA_H < MAXDATA_T ? MAXDATA_H : MAXDATA_T) */
-/* OBSOLETE */
-/* OBSOLETE static char out_buf[BUFER_SIZE]; */
-/* OBSOLETE static char in_buf[BUFER_SIZE]; */
-/* OBSOLETE */
-/* OBSOLETE int msg_recv_serial (); */
-/* OBSOLETE int msg_send_serial (); */
-/* OBSOLETE */
-/* OBSOLETE #define MAX_RETRIES 5000 */
-/* OBSOLETE extern struct target_ops mm_ops; /* Forward declaration */ */
-/* OBSOLETE struct config_msg_t target_config; /* HIF needs this */ */
-/* OBSOLETE union msg_t *out_msg_buf = (union msg_t *) out_buf; */
-/* OBSOLETE union msg_t *in_msg_buf = (union msg_t *) in_buf; */
-/* OBSOLETE */
-/* OBSOLETE static int timeout = 5; */
-/* OBSOLETE */
-/* OBSOLETE /* Descriptor for I/O to remote machine. Initialize it to -1 so that */
-/* OBSOLETE mm_open knows that we don't have a file open when the program */
-/* OBSOLETE starts. */ */
-/* OBSOLETE int mm_desc = -1; */
-/* OBSOLETE */
-/* OBSOLETE /* stream which is fdopen'd from mm_desc. Only valid when */
-/* OBSOLETE mm_desc != -1. */ */
-/* OBSOLETE FILE *mm_stream; */
-/* OBSOLETE */
-/* OBSOLETE /* Called when SIGALRM signal sent due to alarm() timeout. */ */
-/* OBSOLETE #ifndef HAVE_TERMIO */
-/* OBSOLETE */
-/* OBSOLETE volatile int n_alarms; */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE mm_timer (void) */
-/* OBSOLETE { */
-/* OBSOLETE #if 0 */
-/* OBSOLETE if (kiodebug) */
-/* OBSOLETE printf ("mm_timer called\n"); */
-/* OBSOLETE #endif */
-/* OBSOLETE n_alarms++; */
-/* OBSOLETE } */
-/* OBSOLETE #endif /* HAVE_TERMIO */ */
-/* OBSOLETE */
-/* OBSOLETE /* malloc'd name of the program on the remote system. */ */
-/* OBSOLETE static char *prog_name = NULL; */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /* Number of SIGTRAPs we need to simulate. That is, the next */
-/* OBSOLETE NEED_ARTIFICIAL_TRAP calls to mm_wait should just return */
-/* OBSOLETE SIGTRAP without actually waiting for anything. */ */
-/* OBSOLETE */
-/* OBSOLETE /**************************************************** REMOTE_CREATE_INFERIOR */ */
-/* OBSOLETE /* This is called not only when we first attach, but also when the */
-/* OBSOLETE user types "run" after having attached. */ */
-/* OBSOLETE static void */
-/* OBSOLETE mm_create_inferior (char *execfile, char *args, char **env) */
-/* OBSOLETE { */
-/* OBSOLETE #define MAX_TOKENS 25 */
-/* OBSOLETE #define BUFFER_SIZE 256 */
-/* OBSOLETE int token_count; */
-/* OBSOLETE int result; */
-/* OBSOLETE char *token[MAX_TOKENS]; */
-/* OBSOLETE char cmd_line[BUFFER_SIZE]; */
-/* OBSOLETE */
-/* OBSOLETE if (args && *args) */
-/* OBSOLETE error ("Can't pass arguments to remote mm process (yet)."); */
-/* OBSOLETE */
-/* OBSOLETE if (execfile == 0 /* || exec_bfd == 0 */ ) */
-/* OBSOLETE error ("No executable file specified"); */
-/* OBSOLETE */
-/* OBSOLETE if (!mm_stream) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Minimon not open yet.\n"); */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* On ultra3 (NYU) we assume the kernel is already running so there is */
-/* OBSOLETE no file to download. */
-/* OBSOLETE FIXME: Fixed required here -> load your program, possibly with mm_load(). */
-/* OBSOLETE */ */
-/* OBSOLETE printf_filtered ("\n\ */
-/* OBSOLETE Assuming you are at NYU debuging a kernel, i.e., no need to download.\n\n"); */
-/* OBSOLETE */
-/* OBSOLETE /* We will get a task spawn event immediately. */ */
-/* OBSOLETE init_wait_for_inferior (); */
-/* OBSOLETE clear_proceed_status (); */
-/* OBSOLETE stop_soon_quietly = 1; */
-/* OBSOLETE proceed (-1, TARGET_SIGNAL_DEFAULT, 0); */
-/* OBSOLETE normal_stop (); */
-/* OBSOLETE } */
-/* OBSOLETE /**************************************************** REMOTE_MOURN_INFERIOR */ */
-/* OBSOLETE static void */
-/* OBSOLETE mm_mourn (void) */
-/* OBSOLETE { */
-/* OBSOLETE pop_target (); /* Pop back to no-child state */ */
-/* OBSOLETE generic_mourn_inferior (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /********************************************************************** damn_b */
-/* OBSOLETE */ */
-/* OBSOLETE /* Translate baud rates from integers to damn B_codes. Unix should */
-/* OBSOLETE have outgrown this crap years ago, but even POSIX wouldn't buck it. */ */
-/* OBSOLETE */
-/* OBSOLETE #ifndef B19200 */
-/* OBSOLETE #define B19200 EXTA */
-/* OBSOLETE #endif */
-/* OBSOLETE #ifndef B38400 */
-/* OBSOLETE #define B38400 EXTB */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE static struct */
-/* OBSOLETE { */
-/* OBSOLETE int rate, damn_b; */
-/* OBSOLETE } */
-/* OBSOLETE baudtab[] = */
-/* OBSOLETE { */
-/* OBSOLETE { */
-/* OBSOLETE 0, B0 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 50, B50 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 75, B75 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 110, B110 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 134, B134 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 150, B150 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 200, B200 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 300, B300 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 600, B600 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 1200, B1200 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 1800, B1800 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 2400, B2400 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 4800, B4800 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 9600, B9600 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 19200, B19200 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE 38400, B38400 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE { */
-/* OBSOLETE -1, -1 */
-/* OBSOLETE } */
-/* OBSOLETE , */
-/* OBSOLETE }; */
-/* OBSOLETE */
-/* OBSOLETE static int */
-/* OBSOLETE damn_b (int rate) */
-/* OBSOLETE { */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; baudtab[i].rate != -1; i++) */
-/* OBSOLETE if (rate == baudtab[i].rate) */
-/* OBSOLETE return baudtab[i].damn_b; */
-/* OBSOLETE return B38400; /* Random */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /***************************************************************** REMOTE_OPEN */
-/* OBSOLETE ** Open a connection to remote minimon. */
-/* OBSOLETE NAME is the filename used for communication, then a space, */
-/* OBSOLETE then the baud rate. */
-/* OBSOLETE 'target adapt /dev/ttya 9600 [prognam]' for example. */
-/* OBSOLETE */ */
-/* OBSOLETE */
-/* OBSOLETE static char *dev_name; */
-/* OBSOLETE int baudrate = 9600; */
-/* OBSOLETE static void */
-/* OBSOLETE mm_open (char *name, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE TERMINAL sg; */
-/* OBSOLETE unsigned int prl; */
-/* OBSOLETE char *p; */
-/* OBSOLETE */
-/* OBSOLETE /* Find the first whitespace character, it separates dev_name from */
-/* OBSOLETE prog_name. */ */
-/* OBSOLETE for (p = name; */
-/* OBSOLETE p && *p && !isspace (*p); p++) */
-/* OBSOLETE ; */
-/* OBSOLETE if (p == 0 || *p == '\0') */
-/* OBSOLETE erroid: */
-/* OBSOLETE error ("Usage : <command> <serial-device> <baud-rate> [progname]"); */
-/* OBSOLETE dev_name = (char *) xmalloc (p - name + 1); */
-/* OBSOLETE strncpy (dev_name, name, p - name); */
-/* OBSOLETE dev_name[p - name] = '\0'; */
-/* OBSOLETE */
-/* OBSOLETE /* Skip over the whitespace after dev_name */ */
-/* OBSOLETE for (; isspace (*p); p++) */
-/* OBSOLETE /*EMPTY */ ; */
-/* OBSOLETE */
-/* OBSOLETE if (1 != sscanf (p, "%d ", &baudrate)) */
-/* OBSOLETE goto erroid; */
-/* OBSOLETE */
-/* OBSOLETE /* Skip the number and then the spaces */ */
-/* OBSOLETE for (; isdigit (*p); p++) */
-/* OBSOLETE /*EMPTY */ ; */
-/* OBSOLETE for (; isspace (*p); p++) */
-/* OBSOLETE /*EMPTY */ ; */
-/* OBSOLETE */
-/* OBSOLETE if (prog_name != NULL) */
-/* OBSOLETE xfree (prog_name); */
-/* OBSOLETE prog_name = savestring (p, strlen (p)); */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE if (mm_desc >= 0) */
-/* OBSOLETE close (mm_desc); */
-/* OBSOLETE */
-/* OBSOLETE mm_desc = open (dev_name, O_RDWR); */
-/* OBSOLETE if (mm_desc < 0) */
-/* OBSOLETE perror_with_name (dev_name); */
-/* OBSOLETE ioctl (mm_desc, TIOCGETP, &sg); */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE sg.c_cc[VMIN] = 0; /* read with timeout. */ */
-/* OBSOLETE sg.c_cc[VTIME] = timeout * 10; */
-/* OBSOLETE sg.c_lflag &= ~(ICANON | ECHO); */
-/* OBSOLETE sg.c_cflag = (sg.c_cflag & ~CBAUD) | damn_b (baudrate); */
-/* OBSOLETE #else */
-/* OBSOLETE sg.sg_ispeed = damn_b (baudrate); */
-/* OBSOLETE sg.sg_ospeed = damn_b (baudrate); */
-/* OBSOLETE sg.sg_flags |= RAW; */
-/* OBSOLETE sg.sg_flags |= ANYP; */
-/* OBSOLETE sg.sg_flags &= ~ECHO; */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE ioctl (mm_desc, TIOCSETP, &sg); */
-/* OBSOLETE mm_stream = fdopen (mm_desc, "r+"); */
-/* OBSOLETE */
-/* OBSOLETE push_target (&mm_ops); */
-/* OBSOLETE */
-/* OBSOLETE #ifndef HAVE_TERMIO */
-/* OBSOLETE #ifndef NO_SIGINTERRUPT */
-/* OBSOLETE /* Cause SIGALRM's to make reads fail with EINTR instead of resuming */
-/* OBSOLETE the read. */ */
-/* OBSOLETE if (siginterrupt (SIGALRM, 1) != 0) */
-/* OBSOLETE perror ("mm_open: error in siginterrupt"); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /* Set up read timeout timer. */ */
-/* OBSOLETE if ((void (*)) signal (SIGALRM, mm_timer) == (void (*)) -1) */
-/* OBSOLETE perror ("mm_open: error in signal"); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE log_file = fopen (LOG_FILE, "w"); */
-/* OBSOLETE if (log_file == NULL) */
-/* OBSOLETE perror_with_name (LOG_FILE); */
-/* OBSOLETE #endif */
-/* OBSOLETE /* */
-/* OBSOLETE ** Initialize target configuration structure (global) */
-/* OBSOLETE */ */
-/* OBSOLETE DRAIN_INPUT (); */
-/* OBSOLETE out_msg_buf->config_req_msg.code = CONFIG_REQ; */
-/* OBSOLETE out_msg_buf->config_req_msg.length = 4 * 0; */
-/* OBSOLETE msg_send_serial (out_msg_buf); /* send config request message */ */
-/* OBSOLETE */
-/* OBSOLETE expect_msg (CONFIG, in_msg_buf, 1); */
-/* OBSOLETE */
-/* OBSOLETE a29k_get_processor_type (); */
-/* OBSOLETE */
-/* OBSOLETE /* Print out some stuff, letting the user now what's going on */ */
-/* OBSOLETE printf_filtered ("Connected to MiniMon via %s.\n", dev_name); */
-/* OBSOLETE /* FIXME: can this restriction be removed? */ */
-/* OBSOLETE printf_filtered ("Remote debugging using virtual addresses works only\n"); */
-/* OBSOLETE printf_filtered ("\twhen virtual addresses map 1:1 to physical addresses.\n") */
-/* OBSOLETE ; */
-/* OBSOLETE if (processor_type != a29k_freeze_mode) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf_filtered (gdb_stderr, */
-/* OBSOLETE "Freeze-mode debugging not available, and can only be done on an A29050.\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE target_config.code = CONFIG; */
-/* OBSOLETE target_config.length = 0; */
-/* OBSOLETE target_config.processor_id = in_msg_buf->config_msg.processor_id; */
-/* OBSOLETE target_config.version = in_msg_buf->config_msg.version; */
-/* OBSOLETE target_config.I_mem_start = in_msg_buf->config_msg.I_mem_start; */
-/* OBSOLETE target_config.I_mem_size = in_msg_buf->config_msg.I_mem_size; */
-/* OBSOLETE target_config.D_mem_start = in_msg_buf->config_msg.D_mem_start; */
-/* OBSOLETE target_config.D_mem_size = in_msg_buf->config_msg.D_mem_size; */
-/* OBSOLETE target_config.ROM_start = in_msg_buf->config_msg.ROM_start; */
-/* OBSOLETE target_config.ROM_size = in_msg_buf->config_msg.ROM_size; */
-/* OBSOLETE target_config.max_msg_size = in_msg_buf->config_msg.max_msg_size; */
-/* OBSOLETE target_config.max_bkpts = in_msg_buf->config_msg.max_bkpts; */
-/* OBSOLETE target_config.coprocessor = in_msg_buf->config_msg.coprocessor; */
-/* OBSOLETE target_config.reserved = in_msg_buf->config_msg.reserved; */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Connected to MiniMON :\n"); */
-/* OBSOLETE printf (" Debugcore version %d.%d\n", */
-/* OBSOLETE 0x0f & (target_config.version >> 4), */
-/* OBSOLETE 0x0f & (target_config.version)); */
-/* OBSOLETE printf (" Configuration version %d.%d\n", */
-/* OBSOLETE 0x0f & (target_config.version >> 12), */
-/* OBSOLETE 0x0f & (target_config.version >> 8)); */
-/* OBSOLETE printf (" Message system version %d.%d\n", */
-/* OBSOLETE 0x0f & (target_config.version >> 20), */
-/* OBSOLETE 0x0f & (target_config.version >> 16)); */
-/* OBSOLETE printf (" Communication driver version %d.%d\n", */
-/* OBSOLETE 0x0f & (target_config.version >> 28), */
-/* OBSOLETE 0x0f & (target_config.version >> 24)); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Leave the target running... */
-/* OBSOLETE * The above message stopped the target in the dbg core (MiniMon), */
-/* OBSOLETE * so restart the target out of MiniMon, */
-/* OBSOLETE */ */
-/* OBSOLETE out_msg_buf->go_msg.code = GO; */
-/* OBSOLETE out_msg_buf->go_msg.length = 0; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE /* No message to expect after a GO */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /**************************************************************** REMOTE_CLOSE */
-/* OBSOLETE ** Close the open connection to the minimon debugger. */
-/* OBSOLETE Use this when you want to detach and do something else */
-/* OBSOLETE with your gdb. */ */
-/* OBSOLETE static void */
-/* OBSOLETE mm_close ( /*FIXME: how is quitting used */ */
-/* OBSOLETE int quitting) */
-/* OBSOLETE { */
-/* OBSOLETE if (mm_desc < 0) */
-/* OBSOLETE error ("Can't close remote connection: not debugging remotely."); */
-/* OBSOLETE */
-/* OBSOLETE /* We should never get here if there isn't something valid in */
-/* OBSOLETE mm_desc and mm_stream. */
-/* OBSOLETE */
-/* OBSOLETE Due to a bug in Unix, fclose closes not only the stdio stream, */
-/* OBSOLETE but also the file descriptor. So we don't actually close */
-/* OBSOLETE mm_desc. */ */
-/* OBSOLETE DRAIN_INPUT (); */
-/* OBSOLETE fclose (mm_stream); */
-/* OBSOLETE /* close (mm_desc); */ */
-/* OBSOLETE */
-/* OBSOLETE /* Do not try to close mm_desc again, later in the program. */ */
-/* OBSOLETE mm_stream = NULL; */
-/* OBSOLETE mm_desc = -1; */
-/* OBSOLETE */
-/* OBSOLETE #if defined (LOG_FILE) */
-/* OBSOLETE if (ferror (log_file)) */
-/* OBSOLETE printf ("Error writing log file.\n"); */
-/* OBSOLETE if (fclose (log_file) != 0) */
-/* OBSOLETE printf ("Error closing log file.\n"); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE printf ("Ending remote debugging\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /************************************************************* REMOTE_ATACH */ */
-/* OBSOLETE /* Attach to a program that is already loaded and running */
-/* OBSOLETE * Upon exiting the process's execution is stopped. */
-/* OBSOLETE */ */
-/* OBSOLETE static void */
-/* OBSOLETE mm_attach (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE */
-/* OBSOLETE if (!mm_stream) */
-/* OBSOLETE error ("MiniMon not opened yet, use the 'target minimon' command.\n"); */
-/* OBSOLETE */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE printf ("Attaching to remote program %s...\n", prog_name); */
-/* OBSOLETE */
-/* OBSOLETE /* Make sure the target is currently running, it is supposed to be. */ */
-/* OBSOLETE /* FIXME: is it ok to send MiniMon a BREAK if it is already stopped in */
-/* OBSOLETE * the dbg core. If so, we don't need to send this GO. */
-/* OBSOLETE */ */
-/* OBSOLETE out_msg_buf->go_msg.code = GO; */
-/* OBSOLETE out_msg_buf->go_msg.length = 0; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE sleep (2); /* At the worst it will stop, receive a message, continue */ */
-/* OBSOLETE */
-/* OBSOLETE /* Send the mm a break. */ */
-/* OBSOLETE out_msg_buf->break_msg.code = BREAK; */
-/* OBSOLETE out_msg_buf->break_msg.length = 0; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE } */
-/* OBSOLETE /********************************************************** REMOTE_DETACH */ */
-/* OBSOLETE /* Terminate the open connection to the remote debugger. */
-/* OBSOLETE Use this when you want to detach and do something else */
-/* OBSOLETE with your gdb. Leave remote process running (with no breakpoints set). */ */
-/* OBSOLETE static void */
-/* OBSOLETE mm_detach (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE remove_breakpoints (); /* Just in case there were any left in */ */
-/* OBSOLETE out_msg_buf->go_msg.code = GO; */
-/* OBSOLETE out_msg_buf->go_msg.length = 0; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE pop_target (); /* calls mm_close to do the real work */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /*************************************************************** REMOTE_RESUME */
-/* OBSOLETE ** Tell the remote machine to resume. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE mm_resume (ptid_t ptid, int step, enum target_signal sig) */
-/* OBSOLETE { */
-/* OBSOLETE if (sig != TARGET_SIGNAL_0) */
-/* OBSOLETE warning ("Can't send signals to a remote MiniMon system."); */
-/* OBSOLETE */
-/* OBSOLETE if (step) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->step_msg.code = STEP; */
-/* OBSOLETE out_msg_buf->step_msg.length = 1 * 4; */
-/* OBSOLETE out_msg_buf->step_msg.count = 1; /* step 1 instruction */ */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->go_msg.code = GO; */
-/* OBSOLETE out_msg_buf->go_msg.length = 0; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /***************************************************************** REMOTE_WAIT */
-/* OBSOLETE ** Wait until the remote machine stops, then return, */
-/* OBSOLETE storing status in STATUS just as `wait' would. */ */
-/* OBSOLETE */
-/* OBSOLETE static ptid_t */
-/* OBSOLETE mm_wait (ptid_t ptid, struct target_waitstatus *status) */
-/* OBSOLETE { */
-/* OBSOLETE int i, result; */
-/* OBSOLETE int old_timeout = timeout; */
-/* OBSOLETE int old_immediate_quit = immediate_quit; */
-/* OBSOLETE */
-/* OBSOLETE status->kind = TARGET_WAITKIND_EXITED; */
-/* OBSOLETE status->value.integer = 0; */
-/* OBSOLETE */
-/* OBSOLETE /* wait for message to arrive. It should be: */
-/* OBSOLETE - A HIF service request. */
-/* OBSOLETE - A HIF exit service request. */
-/* OBSOLETE - A CHANNEL0_ACK. */
-/* OBSOLETE - A CHANNEL1 request. */
-/* OBSOLETE - a debugcore HALT message. */
-/* OBSOLETE HIF services must be responded too, and while-looping continued. */
-/* OBSOLETE If the target stops executing, mm_wait() should return. */
-/* OBSOLETE */ */
-/* OBSOLETE timeout = 0; /* Wait indefinetly for a message */ */
-/* OBSOLETE immediate_quit = 1; /* Helps ability to QUIT */ */
-/* OBSOLETE while (1) */
-/* OBSOLETE { */
-/* OBSOLETE while (msg_recv_serial (in_msg_buf)) */
-/* OBSOLETE { */
-/* OBSOLETE QUIT; /* Let user quit if they want */ */
-/* OBSOLETE } */
-/* OBSOLETE switch (in_msg_buf->halt_msg.code) */
-/* OBSOLETE { */
-/* OBSOLETE case HIF_CALL: */
-/* OBSOLETE i = in_msg_buf->hif_call_rtn_msg.service_number; */
-/* OBSOLETE result = service_HIF (in_msg_buf); */
-/* OBSOLETE if (i == 1) /* EXIT */ */
-/* OBSOLETE goto exit; */
-/* OBSOLETE if (result) */
-/* OBSOLETE printf ("Warning: failure during HIF service %d\n", i); */
-/* OBSOLETE break; */
-/* OBSOLETE case CHANNEL0_ACK: */
-/* OBSOLETE service_HIF (in_msg_buf); */
-/* OBSOLETE break; */
-/* OBSOLETE case CHANNEL1: */
-/* OBSOLETE i = in_msg_buf->channel1_msg.length; */
-/* OBSOLETE in_msg_buf->channel1_msg.data[i] = '\0'; */
-/* OBSOLETE printf ("%s", in_msg_buf->channel1_msg.data); */
-/* OBSOLETE gdb_flush (gdb_stdout); */
-/* OBSOLETE /* Send CHANNEL1_ACK message */ */
-/* OBSOLETE out_msg_buf->channel1_ack_msg.code = CHANNEL1_ACK; */
-/* OBSOLETE out_msg_buf->channel1_ack_msg.length = 0; */
-/* OBSOLETE result = msg_send_serial (out_msg_buf); */
-/* OBSOLETE break; */
-/* OBSOLETE case HALT: */
-/* OBSOLETE goto halted; */
-/* OBSOLETE default: */
-/* OBSOLETE goto halted; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE halted: */
-/* OBSOLETE /* FIXME, these printfs should not be here. This is a source level */
-/* OBSOLETE debugger, guys! */ */
-/* OBSOLETE if (in_msg_buf->halt_msg.trap_number == 0) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Am290*0 received vector number %d (break point)\n", */
-/* OBSOLETE in_msg_buf->halt_msg.trap_number); */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; */
-/* OBSOLETE } */
-/* OBSOLETE else if (in_msg_buf->halt_msg.trap_number == 1) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Am290*0 received vector number %d\n", */
-/* OBSOLETE in_msg_buf->halt_msg.trap_number); */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_BUS; */
-/* OBSOLETE } */
-/* OBSOLETE else if (in_msg_buf->halt_msg.trap_number == 3 */
-/* OBSOLETE || in_msg_buf->halt_msg.trap_number == 4) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Am290*0 received vector number %d\n", */
-/* OBSOLETE in_msg_buf->halt_msg.trap_number); */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_FPE; */
-/* OBSOLETE } */
-/* OBSOLETE else if (in_msg_buf->halt_msg.trap_number == 5) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Am290*0 received vector number %d\n", */
-/* OBSOLETE in_msg_buf->halt_msg.trap_number); */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_ILL; */
-/* OBSOLETE } */
-/* OBSOLETE else if (in_msg_buf->halt_msg.trap_number >= 6 */
-/* OBSOLETE && in_msg_buf->halt_msg.trap_number <= 11) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Am290*0 received vector number %d\n", */
-/* OBSOLETE in_msg_buf->halt_msg.trap_number); */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_SEGV; */
-/* OBSOLETE } */
-/* OBSOLETE else if (in_msg_buf->halt_msg.trap_number == 12 */
-/* OBSOLETE || in_msg_buf->halt_msg.trap_number == 13) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Am290*0 received vector number %d\n", */
-/* OBSOLETE in_msg_buf->halt_msg.trap_number); */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_ILL; */
-/* OBSOLETE } */
-/* OBSOLETE else if (in_msg_buf->halt_msg.trap_number == 14) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Am290*0 received vector number %d\n", */
-/* OBSOLETE in_msg_buf->halt_msg.trap_number); */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_ALRM; */
-/* OBSOLETE } */
-/* OBSOLETE else if (in_msg_buf->halt_msg.trap_number == 15) */
-/* OBSOLETE { */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; */
-/* OBSOLETE } */
-/* OBSOLETE else if (in_msg_buf->halt_msg.trap_number >= 16 */
-/* OBSOLETE && in_msg_buf->halt_msg.trap_number <= 21) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Am290*0 received vector number %d\n", */
-/* OBSOLETE in_msg_buf->halt_msg.trap_number); */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_INT; */
-/* OBSOLETE } */
-/* OBSOLETE else if (in_msg_buf->halt_msg.trap_number == 22) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Am290*0 received vector number %d\n", */
-/* OBSOLETE in_msg_buf->halt_msg.trap_number); */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_ILL; */
-/* OBSOLETE } /* BREAK message was sent */ */
-/* OBSOLETE else if (in_msg_buf->halt_msg.trap_number == 75) */
-/* OBSOLETE { */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE exit: */
-/* OBSOLETE { */
-/* OBSOLETE status->kind = TARGET_WAITKIND_EXITED; */
-/* OBSOLETE status->value.integer = 0; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE timeout = old_timeout; /* Restore original timeout value */ */
-/* OBSOLETE immediate_quit = old_immediate_quit; */
-/* OBSOLETE return inferior_ptid; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /******************************************************* REMOTE_FETCH_REGISTERS */
-/* OBSOLETE * Read a remote register 'regno'. */
-/* OBSOLETE * If regno==-1 then read all the registers. */
-/* OBSOLETE */ */
-/* OBSOLETE static void */
-/* OBSOLETE mm_fetch_registers (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE INT32 *data_p; */
-/* OBSOLETE */
-/* OBSOLETE if (regno >= 0) */
-/* OBSOLETE { */
-/* OBSOLETE fetch_register (regno); */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Gr1/rsp */ */
-/* OBSOLETE out_msg_buf->read_req_msg.byte_count = 4 * 1; */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = GLOBAL_REG; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = 1; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE expect_msg (READ_ACK, in_msg_buf, 1); */
-/* OBSOLETE data_p = &(in_msg_buf->read_r_ack_msg.data[0]); */
-/* OBSOLETE supply_register (GR1_REGNUM, data_p); */
-/* OBSOLETE */
-/* OBSOLETE #if defined(GR64_REGNUM) /* Read gr64-127 */ */
-/* OBSOLETE /* Global Registers gr64-gr95 */ */
-/* OBSOLETE out_msg_buf->read_req_msg.code = READ_REQ; */
-/* OBSOLETE out_msg_buf->read_req_msg.length = 4 * 3; */
-/* OBSOLETE out_msg_buf->read_req_msg.byte_count = 4 * 32; */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = GLOBAL_REG; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = 64; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE expect_msg (READ_ACK, in_msg_buf, 1); */
-/* OBSOLETE data_p = &(in_msg_buf->read_r_ack_msg.data[0]); */
-/* OBSOLETE */
-/* OBSOLETE for (regno = GR64_REGNUM; regno < GR64_REGNUM + 32; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE supply_register (regno, data_p++); */
-/* OBSOLETE } */
-/* OBSOLETE #endif /* GR64_REGNUM */ */
-/* OBSOLETE */
-/* OBSOLETE /* Global Registers gr96-gr127 */ */
-/* OBSOLETE out_msg_buf->read_req_msg.code = READ_REQ; */
-/* OBSOLETE out_msg_buf->read_req_msg.length = 4 * 3; */
-/* OBSOLETE out_msg_buf->read_req_msg.byte_count = 4 * 32; */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = GLOBAL_REG; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = 96; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE expect_msg (READ_ACK, in_msg_buf, 1); */
-/* OBSOLETE data_p = &(in_msg_buf->read_r_ack_msg.data[0]); */
-/* OBSOLETE */
-/* OBSOLETE for (regno = GR96_REGNUM; regno < GR96_REGNUM + 32; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE supply_register (regno, data_p++); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Local Registers */ */
-/* OBSOLETE out_msg_buf->read_req_msg.byte_count = 4 * (128); */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = LOCAL_REG; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = 0; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE expect_msg (READ_ACK, in_msg_buf, 1); */
-/* OBSOLETE data_p = &(in_msg_buf->read_r_ack_msg.data[0]); */
-/* OBSOLETE */
-/* OBSOLETE for (regno = LR0_REGNUM; regno < LR0_REGNUM + 128; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE supply_register (regno, data_p++); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Protected Special Registers */ */
-/* OBSOLETE out_msg_buf->read_req_msg.byte_count = 4 * 15; */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = SPECIAL_REG; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = 0; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE expect_msg (READ_ACK, in_msg_buf, 1); */
-/* OBSOLETE data_p = &(in_msg_buf->read_r_ack_msg.data[0]); */
-/* OBSOLETE */
-/* OBSOLETE for (regno = 0; regno <= 14; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE supply_register (SR_REGNUM (regno), data_p++); */
-/* OBSOLETE } */
-/* OBSOLETE if (USE_SHADOW_PC) */
-/* OBSOLETE { /* Let regno_to_srnum() handle the register number */ */
-/* OBSOLETE fetch_register (NPC_REGNUM); */
-/* OBSOLETE fetch_register (PC_REGNUM); */
-/* OBSOLETE fetch_register (PC2_REGNUM); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Unprotected Special Registers */ */
-/* OBSOLETE out_msg_buf->read_req_msg.byte_count = 4 * 8; */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = SPECIAL_REG; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = 128; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE expect_msg (READ_ACK, in_msg_buf, 1); */
-/* OBSOLETE data_p = &(in_msg_buf->read_r_ack_msg.data[0]); */
-/* OBSOLETE */
-/* OBSOLETE for (regno = 128; regno <= 135; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE supply_register (SR_REGNUM (regno), data_p++); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* There doesn't seem to be any way to get these. */ */
-/* OBSOLETE { */
-/* OBSOLETE int val = -1; */
-/* OBSOLETE supply_register (FPE_REGNUM, &val); */
-/* OBSOLETE supply_register (INTE_REGNUM, &val); */
-/* OBSOLETE supply_register (FPS_REGNUM, &val); */
-/* OBSOLETE supply_register (EXO_REGNUM, &val); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /****************************************************** REMOTE_STORE_REGISTERS */
-/* OBSOLETE * Store register regno into the target. */
-/* OBSOLETE * If regno==-1 then store all the registers. */
-/* OBSOLETE * Result is 0 for success, -1 for failure. */
-/* OBSOLETE */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE mm_store_registers (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE int result; */
-/* OBSOLETE */
-/* OBSOLETE if (regno >= 0) */
-/* OBSOLETE { */
-/* OBSOLETE store_register (regno); */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE result = 0; */
-/* OBSOLETE */
-/* OBSOLETE out_msg_buf->write_r_msg.code = WRITE_REQ; */
-/* OBSOLETE */
-/* OBSOLETE /* Gr1/rsp */ */
-/* OBSOLETE out_msg_buf->write_r_msg.byte_count = 4 * 1; */
-/* OBSOLETE out_msg_buf->write_r_msg.length = 3 * 4 + out_msg_buf->write_r_msg.byte_count; */
-/* OBSOLETE out_msg_buf->write_r_msg.memory_space = GLOBAL_REG; */
-/* OBSOLETE out_msg_buf->write_r_msg.address = 1; */
-/* OBSOLETE out_msg_buf->write_r_msg.data[0] = read_register (GR1_REGNUM); */
-/* OBSOLETE */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE if (!expect_msg (WRITE_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE result = -1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE #if defined(GR64_REGNUM) */
-/* OBSOLETE /* Global registers gr64-gr95 */ */
-/* OBSOLETE out_msg_buf->write_r_msg.byte_count = 4 * (32); */
-/* OBSOLETE out_msg_buf->write_r_msg.length = 3 * 4 + out_msg_buf->write_r_msg.byte_count; */
-/* OBSOLETE out_msg_buf->write_r_msg.address = 64; */
-/* OBSOLETE */
-/* OBSOLETE for (regno = GR64_REGNUM; regno < GR64_REGNUM + 32; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->write_r_msg.data[regno - GR64_REGNUM] = read_register (regno); */
-/* OBSOLETE } */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE if (!expect_msg (WRITE_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE result = -1; */
-/* OBSOLETE } */
-/* OBSOLETE #endif /* GR64_REGNUM */ */
-/* OBSOLETE */
-/* OBSOLETE /* Global registers gr96-gr127 */ */
-/* OBSOLETE out_msg_buf->write_r_msg.byte_count = 4 * (32); */
-/* OBSOLETE out_msg_buf->write_r_msg.length = 3 * 4 + out_msg_buf->write_r_msg.byte_count; */
-/* OBSOLETE out_msg_buf->write_r_msg.address = 96; */
-/* OBSOLETE for (regno = GR96_REGNUM; regno < GR96_REGNUM + 32; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->write_r_msg.data[regno - GR96_REGNUM] = read_register (regno); */
-/* OBSOLETE } */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE if (!expect_msg (WRITE_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE result = -1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Local Registers */ */
-/* OBSOLETE out_msg_buf->write_r_msg.memory_space = LOCAL_REG; */
-/* OBSOLETE out_msg_buf->write_r_msg.byte_count = 4 * 128; */
-/* OBSOLETE out_msg_buf->write_r_msg.length = 3 * 4 + out_msg_buf->write_r_msg.byte_count; */
-/* OBSOLETE out_msg_buf->write_r_msg.address = 0; */
-/* OBSOLETE */
-/* OBSOLETE for (regno = LR0_REGNUM; regno < LR0_REGNUM + 128; regno++) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->write_r_msg.data[regno - LR0_REGNUM] = read_register (regno); */
-/* OBSOLETE } */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE if (!expect_msg (WRITE_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE result = -1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Protected Special Registers */ */
-/* OBSOLETE /* VAB through TMR */ */
-/* OBSOLETE out_msg_buf->write_r_msg.memory_space = SPECIAL_REG; */
-/* OBSOLETE out_msg_buf->write_r_msg.byte_count = 4 * 10; */
-/* OBSOLETE out_msg_buf->write_r_msg.length = 3 * 4 + out_msg_buf->write_r_msg.byte_count; */
-/* OBSOLETE out_msg_buf->write_r_msg.address = 0; */
-/* OBSOLETE for (regno = 0; regno <= 9; regno++) /* VAB through TMR */ */
-/* OBSOLETE out_msg_buf->write_r_msg.data[regno] = read_register (SR_REGNUM (regno)); */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE if (!expect_msg (WRITE_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE result = -1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* PC0, PC1, PC2 possibly as shadow registers */ */
-/* OBSOLETE out_msg_buf->write_r_msg.byte_count = 4 * 3; */
-/* OBSOLETE out_msg_buf->write_r_msg.length = 3 * 4 + out_msg_buf->write_r_msg.byte_count; */
-/* OBSOLETE for (regno = 10; regno <= 12; regno++) /* LRU and MMU */ */
-/* OBSOLETE out_msg_buf->write_r_msg.data[regno - 10] = read_register (SR_REGNUM (regno)); */
-/* OBSOLETE if (USE_SHADOW_PC) */
-/* OBSOLETE out_msg_buf->write_r_msg.address = 20; /* SPC0 */ */
-/* OBSOLETE else */
-/* OBSOLETE out_msg_buf->write_r_msg.address = 10; /* PC0 */ */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE if (!expect_msg (WRITE_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE result = -1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* LRU and MMU */ */
-/* OBSOLETE out_msg_buf->write_r_msg.byte_count = 4 * 2; */
-/* OBSOLETE out_msg_buf->write_r_msg.length = 3 * 4 + out_msg_buf->write_r_msg.byte_count; */
-/* OBSOLETE out_msg_buf->write_r_msg.address = 13; */
-/* OBSOLETE for (regno = 13; regno <= 14; regno++) /* LRU and MMU */ */
-/* OBSOLETE out_msg_buf->write_r_msg.data[regno - 13] = read_register (SR_REGNUM (regno)); */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE if (!expect_msg (WRITE_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE result = -1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Unprotected Special Registers */ */
-/* OBSOLETE out_msg_buf->write_r_msg.byte_count = 4 * 8; */
-/* OBSOLETE out_msg_buf->write_r_msg.length = 3 * 4 + out_msg_buf->write_r_msg.byte_count; */
-/* OBSOLETE out_msg_buf->write_r_msg.address = 128; */
-/* OBSOLETE for (regno = 128; regno <= 135; regno++) */
-/* OBSOLETE out_msg_buf->write_r_msg.data[regno - 128] = read_register (SR_REGNUM (regno)); */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE if (!expect_msg (WRITE_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE result = -1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE registers_changed (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /*************************************************** REMOTE_PREPARE_TO_STORE */ */
-/* OBSOLETE /* Get ready to modify the registers array. On machines which store */
-/* OBSOLETE individual registers, this doesn't need to do anything. On machines */
-/* OBSOLETE which store all the registers in one fell swoop, this makes sure */
-/* OBSOLETE that registers contains all the registers from the program being */
-/* OBSOLETE debugged. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE mm_prepare_to_store (void) */
-/* OBSOLETE { */
-/* OBSOLETE /* Do nothing, since we can store individual regs */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /******************************************************* REMOTE_XFER_MEMORY */ */
-/* OBSOLETE static CORE_ADDR */
-/* OBSOLETE translate_addr (CORE_ADDR addr) */
-/* OBSOLETE { */
-/* OBSOLETE #if defined(KERNEL_DEBUGGING) */
-/* OBSOLETE /* Check for a virtual address in the kernel */ */
-/* OBSOLETE /* Assume physical address of ublock is in paddr_u register */ */
-/* OBSOLETE /* FIXME: doesn't work for user virtual addresses */ */
-/* OBSOLETE if (addr >= UVADDR) */
-/* OBSOLETE { */
-/* OBSOLETE /* PADDR_U register holds the physical address of the ublock */ */
-/* OBSOLETE CORE_ADDR i = (CORE_ADDR) read_register (PADDR_U_REGNUM); */
-/* OBSOLETE return (i + addr - (CORE_ADDR) UVADDR); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE return (addr); */
-/* OBSOLETE } */
-/* OBSOLETE #else */
-/* OBSOLETE return (addr); */
-/* OBSOLETE #endif */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /******************************************************* REMOTE_FILES_INFO */ */
-/* OBSOLETE static void */
-/* OBSOLETE mm_files_info (void) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("\tAttached to %s at %d baud and running program %s.\n", */
-/* OBSOLETE dev_name, baudrate, prog_name); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /************************************************* REMOTE_INSERT_BREAKPOINT */ */
-/* OBSOLETE static int */
-/* OBSOLETE mm_insert_breakpoint (CORE_ADDR addr, char *contents_cache) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->bkpt_set_msg.code = BKPT_SET; */
-/* OBSOLETE out_msg_buf->bkpt_set_msg.length = 4 * 4; */
-/* OBSOLETE out_msg_buf->bkpt_set_msg.memory_space = I_MEM; */
-/* OBSOLETE out_msg_buf->bkpt_set_msg.bkpt_addr = (ADDR32) addr; */
-/* OBSOLETE out_msg_buf->bkpt_set_msg.pass_count = 1; */
-/* OBSOLETE out_msg_buf->bkpt_set_msg.bkpt_type = -1; /* use illop for 29000 */ */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE if (expect_msg (BKPT_SET_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE return 0; /* Success */ */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE return 1; /* Failure */ */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /************************************************* REMOTE_DELETE_BREAKPOINT */ */
-/* OBSOLETE static int */
-/* OBSOLETE mm_remove_breakpoint (CORE_ADDR addr, char *contents_cache) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->bkpt_rm_msg.code = BKPT_RM; */
-/* OBSOLETE out_msg_buf->bkpt_rm_msg.length = 4 * 3; */
-/* OBSOLETE out_msg_buf->bkpt_rm_msg.memory_space = I_MEM; */
-/* OBSOLETE out_msg_buf->bkpt_rm_msg.bkpt_addr = (ADDR32) addr; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE if (expect_msg (BKPT_RM_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE return 0; /* Success */ */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE return 1; /* Failure */ */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /******************************************************* REMOTE_KILL */ */
-/* OBSOLETE static void */
-/* OBSOLETE mm_kill (char *arg, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE char buf[4]; */
-/* OBSOLETE */
-/* OBSOLETE #if defined(KERNEL_DEBUGGING) */
-/* OBSOLETE /* We don't ever kill the kernel */ */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Kernel not killed, but left in current state.\n"); */
-/* OBSOLETE printf ("Use detach to leave kernel running.\n"); */
-/* OBSOLETE } */
-/* OBSOLETE #else */
-/* OBSOLETE out_msg_buf->break_msg.code = BREAK; */
-/* OBSOLETE out_msg_buf->bkpt_set_msg.length = 4 * 0; */
-/* OBSOLETE expect_msg (HALT, in_msg_buf, from_tty); */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Target has been stopped."); */
-/* OBSOLETE printf ("Would you like to do a hardware reset (y/n) [n] "); */
-/* OBSOLETE fgets (buf, 3, stdin); */
-/* OBSOLETE if (buf[0] == 'y') */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->reset_msg.code = RESET; */
-/* OBSOLETE out_msg_buf->bkpt_set_msg.length = 4 * 0; */
-/* OBSOLETE expect_msg (RESET_ACK, in_msg_buf, from_tty); */
-/* OBSOLETE printf ("Target has been reset."); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE pop_target (); */
-/* OBSOLETE #endif */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /***************************************************************************/ */
-/* OBSOLETE /* */
-/* OBSOLETE * Load a program into the target. */
-/* OBSOLETE */ */
-/* OBSOLETE static void */
-/* OBSOLETE mm_load (char *arg_string, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE dont_repeat (); */
-/* OBSOLETE */
-/* OBSOLETE #if defined(KERNEL_DEBUGGING) */
-/* OBSOLETE printf ("The kernel had better be loaded already! Loading not done.\n"); */
-/* OBSOLETE #else */
-/* OBSOLETE if (arg_string == 0) */
-/* OBSOLETE error ("The load command takes a file name"); */
-/* OBSOLETE */
-/* OBSOLETE arg_string = tilde_expand (arg_string); */
-/* OBSOLETE make_cleanup (xfree, arg_string); */
-/* OBSOLETE QUIT; */
-/* OBSOLETE immediate_quit++; */
-/* OBSOLETE error ("File loading is not yet supported for MiniMon."); */
-/* OBSOLETE /* FIXME, code to load your file here... */ */
-/* OBSOLETE /* You may need to do an init_target_mm() */ */
-/* OBSOLETE /* init_target_mm(?,?,?,?,?,?,?,?); */ */
-/* OBSOLETE immediate_quit--; */
-/* OBSOLETE /* symbol_file_add (arg_string, from_tty, text_addr, 0, 0); */ */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /************************************************ REMOTE_WRITE_INFERIOR_MEMORY */
-/* OBSOLETE ** Copy LEN bytes of data from debugger memory at MYADDR */
-/* OBSOLETE to inferior's memory at MEMADDR. Returns number of bytes written. */ */
-/* OBSOLETE static int */
-/* OBSOLETE mm_write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len) */
-/* OBSOLETE { */
-/* OBSOLETE int i, nwritten; */
-/* OBSOLETE */
-/* OBSOLETE out_msg_buf->write_req_msg.code = WRITE_REQ; */
-/* OBSOLETE out_msg_buf->write_req_msg.memory_space = mm_memory_space (memaddr); */
-/* OBSOLETE */
-/* OBSOLETE nwritten = 0; */
-/* OBSOLETE while (nwritten < len) */
-/* OBSOLETE { */
-/* OBSOLETE int num_to_write = len - nwritten; */
-/* OBSOLETE if (num_to_write > MAXDATA) */
-/* OBSOLETE num_to_write = MAXDATA; */
-/* OBSOLETE for (i = 0; i < num_to_write; i++) */
-/* OBSOLETE out_msg_buf->write_req_msg.data[i] = myaddr[i + nwritten]; */
-/* OBSOLETE out_msg_buf->write_req_msg.byte_count = num_to_write; */
-/* OBSOLETE out_msg_buf->write_req_msg.length = 3 * 4 + num_to_write; */
-/* OBSOLETE out_msg_buf->write_req_msg.address = memaddr + nwritten; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE */
-/* OBSOLETE if (expect_msg (WRITE_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE nwritten += in_msg_buf->write_ack_msg.byte_count; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE return (nwritten); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /************************************************* REMOTE_READ_INFERIOR_MEMORY */
-/* OBSOLETE ** Read LEN bytes from inferior memory at MEMADDR. Put the result */
-/* OBSOLETE at debugger address MYADDR. Returns number of bytes read. */ */
-/* OBSOLETE static int */
-/* OBSOLETE mm_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len) */
-/* OBSOLETE { */
-/* OBSOLETE int i, nread; */
-/* OBSOLETE */
-/* OBSOLETE out_msg_buf->read_req_msg.code = READ_REQ; */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = mm_memory_space (memaddr); */
-/* OBSOLETE */
-/* OBSOLETE nread = 0; */
-/* OBSOLETE while (nread < len) */
-/* OBSOLETE { */
-/* OBSOLETE int num_to_read = (len - nread); */
-/* OBSOLETE if (num_to_read > MAXDATA) */
-/* OBSOLETE num_to_read = MAXDATA; */
-/* OBSOLETE out_msg_buf->read_req_msg.byte_count = num_to_read; */
-/* OBSOLETE out_msg_buf->read_req_msg.length = 3 * 4 + num_to_read; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = memaddr + nread; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE */
-/* OBSOLETE if (expect_msg (READ_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE for (i = 0; i < in_msg_buf->read_ack_msg.byte_count; i++) */
-/* OBSOLETE myaddr[i + nread] = in_msg_buf->read_ack_msg.data[i]; */
-/* OBSOLETE nread += in_msg_buf->read_ack_msg.byte_count; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE return (nread); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* FIXME! Merge these two. */ */
-/* OBSOLETE static int */
-/* OBSOLETE mm_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, */
-/* OBSOLETE struct mem_attrib *attrib ATTRIBUTE_UNUSED, */
-/* OBSOLETE struct target_ops *target ATTRIBUTE_UNUSED) */
-/* OBSOLETE { */
-/* OBSOLETE */
-/* OBSOLETE memaddr = translate_addr (memaddr); */
-/* OBSOLETE */
-/* OBSOLETE if (write) */
-/* OBSOLETE return mm_write_inferior_memory (memaddr, myaddr, len); */
-/* OBSOLETE else */
-/* OBSOLETE return mm_read_inferior_memory (memaddr, myaddr, len); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /********************************************************** MSG_SEND_SERIAL */
-/* OBSOLETE ** This function is used to send a message over the */
-/* OBSOLETE ** serial line. */
-/* OBSOLETE ** */
-/* OBSOLETE ** If the message is successfully sent, a zero is */
-/* OBSOLETE ** returned. If the message was not sendable, a -1 */
-/* OBSOLETE ** is returned. This function blocks. That is, it */
-/* OBSOLETE ** does not return until the message is completely */
-/* OBSOLETE ** sent, or until an error is encountered. */
-/* OBSOLETE ** */
-/* OBSOLETE */ */
-/* OBSOLETE */
-/* OBSOLETE int */
-/* OBSOLETE msg_send_serial (union msg_t *msg_ptr) */
-/* OBSOLETE { */
-/* OBSOLETE INT32 message_size; */
-/* OBSOLETE int byte_count; */
-/* OBSOLETE int result; */
-/* OBSOLETE char c; */
-/* OBSOLETE */
-/* OBSOLETE /* Send message header */ */
-/* OBSOLETE byte_count = 0; */
-/* OBSOLETE message_size = msg_ptr->generic_msg.length + (2 * sizeof (INT32)); */
-/* OBSOLETE do */
-/* OBSOLETE { */
-/* OBSOLETE c = *((char *) msg_ptr + byte_count); */
-/* OBSOLETE result = write (mm_desc, &c, 1); */
-/* OBSOLETE if (result == 1) */
-/* OBSOLETE { */
-/* OBSOLETE byte_count = byte_count + 1; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE while ((byte_count < message_size)); */
-/* OBSOLETE */
-/* OBSOLETE return (0); */
-/* OBSOLETE } /* end msg_send_serial() */ */
-/* OBSOLETE */
-/* OBSOLETE /********************************************************** MSG_RECV_SERIAL */
-/* OBSOLETE ** This function is used to receive a message over a */
-/* OBSOLETE ** serial line. */
-/* OBSOLETE ** */
-/* OBSOLETE ** If the message is waiting in the buffer, a zero is */
-/* OBSOLETE ** returned and the buffer pointed to by msg_ptr is filled */
-/* OBSOLETE ** in. If no message was available, a -1 is returned. */
-/* OBSOLETE ** If timeout==0, wait indefinetly for a character. */
-/* OBSOLETE ** */
-/* OBSOLETE */ */
-/* OBSOLETE */
-/* OBSOLETE int */
-/* OBSOLETE msg_recv_serial (union msg_t *msg_ptr) */
-/* OBSOLETE { */
-/* OBSOLETE static INT32 length = 0; */
-/* OBSOLETE static INT32 byte_count = 0; */
-/* OBSOLETE int result; */
-/* OBSOLETE char c; */
-/* OBSOLETE if (msg_ptr == 0) /* re-sync request */ */
-/* OBSOLETE { */
-/* OBSOLETE length = 0; */
-/* OBSOLETE byte_count = 0; */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE /* The timeout here is the prevailing timeout set with VTIME */ */
-/* OBSOLETE ->"timeout==0 semantics not supported" */
-/* OBSOLETE read (mm_desc, in_buf, BUFER_SIZE); */
-/* OBSOLETE #else */
-/* OBSOLETE alarm (1); */
-/* OBSOLETE read (mm_desc, in_buf, BUFER_SIZE); */
-/* OBSOLETE alarm (0); */
-/* OBSOLETE #endif */
-/* OBSOLETE return (0); */
-/* OBSOLETE } */
-/* OBSOLETE /* Receive message */ */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE /* Timeout==0, help support the mm_wait() routine */ */
-/* OBSOLETE ->"timeout==0 semantics not supported (and its nice if they are)" */
-/* OBSOLETE result = read (mm_desc, &c, 1); */
-/* OBSOLETE #else */
-/* OBSOLETE alarm (timeout); */
-/* OBSOLETE result = read (mm_desc, &c, 1); */
-/* OBSOLETE alarm (0); */
-/* OBSOLETE #endif */
-/* OBSOLETE if (result < 0) */
-/* OBSOLETE { */
-/* OBSOLETE if (errno == EINTR) */
-/* OBSOLETE { */
-/* OBSOLETE error ("Timeout reading from remote system."); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE perror_with_name ("remote"); */
-/* OBSOLETE } */
-/* OBSOLETE else if (result == 1) */
-/* OBSOLETE { */
-/* OBSOLETE *((char *) msg_ptr + byte_count) = c; */
-/* OBSOLETE byte_count = byte_count + 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Message header received. Save message length. */ */
-/* OBSOLETE if (byte_count == (2 * sizeof (INT32))) */
-/* OBSOLETE length = msg_ptr->generic_msg.length; */
-/* OBSOLETE */
-/* OBSOLETE if (byte_count >= (length + (2 * sizeof (INT32)))) */
-/* OBSOLETE { */
-/* OBSOLETE /* Message received */ */
-/* OBSOLETE byte_count = 0; */
-/* OBSOLETE return (0); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE return (-1); */
-/* OBSOLETE */
-/* OBSOLETE } /* end msg_recv_serial() */ */
-/* OBSOLETE */
-/* OBSOLETE /********************************************************************* KBD_RAW */
-/* OBSOLETE ** This function is used to put the keyboard in "raw" */
-/* OBSOLETE ** mode for BSD Unix. The original status is saved */
-/* OBSOLETE ** so that it may be restored later. */
-/* OBSOLETE */ */
-/* OBSOLETE TERMINAL kbd_tbuf; */
-/* OBSOLETE */
-/* OBSOLETE int */
-/* OBSOLETE kbd_raw (void) */
-/* OBSOLETE { */
-/* OBSOLETE int result; */
-/* OBSOLETE TERMINAL tbuf; */
-/* OBSOLETE */
-/* OBSOLETE /* Get keyboard termio (to save to restore original modes) */ */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE result = ioctl (0, TCGETA, &kbd_tbuf); */
-/* OBSOLETE #else */
-/* OBSOLETE result = ioctl (0, TIOCGETP, &kbd_tbuf); */
-/* OBSOLETE #endif */
-/* OBSOLETE if (result == -1) */
-/* OBSOLETE return (errno); */
-/* OBSOLETE */
-/* OBSOLETE /* Get keyboard TERMINAL (for modification) */ */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE result = ioctl (0, TCGETA, &tbuf); */
-/* OBSOLETE #else */
-/* OBSOLETE result = ioctl (0, TIOCGETP, &tbuf); */
-/* OBSOLETE #endif */
-/* OBSOLETE if (result == -1) */
-/* OBSOLETE return (errno); */
-/* OBSOLETE */
-/* OBSOLETE /* Set up new parameters */ */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE tbuf.c_iflag = tbuf.c_iflag & */
-/* OBSOLETE ~(INLCR | ICRNL | IUCLC | ISTRIP | IXON | BRKINT); */
-/* OBSOLETE tbuf.c_lflag = tbuf.c_lflag & ~(ICANON | ISIG | ECHO); */
-/* OBSOLETE tbuf.c_cc[4] = 0; /* MIN */ */
-/* OBSOLETE tbuf.c_cc[5] = 0; /* TIME */ */
-/* OBSOLETE #else */
-/* OBSOLETE /* FIXME: not sure if this is correct (matches HAVE_TERMIO). */ */
-/* OBSOLETE tbuf.sg_flags |= RAW; */
-/* OBSOLETE tbuf.sg_flags |= ANYP; */
-/* OBSOLETE tbuf.sg_flags &= ~ECHO; */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /* Set keyboard termio to new mode (RAW) */ */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE result = ioctl (0, TCSETAF, &tbuf); */
-/* OBSOLETE #else */
-/* OBSOLETE result = ioctl (0, TIOCSETP, &tbuf); */
-/* OBSOLETE #endif */
-/* OBSOLETE if (result == -1) */
-/* OBSOLETE return (errno); */
-/* OBSOLETE */
-/* OBSOLETE return (0); */
-/* OBSOLETE } /* end kbd_raw() */ */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /***************************************************************** KBD_RESTORE */
-/* OBSOLETE ** This function is used to put the keyboard back in the */
-/* OBSOLETE ** mode it was in before kbk_raw was called. Note that */
-/* OBSOLETE ** kbk_raw() must have been called at least once before */
-/* OBSOLETE ** kbd_restore() is called. */
-/* OBSOLETE */ */
-/* OBSOLETE */
-/* OBSOLETE int */
-/* OBSOLETE kbd_restore (void) */
-/* OBSOLETE { */
-/* OBSOLETE int result; */
-/* OBSOLETE */
-/* OBSOLETE /* Set keyboard termio to original mode */ */
-/* OBSOLETE #ifdef HAVE_TERMIO */
-/* OBSOLETE result = ioctl (0, TCSETAF, &kbd_tbuf); */
-/* OBSOLETE #else */
-/* OBSOLETE result = ioctl (0, TIOCGETP, &kbd_tbuf); */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE if (result == -1) */
-/* OBSOLETE return (errno); */
-/* OBSOLETE */
-/* OBSOLETE return (0); */
-/* OBSOLETE } /* end kbd_cooked() */ */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /*****************************************************************************/ */
-/* OBSOLETE /* Fetch a single register indicatated by 'regno'. */
-/* OBSOLETE * Returns 0/-1 on success/failure. */
-/* OBSOLETE */ */
-/* OBSOLETE static int */
-/* OBSOLETE fetch_register (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE int result; */
-/* OBSOLETE out_msg_buf->read_req_msg.code = READ_REQ; */
-/* OBSOLETE out_msg_buf->read_req_msg.length = 4 * 3; */
-/* OBSOLETE out_msg_buf->read_req_msg.byte_count = 4; */
-/* OBSOLETE */
-/* OBSOLETE if (regno == GR1_REGNUM) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = GLOBAL_REG; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = 1; */
-/* OBSOLETE } */
-/* OBSOLETE else if (regno >= GR96_REGNUM && regno < GR96_REGNUM + 32) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = GLOBAL_REG; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = (regno - GR96_REGNUM) + 96; */
-/* OBSOLETE } */
-/* OBSOLETE #if defined(GR64_REGNUM) */
-/* OBSOLETE else if (regno >= GR64_REGNUM && regno < GR64_REGNUM + 32) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = GLOBAL_REG; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = (regno - GR64_REGNUM) + 64; */
-/* OBSOLETE } */
-/* OBSOLETE #endif /* GR64_REGNUM */ */
-/* OBSOLETE else if (regno >= LR0_REGNUM && regno < LR0_REGNUM + 128) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = LOCAL_REG; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = (regno - LR0_REGNUM); */
-/* OBSOLETE } */
-/* OBSOLETE else if (regno >= FPE_REGNUM && regno <= EXO_REGNUM) */
-/* OBSOLETE { */
-/* OBSOLETE int val = -1; */
-/* OBSOLETE supply_register (160 + (regno - FPE_REGNUM), &val); */
-/* OBSOLETE return 0; /* Pretend Success */ */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->read_req_msg.memory_space = SPECIAL_REG; */
-/* OBSOLETE out_msg_buf->read_req_msg.address = regnum_to_srnum (regno); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE */
-/* OBSOLETE if (expect_msg (READ_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE supply_register (regno, &(in_msg_buf->read_r_ack_msg.data[0])); */
-/* OBSOLETE result = 0; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE result = -1; */
-/* OBSOLETE } */
-/* OBSOLETE return result; */
-/* OBSOLETE } */
-/* OBSOLETE /*****************************************************************************/ */
-/* OBSOLETE /* Store a single register indicated by 'regno'. */
-/* OBSOLETE * Returns 0/-1 on success/failure. */
-/* OBSOLETE */ */
-/* OBSOLETE static int */
-/* OBSOLETE store_register (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE int result; */
-/* OBSOLETE */
-/* OBSOLETE out_msg_buf->write_req_msg.code = WRITE_REQ; */
-/* OBSOLETE out_msg_buf->write_req_msg.length = 4 * 4; */
-/* OBSOLETE out_msg_buf->write_req_msg.byte_count = 4; */
-/* OBSOLETE out_msg_buf->write_r_msg.data[0] = read_register (regno); */
-/* OBSOLETE */
-/* OBSOLETE if (regno == GR1_REGNUM) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->write_req_msg.memory_space = GLOBAL_REG; */
-/* OBSOLETE out_msg_buf->write_req_msg.address = 1; */
-/* OBSOLETE /* Setting GR1 changes the numbers of all the locals, so invalidate the */
-/* OBSOLETE * register cache. Do this *after* calling read_register, because we want */
-/* OBSOLETE * read_register to return the value that write_register has just stuffed */
-/* OBSOLETE * into the registers array, not the value of the register fetched from */
-/* OBSOLETE * the inferior. */
-/* OBSOLETE */ */
-/* OBSOLETE registers_changed (); */
-/* OBSOLETE } */
-/* OBSOLETE #if defined(GR64_REGNUM) */
-/* OBSOLETE else if (regno >= GR64_REGNUM && regno < GR64_REGNUM + 32) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->write_req_msg.memory_space = GLOBAL_REG; */
-/* OBSOLETE out_msg_buf->write_req_msg.address = (regno - GR64_REGNUM) + 64; */
-/* OBSOLETE } */
-/* OBSOLETE #endif /* GR64_REGNUM */ */
-/* OBSOLETE else if (regno >= GR96_REGNUM && regno < GR96_REGNUM + 32) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->write_req_msg.memory_space = GLOBAL_REG; */
-/* OBSOLETE out_msg_buf->write_req_msg.address = (regno - GR96_REGNUM) + 96; */
-/* OBSOLETE } */
-/* OBSOLETE else if (regno >= LR0_REGNUM && regno < LR0_REGNUM + 128) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->write_req_msg.memory_space = LOCAL_REG; */
-/* OBSOLETE out_msg_buf->write_req_msg.address = (regno - LR0_REGNUM); */
-/* OBSOLETE } */
-/* OBSOLETE else if (regno >= FPE_REGNUM && regno <= EXO_REGNUM) */
-/* OBSOLETE { */
-/* OBSOLETE return 0; /* Pretend Success */ */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE /* An unprotected or protected special register */ */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->write_req_msg.memory_space = SPECIAL_REG; */
-/* OBSOLETE out_msg_buf->write_req_msg.address = regnum_to_srnum (regno); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE */
-/* OBSOLETE if (expect_msg (WRITE_ACK, in_msg_buf, 1)) */
-/* OBSOLETE { */
-/* OBSOLETE result = 0; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE result = -1; */
-/* OBSOLETE } */
-/* OBSOLETE return result; */
-/* OBSOLETE } */
-/* OBSOLETE /****************************************************************************/ */
-/* OBSOLETE /* */
-/* OBSOLETE * Convert a gdb special register number to a 29000 special register number. */
-/* OBSOLETE */ */
-/* OBSOLETE static int */
-/* OBSOLETE regnum_to_srnum (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE switch (regno) */
-/* OBSOLETE { */
-/* OBSOLETE case VAB_REGNUM: */
-/* OBSOLETE return (0); */
-/* OBSOLETE case OPS_REGNUM: */
-/* OBSOLETE return (1); */
-/* OBSOLETE case CPS_REGNUM: */
-/* OBSOLETE return (2); */
-/* OBSOLETE case CFG_REGNUM: */
-/* OBSOLETE return (3); */
-/* OBSOLETE case CHA_REGNUM: */
-/* OBSOLETE return (4); */
-/* OBSOLETE case CHD_REGNUM: */
-/* OBSOLETE return (5); */
-/* OBSOLETE case CHC_REGNUM: */
-/* OBSOLETE return (6); */
-/* OBSOLETE case RBP_REGNUM: */
-/* OBSOLETE return (7); */
-/* OBSOLETE case TMC_REGNUM: */
-/* OBSOLETE return (8); */
-/* OBSOLETE case TMR_REGNUM: */
-/* OBSOLETE return (9); */
-/* OBSOLETE case NPC_REGNUM: */
-/* OBSOLETE return (USE_SHADOW_PC ? (20) : (10)); */
-/* OBSOLETE case PC_REGNUM: */
-/* OBSOLETE return (USE_SHADOW_PC ? (21) : (11)); */
-/* OBSOLETE case PC2_REGNUM: */
-/* OBSOLETE return (USE_SHADOW_PC ? (22) : (12)); */
-/* OBSOLETE case MMU_REGNUM: */
-/* OBSOLETE return (13); */
-/* OBSOLETE case LRU_REGNUM: */
-/* OBSOLETE return (14); */
-/* OBSOLETE case IPC_REGNUM: */
-/* OBSOLETE return (128); */
-/* OBSOLETE case IPA_REGNUM: */
-/* OBSOLETE return (129); */
-/* OBSOLETE case IPB_REGNUM: */
-/* OBSOLETE return (130); */
-/* OBSOLETE case Q_REGNUM: */
-/* OBSOLETE return (131); */
-/* OBSOLETE case ALU_REGNUM: */
-/* OBSOLETE return (132); */
-/* OBSOLETE case BP_REGNUM: */
-/* OBSOLETE return (133); */
-/* OBSOLETE case FC_REGNUM: */
-/* OBSOLETE return (134); */
-/* OBSOLETE case CR_REGNUM: */
-/* OBSOLETE return (135); */
-/* OBSOLETE case FPE_REGNUM: */
-/* OBSOLETE return (160); */
-/* OBSOLETE case INTE_REGNUM: */
-/* OBSOLETE return (161); */
-/* OBSOLETE case FPS_REGNUM: */
-/* OBSOLETE return (162); */
-/* OBSOLETE case EXO_REGNUM: */
-/* OBSOLETE return (164); */
-/* OBSOLETE default: */
-/* OBSOLETE return (255); /* Failure ? */ */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE /****************************************************************************/ */
-/* OBSOLETE /* */
-/* OBSOLETE * Initialize the target debugger (minimon only). */
-/* OBSOLETE */ */
-/* OBSOLETE static void */
-/* OBSOLETE init_target_mm (ADDR32 tstart, ADDR32 tend, ADDR32 dstart, ADDR32 dend, */
-/* OBSOLETE ADDR32 entry, INT32 ms_size, INT32 rs_size, ADDR32 arg_start) */
-/* OBSOLETE { */
-/* OBSOLETE out_msg_buf->init_msg.code = INIT; */
-/* OBSOLETE out_msg_buf->init_msg.length = sizeof (struct init_msg_t) - 2 * sizeof (INT32); */
-/* OBSOLETE out_msg_buf->init_msg.text_start = tstart; */
-/* OBSOLETE out_msg_buf->init_msg.text_end = tend; */
-/* OBSOLETE out_msg_buf->init_msg.data_start = dstart; */
-/* OBSOLETE out_msg_buf->init_msg.data_end = dend; */
-/* OBSOLETE out_msg_buf->init_msg.entry_point = entry; */
-/* OBSOLETE out_msg_buf->init_msg.mem_stack_size = ms_size; */
-/* OBSOLETE out_msg_buf->init_msg.reg_stack_size = rs_size; */
-/* OBSOLETE out_msg_buf->init_msg.arg_start = arg_start; */
-/* OBSOLETE msg_send_serial (out_msg_buf); */
-/* OBSOLETE expect_msg (INIT_ACK, in_msg_buf, 1); */
-/* OBSOLETE } */
-/* OBSOLETE /****************************************************************************/ */
-/* OBSOLETE /* */
-/* OBSOLETE * Return a pointer to a string representing the given message code. */
-/* OBSOLETE * Not all messages are represented here, only the ones that we expect */
-/* OBSOLETE * to be called with. */
-/* OBSOLETE */ */
-/* OBSOLETE static char * */
-/* OBSOLETE msg_str (INT32 code) */
-/* OBSOLETE { */
-/* OBSOLETE static char cbuf[32]; */
-/* OBSOLETE */
-/* OBSOLETE switch (code) */
-/* OBSOLETE { */
-/* OBSOLETE case BKPT_SET_ACK: */
-/* OBSOLETE sprintf (cbuf, "%s (%d)", "BKPT_SET_ACK", code); */
-/* OBSOLETE break; */
-/* OBSOLETE case BKPT_RM_ACK: */
-/* OBSOLETE sprintf (cbuf, "%s (%d)", "BKPT_RM_ACK", code); */
-/* OBSOLETE break; */
-/* OBSOLETE case INIT_ACK: */
-/* OBSOLETE sprintf (cbuf, "%s (%d)", "INIT_ACK", code); */
-/* OBSOLETE break; */
-/* OBSOLETE case READ_ACK: */
-/* OBSOLETE sprintf (cbuf, "%s (%d)", "READ_ACK", code); */
-/* OBSOLETE break; */
-/* OBSOLETE case WRITE_ACK: */
-/* OBSOLETE sprintf (cbuf, "%s (%d)", "WRITE_ACK", code); */
-/* OBSOLETE break; */
-/* OBSOLETE case ERROR: */
-/* OBSOLETE sprintf (cbuf, "%s (%d)", "ERROR", code); */
-/* OBSOLETE break; */
-/* OBSOLETE case HALT: */
-/* OBSOLETE sprintf (cbuf, "%s (%d)", "HALT", code); */
-/* OBSOLETE break; */
-/* OBSOLETE default: */
-/* OBSOLETE sprintf (cbuf, "UNKNOWN (%d)", code); */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE return (cbuf); */
-/* OBSOLETE } */
-/* OBSOLETE /****************************************************************************/ */
-/* OBSOLETE /* */
-/* OBSOLETE * Selected (not all of them) error codes that we might get. */
-/* OBSOLETE */ */
-/* OBSOLETE static char * */
-/* OBSOLETE error_msg_str (INT32 code) */
-/* OBSOLETE { */
-/* OBSOLETE static char cbuf[50]; */
-/* OBSOLETE */
-/* OBSOLETE switch (code) */
-/* OBSOLETE { */
-/* OBSOLETE case EMFAIL: */
-/* OBSOLETE return ("EMFAIL: unrecoverable error"); */
-/* OBSOLETE case EMBADADDR: */
-/* OBSOLETE return ("EMBADADDR: Illegal address"); */
-/* OBSOLETE case EMBADREG: */
-/* OBSOLETE return ("EMBADREG: Illegal register "); */
-/* OBSOLETE case EMACCESS: */
-/* OBSOLETE return ("EMACCESS: Could not access memory"); */
-/* OBSOLETE case EMBADMSG: */
-/* OBSOLETE return ("EMBADMSG: Unknown message type"); */
-/* OBSOLETE case EMMSG2BIG: */
-/* OBSOLETE return ("EMMSG2BIG: Message to large"); */
-/* OBSOLETE case EMNOSEND: */
-/* OBSOLETE return ("EMNOSEND: Could not send message"); */
-/* OBSOLETE case EMNORECV: */
-/* OBSOLETE return ("EMNORECV: Could not recv message"); */
-/* OBSOLETE case EMRESET: */
-/* OBSOLETE return ("EMRESET: Could not RESET target"); */
-/* OBSOLETE case EMCONFIG: */
-/* OBSOLETE return ("EMCONFIG: Could not get target CONFIG"); */
-/* OBSOLETE case EMSTATUS: */
-/* OBSOLETE return ("EMSTATUS: Could not get target STATUS"); */
-/* OBSOLETE case EMREAD: */
-/* OBSOLETE return ("EMREAD: Could not READ target memory"); */
-/* OBSOLETE case EMWRITE: */
-/* OBSOLETE return ("EMWRITE: Could not WRITE target memory"); */
-/* OBSOLETE case EMBKPTSET: */
-/* OBSOLETE return ("EMBKPTSET: Could not set breakpoint"); */
-/* OBSOLETE case EMBKPTRM: */
-/* OBSOLETE return ("EMBKPTRM: Could not remove breakpoint"); */
-/* OBSOLETE case EMBKPTSTAT: */
-/* OBSOLETE return ("EMBKPTSTAT: Could not get breakpoint status"); */
-/* OBSOLETE case EMBKPTNONE: */
-/* OBSOLETE return ("EMBKPTNONE: All breakpoints in use"); */
-/* OBSOLETE case EMBKPTUSED: */
-/* OBSOLETE return ("EMBKPTUSED: Breakpoints already in use"); */
-/* OBSOLETE case EMINIT: */
-/* OBSOLETE return ("EMINIT: Could not init target memory"); */
-/* OBSOLETE case EMGO: */
-/* OBSOLETE return ("EMGO: Could not start execution"); */
-/* OBSOLETE case EMSTEP: */
-/* OBSOLETE return ("EMSTEP: Could not single step"); */
-/* OBSOLETE case EMBREAK: */
-/* OBSOLETE return ("EMBREAK: Could not BREAK"); */
-/* OBSOLETE case EMCOMMERR: */
-/* OBSOLETE return ("EMCOMMERR: Communication error"); */
-/* OBSOLETE default: */
-/* OBSOLETE sprintf (cbuf, "error number %d", code); */
-/* OBSOLETE break; */
-/* OBSOLETE } /* end switch */ */
-/* OBSOLETE */
-/* OBSOLETE return (cbuf); */
-/* OBSOLETE } */
-/* OBSOLETE /****************************************************************************/ */
-/* OBSOLETE */
-/* OBSOLETE /* Receive a message, placing it in MSG_BUF, and expect it to be of */
-/* OBSOLETE type MSGCODE. If an error occurs, a non-zero FROM_TTY indicates */
-/* OBSOLETE that the message should be printed. */
-/* OBSOLETE */
-/* OBSOLETE Return 0 for failure, 1 for success. */ */
-/* OBSOLETE */
-/* OBSOLETE static int */
-/* OBSOLETE expect_msg (INT32 msgcode, union msg_t *msg_buf, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE int retries = 0; */
-/* OBSOLETE while (msg_recv_serial (msg_buf) && (retries++ < MAX_RETRIES)); */
-/* OBSOLETE if (retries >= MAX_RETRIES) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Expected msg %s, ", msg_str (msgcode)); */
-/* OBSOLETE printf ("no message received!\n"); */
-/* OBSOLETE return (0); /* Failure */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (msg_buf->generic_msg.code != msgcode) */
-/* OBSOLETE { */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE printf ("Expected msg %s, ", msg_str (msgcode)); */
-/* OBSOLETE printf ("got msg %s\n", msg_str (msg_buf->generic_msg.code)); */
-/* OBSOLETE if (msg_buf->generic_msg.code == ERROR) */
-/* OBSOLETE printf ("%s\n", error_msg_str (msg_buf->error_msg.error_code)); */
-/* OBSOLETE } */
-/* OBSOLETE return (0); /* Failure */ */
-/* OBSOLETE } */
-/* OBSOLETE return (1); /* Success */ */
-/* OBSOLETE } */
-/* OBSOLETE /****************************************************************************/ */
-/* OBSOLETE /* */
-/* OBSOLETE * Determine the MiniMon memory space qualifier based on the addr. */
-/* OBSOLETE * FIXME: Can't distinguis I_ROM/D_ROM. */
-/* OBSOLETE * FIXME: Doesn't know anything about I_CACHE/D_CACHE. */
-/* OBSOLETE */ */
-/* OBSOLETE static int */
-/* OBSOLETE mm_memory_space (CORE_ADDR *addr) */
-/* OBSOLETE { */
-/* OBSOLETE ADDR32 tstart = target_config.I_mem_start; */
-/* OBSOLETE ADDR32 tend = tstart + target_config.I_mem_size; */
-/* OBSOLETE ADDR32 dstart = target_config.D_mem_start; */
-/* OBSOLETE ADDR32 dend = tstart + target_config.D_mem_size; */
-/* OBSOLETE ADDR32 rstart = target_config.ROM_start; */
-/* OBSOLETE ADDR32 rend = tstart + target_config.ROM_size; */
-/* OBSOLETE */
-/* OBSOLETE if (((ADDR32) addr >= tstart) && ((ADDR32) addr < tend)) */
-/* OBSOLETE { */
-/* OBSOLETE return I_MEM; */
-/* OBSOLETE } */
-/* OBSOLETE else if (((ADDR32) addr >= dstart) && ((ADDR32) addr < dend)) */
-/* OBSOLETE { */
-/* OBSOLETE return D_MEM; */
-/* OBSOLETE } */
-/* OBSOLETE else if (((ADDR32) addr >= rstart) && ((ADDR32) addr < rend)) */
-/* OBSOLETE { */
-/* OBSOLETE /* FIXME: how do we determine between D_ROM and I_ROM */ */
-/* OBSOLETE return D_ROM; */
-/* OBSOLETE } */
-/* OBSOLETE else /* FIXME: what do me do now? */ */
-/* OBSOLETE return D_MEM; /* Hmmm! */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /****************************************************************************/ */
-/* OBSOLETE /* */
-/* OBSOLETE * Define the target subroutine names */
-/* OBSOLETE */ */
-/* OBSOLETE struct target_ops mm_ops; */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE init_mm_ops (void) */
-/* OBSOLETE { */
-/* OBSOLETE mm_ops.to_shortname = "minimon"; */
-/* OBSOLETE mm_ops.to_longname = "Remote AMD/Minimon target"; */
-/* OBSOLETE mm_ops.to_doc = "Remote debug an AMD 290*0 using the MiniMon dbg core on the target"; */
-/* OBSOLETE mm_ops.to_open = mm_open; */
-/* OBSOLETE mm_ops.to_close = mm_close; */
-/* OBSOLETE mm_ops.to_attach = mm_attach; */
-/* OBSOLETE mm_ops.to_post_attach = NULL; */
-/* OBSOLETE mm_ops.to_require_attach = NULL; */
-/* OBSOLETE mm_ops.to_detach = mm_detach; */
-/* OBSOLETE mm_ops.to_require_detach = NULL; */
-/* OBSOLETE mm_ops.to_resume = mm_resume; */
-/* OBSOLETE mm_ops.to_wait = mm_wait; */
-/* OBSOLETE mm_ops.to_post_wait = NULL; */
-/* OBSOLETE mm_ops.to_fetch_registers = mm_fetch_registers; */
-/* OBSOLETE mm_ops.to_store_registers = mm_store_registers; */
-/* OBSOLETE mm_ops.to_prepare_to_store = mm_prepare_to_store; */
-/* OBSOLETE mm_ops.to_xfer_memory = mm_xfer_inferior_memory; */
-/* OBSOLETE mm_ops.to_files_info = mm_files_info; */
-/* OBSOLETE mm_ops.to_insert_breakpoint = mm_insert_breakpoint; */
-/* OBSOLETE mm_ops.to_remove_breakpoint = mm_remove_breakpoint; */
-/* OBSOLETE mm_ops.to_terminal_init = 0; */
-/* OBSOLETE mm_ops.to_terminal_inferior = 0; */
-/* OBSOLETE mm_ops.to_terminal_ours_for_output = 0; */
-/* OBSOLETE mm_ops.to_terminal_ours = 0; */
-/* OBSOLETE mm_ops.to_terminal_info = 0; */
-/* OBSOLETE mm_ops.to_kill = mm_kill; */
-/* OBSOLETE mm_ops.to_load = mm_load; */
-/* OBSOLETE mm_ops.to_lookup_symbol = 0; */
-/* OBSOLETE mm_ops.to_create_inferior = mm_create_inferior; */
-/* OBSOLETE mm_ops.to_post_startup_inferior = NULL; */
-/* OBSOLETE mm_ops.to_acknowledge_created_inferior = NULL; */
-/* OBSOLETE mm_ops.to_clone_and_follow_inferior = NULL; */
-/* OBSOLETE mm_ops.to_post_follow_inferior_by_clone = NULL; */
-/* OBSOLETE mm_ops.to_insert_fork_catchpoint = NULL; */
-/* OBSOLETE mm_ops.to_remove_fork_catchpoint = NULL; */
-/* OBSOLETE mm_ops.to_insert_vfork_catchpoint = NULL; */
-/* OBSOLETE mm_ops.to_remove_vfork_catchpoint = NULL; */
-/* OBSOLETE mm_ops.to_has_forked = NULL; */
-/* OBSOLETE mm_ops.to_has_vforked = NULL; */
-/* OBSOLETE mm_ops.to_can_follow_vfork_prior_to_exec = NULL; */
-/* OBSOLETE mm_ops.to_post_follow_vfork = NULL; */
-/* OBSOLETE mm_ops.to_insert_exec_catchpoint = NULL; */
-/* OBSOLETE mm_ops.to_remove_exec_catchpoint = NULL; */
-/* OBSOLETE mm_ops.to_has_execd = NULL; */
-/* OBSOLETE mm_ops.to_reported_exec_events_per_exec_call = NULL; */
-/* OBSOLETE mm_ops.to_has_exited = NULL; */
-/* OBSOLETE mm_ops.to_mourn_inferior = mm_mourn; */
-/* OBSOLETE mm_ops.to_can_run = 0; */
-/* OBSOLETE mm_ops.to_notice_signals = 0; */
-/* OBSOLETE mm_ops.to_thread_alive = 0; */
-/* OBSOLETE mm_ops.to_stop = 0; */
-/* OBSOLETE mm_ops.to_pid_to_exec_file = NULL; */
-/* OBSOLETE mm_ops.to_stratum = process_stratum; */
-/* OBSOLETE mm_ops.DONT_USE = 0; */
-/* OBSOLETE mm_ops.to_has_all_memory = 1; */
-/* OBSOLETE mm_ops.to_has_memory = 1; */
-/* OBSOLETE mm_ops.to_has_stack = 1; */
-/* OBSOLETE mm_ops.to_has_registers = 1; */
-/* OBSOLETE mm_ops.to_has_execution = 1; */
-/* OBSOLETE mm_ops.to_sections = 0; */
-/* OBSOLETE mm_ops.to_sections_end = 0; */
-/* OBSOLETE mm_ops.to_magic = OPS_MAGIC; */
-/* OBSOLETE }; */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE _initialize_remote_mm (void) */
-/* OBSOLETE { */
-/* OBSOLETE init_mm_ops (); */
-/* OBSOLETE add_target (&mm_ops); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE #ifdef NO_HIF_SUPPORT */
-/* OBSOLETE service_HIF (union msg_t *msg) */
-/* OBSOLETE { */
-/* OBSOLETE return (0); /* Emulate a failure */ */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
diff --git a/contrib/gdb/gdb/remote-nindy.c b/contrib/gdb/gdb/remote-nindy.c
deleted file mode 100644
index 679dfad919e8..000000000000
--- a/contrib/gdb/gdb/remote-nindy.c
+++ /dev/null
@@ -1,762 +0,0 @@
-/* Memory-access and commands for remote NINDY process, for GDB.
-
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
- 2000, 2001, 2002 Free Software Foundation, Inc.
-
- Contributed by Intel Corporation. Modified from remote.c by Chris Benenati.
-
- GDB is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY. No author or distributor accepts responsibility to anyone
- for the consequences of using it or for whether it serves any
- particular purpose or works at all, unless he says so in writing.
- Refer to the GDB General Public License for full details.
-
- Everyone is granted permission to copy, modify and redistribute GDB,
- but only under the conditions described in the GDB General Public
- License. A copy of this license is supposed to have been given to you
- along with GDB so you can know your rights and responsibilities. It
- should be in a file named COPYING. Among other things, the copyright
- notice and this notice must be preserved on all copies.
-
- In other words, go ahead and share GDB, but don't try to stop
- anyone else from sharing it farther. Help stamp out software hoarding! */
-
-/*
- Except for the data cache routines, this file bears little resemblence
- to remote.c. A new (although similar) protocol has been specified, and
- portions of the code are entirely dependent on having an i80960 with a
- NINDY ROM monitor at the other end of the line.
- */
-
-/*****************************************************************************
- *
- * REMOTE COMMUNICATION PROTOCOL BETWEEN GDB960 AND THE NINDY ROM MONITOR.
- *
- *
- * MODES OF OPERATION
- * ----- -- ---------
- *
- * As far as NINDY is concerned, GDB is always in one of two modes: command
- * mode or passthrough mode.
- *
- * In command mode (the default) pre-defined packets containing requests
- * are sent by GDB to NINDY. NINDY never talks except in reponse to a request.
- *
- * Once the the user program is started, GDB enters passthrough mode, to give
- * the user program access to the terminal. GDB remains in this mode until
- * NINDY indicates that the program has stopped.
- *
- *
- * PASSTHROUGH MODE
- * ----------- ----
- *
- * GDB writes all input received from the keyboard directly to NINDY, and writes
- * all characters received from NINDY directly to the monitor.
- *
- * Keyboard input is neither buffered nor echoed to the monitor.
- *
- * GDB remains in passthrough mode until NINDY sends a single ^P character,
- * to indicate that the user process has stopped.
- *
- * Note:
- * GDB assumes NINDY performs a 'flushreg' when the user program stops.
- *
- *
- * COMMAND MODE
- * ------- ----
- *
- * All info (except for message ack and nak) is transferred between gdb
- * and the remote processor in messages of the following format:
- *
- * <info>#<checksum>
- *
- * where
- * # is a literal character
- *
- * <info> ASCII information; all numeric information is in the
- * form of hex digits ('0'-'9' and lowercase 'a'-'f').
- *
- * <checksum>
- * is a pair of ASCII hex digits representing an 8-bit
- * checksum formed by adding together each of the
- * characters in <info>.
- *
- * The receiver of a message always sends a single character to the sender
- * to indicate that the checksum was good ('+') or bad ('-'); the sender
- * re-transmits the entire message over until a '+' is received.
- *
- * In response to a command NINDY always sends back either data or
- * a result code of the form "Xnn", where "nn" are hex digits and "X00"
- * means no errors. (Exceptions: the "s" and "c" commands don't respond.)
- *
- * SEE THE HEADER OF THE FILE "gdb.c" IN THE NINDY MONITOR SOURCE CODE FOR A
- * FULL DESCRIPTION OF LEGAL COMMANDS.
- *
- * SEE THE FILE "stop.h" IN THE NINDY MONITOR SOURCE CODE FOR A LIST
- * OF STOP CODES.
- *
- ***************************************************************************/
-
-#include "defs.h"
-#include <signal.h>
-#include <sys/types.h>
-#include <setjmp.h>
-
-#include "frame.h"
-#include "inferior.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "command.h"
-#include "floatformat.h"
-#include "regcache.h"
-
-#include <sys/file.h>
-#include <ctype.h>
-#include "serial.h"
-#include "nindy-share/env.h"
-#include "nindy-share/stop.h"
-#include "remote-utils.h"
-
-extern int unlink ();
-extern char *getenv ();
-extern char *mktemp ();
-
-extern void generic_mourn_inferior ();
-
-extern struct target_ops nindy_ops;
-extern FILE *instream;
-
-extern char ninStopWhy ();
-extern int ninMemGet ();
-extern int ninMemPut ();
-
-int nindy_initial_brk; /* nonzero if want to send an initial BREAK to nindy */
-int nindy_old_protocol; /* nonzero if want to use old protocol */
-char *nindy_ttyname; /* name of tty to talk to nindy on, or null */
-
-#define DLE '\020' /* Character NINDY sends to indicate user program has
- * halted. */
-#define TRUE 1
-#define FALSE 0
-
-/* From nindy-share/nindy.c. */
-extern struct serial *nindy_serial;
-
-static int have_regs = 0; /* 1 iff regs read since i960 last halted */
-static int regs_changed = 0; /* 1 iff regs were modified since last read */
-
-extern char *exists ();
-
-static void nindy_fetch_registers (int);
-
-static void nindy_store_registers (int);
-
-static char *savename;
-
-static void
-nindy_close (int quitting)
-{
- if (nindy_serial != NULL)
- serial_close (nindy_serial);
- nindy_serial = NULL;
-
- if (savename)
- xfree (savename);
- savename = 0;
-}
-
-/* Open a connection to a remote debugger.
- FIXME, there should be "set" commands for the options that are
- now specified with gdb command-line options (old_protocol,
- and initial_brk). */
-void
-nindy_open (char *name, /* "/dev/ttyXX", "ttyXX", or "XX": tty to be opened */
- int from_tty)
-{
- char baudrate[1024];
-
- if (!name)
- error_no_arg ("serial port device name");
-
- target_preopen (from_tty);
-
- nindy_close (0);
-
- have_regs = regs_changed = 0;
-
- /* Allow user to interrupt the following -- we could hang if there's
- no NINDY at the other end of the remote tty. */
- immediate_quit++;
- /* If baud_rate is -1, then ninConnect will not recognize the baud rate
- and will deal with the situation in a (more or less) reasonable
- fashion. */
- sprintf (baudrate, "%d", baud_rate);
- ninConnect (name, baudrate,
- nindy_initial_brk, !from_tty, nindy_old_protocol);
- immediate_quit--;
-
- if (nindy_serial == NULL)
- {
- perror_with_name (name);
- }
-
- savename = savestring (name, strlen (name));
- push_target (&nindy_ops);
-
- target_fetch_registers (-1);
-
- init_thread_list ();
- init_wait_for_inferior ();
- clear_proceed_status ();
- normal_stop ();
-}
-
-/* User-initiated quit of nindy operations. */
-
-static void
-nindy_detach (char *name, int from_tty)
-{
- if (name)
- error ("Too many arguments");
- pop_target ();
-}
-
-static void
-nindy_files_info (void)
-{
- /* FIXME: this lies about the baud rate if we autobauded. */
- printf_unfiltered ("\tAttached to %s at %d bits per second%s%s.\n", savename,
- baud_rate,
- nindy_old_protocol ? " in old protocol" : "",
- nindy_initial_brk ? " with initial break" : "");
-}
-
-/* Return the number of characters in the buffer BUF before
- the first DLE character. N is maximum number of characters to
- consider. */
-
-static
-int
-non_dle (char *buf, int n)
-{
- int i;
-
- for (i = 0; i < n; i++)
- {
- if (buf[i] == DLE)
- {
- break;
- }
- }
- return i;
-}
-
-/* Tell the remote machine to resume. */
-
-void
-nindy_resume (ptid_t ptid, int step, enum target_signal siggnal)
-{
- if (siggnal != TARGET_SIGNAL_0 && siggnal != stop_signal)
- warning ("Can't send signals to remote NINDY targets.");
-
- if (regs_changed)
- {
- nindy_store_registers (-1);
- regs_changed = 0;
- }
- have_regs = 0;
- ninGo (step);
-}
-
-/* FIXME, we can probably use the normal terminal_inferior stuff here.
- We have to do terminal_inferior and then set up the passthrough
- settings initially. Thereafter, terminal_ours and terminal_inferior
- will automatically swap the settings around for us. */
-
-struct clean_up_tty_args
-{
- serial_ttystate state;
- struct serial *serial;
-};
-static struct clean_up_tty_args tty_args;
-
-static void
-clean_up_tty (PTR ptrarg)
-{
- struct clean_up_tty_args *args = (struct clean_up_tty_args *) ptrarg;
- serial_set_tty_state (args->serial, args->state);
- xfree (args->state);
- warning ("\n\nYou may need to reset the 80960 and/or reload your program.\n");
-}
-
-/* Recover from ^Z or ^C while remote process is running */
-static void (*old_ctrlc) ();
-#ifdef SIGTSTP
-static void (*old_ctrlz) ();
-#endif
-
-static void
-clean_up_int (void)
-{
- serial_set_tty_state (tty_args.serial, tty_args.state);
- xfree (tty_args.state);
-
- signal (SIGINT, old_ctrlc);
-#ifdef SIGTSTP
- signal (SIGTSTP, old_ctrlz);
-#endif
- error ("\n\nYou may need to reset the 80960 and/or reload your program.\n");
-}
-
-/* Wait until the remote machine stops. While waiting, operate in passthrough
- * mode; i.e., pass everything NINDY sends to gdb_stdout, and everything from
- * stdin to NINDY.
- *
- * Return to caller, storing status in 'status' just as `wait' would.
- */
-
-static ptid_t
-nindy_wait (ptid_t ptid, struct target_waitstatus *status)
-{
- fd_set fds;
- int c;
- char buf[2];
- int i, n;
- unsigned char stop_exit;
- unsigned char stop_code;
- struct cleanup *old_cleanups;
- long ip_value, fp_value, sp_value; /* Reg values from stop */
-
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = 0;
-
- /* OPERATE IN PASSTHROUGH MODE UNTIL NINDY SENDS A DLE CHARACTER */
-
- /* Save current tty attributes, and restore them when done. */
- tty_args.serial = serial_fdopen (0);
- tty_args.state = serial_get_tty_state (tty_args.serial);
- old_ctrlc = signal (SIGINT, clean_up_int);
-#ifdef SIGTSTP
- old_ctrlz = signal (SIGTSTP, clean_up_int);
-#endif
-
- old_cleanups = make_cleanup (clean_up_tty, &tty_args);
-
- /* Pass input from keyboard to NINDY as it arrives. NINDY will interpret
- <CR> and perform echo. */
- /* This used to set CBREAK and clear ECHO and CRMOD. I hope this is close
- enough. */
- serial_raw (tty_args.serial);
-
- while (1)
- {
- /* Input on remote */
- c = serial_readchar (nindy_serial, -1);
- if (c == SERIAL_ERROR)
- {
- error ("Cannot read from serial line");
- }
- else if (c == 0x1b) /* ESC */
- {
- c = serial_readchar (nindy_serial, -1);
- c &= ~0x40;
- }
- else if (c != 0x10) /* DLE */
- /* Write out any characters preceding DLE */
- {
- buf[0] = (char) c;
- write (1, buf, 1);
- }
- else
- {
- stop_exit = ninStopWhy (&stop_code,
- &ip_value, &fp_value, &sp_value);
- if (!stop_exit && (stop_code == STOP_SRQ))
- {
- immediate_quit++;
- ninSrq ();
- immediate_quit--;
- }
- else
- {
- /* Get out of loop */
- supply_register (IP_REGNUM,
- (char *) &ip_value);
- supply_register (FP_REGNUM,
- (char *) &fp_value);
- supply_register (SP_REGNUM,
- (char *) &sp_value);
- break;
- }
- }
- }
-
- serial_set_tty_state (tty_args.serial, tty_args.state);
- xfree (tty_args.state);
- discard_cleanups (old_cleanups);
-
- if (stop_exit)
- {
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = stop_code;
- }
- else
- {
- /* nindy has some special stop code need to be handled */
- if (stop_code == STOP_GDB_BPT)
- stop_code = TRACE_STEP;
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = i960_fault_to_signal (stop_code);
- }
- return inferior_ptid;
-}
-
-/* Read the remote registers into the block REGS. */
-
-/* This is the block that ninRegsGet and ninRegsPut handles. */
-struct nindy_regs
-{
- char local_regs[16 * 4];
- char global_regs[16 * 4];
- char pcw_acw[2 * 4];
- char ip[4];
- char tcw[4];
- char fp_as_double[4 * 8];
-};
-
-static void
-nindy_fetch_registers (int regno)
-{
- struct nindy_regs nindy_regs;
- int regnum;
-
- immediate_quit++;
- ninRegsGet ((char *) &nindy_regs);
- immediate_quit--;
-
- memcpy (&registers[REGISTER_BYTE (R0_REGNUM)], nindy_regs.local_regs, 16 * 4);
- memcpy (&registers[REGISTER_BYTE (G0_REGNUM)], nindy_regs.global_regs, 16 * 4);
- memcpy (&registers[REGISTER_BYTE (PCW_REGNUM)], nindy_regs.pcw_acw, 2 * 4);
- memcpy (&registers[REGISTER_BYTE (IP_REGNUM)], nindy_regs.ip, 1 * 4);
- memcpy (&registers[REGISTER_BYTE (TCW_REGNUM)], nindy_regs.tcw, 1 * 4);
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], nindy_regs.fp_as_double, 4 * 8);
-
- registers_fetched ();
-}
-
-static void
-nindy_prepare_to_store (void)
-{
- /* Fetch all regs if they aren't already here. */
- read_register_bytes (0, NULL, REGISTER_BYTES);
-}
-
-static void
-nindy_store_registers (int regno)
-{
- struct nindy_regs nindy_regs;
- int regnum;
-
- memcpy (nindy_regs.local_regs, &registers[REGISTER_BYTE (R0_REGNUM)], 16 * 4);
- memcpy (nindy_regs.global_regs, &registers[REGISTER_BYTE (G0_REGNUM)], 16 * 4);
- memcpy (nindy_regs.pcw_acw, &registers[REGISTER_BYTE (PCW_REGNUM)], 2 * 4);
- memcpy (nindy_regs.ip, &registers[REGISTER_BYTE (IP_REGNUM)], 1 * 4);
- memcpy (nindy_regs.tcw, &registers[REGISTER_BYTE (TCW_REGNUM)], 1 * 4);
- memcpy (nindy_regs.fp_as_double, &registers[REGISTER_BYTE (FP0_REGNUM)], 8 * 4);
-
- immediate_quit++;
- ninRegsPut ((char *) &nindy_regs);
- immediate_quit--;
-}
-
-/* Copy LEN bytes to or from inferior's memory starting at MEMADDR
- to debugger memory starting at MYADDR. Copy to inferior if
- SHOULD_WRITE is nonzero. Returns the length copied. TARGET is
- unused. */
-
-int
-nindy_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
- int should_write, struct mem_attrib *attrib,
- struct target_ops *target)
-{
- int res;
-
- if (len <= 0)
- return 0;
-
- if (should_write)
- res = ninMemPut (memaddr, myaddr, len);
- else
- res = ninMemGet (memaddr, myaddr, len);
-
- return res;
-}
-
-static void
-nindy_create_inferior (char *execfile, char *args, char **env)
-{
- int entry_pt;
- int pid;
-
- if (args && *args)
- error ("Can't pass arguments to remote NINDY process");
-
- if (execfile == 0 || exec_bfd == 0)
- error ("No executable file specified");
-
- entry_pt = (int) bfd_get_start_address (exec_bfd);
-
- pid = 42;
-
- /* 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 ();
-
- /* insert_step_breakpoint (); FIXME, do we need this? */
- /* Let 'er rip... */
- proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0);
-}
-
-static void
-reset_command (char *args, int from_tty)
-{
- if (nindy_serial == NULL)
- {
- error ("No target system to reset -- use 'target nindy' command.");
- }
- if (query ("Really reset the target system?", 0, 0))
- {
- serial_send_break (nindy_serial);
- tty_flush (nindy_serial);
- }
-}
-
-void
-nindy_kill (char *args, int from_tty)
-{
- return; /* Ignore attempts to kill target system */
-}
-
-/* Clean up when a program exits.
-
- The program actually lives on in the remote processor's RAM, and may be
- run again without a download. Don't leave it full of breakpoint
- instructions. */
-
-void
-nindy_mourn_inferior (void)
-{
- remove_breakpoints ();
- unpush_target (&nindy_ops);
- generic_mourn_inferior (); /* Do all the proper things now */
-}
-
-/* Pass the args the way catch_errors wants them. */
-static int
-nindy_open_stub (char *arg)
-{
- nindy_open (arg, 1);
- return 1;
-}
-
-static void
-nindy_load (char *filename, int from_tty)
-{
- asection *s;
- /* Can't do unix style forking on a VMS system, so we'll use bfd to do
- all the work for us
- */
-
- bfd *file = bfd_openr (filename, 0);
- if (!file)
- {
- perror_with_name (filename);
- return;
- }
-
- if (!bfd_check_format (file, bfd_object))
- {
- error ("can't prove it's an object file\n");
- return;
- }
-
- for (s = file->sections; s; s = s->next)
- {
- if (s->flags & SEC_LOAD)
- {
- char *buffer = xmalloc (s->_raw_size);
- bfd_get_section_contents (file, s, buffer, 0, s->_raw_size);
- printf ("Loading section %s, size %x vma %x\n",
- s->name,
- s->_raw_size,
- s->vma);
- ninMemPut (s->vma, buffer, s->_raw_size);
- xfree (buffer);
- }
- }
- bfd_close (file);
-}
-
-static int
-load_stub (char *arg)
-{
- target_load (arg, 1);
- return 1;
-}
-
-/* This routine is run as a hook, just before the main command loop is
- entered. If gdb is configured for the i960, but has not had its
- nindy target specified yet, this will loop prompting the user to do so.
-
- Unlike the loop provided by Intel, we actually let the user get out
- of this with a RETURN. This is useful when e.g. simply examining
- an i960 object file on the host system. */
-
-void
-nindy_before_main_loop (void)
-{
- char ttyname[100];
- char *p, *p2;
-
- while (target_stack->target_ops != &nindy_ops) /* What is this crap??? */
- { /* remote tty not specified yet */
- if (instream == stdin)
- {
- printf_unfiltered ("\nAttach /dev/ttyNN -- specify NN, or \"quit\" to quit: ");
- gdb_flush (gdb_stdout);
- }
- fgets (ttyname, sizeof (ttyname) - 1, stdin);
-
- /* Strip leading and trailing whitespace */
- for (p = ttyname; isspace (*p); p++)
- {
- ;
- }
- if (*p == '\0')
- {
- return; /* User just hit spaces or return, wants out */
- }
- for (p2 = p; !isspace (*p2) && (*p2 != '\0'); p2++)
- {
- ;
- }
- *p2 = '\0';
- if (STREQ ("quit", p))
- {
- exit (1);
- }
-
- if (catch_errors (nindy_open_stub, p, "", RETURN_MASK_ALL))
- {
- /* Now that we have a tty open for talking to the remote machine,
- download the executable file if one was specified. */
- if (exec_bfd)
- {
- catch_errors (load_stub, bfd_get_filename (exec_bfd), "",
- RETURN_MASK_ALL);
- }
- }
- }
-}
-
-/* Define the target subroutine names */
-
-struct target_ops nindy_ops;
-
-static void
-init_nindy_ops (void)
-{
- nindy_ops.to_shortname = "nindy";
- "Remote serial target in i960 NINDY-specific protocol",
- nindy_ops.to_longname = "Use a remote i960 system running NINDY connected by a serial line.\n\
-Specify the name of the device the serial line is connected to.\n\
-The speed (baud rate), whether to use the old NINDY protocol,\n\
-and whether to send a break on startup, are controlled by options\n\
-specified when you started GDB.";
- nindy_ops.to_doc = "";
- nindy_ops.to_open = nindy_open;
- nindy_ops.to_close = nindy_close;
- nindy_ops.to_attach = 0;
- nindy_ops.to_post_attach = NULL;
- nindy_ops.to_require_attach = NULL;
- nindy_ops.to_detach = nindy_detach;
- nindy_ops.to_require_detach = NULL;
- nindy_ops.to_resume = nindy_resume;
- nindy_ops.to_wait = nindy_wait;
- nindy_ops.to_post_wait = NULL;
- nindy_ops.to_fetch_registers = nindy_fetch_registers;
- nindy_ops.to_store_registers = nindy_store_registers;
- nindy_ops.to_prepare_to_store = nindy_prepare_to_store;
- nindy_ops.to_xfer_memory = nindy_xfer_inferior_memory;
- nindy_ops.to_files_info = nindy_files_info;
- nindy_ops.to_insert_breakpoint = memory_insert_breakpoint;
- nindy_ops.to_remove_breakpoint = memory_remove_breakpoint;
- nindy_ops.to_terminal_init = 0;
- nindy_ops.to_terminal_inferior = 0;
- nindy_ops.to_terminal_ours_for_output = 0;
- nindy_ops.to_terminal_ours = 0;
- nindy_ops.to_terminal_info = 0; /* Terminal crud */
- nindy_ops.to_kill = nindy_kill;
- nindy_ops.to_load = nindy_load;
- nindy_ops.to_lookup_symbol = 0; /* lookup_symbol */
- nindy_ops.to_create_inferior = nindy_create_inferior;
- nindy_ops.to_post_startup_inferior = NULL;
- nindy_ops.to_acknowledge_created_inferior = NULL;
- nindy_ops.to_clone_and_follow_inferior = NULL;
- nindy_ops.to_post_follow_inferior_by_clone = NULL;
- nindy_ops.to_insert_fork_catchpoint = NULL;
- nindy_ops.to_remove_fork_catchpoint = NULL;
- nindy_ops.to_insert_vfork_catchpoint = NULL;
- nindy_ops.to_remove_vfork_catchpoint = NULL;
- nindy_ops.to_has_forked = NULL;
- nindy_ops.to_has_vforked = NULL;
- nindy_ops.to_can_follow_vfork_prior_to_exec = NULL;
- nindy_ops.to_post_follow_vfork = NULL;
- nindy_ops.to_insert_exec_catchpoint = NULL;
- nindy_ops.to_remove_exec_catchpoint = NULL;
- nindy_ops.to_has_execd = NULL;
- nindy_ops.to_reported_exec_events_per_exec_call = NULL;
- nindy_ops.to_has_exited = NULL;
- nindy_ops.to_mourn_inferior = nindy_mourn_inferior;
- nindy_ops.to_can_run = 0; /* can_run */
- nindy_ops.to_notice_signals = 0; /* notice_signals */
- nindy_ops.to_thread_alive = 0; /* to_thread_alive */
- nindy_ops.to_stop = 0; /* to_stop */
- nindy_ops.to_pid_to_exec_file = NULL;
- nindy_ops.to_stratum = process_stratum;
- nindy_ops.DONT_USE = 0; /* next */
- nindy_ops.to_has_all_memory = 1;
- nindy_ops.to_has_memory = 1;
- nindy_ops.to_has_stack = 1;
- nindy_ops.to_has_registers = 1;
- nindy_ops.to_has_execution = 1; /* all mem, mem, stack, regs, exec */
- nindy_ops.to_sections = 0;
- nindy_ops.to_sections_end = 0; /* Section pointers */
- nindy_ops.to_magic = OPS_MAGIC; /* Always the last thing */
-}
-
-void
-_initialize_nindy (void)
-{
- init_nindy_ops ();
- add_target (&nindy_ops);
- add_com ("reset", class_obscure, reset_command,
- "Send a 'break' to the remote target system.\n\
-Only useful if the target has been equipped with a circuit\n\
-to perform a hard reset when a break is detected.");
-}
diff --git a/contrib/gdb/gdb/remote-nrom.c b/contrib/gdb/gdb/remote-nrom.c
deleted file mode 100644
index 436c3d272a6e..000000000000
--- a/contrib/gdb/gdb/remote-nrom.c
+++ /dev/null
@@ -1,351 +0,0 @@
-/* Remote debugging with the XLNT Designs, Inc (XDI) NetROM.
- Copyright 1990, 1991, 1992, 1995, 1998, 1999, 2000
- Free Software Foundation, Inc.
- Contributed by:
- Roger Moyers
- XLNT Designs, Inc.
- 15050 Avenue of Science, Suite 106
- San Diego, CA 92128
- (619)487-9320
- roger@xlnt.com
- Adapted from work done at Cygnus Support in remote-nindy.c,
- later merged in by Stan Shebs at Cygnus.
-
- 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 "gdbcmd.h"
-#include "serial.h"
-#include "target.h"
-
-/* Default ports used to talk with the NetROM. */
-
-#define DEFAULT_NETROM_LOAD_PORT 1236
-#define DEFAULT_NETROM_CONTROL_PORT 1237
-
-static void nrom_close (int quitting);
-
-/* New commands. */
-
-static void nrom_passthru (char *, int);
-
-/* We talk to the NetROM over these sockets. */
-
-static struct serial *load_desc = NULL;
-static struct serial *ctrl_desc = NULL;
-
-static int load_port = DEFAULT_NETROM_LOAD_PORT;
-static int control_port = DEFAULT_NETROM_CONTROL_PORT;
-
-static char nrom_hostname[100];
-
-/* Forward data declaration. */
-
-extern struct target_ops nrom_ops;
-
-/* Scan input from the remote system, until STRING is found. Print chars that
- don't match. */
-
-static int
-expect (char *string)
-{
- char *p = string;
- int c;
-
- immediate_quit++;
-
- while (1)
- {
- c = serial_readchar (ctrl_desc, 5);
-
- if (c == *p++)
- {
- if (*p == '\0')
- {
- immediate_quit--;
- return 0;
- }
- }
- else
- {
- fputc_unfiltered (c, gdb_stdout);
- p = string;
- if (c == *p)
- p++;
- }
- }
-}
-
-static void
-nrom_kill (void)
-{
- nrom_close (0);
-}
-
-static struct serial *
-open_socket (char *name, int port)
-{
- char sockname[100];
- struct serial *desc;
-
- sprintf (sockname, "%s:%d", name, port);
- desc = serial_open (sockname);
- if (!desc)
- perror_with_name (sockname);
-
- return desc;
-}
-
-static void
-load_cleanup (void)
-{
- serial_close (load_desc);
- load_desc = NULL;
-}
-
-/* Download a file specified in ARGS to the netROM. */
-
-static void
-nrom_load (char *args, int fromtty)
-{
- int fd, rd_amt, fsize;
- bfd *pbfd;
- asection *section;
- char *downloadstring = "download 0\n";
- struct cleanup *old_chain;
-
- /* Tell the netrom to get ready to download. */
- if (serial_write (ctrl_desc, downloadstring, strlen (downloadstring)))
- error ("nrom_load: control_send() of `%s' failed", downloadstring);
-
- expect ("Waiting for a connection...\n");
-
- load_desc = open_socket (nrom_hostname, load_port);
-
- old_chain = make_cleanup (load_cleanup, 0);
-
- pbfd = bfd_openr (args, 0);
-
- if (pbfd)
- {
- make_cleanup (bfd_close, pbfd);
-
- if (!bfd_check_format (pbfd, bfd_object))
- error ("\"%s\": not in executable format: %s",
- args, bfd_errmsg (bfd_get_error ()));
-
- for (section = pbfd->sections; section; section = section->next)
- {
- if (bfd_get_section_flags (pbfd, section) & SEC_ALLOC)
- {
- bfd_vma section_address;
- unsigned long section_size;
- const char *section_name;
-
- section_name = bfd_get_section_name (pbfd, section);
- section_address = bfd_get_section_vma (pbfd, section);
- section_size = bfd_section_size (pbfd, section);
-
- if (bfd_get_section_flags (pbfd, section) & SEC_LOAD)
- {
- file_ptr fptr;
-
- printf_filtered ("[Loading section %s at %x (%d bytes)]\n",
- section_name, section_address,
- section_size);
-
- fptr = 0;
-
- while (section_size > 0)
- {
- char buffer[1024];
- int count;
-
- count = min (section_size, 1024);
-
- bfd_get_section_contents (pbfd, section, buffer, fptr,
- count);
-
- serial_write (load_desc, buffer, count);
- section_address += count;
- fptr += count;
- section_size -= count;
- }
- }
- else
- /* BSS and such */
- {
- printf_filtered ("[section %s: not loading]\n",
- section_name);
- }
- }
- }
- }
- else
- error ("\"%s\": Could not open", args);
-
- do_cleanups (old_chain);
-}
-
-/* Open a connection to the remote NetROM devices. */
-
-static void
-nrom_open (char *name, int from_tty)
-{
- int errn;
-
- if (!name || strchr (name, '/') || strchr (name, ':'))
- error (
- "To open a NetROM connection, you must specify the hostname\n\
-or IP address of the NetROM device you wish to use.");
-
- strcpy (nrom_hostname, name);
-
- target_preopen (from_tty);
-
- unpush_target (&nrom_ops);
-
- ctrl_desc = open_socket (nrom_hostname, control_port);
-
- push_target (&nrom_ops);
-
- if (from_tty)
- printf_filtered ("Connected to NetROM device \"%s\"\n", nrom_hostname);
-}
-
-/* Close out all files and local state before this target loses control. */
-
-static void
-nrom_close (int quitting)
-{
- if (load_desc)
- serial_close (load_desc);
- if (ctrl_desc)
- serial_close (ctrl_desc);
-}
-
-/* Pass arguments directly to the NetROM. */
-
-static void
-nrom_passthru (char *args, int fromtty)
-{
- char buf[1024];
-
- sprintf (buf, "%s\n", args);
- if (serial_write (ctrl_desc, buf, strlen (buf)))
- error ("nrom_reset: control_send() of `%s'failed", args);
-}
-
-static void
-nrom_mourn (void)
-{
- unpush_target (&nrom_ops);
- generic_mourn_inferior ();
-}
-
-/* Define the target vector. */
-
-struct target_ops nrom_ops;
-
-static void
-init_nrom_ops (void)
-{
- nrom_ops.to_shortname = "nrom";
- nrom_ops.to_longname = "Remote XDI `NetROM' target";
- nrom_ops.to_doc = "Remote debug using a NetROM over Ethernet";
- nrom_ops.to_open = nrom_open;
- nrom_ops.to_close = nrom_close;
- nrom_ops.to_attach = NULL;
- nrom_ops.to_post_attach = NULL;
- nrom_ops.to_require_attach = NULL;
- nrom_ops.to_detach = NULL;
- nrom_ops.to_require_detach = NULL;
- nrom_ops.to_resume = NULL;
- nrom_ops.to_wait = NULL;
- nrom_ops.to_post_wait = NULL;
- nrom_ops.to_fetch_registers = NULL;
- nrom_ops.to_store_registers = NULL;
- nrom_ops.to_prepare_to_store = NULL;
- nrom_ops.to_xfer_memory = NULL;
- nrom_ops.to_files_info = NULL;
- nrom_ops.to_insert_breakpoint = NULL;
- nrom_ops.to_remove_breakpoint = NULL;
- nrom_ops.to_terminal_init = NULL;
- nrom_ops.to_terminal_inferior = NULL;
- nrom_ops.to_terminal_ours_for_output = NULL;
- nrom_ops.to_terminal_ours = NULL;
- nrom_ops.to_terminal_info = NULL;
- nrom_ops.to_kill = nrom_kill;
- nrom_ops.to_load = nrom_load;
- nrom_ops.to_lookup_symbol = NULL;
- nrom_ops.to_create_inferior = NULL;
- nrom_ops.to_post_startup_inferior = NULL;
- nrom_ops.to_acknowledge_created_inferior = NULL;
- nrom_ops.to_clone_and_follow_inferior = NULL;
- nrom_ops.to_post_follow_inferior_by_clone = NULL;
- nrom_ops.to_insert_fork_catchpoint = NULL;
- nrom_ops.to_remove_fork_catchpoint = NULL;
- nrom_ops.to_insert_vfork_catchpoint = NULL;
- nrom_ops.to_remove_vfork_catchpoint = NULL;
- nrom_ops.to_has_forked = NULL;
- nrom_ops.to_has_vforked = NULL;
- nrom_ops.to_can_follow_vfork_prior_to_exec = NULL;
- nrom_ops.to_post_follow_vfork = NULL;
- nrom_ops.to_insert_exec_catchpoint = NULL;
- nrom_ops.to_remove_exec_catchpoint = NULL;
- nrom_ops.to_has_execd = NULL;
- nrom_ops.to_reported_exec_events_per_exec_call = NULL;
- nrom_ops.to_has_exited = NULL;
- nrom_ops.to_mourn_inferior = nrom_mourn;
- nrom_ops.to_can_run = NULL;
- nrom_ops.to_notice_signals = 0;
- nrom_ops.to_thread_alive = 0;
- nrom_ops.to_stop = 0;
- nrom_ops.to_pid_to_exec_file = NULL;
- nrom_ops.to_stratum = download_stratum;
- nrom_ops.DONT_USE = NULL;
- nrom_ops.to_has_all_memory = 1;
- nrom_ops.to_has_memory = 1;
- nrom_ops.to_has_stack = 1;
- nrom_ops.to_has_registers = 1;
- nrom_ops.to_has_execution = 0;
- nrom_ops.to_sections = NULL;
- nrom_ops.to_sections_end = NULL;
- nrom_ops.to_magic = OPS_MAGIC;
-}
-
-void
-_initialize_remote_nrom (void)
-{
- init_nrom_ops ();
- add_target (&nrom_ops);
-
- add_show_from_set (
- add_set_cmd ("nrom_load_port", no_class, var_zinteger, (char *) &load_port,
- "Set the port to use for NetROM downloads\n", &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("nrom_control_port", no_class, var_zinteger, (char *) &control_port,
- "Set the port to use for NetROM debugger services\n", &setlist),
- &showlist);
-
- add_cmd ("nrom", no_class, nrom_passthru,
- "Pass arguments as command to NetROM",
- &cmdlist);
-}
diff --git a/contrib/gdb/gdb/remote-os9k.c b/contrib/gdb/gdb/remote-os9k.c
deleted file mode 100644
index 2cedfb00527f..000000000000
--- a/contrib/gdb/gdb/remote-os9k.c
+++ /dev/null
@@ -1,1230 +0,0 @@
-/* Remote debugging interface for boot monitors, for GDB.
-
- Copyright 1990, 1991, 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. */
-
-/* This file was derived from remote-eb.c, which did a similar job, but for
- an AMD-29K running EBMON. That file was in turn derived from remote.c
- as mentioned in the following comment (left in for comic relief):
-
- "This is like remote.c but is for a different situation--
- having a PC running os9000 hook up with a unix machine with
- a serial line, and running ctty com2 on the PC. os9000 has a debug
- monitor called ROMBUG running. Not to mention that the PC
- has PC/NFS, so it can access the same executables that gdb can,
- over the net in real time."
-
- In reality, this module talks to a debug monitor called 'ROMBUG', which
- We communicate with ROMBUG via a direct serial line, the network version
- of ROMBUG is not available yet.
- */
-
-/* FIXME This file needs to be rewritten if it's to work again, either
- to self-contained or to use the new monitor interface. */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "gdb_string.h"
-#include <sys/types.h>
-#include "command.h"
-#include "serial.h"
-#include "monitor.h"
-#include "remote-utils.h"
-#include "symtab.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "gdb-stabs.h"
-#include "regcache.h"
-
-struct cmd_list_element *showlist;
-extern struct target_ops rombug_ops; /* Forward declaration */
-extern struct monitor_ops rombug_cmds; /* Forward declaration */
-extern struct cmd_list_element *setlist;
-extern struct cmd_list_element *unsetlist;
-extern int attach_flag;
-
-static void rombug_close ();
-static void rombug_fetch_register ();
-static void rombug_fetch_registers ();
-static void rombug_store_register ();
-#if 0
-static int sr_get_debug (); /* flag set by "set remotedebug" */
-#endif
-static int hashmark; /* flag set by "set hash" */
-static int rombug_is_open = 0;
-
-/* FIXME: Replace with sr_get_debug (). */
-#define LOG_FILE "monitor.log"
-FILE *log_file;
-static int monitor_log = 0;
-static int tty_xon = 0;
-static int tty_xoff = 0;
-
-static int timeout = 10;
-static int is_trace_mode = 0;
-/* Descriptor for I/O to remote machine. Initialize it to NULL */
-static struct serial *monitor_desc = NULL;
-
-static CORE_ADDR bufaddr = 0;
-static int buflen = 0;
-static char readbuf[16];
-
-/* Send data to monitor. Works just like printf. */
-static void
-printf_monitor (char *pattern,...)
-{
- va_list args;
- char buf[200];
- int i;
-
- va_start (args, pattern);
-
- vsprintf (buf, pattern, args);
- va_end (args);
-
- if (serial_write (monitor_desc, buf, strlen (buf)))
- fprintf (stderr, "serial_write failed: %s\n", safe_strerror (errno));
-}
-
-/* Read a character from the remote system, doing all the fancy timeout stuff */
-static int
-readchar (int timeout)
-{
- int c;
-
- c = serial_readchar (monitor_desc, timeout);
-
- if (sr_get_debug ())
- putchar (c & 0x7f);
-
- if (monitor_log && isascii (c))
- putc (c & 0x7f, log_file);
-
- if (c >= 0)
- return c & 0x7f;
-
- if (c == SERIAL_TIMEOUT)
- {
- if (timeout == 0)
- return c; /* Polls shouldn't generate timeout errors */
-
- error ("Timeout reading from remote system.");
- }
-
- perror_with_name ("remote-monitor");
-}
-
-/* Scan input from the remote system, until STRING is found. If DISCARD is
- non-zero, then discard non-matching input, else print it out.
- Let the user break out immediately. */
-static void
-expect (char *string, int discard)
-{
- char *p = string;
- int c;
-
- if (sr_get_debug ())
- printf ("Expecting \"%s\"\n", string);
-
- immediate_quit++;
- while (1)
- {
- c = readchar (timeout);
- if (!isascii (c))
- continue;
- if (c == *p++)
- {
- if (*p == '\0')
- {
- immediate_quit--;
- if (sr_get_debug ())
- printf ("\nMatched\n");
- return;
- }
- }
- else
- {
- if (!discard)
- {
- fwrite (string, 1, (p - 1) - string, stdout);
- putchar ((char) c);
- fflush (stdout);
- }
- p = string;
- }
- }
-}
-
-/* Keep discarding input until we see the ROMBUG prompt.
-
- The convention for dealing with the prompt is that you
- o give your command
- o *then* wait for the prompt.
-
- Thus the last thing that a procedure does with the serial line
- will be an expect_prompt(). Exception: rombug_resume does not
- wait for the prompt, because the terminal is being handed over
- to the inferior. However, the next thing which happens after that
- is a rombug_wait which does wait for the prompt.
- Note that this includes abnormal exit, e.g. error(). This is
- necessary to prevent getting into states from which we can't
- recover. */
-static void
-expect_prompt (int discard)
-{
- if (monitor_log)
- /* 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);
-
- if (is_trace_mode)
- {
- expect ("trace", discard);
- }
- else
- {
- expect (PROMPT, discard);
- }
-}
-
-/* Get a hex digit from the remote system & return its value.
- If ignore_space is nonzero, ignore spaces (not newline, tab, etc). */
-static int
-get_hex_digit (int ignore_space)
-{
- int ch;
- while (1)
- {
- ch = readchar (timeout);
- if (ch >= '0' && ch <= '9')
- return ch - '0';
- else if (ch >= 'A' && ch <= 'F')
- return ch - 'A' + 10;
- else if (ch >= 'a' && ch <= 'f')
- return ch - 'a' + 10;
- else if (ch == ' ' && ignore_space)
- ;
- else
- {
- expect_prompt (1);
- error ("Invalid hex digit from remote system.");
- }
- }
-}
-
-/* Get a byte from monitor and put it in *BYT. Accept any number
- leading spaces. */
-static void
-get_hex_byte (char *byt)
-{
- int val;
-
- val = get_hex_digit (1) << 4;
- val |= get_hex_digit (0);
- *byt = val;
-}
-
-/* Get N 32-bit words from remote, each preceded by a space,
- and put them in registers starting at REGNO. */
-static void
-get_hex_regs (int n, int regno)
-{
- long val;
- int i;
- unsigned char b;
-
- for (i = 0; i < n; i++)
- {
- int j;
-
- val = 0;
- for (j = 0; j < 4; j++)
- {
- get_hex_byte (&b);
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- val = (val << 8) + b;
- else
- val = val + (b << (j * 8));
- }
- supply_register (regno++, (char *) &val);
- }
-}
-
-/* This is called not only when we first attach, but also when the
- user types "run" after having attached. */
-static void
-rombug_create_inferior (char *execfile, char *args, char **env)
-{
- int entry_pt;
-
- if (args && *args)
- error ("Can't pass arguments to remote ROMBUG process");
-
- if (execfile == 0 || exec_bfd == 0)
- error ("No executable file specified");
-
- entry_pt = (int) bfd_get_start_address (exec_bfd);
-
- if (monitor_log)
- fputs ("\nIn Create_inferior()", log_file);
-
-
-/* The "process" (board) is already stopped awaiting our commands, and
- the program is already downloaded. We just set its PC and go. */
-
- init_wait_for_inferior ();
- proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0);
-}
-
-/* Open a connection to a remote debugger.
- NAME is the filename used for communication. */
-
-static char dev_name[100];
-
-static void
-rombug_open (char *args, int from_tty)
-{
- if (args == NULL)
- error ("Use `target RomBug DEVICE-NAME' to use a serial port, or \n\
-`target RomBug HOST-NAME:PORT-NUMBER' to use a network connection.");
-
- target_preopen (from_tty);
-
- if (rombug_is_open)
- unpush_target (&rombug_ops);
-
- strcpy (dev_name, args);
- monitor_desc = serial_open (dev_name);
- if (monitor_desc == NULL)
- perror_with_name (dev_name);
-
- /* if baud rate is set by 'set remotebaud' */
- if (serial_setbaudrate (monitor_desc, sr_get_baud_rate ()))
- {
- serial_close (monitor_desc);
- perror_with_name ("RomBug");
- }
- serial_raw (monitor_desc);
- if (tty_xon || tty_xoff)
- {
- struct hardware_ttystate
- {
- struct termios t;
- }
- *tty_s;
-
- tty_s = (struct hardware_ttystate *) serial_get_tty_state (monitor_desc);
- if (tty_xon)
- tty_s->t.c_iflag |= IXON;
- if (tty_xoff)
- tty_s->t.c_iflag |= IXOFF;
- serial_set_tty_state (monitor_desc, (serial_ttystate) tty_s);
- }
-
- rombug_is_open = 1;
-
- log_file = fopen (LOG_FILE, "w");
- if (log_file == NULL)
- perror_with_name (LOG_FILE);
-
- push_monitor (&rombug_cmds);
- printf_monitor ("\r"); /* CR wakes up monitor */
- expect_prompt (1);
- push_target (&rombug_ops);
- attach_flag = 1;
-
- if (from_tty)
- printf ("Remote %s connected to %s\n", target_shortname,
- dev_name);
-
- rombug_fetch_registers ();
-
- printf_monitor ("ov e \r");
- expect_prompt (1);
- bufaddr = 0;
- buflen = 0;
-}
-
-/*
- * Close out all files and local state before this target loses control.
- */
-
-static void
-rombug_close (int quitting)
-{
- if (rombug_is_open)
- {
- serial_close (monitor_desc);
- monitor_desc = NULL;
- rombug_is_open = 0;
- }
-
- if (log_file)
- {
- if (ferror (log_file))
- fprintf (stderr, "Error writing log file.\n");
- if (fclose (log_file) != 0)
- fprintf (stderr, "Error closing log file.\n");
- log_file = 0;
- }
-}
-
-int
-rombug_link (char *mod_name, CORE_ADDR *text_reloc)
-{
- int i, j;
- unsigned long val;
- unsigned char b;
-
- printf_monitor ("l %s \r", mod_name);
- expect_prompt (1);
- printf_monitor (".r \r");
- expect (REG_DELIM, 1);
- for (i = 0; i <= 7; i++)
- {
- val = 0;
- for (j = 0; j < 4; j++)
- {
- get_hex_byte (&b);
- val = (val << 8) + b;
- }
- }
- expect_prompt (1);
- *text_reloc = val;
- return 1;
-}
-
-/* Terminate the open connection to the remote debugger.
- Use this when you want to detach and do something else
- with your gdb. */
-static void
-rombug_detach (int from_tty)
-{
- if (attach_flag)
- {
- printf_monitor (GO_CMD);
- attach_flag = 0;
- }
- pop_target (); /* calls rombug_close to do the real work */
- if (from_tty)
- printf ("Ending remote %s debugging\n", target_shortname);
-}
-
-/*
- * Tell the remote machine to resume.
- */
-static void
-rombug_resume (ptid_t ptid, int step, enum target_signal sig)
-{
- if (monitor_log)
- fprintf (log_file, "\nIn Resume (step=%d, sig=%d)\n", step, sig);
-
- if (step)
- {
- is_trace_mode = 1;
- printf_monitor (STEP_CMD);
- /* wait for the echo. **
- expect (STEP_CMD, 1);
- */
- }
- else
- {
- printf_monitor (GO_CMD);
- /* swallow the echo. **
- expect (GO_CMD, 1);
- */
- }
- bufaddr = 0;
- buflen = 0;
-}
-
-/*
- * Wait until the remote machine stops, then return,
- * storing status in status just as `wait' would.
- */
-
-static ptid *
-rombug_wait (ptid_t ptid, struct target_waitstatus *status)
-{
- int old_timeout = timeout;
- struct section_offsets *offs;
- CORE_ADDR addr, pc;
- struct obj_section *obj_sec;
-
- if (monitor_log)
- fputs ("\nIn wait ()", log_file);
-
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = 0;
-
- timeout = -1; /* Don't time out -- user program is running. */
- expect ("eax:", 0); /* output any message before register display */
- expect_prompt (1); /* Wait for prompt, outputting extraneous text */
-
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
- timeout = old_timeout;
- rombug_fetch_registers ();
- bufaddr = 0;
- buflen = 0;
- pc = read_register (PC_REGNUM);
- addr = read_register (DATABASE_REG);
- obj_sec = find_pc_section (pc);
- if (obj_sec != NULL)
- {
- if (obj_sec->objfile != symfile_objfile)
- new_symfile_objfile (obj_sec->objfile, 1, 0);
- offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
- memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
- offs->offsets[SECT_OFF_DATA (symfile_objfile)] = addr;
- offs->offsets[SECT_OFF_BSS (symfile_objfile)] = addr;
-
- objfile_relocate (symfile_objfile, offs);
- }
-
- return inferior_ptid;
-}
-
-/* Return the name of register number regno in the form input and output by
- monitor. Currently, register_names just happens to contain exactly what
- monitor wants. Lets take advantage of that just as long as possible! */
-
-static char *
-get_reg_name (int regno)
-{
- static char buf[50];
- char *p;
- char *b;
-
- b = buf;
-
- if (regno < 0)
- return ("");
-/*
- for (p = REGISTER_NAME (regno); *p; p++)
- *b++ = toupper(*p);
- *b = '\000';
- */
- p = (char *) REGISTER_NAME (regno);
- return p;
-/*
- return buf;
- */
-}
-
-/* read the remote registers into the block regs. */
-
-static void
-rombug_fetch_registers (void)
-{
- int regno, j, i;
- long val;
- unsigned char b;
-
- printf_monitor (GET_REG);
- expect ("eax:", 1);
- expect ("\n", 1);
- get_hex_regs (1, 0);
- get_hex_regs (1, 3);
- get_hex_regs (1, 1);
- get_hex_regs (1, 2);
- get_hex_regs (1, 6);
- get_hex_regs (1, 7);
- get_hex_regs (1, 5);
- get_hex_regs (1, 4);
- for (regno = 8; regno <= 15; regno++)
- {
- expect (REG_DELIM, 1);
- if (regno >= 8 && regno <= 13)
- {
- val = 0;
- for (j = 0; j < 2; j++)
- {
- get_hex_byte (&b);
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- val = (val << 8) + b;
- else
- val = val + (b << (j * 8));
- }
-
- if (regno == 8)
- i = 10;
- if (regno >= 9 && regno <= 12)
- i = regno + 3;
- if (regno == 13)
- i = 11;
- supply_register (i, (char *) &val);
- }
- else if (regno == 14)
- {
- get_hex_regs (1, PC_REGNUM);
- }
- else if (regno == 15)
- {
- get_hex_regs (1, 9);
- }
- else
- {
- val = 0;
- supply_register (regno, (char *) &val);
- }
- }
- is_trace_mode = 0;
- expect_prompt (1);
-}
-
-/* Fetch register REGNO, or all registers if REGNO is -1.
- Returns errno value. */
-static void
-rombug_fetch_register (int regno)
-{
- int val, j;
- unsigned char b;
-
- if (monitor_log)
- {
- fprintf (log_file, "\nIn Fetch Register (reg=%s)\n", get_reg_name (regno));
- fflush (log_file);
- }
-
- if (regno < 0)
- {
- rombug_fetch_registers ();
- }
- else
- {
- char *name = get_reg_name (regno);
- printf_monitor (GET_REG);
- if (regno >= 10 && regno <= 15)
- {
- expect ("\n", 1);
- expect ("\n", 1);
- expect (name, 1);
- expect (REG_DELIM, 1);
- val = 0;
- for (j = 0; j < 2; j++)
- {
- get_hex_byte (&b);
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- val = (val << 8) + b;
- else
- val = val + (b << (j * 8));
- }
- supply_register (regno, (char *) &val);
- }
- else if (regno == 8 || regno == 9)
- {
- expect ("\n", 1);
- expect ("\n", 1);
- expect ("\n", 1);
- expect (name, 1);
- expect (REG_DELIM, 1);
- get_hex_regs (1, regno);
- }
- else
- {
- expect (name, 1);
- expect (REG_DELIM, 1);
- expect ("\n", 1);
- get_hex_regs (1, 0);
- get_hex_regs (1, 3);
- get_hex_regs (1, 1);
- get_hex_regs (1, 2);
- get_hex_regs (1, 6);
- get_hex_regs (1, 7);
- get_hex_regs (1, 5);
- get_hex_regs (1, 4);
- }
- expect_prompt (1);
- }
- return;
-}
-
-/* Store the remote registers from the contents of the block REGS. */
-
-static void
-rombug_store_registers (void)
-{
- int regno;
-
- for (regno = 0; regno <= PC_REGNUM; regno++)
- rombug_store_register (regno);
-
- registers_changed ();
-}
-
-/* Store register REGNO, or all if REGNO == 0.
- return errno value. */
-static void
-rombug_store_register (int regno)
-{
- char *name;
-
- if (monitor_log)
- fprintf (log_file, "\nIn Store_register (regno=%d)\n", regno);
-
- if (regno == -1)
- rombug_store_registers ();
- else
- {
- if (sr_get_debug ())
- printf ("Setting register %s to 0x%x\n", get_reg_name (regno), read_register (regno));
-
- name = get_reg_name (regno);
- if (name == 0)
- return;
- printf_monitor (SET_REG, name, read_register (regno));
-
- is_trace_mode = 0;
- expect_prompt (1);
- }
-}
-
-/* Get ready to modify the registers array. On machines which store
- individual registers, this doesn't need to do anything. On machines
- which store all the registers in one fell swoop, this makes sure
- that registers contains all the registers from the program being
- debugged. */
-
-static void
-rombug_prepare_to_store (void)
-{
- /* Do nothing, since we can store individual regs */
-}
-
-static void
-rombug_files_info (void)
-{
- printf ("\tAttached to %s at %d baud.\n",
- dev_name, sr_get_baud_rate ());
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
- to inferior's memory at MEMADDR. Returns length moved. */
-static int
-rombug_write_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
- int i;
- char buf[10];
-
- if (monitor_log)
- fprintf (log_file, "\nIn Write_inferior_memory (memaddr=%x, len=%d)\n", memaddr, len);
-
- printf_monitor (MEM_SET_CMD, memaddr);
- for (i = 0; i < len; i++)
- {
- expect (CMD_DELIM, 1);
- printf_monitor ("%x \r", myaddr[i]);
- if (sr_get_debug ())
- printf ("\nSet 0x%x to 0x%x\n", memaddr + i, myaddr[i]);
- }
- expect (CMD_DELIM, 1);
- if (CMD_END)
- printf_monitor (CMD_END);
- is_trace_mode = 0;
- expect_prompt (1);
-
- bufaddr = 0;
- buflen = 0;
- return len;
-}
-
-/* Read LEN bytes from inferior memory at MEMADDR. Put the result
- at debugger address MYADDR. Returns length moved. */
-static int
-rombug_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- int i, j;
-
- /* Number of bytes read so far. */
- int count;
-
- /* Starting address of this pass. */
- unsigned long startaddr;
-
- /* Number of bytes to read in this pass. */
- int len_this_pass;
-
- if (monitor_log)
- fprintf (log_file, "\nIn Read_inferior_memory (memaddr=%x, len=%d)\n", memaddr, len);
-
- /* Note that this code works correctly if startaddr is just less
- than UINT_MAX (well, really CORE_ADDR_MAX if there was such a
- thing). That is, something like
- rombug_read_bytes (CORE_ADDR_MAX - 4, foo, 4)
- works--it never adds len To memaddr and gets 0. */
- /* However, something like
- rombug_read_bytes (CORE_ADDR_MAX - 3, foo, 4)
- doesn't need to work. Detect it and give up if there's an attempt
- to do that. */
- if (((memaddr - 1) + len) < memaddr)
- {
- errno = EIO;
- return 0;
- }
- if (bufaddr <= memaddr && (memaddr + len) <= (bufaddr + buflen))
- {
- memcpy (myaddr, &readbuf[memaddr - bufaddr], len);
- return len;
- }
-
- startaddr = memaddr;
- count = 0;
- while (count < len)
- {
- len_this_pass = 16;
- if ((startaddr % 16) != 0)
- len_this_pass -= startaddr % 16;
- if (len_this_pass > (len - count))
- len_this_pass = (len - count);
- if (sr_get_debug ())
- printf ("\nDisplay %d bytes at %x\n", len_this_pass, startaddr);
-
- printf_monitor (MEM_DIS_CMD, startaddr, 8);
- expect ("- ", 1);
- for (i = 0; i < 16; i++)
- {
- get_hex_byte (&readbuf[i]);
- }
- bufaddr = startaddr;
- buflen = 16;
- memcpy (&myaddr[count], readbuf, len_this_pass);
- count += len_this_pass;
- startaddr += len_this_pass;
- expect (CMD_DELIM, 1);
- }
- if (CMD_END)
- printf_monitor (CMD_END);
- is_trace_mode = 0;
- expect_prompt (1);
-
- return len;
-}
-
-/* Transfer LEN bytes between GDB address MYADDR and target address
- MEMADDR. If WRITE is non-zero, transfer them to the target,
- otherwise transfer them from the target. TARGET is unused.
-
- Returns the number of bytes transferred. */
-
-static int
-rombug_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
- int write, struct mem_attrib *attrib,
- struct target_ops *target)
-{
- if (write)
- return rombug_write_inferior_memory (memaddr, myaddr, len);
- else
- return rombug_read_inferior_memory (memaddr, myaddr, len);
-}
-
-static void
-rombug_kill (char *args, int from_tty)
-{
- return; /* ignore attempts to kill target system */
-}
-
-/* Clean up when a program exits.
- The program actually lives on in the remote processor's RAM, and may be
- run again without a download. Don't leave it full of breakpoint
- instructions. */
-
-static void
-rombug_mourn_inferior (void)
-{
- remove_breakpoints ();
- generic_mourn_inferior (); /* Do all the proper things now */
-}
-
-#define MAX_MONITOR_BREAKPOINTS 16
-
-static CORE_ADDR breakaddr[MAX_MONITOR_BREAKPOINTS] =
-{0};
-
-static int
-rombug_insert_breakpoint (CORE_ADDR addr, char *shadow)
-{
- int i;
- CORE_ADDR bp_addr = addr;
- int bp_size = 0;
-
- if (monitor_log)
- fprintf (log_file, "\nIn Insert_breakpoint (addr=%x)\n", addr);
- BREAKPOINT_FROM_PC (&bp_addr, &bp_size);
-
- for (i = 0; i <= MAX_MONITOR_BREAKPOINTS; i++)
- if (breakaddr[i] == 0)
- {
- breakaddr[i] = addr;
- if (sr_get_debug ())
- printf ("Breakpoint at %x\n", addr);
- rombug_read_inferior_memory (bp_addr, shadow, bp_size);
- printf_monitor (SET_BREAK_CMD, addr);
- is_trace_mode = 0;
- expect_prompt (1);
- return 0;
- }
-
- fprintf (stderr, "Too many breakpoints (> 16) for monitor\n");
- return 1;
-}
-
-/*
- * _remove_breakpoint -- Tell the monitor to remove a breakpoint
- */
-static int
-rombug_remove_breakpoint (CORE_ADDR addr, char *shadow)
-{
- int i;
-
- if (monitor_log)
- fprintf (log_file, "\nIn Remove_breakpoint (addr=%x)\n", addr);
-
- for (i = 0; i < MAX_MONITOR_BREAKPOINTS; i++)
- if (breakaddr[i] == addr)
- {
- breakaddr[i] = 0;
- printf_monitor (CLR_BREAK_CMD, addr);
- is_trace_mode = 0;
- expect_prompt (1);
- return 0;
- }
-
- fprintf (stderr, "Can't find breakpoint associated with 0x%x\n", addr);
- return 1;
-}
-
-/* Load a file. This is usually an srecord, which is ascii. No
- protocol, just sent line by line. */
-
-#define DOWNLOAD_LINE_SIZE 100
-static void
-rombug_load (char *arg)
-{
-/* this part comment out for os9* */
-#if 0
- FILE *download;
- char buf[DOWNLOAD_LINE_SIZE];
- int i, bytes_read;
-
- if (sr_get_debug ())
- printf ("Loading %s to monitor\n", arg);
-
- download = fopen (arg, "r");
- if (download == NULL)
- {
- error (sprintf (buf, "%s Does not exist", arg));
- return;
- }
-
- printf_monitor (LOAD_CMD);
-/* expect ("Waiting for S-records from host... ", 1); */
-
- while (!feof (download))
- {
- bytes_read = fread (buf, sizeof (char), DOWNLOAD_LINE_SIZE, download);
- if (hashmark)
- {
- putchar ('.');
- fflush (stdout);
- }
-
- if (serial_write (monitor_desc, buf, bytes_read))
- {
- fprintf (stderr, "serial_write failed: (while downloading) %s\n", safe_strerror (errno));
- break;
- }
- i = 0;
- while (i++ <= 200000)
- {
- }; /* Ugly HACK, probably needs flow control */
- if (bytes_read < DOWNLOAD_LINE_SIZE)
- {
- if (!feof (download))
- error ("Only read %d bytes\n", bytes_read);
- break;
- }
- }
-
- if (hashmark)
- {
- putchar ('\n');
- }
- if (!feof (download))
- error ("Never got EOF while downloading");
- fclose (download);
-#endif /* 0 */
-}
-
-/* Put a command string, in args, out to MONITOR.
- Output from MONITOR is placed on the users terminal until the prompt
- is seen. */
-
-static void
-rombug_command (char *args, int fromtty)
-{
- if (monitor_desc == NULL)
- error ("monitor target not open.");
-
- if (monitor_log)
- fprintf (log_file, "\nIn command (args=%s)\n", args);
-
- if (!args)
- error ("Missing command.");
-
- printf_monitor ("%s\r", args);
- expect_prompt (0);
-}
-
-#if 0
-/* Connect the user directly to MONITOR. This command acts just like the
- 'cu' or 'tip' command. Use <CR>~. or <CR>~^D to break out. */
-
-static struct ttystate ttystate;
-
-static void
-cleanup_tty (void)
-{
- printf ("\r\n[Exiting connect mode]\r\n");
- /*serial_restore(0, &ttystate); */
-}
-
-static void
-connect_command (char *args, int fromtty)
-{
- fd_set readfds;
- int numfds;
- int c;
- char cur_esc = 0;
-
- dont_repeat ();
-
- if (monitor_desc == NULL)
- error ("monitor target not open.");
-
- if (args)
- fprintf ("This command takes no args. They have been ignored.\n");
-
- printf ("[Entering connect mode. Use ~. or ~^D to escape]\n");
-
- serial_raw (0, &ttystate);
-
- make_cleanup (cleanup_tty, 0);
-
- FD_ZERO (&readfds);
-
- while (1)
- {
- do
- {
- FD_SET (0, &readfds);
- FD_SET (deprecated_serial_fd (monitor_desc), &readfds);
- numfds = select (sizeof (readfds) * 8, &readfds, 0, 0, 0);
- }
- while (numfds == 0);
-
- if (numfds < 0)
- perror_with_name ("select");
-
- if (FD_ISSET (0, &readfds))
- { /* tty input, send to monitor */
- c = getchar ();
- if (c < 0)
- perror_with_name ("connect");
-
- printf_monitor ("%c", c);
- switch (cur_esc)
- {
- case 0:
- if (c == '\r')
- cur_esc = c;
- break;
- case '\r':
- if (c == '~')
- cur_esc = c;
- else
- cur_esc = 0;
- break;
- case '~':
- if (c == '.' || c == '\004')
- return;
- else
- cur_esc = 0;
- }
- }
-
- if (FD_ISSET (deprecated_serial_fd (monitor_desc), &readfds))
- {
- while (1)
- {
- c = readchar (0);
- if (c < 0)
- break;
- putchar (c);
- }
- fflush (stdout);
- }
- }
-}
-#endif
-
-/*
- * Define the monitor command strings. Since these are passed directly
- * through to a printf style function, we need can include formatting
- * strings. We also need a CR or LF on the end.
- */
-#warning FIXME: monitor interface pattern strings, stale struct decl
-struct monitor_ops rombug_cmds =
-{
- "g \r", /* execute or usually GO command */
- "g \r", /* continue command */
- "t \r", /* single step */
- "b %x\r", /* set a breakpoint */
- "k %x\r", /* clear a breakpoint */
- "c %x\r", /* set memory to a value */
- "d %x %d\r", /* display memory */
- "$%08X", /* prompt memory commands use */
- ".%s %x\r", /* set a register */
- ":", /* delimiter between registers */
- ". \r", /* read a register */
- "mf \r", /* download command */
- "RomBug: ", /* monitor command prompt */
- ": ", /* end-of-command delimitor */
- ".\r" /* optional command terminator */
-};
-
-struct target_ops rombug_ops;
-
-static void
-init_rombug_ops (void)
-{
- rombug_ops.to_shortname = "rombug";
- rombug_ops.to_longname = "Microware's ROMBUG debug monitor";
- rombug_ops.to_doc = "Use a remote computer running the ROMBUG debug monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",
- rombug_ops.to_open = rombug_open;
- rombug_ops.to_close = rombug_close;
- rombug_ops.to_attach = 0;
- rombug_ops.to_post_attach = NULL;
- rombug_ops.to_require_attach = NULL;
- rombug_ops.to_detach = rombug_detach;
- rombug_ops.to_require_detach = NULL;
- rombug_ops.to_resume = rombug_resume;
- rombug_ops.to_wait = rombug_wait;
- rombug_ops.to_post_wait = NULL;
- rombug_ops.to_fetch_registers = rombug_fetch_register;
- rombug_ops.to_store_registers = rombug_store_register;
- rombug_ops.to_prepare_to_store = rombug_prepare_to_store;
- rombug_ops.to_xfer_memory = rombug_xfer_inferior_memory;
- rombug_ops.to_files_info = rombug_files_info;
- rombug_ops.to_insert_breakpoint = rombug_insert_breakpoint;
- rombug_ops.to_remove_breakpoint = rombug_remove_breakpoint; /* Breakpoints */
- rombug_ops.to_terminal_init = 0;
- rombug_ops.to_terminal_inferior = 0;
- rombug_ops.to_terminal_ours_for_output = 0;
- rombug_ops.to_terminal_ours = 0;
- rombug_ops.to_terminal_info = 0; /* Terminal handling */
- rombug_ops.to_kill = rombug_kill;
- rombug_ops.to_load = rombug_load; /* load */
- rombug_ops.to_lookup_symbol = rombug_link; /* lookup_symbol */
- rombug_ops.to_create_inferior = rombug_create_inferior;
- rombug_ops.to_post_startup_inferior = NULL;
- rombug_ops.to_acknowledge_created_inferior = NULL;
- rombug_ops.to_clone_and_follow_inferior = NULL;
- rombug_ops.to_post_follow_inferior_by_clone = NULL;
- rombug_ops.to_insert_fork_catchpoint = NULL;
- rombug_ops.to_remove_fork_catchpoint = NULL;
- rombug_ops.to_insert_vfork_catchpoint = NULL;
- rombug_ops.to_remove_vfork_catchpoint = NULL;
- rombug_ops.to_has_forked = NULL;
- rombug_ops.to_has_vforked = NULL;
- rombug_ops.to_can_follow_vfork_prior_to_exec = NULL;
- rombug_ops.to_post_follow_vfork = NULL;
- rombug_ops.to_insert_exec_catchpoint = NULL;
- rombug_ops.to_remove_exec_catchpoint = NULL;
- rombug_ops.to_has_execd = NULL;
- rombug_ops.to_reported_exec_events_per_exec_call = NULL;
- rombug_ops.to_has_exited = NULL;
- rombug_ops.to_mourn_inferior = rombug_mourn_inferior;
- rombug_ops.to_can_run = 0; /* can_run */
- rombug_ops.to_notice_signals = 0; /* notice_signals */
- rombug_ops.to_thread_alive = 0;
- rombug_ops.to_stop = 0; /* to_stop */
- rombug_ops.to_pid_to_exec_file = NULL;
- rombug_ops.to_stratum = process_stratum;
- rombug_ops.DONT_USE = 0; /* next */
- rombug_ops.to_has_all_memory = 1;
- rombug_ops.to_has_memory = 1;
- rombug_ops.to_has_stack = 1;
- rombug_ops.to_has_registers = 1;
- rombug_ops.to_has_execution = 1; /* has execution */
- rombug_ops.to_sections = 0;
- rombug_ops.to_sections_end = 0; /* Section pointers */
- rombug_ops.to_magic = OPS_MAGIC; /* Always the last thing */
-}
-
-void
-_initialize_remote_os9k (void)
-{
- init_rombug_ops ();
- add_target (&rombug_ops);
-
- add_show_from_set (
- add_set_cmd ("hash", no_class, var_boolean, (char *) &hashmark,
- "Set display of activity while downloading a file.\nWhen enabled, a period \'.\' is displayed.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("timeout", no_class, var_zinteger,
- (char *) &timeout,
- "Set timeout in seconds for remote MIPS serial I/O.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("remotelog", no_class, var_zinteger,
- (char *) &monitor_log,
- "Set monitor activity log on(=1) or off(=0).",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("remotexon", no_class, var_zinteger,
- (char *) &tty_xon,
- "Set remote tty line XON control",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("remotexoff", no_class, var_zinteger,
- (char *) &tty_xoff,
- "Set remote tty line XOFF control",
- &setlist),
- &showlist);
-
- add_com ("rombug <command>", class_obscure, rombug_command,
- "Send a command to the debug monitor.");
-#if 0
- add_com ("connect", class_obscure, connect_command,
- "Connect the terminal directly up to a serial based command monitor.\nUse <CR>~. or <CR>~^D to break out.");
-#endif
-}
diff --git a/contrib/gdb/gdb/remote-pa.c b/contrib/gdb/gdb/remote-pa.c
deleted file mode 100644
index 1121e15effaa..000000000000
--- a/contrib/gdb/gdb/remote-pa.c
+++ /dev/null
@@ -1,1540 +0,0 @@
-/* Remote target communications for serial-line targets in custom GDB protocol
- Copyright 1988, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Remote communication protocol.
-
- A debug packet whose contents are <data>
- is encapsulated for transmission in the form:
-
- $ <data> # CSUM1 CSUM2
-
- <data> must be ASCII alphanumeric and cannot include characters
- '$' or '#'. If <data> starts with two characters followed by
- ':', then the existing stubs interpret this as a sequence number.
-
- CSUM1 and CSUM2 are ascii hex representation of an 8-bit
- checksum of <data>, the most significant nibble is sent first.
- the hex digits 0-9,a-f are used.
-
- Receiver responds with:
-
- + - if CSUM is correct and ready for next packet
- - - if CSUM is incorrect
-
- <data> is as follows:
- All values are encoded in ascii hex digits.
-
- Request Packet
-
- read registers g
- reply XX....X Each byte of register data
- is described by two hex digits.
- Registers are in the internal order
- for GDB, and the bytes in a register
- are in the same order the machine uses.
- or ENN for an error.
-
- write regs GXX..XX Each byte of register data
- is described by two hex digits.
- reply OK for success
- ENN for an error
-
- write reg Pn...=r... Write register n... with value r...,
- which contains two hex digits for each
- byte in the register (target byte
- order).
- reply OK for success
- ENN for an error
- (not supported by all stubs).
-
- read mem mAA..AA,LLLL AA..AA is address, LLLL is length.
- reply XX..XX XX..XX is mem contents
- Can be fewer bytes than requested
- if able to read only part of the data.
- or ENN NN is errno
-
- write mem MAA..AA,LLLL:XX..XX
- AA..AA is address,
- LLLL is number of bytes,
- XX..XX is data
- reply OK for success
- ENN for an error (this includes the case
- where only part of the data was
- written).
-
- cont cAA..AA AA..AA is address to resume
- If AA..AA is omitted,
- resume at same address.
-
- step sAA..AA AA..AA is address to resume
- If AA..AA is omitted,
- resume at same address.
-
- last signal ? Reply the current reason for stopping.
- This is the same reply as is generated
- for step or cont : SAA where AA is the
- signal number.
-
- There is no immediate reply to step or cont.
- The reply comes when the machine stops.
- It is SAA AA is the "signal number"
-
- or... TAAn...:r...;n:r...;n...:r...;
- AA = signal number
- n... = register number
- r... = register contents
- or... WAA The process exited, and AA is
- the exit status. This is only
- applicable for certains sorts of
- targets.
- kill request k
-
- toggle debug d toggle debug flag (see 386 & 68k stubs)
- reset r reset -- see sparc stub.
- reserved <other> On other requests, the stub should
- ignore the request and send an empty
- response ($#<checksum>). This way
- we can extend the protocol and GDB
- can tell whether the stub it is
- talking to uses the old or the new.
- search tAA:PP,MM Search backwards starting at address
- AA for a match with pattern PP and
- mask MM. PP and MM are 4 bytes.
- Not supported by all stubs.
-
- general query qXXXX Request info about XXXX.
- general set QXXXX=yyyy Set value of XXXX to yyyy.
- query sect offs qOffsets Get section offsets. Reply is
- Text=xxx;Data=yyy;Bss=zzz
- console output Otext Send text to stdout. Only comes from
- remote target.
-
- Responses can be run-length encoded to save space. A '*' means that
- the next character is an ASCII encoding giving a repeat count which
- stands for that many repititions of the character preceding the '*'.
- The encoding is n+29, yielding a printable character where n >=3
- (which is where rle starts to win). Don't use an n > 126.
-
- So
- "0* " means the same as "0000". */
-
-#include "defs.h"
-#include "gdb_string.h"
-#include <fcntl.h>
-#include "frame.h"
-#include "inferior.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "target.h"
-#include "wait.h"
-#include "terminal.h"
-#include "gdbcmd.h"
-#include "objfiles.h"
-#include "gdb-stabs.h"
-#include "remote-utils.h"
-#include "dcache.h"
-
-#ifdef USG
-#include <sys/types.h>
-#endif
-
-#include <signal.h>
-#include "serial.h"
-
-/* Prototypes for local functions */
-
-static int
-remote_write_bytes PARAMS ((CORE_ADDR memaddr, char *myaddr, int len));
-
-static int
-remote_read_bytes PARAMS ((CORE_ADDR memaddr, char *myaddr, int len));
-
-static void
-remote_files_info PARAMS ((struct target_ops *ignore));
-
-static int
-remote_xfer_memory PARAMS ((CORE_ADDR memaddr, char *myaddr, int len,
- int should_write, struct target_ops *target));
-
-static void
-remote_prepare_to_store PARAMS ((void));
-
-static void
-remote_fetch_registers PARAMS ((int regno));
-
-static void
-remote_resume PARAMS ((int pid, int step, enum target_signal siggnal));
-
-static int
-remote_start_remote PARAMS ((char *dummy));
-
-static void
-remote_open PARAMS ((char *name, int from_tty));
-
-static void
-remote_close PARAMS ((int quitting));
-
-static void
-remote_store_registers PARAMS ((int regno));
-
-static void
-getpkt PARAMS ((char *buf, int forever));
-
-static void
-putpkt PARAMS ((char *buf));
-
-static void
-remote_send PARAMS ((char *buf));
-
-static int
-readchar PARAMS ((int timeout));
-
-static int
-remote_wait PARAMS ((int pid, struct target_waitstatus *status));
-
-static int
-tohex PARAMS ((int nib));
-
-static int
-fromhex PARAMS ((int a));
-
-static void
-remote_detach PARAMS ((char *args, int from_tty));
-
-static void
-remote_interrupt PARAMS ((int signo));
-
-static void
-remote_interrupt_twice PARAMS ((int signo));
-
-static void
-interrupt_query PARAMS ((void));
-
-static void
-hppro_load PARAMS ((char *name, int from_tty));
-
-extern struct target_ops remote_ops; /* Forward decl */
-
-/* This was 5 seconds, which is a long time to sit and wait.
- Unless this is going though some terminal server or multiplexer or
- other form of hairy serial connection, I would think 2 seconds would
- be plenty. */
-static int remote_timeout = 2;
-
-/* Descriptor for I/O to remote machine. Initialize it to NULL so that
- remote_open knows that we don't have a file open when the program
- starts. */
-extern serial_t remote_desc;
-
-/* Having this larger than 400 causes us to be incompatible with m68k-stub.c
- and i386-stub.c. Normally, no one would notice because it only matters
- for writing large chunks of memory (e.g. in downloads). Also, this needs
- to be more than 400 if required to hold the registers (see below, where
- we round it up based on REGISTER_BYTES). */
-#define PBUFSIZ 400
-
-/* Maximum number of bytes to read/write at once. The value here
- is chosen to fill up a packet (the headers account for the 32). */
-#define MAXBUFBYTES ((PBUFSIZ-32)/2)
-
-/* Round up PBUFSIZ to hold all the registers, at least. */
-/* The blank line after the #if seems to be required to work around a
- bug in HP's PA compiler. */
-#if REGISTER_BYTES > MAXBUFBYTES
-
-#undef PBUFSIZ
-#define PBUFSIZ (REGISTER_BYTES * 2 + 32)
-#endif
-
-/* Should we try the 'P' request? If this is set to one when the stub
- doesn't support 'P', the only consequence is some unnecessary traffic. */
-static int stub_supports_P = 1;
-
-/* sets the download protocol, choices are srec, generic, boot */
-char *loadtype;
-static char *loadtype_str;
-static void set_loadtype_command
-PARAMS ((char *, int, struct cmd_list_element *));
-
-static void
-hppro_load (file, from_tty)
- char *file;
- int from_tty;
-{
- puts ("Loading... HA!");
-}
-
-
-/* Clean up connection to a remote debugger. */
-
-/* ARGSUSED */
-static void
-remote_close (quitting)
- int quitting;
-{
- if (remote_desc)
- SERIAL_CLOSE (remote_desc);
- remote_desc = NULL;
-}
-
-/* Query the remote side for the text, data and bss offsets. */
-
-static void
-get_offsets ()
-{
- unsigned char buf[PBUFSIZ];
- int nvals;
- CORE_ADDR text_addr, data_addr, bss_addr;
- struct section_offsets *offs;
-
- putpkt ("qOffsets");
-
- getpkt (buf, 0);
-
- if (buf[0] == '\000')
- return; /* Return silently. Stub doesn't support this
- command. */
- if (buf[0] == 'E')
- {
- warning ("Remote failure reply: %s", buf);
- return;
- }
-
- nvals = sscanf (buf, "Text=%lx;Data=%lx;Bss=%lx", &text_addr, &data_addr,
- &bss_addr);
- if (nvals != 3)
- error ("Malformed response to offset query, %s", buf);
-
- if (symfile_objfile == NULL)
- return;
-
- offs = (struct section_offsets *) alloca (sizeof (struct section_offsets)
- + symfile_objfile->num_sections
- * sizeof (offs->offsets));
- memcpy (offs, symfile_objfile->section_offsets,
- sizeof (struct section_offsets)
- + symfile_objfile->num_sections
- * sizeof (offs->offsets));
-
- /* FIXME: This code assumes gdb-stabs.h is being used; it's broken
- for xcoff, dwarf, sdb-coff, etc. But there is no simple
- canonical representation for this stuff. (Just what does "text"
- as seen by the stub mean, anyway? I think it means all sections
- with SEC_CODE set, but we currently have no way to deal with that). */
-
- ANOFFSET (offs, SECT_OFF_TEXT) = text_addr;
-
- /* This is a temporary kludge to force data and bss to use the same offsets
- because that's what nlmconv does now. The real solution requires changes
- to the stub and remote.c that I don't have time to do right now. */
-
- ANOFFSET (offs, SECT_OFF_DATA) = data_addr;
- ANOFFSET (offs, SECT_OFF_BSS) = data_addr;
-
- objfile_relocate (symfile_objfile, offs);
-}
-
-#define INBUFSIZE 10
-
-void
-boot_board()
-{
- char c;
- char buf[INBUFSIZE];
- char *ptr;
-
- /* See if we can connect to the boot ROM command line */
- ptr = buf;
- while (1) {
- SERIAL_WRITE (remote_desc, "\r\n", 2);
- c = readchar (2);
- if ((sr_get_debug() > 2) && (isascii(c)))
- putchar (c);
- if (c == SERIAL_TIMEOUT) {
- if (sr_get_debug())
- puts_filtered ("Timed out.\n");
- break;
- }
- if (c == '&') {
- if (sr_get_debug() > 2)
- puts ("Got ACK from stub");
- break;
- }
- if (c == '>') {
- if (sr_get_debug() > 2)
- puts ("Got prompt from ROM monitor");
- break;
- }
- }
-
-}
-
-/* Stub for catch_errors. */
-static int
-remote_start_remote (dummy)
- char *dummy;
-{
- int timeout;
-
- immediate_quit = 1; /* Allow user to interrupt it */
-
- /* Ack any packet which the remote side has already sent. */
-
- if (sr_get_debug())
- puts ("Trying a '+' to ACK the target.");
-
- SERIAL_WRITE (remote_desc, "+", 1);
-
-#if 0
- boot_board();
-
- get_offsets (); /* Get text, data & bss offsets */
-#endif
-
- putpkt ("?"); /* initiate a query from remote machine */
- immediate_quit = 0;
-
- start_remote (); /* Initialize gdb process mechanisms */
-
- return 1;
-}
-
-/* Open a connection to a remote debugger.
- NAME is the filename used for communication. */
-
-static DCACHE *remote_dcache;
-
-static void
-remote_open (name, from_tty)
- char *name;
- int from_tty;
-{
- if (name == 0)
- error (
-"To open a remote debug connection, you need to specify what serial\n\
-device is attached to the remote system (e.g. /dev/ttya).");
-
- target_preopen (from_tty);
-
- unpush_target (&remote_ops);
-
- remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
-
- remote_desc = SERIAL_OPEN (name);
- if (!remote_desc)
- perror_with_name (name);
-
- if (baud_rate != -1)
- {
- if (SERIAL_SETBAUDRATE (remote_desc, baud_rate))
- {
- SERIAL_CLOSE (remote_desc);
- perror_with_name (name);
- }
- }
-
- SERIAL_RAW (remote_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 (remote_desc);
-
- if (from_tty)
- {
- puts_filtered ("Remote debugging using ");
- puts_filtered (name);
- puts_filtered ("\n");
- }
- push_target (&remote_ops); /* Switch to using remote target now */
-
- /* Start out by trying the 'P' request to set registers. We set this each
- time that we open a new target so that if the user switches from one
- stub to another, we can (if the target is closed and reopened) cope. */
- stub_supports_P = 1;
-
- /* Without this, some commands which require an active target (such as kill)
- won't work. This variable serves (at least) double duty as both the pid
- of the target process (if it has such), and as a flag indicating that a
- target is active. These functions should be split out into seperate
- variables, especially since GDB will someday have a notion of debugging
- several processes. */
-
- inferior_pid = 42000;
-
- /* Start the remote connection; if error (0), discard this target.
- In particular, if the user quits, be sure to discard it
- (we'd be in an inconsistent state otherwise). */
- if (!catch_errors (remote_start_remote, (char *)0,
- "Couldn't establish connection to remote target\n", RETURN_MASK_ALL))
- pop_target();
-}
-
-/* remote_detach()
- 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. */
-
-static void
-remote_detach (args, from_tty)
- char *args;
- int from_tty;
-{
- if (args)
- error ("Argument given to \"detach\" when remotely debugging.");
-
- pop_target ();
- if (from_tty)
- puts_filtered ("Ending remote debugging.\n");
-}
-
-/* Convert hex digit A to a number. */
-
-static int
-fromhex (a)
- int a;
-{
- if (a >= '0' && a <= '9')
- return a - '0';
- else if (a >= 'a' && a <= 'f')
- return a - 'a' + 10;
- else
- error ("Reply contains invalid hex digit");
-}
-
-/* Convert number NIB to a hex digit. */
-
-static int
-tohex (nib)
- int nib;
-{
- if (nib < 10)
- return '0'+nib;
- else
- return 'a'+nib-10;
-}
-
-/* Tell the remote machine to resume. */
-
-static void
-remote_resume (pid, step, siggnal)
- int pid, step;
- enum target_signal siggnal;
-{
- char buf[PBUFSIZ];
-
- if (siggnal)
- {
- target_terminal_ours_for_output ();
- printf_filtered
- ("Can't send signals to a remote system. %s not sent.\n",
- target_signal_to_name (siggnal)); target_terminal_inferior ();
- }
-
- dcache_flush (remote_dcache);
-
- strcpy (buf, step ? "s": "c");
-
- putpkt (buf);
-}
-
-/* Send ^C to target to halt it. Target will respond, and send us a
- packet. */
-
-static void
-remote_interrupt (signo)
- int signo;
-{
- /* If this doesn't work, try more severe steps. */
- signal (signo, remote_interrupt_twice);
-
- if (remote_debug)
- printf_unfiltered ("remote_interrupt called\n");
-
- SERIAL_WRITE (remote_desc, "\003", 1); /* Send a ^C */
-}
-
-static void (*ofunc)();
-
-/* The user typed ^C twice. */
-static void
-remote_interrupt_twice (signo)
- int signo;
-{
- signal (signo, ofunc);
-
- interrupt_query ();
-
- signal (signo, remote_interrupt);
-}
-
-/* Ask the user what to do when an interrupt is received. */
-
-static void
-interrupt_query ()
-{
- target_terminal_ours ();
-
- if (query ("Interrupted while waiting for the program.\n\
-Give up (and stop debugging it)? "))
- {
- target_mourn_inferior ();
- return_to_top_level (RETURN_QUIT);
- }
-
- target_terminal_inferior ();
-}
-
-/* Wait until the remote machine stops, then return,
- storing status in STATUS just as `wait' would.
- Returns "pid" (though it's not clear what, if anything, that
- means in the case of this target). */
-
-static int
-remote_wait (pid, status)
- int pid;
- struct target_waitstatus *status;
-{
- unsigned char buf[PBUFSIZ];
-
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = 0;
-
- while (1)
- {
- unsigned char *p;
-
- ofunc = (void (*)()) signal (SIGINT, remote_interrupt);
- getpkt ((char *) buf, 1);
- signal (SIGINT, ofunc);
-
- switch (buf[0])
- {
- case 'E': /* Error of some sort */
- warning ("Remote failure reply: %s", buf);
- continue;
- case 'T': /* Status with PC, SP, FP, ... */
- {
- int i;
- long regno;
- char regs[MAX_REGISTER_RAW_SIZE];
-
- /* Expedited reply, containing Signal, {regno, reg} repeat */
- /* format is: 'Tssn...:r...;n...:r...;n...:r...;#cc', where
- ss = signal number
- n... = register number
- r... = register contents
- */
-
- p = &buf[3]; /* after Txx */
-
- while (*p)
- {
- unsigned char *p1;
-
- regno = strtol (p, (char **) &p1, 16); /* Read the register number */
-
- if (p1 == p)
- warning ("Remote sent badly formed register number: %s\nPacket: '%s'\n",
- p1, buf);
-
- p = p1;
-
- if (*p++ != ':')
- warning ("Malformed packet (missing colon): %s\nPacket: '%s'\n",
- p, buf);
-
- if (regno >= NUM_REGS)
- warning ("Remote sent bad register number %d: %s\nPacket: '%s'\n",
- regno, p, buf);
-
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i++)
- {
- if (p[0] == 0 || p[1] == 0)
- warning ("Remote reply is too short: %s", buf);
- regs[i] = fromhex (p[0]) * 16 + fromhex (p[1]);
- p += 2;
- }
-
- if (*p++ != ';')
- warning ("Remote register badly formatted: %s", buf);
-
- supply_register (regno, regs);
- }
- }
- /* fall through */
- case 'S': /* Old style status, just signal only */
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = (enum target_signal)
- (((fromhex (buf[1])) << 4) + (fromhex (buf[2])));
-
- return inferior_pid;
- case 'W': /* Target exited */
- {
- /* The remote process exited. */
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = (fromhex (buf[1]) << 4) + fromhex (buf[2]);
- return inferior_pid;
- }
- case 'O': /* Console output */
- fputs_filtered (buf + 1, gdb_stdout);
- continue;
- default:
- warning ("Invalid remote reply: %s", buf);
- continue;
- }
- }
- return inferior_pid;
-}
-
-/* Number of bytes of registers this stub implements. */
-static int register_bytes_found;
-
-/* Read the remote registers into the block REGS. */
-/* Currently we just read all the registers, so we don't use regno. */
-/* ARGSUSED */
-static void
-remote_fetch_registers (regno)
- int regno;
-{
- char buf[PBUFSIZ];
- int i;
- char *p;
- char regs[REGISTER_BYTES];
-
- sprintf (buf, "g");
- remote_send (buf);
-
- /* Unimplemented registers read as all bits zero. */
- memset (regs, 0, REGISTER_BYTES);
-
- /* We can get out of synch in various cases. If the first character
- in the buffer is not a hex character, assume that has happened
- and try to fetch another packet to read. */
- while ((buf[0] < '0' || buf[0] > '9')
- && (buf[0] < 'a' || buf[0] > 'f'))
- {
- if (remote_debug)
- printf_unfiltered ("Bad register packet; fetching a new packet\n");
- getpkt (buf, 0);
- }
-
- /* Reply describes registers byte by byte, each byte encoded as two
- hex characters. Suck them all up, then supply them to the
- register cacheing/storage mechanism. */
-
- p = buf;
- for (i = 0; i < REGISTER_BYTES; i++)
- {
- if (p[0] == 0)
- break;
- if (p[1] == 0)
- {
- warning ("Remote reply is of odd length: %s", buf);
- /* Don't change register_bytes_found in this case, and don't
- print a second warning. */
- goto supply_them;
- }
- regs[i] = fromhex (p[0]) * 16 + fromhex (p[1]);
- p += 2;
- }
-
- if (i != register_bytes_found)
- {
- register_bytes_found = i;
-#ifdef REGISTER_BYTES_OK
- if (!REGISTER_BYTES_OK (i))
- warning ("Remote reply is too short: %s", buf);
-#endif
- }
-
- supply_them:
- for (i = 0; i < NUM_REGS; i++)
- supply_register (i, &regs[REGISTER_BYTE(i)]);
-}
-
-/* Prepare to store registers. Since we may send them all (using a
- 'G' request), we have to read out the ones we don't want to change
- first. */
-
-static void
-remote_prepare_to_store ()
-{
- /* Make sure the entire registers array is valid. */
- read_register_bytes (0, (char *)NULL, REGISTER_BYTES);
-}
-
-/* Store register REGNO, or all registers if REGNO == -1, from the contents
- of REGISTERS. FIXME: ignores errors. */
-
-static void
-remote_store_registers (regno)
- int regno;
-{
- char buf[PBUFSIZ];
- int i;
- char *p;
-
- if (regno >= 0 && stub_supports_P)
- {
- /* Try storing a single register. */
- char *regp;
-
- sprintf (buf, "P%x=", regno);
- p = buf + strlen (buf);
- regp = &registers[REGISTER_BYTE (regno)];
- for (i = 0; i < REGISTER_RAW_SIZE (regno); ++i)
- {
- *p++ = tohex ((regp[i] >> 4) & 0xf);
- *p++ = tohex (regp[i] & 0xf);
- }
- *p = '\0';
- remote_send (buf);
- if (buf[0] != '\0')
- {
- /* The stub understands the 'P' request. We are done. */
- return;
- }
-
- /* The stub does not support the 'P' request. Use 'G' instead,
- and don't try using 'P' in the future (it will just waste our
- time). */
- stub_supports_P = 0;
- }
-
- buf[0] = 'G';
-
- /* Command describes registers byte by byte,
- each byte encoded as two hex characters. */
-
- p = buf + 1;
- /* remote_prepare_to_store insures that register_bytes_found gets set. */
- for (i = 0; i < register_bytes_found; i++)
- {
- *p++ = tohex ((registers[i] >> 4) & 0xf);
- *p++ = tohex (registers[i] & 0xf);
- }
- *p = '\0';
-
- remote_send (buf);
-}
-
-#if 0
-
-/* Use of the data cache is disabled because it loses for looking at
- and changing hardware I/O ports and the like. Accepting `volatile'
- would perhaps be one way to fix it. Another idea would be to use the
- executable file for the text segment (for all SEC_CODE sections?
- For all SEC_READONLY sections?). This has problems if you want to
- actually see what the memory contains (e.g. self-modifying code,
- clobbered memory, user downloaded the wrong thing). */
-
-/* Read a word from remote address ADDR and return it.
- This goes through the data cache. */
-
-static int
-remote_fetch_word (addr)
- CORE_ADDR addr;
-{
- return dcache_fetch (remote_dcache, addr);
-}
-
-/* Write a word WORD into remote address ADDR.
- This goes through the data cache. */
-
-static void
-remote_store_word (addr, word)
- CORE_ADDR addr;
- int word;
-{
- dcache_poke (remote_dcache, addr, word);
-}
-#endif /* 0 */
-
-/* Write memory data directly to the remote machine.
- 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.
-
- Returns number of bytes transferred, or 0 for error. */
-
-static int
-remote_write_bytes (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
-{
- char buf[PBUFSIZ];
- int i;
- char *p;
-
- /* FIXME-32x64: Need a version of print_address_numeric which puts the
- result in a buffer like sprintf. */
- sprintf (buf, "M%lx,%x:", (unsigned long) memaddr, len);
-
- /* We send target system values byte by byte, in increasing byte addresses,
- each byte encoded as two hex characters. */
-
- p = buf + strlen (buf);
- for (i = 0; i < len; i++)
- {
- *p++ = tohex ((myaddr[i] >> 4) & 0xf);
- *p++ = tohex (myaddr[i] & 0xf);
- }
- *p = '\0';
-
- putpkt (buf);
- getpkt (buf, 0);
-
- if (buf[0] == 'E')
- {
- /* There is no correspondance between what the remote protocol uses
- for errors and errno codes. We would like a cleaner way of
- representing errors (big enough to include errno codes, bfd_error
- codes, and others). But for now just return EIO. */
- errno = EIO;
- return 0;
- }
- return len;
-}
-
-/* Read memory data directly from the remote machine.
- This does not use 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.
-
- Returns number of bytes transferred, or 0 for error. */
-
-static int
-remote_read_bytes (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
-{
- char buf[PBUFSIZ];
- int i;
- char *p;
-
- if (len > PBUFSIZ / 2 - 1)
- abort ();
-
- /* FIXME-32x64: Need a version of print_address_numeric which puts the
- result in a buffer like sprintf. */
- sprintf (buf, "m%lx,%x", (unsigned long) memaddr, len);
- putpkt (buf);
- getpkt (buf, 0);
-
- if (buf[0] == 'E')
- {
- /* There is no correspondance between what the remote protocol uses
- for errors and errno codes. We would like a cleaner way of
- representing errors (big enough to include errno codes, bfd_error
- codes, and others). But for now just return EIO. */
- errno = EIO;
- return 0;
- }
-
- /* Reply describes memory byte by byte,
- each byte encoded as two hex characters. */
-
- p = buf;
- for (i = 0; i < len; i++)
- {
- if (p[0] == 0 || p[1] == 0)
- /* Reply is short. This means that we were able to read only part
- of what we wanted to. */
- break;
- myaddr[i] = fromhex (p[0]) * 16 + fromhex (p[1]);
- p += 2;
- }
- return i;
-}
-
-/* Read or write LEN bytes from inferior memory at MEMADDR, transferring
- to or from debugger address MYADDR. Write to inferior if SHOULD_WRITE is
- nonzero. Returns length of data written or read; 0 for error. */
-
-/* ARGSUSED */
-static int
-remote_xfer_memory(memaddr, myaddr, len, should_write, target)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
- int should_write;
- struct target_ops *target; /* ignored */
-{
- int xfersize;
- int bytes_xferred;
- int total_xferred = 0;
-
- while (len > 0)
- {
- if (len > MAXBUFBYTES)
- xfersize = MAXBUFBYTES;
- else
- xfersize = len;
-
- if (should_write)
- bytes_xferred = remote_write_bytes (memaddr, myaddr, xfersize);
- else
- bytes_xferred = remote_read_bytes (memaddr, myaddr, xfersize);
-
- /* If we get an error, we are done xferring. */
- if (bytes_xferred == 0)
- break;
-
- memaddr += bytes_xferred;
- myaddr += bytes_xferred;
- len -= bytes_xferred;
- total_xferred += bytes_xferred;
- }
- return total_xferred;
-}
-
-#if 0
-/* Enable after 4.12. */
-
-void
-remote_search (len, data, mask, startaddr, increment, lorange, hirange
- addr_found, data_found)
- int len;
- char *data;
- char *mask;
- CORE_ADDR startaddr;
- int increment;
- CORE_ADDR lorange;
- CORE_ADDR hirange;
- CORE_ADDR *addr_found;
- char *data_found;
-{
- if (increment == -4 && len == 4)
- {
- long mask_long, data_long;
- long data_found_long;
- CORE_ADDR addr_we_found;
- char buf[PBUFSIZ];
- long returned_long[2];
- char *p;
-
- mask_long = extract_unsigned_integer (mask, len);
- data_long = extract_unsigned_integer (data, len);
- sprintf (buf, "t%x:%x,%x", startaddr, data_long, mask_long);
- putpkt (buf);
- getpkt (buf, 0);
- if (buf[0] == '\0')
- {
- /* The stub doesn't support the 't' request. We might want to
- remember this fact, but on the other hand the stub could be
- switched on us. Maybe we should remember it only until
- the next "target remote". */
- generic_search (len, data, mask, startaddr, increment, lorange,
- hirange, addr_found, data_found);
- return;
- }
-
- if (buf[0] == 'E')
- /* There is no correspondance between what the remote protocol uses
- for errors and errno codes. We would like a cleaner way of
- representing errors (big enough to include errno codes, bfd_error
- codes, and others). But for now just use EIO. */
- memory_error (EIO, startaddr);
- p = buf;
- addr_we_found = 0;
- while (*p != '\0' && *p != ',')
- addr_we_found = (addr_we_found << 4) + fromhex (*p++);
- if (*p == '\0')
- error ("Protocol error: short return for search");
-
- data_found_long = 0;
- while (*p != '\0' && *p != ',')
- data_found_long = (data_found_long << 4) + fromhex (*p++);
- /* Ignore anything after this comma, for future extensions. */
-
- if (addr_we_found < lorange || addr_we_found >= hirange)
- {
- *addr_found = 0;
- return;
- }
-
- *addr_found = addr_we_found;
- *data_found = store_unsigned_integer (data_we_found, len);
- return;
- }
- generic_search (len, data, mask, startaddr, increment, lorange,
- hirange, addr_found, data_found);
-}
-#endif /* 0 */
-
-static void
-remote_files_info (ignore)
- struct target_ops *ignore;
-{
- puts_filtered ("Debugging a target over a serial line.\n");
-}
-
-/* Stuff for dealing with the packets which are part of this protocol.
- See comment at top of file for details. */
-
-/* Read a single character from the remote end, masking it down to 7 bits. */
-
-static int
-readchar (timeout)
- int timeout;
-{
- int ch;
-
- ch = SERIAL_READCHAR (remote_desc, timeout);
-
- switch (ch)
- {
- case SERIAL_EOF:
- error ("Remote connection closed");
- case SERIAL_ERROR:
- perror_with_name ("Remote communication error");
- case SERIAL_TIMEOUT:
- return ch;
- default:
- return ch & 0x7f;
- }
-}
-
-/* Send the command in BUF to the remote machine,
- and read the reply into BUF.
- Report an error if we get an error reply. */
-
-static void
-remote_send (buf)
- char *buf;
-{
-
- putpkt (buf);
- getpkt (buf, 0);
-
- if (buf[0] == 'E')
- error ("Remote failure reply: %s", buf);
-}
-
-/* Send a packet to the remote machine, with error checking.
- The data of the packet is in BUF. */
-static void
-putpkt (buf)
- char *buf;
-{
- int i;
- unsigned char csum = 0;
- char buf2[PBUFSIZ];
- int cnt = strlen (buf);
- int ch;
- char *p;
-
- /* Copy the packet into buffer BUF2, encapsulating it
- and giving it a checksum. */
-
- if (cnt > sizeof(buf2) - 5) /* Prosanity check */
- abort();
-
- p = buf2;
- *p++ = '$';
-
- for (i = 0; i < cnt; i++)
- {
- csum += buf[i];
- *p++ = buf[i];
- }
- *p++ = '#';
- *p++ = tohex ((csum >> 4) & 0xf);
- *p++ = tohex (csum & 0xf);
-
- /* Send it over and over until we get a positive ack. */
-
- while (1)
- {
- int started_error_output = 0;
-
- if (remote_debug)
- {
- *p = '\0';
- printf_unfiltered ("Sending packet: %s...", buf2);
- gdb_flush(gdb_stdout);
- }
- if (SERIAL_WRITE (remote_desc, buf2, p - buf2))
- perror_with_name ("putpkt: write failed");
-
- /* read until either a timeout occurs (-2) or '+' is read */
- while (1)
- {
- ch = readchar (remote_timeout);
-
- if (remote_debug)
- {
- switch (ch)
- {
- case '+':
- case SERIAL_TIMEOUT:
- case '$':
- if (started_error_output)
- {
- putchar_unfiltered ('\n');
- started_error_output = 0;
- }
- }
- }
-
- switch (ch)
- {
- case '+':
- if (remote_debug)
- printf_unfiltered("Got Ack\n");
- return;
- case SERIAL_TIMEOUT:
- break; /* Retransmit buffer */
- case '$':
- {
- unsigned char junkbuf[PBUFSIZ];
-
- /* It's probably an old response, and we're out of sync. Just
- gobble up the packet and ignore it. */
- getpkt (junkbuf, 0);
- continue; /* Now, go look for + */
- }
- default:
- if (remote_debug)
- {
- if (!started_error_output)
- {
- started_error_output = 1;
- printf_unfiltered ("putpkt: Junk: ");
- }
- putchar_unfiltered (ch & 0177);
- }
- continue;
- }
- break; /* Here to retransmit */
- }
-
-#if 0
- /* This is wrong. If doing a long backtrace, the user should be
- able to get out next time we call QUIT, without anything as violent
- as interrupt_query. If we want to provide a way out of here
- without getting to the next QUIT, it should be based on hitting
- ^C twice as in remote_wait. */
- if (quit_flag)
- {
- quit_flag = 0;
- interrupt_query ();
- }
-#endif
- }
-}
-
-/* Come here after finding the start of the frame. Collect the rest into BUF,
- verifying the checksum, length, and handling run-length compression.
- Returns 0 on any error, 1 on success. */
-
-static int
-read_frame (buf)
- char *buf;
-{
- unsigned char csum;
- char *bp;
- int c;
-
- csum = 0;
- bp = buf;
-
- while (1)
- {
- c = readchar (remote_timeout);
-
- switch (c)
- {
- case SERIAL_TIMEOUT:
- if (remote_debug)
- puts_filtered ("Timeout in mid-packet, retrying\n");
- return 0;
- case '$':
- if (remote_debug)
- puts_filtered ("Saw new packet start in middle of old one\n");
- return 0; /* Start a new packet, count retries */
- case '#':
- {
- unsigned char pktcsum;
-
- *bp = '\000';
-
- pktcsum = fromhex (readchar (remote_timeout)) << 4;
- pktcsum |= fromhex (readchar (remote_timeout));
-
- if (csum == pktcsum)
- return 1;
-
- printf_filtered ("Bad checksum, sentsum=0x%x, csum=0x%x, buf=",
- pktcsum, csum);
- puts_filtered (buf);
- puts_filtered ("\n");
-
- return 0;
- }
- case '*': /* Run length encoding */
- csum += c;
- c = readchar (remote_timeout);
- csum += c;
- c = c - ' ' + 3; /* Compute repeat count */
-
- if (bp + c - 1 < buf + PBUFSIZ - 1)
- {
- memset (bp, *(bp - 1), c);
- bp += c;
- continue;
- }
-
- *bp = '\0';
- printf_filtered ("Repeat count %d too large for buffer: ", c);
- puts_filtered (buf);
- puts_filtered ("\n");
- return 0;
-
- default:
- if (bp < buf + PBUFSIZ - 1)
- {
- *bp++ = c;
- csum += c;
- continue;
- }
-
- *bp = '\0';
- puts_filtered ("Remote packet too long: ");
- puts_filtered (buf);
- puts_filtered ("\n");
-
- return 0;
- }
- }
-}
-
-/* Read a packet from the remote machine, with error checking,
- and store it in BUF. BUF is expected to be of size PBUFSIZ.
- If FOREVER, wait forever rather than timing out; this is used
- while the target is executing user code. */
-
-static void
-getpkt (buf, forever)
- char *buf;
- int forever;
-{
- char *bp;
- int c;
- int tries;
- int timeout;
- int val;
-
- if (forever)
- timeout = -1;
- else
- timeout = remote_timeout;
-
-#define MAX_TRIES 10
-
- for (tries = 1; tries <= MAX_TRIES; tries++)
- {
- /* This can loop forever if the remote side sends us characters
- continuously, but if it pauses, we'll get a zero from readchar
- because of timeout. Then we'll count that as a retry. */
-
- /* Note that we will only wait forever prior to the start of a packet.
- After that, we expect characters to arrive at a brisk pace. They
- should show up within remote_timeout intervals. */
-
- do
- {
- c = readchar (timeout);
-
- if (c == SERIAL_TIMEOUT)
- {
- if (remote_debug)
- puts_filtered ("Timed out.\n");
- goto retry;
- }
- }
- while (c != '$');
-
- /* We've found the start of a packet, now collect the data. */
-
- val = read_frame (buf);
-
- if (val == 1)
- {
- if (remote_debug)
- fprintf_unfiltered (gdb_stderr, "Packet received: %s\n", buf);
- SERIAL_WRITE (remote_desc, "+", 1);
- return;
- }
-
- /* Try the whole thing again. */
-retry:
- SERIAL_WRITE (remote_desc, "-", 1);
- }
-
- /* We have tried hard enough, and just can't receive the packet. Give up. */
-
- printf_unfiltered ("Ignoring packet error, continuing...\n");
- SERIAL_WRITE (remote_desc, "+", 1);
-}
-
-static void
-remote_kill ()
-{
- putpkt ("k");
- /* Don't wait for it to die. I'm not really sure it matters whether
- we do or not. For the existing stubs, kill is a noop. */
- target_mourn_inferior ();
-}
-
-static void
-remote_mourn ()
-{
- unpush_target (&remote_ops);
- generic_mourn_inferior ();
-}
-
-#ifdef REMOTE_BREAKPOINT
-
-/* On some machines, e.g. 68k, we may use a different breakpoint instruction
- than other targets. */
-static unsigned char break_insn[] = REMOTE_BREAKPOINT;
-
-#else /* No REMOTE_BREAKPOINT. */
-
-/* Same old breakpoint instruction. This code does nothing different
- than mem-break.c. */
-static unsigned char break_insn[] = BREAKPOINT;
-
-#endif /* No REMOTE_BREAKPOINT. */
-
-/* Insert a breakpoint on targets that don't have any better breakpoint
- support. 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 (this
- is accomplished via BREAKPOINT_MAX). */
-
-static int
-remote_insert_breakpoint (addr, contents_cache)
- CORE_ADDR addr;
- char *contents_cache;
-{
- int val;
-
- val = target_read_memory (addr, contents_cache, sizeof break_insn);
-
- if (val == 0)
- val = target_write_memory (addr, (char *)break_insn, sizeof break_insn);
-
- return val;
-}
-
-static int
-remote_remove_breakpoint (addr, contents_cache)
- CORE_ADDR addr;
- char *contents_cache;
-{
- return target_write_memory (addr, contents_cache, sizeof break_insn);
-}
-
-/* Define the target subroutine names */
-
-struct target_ops remote_hppro_ops = {
- "hppro", /* to_shortname */
- "Remote serial target for HP-PRO targets", /* to_longname */
- "Use a remote computer via a serial line, using a gdb-specific protocol.\n\
-This is for targets that supports the HP-PRO standard.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya) or telnet port.", /* to_doc */
- remote_open, /* to_open */
- remote_close, /* to_close */
- NULL, /* to_attach */
- remote_detach, /* to_detach */
- remote_resume, /* to_resume */
- remote_wait, /* to_wait */
- remote_fetch_registers, /* to_fetch_registers */
- remote_store_registers, /* to_store_registers */
- remote_prepare_to_store, /* to_prepare_to_store */
- remote_xfer_memory, /* to_xfer_memory */
- remote_files_info, /* to_files_info */
-
- remote_insert_breakpoint, /* to_insert_breakpoint */
- remote_remove_breakpoint, /* to_remove_breakpoint */
-
- NULL, /* to_terminal_init */
- NULL, /* to_terminal_inferior */
- NULL, /* to_terminal_ours_for_output */
- NULL, /* to_terminal_ours */
- NULL, /* to_terminal_info */
- remote_kill, /* to_kill */
- hppro_load, /* to_load */
- NULL, /* to_lookup_symbol */
- NULL, /* to_create_inferior */
- remote_mourn, /* to_mourn_inferior */
- 0, /* to_can_run */
- 0, /* to_notice_signals */
- 0, /* to_thread_alive */
- 0, /* to_stop */
- process_stratum, /* to_stratum */
- NULL, /* to_next */
- 1, /* to_has_all_memory */
- 1, /* to_has_memory */
- 1, /* to_has_stack */
- 1, /* to_has_registers */
- 1, /* to_has_execution */
- NULL, /* sections */
- NULL, /* sections_end */
- OPS_MAGIC /* to_magic */
-};
-
-void
-_initialize_remote_hppro ()
-{
- struct cmd_list_element *c;
- add_target (&remote_hppro_ops);
-
- /* this sets the type of download protocol */
- c = add_set_cmd ("loadtype", no_class, var_string, (char *)&loadtype_str,
- "Set the type of the remote load protocol.\n", &setlist);
- c->function.sfunc = set_loadtype_command;
- add_show_from_set (c, &showlist);
- loadtype_str = savestring ("generic", 8);
-
- /* this adds a command to boot the board */
- add_com ("boot", class_support, boot_board,
- "Boot the damn target board.\n");
-}
-
-static void
-set_loadtype_command (ignore, from_tty, c)
- char *ignore;
- int from_tty;
- struct cmd_list_element *c;
-{
- loadtype_str = savestring (*(char **) c->var, strlen (*(char **) c->var));
-}
-
diff --git a/contrib/gdb/gdb/remote-sds.c b/contrib/gdb/gdb/remote-sds.c
deleted file mode 100644
index 507ac5be208a..000000000000
--- a/contrib/gdb/gdb/remote-sds.c
+++ /dev/null
@@ -1,1145 +0,0 @@
-/* Remote target communications for serial-line targets using SDS' protocol.
-
- Copyright 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. */
-
-/* This interface was written by studying the behavior of the SDS
- monitor on an ADS 821/860 board, and by consulting the
- documentation of the monitor that is available on Motorola's web
- site. -sts 8/13/97 */
-
-#include "defs.h"
-#include "gdb_string.h"
-#include <fcntl.h>
-#include "frame.h"
-#include "inferior.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "target.h"
-#include "gdbcmd.h"
-#include "objfiles.h"
-#include "gdb-stabs.h"
-#include "gdbthread.h"
-#include "gdbcore.h"
-#include "regcache.h"
-
-#ifdef USG
-#include <sys/types.h>
-#endif
-
-#include <signal.h>
-#include "serial.h"
-
-extern void _initialize_remote_sds (void);
-
-/* Declarations of local functions. */
-
-static int sds_write_bytes (CORE_ADDR, char *, int);
-
-static int sds_read_bytes (CORE_ADDR, char *, int);
-
-static void sds_files_info (struct target_ops *ignore);
-
-static int sds_xfer_memory (CORE_ADDR, char *, int, int,
- struct mem_attrib *, struct target_ops *);
-
-static void sds_prepare_to_store (void);
-
-static void sds_fetch_registers (int);
-
-static void sds_resume (ptid_t, int, enum target_signal);
-
-static int sds_start_remote (PTR);
-
-static void sds_open (char *, int);
-
-static void sds_close (int);
-
-static void sds_store_registers (int);
-
-static void sds_mourn (void);
-
-static void sds_create_inferior (char *, char *, char **);
-
-static void sds_load (char *, int);
-
-static int getmessage (unsigned char *, int);
-
-static int putmessage (unsigned char *, int);
-
-static int sds_send (unsigned char *, int);
-
-static int readchar (int);
-
-static ptid_t sds_wait (ptid_t, struct target_waitstatus *);
-
-static void sds_kill (void);
-
-static int tohex (int);
-
-static int fromhex (int);
-
-static void sds_detach (char *, int);
-
-static void sds_interrupt (int);
-
-static void sds_interrupt_twice (int);
-
-static void interrupt_query (void);
-
-static int read_frame (char *);
-
-static int sds_insert_breakpoint (CORE_ADDR, char *);
-
-static int sds_remove_breakpoint (CORE_ADDR, char *);
-
-static void init_sds_ops (void);
-
-static void sds_command (char *args, int from_tty);
-
-/* Define the target operations vector. */
-
-static struct target_ops sds_ops;
-
-/* This was 5 seconds, which is a long time to sit and wait.
- Unless this is going though some terminal server or multiplexer or
- other form of hairy serial connection, I would think 2 seconds would
- be plenty. */
-
-static int sds_timeout = 2;
-
-/* Descriptor for I/O to remote machine. Initialize it to NULL so
- that sds_open knows that we don't have a file open when the program
- starts. */
-
-static struct serial *sds_desc = NULL;
-
-/* This limit comes from the monitor. */
-
-#define PBUFSIZ 250
-
-/* Maximum number of bytes to read/write at once. The value here
- is chosen to fill up a packet (the headers account for the 32). */
-#define MAXBUFBYTES ((PBUFSIZ-32)/2)
-
-static int next_msg_id;
-
-static int just_started;
-
-static int message_pending;
-
-
-/* Clean up connection to a remote debugger. */
-
-/* ARGSUSED */
-static void
-sds_close (int quitting)
-{
- if (sds_desc)
- serial_close (sds_desc);
- sds_desc = NULL;
-}
-
-/* Stub for catch_errors. */
-
-static int
-sds_start_remote (PTR dummy)
-{
- int c;
- unsigned char buf[200];
-
- immediate_quit++; /* Allow user to interrupt it */
-
- /* Ack any packet which the remote side has already sent. */
- serial_write (sds_desc, "{#*\r\n", 5);
- serial_write (sds_desc, "{#}\r\n", 5);
-
- while ((c = readchar (1)) >= 0)
- printf_unfiltered ("%c", c);
- printf_unfiltered ("\n");
-
- next_msg_id = 251;
-
- buf[0] = 26;
- sds_send (buf, 1);
-
- buf[0] = 0;
- sds_send (buf, 1);
-
- immediate_quit--;
-
- start_remote (); /* Initialize gdb process mechanisms */
- return 1;
-}
-
-/* Open a connection to a remote debugger.
- NAME is the filename used for communication. */
-
-static void
-sds_open (char *name, int from_tty)
-{
- if (name == 0)
- error ("To open a remote debug connection, you need to specify what serial\n\
-device is attached to the remote system (e.g. /dev/ttya).");
-
- target_preopen (from_tty);
-
- unpush_target (&sds_ops);
-
- sds_desc = serial_open (name);
- if (!sds_desc)
- perror_with_name (name);
-
- if (baud_rate != -1)
- {
- if (serial_setbaudrate (sds_desc, baud_rate))
- {
- serial_close (sds_desc);
- perror_with_name (name);
- }
- }
-
-
- serial_raw (sds_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 (sds_desc);
-
- if (from_tty)
- {
- puts_filtered ("Remote debugging using ");
- puts_filtered (name);
- puts_filtered ("\n");
- }
- push_target (&sds_ops); /* Switch to using remote target now */
-
- just_started = 1;
-
- /* Start the remote connection; if error (0), discard this target.
- In particular, if the user quits, be sure to discard it (we'd be
- in an inconsistent state otherwise). */
- if (!catch_errors (sds_start_remote, NULL,
- "Couldn't establish connection to remote target\n",
- RETURN_MASK_ALL))
- pop_target ();
-}
-
-/* This takes a program previously attached to and detaches it. After
- this is done, GDB can be used to debug some other program. We
- better not have left any breakpoints in the target program or it'll
- die when it hits one. */
-
-static void
-sds_detach (char *args, int from_tty)
-{
- char buf[PBUFSIZ];
-
- if (args)
- error ("Argument given to \"detach\" when remotely debugging.");
-
-#if 0
- /* Tell the remote target to detach. */
- strcpy (buf, "D");
- sds_send (buf, 1);
-#endif
-
- pop_target ();
- if (from_tty)
- puts_filtered ("Ending remote debugging.\n");
-}
-
-/* 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
- error ("Reply contains invalid hex digit %d", a);
-}
-
-/* Convert number NIB to a hex digit. */
-
-static int
-tohex (int nib)
-{
- if (nib < 10)
- return '0' + nib;
- else
- return 'a' + nib - 10;
-}
-
-static int
-tob64 (unsigned char *inbuf, char *outbuf, int len)
-{
- int i, sum;
- char *p;
-
- if (len % 3 != 0)
- error ("bad length");
-
- p = outbuf;
- for (i = 0; i < len; i += 3)
- {
- /* Collect the next three bytes into a number. */
- sum = ((long) *inbuf++) << 16;
- sum |= ((long) *inbuf++) << 8;
- sum |= ((long) *inbuf++);
-
- /* Spit out 4 6-bit encodings. */
- *p++ = ((sum >> 18) & 0x3f) + '0';
- *p++ = ((sum >> 12) & 0x3f) + '0';
- *p++ = ((sum >> 6) & 0x3f) + '0';
- *p++ = (sum & 0x3f) + '0';
- }
- return (p - outbuf);
-}
-
-static int
-fromb64 (char *inbuf, char *outbuf, int len)
-{
- int i, sum;
-
- if (len % 4 != 0)
- error ("bad length");
-
- for (i = 0; i < len; i += 4)
- {
- /* Collect 4 6-bit digits. */
- sum = (*inbuf++ - '0') << 18;
- sum |= (*inbuf++ - '0') << 12;
- sum |= (*inbuf++ - '0') << 6;
- sum |= (*inbuf++ - '0');
-
- /* Now take the resulting 24-bit number and get three bytes out
- of it. */
- *outbuf++ = (sum >> 16) & 0xff;
- *outbuf++ = (sum >> 8) & 0xff;
- *outbuf++ = sum & 0xff;
- }
-
- return (len / 4) * 3;
-}
-
-
-/* Tell the remote machine to resume. */
-
-static enum target_signal last_sent_signal = TARGET_SIGNAL_0;
-int last_sent_step;
-
-static void
-sds_resume (ptid_t ptid, int step, enum target_signal siggnal)
-{
- unsigned char buf[PBUFSIZ];
-
- last_sent_signal = siggnal;
- last_sent_step = step;
-
- buf[0] = (step ? 21 : 20);
- buf[1] = 0; /* (should be signal?) */
-
- sds_send (buf, 2);
-}
-
-/* Send a message to target to halt it. Target will respond, and send
- us a message pending notice. */
-
-static void
-sds_interrupt (int signo)
-{
- unsigned char buf[PBUFSIZ];
-
- /* If this doesn't work, try more severe steps. */
- signal (signo, sds_interrupt_twice);
-
- if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "sds_interrupt called\n");
-
- buf[0] = 25;
- sds_send (buf, 1);
-}
-
-static void (*ofunc) ();
-
-/* The user typed ^C twice. */
-
-static void
-sds_interrupt_twice (int signo)
-{
- signal (signo, ofunc);
-
- interrupt_query ();
-
- signal (signo, sds_interrupt);
-}
-
-/* Ask the user what to do when an interrupt is received. */
-
-static void
-interrupt_query (void)
-{
- target_terminal_ours ();
-
- if (query ("Interrupted while waiting for the program.\n\
-Give up (and stop debugging it)? "))
- {
- target_mourn_inferior ();
- throw_exception (RETURN_QUIT);
- }
-
- target_terminal_inferior ();
-}
-
-/* If nonzero, ignore the next kill. */
-int kill_kludge;
-
-/* Wait until the remote machine stops, then return, storing status in
- STATUS just as `wait' would. Returns "pid" (though it's not clear
- what, if anything, that means in the case of this target). */
-
-static ptid_t
-sds_wait (ptid_t ptid, struct target_waitstatus *status)
-{
- unsigned char buf[PBUFSIZ];
- int retlen;
-
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = 0;
-
- ofunc = (void (*)()) signal (SIGINT, sds_interrupt);
-
- signal (SIGINT, ofunc);
-
- if (just_started)
- {
- just_started = 0;
- status->kind = TARGET_WAITKIND_STOPPED;
- return inferior_ptid;
- }
-
- while (1)
- {
- getmessage (buf, 1);
-
- if (message_pending)
- {
- buf[0] = 26;
- retlen = sds_send (buf, 1);
- if (remote_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "Signals: %02x%02x %02x %02x\n",
- buf[0], buf[1],
- buf[2], buf[3]);
- }
- message_pending = 0;
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
- goto got_status;
- }
- }
-got_status:
- return inferior_ptid;
-}
-
-static unsigned char sprs[16];
-
-/* Read the remote registers into the block REGS. */
-/* Currently we just read all the registers, so we don't use regno. */
-
-/* ARGSUSED */
-static void
-sds_fetch_registers (int regno)
-{
- unsigned char buf[PBUFSIZ];
- int i, retlen;
- char regs[REGISTER_BYTES];
-
- /* Unimplemented registers read as all bits zero. */
- memset (regs, 0, REGISTER_BYTES);
-
- buf[0] = 18;
- buf[1] = 1;
- buf[2] = 0;
- retlen = sds_send (buf, 3);
-
- for (i = 0; i < 4 * 6; ++i)
- regs[i + 4 * 32 + 8 * 32] = buf[i];
- for (i = 0; i < 4 * 4; ++i)
- sprs[i] = buf[i + 4 * 7];
-
- buf[0] = 18;
- buf[1] = 2;
- buf[2] = 0;
- retlen = sds_send (buf, 3);
-
- for (i = 0; i < retlen; i++)
- regs[i] = buf[i];
-
- /* (should warn about reply too short) */
-
- for (i = 0; i < NUM_REGS; i++)
- supply_register (i, &regs[REGISTER_BYTE (i)]);
-}
-
-/* Prepare to store registers. Since we may send them all, we have to
- read out the ones we don't want to change first. */
-
-static void
-sds_prepare_to_store (void)
-{
- /* Make sure the entire registers array is valid. */
- read_register_bytes (0, (char *) NULL, REGISTER_BYTES);
-}
-
-/* Store register REGNO, or all registers if REGNO == -1, from the contents
- of REGISTERS. FIXME: ignores errors. */
-
-static void
-sds_store_registers (int regno)
-{
- unsigned char *p, buf[PBUFSIZ];
- int i;
-
- /* Store all the special-purpose registers. */
- p = buf;
- *p++ = 19;
- *p++ = 1;
- *p++ = 0;
- *p++ = 0;
- for (i = 0; i < 4 * 6; i++)
- *p++ = registers[i + 4 * 32 + 8 * 32];
- for (i = 0; i < 4 * 1; i++)
- *p++ = 0;
- for (i = 0; i < 4 * 4; i++)
- *p++ = sprs[i];
-
- sds_send (buf, p - buf);
-
- /* Store all the general-purpose registers. */
- p = buf;
- *p++ = 19;
- *p++ = 2;
- *p++ = 0;
- *p++ = 0;
- for (i = 0; i < 4 * 32; i++)
- *p++ = registers[i];
-
- sds_send (buf, p - buf);
-
-}
-
-/* Write memory data directly to the remote machine. 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.
-
- Returns number of bytes transferred, or 0 for error. */
-
-static int
-sds_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
-{
- int max_buf_size; /* Max size of packet output buffer */
- int origlen;
- unsigned char buf[PBUFSIZ];
- int todo;
- int i;
-
- /* Chop the transfer down if necessary */
-
- max_buf_size = 150;
-
- origlen = len;
- while (len > 0)
- {
- todo = min (len, max_buf_size);
-
- buf[0] = 13;
- buf[1] = 0;
- buf[2] = (int) (memaddr >> 24) & 0xff;
- buf[3] = (int) (memaddr >> 16) & 0xff;
- buf[4] = (int) (memaddr >> 8) & 0xff;
- buf[5] = (int) (memaddr) & 0xff;
- buf[6] = 1;
- buf[7] = 0;
-
- for (i = 0; i < todo; i++)
- buf[i + 8] = myaddr[i];
-
- sds_send (buf, 8 + todo);
-
- /* (should look at result) */
-
- myaddr += todo;
- memaddr += todo;
- len -= todo;
- }
- return origlen;
-}
-
-/* Read memory data directly from the remote machine. This does not
- use 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.
-
- Returns number of bytes transferred, or 0 for error. */
-
-static int
-sds_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
-{
- int max_buf_size; /* Max size of packet output buffer */
- int origlen, retlen;
- unsigned char buf[PBUFSIZ];
- int todo;
- int i;
-
- /* Chop the transfer down if necessary */
-
- max_buf_size = 150;
-
- origlen = len;
- while (len > 0)
- {
- todo = min (len, max_buf_size);
-
- buf[0] = 12;
- buf[1] = 0;
- buf[2] = (int) (memaddr >> 24) & 0xff;
- buf[3] = (int) (memaddr >> 16) & 0xff;
- buf[4] = (int) (memaddr >> 8) & 0xff;
- buf[5] = (int) (memaddr) & 0xff;
- buf[6] = (int) (todo >> 8) & 0xff;
- buf[7] = (int) (todo) & 0xff;
- buf[8] = 1;
-
- retlen = sds_send (buf, 9);
-
- if (retlen - 2 != todo)
- {
- return 0;
- }
-
- /* Reply describes memory byte by byte. */
-
- for (i = 0; i < todo; i++)
- myaddr[i] = buf[i + 2];
-
- myaddr += todo;
- memaddr += todo;
- len -= todo;
- }
-
- return origlen;
-}
-
-/* Read or write LEN bytes from inferior memory at MEMADDR,
- transferring to or from debugger address MYADDR. Write to inferior
- if SHOULD_WRITE is nonzero. Returns length of data written or
- read; 0 for error. TARGET is unused. */
-
-/* ARGSUSED */
-static int
-sds_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int should_write,
- struct mem_attrib *attrib, struct target_ops *target)
-{
- int res;
-
- if (should_write)
- res = sds_write_bytes (memaddr, myaddr, len);
- else
- res = sds_read_bytes (memaddr, myaddr, len);
-
- return res;
-}
-
-
-static void
-sds_files_info (struct target_ops *ignore)
-{
- puts_filtered ("Debugging over a serial connection, using SDS protocol.\n");
-}
-
-/* Stuff for dealing with the packets which are part of this protocol.
- See comment at top of file for details. */
-
-/* Read a single character from the remote end, masking it down to 7 bits. */
-
-static int
-readchar (int timeout)
-{
- int ch;
-
- ch = serial_readchar (sds_desc, timeout);
-
- if (remote_debug > 1 && ch >= 0)
- fprintf_unfiltered (gdb_stdlog, "%c(%x)", ch, ch);
-
- switch (ch)
- {
- case SERIAL_EOF:
- error ("Remote connection closed");
- case SERIAL_ERROR:
- perror_with_name ("Remote communication error");
- case SERIAL_TIMEOUT:
- return ch;
- default:
- return ch & 0x7f;
- }
-}
-
-/* An SDS-style checksum is a sum of the bytes modulo 253. (Presumably
- because 253, 254, and 255 are special flags in the protocol.) */
-
-static int
-compute_checksum (int csum, char *buf, int len)
-{
- int i;
-
- for (i = 0; i < len; ++i)
- csum += (unsigned char) buf[i];
-
- csum %= 253;
- return csum;
-}
-
-/* Send the command in BUF to the remote machine, and read the reply
- into BUF also. */
-
-static int
-sds_send (unsigned char *buf, int len)
-{
- putmessage (buf, len);
-
- return getmessage (buf, 0);
-}
-
-/* Send a message to the remote machine. */
-
-static int
-putmessage (unsigned char *buf, int len)
-{
- int i, enclen;
- unsigned char csum = 0;
- char buf2[PBUFSIZ], buf3[PBUFSIZ];
- unsigned char header[3];
- char *p;
-
- /* Copy the packet into buffer BUF2, encapsulating it
- and giving it a checksum. */
-
- if (len > 170) /* Prosanity check */
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
-
- if (remote_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "Message to send: \"");
- for (i = 0; i < len; ++i)
- fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
- fprintf_unfiltered (gdb_stdlog, "\"\n");
- }
-
- p = buf2;
- *p++ = '$';
-
- if (len % 3 != 0)
- {
- buf[len] = '\0';
- buf[len + 1] = '\0';
- }
-
- header[1] = next_msg_id;
-
- header[2] = len;
-
- csum = compute_checksum (csum, buf, len);
- csum = compute_checksum (csum, header + 1, 2);
-
- header[0] = csum;
-
- tob64 (header, p, 3);
- p += 4;
- enclen = tob64 (buf, buf3, ((len + 2) / 3) * 3);
-
- for (i = 0; i < enclen; ++i)
- *p++ = buf3[i];
- *p++ = '\r';
- *p++ = '\n';
-
- next_msg_id = (next_msg_id + 3) % 245;
-
- /* Send it over and over until we get a positive ack. */
-
- while (1)
- {
- if (remote_debug)
- {
- *p = '\0';
- fprintf_unfiltered (gdb_stdlog, "Sending encoded: \"%s\"", buf2);
- fprintf_unfiltered (gdb_stdlog,
- " (Checksum %d, id %d, length %d)\n",
- header[0], header[1], header[2]);
- gdb_flush (gdb_stdlog);
- }
- if (serial_write (sds_desc, buf2, p - buf2))
- perror_with_name ("putmessage: write failed");
-
- return 1;
- }
-}
-
-/* Come here after finding the start of the frame. Collect the rest
- into BUF. Returns 0 on any error, 1 on success. */
-
-static int
-read_frame (char *buf)
-{
- char *bp;
- int c;
-
- bp = buf;
-
- while (1)
- {
- c = readchar (sds_timeout);
-
- switch (c)
- {
- case SERIAL_TIMEOUT:
- if (remote_debug)
- fputs_filtered ("Timeout in mid-message, retrying\n", gdb_stdlog);
- return 0;
- case '$':
- if (remote_debug)
- fputs_filtered ("Saw new packet start in middle of old one\n",
- gdb_stdlog);
- return 0; /* Start a new packet, count retries */
- case '\r':
- break;
-
- case '\n':
- {
- *bp = '\000';
- if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "Received encoded: \"%s\"\n",
- buf);
- return 1;
- }
-
- default:
- if (bp < buf + PBUFSIZ - 1)
- {
- *bp++ = c;
- continue;
- }
-
- *bp = '\0';
- puts_filtered ("Message too long: ");
- puts_filtered (buf);
- puts_filtered ("\n");
-
- return 0;
- }
- }
-}
-
-/* Read a packet from the remote machine, with error checking,
- and store it in BUF. BUF is expected to be of size PBUFSIZ.
- If FOREVER, wait forever rather than timing out; this is used
- while the target is executing user code. */
-
-static int
-getmessage (unsigned char *buf, int forever)
-{
- int c, c2, c3;
- int tries;
- int timeout;
- int val, i, len, csum;
- unsigned char header[3];
- unsigned char inbuf[500];
-
- strcpy (buf, "timeout");
-
- if (forever)
- {
- timeout = watchdog > 0 ? watchdog : -1;
- }
-
- else
- timeout = sds_timeout;
-
-#define MAX_TRIES 3
-
- for (tries = 1; tries <= MAX_TRIES; tries++)
- {
- /* This can loop forever if the remote side sends us characters
- continuously, but if it pauses, we'll get a zero from readchar
- because of timeout. Then we'll count that as a retry. */
-
- /* Note that we will only wait forever prior to the start of a packet.
- After that, we expect characters to arrive at a brisk pace. They
- should show up within sds_timeout intervals. */
-
- do
- {
- c = readchar (timeout);
-
- if (c == SERIAL_TIMEOUT)
- {
- if (forever) /* Watchdog went off. Kill the target. */
- {
- target_mourn_inferior ();
- error ("Watchdog has expired. Target detached.\n");
- }
- if (remote_debug)
- fputs_filtered ("Timed out.\n", gdb_stdlog);
- goto retry;
- }
- }
- while (c != '$' && c != '{');
-
- /* We might have seen a "trigraph", a sequence of three characters
- that indicate various sorts of communication state. */
-
- if (c == '{')
- {
- /* Read the other two chars of the trigraph. */
- c2 = readchar (timeout);
- c3 = readchar (timeout);
- if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "Trigraph %c%c%c received\n",
- c, c2, c3);
- if (c3 == '+')
- {
- message_pending = 1;
- return 0; /*???? */
- }
- continue;
- }
-
- val = read_frame (inbuf);
-
- if (val == 1)
- {
- fromb64 (inbuf, header, 4);
- /* (should check out other bits) */
- fromb64 (inbuf + 4, buf, strlen (inbuf) - 4);
-
- len = header[2];
-
- csum = 0;
- csum = compute_checksum (csum, buf, len);
- csum = compute_checksum (csum, header + 1, 2);
-
- if (csum != header[0])
- fprintf_unfiltered (gdb_stderr,
- "Checksum mismatch: computed %d, received %d\n",
- csum, header[0]);
-
- if (header[2] == 0xff)
- fprintf_unfiltered (gdb_stderr, "Requesting resend...\n");
-
- if (remote_debug)
- {
- fprintf_unfiltered (gdb_stdlog,
- "... (Got checksum %d, id %d, length %d)\n",
- header[0], header[1], header[2]);
- fprintf_unfiltered (gdb_stdlog, "Message received: \"");
- for (i = 0; i < len; ++i)
- {
- fprintf_unfiltered (gdb_stdlog, "%02x", (unsigned char) buf[i]);
- }
- fprintf_unfiltered (gdb_stdlog, "\"\n");
- }
-
- /* no ack required? */
- return len;
- }
-
- /* Try the whole thing again. */
- retry:
- /* need to do something here */
- }
-
- /* We have tried hard enough, and just can't receive the packet. Give up. */
-
- printf_unfiltered ("Ignoring packet error, continuing...\n");
- return 0;
-}
-
-static void
-sds_kill (void)
-{
- /* Don't try to do anything to the target. */
-}
-
-static void
-sds_mourn (void)
-{
- unpush_target (&sds_ops);
- generic_mourn_inferior ();
-}
-
-static void
-sds_create_inferior (char *exec_file, char *args, char **env)
-{
- inferior_ptid = pid_to_ptid (42000);
-
- /* Clean up from the last time we were running. */
- clear_proceed_status ();
-
- /* Let the remote process run. */
- proceed (bfd_get_start_address (exec_bfd), TARGET_SIGNAL_0, 0);
-}
-
-static void
-sds_load (char *filename, int from_tty)
-{
- generic_load (filename, from_tty);
-
- inferior_ptid = null_ptid;
-}
-
-/* The SDS monitor has commands for breakpoint insertion, although it
- it doesn't actually manage the breakpoints, it just returns the
- replaced instruction back to the debugger. */
-
-static int
-sds_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
-{
- int i, retlen;
- unsigned char *p, buf[PBUFSIZ];
-
- p = buf;
- *p++ = 16;
- *p++ = 0;
- *p++ = (int) (addr >> 24) & 0xff;
- *p++ = (int) (addr >> 16) & 0xff;
- *p++ = (int) (addr >> 8) & 0xff;
- *p++ = (int) (addr) & 0xff;
-
- retlen = sds_send (buf, p - buf);
-
- for (i = 0; i < 4; ++i)
- contents_cache[i] = buf[i + 2];
-
- return 0;
-}
-
-static int
-sds_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
-{
- int i, retlen;
- unsigned char *p, buf[PBUFSIZ];
-
- p = buf;
- *p++ = 17;
- *p++ = 0;
- *p++ = (int) (addr >> 24) & 0xff;
- *p++ = (int) (addr >> 16) & 0xff;
- *p++ = (int) (addr >> 8) & 0xff;
- *p++ = (int) (addr) & 0xff;
- for (i = 0; i < 4; ++i)
- *p++ = contents_cache[i];
-
- retlen = sds_send (buf, p - buf);
-
- return 0;
-}
-
-static void
-init_sds_ops (void)
-{
- sds_ops.to_shortname = "sds";
- sds_ops.to_longname = "Remote serial target with SDS protocol";
- sds_ops.to_doc = "Use a remote computer via a serial line; using the SDS protocol.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- sds_ops.to_open = sds_open;
- sds_ops.to_close = sds_close;
- sds_ops.to_detach = sds_detach;
- sds_ops.to_resume = sds_resume;
- sds_ops.to_wait = sds_wait;
- sds_ops.to_fetch_registers = sds_fetch_registers;
- sds_ops.to_store_registers = sds_store_registers;
- sds_ops.to_prepare_to_store = sds_prepare_to_store;
- sds_ops.to_xfer_memory = sds_xfer_memory;
- sds_ops.to_files_info = sds_files_info;
- sds_ops.to_insert_breakpoint = sds_insert_breakpoint;
- sds_ops.to_remove_breakpoint = sds_remove_breakpoint;
- sds_ops.to_kill = sds_kill;
- sds_ops.to_load = sds_load;
- sds_ops.to_create_inferior = sds_create_inferior;
- sds_ops.to_mourn_inferior = sds_mourn;
- sds_ops.to_stratum = process_stratum;
- sds_ops.to_has_all_memory = 1;
- sds_ops.to_has_memory = 1;
- sds_ops.to_has_stack = 1;
- sds_ops.to_has_registers = 1;
- sds_ops.to_has_execution = 1;
- sds_ops.to_magic = OPS_MAGIC;
-}
-
-/* Put a command string, in args, out to the monitor and display the
- reply message. */
-
-static void
-sds_command (char *args, int from_tty)
-{
- char *p;
- int i, len, retlen;
- unsigned char buf[1000];
-
- /* Convert hexadecimal chars into a byte buffer. */
- p = args;
- len = 0;
- while (*p != '\0')
- {
- buf[len++] = fromhex (p[0]) * 16 + fromhex (p[1]);
- if (p[1] == '\0')
- break;
- p += 2;
- }
-
- retlen = sds_send (buf, len);
-
- printf_filtered ("Reply is ");
- for (i = 0; i < retlen; ++i)
- {
- printf_filtered ("%02x", buf[i]);
- }
- printf_filtered ("\n");
-}
-
-void
-_initialize_remote_sds (void)
-{
- init_sds_ops ();
- add_target (&sds_ops);
-
- add_show_from_set (add_set_cmd ("sdstimeout", no_class,
- var_integer, (char *) &sds_timeout,
- "Set timeout value for sds read.\n", &setlist),
- &showlist);
-
- add_com ("sds", class_obscure, sds_command,
- "Send a command to the SDS monitor.");
-}
diff --git a/contrib/gdb/gdb/remote-sim.h b/contrib/gdb/gdb/remote-sim.h
deleted file mode 100644
index 8c106a29262a..000000000000
--- a/contrib/gdb/gdb/remote-sim.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/* This file defines the interface between the simulator and gdb.
- Copyright (C) 1993, 1994 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#if !defined (REMOTE_SIM_H)
-#define REMOTE_SIM_H 1
-
-#include "callback.h"
-/* This file is used when building stand-alone simulators, so isolate this
- file from gdb. */
-
-/* Pick up CORE_ADDR_TYPE if defined (from gdb), otherwise use same value as
- gdb does (unsigned int - from defs.h). */
-
-#ifndef CORE_ADDR_TYPE
-typedef unsigned int SIM_ADDR;
-#else
-typedef CORE_ADDR_TYPE SIM_ADDR;
-#endif
-
-/* Callbacks.
- The simulator may use the following callbacks (gdb routines) which the
- standalone program must provide.
-
- void printf_filtered (char *msg, ...);
- void error /-* noreturn *-/ (char *msg, ...);
- void *xmalloc (long size);
- int sim_callback_write_stdout (char *, int len);
-
- The new way of doing I/O is to use the pointer provided by GDB
- via the sim_set_callbacks call, look in callbacks.c to see what
- can be done.
-*/
-
-/* Main simulator entry points ...
-
- All functions that can get an error must call the gdb routine `error',
- they can only return upon success. */
-
-/* Initialize the simulator. This function is called when the simulator
- is selected from the command line. ARGS is passed from the command line
- and can be used to select whatever run time options the simulator provides.
- ARGS is the raw character string and must be parsed by the simulator,
- which is trivial to do with the buildargv function in libiberty.
- It is ok to do nothing. */
-
-void sim_open PARAMS ((char *args));
-
-/* Terminate usage of the simulator. This may involve freeing target memory
- and closing any open files and mmap'd areas. You cannot assume sim_kill
- has already been called.
- QUITTING is non-zero if we cannot hang on errors. */
-
-void sim_close PARAMS ((int quitting));
-
-/* Load program PROG into the simulator.
- Return non-zero if you wish the caller to handle it
- (it is done this way because most simulators can use gr_load_image,
- but defining it as a callback seems awkward). */
-
-int sim_load PARAMS ((char *prog, int from_tty));
-
-/* Prepare to run the simulated program.
- START_ADDRESS is, yes, you guessed it, the start address of the program.
- ARGV and ENV are NULL terminated lists of pointers.
- Gdb will set the start address via sim_store_register as well, but
- standalone versions of existing simulators are not set up to cleanly call
- sim_store_register, so the START_ADDRESS argument is there as a
- workaround. */
-
-void sim_create_inferior PARAMS ((SIM_ADDR start_address,
- char **argv, char **env));
-
-/* Kill the running program.
- This may involve closing any open files and deleting any mmap'd areas. */
-
-void sim_kill PARAMS ((void));
-
-/* Read LENGTH bytes of the simulated program's memory and store in BUF.
- Result is number of bytes read, or zero if error. */
-
-int sim_read PARAMS ((SIM_ADDR mem, unsigned char *buf, int length));
-
-/* Store LENGTH bytes from BUF in the simulated program's memory.
- Result is number of bytes write, or zero if error. */
-
-int sim_write PARAMS ((SIM_ADDR mem, unsigned char *buf, int length));
-
-/* Fetch register REGNO and store the raw value in BUF. */
-
-void sim_fetch_register PARAMS ((int regno, unsigned char *buf));
-
-/* Store register REGNO from BUF (in raw format). */
-
-void sim_store_register PARAMS ((int regno, unsigned char *buf));
-
-/* Print some interesting information about the simulator.
- VERBOSE is non-zero for the wordy version. */
-
-void sim_info PARAMS ((int verbose));
-
-/* Fetch why the program stopped.
- SIGRC will contain either the argument to exit() or the signal number. */
-
-enum sim_stop { sim_exited, sim_stopped, sim_signalled };
-
-void sim_stop_reason PARAMS ((enum sim_stop *reason, int *sigrc));
-
-/* Run (or resume) the program. */
-
-void sim_resume PARAMS ((int step, int siggnal));
-
-/* Passthru for other commands that the simulator might support. */
-
-void sim_do_command PARAMS ((char *cmd));
-
-
-/* Callbacks for the simulator to use. */
-
-int sim_callback_write_stdout PARAMS ((char *, int));
-
-/* Provide simulator with a standard host_callback_struct. */
-
-void sim_set_callbacks PARAMS ((struct host_callback_struct *));
-
-
-#endif /* !defined (REMOTE_SIM_H) */
diff --git a/contrib/gdb/gdb/remote-udi.c b/contrib/gdb/gdb/remote-udi.c
deleted file mode 100644
index f7863a813951..000000000000
--- a/contrib/gdb/gdb/remote-udi.c
+++ /dev/null
@@ -1,1722 +0,0 @@
-/* OBSOLETE /* Remote debugging interface for AMD 29k interfaced via UDI, for GDB. */
-/* OBSOLETE Copyright 1990, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 */
-/* OBSOLETE Free Software Foundation, Inc. */
-/* OBSOLETE Written by Daniel Mann. Contributed by AMD. */
-/* OBSOLETE */
-/* OBSOLETE This file is part of GDB. */
-/* OBSOLETE */
-/* OBSOLETE This program is free software; you can redistribute it and/or modify */
-/* OBSOLETE it under the terms of the GNU General Public License as published by */
-/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
-/* OBSOLETE (at your option) any later version. */
-/* OBSOLETE */
-/* OBSOLETE This program is distributed in the hope that it will be useful, */
-/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* OBSOLETE GNU General Public License for more details. */
-/* OBSOLETE */
-/* OBSOLETE You should have received a copy of the GNU General Public License */
-/* OBSOLETE along with this program; if not, write to the Free Software */
-/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
-/* OBSOLETE Boston, MA 02111-1307, USA. */ */
-/* OBSOLETE */
-/* OBSOLETE /* This is like remote.c but uses the Universal Debug Interface (UDI) to */
-/* OBSOLETE talk to the target hardware (or simulator). UDI is a TCP/IP based */
-/* OBSOLETE protocol; for hardware that doesn't run TCP, an interface adapter */
-/* OBSOLETE daemon talks UDI on one side, and talks to the hardware (typically */
-/* OBSOLETE over a serial port) on the other side. */
-/* OBSOLETE */
-/* OBSOLETE - Originally written by Daniel Mann at AMD for MiniMON and gdb 3.91.6. */
-/* OBSOLETE - David Wood (wood@lab.ultra.nyu.edu) at New York University adapted this */
-/* OBSOLETE file to gdb 3.95. I was unable to get this working on sun3os4 */
-/* OBSOLETE with termio, only with sgtty. */
-/* OBSOLETE - Daniel Mann at AMD took the 3.95 adaptions above and replaced */
-/* OBSOLETE MiniMON interface with UDI-p interface. */ */
-/* OBSOLETE */
-/* OBSOLETE #include "defs.h" */
-/* OBSOLETE #include "frame.h" */
-/* OBSOLETE #include "inferior.h" */
-/* OBSOLETE #include "value.h" */
-/* OBSOLETE #include <ctype.h> */
-/* OBSOLETE #include <fcntl.h> */
-/* OBSOLETE #include <errno.h> */
-/* OBSOLETE #include "gdb_string.h" */
-/* OBSOLETE #include "terminal.h" */
-/* OBSOLETE #include "target.h" */
-/* OBSOLETE #include "29k-share/udi/udiproc.h" */
-/* OBSOLETE #include "gdbcmd.h" */
-/* OBSOLETE #include "bfd.h" */
-/* OBSOLETE #include "gdbcore.h" /* For download function */ */
-/* OBSOLETE #include "regcache.h" */
-/* OBSOLETE */
-/* OBSOLETE /* access the register store directly, without going through */
-/* OBSOLETE the normal handler functions. This avoids an extra data copy. */ */
-/* OBSOLETE */
-/* OBSOLETE extern int stop_soon_quietly; /* for wait_for_inferior */ */
-/* OBSOLETE extern struct value *call_function_by_hand (); */
-/* OBSOLETE static void udi_resume (ptid_t ptid, int step, enum target_signal sig); */
-/* OBSOLETE static void udi_fetch_registers (int regno); */
-/* OBSOLETE static void udi_load (char *args, int from_tty); */
-/* OBSOLETE static void fetch_register (int regno); */
-/* OBSOLETE static void udi_store_registers (int regno); */
-/* OBSOLETE static int store_register (int regno); */
-/* OBSOLETE static int regnum_to_srnum (int regno); */
-/* OBSOLETE static void udi_close (int quitting); */
-/* OBSOLETE static CPUSpace udi_memory_space (CORE_ADDR addr); */
-/* OBSOLETE static int udi_write_inferior_memory (CORE_ADDR memaddr, char *myaddr, */
-/* OBSOLETE int len); */
-/* OBSOLETE static int udi_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, */
-/* OBSOLETE int len); */
-/* OBSOLETE static void download (char *load_arg_string, int from_tty); */
-/* OBSOLETE char CoffFileName[100] = ""; */
-/* OBSOLETE */
-/* OBSOLETE #define FREEZE_MODE (read_register(CPS_REGNUM) & 0x400) */
-/* OBSOLETE #define USE_SHADOW_PC ((processor_type == a29k_freeze_mode) && FREEZE_MODE) */
-/* OBSOLETE */
-/* OBSOLETE static int timeout = 5; */
-/* OBSOLETE extern struct target_ops udi_ops; /* Forward declaration */ */
-/* OBSOLETE */
-/* OBSOLETE /* Special register enumeration. */
-/* OBSOLETE */ */
-/* OBSOLETE */
-/* OBSOLETE /******************************************************************* UDI DATA*/ */
-/* OBSOLETE #define MAXDATA 2*1024 /* max UDI[read/write] byte size */ */
-/* OBSOLETE /* Descriptor for I/O to remote machine. Initialize it to -1 so that */
-/* OBSOLETE udi_open knows that we don't have a file open when the program */
-/* OBSOLETE starts. */ */
-/* OBSOLETE */
-/* OBSOLETE UDISessionId udi_session_id = -1; */
-/* OBSOLETE static char *udi_config_id; */
-/* OBSOLETE */
-/* OBSOLETE CPUOffset IMemStart = 0; */
-/* OBSOLETE CPUSizeT IMemSize = 0; */
-/* OBSOLETE CPUOffset DMemStart = 0; */
-/* OBSOLETE CPUSizeT DMemSize = 0; */
-/* OBSOLETE CPUOffset RMemStart = 0; */
-/* OBSOLETE CPUSizeT RMemSize = 0; */
-/* OBSOLETE UDIUInt32 CPUPRL; */
-/* OBSOLETE UDIUInt32 CoProcPRL; */
-/* OBSOLETE */
-/* OBSOLETE UDIMemoryRange address_ranges[2]; /* Text and data */ */
-/* OBSOLETE UDIResource entry = */
-/* OBSOLETE {0, 0}; /* Entry point */ */
-/* OBSOLETE CPUSizeT stack_sizes[2]; /* Regular and memory stacks */ */
-/* OBSOLETE */
-/* OBSOLETE #define SBUF_MAX 1024 /* maximum size of string handling buffer */ */
-/* OBSOLETE char sbuf[SBUF_MAX]; */
-/* OBSOLETE */
-/* OBSOLETE typedef struct bkpt_entry_str */
-/* OBSOLETE { */
-/* OBSOLETE UDIResource Addr; */
-/* OBSOLETE UDIUInt32 PassCount; */
-/* OBSOLETE UDIBreakType Type; */
-/* OBSOLETE unsigned int BreakId; */
-/* OBSOLETE } */
-/* OBSOLETE bkpt_entry_t; */
-/* OBSOLETE #define BKPT_TABLE_SIZE 40 */
-/* OBSOLETE static bkpt_entry_t bkpt_table[BKPT_TABLE_SIZE]; */
-/* OBSOLETE extern char dfe_errmsg[]; /* error string */ */
-/* OBSOLETE */
-/* OBSOLETE /* malloc'd name of the program on the remote system. */ */
-/* OBSOLETE static char *prog_name = NULL; */
-/* OBSOLETE */
-/* OBSOLETE /* This is called not only when we first attach, but also when the */
-/* OBSOLETE user types "run" after having attached. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE udi_create_inferior (char *execfile, char *args, char **env) */
-/* OBSOLETE { */
-/* OBSOLETE char *args1; */
-/* OBSOLETE */
-/* OBSOLETE if (execfile) */
-/* OBSOLETE { */
-/* OBSOLETE if (prog_name != NULL) */
-/* OBSOLETE xfree (prog_name); */
-/* OBSOLETE prog_name = savestring (execfile, strlen (execfile)); */
-/* OBSOLETE } */
-/* OBSOLETE else if (entry.Offset) */
-/* OBSOLETE execfile = ""; */
-/* OBSOLETE else */
-/* OBSOLETE error ("No image loaded into target."); */
-/* OBSOLETE */
-/* OBSOLETE if (udi_session_id < 0) */
-/* OBSOLETE { */
-/* OBSOLETE /* If the TIP is not open, open it. */ */
-/* OBSOLETE if (UDIConnect (udi_config_id, &udi_session_id)) */
-/* OBSOLETE error ("UDIConnect() failed: %s\n", dfe_errmsg); */
-/* OBSOLETE /* We will need to download the program. */ */
-/* OBSOLETE entry.Offset = 0; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE inferior_ptid = pid_to_ptid (40000); */
-/* OBSOLETE */
-/* OBSOLETE if (!entry.Offset) */
-/* OBSOLETE download (execfile, 0); */
-/* OBSOLETE */
-/* OBSOLETE args1 = alloca (strlen (execfile) + strlen (args) + 2); */
-/* OBSOLETE */
-/* OBSOLETE if (execfile[0] == '\0') */
-/* OBSOLETE */
-/* OBSOLETE /* It is empty. We need to quote it somehow, or else the target */
-/* OBSOLETE will think there is no argument being passed here. According */
-/* OBSOLETE to the UDI spec it is quoted "according to TIP OS rules" which */
-/* OBSOLETE I guess means quoting it like the Unix shell should work */
-/* OBSOLETE (sounds pretty bogus to me...). In fact it doesn't work (with */
-/* OBSOLETE isstip anyway), but passing in two quotes as the argument seems */
-/* OBSOLETE like a reasonable enough behavior anyway (I guess). */ */
-/* OBSOLETE */
-/* OBSOLETE strcpy (args1, "''"); */
-/* OBSOLETE else */
-/* OBSOLETE strcpy (args1, execfile); */
-/* OBSOLETE strcat (args1, " "); */
-/* OBSOLETE strcat (args1, args); */
-/* OBSOLETE */
-/* OBSOLETE UDIInitializeProcess (address_ranges, /* ProcessMemory[] */ */
-/* OBSOLETE (UDIInt) 2, /* NumberOfRanges */ */
-/* OBSOLETE entry, /* EntryPoint */ */
-/* OBSOLETE stack_sizes, /* *StackSizes */ */
-/* OBSOLETE (UDIInt) 2, /* NumberOfStacks */ */
-/* OBSOLETE args1); /* ArgString */ */
-/* OBSOLETE */
-/* OBSOLETE init_wait_for_inferior (); */
-/* OBSOLETE clear_proceed_status (); */
-/* OBSOLETE proceed (-1, TARGET_SIGNAL_DEFAULT, 0); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE udi_mourn (void) */
-/* OBSOLETE { */
-/* OBSOLETE #if 0 */
-/* OBSOLETE /* Requiring "target udi" each time you run is a major pain. I suspect */
-/* OBSOLETE this was just blindy copied from remote.c, in which "target" and */
-/* OBSOLETE "run" are combined. Having a udi target without an inferior seems */
-/* OBSOLETE to work between "target udi" and "run", so why not now? */ */
-/* OBSOLETE pop_target (); /* Pop back to no-child state */ */
-/* OBSOLETE #endif */
-/* OBSOLETE /* But if we're going to want to run it again, we better remove the */
-/* OBSOLETE breakpoints... */ */
-/* OBSOLETE remove_breakpoints (); */
-/* OBSOLETE generic_mourn_inferior (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /******************************************************************** UDI_OPEN */
-/* OBSOLETE ** Open a connection to remote TIP. */
-/* OBSOLETE NAME is the socket domain used for communication with the TIP, */
-/* OBSOLETE then a space and the socket name or TIP-host name. */
-/* OBSOLETE '<udi_udi_config_id>' for example. */
-/* OBSOLETE */ */
-/* OBSOLETE */
-/* OBSOLETE /* XXX - need cleanups for udiconnect for various failures!!! */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE udi_open (char *name, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE unsigned int prl; */
-/* OBSOLETE char *p; */
-/* OBSOLETE int cnt; */
-/* OBSOLETE UDIMemoryRange KnownMemory[10]; */
-/* OBSOLETE UDIUInt32 ChipVersions[10]; */
-/* OBSOLETE UDIInt NumberOfRanges = 10; */
-/* OBSOLETE UDIInt NumberOfChips = 10; */
-/* OBSOLETE UDIPId PId; */
-/* OBSOLETE UDIUInt32 TIPId, TargetId, DFEId, DFE, TIP, DFEIPCId, TIPIPCId; */
-/* OBSOLETE */
-/* OBSOLETE target_preopen (from_tty); */
-/* OBSOLETE */
-/* OBSOLETE entry.Offset = 0; */
-/* OBSOLETE */
-/* OBSOLETE for (cnt = 0; cnt < BKPT_TABLE_SIZE; cnt++) */
-/* OBSOLETE bkpt_table[cnt].Type = 0; */
-/* OBSOLETE */
-/* OBSOLETE if (udi_config_id) */
-/* OBSOLETE xfree (udi_config_id); */
-/* OBSOLETE */
-/* OBSOLETE if (!name) */
-/* OBSOLETE error ("Usage: target udi config_id, where config_id appears in udi_soc file"); */
-/* OBSOLETE */
-/* OBSOLETE udi_config_id = xstrdup (strtok (name, " \t")); */
-/* OBSOLETE */
-/* OBSOLETE if (UDIConnect (udi_config_id, &udi_session_id)) */
-/* OBSOLETE /* FIXME: Should set udi_session_id to -1 here. */ */
-/* OBSOLETE error ("UDIConnect() failed: %s\n", dfe_errmsg); */
-/* OBSOLETE */
-/* OBSOLETE push_target (&udi_ops); */
-/* OBSOLETE */
-/* OBSOLETE /* */
-/* OBSOLETE ** Initialize target configuration structure (global) */
-/* OBSOLETE */ */
-/* OBSOLETE if (UDIGetTargetConfig (KnownMemory, &NumberOfRanges, */
-/* OBSOLETE ChipVersions, &NumberOfChips)) */
-/* OBSOLETE error ("UDIGetTargetConfig() failed"); */
-/* OBSOLETE if (NumberOfChips > 2) */
-/* OBSOLETE fprintf_unfiltered (gdb_stderr, "Target has more than one processor\n"); */
-/* OBSOLETE for (cnt = 0; cnt < NumberOfRanges; cnt++) */
-/* OBSOLETE { */
-/* OBSOLETE switch (KnownMemory[cnt].Space) */
-/* OBSOLETE { */
-/* OBSOLETE default: */
-/* OBSOLETE fprintf_unfiltered (gdb_stderr, "UDIGetTargetConfig() unknown memory space\n"); */
-/* OBSOLETE break; */
-/* OBSOLETE case UDI29KCP_S: */
-/* OBSOLETE break; */
-/* OBSOLETE case UDI29KIROMSpace: */
-/* OBSOLETE RMemStart = KnownMemory[cnt].Offset; */
-/* OBSOLETE RMemSize = KnownMemory[cnt].Size; */
-/* OBSOLETE break; */
-/* OBSOLETE case UDI29KIRAMSpace: */
-/* OBSOLETE IMemStart = KnownMemory[cnt].Offset; */
-/* OBSOLETE IMemSize = KnownMemory[cnt].Size; */
-/* OBSOLETE break; */
-/* OBSOLETE case UDI29KDRAMSpace: */
-/* OBSOLETE DMemStart = KnownMemory[cnt].Offset; */
-/* OBSOLETE DMemSize = KnownMemory[cnt].Size; */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE a29k_get_processor_type (); */
-/* OBSOLETE */
-/* OBSOLETE if (UDICreateProcess (&PId)) */
-/* OBSOLETE fprintf_unfiltered (gdb_stderr, "UDICreateProcess() failed\n"); */
-/* OBSOLETE */
-/* OBSOLETE /* Print out some stuff, letting the user now what's going on */ */
-/* OBSOLETE if (UDICapabilities (&TIPId, &TargetId, DFEId, DFE, &TIP, &DFEIPCId, */
-/* OBSOLETE &TIPIPCId, sbuf)) */
-/* OBSOLETE error ("UDICapabilities() failed"); */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE printf_filtered ("Connected via UDI socket,\n\ */
-/* OBSOLETE DFE-IPC version %x.%x.%x TIP-IPC version %x.%x.%x TIP version %x.%x.%x\n %s\n", */
-/* OBSOLETE (DFEIPCId >> 8) & 0xf, (DFEIPCId >> 4) & 0xf, DFEIPCId & 0xf, */
-/* OBSOLETE (TIPIPCId >> 8) & 0xf, (TIPIPCId >> 4) & 0xf, TIPIPCId & 0xf, */
-/* OBSOLETE (TargetId >> 8) & 0xf, (TargetId >> 4) & 0xf, TargetId & 0xf, */
-/* OBSOLETE sbuf); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /******************************************************************* UDI_CLOSE */
-/* OBSOLETE Close the open connection to the TIP process. */
-/* OBSOLETE Use this when you want to detach and do something else */
-/* OBSOLETE with your gdb. */ */
-/* OBSOLETE static void */
-/* OBSOLETE udi_close ( /*FIXME: how is quitting used */ */
-/* OBSOLETE int quitting) */
-/* OBSOLETE { */
-/* OBSOLETE if (udi_session_id < 0) */
-/* OBSOLETE return; */
-/* OBSOLETE */
-/* OBSOLETE /* We should never get here if there isn't something valid in */
-/* OBSOLETE udi_session_id. */ */
-/* OBSOLETE */
-/* OBSOLETE if (UDIDisconnect (udi_session_id, UDITerminateSession)) */
-/* OBSOLETE { */
-/* OBSOLETE if (quitting) */
-/* OBSOLETE warning ("UDIDisconnect() failed in udi_close"); */
-/* OBSOLETE else */
-/* OBSOLETE error ("UDIDisconnect() failed in udi_close"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Do not try to close udi_session_id again, later in the program. */ */
-/* OBSOLETE udi_session_id = -1; */
-/* OBSOLETE inferior_ptid = null_ptid; */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered (" Ending remote debugging\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /**************************************************************** UDI_ATACH */ */
-/* OBSOLETE /* Attach to a program that is already loaded and running */
-/* OBSOLETE * Upon exiting the process's execution is stopped. */
-/* OBSOLETE */ */
-/* OBSOLETE static void */
-/* OBSOLETE udi_attach (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE UDIResource From; */
-/* OBSOLETE UDIInt32 PC_adds; */
-/* OBSOLETE UDICount Count = 1; */
-/* OBSOLETE UDISizeT Size = 4; */
-/* OBSOLETE UDICount CountDone; */
-/* OBSOLETE UDIBool HostEndian = 0; */
-/* OBSOLETE UDIError err; */
-/* OBSOLETE */
-/* OBSOLETE if (args == NULL) */
-/* OBSOLETE error_no_arg ("program to attach"); */
-/* OBSOLETE */
-/* OBSOLETE if (udi_session_id < 0) */
-/* OBSOLETE error ("UDI connection not opened yet, use the 'target udi' command.\n"); */
-/* OBSOLETE */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE printf_unfiltered ("Attaching to remote program %s...\n", prog_name); */
-/* OBSOLETE */
-/* OBSOLETE UDIStop (); */
-/* OBSOLETE From.Space = UDI29KSpecialRegs; */
-/* OBSOLETE From.Offset = 11; */
-/* OBSOLETE if (err = UDIRead (From, &PC_adds, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIRead failed in udi_attach"); */
-/* OBSOLETE printf_unfiltered ("Remote process is now halted, pc1 = 0x%x.\n", PC_adds); */
-/* OBSOLETE } */
-/* OBSOLETE /************************************************************* UDI_DETACH */ */
-/* OBSOLETE /* Terminate the open connection to the TIP process. */
-/* OBSOLETE Use this when you want to detach and do something else */
-/* OBSOLETE with your gdb. Leave remote process running (with no breakpoints set). */ */
-/* OBSOLETE static void */
-/* OBSOLETE udi_detach (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE */
-/* OBSOLETE remove_breakpoints (); /* Just in case there were any left in */ */
-/* OBSOLETE */
-/* OBSOLETE if (UDIDisconnect (udi_session_id, UDIContinueSession)) */
-/* OBSOLETE error ("UDIDisconnect() failed in udi_detach"); */
-/* OBSOLETE */
-/* OBSOLETE /* Don't try to UDIDisconnect it again in udi_close, which is called from */
-/* OBSOLETE pop_target. */ */
-/* OBSOLETE udi_session_id = -1; */
-/* OBSOLETE inferior_ptid = null_ptid; */
-/* OBSOLETE */
-/* OBSOLETE pop_target (); */
-/* OBSOLETE */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE printf_unfiltered ("Detaching from TIP\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /****************************************************************** UDI_RESUME */
-/* OBSOLETE ** Tell the remote machine to resume. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE udi_resume (ptid_t ptid, int step, enum target_signal sig) */
-/* OBSOLETE { */
-/* OBSOLETE UDIError tip_error; */
-/* OBSOLETE UDIUInt32 Steps = 1; */
-/* OBSOLETE UDIStepType StepType = UDIStepNatural; */
-/* OBSOLETE UDIRange Range; */
-/* OBSOLETE */
-/* OBSOLETE if (step) /* step 1 instruction */ */
-/* OBSOLETE { */
-/* OBSOLETE tip_error = UDIStep (Steps, StepType, Range); */
-/* OBSOLETE if (!tip_error) */
-/* OBSOLETE return; */
-/* OBSOLETE */
-/* OBSOLETE fprintf_unfiltered (gdb_stderr, "UDIStep() error = %d\n", tip_error); */
-/* OBSOLETE error ("failed in udi_resume"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (UDIExecute ()) */
-/* OBSOLETE error ("UDIExecute() failed in udi_resume"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /******************************************************************** UDI_WAIT */
-/* OBSOLETE ** Wait until the remote machine stops, then return, */
-/* OBSOLETE storing status in STATUS just as `wait' would. */ */
-/* OBSOLETE */
-/* OBSOLETE static ptid_t */
-/* OBSOLETE udi_wait (ptid_t ptid, struct target_waitstatus *status) */
-/* OBSOLETE { */
-/* OBSOLETE UDIInt32 MaxTime; */
-/* OBSOLETE UDIPId PId; */
-/* OBSOLETE UDIInt32 StopReason; */
-/* OBSOLETE UDISizeT CountDone; */
-/* OBSOLETE int old_timeout = timeout; */
-/* OBSOLETE int old_immediate_quit = immediate_quit; */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE status->kind = TARGET_WAITKIND_EXITED; */
-/* OBSOLETE status->value.integer = 0; */
-/* OBSOLETE */
-/* OBSOLETE /* wait for message to arrive. It should be: */
-/* OBSOLETE If the target stops executing, udi_wait() should return. */
-/* OBSOLETE */ */
-/* OBSOLETE timeout = 0; /* Wait indefinetly for a message */ */
-/* OBSOLETE immediate_quit = 1; /* Helps ability to QUIT */ */
-/* OBSOLETE */
-/* OBSOLETE while (1) */
-/* OBSOLETE { */
-/* OBSOLETE i = 0; */
-/* OBSOLETE MaxTime = UDIWaitForever; */
-/* OBSOLETE UDIWait (MaxTime, &PId, &StopReason); */
-/* OBSOLETE QUIT; /* Let user quit if they want */ */
-/* OBSOLETE */
-/* OBSOLETE switch (StopReason & UDIGrossState) */
-/* OBSOLETE { */
-/* OBSOLETE case UDIStdoutReady: */
-/* OBSOLETE if (UDIGetStdout (sbuf, (UDISizeT) SBUF_MAX, &CountDone)) */
-/* OBSOLETE /* This is said to happen if the program tries to output */
-/* OBSOLETE a whole bunch of output (more than SBUF_MAX, I would */
-/* OBSOLETE guess). It doesn't seem to happen with the simulator. */ */
-/* OBSOLETE warning ("UDIGetStdout() failed in udi_wait"); */
-/* OBSOLETE fwrite (sbuf, 1, CountDone, stdout); */
-/* OBSOLETE gdb_flush (gdb_stdout); */
-/* OBSOLETE continue; */
-/* OBSOLETE */
-/* OBSOLETE case UDIStderrReady: */
-/* OBSOLETE UDIGetStderr (sbuf, (UDISizeT) SBUF_MAX, &CountDone); */
-/* OBSOLETE fwrite (sbuf, 1, CountDone, stderr); */
-/* OBSOLETE gdb_flush (gdb_stderr); */
-/* OBSOLETE continue; */
-/* OBSOLETE */
-/* OBSOLETE case UDIStdinNeeded: */
-/* OBSOLETE { */
-/* OBSOLETE int ch; */
-/* OBSOLETE i = 0; */
-/* OBSOLETE do */
-/* OBSOLETE { */
-/* OBSOLETE ch = getchar (); */
-/* OBSOLETE if (ch == EOF) */
-/* OBSOLETE break; */
-/* OBSOLETE sbuf[i++] = ch; */
-/* OBSOLETE } */
-/* OBSOLETE while (i < SBUF_MAX && ch != '\n'); */
-/* OBSOLETE UDIPutStdin (sbuf, (UDISizeT) i, &CountDone); */
-/* OBSOLETE continue; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE case UDIRunning: */
-/* OBSOLETE /* In spite of the fact that we told UDIWait to wait forever, it will */
-/* OBSOLETE return spuriously sometimes. */ */
-/* OBSOLETE case UDIStdinModeX: */
-/* OBSOLETE continue; */
-/* OBSOLETE default: */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE switch (StopReason & UDIGrossState) */
-/* OBSOLETE { */
-/* OBSOLETE case UDITrapped: */
-/* OBSOLETE printf_unfiltered ("Am290*0 received vector number %d\n", StopReason >> 24); */
-/* OBSOLETE */
-/* OBSOLETE switch ((StopReason >> 8) & 0xff) */
-/* OBSOLETE { */
-/* OBSOLETE case 0: /* Illegal opcode */ */
-/* OBSOLETE printf_unfiltered (" (break point)\n"); */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; */
-/* OBSOLETE break; */
-/* OBSOLETE case 1: /* Unaligned Access */ */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_BUS; */
-/* OBSOLETE break; */
-/* OBSOLETE case 3: */
-/* OBSOLETE case 4: */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_FPE; */
-/* OBSOLETE break; */
-/* OBSOLETE case 5: /* Protection Violation */ */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE /* Why not SEGV? What is a Protection Violation? */ */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_ILL; */
-/* OBSOLETE break; */
-/* OBSOLETE case 6: */
-/* OBSOLETE case 7: */
-/* OBSOLETE case 8: /* User Instruction Mapping Miss */ */
-/* OBSOLETE case 9: /* User Data Mapping Miss */ */
-/* OBSOLETE case 10: /* Supervisor Instruction Mapping Miss */ */
-/* OBSOLETE case 11: /* Supervisor Data Mapping Miss */ */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_SEGV; */
-/* OBSOLETE break; */
-/* OBSOLETE case 12: */
-/* OBSOLETE case 13: */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_ILL; */
-/* OBSOLETE break; */
-/* OBSOLETE case 14: /* Timer */ */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_ALRM; */
-/* OBSOLETE break; */
-/* OBSOLETE case 15: /* Trace */ */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; */
-/* OBSOLETE break; */
-/* OBSOLETE case 16: /* INTR0 */ */
-/* OBSOLETE case 17: /* INTR1 */ */
-/* OBSOLETE case 18: /* INTR2 */ */
-/* OBSOLETE case 19: /* INTR3/Internal */ */
-/* OBSOLETE case 20: /* TRAP0 */ */
-/* OBSOLETE case 21: /* TRAP1 */ */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_INT; */
-/* OBSOLETE break; */
-/* OBSOLETE case 22: /* Floating-Point Exception */ */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE /* Why not FPE? */ */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_ILL; */
-/* OBSOLETE break; */
-/* OBSOLETE case 77: /* assert 77 */ */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; */
-/* OBSOLETE break; */
-/* OBSOLETE default: */
-/* OBSOLETE status->kind = TARGET_WAITKIND_EXITED; */
-/* OBSOLETE status->value.integer = 0; */
-/* OBSOLETE } */
-/* OBSOLETE break; */
-/* OBSOLETE case UDINotExecuting: */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TERM; */
-/* OBSOLETE break; */
-/* OBSOLETE case UDIStopped: */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TSTP; */
-/* OBSOLETE break; */
-/* OBSOLETE case UDIWarned: */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_URG; */
-/* OBSOLETE break; */
-/* OBSOLETE case UDIStepped: */
-/* OBSOLETE case UDIBreak: */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP; */
-/* OBSOLETE break; */
-/* OBSOLETE case UDIWaiting: */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_STOP; */
-/* OBSOLETE break; */
-/* OBSOLETE case UDIHalted: */
-/* OBSOLETE status->kind = TARGET_WAITKIND_STOPPED; */
-/* OBSOLETE status->value.sig = TARGET_SIGNAL_KILL; */
-/* OBSOLETE break; */
-/* OBSOLETE case UDIExited: */
-/* OBSOLETE default: */
-/* OBSOLETE status->kind = TARGET_WAITKIND_EXITED; */
-/* OBSOLETE status->value.integer = 0; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE timeout = old_timeout; /* Restore original timeout value */ */
-/* OBSOLETE immediate_quit = old_immediate_quit; */
-/* OBSOLETE return inferior_ptid; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE #if 0 */
-/* OBSOLETE /* Handy for debugging */ */
-/* OBSOLETE udi_pc (void) */
-/* OBSOLETE { */
-/* OBSOLETE UDIResource From; */
-/* OBSOLETE UDIUInt32 *To; */
-/* OBSOLETE UDICount Count; */
-/* OBSOLETE UDISizeT Size = 4; */
-/* OBSOLETE UDICount CountDone; */
-/* OBSOLETE UDIBool HostEndian = 0; */
-/* OBSOLETE UDIError err; */
-/* OBSOLETE int pc[2]; */
-/* OBSOLETE unsigned long myregs[256]; */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE From.Space = UDI29KPC; */
-/* OBSOLETE From.Offset = 0; */
-/* OBSOLETE To = (UDIUInt32 *) pc; */
-/* OBSOLETE Count = 2; */
-/* OBSOLETE */
-/* OBSOLETE err = UDIRead (From, To, Count, Size, &CountDone, HostEndian); */
-/* OBSOLETE */
-/* OBSOLETE printf_unfiltered ("err = %d, CountDone = %d, pc[0] = 0x%x, pc[1] = 0x%x\n", */
-/* OBSOLETE err, CountDone, pc[0], pc[1]); */
-/* OBSOLETE */
-/* OBSOLETE udi_fetch_registers (-1); */
-/* OBSOLETE */
-/* OBSOLETE printf_unfiltered ("other pc1 = 0x%x, pc0 = 0x%x\n", *(int *) &registers[4 * PC_REGNUM], */
-/* OBSOLETE *(int *) &registers[4 * NPC_REGNUM]); */
-/* OBSOLETE */
-/* OBSOLETE /* Now, read all the registers globally */ */
-/* OBSOLETE */
-/* OBSOLETE From.Space = UDI29KGlobalRegs; */
-/* OBSOLETE From.Offset = 0; */
-/* OBSOLETE err = UDIRead (From, myregs, 256, 4, &CountDone, HostEndian); */
-/* OBSOLETE */
-/* OBSOLETE printf ("err = %d, CountDone = %d\n", err, CountDone); */
-/* OBSOLETE */
-/* OBSOLETE printf ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < 256; i += 2) */
-/* OBSOLETE printf ("%d:\t%#10x\t%11d\t%#10x\t%11d\n", i, myregs[i], myregs[i], */
-/* OBSOLETE myregs[i + 1], myregs[i + 1]); */
-/* OBSOLETE printf ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE return pc[0]; */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /********************************************************** UDI_FETCH_REGISTERS */
-/* OBSOLETE * Read a remote register 'regno'. */
-/* OBSOLETE * If regno==-1 then read all the registers. */
-/* OBSOLETE */ */
-/* OBSOLETE static void */
-/* OBSOLETE udi_fetch_registers (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE UDIResource From; */
-/* OBSOLETE UDIUInt32 *To; */
-/* OBSOLETE UDICount Count; */
-/* OBSOLETE UDISizeT Size = 4; */
-/* OBSOLETE UDICount CountDone; */
-/* OBSOLETE UDIBool HostEndian = 0; */
-/* OBSOLETE UDIError err; */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE if (regno >= 0) */
-/* OBSOLETE { */
-/* OBSOLETE fetch_register (regno); */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Gr1/rsp */ */
-/* OBSOLETE */
-/* OBSOLETE From.Space = UDI29KGlobalRegs; */
-/* OBSOLETE From.Offset = 1; */
-/* OBSOLETE To = (UDIUInt32 *) & registers[4 * GR1_REGNUM]; */
-/* OBSOLETE Count = 1; */
-/* OBSOLETE if (err = UDIRead (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIRead() failed in udi_fetch_registers"); */
-/* OBSOLETE */
-/* OBSOLETE register_valid[GR1_REGNUM] = 1; */
-/* OBSOLETE */
-/* OBSOLETE #if defined(GR64_REGNUM) /* Read gr64-127 */ */
-/* OBSOLETE */
-/* OBSOLETE /* Global Registers gr64-gr95 */ */
-/* OBSOLETE */
-/* OBSOLETE From.Space = UDI29KGlobalRegs; */
-/* OBSOLETE From.Offset = 64; */
-/* OBSOLETE To = (UDIUInt32 *) & registers[4 * GR64_REGNUM]; */
-/* OBSOLETE Count = 32; */
-/* OBSOLETE if (err = UDIRead (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIRead() failed in udi_fetch_registers"); */
-/* OBSOLETE */
-/* OBSOLETE for (i = GR64_REGNUM; i < GR64_REGNUM + 32; i++) */
-/* OBSOLETE register_valid[i] = 1; */
-/* OBSOLETE */
-/* OBSOLETE #endif /* GR64_REGNUM */ */
-/* OBSOLETE */
-/* OBSOLETE /* Global Registers gr96-gr127 */ */
-/* OBSOLETE */
-/* OBSOLETE From.Space = UDI29KGlobalRegs; */
-/* OBSOLETE From.Offset = 96; */
-/* OBSOLETE To = (UDIUInt32 *) & registers[4 * GR96_REGNUM]; */
-/* OBSOLETE Count = 32; */
-/* OBSOLETE if (err = UDIRead (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIRead() failed in udi_fetch_registers"); */
-/* OBSOLETE */
-/* OBSOLETE for (i = GR96_REGNUM; i < GR96_REGNUM + 32; i++) */
-/* OBSOLETE register_valid[i] = 1; */
-/* OBSOLETE */
-/* OBSOLETE /* Local Registers */ */
-/* OBSOLETE */
-/* OBSOLETE From.Space = UDI29KLocalRegs; */
-/* OBSOLETE From.Offset = 0; */
-/* OBSOLETE To = (UDIUInt32 *) & registers[4 * LR0_REGNUM]; */
-/* OBSOLETE Count = 128; */
-/* OBSOLETE if (err = UDIRead (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIRead() failed in udi_fetch_registers"); */
-/* OBSOLETE */
-/* OBSOLETE for (i = LR0_REGNUM; i < LR0_REGNUM + 128; i++) */
-/* OBSOLETE register_valid[i] = 1; */
-/* OBSOLETE */
-/* OBSOLETE /* Protected Special Registers */ */
-/* OBSOLETE */
-/* OBSOLETE From.Space = UDI29KSpecialRegs; */
-/* OBSOLETE From.Offset = 0; */
-/* OBSOLETE To = (UDIUInt32 *) & registers[4 * SR_REGNUM (0)]; */
-/* OBSOLETE Count = 15; */
-/* OBSOLETE if (err = UDIRead (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIRead() failed in udi_fetch_registers"); */
-/* OBSOLETE */
-/* OBSOLETE for (i = SR_REGNUM (0); i < SR_REGNUM (0) + 15; i++) */
-/* OBSOLETE register_valid[i] = 1; */
-/* OBSOLETE */
-/* OBSOLETE if (USE_SHADOW_PC) */
-/* OBSOLETE { /* Let regno_to_srnum() handle the register number */ */
-/* OBSOLETE fetch_register (NPC_REGNUM); */
-/* OBSOLETE fetch_register (PC_REGNUM); */
-/* OBSOLETE fetch_register (PC2_REGNUM); */
-/* OBSOLETE */
-/* OBSOLETE /* Unprotected Special Registers sr128-sr135 */ */
-/* OBSOLETE */
-/* OBSOLETE From.Space = UDI29KSpecialRegs; */
-/* OBSOLETE From.Offset = 128; */
-/* OBSOLETE To = (UDIUInt32 *) & registers[4 * SR_REGNUM (128)]; */
-/* OBSOLETE Count = 135 - 128 + 1; */
-/* OBSOLETE if (err = UDIRead (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIRead() failed in udi_fetch_registers"); */
-/* OBSOLETE */
-/* OBSOLETE for (i = SR_REGNUM (128); i < SR_REGNUM (128) + 135 - 128 + 1; i++) */
-/* OBSOLETE register_valid[i] = 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (remote_debug) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf_unfiltered (gdb_stdlog, "Fetching all registers\n"); */
-/* OBSOLETE fprintf_unfiltered (gdb_stdlog, */
-/* OBSOLETE "Fetching PC0 = 0x%x, PC1 = 0x%x, PC2 = 0x%x\n", */
-/* OBSOLETE read_register (NPC_REGNUM), */
-/* OBSOLETE read_register (PC_REGNUM), */
-/* OBSOLETE read_register (PC2_REGNUM)); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* There doesn't seem to be any way to get these. */ */
-/* OBSOLETE { */
-/* OBSOLETE int val = -1; */
-/* OBSOLETE supply_register (FPE_REGNUM, (char *) &val); */
-/* OBSOLETE supply_register (INTE_REGNUM, (char *) &val); */
-/* OBSOLETE supply_register (FPS_REGNUM, (char *) &val); */
-/* OBSOLETE supply_register (EXO_REGNUM, (char *) &val); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /********************************************************* UDI_STORE_REGISTERS */
-/* OBSOLETE ** Store register regno into the target. */
-/* OBSOLETE * If regno==-1 then store all the registers. */
-/* OBSOLETE */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE udi_store_registers (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE UDIUInt32 *From; */
-/* OBSOLETE UDIResource To; */
-/* OBSOLETE UDICount Count; */
-/* OBSOLETE UDISizeT Size = 4; */
-/* OBSOLETE UDICount CountDone; */
-/* OBSOLETE UDIBool HostEndian = 0; */
-/* OBSOLETE */
-/* OBSOLETE if (regno >= 0) */
-/* OBSOLETE { */
-/* OBSOLETE store_register (regno); */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (remote_debug) */
-/* OBSOLETE { */
-/* OBSOLETE fprintf_unfiltered (gdb_stdlog, "Storing all registers\n"); */
-/* OBSOLETE fprintf_unfiltered (gdb_stdlog, */
-/* OBSOLETE "PC0 = 0x%x, PC1 = 0x%x, PC2 = 0x%x\n", */
-/* OBSOLETE read_register (NPC_REGNUM), */
-/* OBSOLETE read_register (PC_REGNUM), */
-/* OBSOLETE read_register (PC2_REGNUM)); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Gr1/rsp */ */
-/* OBSOLETE */
-/* OBSOLETE From = (UDIUInt32 *) & registers[4 * GR1_REGNUM]; */
-/* OBSOLETE To.Space = UDI29KGlobalRegs; */
-/* OBSOLETE To.Offset = 1; */
-/* OBSOLETE Count = 1; */
-/* OBSOLETE if (UDIWrite (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIWrite() failed in udi_store_regisetrs"); */
-/* OBSOLETE */
-/* OBSOLETE #if defined(GR64_REGNUM) */
-/* OBSOLETE */
-/* OBSOLETE /* Global registers gr64-gr95 */ */
-/* OBSOLETE */
-/* OBSOLETE From = (UDIUInt32 *) & registers[4 * GR64_REGNUM]; */
-/* OBSOLETE To.Space = UDI29KGlobalRegs; */
-/* OBSOLETE To.Offset = 64; */
-/* OBSOLETE Count = 32; */
-/* OBSOLETE if (UDIWrite (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIWrite() failed in udi_store_regisetrs"); */
-/* OBSOLETE */
-/* OBSOLETE #endif /* GR64_REGNUM */ */
-/* OBSOLETE */
-/* OBSOLETE /* Global registers gr96-gr127 */ */
-/* OBSOLETE */
-/* OBSOLETE From = (UDIUInt32 *) & registers[4 * GR96_REGNUM]; */
-/* OBSOLETE To.Space = UDI29KGlobalRegs; */
-/* OBSOLETE To.Offset = 96; */
-/* OBSOLETE Count = 32; */
-/* OBSOLETE if (UDIWrite (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIWrite() failed in udi_store_regisetrs"); */
-/* OBSOLETE */
-/* OBSOLETE /* Local Registers */ */
-/* OBSOLETE */
-/* OBSOLETE From = (UDIUInt32 *) & registers[4 * LR0_REGNUM]; */
-/* OBSOLETE To.Space = UDI29KLocalRegs; */
-/* OBSOLETE To.Offset = 0; */
-/* OBSOLETE Count = 128; */
-/* OBSOLETE if (UDIWrite (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIWrite() failed in udi_store_regisetrs"); */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /* Protected Special Registers *//* VAB through TMR */ */
-/* OBSOLETE */
-/* OBSOLETE From = (UDIUInt32 *) & registers[4 * SR_REGNUM (0)]; */
-/* OBSOLETE To.Space = UDI29KSpecialRegs; */
-/* OBSOLETE To.Offset = 0; */
-/* OBSOLETE Count = 10; */
-/* OBSOLETE if (UDIWrite (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIWrite() failed in udi_store_regisetrs"); */
-/* OBSOLETE */
-/* OBSOLETE /* PC0, PC1, PC2 possibly as shadow registers */ */
-/* OBSOLETE */
-/* OBSOLETE From = (UDIUInt32 *) & registers[4 * SR_REGNUM (10)]; */
-/* OBSOLETE To.Space = UDI29KSpecialRegs; */
-/* OBSOLETE Count = 3; */
-/* OBSOLETE if (USE_SHADOW_PC) */
-/* OBSOLETE To.Offset = 20; /* SPC0 */ */
-/* OBSOLETE else */
-/* OBSOLETE To.Offset = 10; /* PC0 */ */
-/* OBSOLETE if (UDIWrite (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIWrite() failed in udi_store_regisetrs"); */
-/* OBSOLETE */
-/* OBSOLETE /* PC1 via UDI29KPC */ */
-/* OBSOLETE */
-/* OBSOLETE From = (UDIUInt32 *) & registers[4 * PC_REGNUM]; */
-/* OBSOLETE To.Space = UDI29KPC; */
-/* OBSOLETE To.Offset = 0; /* PC1 */ */
-/* OBSOLETE Count = 1; */
-/* OBSOLETE if (UDIWrite (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIWrite() failed in udi_store_regisetrs"); */
-/* OBSOLETE */
-/* OBSOLETE /* LRU and MMU */ */
-/* OBSOLETE */
-/* OBSOLETE From = (UDIUInt32 *) & registers[4 * SR_REGNUM (13)]; */
-/* OBSOLETE To.Space = UDI29KSpecialRegs; */
-/* OBSOLETE To.Offset = 13; */
-/* OBSOLETE Count = 2; */
-/* OBSOLETE if (UDIWrite (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIWrite() failed in udi_store_regisetrs"); */
-/* OBSOLETE */
-/* OBSOLETE /* Unprotected Special Registers */ */
-/* OBSOLETE */
-/* OBSOLETE From = (UDIUInt32 *) & registers[4 * SR_REGNUM (128)]; */
-/* OBSOLETE To.Space = UDI29KSpecialRegs; */
-/* OBSOLETE To.Offset = 128; */
-/* OBSOLETE Count = 135 - 128 + 1; */
-/* OBSOLETE if (UDIWrite (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIWrite() failed in udi_store_regisetrs"); */
-/* OBSOLETE */
-/* OBSOLETE registers_changed (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /****************************************************** UDI_PREPARE_TO_STORE */ */
-/* OBSOLETE /* Get ready to modify the registers array. On machines which store */
-/* OBSOLETE individual registers, this doesn't need to do anything. On machines */
-/* OBSOLETE which store all the registers in one fell swoop, this makes sure */
-/* OBSOLETE that registers contains all the registers from the program being */
-/* OBSOLETE debugged. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE udi_prepare_to_store (void) */
-/* OBSOLETE { */
-/* OBSOLETE /* Do nothing, since we can store individual regs */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /********************************************************** TRANSLATE_ADDR */ */
-/* OBSOLETE static CORE_ADDR */
-/* OBSOLETE translate_addr (CORE_ADDR addr) */
-/* OBSOLETE { */
-/* OBSOLETE #if defined(ULTRA3) && defined(KERNEL_DEBUGGING) */
-/* OBSOLETE /* Check for a virtual address in the kernel */ */
-/* OBSOLETE /* Assume physical address of ublock is in paddr_u register */ */
-/* OBSOLETE /* FIXME: doesn't work for user virtual addresses */ */
-/* OBSOLETE if (addr >= UVADDR) */
-/* OBSOLETE { */
-/* OBSOLETE /* PADDR_U register holds the physical address of the ublock */ */
-/* OBSOLETE CORE_ADDR i = (CORE_ADDR) read_register (PADDR_U_REGNUM); */
-/* OBSOLETE return (i + addr - (CORE_ADDR) UVADDR); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE return (addr); */
-/* OBSOLETE } */
-/* OBSOLETE #else */
-/* OBSOLETE return (addr); */
-/* OBSOLETE #endif */
-/* OBSOLETE } */
-/* OBSOLETE /************************************************* UDI_XFER_INFERIOR_MEMORY */ */
-/* OBSOLETE /* FIXME! Merge these two. */ */
-/* OBSOLETE static int */
-/* OBSOLETE udi_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, */
-/* OBSOLETE struct mem_attrib *attrib ATTRIBUTE_UNUSED, */
-/* OBSOLETE struct target_ops *target ATTRIBUTE_UNUSED) */
-/* OBSOLETE { */
-/* OBSOLETE */
-/* OBSOLETE memaddr = translate_addr (memaddr); */
-/* OBSOLETE */
-/* OBSOLETE if (write) */
-/* OBSOLETE return udi_write_inferior_memory (memaddr, myaddr, len); */
-/* OBSOLETE else */
-/* OBSOLETE return udi_read_inferior_memory (memaddr, myaddr, len); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /********************************************************** UDI_FILES_INFO */ */
-/* OBSOLETE static void */
-/* OBSOLETE udi_files_info (struct target_ops *target) */
-/* OBSOLETE { */
-/* OBSOLETE printf_unfiltered ("\tAttached to UDI socket to %s", udi_config_id); */
-/* OBSOLETE if (prog_name != NULL) */
-/* OBSOLETE printf_unfiltered ("and running program %s", prog_name); */
-/* OBSOLETE printf_unfiltered (".\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /**************************************************** UDI_INSERT_BREAKPOINT */ */
-/* OBSOLETE static int */
-/* OBSOLETE udi_insert_breakpoint (CORE_ADDR addr, char *contents_cache) */
-/* OBSOLETE { */
-/* OBSOLETE int cnt; */
-/* OBSOLETE UDIError err; */
-/* OBSOLETE */
-/* OBSOLETE for (cnt = 0; cnt < BKPT_TABLE_SIZE; cnt++) */
-/* OBSOLETE if (bkpt_table[cnt].Type == 0) /* Find first free slot */ */
-/* OBSOLETE break; */
-/* OBSOLETE */
-/* OBSOLETE if (cnt >= BKPT_TABLE_SIZE) */
-/* OBSOLETE error ("Too many breakpoints set"); */
-/* OBSOLETE */
-/* OBSOLETE bkpt_table[cnt].Addr.Offset = addr; */
-/* OBSOLETE bkpt_table[cnt].Addr.Space = UDI29KIRAMSpace; */
-/* OBSOLETE bkpt_table[cnt].PassCount = 1; */
-/* OBSOLETE bkpt_table[cnt].Type = UDIBreakFlagExecute; */
-/* OBSOLETE */
-/* OBSOLETE err = UDISetBreakpoint (bkpt_table[cnt].Addr, */
-/* OBSOLETE bkpt_table[cnt].PassCount, */
-/* OBSOLETE bkpt_table[cnt].Type, */
-/* OBSOLETE &bkpt_table[cnt].BreakId); */
-/* OBSOLETE */
-/* OBSOLETE if (err == 0) */
-/* OBSOLETE return 0; /* Success */ */
-/* OBSOLETE */
-/* OBSOLETE bkpt_table[cnt].Type = 0; */
-/* OBSOLETE error ("UDISetBreakpoint returned error code %d\n", err); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /**************************************************** UDI_REMOVE_BREAKPOINT */ */
-/* OBSOLETE static int */
-/* OBSOLETE udi_remove_breakpoint (CORE_ADDR addr, char *contents_cache) */
-/* OBSOLETE { */
-/* OBSOLETE int cnt; */
-/* OBSOLETE UDIError err; */
-/* OBSOLETE */
-/* OBSOLETE for (cnt = 0; cnt < BKPT_TABLE_SIZE; cnt++) */
-/* OBSOLETE if (bkpt_table[cnt].Addr.Offset == addr) /* Find matching breakpoint */ */
-/* OBSOLETE break; */
-/* OBSOLETE */
-/* OBSOLETE if (cnt >= BKPT_TABLE_SIZE) */
-/* OBSOLETE error ("Can't find breakpoint in table"); */
-/* OBSOLETE */
-/* OBSOLETE bkpt_table[cnt].Type = 0; */
-/* OBSOLETE */
-/* OBSOLETE err = UDIClearBreakpoint (bkpt_table[cnt].BreakId); */
-/* OBSOLETE if (err == 0) */
-/* OBSOLETE return 0; /* Success */ */
-/* OBSOLETE */
-/* OBSOLETE error ("UDIClearBreakpoint returned error code %d\n", err); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE udi_kill (void) */
-/* OBSOLETE { */
-/* OBSOLETE */
-/* OBSOLETE #if 0 */
-/* OBSOLETE /* */
-/* OBSOLETE UDIStop does not really work as advertised. It causes the TIP to close it's */
-/* OBSOLETE connection, which usually results in GDB dying with a SIGPIPE. For now, we */
-/* OBSOLETE just invoke udi_close, which seems to get things right. */
-/* OBSOLETE */ */
-/* OBSOLETE UDIStop (); */
-/* OBSOLETE */
-/* OBSOLETE udi_session_id = -1; */
-/* OBSOLETE inferior_ptid = null_ptid; */
-/* OBSOLETE */
-/* OBSOLETE if (from_tty) */
-/* OBSOLETE printf_unfiltered ("Target has been stopped."); */
-/* OBSOLETE #endif /* 0 */ */
-/* OBSOLETE #if 0 */
-/* OBSOLETE udi_close (0); */
-/* OBSOLETE pop_target (); */
-/* OBSOLETE #endif /* 0 */ */
-/* OBSOLETE */
-/* OBSOLETE /* Keep the target around, e.g. so "run" can do the right thing when */
-/* OBSOLETE we are already debugging something. */ */
-/* OBSOLETE */
-/* OBSOLETE if (UDIDisconnect (udi_session_id, UDITerminateSession)) */
-/* OBSOLETE { */
-/* OBSOLETE warning ("UDIDisconnect() failed"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Do not try to close udi_session_id again, later in the program. */ */
-/* OBSOLETE udi_session_id = -1; */
-/* OBSOLETE inferior_ptid = null_ptid; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* */
-/* OBSOLETE Load a program into the target. Args are: `program {options}'. The options */
-/* OBSOLETE are used to control loading of the program, and are NOT passed onto the */
-/* OBSOLETE loaded code as arguments. (You need to use the `run' command to do that.) */
-/* OBSOLETE */
-/* OBSOLETE The options are: */
-/* OBSOLETE -ms %d Set mem stack size to %d */
-/* OBSOLETE -rs %d Set regular stack size to %d */
-/* OBSOLETE -i send init info (default) */
-/* OBSOLETE -noi don't send init info */
-/* OBSOLETE -[tT] Load Text section */
-/* OBSOLETE -[dD] Load Data section */
-/* OBSOLETE -[bB] Load BSS section */
-/* OBSOLETE -[lL] Load Lit section */
-/* OBSOLETE */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE download (char *load_arg_string, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE #define DEFAULT_MEM_STACK_SIZE 0x6000 */
-/* OBSOLETE #define DEFAULT_REG_STACK_SIZE 0x2000 */
-/* OBSOLETE */
-/* OBSOLETE char *token; */
-/* OBSOLETE char *filename; */
-/* OBSOLETE asection *section; */
-/* OBSOLETE bfd *pbfd; */
-/* OBSOLETE UDIError err; */
-/* OBSOLETE int load_text = 1, load_data = 1, load_bss = 1, load_lit = 1; */
-/* OBSOLETE */
-/* OBSOLETE address_ranges[0].Space = UDI29KIRAMSpace; */
-/* OBSOLETE address_ranges[0].Offset = 0xffffffff; */
-/* OBSOLETE address_ranges[0].Size = 0; */
-/* OBSOLETE */
-/* OBSOLETE address_ranges[1].Space = UDI29KDRAMSpace; */
-/* OBSOLETE address_ranges[1].Offset = 0xffffffff; */
-/* OBSOLETE address_ranges[1].Size = 0; */
-/* OBSOLETE */
-/* OBSOLETE stack_sizes[0] = DEFAULT_REG_STACK_SIZE; */
-/* OBSOLETE stack_sizes[1] = DEFAULT_MEM_STACK_SIZE; */
-/* OBSOLETE */
-/* OBSOLETE dont_repeat (); */
-/* OBSOLETE */
-/* OBSOLETE filename = strtok (load_arg_string, " \t"); */
-/* OBSOLETE if (!filename) */
-/* OBSOLETE error ("Must specify at least a file name with the load command"); */
-/* OBSOLETE */
-/* OBSOLETE filename = tilde_expand (filename); */
-/* OBSOLETE make_cleanup (xfree, filename); */
-/* OBSOLETE */
-/* OBSOLETE while (token = strtok (NULL, " \t")) */
-/* OBSOLETE { */
-/* OBSOLETE if (token[0] == '-') */
-/* OBSOLETE { */
-/* OBSOLETE token++; */
-/* OBSOLETE */
-/* OBSOLETE if (STREQ (token, "ms")) */
-/* OBSOLETE stack_sizes[1] = atol (strtok (NULL, " \t")); */
-/* OBSOLETE else if (STREQ (token, "rs")) */
-/* OBSOLETE stack_sizes[0] = atol (strtok (NULL, " \t")); */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE load_text = load_data = load_bss = load_lit = 0; */
-/* OBSOLETE */
-/* OBSOLETE while (*token) */
-/* OBSOLETE { */
-/* OBSOLETE switch (*token++) */
-/* OBSOLETE { */
-/* OBSOLETE case 't': */
-/* OBSOLETE case 'T': */
-/* OBSOLETE load_text = 1; */
-/* OBSOLETE break; */
-/* OBSOLETE case 'd': */
-/* OBSOLETE case 'D': */
-/* OBSOLETE load_data = 1; */
-/* OBSOLETE break; */
-/* OBSOLETE case 'b': */
-/* OBSOLETE case 'B': */
-/* OBSOLETE load_bss = 1; */
-/* OBSOLETE break; */
-/* OBSOLETE case 'l': */
-/* OBSOLETE case 'L': */
-/* OBSOLETE load_lit = 1; */
-/* OBSOLETE break; */
-/* OBSOLETE default: */
-/* OBSOLETE error ("Unknown UDI load option -%s", token - 1); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE pbfd = bfd_openr (filename, gnutarget); */
-/* OBSOLETE */
-/* OBSOLETE if (!pbfd) */
-/* OBSOLETE /* FIXME: should be using bfd_errmsg, not assuming it was */
-/* OBSOLETE bfd_error_system_call. */ */
-/* OBSOLETE perror_with_name (filename); */
-/* OBSOLETE */
-/* OBSOLETE /* FIXME: should be checking for errors from bfd_close (for one thing, */
-/* OBSOLETE on error it does not free all the storage associated with the */
-/* OBSOLETE bfd). */ */
-/* OBSOLETE make_cleanup_bfd_close (pbfd); */
-/* OBSOLETE */
-/* OBSOLETE QUIT; */
-/* OBSOLETE immediate_quit++; */
-/* OBSOLETE */
-/* OBSOLETE if (!bfd_check_format (pbfd, bfd_object)) */
-/* OBSOLETE error ("It doesn't seem to be an object file"); */
-/* OBSOLETE */
-/* OBSOLETE for (section = pbfd->sections; section; section = section->next) */
-/* OBSOLETE { */
-/* OBSOLETE if (bfd_get_section_flags (pbfd, section) & SEC_ALLOC) */
-/* OBSOLETE { */
-/* OBSOLETE UDIResource To; */
-/* OBSOLETE UDICount Count; */
-/* OBSOLETE unsigned long section_size, section_end; */
-/* OBSOLETE const char *section_name; */
-/* OBSOLETE */
-/* OBSOLETE section_name = bfd_get_section_name (pbfd, section); */
-/* OBSOLETE if (STREQ (section_name, ".text") && !load_text) */
-/* OBSOLETE continue; */
-/* OBSOLETE else if (STREQ (section_name, ".data") && !load_data) */
-/* OBSOLETE continue; */
-/* OBSOLETE else if (STREQ (section_name, ".bss") && !load_bss) */
-/* OBSOLETE continue; */
-/* OBSOLETE else if (STREQ (section_name, ".lit") && !load_lit) */
-/* OBSOLETE continue; */
-/* OBSOLETE */
-/* OBSOLETE To.Offset = bfd_get_section_vma (pbfd, section); */
-/* OBSOLETE section_size = bfd_section_size (pbfd, section); */
-/* OBSOLETE section_end = To.Offset + section_size; */
-/* OBSOLETE */
-/* OBSOLETE if (section_size == 0) */
-/* OBSOLETE /* This is needed at least in the BSS case, where the code */
-/* OBSOLETE below starts writing before it even checks the size. */ */
-/* OBSOLETE continue; */
-/* OBSOLETE */
-/* OBSOLETE printf_unfiltered ("[Loading section %s at %x (%d bytes)]\n", */
-/* OBSOLETE section_name, */
-/* OBSOLETE To.Offset, */
-/* OBSOLETE section_size); */
-/* OBSOLETE */
-/* OBSOLETE if (bfd_get_section_flags (pbfd, section) & SEC_CODE) */
-/* OBSOLETE { */
-/* OBSOLETE To.Space = UDI29KIRAMSpace; */
-/* OBSOLETE */
-/* OBSOLETE address_ranges[0].Offset = min (address_ranges[0].Offset, */
-/* OBSOLETE To.Offset); */
-/* OBSOLETE address_ranges[0].Size = max (address_ranges[0].Size, */
-/* OBSOLETE section_end */
-/* OBSOLETE - address_ranges[0].Offset); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE To.Space = UDI29KDRAMSpace; */
-/* OBSOLETE */
-/* OBSOLETE address_ranges[1].Offset = min (address_ranges[1].Offset, */
-/* OBSOLETE To.Offset); */
-/* OBSOLETE address_ranges[1].Size = max (address_ranges[1].Size, */
-/* OBSOLETE section_end */
-/* OBSOLETE - address_ranges[1].Offset); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (bfd_get_section_flags (pbfd, section) & SEC_LOAD) /* Text, data or lit */ */
-/* OBSOLETE { */
-/* OBSOLETE file_ptr fptr; */
-/* OBSOLETE */
-/* OBSOLETE fptr = 0; */
-/* OBSOLETE */
-/* OBSOLETE while (section_size > 0) */
-/* OBSOLETE { */
-/* OBSOLETE char buffer[1024]; */
-/* OBSOLETE */
-/* OBSOLETE Count = min (section_size, 1024); */
-/* OBSOLETE */
-/* OBSOLETE bfd_get_section_contents (pbfd, section, buffer, fptr, */
-/* OBSOLETE Count); */
-/* OBSOLETE */
-/* OBSOLETE err = UDIWrite ((UDIHostMemPtr) buffer, /* From */ */
-/* OBSOLETE To, /* To */ */
-/* OBSOLETE Count, /* Count */ */
-/* OBSOLETE (UDISizeT) 1, /* Size */ */
-/* OBSOLETE &Count, /* CountDone */ */
-/* OBSOLETE (UDIBool) 0); /* HostEndian */ */
-/* OBSOLETE if (err) */
-/* OBSOLETE error ("UDIWrite failed, error = %d", err); */
-/* OBSOLETE */
-/* OBSOLETE To.Offset += Count; */
-/* OBSOLETE fptr += Count; */
-/* OBSOLETE section_size -= Count; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE /* BSS */ */
-/* OBSOLETE { */
-/* OBSOLETE UDIResource From; */
-/* OBSOLETE unsigned long zero = 0; */
-/* OBSOLETE */
-/* OBSOLETE /* Write a zero byte at the vma */ */
-/* OBSOLETE /* FIXME: Broken for sections of 1-3 bytes (we test for */
-/* OBSOLETE zero above). */ */
-/* OBSOLETE err = UDIWrite ((UDIHostMemPtr) & zero, /* From */ */
-/* OBSOLETE To, /* To */ */
-/* OBSOLETE (UDICount) 1, /* Count */ */
-/* OBSOLETE (UDISizeT) 4, /* Size */ */
-/* OBSOLETE &Count, /* CountDone */ */
-/* OBSOLETE (UDIBool) 0); /* HostEndian */ */
-/* OBSOLETE if (err) */
-/* OBSOLETE error ("UDIWrite failed, error = %d", err); */
-/* OBSOLETE */
-/* OBSOLETE From = To; */
-/* OBSOLETE To.Offset += 4; */
-/* OBSOLETE */
-/* OBSOLETE /* Now, duplicate it for the length of the BSS */ */
-/* OBSOLETE err = UDICopy (From, /* From */ */
-/* OBSOLETE To, /* To */ */
-/* OBSOLETE (UDICount) (section_size / 4 - 1), /* Count */ */
-/* OBSOLETE (UDISizeT) 4, /* Size */ */
-/* OBSOLETE &Count, /* CountDone */ */
-/* OBSOLETE (UDIBool) 1); /* Direction */ */
-/* OBSOLETE if (err) */
-/* OBSOLETE { */
-/* OBSOLETE char message[100]; */
-/* OBSOLETE int xerr; */
-/* OBSOLETE */
-/* OBSOLETE xerr = UDIGetErrorMsg (err, 100, message, &Count); */
-/* OBSOLETE if (!xerr) */
-/* OBSOLETE fprintf_unfiltered (gdb_stderr, "Error is %s\n", message); */
-/* OBSOLETE else */
-/* OBSOLETE fprintf_unfiltered (gdb_stderr, "xerr is %d\n", xerr); */
-/* OBSOLETE error ("UDICopy failed, error = %d", err); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE entry.Space = UDI29KIRAMSpace; */
-/* OBSOLETE entry.Offset = bfd_get_start_address (pbfd); */
-/* OBSOLETE */
-/* OBSOLETE immediate_quit--; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Function to download an image into the remote target. */ */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE udi_load (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE download (args, from_tty); */
-/* OBSOLETE */
-/* OBSOLETE /* As a convenience, pick up any symbol info that is in the program */
-/* OBSOLETE being loaded. Note that we assume that the program is the``mainline''; */
-/* OBSOLETE if this is not always true, then this code will need to be augmented. */ */
-/* OBSOLETE symbol_file_add (strtok (args, " \t"), from_tty, NULL, 1, 0); */
-/* OBSOLETE */
-/* OBSOLETE /* Getting new symbols may change our opinion about what is */
-/* OBSOLETE frameless. */ */
-/* OBSOLETE reinit_frame_cache (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /*************************************************** UDI_WRITE_INFERIOR_MEMORY */
-/* OBSOLETE ** Copy LEN bytes of data from debugger memory at MYADDR */
-/* OBSOLETE to inferior's memory at MEMADDR. Returns number of bytes written. */ */
-/* OBSOLETE static int */
-/* OBSOLETE udi_write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len) */
-/* OBSOLETE { */
-/* OBSOLETE int nwritten = 0; */
-/* OBSOLETE UDIUInt32 *From; */
-/* OBSOLETE UDIResource To; */
-/* OBSOLETE UDICount Count; */
-/* OBSOLETE UDISizeT Size = 1; */
-/* OBSOLETE UDICount CountDone = 0; */
-/* OBSOLETE UDIBool HostEndian = 0; */
-/* OBSOLETE */
-/* OBSOLETE To.Space = udi_memory_space (memaddr); */
-/* OBSOLETE From = (UDIUInt32 *) myaddr; */
-/* OBSOLETE */
-/* OBSOLETE while (nwritten < len) */
-/* OBSOLETE { */
-/* OBSOLETE Count = len - nwritten; */
-/* OBSOLETE if (Count > MAXDATA) */
-/* OBSOLETE Count = MAXDATA; */
-/* OBSOLETE To.Offset = memaddr + nwritten; */
-/* OBSOLETE if (UDIWrite (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE { */
-/* OBSOLETE error ("UDIWrite() failed in udi_write_inferior_memory"); */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE nwritten += CountDone; */
-/* OBSOLETE From += CountDone; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE return (nwritten); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /**************************************************** UDI_READ_INFERIOR_MEMORY */
-/* OBSOLETE ** Read LEN bytes from inferior memory at MEMADDR. Put the result */
-/* OBSOLETE at debugger address MYADDR. Returns number of bytes read. */ */
-/* OBSOLETE static int */
-/* OBSOLETE udi_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len) */
-/* OBSOLETE { */
-/* OBSOLETE int nread = 0; */
-/* OBSOLETE UDIResource From; */
-/* OBSOLETE UDIUInt32 *To; */
-/* OBSOLETE UDICount Count; */
-/* OBSOLETE UDISizeT Size = 1; */
-/* OBSOLETE UDICount CountDone = 0; */
-/* OBSOLETE UDIBool HostEndian = 0; */
-/* OBSOLETE UDIError err; */
-/* OBSOLETE */
-/* OBSOLETE From.Space = udi_memory_space (memaddr); */
-/* OBSOLETE To = (UDIUInt32 *) myaddr; */
-/* OBSOLETE */
-/* OBSOLETE while (nread < len) */
-/* OBSOLETE { */
-/* OBSOLETE Count = len - nread; */
-/* OBSOLETE if (Count > MAXDATA) */
-/* OBSOLETE Count = MAXDATA; */
-/* OBSOLETE From.Offset = memaddr + nread; */
-/* OBSOLETE if (err = UDIRead (From, To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE { */
-/* OBSOLETE error ("UDIRead() failed in udi_read_inferior_memory"); */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE nread += CountDone; */
-/* OBSOLETE To += CountDone; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE return (nread); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /********************************************************************* WARNING */
-/* OBSOLETE */ */
-/* OBSOLETE udi_warning (int num) */
-/* OBSOLETE { */
-/* OBSOLETE error ("ERROR while loading program into remote TIP: $d\n", num); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /*****************************************************************************/ */
-/* OBSOLETE /* Fetch a single register indicatated by 'regno'. */
-/* OBSOLETE * Returns 0/-1 on success/failure. */
-/* OBSOLETE */ */
-/* OBSOLETE static void */
-/* OBSOLETE fetch_register (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE UDIResource From; */
-/* OBSOLETE UDIUInt32 To; */
-/* OBSOLETE UDICount Count = 1; */
-/* OBSOLETE UDISizeT Size = 4; */
-/* OBSOLETE UDICount CountDone; */
-/* OBSOLETE UDIBool HostEndian = 0; */
-/* OBSOLETE UDIError err; */
-/* OBSOLETE int result; */
-/* OBSOLETE */
-/* OBSOLETE if (regno == GR1_REGNUM) */
-/* OBSOLETE { */
-/* OBSOLETE From.Space = UDI29KGlobalRegs; */
-/* OBSOLETE From.Offset = 1; */
-/* OBSOLETE } */
-/* OBSOLETE else if (regno >= GR96_REGNUM && regno < GR96_REGNUM + 32) */
-/* OBSOLETE { */
-/* OBSOLETE From.Space = UDI29KGlobalRegs; */
-/* OBSOLETE From.Offset = (regno - GR96_REGNUM) + 96;; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE #if defined(GR64_REGNUM) */
-/* OBSOLETE */
-/* OBSOLETE else if (regno >= GR64_REGNUM && regno < GR64_REGNUM + 32) */
-/* OBSOLETE { */
-/* OBSOLETE From.Space = UDI29KGlobalRegs; */
-/* OBSOLETE From.Offset = (regno - GR64_REGNUM) + 64; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE #endif /* GR64_REGNUM */ */
-/* OBSOLETE */
-/* OBSOLETE else if (regno >= LR0_REGNUM && regno < LR0_REGNUM + 128) */
-/* OBSOLETE { */
-/* OBSOLETE From.Space = UDI29KLocalRegs; */
-/* OBSOLETE From.Offset = (regno - LR0_REGNUM); */
-/* OBSOLETE } */
-/* OBSOLETE else if (regno >= FPE_REGNUM && regno <= EXO_REGNUM) */
-/* OBSOLETE { */
-/* OBSOLETE int val = -1; */
-/* OBSOLETE /*supply_register(160 + (regno - FPE_REGNUM),(char *) &val); */ */
-/* OBSOLETE supply_register (regno, (char *) &val); */
-/* OBSOLETE return; /* Pretend Success */ */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE From.Space = UDI29KSpecialRegs; */
-/* OBSOLETE From.Offset = regnum_to_srnum (regno); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (err = UDIRead (From, &To, Count, Size, &CountDone, HostEndian)) */
-/* OBSOLETE error ("UDIRead() failed in udi_fetch_registers"); */
-/* OBSOLETE */
-/* OBSOLETE supply_register (regno, (char *) &To); */
-/* OBSOLETE */
-/* OBSOLETE if (remote_debug) */
-/* OBSOLETE fprintf_unfiltered (gdb_stdlog, "Fetching register %s = 0x%x\n", */
-/* OBSOLETE REGISTER_NAME (regno), To); */
-/* OBSOLETE } */
-/* OBSOLETE /*****************************************************************************/ */
-/* OBSOLETE /* Store a single register indicated by 'regno'. */
-/* OBSOLETE * Returns 0/-1 on success/failure. */
-/* OBSOLETE */ */
-/* OBSOLETE static int */
-/* OBSOLETE store_register (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE int result; */
-/* OBSOLETE UDIUInt32 From; */
-/* OBSOLETE UDIResource To; */
-/* OBSOLETE UDICount Count = 1; */
-/* OBSOLETE UDISizeT Size = 4; */
-/* OBSOLETE UDICount CountDone; */
-/* OBSOLETE UDIBool HostEndian = 0; */
-/* OBSOLETE */
-/* OBSOLETE From = read_register (regno); /* get data value */ */
-/* OBSOLETE */
-/* OBSOLETE if (remote_debug) */
-/* OBSOLETE fprintf_unfiltered (gdb_stdlog, "Storing register %s = 0x%x\n", */
-/* OBSOLETE REGISTER_NAME (regno), From); */
-/* OBSOLETE */
-/* OBSOLETE if (regno == GR1_REGNUM) */
-/* OBSOLETE { */
-/* OBSOLETE To.Space = UDI29KGlobalRegs; */
-/* OBSOLETE To.Offset = 1; */
-/* OBSOLETE result = UDIWrite (&From, To, Count, Size, &CountDone, HostEndian); */
-/* OBSOLETE /* Setting GR1 changes the numbers of all the locals, so invalidate the */
-/* OBSOLETE * register cache. Do this *after* calling read_register, because we want */
-/* OBSOLETE * read_register to return the value that write_register has just stuffed */
-/* OBSOLETE * into the registers array, not the value of the register fetched from */
-/* OBSOLETE * the inferior. */
-/* OBSOLETE */ */
-/* OBSOLETE registers_changed (); */
-/* OBSOLETE } */
-/* OBSOLETE #if defined(GR64_REGNUM) */
-/* OBSOLETE else if (regno >= GR64_REGNUM && regno < GR64_REGNUM + 32) */
-/* OBSOLETE { */
-/* OBSOLETE To.Space = UDI29KGlobalRegs; */
-/* OBSOLETE To.Offset = (regno - GR64_REGNUM) + 64; */
-/* OBSOLETE result = UDIWrite (&From, To, Count, Size, &CountDone, HostEndian); */
-/* OBSOLETE } */
-/* OBSOLETE #endif /* GR64_REGNUM */ */
-/* OBSOLETE else if (regno >= GR96_REGNUM && regno < GR96_REGNUM + 32) */
-/* OBSOLETE { */
-/* OBSOLETE To.Space = UDI29KGlobalRegs; */
-/* OBSOLETE To.Offset = (regno - GR96_REGNUM) + 96; */
-/* OBSOLETE result = UDIWrite (&From, To, Count, Size, &CountDone, HostEndian); */
-/* OBSOLETE } */
-/* OBSOLETE else if (regno >= LR0_REGNUM && regno < LR0_REGNUM + 128) */
-/* OBSOLETE { */
-/* OBSOLETE To.Space = UDI29KLocalRegs; */
-/* OBSOLETE To.Offset = (regno - LR0_REGNUM); */
-/* OBSOLETE result = UDIWrite (&From, To, Count, Size, &CountDone, HostEndian); */
-/* OBSOLETE } */
-/* OBSOLETE else if (regno >= FPE_REGNUM && regno <= EXO_REGNUM) */
-/* OBSOLETE return 0; /* Pretend Success */ */
-/* OBSOLETE else if (regno == PC_REGNUM) */
-/* OBSOLETE { */
-/* OBSOLETE /* PC1 via UDI29KPC */ */
-/* OBSOLETE */
-/* OBSOLETE To.Space = UDI29KPC; */
-/* OBSOLETE To.Offset = 0; /* PC1 */ */
-/* OBSOLETE result = UDIWrite (&From, To, Count, Size, &CountDone, HostEndian); */
-/* OBSOLETE */
-/* OBSOLETE /* Writing to this loc actually changes the values of pc0 & pc1 */ */
-/* OBSOLETE */
-/* OBSOLETE register_valid[PC_REGNUM] = 0; /* pc1 */ */
-/* OBSOLETE register_valid[NPC_REGNUM] = 0; /* pc0 */ */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE /* An unprotected or protected special register */ */
-/* OBSOLETE { */
-/* OBSOLETE To.Space = UDI29KSpecialRegs; */
-/* OBSOLETE To.Offset = regnum_to_srnum (regno); */
-/* OBSOLETE result = UDIWrite (&From, To, Count, Size, &CountDone, HostEndian); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (result != 0) */
-/* OBSOLETE error ("UDIWrite() failed in store_registers"); */
-/* OBSOLETE */
-/* OBSOLETE return 0; */
-/* OBSOLETE } */
-/* OBSOLETE /********************************************************** REGNUM_TO_SRNUM */ */
-/* OBSOLETE /* */
-/* OBSOLETE * Convert a gdb special register number to a 29000 special register number. */
-/* OBSOLETE */ */
-/* OBSOLETE static int */
-/* OBSOLETE regnum_to_srnum (int regno) */
-/* OBSOLETE { */
-/* OBSOLETE switch (regno) */
-/* OBSOLETE { */
-/* OBSOLETE case VAB_REGNUM: */
-/* OBSOLETE return (0); */
-/* OBSOLETE case OPS_REGNUM: */
-/* OBSOLETE return (1); */
-/* OBSOLETE case CPS_REGNUM: */
-/* OBSOLETE return (2); */
-/* OBSOLETE case CFG_REGNUM: */
-/* OBSOLETE return (3); */
-/* OBSOLETE case CHA_REGNUM: */
-/* OBSOLETE return (4); */
-/* OBSOLETE case CHD_REGNUM: */
-/* OBSOLETE return (5); */
-/* OBSOLETE case CHC_REGNUM: */
-/* OBSOLETE return (6); */
-/* OBSOLETE case RBP_REGNUM: */
-/* OBSOLETE return (7); */
-/* OBSOLETE case TMC_REGNUM: */
-/* OBSOLETE return (8); */
-/* OBSOLETE case TMR_REGNUM: */
-/* OBSOLETE return (9); */
-/* OBSOLETE case NPC_REGNUM: */
-/* OBSOLETE return (USE_SHADOW_PC ? (20) : (10)); */
-/* OBSOLETE case PC_REGNUM: */
-/* OBSOLETE return (USE_SHADOW_PC ? (21) : (11)); */
-/* OBSOLETE case PC2_REGNUM: */
-/* OBSOLETE return (USE_SHADOW_PC ? (22) : (12)); */
-/* OBSOLETE case MMU_REGNUM: */
-/* OBSOLETE return (13); */
-/* OBSOLETE case LRU_REGNUM: */
-/* OBSOLETE return (14); */
-/* OBSOLETE case IPC_REGNUM: */
-/* OBSOLETE return (128); */
-/* OBSOLETE case IPA_REGNUM: */
-/* OBSOLETE return (129); */
-/* OBSOLETE case IPB_REGNUM: */
-/* OBSOLETE return (130); */
-/* OBSOLETE case Q_REGNUM: */
-/* OBSOLETE return (131); */
-/* OBSOLETE case ALU_REGNUM: */
-/* OBSOLETE return (132); */
-/* OBSOLETE case BP_REGNUM: */
-/* OBSOLETE return (133); */
-/* OBSOLETE case FC_REGNUM: */
-/* OBSOLETE return (134); */
-/* OBSOLETE case CR_REGNUM: */
-/* OBSOLETE return (135); */
-/* OBSOLETE case FPE_REGNUM: */
-/* OBSOLETE return (160); */
-/* OBSOLETE case INTE_REGNUM: */
-/* OBSOLETE return (161); */
-/* OBSOLETE case FPS_REGNUM: */
-/* OBSOLETE return (162); */
-/* OBSOLETE case EXO_REGNUM: */
-/* OBSOLETE return (164); */
-/* OBSOLETE default: */
-/* OBSOLETE return (255); /* Failure ? */ */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE /****************************************************************************/ */
-/* OBSOLETE /* */
-/* OBSOLETE * Determine the Target memory space qualifier based on the addr. */
-/* OBSOLETE * FIXME: Can't distinguis I_ROM/D_ROM. */
-/* OBSOLETE * FIXME: Doesn't know anything about I_CACHE/D_CACHE. */
-/* OBSOLETE */ */
-/* OBSOLETE static CPUSpace */
-/* OBSOLETE udi_memory_space (CORE_ADDR addr) */
-/* OBSOLETE { */
-/* OBSOLETE UDIUInt32 tstart = IMemStart; */
-/* OBSOLETE UDIUInt32 tend = tstart + IMemSize; */
-/* OBSOLETE UDIUInt32 dstart = DMemStart; */
-/* OBSOLETE UDIUInt32 dend = tstart + DMemSize; */
-/* OBSOLETE UDIUInt32 rstart = RMemStart; */
-/* OBSOLETE UDIUInt32 rend = tstart + RMemSize; */
-/* OBSOLETE */
-/* OBSOLETE if (((UDIUInt32) addr >= tstart) && ((UDIUInt32) addr < tend)) */
-/* OBSOLETE { */
-/* OBSOLETE return UDI29KIRAMSpace; */
-/* OBSOLETE } */
-/* OBSOLETE else if (((UDIUInt32) addr >= dstart) && ((UDIUInt32) addr < dend)) */
-/* OBSOLETE { */
-/* OBSOLETE return UDI29KDRAMSpace; */
-/* OBSOLETE } */
-/* OBSOLETE else if (((UDIUInt32) addr >= rstart) && ((UDIUInt32) addr < rend)) */
-/* OBSOLETE { */
-/* OBSOLETE /* FIXME: how do we determine between D_ROM and I_ROM */ */
-/* OBSOLETE return UDI29KIROMSpace; */
-/* OBSOLETE } */
-/* OBSOLETE else /* FIXME: what do me do now? */ */
-/* OBSOLETE return UDI29KDRAMSpace; /* Hmmm! */ */
-/* OBSOLETE } */
-/* OBSOLETE /*********************************************************************** STUBS */
-/* OBSOLETE */ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE convert16 (void) */
-/* OBSOLETE {; */
-/* OBSOLETE } */
-/* OBSOLETE void */
-/* OBSOLETE convert32 (void) */
-/* OBSOLETE {; */
-/* OBSOLETE } */
-/* OBSOLETE struct ui_file *EchoFile = 0; /* used for debugging */ */
-/* OBSOLETE int QuietMode = 0; /* used for debugging */ */
-/* OBSOLETE */
-/* OBSOLETE #ifdef NO_HIF_SUPPORT */
-/* OBSOLETE service_HIF (union msg_t *msg) */
-/* OBSOLETE { */
-/* OBSOLETE return (0); /* Emulate a failure */ */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE */
-/* OBSOLETE /* Target_ops vector. Not static because there does not seem to be */
-/* OBSOLETE any portable way to do a forward declaration of a static variable. */
-/* OBSOLETE The RS/6000 doesn't like "extern" followed by "static"; SunOS */
-/* OBSOLETE /bin/cc doesn't like "static" twice. */ */
-/* OBSOLETE */
-/* OBSOLETE struct target_ops udi_ops; */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE init_udi_ops (void) */
-/* OBSOLETE { */
-/* OBSOLETE udi_ops.to_shortname = "udi"; */
-/* OBSOLETE udi_ops.to_longname = "Remote UDI connected TIP"; */
-/* OBSOLETE udi_ops.to_doc = "Remote debug an AMD 29k using UDI socket connection to TIP process.\n\ */
-/* OBSOLETE Arguments are\n\ */
-/* OBSOLETE `configuration-id AF_INET hostname port-number'\n\ */
-/* OBSOLETE To connect via the network, where hostname and port-number specify the\n\ */
-/* OBSOLETE host and port where you can connect via UDI.\n\ */
-/* OBSOLETE configuration-id is unused.\n\ */
-/* OBSOLETE \n\ */
-/* OBSOLETE `configuration-id AF_UNIX socket-name tip-program'\n\ */
-/* OBSOLETE To connect using a local connection to the \"tip.exe\" program which is\n\ */
-/* OBSOLETE supplied by AMD. If socket-name specifies an AF_UNIX socket then the\n\ */
-/* OBSOLETE tip program must already be started; connect to it using that socket.\n\ */
-/* OBSOLETE If not, start up tip-program, which should be the name of the tip\n\ */
-/* OBSOLETE program. If appropriate, the PATH environment variable is searched.\n\ */
-/* OBSOLETE configuration-id is unused.\n\ */
-/* OBSOLETE \n\ */
-/* OBSOLETE `configuration-id'\n\ */
-/* OBSOLETE Look up the configuration in ./udi_soc or /etc/udi_soc, which\n\ */
-/* OBSOLETE are files containing lines in the above formats. configuration-id is\n\ */
-/* OBSOLETE used to pick which line of the file to use."; */
-/* OBSOLETE udi_ops.to_open = udi_open; */
-/* OBSOLETE udi_ops.to_close = udi_close; */
-/* OBSOLETE udi_ops.to_attach = udi_attach; */
-/* OBSOLETE udi_ops.to_detach = udi_detach; */
-/* OBSOLETE udi_ops.to_resume = udi_resume; */
-/* OBSOLETE udi_ops.to_wait = udi_wait; */
-/* OBSOLETE udi_ops.to_fetch_registers = udi_fetch_registers; */
-/* OBSOLETE udi_ops.to_store_registers = udi_store_registers; */
-/* OBSOLETE udi_ops.to_prepare_to_store = udi_prepare_to_store; */
-/* OBSOLETE udi_ops.to_xfer_memory = udi_xfer_inferior_memory; */
-/* OBSOLETE udi_ops.to_files_info = udi_files_info; */
-/* OBSOLETE udi_ops.to_insert_breakpoint = udi_insert_breakpoint; */
-/* OBSOLETE udi_ops.to_remove_breakpoint = udi_remove_breakpoint; */
-/* OBSOLETE udi_ops.to_terminal_init = 0; */
-/* OBSOLETE udi_ops.to_terminal_inferior = 0; */
-/* OBSOLETE udi_ops.to_terminal_ours_for_output = 0; */
-/* OBSOLETE udi_ops.to_terminal_ours = 0; */
-/* OBSOLETE udi_ops.to_terminal_info = 0; */
-/* OBSOLETE udi_ops.to_kill = udi_kill; */
-/* OBSOLETE udi_ops.to_load = udi_load; */
-/* OBSOLETE udi_ops.to_lookup_symbol = 0; */
-/* OBSOLETE udi_ops.to_create_inferior = udi_create_inferior; */
-/* OBSOLETE udi_ops.to_mourn_inferior = udi_mourn; */
-/* OBSOLETE udi_ops.to_can_run = 0; */
-/* OBSOLETE udi_ops.to_notice_signals = 0; */
-/* OBSOLETE udi_ops.to_thread_alive = 0; */
-/* OBSOLETE udi_ops.to_stop = 0; */
-/* OBSOLETE udi_ops.to_stratum = process_stratum; */
-/* OBSOLETE udi_ops.DONT_USE = 0; */
-/* OBSOLETE udi_ops.to_has_all_memory = 1; */
-/* OBSOLETE udi_ops.to_has_memory = 1; */
-/* OBSOLETE udi_ops.to_has_stack = 1; */
-/* OBSOLETE udi_ops.to_has_registers = 1; */
-/* OBSOLETE udi_ops.to_has_execution = 1; */
-/* OBSOLETE udi_ops.to_sections = 0; */
-/* OBSOLETE udi_ops.to_sections_end = 0; */
-/* OBSOLETE udi_ops.to_magic = OPS_MAGIC; */
-/* OBSOLETE }; */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE _initialize_remote_udi (void) */
-/* OBSOLETE { */
-/* OBSOLETE init_udi_ops (); */
-/* OBSOLETE add_target (&udi_ops); */
-/* OBSOLETE } */
diff --git a/contrib/gdb/gdb/remote-vx.c b/contrib/gdb/gdb/remote-vx.c
deleted file mode 100644
index 5ec4df42fd79..000000000000
--- a/contrib/gdb/gdb/remote-vx.c
+++ /dev/null
@@ -1,1410 +0,0 @@
-/* Memory-access and commands for remote VxWorks processes, for GDB.
-
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999,
- 2000, 2001, 2002 Free Software Foundation, Inc.
-
- Contributed by Wind River Systems and Cygnus Support.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "command.h"
-#include "symtab.h"
-#include "complaints.h"
-#include "gdbcmd.h"
-#include "bfd.h" /* Required by objfiles.h. */
-#include "symfile.h"
-#include "objfiles.h"
-#include "gdb-stabs.h"
-#include "regcache.h"
-
-#include "gdb_string.h"
-#include <errno.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#define malloc bogon_malloc /* Sun claims "char *malloc()" not void * */
-#define free bogon_free /* Sun claims "int free()" not void */
-#define realloc bogon_realloc /* Sun claims "char *realloc()", not void * */
-#include <rpc/rpc.h>
-#undef malloc
-#undef free
-#undef realloc
-#include <sys/time.h> /* UTek's <rpc/rpc.h> doesn't #incl this */
-#include <netdb.h>
-#include "vx-share/ptrace.h"
-#include "vx-share/xdr_ptrace.h"
-#include "vx-share/xdr_ld.h"
-#include "vx-share/xdr_rdb.h"
-#include "vx-share/dbgRpcLib.h"
-
-#include <symtab.h>
-
-/* Maximum number of bytes to transfer in a single
- PTRACE_{READ,WRITE}DATA request. */
-#define VX_MEMXFER_MAX 4096
-
-extern void vx_read_register ();
-extern void vx_write_register ();
-extern void symbol_file_command ();
-extern int stop_soon_quietly; /* for wait_for_inferior */
-
-static int net_step ();
-static int net_ptrace_clnt_call (); /* Forward decl */
-static enum clnt_stat net_clnt_call (); /* Forward decl */
-
-/* Target ops structure for accessing memory and such over the net */
-
-static struct target_ops vx_ops;
-
-/* Target ops structure for accessing VxWorks child processes over the net */
-
-static struct target_ops vx_run_ops;
-
-/* Saved name of target host and called function for "info files".
- Both malloc'd. */
-
-static char *vx_host;
-static char *vx_running; /* Called function */
-
-/* Nonzero means target that is being debugged remotely has a floating
- point processor. */
-
-int target_has_fp;
-
-/* Default error message when the network is forking up. */
-
-static const char rpcerr[] = "network target debugging: rpc error";
-
-CLIENT *pClient; /* client used in net debugging */
-static int ptraceSock = RPC_ANYSOCK;
-
-enum clnt_stat net_clnt_call ();
-static void parse_args ();
-
-static struct timeval rpcTimeout =
-{10, 0};
-
-static char *skip_white_space ();
-static char *find_white_space ();
-
-/* Tell the VxWorks target system to download a file.
- The load addresses of the text, data, and bss segments are
- stored in *pTextAddr, *pDataAddr, and *pBssAddr (respectively).
- Returns 0 for success, -1 for failure. */
-
-static int
-net_load (char *filename, CORE_ADDR *pTextAddr, CORE_ADDR *pDataAddr,
- CORE_ADDR *pBssAddr)
-{
- enum clnt_stat status;
- struct ldfile ldstruct;
- struct timeval load_timeout;
-
- memset ((char *) &ldstruct, '\0', sizeof (ldstruct));
-
- /* We invoke clnt_call () here directly, instead of through
- net_clnt_call (), because we need to set a large timeout value.
- The load on the target side can take quite a while, easily
- more than 10 seconds. The user can kill this call by typing
- CTRL-C if there really is a problem with the load.
-
- Do not change the tv_sec value without checking -- select() imposes
- a limit of 10**8 on it for no good reason that I can see... */
-
- load_timeout.tv_sec = 99999999; /* A large number, effectively inf. */
- load_timeout.tv_usec = 0;
-
- status = clnt_call (pClient, VX_LOAD, xdr_wrapstring, &filename, xdr_ldfile,
- &ldstruct, load_timeout);
-
- if (status == RPC_SUCCESS)
- {
- if (*ldstruct.name == 0) /* load failed on VxWorks side */
- return -1;
- *pTextAddr = ldstruct.txt_addr;
- *pDataAddr = ldstruct.data_addr;
- *pBssAddr = ldstruct.bss_addr;
- return 0;
- }
- else
- return -1;
-}
-
-/* returns 0 if successful, errno if RPC failed or VxWorks complains. */
-
-static int
-net_break (int addr, u_long procnum)
-{
- enum clnt_stat status;
- int break_status;
- Rptrace ptrace_in; /* XXX This is stupid. It doesn't need to be a ptrace
- structure. How about something smaller? */
-
- memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
- break_status = 0;
-
- ptrace_in.addr = addr;
- ptrace_in.pid = PIDGET (inferior_ptid);
-
- status = net_clnt_call (procnum, xdr_rptrace, &ptrace_in, xdr_int,
- &break_status);
-
- if (status != RPC_SUCCESS)
- return errno;
-
- if (break_status == -1)
- return ENOMEM;
- return break_status; /* probably (FIXME) zero */
-}
-
-/* returns 0 if successful, errno otherwise */
-
-static int
-vx_insert_breakpoint (int addr)
-{
- return net_break (addr, VX_BREAK_ADD);
-}
-
-/* returns 0 if successful, errno otherwise */
-
-static int
-vx_remove_breakpoint (int addr)
-{
- return net_break (addr, VX_BREAK_DELETE);
-}
-
-/* Start an inferior process and sets inferior_ptid to its pid.
- EXEC_FILE is the file to run.
- ALLARGS is a string containing the arguments to the program.
- ENV is the environment vector to pass.
- Returns process id. Errors reported with error().
- On VxWorks, we ignore exec_file. */
-
-static void
-vx_create_inferior (char *exec_file, char *args, char **env)
-{
- enum clnt_stat status;
- arg_array passArgs;
- TASK_START taskStart;
-
- memset ((char *) &passArgs, '\0', sizeof (passArgs));
- memset ((char *) &taskStart, '\0', sizeof (taskStart));
-
- /* parse arguments, put them in passArgs */
-
- parse_args (args, &passArgs);
-
- if (passArgs.arg_array_len == 0)
- error ("You must specify a function name to run, and arguments if any");
-
- status = net_clnt_call (PROCESS_START, xdr_arg_array, &passArgs,
- xdr_TASK_START, &taskStart);
-
- if ((status != RPC_SUCCESS) || (taskStart.status == -1))
- error ("Can't create process on remote target machine");
-
- /* Save the name of the running function */
- vx_running = savestring (passArgs.arg_array_val[0],
- strlen (passArgs.arg_array_val[0]));
-
- push_target (&vx_run_ops);
- inferior_ptid = pid_to_ptid (taskStart.pid);
-
- /* We will get a trace trap after one instruction.
- Insert breakpoints and continue. */
-
- 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 ();
-
- stop_soon_quietly = 1;
- wait_for_inferior (); /* Get the task spawn event */
- stop_soon_quietly = 0;
-
- /* insert_step_breakpoint (); FIXME, do we need this? */
- proceed (-1, TARGET_SIGNAL_DEFAULT, 0);
-}
-
-/* Fill ARGSTRUCT in argc/argv form with the arguments from the
- argument string ARGSTRING. */
-
-static void
-parse_args (register char *arg_string, arg_array *arg_struct)
-{
- register int arg_count = 0; /* number of arguments */
- register int arg_index = 0;
- register char *p0;
-
- memset ((char *) arg_struct, '\0', sizeof (arg_array));
-
- /* first count how many arguments there are */
-
- p0 = arg_string;
- while (*p0 != '\0')
- {
- if (*(p0 = skip_white_space (p0)) == '\0')
- break;
- p0 = find_white_space (p0);
- arg_count++;
- }
-
- arg_struct->arg_array_len = arg_count;
- arg_struct->arg_array_val = (char **) xmalloc ((arg_count + 1)
- * sizeof (char *));
-
- /* now copy argument strings into arg_struct. */
-
- while (*(arg_string = skip_white_space (arg_string)))
- {
- p0 = find_white_space (arg_string);
- arg_struct->arg_array_val[arg_index++] = savestring (arg_string,
- p0 - arg_string);
- arg_string = p0;
- }
-
- arg_struct->arg_array_val[arg_count] = NULL;
-}
-
-/* Advance a string pointer across whitespace and return a pointer
- to the first non-white character. */
-
-static char *
-skip_white_space (register char *p)
-{
- while (*p == ' ' || *p == '\t')
- p++;
- return p;
-}
-
-/* Search for the first unquoted whitespace character in a string.
- Returns a pointer to the character, or to the null terminator
- if no whitespace is found. */
-
-static char *
-find_white_space (register char *p)
-{
- register int c;
-
- while ((c = *p) != ' ' && c != '\t' && c)
- {
- if (c == '\'' || c == '"')
- {
- while (*++p != c && *p)
- {
- if (*p == '\\')
- p++;
- }
- if (!*p)
- break;
- }
- p++;
- }
- return p;
-}
-
-/* Poll the VxWorks target system for an event related
- to the debugged task.
- Returns -1 if remote wait failed, task status otherwise. */
-
-static int
-net_wait (RDB_EVENT *pEvent)
-{
- int pid;
- enum clnt_stat status;
-
- memset ((char *) pEvent, '\0', sizeof (RDB_EVENT));
-
- pid = PIDGET (inferior_ptid);
- status = net_clnt_call (PROCESS_WAIT, xdr_int, &pid, xdr_RDB_EVENT,
- pEvent);
-
- /* return (status == RPC_SUCCESS)? pEvent->status: -1; */
- if (status == RPC_SUCCESS)
- return ((pEvent->status) ? 1 : 0);
- else if (status == RPC_TIMEDOUT)
- return (1);
- else
- return (-1);
-}
-
-/* Suspend the remote task.
- Returns -1 if suspend fails on target system, 0 otherwise. */
-
-static int
-net_quit (void)
-{
- int pid;
- int quit_status;
- enum clnt_stat status;
-
- quit_status = 0;
-
- /* don't let rdbTask suspend itself by passing a pid of 0 */
-
- if ((pid = PIDGET (inferior_ptid)) == 0)
- return -1;
-
- status = net_clnt_call (VX_TASK_SUSPEND, xdr_int, &pid, xdr_int,
- &quit_status);
-
- return (status == RPC_SUCCESS) ? quit_status : -1;
-}
-
-/* Read a register or registers from the remote system. */
-
-void
-net_read_registers (char *reg_buf, int len, u_long procnum)
-{
- int status;
- Rptrace ptrace_in;
- Ptrace_return ptrace_out;
- C_bytes out_data;
- char message[100];
-
- memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
- memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
-
- /* Initialize RPC input argument structure. */
-
- ptrace_in.pid = PIDGET (inferior_ptid);
- ptrace_in.info.ttype = NOINFO;
-
- /* Initialize RPC return value structure. */
-
- out_data.bytes = reg_buf;
- out_data.len = len;
- ptrace_out.info.more_data = (caddr_t) & out_data;
-
- /* Call RPC; take an error exit if appropriate. */
-
- status = net_ptrace_clnt_call (procnum, &ptrace_in, &ptrace_out);
- if (status)
- error (rpcerr);
- if (ptrace_out.status == -1)
- {
- errno = ptrace_out.errno_num;
- sprintf (message, "reading %s registers", (procnum == PTRACE_GETREGS)
- ? "general-purpose"
- : "floating-point");
- perror_with_name (message);
- }
-}
-
-/* Write register values to a VxWorks target. REG_BUF points to a buffer
- containing the raw register values, LEN is the length of REG_BUF in
- bytes, and PROCNUM is the RPC procedure number (PTRACE_SETREGS or
- PTRACE_SETFPREGS). An error exit is taken if the RPC call fails or
- if an error status is returned by the remote debug server. This is
- a utility routine used by vx_write_register (). */
-
-void
-net_write_registers (char *reg_buf, int len, u_long procnum)
-{
- int status;
- Rptrace ptrace_in;
- Ptrace_return ptrace_out;
- C_bytes in_data;
- char message[100];
-
- memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
- memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
-
- /* Initialize RPC input argument structure. */
-
- in_data.bytes = reg_buf;
- in_data.len = len;
-
- ptrace_in.pid = PIDGET (inferior_ptid);
- ptrace_in.info.ttype = DATA;
- ptrace_in.info.more_data = (caddr_t) & in_data;
-
- /* Call RPC; take an error exit if appropriate. */
-
- status = net_ptrace_clnt_call (procnum, &ptrace_in, &ptrace_out);
- if (status)
- error (rpcerr);
- if (ptrace_out.status == -1)
- {
- errno = ptrace_out.errno_num;
- sprintf (message, "writing %s registers", (procnum == PTRACE_SETREGS)
- ? "general-purpose"
- : "floating-point");
- perror_with_name (message);
- }
-}
-
-/* Prepare to store registers. Since we will store all of them,
- read out their current values now. */
-
-static void
-vx_prepare_to_store (void)
-{
- /* Fetch all registers, if any of them are not yet fetched. */
- read_register_bytes (0, NULL, REGISTER_BYTES);
-}
-
-/* Copy LEN bytes to or from remote inferior's memory starting at MEMADDR
- to debugger memory starting at MYADDR. WRITE is true if writing to the
- inferior. TARGET is unused.
- Result is the number of bytes written or read (zero if error). The
- protocol allows us to return a negative count, indicating that we can't
- handle the current address but can handle one N bytes further, but
- vxworks doesn't give us that information. */
-
-static int
-vx_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib, struct target_ops *target)
-{
- int status;
- Rptrace ptrace_in;
- Ptrace_return ptrace_out;
- C_bytes data;
- enum ptracereq request;
- int nleft, nxfer;
-
- memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
- memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
-
- ptrace_in.pid = PIDGET (inferior_ptid); /* XXX pid unnecessary for READDATA */
- ptrace_in.addr = (int) memaddr; /* Where from */
- ptrace_in.data = len; /* How many bytes */
-
- if (write)
- {
- ptrace_in.info.ttype = DATA;
- ptrace_in.info.more_data = (caddr_t) & data;
-
- data.bytes = (caddr_t) myaddr; /* Where from */
- data.len = len; /* How many bytes (again, for XDR) */
- request = PTRACE_WRITEDATA;
- }
- else
- {
- ptrace_out.info.more_data = (caddr_t) & data;
- request = PTRACE_READDATA;
- }
- /* Loop until the entire request has been satisfied, transferring
- at most VX_MEMXFER_MAX bytes per iteration. Break from the loop
- if an error status is returned by the remote debug server. */
-
- nleft = len;
- status = 0;
-
- while (nleft > 0 && status == 0)
- {
- nxfer = min (nleft, VX_MEMXFER_MAX);
-
- ptrace_in.addr = (int) memaddr;
- ptrace_in.data = nxfer;
- data.bytes = (caddr_t) myaddr;
- data.len = nxfer;
-
- /* Request a block from the remote debug server; if RPC fails,
- report an error and return to debugger command level. */
-
- if (net_ptrace_clnt_call (request, &ptrace_in, &ptrace_out))
- error (rpcerr);
-
- status = ptrace_out.status;
- if (status == 0)
- {
- memaddr += nxfer;
- myaddr += nxfer;
- nleft -= nxfer;
- }
- else
- {
- /* A target-side error has ocurred. Set errno to the error
- code chosen by the target so that a later perror () will
- say something meaningful. */
-
- errno = ptrace_out.errno_num;
- }
- }
-
- /* Return the number of bytes transferred. */
-
- return (len - nleft);
-}
-
-static void
-vx_files_info (void)
-{
- printf_unfiltered ("\tAttached to host `%s'", vx_host);
- printf_unfiltered (", which has %sfloating point", target_has_fp ? "" : "no ");
- printf_unfiltered (".\n");
-}
-
-static void
-vx_run_files_info (void)
-{
- printf_unfiltered ("\tRunning %s VxWorks process %s",
- vx_running ? "child" : "attached",
- local_hex_string (PIDGET (inferior_ptid)));
- if (vx_running)
- printf_unfiltered (", function `%s'", vx_running);
- printf_unfiltered (".\n");
-}
-
-static void
-vx_resume (ptid_t ptid, int step, enum target_signal siggnal)
-{
- int status;
- Rptrace ptrace_in;
- Ptrace_return ptrace_out;
- CORE_ADDR cont_addr;
-
- if (ptid_equal (ptid, minus_one_ptid))
- ptid = inferior_ptid;
-
- if (siggnal != 0 && siggnal != stop_signal)
- error ("Cannot send signals to VxWorks processes");
-
- /* Set CONT_ADDR to the address at which we are continuing,
- or to 1 if we are continuing from where the program stopped.
- This conforms to traditional ptrace () usage, but at the same
- time has special meaning for the VxWorks remote debug server.
- If the address is not 1, the server knows that the target
- program is jumping to a new address, which requires special
- handling if there is a breakpoint at the new address. */
-
- cont_addr = read_register (PC_REGNUM);
- if (cont_addr == stop_pc)
- cont_addr = 1;
-
- memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
- memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
-
- ptrace_in.pid = PIDGET (ptid);
- ptrace_in.addr = cont_addr; /* Target side insists on this, or it panics. */
-
- if (step)
- status = net_step ();
- else
- status = net_ptrace_clnt_call (PTRACE_CONT, &ptrace_in, &ptrace_out);
-
- if (status)
- error (rpcerr);
- if (ptrace_out.status == -1)
- {
- errno = ptrace_out.errno_num;
- perror_with_name ("Resuming remote process");
- }
-}
-
-static void
-vx_mourn_inferior (void)
-{
- pop_target (); /* Pop back to no-child state */
- generic_mourn_inferior ();
-}
-
-
-static void vx_add_symbols (char *, int, CORE_ADDR, CORE_ADDR, CORE_ADDR);
-
-struct find_sect_args
- {
- CORE_ADDR text_start;
- CORE_ADDR data_start;
- CORE_ADDR bss_start;
- };
-
-static void find_sect (bfd *, asection *, void *);
-
-static void
-find_sect (bfd *abfd, asection *sect, PTR obj)
-{
- struct find_sect_args *args = (struct find_sect_args *) obj;
-
- if (bfd_get_section_flags (abfd, sect) & (SEC_CODE & SEC_READONLY))
- args->text_start = bfd_get_section_vma (abfd, sect);
- else if (bfd_get_section_flags (abfd, sect) & SEC_ALLOC)
- {
- if (bfd_get_section_flags (abfd, sect) & SEC_LOAD)
- {
- /* Exclude .ctor and .dtor sections which have SEC_CODE set but not
- SEC_DATA. */
- if (bfd_get_section_flags (abfd, sect) & SEC_DATA)
- args->data_start = bfd_get_section_vma (abfd, sect);
- }
- else
- args->bss_start = bfd_get_section_vma (abfd, sect);
- }
-}
-
-static void
-vx_add_symbols (char *name, int from_tty, CORE_ADDR text_addr,
- CORE_ADDR data_addr, CORE_ADDR bss_addr)
-{
- struct section_offsets *offs;
- struct objfile *objfile;
- struct find_sect_args ss;
-
- /* It might be nice to suppress the breakpoint_re_set which happens here
- because we are going to do one again after the objfile_relocate. */
- objfile = symbol_file_add (name, from_tty, NULL, 0, 0);
-
- /* This is a (slightly cheesy) way of superceding the old symbols. A less
- cheesy way would be to find the objfile with the same name and
- free_objfile it. */
- objfile_to_front (objfile);
-
- offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
- memcpy (offs, objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
-
- ss.text_start = 0;
- ss.data_start = 0;
- ss.bss_start = 0;
- bfd_map_over_sections (objfile->obfd, find_sect, &ss);
-
- /* Both COFF and b.out frontends use these SECT_OFF_* values. */
- offs->offsets[SECT_OFF_TEXT (objfile)] = text_addr - ss.text_start;
- offs->offsets[SECT_OFF_DATA (objfile)] = data_addr - ss.data_start;
- offs->offsets[SECT_OFF_BSS (objfile)] = bss_addr - ss.bss_start;
- objfile_relocate (objfile, offs);
-}
-
-/* This function allows the addition of incrementally linked object files. */
-
-static void
-vx_load_command (char *arg_string, int from_tty)
-{
- CORE_ADDR text_addr;
- CORE_ADDR data_addr;
- CORE_ADDR bss_addr;
-
- if (arg_string == 0)
- error ("The load command takes a file name");
-
- arg_string = tilde_expand (arg_string);
- make_cleanup (xfree, arg_string);
-
- dont_repeat ();
-
- /* Refuse to load the module if a debugged task is running. Doing so
- can have a number of unpleasant consequences to the running task. */
-
- if (PIDGET (inferior_ptid) != 0 && target_has_execution)
- {
- if (query ("You may not load a module while the target task is running.\n\
-Kill the target task? "))
- target_kill ();
- else
- error ("Load canceled.");
- }
-
- QUIT;
- immediate_quit++;
- if (net_load (arg_string, &text_addr, &data_addr, &bss_addr) == -1)
- error ("Load failed on target machine");
- immediate_quit--;
-
- vx_add_symbols (arg_string, from_tty, text_addr, data_addr, bss_addr);
-
- /* Getting new symbols may change our opinion about what is
- frameless. */
- reinit_frame_cache ();
-}
-
-/* Single step the target program at the source or machine level.
- Takes an error exit if rpc fails.
- Returns -1 if remote single-step operation fails, else 0. */
-
-static int
-net_step (void)
-{
- enum clnt_stat status;
- int step_status;
- SOURCE_STEP source_step;
-
- source_step.taskId = PIDGET (inferior_ptid);
-
- if (step_range_end)
- {
- source_step.startAddr = step_range_start;
- source_step.endAddr = step_range_end;
- }
- else
- {
- source_step.startAddr = 0;
- source_step.endAddr = 0;
- }
-
- status = net_clnt_call (VX_SOURCE_STEP, xdr_SOURCE_STEP, &source_step,
- xdr_int, &step_status);
-
- if (status == RPC_SUCCESS)
- return step_status;
- else
- error (rpcerr);
-}
-
-/* Emulate ptrace using RPC calls to the VxWorks target system.
- Returns nonzero (-1) if RPC status to VxWorks is bad, 0 otherwise. */
-
-static int
-net_ptrace_clnt_call (enum ptracereq request, Rptrace *pPtraceIn,
- Ptrace_return *pPtraceOut)
-{
- enum clnt_stat status;
-
- status = net_clnt_call (request, xdr_rptrace, pPtraceIn, xdr_ptrace_return,
- pPtraceOut);
-
- if (status != RPC_SUCCESS)
- return -1;
-
- return 0;
-}
-
-/* Query the target for the name of the file from which VxWorks was
- booted. pBootFile is the address of a pointer to the buffer to
- receive the file name; if the pointer pointed to by pBootFile is
- NULL, memory for the buffer will be allocated by XDR.
- Returns -1 if rpc failed, 0 otherwise. */
-
-static int
-net_get_boot_file (char **pBootFile)
-{
- enum clnt_stat status;
-
- status = net_clnt_call (VX_BOOT_FILE_INQ, xdr_void, (char *) 0,
- xdr_wrapstring, pBootFile);
- return (status == RPC_SUCCESS) ? 0 : -1;
-}
-
-/* Fetch a list of loaded object modules from the VxWorks target
- and store in PLOADTABLE.
- Returns -1 if rpc failed, 0 otherwise
- There's no way to check if the returned loadTable is correct.
- VxWorks doesn't check it. */
-
-static int
-net_get_symbols (ldtabl *pLoadTable)
-{
- enum clnt_stat status;
-
- memset ((char *) pLoadTable, '\0', sizeof (struct ldtabl));
-
- status = net_clnt_call (VX_STATE_INQ, xdr_void, 0, xdr_ldtabl, pLoadTable);
- return (status == RPC_SUCCESS) ? 0 : -1;
-}
-
-/* Look up a symbol in the VxWorks target's symbol table.
- Returns status of symbol read on target side (0=success, -1=fail)
- Returns -1 and complain()s if rpc fails. */
-
-struct complaint cant_contact_target =
-{"Lost contact with VxWorks target", 0, 0};
-
-static int
-vx_lookup_symbol (char *name, /* symbol name */
- CORE_ADDR *pAddr)
-{
- enum clnt_stat status;
- SYMBOL_ADDR symbolAddr;
-
- *pAddr = 0;
- memset ((char *) &symbolAddr, '\0', sizeof (symbolAddr));
-
- status = net_clnt_call (VX_SYMBOL_INQ, xdr_wrapstring, &name,
- xdr_SYMBOL_ADDR, &symbolAddr);
- if (status != RPC_SUCCESS)
- {
- complain (&cant_contact_target);
- return -1;
- }
-
- *pAddr = symbolAddr.addr;
- return symbolAddr.status;
-}
-
-/* Check to see if the VxWorks target has a floating point coprocessor.
- Returns 1 if target has floating point processor, 0 otherwise.
- Calls error() if rpc fails. */
-
-static int
-net_check_for_fp (void)
-{
- enum clnt_stat status;
- bool_t fp = 0; /* true if fp processor is present on target board */
-
- status = net_clnt_call (VX_FP_INQUIRE, xdr_void, 0, xdr_bool, &fp);
- if (status != RPC_SUCCESS)
- error (rpcerr);
-
- return (int) fp;
-}
-
-/* Establish an RPC connection with the VxWorks target system.
- Calls error () if unable to establish connection. */
-
-static void
-net_connect (char *host)
-{
- struct sockaddr_in destAddr;
- struct hostent *destHost;
- unsigned long addr;
-
- /* Get the internet address for the given host. Allow a numeric
- IP address or a hostname. */
-
- addr = inet_addr (host);
- if (addr == -1)
- {
- destHost = (struct hostent *) gethostbyname (host);
- if (destHost == NULL)
- /* FIXME: Probably should include hostname here in quotes.
- For example if the user types "target vxworks vx960 " it should
- say "Invalid host `vx960 '." not just "Invalid hostname". */
- error ("Invalid hostname. Couldn't find remote host address.");
- addr = *(unsigned long *) destHost->h_addr;
- }
-
- memset (&destAddr, '\0', sizeof (destAddr));
-
- destAddr.sin_addr.s_addr = addr;
- destAddr.sin_family = AF_INET;
- destAddr.sin_port = 0; /* set to actual port that remote
- ptrace is listening on. */
-
- /* Create a tcp client transport on which to issue
- calls to the remote ptrace server. */
-
- ptraceSock = RPC_ANYSOCK;
- pClient = clnttcp_create (&destAddr, RDBPROG, RDBVERS, &ptraceSock, 0, 0);
- /* FIXME, here is where we deal with different version numbers of the
- proto */
-
- if (pClient == NULL)
- {
- clnt_pcreateerror ("\tnet_connect");
- error ("Couldn't connect to remote target.");
- }
-}
-
-/* Sleep for the specified number of milliseconds
- * (assumed to be less than 1000).
- * If select () is interrupted, returns immediately;
- * takes an error exit if select () fails for some other reason.
- */
-
-static void
-sleep_ms (long ms)
-{
- struct timeval select_timeout;
- int status;
-
- select_timeout.tv_sec = 0;
- select_timeout.tv_usec = ms * 1000;
-
- status = select (0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0,
- &select_timeout);
-
- if (status < 0 && errno != EINTR)
- perror_with_name ("select");
-}
-
-static ptid_t
-vx_wait (ptid_t ptid_to_wait_for, struct target_waitstatus *status)
-{
- register int pid;
- RDB_EVENT rdbEvent;
- int quit_failed;
-
- do
- {
- /* If CTRL-C is hit during this loop,
- suspend the inferior process. */
-
- quit_failed = 0;
- if (quit_flag)
- {
- quit_failed = (net_quit () == -1);
- quit_flag = 0;
- }
-
- /* If a net_quit () or net_wait () call has failed,
- allow the user to break the connection with the target.
- We can't simply error () out of this loop, since the
- data structures representing the state of the inferior
- are in an inconsistent state. */
-
- if (quit_failed || net_wait (&rdbEvent) == -1)
- {
- terminal_ours ();
- if (query ("Can't %s. Disconnect from target system? ",
- (quit_failed) ? "suspend remote task"
- : "get status of remote task"))
- {
- target_mourn_inferior ();
- error ("Use the \"target\" command to reconnect.");
- }
- else
- {
- terminal_inferior ();
- continue;
- }
- }
-
- pid = rdbEvent.taskId;
- if (pid == 0)
- {
- sleep_ms (200); /* FIXME Don't kill the network too badly */
- }
- else if (pid != PIDGET (inferior_ptid))
- internal_error (__FILE__, __LINE__,
- "Bad pid for debugged task: %s\n",
- local_hex_string ((unsigned long) pid));
- }
- while (pid == 0);
-
- /* The mostly likely kind. */
- status->kind = TARGET_WAITKIND_STOPPED;
-
- switch (rdbEvent.eventType)
- {
- case EVENT_EXIT:
- status->kind = TARGET_WAITKIND_EXITED;
- /* FIXME is it possible to distinguish between a
- normal vs abnormal exit in VxWorks? */
- status->value.integer = 0;
- break;
-
- case EVENT_START:
- /* Task was just started. */
- status->value.sig = TARGET_SIGNAL_TRAP;
- break;
-
- case EVENT_STOP:
- status->value.sig = TARGET_SIGNAL_TRAP;
- /* XXX was it stopped by a signal? act accordingly */
- break;
-
- case EVENT_BREAK: /* Breakpoint was hit. */
- status->value.sig = TARGET_SIGNAL_TRAP;
- break;
-
- case EVENT_SUSPEND: /* Task was suspended, probably by ^C. */
- status->value.sig = TARGET_SIGNAL_INT;
- break;
-
- case EVENT_BUS_ERR: /* Task made evil nasty reference. */
- status->value.sig = TARGET_SIGNAL_BUS;
- break;
-
- case EVENT_ZERO_DIV: /* Division by zero */
- status->value.sig = TARGET_SIGNAL_FPE;
- break;
-
- case EVENT_SIGNAL:
-#ifdef I80960
- status->value.sig = i960_fault_to_signal (rdbEvent.sigType);
-#else
- /* Back in the old days, before enum target_signal, this code used
- to add NSIG to the signal number and claim that PRINT_RANDOM_SIGNAL
- would take care of it. But PRINT_RANDOM_SIGNAL has never been
- defined except on the i960, so I don't really know what we are
- supposed to do on other architectures. */
- status->value.sig = TARGET_SIGNAL_UNKNOWN;
-#endif
- break;
- } /* switch */
- return pid_to_ptid (pid);
-}
-
-static int
-symbol_stub (char *arg)
-{
- symbol_file_add_main (arg, 0);
- return 1;
-}
-
-static int
-add_symbol_stub (char *arg)
-{
- struct ldfile *pLoadFile = (struct ldfile *) arg;
-
- printf_unfiltered ("\t%s: ", pLoadFile->name);
- vx_add_symbols (pLoadFile->name, 0, pLoadFile->txt_addr,
- pLoadFile->data_addr, pLoadFile->bss_addr);
- printf_unfiltered ("ok\n");
- return 1;
-}
-/* Target command for VxWorks target systems.
-
- Used in vxgdb. Takes the name of a remote target machine
- running vxWorks and connects to it to initialize remote network
- debugging. */
-
-static void
-vx_open (char *args, int from_tty)
-{
- extern int close ();
- char *bootFile;
- extern char *source_path;
- struct ldtabl loadTable;
- struct ldfile *pLoadFile;
- int i;
- extern CLIENT *pClient;
- int symbols_added = 0;
-
- if (!args)
- error_no_arg ("target machine name");
-
- target_preopen (from_tty);
-
- unpush_target (&vx_ops);
- printf_unfiltered ("Attaching remote machine across net...\n");
- gdb_flush (gdb_stdout);
-
- /* Allow the user to kill the connect attempt by typing ^C.
- Wait until the call to target_has_fp () completes before
- disallowing an immediate quit, since even if net_connect ()
- is successful, the remote debug server might be hung. */
-
- immediate_quit++;
-
- net_connect (args);
- target_has_fp = net_check_for_fp ();
- printf_filtered ("Connected to %s.\n", args);
-
- immediate_quit--;
-
- push_target (&vx_ops);
-
- /* Save a copy of the target host's name. */
- vx_host = savestring (args, strlen (args));
-
- /* Find out the name of the file from which the target was booted
- and load its symbol table. */
-
- printf_filtered ("Looking in Unix path for all loaded modules:\n");
- bootFile = NULL;
- if (!net_get_boot_file (&bootFile))
- {
- if (*bootFile)
- {
- printf_filtered ("\t%s: ", bootFile);
- /* This assumes that the kernel is never relocated. Hope that is an
- accurate assumption. */
- if (catch_errors
- (symbol_stub,
- bootFile,
- "Error while reading symbols from boot file:\n",
- RETURN_MASK_ALL))
- puts_filtered ("ok\n");
- }
- else if (from_tty)
- printf_unfiltered ("VxWorks kernel symbols not loaded.\n");
- }
- else
- error ("Can't retrieve boot file name from target machine.");
-
- clnt_freeres (pClient, xdr_wrapstring, &bootFile);
-
- if (net_get_symbols (&loadTable) != 0)
- error ("Can't read loaded modules from target machine");
-
- i = 0 - 1;
- while (++i < loadTable.tbl_size)
- {
- QUIT; /* FIXME, avoids clnt_freeres below: mem leak */
- pLoadFile = &loadTable.tbl_ent[i];
-#ifdef WRS_ORIG
- {
- register int desc;
- struct cleanup *old_chain;
- char *fullname = NULL;
-
- desc = openp (source_path, 0, pLoadFile->name, O_RDONLY, 0, &fullname);
- if (desc < 0)
- perror_with_name (pLoadFile->name);
- old_chain = make_cleanup (close, desc);
- add_file_at_addr (fullname, desc, pLoadFile->txt_addr, pLoadFile->data_addr,
- pLoadFile->bss_addr);
- do_cleanups (old_chain);
- }
-#else
- /* FIXME: Is there something better to search than the PATH? (probably
- not the source path, since source might be in different directories
- than objects. */
-
- if (catch_errors (add_symbol_stub, (char *) pLoadFile, (char *) 0,
- RETURN_MASK_ALL))
- symbols_added = 1;
-#endif
- }
- printf_filtered ("Done.\n");
-
- clnt_freeres (pClient, xdr_ldtabl, &loadTable);
-
- /* Getting new symbols may change our opinion about what is
- frameless. */
- if (symbols_added)
- reinit_frame_cache ();
-}
-
-/* Takes a task started up outside of gdb and ``attaches'' to it.
- This stops it cold in its tracks and allows us to start tracing it. */
-
-static void
-vx_attach (char *args, int from_tty)
-{
- unsigned long pid;
- char *cptr = 0;
- Rptrace ptrace_in;
- Ptrace_return ptrace_out;
- int status;
-
- if (!args)
- error_no_arg ("process-id to attach");
-
- pid = strtoul (args, &cptr, 0);
- if ((cptr == args) || (*cptr != '\0'))
- error ("Invalid process-id -- give a single number in decimal or 0xhex");
-
- if (from_tty)
- printf_unfiltered ("Attaching pid %s.\n",
- local_hex_string ((unsigned long) pid));
-
- memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
- memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
- ptrace_in.pid = pid;
-
- status = net_ptrace_clnt_call (PTRACE_ATTACH, &ptrace_in, &ptrace_out);
- if (status == -1)
- error (rpcerr);
- if (ptrace_out.status == -1)
- {
- errno = ptrace_out.errno_num;
- perror_with_name ("Attaching remote process");
- }
-
- /* It worked... */
-
- inferior_ptid = pid_to_ptid (pid);
- push_target (&vx_run_ops);
-
- if (vx_running)
- xfree (vx_running);
- vx_running = 0;
-}
-
-/* detach_command --
- takes a program previously attached to and detaches it.
- The program resumes execution and will no longer stop
- on signals, etc. We better not have left any breakpoints
- in the program or it'll die when it hits one. For this
- to work, it may be necessary for the process to have been
- previously attached. It *might* work if the program was
- started via the normal ptrace (PTRACE_TRACEME). */
-
-static void
-vx_detach (char *args, int from_tty)
-{
- Rptrace ptrace_in;
- Ptrace_return ptrace_out;
- int signal = 0;
- int status;
-
- if (args)
- error ("Argument given to VxWorks \"detach\".");
-
- if (from_tty)
- printf_unfiltered ("Detaching pid %s.\n",
- local_hex_string (
- (unsigned long) PIDGET (inferior_ptid)));
-
- if (args) /* FIXME, should be possible to leave suspended */
- signal = atoi (args);
-
- memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
- memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
- ptrace_in.pid = PIDGET (inferior_ptid);
-
- status = net_ptrace_clnt_call (PTRACE_DETACH, &ptrace_in, &ptrace_out);
- if (status == -1)
- error (rpcerr);
- if (ptrace_out.status == -1)
- {
- errno = ptrace_out.errno_num;
- perror_with_name ("Detaching VxWorks process");
- }
-
- inferior_ptid = null_ptid;
- pop_target (); /* go back to non-executing VxWorks connection */
-}
-
-/* vx_kill -- takes a running task and wipes it out. */
-
-static void
-vx_kill (void)
-{
- Rptrace ptrace_in;
- Ptrace_return ptrace_out;
- int status;
-
- printf_unfiltered ("Killing pid %s.\n", local_hex_string ((unsigned long) PIDGET (inferior_ptid)));
-
- memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
- memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
- ptrace_in.pid = PIDGET (inferior_ptid);
-
- status = net_ptrace_clnt_call (PTRACE_KILL, &ptrace_in, &ptrace_out);
- if (status == -1)
- warning (rpcerr);
- else if (ptrace_out.status == -1)
- {
- errno = ptrace_out.errno_num;
- perror_with_name ("Killing VxWorks process");
- }
-
- /* If it gives good status, the process is *gone*, no events remain.
- If the kill failed, assume the process is gone anyhow. */
- inferior_ptid = null_ptid;
- pop_target (); /* go back to non-executing VxWorks connection */
-}
-
-/* Clean up from the VxWorks process target as it goes away. */
-
-static void
-vx_proc_close (int quitting)
-{
- inferior_ptid = null_ptid; /* No longer have a process. */
- if (vx_running)
- xfree (vx_running);
- vx_running = 0;
-}
-
-/* Make an RPC call to the VxWorks target.
- Returns RPC status. */
-
-static enum clnt_stat
-net_clnt_call (enum ptracereq procNum, xdrproc_t inProc, char *in,
- xdrproc_t outProc, char *out)
-{
- enum clnt_stat status;
-
- status = clnt_call (pClient, procNum, inProc, in, outProc, out, rpcTimeout);
-
- if (status != RPC_SUCCESS)
- clnt_perrno (status);
-
- return status;
-}
-
-/* Clean up before losing control. */
-
-static void
-vx_close (int quitting)
-{
- if (pClient)
- clnt_destroy (pClient); /* The net connection */
- pClient = 0;
-
- if (vx_host)
- xfree (vx_host); /* The hostname */
- vx_host = 0;
-}
-
-/* A vxprocess target should be started via "run" not "target". */
-/*ARGSUSED */
-static void
-vx_proc_open (char *name, int from_tty)
-{
- error ("Use the \"run\" command to start a VxWorks process.");
-}
-
-static void
-init_vx_ops (void)
-{
- vx_ops.to_shortname = "vxworks";
- vx_ops.to_longname = "VxWorks target memory via RPC over TCP/IP";
- vx_ops.to_doc = "Use VxWorks target memory. \n\
-Specify the name of the machine to connect to.";
- vx_ops.to_open = vx_open;
- vx_ops.to_close = vx_close;
- vx_ops.to_attach = vx_attach;
- vx_ops.to_xfer_memory = vx_xfer_memory;
- vx_ops.to_files_info = vx_files_info;
- vx_ops.to_load = vx_load_command;
- vx_ops.to_lookup_symbol = vx_lookup_symbol;
- vx_ops.to_create_inferior = vx_create_inferior;
- vx_ops.to_stratum = core_stratum;
- vx_ops.to_has_all_memory = 1;
- vx_ops.to_has_memory = 1;
- vx_ops.to_magic = OPS_MAGIC; /* Always the last thing */
-};
-
-static void
-init_vx_run_ops (void)
-{
- vx_run_ops.to_shortname = "vxprocess";
- vx_run_ops.to_longname = "VxWorks process";
- vx_run_ops.to_doc = "VxWorks process; started by the \"run\" command.";
- vx_run_ops.to_open = vx_proc_open;
- vx_run_ops.to_close = vx_proc_close;
- vx_run_ops.to_detach = vx_detach;
- vx_run_ops.to_resume = vx_resume;
- vx_run_ops.to_wait = vx_wait;
- vx_run_ops.to_fetch_registers = vx_read_register;
- vx_run_ops.to_store_registers = vx_write_register;
- vx_run_ops.to_prepare_to_store = vx_prepare_to_store;
- vx_run_ops.to_xfer_memory = vx_xfer_memory;
- vx_run_ops.to_files_info = vx_run_files_info;
- vx_run_ops.to_insert_breakpoint = vx_insert_breakpoint;
- vx_run_ops.to_remove_breakpoint = vx_remove_breakpoint;
- vx_run_ops.to_kill = vx_kill;
- vx_run_ops.to_load = vx_load_command;
- vx_run_ops.to_lookup_symbol = vx_lookup_symbol;
- vx_run_ops.to_mourn_inferior = vx_mourn_inferior;
- vx_run_ops.to_stratum = process_stratum;
- vx_run_ops.to_has_memory = 1;
- vx_run_ops.to_has_stack = 1;
- vx_run_ops.to_has_registers = 1;
- vx_run_ops.to_has_execution = 1;
- vx_run_ops.to_magic = OPS_MAGIC;
-}
-
-void
-_initialize_vx (void)
-{
- init_vx_ops ();
- add_target (&vx_ops);
- init_vx_run_ops ();
- add_target (&vx_run_ops);
-
- add_show_from_set
- (add_set_cmd ("vxworks-timeout", class_support, var_uinteger,
- (char *) &rpcTimeout.tv_sec,
- "Set seconds to wait for rpc calls to return.\n\
-Set the number of seconds to wait for rpc calls to return.", &setlist),
- &showlist);
-}
diff --git a/contrib/gdb/gdb/remote-vx29k.c b/contrib/gdb/gdb/remote-vx29k.c
deleted file mode 100644
index 798cd0883968..000000000000
--- a/contrib/gdb/gdb/remote-vx29k.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/* Am29k-dependent portions of the RPC protocol
-
- Contributed by Wind River Systems.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include "defs.h"
-
-#include "vx-share/regPacket.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "command.h"
-#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
-#include "regcache.h"
-
-#include "gdb_string.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#ifdef _AIX /* IBM claims "void *malloc()" not char * */
-#define malloc bogon_malloc
-#endif
-
-#include <rpc/rpc.h>
-#include <sys/time.h> /* UTek's <rpc/rpc.h> doesn't #incl this */
-#include <netdb.h>
-#include "vx-share/ptrace.h"
-#include "vx-share/xdr_ptrace.h"
-#include "vx-share/xdr_ld.h"
-#include "vx-share/xdr_rdb.h"
-#include "vx-share/dbgRpcLib.h"
-
-/* get rid of value.h if possible */
-#include <value.h>
-#include <symtab.h>
-
-/* Flag set if target has fpu */
-
-extern int target_has_fp;
-
-/* Generic register read/write routines in remote-vx.c. */
-
-extern void net_read_registers ();
-extern void net_write_registers ();
-
-/* Read a register or registers from the VxWorks target.
- REGNO is the register to read, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-void
-vx_read_register (int regno)
-{
- char am29k_greg_packet[AM29K_GREG_PLEN];
- char am29k_fpreg_packet[AM29K_FPREG_PLEN];
-
- /* Get general-purpose registers. When copying values into
- registers [], don't assume that a location in registers []
- is properly aligned for the target data type. */
-
- net_read_registers (am29k_greg_packet, AM29K_GREG_PLEN, PTRACE_GETREGS);
-
- /* Now copy the register values into registers[].
- Note that this code depends on the ordering of the REGNUMs
- as defined in "tm-29k.h". */
-
- bcopy (&am29k_greg_packet[AM29K_R_GR96],
- &registers[REGISTER_BYTE (GR96_REGNUM)], 160 * AM29K_GREG_SIZE);
- bcopy (&am29k_greg_packet[AM29K_R_VAB],
- &registers[REGISTER_BYTE (VAB_REGNUM)], 15 * AM29K_GREG_SIZE);
- registers[REGISTER_BYTE (INTE_REGNUM)] = am29k_greg_packet[AM29K_R_INTE];
- bcopy (&am29k_greg_packet[AM29K_R_RSP],
- &registers[REGISTER_BYTE (GR1_REGNUM)], 5 * AM29K_GREG_SIZE);
-
- /* PAD For now, don't care about exop register */
-
- memset (&registers[REGISTER_BYTE (EXO_REGNUM)], '\0', AM29K_GREG_SIZE);
-
- /* If the target has floating point registers, fetch them.
- Otherwise, zero the floating point register values in
- registers[] for good measure, even though we might not
- need to. */
-
- if (target_has_fp)
- {
- net_read_registers (am29k_fpreg_packet, AM29K_FPREG_PLEN,
- PTRACE_GETFPREGS);
- registers[REGISTER_BYTE (FPE_REGNUM)] = am29k_fpreg_packet[AM29K_R_FPE];
- registers[REGISTER_BYTE (FPS_REGNUM)] = am29k_fpreg_packet[AM29K_R_FPS];
-
- /* PAD For now, don't care about registers (?) AI0 to q */
-
- memset (&registers[REGISTER_BYTE (161)], '\0', 21 * AM29K_FPREG_SIZE);
- }
- else
- {
- memset (&registers[REGISTER_BYTE (FPE_REGNUM)], '\0', AM29K_FPREG_SIZE);
- memset (&registers[REGISTER_BYTE (FPS_REGNUM)], '\0', AM29K_FPREG_SIZE);
-
- /* PAD For now, don't care about registers (?) AI0 to q */
-
- memset (&registers[REGISTER_BYTE (161)], '\0', 21 * AM29K_FPREG_SIZE);
- }
-
- /* Mark the register cache valid. */
-
- registers_fetched ();
-}
-
-/* Store a register or registers into the VxWorks target.
- REGNO is the register to store, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-void
-vx_write_register (int regno)
-{
- char am29k_greg_packet[AM29K_GREG_PLEN];
- char am29k_fpreg_packet[AM29K_FPREG_PLEN];
-
- /* Store general purpose registers. When copying values from
- registers [], don't assume that a location in registers []
- is properly aligned for the target data type. */
-
- bcopy (&registers[REGISTER_BYTE (GR96_REGNUM)],
- &am29k_greg_packet[AM29K_R_GR96], 160 * AM29K_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (VAB_REGNUM)],
- &am29k_greg_packet[AM29K_R_VAB], 15 * AM29K_GREG_SIZE);
- am29k_greg_packet[AM29K_R_INTE] = registers[REGISTER_BYTE (INTE_REGNUM)];
- bcopy (&registers[REGISTER_BYTE (GR1_REGNUM)],
- &am29k_greg_packet[AM29K_R_RSP], 5 * AM29K_GREG_SIZE);
-
- net_write_registers (am29k_greg_packet, AM29K_GREG_PLEN, PTRACE_SETREGS);
-
- /* Store floating point registers if the target has them. */
-
- if (target_has_fp)
- {
- am29k_fpreg_packet[AM29K_R_FPE] = registers[REGISTER_BYTE (FPE_REGNUM)];
- am29k_fpreg_packet[AM29K_R_FPS] = registers[REGISTER_BYTE (FPS_REGNUM)];
-
- net_write_registers (am29k_fpreg_packet, AM29K_FPREG_PLEN,
- PTRACE_SETFPREGS);
- }
-}
-
-/* VxWorks zeroes fp when the task is initialized; we use this
- to terminate the frame chain. Chain means here the nominal address of
- a frame, that is, the return address (lr0) address in the stack. To
- obtain the frame pointer (lr1) contents, we must add 4 bytes.
- Note : may be we should modify init_frame_info() to get the frame pointer
- and store it into the frame_info struct rather than reading its
- contents when FRAME_CHAIN_VALID is invoked. THISFRAME is unused. */
-
-int
-vx29k_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
-{
- int fp_contents;
-
- read_memory ((CORE_ADDR) (chain + 4), (char *) &fp_contents, 4);
- return (fp_contents != 0);
-}
diff --git a/contrib/gdb/gdb/remote-vx68.c b/contrib/gdb/gdb/remote-vx68.c
deleted file mode 100644
index 2ebaa633f770..000000000000
--- a/contrib/gdb/gdb/remote-vx68.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/* 68k-dependent portions of the RPC protocol
- used with a VxWorks target
-
- Contributed by Wind River Systems.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include "defs.h"
-
-#include "vx-share/regPacket.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "command.h"
-#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
-#include "regcache.h"
-
-#include "gdb_string.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#ifdef _AIX /* IBM claims "void *malloc()" not char * */
-#define malloc bogon_malloc
-#endif
-
-#include <rpc/rpc.h>
-
-#ifdef _AIX
-#undef malloc
-#endif
-
-#include <sys/time.h> /* UTek's <rpc/rpc.h> doesn't #incl this */
-#include <netdb.h>
-#include "vx-share/ptrace.h"
-#include "vx-share/xdr_ptrace.h"
-#include "vx-share/xdr_ld.h"
-#include "vx-share/xdr_rdb.h"
-#include "vx-share/dbgRpcLib.h"
-
-/* get rid of value.h if possible */
-#include <value.h>
-#include <symtab.h>
-
-/* Flag set if target has fpu */
-
-extern int target_has_fp;
-
-/* Generic register read/write routines in remote-vx.c. */
-
-extern void net_read_registers ();
-extern void net_write_registers ();
-
-/* Read a register or registers from the VxWorks target.
- REGNO is the register to read, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-void
-vx_read_register (int regno)
-{
- char mc68k_greg_packet[MC68K_GREG_PLEN];
- char mc68k_fpreg_packet[MC68K_FPREG_PLEN];
-
- /* Get general-purpose registers. */
-
- net_read_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_GETREGS);
-
- bcopy (&mc68k_greg_packet[MC68K_R_D0], registers, 16 * MC68K_GREG_SIZE);
- bcopy (&mc68k_greg_packet[MC68K_R_SR], &registers[REGISTER_BYTE (PS_REGNUM)],
- MC68K_GREG_SIZE);
- bcopy (&mc68k_greg_packet[MC68K_R_PC], &registers[REGISTER_BYTE (PC_REGNUM)],
- MC68K_GREG_SIZE);
-
- /* Get floating-point registers, if the target system has them.
- Otherwise, zero them. */
-
- if (target_has_fp)
- {
- net_read_registers (mc68k_fpreg_packet, MC68K_FPREG_PLEN,
- PTRACE_GETFPREGS);
-
- bcopy (&mc68k_fpreg_packet[MC68K_R_FP0],
- &registers[REGISTER_BYTE (FP0_REGNUM)],
- MC68K_FPREG_SIZE * 8);
- bcopy (&mc68k_fpreg_packet[MC68K_R_FPCR],
- &registers[REGISTER_BYTE (FPC_REGNUM)],
- MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
- }
- else
- {
- bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
- MC68K_FPREG_SIZE * 8);
- bzero (&registers[REGISTER_BYTE (FPC_REGNUM)],
- MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
- }
-
- /* Mark the register cache valid. */
-
- registers_fetched ();
-}
-
-/* Store a register or registers into the VxWorks target.
- REGNO is the register to store, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-void
-vx_write_register (int regno)
-{
- char mc68k_greg_packet[MC68K_GREG_PLEN];
- char mc68k_fpreg_packet[MC68K_FPREG_PLEN];
-
- /* Store general-purpose registers. */
-
- bcopy (registers, &mc68k_greg_packet[MC68K_R_D0], 16 * MC68K_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (PS_REGNUM)],
- &mc68k_greg_packet[MC68K_R_SR], MC68K_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (PC_REGNUM)],
- &mc68k_greg_packet[MC68K_R_PC], MC68K_GREG_SIZE);
-
- net_write_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_SETREGS);
-
- /* Store floating point registers if the target has them. */
-
- if (target_has_fp)
- {
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
- &mc68k_fpreg_packet[MC68K_R_FP0],
- MC68K_FPREG_SIZE * 8);
- bcopy (&registers[REGISTER_BYTE (FPC_REGNUM)],
- &mc68k_fpreg_packet[MC68K_R_FPCR],
- MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
-
- net_write_registers (mc68k_fpreg_packet, MC68K_FPREG_PLEN,
- PTRACE_SETFPREGS);
- }
-}
diff --git a/contrib/gdb/gdb/remote-vx960.c b/contrib/gdb/gdb/remote-vx960.c
deleted file mode 100644
index 08568bc4ca67..000000000000
--- a/contrib/gdb/gdb/remote-vx960.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/* i80960-dependent portions of the RPC protocol
- used with a VxWorks target
-
- Contributed by Wind River Systems.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include "defs.h"
-
-#include "vx-share/regPacket.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "command.h"
-#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
-#include "regcache.h"
-
-#include "gdb_string.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#ifdef _AIX /* IBM claims "void *malloc()" not char * */
-#define malloc bogon_malloc
-#endif
-
-#include <rpc/rpc.h>
-#include <sys/time.h> /* UTek's <rpc/rpc.h> doesn't #incl this */
-#include <netdb.h>
-#include "vx-share/ptrace.h"
-#include "vx-share/xdr_ptrace.h"
-#include "vx-share/xdr_ld.h"
-#include "vx-share/xdr_rdb.h"
-#include "vx-share/dbgRpcLib.h"
-
-/* get rid of value.h if possible */
-#include <value.h>
-#include <symtab.h>
-
-/* Flag set if target has fpu */
-
-extern int target_has_fp;
-
-/* 960 floating point format descriptor, from "i960-tdep.c." */
-
-extern struct ext_format ext_format_i960;
-
-/* Generic register read/write routines in remote-vx.c. */
-
-extern void net_read_registers ();
-extern void net_write_registers ();
-
-/* Read a register or registers from the VxWorks target.
- REGNO is the register to read, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-void
-vx_read_register (int regno)
-{
- char i960_greg_packet[I960_GREG_PLEN];
- char i960_fpreg_packet[I960_FPREG_PLEN];
-
- /* Get general-purpose registers. When copying values into
- registers [], don't assume that a location in registers []
- is properly aligned for the target data type. */
-
- net_read_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_GETREGS);
-
- bcopy (&i960_greg_packet[I960_R_R0],
- &registers[REGISTER_BYTE (R0_REGNUM)], 16 * I960_GREG_SIZE);
- bcopy (&i960_greg_packet[I960_R_G0],
- &registers[REGISTER_BYTE (G0_REGNUM)], 16 * I960_GREG_SIZE);
- bcopy (&i960_greg_packet[I960_R_PCW],
- &registers[REGISTER_BYTE (PCW_REGNUM)], sizeof (int));
- bcopy (&i960_greg_packet[I960_R_ACW],
- &registers[REGISTER_BYTE (ACW_REGNUM)], sizeof (int));
- bcopy (&i960_greg_packet[I960_R_TCW],
- &registers[REGISTER_BYTE (TCW_REGNUM)], sizeof (int));
-
- /* If the target has floating point registers, fetch them.
- Otherwise, zero the floating point register values in
- registers[] for good measure, even though we might not
- need to. */
-
- if (target_has_fp)
- {
- net_read_registers (i960_fpreg_packet, I960_FPREG_PLEN,
- PTRACE_GETFPREGS);
- bcopy (&i960_fpreg_packet[I960_R_FP0],
- &registers[REGISTER_BYTE (FP0_REGNUM)],
- REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
- }
- else
- bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
- REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
-
- /* Mark the register cache valid. */
-
- registers_fetched ();
-}
-
-/* Store a register or registers into the VxWorks target.
- REGNO is the register to store, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-void
-vx_write_register (int regno)
-{
- char i960_greg_packet[I960_GREG_PLEN];
- char i960_fpreg_packet[I960_FPREG_PLEN];
-
- /* Store floating-point registers. When copying values from
- registers [], don't assume that a location in registers []
- is properly aligned for the target data type. */
-
- bcopy (&registers[REGISTER_BYTE (R0_REGNUM)],
- &i960_greg_packet[I960_R_R0], 16 * I960_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (G0_REGNUM)],
- &i960_greg_packet[I960_R_G0], 16 * I960_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (PCW_REGNUM)],
- &i960_greg_packet[I960_R_PCW], sizeof (int));
- bcopy (&registers[REGISTER_BYTE (ACW_REGNUM)],
- &i960_greg_packet[I960_R_ACW], sizeof (int));
- bcopy (&registers[REGISTER_BYTE (TCW_REGNUM)],
- &i960_greg_packet[I960_R_TCW], sizeof (int));
-
- net_write_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_SETREGS);
-
- /* Store floating point registers if the target has them. */
-
- if (target_has_fp)
- {
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
- &i960_fpreg_packet[I960_R_FP0],
- REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
-
- net_write_registers (i960_fpreg_packet, I960_FPREG_PLEN,
- PTRACE_SETFPREGS);
- }
-}
diff --git a/contrib/gdb/gdb/remote-vxmips.c b/contrib/gdb/gdb/remote-vxmips.c
deleted file mode 100644
index 8be4a2f9464c..000000000000
--- a/contrib/gdb/gdb/remote-vxmips.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/* MIPS-dependent portions of the RPC protocol
- used with a VxWorks target
-
- Contributed by Wind River Systems.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include "defs.h"
-
-#include "vx-share/regPacket.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "command.h"
-#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
-#include "regcache.h"
-
-#include "gdb_string.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <rpc/rpc.h>
-#include <sys/time.h> /* UTek's <rpc/rpc.h> doesn't #incl this */
-#include <netdb.h>
-#include "vx-share/ptrace.h"
-#include "vx-share/xdr_ptrace.h"
-#include "vx-share/xdr_ld.h"
-#include "vx-share/xdr_rdb.h"
-#include "vx-share/dbgRpcLib.h"
-
-/* get rid of value.h if possible */
-#include <value.h>
-#include <symtab.h>
-
-/* Flag set if target has fpu */
-
-extern int target_has_fp;
-
-/* Generic register read/write routines in remote-vx.c. */
-
-extern void net_read_registers ();
-extern void net_write_registers ();
-
-/* Read a register or registers from the VxWorks target.
- REGNO is the register to read, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-void
-vx_read_register (int regno)
-{
- char mips_greg_packet[MIPS_GREG_PLEN];
- char mips_fpreg_packet[MIPS_FPREG_PLEN];
-
- /* Get general-purpose registers. */
-
- net_read_registers (mips_greg_packet, MIPS_GREG_PLEN, PTRACE_GETREGS);
-
- /* this code copies the registers obtained by RPC
- stored in a structure(s) like this :
-
- Register(s) Offset(s)
- gp 0-31 0x00
- hi 0x80
- lo 0x84
- sr 0x88
- pc 0x8c
-
- into a stucture like this:
-
- 0x00 GP 0-31
- 0x80 SR
- 0x84 LO
- 0x88 HI
- 0x8C BAD --- Not available currently
- 0x90 CAUSE --- Not available currently
- 0x94 PC
- 0x98 FP 0-31
- 0x118 FCSR
- 0x11C FIR --- Not available currently
- 0x120 FP --- Not available currently
-
- structure is 0x124 (292) bytes in length */
-
- /* Copy the general registers. */
-
- bcopy (&mips_greg_packet[MIPS_R_GP0], &registers[0], 32 * MIPS_GREG_SIZE);
-
- /* Copy SR, LO, HI, and PC. */
-
- bcopy (&mips_greg_packet[MIPS_R_SR],
- &registers[REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
- bcopy (&mips_greg_packet[MIPS_R_LO],
- &registers[REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE);
- bcopy (&mips_greg_packet[MIPS_R_HI],
- &registers[REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE);
- bcopy (&mips_greg_packet[MIPS_R_PC],
- &registers[REGISTER_BYTE (PC_REGNUM)], MIPS_GREG_SIZE);
-
- /* If the target has floating point registers, fetch them.
- Otherwise, zero the floating point register values in
- registers[] for good measure, even though we might not
- need to. */
-
- if (target_has_fp)
- {
- net_read_registers (mips_fpreg_packet, MIPS_FPREG_PLEN,
- PTRACE_GETFPREGS);
-
- /* Copy the floating point registers. */
-
- bcopy (&mips_fpreg_packet[MIPS_R_FP0],
- &registers[REGISTER_BYTE (FP0_REGNUM)],
- REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
-
- /* Copy the floating point control/status register (fpcsr). */
-
- bcopy (&mips_fpreg_packet[MIPS_R_FPCSR],
- &registers[REGISTER_BYTE (FCRCS_REGNUM)],
- REGISTER_RAW_SIZE (FCRCS_REGNUM));
- }
- else
- {
- bzero ((char *) &registers[REGISTER_BYTE (FP0_REGNUM)],
- REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
- bzero ((char *) &registers[REGISTER_BYTE (FCRCS_REGNUM)],
- REGISTER_RAW_SIZE (FCRCS_REGNUM));
- }
-
- /* Mark the register cache valid. */
-
- registers_fetched ();
-}
-
-/* Store a register or registers into the VxWorks target.
- REGNO is the register to store, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-vx_write_register (int regno)
-{
- char mips_greg_packet[MIPS_GREG_PLEN];
- char mips_fpreg_packet[MIPS_FPREG_PLEN];
-
- /* Store general registers. */
-
- bcopy (&registers[0], &mips_greg_packet[MIPS_R_GP0], 32 * MIPS_GREG_SIZE);
-
- /* Copy SR, LO, HI, and PC. */
-
- bcopy (&registers[REGISTER_BYTE (PS_REGNUM)],
- &mips_greg_packet[MIPS_R_SR], MIPS_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (LO_REGNUM)],
- &mips_greg_packet[MIPS_R_LO], MIPS_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (HI_REGNUM)],
- &mips_greg_packet[MIPS_R_HI], MIPS_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (PC_REGNUM)],
- &mips_greg_packet[MIPS_R_PC], MIPS_GREG_SIZE);
-
- net_write_registers (mips_greg_packet, MIPS_GREG_PLEN, PTRACE_SETREGS);
-
- /* Store floating point registers if the target has them. */
-
- if (target_has_fp)
- {
- /* Copy the floating point data registers. */
-
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
- &mips_fpreg_packet[MIPS_R_FP0],
- REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
-
- /* Copy the floating point control/status register (fpcsr). */
-
- bcopy (&registers[REGISTER_BYTE (FCRCS_REGNUM)],
- &mips_fpreg_packet[MIPS_R_FPCSR],
- REGISTER_RAW_SIZE (FCRCS_REGNUM));
-
- net_write_registers (mips_fpreg_packet, MIPS_FPREG_PLEN,
- PTRACE_SETFPREGS);
- }
-}
diff --git a/contrib/gdb/gdb/remote-vxsparc.c b/contrib/gdb/gdb/remote-vxsparc.c
deleted file mode 100644
index 014f1d457efd..000000000000
--- a/contrib/gdb/gdb/remote-vxsparc.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/* sparc-dependent portions of the RPC protocol
- used with a VxWorks target
-
- Contributed by Wind River Systems.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include "defs.h"
-
-#include "vx-share/regPacket.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "command.h"
-#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
-#include "regcache.h"
-
-#include "gdb_string.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#ifdef _AIX /* IBM claims "void *malloc()" not char * */
-#define malloc bogon_malloc
-#endif
-
-#include <rpc/rpc.h>
-#include <sys/time.h> /* UTek's <rpc/rpc.h> doesn't #incl this */
-#include <netdb.h>
-#include "vx-share/ptrace.h"
-#include "vx-share/xdr_ptrace.h"
-#include "vx-share/xdr_ld.h"
-#include "vx-share/xdr_rdb.h"
-#include "vx-share/dbgRpcLib.h"
-
-/* get rid of value.h if possible */
-#include <value.h>
-#include <symtab.h>
-
-/* Flag set if target has fpu */
-
-extern int target_has_fp;
-
-/* sparc floating point format descriptor, from "sparc-tdep.c." */
-
-extern struct ext_format ext_format_sparc;
-
-/* Generic register read/write routines in remote-vx.c. */
-
-extern void net_read_registers ();
-extern void net_write_registers ();
-
-/* Read a register or registers from the VxWorks target.
- REGNO is the register to read, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-void
-vx_read_register (int regno)
-{
- char sparc_greg_packet[SPARC_GREG_PLEN];
- char sparc_fpreg_packet[SPARC_FPREG_PLEN];
- CORE_ADDR sp;
-
- /* Get general-purpose registers. When copying values into
- registers [], don't assume that a location in registers []
- is properly aligned for the target data type. */
-
- net_read_registers (sparc_greg_packet, SPARC_GREG_PLEN, PTRACE_GETREGS);
-
- /* Now copy the register values into registers[].
- Note that this code depends on the ordering of the REGNUMs
- as defined in "tm-sparc.h". */
-
- bcopy (&sparc_greg_packet[SPARC_R_G0],
- &registers[REGISTER_BYTE (G0_REGNUM)], 32 * SPARC_GREG_SIZE);
- bcopy (&sparc_greg_packet[SPARC_R_Y],
- &registers[REGISTER_BYTE (Y_REGNUM)], 6 * SPARC_GREG_SIZE);
-
- /* Now write the local and in registers to the register window
- spill area in the frame. VxWorks does not do this for the
- active frame automatically; it greatly simplifies debugging
- (FRAME_FIND_SAVED_REGS, in particular, depends on this). */
-
- sp = extract_address (&registers[REGISTER_BYTE (SP_REGNUM)],
- REGISTER_RAW_SIZE (CORE_ADDR));
- write_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
- 16 * REGISTER_RAW_SIZE (L0_REGNUM));
-
- /* If the target has floating point registers, fetch them.
- Otherwise, zero the floating point register values in
- registers[] for good measure, even though we might not
- need to. */
-
- if (target_has_fp)
- {
- net_read_registers (sparc_fpreg_packet, SPARC_FPREG_PLEN,
- PTRACE_GETFPREGS);
- bcopy (&sparc_fpreg_packet[SPARC_R_FP0],
- &registers[REGISTER_BYTE (FP0_REGNUM)], 32 * SPARC_FPREG_SIZE);
- bcopy (&sparc_fpreg_packet[SPARC_R_FSR],
- &registers[REGISTER_BYTE (FPS_REGNUM)], 1 * SPARC_FPREG_SIZE);
- }
- else
- {
- bzero (&registers[REGISTER_BYTE (FP0_REGNUM)], 32 * SPARC_FPREG_SIZE);
- bzero (&registers[REGISTER_BYTE (FPS_REGNUM)], 1 * SPARC_FPREG_SIZE);
- }
-
- /* Mark the register cache valid. */
-
- registers_fetched ();
-}
-
-/* Store a register or registers into the VxWorks target.
- REGNO is the register to store, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-void
-vx_write_register (int regno)
-{
- char sparc_greg_packet[SPARC_GREG_PLEN];
- char sparc_fpreg_packet[SPARC_FPREG_PLEN];
- int in_gp_regs;
- int in_fp_regs;
- CORE_ADDR sp;
-
- /* Store general purpose registers. When copying values from
- registers [], don't assume that a location in registers []
- is properly aligned for the target data type. */
-
- in_gp_regs = 1;
- in_fp_regs = 1;
- if (regno >= 0)
- {
- if ((G0_REGNUM <= regno && regno <= I7_REGNUM)
- || (Y_REGNUM <= regno && regno <= NPC_REGNUM))
- in_fp_regs = 0;
- else
- in_gp_regs = 0;
- }
- if (in_gp_regs)
- {
- bcopy (&registers[REGISTER_BYTE (G0_REGNUM)],
- &sparc_greg_packet[SPARC_R_G0], 32 * SPARC_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (Y_REGNUM)],
- &sparc_greg_packet[SPARC_R_Y], 6 * SPARC_GREG_SIZE);
-
- net_write_registers (sparc_greg_packet, SPARC_GREG_PLEN, PTRACE_SETREGS);
-
- /* If this is a local or in register, or we're storing all
- registers, update the register window spill area. */
-
- if (regno < 0 || (L0_REGNUM <= regno && regno <= I7_REGNUM))
- {
- sp = extract_address (&registers[REGISTER_BYTE (SP_REGNUM)],
- REGISTER_RAW_SIZE (CORE_ADDR));
- write_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
- 16 * REGISTER_RAW_SIZE (L0_REGNUM));
- }
- }
-
- /* Store floating point registers if the target has them. */
-
- if (in_fp_regs && target_has_fp)
- {
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
- &sparc_fpreg_packet[SPARC_R_FP0], 32 * SPARC_FPREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (FPS_REGNUM)],
- &sparc_fpreg_packet[SPARC_R_FSR], 1 * SPARC_FPREG_SIZE);
-
- net_write_registers (sparc_fpreg_packet, SPARC_FPREG_PLEN,
- PTRACE_SETFPREGS);
- }
-}
diff --git a/contrib/gdb/gdb/ser-e7kpc.c b/contrib/gdb/gdb/ser-e7kpc.c
deleted file mode 100644
index 49b2c89c3246..000000000000
--- a/contrib/gdb/gdb/ser-e7kpc.c
+++ /dev/null
@@ -1,438 +0,0 @@
-/* Remote serial interface using Hitachi E7000 PC ISA card in a PC
- Copyright 1994, 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. */
-
-#if defined __GO32__ || defined _WIN32
-#include "defs.h"
-#include "serial.h"
-#include "gdb_string.h"
-
-#ifdef _WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif
-
-#ifdef __GO32__
-#include <sys/dos.h>
-#endif
-
-static int e7000pc_open (struct serial *scb, const char *name);
-static void e7000pc_raw (struct serial *scb);
-static int e7000pc_readchar (struct serial *scb, int timeout);
-static int e7000pc_setbaudrate (struct serial *scb, int rate);
-static int e7000pc_write (struct serial *scb, const char *str, int len);
-static void e7000pc_close (struct serial *scb);
-static serial_ttystate e7000pc_get_tty_state (struct serial *scb);
-static int e7000pc_set_tty_state (struct serial *scb, serial_ttystate state);
-
-#define OFF_DPD 0x0000
-#define OFF_DDP 0x1000
-#define OFF_CPD 0x2000
-#define OFF_CDP 0x2400
-#define OFF_FA 0x3000
-#define OFF_FB 0x3002
-#define OFF_FC 0x3004
-#define OFF_IRQTOD 0x3008
-#define OFF_IRQTOP 0x300a
-#define OFF_READY 0x300c
-#define OFF_PON 0x300e
-
-#define IDLE 0x0000
-#define CMD_CI 0x4349
-#define CMD_CO 0x434f
-#define CMD_LO 0x4c4f
-#define CMD_LS 0x4c53
-#define CMD_SV 0x5356
-#define CMD_SS 0x5353
-#define CMD_OK 0x4f4b
-#define CMD_ER 0x4552
-#define CMD_NF 0x4e46
-#define CMD_AB 0x4142
-#define CMD_ED 0x4544
-#define CMD_CE 0x4345
-
-static unsigned long fa;
-static unsigned long irqtod;
-static unsigned long ready;
-static unsigned long fb;
-static unsigned long cpd;
-static unsigned long cdp;
-static unsigned long ready;
-static unsigned long pon;
-static unsigned long irqtop;
-static unsigned long board_at;
-
-#ifdef __GO32__
-
-#define SET_BYTE(x,y) { char _buf = y;dosmemput(&_buf,1, x);}
-#define SET_WORD(x,y) { short _buf = y;dosmemput(&_buf,2, x);}
-#define GET_BYTE(x) ( dosmemget(x,1,&bb), bb)
-#define GET_WORD(x) ( dosmemget(x,2,&sb), sb)
-static unsigned char bb;
-static unsigned short sb;
-
-#else /* win32 */
-
-#define SET_BYTE(x,y) *(volatile unsigned char *)(x) = (y)
-#define SET_WORD(x,y) *(volatile unsigned short *)(x) = (y)
-#define GET_BYTE(x) (*(volatile unsigned char *)(x))
-#define GET_WORD(x) (*(volatile unsigned short *)(x))
-#define dosmemget(FROM, LEN, TO) memcpy ((void *)(TO), (void *)(FROM), (LEN))
-#define dosmemput(FROM, LEN, TO) memcpy ((void *)(TO), (void *)(FROM), (LEN))
-#endif
-
-static struct sw
- {
- int sw;
- int addr;
- }
-sigs[] =
-{
- {
- 0x14, 0xd0000
- }
- ,
- {
- 0x15, 0xd4000
- }
- ,
- {
- 0x16, 0xd8000
- }
- ,
- {
- 0x17, 0xdc000
- }
- ,
- 0
-};
-
-#define get_ds_base() 0
-
-static int
-e7000pc_init (void)
-{
- int try;
- unsigned long dsbase;
-
- dsbase = get_ds_base ();
-
- /* Look around in memory for the board's signature */
-
- for (try = 0; sigs[try].sw; try++)
- {
- int val;
- board_at = sigs[try].addr - dsbase;
- fa = board_at + OFF_FA;
- fb = board_at + OFF_FB;
- cpd = board_at + OFF_CPD;
- cdp = board_at + OFF_CDP;
- ready = board_at + OFF_READY;
- pon = board_at + OFF_PON;
- irqtop = board_at + OFF_IRQTOP;
- irqtod = board_at + OFF_IRQTOD;
-
- val = GET_WORD (ready);
-
- if (val == (0xaaa0 | sigs[try].sw))
- {
- if (GET_WORD (pon) & 0xf)
- {
- SET_WORD (fa, 0);
- SET_WORD (fb, 0);
-
- SET_WORD (irqtop, 1); /* Disable interrupts from e7000 */
- SET_WORD (ready, 1);
- printf_filtered ("\nConnected to the E7000PC at address 0x%x\n",
- sigs[try].addr);
- return 1;
- }
- error ("The E7000 PC board is working, but the E7000 is turned off.\n");
- return 0;
- }
- }
-
- error ("GDB cannot connect to the E7000 PC board, check that it is installed\n\
-and that the switch settings are correct. Some other DOS programs can \n\
-stop the board from working. Try starting from a very minimal boot, \n\
-perhaps you need to disable EMM386 over the region where the board has\n\
-its I/O space, remove other unneeded cards, etc etc\n");
- return 0;
-
-}
-
-static int pbuf_size;
-static int pbuf_index;
-
-/* Return next byte from cdp. If no more, then return -1. */
-
-static int
-e7000_get (void)
-{
- static char pbuf[1000];
- char tmp[1000];
- int x;
-
- if (pbuf_index < pbuf_size)
- {
- x = pbuf[pbuf_index++];
- }
- else if ((GET_WORD (fb) & 1))
- {
- int i;
- pbuf_size = GET_WORD (cdp + 2);
-
- dosmemget (cdp + 8, pbuf_size + 1, tmp);
-
- /* Tell the E7000 we've eaten */
- SET_WORD (fb, 0);
- /* Swap it around */
- for (i = 0; i < pbuf_size; i++)
- {
- pbuf[i] = tmp[i ^ 1];
- }
- pbuf_index = 0;
- x = pbuf[pbuf_index++];
- }
- else
- {
- x = -1;
- }
- return x;
-}
-
-/* Works just like read(), except that it takes a TIMEOUT in seconds. Note
- that TIMEOUT == 0 is a poll, and TIMEOUT == -1 means wait forever. */
-
-static int
-dosasync_read (int fd, char *buf, int len, int timeout)
-{
- long now;
- long then;
- int i = 0;
-
- /* Then look for some more if we're still hungry */
- time (&now);
- then = now + timeout;
- while (i < len)
- {
- int ch = e7000_get ();
-
- /* While there's room in the buffer, and we've already
- read the stuff in, suck it over */
- if (ch != -1)
- {
- buf[i++] = ch;
- while (i < len && pbuf_index < pbuf_size)
- {
- ch = e7000_get ();
- if (ch == -1)
- break;
- buf[i++] = ch;
- }
- }
-
- time (&now);
-
- if (timeout == 0)
- return i;
- if (now >= then && timeout > 0)
- {
- return i;
- }
- }
- return len;
-}
-
-
-static int
-dosasync_write (int fd, const char *buf, int len)
-{
- int i;
- char dummy[1000];
-
- /* Construct copy locally */
- ((short *) dummy)[0] = CMD_CI;
- ((short *) dummy)[1] = len;
- ((short *) dummy)[2] = 0;
- ((short *) dummy)[3] = 0;
- for (i = 0; i < len; i++)
- {
- dummy[(8 + i) ^ 1] = buf[i];
- }
-
- /* Wait for the card to get ready */
- while (GET_WORD (fa) & 1);
-
- /* Blast onto the ISA card */
- dosmemput (dummy, 8 + len + 1, cpd);
-
- SET_WORD (fa, 1);
- SET_WORD (irqtod, 1); /* Interrupt the E7000 */
-
- return len;
-}
-
-static int
-e7000pc_open (struct serial *scb, const char *name)
-{
- if (strncasecmp (name, "pc", 2) != 0)
- {
- errno = ENOENT;
- return -1;
- }
-
- scb->fd = e7000pc_init ();
-
- if (!scb->fd)
- return -1;
-
- return 0;
-}
-
-static int
-e7000pc_noop (struct serial *scb)
-{
- return 0;
-}
-
-static void
-e7000pc_raw (struct serial *scb)
-{
- /* Always in raw mode */
-}
-
-static int
-e7000pc_readchar (struct serial *scb, int timeout)
-{
- char buf;
-
-top:
-
- if (dosasync_read (scb->fd, &buf, 1, timeout))
- {
- if (buf == 0)
- goto top;
- return buf;
- }
- else
- return SERIAL_TIMEOUT;
-}
-
-struct e7000pc_ttystate
-{
- int dummy;
-};
-
-/* e7000pc_{get set}_tty_state() are both dummys to fill out the function
- vector. Someday, they may do something real... */
-
-static serial_ttystate
-e7000pc_get_tty_state (struct serial *scb)
-{
- struct e7000pc_ttystate *state;
-
- state = (struct e7000pc_ttystate *) xmalloc (sizeof *state);
-
- return (serial_ttystate) state;
-}
-
-static int
-e7000pc_set_tty_state (struct serial *scb, serial_ttystate ttystate)
-{
- return 0;
-}
-
-static int
-e7000pc_noflush_set_tty_state (struct serial *scb,
- serial_ttystate new_ttystate,
- serial_ttystate old_ttystate)
-{
- return 0;
-}
-
-static void
-e7000pc_print_tty_state (struct serial *scb,
- serial_ttystate ttystate,
- struct ui_file *stream)
-{
- /* Nothing to print. */
- return;
-}
-
-static int
-e7000pc_setbaudrate (struct serial *scb, int rate)
-{
- return 0;
-}
-
-static int
-e7000pc_setstopbits (struct serial *scb, int rate)
-{
- return 0;
-}
-
-static int
-e7000pc_write (struct serial *scb, const char *str, int len)
-{
- dosasync_write (scb->fd, str, len);
-
- return 0;
-}
-
-static void
-e7000pc_close (struct serial *scb)
-{
-}
-
-static struct serial_ops e7000pc_ops =
-{
- "pc",
- 0,
- e7000pc_open,
- e7000pc_close,
- e7000pc_readchar,
- e7000pc_write,
- e7000pc_noop, /* flush output */
- e7000pc_noop, /* flush input */
- e7000pc_noop, /* send break -- currently used only for nindy */
- e7000pc_raw,
- e7000pc_get_tty_state,
- e7000pc_set_tty_state,
- e7000pc_print_tty_state,
- e7000pc_noflush_set_tty_state,
- e7000pc_setbaudrate,
- e7000pc_setstopbits,
- e7000pc_noop, /* wait for output to drain */
-};
-
-void
-_initialize_ser_e7000pc (void)
-{
- serial_add_interface (&e7000pc_ops);
-}
-#else
-
-void
-_initialize_ser_e7000pc (void)
-{
-
-}
-#endif
diff --git a/contrib/gdb/gdb/ser-go32.c b/contrib/gdb/gdb/ser-go32.c
deleted file mode 100644
index 0642b5aa4bda..000000000000
--- a/contrib/gdb/gdb/ser-go32.c
+++ /dev/null
@@ -1,964 +0,0 @@
-/* Remote serial interface for local (hardwired) serial ports for GO32.
- Copyright 1992, 1993, 2000, 2001 Free Software Foundation, Inc.
-
- Contributed by Nigel Stephens, Algorithmics Ltd. (nigel@algor.co.uk).
-
- This version uses DPMI interrupts to handle buffered i/o
- without the separate "asynctsr" program.
-
- 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 "gdbcmd.h"
-#include "serial.h"
-#include "gdb_string.h"
-
-
-/*
- * NS16550 UART registers
- */
-
-#define COM1ADDR 0x3f8
-#define COM2ADDR 0x2f8
-#define COM3ADDR 0x3e8
-#define COM4ADDR 0x3e0
-
-#define com_data 0 /* data register (R/W) */
-#define com_dlbl 0 /* divisor latch low (W) */
-#define com_ier 1 /* interrupt enable (W) */
-#define com_dlbh 1 /* divisor latch high (W) */
-#define com_iir 2 /* interrupt identification (R) */
-#define com_fifo 2 /* FIFO control (W) */
-#define com_lctl 3 /* line control register (R/W) */
-#define com_cfcr 3 /* line control register (R/W) */
-#define com_mcr 4 /* modem control register (R/W) */
-#define com_lsr 5 /* line status register (R/W) */
-#define com_msr 6 /* modem status register (R/W) */
-
-/*
- * Constants for computing 16 bit baud rate divisor (lower byte
- * in com_dlbl, upper in com_dlbh) from 1.8432MHz crystal. Divisor is
- * 1.8432 MHz / (16 * X) for X bps. If the baud rate can't be set
- * to within +- (desired_rate*SPEED_TOLERANCE/1000) bps, we fail.
- */
-#define COMTICK (1843200/16)
-#define SPEED_TOLERANCE 30 /* thousandths; real == desired +- 3.0% */
-
-/* interrupt enable register */
-#define IER_ERXRDY 0x1 /* int on rx ready */
-#define IER_ETXRDY 0x2 /* int on tx ready */
-#define IER_ERLS 0x4 /* int on line status change */
-#define IER_EMSC 0x8 /* int on modem status change */
-
-/* interrupt identification register */
-#define IIR_FIFO_MASK 0xc0 /* set if FIFOs are enabled */
-#define IIR_IMASK 0xf /* interrupt cause mask */
-#define IIR_NOPEND 0x1 /* nothing pending */
-#define IIR_RLS 0x6 /* receive line status */
-#define IIR_RXRDY 0x4 /* receive ready */
-#define IIR_RXTOUT 0xc /* receive timeout */
-#define IIR_TXRDY 0x2 /* transmit ready */
-#define IIR_MLSC 0x0 /* modem status */
-
-
-/* fifo control register */
-#define FIFO_ENABLE 0x01 /* enable fifo */
-#define FIFO_RCV_RST 0x02 /* reset receive fifo */
-#define FIFO_XMT_RST 0x04 /* reset transmit fifo */
-#define FIFO_DMA_MODE 0x08 /* enable dma mode */
-#define FIFO_TRIGGER_1 0x00 /* trigger at 1 char */
-#define FIFO_TRIGGER_4 0x40 /* trigger at 4 chars */
-#define FIFO_TRIGGER_8 0x80 /* trigger at 8 chars */
-#define FIFO_TRIGGER_14 0xc0 /* trigger at 14 chars */
-
-/* character format control register */
-#define CFCR_DLAB 0x80 /* divisor latch */
-#define CFCR_SBREAK 0x40 /* send break */
-#define CFCR_PZERO 0x30 /* zero parity */
-#define CFCR_PONE 0x20 /* one parity */
-#define CFCR_PEVEN 0x10 /* even parity */
-#define CFCR_PODD 0x00 /* odd parity */
-#define CFCR_PENAB 0x08 /* parity enable */
-#define CFCR_STOPB 0x04 /* 2 stop bits */
-#define CFCR_8BITS 0x03 /* 8 data bits */
-#define CFCR_7BITS 0x02 /* 7 data bits */
-#define CFCR_6BITS 0x01 /* 6 data bits */
-#define CFCR_5BITS 0x00 /* 5 data bits */
-
-/* modem control register */
-#define MCR_LOOPBACK 0x10 /* loopback */
-#define MCR_IENABLE 0x08 /* output 2 = int enable */
-#define MCR_DRS 0x04 /* output 1 = xxx */
-#define MCR_RTS 0x02 /* enable RTS */
-#define MCR_DTR 0x01 /* enable DTR */
-
-/* line status register */
-#define LSR_RCV_FIFO 0x80 /* error in receive fifo */
-#define LSR_TSRE 0x40 /* transmitter empty */
-#define LSR_TXRDY 0x20 /* transmitter ready */
-#define LSR_BI 0x10 /* break detected */
-#define LSR_FE 0x08 /* framing error */
-#define LSR_PE 0x04 /* parity error */
-#define LSR_OE 0x02 /* overrun error */
-#define LSR_RXRDY 0x01 /* receiver ready */
-#define LSR_RCV_MASK 0x1f
-
-/* modem status register */
-#define MSR_DCD 0x80
-#define MSR_RI 0x40
-#define MSR_DSR 0x20
-#define MSR_CTS 0x10
-#define MSR_DDCD 0x08
-#define MSR_TERI 0x04
-#define MSR_DDSR 0x02
-#define MSR_DCTS 0x01
-
-#include <time.h>
-#include <dos.h>
-#include <go32.h>
-#include <dpmi.h>
-typedef unsigned long u_long;
-
-/* 16550 rx fifo trigger point */
-#define FIFO_TRIGGER FIFO_TRIGGER_4
-
-/* input buffer size */
-#define CBSIZE 4096
-
-#define RAWHZ 18
-
-#ifdef DOS_STATS
-#define CNT_RX 16
-#define CNT_TX 17
-#define CNT_STRAY 18
-#define CNT_ORUN 19
-#define NCNT 20
-
-static int intrcnt;
-static int cnts[NCNT];
-static char *cntnames[NCNT] =
-{
- /* h/w interrupt counts. */
- "mlsc", "nopend", "txrdy", "?3",
- "rxrdy", "?5", "rls", "?7",
- "?8", "?9", "?a", "?b",
- "rxtout", "?d", "?e", "?f",
- /* s/w counts. */
- "rxcnt", "txcnt", "stray", "swoflo"
-};
-
-#define COUNT(x) cnts[x]++
-#else
-#define COUNT(x)
-#endif
-
-/* Main interrupt controller port addresses. */
-#define ICU_BASE 0x20
-#define ICU_OCW2 (ICU_BASE + 0)
-#define ICU_MASK (ICU_BASE + 1)
-
-/* Original interrupt controller mask register. */
-unsigned char icu_oldmask;
-
-/* Maximum of 8 interrupts (we don't handle the slave icu yet). */
-#define NINTR 8
-
-static struct intrupt
- {
- char inuse;
- struct dos_ttystate *port;
- _go32_dpmi_seginfo old_rmhandler;
- _go32_dpmi_seginfo old_pmhandler;
- _go32_dpmi_seginfo new_rmhandler;
- _go32_dpmi_seginfo new_pmhandler;
- _go32_dpmi_registers regs;
- }
-intrupts[NINTR];
-
-
-static struct dos_ttystate
- {
- int base;
- int irq;
- int refcnt;
- struct intrupt *intrupt;
- int fifo;
- int baudrate;
- unsigned char cbuf[CBSIZE];
- unsigned int first;
- unsigned int count;
- int txbusy;
- unsigned char old_mcr;
- int ferr;
- int perr;
- int oflo;
- int msr;
- }
-ports[4] =
-{
- {
- COM1ADDR, 4, 0, NULL, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
- }
- ,
- {
- COM2ADDR, 3, 0, NULL, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
- }
- ,
- {
- COM3ADDR, 4, 0, NULL, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
- }
- ,
- {
- COM4ADDR, 3, 0, NULL, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
- }
-};
-
-static int dos_open (struct serial *scb, const char *name);
-static void dos_raw (struct serial *scb);
-static int dos_readchar (struct serial *scb, int timeout);
-static int dos_setbaudrate (struct serial *scb, int rate);
-static int dos_write (struct serial *scb, const char *str, int len);
-static void dos_close (struct serial *scb);
-static serial_ttystate dos_get_tty_state (struct serial *scb);
-static int dos_set_tty_state (struct serial *scb, serial_ttystate state);
-static int dos_baudconv (int rate);
-
-#define inb(p,a) inportb((p)->base + (a))
-#define outb(p,a,v) outportb((p)->base + (a), (v))
-#define disable() asm volatile ("cli");
-#define enable() asm volatile ("sti");
-
-
-static int
-dos_getc (volatile struct dos_ttystate *port)
-{
- int c;
-
- if (port->count == 0)
- return -1;
-
- c = port->cbuf[port->first];
- disable ();
- port->first = (port->first + 1) & (CBSIZE - 1);
- port->count--;
- enable ();
- return c;
-}
-
-
-static int
-dos_putc (int c, struct dos_ttystate *port)
-{
- if (port->count >= CBSIZE - 1)
- return -1;
- port->cbuf[(port->first + port->count) & (CBSIZE - 1)] = c;
- port->count++;
- return 0;
-}
-
-
-
-static void
-dos_comisr (int irq)
-{
- struct dos_ttystate *port;
- unsigned char iir, lsr, c;
-
- disable (); /* Paranoia */
- outportb (ICU_OCW2, 0x20); /* End-Of-Interrupt */
-#ifdef DOS_STATS
- ++intrcnt;
-#endif
-
- port = intrupts[irq].port;
- if (!port)
- {
- COUNT (CNT_STRAY);
- return; /* not open */
- }
-
- while (1)
- {
- iir = inb (port, com_iir) & IIR_IMASK;
- switch (iir)
- {
-
- case IIR_RLS:
- lsr = inb (port, com_lsr);
- goto rx;
-
- case IIR_RXTOUT:
- case IIR_RXRDY:
- lsr = 0;
-
- rx:
- do
- {
- c = inb (port, com_data);
- if (lsr & (LSR_BI | LSR_FE | LSR_PE | LSR_OE))
- {
- if (lsr & (LSR_BI | LSR_FE))
- port->ferr++;
- else if (lsr & LSR_PE)
- port->perr++;
- if (lsr & LSR_OE)
- port->oflo++;
- }
-
- if (dos_putc (c, port) < 0)
- {
- COUNT (CNT_ORUN);
- }
- else
- {
- COUNT (CNT_RX);
- }
- }
- while ((lsr = inb (port, com_lsr)) & LSR_RXRDY);
- break;
-
- case IIR_MLSC:
- /* could be used to flowcontrol Tx */
- port->msr = inb (port, com_msr);
- break;
-
- case IIR_TXRDY:
- port->txbusy = 0;
- break;
-
- case IIR_NOPEND:
- /* no more pending interrupts, all done */
- return;
-
- default:
- /* unexpected interrupt, ignore */
- break;
- }
- COUNT (iir);
- }
-}
-
-#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)
-
-typedef void (*isr_t) (void);
-
-static isr_t isrs[NINTR] =
- {
- ISRNAME (0), ISRNAME (1), ISRNAME (2), ISRNAME (3),
- ISRNAME (4), ISRNAME (5), ISRNAME (6), ISRNAME (7)
- };
-
-
-
-static struct intrupt *
-dos_hookirq (unsigned int irq)
-{
- struct intrupt *intr;
- unsigned int vec;
- isr_t isr;
-
- if (irq >= NINTR)
- return 0;
-
- intr = &intrupts[irq];
- if (intr->inuse)
- return 0;
-
- vec = 0x08 + irq;
- isr = isrs[irq];
-
- /* setup real mode handler */
- _go32_dpmi_get_real_mode_interrupt_vector (vec, &intr->old_rmhandler);
-
- intr->new_rmhandler.pm_selector = _go32_my_cs ();
- intr->new_rmhandler.pm_offset = (u_long) isr;
- if (_go32_dpmi_allocate_real_mode_callback_iret (&intr->new_rmhandler,
- &intr->regs))
- {
- return 0;
- }
-
- if (_go32_dpmi_set_real_mode_interrupt_vector (vec, &intr->new_rmhandler))
- {
- return 0;
- }
-
- /* setup protected mode handler */
- _go32_dpmi_get_protected_mode_interrupt_vector (vec, &intr->old_pmhandler);
-
- intr->new_pmhandler.pm_selector = _go32_my_cs ();
- intr->new_pmhandler.pm_offset = (u_long) isr;
- _go32_dpmi_allocate_iret_wrapper (&intr->new_pmhandler);
-
- if (_go32_dpmi_set_protected_mode_interrupt_vector (vec,
- &intr->new_pmhandler))
- {
- return 0;
- }
-
- /* setup interrupt controller mask */
- disable ();
- outportb (ICU_MASK, inportb (ICU_MASK) & ~(1 << irq));
- enable ();
-
- intr->inuse = 1;
- return intr;
-}
-
-
-static void
-dos_unhookirq (struct intrupt *intr)
-{
- unsigned int irq, vec;
- unsigned char mask;
-
- irq = intr - intrupts;
- vec = 0x08 + irq;
-
- /* restore old interrupt mask bit */
- mask = 1 << irq;
- disable ();
- outportb (ICU_MASK, inportb (ICU_MASK) | (mask & icu_oldmask));
- enable ();
-
- /* remove real mode handler */
- _go32_dpmi_set_real_mode_interrupt_vector (vec, &intr->old_rmhandler);
- _go32_dpmi_free_real_mode_callback (&intr->new_rmhandler);
-
- /* remove protected mode handler */
- _go32_dpmi_set_protected_mode_interrupt_vector (vec, &intr->old_pmhandler);
- _go32_dpmi_free_iret_wrapper (&intr->new_pmhandler);
- intr->inuse = 0;
-}
-
-
-
-static int
-dos_open (struct serial *scb, const char *name)
-{
- struct dos_ttystate *port;
- int fd, i;
-
- if (strncasecmp (name, "/dev/", 5) == 0)
- name += 5;
- else if (strncasecmp (name, "\\dev\\", 5) == 0)
- name += 5;
-
- if (strlen (name) != 4 || strncasecmp (name, "com", 3) != 0)
- {
- errno = ENOENT;
- return -1;
- }
-
- if (name[3] < '1' || name[3] > '4')
- {
- errno = ENOENT;
- return -1;
- }
-
- /* FIXME: this is a Bad Idea (tm)! One should *never* invent file
- handles, since they might be already used by other files/devices.
- The Right Way to do this is to create a real handle by dup()'ing
- some existing one. */
- fd = name[3] - '1';
- port = &ports[fd];
- if (port->refcnt++ > 0)
- {
- /* Device already opened another user. Just point at it. */
- scb->fd = fd;
- return 0;
- }
-
- /* force access to ID reg */
- outb (port, com_cfcr, 0);
- outb (port, com_iir, 0);
- for (i = 0; i < 17; i++)
- {
- if ((inb (port, com_iir) & 0x38) == 0)
- goto ok;
- (void) inb (port, com_data); /* clear recv */
- }
- errno = ENODEV;
- return -1;
-
-ok:
- /* disable all interrupts in chip */
- outb (port, com_ier, 0);
-
- /* tentatively enable 16550 fifo, and see if it responds */
- outb (port, com_fifo,
- FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | FIFO_TRIGGER);
- sleep (1);
- port->fifo = ((inb (port, com_iir) & IIR_FIFO_MASK) == IIR_FIFO_MASK);
-
- /* clear pending status reports. */
- (void) inb (port, com_lsr);
- (void) inb (port, com_msr);
-
- /* enable external interrupt gate (to avoid floating IRQ) */
- outb (port, com_mcr, MCR_IENABLE);
-
- /* hook up interrupt handler and initialise icu */
- port->intrupt = dos_hookirq (port->irq);
- if (!port->intrupt)
- {
- outb (port, com_mcr, 0);
- outb (port, com_fifo, 0);
- errno = ENODEV;
- return -1;
- }
-
- disable ();
-
- /* record port */
- port->intrupt->port = port;
- scb->fd = fd;
-
- /* clear rx buffer, tx busy flag and overflow count */
- port->first = port->count = 0;
- port->txbusy = 0;
- port->oflo = 0;
-
- /* set default baud rate and mode: 9600,8,n,1 */
- i = dos_baudconv (port->baudrate = 9600);
- outb (port, com_cfcr, CFCR_DLAB);
- outb (port, com_dlbl, i & 0xff);
- outb (port, com_dlbh, i >> 8);
- outb (port, com_cfcr, CFCR_8BITS);
-
- /* enable all interrupts */
- outb (port, com_ier, IER_ETXRDY | IER_ERXRDY | IER_ERLS | IER_EMSC);
-
- /* enable DTR & RTS */
- outb (port, com_mcr, MCR_DTR | MCR_RTS | MCR_IENABLE);
-
- enable ();
-
- return 0;
-}
-
-
-static void
-dos_close (struct serial *scb)
-{
- struct dos_ttystate *port;
- struct intrupt *intrupt;
-
- if (!scb)
- return;
-
- port = &ports[scb->fd];
-
- if (port->refcnt-- > 1)
- return;
-
- if (!(intrupt = port->intrupt))
- return;
-
- /* disable interrupts, fifo, flow control */
- disable ();
- port->intrupt = 0;
- intrupt->port = 0;
- outb (port, com_fifo, 0);
- outb (port, com_ier, 0);
- enable ();
-
- /* unhook handler, and disable interrupt gate */
- dos_unhookirq (intrupt);
- outb (port, com_mcr, 0);
-
- /* Check for overflow errors */
- if (port->oflo)
- {
- fprintf_unfiltered (gdb_stderr,
- "Serial input overruns occurred.\n");
- fprintf_unfiltered (gdb_stderr, "This system %s handle %d baud.\n",
- port->fifo ? "cannot" : "needs a 16550 to",
- port->baudrate);
- }
-}
-
-
-
-static int
-dos_noop (struct serial *scb)
-{
- return 0;
-}
-
-static void
-dos_raw (struct serial *scb)
-{
- /* Always in raw mode */
-}
-
-static int
-dos_readchar (struct serial *scb, int timeout)
-{
- struct dos_ttystate *port = &ports[scb->fd];
- long then;
- int c;
-
- then = rawclock () + (timeout * RAWHZ);
- while ((c = dos_getc (port)) < 0)
- {
- if (timeout >= 0 && (rawclock () - then) >= 0)
- return SERIAL_TIMEOUT;
- }
-
- return c;
-}
-
-
-static serial_ttystate
-dos_get_tty_state (struct serial *scb)
-{
- struct dos_ttystate *port = &ports[scb->fd];
- struct dos_ttystate *state;
-
- /* Are they asking about a port we opened? */
- if (port->refcnt <= 0)
- {
- /* We've never heard about this port. We should fail this call,
- unless they are asking about one of the 3 standard handles,
- in which case we pretend the handle was open by us if it is
- connected to a terminal device. This is beacuse Unix
- terminals use the serial interface, so GDB expects the
- standard handles to go through here. */
- if (scb->fd >= 3 || !isatty (scb->fd))
- return NULL;
- }
-
- state = (struct dos_ttystate *) xmalloc (sizeof *state);
- *state = *port;
- return (serial_ttystate) state;
-}
-
-static int
-dos_set_tty_state (struct serial *scb, serial_ttystate ttystate)
-{
- struct dos_ttystate *state;
-
- state = (struct dos_ttystate *) ttystate;
- dos_setbaudrate (scb, state->baudrate);
- return 0;
-}
-
-static int
-dos_noflush_set_tty_state (struct serial *scb, serial_ttystate new_ttystate,
- serial_ttystate old_ttystate)
-{
- struct dos_ttystate *state;
-
- state = (struct dos_ttystate *) new_ttystate;
- dos_setbaudrate (scb, state->baudrate);
- return 0;
-}
-
-static int
-dos_flush_input (struct serial *scb)
-{
- struct dos_ttystate *port = &ports[scb->fd];
- disable ();
- port->first = port->count = 0;
- if (port->fifo)
- outb (port, com_fifo, FIFO_ENABLE | FIFO_RCV_RST | FIFO_TRIGGER);
- enable ();
- return 0;
-}
-
-static void
-dos_print_tty_state (struct serial *scb, serial_ttystate ttystate,
- struct ui_file *stream)
-{
- /* Nothing to print */
- return;
-}
-
-static int
-dos_baudconv (int rate)
-{
- long x, err;
-
- if (rate <= 0)
- return -1;
-
-#define divrnd(n, q) (((n) * 2 / (q) + 1) / 2) /* divide and round off */
- x = divrnd (COMTICK, rate);
- if (x <= 0)
- return -1;
-
- err = divrnd (1000 * COMTICK, x * rate) - 1000;
- if (err < 0)
- err = -err;
- if (err > SPEED_TOLERANCE)
- return -1;
-#undef divrnd
- return x;
-}
-
-
-static int
-dos_setbaudrate (struct serial *scb, int rate)
-{
- struct dos_ttystate *port = &ports[scb->fd];
-
- if (port->baudrate != rate)
- {
- int x;
- unsigned char cfcr;
-
- x = dos_baudconv (rate);
- if (x <= 0)
- {
- fprintf_unfiltered (gdb_stderr, "%d: impossible baudrate\n", rate);
- errno = EINVAL;
- return -1;
- }
-
- disable ();
- cfcr = inb (port, com_cfcr);
-
- outb (port, com_cfcr, CFCR_DLAB);
- outb (port, com_dlbl, x & 0xff);
- outb (port, com_dlbh, x >> 8);
- outb (port, com_cfcr, cfcr);
- port->baudrate = rate;
- enable ();
- }
-
- return 0;
-}
-
-static int
-dos_setstopbits (struct serial *scb, int num)
-{
- struct dos_ttystate *port = &ports[scb->fd];
- unsigned char cfcr;
-
- disable ();
- cfcr = inb (port, com_cfcr);
-
- switch (num)
- {
- case SERIAL_1_STOPBITS:
- outb (port, com_cfcr, cfcr & ~CFCR_STOPB);
- break;
- case SERIAL_1_AND_A_HALF_STOPBITS:
- case SERIAL_2_STOPBITS:
- outb (port, com_cfcr, cfcr | CFCR_STOPB);
- break;
- default:
- enable ();
- return 1;
- }
- enable ();
-
- return 0;
-}
-
-static int
-dos_write (struct serial *scb, const char *str, int len)
-{
- volatile struct dos_ttystate *port = &ports[scb->fd];
- int fifosize = port->fifo ? 16 : 1;
- long then;
- int cnt;
-
- while (len > 0)
- {
- /* send the data, fifosize bytes at a time */
- cnt = fifosize > len ? len : fifosize;
- port->txbusy = 1;
- /* Francisco Pastor <fpastor.etra-id@etra.es> says OUTSB messes
- up the communications with UARTs with FIFOs. */
-#ifdef UART_FIFO_WORKS
- outportsb (port->base + com_data, str, cnt);
- str += cnt;
- len -= cnt;
-#else
- for ( ; cnt > 0; cnt--, len--)
- outportb (port->base + com_data, *str++);
-#endif
-#ifdef DOS_STATS
- cnts[CNT_TX] += cnt;
-#endif
- /* wait for transmission to complete (max 1 sec) */
- then = rawclock () + RAWHZ;
- while (port->txbusy)
- {
- if ((rawclock () - then) >= 0)
- {
- errno = EIO;
- return SERIAL_ERROR;
- }
- }
- }
- return 0;
-}
-
-
-static int
-dos_sendbreak (struct serial *scb)
-{
- volatile struct dos_ttystate *port = &ports[scb->fd];
- unsigned char cfcr;
- long then;
-
- cfcr = inb (port, com_cfcr);
- outb (port, com_cfcr, cfcr | CFCR_SBREAK);
-
- /* 0.25 sec delay */
- then = rawclock () + RAWHZ / 4;
- while ((rawclock () - then) < 0)
- continue;
-
- outb (port, com_cfcr, cfcr);
- return 0;
-}
-
-
-static struct serial_ops dos_ops =
-{
- "hardwire",
- 0,
- dos_open,
- dos_close,
- dos_readchar,
- dos_write,
- dos_noop, /* flush output */
- dos_flush_input,
- dos_sendbreak,
- dos_raw,
- dos_get_tty_state,
- dos_set_tty_state,
- dos_print_tty_state,
- dos_noflush_set_tty_state,
- dos_setbaudrate,
- dos_setstopbits,
- dos_noop, /* wait for output to drain */
- (void (*)(struct serial *, int))NULL /* change into async mode */
-};
-
-
-static void
-dos_info (char *arg, int from_tty)
-{
- struct dos_ttystate *port;
-#ifdef DOS_STATS
- int i;
-#endif
-
- for (port = ports; port < &ports[4]; port++)
- {
- if (port->baudrate == 0)
- continue;
- printf_filtered ("Port:\tCOM%ld (%sactive)\n", (long)(port - ports) + 1,
- port->intrupt ? "" : "not ");
- printf_filtered ("Addr:\t0x%03x (irq %d)\n", port->base, port->irq);
- printf_filtered ("16550:\t%s\n", port->fifo ? "yes" : "no");
- printf_filtered ("Speed:\t%d baud\n", port->baudrate);
- printf_filtered ("Errs:\tframing %d parity %d overflow %d\n\n",
- port->ferr, port->perr, port->oflo);
- }
-
-#ifdef DOS_STATS
- printf_filtered ("\nTotal interrupts: %d\n", intrcnt);
- for (i = 0; i < NCNT; i++)
- if (cnts[i])
- printf_filtered ("%s:\t%d\n", cntnames[i], cnts[i]);
-#endif
-}
-
-
-void
-_initialize_ser_dos (void)
-{
- serial_add_interface (&dos_ops);
-
- /* Save original interrupt mask register. */
- icu_oldmask = inportb (ICU_MASK);
-
- /* Mark fixed motherboard irqs as inuse. */
- intrupts[0].inuse = /* timer tick */
- intrupts[1].inuse = /* keyboard */
- intrupts[2].inuse = 1; /* slave icu */
-
- add_show_from_set (
- add_set_cmd ("com1base", class_obscure, var_zinteger,
- (char *) &ports[0].base,
- "Set COM1 base i/o port address.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com1irq", class_obscure, var_zinteger,
- (char *) &ports[0].irq,
- "Set COM1 interrupt request.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com2base", class_obscure, var_zinteger,
- (char *) &ports[1].base,
- "Set COM2 base i/o port address.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com2irq", class_obscure, var_zinteger,
- (char *) &ports[1].irq,
- "Set COM2 interrupt request.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com3base", class_obscure, var_zinteger,
- (char *) &ports[2].base,
- "Set COM3 base i/o port address.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com3irq", class_obscure, var_zinteger,
- (char *) &ports[2].irq,
- "Set COM3 interrupt request.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com4base", class_obscure, var_zinteger,
- (char *) &ports[3].base,
- "Set COM4 base i/o port address.",
- &setlist),
- &showlist);
-
- add_show_from_set (
- add_set_cmd ("com4irq", class_obscure, var_zinteger,
- (char *) &ports[3].irq,
- "Set COM4 interrupt request.",
- &setlist),
- &showlist);
-
- add_info ("serial", dos_info,
- "Print DOS serial port status.");
-}
diff --git a/contrib/gdb/gdb/ser-mac.c b/contrib/gdb/gdb/ser-mac.c
deleted file mode 100644
index df0040edbf20..000000000000
--- a/contrib/gdb/gdb/ser-mac.c
+++ /dev/null
@@ -1,362 +0,0 @@
-/* Remote serial interface for local (hardwired) serial ports for Macintosh.
- Copyright 1994 Free Software Foundation, Inc.
- Contributed by Cygnus Support. Written by Stan Shebs.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "serial.h"
-
-#include <Types.h>
-#include <Devices.h>
-/* This is the regular Mac Serial.h, but copied to a different name
- so as not to get confused with the GDB serial.h above. */
-#include "MacSerial.h"
-
-/* This is unused for now. We just return a placeholder. */
-
-struct mac_ttystate
- {
- int bogus;
- };
-
-static int mac_open PARAMS ((serial_t scb, const char *name));
-static void mac_raw PARAMS ((serial_t scb));
-static int mac_readchar PARAMS ((serial_t scb, int timeout));
-static int mac_setbaudrate PARAMS ((serial_t scb, int rate));
-static int mac_write PARAMS ((serial_t scb, const char *str, int len));
-static void mac_close PARAMS ((serial_t scb));
-static serial_ttystate mac_get_tty_state PARAMS ((serial_t scb));
-static int mac_set_tty_state PARAMS ((serial_t scb, serial_ttystate state));
-static char *aptr PARAMS ((short p));
-
-short input_refnum;
-short output_refnum;
-
-char *mac_input_buffer;
-char *mac_output_buffer;
-
-static int
-mac_open (scb, name)
- serial_t scb;
- const char *name;
-{
- OSErr err;
-
- /* Alloc buffer space first - that way any allocation failures are
- intercepted before the serial driver gets involved. */
- if (mac_input_buffer == NULL)
- mac_input_buffer = (char *) xmalloc (4096);
- /* Match on a name and open a port. */
- if (strcmp (name, "modem") == 0)
- {
- err = OpenDriver ("\p.AIn", &input_refnum);
- if (err != 0)
- {
- return (-1);
- }
- err = OpenDriver ("\p.AOut", &output_refnum);
- if (err != 0)
- {
- CloseDriver (input_refnum);
- return (-1);
- }
- }
- else if (strcmp (name, "printer") == 0)
- {
- err = OpenDriver ("\p.BIn", &input_refnum);
- if (err != 0)
- {
- return (-1);
- }
- err = OpenDriver ("\p.BOut", &output_refnum);
- if (err != 0)
- {
- CloseDriver (input_refnum);
- return (-1);
- }
- /* fake */
- scb->fd = 1;
- return 0;
- }
- else
- {
- error ("You must specify a valid serial port name; your choices are `modem' or `printer'.");
- errno = ENOENT;
- return (-1);
- }
- /* We got something open. */
- if (1 /* using custom buffer */)
- SerSetBuf (input_refnum, mac_input_buffer, 4096);
- /* Set to a GDB-preferred state. */
- SerReset (input_refnum, stop10|noParity|data8|baud9600);
- SerReset (output_refnum, stop10|noParity|data8|baud9600);
- {
- CntrlParam cb;
- struct SerShk *handshake;
-
- cb.ioCRefNum = output_refnum;
- cb.csCode = 14;
- handshake = (struct SerShk *) &cb.csParam[0];
- handshake->fXOn = 0;
- handshake->fCTS = 0;
- handshake->xOn = 0;
- handshake->xOff = 0;
- handshake->errs = 0;
- handshake->evts = 0;
- handshake->fInX = 0;
- handshake->fDTR = 0;
- err = PBControl ((ParmBlkPtr) &cb, 0);
- if (err < 0)
- return (-1);
- }
- /* fake */
- scb->fd = 1;
- return 0;
-}
-
-static int
-mac_noop (scb)
- serial_t scb;
-{
- return 0;
-}
-
-static void
-mac_raw (scb)
- serial_t scb;
-{
- /* Always effectively in raw mode. */
-}
-
-/* Read a character with user-specified timeout. TIMEOUT is number of seconds
- to wait, or -1 to wait forever. Use timeout of 0 to effect a poll. Returns
- char if successful. Returns -2 if timeout expired, EOF if line dropped
- dead, or -3 for any other error (see errno in that case). */
-
-static int
-mac_readchar (scb, timeout)
- serial_t scb;
- int timeout;
-{
- int status, n;
- /* time_t */ unsigned long start_time, now;
- OSErr err;
- CntrlParam cb;
- IOParam pb;
-
- if (scb->bufcnt-- > 0)
- return *scb->bufp++;
-
- time (&start_time);
-
- while (1)
- {
- cb.ioCRefNum = input_refnum;
- cb.csCode = 2;
- err = PBStatus ((ParmBlkPtr) &cb, 0);
- if (err < 0)
- return SERIAL_ERROR;
- n = *((long *) &cb.csParam[0]);
- if (n > 0)
- {
- pb.ioRefNum = input_refnum;
- pb.ioBuffer = (Ptr) (scb->buf);
- pb.ioReqCount = (n > 64 ? 64 : n);
- err = PBRead ((ParmBlkPtr) &pb, 0);
- if (err < 0)
- return SERIAL_ERROR;
- scb->bufcnt = pb.ioReqCount;
- scb->bufcnt--;
- scb->bufp = scb->buf;
- return *scb->bufp++;
- }
- else if (timeout == 0)
- return SERIAL_TIMEOUT;
- else if (timeout == -1)
- ;
- else
- {
- time (&now);
- if (now > start_time + timeout)
- return SERIAL_TIMEOUT;
- }
- PROGRESS (1);
- }
-}
-
-/* mac_{get set}_tty_state() are both dummys to fill out the function
- vector. Someday, they may do something real... */
-
-static serial_ttystate
-mac_get_tty_state (scb)
- serial_t scb;
-{
- struct mac_ttystate *state;
-
- state = (struct mac_ttystate *) xmalloc (sizeof *state);
-
- return (serial_ttystate) state;
-}
-
-static int
-mac_set_tty_state (scb, ttystate)
- serial_t scb;
- serial_ttystate ttystate;
-{
- return 0;
-}
-
-static int
-mac_noflush_set_tty_state (scb, new_ttystate, old_ttystate)
- serial_t scb;
- serial_ttystate new_ttystate;
- serial_ttystate old_ttystate;
-{
- return 0;
-}
-
-static void
-mac_print_tty_state (scb, ttystate)
- serial_t scb;
- serial_ttystate ttystate;
-{
- /* Nothing to print. */
- return;
-}
-
-/* If there is a tricky formula to relate real baud rates
- to what the serial driver wants, we should use it. Until
- we get one, this table will have to do. */
-
-static struct {
- int real_rate;
- int bits;
-} mac_baud_rate_table[] = {
- { 57600, baud57600 },
- { 38400, 1 },
- { 19200, baud19200 },
- { 9600, baud9600 },
- { 7200, baud7200 },
- { 4800, baud4800 },
- { 3600, baud3600 },
- { 2400, baud2400 },
- { 1800, baud1800 },
- { 1200, baud1200 },
- { 600, baud600 },
- { 300, baud300 },
- { 0, 0 }
-};
-
-static int
-mac_set_baud_rate (scb, rate)
- serial_t scb;
- int rate;
-{
- int i, bits;
-
- for (i = 0; mac_baud_rate_table[i].real_rate != 0; ++i)
- {
- if (mac_baud_rate_table[i].real_rate == rate)
- {
- bits = mac_baud_rate_table[i].bits;
- break;
- }
- }
- SerReset (input_refnum, stop10|noParity|data8|bits);
- SerReset (output_refnum, stop10|noParity|data8|bits);
-}
-
-static int
-mac_set_stop_bits (scb, num)
- serial_t scb;
- int num;
-{
- return 0;
-}
-
-int first_mac_write = 0;
-
-static int
-mac_write (scb, str, len)
- serial_t scb;
- const char *str;
- int len;
-{
- OSErr err;
- IOParam pb;
-
- if (first_mac_write++ < 4)
- {
- sleep (1);
- }
- pb.ioRefNum = output_refnum;
- pb.ioBuffer = (Ptr) str;
- pb.ioReqCount = len;
- err = PBWrite ((ParmBlkPtr) &pb, 0);
- if (err < 0)
- {
- return 1;
- }
- return 0;
-}
-
-static void
-mac_close (serial_t scb)
-{
- if (input_refnum)
- {
- if (1 /* custom buffer */)
- SerSetBuf (input_refnum, mac_input_buffer, 0);
- CloseDriver (input_refnum);
- input_refnum = 0;
- }
- if (output_refnum)
- {
- if (0 /* custom buffer */)
- SerSetBuf (input_refnum, mac_output_buffer, 0);
- CloseDriver (output_refnum);
- output_refnum = 0;
- }
-}
-
-static struct serial_ops mac_ops =
-{
- "hardwire",
- 0,
- mac_open,
- mac_close,
- mac_readchar,
- mac_write,
- mac_noop, /* flush output */
- mac_noop, /* flush input */
- mac_noop, /* send break -- currently only for nindy */
- mac_raw,
- mac_get_tty_state,
- mac_set_tty_state,
- mac_print_tty_state,
- mac_noflush_set_tty_state,
- mac_set_baud_rate,
- mac_set_stop_bits,
- mac_noop, /* wait for output to drain */
-};
-
-void
-_initialize_ser_mac ()
-{
- serial_add_interface (&mac_ops);
-}
diff --git a/contrib/gdb/gdb/ser-ocd.c b/contrib/gdb/gdb/ser-ocd.c
deleted file mode 100644
index 971f84e049c4..000000000000
--- a/contrib/gdb/gdb/ser-ocd.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/* Remote serial interface for Macraigor Systems implementation of
- On-Chip Debugging using serial target box or serial wiggler
-
- Copyright 1994, 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 "defs.h"
-#include "serial.h"
-
-#ifdef _WIN32
-#include <windows.h>
-#endif
-
-static int ser_ocd_open PARAMS ((serial_t scb, const char *name));
-static void ser_ocd_raw PARAMS ((serial_t scb));
-static int ser_ocd_readchar PARAMS ((serial_t scb, int timeout));
-static int ser_ocd_setbaudrate PARAMS ((serial_t scb, int rate));
-static int ser_ocd_write PARAMS ((serial_t scb, const char *str, int len));
-static void ser_ocd_close PARAMS ((serial_t scb));
-static serial_ttystate ser_ocd_get_tty_state PARAMS ((serial_t scb));
-static int ser_ocd_set_tty_state PARAMS ((serial_t scb, serial_ttystate state));
-
-#ifdef _WIN32
-/* On Windows, this function pointer is initialized to a function in
- the wiggler DLL. */
-static int (*dll_do_command) PARAMS ((const char *, char *));
-#endif
-
-static int
-ocd_open (scb, name)
- serial_t scb;
- const char *name;
-{
-#ifdef _WIN32
- /* Find the wiggler DLL which talks to the board. */
- if (dll_do_command == NULL)
- {
- HINSTANCE handle;
-
- /* FIXME: Should the user be able to configure this? */
- handle = LoadLibrary ("Wigglers.dll");
- if (handle == NULL)
- error ("Can't load Wigglers.dll");
-
- dll_do_command = ((int (*) PARAMS ((const char *, char *)))
- GetProcAddress (handle, "do_command"));
- if (dll_do_command == NULL)
- error ("Can't find do_command function in Wigglers.dll");
- }
-#else
- /* No wiggler DLLs on Unix yet, fail. */
- error ("Wiggler library not available for this type of host.");
-#endif /* _WIN32 */
- return 0;
-}
-
-static int
-ocd_noop (scb)
- serial_t scb;
-{
- return 0;
-}
-
-static void
-ocd_raw (scb)
- serial_t scb;
-{
- /* Always in raw mode */
-}
-
-static void
-ocd_readremote ()
-{
-}
-
-/* We need a buffer to store responses from the Wigglers.dll */
-#define WIGGLER_BUFF_SIZE 512
-unsigned char from_wiggler_buffer[WIGGLER_BUFF_SIZE];
-unsigned char * wiggler_buffer_ptr; /* curr spot in buffer */
-
-static int
-ocd_readchar (scb, timeout)
- serial_t scb;
- int timeout;
-{
- /* Catch attempts at reading past the end of the buffer */
- if (wiggler_buffer_ptr >
- (from_wiggler_buffer + (sizeof (char *) * WIGGLER_BUFF_SIZE)))
- error ("ocd_readchar asked to read past the end of the buffer!");
-
- return (int) *wiggler_buffer_ptr++; /* return curr char and increment ptr */
-}
-
-struct ocd_ttystate {
- int dummy;
-};
-
-/* ocd_{get set}_tty_state() are both dummys to fill out the function
- vector. Someday, they may do something real... */
-
-static serial_ttystate
-ocd_get_tty_state (scb)
- serial_t scb;
-{
- struct ocd_ttystate *state;
-
- state = (struct ocd_ttystate *) xmalloc (sizeof *state);
-
- return (serial_ttystate) state;
-}
-
-static int
-ocd_set_tty_state (scb, ttystate)
- serial_t scb;
- serial_ttystate ttystate;
-{
- return 0;
-}
-
-static int
-ocd_noflush_set_tty_state (scb, new_ttystate, old_ttystate)
- serial_t scb;
- serial_ttystate new_ttystate;
- serial_ttystate old_ttystate;
-{
- return 0;
-}
-
-static void
-ocd_print_tty_state (scb, ttystate)
- serial_t scb;
- serial_ttystate ttystate;
-{
- /* Nothing to print. */
- return;
-}
-
-static int
-ocd_setbaudrate (scb, rate)
- serial_t scb;
- int rate;
-{
- return 0;
-}
-
-static int
-ocd_write (scb, str, len)
- serial_t scb;
- const char *str;
- int len;
-{
- char c;
-
-#ifdef _WIN32
- /* send packet to Wigglers.dll and store response so we can give it to
- remote-wiggler.c when get_packet is run */
- dll_do_command (str, from_wiggler_buffer);
- wiggler_buffer_ptr = from_wiggler_buffer;
-#endif
-
- return 0;
-}
-
-static void
-ocd_close (scb)
- serial_t scb;
-{
-}
-
-static struct serial_ops ocd_ops =
-{
- "ocd",
- 0,
- ocd_open,
- ocd_close,
- ocd_readchar,
- ocd_write,
- ocd_noop, /* flush output */
- ocd_noop, /* flush input */
- ocd_noop, /* send break -- currently used only for nindy */
- ocd_raw,
- ocd_get_tty_state,
- ocd_set_tty_state,
- ocd_print_tty_state,
- ocd_noflush_set_tty_state,
- ocd_setbaudrate,
- ocd_noop, /* wait for output to drain */
-};
-
-void
-_initialize_ser_ocd_bdm ()
-{
- serial_add_interface (&ocd_ops);
-}
diff --git a/contrib/gdb/gdb/signals.h b/contrib/gdb/gdb/signals.h
deleted file mode 100644
index a1348b637330..000000000000
--- a/contrib/gdb/gdb/signals.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Signal handler definitions for GDB, the GNU Debugger.
- Copyright (C) 1986, 1989 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 almost the same as including <signal.h> except that it
- eliminates certain signal names when job control is not supported,
- (or, on some systems, when job control is there but doesn't work
- the way GDB expects it to work). */
-/* This has been superceded by the job_control variable in serial.h. */
-
-#include <signal.h>
diff --git a/contrib/gdb/gdb/somread.c b/contrib/gdb/gdb/somread.c
deleted file mode 100644
index e4fec18ae624..000000000000
--- a/contrib/gdb/gdb/somread.c
+++ /dev/null
@@ -1,743 +0,0 @@
-/* Read HP PA/Risc object files for GDB.
- Copyright 1991, 1992, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "bfd.h"
-#include <syms.h>
-#include "symtab.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "buildsym.h"
-#include "stabsread.h"
-#include "gdb-stabs.h"
-#include "complaints.h"
-#include "gdb_string.h"
-#include "demangle.h"
-#include "som.h"
-#include "libhppa.h"
-
-/* Various things we might complain about... */
-
-static void som_symfile_init (struct objfile *);
-
-static void som_new_init (struct objfile *);
-
-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_symfile_offsets (struct objfile *, struct section_addr_info *);
-
-/* FIXME: These should really be in a common header somewhere */
-
-extern void hpread_build_psymtabs (struct objfile *, int);
-
-extern void hpread_symfile_finish (struct objfile *);
-
-extern void hpread_symfile_init (struct objfile *);
-
-extern void do_pxdb (bfd *);
-
-/*
-
- LOCAL FUNCTION
-
- som_symtab_read -- read the symbol table of a SOM file
-
- SYNOPSIS
-
- void som_symtab_read (bfd *abfd, struct objfile *objfile,
- struct section_offsets *section_offsets)
-
- DESCRIPTION
-
- Given an open bfd, a base address to relocate symbols to, and a
- flag that specifies whether or not this bfd is for an executable
- or not (may be shared library for example), add all the global
- function and data symbols to the minimal symbol table.
- */
-
-static void
-som_symtab_read (bfd *abfd, struct objfile *objfile,
- struct section_offsets *section_offsets)
-{
- unsigned int number_of_symbols;
- int val, dynamic;
- char *stringtab;
- asection *shlib_info;
- struct symbol_dictionary_record *buf, *bufp, *endbufp;
- char *symname;
- CONST int symsize = sizeof (struct symbol_dictionary_record);
- CORE_ADDR text_offset, data_offset;
-
-
- text_offset = ANOFFSET (section_offsets, 0);
- data_offset = ANOFFSET (section_offsets, 1);
-
- number_of_symbols = bfd_get_symcount (abfd);
-
- /* FIXME (alloca): could be quite large. */
- buf = alloca (symsize * number_of_symbols);
- bfd_seek (abfd, obj_som_sym_filepos (abfd), SEEK_SET);
- val = bfd_bread (buf, symsize * number_of_symbols, abfd);
- if (val != symsize * number_of_symbols)
- error ("Couldn't read symbol dictionary!");
-
- /* FIXME (alloca): could be quite large. */
- stringtab = alloca (obj_som_stringtab_size (abfd));
- bfd_seek (abfd, obj_som_str_filepos (abfd), SEEK_SET);
- val = bfd_bread (stringtab, obj_som_stringtab_size (abfd), abfd);
- if (val != obj_som_stringtab_size (abfd))
- error ("Can't read in HP string table.");
-
- /* We need to determine if objfile is a dynamic executable (so we
- can do the right thing for ST_ENTRY vs ST_CODE symbols).
-
- There's nothing in the header which easily allows us to do
- this. The only reliable way I know of is to check for the
- existence of a $SHLIB_INFO$ section with a non-zero size. */
- /* The code below is not a reliable way to check whether an
- * executable is dynamic, so I commented it out - RT
- * shlib_info = bfd_get_section_by_name (objfile->obfd, "$SHLIB_INFO$");
- * if (shlib_info)
- * dynamic = (bfd_section_size (objfile->obfd, shlib_info) != 0);
- * else
- * dynamic = 0;
- */
- /* I replaced the code with a simple check for text offset not being
- * zero. Still not 100% reliable, but a more reliable way of asking
- * "is this a dynamic executable?" than the above. RT
- */
- dynamic = (text_offset != 0);
-
- endbufp = buf + number_of_symbols;
- for (bufp = buf; bufp < endbufp; ++bufp)
- {
- enum minimal_symbol_type ms_type;
-
- QUIT;
-
- switch (bufp->symbol_scope)
- {
- case SS_UNIVERSAL:
- case SS_EXTERNAL:
- switch (bufp->symbol_type)
- {
- case ST_SYM_EXT:
- case ST_ARG_EXT:
- continue;
-
- case ST_CODE:
- case ST_PRI_PROG:
- case ST_SEC_PROG:
- case ST_MILLICODE:
- symname = bufp->name.n_strx + stringtab;
- ms_type = mst_text;
- bufp->symbol_value += text_offset;
- bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
- break;
-
- case ST_ENTRY:
- symname = bufp->name.n_strx + stringtab;
- /* For a dynamic executable, ST_ENTRY symbols are
- the stubs, while the ST_CODE symbol is the real
- function. */
- if (dynamic)
- ms_type = mst_solib_trampoline;
- else
- ms_type = mst_text;
- bufp->symbol_value += text_offset;
- bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
- break;
-
- case ST_STUB:
- symname = bufp->name.n_strx + stringtab;
- ms_type = mst_solib_trampoline;
- bufp->symbol_value += text_offset;
- bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
- break;
-
- case ST_DATA:
- symname = bufp->name.n_strx + stringtab;
- bufp->symbol_value += data_offset;
- ms_type = mst_data;
- break;
- default:
- continue;
- }
- break;
-
-#if 0
- /* SS_GLOBAL and SS_LOCAL are two names for the same thing (!). */
- case SS_GLOBAL:
-#endif
- case SS_LOCAL:
- switch (bufp->symbol_type)
- {
- case ST_SYM_EXT:
- case ST_ARG_EXT:
- continue;
-
- case ST_CODE:
- symname = bufp->name.n_strx + stringtab;
- ms_type = mst_file_text;
- bufp->symbol_value += text_offset;
- bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
-
- check_strange_names:
- /* Utah GCC 2.5, FSF GCC 2.6 and later generate correct local
- label prefixes for stabs, constant data, etc. So we need
- only filter out L$ symbols which are left in due to
- limitations in how GAS generates SOM relocations.
-
- When linking in the HPUX C-library the HP linker has
- the nasty habit of placing section symbols from the literal
- subspaces in the middle of the program's text. Filter
- those out as best we can. Check for first and last character
- being '$'.
-
- And finally, the newer HP compilers emit crud like $PIC_foo$N
- in some circumstance (PIC code I guess). It's also claimed
- that they emit D$ symbols too. What stupidity. */
- if ((symname[0] == 'L' && symname[1] == '$')
- || (symname[0] == '$' && symname[strlen (symname) - 1] == '$')
- || (symname[0] == 'D' && symname[1] == '$')
- || (strncmp (symname, "$PIC", 4) == 0))
- continue;
- break;
-
- case ST_PRI_PROG:
- case ST_SEC_PROG:
- case ST_MILLICODE:
- symname = bufp->name.n_strx + stringtab;
- ms_type = mst_file_text;
- bufp->symbol_value += text_offset;
- bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
- break;
-
- case ST_ENTRY:
- symname = bufp->name.n_strx + stringtab;
- /* For a dynamic executable, ST_ENTRY symbols are
- the stubs, while the ST_CODE symbol is the real
- function. */
- if (dynamic)
- ms_type = mst_solib_trampoline;
- else
- ms_type = mst_file_text;
- bufp->symbol_value += text_offset;
- bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
- break;
-
- case ST_STUB:
- symname = bufp->name.n_strx + stringtab;
- ms_type = mst_solib_trampoline;
- bufp->symbol_value += text_offset;
- bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value);
- break;
-
-
- case ST_DATA:
- symname = bufp->name.n_strx + stringtab;
- bufp->symbol_value += data_offset;
- ms_type = mst_file_data;
- goto check_strange_names;
-
- default:
- continue;
- }
- break;
-
- /* This can happen for common symbols when -E is passed to the
- final link. No idea _why_ that would make the linker force
- common symbols to have an SS_UNSAT scope, but it does.
-
- This also happens for weak symbols, but their type is
- ST_DATA. */
- case SS_UNSAT:
- switch (bufp->symbol_type)
- {
- case ST_STORAGE:
- case ST_DATA:
- symname = bufp->name.n_strx + stringtab;
- bufp->symbol_value += data_offset;
- ms_type = mst_data;
- break;
-
- default:
- continue;
- }
- break;
-
- default:
- continue;
- }
-
- if (bufp->name.n_strx > obj_som_stringtab_size (abfd))
- error ("Invalid symbol data; bad HP string table offset: %d",
- bufp->name.n_strx);
-
- prim_record_minimal_symbol (symname, bufp->symbol_value, ms_type,
- objfile);
- }
-}
-
-/* Scan and build partial symbols for a symbol file.
- We have been initialized by a call to som_symfile_init, which
- currently does nothing.
-
- SECTION_OFFSETS is a set of offsets to apply to relocate the symbols
- in each section. This is ignored, as it isn't needed for SOM.
-
- MAINLINE is true if we are reading the main symbol
- table (as opposed to a shared lib or dynamically loaded file).
-
- This function only does the minimum work necessary for letting the
- user "name" things symbolically; it does not read the entire symtab.
- Instead, it reads the external and static symbols and puts them in partial
- symbol tables. When more extensive information is requested of a
- file, the corresponding partial symbol table is mutated into a full
- fledged symbol table by going back and reading the symbols
- for real.
-
- We look for sections with specific names, to tell us what debug
- format to look for: FIXME!!!
-
- somstab_build_psymtabs() handles STABS symbols.
-
- Note that SOM files have a "minimal" symbol table, which is vaguely
- reminiscent of a COFF symbol table, but has only the minimal information
- necessary for linking. We process this also, and use the information to
- build gdb's minimal symbol table. This gives us some minimal debugging
- capability even for files compiled without -g. */
-
-static void
-som_symfile_read (struct objfile *objfile, int mainline)
-{
- bfd *abfd = objfile->obfd;
- struct cleanup *back_to;
-
- do_pxdb (symfile_bfd_open (objfile->name));
-
- init_minimal_symbol_collection ();
- back_to = make_cleanup_discard_minimal_symbols ();
-
- /* Read in the import list and the export list. Currently
- the export list isn't used; the import list is used in
- hp-symtab-read.c to handle static vars declared in other
- shared libraries. */
- init_import_symbols (objfile);
-#if 0 /* Export symbols not used today 1997-08-05 */
- init_export_symbols (objfile);
-#else
- objfile->export_list = NULL;
- objfile->export_list_size = 0;
-#endif
-
- /* Process the normal SOM symbol table first.
- This reads in the DNTT and string table, but doesn't
- actually scan the DNTT. It does scan the linker symbol
- table and thus build up a "minimal symbol table". */
-
- som_symtab_read (abfd, objfile, objfile->section_offsets);
-
- /* Now read information from the stabs debug sections.
- This is a no-op for SOM.
- Perhaps it is intended for some kind of mixed STABS/SOM
- situation? */
- stabsect_build_psymtabs (objfile, mainline,
- "$GDB_SYMBOLS$", "$GDB_STRINGS$", "$TEXT$");
-
- /* Now read the native debug information.
- This builds the psymtab. This used to be done via a scan of
- the DNTT, but is now done via the PXDB-built quick-lookup tables
- together with a scan of the GNTT. See hp-psymtab-read.c. */
- hpread_build_psymtabs (objfile, mainline);
-
- /* Install any minimal symbols that have been collected as the current
- minimal symbols for this objfile.
- Further symbol-reading is done incrementally, file-by-file,
- in a step known as "psymtab-to-symtab" expansion. hp-symtab-read.c
- contains the code to do the actual DNTT scanning and symtab building. */
- install_minimal_symbols (objfile);
-
- /* Force hppa-tdep.c to re-read the unwind descriptors. */
- objfile->obj_private = NULL;
- do_cleanups (back_to);
-}
-
-/* Initialize anything that needs initializing when a completely new symbol
- file is specified (not just adding some symbols from another file, e.g. a
- shared library).
-
- We reinitialize buildsym, since we may be reading stabs from a SOM file. */
-
-static void
-som_new_init (struct objfile *ignore)
-{
- stabsread_new_init ();
- buildsym_new_init ();
-}
-
-/* Perform any local cleanups required when we are done with a particular
- objfile. I.E, we are in the process of discarding all symbol information
- for an objfile, freeing up all memory held for it, and unlinking the
- objfile struct from the global list of known objfiles. */
-
-static void
-som_symfile_finish (struct objfile *objfile)
-{
- if (objfile->sym_stab_info != NULL)
- {
- xmfree (objfile->md, objfile->sym_stab_info);
- }
- hpread_symfile_finish (objfile);
-}
-
-/* SOM specific initialization routine for reading symbols. */
-
-static void
-som_symfile_init (struct objfile *objfile)
-{
- /* SOM objects may be reordered, so set OBJF_REORDERED. If we
- find this causes a significant slowdown in gdb then we could
- set it in the debug symbol readers only when necessary. */
- objfile->flags |= OBJF_REORDERED;
- hpread_symfile_init (objfile);
-}
-
-/* SOM specific parsing routine for section offsets.
-
- Plain and simple for now. */
-
-static void
-som_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
-{
- int i;
- CORE_ADDR text_addr;
-
- objfile->num_sections = SECT_OFF_MAX;
- objfile->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
-
- /* FIXME: ezannoni 2000-04-20 The section names in SOM are not
- .text, .data, etc, but $TEXT$, $DATA$,... We should initialize
- SET_OFF_* from bfd. (See default_symfile_offsets()). But I don't
- know the correspondence between SOM sections and GDB's idea of
- section names. So for now we default to what is was before these
- changes.*/
- objfile->sect_index_text = 0;
- objfile->sect_index_data = 1;
- objfile->sect_index_bss = 2;
- objfile->sect_index_rodata = 3;
-
- /* First see if we're a shared library. If so, get the section
- offsets from the library, else get them from addrs. */
- if (!som_solib_section_offsets (objfile, objfile->section_offsets))
- {
- /* Note: Here is OK to compare with ".text" because this is the
- name that gdb itself gives to that section, not the SOM
- name. */
- for (i = 0; i < SECT_OFF_MAX && addrs->other[i].name; i++)
- if (strcmp (addrs->other[i].name, ".text") == 0)
- break;
- text_addr = addrs->other[i].addr;
-
- for (i = 0; i < SECT_OFF_MAX; i++)
- (objfile->section_offsets)->offsets[i] = text_addr;
- }
-}
-
-/* Read in and initialize the SOM import list which is present
- for all executables and shared libraries. The import list
- consists of the symbols that are referenced in OBJFILE but
- not defined there. (Variables that are imported are dealt
- with as "loc_indirect" vars.)
- Return value = number of import symbols read in. */
-int
-init_import_symbols (struct objfile *objfile)
-{
- unsigned int import_list;
- unsigned int import_list_size;
- unsigned int string_table;
- unsigned int string_table_size;
- char *string_buffer;
- register int i;
- register int j;
- register int k;
- asection *text_section; /* section handle */
- unsigned int dl_header[12]; /* SOM executable header */
-
- /* A struct for an entry in the SOM import list */
- typedef struct
- {
- int name; /* index into the string table */
- short dont_care1; /* we don't use this */
- unsigned char type; /* 0 = NULL, 2 = Data, 3 = Code, 7 = Storage, 13 = Plabel */
- unsigned int reserved2:8; /* not used */
- }
- SomImportEntry;
-
- /* We read 100 entries in at a time from the disk file. */
-#define SOM_READ_IMPORTS_NUM 100
-#define SOM_READ_IMPORTS_CHUNK_SIZE (sizeof (SomImportEntry) * SOM_READ_IMPORTS_NUM)
- SomImportEntry buffer[SOM_READ_IMPORTS_NUM];
-
- /* Initialize in case we error out */
- objfile->import_list = NULL;
- objfile->import_list_size = 0;
-
- /* It doesn't work, for some reason, to read in space $TEXT$;
- the subspace $SHLIB_INFO$ has to be used. Some BFD quirk? pai/1997-08-05 */
- text_section = bfd_get_section_by_name (objfile->obfd, "$SHLIB_INFO$");
- if (!text_section)
- return 0;
- /* Get the SOM executable header */
- bfd_get_section_contents (objfile->obfd, text_section, dl_header, 0, 12 * sizeof (int));
-
- /* Check header version number for 10.x HP-UX */
- /* Currently we deal only with 10.x systems; on 9.x the version # is 89060912.
- FIXME: Change for future HP-UX releases and mods to the SOM executable format */
- if (dl_header[0] != 93092112)
- return 0;
-
- import_list = dl_header[4];
- import_list_size = dl_header[5];
- if (!import_list_size)
- return 0;
- string_table = dl_header[10];
- string_table_size = dl_header[11];
- if (!string_table_size)
- return 0;
-
- /* Suck in SOM string table */
- string_buffer = (char *) xmalloc (string_table_size);
- bfd_get_section_contents (objfile->obfd, text_section, string_buffer,
- string_table, string_table_size);
-
- /* Allocate import list in the psymbol obstack; this has nothing
- to do with psymbols, just a matter of convenience. We want the
- import list to be freed when the objfile is deallocated */
- objfile->import_list
- = (ImportEntry *) obstack_alloc (&objfile->psymbol_obstack,
- import_list_size * sizeof (ImportEntry));
-
- /* Read in the import entries, a bunch at a time */
- for (j = 0, k = 0;
- j < (import_list_size / SOM_READ_IMPORTS_NUM);
- j++)
- {
- bfd_get_section_contents (objfile->obfd, text_section, buffer,
- import_list + j * SOM_READ_IMPORTS_CHUNK_SIZE,
- SOM_READ_IMPORTS_CHUNK_SIZE);
- for (i = 0; i < SOM_READ_IMPORTS_NUM; i++, k++)
- {
- if (buffer[i].type != (unsigned char) 0)
- {
- objfile->import_list[k]
- = (char *) obstack_alloc (&objfile->psymbol_obstack, strlen (string_buffer + buffer[i].name) + 1);
- strcpy (objfile->import_list[k], string_buffer + buffer[i].name);
- /* Some day we might want to record the type and other information too */
- }
- else /* null type */
- objfile->import_list[k] = NULL;
-
- }
- }
-
- /* Get the leftovers */
- if (k < import_list_size)
- bfd_get_section_contents (objfile->obfd, text_section, buffer,
- import_list + k * sizeof (SomImportEntry),
- (import_list_size - k) * sizeof (SomImportEntry));
- for (i = 0; k < import_list_size; i++, k++)
- {
- if (buffer[i].type != (unsigned char) 0)
- {
- objfile->import_list[k]
- = (char *) obstack_alloc (&objfile->psymbol_obstack, strlen (string_buffer + buffer[i].name) + 1);
- strcpy (objfile->import_list[k], string_buffer + buffer[i].name);
- /* Some day we might want to record the type and other information too */
- }
- else
- objfile->import_list[k] = NULL;
- }
-
- objfile->import_list_size = import_list_size;
- xfree (string_buffer);
- return import_list_size;
-}
-
-/* Read in and initialize the SOM export list which is present
- for all executables and shared libraries. The import list
- consists of the symbols that are referenced in OBJFILE but
- not defined there. (Variables that are imported are dealt
- with as "loc_indirect" vars.)
- Return value = number of import symbols read in. */
-int
-init_export_symbols (struct objfile *objfile)
-{
- unsigned int export_list;
- unsigned int export_list_size;
- unsigned int string_table;
- unsigned int string_table_size;
- char *string_buffer;
- register int i;
- register int j;
- register int k;
- asection *text_section; /* section handle */
- unsigned int dl_header[12]; /* SOM executable header */
-
- /* A struct for an entry in the SOM export list */
- typedef struct
- {
- int next; /* for hash table use -- we don't use this */
- int name; /* index into string table */
- int value; /* offset or plabel */
- int dont_care1; /* not used */
- unsigned char type; /* 0 = NULL, 2 = Data, 3 = Code, 7 = Storage, 13 = Plabel */
- char dont_care2; /* not used */
- short dont_care3; /* not used */
- }
- SomExportEntry;
-
- /* We read 100 entries in at a time from the disk file. */
-#define SOM_READ_EXPORTS_NUM 100
-#define SOM_READ_EXPORTS_CHUNK_SIZE (sizeof (SomExportEntry) * SOM_READ_EXPORTS_NUM)
- SomExportEntry buffer[SOM_READ_EXPORTS_NUM];
-
- /* Initialize in case we error out */
- objfile->export_list = NULL;
- objfile->export_list_size = 0;
-
- /* It doesn't work, for some reason, to read in space $TEXT$;
- the subspace $SHLIB_INFO$ has to be used. Some BFD quirk? pai/1997-08-05 */
- text_section = bfd_get_section_by_name (objfile->obfd, "$SHLIB_INFO$");
- if (!text_section)
- return 0;
- /* Get the SOM executable header */
- bfd_get_section_contents (objfile->obfd, text_section, dl_header, 0, 12 * sizeof (int));
-
- /* Check header version number for 10.x HP-UX */
- /* Currently we deal only with 10.x systems; on 9.x the version # is 89060912.
- FIXME: Change for future HP-UX releases and mods to the SOM executable format */
- if (dl_header[0] != 93092112)
- return 0;
-
- export_list = dl_header[8];
- export_list_size = dl_header[9];
- if (!export_list_size)
- return 0;
- string_table = dl_header[10];
- string_table_size = dl_header[11];
- if (!string_table_size)
- return 0;
-
- /* Suck in SOM string table */
- string_buffer = (char *) xmalloc (string_table_size);
- bfd_get_section_contents (objfile->obfd, text_section, string_buffer,
- string_table, string_table_size);
-
- /* Allocate export list in the psymbol obstack; this has nothing
- to do with psymbols, just a matter of convenience. We want the
- export list to be freed when the objfile is deallocated */
- objfile->export_list
- = (ExportEntry *) obstack_alloc (&objfile->psymbol_obstack,
- export_list_size * sizeof (ExportEntry));
-
- /* Read in the export entries, a bunch at a time */
- for (j = 0, k = 0;
- j < (export_list_size / SOM_READ_EXPORTS_NUM);
- j++)
- {
- bfd_get_section_contents (objfile->obfd, text_section, buffer,
- export_list + j * SOM_READ_EXPORTS_CHUNK_SIZE,
- SOM_READ_EXPORTS_CHUNK_SIZE);
- for (i = 0; i < SOM_READ_EXPORTS_NUM; i++, k++)
- {
- if (buffer[i].type != (unsigned char) 0)
- {
- objfile->export_list[k].name
- = (char *) obstack_alloc (&objfile->psymbol_obstack, strlen (string_buffer + buffer[i].name) + 1);
- strcpy (objfile->export_list[k].name, string_buffer + buffer[i].name);
- objfile->export_list[k].address = buffer[i].value;
- /* Some day we might want to record the type and other information too */
- }
- else
- /* null type */
- {
- objfile->export_list[k].name = NULL;
- objfile->export_list[k].address = 0;
- }
- }
- }
-
- /* Get the leftovers */
- if (k < export_list_size)
- bfd_get_section_contents (objfile->obfd, text_section, buffer,
- export_list + k * sizeof (SomExportEntry),
- (export_list_size - k) * sizeof (SomExportEntry));
- for (i = 0; k < export_list_size; i++, k++)
- {
- if (buffer[i].type != (unsigned char) 0)
- {
- objfile->export_list[k].name
- = (char *) obstack_alloc (&objfile->psymbol_obstack, strlen (string_buffer + buffer[i].name) + 1);
- strcpy (objfile->export_list[k].name, string_buffer + buffer[i].name);
- /* Some day we might want to record the type and other information too */
- objfile->export_list[k].address = buffer[i].value;
- }
- else
- {
- objfile->export_list[k].name = NULL;
- objfile->export_list[k].address = 0;
- }
- }
-
- objfile->export_list_size = export_list_size;
- xfree (string_buffer);
- return export_list_size;
-}
-
-
-
-/* Register that we are able to handle SOM object file formats. */
-
-static struct sym_fns som_sym_fns =
-{
- bfd_target_som_flavour,
- som_new_init, /* sym_new_init: init anything gbl to entire symtab */
- som_symfile_init, /* sym_init: read initial info, setup for sym_read() */
- som_symfile_read, /* sym_read: read a symbol file into symtab */
- som_symfile_finish, /* sym_finish: finished with file, cleanup */
- som_symfile_offsets, /* sym_offsets: Translate ext. to int. relocation */
- NULL /* next: pointer to next struct sym_fns */
-};
-
-void
-_initialize_somread (void)
-{
- add_symtab_fns (&som_sym_fns);
-}
diff --git a/contrib/gdb/gdb/somsolib.c b/contrib/gdb/gdb/somsolib.c
deleted file mode 100644
index d623e4b76db9..000000000000
--- a/contrib/gdb/gdb/somsolib.c
+++ /dev/null
@@ -1,1616 +0,0 @@
-/* Handle HP SOM shared libraries for GDB, the GNU Debugger.
- Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
- Written by the Center for Software Science at the Univerity of Utah
- and by Cygnus Support. */
-
-
-#include "defs.h"
-
-#include "frame.h"
-#include "bfd.h"
-#include "som.h"
-#include "libhppa.h"
-#include "gdbcore.h"
-#include "symtab.h"
-#include "breakpoint.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "inferior.h"
-#include "gdb-stabs.h"
-#include "gdb_stat.h"
-#include "gdbcmd.h"
-#include "assert.h"
-#include "language.h"
-#include "regcache.h"
-
-#include <fcntl.h>
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-/* Uncomment this to turn on some debugging output.
- */
-
-/* #define SOLIB_DEBUG
- */
-
-/* Defined in exec.c; used to prevent dangling pointer bug.
- */
-extern struct target_ops exec_ops;
-
-/* This lives in hppa-tdep.c. */
-extern struct unwind_table_entry *find_unwind_entry (CORE_ADDR pc);
-
-/* These ought to be defined in some public interface, but aren't. They
- define the meaning of the various bits in the distinguished __dld_flags
- variable that is declared in every debuggable a.out on HP-UX, and that
- is shared between the debugger and the dynamic linker.
- */
-#define DLD_FLAGS_MAPPRIVATE 0x1
-#define DLD_FLAGS_HOOKVALID 0x2
-#define DLD_FLAGS_LISTVALID 0x4
-#define DLD_FLAGS_BOR_ENABLE 0x8
-
-/* TODO:
-
- * Most of this code should work for hp300 shared libraries. Does
- anyone care enough to weed out any SOM-isms.
-
- * Support for hpux8 dynamic linker. */
-
-/* The basic structure which describes a dynamically loaded object. This
- data structure is private to the dynamic linker and isn't found in
- any HPUX include file. */
-
-struct som_solib_mapped_entry
- {
- /* The name of the library. */
- char *name;
-
- /* Version of this structure (it is expected to change again in hpux10). */
- unsigned char struct_version;
-
- /* Binding mode for this library. */
- unsigned char bind_mode;
-
- /* Version of this library. */
- short library_version;
-
- /* Start of text address,
- * link-time text location (length of text area),
- * end of text address. */
- CORE_ADDR text_addr;
- CORE_ADDR text_link_addr;
- CORE_ADDR text_end;
-
- /* Start of data, start of bss and end of data. */
- CORE_ADDR data_start;
- CORE_ADDR bss_start;
- CORE_ADDR data_end;
-
- /* Value of linkage pointer (%r19). */
- CORE_ADDR got_value;
-
- /* Next entry. */
- struct som_solib_mapped_entry *next;
-
- /* There are other fields, but I don't have information as to what is
- contained in them. */
-
- /* For versions from HPUX-10.30 and up */
-
- /* Address in target of offset from thread-local register of
- * start of this thread's data. I.e., the first thread-local
- * variable in this shared library starts at *(tsd_start_addr)
- * from that area pointed to by cr27 (mpsfu_hi).
- *
- * We do the indirection as soon as we read it, so from then
- * on it's the offset itself.
- */
- CORE_ADDR tsd_start_addr;
-
- /* Following this are longwords holding:
-
- * ?, ?, ?, ptr to -1, ptr to-1, ptr to lib name (leaf name),
- * ptr to __data_start, ptr to __data_end
- */
-
-
- };
-
-/* A structure to keep track of all the known shared objects. */
-struct so_list
- {
- struct som_solib_mapped_entry som_solib;
- struct objfile *objfile;
- bfd *abfd;
- struct section_table *sections;
- struct section_table *sections_end;
-/* elz: added this field to store the address in target space (in the
- library) of the library descriptor (handle) which we read into
- som_solib_mapped_entry structure */
- CORE_ADDR solib_addr;
- struct so_list *next;
-
- };
-
-static struct so_list *so_list_head;
-
-
-/* This is the cumulative size in bytes of the symbol tables of all
- shared objects on the so_list_head list. (When we say size, here
- we mean of the information before it is brought into memory and
- potentially expanded by GDB.) When adding a new shlib, this value
- is compared against the threshold size, held by auto_solib_limit
- (in megabytes). If adding symbols for the new shlib would cause
- the total size to exceed the threshold, then the new shlib's
- symbols are not loaded. */
-static LONGEST som_solib_total_st_size;
-
-/* When the threshold is reached for any shlib, we refuse to add
- symbols for subsequent shlibs, even if those shlibs' symbols would
- be small enough to fit under the threshold. (Although this may
- result in one, early large shlib preventing the loading of later,
- smalller shlibs' symbols, it allows us to issue one informational
- message. The alternative, to issue a message for each shlib whose
- symbols aren't loaded, could be a big annoyance where the threshold
- is exceeded due to a very large number of shlibs.)
- */
-static int som_solib_st_size_threshold_exceeded;
-
-/* These addresses should be filled in by som_solib_create_inferior_hook.
- They are also used elsewhere in this module.
- */
-typedef struct
- {
- CORE_ADDR address;
- struct unwind_table_entry *unwind;
- }
-addr_and_unwind_t;
-
-/* When adding fields, be sure to clear them in _initialize_som_solib. */
-static struct
- {
- boolean is_valid;
- addr_and_unwind_t hook;
- addr_and_unwind_t hook_stub;
- addr_and_unwind_t load;
- addr_and_unwind_t load_stub;
- addr_and_unwind_t unload;
- addr_and_unwind_t unload2;
- addr_and_unwind_t unload_stub;
- }
-dld_cache;
-
-
-
-static void som_sharedlibrary_info_command (char *, int);
-
-static void som_solib_sharedlibrary_command (char *, int);
-
-static LONGEST
-som_solib_sizeof_symbol_table (char *filename)
-{
- bfd *abfd;
- int desc;
- char *absolute_name;
- LONGEST st_size = (LONGEST) 0;
- asection *sect;
-
- /* We believe that filename was handed to us by the dynamic linker, and
- is therefore always an absolute path.
- */
- desc = openp (getenv ("PATH"), 1, filename, O_RDONLY | O_BINARY, 0, &absolute_name);
- if (desc < 0)
- {
- perror_with_name (filename);
- }
- filename = absolute_name;
-
- abfd = bfd_fdopenr (filename, gnutarget, desc);
- if (!abfd)
- {
- close (desc);
- make_cleanup (xfree, filename);
- error ("\"%s\": can't open to read symbols: %s.", filename,
- bfd_errmsg (bfd_get_error ()));
- }
-
- if (!bfd_check_format (abfd, bfd_object)) /* Reads in section info */
- {
- bfd_close (abfd); /* This also closes desc */
- make_cleanup (xfree, filename);
- error ("\"%s\": can't read symbols: %s.", filename,
- bfd_errmsg (bfd_get_error ()));
- }
-
- /* Sum the sizes of the various sections that compose debug info. */
-
- /* This contains non-DOC information. */
- sect = bfd_get_section_by_name (abfd, "$DEBUG$");
- if (sect)
- st_size += (LONGEST) bfd_section_size (abfd, sect);
-
- /* This contains DOC information. */
- sect = bfd_get_section_by_name (abfd, "$PINFO$");
- if (sect)
- st_size += (LONGEST) bfd_section_size (abfd, sect);
-
- bfd_close (abfd); /* This also closes desc */
- xfree (filename);
-
- /* Unfortunately, just summing the sizes of various debug info
- sections isn't a very accurate measurement of how much heap
- space the debugger will need to hold them. It also doesn't
- account for space needed by linker (aka "minimal") symbols.
-
- Anecdotal evidence suggests that just summing the sizes of
- debug-info-related sections understates the heap space needed
- to represent it internally by about an order of magnitude.
-
- Since it's not exactly brain surgery we're doing here, rather
- than attempt to more accurately measure the size of a shlib's
- symbol table in GDB's heap, we'll just apply a 10x fudge-
- factor to the debug info sections' size-sum. No, this doesn't
- account for minimal symbols in non-debuggable shlibs. But it
- all roughly washes out in the end.
- */
- return st_size * (LONGEST) 10;
-}
-
-
-static void
-som_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty,
- CORE_ADDR text_addr)
-{
- obj_private_data_t *obj_private;
- struct obj_section *s;
-
- so->objfile = symbol_file_add (name, from_tty, NULL, 0, OBJF_SHARED);
- so->abfd = so->objfile->obfd;
-
- /* syms_from_objfile has bizarre section offset code,
- so I do my own right here. */
- for (s = so->objfile->sections; s < so->objfile->sections_end; s++)
- {
- flagword aflag = bfd_get_section_flags(so->abfd, s->the_bfd_section);
- if (aflag & SEC_CODE)
- {
- s->addr += so->som_solib.text_addr - so->som_solib.text_link_addr;
- s->endaddr += so->som_solib.text_addr - so->som_solib.text_link_addr;
- }
- else if (aflag & SEC_DATA)
- {
- s->addr += so->som_solib.data_start;
- s->endaddr += so->som_solib.data_start;
- }
- else
- ;
- }
-
- /* Mark this as a shared library and save private data.
- */
- so->objfile->flags |= OBJF_SHARED;
-
- if (so->objfile->obj_private == NULL)
- {
- obj_private = (obj_private_data_t *)
- obstack_alloc (&so->objfile->psymbol_obstack,
- sizeof (obj_private_data_t));
- obj_private->unwind_info = NULL;
- obj_private->so_info = NULL;
- so->objfile->obj_private = (PTR) obj_private;
- }
-
- obj_private = (obj_private_data_t *) so->objfile->obj_private;
- obj_private->so_info = so;
-
- if (!bfd_check_format (so->abfd, bfd_object))
- {
- error ("\"%s\": not in executable format: %s.",
- name, bfd_errmsg (bfd_get_error ()));
- }
-}
-
-
-static void
-som_solib_load_symbols (struct so_list *so, char *name, int from_tty,
- CORE_ADDR text_addr, struct target_ops *target)
-{
- struct section_table *p;
- int status;
- char buf[4];
- CORE_ADDR presumed_data_start;
-
-#ifdef SOLIB_DEBUG
- printf ("--Adding symbols for shared library \"%s\"\n", name);
-#endif
-
- som_solib_add_solib_objfile (so, name, from_tty, text_addr);
-
- /* Now we need to build a section table for this library since
- we might be debugging a core file from a dynamically linked
- executable in which the libraries were not privately mapped. */
- if (build_section_table (so->abfd,
- &so->sections,
- &so->sections_end))
- {
- error ("Unable to build section table for shared library\n.");
- return;
- }
-
- /* Relocate all the sections based on where they got loaded. */
- for (p = so->sections; p < so->sections_end; p++)
- {
- if (p->the_bfd_section->flags & SEC_CODE)
- {
- p->addr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT (so->objfile));
- p->endaddr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT (so->objfile));
- }
- else if (p->the_bfd_section->flags & SEC_DATA)
- {
- p->addr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA (so->objfile));
- p->endaddr += ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA (so->objfile));
- }
- }
-
- /* Now see if we need to map in the text and data for this shared
- library (for example debugging a core file which does not use
- private shared libraries.).
-
- Carefully peek at the first text address in the library. If the
- read succeeds, then the libraries were privately mapped and were
- included in the core dump file.
-
- If the peek failed, then the libraries were not privately mapped
- and are not in the core file, we'll have to read them in ourselves. */
- status = target_read_memory (text_addr, buf, 4);
- if (status != 0)
- {
- int old, new;
-
- new = so->sections_end - so->sections;
-
- old = target_resize_to_sections (target, new);
-
- /* Copy over the old data before it gets clobbered. */
- memcpy ((char *) (target->to_sections + old),
- so->sections,
- ((sizeof (struct section_table)) * new));
- }
-}
-
-
-/* Add symbols from shared libraries into the symtab list, unless the
- size threshold specified by auto_solib_limit (in megabytes) would
- be exceeded. */
-
-void
-som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int readsyms)
-{
- struct minimal_symbol *msymbol;
- struct so_list *so_list_tail;
- CORE_ADDR addr;
- asection *shlib_info;
- int status;
- unsigned int dld_flags;
- char buf[4], *re_err;
- int threshold_warning_given = 0;
-
- /* First validate our arguments. */
- if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL)
- {
- error ("Invalid regexp: %s", re_err);
- }
-
- /* If we're debugging a core file, or have attached to a running
- process, then som_solib_create_inferior_hook will not have been
- called.
-
- We need to first determine if we're dealing with a dynamically
- linked executable. If not, then return without an error or warning.
-
- We also need to examine __dld_flags to determine if the shared library
- list is valid and to determine if the libraries have been privately
- mapped. */
- if (symfile_objfile == NULL)
- return;
-
- /* First see if the objfile was dynamically linked. */
- shlib_info = bfd_get_section_by_name (symfile_objfile->obfd, "$SHLIB_INFO$");
- if (!shlib_info)
- return;
-
- /* It's got a $SHLIB_INFO$ section, make sure it's not empty. */
- if (bfd_section_size (symfile_objfile->obfd, shlib_info) == 0)
- return;
-
- msymbol = lookup_minimal_symbol ("__dld_flags", NULL, NULL);
- if (msymbol == NULL)
- {
- error ("Unable to find __dld_flags symbol in object file.\n");
- return;
- }
-
- addr = SYMBOL_VALUE_ADDRESS (msymbol);
- /* Read the current contents. */
- status = target_read_memory (addr, buf, 4);
- if (status != 0)
- {
- error ("Unable to read __dld_flags\n");
- return;
- }
- dld_flags = extract_unsigned_integer (buf, 4);
-
- /* __dld_list may not be valid. If not, then we punt, warning the user if
- we were called as a result of the add-symfile command.
- */
- if ((dld_flags & DLD_FLAGS_LISTVALID) == 0)
- {
- if (from_tty)
- error ("__dld_list is not valid according to __dld_flags.\n");
- return;
- }
-
- /* If the libraries were not mapped private, warn the user. */
- if ((dld_flags & DLD_FLAGS_MAPPRIVATE) == 0)
- warning ("The shared libraries were not privately mapped; setting a\nbreakpoint in a shared library will not work until you rerun the program.\n");
-
- msymbol = lookup_minimal_symbol ("__dld_list", NULL, NULL);
- if (!msymbol)
- {
- /* Older crt0.o files (hpux8) don't have __dld_list as a symbol,
- but the data is still available if you know where to look. */
- msymbol = lookup_minimal_symbol ("__dld_flags", NULL, NULL);
- if (!msymbol)
- {
- error ("Unable to find dynamic library list.\n");
- return;
- }
- addr = SYMBOL_VALUE_ADDRESS (msymbol) - 8;
- }
- else
- addr = SYMBOL_VALUE_ADDRESS (msymbol);
-
- status = target_read_memory (addr, buf, 4);
- if (status != 0)
- {
- error ("Unable to find dynamic library list.\n");
- return;
- }
-
- addr = extract_unsigned_integer (buf, 4);
-
- /* If addr is zero, then we're using an old dynamic loader which
- doesn't maintain __dld_list. We'll have to use a completely
- different approach to get shared library information. */
- if (addr == 0)
- goto old_dld;
-
- /* Using the information in __dld_list is the preferred method
- to get at shared library information. It doesn't depend on
- any functions in /opt/langtools/lib/end.o and has a chance of working
- with hpux10 when it is released. */
- status = target_read_memory (addr, buf, 4);
- if (status != 0)
- {
- error ("Unable to find dynamic library list.\n");
- return;
- }
-
- /* addr now holds the address of the first entry in the dynamic
- library list. */
- addr = extract_unsigned_integer (buf, 4);
-
- /* Now that we have a pointer to the dynamic library list, walk
- through it and add the symbols for each library. */
-
- so_list_tail = so_list_head;
- /* Find the end of the list of shared objects. */
- while (so_list_tail && so_list_tail->next)
- so_list_tail = so_list_tail->next;
-
-#ifdef SOLIB_DEBUG
- printf ("--About to read shared library list data\n");
-#endif
-
- /* "addr" will always point to the base of the
- * current data entry describing the current
- * shared library.
- */
- while (1)
- {
- CORE_ADDR name_addr, text_addr;
- unsigned int name_len;
- char *name;
- struct so_list *new_so;
- struct so_list *so_list = so_list_head;
- struct stat statbuf;
- LONGEST st_size;
- int is_main_program;
-
- if (addr == 0)
- break;
-
- /* Get a pointer to the name of this library. */
- status = target_read_memory (addr, buf, 4);
- if (status != 0)
- goto err;
-
- name_addr = extract_unsigned_integer (buf, 4);
- name_len = 0;
- while (1)
- {
- target_read_memory (name_addr + name_len, buf, 1);
- if (status != 0)
- goto err;
-
- name_len++;
- if (*buf == '\0')
- break;
- }
- name = alloca (name_len);
- status = target_read_memory (name_addr, name, name_len);
- if (status != 0)
- goto err;
-
- /* See if we've already loaded something with this name. */
- while (so_list)
- {
- if (!strcmp (so_list->som_solib.name, name))
- break;
- so_list = so_list->next;
- }
-
- /* See if the file exists. If not, give a warning, but don't
- die. */
- status = stat (name, &statbuf);
- if (status == -1)
- {
- warning ("Can't find file %s referenced in dld_list.", name);
-
- status = target_read_memory (addr + 36, buf, 4);
- if (status != 0)
- goto err;
-
- addr = (CORE_ADDR) extract_unsigned_integer (buf, 4);
- continue;
- }
-
- /* If we've already loaded this one or it's the main program, skip it. */
- is_main_program = (strcmp (name, symfile_objfile->name) == 0);
- if (so_list || is_main_program)
- {
- /* This is the "next" pointer in the strcuture.
- */
- status = target_read_memory (addr + 36, buf, 4);
- if (status != 0)
- goto err;
-
- addr = (CORE_ADDR) extract_unsigned_integer (buf, 4);
-
- /* Record the main program's symbol table size. */
- if (is_main_program && !so_list)
- {
- st_size = som_solib_sizeof_symbol_table (name);
- som_solib_total_st_size += st_size;
- }
-
- /* Was this a shlib that we noted but didn't load the symbols for?
- If so, were we invoked this time from the command-line, via
- a 'sharedlibrary' or 'add-symbol-file' command? If yes to
- both, we'd better load the symbols this time.
- */
- if (from_tty && so_list && !is_main_program && (so_list->objfile == NULL))
- som_solib_load_symbols (so_list,
- name,
- from_tty,
- so_list->som_solib.text_addr,
- target);
-
- continue;
- }
-
- name = obsavestring (name, name_len - 1,
- &symfile_objfile->symbol_obstack);
-
- status = target_read_memory (addr + 8, buf, 4);
- if (status != 0)
- goto err;
-
- text_addr = extract_unsigned_integer (buf, 4);
-
- new_so = (struct so_list *) xmalloc (sizeof (struct so_list));
- memset ((char *) new_so, 0, sizeof (struct so_list));
- if (so_list_head == NULL)
- {
- so_list_head = new_so;
- so_list_tail = new_so;
- }
- else
- {
- so_list_tail->next = new_so;
- so_list_tail = new_so;
- }
-
- /* Fill in all the entries in GDB's shared library list.
- */
-
- new_so->solib_addr = addr;
- new_so->som_solib.name = name;
- status = target_read_memory (addr + 4, buf, 4);
- if (status != 0)
- goto err;
-
- new_so->som_solib.struct_version = extract_unsigned_integer (buf + 3, 1);
- new_so->som_solib.bind_mode = extract_unsigned_integer (buf + 2, 1);
- /* Following is "high water mark", highest version number
- * seen, rather than plain version number.
- */
- new_so->som_solib.library_version = extract_unsigned_integer (buf, 2);
- new_so->som_solib.text_addr = text_addr;
-
- /* Q: What about longword at "addr + 8"?
- * A: It's read above, out of order, into "text_addr".
- */
-
- status = target_read_memory (addr + 12, buf, 4);
- if (status != 0)
- goto err;
-
- new_so->som_solib.text_link_addr = extract_unsigned_integer (buf, 4);
-
- status = target_read_memory (addr + 16, buf, 4);
- if (status != 0)
- goto err;
-
- new_so->som_solib.text_end = extract_unsigned_integer (buf, 4);
-
- status = target_read_memory (addr + 20, buf, 4);
- if (status != 0)
- goto err;
-
- new_so->som_solib.data_start = extract_unsigned_integer (buf, 4);
-
- status = target_read_memory (addr + 24, buf, 4);
- if (status != 0)
- goto err;
-
- new_so->som_solib.bss_start = extract_unsigned_integer (buf, 4);
-
- status = target_read_memory (addr + 28, buf, 4);
- if (status != 0)
- goto err;
-
- new_so->som_solib.data_end = extract_unsigned_integer (buf, 4);
-
- status = target_read_memory (addr + 32, buf, 4);
- if (status != 0)
- goto err;
-
- new_so->som_solib.got_value = extract_unsigned_integer (buf, 4);
-
- status = target_read_memory (addr + 36, buf, 4);
- if (status != 0)
- goto err;
-
- new_so->som_solib.next =
- address_to_host_pointer (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.
- */
-
- status = target_read_memory (addr + 40, buf, 4);
- new_so->som_solib.tsd_start_addr = extract_unsigned_integer (buf, 4);
- if (status != 0)
- goto err;
-
- /* Now indirect via that value!
- */
- status = target_read_memory (new_so->som_solib.tsd_start_addr, buf, 4);
- new_so->som_solib.tsd_start_addr = extract_unsigned_integer (buf, 4);
- if (status != 0)
- goto err;
-#ifdef SOLIB_DEBUG
- printf ("\n+ library \"%s\" is described at 0x%x\n", name, addr);
- printf (" 'version' is %d\n", new_so->som_solib.struct_version);
- printf (" 'bind_mode' is %d\n", new_so->som_solib.bind_mode);
- printf (" 'library_version' is %d\n", new_so->som_solib.library_version);
- printf (" 'text_addr' is 0x%x\n", new_so->som_solib.text_addr);
- printf (" 'text_link_addr' is 0x%x\n", new_so->som_solib.text_link_addr);
- printf (" 'text_end' is 0x%x\n", new_so->som_solib.text_end);
- printf (" 'data_start' is 0x%x\n", new_so->som_solib.data_start);
- printf (" 'bss_start' is 0x%x\n", new_so->som_solib.bss_start);
- printf (" 'data_end' is 0x%x\n", new_so->som_solib.data_end);
- printf (" 'got_value' is %x\n", new_so->som_solib.got_value);
- printf (" 'next' is 0x%x\n", new_so->som_solib.next);
- printf (" 'tsd_start_addr' is 0x%x\n", new_so->som_solib.tsd_start_addr);
-#endif
-
- /* Go on to the next shared library descriptor.
- */
- addr = (CORE_ADDR) new_so->som_solib.next;
-
-
-
- /* At this point, we have essentially hooked the shlib into the
- "info share" command. However, we haven't yet loaded its
- symbol table. We must now decide whether we ought to, i.e.,
- whether doing so would exceed the symbol table size threshold.
-
- If the threshold has just now been exceeded, then we'll issue
- a warning message (which explains how to load symbols manually,
- if the user so desires).
-
- If the threshold has just now or previously been exceeded,
- we'll just add the shlib to the list of object files, but won't
- actually load its symbols. (This is more useful than it might
- sound, for it allows us to e.g., still load and use the shlibs'
- unwind information for stack tracebacks.)
- */
-
- /* Note that we DON'T want to preclude the user from using the
- add-symbol-file command! Thus, we only worry about the threshold
- when we're invoked for other reasons.
- */
- st_size = som_solib_sizeof_symbol_table (name);
- som_solib_st_size_threshold_exceeded =
- !from_tty &&
- auto_solib_limit > 0 &&
- readsyms &&
- ((st_size + som_solib_total_st_size) > (auto_solib_limit * (LONGEST) (1024 * 1024)));
-
- if (som_solib_st_size_threshold_exceeded)
- {
- if (!threshold_warning_given)
- warning ("Symbols for some libraries have not been loaded, because\ndoing so would exceed the size threshold specified by auto-solib-limit.\nTo manually load symbols, use the 'sharedlibrary' command.\nTo raise the threshold, set auto-solib-limit to a larger value and rerun\nthe program.\n");
- threshold_warning_given = 1;
-
- /* We'll still make note of this shlib, even if we don't
- read its symbols. This allows us to use its unwind
- information well enough to know how to e.g., correctly
- do a traceback from a PC within the shlib, even if we
- can't symbolize those PCs...
- */
- som_solib_add_solib_objfile (new_so, name, from_tty, text_addr);
- continue;
- }
-
- som_solib_total_st_size += st_size;
-
- /* This fills in new_so->objfile, among others. */
- som_solib_load_symbols (new_so, name, from_tty, text_addr, target);
- }
-
-#ifdef SOLIB_DEBUG
- printf ("--Done reading shared library data\n");
-#endif
-
- /* Getting new symbols may change our opinion about what is
- frameless. */
- reinit_frame_cache ();
- return;
-
-old_dld:
- error ("Debugging dynamic executables loaded via the hpux8 dld.sl is not supported.\n");
- return;
-
-err:
- error ("Error while reading dynamic library list.\n");
- return;
-}
-
-
-/* This hook gets called just before the first instruction in the
- inferior process is executed.
-
- This is our opportunity to set magic flags in the inferior so
- that GDB can be notified when a shared library is mapped in and
- to tell the dynamic linker that a private copy of the library is
- needed (so GDB can set breakpoints in the library).
-
- __dld_flags is the location of the magic flags; as of this implementation
- there are 3 flags of interest:
-
- bit 0 when set indicates that private copies of the libraries are needed
- bit 1 when set indicates that the callback hook routine is valid
- bit 2 when set indicates that the dynamic linker should maintain the
- __dld_list structure when loading/unloading libraries.
-
- Note that shared libraries are not mapped in at this time, so we have
- run the inferior until the libraries are mapped in. Typically this
- means running until the "_start" is called. */
-
-void
-som_solib_create_inferior_hook (void)
-{
- struct minimal_symbol *msymbol;
- unsigned int dld_flags, status, have_endo;
- asection *shlib_info;
- char buf[4];
- struct objfile *objfile;
- CORE_ADDR anaddr;
-
- /* First, remove all the solib event breakpoints. Their addresses
- may have changed since the last time we ran the program. */
- remove_solib_event_breakpoints ();
-
- if (symfile_objfile == NULL)
- return;
-
- /* First see if the objfile was dynamically linked. */
- shlib_info = bfd_get_section_by_name (symfile_objfile->obfd, "$SHLIB_INFO$");
- if (!shlib_info)
- return;
-
- /* It's got a $SHLIB_INFO$ section, make sure it's not empty. */
- if (bfd_section_size (symfile_objfile->obfd, shlib_info) == 0)
- return;
-
- have_endo = 0;
- /* Slam the pid of the process into __d_pid.
-
- We used to warn when this failed, but that warning is only useful
- on very old HP systems (hpux9 and older). The warnings are an
- annoyance to users of modern systems and foul up the testsuite as
- well. As a result, the warnings have been disabled. */
- msymbol = lookup_minimal_symbol ("__d_pid", NULL, symfile_objfile);
- if (msymbol == NULL)
- goto keep_going;
-
- anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
- store_unsigned_integer (buf, 4, PIDGET (inferior_ptid));
- status = target_write_memory (anaddr, buf, 4);
- if (status != 0)
- {
- warning ("Unable to write __d_pid");
- warning ("Suggest linking with /opt/langtools/lib/end.o.");
- warning ("GDB will be unable to track shl_load/shl_unload calls");
- goto keep_going;
- }
-
- /* Get the value of _DLD_HOOK (an export stub) and put it in __dld_hook;
- This will force the dynamic linker to call __d_trap when significant
- events occur.
-
- Note that the above is the pre-HP-UX 9.0 behaviour. At 9.0 and above,
- the dld provides an export stub named "__d_trap" as well as the
- function named "__d_trap" itself, but doesn't provide "_DLD_HOOK".
- We'll look first for the old flavor and then the new.
- */
- msymbol = lookup_minimal_symbol ("_DLD_HOOK", NULL, symfile_objfile);
- if (msymbol == NULL)
- msymbol = lookup_minimal_symbol ("__d_trap", NULL, symfile_objfile);
- if (msymbol == NULL)
- {
- warning ("Unable to find _DLD_HOOK symbol in object file.");
- warning ("Suggest linking with /opt/langtools/lib/end.o.");
- warning ("GDB will be unable to track shl_load/shl_unload calls");
- goto keep_going;
- }
- anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
- dld_cache.hook.address = anaddr;
-
- /* Grrr, this might not be an export symbol! We have to find the
- export stub. */
- ALL_OBJFILES (objfile)
- {
- struct unwind_table_entry *u;
- struct minimal_symbol *msymbol2;
-
- /* What a crock. */
- msymbol2 = lookup_minimal_symbol_solib_trampoline (SYMBOL_NAME (msymbol),
- NULL, objfile);
- /* Found a symbol with the right name. */
- if (msymbol2)
- {
- struct unwind_table_entry *u;
- /* It must be a shared library trampoline. */
- if (SYMBOL_TYPE (msymbol2) != mst_solib_trampoline)
- continue;
-
- /* It must also be an export stub. */
- u = find_unwind_entry (SYMBOL_VALUE (msymbol2));
- if (!u || u->stub_unwind.stub_type != EXPORT)
- continue;
-
- /* OK. Looks like the correct import stub. */
- anaddr = SYMBOL_VALUE (msymbol2);
- dld_cache.hook_stub.address = anaddr;
- }
- }
- store_unsigned_integer (buf, 4, anaddr);
-
- msymbol = lookup_minimal_symbol ("__dld_hook", NULL, symfile_objfile);
- if (msymbol == NULL)
- {
- warning ("Unable to find __dld_hook symbol in object file.");
- warning ("Suggest linking with /opt/langtools/lib/end.o.");
- warning ("GDB will be unable to track shl_load/shl_unload calls");
- goto keep_going;
- }
- anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
- status = target_write_memory (anaddr, buf, 4);
-
- /* Now set a shlib_event breakpoint at __d_trap so we can track
- significant shared library events. */
- msymbol = lookup_minimal_symbol ("__d_trap", NULL, symfile_objfile);
- if (msymbol == NULL)
- {
- warning ("Unable to find __dld_d_trap symbol in object file.");
- warning ("Suggest linking with /opt/langtools/lib/end.o.");
- warning ("GDB will be unable to track shl_load/shl_unload calls");
- goto keep_going;
- }
- create_solib_event_breakpoint (SYMBOL_VALUE_ADDRESS (msymbol));
-
- /* We have all the support usually found in end.o, so we can track
- shl_load and shl_unload calls. */
- have_endo = 1;
-
-keep_going:
-
- /* Get the address of __dld_flags, if no such symbol exists, then we can
- not debug the shared code. */
- msymbol = lookup_minimal_symbol ("__dld_flags", NULL, NULL);
- if (msymbol == NULL)
- {
- error ("Unable to find __dld_flags symbol in object file.\n");
- }
-
- anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
-
- /* Read the current contents. */
- status = target_read_memory (anaddr, buf, 4);
- if (status != 0)
- {
- error ("Unable to read __dld_flags\n");
- }
- dld_flags = extract_unsigned_integer (buf, 4);
-
- /* Turn on the flags we care about. */
- dld_flags |= DLD_FLAGS_MAPPRIVATE;
- if (have_endo)
- dld_flags |= DLD_FLAGS_HOOKVALID;
- store_unsigned_integer (buf, 4, dld_flags);
- status = target_write_memory (anaddr, buf, 4);
- if (status != 0)
- {
- error ("Unable to write __dld_flags\n");
- }
-
- /* Now find the address of _start and set a breakpoint there.
- We still need this code for two reasons:
-
- * Not all sites have /opt/langtools/lib/end.o, so it's not always
- possible to track the dynamic linker's events.
-
- * At this time no events are triggered for shared libraries
- loaded at startup time (what a crock). */
-
- msymbol = lookup_minimal_symbol ("_start", NULL, symfile_objfile);
- if (msymbol == NULL)
- {
- error ("Unable to find _start symbol in object file.\n");
- }
-
- anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
-
- /* Make the breakpoint at "_start" a shared library event breakpoint. */
- create_solib_event_breakpoint (anaddr);
-
- /* Wipe out all knowledge of old shared libraries since their
- mapping can change from one exec to another! */
- while (so_list_head)
- {
- struct so_list *temp;
-
- temp = so_list_head;
- xfree (so_list_head);
- so_list_head = temp->next;
- }
- clear_symtab_users ();
-}
-
-/* This operation removes the "hook" between GDB and the dynamic linker,
- which causes the dld to notify GDB of shared library events.
-
- After this operation completes, the dld will no longer notify GDB of
- shared library events. To resume notifications, GDB must call
- som_solib_create_inferior_hook.
-
- This operation does not remove any knowledge of shared libraries which
- GDB may already have been notified of.
- */
-void
-som_solib_remove_inferior_hook (int pid)
-{
- CORE_ADDR addr;
- struct minimal_symbol *msymbol;
- int status;
- char dld_flags_buffer[TARGET_INT_BIT / TARGET_CHAR_BIT];
- unsigned int dld_flags_value;
- struct cleanup *old_cleanups = save_inferior_ptid ();
-
- /* Ensure that we're really operating on the specified process. */
- inferior_ptid = pid_to_ptid (pid);
-
- /* We won't bother to remove the solib breakpoints from this process.
-
- In fact, on PA64 the breakpoint is hard-coded into the dld callback,
- and thus we're not supposed to remove it.
-
- Rather, we'll merely clear the dld_flags bit that enables callbacks.
- */
- msymbol = lookup_minimal_symbol ("__dld_flags", NULL, NULL);
-
- addr = SYMBOL_VALUE_ADDRESS (msymbol);
- status = target_read_memory (addr, dld_flags_buffer, TARGET_INT_BIT / TARGET_CHAR_BIT);
-
- dld_flags_value = extract_unsigned_integer (dld_flags_buffer,
- sizeof (dld_flags_value));
-
- dld_flags_value &= ~DLD_FLAGS_HOOKVALID;
- store_unsigned_integer (dld_flags_buffer,
- sizeof (dld_flags_value),
- dld_flags_value);
- status = target_write_memory (addr, dld_flags_buffer, TARGET_INT_BIT / TARGET_CHAR_BIT);
-
- do_cleanups (old_cleanups);
-}
-
-
-/* This function creates a breakpoint on the dynamic linker hook, which
- is called when e.g., a shl_load or shl_unload call is made. This
- breakpoint will only trigger when a shl_load call is made.
-
- If filename is NULL, then loads of any dll will be caught. Else,
- only loads of the file whose pathname is the string contained by
- filename will be caught.
-
- Undefined behaviour is guaranteed if this function is called before
- som_solib_create_inferior_hook.
- */
-void
-som_solib_create_catch_load_hook (int pid, int tempflag, char *filename,
- char *cond_string)
-{
- create_solib_load_event_breakpoint ("__d_trap", tempflag, filename, cond_string);
-}
-
-/* This function creates a breakpoint on the dynamic linker hook, which
- is called when e.g., a shl_load or shl_unload call is made. This
- breakpoint will only trigger when a shl_unload call is made.
-
- If filename is NULL, then unloads of any dll will be caught. Else,
- only unloads of the file whose pathname is the string contained by
- filename will be caught.
-
- Undefined behaviour is guaranteed if this function is called before
- som_solib_create_inferior_hook.
- */
-void
-som_solib_create_catch_unload_hook (int pid, int tempflag, char *filename,
- char *cond_string)
-{
- create_solib_unload_event_breakpoint ("__d_trap", tempflag, filename, cond_string);
-}
-
-int
-som_solib_have_load_event (int pid)
-{
- CORE_ADDR event_kind;
-
- event_kind = read_register (ARG0_REGNUM);
- return (event_kind == SHL_LOAD);
-}
-
-int
-som_solib_have_unload_event (int pid)
-{
- CORE_ADDR event_kind;
-
- event_kind = read_register (ARG0_REGNUM);
- return (event_kind == SHL_UNLOAD);
-}
-
-static char *
-som_solib_library_pathname (int pid)
-{
- CORE_ADDR dll_handle_address;
- CORE_ADDR dll_pathname_address;
- struct som_solib_mapped_entry dll_descriptor;
- char *p;
- static char dll_pathname[1024];
-
- /* Read the descriptor of this newly-loaded library. */
- dll_handle_address = read_register (ARG1_REGNUM);
- read_memory (dll_handle_address, (char *) &dll_descriptor, sizeof (dll_descriptor));
-
- /* We can find a pointer to the dll's pathname within the descriptor. */
- dll_pathname_address = (CORE_ADDR) dll_descriptor.name;
-
- /* Read the pathname, one byte at a time. */
- p = dll_pathname;
- for (;;)
- {
- char b;
- read_memory (dll_pathname_address++, (char *) &b, 1);
- *p++ = b;
- if (b == '\0')
- break;
- }
-
- return dll_pathname;
-}
-
-char *
-som_solib_loaded_library_pathname (int pid)
-{
- if (!som_solib_have_load_event (pid))
- error ("Must have a load event to use this query");
-
- return som_solib_library_pathname (pid);
-}
-
-char *
-som_solib_unloaded_library_pathname (int pid)
-{
- if (!som_solib_have_unload_event (pid))
- error ("Must have an unload event to use this query");
-
- return som_solib_library_pathname (pid);
-}
-
-static void
-som_solib_desire_dynamic_linker_symbols (void)
-{
- struct objfile *objfile;
- struct unwind_table_entry *u;
- struct minimal_symbol *dld_msymbol;
-
- /* Do we already know the value of these symbols? If so, then
- we've no work to do.
-
- (If you add clauses to this test, be sure to likewise update the
- test within the loop.)
- */
- if (dld_cache.is_valid)
- return;
-
- ALL_OBJFILES (objfile)
- {
- dld_msymbol = lookup_minimal_symbol ("shl_load", NULL, objfile);
- if (dld_msymbol != NULL)
- {
- dld_cache.load.address = SYMBOL_VALUE (dld_msymbol);
- dld_cache.load.unwind = find_unwind_entry (dld_cache.load.address);
- }
-
- dld_msymbol = lookup_minimal_symbol_solib_trampoline ("shl_load",
- NULL,
- objfile);
- if (dld_msymbol != NULL)
- {
- if (SYMBOL_TYPE (dld_msymbol) == mst_solib_trampoline)
- {
- u = find_unwind_entry (SYMBOL_VALUE (dld_msymbol));
- if ((u != NULL) && (u->stub_unwind.stub_type == EXPORT))
- {
- dld_cache.load_stub.address = SYMBOL_VALUE (dld_msymbol);
- dld_cache.load_stub.unwind = u;
- }
- }
- }
-
- dld_msymbol = lookup_minimal_symbol ("shl_unload", NULL, objfile);
- if (dld_msymbol != NULL)
- {
- dld_cache.unload.address = SYMBOL_VALUE (dld_msymbol);
- dld_cache.unload.unwind = find_unwind_entry (dld_cache.unload.address);
-
- /* ??rehrauer: I'm not sure exactly what this is, but it appears
- that on some HPUX 10.x versions, there's two unwind regions to
- cover the body of "shl_unload", the second being 4 bytes past
- the end of the first. This is a large hack to handle that
- case, but since I don't seem to have any legitimate way to
- look for this thing via the symbol table...
- */
- if (dld_cache.unload.unwind != NULL)
- {
- u = find_unwind_entry (dld_cache.unload.unwind->region_end + 4);
- if (u != NULL)
- {
- dld_cache.unload2.address = u->region_start;
- dld_cache.unload2.unwind = u;
- }
- }
- }
-
- dld_msymbol = lookup_minimal_symbol_solib_trampoline ("shl_unload",
- NULL,
- objfile);
- if (dld_msymbol != NULL)
- {
- if (SYMBOL_TYPE (dld_msymbol) == mst_solib_trampoline)
- {
- u = find_unwind_entry (SYMBOL_VALUE (dld_msymbol));
- if ((u != NULL) && (u->stub_unwind.stub_type == EXPORT))
- {
- dld_cache.unload_stub.address = SYMBOL_VALUE (dld_msymbol);
- dld_cache.unload_stub.unwind = u;
- }
- }
- }
-
- /* Did we find everything we were looking for? If so, stop. */
- if ((dld_cache.load.address != 0)
- && (dld_cache.load_stub.address != 0)
- && (dld_cache.unload.address != 0)
- && (dld_cache.unload_stub.address != 0))
- {
- dld_cache.is_valid = 1;
- break;
- }
- }
-
- dld_cache.hook.unwind = find_unwind_entry (dld_cache.hook.address);
- dld_cache.hook_stub.unwind = find_unwind_entry (dld_cache.hook_stub.address);
-
- /* We're prepared not to find some of these symbols, which is why
- this function is a "desire" operation, and not a "require".
- */
-}
-
-int
-som_solib_in_dynamic_linker (int pid, CORE_ADDR pc)
-{
- struct unwind_table_entry *u_pc;
-
- /* Are we in the dld itself?
-
- ??rehrauer: Large hack -- We'll assume that any address in a
- shared text region is the dld's text. This would obviously
- fall down if the user attached to a process, whose shlibs
- weren't mapped to a (writeable) private region. However, in
- that case the debugger probably isn't able to set the fundamental
- breakpoint in the dld callback anyways, so this hack should be
- safe.
- */
- if ((pc & (CORE_ADDR) 0xc0000000) == (CORE_ADDR) 0xc0000000)
- return 1;
-
- /* Cache the address of some symbols that are part of the dynamic
- linker, if not already known.
- */
- som_solib_desire_dynamic_linker_symbols ();
-
- /* Are we in the dld callback? Or its export stub? */
- u_pc = find_unwind_entry (pc);
- if (u_pc == NULL)
- return 0;
-
- if ((u_pc == dld_cache.hook.unwind) || (u_pc == dld_cache.hook_stub.unwind))
- return 1;
-
- /* Or the interface of the dld (i.e., "shl_load" or friends)? */
- if ((u_pc == dld_cache.load.unwind)
- || (u_pc == dld_cache.unload.unwind)
- || (u_pc == dld_cache.unload2.unwind)
- || (u_pc == dld_cache.load_stub.unwind)
- || (u_pc == dld_cache.unload_stub.unwind))
- return 1;
-
- /* Apparently this address isn't part of the dld's text. */
- return 0;
-}
-
-
-/* Return the GOT value for the shared library in which ADDR belongs. If
- ADDR isn't in any known shared library, return zero. */
-
-CORE_ADDR
-som_solib_get_got_by_pc (CORE_ADDR addr)
-{
- struct so_list *so_list = so_list_head;
- CORE_ADDR got_value = 0;
-
- while (so_list)
- {
- if (so_list->som_solib.text_addr <= addr
- && so_list->som_solib.text_end > addr)
- {
- got_value = so_list->som_solib.got_value;
- break;
- }
- so_list = so_list->next;
- }
- return got_value;
-}
-
-/* elz:
- Return the address of the handle of the shared library
- in which ADDR belongs. If
- ADDR isn't in any known shared library, return zero. */
-/* this function is used in hppa_fix_call_dummy in hppa-tdep.c */
-
-CORE_ADDR
-som_solib_get_solib_by_pc (CORE_ADDR addr)
-{
- struct so_list *so_list = so_list_head;
-
- while (so_list)
- {
- if (so_list->som_solib.text_addr <= addr
- && so_list->som_solib.text_end > addr)
- {
- break;
- }
- so_list = so_list->next;
- }
- if (so_list)
- return so_list->solib_addr;
- else
- return 0;
-}
-
-
-int
-som_solib_section_offsets (struct objfile *objfile,
- struct section_offsets *offsets)
-{
- struct so_list *so_list = so_list_head;
-
- while (so_list)
- {
- /* Oh what a pain! We need the offsets before so_list->objfile
- is valid. The BFDs will never match. Make a best guess. */
- if (strstr (objfile->name, so_list->som_solib.name))
- {
- asection *private_section;
-
- /* The text offset is easy. */
- offsets->offsets[SECT_OFF_TEXT (objfile)]
- = (so_list->som_solib.text_addr
- - so_list->som_solib.text_link_addr);
- offsets->offsets[SECT_OFF_RODATA (objfile)]
- = ANOFFSET (offsets, SECT_OFF_TEXT (objfile));
-
- /* We should look at presumed_dp in the SOM header, but
- that's not easily available. This should be OK though. */
- private_section = bfd_get_section_by_name (objfile->obfd,
- "$PRIVATE$");
- if (!private_section)
- {
- warning ("Unable to find $PRIVATE$ in shared library!");
- offsets->offsets[SECT_OFF_DATA (objfile)] = 0;
- offsets->offsets[SECT_OFF_BSS (objfile)] = 0;
- return 1;
- }
- offsets->offsets[SECT_OFF_DATA (objfile)]
- = (so_list->som_solib.data_start - private_section->vma);
- offsets->offsets[SECT_OFF_BSS (objfile)]
- = ANOFFSET (offsets, SECT_OFF_DATA (objfile));
- return 1;
- }
- so_list = so_list->next;
- }
- return 0;
-}
-
-/* Dump information about all the currently loaded shared libraries. */
-
-static void
-som_sharedlibrary_info_command (char *ignore, int from_tty)
-{
- struct so_list *so_list = so_list_head;
-
- if (exec_bfd == NULL)
- {
- printf_unfiltered ("No executable file.\n");
- return;
- }
-
- if (so_list == NULL)
- {
- printf_unfiltered ("No shared libraries loaded at this time.\n");
- return;
- }
-
- printf_unfiltered ("Shared Object Libraries\n");
- printf_unfiltered (" %-12s%-12s%-12s%-12s%-12s%-12s\n",
- " flags", " tstart", " tend", " dstart", " dend", " dlt");
- while (so_list)
- {
- unsigned int flags;
-
- flags = so_list->som_solib.struct_version << 24;
- flags |= so_list->som_solib.bind_mode << 16;
- flags |= so_list->som_solib.library_version;
- printf_unfiltered ("%s", so_list->som_solib.name);
- if (so_list->objfile == NULL)
- printf_unfiltered (" (symbols not loaded)");
- printf_unfiltered ("\n");
- printf_unfiltered (" %-12s", local_hex_string_custom (flags, "08l"));
- printf_unfiltered ("%-12s",
- local_hex_string_custom (so_list->som_solib.text_addr, "08l"));
- printf_unfiltered ("%-12s",
- local_hex_string_custom (so_list->som_solib.text_end, "08l"));
- printf_unfiltered ("%-12s",
- local_hex_string_custom (so_list->som_solib.data_start, "08l"));
- printf_unfiltered ("%-12s",
- local_hex_string_custom (so_list->som_solib.data_end, "08l"));
- printf_unfiltered ("%-12s\n",
- local_hex_string_custom (so_list->som_solib.got_value, "08l"));
- so_list = so_list->next;
- }
-}
-
-static void
-som_solib_sharedlibrary_command (char *args, int from_tty)
-{
- dont_repeat ();
- som_solib_add (args, from_tty, (struct target_ops *) 0, 1);
-}
-
-
-
-char *
-som_solib_address (CORE_ADDR addr)
-{
- struct so_list *so = so_list_head;
-
- while (so)
- {
- /* Is this address within this shlib's text range? If so,
- return the shlib's name.
- */
- if ((addr >= so->som_solib.text_addr) && (addr <= so->som_solib.text_end))
- return so->som_solib.name;
-
- /* Nope, keep looking... */
- so = so->next;
- }
-
- /* No, we couldn't prove that the address is within a shlib. */
- return NULL;
-}
-
-
-void
-som_solib_restart (void)
-{
- struct so_list *sl = so_list_head;
-
- /* Before the shlib info vanishes, use it to disable any breakpoints
- that may still be active in those shlibs.
- */
- disable_breakpoints_in_shlibs (0);
-
- /* Discard all the shlib descriptors.
- */
- while (sl)
- {
- struct so_list *next_sl = sl->next;
- xfree (sl);
- sl = next_sl;
- }
- so_list_head = NULL;
-
- som_solib_total_st_size = (LONGEST) 0;
- som_solib_st_size_threshold_exceeded = 0;
-
- dld_cache.is_valid = 0;
-
- dld_cache.hook.address = 0;
- dld_cache.hook.unwind = NULL;
-
- dld_cache.hook_stub.address = 0;
- dld_cache.hook_stub.unwind = NULL;
-
- dld_cache.load.address = 0;
- dld_cache.load.unwind = NULL;
-
- dld_cache.load_stub.address = 0;
- dld_cache.load_stub.unwind = NULL;
-
- dld_cache.unload.address = 0;
- dld_cache.unload.unwind = NULL;
-
- dld_cache.unload2.address = 0;
- dld_cache.unload2.unwind = NULL;
-
- dld_cache.unload_stub.address = 0;
- dld_cache.unload_stub.unwind = NULL;
-}
-
-
-/* LOCAL FUNCTION
-
- no_shared_libraries -- handle command to explicitly discard symbols
- from shared libraries.
-
- DESCRIPTION
-
- Implements the command "nosharedlibrary", which discards symbols
- that have been auto-loaded from shared libraries. Symbols from
- shared libraries that were added by explicit request of the user
- are not discarded. Also called from remote.c. */
-
-void
-no_shared_libraries (char *ignored, int from_tty)
-{
- /* FIXME */
-}
-
-
-void
-_initialize_som_solib (void)
-{
- add_com ("sharedlibrary", class_files, som_solib_sharedlibrary_command,
- "Load shared object library symbols for files matching REGEXP.");
- add_info ("sharedlibrary", som_sharedlibrary_info_command,
- "Status of loaded shared object libraries.");
-
- add_show_from_set
- (add_set_cmd ("auto-solib-add", class_support, var_boolean,
- (char *) &auto_solib_add,
- "Set autoloading of shared library symbols.\n\
-If \"on\", symbols from all shared object libraries will be loaded\n\
-automatically when the inferior begins execution, when the dynamic linker\n\
-informs gdb that a new library has been loaded, or when attaching to the\n\
-inferior. Otherwise, symbols must be loaded manually, using `sharedlibrary'.",
- &setlist),
- &showlist);
-
- add_show_from_set
- (add_set_cmd ("auto-solib-limit", class_support, var_zinteger,
- (char *) &auto_solib_limit,
- "Set threshold (in Mb) for autoloading shared library symbols.\n\
-When shared library autoloading is enabled, new libraries will be loaded\n\
-only until the total size of shared library symbols exceeds this\n\
-threshold in megabytes. Is ignored when using `sharedlibrary'.",
- &setlist),
- &showlist);
-
- /* ??rehrauer: On HP-UX, the kernel parameter MAXDSIZ limits how
- much data space a process can use. We ought to be reading
- MAXDSIZ and setting auto_solib_limit to some large fraction of
- that value. If not that, we maybe ought to be setting it smaller
- than the default for MAXDSIZ (that being 64Mb, I believe).
- However, [1] this threshold is only crudely approximated rather
- than actually measured, and [2] 50 Mbytes is too small for
- debugging gdb itself. Thus, the arbitrary 100 figure. */
- auto_solib_limit = 100; /* Megabytes */
-
- som_solib_restart ();
-}
-
-/* Get some HPUX-specific data from a shared lib.
- */
-CORE_ADDR
-so_lib_thread_start_addr (struct so_list *so)
-{
- return so->som_solib.tsd_start_addr;
-}
diff --git a/contrib/gdb/gdb/somsolib.h b/contrib/gdb/gdb/somsolib.h
deleted file mode 100644
index 4b23760199c4..000000000000
--- a/contrib/gdb/gdb/somsolib.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/* HP SOM Shared library declarations for GDB, the GNU Debugger.
- Copyright 1992, 1994, 1995, 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.
-
- Written by the Center for Software Science at the Univerity of Utah
- and by Cygnus Support. */
-
-/* Forward decl's for prototypes */
-struct target_ops;
-struct objfile;
-struct section_offsets;
-
-/* Called to add symbols from a shared library to gdb's symbol table. */
-
-#define SOLIB_ADD(filename, from_tty, targ, readsyms) \
- som_solib_add (filename, from_tty, targ, readsyms)
-
-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 *);
-
-/* Function to be called when the inferior starts up, to discover the names
- of shared libraries that are dynamically linked, the base addresses to
- which they are linked, and sufficient information to read in their symbols
- at a later time. */
-
-#define SOLIB_CREATE_INFERIOR_HOOK(PID) som_solib_create_inferior_hook()
-
-extern void som_solib_create_inferior_hook (void);
-
-/* Function to be called to remove the connection between debugger and
- dynamic linker that was established by SOLIB_CREATE_INFERIOR_HOOK.
- (This operation does not remove shared library information from
- the debugger, as CLEAR_SOLIB does.)
- */
-#define SOLIB_REMOVE_INFERIOR_HOOK(PID) som_solib_remove_inferior_hook(PID)
-
-extern void som_solib_remove_inferior_hook (int);
-
-/* This function is called by the "catch load" command. It allows
- the debugger to be notified by the dynamic linker when a specified
- library file (or any library file, if filename is NULL) is loaded.
- */
-#define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag, filename,cond_string) \
- som_solib_create_catch_load_hook (pid, tempflag, filename, cond_string)
-
-extern void som_solib_create_catch_load_hook (int, int, char *, char *);
-
-/* This function is called by the "catch unload" command. It allows
- the debugger to be notified by the dynamic linker when a specified
- library file (or any library file, if filename is NULL) is unloaded.
- */
-#define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename, cond_string) \
- som_solib_create_catch_unload_hook (pid, tempflag, filename, cond_string)
-
-extern void som_solib_create_catch_unload_hook (int, int, char *, char *);
-
-/* This function returns TRUE if the dynamic linker has just reported
- a load of a library.
-
- This function must be used only when the inferior has stopped in
- the dynamic linker hook, or undefined results are guaranteed.
- */
-#define SOLIB_HAVE_LOAD_EVENT(pid) \
- som_solib_have_load_event (pid)
-
-extern int som_solib_have_load_event (int);
-
-/* This function returns a pointer to the string representation of the
- pathname of the dynamically-linked library that has just been loaded.
-
- This function must be used only when SOLIB_HAVE_LOAD_EVENT is TRUE,
- or undefined results are guaranteed.
-
- This string's contents are only valid immediately after the inferior
- has stopped in the dynamic linker hook, and becomes invalid as soon
- as the inferior is continued. Clients should make a copy of this
- string if they wish to continue the inferior and then access the string.
- */
-#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
- som_solib_loaded_library_pathname (pid)
-
-extern char *som_solib_loaded_library_pathname (int);
-
-/* This function returns TRUE if the dynamic linker has just reported
- an unload of a library.
-
- This function must be used only when the inferior has stopped in
- the dynamic linker hook, or undefined results are guaranteed.
- */
-#define SOLIB_HAVE_UNLOAD_EVENT(pid) \
- som_solib_have_unload_event (pid)
-
-extern int som_solib_have_unload_event (int);
-
-/* This function returns a pointer to the string representation of the
- pathname of the dynamically-linked library that has just been unloaded.
-
- This function must be used only when SOLIB_HAVE_UNLOAD_EVENT is TRUE,
- or undefined results are guaranteed.
-
- This string's contents are only valid immediately after the inferior
- has stopped in the dynamic linker hook, and becomes invalid as soon
- as the inferior is continued. Clients should make a copy of this
- string if they wish to continue the inferior and then access the string.
- */
-#define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
- som_solib_unloaded_library_pathname (pid)
-
-extern char *som_solib_unloaded_library_pathname (int);
-
-/* This function returns TRUE if pc is the address of an instruction that
- lies within the dynamic linker (such as the event hook, or the dld
- itself).
-
- This function must be used only when a dynamic linker event has been
- caught, and the inferior is being stepped out of the hook, or undefined
- results are guaranteed.
- */
-#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
- som_solib_in_dynamic_linker (pid, pc)
-
-extern int som_solib_in_dynamic_linker (int, CORE_ADDR);
-
-/* This function must be called when the inferior is killed, and the program
- restarted. This is not the same as CLEAR_SOLIB, in that it doesn't discard
- any symbol tables.
-
- Presently, this functionality is not implemented.
- */
-#define SOLIB_RESTART() \
- som_solib_restart ()
-
-extern void som_solib_restart (void);
-
-/* If we can't set a breakpoint, and it's in a shared library, just
- disable it. */
-
-#define DISABLE_UNSETTABLE_BREAK(addr) (som_solib_address(addr) != NULL)
-
-extern char *som_solib_address (CORE_ADDR); /* somsolib.c */
-
-/* If ADDR lies in a shared library, return its name. */
-
-#define PC_SOLIB(addr) som_solib_address (addr)
diff --git a/contrib/gdb/gdb/stop-gdb.c b/contrib/gdb/gdb/stop-gdb.c
deleted file mode 100644
index ee84609664c5..000000000000
--- a/contrib/gdb/gdb/stop-gdb.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* A client to make GDB return to command level in Mach 3.
- Copyright 1992, 1993, 1994, 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. */
-
-/* Authors: Jukka Virtanen <jtv@hut.fi> and Peter Stout <pds@cs.cmu.edu>.
-
- A simple client to make GDB (versions 4.4 and later) on Mach 3 return
- to the command level when it is waiting for the inferior to stop.
-
- Actions: Lookup the send right to the GDB message port from the
- NetMsgServer.
-
- Send an asynchronous message with msgh_id
- GDB_MESSAGE_ID_STOP to that port.
- */
-
-#include <stdio.h>
-
-#include "defs.h"
-
-#include <mach.h>
-#include <mach/message.h>
-#include <mach_error.h>
-#include <servers/netname.h>
-#include <servers/netname_defs.h>
-
-void
-main (int argc, char **argv)
-{
- kern_return_t kr;
- mach_msg_header_t msg;
- mach_port_t gdb_port;
- char *host;
- char *name;
-
- if (argc == 1)
- argv[argc++] = GDB_DEF_NAME;
-
- if (argc != 2)
- {
- fprintf (stderr, "Usage : %s <GDB name>\n", argv[0]);
- exit (1);
- }
-
- /* Allow the user to specify a remote host. */
- host = strchr (argv[1], '@');
- if (host)
- *(host++) = '\0';
- else
- host = (char *) "";
-
- name = malloc (strlen (argv[1]) + sizeof (GDB_NAME_PREFIX));
- if (name == NULL)
- {
- fprintf (stderr, "Unable to allocate memory for name.");
- exit (1);
- }
-
- strcpy (name, GDB_NAME_PREFIX);
- strcat (name, argv[1]);
-
- /* Look up the GDB service port. For convenience, add the
- GDB_NAME_PREFIX the argument before looking up the name.
- For backwards compatibility, do it without. */
-
- kr = netname_look_up (name_server_port, host, name, &gdb_port);
- if (kr == NETNAME_NOT_CHECKED_IN)
- kr = netname_look_up (name_server_port, host, argv[1], &gdb_port);
- if (kr != KERN_SUCCESS)
- {
- fprintf (stderr, "Unable to lookup the GDB service port: %s.\n",
- mach_error_string (kr));
- exit (1);
- }
-
- /* Code generated by mig stub generator, with minor cleanups :-)
-
- simpleroutine stop_inferior(gdb_port : mach_port_t); */
-
- msg.msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_COPY_SEND, 0);
- msg.msgh_remote_port = gdb_port;
- msg.msgh_local_port = MACH_PORT_NULL;
- msg.msgh_size = sizeof (msg);
- msg.msgh_seqno = 0;
- msg.msgh_id = GDB_MESSAGE_ID_STOP;
-
- kr = mach_msg_send (&msg);
- if (kr != KERN_SUCCESS)
- fprintf (stderr, "Message not sent, return code %d : %s\n", kr,
- mach_error_string (kr));
-
- exit (kr != KERN_SUCCESS);
-}
diff --git a/contrib/gdb/gdb/stuff.c b/contrib/gdb/gdb/stuff.c
deleted file mode 100644
index babd29fae6f3..000000000000
--- a/contrib/gdb/gdb/stuff.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/* Program to stuff files into a specially prepared space in kdb.
- Copyright (C) 1986, 1989, 1991 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Written 13-Mar-86 by David Bridgham. */
-
-#include <stdio.h>
-#include <a.out.h>
-#include <sys/types.h>
-#include "gdb_stat.h"
-#include <sys/file.h>
-#include <varargs.h>
-
-main (argc, argv)
- int argc;
- char *argv[];
-{
- register char *cp;
- char *outfile;
- register int i;
- int offset;
- int out_fd, in_fd;
- struct stat stat_buf;
- int size, pad;
- char buf[1024];
- static char zeros[4] =
- {0};
-
- if (argc < 4)
- err ("Not enough arguments\nUsage: %s -o kdb file1 file2 ...\n",
- argv[0]);
-
- outfile = 0;
- for (i = 1; i < argc; i++)
- {
- if (STREQ (argv[i], "-o"))
- outfile = argv[++i];
- }
- if (outfile == 0)
- err ("Output file not specified\n");
-
- offset = get_offset (outfile, "_heap");
-
- out_fd = open (outfile, O_WRONLY);
- if (out_fd < 0)
- err ("Error opening %s for write: %s\n", outfile, strerror (errno));
- if (lseek (out_fd, offset, 0) < 0)
- err ("Error seeking to heap in %s: %s\n", outfile, strerror (errno));
-
- /* For each file listed on the command line, write it into the
- * 'heap' of the output file. Make sure to skip the arguments
- * that name the output file. */
- for (i = 1; i < argc; i++)
- {
- if (STREQ (argv[i], "-o"))
- continue;
- if ((in_fd = open (argv[i], O_RDONLY)) < 0)
- err ("Error opening %s for read: %s\n", argv[i],
- strerror (errno));
- if (fstat (in_fd, &stat_buf) < 0)
- err ("Error stat'ing %s: %s\n", argv[i], strerror (errno));
- size = strlen (argv[i]);
- pad = 4 - (size & 3);
- size += pad + stat_buf.st_size + sizeof (int);
- write (out_fd, &size, sizeof (int));
- write (out_fd, argv[i], strlen (argv[i]));
- write (out_fd, zeros, pad);
- while ((size = read (in_fd, buf, sizeof (buf))) > 0)
- write (out_fd, buf, size);
- close (in_fd);
- }
- size = 0;
- write (out_fd, &size, sizeof (int));
- close (out_fd);
- return (0);
-}
-
-/* Read symbol table from file and returns the offset into the file
- * where symbol sym_name is located. If error, print message and
- * exit. */
-get_offset (file, sym_name)
- char *file;
- char *sym_name;
-{
- int f;
- struct exec file_hdr;
- struct nlist *symbol_table;
- int size;
- char *strings;
-
- f = open (file, O_RDONLY);
- if (f < 0)
- err ("Error opening %s: %s\n", file, strerror (errno));
- if (read (f, &file_hdr, sizeof (file_hdr)) < 0)
- err ("Error reading exec structure: %s\n", strerror (errno));
- if (N_BADMAG (file_hdr))
- err ("File %s not an a.out file\n", file);
-
- /* read in symbol table */
- if ((symbol_table = (struct nlist *) malloc (file_hdr.a_syms)) == 0)
- err ("Couldn't allocate space for symbol table\n");
- if (lseek (f, N_SYMOFF (file_hdr), 0) == -1)
- err ("lseek error: %s\n", strerror (errno));
- if (read (f, symbol_table, file_hdr.a_syms) == -1)
- err ("Error reading symbol table from %s: %s\n", file,
- strerror (errno));
-
- /* read in string table */
- if (read (f, &size, 4) == -1)
- err ("reading string table size: %s\n", strerror (errno));
- if ((strings = (char *) malloc (size)) == 0)
- err ("Couldn't allocate memory for string table\n");
- if (read (f, strings, size - 4) == -1)
- err ("reading string table: %s\n", strerror (errno));
-
- /* Find the core address at which the first byte of kdb text segment
- should be loaded into core when kdb is run. */
- origin = find_symbol ("_etext", symbol_table, file_hdr.a_syms, strings)
- - file_hdr.a_text;
- /* Find the core address at which the heap will appear. */
- coreaddr = find_symbol (sym_name, symbol_table, file_hdr.a_syms, strings);
- /* Return address in file of the heap data space. */
- return (N_TXTOFF (file_hdr) + core_addr - origin);
-}
-
-find_symbol (sym_name, symbol_table, length, strings)
- char *sym_name;
- struct nlist *symbol_table;
- int length;
- char *strings;
-{
- register struct nlist *sym;
-
- /* Find symbol in question */
- for (sym = symbol_table;
- sym != (struct nlist *) ((char *) symbol_table + length);
- sym++)
- {
- if ((sym->n_type & N_TYPE) != N_DATA)
- continue;
- if (sym->n_un.n_strx == 0)
- continue;
- if (STREQ (sym_name, strings + sym->n_un.n_strx - 4))
- return sym->n_value;
- }
- err ("Data symbol %s not found in %s\n", sym_name, file);
-}
-
-/* VARARGS */
-void
-err (va_alist)
- va_dcl
-{
- va_list args;
- char *string;
-
- va_start (args);
- string = va_arg (args, char *);
- vfprintf (gdb_stderr, string, args);
- va_end (args);
- exit (-1);
-}
diff --git a/contrib/gdb/gdb/symm-nat.c b/contrib/gdb/gdb/symm-nat.c
deleted file mode 100644
index d6867774310c..000000000000
--- a/contrib/gdb/gdb/symm-nat.c
+++ /dev/null
@@ -1,902 +0,0 @@
-/* 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.
-
- 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, some 387-specific items of use taken from i387-tdep.c -- ought to be
- merged back in. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "symtab.h"
-#include "target.h"
-#include "regcache.h"
-
-/* FIXME: What is the _INKERNEL define for? */
-#define _INKERNEL
-#include <signal.h>
-#undef _INKERNEL
-#include <sys/wait.h>
-#include <sys/param.h>
-#include <sys/user.h>
-#include <sys/proc.h>
-#include <sys/dir.h>
-#include <sys/ioctl.h>
-#include "gdb_stat.h"
-#ifdef _SEQUENT_
-#include <sys/ptrace.h>
-#else
-/* Dynix has only machine/ptrace.h, which is already included by sys/user.h */
-/* Dynix has no mptrace call */
-#define mptrace ptrace
-#endif
-#include "gdbcore.h"
-#include <fcntl.h>
-#include <sgtty.h>
-#define TERMINAL struct sgttyb
-
-#include "gdbcore.h"
-
-void
-store_inferior_registers (int regno)
-{
- struct pt_regset regs;
- int i;
-
- /* FIXME: Fetching the registers is a kludge to initialize all elements
- in the fpu and fpa status. This works for normal debugging, but
- might cause problems when calling functions in the inferior.
- At least fpu_control and fpa_pcr (probably more) should be added
- to the registers array to solve this properly. */
- mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
-
- regs.pr_eax = *(int *) &registers[REGISTER_BYTE (0)];
- regs.pr_ebx = *(int *) &registers[REGISTER_BYTE (5)];
- regs.pr_ecx = *(int *) &registers[REGISTER_BYTE (2)];
- regs.pr_edx = *(int *) &registers[REGISTER_BYTE (1)];
- regs.pr_esi = *(int *) &registers[REGISTER_BYTE (6)];
- regs.pr_edi = *(int *) &registers[REGISTER_BYTE (7)];
- regs.pr_esp = *(int *) &registers[REGISTER_BYTE (14)];
- regs.pr_ebp = *(int *) &registers[REGISTER_BYTE (15)];
- regs.pr_eip = *(int *) &registers[REGISTER_BYTE (16)];
- regs.pr_flags = *(int *) &registers[REGISTER_BYTE (17)];
- for (i = 0; i < 31; i++)
- {
- regs.pr_fpa.fpa_regs[i] =
- *(int *) &registers[REGISTER_BYTE (FP1_REGNUM + i)];
- }
- memcpy (regs.pr_fpu.fpu_stack[0], &registers[REGISTER_BYTE (ST0_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[1], &registers[REGISTER_BYTE (ST1_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[2], &registers[REGISTER_BYTE (ST2_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[3], &registers[REGISTER_BYTE (ST3_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[4], &registers[REGISTER_BYTE (ST4_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[5], &registers[REGISTER_BYTE (ST5_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[6], &registers[REGISTER_BYTE (ST6_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[7], &registers[REGISTER_BYTE (ST7_REGNUM)], 10);
- mptrace (XPT_WREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
-}
-
-void
-fetch_inferior_registers (int regno)
-{
- int i;
- struct pt_regset regs;
-
- registers_fetched ();
-
- mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
- *(int *) &registers[REGISTER_BYTE (EAX_REGNUM)] = regs.pr_eax;
- *(int *) &registers[REGISTER_BYTE (EBX_REGNUM)] = regs.pr_ebx;
- *(int *) &registers[REGISTER_BYTE (ECX_REGNUM)] = regs.pr_ecx;
- *(int *) &registers[REGISTER_BYTE (EDX_REGNUM)] = regs.pr_edx;
- *(int *) &registers[REGISTER_BYTE (ESI_REGNUM)] = regs.pr_esi;
- *(int *) &registers[REGISTER_BYTE (EDI_REGNUM)] = regs.pr_edi;
- *(int *) &registers[REGISTER_BYTE (EBP_REGNUM)] = regs.pr_ebp;
- *(int *) &registers[REGISTER_BYTE (ESP_REGNUM)] = regs.pr_esp;
- *(int *) &registers[REGISTER_BYTE (EIP_REGNUM)] = regs.pr_eip;
- *(int *) &registers[REGISTER_BYTE (EFLAGS_REGNUM)] = regs.pr_flags;
- for (i = 0; i < FPA_NREGS; i++)
- {
- *(int *) &registers[REGISTER_BYTE (FP1_REGNUM + i)] =
- regs.pr_fpa.fpa_regs[i];
- }
- memcpy (&registers[REGISTER_BYTE (ST0_REGNUM)], regs.pr_fpu.fpu_stack[0], 10);
- memcpy (&registers[REGISTER_BYTE (ST1_REGNUM)], regs.pr_fpu.fpu_stack[1], 10);
- memcpy (&registers[REGISTER_BYTE (ST2_REGNUM)], regs.pr_fpu.fpu_stack[2], 10);
- memcpy (&registers[REGISTER_BYTE (ST3_REGNUM)], regs.pr_fpu.fpu_stack[3], 10);
- memcpy (&registers[REGISTER_BYTE (ST4_REGNUM)], regs.pr_fpu.fpu_stack[4], 10);
- memcpy (&registers[REGISTER_BYTE (ST5_REGNUM)], regs.pr_fpu.fpu_stack[5], 10);
- memcpy (&registers[REGISTER_BYTE (ST6_REGNUM)], regs.pr_fpu.fpu_stack[6], 10);
- memcpy (&registers[REGISTER_BYTE (ST7_REGNUM)], regs.pr_fpu.fpu_stack[7], 10);
-}
-
-/* FIXME: This should be merged with i387-tdep.c as well. */
-static
-print_fpu_status (struct pt_regset ep)
-{
- int i;
- int bothstatus;
- int top;
- int fpreg;
- unsigned char *p;
-
- printf_unfiltered ("80387:");
- if (ep.pr_fpu.fpu_ip == 0)
- {
- printf_unfiltered (" not in use.\n");
- return;
- }
- else
- {
- printf_unfiltered ("\n");
- }
- if (ep.pr_fpu.fpu_status != 0)
- {
- print_387_status_word (ep.pr_fpu.fpu_status);
- }
- print_387_control_word (ep.pr_fpu.fpu_control);
- printf_unfiltered ("last exception: ");
- printf_unfiltered ("opcode 0x%x; ", ep.pr_fpu.fpu_rsvd4);
- printf_unfiltered ("pc 0x%x:0x%x; ", ep.pr_fpu.fpu_cs, ep.pr_fpu.fpu_ip);
- printf_unfiltered ("operand 0x%x:0x%x\n", ep.pr_fpu.fpu_data_offset, ep.pr_fpu.fpu_op_sel);
-
- top = (ep.pr_fpu.fpu_status >> 11) & 7;
-
- printf_unfiltered ("regno tag msb lsb value\n");
- for (fpreg = 7; fpreg >= 0; fpreg--)
- {
- double val;
-
- printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : " ", fpreg);
-
- switch ((ep.pr_fpu.fpu_tag >> (fpreg * 2)) & 3)
- {
- case 0:
- printf_unfiltered ("valid ");
- break;
- case 1:
- printf_unfiltered ("zero ");
- break;
- case 2:
- printf_unfiltered ("trap ");
- break;
- case 3:
- printf_unfiltered ("empty ");
- break;
- }
- for (i = 9; i >= 0; i--)
- printf_unfiltered ("%02x", ep.pr_fpu.fpu_stack[fpreg][i]);
-
- i387_to_double ((char *) ep.pr_fpu.fpu_stack[fpreg], (char *) &val);
- printf_unfiltered (" %g\n", val);
- }
- if (ep.pr_fpu.fpu_rsvd1)
- warning ("rsvd1 is 0x%x\n", ep.pr_fpu.fpu_rsvd1);
- if (ep.pr_fpu.fpu_rsvd2)
- warning ("rsvd2 is 0x%x\n", ep.pr_fpu.fpu_rsvd2);
- if (ep.pr_fpu.fpu_rsvd3)
- warning ("rsvd3 is 0x%x\n", ep.pr_fpu.fpu_rsvd3);
- if (ep.pr_fpu.fpu_rsvd5)
- warning ("rsvd5 is 0x%x\n", ep.pr_fpu.fpu_rsvd5);
-}
-
-
-print_1167_control_word (unsigned int pcr)
-{
- int pcr_tmp;
-
- pcr_tmp = pcr & FPA_PCR_MODE;
- printf_unfiltered ("\tMODE= %#x; RND= %#x ", pcr_tmp, pcr_tmp & 12);
- switch (pcr_tmp & 12)
- {
- case 0:
- printf_unfiltered ("RN (Nearest Value)");
- break;
- case 1:
- printf_unfiltered ("RZ (Zero)");
- break;
- case 2:
- printf_unfiltered ("RP (Positive Infinity)");
- break;
- case 3:
- printf_unfiltered ("RM (Negative Infinity)");
- break;
- }
- printf_unfiltered ("; IRND= %d ", pcr_tmp & 2);
- if (0 == pcr_tmp & 2)
- {
- printf_unfiltered ("(same as RND)\n");
- }
- else
- {
- printf_unfiltered ("(toward zero)\n");
- }
- pcr_tmp = pcr & FPA_PCR_EM;
- printf_unfiltered ("\tEM= %#x", pcr_tmp);
- if (pcr_tmp & FPA_PCR_EM_DM)
- printf_unfiltered (" DM");
- if (pcr_tmp & FPA_PCR_EM_UOM)
- printf_unfiltered (" UOM");
- if (pcr_tmp & FPA_PCR_EM_PM)
- printf_unfiltered (" PM");
- if (pcr_tmp & FPA_PCR_EM_UM)
- printf_unfiltered (" UM");
- if (pcr_tmp & FPA_PCR_EM_OM)
- printf_unfiltered (" OM");
- if (pcr_tmp & FPA_PCR_EM_ZM)
- printf_unfiltered (" ZM");
- if (pcr_tmp & FPA_PCR_EM_IM)
- printf_unfiltered (" IM");
- printf_unfiltered ("\n");
- pcr_tmp = FPA_PCR_CC;
- printf_unfiltered ("\tCC= %#x", pcr_tmp);
- if (pcr_tmp & FPA_PCR_20MHZ)
- printf_unfiltered (" 20MHZ");
- if (pcr_tmp & FPA_PCR_CC_Z)
- printf_unfiltered (" Z");
- if (pcr_tmp & FPA_PCR_CC_C2)
- printf_unfiltered (" C2");
-
- /* Dynix defines FPA_PCR_CC_C0 to 0x100 and ptx defines
- FPA_PCR_CC_C1 to 0x100. Use whichever is defined and assume
- the OS knows what it is doing. */
-#ifdef FPA_PCR_CC_C1
- if (pcr_tmp & FPA_PCR_CC_C1)
- printf_unfiltered (" C1");
-#else
- if (pcr_tmp & FPA_PCR_CC_C0)
- printf_unfiltered (" C0");
-#endif
-
- switch (pcr_tmp)
- {
- case FPA_PCR_CC_Z:
- printf_unfiltered (" (Equal)");
- break;
-#ifdef FPA_PCR_CC_C1
- case FPA_PCR_CC_C1:
-#else
- case FPA_PCR_CC_C0:
-#endif
- printf_unfiltered (" (Less than)");
- break;
- case 0:
- printf_unfiltered (" (Greater than)");
- break;
- case FPA_PCR_CC_Z |
-#ifdef FPA_PCR_CC_C1
- FPA_PCR_CC_C1
-#else
- FPA_PCR_CC_C0
-#endif
- | FPA_PCR_CC_C2:
- printf_unfiltered (" (Unordered)");
- break;
- default:
- printf_unfiltered (" (Undefined)");
- break;
- }
- printf_unfiltered ("\n");
- pcr_tmp = pcr & FPA_PCR_AE;
- printf_unfiltered ("\tAE= %#x", pcr_tmp);
- if (pcr_tmp & FPA_PCR_AE_DE)
- printf_unfiltered (" DE");
- if (pcr_tmp & FPA_PCR_AE_UOE)
- printf_unfiltered (" UOE");
- if (pcr_tmp & FPA_PCR_AE_PE)
- printf_unfiltered (" PE");
- if (pcr_tmp & FPA_PCR_AE_UE)
- printf_unfiltered (" UE");
- if (pcr_tmp & FPA_PCR_AE_OE)
- printf_unfiltered (" OE");
- if (pcr_tmp & FPA_PCR_AE_ZE)
- printf_unfiltered (" ZE");
- if (pcr_tmp & FPA_PCR_AE_EE)
- printf_unfiltered (" EE");
- if (pcr_tmp & FPA_PCR_AE_IE)
- printf_unfiltered (" IE");
- printf_unfiltered ("\n");
-}
-
-print_1167_regs (long regs[FPA_NREGS])
-{
- int i;
-
- union
- {
- double d;
- long l[2];
- }
- xd;
- union
- {
- float f;
- long l;
- }
- xf;
-
-
- for (i = 0; i < FPA_NREGS; i++)
- {
- xf.l = regs[i];
- printf_unfiltered ("%%fp%d: raw= %#x, single= %f", i + 1, regs[i], xf.f);
- if (!(i & 1))
- {
- printf_unfiltered ("\n");
- }
- else
- {
- xd.l[1] = regs[i];
- xd.l[0] = regs[i + 1];
- printf_unfiltered (", double= %f\n", xd.d);
- }
- }
-}
-
-print_fpa_status (struct pt_regset ep)
-{
-
- printf_unfiltered ("WTL 1167:");
- if (ep.pr_fpa.fpa_pcr != 0)
- {
- printf_unfiltered ("\n");
- print_1167_control_word (ep.pr_fpa.fpa_pcr);
- print_1167_regs (ep.pr_fpa.fpa_regs);
- }
- else
- {
- printf_unfiltered (" not in use.\n");
- }
-}
-
-#if 0 /* disabled because it doesn't go through the target vector. */
-i386_float_info (void)
-{
- char ubuf[UPAGES * NBPG];
- struct pt_regset regset;
-
- if (have_inferior_p ())
- {
- PTRACE_READ_REGS (PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regset);
- }
- else
- {
- int corechan = bfd_cache_lookup (core_bfd);
- if (lseek (corechan, 0, 0) < 0)
- {
- perror ("seek on core file");
- }
- if (myread (corechan, ubuf, UPAGES * NBPG) < 0)
- {
- perror ("read on core file");
- }
- /* only interested in the floating point registers */
- regset.pr_fpu = ((struct user *) ubuf)->u_fpusave;
- regset.pr_fpa = ((struct user *) ubuf)->u_fpasave;
- }
- print_fpu_status (regset);
- print_fpa_status (regset);
-}
-#endif
-
-static volatile int got_sigchld;
-
-/*ARGSUSED */
-/* This will eventually be more interesting. */
-void
-sigchld_handler (int signo)
-{
- got_sigchld++;
-}
-
-/*
- * Signals for which the default action does not cause the process
- * to die. See <sys/signal.h> for where this came from (alas, we
- * can't use those macros directly)
- */
-#ifndef sigmask
-#define sigmask(s) (1 << ((s) - 1))
-#endif
-#define SIGNALS_DFL_SAFE sigmask(SIGSTOP) | sigmask(SIGTSTP) | \
- sigmask(SIGTTIN) | sigmask(SIGTTOU) | sigmask(SIGCHLD) | \
- sigmask(SIGCONT) | sigmask(SIGWINCH) | sigmask(SIGPWR) | \
- sigmask(SIGURG) | sigmask(SIGPOLL)
-
-#ifdef ATTACH_DETACH
-/*
- * Thanks to XPT_MPDEBUGGER, we have to mange child_wait().
- */
-ptid_t
-child_wait (ptid_t ptid, struct target_waitstatus *status)
-{
- int save_errno, rv, xvaloff, saoff, sa_hand;
- struct pt_stop pt;
- struct user u;
- sigset_t set;
- /* Host signal number for a signal which the inferior terminates with, or
- 0 if it hasn't terminated due to a signal. */
- static int death_by_signal = 0;
-#ifdef SVR4_SHARED_LIBS /* use this to distinguish ptx 2 vs ptx 4 */
- prstatus_t pstatus;
-#endif
- int pid = PIDGET (ptid);
-
- do
- {
- set_sigint_trap (); /* Causes SIGINT to be passed on to the
- attached process. */
- save_errno = errno;
-
- got_sigchld = 0;
-
- sigemptyset (&set);
-
- while (got_sigchld == 0)
- {
- sigsuspend (&set);
- }
-
- clear_sigint_trap ();
-
- rv = mptrace (XPT_STOPSTAT, 0, (char *) &pt, 0);
- if (-1 == rv)
- {
- printf ("XPT_STOPSTAT: errno %d\n", errno); /* DEBUG */
- continue;
- }
-
- pid = pt.ps_pid;
-
- if (pid != PIDGET (inferior_ptid))
- {
- /* NOTE: the mystery fork in csh/tcsh needs to be ignored.
- * We should not return new children for the initial run
- * of a process until it has done the exec.
- */
- /* inferior probably forked; send it on its way */
- rv = mptrace (XPT_UNDEBUG, pid, 0, 0);
- if (-1 == rv)
- {
- printf ("child_wait: XPT_UNDEBUG: pid %d: %s\n", pid,
- safe_strerror (errno));
- }
- continue;
- }
- /* FIXME: Do we deal with fork notification correctly? */
- switch (pt.ps_reason)
- {
- case PTS_FORK:
- /* multi proc: treat like PTS_EXEC */
- /*
- * Pretend this didn't happen, since gdb isn't set up
- * to deal with stops on fork.
- */
- rv = ptrace (PT_CONTSIG, pid, 1, 0);
- if (-1 == rv)
- {
- printf ("PTS_FORK: PT_CONTSIG: error %d\n", errno);
- }
- continue;
- case PTS_EXEC:
- /*
- * Pretend this is a SIGTRAP.
- */
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
- break;
- case PTS_EXIT:
- /*
- * Note: we stop before the exit actually occurs. Extract
- * the exit code from the uarea. If we're stopped in the
- * exit() system call, the exit code will be in
- * u.u_ap[0]. An exit due to an uncaught signal will have
- * something else in here, see the comment in the default:
- * case, below. Finally,let the process exit.
- */
- if (death_by_signal)
- {
- status->kind = TARGET_WAITKIND_SIGNALED;
- status->value.sig = target_signal_from_host (death_by_signal);
- death_by_signal = 0;
- break;
- }
- xvaloff = (unsigned long) &u.u_ap[0] - (unsigned long) &u;
- errno = 0;
- rv = ptrace (PT_RUSER, pid, (char *) xvaloff, 0);
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = rv;
- /*
- * addr & data to mptrace() don't matter here, since
- * the process is already dead.
- */
- rv = mptrace (XPT_UNDEBUG, pid, 0, 0);
- if (-1 == rv)
- {
- printf ("child_wait: PTS_EXIT: XPT_UNDEBUG: pid %d error %d\n", pid,
- errno);
- }
- break;
- case PTS_WATCHPT_HIT:
- internal_error (__FILE__, __LINE__,
- "PTS_WATCHPT_HIT\n");
- break;
- default:
- /* stopped by signal */
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = target_signal_from_host (pt.ps_reason);
- death_by_signal = 0;
-
- if (0 == (SIGNALS_DFL_SAFE & sigmask (pt.ps_reason)))
- {
- break;
- }
- /* else default action of signal is to die */
-#ifdef SVR4_SHARED_LIBS
- rv = ptrace (PT_GET_PRSTATUS, pid, (char *) &pstatus, 0);
- if (-1 == rv)
- error ("child_wait: signal %d PT_GET_PRSTATUS: %s\n",
- pt.ps_reason, safe_strerror (errno));
- if (pstatus.pr_cursig != pt.ps_reason)
- {
- printf ("pstatus signal %d, pt signal %d\n",
- pstatus.pr_cursig, pt.ps_reason);
- }
- sa_hand = (int) pstatus.pr_action.sa_handler;
-#else
- saoff = (unsigned long) &u.u_sa[0] - (unsigned long) &u;
- saoff += sizeof (struct sigaction) * (pt.ps_reason - 1);
- errno = 0;
- sa_hand = ptrace (PT_RUSER, pid, (char *) saoff, 0);
- if (errno)
- error ("child_wait: signal %d: RUSER: %s\n",
- pt.ps_reason, safe_strerror (errno));
-#endif
- if ((int) SIG_DFL == sa_hand)
- {
- /* we will be dying */
- death_by_signal = pt.ps_reason;
- }
- break;
- }
-
- }
- while (pid != PIDGET (inferior_ptid)); /* Some other child died or stopped */
-
- return pid_to_ptid (pid);
-}
-#else /* !ATTACH_DETACH */
-/*
- * Simple child_wait() based on inftarg.c child_wait() for use until
- * the MPDEBUGGER child_wait() works properly. This will go away when
- * that is fixed.
- */
-ptid_t
-child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
-{
- int save_errno;
- int status;
- int pid = PIDGET (ptid);
-
- do
- {
- pid = wait (&status);
- save_errno = errno;
-
- if (pid == -1)
- {
- if (save_errno == EINTR)
- continue;
- fprintf (stderr, "Child process unexpectedly missing: %s.\n",
- safe_strerror (save_errno));
- ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
- ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
- return pid_to_ptid (-1);
- }
- }
- while (pid != PIDGET (inferior_ptid)); /* Some other child died or stopped */
- store_waitstatus (ourstatus, status);
- return pid_to_ptid (pid);
-}
-#endif /* ATTACH_DETACH */
-
-
-
-/* This function simply calls ptrace with the given arguments.
- It exists so that all calls to ptrace are isolated in this
- machine-dependent file. */
-int
-call_ptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data)
-{
- return ptrace (request, pid, addr, data);
-}
-
-int
-call_mptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data)
-{
- return mptrace (request, pid, addr, data);
-}
-
-#if defined (DEBUG_PTRACE)
-/* For the rest of the file, use an extra level of indirection */
-/* This lets us breakpoint usefully on call_ptrace. */
-#define ptrace call_ptrace
-#define mptrace call_mptrace
-#endif
-
-void
-kill_inferior (void)
-{
- if (ptid_equal (inferior_ptid, null_ptid))
- return;
-
- /* For MPDEBUGGER, don't use PT_KILL, since the child will stop
- again with a PTS_EXIT. Just hit him with SIGKILL (so he stops)
- and detach. */
-
- kill (PIDGET (inferior_ptid), SIGKILL);
-#ifdef ATTACH_DETACH
- detach (SIGKILL);
-#else /* ATTACH_DETACH */
- ptrace (PT_KILL, PIDGET (inferior_ptid), 0, 0);
- wait ((int *) NULL);
-#endif /* ATTACH_DETACH */
- target_mourn_inferior ();
-}
-
-/* Resume execution of the inferior process.
- If STEP is nonzero, single-step it.
- If SIGNAL is nonzero, give it that signal. */
-
-void
-child_resume (ptid_t ptid, int step, enum target_signal signal)
-{
- int pid = PIDGET (ptid);
-
- errno = 0;
-
- if (pid == -1)
- pid = PIDGET (inferior_ptid);
-
- /* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where
- it was. (If GDB wanted it to start some other way, we have already
- written a new PC value to the child.)
-
- If this system does not support PT_SSTEP, a higher level function will
- have called single_step() to transmute the step request into a
- continue request (by setting breakpoints on all possible successor
- instructions), so we don't have to worry about that here. */
-
- if (step)
- ptrace (PT_SSTEP, pid, (PTRACE_ARG3_TYPE) 1, signal);
- else
- ptrace (PT_CONTSIG, pid, (PTRACE_ARG3_TYPE) 1, signal);
-
- if (errno)
- perror_with_name ("ptrace");
-}
-
-#ifdef ATTACH_DETACH
-/* Start debugging the process whose number is PID. */
-int
-attach (int pid)
-{
- sigset_t set;
- int rv;
-
- rv = mptrace (XPT_DEBUG, pid, 0, 0);
- if (-1 == rv)
- {
- error ("mptrace(XPT_DEBUG): %s", safe_strerror (errno));
- }
- rv = mptrace (XPT_SIGNAL, pid, 0, SIGSTOP);
- if (-1 == rv)
- {
- error ("mptrace(XPT_SIGNAL): %s", safe_strerror (errno));
- }
- attach_flag = 1;
- return pid;
-}
-
-void
-detach (int signo)
-{
- int rv;
-
- rv = mptrace (XPT_UNDEBUG, PIDGET (inferior_ptid), 1, signo);
- if (-1 == rv)
- {
- error ("mptrace(XPT_UNDEBUG): %s", safe_strerror (errno));
- }
- attach_flag = 0;
-}
-
-#endif /* ATTACH_DETACH */
-
-/* Default the type of the ptrace transfer to int. */
-#ifndef PTRACE_XFER_TYPE
-#define PTRACE_XFER_TYPE int
-#endif
-
-
-/* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory
- in the NEW_SUN_PTRACE case.
- It ought to be straightforward. But it appears that writing did
- not write the data that I specified. I cannot understand where
- it got the data that it actually did write. */
-
-/* Copy LEN bytes to or from inferior's memory starting at MEMADDR
- to debugger memory starting at MYADDR. Copy to inferior if
- WRITE is nonzero. TARGET is ignored.
-
- Returns the length copied, which is either the LEN argument or zero.
- This xfer function does not do partial moves, since child_ops
- doesn't allow memory operations to cross below us in the target stack
- anyway. */
-
-int
-child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib,
- struct target_ops *target)
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_XFER_TYPE);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (PTRACE_XFER_TYPE) - 1)
- / sizeof (PTRACE_XFER_TYPE);
- /* Allocate buffer of that many longwords. */
- /* FIXME (alloca): This code, cloned from infptrace.c, is unsafe
- because it uses alloca to allocate a buffer of arbitrary size.
- For very large xfers, this could crash GDB's stack. */
- register PTRACE_XFER_TYPE *buffer
- = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE));
-
- if (write)
- {
- /* Fill start and end extra bytes of buffer with existing memory data. */
-
- if (addr != memaddr || len < (int) sizeof (PTRACE_XFER_TYPE))
- {
- /* Need part of initial word -- fetch it. */
- buffer[0] = ptrace (PT_RTEXT, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr,
- 0);
- }
-
- if (count > 1) /* FIXME, avoid if even boundary */
- {
- buffer[count - 1]
- = ptrace (PT_RTEXT, PIDGET (inferior_ptid),
- ((PTRACE_ARG3_TYPE)
- (addr + (count - 1) * sizeof (PTRACE_XFER_TYPE))),
- 0);
- }
-
- /* Copy data to be written over corresponding part of buffer */
-
- memcpy ((char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)),
- myaddr,
- len);
-
- /* Write the entire buffer. */
-
- for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
- {
- errno = 0;
- ptrace (PT_WDATA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr,
- buffer[i]);
- if (errno)
- {
- /* Using the appropriate one (I or D) is necessary for
- Gould NP1, at least. */
- errno = 0;
- ptrace (PT_WTEXT, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr,
- buffer[i]);
- }
- if (errno)
- return 0;
- }
- }
- else
- {
- /* Read all the longwords */
- for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
- {
- errno = 0;
- buffer[i] = ptrace (PT_RTEXT, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) addr, 0);
- if (errno)
- return 0;
- QUIT;
- }
-
- /* Copy appropriate bytes out of the buffer. */
- memcpy (myaddr,
- (char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)),
- len);
- }
- return len;
-}
-
-
-void
-_initialize_symm_nat (void)
-{
-#ifdef ATTACH_DETACH
-/*
- * the MPDEBUGGER is necessary for process tree debugging and attach
- * to work, but it alters the behavior of debugged processes, so other
- * things (at least child_wait()) will have to change to accomodate
- * that.
- *
- * Note that attach is not implemented in dynix 3, and not in ptx
- * until version 2.1 of the OS.
- */
- int rv;
- sigset_t set;
- struct sigaction sact;
-
- rv = mptrace (XPT_MPDEBUGGER, 0, 0, 0);
- if (-1 == rv)
- {
- internal_error (__FILE__, __LINE__,
- "_initialize_symm_nat(): mptrace(XPT_MPDEBUGGER): %s",
- safe_strerror (errno));
- }
-
- /*
- * Under MPDEBUGGER, we get SIGCLHD when a traced process does
- * anything of interest.
- */
-
- /*
- * Block SIGCHLD. We leave it blocked all the time, and then
- * call sigsuspend() in child_wait() to wait for the child
- * to do something. None of these ought to fail, but check anyway.
- */
- sigemptyset (&set);
- rv = sigaddset (&set, SIGCHLD);
- if (-1 == rv)
- {
- internal_error (__FILE__, __LINE__,
- "_initialize_symm_nat(): sigaddset(SIGCHLD): %s",
- safe_strerror (errno));
- }
- rv = sigprocmask (SIG_BLOCK, &set, (sigset_t *) NULL);
- if (-1 == rv)
- {
- internal_error (__FILE__, __LINE__,
- "_initialize_symm_nat(): sigprocmask(SIG_BLOCK): %s",
- safe_strerror (errno));
- }
-
- sact.sa_handler = sigchld_handler;
- sigemptyset (&sact.sa_mask);
- sact.sa_flags = SA_NOCLDWAIT; /* keep the zombies away */
- rv = sigaction (SIGCHLD, &sact, (struct sigaction *) NULL);
- if (-1 == rv)
- {
- internal_error (__FILE__, __LINE__,
- "_initialize_symm_nat(): sigaction(SIGCHLD): %s",
- safe_strerror (errno));
- }
-#endif
-}
diff --git a/contrib/gdb/gdb/symm-tdep.c b/contrib/gdb/gdb/symm-tdep.c
deleted file mode 100644
index 37a2f511aa72..000000000000
--- a/contrib/gdb/gdb/symm-tdep.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Sequent Symmetry target interface, for GDB.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* many 387-specific items of use taken from i386-dep.c */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "symtab.h"
-
-#include <signal.h>
-#include <sys/param.h>
-#include <sys/user.h>
-#include <sys/dir.h>
-#include <sys/ioctl.h>
-#include "gdb_stat.h"
-#include "gdbcore.h"
-#include <fcntl.h>
-
-void
-symmetry_extract_return_value (struct type *type, char *regbuf, char *valbuf)
-{
- union
- {
- double d;
- int l[2];
- }
- xd;
- struct minimal_symbol *msymbol;
- float f;
-
- if (TYPE_CODE_FLT == TYPE_CODE (type))
- {
- msymbol = lookup_minimal_symbol ("1167_flt", NULL, NULL);
- if (msymbol != NULL)
- {
- /* found "1167_flt" means 1167, %fp2-%fp3 */
- /* float & double; 19= %fp2, 20= %fp3 */
- /* no single precision on 1167 */
- xd.l[1] = *((int *) &regbuf[REGISTER_BYTE (19)]);
- xd.l[0] = *((int *) &regbuf[REGISTER_BYTE (20)]);
- switch (TYPE_LENGTH (type))
- {
- case 4:
- /* FIXME: broken for cross-debugging. */
- f = (float) xd.d;
- memcpy (valbuf, &f, TYPE_LENGTH (type));
- break;
- case 8:
- /* FIXME: broken for cross-debugging. */
- memcpy (valbuf, &xd.d, TYPE_LENGTH (type));
- break;
- default:
- error ("Unknown floating point size");
- break;
- }
- }
- else
- {
- /* 387 %st(0), gcc uses this */
- i387_to_double (((int *) &regbuf[REGISTER_BYTE (3)]),
- &xd.d);
- switch (TYPE_LENGTH (type))
- {
- case 4: /* float */
- f = (float) xd.d;
- /* FIXME: broken for cross-debugging. */
- memcpy (valbuf, &f, 4);
- break;
- case 8: /* double */
- /* FIXME: broken for cross-debugging. */
- memcpy (valbuf, &xd.d, 8);
- break;
- default:
- error ("Unknown floating point size");
- break;
- }
- }
- }
- else
- {
- memcpy (valbuf, regbuf, TYPE_LENGTH (type));
- }
-}
diff --git a/contrib/gdb/gdb/thread.h b/contrib/gdb/gdb/thread.h
deleted file mode 100644
index 6777887af2e5..000000000000
--- a/contrib/gdb/gdb/thread.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Multi-process/thread control defs for GDB, the GNU debugger.
- Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993
-
- Contributed by Lynx Real-Time Systems, Inc. Los Gatos, CA.
- 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 THREAD_H
-#define THREAD_H
-
-extern void init_thread_list PARAMS ((void));
-
-extern void add_thread PARAMS ((int pid));
-
-extern int in_thread_list PARAMS ((int pid));
-
-extern int pid_to_thread_id PARAMS ((int pid));
-
-extern int valid_thread_id PARAMS ((int thread));
-
-extern void load_infrun_state PARAMS ((int, CORE_ADDR *, CORE_ADDR *, char **,
- int *, struct breakpoint **,
- struct breakpoint **, CORE_ADDR *,
- CORE_ADDR *, CORE_ADDR *, int *, int *));
-
-extern void save_infrun_state PARAMS ((int, CORE_ADDR, CORE_ADDR, char *,
- int, struct breakpoint *,
- struct breakpoint *, CORE_ADDR,
- CORE_ADDR, CORE_ADDR, int, int));
-
-#endif /* THREAD_H */
diff --git a/contrib/gdb/gdb/tui/ChangeLog b/contrib/gdb/gdb/tui/ChangeLog
deleted file mode 100644
index 7dc1bf60460b..000000000000
--- a/contrib/gdb/gdb/tui/ChangeLog
+++ /dev/null
@@ -1,121 +0,0 @@
-1999-01-26 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * tui.h: Include stdarg.h instead of varargs.h if we're on an ISO Cish
- system.
-
-Thu Dec 31 12:08:32 1998 David Taylor <taylor@texas.cygnus.com>
-
- The following changes were made by Jim Blandy <jimb@cygnus.com>,
- Edith Epstein <eepstein@cygnus.com>, Elena Zannoni
- <ezannoni@cygnus.com> Stan Shebs <shebs@cygnus.com>, and David
- Taylor <taylor@cygnus.com>, as part of the project to merge in
- changes originally made by HP; HP did not create ChangeLog
- entries.
-
- * Makefile.in: New file; we're merging HP's changes into GDB, and
- we've moved the TUI files into a subdirectory, so we need a new
- Makefile.
-
- * tui.c:
- #include <term.h>, if we have it, to get declarations for
- the termcap functions on Solaris.
- (tgoto): Add external K&R declaration for this; Solaris doesn't
- bother to actually declare it in their header files.
- (_tuiReset): Ignore the #definition of TIOCGETC if USG is defined;
- we'd rather use the USG mechanisms than the Berkeley mechanisms
- (TIOCGETC is one of the Berkeley terminal control ioctls).
- Apologies if this causes trouble later; this should all be handled
- by autoconf...
- (strcat_to_buf, strcat_to_buf_with_fmt): New functions, moved here
- from ../utils.h.
- (tuiFree): replace safe_free with free.
- (strcat_to_buf): new function, copied from utils.c.
- (tuiInit): Add ignored `argv0' argument, to match the type that
- init_ui_hook expects; updated declaration. Call the
- initialize_tui_files function constructed above. Initialize
- flush_hook to NULL.
- (tuiInitWindows): Call tuiSetLocatorContent, to get the first
- element of the locator window's content allocated. This seems
- wrong, because it must have been initialized somehow in HP's
- sources, and we should do it the same way now. But we do get
- further before it segfaults. [Postscript: HP didn't bother to
- initialize it; they compile
- (va_catch_errors, vcatch_errors): Functions moved here from
- ../utils.c in HP's sources. They're not used anywhere else.
- (xdb_style): Delete this variable, and remove all references to
- it. It's always true.
- (tuiInit, _tui_vDo): References removed.
-
- * tui.h: Add prototypes.
- Don't #include "gendefs.h"; it's only used in the TUI.
- Integrate its contents into this file:
- #include <ansidecl.h> here.
- (Opaque, OpaqueFuncPtr): Typedefs moved to here.
-
- * tuiCommand.c: #include "defs.h", so we get the appropriate
- definition of GDB_FILE.
-
- * tuiData.c
- (freeWindow): replace safe_free with free.
- (tui_version): don't define it here; it's defined in main.c now.
-
- * tuiDisassem.c
- (tuiSetDisassemContent): Call strcat_address_numeric instead of
- strcat_address. Simplify the control structure. Use predefined
- GDB function to print asm inst address. Use GDB_FILE to collect
- output into buffers.
-
- * tuiIO.c
- (tgoto): Add external K&R declaration for this here too.
- (tuiGetc, tuiTermSetup, tuiTermUnsetup): Same.
- (tuiPuts_unfiltered): change FILE to GDB_FILE.
- (tui_tputs): fix prototype for 3rd argument.
-
- * tuiIO.h (tuiPuts_unfiltered): change declaration.
-
- * tuiLayout.c
- (_tuiSetLayoutTo): for displaying registers, hook up the HP code
- that decides which registers to display (i.e. single precision
- float, double precision float, general, special). Previously,
- only handled TUI_GENERAL_REGS. Now that the code is hooked up,
- compiling with -z poses a problem. When the first layout command
- is 'layout regs', dataWin->detail is a NULL pointer, and gdb
- core dumps.
-
- * tuiLayout.c (_tuiSetLayoutTo): replace safe_free with free.
-
- * tuiRegs.c #include "defs.h" earlier, to avoid problems in
- <stdarg.h>. No idea exactly what's conflicting with what, but the
- errors went away...
- (_tuiRegisterFormat): Change so that function creates a GDB_FILE
- object, calls pa_do_strcat_registers_info, copies the register
- info into a buffer, and deallocates the GDB_FILE object. Remove
- some code that is not executed. Also, call to
- pa_do_strcat_registers_info has an additional parameter,
- precision. This code requires some new per-target functions that
- we don't want to merge. Dyke it out, with #ifdef
- TUI_EXTENDED_FORMATTERS.
- (_tuiSetSpecialRegsContent): this function was ifdefed out.
- Hooked this up.
- (_tuiSetGeneralAndSpecialRegsContent): this function was ifdefed
- out. Hooked it up.
- (IS_64BIT): Just define this to be zero; we're not merging in the
- 64-bit support.
- (tuiShowRegisters): Comment out all references to the "special"
- regs; we don't have a distinction between the "special" and
- "non-special" regs in most of our machine descriptions. This code
- is PA-specific in other ways as well, and needs to be redesigned
- to be portable to other processors.
-
- * tuiWin.c: #include <string.h>, to get a declaration for
- strchr.
-
- * tui.c, tuiCommand.c, tuiData.c, tuiDataWin.c, tuiDisassem.c,
- tuiGeneralWin.c, tuiIO.c, tuiLayout.c, tuiRegs.c, tuiSource.c,
- tuiSourceWin.c, tuiStack.c, tuiWin.c: New files (from HP). Changed
- bool to int throughout. Re-indented, GNU style.
-
- * tui.h, tuiCommand.h, tuiData.h, tuiDataWin.h, tuiDisassem.h,
- tuiGeneralWin.h, tuiIO.h, tuiLayout.h, tuiRegs.h, tuiSource.h,
- tuiSourceWin.h, tuiStack.h, tuiWin.h: new files (from HP).
- Changed bool to int throughout.
diff --git a/contrib/gdb/gdb/tui/Makefile b/contrib/gdb/gdb/tui/Makefile
deleted file mode 100644
index ed89c6e61769..000000000000
--- a/contrib/gdb/gdb/tui/Makefile
+++ /dev/null
@@ -1,182 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-# Copyright 1998 Free Software Foundation, Inc.
-
-# This file is part of GDB.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-all: libtui.a
-
-srcdir=.
-
-SHELL = /bin/sh
-
-CC=gcc
-CFLAGS=-g -O2
-AR=ar
-RANLIB=ranlib
-
-# Host and target-dependent makefile fragments come in here.
-
-# Host: Sun 4 or Sparcstation, running SunOS 4
-XDEPFILES= ser-tcp.o
-XM_FILE= xm-sun4os4.h
-NAT_FILE= nm-sun4os4.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o
-HOST_IPC=-DBSD_IPC
-GDBSERVER_DEPFILES= low-sparc.o
-# Setting XM_CLIBS=-lresolv would let us use the DNS, but that would screw
-# anyone who wants to use NIS, which includes at least one Cygnus customer
-# (PR 3593). So leave it this way until/unless we find a resolver which can
-# get names from either DNS or NIS from the same GDB binary.
-
-# Target: Sun 4 or Sparcstation, running SunOS 4
-TDEPFILES= sparc-tdep.o solib.o
-TM_FILE= tm-sun4os4.h
-# End of host and target-dependent makefile fragments
-
-# Where is our "include" directory? Typically $(srcdir)/../include.
-# This is essentially the header file directory for the library
-# routines in libiberty.
-INCLUDE_DIR = $(srcdir)/../../include
-INCLUDE_CFLAGS = -I$(INCLUDE_DIR)
-
-# Configured by the --with-mmalloc option to configure.
-MMALLOC =
-MMALLOC_CFLAGS =
-
-# Where is the BFD library? Typically in ../bfd.
-BFD_DIR = ../../bfd
-BFD_SRC = $(srcdir)/$(BFD_DIR)
-BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
-
-# Where is the READLINE library? Typically in ../readline.
-READLINE_DIR = ../../readline
-READLINE_SRC = $(srcdir)/$(READLINE_DIR)
-READLINE_CFLAGS = -I$(READLINE_SRC)
-
-# Where is the INTL library? Typically in ../intl.
-INTL_DIR = ../../intl
-INTL_SRC = $(srcdir)/$(INTL_DIR)
-INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC)
-
-# Where is the TCL library? Typically in ../tcl.
-TCL_CFLAGS = @TCLHDIR@
-
-# Where is the TK library? Typically in ../tk.
-TK_CFLAGS = @TKHDIR@ @TK_BUILD_INCLUDES@
-
-# Where is Itcl? Typically in ../itcl.
-ITCL_CFLAGS = @ITCLHDIR@
-
-# Where is Tix? Typically in ../tix.
-TIX_CFLAGS = @TIXHDIR@
-
-X11_CFLAGS = @TK_XINCLUDES@
-
-ENABLE_IDE= @ENABLE_IDE@
-
-GUI_CFLAGS_X = -I$(srcdir)/../../libgui/src
-
-IDE_CFLAGS_X = -I$(srcdir)/../../libidetcl/src -I$(srcdir)/../../libide/src \
- `if [ x"$(ENABLE_IDE)" != x ] ; then \
- echo -DIDE -I$(srcdir)/../../ilu/runtime/mainloop;\
- fi`
-
-IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
-
-ENABLE_CFLAGS=
-
-# -I. for config files.
-# -I$(srcdir) for gdb internal headers and possibly for gnu-regex.h also.
-# -I$(srcdir)/config for more generic config files.
-
-# It is also possible that you will need to add -I/usr/include/sys if
-# your system doesn't have fcntl.h in /usr/include (which is where it
-# should be according to Posix).
-DEFS = -DHAVE_CONFIG_H
-GDB_CFLAGS = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config $(DEFS)
-
-# 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
-
-# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
-INTERNAL_CFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
- $(GDB_CFLAGS) $(READLINE_CFLAGS) $(BFD_CFLAGS) \
- $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) $(INTL_CFLAGS) \
- $(ENABLE_CFLAGS)
-
-HEADERS = tuiIO.h tuiData.h tuiGeneralWin.h tuiLayout.h tuiStack.h \
- tuiSource.h tuiCommand.h tuiWin.h tuiDisassem.h \
- tuiSourceWin.h tuiRegs.h tuiDataWin.h
-
-SOURCES = tui.c tuiData.c tuiSource.c tuiStack.c tuiIO.c \
- tuiGeneralWin.c tuiLayout.c tuiWin.c tuiCommand.c \
- tuiDisassem.c tuiSourceWin.c tuiRegs.c tuiDataWin.c
-
-OBJECTS = tui.o tuiData.o tuiSource.o tuiStack.o tuiIO.o \
- tuiGeneralWin.o tuiLayout.o tuiWin.o tuiCommand.o \
- tuiDisassem.o tuiSourceWin.o tuiRegs.o tuiDataWin.o \
- tuiInit.o
-
-
-# Prevent Sun make from putting in the machine type. Setting
-# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
-.c.o:
- $(CC) -c $(INTERNAL_CFLAGS) $<
-.SUFFIXES: .cpp
-.c.cpp:
- $(CC) -E $(INTERNAL_CFLAGS) $< > $@
-
-libtui.a: $(OBJECTS)
- rm -f libtui.a
- $(AR) rc libtui.a $(OBJECTS)
- $(RANLIB) libtui.a
-
-tui.o: tui.c tui.h tuiData.h tuiLayout.h tuiIO.h tuiRegs.h tuiWin.h
-tuiCommand.o: tui.h tuiData.h tuiWin.h tuiIO.h
-tuiData.o: tui.h tuiData.h
-tuiDataWin.o: tui.h tuiData.h tuiRegs.h
-tuiDisassem.o: tui.h tuiData.h tuiLayout.h tuiSourceWin.h tuiStack.h
-tuiGeneralWin.o: tui.h tuiData.h tuiGeneralWin.h
-tuiIO.o: tui.h tuiData.h tuiIO.h tuiCommand.h tuiWin.h
-tuiLayout.o: tui.h tuiData.h tuiGeneralWin.h tuiStack.h tuiRegs.h \
- tuiDisassem.h
-tuiRegs.o: tui.h tuiData.h tuiLayout.h tuiWin.h
-tuiSource.o: tui.h tuiData.h tuiStack.h tuiSourceWin.h tuiSource.h
-tuiSourceWin.o: tui.h tuiData.h tuiStack.h tuiSourceWin.h tuiSource.h \
- tuiDisassem.h
-tuiStack.o: tui.h tuiData.h tuiStack.h tuiSourceWin.h
-tuiWin.o: tui.h tuiData.h tuiGeneralWin.h tuiStack.h tuiSourceWin.h \
- tuiDataWin.h
-
-tuiInit.o: tuiInit.c
-tuiInit.c: $(SOURCES)
- @echo Making tuiInit.c
- @rm -f init.c-tmp
- @echo '/* Do not modify this file. */' >init.c-tmp
- @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp
- @echo '#include "ansidecl.h"' >>init.c-tmp
- @echo 'extern void initialize_tui_files PARAMS ((void));' >>init.c-tmp
- @echo 'void initialize_tui_files PARAMS ((void)) {' >>init.c-tmp
- @-( cd $(srcdir) ; grep '^_initialize_[a-z_0-9A-Z]* *(' $(SOURCES) ) 2>/dev/null \
- | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 PARAMS ((void)); \1 ();}/' >>init.c-tmp
- @echo '}' >>init.c-tmp
- @mv init.c-tmp tuiInit.c
-
-clean:
- rm -f *.o *.a
diff --git a/contrib/gdb/gdb/tui/Makefile.in b/contrib/gdb/gdb/tui/Makefile.in
deleted file mode 100644
index 256464b5bc5e..000000000000
--- a/contrib/gdb/gdb/tui/Makefile.in
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1998 Free Software Foundation, Inc.
-
-# This file is part of GDB.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-all: libtui.a
-
-srcdir=@srcdir@
-VPATH = @srcdir@
-
-SHELL = @SHELL@
-
-CC=@CC@
-CFLAGS=@CFLAGS@
-AR=@AR@
-RANLIB=@RANLIB@
-
-# Host and target-dependent makefile fragments come in here.
-@host_makefile_frag@
-@target_makefile_frag@
-# End of host and target-dependent makefile fragments
-
-# Where is our "include" directory? Typically $(srcdir)/../include.
-# This is essentially the header file directory for the library
-# routines in libiberty.
-INCLUDE_DIR = $(srcdir)/../../include
-INCLUDE_CFLAGS = -I$(INCLUDE_DIR)
-
-# Configured by the --with-mmalloc option to configure.
-MMALLOC = @MMALLOC@
-MMALLOC_CFLAGS = @MMALLOC_CFLAGS@
-
-# Where is the BFD library? Typically in ../bfd.
-BFD_DIR = ../../bfd
-BFD_SRC = $(srcdir)/$(BFD_DIR)
-BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
-
-# Where is the READLINE library? Typically in ../readline.
-READLINE_DIR = ../../readline
-READLINE_SRC = $(srcdir)/$(READLINE_DIR)
-READLINE_CFLAGS = -I$(READLINE_SRC)
-
-# Where is the INTL library? Typically in ../intl.
-INTL_DIR = ../../intl
-INTL_SRC = $(srcdir)/$(INTL_DIR)
-INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC)
-
-# Where is the TCL library? Typically in ../tcl.
-TCL_CFLAGS = @TCLHDIR@
-
-# Where is the TK library? Typically in ../tk.
-TK_CFLAGS = @TKHDIR@ @TK_BUILD_INCLUDES@
-
-# Where is Itcl? Typically in ../itcl.
-ITCL_CFLAGS = @ITCLHDIR@
-
-# Where is Tix? Typically in ../tix.
-TIX_CFLAGS = @TIXHDIR@
-
-X11_CFLAGS = @TK_XINCLUDES@
-
-ENABLE_IDE= @ENABLE_IDE@
-
-GUI_CFLAGS_X = -I$(srcdir)/../../libgui/src
-
-IDE_CFLAGS_X = -I$(srcdir)/../../libidetcl/src -I$(srcdir)/../../libide/src \
- `if [ x"$(ENABLE_IDE)" != x ] ; then \
- echo -DIDE -I$(srcdir)/../../ilu/runtime/mainloop;\
- fi`
-
-IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
-
-ENABLE_CFLAGS= @ENABLE_CFLAGS@
-
-# -I. for config files.
-# -I$(srcdir) for gdb internal headers and possibly for gnu-regex.h also.
-# -I$(srcdir)/config for more generic config files.
-
-# It is also possible that you will need to add -I/usr/include/sys if
-# your system doesn't have fcntl.h in /usr/include (which is where it
-# should be according to Posix).
-DEFS = @DEFS@
-GDB_CFLAGS = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config $(DEFS)
-
-# 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
-
-# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
-INTERNAL_CFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
- $(GDB_CFLAGS) $(READLINE_CFLAGS) $(BFD_CFLAGS) \
- $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) $(INTL_CFLAGS) \
- $(ENABLE_CFLAGS)
-
-HEADERS = tuiIO.h tuiData.h tuiGeneralWin.h tuiLayout.h tuiStack.h \
- tuiSource.h tuiCommand.h tuiWin.h tuiDisassem.h \
- tuiSourceWin.h tuiRegs.h tuiDataWin.h
-
-SOURCES = tui.c tuiData.c tuiSource.c tuiStack.c tuiIO.c \
- tuiGeneralWin.c tuiLayout.c tuiWin.c tuiCommand.c \
- tuiDisassem.c tuiSourceWin.c tuiRegs.c tuiDataWin.c
-
-OBJECTS = tui.o tuiData.o tuiSource.o tuiStack.o tuiIO.o \
- tuiGeneralWin.o tuiLayout.o tuiWin.o tuiCommand.o \
- tuiDisassem.o tuiSourceWin.o tuiRegs.o tuiDataWin.o \
- tuiInit.o
-
-
-# Prevent Sun make from putting in the machine type. Setting
-# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
-.c.o:
- $(CC) -c $(INTERNAL_CFLAGS) $<
-.SUFFIXES: .cpp
-.c.cpp:
- $(CC) -E $(INTERNAL_CFLAGS) $< > $@
-
-libtui.a: $(OBJECTS)
- rm -f libtui.a
- $(AR) rc libtui.a $(OBJECTS)
- $(RANLIB) libtui.a
-
-tui.o: tui.c tui.h tuiData.h tuiLayout.h tuiIO.h tuiRegs.h tuiWin.h
-tuiCommand.o: tui.h tuiData.h tuiWin.h tuiIO.h
-tuiData.o: tui.h tuiData.h
-tuiDataWin.o: tui.h tuiData.h tuiRegs.h
-tuiDisassem.o: tui.h tuiData.h tuiLayout.h tuiSourceWin.h tuiStack.h
-tuiGeneralWin.o: tui.h tuiData.h tuiGeneralWin.h
-tuiIO.o: tui.h tuiData.h tuiIO.h tuiCommand.h tuiWin.h
-tuiLayout.o: tui.h tuiData.h tuiGeneralWin.h tuiStack.h tuiRegs.h \
- tuiDisassem.h
-tuiRegs.o: tui.h tuiData.h tuiLayout.h tuiWin.h
-tuiSource.o: tui.h tuiData.h tuiStack.h tuiSourceWin.h tuiSource.h
-tuiSourceWin.o: tui.h tuiData.h tuiStack.h tuiSourceWin.h tuiSource.h \
- tuiDisassem.h
-tuiStack.o: tui.h tuiData.h tuiStack.h tuiSourceWin.h
-tuiWin.o: tui.h tuiData.h tuiGeneralWin.h tuiStack.h tuiSourceWin.h \
- tuiDataWin.h
-
-tuiInit.o: tuiInit.c
-tuiInit.c: $(SOURCES)
- @echo Making tuiInit.c
- @rm -f init.c-tmp
- @echo '/* Do not modify this file. */' >init.c-tmp
- @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp
- @echo '#include "ansidecl.h"' >>init.c-tmp
- @echo 'extern void initialize_tui_files PARAMS ((void));' >>init.c-tmp
- @echo 'void initialize_tui_files PARAMS ((void)) {' >>init.c-tmp
- @-( cd $(srcdir) ; grep '^_initialize_[a-z_0-9A-Z]* *(' $(SOURCES) ) 2>/dev/null \
- | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 PARAMS ((void)); \1 ();}/' >>init.c-tmp
- @echo '}' >>init.c-tmp
- @mv init.c-tmp tuiInit.c
-
-clean:
- rm -f *.o *.a
diff --git a/contrib/gdb/gdb/tui/tui.c b/contrib/gdb/gdb/tui/tui.c
deleted file mode 100644
index f64db4442a86..000000000000
--- a/contrib/gdb/gdb/tui/tui.c
+++ /dev/null
@@ -1,830 +0,0 @@
-/*
-** tui.c
-** General functions for the WDB TUI
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <malloc.h>
-#include <curses.h>
-#ifdef HAVE_TERM_H
-#include <term.h>
-#endif
-#include <signal.h>
-#include <fcntl.h>
-#include <termio.h>
-#include <setjmp.h>
-#include "defs.h"
-#include "gdbcmd.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiLayout.h"
-#include "tuiIO.h"
-#include "tuiRegs.h"
-#include "tuiWin.h"
-
-/* The Solaris header files seem to provide no declaration for this at
- all when __STDC__ is defined. This shouldn't conflict with
- anything. */
-extern char *tgoto ();
-
-/***********************
-** Local Definitions
-************************/
-#define FILEDES 2
-/* Solaris <sys/termios.h> defines CTRL. */
-#ifndef CTRL
-#define CTRL(x) (x & ~0140)
-#endif
-#define CHK(val, dft) (val<=0 ? dft : val)
-
-#define TOGGLE_USAGE "Usage:toggle breakpoints"
-#define TUI_TOGGLE_USAGE "Usage:\ttoggle $fregs\n\ttoggle breakpoints"
-
-/*****************************
-** Local static forward decls
-******************************/
-static void _tuiReset PARAMS ((void));
-static void _toggle_command PARAMS ((char *, int));
-static void _tui_vToggle_command PARAMS ((va_list));
-static Opaque _tui_vDo PARAMS ((TuiOpaqueFuncPtr, va_list));
-
-
-
-/***********************
-** Public Functions
-************************/
-
-/*
-** tuiInit().
-*/
-void
-#ifdef __STDC__
-tuiInit (char *argv0)
-#else
-tuiInit (argv0)
- char *argv0;
-#endif
-{
- extern void init_page_info ();
- extern void initialize_tui_files PARAMS ((void));
-
- initialize_tui_files ();
- initializeStaticData ();
- initscr ();
- refresh ();
- setTermHeightTo (LINES);
- setTermWidthTo (COLS);
- tuiInitWindows ();
- wrefresh (cmdWin->generic.handle);
- init_page_info ();
- /* Don't hook debugger output if doing command-window
- * the XDB way. However, one thing we do want to do in
- * XDB style is set up the scrolling region to be
- * the bottom of the screen (tuiTermUnsetup()).
- */
- fputs_unfiltered_hook = NULL;
- flush_hook = NULL;
- rl_initialize (); /* need readline initialization to
- * create termcap sequences
- */
- tuiTermUnsetup (1, cmdWin->detail.commandInfo.curch);
-
- return;
-} /* tuiInit */
-
-
-/*
-** tuiInitWindows().
-*/
-void
-#ifdef __STDC__
-tuiInitWindows (void)
-#else
-tuiInitWindows ()
-#endif
-{
- TuiWinType type;
-
- tuiSetLocatorContent (0);
- showLayout (SRC_COMMAND);
- keypad (cmdWin->generic.handle, TRUE);
- echo ();
- crmode ();
- nl ();
- tuiSetWinFocusTo (srcWin);
-
- return;
-} /* tuiInitWindows */
-
-
-/*
-** tuiCleanUp().
-** Kill signal handler and cleanup termination method
-*/
-void
-#ifdef __STDC__
-tuiResetScreen (void)
-#else
-tuiResetScreen ()
-#endif
-{
- TuiWinType type = SRC_WIN;
-
- keypad (cmdWin->generic.handle, FALSE);
- for (; type < MAX_MAJOR_WINDOWS; type++)
- {
- if (m_winPtrNotNull (winList[type]) &&
- winList[type]->generic.type != UNDEFINED_WIN &&
- !winList[type]->generic.isVisible)
- tuiDelWindow (winList[type]);
- }
- endwin ();
- initscr ();
- refresh ();
- echo ();
- crmode ();
- nl ();
-
- return;
-} /* tuiResetScreen */
-
-
-/*
-** tuiCleanUp().
-** Kill signal handler and cleanup termination method
-*/
-void
-#ifdef __STDC__
-tuiCleanUp (void)
-#else
-tuiCleanUp ()
-#endif
-{
- char *buffer;
- extern char *term_cursor_move;
-
- signal (SIGINT, SIG_IGN);
- tuiTermSetup (0); /* Restore scrolling region to whole screen */
- keypad (cmdWin->generic.handle, FALSE);
- freeAllWindows ();
- endwin ();
- buffer = tgoto (term_cursor_move, 0, termHeight ());
- tputs (buffer, 1, putchar);
- _tuiReset ();
-
- return;
-} /* tuiCleanUp */
-
-
-/*
-** tuiError().
-*/
-void
-#ifdef __STDC__
-tuiError (
- char *string,
- int exitGdb)
-#else
-tuiError (string, exitGdb)
- char *string;
- int exitGdb;
-#endif
-{
- puts_unfiltered (string);
- if (exitGdb)
- {
- tuiCleanUp ();
- exit (-1);
- }
-
- return;
-} /* tuiError */
-
-
-/*
-** tui_vError()
-** tuiError with args in a va_list.
-*/
-void
-#ifdef __STDC__
-tui_vError (
- va_list args)
-#else
-tui_vError (args)
- va_list args;
-#endif
-{
- char *string;
- int exitGdb;
-
- string = va_arg (args, char *);
- exitGdb = va_arg (args, int);
-
- tuiError (string, exitGdb);
-
- return;
-} /* tui_vError */
-
-
-/*
-** tuiFree()
-** Wrapper on top of free() to ensure that input address is greater than 0x0
-*/
-void
-#ifdef __STDC__
-tuiFree (
- char *ptr)
-#else
-tuiFree (ptr)
- char *ptr;
-#endif
-{
- if (ptr != (char *) NULL)
- {
- free (ptr);
- }
-
- return;
-} /* tuiFree */
-
-
-/* tuiGetLowDisassemblyAddress().
-** Determine what the low address will be to display in the TUI's
-** disassembly window. This may or may not be the same as the
-** low address input.
-*/
-Opaque
-#ifdef __STDC__
-tuiGetLowDisassemblyAddress (
- Opaque low,
- Opaque pc)
-#else
-tuiGetLowDisassemblyAddress (low, pc)
- Opaque low;
- Opaque pc;
-#endif
-{
- int line;
- Opaque newLow;
-
- /*
- ** Determine where to start the disassembly so that the pc is about in the
- ** middle of the viewport.
- */
- for (line = 0, newLow = pc;
- (newLow > low &&
- line < (tuiDefaultWinViewportHeight (DISASSEM_WIN,
- DISASSEM_COMMAND) / 2));)
- {
- bfd_byte buffer[4];
-
- newLow -= sizeof (bfd_getb32 (buffer));
- line++;
- }
-
- return newLow;
-} /* tuiGetLowDisassemblyAddress */
-
-
-/* tui_vGetLowDisassemblyAddress().
-** Determine what the low address will be to display in the TUI's
-** disassembly window with args in a va_list.
-*/
-Opaque
-#ifdef __STDC__
-tui_vGetLowDisassemblyAddress (
- va_list args)
-#else
-tui_vGetLowDisassemblyAddress (args)
- va_list args;
-#endif
-{
- int line;
- Opaque newLow;
- Opaque low;
- Opaque pc;
-
- low = va_arg (args, Opaque);
- pc = va_arg (args, Opaque);
-
- return (tuiGetLowDisassemblyAddress (low, pc));
-
-} /* tui_vGetLowDisassemblyAddress */
-
-
-/*
-** tuiDo().
-** General purpose function to execute a tui function. Transitions
-** between curses and the are handled here. This function is called
-** by non-tui gdb functions.
-**
-** Errors are caught here.
-** If there is no error, the value returned by 'func' is returned.
-** If there is an error, then zero is returned.
-**
-** Must not be called with immediate_quit in effect (bad things might
-** happen, say we got a signal in the middle of a memcpy to quit_return).
-** This is an OK restriction; with very few exceptions immediate_quit can
-** be replaced by judicious use of QUIT.
-*/
-Opaque
-#ifdef __STDC__
-tuiDo (
- TuiOpaqueFuncPtr func,...)
-#else
-tuiDo (func, va_alist)
- TuiOpaqueFuncPtr func;
- va_dcl
-#endif
-{
- extern int terminal_is_ours;
-
- Opaque ret = (Opaque) NULL;
-
- /* It is an error to be tuiDo'ing if we
- * don't own the terminal.
- */
- if (!terminal_is_ours)
- return ret;
-
- if (tui_version)
- {
- va_list args;
-
-#ifdef __STDC__
- va_start (args, func);
-#else
- va_start (args);
-#endif
- ret = _tui_vDo (func, args);
- va_end (args);
- }
-
- return ret;
-} /* tuiDo */
-
-
-/*
-** tuiDoAndReturnToTop().
-** General purpose function to execute a tui function. Transitions
-** between curses and the are handled here. This function is called
-** by non-tui gdb functions who wish to reset gdb to the top level.
-** After the tuiDo is performed, a return to the top level occurs.
-**
-** Errors are caught here.
-** If there is no error, the value returned by 'func' is returned.
-** If there is an error, then zero is returned.
-**
-** Must not be called with immediate_quit in effect (bad things might
-** happen, say we got a signal in the middle of a memcpy to quit_return).
-** This is an OK restriction; with very few exceptions immediate_quit can
-** be replaced by judicious use of QUIT.
-**
-*/
-Opaque
-#ifdef __STDC__
-tuiDoAndReturnToTop (
- TuiOpaqueFuncPtr func,...)
-#else
-tuiDoAndReturnToTop (func, va_alist)
- TuiOpaqueFuncPtr func;
- va_dcl
-#endif
-{
- extern int terminal_is_ours;
-
- Opaque ret = (Opaque) NULL;
-
- /* It is an error to be tuiDo'ing if we
- * don't own the terminal.
- */
- if (!terminal_is_ours)
- return ret;
-
- if (tui_version)
- {
- va_list args;
-
-#ifdef __STDC__
- va_start (args, func);
-#else
- va_start (args);
-#endif
- ret = _tui_vDo (func, args);
-
- /* force a return to the top level */
- return_to_top_level (RETURN_ERROR);
- }
-
- return ret;
-} /* tuiDoAndReturnToTop */
-
-
-void
-#ifdef __STDC__
-tui_vSelectSourceSymtab (
- va_list args)
-#else
-tui_vSelectSourceSymtab (args)
- va_list args;
-#endif
-{
- struct symtab *s = va_arg (args, struct symtab *);
-
- select_source_symtab (s);
- return;
-} /* tui_vSelectSourceSymtab */
-
-
-/*
-** _initialize_tui().
-** Function to initialize gdb commands, for tui window manipulation.
-*/
-void
-_initialize_tui ()
-{
-#if 0
- if (tui_version)
- {
- add_com ("toggle", class_tui, _toggle_command,
- "Toggle Terminal UI Features\n\
-Usage: Toggle $fregs\n\
-\tToggles between single and double precision floating point registers.\n");
- }
-#endif
- char *helpStr;
-
- if (tui_version)
- helpStr = "Toggle Specified Features\n\
-Usage:\ttoggle $fregs\n\ttoggle breakpoints";
- else
- helpStr = "Toggle Specified Features\nUsage:toggle breakpoints";
- add_abbrev_prefix_cmd ("toggle",
- class_tui,
- _toggle_command,
- helpStr,
- &togglelist,
- "toggle ",
- 1,
- &cmdlist);
-} /* _initialize_tui*/
-
-
-/*
-** va_catch_errors().
-** General purpose function to execute a function, catching errors.
-** If there is no error, the value returned by 'func' is returned.
-** If there is error, then zero is returned.
-** Note that 'func' must take a variable argument list as well.
-**
-** Must not be called with immediate_quit in effect (bad things might
-** happen, say we got a signal in the middle of a memcpy to quit_return).
-** This is an OK restriction; with very few exceptions immediate_quit can
-** be replaced by judicious use of QUIT.
-*/
-Opaque
-#ifdef __STDC__
-va_catch_errors (
- TuiOpaqueFuncPtr func,
- va_list args)
-#else
-va_catch_errors (func, args)
- TuiOpaqueFuncPtr func;
- va_list args;
-#endif
-{
- Opaque ret = (Opaque) NULL;
-
- /*
- ** We could have used catch_errors(), but it doesn't handle variable args.
- ** Also, for the tui, we always want to catch all errors, so we don't
- ** need to pass a mask, or an error string.
- */
- jmp_buf saved_error;
- jmp_buf saved_quit;
- jmp_buf tmp_jmp;
- struct cleanup *saved_cleanup_chain;
- char *saved_error_pre_print;
- char *saved_quit_pre_print;
- extern jmp_buf error_return;
- extern jmp_buf quit_return;
-
- saved_cleanup_chain = save_cleanups ();
- saved_error_pre_print = error_pre_print;
- saved_quit_pre_print = quit_pre_print;
-
- memcpy ((char *) saved_error, (char *) error_return, sizeof (jmp_buf));
- error_pre_print = "";
- memcpy (saved_quit, quit_return, sizeof (jmp_buf));
- quit_pre_print = "";
-
- if (setjmp (tmp_jmp) == 0)
- {
- va_list argList = args;
- memcpy (error_return, tmp_jmp, sizeof (jmp_buf));
- memcpy (quit_return, tmp_jmp, sizeof (jmp_buf));
- ret = func (argList);
- }
- restore_cleanups (saved_cleanup_chain);
- memcpy (error_return, saved_error, sizeof (jmp_buf));
- error_pre_print = saved_error_pre_print;
- memcpy (quit_return, saved_quit, sizeof (jmp_buf));
- quit_pre_print = saved_quit_pre_print;
-
- return ret;
-}
-
-/*
-** vcatch_errors().
-** Catch errors occurring in tui or non tui function, handling
-** variable param lists. Note that 'func' must take a variable
-** argument list as well.
-*/
-Opaque
-#ifdef __STDC__
-vcatch_errors (
- OpaqueFuncPtr func,...)
-#else
-vcatch_errors (va_alist)
- va_dcl
-/*
-vcatch_errors(func, va_alist)
- OpaqueFuncPtr func;
- va_dcl
-*/
-#endif
-{
- Opaque ret = (Opaque) NULL;
- va_list args;
-#ifdef __STDC__
- va_start (args, func);
-/*
- va_arg(args, OpaqueFuncPtr);
-*/
-#else
- OpaqueFuncPtr func;
-
- va_start (args);
- func = va_arg (args, OpaqueFuncPtr);
-#endif
- ret = va_catch_errors (func, args);
- va_end (args);
-
- return ret;
-}
-
-
-void
-#ifdef __STDC__
-strcat_to_buf (
- char *buf,
- int buflen,
- char *itemToAdd)
-#else
-strcat_to_buf (buf, buflen, itemToAdd)
- char *buf;
- int buflen;
- char *itemToAdd;
-#endif
-{
- if (itemToAdd != (char *) NULL && buf != (char *) NULL)
- {
- if ((strlen (buf) + strlen (itemToAdd)) <= buflen)
- strcat (buf, itemToAdd);
- else
- strncat (buf, itemToAdd, (buflen - strlen (buf)));
- }
-
- return;
-} /* strcat_to_buf */
-
-/* VARARGS */
-void
-#ifdef ANSI_PROTOTYPES
-strcat_to_buf_with_fmt (
- char *buf,
- int bufLen,
- char *format,...)
-#else
-strcat_to_buf_with_fmt (va_alist)
- va_dcl
-#endif
-{
- char *linebuffer;
- struct cleanup *old_cleanups;
- va_list args;
-#ifdef ANSI_PROTOTYPES
- va_start (args, format);
-#else
- char *buf;
- int bufLen;
- char *format;
-
- va_start (args);
- buf = va_arg (args, char *);
- bufLen = va_arg (args, int);
- format = va_arg (args, char *);
-#endif
- vasprintf (&linebuffer, format, args);
- old_cleanups = make_cleanup (free, linebuffer);
- strcat_to_buf (buf, bufLen, linebuffer);
- do_cleanups (old_cleanups);
- va_end (args);
-}
-
-
-
-
-
-/***********************
-** Static Functions
-************************/
-
-
-/*
-** _tui_vDo().
-** General purpose function to execute a tui function. Transitions
-** between curses and the are handled here. This function is called
-** by non-tui gdb functions.
-**
-** Errors are caught here.
-** If there is no error, the value returned by 'func' is returned.
-** If there is an error, then zero is returned.
-**
-** Must not be called with immediate_quit in effect (bad things might
-** happen, say we got a signal in the middle of a memcpy to quit_return).
-** This is an OK restriction; with very few exceptions immediate_quit can
-** be replaced by judicious use of QUIT.
-*/
-static Opaque
-#ifdef __STDC__
-_tui_vDo (
- TuiOpaqueFuncPtr func,
- va_list args)
-#else
-_tui_vDo (func, args)
- TuiOpaqueFuncPtr func;
- va_list args;
-#endif
-{
- extern int terminal_is_ours;
-
- Opaque ret = (Opaque) NULL;
-
- /* It is an error to be tuiDo'ing if we
- * don't own the terminal.
- */
- if (!terminal_is_ours)
- return ret;
-
- if (tui_version)
- {
- /* If doing command window the "XDB way" (command window
- * is unmanaged by curses...
- */
- /* Set up terminal for TUI */
- tuiTermSetup (1);
-
- ret = va_catch_errors (func, args);
-
- /* Set up terminal for command window */
- tuiTermUnsetup (1, cmdWin->detail.commandInfo.curch);
- }
-
- return ret;
-} /* _tui_vDo */
-
-
-static void
-#ifdef __STDC__
-_toggle_command (
- char *arg,
- int fromTTY)
-#else
-_toggle_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- printf_filtered ("Specify feature to toggle.\n%s\n",
- (tui_version) ? TUI_TOGGLE_USAGE : TOGGLE_USAGE);
-/*
- tuiDo((TuiOpaqueFuncPtr)_Toggle_command, arg, fromTTY);
-*/
-}
-
-/*
-** _tui_vToggle_command().
-*/
-static void
-#ifdef __STDC__
-_tui_vToggle_command (
- va_list args)
-#else
-_tui_vToggle_command (args)
- va_list args;
-#endif
-{
- char *arg;
- int fromTTY;
-
- arg = va_arg (args, char *);
-
- if (arg == (char *) NULL)
- printf_filtered (TOGGLE_USAGE);
- else
- {
- char *ptr = (char *) tuiStrDup (arg);
- int i;
-
- for (i = 0; (ptr[i]); i++)
- ptr[i] = toupper (arg[i]);
-
- if (subsetCompare (ptr, TUI_FLOAT_REGS_NAME))
- tuiToggleFloatRegs ();
-/* else if (subsetCompare(ptr, "ANOTHER TOGGLE OPTION"))
- ...
-*/
- else
- printf_filtered (TOGGLE_USAGE);
- tuiFree (ptr);
- }
-
- return;
-} /* _tuiToggle_command */
-
-
-static void
-#ifdef __STDC__
-_tuiReset (void)
-#else
-_tuiReset ()
-#endif
-{
- struct termio mode;
-
- /*
- ** reset the teletype mode bits to a sensible state.
- ** Copied tset.c
- */
-#if ! defined (USG) && defined (TIOCGETC)
- struct tchars tbuf;
-#endif /* !USG && TIOCGETC */
-#ifdef UCB_NTTY
- struct ltchars ltc;
-
- if (ldisc == NTTYDISC)
- {
- ioctl (FILEDES, TIOCGLTC, &ltc);
- ltc.t_suspc = CHK (ltc.t_suspc, CTRL ('Z'));
- ltc.t_dsuspc = CHK (ltc.t_dsuspc, CTRL ('Y'));
- ltc.t_rprntc = CHK (ltc.t_rprntc, CTRL ('R'));
- ltc.t_flushc = CHK (ltc.t_flushc, CTRL ('O'));
- ltc.t_werasc = CHK (ltc.t_werasc, CTRL ('W'));
- ltc.t_lnextc = CHK (ltc.t_lnextc, CTRL ('V'));
- ioctl (FILEDES, TIOCSLTC, &ltc);
- }
-#endif /* UCB_NTTY */
-#ifndef USG
-#ifdef TIOCGETC
- ioctl (FILEDES, TIOCGETC, &tbuf);
- tbuf.t_intrc = CHK (tbuf.t_intrc, CTRL ('?'));
- tbuf.t_quitc = CHK (tbuf.t_quitc, CTRL ('\\'));
- tbuf.t_startc = CHK (tbuf.t_startc, CTRL ('Q'));
- tbuf.t_stopc = CHK (tbuf.t_stopc, CTRL ('S'));
- tbuf.t_eofc = CHK (tbuf.t_eofc, CTRL ('D'));
- /* brkc is left alone */
- ioctl (FILEDES, TIOCSETC, &tbuf);
-#endif /* TIOCGETC */
- mode.sg_flags &= ~(RAW
-#ifdef CBREAK
- | CBREAK
-#endif /* CBREAK */
- | VTDELAY | ALLDELAY);
- mode.sg_flags |= XTABS | ECHO | CRMOD | ANYP;
-#else /*USG*/
- ioctl (FILEDES, TCGETA, &mode);
- mode.c_cc[VINTR] = CHK (mode.c_cc[VINTR], CTRL ('?'));
- mode.c_cc[VQUIT] = CHK (mode.c_cc[VQUIT], CTRL ('\\'));
- mode.c_cc[VEOF] = CHK (mode.c_cc[VEOF], CTRL ('D'));
-
- mode.c_iflag &= ~(IGNBRK | PARMRK | INPCK | INLCR | IGNCR | IUCLC | IXOFF);
- mode.c_iflag |= (BRKINT | ISTRIP | ICRNL | IXON);
- mode.c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | OFDEL |
- NLDLY | CRDLY | TABDLY | BSDLY | VTDLY | FFDLY);
- mode.c_oflag |= (OPOST | ONLCR);
- mode.c_cflag &= ~(CSIZE | PARODD | CLOCAL);
-#ifndef hp9000s800
- mode.c_cflag |= (CS8 | CREAD);
-#else /*hp9000s800*/
- mode.c_cflag |= (CS8 | CSTOPB | CREAD);
-#endif /* hp9000s800 */
- mode.c_lflag &= ~(XCASE | ECHONL | NOFLSH);
- mode.c_lflag |= (ISIG | ICANON | ECHO | ECHOK);
- ioctl (FILEDES, TCSETAW, &mode);
-#endif /* USG */
-
- return;
-} /* _tuiReset */
diff --git a/contrib/gdb/gdb/tui/tui.h b/contrib/gdb/gdb/tui/tui.h
deleted file mode 100644
index bc9fb31e6496..000000000000
--- a/contrib/gdb/gdb/tui/tui.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* External/Public TUI Header File */
-
-#ifndef TUI_H
-#define TUI_H
-#include <curses.h>
-
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#include "ansidecl.h"
-
-#if defined(reg)
-#undef reg
-#endif
-#if defined(chtype)
-#undef chtype
-#endif
-
-/* Opaque data type */
-typedef char *Opaque;
-typedef Opaque (*OpaqueFuncPtr) PARAMS ((va_list));
-typedef char **OpaqueList;
-typedef OpaqueList OpaquePtr;
-
-/* Generic function pointer */
-typedef void (*TuiVoidFuncPtr) PARAMS ((va_list));
-typedef int (*TuiIntFuncPtr) PARAMS ((va_list));
-/*
-typedef Opaque (*TuiOpaqueFuncPtr) PARAMS ((va_list));
-*/
-typedef OpaqueFuncPtr TuiOpaqueFuncPtr;
-
-extern Opaque vcatch_errors PARAMS ((OpaqueFuncPtr, ...));
-extern Opaque va_catch_errors PARAMS ((OpaqueFuncPtr, va_list));
-
-extern void strcat_to_buf PARAMS ((char *, int, char *));
-extern void strcat_to_buf_with_fmt PARAMS ((char *, int, char *, ...));
-
-/* Types of error returns */
-typedef enum {
- TUI_SUCCESS,
- TUI_FAILURE
-} TuiStatus, *TuiStatusPtr;
-
-/* Types of windows */
-typedef enum {
- SRC_WIN = 0,
- DISASSEM_WIN,
- DATA_WIN,
- CMD_WIN,
- /* This must ALWAYS be AFTER the major windows last */
- MAX_MAJOR_WINDOWS,
- /* auxillary windows */
- LOCATOR_WIN,
- EXEC_INFO_WIN,
- DATA_ITEM_WIN,
- /* This must ALWAYS be next to last */
- MAX_WINDOWS,
- UNDEFINED_WIN /* LAST */
-} TuiWinType, *TuiWinTypePtr;
-
-/* This is a point definition */
-typedef struct _TuiPoint {
- int x, y;
-} TuiPoint, *TuiPointPtr;
-
-/* Generic window information */
-typedef struct _TuiGenWinInfo {
- WINDOW *handle; /* window handle */
- TuiWinType type; /* type of window */
- int width; /* window width */
- int height; /* window height */
- TuiPoint origin; /* origin of window */
- OpaquePtr content; /* content of window */
- int contentSize; /* Size of content (# of elements) */
- int contentInUse; /* Can it be used, or is it already used? */
- int viewportHeight; /* viewport height */
- int lastVisibleLine; /* index of last visible line */
- int isVisible; /* whether the window is visible or not */
-} TuiGenWinInfo, *TuiGenWinInfoPtr;
-
-/* GENERAL TUI FUNCTIONS */
-/* tui.c */
-extern void tuiInit PARAMS ((char *argv0));
-extern void tuiInitWindows PARAMS ((void));
-extern void tuiResetScreen PARAMS ((void));
-extern void tuiCleanUp PARAMS ((void));
-extern void tuiError PARAMS ((char *, int));
-extern void tui_vError PARAMS ((va_list));
-extern void tuiFree PARAMS ((char *));
-extern Opaque tuiDo PARAMS ((TuiOpaqueFuncPtr, ...));
-extern Opaque tuiDoAndReturnToTop PARAMS ((TuiOpaqueFuncPtr, ...));
-extern Opaque tuiGetLowDisassemblyAddress PARAMS ((Opaque, Opaque));
-extern Opaque tui_vGetLowDisassemblyAddress PARAMS ((va_list));
-extern void tui_vSelectSourceSymtab PARAMS ((va_list));
-
-/* tuiDataWin.c */
-extern void tui_vCheckDataValues PARAMS ((va_list));
-
-/* tuiIO.c */
-extern void tui_vStartNewLines PARAMS ((va_list));
-
-/* tuiLayout.c */
-extern void tui_vAddWinToLayout PARAMS ((va_list));
-extern TuiStatus tui_vSetLayoutTo PARAMS ((va_list));
-
-/* tuiSourceWin.c */
-extern void tuiDisplayMainFunction PARAMS ((void));
-extern void tuiUpdateAllExecInfos PARAMS ((void));
-extern void tuiUpdateOnEnd PARAMS ((void));
-extern void tui_vAllSetHasBreakAt PARAMS ((va_list));
-extern void tui_vUpdateSourceWindowsWithAddr PARAMS ((va_list));
-
-/* tuiStack.c */
-extern void tui_vShowFrameInfo PARAMS ((va_list));
-extern void tui_vUpdateLocatorFilename PARAMS ((va_list));
-#endif /* TUI_H */
diff --git a/contrib/gdb/gdb/tui/tuiCommand.c b/contrib/gdb/gdb/tui/tuiCommand.c
deleted file mode 100644
index 454dc62e8572..000000000000
--- a/contrib/gdb/gdb/tui/tuiCommand.c
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
-** tuiCommand.c
-** This module contains functions specific to command window processing.
-*/
-
-
-#include "defs.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiWin.h"
-#include "tuiIO.h"
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS **
-******************************************/
-
-
-
-/*****************************************
-** PUBLIC FUNCTIONS **
-******************************************/
-
-/*
-** tuiDispatchCtrlChar().
-** Dispatch the correct tui function based upon the control character.
-*/
-unsigned int
-#ifdef __STDC__
-tuiDispatchCtrlChar (
- unsigned int ch)
-#else
-tuiDispatchCtrlChar (ch)
- unsigned int ch;
-#endif
-{
- TuiWinInfoPtr winInfo = tuiWinWithFocus ();
-
- /*
- ** If the command window has the logical focus, or no-one does
- ** assume it is the command window; in this case, pass the
- ** character on through and do nothing here.
- */
- if (winInfo == (TuiWinInfoPtr) NULL || winInfo == cmdWin)
- return ch;
- else
- {
- unsigned int c = 0, chCopy = ch;
- register int i;
- char *term;
-
- /* If this is an xterm, page next/prev keys aren't returned
- ** by keypad as a single char, so we must handle them here.
- ** Seems like a bug in the curses library?
- */
- term = (char *) getenv ("TERM");
- for (i = 0; (term && term[i]); i++)
- term[i] = toupper (term[i]);
- if ((strcmp (term, "XTERM") == 0) && m_isStartSequence (ch))
- {
- unsigned int pageCh = 0, tmpChar;
-
- tmpChar = 0;
- while (!m_isEndSequence (tmpChar))
- {
- tmpChar = (int) wgetch (cmdWin->generic.handle);
- if (!tmpChar)
- break;
- if (tmpChar == 53)
- pageCh = KEY_PPAGE;
- else if (tmpChar == 54)
- pageCh = KEY_NPAGE;
- }
- chCopy = pageCh;
- }
-
- switch (chCopy)
- {
- case KEY_NPAGE:
- tuiScrollForward (winInfo, 0);
- break;
- case KEY_PPAGE:
- tuiScrollBackward (winInfo, 0);
- break;
- case KEY_DOWN:
- case KEY_SF:
- tuiScrollForward (winInfo, 1);
- break;
- case KEY_UP:
- case KEY_SR:
- tuiScrollBackward (winInfo, 1);
- break;
- case KEY_RIGHT:
- tuiScrollLeft (winInfo, 1);
- break;
- case KEY_LEFT:
- tuiScrollRight (winInfo, 1);
- break;
- case '\f':
- tuiRefreshAll ();
- break;
- default:
- c = chCopy;
- break;
- }
- return c;
- }
-} /* tuiDispatchCtrlChar */
-
-
-/*
-** tuiIncrCommandCharCountBy()
-** Increment the current character count in the command window,
-** checking for overflow. Returns the new value of the char count.
-*/
-int
-#ifdef __STDC__
-tuiIncrCommandCharCountBy (
- int count)
-#else
-tuiIncrCommandCharCountBy (count)
- int count;
-#endif
-{
- if (tui_version)
- {
- if ((count + cmdWin->detail.commandInfo.curch) >= cmdWin->generic.width)
- cmdWin->detail.commandInfo.curch =
- (count + cmdWin->detail.commandInfo.curch) - cmdWin->generic.width;
- else
- cmdWin->detail.commandInfo.curch += count;
- }
-
- return cmdWin->detail.commandInfo.curch;
-} /* tuiIncrCommandCharCountBy */
-
-
-/*
-** tuiDecrCommandCharCountBy()
-** Decrement the current character count in the command window,
-** checking for overflow. Returns the new value of the char count.
-*/
-int
-#ifdef __STDC__
-tuiDecrCommandCharCountBy (
- int count)
-#else
-tuiDecrCommandCharCountBy (count)
- int count;
-#endif
-{
- if (tui_version)
- {
- if ((cmdWin->detail.commandInfo.curch - count) < 0)
- cmdWin->detail.commandInfo.curch =
- cmdWin->generic.width + (cmdWin->detail.commandInfo.curch - count);
- else
- cmdWin->detail.commandInfo.curch -= count;
- }
-
- return cmdWin->detail.commandInfo.curch;
-} /* tuiDecrCommandCharCountBy */
-
-
-/*
-** tuiSetCommandCharCountTo()
-** Set the character count to count.
-*/
-int
-#ifdef __STDC__
-tuiSetCommandCharCountTo (
- int count)
-#else
-tuiSetCommandCharCountTo (count)
- int count;
-#endif
-{
- if (tui_version)
- {
- if (count > cmdWin->generic.width - 1)
- {
- cmdWin->detail.commandInfo.curch = 0;
- tuiIncrCommandCharCountBy (count);
- }
- else
- cmdWin->detail.commandInfo.curch -= count;
- }
-
- return cmdWin->detail.commandInfo.curch;
-} /* tuiSetCommandCharCountTo */
-
-
-
-/*
-** tuiClearCommandCharCount()
-** Clear the character count to count.
-*/
-int
-#ifdef __STDC__
-tuiClearCommandCharCount (void)
-#else
-tuiClearCommandCharCount ()
-#endif
-{
- if (tui_version)
- cmdWin->detail.commandInfo.curch = 0;
-
- return cmdWin->detail.commandInfo.curch;
-} /* tuiClearCommandCharCount */
-
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS **
-******************************************/
diff --git a/contrib/gdb/gdb/tui/tuiCommand.h b/contrib/gdb/gdb/tui/tuiCommand.h
deleted file mode 100644
index 206d918dd56e..000000000000
--- a/contrib/gdb/gdb/tui/tuiCommand.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _TUI_COMMAND_H
-#define _TUI_COMMAND_H
-/*
-** This header file supports
-*/
-
-
-/*****************************************
-** TYPE DEFINITIONS **
-******************************************/
-
-
-
-/*****************************************
-** PUBLIC FUNCTION EXTERNAL DECLS **
-******************************************/
-
-extern unsigned int tuiDispatchCtrlChar PARAMS ((unsigned int));
-extern int tuiIncrCommandCharCountBy PARAMS ((int));
-extern int tuiDecrCommandCharCountBy PARAMS ((int));
-extern int tuiSetCommandCharCountTo PARAMS ((int));
-extern int tuiClearCommandCharCount PARAMS ((void));
-
-#endif /*_TUI_COMMAND_H*/
diff --git a/contrib/gdb/gdb/tui/tuiData.c b/contrib/gdb/gdb/tui/tuiData.c
deleted file mode 100644
index 758a6cde492d..000000000000
--- a/contrib/gdb/gdb/tui/tuiData.c
+++ /dev/null
@@ -1,1624 +0,0 @@
-/*
-** tuiData.c
-** This module contains functions for manipulating the data
-** structures used by the TUI
-*/
-
-#include "defs.h"
-#include "tui.h"
-#include "tuiData.h"
-
-/****************************
-** GLOBAL DECLARATIONS
-****************************/
-TuiWinInfoPtr winList[MAX_MAJOR_WINDOWS];
-
-/***************************
-** Private Definitions
-****************************/
-#define FILE_WIDTH 30
-#define PROC_WIDTH 40
-#define LINE_WIDTH 4
-#define PC_WIDTH 8
-
-/***************************
-** Private data
-****************************/
-static char *_tuiNullStr = TUI_NULL_STR;
-static char *_tuiBlankStr = " ";
-static char *_tuiLocationStr = " >";
-static char *_tuiBreakStr = " * ";
-static char *_tuiBreakLocationStr = " *>";
-static TuiLayoutType _currentLayout = UNDEFINED_LAYOUT;
-static int _termHeight, _termWidth;
-static int _historyLimit = DEFAULT_HISTORY_COUNT;
-static TuiGenWinInfo _locator;
-static TuiGenWinInfo _execInfo[2];
-static TuiWinInfoPtr _srcWinList[2];
-static TuiList _sourceWindows =
-{(OpaqueList) _srcWinList, 0};
-static int _defaultTabLen = DEFAULT_TAB_LEN;
-static TuiWinInfoPtr _winWithFocus = (TuiWinInfoPtr) NULL;
-static TuiLayoutDef _layoutDef =
-{SRC_WIN, /* displayMode */
- FALSE, /* split */
- TUI_UNDEFINED_REGS, /* regsDisplayType */
- TUI_SFLOAT_REGS}; /* floatRegsDisplayType */
-static int _winResized = FALSE;
-
-
-/*********************************
-** Static function forward decls
-**********************************/
-static void freeContent PARAMS ((TuiWinContent, int, TuiWinType));
-static void freeContentElements PARAMS ((TuiWinContent, int, TuiWinType));
-
-
-
-/*********************************
-** PUBLIC FUNCTIONS
-**********************************/
-
-/******************************************
-** ACCESSORS & MUTATORS FOR PRIVATE DATA
-******************************************/
-
-/*
-** tuiWinResized().
-** Answer a whether the terminal window has been resized or not
-*/
-int
-#ifdef __STDC__
-tuiWinResized (void)
-#else
-tuiWinResized ()
-#endif
-{
- return _winResized;
-} /* tuiWinResized */
-
-
-/*
-** tuiSetWinResized().
-** Set a whether the terminal window has been resized or not
-*/
-void
-#ifdef __STDC__
-tuiSetWinResizedTo (
- int resized)
-#else
-tuiSetWinResizedTo (resized)
- int resized;
-#endif
-{
- _winResized = resized;
-
- return;
-} /* tuiSetWinResizedTo */
-
-
-/*
-** tuiLayoutDef().
-** Answer a pointer to the current layout definition
-*/
-TuiLayoutDefPtr
-#ifdef __STDC__
-tuiLayoutDef (void)
-#else
-tuiLayoutDef ()
-#endif
-{
- return &_layoutDef;
-} /* tuiLayoutDef */
-
-
-/*
-** tuiWinWithFocus().
-** Answer the window with the logical focus
-*/
-TuiWinInfoPtr
-#ifdef __STDC__
-tuiWinWithFocus (void)
-#else
-tuiWinWithFocus ()
-#endif
-{
- return _winWithFocus;
-} /* tuiWinWithFocus */
-
-
-/*
-** tuiSetWinWithFocus().
-** Set the window that has the logical focus
-*/
-void
-#ifdef __STDC__
-tuiSetWinWithFocus (
- TuiWinInfoPtr winInfo)
-#else
-tuiSetWinWithFocus (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- _winWithFocus = winInfo;
-
- return;
-} /* tuiSetWinWithFocus */
-
-
-/*
-** tuiDefaultTabLen().
-** Answer the length in chars, of tabs
-*/
-int
-#ifdef __STDC__
-tuiDefaultTabLen (void)
-#else
-tuiDefaultTabLen ()
-#endif
-{
- return _defaultTabLen;
-} /* tuiDefaultTabLen */
-
-
-/*
-** tuiSetDefaultTabLen().
-** Set the length in chars, of tabs
-*/
-void
-#ifdef __STDC__
-tuiSetDefaultTabLen (
- int len)
-#else
-tuiSetDefaultTabLen (len)
- int len;
-#endif
-{
- _defaultTabLen = len;
-
- return;
-} /* tuiSetDefaultTabLen */
-
-
-/*
-** currentSourceWin()
-** Accessor for the current source window. Usually there is only
-** one source window (either source or disassembly), but both can
-** be displayed at the same time.
-*/
-TuiListPtr
-#ifdef __STDC__
-sourceWindows (void)
-#else
-sourceWindows ()
-#endif
-{
- return &_sourceWindows;
-} /* currentSourceWindows */
-
-
-/*
-** clearSourceWindows()
-** Clear the list of source windows. Usually there is only one
-** source window (either source or disassembly), but both can be
-** displayed at the same time.
-*/
-void
-#ifdef __STDC__
-clearSourceWindows (void)
-#else
-clearSourceWindows ()
-#endif
-{
- _sourceWindows.list[0] = (Opaque) NULL;
- _sourceWindows.list[1] = (Opaque) NULL;
- _sourceWindows.count = 0;
-
- return;
-} /* currentSourceWindows */
-
-
-/*
-** clearSourceWindowsDetail()
-** Clear the pertinant detail in the source windows.
-*/
-void
-#ifdef __STDC__
-clearSourceWindowsDetail (void)
-#else
-clearSourceWindowsDetail ()
-#endif
-{
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- clearWinDetail ((TuiWinInfoPtr) (sourceWindows ())->list[i]);
-
- return;
-} /* currentSourceWindows */
-
-
-/*
-** addSourceWindowToList().
-** Add a window to the list of source windows. Usually there is
-** only one source window (either source or disassembly), but
-** both can be displayed at the same time.
-*/
-void
-#ifdef __STDC__
-addToSourceWindows (
- TuiWinInfoPtr winInfo)
-#else
-addToSourceWindows (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- if (_sourceWindows.count < 2)
- _sourceWindows.list[_sourceWindows.count++] = (Opaque) winInfo;
-
- return;
-} /* addToSourceWindows */
-
-
-/*
-** clearWinDetail()
-** Clear the pertinant detail in the windows.
-*/
-void
-#ifdef __STDC__
-clearWinDetail (
- TuiWinInfoPtr winInfo)
-#else
-clearWinDetail (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- if (m_winPtrNotNull (winInfo))
- {
- switch (winInfo->generic.type)
- {
- case SRC_WIN:
- case DISASSEM_WIN:
- winInfo->detail.sourceInfo.startLineOrAddr.addr = (Opaque) NULL;
- winInfo->detail.sourceInfo.horizontalOffset = 0;
- break;
- case CMD_WIN:
- winInfo->detail.commandInfo.curLine =
- winInfo->detail.commandInfo.curch = 0;
- break;
- case DATA_WIN:
- winInfo->detail.dataDisplayInfo.dataContent =
- (TuiWinContent) NULL;
- winInfo->detail.dataDisplayInfo.dataContentCount = 0;
- winInfo->detail.dataDisplayInfo.regsContent =
- (TuiWinContent) NULL;
- winInfo->detail.dataDisplayInfo.regsContentCount = 0;
- winInfo->detail.dataDisplayInfo.regsDisplayType =
- TUI_UNDEFINED_REGS;
- winInfo->detail.dataDisplayInfo.regsColumnCount = 1;
- winInfo->detail.dataDisplayInfo.displayRegs = FALSE;
- break;
- default:
- break;
- }
- }
-
- return;
-} /* clearWinDetail */
-
-
-/*
-** blankStr()
-** Accessor for the blank string.
-*/
-char *
-#ifdef __STDC__
-blankStr (void)
-#else
-blankStr ()
-#endif
-{
- return _tuiBlankStr;
-} /* blankStr */
-
-
-/*
-** locationStr()
-** Accessor for the location string.
-*/
-char *
-#ifdef __STDC__
-locationStr (void)
-#else
-locationStr ()
-#endif
-{
- return _tuiLocationStr;
-} /* locationStr */
-
-
-/*
-** breakStr()
-** Accessor for the break string.
-*/
-char *
-#ifdef __STDC__
-breakStr (void)
-#else
-breakStr ()
-#endif
-{
- return _tuiBreakStr;
-} /* breakStr */
-
-
-/*
-** breakLocationStr()
-** Accessor for the breakLocation string.
-*/
-char *
-#ifdef __STDC__
-breakLocationStr (void)
-#else
-breakLocationStr ()
-#endif
-{
- return _tuiBreakLocationStr;
-} /* breakLocationStr */
-
-
-/*
-** nullStr()
-** Accessor for the null string.
-*/
-char *
-#ifdef __STDC__
-nullStr (void)
-#else
-nullStr ()
-#endif
-{
- return _tuiNullStr;
-} /* nullStr */
-
-
-/*
-** sourceExecInfoPtr().
-** Accessor for the source execution info ptr.
-*/
-TuiGenWinInfoPtr
-#ifdef __STDC__
-sourceExecInfoWinPtr (void)
-#else
-sourceExecInfoWinPtr ()
-#endif
-{
- return &_execInfo[0];
-} /* sourceExecInfoWinPtr */
-
-
-/*
-** disassemExecInfoPtr().
-** Accessor for the disassem execution info ptr.
-*/
-TuiGenWinInfoPtr
-#ifdef __STDC__
-disassemExecInfoWinPtr (void)
-#else
-disassemExecInfoWinPtr ()
-#endif
-{
- return &_execInfo[1];
-} /* disassemExecInfoWinPtr */
-
-
-/*
-** locatorWinInfoPtr().
-** Accessor for the locator win info. Answers a pointer to the
-** static locator win info struct.
-*/
-TuiGenWinInfoPtr
-#ifdef __STDC__
-locatorWinInfoPtr (void)
-#else
-locatorWinInfoPtr ()
-#endif
-{
- return &_locator;
-} /* locatorWinInfoPtr */
-
-
-/*
-** historyLimit().
-** Accessor for the history limit
-*/
-int
-#ifdef __STDC__
-historyLimit (void)
-#else
-historyLimit ()
-#endif
-{
- return _historyLimit;
-} /* historyLimit */
-
-
-/*
-** setHistoryLimitTo().
-** Mutator for the history limit
-*/
-void
-#ifdef __STDC__
-setHistoryLimitTo (
- int h)
-#else
-setHistoryLimitTo (h)
- int h;
-#endif
-{
- _historyLimit = h;
-
- return;
-} /* setHistoryLimitTo */
-
-/*
-** termHeight().
-** Accessor for the termHeight
-*/
-int
-#ifdef __STDC__
-termHeight (void)
-#else
-termHeight ()
-#endif
-{
- return _termHeight;
-} /* termHeight */
-
-
-/*
-** setTermHeightTo().
-** Mutator for the term height
-*/
-void
-#ifdef __STDC__
-setTermHeightTo (
- int h)
-#else
-setTermHeightTo (h)
- int h;
-#endif
-{
- _termHeight = h;
-
- return;
-} /* setTermHeightTo */
-
-
-/*
-** termWidth().
-** Accessor for the termWidth
-*/
-int
-#ifdef __STDC__
-termWidth (void)
-#else
-termWidth ()
-#endif
-{
- return _termWidth;
-} /* termWidth */
-
-
-/*
-** setTermWidth().
-** Mutator for the termWidth
-*/
-void
-#ifdef __STDC__
-setTermWidthTo (
- int w)
-#else
-setTermWidthTo (w)
- int w;
-#endif
-{
- _termWidth = w;
-
- return;
-} /* setTermWidthTo */
-
-
-/*
-** currentLayout().
-** Accessor for the current layout
-*/
-TuiLayoutType
-#ifdef __STDC__
-currentLayout (void)
-#else
-currentLayout ()
-#endif
-{
- return _currentLayout;
-} /* currentLayout */
-
-
-/*
-** setCurrentLayoutTo().
-** Mutator for the current layout
-*/
-void
-#ifdef __STDC__
-setCurrentLayoutTo (
- TuiLayoutType newLayout)
-#else
-setCurrentLayoutTo (newLayout)
- TuiLayoutType newLayout;
-#endif
-{
- _currentLayout = newLayout;
-
- return;
-} /* setCurrentLayoutTo */
-
-
-/*
-** setGenWinOrigin().
-** Set the origin of the window
-*/
-void
-#ifdef __STDC__
-setGenWinOrigin (
- TuiGenWinInfoPtr winInfo,
- int x,
- int y)
-#else
-setGenWinOrigin (winInfo, x, y)
- TuiGenWinInfoPtr winInfo;
- int x;
- int y;
-#endif
-{
- winInfo->origin.x = x;
- winInfo->origin.y = y;
-
- return;
-} /* setGenWinOrigin */
-
-
-/*****************************
-** OTHER PUBLIC FUNCTIONS
-*****************************/
-
-
-/*
-** tuiNextWin().
-** Answer the next window in the list, cycling back to the top
-** if necessary
-*/
-TuiWinInfoPtr
-#ifdef __STDC__
-tuiNextWin (
- TuiWinInfoPtr curWin)
-#else
-tuiNextWin (curWin)
- TuiWinInfoPtr curWin;
-#endif
-{
- TuiWinType type = curWin->generic.type;
- TuiWinInfoPtr nextWin = (TuiWinInfoPtr) NULL;
-
- if (curWin->generic.type == CMD_WIN)
- type = SRC_WIN;
- else
- type = curWin->generic.type + 1;
- while (type != curWin->generic.type && m_winPtrIsNull (nextWin))
- {
- if (winList[type]->generic.isVisible)
- nextWin = winList[type];
- else
- {
- if (type == CMD_WIN)
- type = SRC_WIN;
- else
- type++;
- }
- }
-
- return nextWin;
-} /* tuiNextWin */
-
-
-/*
-** tuiPrevWin().
-** Answer the prev window in the list, cycling back to the bottom
-** if necessary
-*/
-TuiWinInfoPtr
-#ifdef __STDC__
-tuiPrevWin (
- TuiWinInfoPtr curWin)
-#else
-tuiPrevWin (curWin)
- TuiWinInfoPtr curWin;
-#endif
-{
- TuiWinType type = curWin->generic.type;
- TuiWinInfoPtr prev = (TuiWinInfoPtr) NULL;
-
- if (curWin->generic.type == SRC_WIN)
- type = CMD_WIN;
- else
- type = curWin->generic.type - 1;
- while (type != curWin->generic.type && m_winPtrIsNull (prev))
- {
- if (winList[type]->generic.isVisible)
- prev = winList[type];
- else
- {
- if (type == SRC_WIN)
- type = CMD_WIN;
- else
- type--;
- }
- }
-
- return prev;
-} /* tuiPrevWin */
-
-
-/*
-** displayableWinContentOf().
-** Answer a the content at the location indicated by index. Note
-** that if this is a locator window, the string returned should be
-** freed after use.
-*/
-char *
-#ifdef __STDC__
-displayableWinContentOf (
- TuiGenWinInfoPtr winInfo,
- TuiWinElementPtr elementPtr)
-#else
-displayableWinContentOf (winInfo, elementPtr)
- TuiGenWinInfoPtr winInfo;
- TuiWinElementPtr elementPtr;
-#endif
-{
-
- char *string = nullStr ();
-
- if (elementPtr != (TuiWinElementPtr) NULL || winInfo->type == LOCATOR_WIN)
- {
- /*
- ** Now convert the line to a displayable string
- */
- switch (winInfo->type)
- {
- case SRC_WIN:
- case DISASSEM_WIN:
- string = elementPtr->whichElement.source.line;
- break;
- case CMD_WIN:
- string = elementPtr->whichElement.command.line;
- break;
- case LOCATOR_WIN:
- if ((string = (char *) xmalloc (
- (termWidth () + 1) * sizeof (char))) == (char *) NULL)
- string = nullStr ();
- else
- {
- char lineNo[50], pc[50], buf[50], *fname, *pname;
- register int strSize = termWidth (), i, procWidth, fileWidth;
-
- /*
- ** First determine the amount of file/proc name width
- ** we have available
- */
- i = strSize - (PC_WIDTH + LINE_WIDTH
- + 25 /* pc and line labels */
- + strlen (FILE_PREFIX) + 1 /* file label */
- + 15 /* procedure label */ );
- if (i >= FILE_WIDTH + PROC_WIDTH)
- {
- fileWidth = FILE_WIDTH;
- procWidth = PROC_WIDTH;
- }
- else
- {
- fileWidth = i / 2;
- procWidth = i - fileWidth;
- }
-
- /* Now convert elements to string form */
- if (elementPtr != (TuiWinElementPtr) NULL &&
- *elementPtr->whichElement.locator.fileName != (char) 0 &&
- srcWin->generic.isVisible)
- fname = elementPtr->whichElement.locator.fileName;
- else
- fname = "??";
- if (elementPtr != (TuiWinElementPtr) NULL &&
- *elementPtr->whichElement.locator.procName != (char) 0)
- pname = elementPtr->whichElement.locator.procName;
- else
- pname = "??";
- if (elementPtr != (TuiWinElementPtr) NULL &&
- elementPtr->whichElement.locator.lineNo > 0)
- sprintf (lineNo, "%d",
- elementPtr->whichElement.locator.lineNo);
- else
- strcpy (lineNo, "??");
- if (elementPtr != (TuiWinElementPtr) NULL &&
- elementPtr->whichElement.locator.addr > (Opaque) 0)
- sprintf (pc, "0x%x",
- elementPtr->whichElement.locator.addr);
- else
- strcpy (pc, "??");
- /*
- ** Now create the locator line from the string version
- ** of the elements. We could use sprintf() here but
- ** that wouldn't ensure that we don't overrun the size
- ** of the allocated buffer. strcat_to_buf() will.
- */
- *string = (char) 0;
- /* Filename */
- strcat_to_buf (string, strSize, " ");
- strcat_to_buf (string, strSize, FILE_PREFIX);
- if (strlen (fname) > fileWidth)
- {
- strncpy (buf, fname, fileWidth - 1);
- buf[fileWidth - 1] = '*';
- buf[fileWidth] = (char) 0;
- }
- else
- strcpy (buf, fname);
- strcat_to_buf (string, strSize, buf);
- /* procedure/class name */
- sprintf (buf, "%15s", PROC_PREFIX);
- strcat_to_buf (string, strSize, buf);
- if (strlen (pname) > procWidth)
- {
- strncpy (buf, pname, procWidth - 1);
- buf[procWidth - 1] = '*';
- buf[procWidth] = (char) 0;
- }
- else
- strcpy (buf, pname);
- strcat_to_buf (string, strSize, buf);
- sprintf (buf, "%10s", LINE_PREFIX);
- strcat_to_buf (string, strSize, buf);
- strcat_to_buf (string, strSize, lineNo);
- sprintf (buf, "%10s", PC_PREFIX);
- strcat_to_buf (string, strSize, buf);
- strcat_to_buf (string, strSize, pc);
- for (i = strlen (string); i < strSize; i++)
- string[i] = ' ';
- string[strSize] = (char) 0;
- }
- break;
- case EXEC_INFO_WIN:
- string = elementPtr->whichElement.simpleString;
- break;
- default:
- break;
- }
- }
- return string;
-} /* displayableWinContentOf */
-
-
-/*
-** winContentAt().
-** Answer a the content at the location indicated by index
-*/
-char *
-#ifdef __STDC__
-displayableWinContentAt (
- TuiGenWinInfoPtr winInfo,
- int index)
-#else
-displayableWinContentAt (winInfo, index)
- TuiGenWinInfoPtr winInfo;
- int index;
-#endif
-{
- return (displayableWinContentOf (winInfo, (TuiWinElementPtr) winInfo->content[index]));
-} /* winContentAt */
-
-
-/*
-** winElementHeight().
-** Answer the height of the element in lines
-*/
-int
-#ifdef __STDC__
-winElementHeight (
- TuiGenWinInfoPtr winInfo,
- TuiWinElementPtr element)
-#else
-winElementHeight (winInfo, element)
- TuiGenWinInfoPtr winInfo;
- TuiWinElementPtr element;
-#endif
-{
- int h;
-
- if (winInfo->type == DATA_WIN)
-/* FOR NOW SAY IT IS ONLY ONE LINE HIGH */
- h = 1;
- else
- h = 1;
-
- return h;
-} /* winElementHeight */
-
-
-/*
-** winByName().
-** Answer the window represented by name
-*/
-TuiWinInfoPtr
-#ifdef __STDC__
-winByName (
- char *name)
-#else
-winByName (name)
- char *name;
-#endif
-{
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
- int i = 0;
-
- while (i < MAX_MAJOR_WINDOWS && m_winPtrIsNull (winInfo))
- {
- if (strcmp (name, winName (&(winList[i]->generic))) == 0)
- winInfo = winList[i];
- i++;
- }
-
- return winInfo;
-} /* winByName */
-
-
-/*
-** partialWinByName().
-** Answer the window represented by name
-*/
-TuiWinInfoPtr
-#ifdef __STDC__
-partialWinByName (
- char *name)
-#else
-partialWinByName (name)
- char *name;
-#endif
-{
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
-
- if (name != (char *) NULL)
- {
- int i = 0;
-
- while (i < MAX_MAJOR_WINDOWS && m_winPtrIsNull (winInfo))
- {
- char *curName = winName (&winList[i]->generic);
- if (strlen (name) <= strlen (curName) &&
- strncmp (name, curName, strlen (name)) == 0)
- winInfo = winList[i];
- i++;
- }
- }
-
- return winInfo;
-} /* partialWinByName */
-
-
-/*
-** winName().
-** Answer the name of the window
-*/
-char *
-#ifdef __STDC__
-winName (
- TuiGenWinInfoPtr winInfo)
-#else
-winName (winInfo)
- TuiGenWinInfoPtr winInfo;
-#endif
-{
- char *name = (char *) NULL;
-
- switch (winInfo->type)
- {
- case SRC_WIN:
- name = SRC_NAME;
- break;
- case CMD_WIN:
- name = CMD_NAME;
- break;
- case DISASSEM_WIN:
- name = DISASSEM_NAME;
- break;
- case DATA_WIN:
- name = DATA_NAME;
- break;
- default:
- name = "";
- break;
- }
-
- return name;
-} /* winName */
-
-
-/*
-** initializeStaticData
-*/
-void
-#ifdef __STDC__
-initializeStaticData (void)
-#else
-initializeStaticData ()
-#endif
-{
- initGenericPart (sourceExecInfoWinPtr ());
- initGenericPart (disassemExecInfoWinPtr ());
- initGenericPart (locatorWinInfoPtr ());
-
- return;
-} /* initializeStaticData */
-
-
-/*
-** allocGenericWinInfo().
-*/
-TuiGenWinInfoPtr
-#ifdef __STDC__
-allocGenericWinInfo (void)
-#else
-allocGenericWinInfo ()
-#endif
-{
- TuiGenWinInfoPtr win;
-
- if ((win = (TuiGenWinInfoPtr) xmalloc (
- sizeof (TuiGenWinInfoPtr))) != (TuiGenWinInfoPtr) NULL)
- initGenericPart (win);
-
- return win;
-} /* allocGenericWinInfo */
-
-
-/*
-** initGenericPart().
-*/
-void
-#ifdef __STDC__
-initGenericPart (
- TuiGenWinInfoPtr win)
-#else
-initGenericPart (win)
- TuiGenWinInfoPtr win;
-#endif
-{
- win->width =
- win->height =
- win->origin.x =
- win->origin.y =
- win->viewportHeight =
- win->contentSize =
- win->lastVisibleLine = 0;
- win->handle = (WINDOW *) NULL;
- win->content = (OpaquePtr) NULL;
- win->contentInUse =
- win->isVisible = FALSE;
-
- return;
-} /* initGenericPart */
-
-
-/*
-** initContentElement().
-*/
-void
-#ifdef __STDC__
-initContentElement (
- TuiWinElementPtr element,
- TuiWinType type)
-#else
-initContentElement (element, type)
- TuiWinElementPtr element;
- TuiWinType type;
-#endif
-{
- element->highlight = FALSE;
- switch (type)
- {
- case SRC_WIN:
- case DISASSEM_WIN:
- element->whichElement.source.line = (char *) NULL;
- element->whichElement.source.lineOrAddr.lineNo = 0;
- element->whichElement.source.isExecPoint = FALSE;
- element->whichElement.source.hasBreak = FALSE;
- break;
- case DATA_WIN:
- initGenericPart (&element->whichElement.dataWindow);
- element->whichElement.dataWindow.type = DATA_ITEM_WIN;
- ((TuiGenWinInfoPtr) & element->whichElement.dataWindow)->content =
- (OpaquePtr) allocContent (1, DATA_ITEM_WIN);
- ((TuiGenWinInfoPtr)
- & element->whichElement.dataWindow)->contentSize = 1;
- break;
- case CMD_WIN:
- element->whichElement.command.line = (char *) NULL;
- break;
- case DATA_ITEM_WIN:
- element->whichElement.data.name = (char *) NULL;
- element->whichElement.data.type = TUI_REGISTER;
- element->whichElement.data.itemNo = UNDEFINED_ITEM;
- element->whichElement.data.value = (Opaque) NULL;
- element->whichElement.data.highlight = FALSE;
- break;
- case LOCATOR_WIN:
- element->whichElement.locator.fileName[0] =
- element->whichElement.locator.procName[0] = (char) 0;
- element->whichElement.locator.lineNo = 0;
- element->whichElement.locator.addr = 0;
- break;
- case EXEC_INFO_WIN:
- element->whichElement.simpleString = blankStr ();
- break;
- default:
- break;
- }
- return;
-} /* initContentElement */
-
-/*
-** initWinInfo().
-*/
-void
-#ifdef __STDC__
-initWinInfo (
- TuiWinInfoPtr winInfo)
-#else
-initWinInfo (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- initGenericPart (&winInfo->generic);
- winInfo->canHighlight =
- winInfo->isHighlighted = FALSE;
- switch (winInfo->generic.type)
- {
- case SRC_WIN:
- case DISASSEM_WIN:
- winInfo->detail.sourceInfo.executionInfo = (TuiGenWinInfoPtr) NULL;
- winInfo->detail.sourceInfo.hasLocator = FALSE;
- winInfo->detail.sourceInfo.horizontalOffset = 0;
- winInfo->detail.sourceInfo.startLineOrAddr.addr = (Opaque) NULL;
- break;
- case DATA_WIN:
- winInfo->detail.dataDisplayInfo.dataContent = (TuiWinContent) NULL;
- winInfo->detail.dataDisplayInfo.dataContentCount = 0;
- winInfo->detail.dataDisplayInfo.regsContent = (TuiWinContent) NULL;
- winInfo->detail.dataDisplayInfo.regsContentCount = 0;
- winInfo->detail.dataDisplayInfo.regsDisplayType =
- TUI_UNDEFINED_REGS;
- winInfo->detail.dataDisplayInfo.regsColumnCount = 1;
- winInfo->detail.dataDisplayInfo.displayRegs = FALSE;
- break;
- case CMD_WIN:
- winInfo->detail.commandInfo.curLine = 0;
- winInfo->detail.commandInfo.curch = 0;
- break;
- default:
- winInfo->detail.opaque = (Opaque) NULL;
- break;
- }
-
- return;
-} /* initWinInfo */
-
-
-/*
-** allocWinInfo().
-*/
-TuiWinInfoPtr
-#ifdef __STDC__
-allocWinInfo (
- TuiWinType type)
-#else
-allocWinInfo (type)
- TuiWinType type;
-#endif
-{
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
-
- winInfo = (TuiWinInfoPtr) xmalloc (sizeof (TuiWinInfo));
- if (m_winPtrNotNull (winInfo))
- {
- winInfo->generic.type = type;
- initWinInfo (winInfo);
- }
-
- return winInfo;
-} /* allocWinInfo */
-
-
-/*
-** allocContent().
-** Allocates the content and elements in a block.
-*/
-TuiWinContent
-#ifdef __STDC__
-allocContent (
- int numElements,
- TuiWinType type)
-#else
-allocContent (numElements, type)
- int numElements;
- TuiWinType type;
-#endif
-{
- TuiWinContent content = (TuiWinContent) NULL;
- char *elementBlockPtr = (char *) NULL;
- int i;
-
- if ((content = (TuiWinContent)
- xmalloc (sizeof (TuiWinElementPtr) * numElements)) != (TuiWinContent) NULL)
- { /*
- ** All windows, except the data window, can allocate the elements
- ** in a chunk. The data window cannot because items can be
- ** added/removed from the data display by the user at any time.
- */
- if (type != DATA_WIN)
- {
- if ((elementBlockPtr = (char *)
- xmalloc (sizeof (TuiWinElement) * numElements)) != (char *) NULL)
- {
- for (i = 0; i < numElements; i++)
- {
- content[i] = (TuiWinElementPtr) elementBlockPtr;
- initContentElement (content[i], type);
- elementBlockPtr += sizeof (TuiWinElement);
- }
- }
- else
- {
- tuiFree ((char *) content);
- content = (TuiWinContent) NULL;
- }
- }
- }
-
- return content;
-} /* allocContent */
-
-
-/*
-** addContentElements().
-** Adds the input number of elements to the windows's content. If
-** no content has been allocated yet, allocContent() is called to
-** do this. The index of the first element added is returned,
-** unless there is a memory allocation error, in which case, (-1)
-** is returned.
-*/
-int
-#ifdef __STDC__
-addContentElements (
- TuiGenWinInfoPtr winInfo,
- int numElements)
-#else
-addContentElements (winInfo, numElements)
- TuiGenWinInfoPtr winInfo;
- int numElements;
-#endif
-{
- TuiWinElementPtr elementPtr;
- int i, indexStart;
-
- if (winInfo->content == (OpaquePtr) NULL)
- {
- winInfo->content = (OpaquePtr) allocContent (numElements, winInfo->type);
- indexStart = 0;
- }
- else
- indexStart = winInfo->contentSize;
- if (winInfo->content != (OpaquePtr) NULL)
- {
- for (i = indexStart; (i < numElements + indexStart); i++)
- {
- if ((elementPtr = (TuiWinElementPtr)
- xmalloc (sizeof (TuiWinElement))) != (TuiWinElementPtr) NULL)
- {
- winInfo->content[i] = (Opaque) elementPtr;
- initContentElement (elementPtr, winInfo->type);
- winInfo->contentSize++;
- }
- else /* things must be really hosed now! We ran out of memory!?*/
- return (-1);
- }
- }
-
- return indexStart;
-} /* addContentElements */
-
-
-/*
-** tuiDelWindow().
-** Delete all curses windows associated with winInfo, leaving everything
-** else in tact.
-*/
-void
-#ifdef __STDC__
-tuiDelWindow (
- TuiWinInfoPtr winInfo)
-#else
-tuiDelWindow (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- Opaque detail;
- int i;
- TuiGenWinInfoPtr genericWin;
-
-
- switch (winInfo->generic.type)
- {
- case SRC_WIN:
- case DISASSEM_WIN:
- genericWin = locatorWinInfoPtr ();
- if (genericWin != (TuiGenWinInfoPtr) NULL)
- {
- tuiDelwin (genericWin->handle);
- genericWin->handle = (WINDOW *) NULL;
- genericWin->isVisible = FALSE;
- }
- genericWin = winInfo->detail.sourceInfo.executionInfo;
- if (genericWin != (TuiGenWinInfoPtr) NULL)
- {
- tuiDelwin (genericWin->handle);
- genericWin->handle = (WINDOW *) NULL;
- genericWin->isVisible = FALSE;
- }
- break;
- case DATA_WIN:
- if (winInfo->generic.content != (OpaquePtr) NULL)
- {
- int i;
-
- tuiDelDataWindows (
- winInfo->detail.dataDisplayInfo.regsContent,
- winInfo->detail.dataDisplayInfo.regsContentCount);
- tuiDelDataWindows (
- winInfo->detail.dataDisplayInfo.dataContent,
- winInfo->detail.dataDisplayInfo.dataContentCount);
- }
- break;
- default:
- break;
- }
- if (winInfo->generic.handle != (WINDOW *) NULL)
- {
- tuiDelwin (winInfo->generic.handle);
- winInfo->generic.handle = (WINDOW *) NULL;
- winInfo->generic.isVisible = FALSE;
- }
-
- return;
-} /* tuiDelWindow */
-
-
-/*
-** freeWindow().
-*/
-void
-#ifdef __STDC__
-freeWindow (
- TuiWinInfoPtr winInfo)
-#else
-freeWindow (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- Opaque detail;
- int i;
- TuiGenWinInfoPtr genericWin;
-
-
- switch (winInfo->generic.type)
- {
- case SRC_WIN:
- case DISASSEM_WIN:
- genericWin = locatorWinInfoPtr ();
- if (genericWin != (TuiGenWinInfoPtr) NULL)
- {
- tuiDelwin (genericWin->handle);
- genericWin->handle = (WINDOW *) NULL;
- }
- freeWinContent (genericWin);
- genericWin = winInfo->detail.sourceInfo.executionInfo;
- if (genericWin != (TuiGenWinInfoPtr) NULL)
- {
- tuiDelwin (genericWin->handle);
- genericWin->handle = (WINDOW *) NULL;
- freeWinContent (genericWin);
- }
- break;
- case DATA_WIN:
- if (winInfo->generic.content != (OpaquePtr) NULL)
- {
- freeDataContent (
- winInfo->detail.dataDisplayInfo.regsContent,
- winInfo->detail.dataDisplayInfo.regsContentCount);
- winInfo->detail.dataDisplayInfo.regsContent =
- (TuiWinContent) NULL;
- winInfo->detail.dataDisplayInfo.regsContentCount = 0;
- freeDataContent (
- winInfo->detail.dataDisplayInfo.dataContent,
- winInfo->detail.dataDisplayInfo.dataContentCount);
- winInfo->detail.dataDisplayInfo.dataContent =
- (TuiWinContent) NULL;
- winInfo->detail.dataDisplayInfo.dataContentCount = 0;
- winInfo->detail.dataDisplayInfo.regsDisplayType =
- TUI_UNDEFINED_REGS;
- winInfo->detail.dataDisplayInfo.regsColumnCount = 1;
- winInfo->detail.dataDisplayInfo.displayRegs = FALSE;
- winInfo->generic.content = (OpaquePtr) NULL;
- winInfo->generic.contentSize = 0;
- }
- break;
- default:
- break;
- }
- if (winInfo->generic.handle != (WINDOW *) NULL)
- {
- tuiDelwin (winInfo->generic.handle);
- winInfo->generic.handle = (WINDOW *) NULL;
- freeWinContent (&winInfo->generic);
- }
- free (winInfo);
-
- return;
-} /* freeWindow */
-
-
-/*
-** freeAllSourceWinsContent().
-*/
-void
-#ifdef __STDC__
-freeAllSourceWinsContent (void)
-#else
-freeAllSourceWinsContent ()
-#endif
-{
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- {
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
-
- if (m_winPtrNotNull (winInfo))
- {
- freeWinContent (&(winInfo->generic));
- freeWinContent (winInfo->detail.sourceInfo.executionInfo);
- }
- }
-
- return;
-} /* freeAllSourceWinsContent */
-
-
-/*
-** freeWinContent().
-*/
-void
-#ifdef __STDC__
-freeWinContent (
- TuiGenWinInfoPtr winInfo)
-#else
-freeWinContent (winInfo)
- TuiGenWinInfoPtr winInfo;
-#endif
-{
- if (winInfo->content != (OpaquePtr) NULL)
- {
- freeContent ((TuiWinContent) winInfo->content,
- winInfo->contentSize,
- winInfo->type);
- winInfo->content = (OpaquePtr) NULL;
- }
- winInfo->contentSize = 0;
-
- return;
-} /* freeWinContent */
-
-
-/*
-** freeAllWindows().
-*/
-void
-#ifdef __STDC__
-freeAllWindows (void)
-#else
-freeAllWindows ()
-#endif
-{
- TuiWinType type = SRC_WIN;
-
- for (; type < MAX_MAJOR_WINDOWS; type++)
- if (m_winPtrNotNull (winList[type]) &&
- winList[type]->generic.type != UNDEFINED_WIN)
- freeWindow (winList[type]);
- return;
-} /* freeAllWindows */
-
-
-void
-#ifdef __STDC__
-tuiDelDataWindows (
- TuiWinContent content,
- int contentSize)
-#else
-tuiDelDataWindows (content, contentSize)
- TuiWinContent content;
- int contentSize;
-#endif
-{
- int i;
-
- /*
- ** Remember that data window content elements are of type TuiGenWinInfoPtr,
- ** each of which whose single element is a data element.
- */
- for (i = 0; i < contentSize; i++)
- {
- TuiGenWinInfoPtr genericWin = &content[i]->whichElement.dataWindow;
-
- if (genericWin != (TuiGenWinInfoPtr) NULL)
- {
- tuiDelwin (genericWin->handle);
- genericWin->handle = (WINDOW *) NULL;
- genericWin->isVisible = FALSE;
- }
- }
-
- return;
-} /* tuiDelDataWindows */
-
-
-void
-#ifdef __STDC__
-freeDataContent (
- TuiWinContent content,
- int contentSize)
-#else
-freeDataContent (content, contentSize)
- TuiWinContent content;
- int contentSize;
-#endif
-{
- int i;
-
- /*
- ** Remember that data window content elements are of type TuiGenWinInfoPtr,
- ** each of which whose single element is a data element.
- */
- for (i = 0; i < contentSize; i++)
- {
- TuiGenWinInfoPtr genericWin = &content[i]->whichElement.dataWindow;
-
- if (genericWin != (TuiGenWinInfoPtr) NULL)
- {
- tuiDelwin (genericWin->handle);
- genericWin->handle = (WINDOW *) NULL;
- freeWinContent (genericWin);
- }
- }
- freeContent (content,
- contentSize,
- DATA_WIN);
-
- return;
-} /* freeDataContent */
-
-
-/**********************************
-** LOCAL STATIC FUNCTIONS **
-**********************************/
-
-
-/*
-** freeContent().
-*/
-static void
-#ifdef __STDC__
-freeContent (
- TuiWinContent content,
- int contentSize,
- TuiWinType winType)
-#else
-freeContent (content, contentSize, winType)
- TuiWinContent content;
- int contentSize;
- TuiWinType winType;
-#endif
-{
- if (content != (TuiWinContent) NULL)
- {
- freeContentElements (content, contentSize, winType);
- tuiFree ((char *) content);
- }
-
- return;
-} /* freeContent */
-
-
-/*
-** freeContentElements().
-*/
-static void
-#ifdef __STDC__
-freeContentElements (
- TuiWinContent content,
- int contentSize,
- TuiWinType type)
-#else
-freeContentElements (content, contentSize, type)
- TuiWinContent content;
- int contentSize;
- TuiWinType type;
-#endif
-{
- if (content != (TuiWinContent) NULL)
- {
- int i;
-
- if (type == SRC_WIN || type == DISASSEM_WIN)
- {
- /* free whole source block */
- if (content[0]->whichElement.source.line != (char *) NULL)
- tuiFree (content[0]->whichElement.source.line);
- }
- else
- {
- for (i = 0; i < contentSize; i++)
- {
- TuiWinElementPtr element;
-
- element = content[i];
- if (element != (TuiWinElementPtr) NULL)
- {
- switch (type)
- {
- case DATA_WIN:
- tuiFree ((char *) element);
- break;
- case DATA_ITEM_WIN:
- /*
- ** Note that data elements are not allocated
- ** in a single block, but individually, as needed.
- */
- if (element->whichElement.data.type != TUI_REGISTER)
- tuiFree ((char *)
- element->whichElement.data.name);
- tuiFree ((char *) element->whichElement.data.value);
- tuiFree ((char *) element);
- break;
- case CMD_WIN:
- tuiFree ((char *) element->whichElement.command.line);
- break;
- default:
- break;
- }
- }
- }
- }
- if (type != DATA_WIN && type != DATA_ITEM_WIN)
- tuiFree ((char *) content[0]); /* free the element block */
- }
-
- return;
-} /* freeContentElements */
diff --git a/contrib/gdb/gdb/tui/tuiData.h b/contrib/gdb/gdb/tui/tuiData.h
deleted file mode 100644
index bb4d19c90e2d..000000000000
--- a/contrib/gdb/gdb/tui/tuiData.h
+++ /dev/null
@@ -1,302 +0,0 @@
-#ifndef TUI_DATA_H
-#define TUI_DATA_H
-
-/* Constant definitions */
-#define DEFAULT_TAB_LEN 8
-#define NO_SRC_STRING "[ No Source Available ]"
-#define NO_DISASSEM_STRING "[ No Assembly Available ]"
-#define NO_REGS_STRING "[ Register Values Unavailable ]"
-#define NO_DATA_STRING "[ No Data Values Displayed ]"
-#define MAX_CONTENT_COUNT 100
-#define SRC_NAME "SRC"
-#define CMD_NAME "CMD"
-#define DATA_NAME "REGS"
-#define DISASSEM_NAME "ASM"
-#define TUI_NULL_STR ""
-#define DEFAULT_HISTORY_COUNT 25
-#define BOX_WINDOW TRUE
-#define DONT_BOX_WINDOW FALSE
-#define HILITE TRUE
-#define NO_HILITE FALSE
-#define WITH_LOCATOR TRUE
-#define NO_LOCATOR FALSE
-#define EMPTY_SOURCE_PROMPT TRUE
-#define NO_EMPTY_SOURCE_PROMPT FALSE
-#define UNDEFINED_ITEM -1
-#define MIN_WIN_HEIGHT 3
-#define MIN_CMD_WIN_HEIGHT 3
-
-#define FILE_PREFIX "File: "
-#define PROC_PREFIX "Procedure: "
-#define LINE_PREFIX "Line: "
-#define PC_PREFIX "pc: "
-
-#define TUI_FLOAT_REGS_NAME "$FREGS"
-#define TUI_FLOAT_REGS_NAME_LOWER "$fregs"
-#define TUI_GENERAL_REGS_NAME "$GREGS"
-#define TUI_GENERAL_REGS_NAME_LOWER "$gregs"
-#define TUI_SPECIAL_REGS_NAME "$SREGS"
-#define TUI_SPECIAL_REGS_NAME_LOWER "$sregs"
-#define TUI_GENERAL_SPECIAL_REGS_NAME "$REGS"
-#define TUI_GENERAL_SPECIAL_REGS_NAME_LOWER "$regs"
-
-/* Scroll direction enum */
-typedef enum {
- FORWARD_SCROLL,
- BACKWARD_SCROLL,
- LEFT_SCROLL,
- RIGHT_SCROLL
-} TuiScrollDirection, *TuiScrollDirectionPtr;
-
-
-/* General list struct */
-typedef struct _TuiList {
- OpaqueList list;
- int count;
-} TuiList, *TuiListPtr;
-
-
-/* The kinds of layouts available */
-typedef enum {
- SRC_COMMAND,
- DISASSEM_COMMAND,
- SRC_DISASSEM_COMMAND,
- SRC_DATA_COMMAND,
- DISASSEM_DATA_COMMAND,
- UNDEFINED_LAYOUT
-} TuiLayoutType, *TuiLayoutTypePtr;
-
-/* Basic data types that can be displayed in the data window. */
-typedef enum _TuiDataType {
- TUI_REGISTER,
- TUI_SCALAR,
- TUI_COMPLEX,
- TUI_STRUCT
-} TuiDataType, TuiDataTypePtr;
-
-/* Types of register displays */
-typedef enum _TuiRegisterDisplayType {
- TUI_UNDEFINED_REGS,
- TUI_GENERAL_REGS,
- TUI_SFLOAT_REGS,
- TUI_DFLOAT_REGS,
- TUI_SPECIAL_REGS,
- TUI_GENERAL_AND_SPECIAL_REGS
-} TuiRegisterDisplayType, *TuiRegisterDisplayTypePtr;
-
-/* Structure describing source line or line address */
-typedef union _TuiLineOrAddress {
- int lineNo;
- Opaque addr;
-} TuiLineOrAddress, *TuiLineOrAddressPtr;
-
-/* Current Layout definition */
-typedef struct _TuiLayoutDef {
- TuiWinType displayMode;
- int split;
- TuiRegisterDisplayType regsDisplayType;
- TuiRegisterDisplayType floatRegsDisplayType;
-} TuiLayoutDef, *TuiLayoutDefPtr;
-
-/* Elements in the Source/Disassembly Window */
-typedef struct _TuiSourceElement
-{
- char *line;
- TuiLineOrAddress lineOrAddr;
- int isExecPoint;
- int hasBreak;
-} TuiSourceElement, *TuiSourceElementPtr;
-
-
-/* Elements in the data display window content */
-typedef struct _TuiDataElement
-{
- char *name;
- int itemNo; /* the register number, or data display number */
- TuiDataType type;
- Opaque value;
- int highlight;
-} TuiDataElement, *TuiDataElementPtr;
-
-
-/* Elements in the command window content */
-typedef struct _TuiCommandElement
-{
- char *line;
-} TuiCommandElement, *TuiCommandElementPtr;
-
-
-#define MAX_LOCATOR_ELEMENT_LEN 100
-
-/* Elements in the locator window content */
-typedef struct _TuiLocatorElement
-{
- char fileName[MAX_LOCATOR_ELEMENT_LEN];
- char procName[MAX_LOCATOR_ELEMENT_LEN];
- int lineNo;
- Opaque addr;
-} TuiLocatorElement, *TuiLocatorElementPtr;
-
-
-/* An content element in a window */
-typedef union
-{
- TuiSourceElement source; /* the source elements */
- TuiGenWinInfo dataWindow; /* data display elements */
- TuiDataElement data; /* elements of dataWindow */
- TuiCommandElement command; /* command elements */
- TuiLocatorElement locator; /* locator elements */
- char *simpleString; /* simple char based elements */
-} TuiWhichElement, *TuiWhichElementPtr;
-
-typedef struct _TuiWinElement
-{
- int highlight;
- TuiWhichElement whichElement;
-} TuiWinElement, *TuiWinElementPtr;
-
-
-/* This describes the content of the window. */
-typedef TuiWinElementPtr *TuiWinContent;
-
-
-/* This struct defines the specific information about a data display window */
-typedef struct _TuiDataInfo {
- TuiWinContent dataContent; /* start of data display content */
- int dataContentCount;
- TuiWinContent regsContent; /* start of regs display content */
- int regsContentCount;
- TuiRegisterDisplayType regsDisplayType;
- int regsColumnCount;
- int displayRegs; /* Should regs be displayed at all? */
-} TuiDataInfo, *TuiDataInfoPtr;
-
-
-typedef struct _TuiSourceInfo {
- int hasLocator; /* Does locator belongs to this window? */
- TuiGenWinInfoPtr executionInfo; /* execution information window */
- int horizontalOffset; /* used for horizontal scroll */
- TuiLineOrAddress startLineOrAddr;
-} TuiSourceInfo, *TuiSourceInfoPtr;
-
-
-typedef struct _TuiCommandInfo {
- int curLine; /* The current line position */
- int curch; /* The current cursor position */
-} TuiCommandInfo, *TuiCommandInfoPtr;
-
-
-/* This defines information about each logical window */
-typedef struct _TuiWinInfo {
- TuiGenWinInfo generic; /* general window information */
- union {
- TuiSourceInfo sourceInfo;
- TuiDataInfo dataDisplayInfo;
- TuiCommandInfo commandInfo;
- Opaque opaque;
- } detail;
- int canHighlight; /* Can this window ever be highlighted? */
- int isHighlighted; /* Is this window highlighted? */
-} TuiWinInfo, *TuiWinInfoPtr;
-
-/* MACROS (prefixed with m_) */
-
-/* Testing macros */
-#define m_genWinPtrIsNull(winInfo) \
- ((winInfo) == (TuiGenWinInfoPtr)NULL)
-#define m_genWinPtrNotNull(winInfo) \
- ((winInfo) != (TuiGenWinInfoPtr)NULL)
-#define m_winPtrIsNull(winInfo) \
- ((winInfo) == (TuiWinInfoPtr)NULL)
-#define m_winPtrNotNull(winInfo) \
- ((winInfo) != (TuiWinInfoPtr)NULL)
-
-#define m_winIsSourceType(type) \
- (type == SRC_WIN || type == DISASSEM_WIN)
-#define m_winIsAuxillary(winType) \
- (winType > MAX_MAJOR_WINDOWS)
-#define m_hasLocator(winInfo) \
- ( ((winInfo) != (TuiWinInfoPtr)NULL) ? \
- (winInfo->detail.sourceInfo.hasLocator) : \
- FALSE )
-
-#define m_setWinHighlightOn(winInfo) \
- if ((winInfo) != (TuiWinInfoPtr)NULL) \
- (winInfo)->isHighlighted = TRUE
-#define m_setWinHighlightOff(winInfo) \
- if ((winInfo) != (TuiWinInfoPtr)NULL) \
- (winInfo)->isHighlighted = FALSE
-
-
-/* Global Data */
-extern TuiWinInfoPtr winList[MAX_MAJOR_WINDOWS];
-extern int tui_version;
-
-/* Macros */
-#define srcWin winList[SRC_WIN]
-#define disassemWin winList[DISASSEM_WIN]
-#define dataWin winList[DATA_WIN]
-#define cmdWin winList[CMD_WIN]
-
-/* Data Manipulation Functions */
-extern void initializeStaticData PARAMS ((void));
-extern TuiGenWinInfoPtr allocGenericWinInfo PARAMS ((void));
-extern TuiWinInfoPtr allocWinInfo PARAMS ((TuiWinType));
-extern void initGenericPart PARAMS ((TuiGenWinInfoPtr));
-extern void initWinInfo PARAMS ((TuiWinInfoPtr));
-extern TuiWinContent allocContent PARAMS ((int, TuiWinType));
-extern int addContentElements
- PARAMS ((TuiGenWinInfoPtr, int));
-extern void initContentElement
- PARAMS ((TuiWinElementPtr, TuiWinType));
-extern void freeWindow PARAMS ((TuiWinInfoPtr));
-extern void freeAllWindows PARAMS ((void));
-extern void freeWinContent PARAMS ((TuiGenWinInfoPtr));
-extern void freeDataContent PARAMS ((TuiWinContent, int));
-extern void freeAllSourceWinsContent PARAMS ((void));
-extern void tuiDelWindow PARAMS ((TuiWinInfoPtr));
-extern void tuiDelDataWindows PARAMS ((TuiWinContent, int));
-extern TuiWinInfoPtr winByName PARAMS ((char *));
-extern TuiWinInfoPtr partialWinByName PARAMS ((char *));
-extern char *winName PARAMS ((TuiGenWinInfoPtr));
-extern char *displayableWinContentOf
- PARAMS ((TuiGenWinInfoPtr, TuiWinElementPtr));
-extern char *displayableWinContentAt
- PARAMS ((TuiGenWinInfoPtr, int));
-extern int winElementHeight
- PARAMS ((TuiGenWinInfoPtr, TuiWinElementPtr));
-extern TuiLayoutType currentLayout PARAMS ((void));
-extern void setCurrentLayoutTo PARAMS ((TuiLayoutType));
-extern int termHeight PARAMS ((void));
-extern void setTermHeight PARAMS ((int));
-extern int termWidth PARAMS ((void));
-extern void setTermWidth PARAMS ((int));
-extern int historyLimit PARAMS ((void));
-extern void setHistoryLimit PARAMS ((int));
-extern void setGenWinOrigin PARAMS ((TuiGenWinInfoPtr, int, int));
-extern TuiGenWinInfoPtr locatorWinInfoPtr PARAMS ((void));
-extern TuiGenWinInfoPtr sourceExecInfoWinPtr PARAMS ((void));
-extern TuiGenWinInfoPtr disassemExecInfoWinPtr PARAMS ((void));
-extern char *nullStr PARAMS ((void));
-extern char *blankStr PARAMS ((void));
-extern char *locationStr PARAMS ((void));
-extern char *breakStr PARAMS ((void));
-extern char *breakLocationStr PARAMS ((void));
-extern TuiListPtr sourceWindows PARAMS ((void));
-extern void clearSourceWindows PARAMS ((void));
-extern void clearSourceWindowsDetail PARAMS ((void));
-extern void clearWinDetail PARAMS ((TuiWinInfoPtr winInfo));
-extern void tuiAddToSourceWindows PARAMS ((TuiWinInfoPtr));
-extern int tuiDefaultTabLen PARAMS ((void));
-extern void tuiSetDefaultTabLen PARAMS ((int));
-extern TuiWinInfoPtr tuiWinWithFocus PARAMS ((void));
-extern void tuiSetWinWithFocus PARAMS ((TuiWinInfoPtr));
-extern TuiLayoutDefPtr tuiLayoutDef PARAMS ((void));
-extern int tuiWinResized PARAMS ((void));
-extern void tuiSetWinResizedTo PARAMS ((int));
-
-extern TuiWinInfoPtr tuiNextWin PARAMS ((TuiWinInfoPtr));
-extern TuiWinInfoPtr tuiPrevWin PARAMS ((TuiWinInfoPtr));
-
-
-#endif /* TUI_DATA_H */
diff --git a/contrib/gdb/gdb/tui/tuiDataWin.c b/contrib/gdb/gdb/tui/tuiDataWin.c
deleted file mode 100644
index 522730ae2fdd..000000000000
--- a/contrib/gdb/gdb/tui/tuiDataWin.c
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
-** tuiDataWin.c
-** This module contains functions to support the data/register window display.
-*/
-
-
-#include "defs.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiRegs.h"
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS **
-******************************************/
-
-
-
-/*****************************************
-** PUBLIC FUNCTIONS **
-******************************************/
-
-
-/*
-** tuiFirstDataItemDisplayed()
-** Answer the index first element displayed.
-** If none are displayed, then return (-1).
-*/
-int
-#ifdef __STDC__
-tuiFirstDataItemDisplayed (void)
-#else
-tuiFirstDataItemDisplayed ()
-#endif
-{
- int elementNo = (-1);
- int i;
-
- for (i = 0; (i < dataWin->generic.contentSize && elementNo < 0); i++)
- {
- TuiGenWinInfoPtr dataItemWin;
-
- dataItemWin = &((TuiWinContent)
- dataWin->generic.content)[i]->whichElement.dataWindow;
- if (dataItemWin->handle != (WINDOW *) NULL && dataItemWin->isVisible)
- elementNo = i;
- }
-
- return elementNo;
-} /* tuiFirstDataItemDisplayed */
-
-
-/*
-** tuiFirstDataElementNoInLine()
-** Answer the index of the first element in lineNo. If lineNo is
-** past the data area (-1) is returned.
-*/
-int
-#ifdef __STDC__
-tuiFirstDataElementNoInLine (
- int lineNo)
-#else
-tuiFirstDataElementNoInLine (lineNo)
- int lineNo;
-#endif
-{
- int firstElementNo = (-1);
-
- /*
- ** First see if there is a register on lineNo, and if so, set the
- ** first element number
- */
- if ((firstElementNo = tuiFirstRegElementNoInLine (lineNo)) == -1)
- { /*
- ** Looking at the general data, the 1st element on lineNo
- */
- }
-
- return firstElementNo;
-} /* tuiFirstDataElementNoInLine */
-
-
-/*
-** tuiDeleteDataContentWindows()
-** Function to delete all the item windows in the data window.
-** This is usually done when the data window is scrolled.
-*/
-void
-#ifdef __STDC__
-tuiDeleteDataContentWindows (void)
-#else
-tuiDeleteDataContentWindows ()
-#endif
-{
- int i;
- TuiGenWinInfoPtr dataItemWinPtr;
-
- for (i = 0; (i < dataWin->generic.contentSize); i++)
- {
- dataItemWinPtr = &((TuiWinContent)
- dataWin->generic.content)[i]->whichElement.dataWindow;
- tuiDelwin (dataItemWinPtr->handle);
- dataItemWinPtr->handle = (WINDOW *) NULL;
- dataItemWinPtr->isVisible = FALSE;
- }
-
- return;
-} /* tuiDeleteDataContentWindows */
-
-
-void
-#ifdef __STDC__
-tuiEraseDataContent (
- char *prompt)
-#else
-tuiEraseDataContent (prompt)
- char *prompt;
-#endif
-{
- werase (dataWin->generic.handle);
- checkAndDisplayHighlightIfNeeded (dataWin);
- if (prompt != (char *) NULL)
- {
- int halfWidth = (dataWin->generic.width - 2) / 2;
- int xPos;
-
- if (strlen (prompt) >= halfWidth)
- xPos = 1;
- else
- xPos = halfWidth - strlen (prompt);
- mvwaddstr (dataWin->generic.handle,
- (dataWin->generic.height / 2),
- xPos,
- prompt);
- }
- wrefresh (dataWin->generic.handle);
-
- return;
-} /* tuiEraseDataContent */
-
-
-/*
-** tuiDisplayAllData().
-** This function displays the data that is in the data window's
-** content. It does not set the content.
-*/
-void
-#ifdef __STDC__
-tuiDisplayAllData (void)
-#else
-tuiDisplayAllData ()
-#endif
-{
- if (dataWin->generic.contentSize <= 0)
- tuiEraseDataContent (NO_DATA_STRING);
- else
- {
- tuiEraseDataContent ((char *) NULL);
- tuiDeleteDataContentWindows ();
- checkAndDisplayHighlightIfNeeded (dataWin);
- tuiDisplayRegistersFrom (0);
- /*
- ** Then display the other data
- */
- if (dataWin->detail.dataDisplayInfo.dataContent !=
- (TuiWinContent) NULL &&
- dataWin->detail.dataDisplayInfo.dataContentCount > 0)
- {
- }
- }
- return;
-} /* tuiDisplayAllData */
-
-
-/*
-** tuiDisplayDataFromLine()
-** Function to display the data starting at line, lineNo, in the
-** data window.
-*/
-void
-#ifdef __STDC__
-tuiDisplayDataFromLine (
- int lineNo)
-#else
-tuiDisplayDataFromLine (lineNo)
- int lineNo;
-#endif
-{
- int _lineNo = lineNo;
-
- if (lineNo < 0)
- _lineNo = 0;
-
- checkAndDisplayHighlightIfNeeded (dataWin);
-
- /* there is no general data, force regs to display (if there are any) */
- if (dataWin->detail.dataDisplayInfo.dataContentCount <= 0)
- tuiDisplayRegistersFromLine (_lineNo, TRUE);
- else
- {
- int elementNo, startLineNo;
- int regsLastLine = tuiLastRegsLineNo ();
-
-
- /* display regs if we can */
- if (tuiDisplayRegistersFromLine (_lineNo, FALSE) < 0)
- { /*
- ** _lineNo is past the regs display, so calc where the
- ** start data element is
- */
- if (regsLastLine < _lineNo)
- { /* figure out how many lines each element is to obtain
- the start elementNo */
- }
- }
- else
- { /*
- ** calculate the starting element of the data display, given
- ** regsLastLine and how many lines each element is, up to
- ** _lineNo
- */
- }
- /* Now display the data , starting at elementNo */
- }
-
- return;
-} /* tuiDisplayDataFromLine */
-
-
-/*
-** tuiDisplayDataFrom()
-** Display data starting at element elementNo
-*/
-void
-#ifdef __STDC__
-tuiDisplayDataFrom (
- int elementNo,
- int reuseWindows)
-#else
-tuiDisplayDataFrom (elementNo, reuseWindows)
- int elementNo;
- int reuseWindows;
-#endif
-{
- int firstLine = (-1);
-
- if (elementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
- firstLine = tuiLineFromRegElementNo (elementNo);
- else
- { /* calculate the firstLine from the element number */
- }
-
- if (firstLine >= 0)
- {
- tuiEraseDataContent ((char *) NULL);
- if (!reuseWindows)
- tuiDeleteDataContentWindows ();
- tuiDisplayDataFromLine (firstLine);
- }
-
- return;
-} /* tuiDisplayDataFrom */
-
-
-/*
-** tuiRefreshDataWin()
-** Function to redisplay the contents of the data window.
-*/
-void
-#ifdef __STDC__
-tuiRefreshDataWin (void)
-#else
-tuiRefreshDataWin ()
-#endif
-{
- tuiEraseDataContent ((char *) NULL);
- if (dataWin->generic.contentSize > 0)
- {
- int firstElement = tuiFirstDataItemDisplayed ();
-
- if (firstElement >= 0) /* re-use existing windows */
- tuiDisplayDataFrom (firstElement, TRUE);
- }
-
- return;
-} /* tuiRefreshDataWin */
-
-
-/*
-** tuiCheckDataValues().
-** Function to check the data values and hilite any that have changed
-*/
-void
-#ifdef __STDC__
-tuiCheckDataValues (
- struct frame_info *frame)
-#else
-tuiCheckDataValues (frame)
- struct frame_info *frame;
-#endif
-{
- tuiCheckRegisterValues (frame);
-
- /* Now check any other data values that there are */
- if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
- {
- int i;
-
- for (i = 0; dataWin->detail.dataDisplayInfo.dataContentCount; i++)
- {
-#ifdef LATER
- TuiDataElementPtr dataElementPtr;
- TuiGenWinInfoPtr dataItemWinPtr;
- Opaque newValue;
-
- dataItemPtr = &dataWin->detail.dataDisplayInfo.
- dataContent[i]->whichElement.dataWindow;
- dataElementPtr = &((TuiWinContent)
- dataItemWinPtr->content)[0]->whichElement.data;
- if value
- has changed (dataElementPtr, frame, &newValue)
- {
- dataElementPtr->value = newValue;
- update the display with the new value, hiliting it.
- }
-#endif
- }
- }
-} /* tuiCheckDataValues */
-
-
-/*
-** tui_vCheckDataValues().
-** Function to check the data values and hilite any that have
-** changed with args in a va_list
-*/
-void
-#ifdef __STDC__
-tui_vCheckDataValues (
- va_list args)
-#else
-tui_vCheckDataValues (args)
- va_list args;
-#endif
-{
- struct frame_info *frame = va_arg (args, struct frame_info *);
-
- tuiCheckDataValues (frame);
-
- return;
-} /* tui_vCheckDataValues */
-
-
-/*
-** tuiVerticalDataScroll()
-** Scroll the data window vertically forward or backward.
-*/
-void
-#ifdef __STDC__
-tuiVerticalDataScroll (
- TuiScrollDirection scrollDirection,
- int numToScroll)
-#else
-tuiVerticalDataScroll (scrollDirection, numToScroll)
- TuiScrollDirection scrollDirection;
- int numToScroll;
-#endif
-{
- int firstElementNo;
- int firstLine = (-1);
-
- firstElementNo = tuiFirstDataItemDisplayed ();
- if (firstElementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
- firstLine = tuiLineFromRegElementNo (firstElementNo);
- else
- { /* calculate the first line from the element number which is in
- ** the general data content
- */
- }
-
- if (firstLine >= 0)
- {
- int lastElementNo, lastLine;
-
- if (scrollDirection == FORWARD_SCROLL)
- firstLine += numToScroll;
- else
- firstLine -= numToScroll;
- tuiEraseDataContent ((char *) NULL);
- tuiDeleteDataContentWindows ();
- tuiDisplayDataFromLine (firstLine);
- }
-
- return;
-} /* tuiVerticalDataScroll */
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS **
-******************************************/
diff --git a/contrib/gdb/gdb/tui/tuiDataWin.h b/contrib/gdb/gdb/tui/tuiDataWin.h
deleted file mode 100644
index 8f9e46d80e7e..000000000000
--- a/contrib/gdb/gdb/tui/tuiDataWin.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef _TUI_DATAWIN_H
-#define _TUI_DATAWIN_H
-/*
-** This header file supports the display of registers/data in the data window.
-*/
-
-
-/*****************************************
-** TYPE DEFINITIONS **
-******************************************/
-
-
-
-/*****************************************
-** PUBLIC FUNCTION EXTERNAL DECLS **
-******************************************/
-extern void tuiEraseDataContent PARAMS ((char *));
-extern void tuiDisplayAllData PARAMS ((void));
-extern void tuiCheckDataValues PARAMS ((struct frame_info *));
-extern void tui_vCheckDataValues PARAMS ((va_list));
-extern void tuiDisplayDataFromLine PARAMS ((int));
-extern int tuiFirstDataItemDisplayed PARAMS ((void));
-extern int tuiFirstDataElementNoInLine PARAMS ((int));
-extern void tuiDeleteDataContentWindows PARAMS ((void));
-extern void tuiRefreshDataWin PARAMS ((void));
-extern void tuiDisplayDataFrom PARAMS ((int, int));
-extern void tuiVerticalDataScroll PARAMS ((TuiScrollDirection, int));
-
-#endif /*_TUI_DATAWIN_H*/
diff --git a/contrib/gdb/gdb/tui/tuiDisassem.c b/contrib/gdb/gdb/tui/tuiDisassem.c
deleted file mode 100644
index ad0b70f655df..000000000000
--- a/contrib/gdb/gdb/tui/tuiDisassem.c
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
-** tuiDisassem.c
-** This module contains functions for handling disassembly display.
-*/
-
-
-#include "defs.h"
-#include "symtab.h"
-#include "breakpoint.h"
-#include "frame.h"
-
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiLayout.h"
-#include "tuiSourceWin.h"
-#include "tuiStack.h"
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS **
-******************************************/
-
-static struct breakpoint *_hasBreak PARAMS ((CORE_ADDR));
-
-
-/*****************************************
-** PUBLIC FUNCTIONS **
-******************************************/
-
-/*
-** tuiSetDisassemContent().
-** Function to set the disassembly window's content.
-*/
-TuiStatus
-#ifdef __STDC__
-tuiSetDisassemContent (
- struct symtab *s,
- Opaque startAddr)
-#else
- tuiSetDisassemContent (s, startAddr)
- struct symtab *s;
- Opaque startAddr;
-#endif
-{
- TuiStatus ret = TUI_FAILURE;
- GDB_FILE *gdb_dis_out;
-
- if (startAddr != (Opaque) NULL)
- {
- register int i, desc;
-
- if ((ret = tuiAllocSourceBuffer (disassemWin)) == TUI_SUCCESS)
- {
- register int offset = disassemWin->detail.sourceInfo.horizontalOffset;
- register int threshold, curLine = 0, lineWidth, maxLines;
- CORE_ADDR newpc, pc;
- disassemble_info asmInfo;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- extern void strcat_address PARAMS ((CORE_ADDR, char *, int));
- extern void strcat_address_numeric PARAMS ((CORE_ADDR, int, char *, int));
- int curLen = 0;
- int tab_len = tuiDefaultTabLen ();
-
- maxLines = disassemWin->generic.height - 2; /* account for hilite */
- lineWidth = disassemWin->generic.width - 1;
- threshold = (lineWidth - 1) + offset;
-
- /* now init the gdb_file structure */
- gdb_dis_out = gdb_file_init_astring (threshold);
-
- INIT_DISASSEMBLE_INFO_NO_ARCH (asmInfo, gdb_dis_out, (fprintf_ftype) fprintf_filtered);
- asmInfo.read_memory_func = dis_asm_read_memory;
- asmInfo.memory_error_func = dis_asm_memory_error;
-
- disassemWin->detail.sourceInfo.startLineOrAddr.addr = startAddr;
-
- /* Now construct each line */
- for (curLine = 0, pc = (CORE_ADDR) startAddr; (curLine < maxLines);)
- {
- TuiWinElementPtr element = (TuiWinElementPtr)disassemWin->generic.content[curLine];
- struct breakpoint *bp;
-
- print_address (pc, gdb_dis_out);
-
- curLen = strlen (gdb_file_get_strbuf (gdb_dis_out));
- i = curLen - ((curLen / tab_len) * tab_len);
-
- /* adjust buffer length if necessary */
- gdb_file_adjust_strbuf ((tab_len - i > 0) ? (tab_len - i ) : 0, gdb_dis_out);
-
- /* Add spaces to make the instructions start onthe same column */
- while (i < tab_len)
- {
- gdb_file_get_strbuf (gdb_dis_out)[curLen] = ' ';
- i++;
- curLen++;
- }
- gdb_file_get_strbuf (gdb_dis_out)[curLen] = '\0';
-
- newpc = pc + ((*tm_print_insn) (pc, &asmInfo));
-
- /* Now copy the line taking the offset into account */
- if (strlen (gdb_file_get_strbuf (gdb_dis_out)) > offset)
- strcpy (element->whichElement.source.line,
- &(gdb_file_get_strbuf (gdb_dis_out)[offset]));
- else
- element->whichElement.source.line[0] = '\0';
- element->whichElement.source.lineOrAddr.addr = (Opaque) pc;
- element->whichElement.source.isExecPoint =
- (pc == (CORE_ADDR) ((TuiWinElementPtr)locator->content[0])->whichElement.locator.addr);
- bp = _hasBreak (pc);
- element->whichElement.source.hasBreak =
- (bp != (struct breakpoint *) NULL &&
- (!element->whichElement.source.isExecPoint ||
- (bp->disposition != del || bp->hit_count <= 0)));
- curLine++;
- pc = newpc;
- /* reset the buffer to empty */
- gdb_file_get_strbuf (gdb_dis_out)[0] = '\0';
- }
- gdb_file_deallocate (&gdb_dis_out);
- disassemWin->generic.contentSize = curLine;
- ret = TUI_SUCCESS;
- }
- }
-
- return ret;
-} /* tuiSetDisassemContent */
-
-
-/*
-** tuiShowDisassem().
-** Function to display the disassembly window with disassembled code.
-*/
-void
-#ifdef __STDC__
-tuiShowDisassem (
- Opaque startAddr)
-#else
-tuiShowDisassem (startAddr)
- Opaque startAddr;
-#endif
-{
- struct symtab *s = find_pc_symtab ((CORE_ADDR) startAddr);
- TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
-
- tuiAddWinToLayout (DISASSEM_WIN);
- tuiUpdateSourceWindow (disassemWin, s, startAddr, FALSE);
- /*
- ** if the focus was in the src win, put it in the asm win, if the
- ** source view isn't split
- */
- if (currentLayout () != SRC_DISASSEM_COMMAND && winWithFocus == srcWin)
- tuiSetWinFocusTo (disassemWin);
-
- return;
-} /* tuiShowDisassem */
-
-
-/*
-** tuiShowDisassemAndUpdateSource().
-** Function to display the disassembly window.
-*/
-void
-#ifdef __STDC__
-tuiShowDisassemAndUpdateSource (
- Opaque startAddr)
-#else
-tuiShowDisassemAndUpdateSource (startAddr)
- Opaque startAddr;
-#endif
-{
- struct symtab_and_line sal;
-
- tuiShowDisassem (startAddr);
- if (currentLayout () == SRC_DISASSEM_COMMAND)
- {
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- /*
- ** Update what is in the source window if it is displayed too,
- ** note that it follows what is in the disassembly window and visa-versa
- */
- sal = find_pc_line ((CORE_ADDR) startAddr, 0);
- current_source_symtab = sal.symtab;
- tuiUpdateSourceWindow (srcWin, sal.symtab, (Opaque) sal.line, TRUE);
- tuiUpdateLocatorFilename (sal.symtab->filename);
- }
-
- return;
-} /* tuiShowDisassemAndUpdateSource */
-
-
-/*
-** tuiShowDisassemAsIs().
-** Function to display the disassembly window. This function shows
-** the disassembly as specified by the horizontal offset.
-*/
-void
-#ifdef __STDC__
-tuiShowDisassemAsIs (
- Opaque addr)
-#else
-tuiShowDisassemAsIs (addr)
- Opaque addr;
-#endif
-{
- tuiAddWinToLayout (DISASSEM_WIN);
- tuiUpdateSourceWindowAsIs (disassemWin, (struct symtab *) NULL, addr, FALSE);
- /*
- ** Update what is in the source window if it is displayed too, not that it
- ** follows what is in the disassembly window and visa-versa
- */
- if (currentLayout () == SRC_DISASSEM_COMMAND)
- tuiShowSourceContent (srcWin); /*???? Need to do more? */
-
- return;
-} /* tuiShowDisassem */
-
-
-/*
-** tuiGetBeginAsmAddress().
-*/
-Opaque
-#ifdef __STDC__
-tuiGetBeginAsmAddress (void)
-#else
-tuiGetBeginAsmAddress ()
-#endif
-{
- TuiGenWinInfoPtr locator;
- TuiLocatorElementPtr element;
- Opaque addr;
-
- locator = locatorWinInfoPtr ();
- element = &((TuiWinElementPtr) locator->content[0])->whichElement.locator;
-
- if (element->addr == (Opaque) 0)
- {
- /*the target is not executing, because the pc is 0*/
-
- addr = (Opaque) parse_and_eval_address ("main");
-
- if (addr == (Opaque) 0)
- addr = (Opaque) parse_and_eval_address ("MAIN");
-
- }
- else /* the target is executing */
- addr = element->addr;
-
- return addr;
-} /* tuiGetBeginAsmAddress */
-
-
-/*
-** tuiVerticalDisassemScroll().
-** Scroll the disassembly forward or backward vertically
-*/
-void
-#ifdef __STDC__
-tuiVerticalDisassemScroll (
- TuiScrollDirection scrollDirection,
- int numToScroll)
-#else
-tuiVerticalDisassemScroll (scrollDirection, numToScroll)
- TuiScrollDirection scrollDirection;
- int numToScroll;
-#endif
-{
- if (disassemWin->generic.content != (OpaquePtr) NULL)
- {
- Opaque pc, lowAddr;
- TuiWinContent content;
- struct symtab *s;
-
- content = (TuiWinContent) disassemWin->generic.content;
- if (current_source_symtab == (struct symtab *) NULL)
- s = find_pc_symtab (selected_frame->pc);
- else
- s = current_source_symtab;
-
- pc = content[0]->whichElement.source.lineOrAddr.addr;
- if (find_pc_partial_function ((CORE_ADDR) pc,
- (char **) NULL,
- (CORE_ADDR *) & lowAddr,
- (CORE_ADDR) NULL) == 0)
- error ("No function contains prgram counter for selected frame.\n");
- else
- {
- register int line = 0;
- register Opaque newLow;
- bfd_byte buffer[4];
-
- newLow = pc;
- if (scrollDirection == FORWARD_SCROLL)
- {
- for (; line < numToScroll; line++)
- newLow += sizeof (bfd_getb32 (buffer));
- }
- else
- {
- for (; newLow >= (Opaque) 0 && line < numToScroll; line++)
- newLow -= sizeof (bfd_getb32 (buffer));
- }
- tuiUpdateSourceWindowAsIs (disassemWin, s, newLow, FALSE);
- }
- }
-
- return;
-} /* tuiVerticalDisassemScroll */
-
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS **
-******************************************/
-/*
-** _hasBreak().
-** Answer whether there is a break point at the input line in the
-** source file indicated
-*/
-static struct breakpoint *
-#ifdef __STDC__
-_hasBreak (
- CORE_ADDR addr)
-#else
-_hasBreak (addr)
- CORE_ADDR addr;
-#endif
-{
- struct breakpoint *bpWithBreak = (struct breakpoint *) NULL;
- struct breakpoint *bp;
- extern struct breakpoint *breakpoint_chain;
-
-
- for (bp = breakpoint_chain;
- (bp != (struct breakpoint *) NULL &&
- bpWithBreak == (struct breakpoint *) NULL);
- bp = bp->next)
- if (addr == bp->address)
- bpWithBreak = bp;
-
- return bpWithBreak;
-} /* _hasBreak */
diff --git a/contrib/gdb/gdb/tui/tuiDisassem.h b/contrib/gdb/gdb/tui/tuiDisassem.h
deleted file mode 100644
index 711ac48587d2..000000000000
--- a/contrib/gdb/gdb/tui/tuiDisassem.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _TUI_DISASSEM_H
-#define _TUI_DISASSEM_H
-/*
-** This header file supports
-*/
-
-/*****************************************
-** TYPE DEFINITIONS **
-******************************************/
-
-
-
-/*****************************************
-** PUBLIC FUNCTION EXTERNAL DECLS **
-******************************************/
-extern TuiStatus tuiSetDisassemContent PARAMS ((struct symtab *, Opaque));
-extern void tuiShowDisassem PARAMS ((Opaque));
-extern void tuiShowDisassemAndUpdateSource PARAMS ((Opaque));
-extern void tuiVerticalDisassemScroll PARAMS ((TuiScrollDirection, int));
-extern Opaque tuiGetBeginAsmAddress PARAMS ((void));
-
-#endif /*_TUI_DISASSEM_H*/
diff --git a/contrib/gdb/gdb/tui/tuiGeneralWin.c b/contrib/gdb/gdb/tui/tuiGeneralWin.c
deleted file mode 100644
index 5af0cd7a92e8..000000000000
--- a/contrib/gdb/gdb/tui/tuiGeneralWin.c
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
-** TuiGeneralWin.c
-** This module supports general window behavior
-*/
-
-#include <curses.h>
-#include "defs.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiGeneralWin.h"
-
-
-/*
-** local support functions
-*/
-static void _winResize PARAMS ((void));
-
-
-/***********************
-** PUBLIC FUNCTIONS
-***********************/
-/*
-** tuiRefreshWin()
-** Refresh the window
-*/
-void
-#ifdef __STDC__
-tuiRefreshWin (
- TuiGenWinInfoPtr winInfo)
-#else
-tuiRefreshWin (winInfo)
- TuiGenWinInfoPtr winInfo;
-#endif
-{
- if (winInfo->type == DATA_WIN && winInfo->contentSize > 0)
- {
- int i;
-
- for (i = 0; (i < winInfo->contentSize); i++)
- {
- TuiGenWinInfoPtr dataItemWinPtr;
-
- dataItemWinPtr = &((TuiWinContent)
- winInfo->content)[i]->whichElement.dataWindow;
- if (m_genWinPtrNotNull (dataItemWinPtr) &&
- dataItemWinPtr->handle != (WINDOW *) NULL)
- wrefresh (dataItemWinPtr->handle);
- }
- }
- else if (winInfo->type == CMD_WIN)
- {
- /* Do nothing */
- }
- else
- {
- if (winInfo->handle != (WINDOW *) NULL)
- wrefresh (winInfo->handle);
- }
-
- return;
-} /* tuiRefreshWin */
-
-
-/*
-** tuiDelwin()
-** Function to delete the curses window, checking for null
-*/
-void
-#ifdef __STDC__
-tuiDelwin (
- WINDOW * window)
-#else
-tuiDelwin (window)
- WINDOW *window;
-#endif
-{
- if (window != (WINDOW *) NULL)
- delwin (window);
-
- return;
-} /* tuiDelwin */
-
-
-/*
-** boxWin().
-*/
-void
-#ifdef __STDC__
-boxWin (
- TuiGenWinInfoPtr winInfo,
- int highlightFlag)
-#else
-boxWin (winInfo, highlightFlag)
- TuiGenWinInfoPtr winInfo;
- int highlightFlag;
-#endif
-{
- if (m_genWinPtrNotNull (winInfo) && winInfo->handle != (WINDOW *) NULL)
- {
- if (highlightFlag == HILITE)
- box (winInfo->handle, '|', '-');
- else
- {
-/* wattron(winInfo->handle, A_DIM);*/
- box (winInfo->handle, ':', '.');
-/* wattroff(winInfo->handle, A_DIM);*/
- }
- }
-
- return;
-} /* boxWin */
-
-
-/*
-** unhighlightWin().
-*/
-void
-#ifdef __STDC__
-unhighlightWin (
- TuiWinInfoPtr winInfo)
-#else
-unhighlightWin (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- if (m_winPtrNotNull (winInfo) && winInfo->generic.handle != (WINDOW *) NULL)
- {
- boxWin ((TuiGenWinInfoPtr) winInfo, NO_HILITE);
- wrefresh (winInfo->generic.handle);
- m_setWinHighlightOff (winInfo);
- }
-} /* unhighlightWin */
-
-
-/*
-** highlightWin().
-*/
-void
-#ifdef __STDC__
-highlightWin (
- TuiWinInfoPtr winInfo)
-#else
-highlightWin (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- if (m_winPtrNotNull (winInfo) &&
- winInfo->canHighlight && winInfo->generic.handle != (WINDOW *) NULL)
- {
- boxWin ((TuiGenWinInfoPtr) winInfo, HILITE);
- wrefresh (winInfo->generic.handle);
- m_setWinHighlightOn (winInfo);
- }
-} /* highlightWin */
-
-
-/*
-** checkAndDisplayHighlightIfNecessay
-*/
-void
-#ifdef __STDC__
-checkAndDisplayHighlightIfNeeded (
- TuiWinInfoPtr winInfo)
-#else
-checkAndDisplayHighlightIfNeeded (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- if (m_winPtrNotNull (winInfo) && winInfo->generic.type != CMD_WIN)
- {
- if (winInfo->isHighlighted)
- highlightWin (winInfo);
- else
- unhighlightWin (winInfo);
-
- }
- return;
-} /* checkAndDisplayHighlightIfNeeded */
-
-
-/*
-** makeWindow().
-*/
-void
-#ifdef __STDC__
-makeWindow (
- TuiGenWinInfoPtr winInfo,
- int boxIt)
-#else
-makeWindow (winInfo, boxIt)
- TuiGenWinInfoPtr winInfo;
- int boxIt;
-#endif
-{
- WINDOW *handle;
-
- handle = newwin (winInfo->height,
- winInfo->width,
- winInfo->origin.y,
- winInfo->origin.x);
- winInfo->handle = handle;
- if (handle != (WINDOW *) NULL)
- {
- if (boxIt == BOX_WINDOW)
- boxWin (winInfo, NO_HILITE);
- winInfo->isVisible = TRUE;
- scrollok (handle, TRUE);
- tuiRefreshWin (winInfo);
-
-#ifndef FOR_TEST
- if ( /*!m_WinIsAuxillary(winInfo->type) && */
- (winInfo->type != CMD_WIN) &&
- (winInfo->content == (OpaquePtr) NULL))
- {
- mvwaddstr (handle, 1, 1, winName (winInfo));
- tuiRefreshWin (winInfo);
- }
-#endif /*FOR_TEST*/
- }
-
- return;
-} /* makeWindow */
-
-
-/*
-** tuiClearWin().
-** Clear the window of all contents without calling wclear.
-*/
-void
-#ifdef __STDC__
-tuiClearWin (
- TuiGenWinInfoPtr winInfo)
-#else
-tuiClearWin (winInfo)
- TuiGenWinInfoPtr winInfo;
-#endif
-{
- if (m_genWinPtrNotNull (winInfo) && winInfo->handle != (WINDOW *) NULL)
- {
- int curRow, curCol;
-
- for (curRow = 0; (curRow < winInfo->height); curRow++)
- for (curCol = 0; (curCol < winInfo->width); curCol++)
- mvwaddch (winInfo->handle, curRow, curCol, ' ');
-
- tuiRefreshWin (winInfo);
- }
-
- return;
-} /* tuiClearWin */
-
-
-/*
-** makeVisible().
-** We can't really make windows visible, or invisible. So we
-** have to delete the entire window when making it visible,
-** and create it again when making it visible.
-*/
-void
-#ifdef __STDC__
-makeVisible (
- TuiGenWinInfoPtr winInfo,
- int visible)
-#else
-makeVisible (winInfo, visible)
- TuiGenWinInfoPtr winInfo;
- int visible;
-#endif
-{
- /* Don't tear down/recreate command window */
- if (winInfo->type == CMD_WIN)
- return;
-
- if (visible)
- {
- if (!winInfo->isVisible)
- {
- makeWindow (
- winInfo,
- (winInfo->type != CMD_WIN && !m_winIsAuxillary (winInfo->type)));
- winInfo->isVisible = TRUE;
- }
- tuiRefreshWin (winInfo);
- }
- else if (!visible &&
- winInfo->isVisible && winInfo->handle != (WINDOW *) NULL)
- {
- winInfo->isVisible = FALSE;
- tuiClearWin (winInfo);
- tuiDelwin (winInfo->handle);
- winInfo->handle = (WINDOW *) NULL;
- }
-
- return;
-} /* makeVisible */
-
-
-/*
-** makeAllVisible().
-** Makes all windows invisible (except the command and locator windows)
-*/
-void
-#ifdef __STDC__
-makeAllVisible (
- int visible)
-#else
-makeAllVisible (visible)
- int visible;
-#endif
-{
- int i;
-
- for (i = 0; i < MAX_MAJOR_WINDOWS; i++)
- {
- if (m_winPtrNotNull (winList[i]) &&
- ((winList[i])->generic.type) != CMD_WIN)
- {
- if (m_winIsSourceType ((winList[i])->generic.type))
- makeVisible ((winList[i])->detail.sourceInfo.executionInfo,
- visible);
- makeVisible ((TuiGenWinInfoPtr) winList[i], visible);
- }
- }
-
- return;
-} /* makeAllVisible */
-
-
-/*
-** scrollWinForward
-*/
-void
-#ifdef __STDC__
-scrollWinForward (
- TuiGenWinInfoPtr winInfo,
- int numLines)
-#else
-scrollWinForward (winInfo, numLines)
- TuiGenWinInfoPtr winInfo;
- int numLines;
-#endif
-{
- if (winInfo->content != (OpaquePtr) NULL &&
- winInfo->lastVisibleLine < winInfo->contentSize - 1)
- {
- int i, firstLine, newLastLine;
-
- firstLine = winInfo->lastVisibleLine - winInfo->viewportHeight + 1;
- if (winInfo->lastVisibleLine + numLines > winInfo->contentSize)
- newLastLine = winInfo->contentSize - 1;
- else
- newLastLine = winInfo->lastVisibleLine + numLines - 1;
-
- for (i = (newLastLine - winInfo->viewportHeight);
- (i <= newLastLine); i++)
- {
- TuiWinElementPtr line;
- int lineHeight;
-
- line = (TuiWinElementPtr) winInfo->content[i];
- if (line->highlight)
- wstandout (winInfo->handle);
- mvwaddstr (winInfo->handle,
- i - (newLastLine - winInfo->viewportHeight),
- 1,
- displayableWinContentOf (winInfo, line));
- if (line->highlight)
- wstandend (winInfo->handle);
- lineHeight = winElementHeight (winInfo, line);
- newLastLine += (lineHeight - 1);
- }
- winInfo->lastVisibleLine = newLastLine;
- }
-
- return;
-} /* scrollWinForward */
-
-
-/*
-** scrollWinBackward
-*/
-void
-#ifdef __STDC__
-scrollWinBackward (
- TuiGenWinInfoPtr winInfo,
- int numLines)
-#else
-scrollWinBackward (winInfo, numLines)
- TuiGenWinInfoPtr winInfo;
- int numLines;
-#endif
-{
- if (winInfo->content != (OpaquePtr) NULL &&
- (winInfo->lastVisibleLine - winInfo->viewportHeight) > 0)
- {
- int i, newLastLine, firstLine;
-
- firstLine = winInfo->lastVisibleLine - winInfo->viewportHeight + 1;
- if ((firstLine - numLines) < 0)
- newLastLine = winInfo->viewportHeight - 1;
- else
- newLastLine = winInfo->lastVisibleLine - numLines + 1;
-
- for (i = newLastLine - winInfo->viewportHeight; (i <= newLastLine); i++)
- {
- TuiWinElementPtr line;
- int lineHeight;
-
- line = (TuiWinElementPtr) winInfo->content[i];
- if (line->highlight)
- wstandout (winInfo->handle);
- mvwaddstr (winInfo->handle,
- i - (newLastLine - winInfo->viewportHeight),
- 1,
- displayableWinContentOf (winInfo, line));
- if (line->highlight)
- wstandend (winInfo->handle);
- lineHeight = winElementHeight (winInfo, line);
- newLastLine += (lineHeight - 1);
- }
- winInfo->lastVisibleLine = newLastLine;
- }
-
- return;
-} /* scrollWinBackward */
-
-
-/*
-** refreshAll().
-** Function to refresh all the windows currently displayed
-*/
-void
-#ifdef __STDC__
-refreshAll (
- TuiWinInfoPtr * list)
-#else
-refreshAll (list)
- TuiWinInfoPtr *list;
-#endif
-{
- TuiWinType type;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-
- for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
- {
- if (list[type]->generic.isVisible)
- {
- if (type == SRC_WIN || type == DISASSEM_WIN)
- {
- touchwin (list[type]->detail.sourceInfo.executionInfo->handle);
- tuiRefreshWin (list[type]->detail.sourceInfo.executionInfo);
- }
- touchwin (list[type]->generic.handle);
- tuiRefreshWin (&list[type]->generic);
- }
- }
- if (locator->isVisible)
- {
- touchwin (locator->handle);
- tuiRefreshWin (locator);
- }
-
- return;
-} /* refreshAll */
-
-
-/*********************************
-** Local Static Functions
-*********************************/
diff --git a/contrib/gdb/gdb/tui/tuiGeneralWin.h b/contrib/gdb/gdb/tui/tuiGeneralWin.h
deleted file mode 100644
index 559f8ab33398..000000000000
--- a/contrib/gdb/gdb/tui/tuiGeneralWin.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef TUI_GENERAL_WIN_H
-#define TUI_GENERAL_WIN_H
-
-/*
-** Functions
-*/
-extern void tuiClearWin PARAMS ((TuiGenWinInfoPtr));
-extern void unhighlightWin PARAMS ((TuiWinInfoPtr));
-extern void makeVisible PARAMS ((TuiGenWinInfoPtr, int));
-extern void makeAllVisible PARAMS ((int));
-extern void scrollWinForward PARAMS ((TuiGenWinInfoPtr, int));
-extern void scrollWinBackward PARAMS ((TuiGenWinInfoPtr, int));
-extern void makeWindow PARAMS ((TuiGenWinInfoPtr, int));
-extern TuiWinInfoPtr copyWin PARAMS ((TuiWinInfoPtr));
-extern void boxWin PARAMS ((TuiGenWinInfoPtr, int));
-extern void highlightWin PARAMS ((TuiWinInfoPtr));
-extern void checkAndDisplayHighlightIfNeeded PARAMS ((TuiWinInfoPtr));
-extern void refreshAll PARAMS ((TuiWinInfoPtr *));
-extern void tuiDelwin PARAMS ((WINDOW *window));
-extern void tuiRefreshWin PARAMS ((TuiGenWinInfoPtr));
-
-/*
-** Macros
-*/
-#define m_beVisible(winInfo) makeVisible((TuiGenWinInfoPtr)(winInfo), TRUE)
-#define m_beInvisible(winInfo) \
- makeVisible((TuiGenWinInfoPtr)(winInfo), FALSE)
-#define m_allBeVisible() makeAllVisible(TRUE)
-#define m_allBeInvisible() makeAllVisible(FALSE)
-
-#endif /*TUI_GENERAL_WIN_H*/
diff --git a/contrib/gdb/gdb/tui/tuiIO.c b/contrib/gdb/gdb/tui/tuiIO.c
deleted file mode 100644
index 29a3613f9686..000000000000
--- a/contrib/gdb/gdb/tui/tuiIO.c
+++ /dev/null
@@ -1,734 +0,0 @@
-
-/*
-** This module contains functions to support i/o in the TUI
-*/
-
-
-#include <stdio.h>
-#include "defs.h"
-#include "terminal.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiIO.h"
-#include "tuiCommand.h"
-#include "tuiWin.h"
-
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-/* The Solaris header files seem to provide no declaration for this at
- all when __STDC__ is defined. This shouldn't conflict with
- anything. */
-extern char *tgoto ();
-
-int insert_mode = 0;
-
-/********************************************
-** LOCAL STATIC FORWARD DECLS **
-********************************************/
-static void _updateCommandInfo PARAMS ((int));
-static unsigned int _tuiHandleResizeDuringIO PARAMS ((unsigned int));
-
-
-/*********************************************************************************
-** PUBLIC FUNCTIONS **
-*********************************************************************************/
-
-/*
-** tuiPuts_unfiltered().
-** Function to put a string to the command window
-** When running in TUI mode, this is the "hook"
-** for fputs_unfiltered(). That is, all debugger
-** output eventually makes it's way to the bottom-level
-** routine fputs_unfiltered (main.c), which (in TUI
-** mode), calls tuiPuts_unfiltered().
-*/
-void
-#ifdef __STDC__
-tuiPuts_unfiltered (
- const char *string,
- GDB_FILE * stream)
-#else
-tuiPuts_unfiltered (string, stream)
- char *string;
- GDB_FILE *stream;
-#endif
-{
- int len = strlen (string);
- int i, linech;
-
- for (i = 0; i < len; i++)
- {
- if (string[i] == '\n' || string[i] == '\r')
- m_tuiStartNewLine;
- else
- {
- if ((cmdWin->detail.commandInfo.curch + 1) > cmdWin->generic.width)
- m_tuiStartNewLine;
-
- if (insert_mode)
- {
- mvwinsch (cmdWin->generic.handle,
- cmdWin->detail.commandInfo.curLine,
- cmdWin->detail.commandInfo.curch++,
- string[i]);
- wmove (cmdWin->generic.handle,
- cmdWin->detail.commandInfo.curLine,
- cmdWin->detail.commandInfo.curch);
- }
- else
- mvwaddch (cmdWin->generic.handle,
- cmdWin->detail.commandInfo.curLine,
- cmdWin->detail.commandInfo.curch++,
- string[i]);
- }
- }
- tuiRefreshWin (&cmdWin->generic);
-
- return;
-} /* tuiPuts_unfiltered */
-
-/* A cover routine for tputs().
- * tputs() is called from the readline package to put
- * out strings representing cursor positioning.
- * In TUI mode (non-XDB-style), tui_tputs() is called instead.
- *
- * The reason we need to hook tputs() is:
- * Since the output is going to curses and not to
- * a raw terminal, we need to intercept these special
- * sequences, and handle them them here.
- *
- * This function seems to be correctly handling all sequences
- * aimed at hpterm's, but there is additional work to do
- * for xterm's and dtterm's. I abandoned further work on this
- * in favor of "XDB style". In "XDB style", the command region
- * looks like terminal, not a curses window, and this routine
- * is not called. - RT
- */
-void
-tui_tputs (str, affcnt, putfunc)
- char *str;
- int affcnt;
- int (*putfunc) PARAMS ((int));
-{
- extern char *rl_prompt; /* the prompt string */
-
- /* This set of globals are defined and initialized
- * by the readline package.
- *
- * Note we're assuming tui_tputs() is being called
- * by the readline package. That's because we're recognizing
- * that a given string is being passed by
- * matching the string address against readline's
- * term_<whatever> global. To make this more general,
- * we'd have to actually recognize the termcap sequence
- * inside the string (more work than I want to do). - RT
- *
- * We don't see or need to handle every one of these here;
- * this is just the full list defined in readline/readline.c
- */
- extern char *term_backspace;
- extern char *term_clreol;
- extern char *term_clrpag;
- extern char *term_cr;
- extern char *term_dc;
- extern char *term_ei;
- extern char *term_goto;
- extern char *term_ic;
- extern char *term_im;
- extern char *term_mm;
- extern char *term_mo;
- extern char *term_up;
- extern char *term_scroll_region;
- extern char *term_memory_lock;
- extern char *term_memory_unlock;
- extern char *term_cursor_move;
- extern char *visible_bell;
-
- /* Sanity check - if not TUI, just call tputs() */
- if (!tui_version)
- tputs (str, affcnt, putfunc);
-
- /* The strings we special-case are handled first */
-
- if (str == term_backspace)
- {
- /* Backspace. */
-
- /* We see this on an emacs control-B.
- * I.e., it's like the left-arrow key (not like the backspace key).
- * The effect that readline wants when it transmits this
- * character to us is simply to back up one character
- * (but not to write a space over the old character).
- */
-
- _updateCommandInfo (-1);
- wmove (cmdWin->generic.handle,
- cmdWin->detail.commandInfo.curLine,
- cmdWin->detail.commandInfo.curch);
- wrefresh (cmdWin->generic.handle);
-
- }
- else if (str == term_clreol)
- {
-
- /* Clear to end of line. */
- wclrtoeol (cmdWin->generic.handle);
- wrefresh (cmdWin->generic.handle);
-
- }
- else if (str == term_cr)
- {
-
- /* Carriage return */
- _updateCommandInfo (-cmdWin->detail.commandInfo.curch);
- wmove (cmdWin->generic.handle,
- cmdWin->detail.commandInfo.curLine,
- 0 /* readline will rewrite the prompt from 0 */ );
- wrefresh (cmdWin->generic.handle);
-
- }
- else if (str == term_goto)
- {
-
- /* This is actually a tgoto() specifying a character position,
- * followed by either a term_IC/term_DC which [I think] means
- * insert/delete one character at that position.
- * There are complications with this one - need to either
- * extract the position from the string, or have a backdoor
- * means of communicating it from ../readline/display.c.
- * So this one is not yet implemented.
- * Not doing it seems to have no ill effects on command-line-editing
- * that I've noticed so far. - RT
- */
-
- }
- else if (str == term_dc)
- {
-
- /* Delete character at current cursor position */
- wdelch (cmdWin->generic.handle);
- wrefresh (cmdWin->generic.handle);
-
- }
- else if (str == term_im)
- {
-
- /* Turn on insert mode. */
- insert_mode = 1;
-
- }
- else if (str == term_ei)
- {
-
- /* Turn off insert mode. */
- insert_mode = 0;
-
- /* Strings we know about but don't handle
- * specially here are just passed along to tputs().
- *
- * These are not handled because (as far as I can tell)
- * they are not actually emitted by the readline package
- * in the course of doing command-line editing. Some of them
- * theoretically could be used in the future, in which case we'd
- * need to handle them.
- */
- }
- else if (str == term_ic || /* insert character */
- str == term_cursor_move || /* cursor move */
- str == term_clrpag ||/* clear page */
- str == term_mm || /* turn on meta key */
- str == term_mo || /* turn off meta key */
- str == term_up || /* up one line (not expected) */
- str == term_scroll_region || /* set scroll region */
- str == term_memory_lock || /* lock screen above cursor */
- str == term_memory_unlock || /* unlock screen above cursor */
- str == visible_bell)
- { /* flash screen */
- tputs (str, affcnt, putfunc);
- }
- else
- { /* something else */
- tputs (str, affcnt, putfunc);
- }
-} /* tui_tputs */
-
-
-/*
-** tui_vwgetch()
-** Wrapper around wgetch with the window in a va_list
-*/
-unsigned int
-#ifdef __STDC__
-tui_vwgetch (va_list args)
-#else
-tui_vwgetch (args)
- va_list args;
-#endif
-{
- unsigned int ch;
- WINDOW *window;
-
- window = va_arg (args, WINDOW *);
-
- return ((unsigned int) wgetch (window));
-} /* tui_vwgetch */
-
-
-/*
-** tui_vread()
-** Wrapper around read() with paramets in a va_list
-*/
-unsigned int
-#ifdef __STDC__
-tui_vread (va_list args)
-#else
-tui_vread (args)
- va_list args;
-#endif
-{
- int result = 0;
- int filedes = va_arg (args, int);
- char *buf = va_arg (args, char *);
- int nbytes = va_arg (args, int);
-
- result = read (filedes, buf, nbytes);
-
- return result;
-} /* tui_vread() */
-
-/*
-** tuiRead()
-** Function to perform a read() catching resize events
-*/
-int
-#ifdef __STDC__
-tuiRead (
- int filedes,
- char *buf,
- int nbytes)
-#else
-tuiRead (filedes, buf, nbytes)
- int filedes;
- char *buf;
- int nbytes;
-#endif
-{
- int result = 0;
-
- result = (int) vcatch_errors ((OpaqueFuncPtr) tui_vread, filedes, buf, nbytes);
- *buf = _tuiHandleResizeDuringIO (*buf);
-
- return result;
-} /* tuiRead */
-
-
-/*
-** tuiGetc().
-** Get a character from the command window.
-** This is called from the readline package,
-** that is, we have:
-** tuiGetc() [here], called from
-** readline code [in ../readline/], called from
-** command_line_input() in top.c
-*/
-unsigned int
-#ifdef __STDC__
-tuiGetc (void)
-#else
-tuiGetc ()
-#endif
-{
- unsigned int ch;
- extern char *rl_prompt;
- extern char *rl_line_buffer;
- extern int rl_point;
-
- /* Call the curses routine that reads one character */
-#ifndef COMMENT
- ch = (unsigned int) vcatch_errors ((OpaqueFuncPtr) tui_vwgetch,
- cmdWin->generic.handle);
-#else
- ch = wgetch (cmdWin->generic.handle);
-#endif
- ch = _tuiHandleResizeDuringIO (ch);
-
- if (m_isCommandChar (ch))
- { /* Handle prev/next/up/down here */
- tuiTermSetup (0);
- ch = tuiDispatchCtrlChar (ch);
- cmdWin->detail.commandInfo.curch = strlen (rl_prompt) + rl_point;
- tuiTermUnsetup (0, cmdWin->detail.commandInfo.curch);
- }
- if (ch == '\n' || ch == '\r' || ch == '\f')
- cmdWin->detail.commandInfo.curch = 0;
- else
- tuiIncrCommandCharCountBy (1);
-
- return ch;
-} /* tuiGetc */
-
-
-/*
-** tuiBufferGetc().
-*/
-/*elz: this function reads a line of input from the user and
-puts it in a static buffer. Subsequent calls to this same function
-obtain one char at the time, providing the caller with a behavior
-similar to fgetc. When the input is buffered, the backspaces have
-the needed effect, i.e. ignore the last char active in the buffer*/
-/* so far this function is called only from the query function in
-utils.c*/
-
-unsigned int
-#ifdef __STDC__
-tuiBufferGetc (void)
-#else
-tuiBufferGetc ()
-#endif
-{
- unsigned int ch;
- static unsigned char _ibuffer[512];
- static int index_read = -1;
- static int length_of_answer = -1;
- int pos = 0;
-
- if (length_of_answer == -1)
- {
- /* this is the first time through, need to read the answer*/
- do
- {
- /* Call the curses routine that reads one character */
- ch = (unsigned int) wgetch (cmdWin->generic.handle);
- if (ch != '\b')
- {
- _ibuffer[pos] = ch;
- pos++;
- }
- else
- pos--;
- }
- while (ch != '\r' && ch != '\n');
-
- length_of_answer = pos;
- index_read = 0;
- }
-
- ch = _ibuffer[index_read];
- index_read++;
-
- if (index_read == length_of_answer)
- {
- /*this is the last time through, reset for next query*/
- index_read = -1;
- length_of_answer = -1;
- }
-
- wrefresh (cmdWin->generic.handle);
-
- return (ch);
-} /* tuiBufferGetc */
-
-
-/*
-** tuiStartNewLines().
-*/
-void
-#ifdef __STDC__
-tuiStartNewLines (
- int numLines)
-#else
-tuiStartNewLines (numLines)
- int numLines;
-#endif
-{
- if (numLines > 0)
- {
- if (cmdWin->generic.viewportHeight > 1 &&
- cmdWin->detail.commandInfo.curLine < cmdWin->generic.viewportHeight)
- cmdWin->detail.commandInfo.curLine += numLines;
- else
- scroll (cmdWin->generic.handle);
- cmdWin->detail.commandInfo.curch = 0;
- wmove (cmdWin->generic.handle,
- cmdWin->detail.commandInfo.curLine,
- cmdWin->detail.commandInfo.curch);
- tuiRefreshWin (&cmdWin->generic);
- }
-
- return;
-} /* tuiStartNewLines */
-
-
-/*
-** tui_vStartNewLines().
-** With numLines in a va_list
-*/
-void
-#ifdef __STDC__
-tui_vStartNewLines (
- va_list args)
-#else
-tui_vStartNewLines (args)
- va_list args;
-#endif
-{
- int numLines = va_arg (args, int);
-
- tuiStartNewLines (numLines);
-
- return;
-} /* tui_vStartNewLines */
-
-
-/****************************************************************************
-** LOCAL STATIC FUNCTIONS **
-*****************************************************************************/
-
-
-/*
-** _tuiHandleResizeDuringIO
-** This function manages the cleanup when a resize has occured
-** From within a call to getch() or read. Returns the character
-** to return from getc or read.
-*/
-static unsigned int
-#ifdef __STDC__
-_tuiHandleResizeDuringIO (
- unsigned int originalCh) /* the char just read */
-#else
-_tuiHandleResizeDuringIO (originalCh)
- unsigned int originalCh;
-#endif
-{
- if (tuiWinResized ())
- {
- tuiDo ((TuiOpaqueFuncPtr) tuiRefreshAll);
- dont_repeat ();
- tuiSetWinResizedTo (FALSE);
- rl_reset ();
- return '\n';
- }
- else
- return originalCh;
-} /* _tuiHandleResizeDuringIO */
-
-
-/*
-** _updateCommandInfo().
-** Function to update the command window information.
-*/
-static void
-#ifdef __STDC__
-_updateCommandInfo (
- int sizeOfString)
-#else
-_updateCommandInfo (sizeOfString)
- int sizeOfString;
-#endif
-{
-
- if ((sizeOfString +
- cmdWin->detail.commandInfo.curch) > cmdWin->generic.width)
- {
- int newCurch = sizeOfString + cmdWin->detail.commandInfo.curch;
-
- tuiStartNewLines (1);
- cmdWin->detail.commandInfo.curch = newCurch - cmdWin->generic.width;
- }
- else
- cmdWin->detail.commandInfo.curch += sizeOfString;
-
- return;
-} /* _updateCommandInfo */
-
-
-/* Looked at in main.c, fputs_unfiltered(), to decide
- * if it's safe to do standard output to the command window.
- */
-int tui_owns_terminal = 0;
-
-/* Called to set up the terminal for TUI (curses) I/O.
- * We do this either on our way "in" to GDB after target
- * program execution, or else within tuiDo just before
- * going off to TUI routines.
- */
-
-void
-#ifdef __STDC__
-tuiTermSetup (
- int turn_off_echo)
-#else
-tuiTermSetup (turn_off_echo)
- int turn_off_echo;
-#endif
-{
- char *buffer;
- int start;
- int end;
- int endcol;
- extern char *term_scroll_region;
- extern char *term_cursor_move;
- extern char *term_memory_lock;
- extern char *term_memory_unlock;
-
- /* Turn off echoing, since the TUI does not
- * expect echoing. Below I only put in the TERMIOS
- * case, since that is what applies on HP-UX. turn_off_echo
- * is 1 except for the case where we're being called
- * on a "quit", in which case we want to leave echo on.
- */
- if (turn_off_echo)
- {
-#ifdef HAVE_TERMIOS
- struct termios tio;
- tcgetattr (0, &tio);
- tio.c_lflag &= ~(ECHO);
- tcsetattr (0, TCSANOW, &tio);
-#endif
- }
-
- /* Compute the start and end lines of the command
- * region. (Actually we only use end here)
- */
- start = winList[CMD_WIN]->generic.origin.y;
- end = start + winList[CMD_WIN]->generic.height - 1;
- endcol = winList[CMD_WIN]->generic.width - 1;
-
- if (term_memory_unlock)
- {
-
- /* Un-do the effect of the memory lock in terminal_inferior() */
- tputs (term_memory_unlock, 1, (int (*)PARAMS ((int))) putchar);
- fflush (stdout);
-
- }
- else if (term_scroll_region)
- {
-
- /* Un-do the effect of setting scroll region in terminal_inferior() */
- /* I'm actually not sure how to do this (we don't know for
- * sure what the scroll region was *before* we changed it),
- * but I'll guess that setting it to the whole screen is
- * the right thing. So, ...
- */
-
- /* Set scroll region to be 0..end */
- buffer = (char *) tgoto (term_scroll_region, end, 0);
- tputs (buffer, 1, (int (*)PARAMS ((int))) putchar);
-
- } /* else we're out of luck */
-
- /* This is an attempt to keep the logical & physical
- * cursor in synch, going into curses. Without this,
- * curses seems to be confused by the fact that
- * GDB has physically moved the curser on it. One
- * visible effect of removing this code is that the
- * locator window fails to get updated and the line
- * of text that *should* go into the locator window
- * often goes to the wrong place.
- */
- /* What's done here is to tell curses to write a ' '
- * at the bottom right corner of the screen.
- * The idea is to wind up with the cursor in a known
- * place.
- * Note I'm relying on refresh()
- * only writing what changed (the space),
- * not the whole screen.
- */
- standend ();
- move (end, endcol - 1);
- addch (' ');
- refresh ();
-
- tui_owns_terminal = 1;
-} /* tuiTermSetup */
-
-
-/* Called to set up the terminal for target program I/O, meaning I/O
- * is confined to the command-window area. We also call this on our
- * way out of tuiDo, thus setting up the terminal this way for
- * debugger command I/O. */
-void
-#ifdef __STDC__
-tuiTermUnsetup (
- int turn_on_echo,
- int to_column)
-#else
-tuiTermUnsetup (turn_on_echo, to_column)
- int turn_on_echo;
- int to_column;
-#endif
-{
- int start;
- int end;
- int curline;
- char *buffer;
- /* The next bunch of things are from readline */
- extern char *term_scroll_region;
- extern char *term_cursor_move;
- extern char *term_memory_lock;
- extern char *term_memory_unlock;
- extern char *term_se;
-
- /* We need to turn on echoing, since the TUI turns it off */
- /* Below I only put in the TERMIOS case, since that
- * is what applies on HP-UX.
- */
- if (turn_on_echo)
- {
-#ifdef HAVE_TERMIOS
- struct termios tio;
- tcgetattr (0, &tio);
- tio.c_lflag |= (ECHO);
- tcsetattr (0, TCSANOW, &tio);
-#endif
- }
-
- /* Compute the start and end lines of the command
- * region, as well as the last "real" line of
- * the region (normally same as end, except when
- * we're first populating the region)
- */
- start = winList[CMD_WIN]->generic.origin.y;
- end = start + winList[CMD_WIN]->generic.height - 1;
- curline = start + winList[CMD_WIN]->detail.commandInfo.curLine;
-
- /* We want to confine target I/O to the command region.
- * In order to do so, we must either have "memory lock"
- * (hpterm's) or "scroll regions" (xterm's).
- */
- if (term_cursor_move && term_memory_lock)
- {
-
- /* Memory lock means lock region above cursor.
- * So first position the cursor, then call memory lock.
- */
- buffer = tgoto (term_cursor_move, 0, start);
- tputs (buffer, 1, (int (*)PARAMS ((int))) putchar);
- tputs (term_memory_lock, 1, (int (*)PARAMS ((int))) putchar);
-
- }
- else if (term_scroll_region)
- {
-
- /* Set the scroll region to the command window */
- buffer = tgoto (term_scroll_region, end, start);
- tputs (buffer, 1, (int (*)PARAMS ((int))) putchar);
-
- } /* else we can't do anything about target I/O */
-
- /* Also turn off standout mode, in case it is on */
- if (term_se != NULL)
- tputs (term_se, 1, (int (*)PARAMS ((int))) putchar);
-
- /* Now go to the appropriate spot on the end line */
- buffer = tgoto (term_cursor_move, to_column, end);
- tputs (buffer, 1, (int (*)PARAMS ((int))) putchar);
- fflush (stdout);
-
- tui_owns_terminal = 0;
-} /* tuiTermUnsetup */
diff --git a/contrib/gdb/gdb/tui/tuiIO.h b/contrib/gdb/gdb/tui/tuiIO.h
deleted file mode 100644
index bcbeffe4edcc..000000000000
--- a/contrib/gdb/gdb/tui/tuiIO.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _TUI_IO_H
-#define _TUI_IO_H
-/*
-** This header contains defitions to support tuiIO.c
-*/
-
-
-#include <stdio.h>
-
-extern void tuiPuts_unfiltered PARAMS ((const char *, GDB_FILE *));
-extern unsigned int tuiGetc PARAMS ((void));
-extern unsigned int tuiBufferGetc PARAMS ((void));
-extern int tuiRead PARAMS ((int, char *, int));
-extern void tuiStartNewLines PARAMS ((int));
-extern void tui_vStartNewLines PARAMS ((va_list));
-extern unsigned int tui_vwgetch PARAMS ((va_list));
-extern void tuiTermSetup PARAMS ((int));
-extern void tuiTermUnsetup PARAMS ((int, int));
-
-
-
-#define m_tuiStartNewLine tuiStartNewLines(1)
-#define m_isStartSequence(ch) (ch == 27)
-#define m_isEndSequence(ch) (ch == 126)
-#define m_isBackspace(ch) (ch == 8)
-#define m_isDeleteChar(ch) (ch == KEY_DC)
-#define m_isDeleteLine(ch) (ch == KEY_DL)
-#define m_isDeleteToEol(ch) (ch == KEY_EOL)
-#define m_isNextPage(ch) (ch == KEY_NPAGE)
-#define m_isPrevPage(ch) (ch == KEY_PPAGE)
-#define m_isLeftArrow(ch) (ch == KEY_LEFT)
-#define m_isRightArrow(ch) (ch == KEY_RIGHT)
-
-#define m_isCommandChar(ch) (m_isNextPage(ch) || m_isPrevPage(ch) || \
- m_isLeftArrow(ch) || m_isRightArrow(ch) || \
- (ch == KEY_UP) || (ch == KEY_DOWN) || \
- (ch == KEY_SF) || (ch == KEY_SR) || \
- (ch == (int)'\f') || m_isStartSequence(ch))
-
-#define m_isXdbStyleCommandChar(ch) (m_isNextPage(ch) || m_isPrevPage(ch))
-
-
-#endif /*_TUI_IO_H*/
diff --git a/contrib/gdb/gdb/tui/tuiLayout.c b/contrib/gdb/gdb/tui/tuiLayout.c
deleted file mode 100644
index 6aa380cfe41c..000000000000
--- a/contrib/gdb/gdb/tui/tuiLayout.c
+++ /dev/null
@@ -1,1410 +0,0 @@
-/*
-** tuiLayout.c
-** This module contains procedures for handling the layout of the windows.
-*/
-
-
-#include "defs.h"
-#include "command.h"
-#include "symtab.h"
-#include "frame.h"
-
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiGeneralWin.h"
-#include "tuiStack.h"
-#include "tuiRegs.h"
-#include "tuiDisassem.h"
-
-/*******************************
-** Static Local Decls
-********************************/
-
-static void _initGenWinInfo PARAMS
- ((TuiGenWinInfoPtr, TuiWinType, int, int, int, int));
-static void _initAndMakeWin PARAMS
- ((Opaque *, TuiWinType, int, int, int, int, int));
-static void _showSourceOrDisassemAndCommand PARAMS
- ((TuiLayoutType));
-static void _makeSourceOrDisassemWindow PARAMS
- ((TuiWinInfoPtr *, TuiWinType, int, int));
-static void _makeCommandWindow PARAMS ((TuiWinInfoPtr *, int, int));
-static void _makeSourceWindow PARAMS ((TuiWinInfoPtr *, int, int));
-static void _makeDisassemWindow PARAMS
- ((TuiWinInfoPtr *, int, int));
-static void _makeDataWindow PARAMS ((TuiWinInfoPtr *, int, int));
-static void _showSourceCommand PARAMS ((void));
-static void _showDisassemCommand PARAMS ((void));
-static void _showSourceDisassemCommand PARAMS ((void));
-static void _showData PARAMS ((TuiLayoutType));
-static TuiLayoutType _nextLayout PARAMS ((void));
-static TuiLayoutType _prevLayout PARAMS ((void));
-static void _tuiLayout_command PARAMS ((char *, int));
-static void _tuiToggleLayout_command PARAMS ((char *, int));
-static void _tui_vToggleLayout_command PARAMS ((va_list));
-static void _tuiToggleSplitLayout_command PARAMS ((char *, int));
-static void _tui_vToggleSplitLayout_command PARAMS ((va_list));
-static Opaque _extractDisplayStartAddr PARAMS ((void));
-static void _tuiHandleXDBLayout PARAMS ((TuiLayoutDefPtr));
-static TuiStatus _tuiSetLayoutTo PARAMS ((char *));
-
-
-/***************************************
-** DEFINITIONS
-***************************************/
-
-#define LAYOUT_USAGE "Usage: layout prev | next | <layout_name> \n"
-
-/***************************************
-** Static Local Data
-***************************************/
-static TuiLayoutType lastLayout = UNDEFINED_LAYOUT;
-
-/***************************************
-** PUBLIC FUNCTIONS
-***************************************/
-
-/*
-** showLayout().
-** Show the screen layout defined
-*/
-void
-#ifdef __STDC__
-showLayout (
- TuiLayoutType layout)
-#else
-showLayout (layout)
- TuiLayoutType layout;
-#endif
-{
- TuiLayoutType curLayout = currentLayout ();
-
- if (layout != curLayout)
- {
- /*
- ** Since the new layout may cause changes in window size, we
- ** should free the content and reallocate on next display of
- ** source/asm
- */
- tuiClearAllSourceWinsContent (NO_EMPTY_SOURCE_PROMPT);
- freeAllSourceWinsContent ();
- clearSourceWindows ();
- if (layout == SRC_DATA_COMMAND || layout == DISASSEM_DATA_COMMAND)
- {
- _showData (layout);
- refreshAll (winList);
- }
- else
- {
- /* First make the current layout be invisible */
- m_allBeInvisible ();
- m_beInvisible (locatorWinInfoPtr ());
-
- switch (layout)
- {
- /* Now show the new layout */
- case SRC_COMMAND:
- _showSourceCommand ();
- addToSourceWindows (srcWin);
- break;
- case DISASSEM_COMMAND:
- _showDisassemCommand ();
- addToSourceWindows (disassemWin);
- break;
- case SRC_DISASSEM_COMMAND:
- _showSourceDisassemCommand ();
- addToSourceWindows (srcWin);
- addToSourceWindows (disassemWin);
- break;
- default:
- break;
- }
- }
- }
-
- return;
-} /* showLayout */
-
-
-/*
-** tuiSetLayout()
-** Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND,
-** SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND.
-** If the layout is SRC_DATA_COMMAND, DISASSEM_DATA_COMMAND, or
-** UNDEFINED_LAYOUT, then the data window is populated according
-** to regsDisplayType.
-*/
-TuiStatus
-#ifdef __STDC__
-tuiSetLayout (
- TuiLayoutType layoutType,
- TuiRegisterDisplayType regsDisplayType)
-#else
-tuiSetLayout (layoutType, regsDisplayType)
- TuiLayoutType layoutType;
- TuiRegisterDisplayType regsDisplayType;
-#endif
-{
- TuiStatus status = TUI_SUCCESS;
-
- if (layoutType != UNDEFINED_LAYOUT || regsDisplayType != TUI_UNDEFINED_REGS)
- {
- TuiLayoutType curLayout = currentLayout (), newLayout = UNDEFINED_LAYOUT;
- int regsPopulate = FALSE;
- Opaque addr = _extractDisplayStartAddr ();
- TuiWinInfoPtr newWinWithFocus = (TuiWinInfoPtr) NULL, winWithFocus = tuiWinWithFocus ();
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
-
-
- if (layoutType == UNDEFINED_LAYOUT &&
- regsDisplayType != TUI_UNDEFINED_REGS)
- {
- if (curLayout == SRC_DISASSEM_COMMAND)
- newLayout = DISASSEM_DATA_COMMAND;
- else if (curLayout == SRC_COMMAND || curLayout == SRC_DATA_COMMAND)
- newLayout = SRC_DATA_COMMAND;
- else if (curLayout == DISASSEM_COMMAND ||
- curLayout == DISASSEM_DATA_COMMAND)
- newLayout = DISASSEM_DATA_COMMAND;
- }
- else
- newLayout = layoutType;
-
- regsPopulate = (newLayout == SRC_DATA_COMMAND ||
- newLayout == DISASSEM_DATA_COMMAND ||
- regsDisplayType != TUI_UNDEFINED_REGS);
- if (newLayout != curLayout || regsDisplayType != TUI_UNDEFINED_REGS)
- {
- if (newLayout != curLayout)
- {
- if (winWithFocus != cmdWin)
- tuiClearWinFocus ();
- showLayout (newLayout);
- /*
- ** Now determine where focus should be
- */
- if (winWithFocus != cmdWin)
- {
- switch (newLayout)
- {
- case SRC_COMMAND:
- tuiSetWinFocusTo (srcWin);
- layoutDef->displayMode = SRC_WIN;
- layoutDef->split = FALSE;
- break;
- case DISASSEM_COMMAND:
- /* the previous layout was not showing
- ** code. this can happen if there is no
- ** source available:
- ** 1. if the source file is in another dir OR
- ** 2. if target was compiled without -g
- ** We still want to show the assembly though!
- */
- addr = vcatch_errors ((OpaqueFuncPtr)
- tuiGetBeginAsmAddress);
- tuiSetWinFocusTo (disassemWin);
- layoutDef->displayMode = DISASSEM_WIN;
- layoutDef->split = FALSE;
- break;
- case SRC_DISASSEM_COMMAND:
- /* the previous layout was not showing
- ** code. this can happen if there is no
- ** source available:
- ** 1. if the source file is in another dir OR
- ** 2. if target was compiled without -g
- ** We still want to show the assembly though!
- */
- addr = vcatch_errors ((OpaqueFuncPtr)
- tuiGetBeginAsmAddress);
- if (winWithFocus == srcWin)
- tuiSetWinFocusTo (srcWin);
- else
- tuiSetWinFocusTo (disassemWin);
- layoutDef->split = TRUE;
- break;
- case SRC_DATA_COMMAND:
- if (winWithFocus != dataWin)
- tuiSetWinFocusTo (srcWin);
- else
- tuiSetWinFocusTo (dataWin);
- layoutDef->displayMode = SRC_WIN;
- layoutDef->split = FALSE;
- break;
- case DISASSEM_DATA_COMMAND:
- /* the previous layout was not showing
- ** code. this can happen if there is no
- ** source available:
- ** 1. if the source file is in another dir OR
- ** 2. if target was compiled without -g
- ** We still want to show the assembly though!
- */
- addr = vcatch_errors ((OpaqueFuncPtr)
- tuiGetBeginAsmAddress);
- if (winWithFocus != dataWin)
- tuiSetWinFocusTo (disassemWin);
- else
- tuiSetWinFocusTo (dataWin);
- layoutDef->displayMode = DISASSEM_WIN;
- layoutDef->split = FALSE;
- break;
- default:
- break;
- }
- }
- if (newWinWithFocus != (TuiWinInfoPtr) NULL)
- tuiSetWinFocusTo (newWinWithFocus);
- /*
- ** Now update the window content
- */
- if (!regsPopulate &&
- (newLayout == SRC_DATA_COMMAND ||
- newLayout == DISASSEM_DATA_COMMAND))
- tuiDisplayAllData ();
-
- tuiUpdateSourceWindowsWithAddr (addr);
- }
- if (regsPopulate)
- {
- layoutDef->regsDisplayType =
- (regsDisplayType == TUI_UNDEFINED_REGS ?
- TUI_GENERAL_REGS : regsDisplayType);
- tuiShowRegisters (layoutDef->regsDisplayType);
- }
- }
- }
- else
- status = TUI_FAILURE;
-
- return status;
-} /* tuiSetLayout */
-
-
-/*
-** tui_vSetLayoutTo()
-** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA,
-** REGS, $REGS, $GREGS, $FREGS, $SREGS with arguments in a va_list
-*/
-TuiStatus
-#ifdef __STDC__
-tui_vSetLayoutTo (
- va_list args)
-#else
-tui_vSetLayoutTo (args)
- va_list args;
-#endif
-{
- char *layoutName;
-
- layoutName = va_arg (args, char *);
-
- return (_tuiSetLayoutTo (layoutName));
-} /* tui_vSetLayoutTo */
-
-
-/*
-** tuiAddWinToLayout().
-** Add the specified window to the layout in a logical way.
-** This means setting up the most logical layout given the
-** window to be added.
-*/
-void
-#ifdef __STDC__
-tuiAddWinToLayout (
- TuiWinType type)
-#else
-tuiAddWinToLayout (type)
- TuiWinType type;
-#endif
-{
- TuiLayoutType curLayout = currentLayout ();
-
- switch (type)
- {
- case SRC_WIN:
- if (curLayout != SRC_COMMAND &&
- curLayout != SRC_DISASSEM_COMMAND &&
- curLayout != SRC_DATA_COMMAND)
- {
- clearSourceWindowsDetail ();
- if (curLayout == DISASSEM_DATA_COMMAND)
- showLayout (SRC_DATA_COMMAND);
- else
- showLayout (SRC_COMMAND);
- }
- break;
- case DISASSEM_WIN:
- if (curLayout != DISASSEM_COMMAND &&
- curLayout != SRC_DISASSEM_COMMAND &&
- curLayout != DISASSEM_DATA_COMMAND)
- {
- clearSourceWindowsDetail ();
- if (curLayout == SRC_DATA_COMMAND)
- showLayout (DISASSEM_DATA_COMMAND);
- else
- showLayout (DISASSEM_COMMAND);
- }
- break;
- case DATA_WIN:
- if (curLayout != SRC_DATA_COMMAND &&
- curLayout != DISASSEM_DATA_COMMAND)
- {
- if (curLayout == DISASSEM_COMMAND)
- showLayout (DISASSEM_DATA_COMMAND);
- else
- showLayout (SRC_DATA_COMMAND);
- }
- break;
- default:
- break;
- }
-
- return;
-} /* tuiAddWinToLayout */
-
-
-/*
-** tui_vAddWinToLayout().
-** Add the specified window to the layout in a logical way,
-** with arguments in a va_list.
-*/
-void
-#ifdef __STDC__
-tui_vAddWinToLayout (
- va_list args)
-#else
-tui_vAddWinToLayout (args)
- va_list args;
-#endif
-{
- TuiWinType type = va_arg (args, TuiWinType);
-
- tuiAddWinToLayout (type);
-
- return;
-} /* tui_vAddWinToLayout */
-
-
-/*
-** tuiDefaultWinHeight().
-** Answer the height of a window. If it hasn't been created yet,
-** answer what the height of a window would be based upon its
-** type and the layout.
-*/
-int
-#ifdef __STDC__
-tuiDefaultWinHeight (
- TuiWinType type,
- TuiLayoutType layout)
-#else
-tuiDefaultWinHeight (type, layout)
- TuiWinType type;
- TuiLayoutType layout;
-#endif
-{
- int h;
-
- if (winList[type] != (TuiWinInfoPtr) NULL)
- h = winList[type]->generic.height;
- else
- {
- switch (layout)
- {
- case SRC_COMMAND:
- case DISASSEM_COMMAND:
- if (m_winPtrIsNull (cmdWin))
- h = termHeight () / 2;
- else
- h = termHeight () - cmdWin->generic.height;
- break;
- case SRC_DISASSEM_COMMAND:
- case SRC_DATA_COMMAND:
- case DISASSEM_DATA_COMMAND:
- if (m_winPtrIsNull (cmdWin))
- h = termHeight () / 3;
- else
- h = (termHeight () - cmdWin->generic.height) / 2;
- break;
- default:
- h = 0;
- break;
- }
- }
-
- return h;
-} /* tuiDefaultWinHeight */
-
-
-/*
-** tuiDefaultWinViewportHeight().
-** Answer the height of a window. If it hasn't been created yet,
-** answer what the height of a window would be based upon its
-** type and the layout.
-*/
-int
-#ifdef __STDC__
-tuiDefaultWinViewportHeight (
- TuiWinType type,
- TuiLayoutType layout)
-#else
-tuiDefaultWinViewportHeight (type, layout)
- TuiWinType type;
- TuiLayoutType layout;
-#endif
-{
- int h;
-
- h = tuiDefaultWinHeight (type, layout);
-
- if (winList[type] == cmdWin)
- h -= 1;
- else
- h -= 2;
-
- return h;
-} /* tuiDefaultWinViewportHeight */
-
-
-/*
-** _initialize_tuiLayout().
-** Function to initialize gdb commands, for tui window layout
-** manipulation.
-*/
-void
-_initialize_tuiLayout ()
-{
- if (tui_version)
- {
- add_com ("layout", class_tui, _tuiLayout_command,
- "Change the layout of windows.\n\
-Usage: layout prev | next | <layout_name> \n\
-Layout names are:\n\
- src : Displays source and command windows.\n\
- asm : Displays disassembly and command windows.\n\
- split : Displays source, disassembly and command windows.\n\
- regs : Displays register window. If existing layout\n\
- is source/command or assembly/command, the \n\
- register window is displayed. If the\n\
- source/assembly/command (split) is displayed, \n\
- the register window is displayed with \n\
- the window that has current logical focus.\n");
- if (xdb_commands)
- {
- add_com ("td", class_tui, _tuiToggleLayout_command,
- "Toggle between Source/Command and Disassembly/Command layouts.\n");
- add_com ("ts", class_tui, _tuiToggleSplitLayout_command,
- "Toggle between Source/Command or Disassembly/Command and \n\
-Source/Disassembly/Command layouts.\n");
- }
- }
-
- return;
-} /* _intialize_tuiLayout */
-
-
-/*************************
-** STATIC LOCAL FUNCTIONS
-**************************/
-
-
-/*
-** _tuiSetLayoutTo()
-** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, REGS,
-** $REGS, $GREGS, $FREGS, $SREGS.
-*/
-static TuiStatus
-#ifdef __STDC__
-_tuiSetLayoutTo (
- char *layoutName)
-#else
-_tuiSetLayoutTo (layoutName)
- char *layoutName;
-#endif
-{
- TuiStatus status = TUI_SUCCESS;
-
- if (layoutName != (char *) NULL)
- {
- register int i;
- register char *bufPtr;
- TuiLayoutType newLayout = UNDEFINED_LAYOUT;
- TuiRegisterDisplayType dpyType = TUI_UNDEFINED_REGS;
- TuiLayoutType curLayout = currentLayout ();
-
- bufPtr = (char *) tuiStrDup (layoutName);
- for (i = 0; (i < strlen (layoutName)); i++)
- bufPtr[i] = toupper (bufPtr[i]);
-
- /* First check for ambiguous input */
- if (strlen (bufPtr) <= 1 && (*bufPtr == 'S' || *bufPtr == '$'))
- {
- warning ("Ambiguous command input.\n");
- status = TUI_FAILURE;
- }
- else
- {
- if (subsetCompare (bufPtr, "SRC"))
- newLayout = SRC_COMMAND;
- else if (subsetCompare (bufPtr, "ASM"))
- newLayout = DISASSEM_COMMAND;
- else if (subsetCompare (bufPtr, "SPLIT"))
- newLayout = SRC_DISASSEM_COMMAND;
- else if (subsetCompare (bufPtr, "REGS") ||
- subsetCompare (bufPtr, TUI_GENERAL_SPECIAL_REGS_NAME) ||
- subsetCompare (bufPtr, TUI_GENERAL_REGS_NAME) ||
- subsetCompare (bufPtr, TUI_FLOAT_REGS_NAME) ||
- subsetCompare (bufPtr, TUI_SPECIAL_REGS_NAME))
- {
- if (curLayout == SRC_COMMAND || curLayout == SRC_DATA_COMMAND)
- newLayout = SRC_DATA_COMMAND;
- else
- newLayout = DISASSEM_DATA_COMMAND;
-
-/* could ifdef out the following code. when compile with -z, there are null
- pointer references that cause a core dump if 'layout regs' is the first
- layout command issued by the user. HP has asked us to hook up this code
- - edie epstein
- */
- if (subsetCompare (bufPtr, TUI_FLOAT_REGS_NAME))
- {
- if (dataWin->detail.dataDisplayInfo.regsDisplayType !=
- TUI_SFLOAT_REGS &&
- dataWin->detail.dataDisplayInfo.regsDisplayType !=
- TUI_DFLOAT_REGS)
- dpyType = TUI_SFLOAT_REGS;
- else
- dpyType =
- dataWin->detail.dataDisplayInfo.regsDisplayType;
- }
- else if (subsetCompare (bufPtr,
- TUI_GENERAL_SPECIAL_REGS_NAME))
- dpyType = TUI_GENERAL_AND_SPECIAL_REGS;
- else if (subsetCompare (bufPtr, TUI_GENERAL_REGS_NAME))
- dpyType = TUI_GENERAL_REGS;
- else if (subsetCompare (bufPtr, TUI_SPECIAL_REGS_NAME))
- dpyType = TUI_SPECIAL_REGS;
- else
- {
- if (dataWin->detail.dataDisplayInfo.regsDisplayType !=
- TUI_UNDEFINED_REGS)
- dpyType =
- dataWin->detail.dataDisplayInfo.regsDisplayType;
- else
- dpyType = TUI_GENERAL_REGS;
- }
-
-/* end of potential ifdef
- */
-
-/* if ifdefed out code above, then assume that the user wishes to display the
- general purpose registers
- */
-
-/* dpyType = TUI_GENERAL_REGS;
- */
- }
- else if (subsetCompare (bufPtr, "NEXT"))
- newLayout = _nextLayout ();
- else if (subsetCompare (bufPtr, "PREV"))
- newLayout = _prevLayout ();
- else
- status = TUI_FAILURE;
- free (bufPtr);
-
- tuiSetLayout (newLayout, dpyType);
- }
- }
- else
- status = TUI_FAILURE;
-
- return status;
-} /* _tuiSetLayoutTo */
-
-
-static Opaque
-#ifdef __STDC__
-_extractDisplayStartAddr (void)
-#else
-_extractDisplayStartAddr ()
-#endif
-{
- TuiLayoutType curLayout = currentLayout ();
- Opaque addr;
-
- switch (curLayout)
- {
- case SRC_COMMAND:
- case SRC_DATA_COMMAND:
- addr = (Opaque) find_line_pc (
- current_source_symtab,
- srcWin->detail.sourceInfo.startLineOrAddr.lineNo);
- break;
- case DISASSEM_COMMAND:
- case SRC_DISASSEM_COMMAND:
- case DISASSEM_DATA_COMMAND:
- addr = disassemWin->detail.sourceInfo.startLineOrAddr.addr;
- break;
- default:
- addr = (Opaque) NULL;
- break;
- }
-
- return addr;
-} /* _extractDisplayStartAddr */
-
-
-static void
-#ifdef __STDC__
-_tuiHandleXDBLayout (
- TuiLayoutDefPtr layoutDef)
-#else
-_tuiHandleXDBLayout (layoutDef)
- TuiLayoutDefPtr layoutDef;
-#endif
-{
- if (layoutDef->split)
- {
- tuiSetLayout (SRC_DISASSEM_COMMAND, TUI_UNDEFINED_REGS);
- tuiSetWinFocusTo (winList[layoutDef->displayMode]);
- }
- else
- {
- if (layoutDef->displayMode == SRC_WIN)
- tuiSetLayout (SRC_COMMAND, TUI_UNDEFINED_REGS);
- else
- tuiSetLayout (DISASSEM_DATA_COMMAND, layoutDef->regsDisplayType);
- }
-
-
- return;
-} /* _tuiHandleXDBLayout */
-
-
-static void
-#ifdef __STDC__
-_tuiToggleLayout_command (
- char *arg,
- int fromTTY)
-#else
-_tuiToggleLayout_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vToggleLayout_command, arg, fromTTY);
-}
-
-static void
-#ifdef __STDC__
-_tui_vToggleLayout_command (
- va_list args)
-#else
-_tui_vToggleLayout_command (args)
- va_list args;
-#endif
-{
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
-
- if (layoutDef->displayMode == SRC_WIN)
- layoutDef->displayMode = DISASSEM_WIN;
- else
- layoutDef->displayMode = SRC_WIN;
-
- if (!layoutDef->split)
- _tuiHandleXDBLayout (layoutDef);
-
- return;
-} /* _tuiToggleLayout_command */
-
-
-static void
-#ifdef __STDC__
-_tuiToggleSplitLayout_command (
- char *arg,
- int fromTTY)
-#else
-_tuiToggleSplitLayout_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vToggleSplitLayout_command, arg, fromTTY);
-}
-
-static void
-#ifdef __STDC__
-_tui_vToggleSplitLayout_command (
- va_list args)
-#else
-_tui_vToggleSplitLayout_command (args)
- va_list args;
-#endif
-{
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
-
- layoutDef->split = (!layoutDef->split);
- _tuiHandleXDBLayout (layoutDef);
-
- return;
-} /* _tui_vToggleSplitLayout_command */
-
-
-static void
-#ifdef __STDC__
-_tuiLayout_command (
- char *arg,
- int fromTTY)
-#else
-_tuiLayout_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- if ((TuiStatus) tuiDo (
- (TuiOpaqueFuncPtr) tui_vSetLayoutTo, arg) != TUI_SUCCESS)
- warning ("Invalid layout specified.\n%s" LAYOUT_USAGE);
-
- return;
-} /* _tuiLayout_command */
-
-/*
-** _nextLayout().
-** Answer the previous layout to cycle to.
-*/
-static TuiLayoutType
-#ifdef __STDC__
-_nextLayout (void)
-#else
-_nextLayout ()
-#endif
-{
- TuiLayoutType newLayout;
-
- newLayout = currentLayout ();
- if (newLayout == UNDEFINED_LAYOUT)
- newLayout = SRC_COMMAND;
- else
- {
- newLayout++;
- if (newLayout == UNDEFINED_LAYOUT)
- newLayout = SRC_COMMAND;
- }
-
- return newLayout;
-} /* _nextLayout */
-
-
-/*
-** _prevLayout().
-** Answer the next layout to cycle to.
-*/
-static TuiLayoutType
-#ifdef __STDC__
-_prevLayout (void)
-#else
-_prevLayout ()
-#endif
-{
- TuiLayoutType newLayout;
-
- newLayout = currentLayout ();
- if (newLayout == SRC_COMMAND)
- newLayout = DISASSEM_DATA_COMMAND;
- else
- {
- newLayout--;
- if (newLayout == UNDEFINED_LAYOUT)
- newLayout = DISASSEM_DATA_COMMAND;
- }
-
- return newLayout;
-} /* _prevLayout */
-
-
-
-/*
-** _makeCommandWindow().
-*/
-static void
-#ifdef __STDC__
-_makeCommandWindow (
- TuiWinInfoPtr * winInfoPtr,
- int height,
- int originY)
-#else
-_makeCommandWindow (winInfoPtr, height, originY)
- TuiWinInfoPtr *winInfoPtr;
- int height;
- int originY;
-#endif
-{
- _initAndMakeWin ((Opaque *) winInfoPtr,
- CMD_WIN,
- height,
- termWidth (),
- 0,
- originY,
- DONT_BOX_WINDOW);
-
- (*winInfoPtr)->canHighlight = FALSE;
-
- return;
-} /* _makeCommandWindow */
-
-
-/*
-** _makeSourceWindow().
-*/
-static void
-#ifdef __STDC__
-_makeSourceWindow (
- TuiWinInfoPtr * winInfoPtr,
- int height,
- int originY)
-#else
-_makeSourceWindow (winInfoPtr, height, originY)
- TuiWinInfoPtr *winInfoPtr;
- int height;
- int originY;
-#endif
-{
- _makeSourceOrDisassemWindow (winInfoPtr, SRC_WIN, height, originY);
-
- return;
-} /* _makeSourceWindow */
-
-
-/*
-** _makeDisassemWindow().
-*/
-static void
-#ifdef __STDC__
-_makeDisassemWindow (
- TuiWinInfoPtr * winInfoPtr,
- int height,
- int originY)
-#else
-_makeDisassemWindow (winInfoPtr, height, originY)
- TuiWinInfoPtr *winInfoPtr;
- int height;
- int originY;
-#endif
-{
- _makeSourceOrDisassemWindow (winInfoPtr, DISASSEM_WIN, height, originY);
-
- return;
-} /* _makeDisassemWindow */
-
-
-/*
-** _makeDataWindow().
-*/
-static void
-#ifdef __STDC__
-_makeDataWindow (
- TuiWinInfoPtr * winInfoPtr,
- int height,
- int originY)
-#else
-_makeDataWindow (winInfoPtr, height, originY)
- TuiWinInfoPtr *winInfoPtr;
- int height;
- int originY;
-#endif
-{
- _initAndMakeWin ((Opaque *) winInfoPtr,
- DATA_WIN,
- height,
- termWidth (),
- 0,
- originY,
- BOX_WINDOW);
-
- return;
-} /* _makeDataWindow */
-
-
-
-/*
-** _showSourceCommand().
-** Show the Source/Command layout
-*/
-static void
-#ifdef __STDC__
-_showSourceCommand (void)
-#else
-_showSourceCommand ()
-#endif
-{
- _showSourceOrDisassemAndCommand (SRC_COMMAND);
-
- return;
-} /* _showSourceCommand */
-
-
-/*
-** _showDisassemCommand().
-** Show the Dissassem/Command layout
-*/
-static void
-#ifdef __STDC__
-_showDisassemCommand (void)
-#else
-_showDisassemCommand ()
-#endif
-{
- _showSourceOrDisassemAndCommand (DISASSEM_COMMAND);
-
- return;
-} /* _showDisassemCommand */
-
-
-/*
-** _showSourceDisassemCommand().
-** Show the Source/Disassem/Command layout
-*/
-static void
-#ifdef __STDC__
-_showSourceDisassemCommand (void)
-#else
-_showSourceDisassemCommand ()
-#endif
-{
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-
- if (currentLayout () != SRC_DISASSEM_COMMAND)
- {
- int cmdHeight, srcHeight, asmHeight;
-
- if (m_winPtrNotNull (cmdWin))
- cmdHeight = cmdWin->generic.height;
- else
- cmdHeight = termHeight () / 3;
-
- srcHeight = (termHeight () - cmdHeight) / 2;
- asmHeight = termHeight () - (srcHeight + cmdHeight);
-
- if (m_winPtrIsNull (srcWin))
- _makeSourceWindow (&srcWin, srcHeight, 0);
- else
- {
- _initGenWinInfo (&srcWin->generic,
- srcWin->generic.type,
- srcHeight,
- srcWin->generic.width,
- srcWin->detail.sourceInfo.executionInfo->width,
- 0);
- srcWin->canHighlight = TRUE;
- _initGenWinInfo (srcWin->detail.sourceInfo.executionInfo,
- EXEC_INFO_WIN,
- srcHeight,
- 3,
- 0,
- 0);
- m_beVisible (srcWin);
- m_beVisible (srcWin->detail.sourceInfo.executionInfo);
- srcWin->detail.sourceInfo.hasLocator = FALSE;;
- }
- if (m_winPtrNotNull (srcWin))
- {
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-
- tuiShowSourceContent (srcWin);
- if (m_winPtrIsNull (disassemWin))
- {
- _makeDisassemWindow (&disassemWin, asmHeight, srcHeight - 1);
- _initAndMakeWin ((Opaque *) & locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- termWidth (),
- 0,
- (srcHeight + asmHeight) - 1,
- DONT_BOX_WINDOW);
- }
- else
- {
- _initGenWinInfo (locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- termWidth (),
- 0,
- (srcHeight + asmHeight) - 1);
- disassemWin->detail.sourceInfo.hasLocator = TRUE;
- _initGenWinInfo (
- &disassemWin->generic,
- disassemWin->generic.type,
- asmHeight,
- disassemWin->generic.width,
- disassemWin->detail.sourceInfo.executionInfo->width,
- srcHeight - 1);
- _initGenWinInfo (disassemWin->detail.sourceInfo.executionInfo,
- EXEC_INFO_WIN,
- asmHeight,
- 3,
- 0,
- srcHeight - 1);
- disassemWin->canHighlight = TRUE;
- m_beVisible (disassemWin);
- m_beVisible (disassemWin->detail.sourceInfo.executionInfo);
- }
- if (m_winPtrNotNull (disassemWin))
- {
- srcWin->detail.sourceInfo.hasLocator = FALSE;
- disassemWin->detail.sourceInfo.hasLocator = TRUE;
- m_beVisible (locator);
- tuiShowLocatorContent ();
- tuiShowSourceContent (disassemWin);
-
- if (m_winPtrIsNull (cmdWin))
- _makeCommandWindow (&cmdWin,
- cmdHeight,
- termHeight () - cmdHeight);
- else
- {
- _initGenWinInfo (&cmdWin->generic,
- cmdWin->generic.type,
- cmdWin->generic.height,
- cmdWin->generic.width,
- 0,
- cmdWin->generic.origin.y);
- cmdWin->canHighlight = FALSE;
- m_beVisible (cmdWin);
- }
- if (m_winPtrNotNull (cmdWin))
- tuiRefreshWin (&cmdWin->generic);
- }
- }
- setCurrentLayoutTo (SRC_DISASSEM_COMMAND);
- }
-
- return;
-} /* _showSourceDisassemCommand */
-
-
-/*
-** _showData().
-** Show the Source/Data/Command or the Dissassembly/Data/Command layout
-*/
-static void
-#ifdef __STDC__
-_showData (
- TuiLayoutType newLayout)
-#else
-_showData (newLayout)
- TuiLayoutType newLayout;
-#endif
-{
- int totalHeight = (termHeight () - cmdWin->generic.height);
- int srcHeight, dataHeight;
- TuiWinType winType;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-
-
- dataHeight = totalHeight / 2;
- srcHeight = totalHeight - dataHeight;
- m_allBeInvisible ();
- m_beInvisible (locator);
- _makeDataWindow (&dataWin, dataHeight, 0);
- dataWin->canHighlight = TRUE;
- if (newLayout == SRC_DATA_COMMAND)
- winType = SRC_WIN;
- else
- winType = DISASSEM_WIN;
- if (m_winPtrIsNull (winList[winType]))
- {
- if (winType == SRC_WIN)
- _makeSourceWindow (&winList[winType], srcHeight, dataHeight - 1);
- else
- _makeDisassemWindow (&winList[winType], srcHeight, dataHeight - 1);
- _initAndMakeWin ((Opaque *) & locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- termWidth (),
- 0,
- totalHeight - 1,
- DONT_BOX_WINDOW);
- }
- else
- {
- _initGenWinInfo (&winList[winType]->generic,
- winList[winType]->generic.type,
- srcHeight,
- winList[winType]->generic.width,
- winList[winType]->detail.sourceInfo.executionInfo->width,
- dataHeight - 1);
- _initGenWinInfo (winList[winType]->detail.sourceInfo.executionInfo,
- EXEC_INFO_WIN,
- srcHeight,
- 3,
- 0,
- dataHeight - 1);
- m_beVisible (winList[winType]);
- m_beVisible (winList[winType]->detail.sourceInfo.executionInfo);
- _initGenWinInfo (locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- termWidth (),
- 0,
- totalHeight - 1);
- }
- winList[winType]->detail.sourceInfo.hasLocator = TRUE;
- m_beVisible (locator);
- tuiShowLocatorContent ();
- addToSourceWindows (winList[winType]);
- setCurrentLayoutTo (newLayout);
-
- return;
-} /* _showData */
-
-/*
-** _initGenWinInfo().
-*/
-static void
-#ifdef __STDC__
-_initGenWinInfo (
- TuiGenWinInfoPtr winInfo,
- TuiWinType type,
- int height,
- int width,
- int originX,
- int originY)
-#else
-_initGenWinInfo (winInfo, type, height, width, originX, originY)
- TuiGenWinInfoPtr winInfo;
- TuiWinType type;
- int height;
- int width;
- int originX;
- int originY;
-#endif
-{
- int h = height;
-
- winInfo->type = type;
- winInfo->width = width;
- winInfo->height = h;
- if (h > 1)
- {
- winInfo->viewportHeight = h - 1;
- if (winInfo->type != CMD_WIN)
- winInfo->viewportHeight--;
- }
- else
- winInfo->viewportHeight = 1;
- winInfo->origin.x = originX;
- winInfo->origin.y = originY;
-
- return;
-} /* _initGenWinInfo */
-
-/*
-** _initAndMakeWin().
-*/
-static void
-#ifdef __STDC__
-_initAndMakeWin (
- Opaque * winInfoPtr,
- TuiWinType winType,
- int height,
- int width,
- int originX,
- int originY,
- int boxIt)
-#else
-_initAndMakeWin (winInfoPtr, winType, height, width, originX, originY, boxIt)
- Opaque *winInfoPtr;
- TuiWinType winType;
- int height;
- int width;
- int originX;
- int originY;
- int boxIt;
-#endif
-{
- Opaque opaqueWinInfo = *winInfoPtr;
- TuiGenWinInfoPtr generic;
-
- if (opaqueWinInfo == (Opaque) NULL)
- {
- if (m_winIsAuxillary (winType))
- opaqueWinInfo = (Opaque) allocGenericWinInfo ();
- else
- opaqueWinInfo = (Opaque) allocWinInfo (winType);
- }
- if (m_winIsAuxillary (winType))
- generic = (TuiGenWinInfoPtr) opaqueWinInfo;
- else
- generic = &((TuiWinInfoPtr) opaqueWinInfo)->generic;
-
- if (opaqueWinInfo != (Opaque) NULL)
- {
- _initGenWinInfo (generic, winType, height, width, originX, originY);
- if (!m_winIsAuxillary (winType))
- {
- if (generic->type == CMD_WIN)
- ((TuiWinInfoPtr) opaqueWinInfo)->canHighlight = FALSE;
- else
- ((TuiWinInfoPtr) opaqueWinInfo)->canHighlight = TRUE;
- }
- makeWindow (generic, boxIt);
- if (winType == LOCATOR_WIN)
- tuiClearLocatorDisplay ();
- echo ();
- }
- *winInfoPtr = opaqueWinInfo;
-
- return;
-} /* _initAndMakeWin */
-
-
-/*
-** _makeSourceOrDisassemWindow().
-*/
-static void
-#ifdef __STDC__
-_makeSourceOrDisassemWindow (
- TuiWinInfoPtr * winInfoPtr,
- TuiWinType type,
- int height,
- int originY)
-#else
-_makeSourceOrDisassemWindow (winInfoPtr, type, height, originY)
- TuiWinInfoPtr *winInfoPtr;
- TuiWinType type;
- int height;
- int originY;
-#endif
-{
- TuiGenWinInfoPtr executionInfo = (TuiGenWinInfoPtr) NULL;
-
- /*
- ** Create the exeuction info window.
- */
- if (type == SRC_WIN)
- executionInfo = sourceExecInfoWinPtr ();
- else
- executionInfo = disassemExecInfoWinPtr ();
- _initAndMakeWin ((Opaque *) & executionInfo,
- EXEC_INFO_WIN,
- height,
- 3,
- 0,
- originY,
- DONT_BOX_WINDOW);
- /*
- ** Now create the source window.
- */
- _initAndMakeWin ((Opaque *) winInfoPtr,
- type,
- height,
- termWidth () - executionInfo->width,
- executionInfo->width,
- originY,
- BOX_WINDOW);
-
- (*winInfoPtr)->detail.sourceInfo.executionInfo = executionInfo;
-
- return;
-} /* _makeSourceOrDisassemWindow */
-
-
-/*
-** _showSourceOrDisassemAndCommand().
-** Show the Source/Command or the Disassem layout
-*/
-static void
-#ifdef __STDC__
-_showSourceOrDisassemAndCommand (
- TuiLayoutType layoutType)
-#else
-_showSourceOrDisassemAndCommand (layoutType)
- TuiLayoutType layoutType;
-#endif
-{
- if (currentLayout () != layoutType)
- {
- TuiWinInfoPtr *winInfoPtr;
- int areaLeft;
- int srcHeight, cmdHeight;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-
- if (m_winPtrNotNull (cmdWin))
- cmdHeight = cmdWin->generic.height;
- else
- cmdHeight = termHeight () / 3;
- srcHeight = termHeight () - cmdHeight;
-
-
- if (layoutType == SRC_COMMAND)
- winInfoPtr = &srcWin;
- else
- winInfoPtr = &disassemWin;
-
- if (m_winPtrIsNull (*winInfoPtr))
- {
- if (layoutType == SRC_COMMAND)
- _makeSourceWindow (winInfoPtr, srcHeight - 1, 0);
- else
- _makeDisassemWindow (winInfoPtr, srcHeight - 1, 0);
- _initAndMakeWin ((Opaque *) & locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- termWidth (),
- 0,
- srcHeight - 1,
- DONT_BOX_WINDOW);
- }
- else
- {
- _initGenWinInfo (locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- termWidth (),
- 0,
- srcHeight - 1);
- (*winInfoPtr)->detail.sourceInfo.hasLocator = TRUE;
- _initGenWinInfo (
- &(*winInfoPtr)->generic,
- (*winInfoPtr)->generic.type,
- srcHeight - 1,
- (*winInfoPtr)->generic.width,
- (*winInfoPtr)->detail.sourceInfo.executionInfo->width,
- 0);
- _initGenWinInfo ((*winInfoPtr)->detail.sourceInfo.executionInfo,
- EXEC_INFO_WIN,
- srcHeight - 1,
- 3,
- 0,
- 0);
- (*winInfoPtr)->canHighlight = TRUE;
- m_beVisible (*winInfoPtr);
- m_beVisible ((*winInfoPtr)->detail.sourceInfo.executionInfo);
- }
- if (m_winPtrNotNull (*winInfoPtr))
- {
- (*winInfoPtr)->detail.sourceInfo.hasLocator = TRUE;
- m_beVisible (locator);
- tuiShowLocatorContent ();
- tuiShowSourceContent (*winInfoPtr);
-
- if (m_winPtrIsNull (cmdWin))
- {
- _makeCommandWindow (&cmdWin, cmdHeight, srcHeight);
- tuiRefreshWin (&cmdWin->generic);
- }
- else
- {
- _initGenWinInfo (&cmdWin->generic,
- cmdWin->generic.type,
- cmdWin->generic.height,
- cmdWin->generic.width,
- cmdWin->generic.origin.x,
- cmdWin->generic.origin.y);
- cmdWin->canHighlight = FALSE;
- m_beVisible (cmdWin);
- }
- }
- setCurrentLayoutTo (layoutType);
- }
-
- return;
-} /* _showSourceOrDisassemAndCommand */
diff --git a/contrib/gdb/gdb/tui/tuiLayout.h b/contrib/gdb/gdb/tui/tuiLayout.h
deleted file mode 100644
index 57d8bbc90b6e..000000000000
--- a/contrib/gdb/gdb/tui/tuiLayout.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef TUI_LAYOUT_H
-#define TUI_LAYOUT_H
-
-extern void showLayout PARAMS ((TuiLayoutType));
-extern void tuiAddWinToLayout PARAMS ((TuiWinType));
-extern void tui_vAddWinToLayout PARAMS ((va_list));
-extern int tuiDefaultWinHeight
- PARAMS ((TuiWinType, TuiLayoutType));
-extern int tuiDefaultWinViewportHeight
- PARAMS ((TuiWinType, TuiLayoutType));
-extern TuiStatus tuiSetLayout
- PARAMS ((TuiLayoutType, TuiRegisterDisplayType));
-extern TuiStatus tui_vSetLayoutTo PARAMS ((va_list));
-
-#endif /*TUI_LAYOUT_H*/
diff --git a/contrib/gdb/gdb/tui/tuiRegs.c b/contrib/gdb/gdb/tui/tuiRegs.c
deleted file mode 100644
index b78b9bc873cd..000000000000
--- a/contrib/gdb/gdb/tui/tuiRegs.c
+++ /dev/null
@@ -1,1210 +0,0 @@
-
-/*
-** tuiRegs.c
-** This module contains functions to support display of registers
-** in the data window.
-*/
-
-
-#include "defs.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "gdbcmd.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "tuiLayout.h"
-#include "tuiWin.h"
-
-
-/*****************************************
-** LOCAL DEFINITIONS **
-******************************************/
-#define DOUBLE_FLOAT_LABEL_WIDTH 6
-#define DOUBLE_FLOAT_LABEL_FMT "%6.6s: "
-#define DOUBLE_FLOAT_VALUE_WIDTH 30 /*min of 16 but may be in sci notation */
-
-#define SINGLE_FLOAT_LABEL_WIDTH 6
-#define SINGLE_FLOAT_LABEL_FMT "%6.6s: "
-#define SINGLE_FLOAT_VALUE_WIDTH 25 /* min of 8 but may be in sci notation */
-
-#define SINGLE_LABEL_WIDTH 10
-#define SINGLE_LABEL_FMT "%10.10s: "
-#define SINGLE_VALUE_WIDTH 14/* minimum of 8 but may be in sci notation */
-
-/* In the code HP gave Cygnus, this was actually a function call to a
- PA-specific function, which was supposed to determine whether the
- target was a 64-bit or 32-bit processor. However, the 64-bit
- support wasn't complete, so we didn't merge that in, so we leave
- this here as a stub. */
-#define IS_64BIT 0
-
-/*****************************************
-** STATIC DATA **
-******************************************/
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS **
-******************************************/
-static TuiStatus _tuiSetRegsContent
- PARAMS ((int, int, struct frame_info *,
- TuiRegisterDisplayType, int));
-static char *_tuiRegisterName PARAMS ((int));
-static TuiStatus _tuiGetRegisterRawValue
- PARAMS ((int, char *, struct frame_info *));
-static void _tuiSetRegisterElement
- PARAMS ((int, struct frame_info *,
- TuiDataElementPtr, int));
-static void _tuiDisplayRegister
- PARAMS ((int, TuiGenWinInfoPtr, enum precision_type));
-static void _tuiRegisterFormat
- PARAMS ((char *, int, int, TuiDataElementPtr,
- enum precision_type));
-static TuiStatus _tuiSetGeneralRegsContent PARAMS ((int));
-static TuiStatus _tuiSetSpecialRegsContent PARAMS ((int));
-static TuiStatus _tuiSetGeneralAndSpecialRegsContent PARAMS ((int));
-static TuiStatus _tuiSetFloatRegsContent PARAMS ((TuiRegisterDisplayType, int));
-static int _tuiRegValueHasChanged
- PARAMS ((TuiDataElementPtr, struct frame_info *,
- char *));
-static void _tuiShowFloat_command PARAMS ((char *, int));
-static void _tuiShowGeneral_command PARAMS ((char *, int));
-static void _tuiShowSpecial_command PARAMS ((char *, int));
-static void _tui_vShowRegisters_commandSupport PARAMS ((va_list));
-static void _tuiToggleFloatRegs_command PARAMS ((char *, int));
-static void _tuiScrollRegsForward_command PARAMS ((char *, int));
-static void _tuiScrollRegsBackward_command PARAMS ((char *, int));
-static void _tui_vShowRegisters_commandSupport PARAMS ((va_list));
-
-
-
-/*****************************************
-** PUBLIC FUNCTIONS **
-******************************************/
-
-/*
-** tuiLastRegsLineNo()
-** Answer the number of the last line in the regs display.
-** If there are no registers (-1) is returned.
-*/
-int
-#ifdef __STDC__
-tuiLastRegsLineNo (void)
-#else
-tuiLastRegsLineNo ()
-#endif
-{
- register int numLines = (-1);
-
- if (dataWin->detail.dataDisplayInfo.regsContentCount > 0)
- {
- numLines = (dataWin->detail.dataDisplayInfo.regsContentCount /
- dataWin->detail.dataDisplayInfo.regsColumnCount);
- if (dataWin->detail.dataDisplayInfo.regsContentCount %
- dataWin->detail.dataDisplayInfo.regsColumnCount)
- numLines++;
- }
- return numLines;
-} /* tuiLastRegsLineNo */
-
-
-/*
-** tuiLineFromRegElementNo()
-** Answer the line number that the register element at elementNo is
-** on. If elementNo is greater than the number of register elements
-** there are, -1 is returned.
-*/
-int
-#ifdef __STDC__
-tuiLineFromRegElementNo (
- int elementNo)
-#else
-tuiLineFromRegElementNo (elementNo)
- int elementNo;
-#endif
-{
- if (elementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
- {
- int i, line = (-1);
-
- i = 1;
- while (line == (-1))
- {
- if (elementNo <
- (dataWin->detail.dataDisplayInfo.regsColumnCount * i))
- line = i - 1;
- else
- i++;
- }
-
- return line;
- }
- else
- return (-1);
-} /* tuiLineFromRegElementNo */
-
-
-/*
-** tuiFirstRegElementNoInLine()
-** Answer the index of the first element in lineNo. If lineNo is
-** past the register area (-1) is returned.
-*/
-int
-#ifdef __STDC__
-tuiFirstRegElementNoInLine (
- int lineNo)
-#else
-tuiFirstRegElementNoInLine (lineNo)
- int lineNo;
-#endif
-{
- if ((lineNo * dataWin->detail.dataDisplayInfo.regsColumnCount)
- <= dataWin->detail.dataDisplayInfo.regsContentCount)
- return ((lineNo + 1) *
- dataWin->detail.dataDisplayInfo.regsColumnCount) -
- dataWin->detail.dataDisplayInfo.regsColumnCount;
- else
- return (-1);
-} /* tuiFirstRegElementNoInLine */
-
-
-/*
-** tuiLastRegElementNoInLine()
-** Answer the index of the last element in lineNo. If lineNo is past
-** the register area (-1) is returned.
-*/
-int
-#ifdef __STDC__
-tuiLastRegElementNoInLine (
- int lineNo)
-#else
-tuiLastRegElementNoInLine (lineNo)
- int lineNo;
-#endif
-{
- if ((lineNo * dataWin->detail.dataDisplayInfo.regsColumnCount) <=
- dataWin->detail.dataDisplayInfo.regsContentCount)
- return ((lineNo + 1) *
- dataWin->detail.dataDisplayInfo.regsColumnCount) - 1;
- else
- return (-1);
-} /* tuiLastRegElementNoInLine */
-
-
-/*
-** tuiCalculateRegsColumnCount
-** Calculate the number of columns that should be used to display
-** the registers.
-*/
-int
-#ifdef __STDC__
-tuiCalculateRegsColumnCount (
- TuiRegisterDisplayType dpyType)
-#else
-tuiCalculateRegsColumnCount (dpyType)
- TuiRegisterDisplayType dpyType;
-#endif
-{
- int colCount, colWidth;
-
- if (IS_64BIT || dpyType == TUI_DFLOAT_REGS)
- colWidth = DOUBLE_FLOAT_VALUE_WIDTH + DOUBLE_FLOAT_LABEL_WIDTH;
- else
- {
- if (dpyType == TUI_SFLOAT_REGS)
- colWidth = SINGLE_FLOAT_VALUE_WIDTH + SINGLE_FLOAT_LABEL_WIDTH;
- else
- colWidth = SINGLE_VALUE_WIDTH + SINGLE_LABEL_WIDTH;
- }
- colCount = (dataWin->generic.width - 2) / colWidth;
-
- return colCount;
-} /* tuiCalulateRegsColumnCount */
-
-
-/*
-** tuiShowRegisters().
-** Show the registers int the data window as indicated by dpyType.
-** If there is any other registers being displayed, then they are
-** cleared. What registers are displayed is dependent upon dpyType.
-*/
-void
-#ifdef __STDC__
-tuiShowRegisters (
- TuiRegisterDisplayType dpyType)
-#else
-tuiShowRegisters (dpyType)
- TuiRegisterDisplayType dpyType;
-#endif
-{
- TuiStatus ret = TUI_FAILURE;
- int refreshValuesOnly = FALSE;
-
- /* Say that registers should be displayed, even if there is a problem */
- dataWin->detail.dataDisplayInfo.displayRegs = TRUE;
-
- if (target_has_registers)
- {
- refreshValuesOnly =
- (dpyType == dataWin->detail.dataDisplayInfo.regsDisplayType);
- switch (dpyType)
- {
- case TUI_GENERAL_REGS:
- ret = _tuiSetGeneralRegsContent (refreshValuesOnly);
- break;
- case TUI_SFLOAT_REGS:
- case TUI_DFLOAT_REGS:
- ret = _tuiSetFloatRegsContent (dpyType, refreshValuesOnly);
- break;
-
-/* could ifdef out */
-
- case TUI_SPECIAL_REGS:
- ret = _tuiSetSpecialRegsContent (refreshValuesOnly);
- break;
- case TUI_GENERAL_AND_SPECIAL_REGS:
- ret = _tuiSetGeneralAndSpecialRegsContent (refreshValuesOnly);
- break;
-
-/* end of potential if def */
-
- default:
- break;
- }
- }
- if (ret == TUI_FAILURE)
- {
- dataWin->detail.dataDisplayInfo.regsDisplayType = TUI_UNDEFINED_REGS;
- tuiEraseDataContent (NO_REGS_STRING);
- }
- else
- {
- int i;
-
- /* Clear all notation of changed values */
- for (i = 0; (i < dataWin->detail.dataDisplayInfo.regsContentCount); i++)
- {
- TuiGenWinInfoPtr dataItemWin;
-
- dataItemWin = &dataWin->detail.dataDisplayInfo.
- regsContent[i]->whichElement.dataWindow;
- (&((TuiWinElementPtr)
- dataItemWin->content[0])->whichElement.data)->highlight = FALSE;
- }
- dataWin->detail.dataDisplayInfo.regsDisplayType = dpyType;
- tuiDisplayAllData ();
- }
- (tuiLayoutDef ())->regsDisplayType = dpyType;
-
- return;
-} /* tuiShowRegisters */
-
-
-/*
-** tuiDisplayRegistersFrom().
-** Function to display the registers in the content from
-** 'startElementNo' until the end of the register content or the
-** end of the display height. No checking for displaying past
-** the end of the registers is done here.
-*/
-void
-#ifdef __STDC__
-tuiDisplayRegistersFrom (
- int startElementNo)
-#else
-tuiDisplayRegistersFrom (startElementNo)
- int startElementNo;
-#endif
-{
- if (dataWin->detail.dataDisplayInfo.regsContent != (TuiWinContent) NULL &&
- dataWin->detail.dataDisplayInfo.regsContentCount > 0)
- {
- register int i = startElementNo;
- int j, valueCharsWide, charsWide, itemWinWidth, curY, labelWidth;
- enum precision_type precision;
-
- precision = (dataWin->detail.dataDisplayInfo.regsDisplayType
- == TUI_DFLOAT_REGS) ?
- double_precision : unspecified_precision;
- if (IS_64BIT ||
- dataWin->detail.dataDisplayInfo.regsDisplayType == TUI_DFLOAT_REGS)
- {
- valueCharsWide = DOUBLE_FLOAT_VALUE_WIDTH;
- labelWidth = DOUBLE_FLOAT_LABEL_WIDTH;
- }
- else
- {
- if (dataWin->detail.dataDisplayInfo.regsDisplayType ==
- TUI_SFLOAT_REGS)
- {
- valueCharsWide = SINGLE_FLOAT_VALUE_WIDTH;
- labelWidth = SINGLE_FLOAT_LABEL_WIDTH;
- }
- else
- {
- valueCharsWide = SINGLE_VALUE_WIDTH;
- labelWidth = SINGLE_LABEL_WIDTH;
- }
- }
- itemWinWidth = valueCharsWide + labelWidth;
- /*
- ** Now create each data "sub" window, and write the display into it.
- */
- curY = 1;
- while (i < dataWin->detail.dataDisplayInfo.regsContentCount &&
- curY <= dataWin->generic.viewportHeight)
- {
- for (j = 0;
- (j < dataWin->detail.dataDisplayInfo.regsColumnCount &&
- i < dataWin->detail.dataDisplayInfo.regsContentCount); j++)
- {
- TuiGenWinInfoPtr dataItemWin;
- TuiDataElementPtr dataElementPtr;
-
- /* create the window if necessary*/
- dataItemWin = &dataWin->detail.dataDisplayInfo.
- regsContent[i]->whichElement.dataWindow;
- dataElementPtr = &((TuiWinElementPtr)
- dataItemWin->content[0])->whichElement.data;
- if (dataItemWin->handle == (WINDOW *) NULL)
- {
- dataItemWin->height = 1;
- dataItemWin->width = (precision == double_precision) ?
- itemWinWidth + 2 : itemWinWidth + 1;
- dataItemWin->origin.x = (itemWinWidth * j) + 1;
- dataItemWin->origin.y = curY;
- makeWindow (dataItemWin, DONT_BOX_WINDOW);
- }
- /*
- ** Get the printable representation of the register
- ** and display it
- */
- _tuiDisplayRegister (
- dataElementPtr->itemNo, dataItemWin, precision);
- i++; /* next register */
- }
- curY++; /* next row; */
- }
- }
-
- return;
-} /* tuiDisplayRegistersFrom */
-
-
-/*
-** tuiDisplayRegElementAtLine().
-** Function to display the registers in the content from
-** 'startElementNo' on 'startLineNo' until the end of the
-** register content or the end of the display height.
-** This function checks that we won't display off the end
-** of the register display.
-*/
-void
-#ifdef __STDC__
-tuiDisplayRegElementAtLine (
- int startElementNo,
- int startLineNo)
-#else
-tuiDisplayRegElementAtLine (startElementNo, startLineNo)
- int startElementNo;
- int startLineNo;
-#endif
-{
- if (dataWin->detail.dataDisplayInfo.regsContent != (TuiWinContent) NULL &&
- dataWin->detail.dataDisplayInfo.regsContentCount > 0)
- {
- register int elementNo = startElementNo;
-
- if (startElementNo != 0 && startLineNo != 0)
- {
- register int lastLineNo, firstLineOnLastPage;
-
- lastLineNo = tuiLastRegsLineNo ();
- firstLineOnLastPage = lastLineNo - (dataWin->generic.height - 2);
- if (firstLineOnLastPage < 0)
- firstLineOnLastPage = 0;
- /*
- ** If there is no other data displayed except registers,
- ** and the elementNo causes us to scroll past the end of the
- ** registers, adjust what element to really start the display at.
- */
- if (dataWin->detail.dataDisplayInfo.dataContentCount <= 0 &&
- startLineNo > firstLineOnLastPage)
- elementNo = tuiFirstRegElementNoInLine (firstLineOnLastPage);
- }
- tuiDisplayRegistersFrom (elementNo);
- }
-
- return;
-} /* tuiDisplayRegElementAtLine */
-
-
-
-/*
-** tuiDisplayRegistersFromLine().
-** Function to display the registers starting at line lineNo in
-** the data window. Answers the line number that the display
-** actually started from. If nothing is displayed (-1) is returned.
-*/
-int
-#ifdef __STDC__
-tuiDisplayRegistersFromLine (
- int lineNo,
- int forceDisplay)
-#else
-tuiDisplayRegistersFromLine (lineNo, forceDisplay)
- int lineNo;
- int forceDisplay;
-#endif
-{
- int elementNo;
-
- if (dataWin->detail.dataDisplayInfo.regsContentCount > 0)
- {
- int line, elementNo;
-
- if (lineNo < 0)
- line = 0;
- else if (forceDisplay)
- { /*
- ** If we must display regs (forceDisplay is true), then make
- ** sure that we don't display off the end of the registers.
- */
- if (lineNo >= tuiLastRegsLineNo ())
- {
- if ((line = tuiLineFromRegElementNo (
- dataWin->detail.dataDisplayInfo.regsContentCount - 1)) < 0)
- line = 0;
- }
- else
- line = lineNo;
- }
- else
- line = lineNo;
-
- elementNo = tuiFirstRegElementNoInLine (line);
- if (elementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
- tuiDisplayRegElementAtLine (elementNo, line);
- else
- line = (-1);
-
- return line;
- }
-
- return (-1); /* nothing was displayed */
-} /* tuiDisplayRegistersFromLine */
-
-
-/*
-** tuiCheckRegisterValues()
-** This function check all displayed registers for changes in
-** values, given a particular frame. If the values have changed,
-** they are updated with the new value and highlighted.
-*/
-void
-#ifdef __STDC__
-tuiCheckRegisterValues (
- struct frame_info *frame)
-#else
-tuiCheckRegisterValues (frame)
- struct frame_info *frame;
-#endif
-{
- if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
- {
- if (dataWin->detail.dataDisplayInfo.regsContentCount <= 0 &&
- dataWin->detail.dataDisplayInfo.displayRegs)
- tuiShowRegisters ((tuiLayoutDef ())->regsDisplayType);
- else
- {
- int i, j;
- char rawBuf[MAX_REGISTER_RAW_SIZE];
-
- for (i = 0;
- (i < dataWin->detail.dataDisplayInfo.regsContentCount); i++)
- {
- TuiDataElementPtr dataElementPtr;
- TuiGenWinInfoPtr dataItemWinPtr;
- int wasHilighted;
-
- dataItemWinPtr = &dataWin->detail.dataDisplayInfo.
- regsContent[i]->whichElement.dataWindow;
- dataElementPtr = &((TuiWinElementPtr)
- dataItemWinPtr->content[0])->whichElement.data;
- wasHilighted = dataElementPtr->highlight;
- dataElementPtr->highlight =
- _tuiRegValueHasChanged (dataElementPtr, frame, &rawBuf[0]);
- if (dataElementPtr->highlight)
- {
- for (j = 0; j < MAX_REGISTER_RAW_SIZE; j++)
- ((char *) dataElementPtr->value)[j] = rawBuf[j];
- _tuiDisplayRegister (
- dataElementPtr->itemNo,
- dataItemWinPtr,
- ((dataWin->detail.dataDisplayInfo.regsDisplayType ==
- TUI_DFLOAT_REGS) ?
- double_precision : unspecified_precision));
- }
- else if (wasHilighted)
- {
- dataElementPtr->highlight = FALSE;
- _tuiDisplayRegister (
- dataElementPtr->itemNo,
- dataItemWinPtr,
- ((dataWin->detail.dataDisplayInfo.regsDisplayType ==
- TUI_DFLOAT_REGS) ?
- double_precision : unspecified_precision));
- }
- }
- }
- }
- return;
-} /* tuiCheckRegisterValues */
-
-
-/*
-** tuiToggleFloatRegs().
-*/
-void
-#ifdef __STDC__
-tuiToggleFloatRegs (void)
-#else
-tuiToggleFloatRegs ()
-#endif
-{
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
-
- if (layoutDef->floatRegsDisplayType == TUI_SFLOAT_REGS)
- layoutDef->floatRegsDisplayType = TUI_DFLOAT_REGS;
- else
- layoutDef->floatRegsDisplayType = TUI_SFLOAT_REGS;
-
- if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible &&
- (dataWin->detail.dataDisplayInfo.regsDisplayType == TUI_SFLOAT_REGS ||
- dataWin->detail.dataDisplayInfo.regsDisplayType == TUI_DFLOAT_REGS))
- tuiShowRegisters (layoutDef->floatRegsDisplayType);
-
- return;
-} /* tuiToggleFloatRegs */
-
-
-void
-_initialize_tuiRegs ()
-{
- if (tui_version && xdb_commands)
- {
- add_com ("fr", class_tui, _tuiShowFloat_command,
- "Display only floating point registers\n");
- add_com ("gr", class_tui, _tuiShowGeneral_command,
- "Display only general registers\n");
- add_com ("sr", class_tui, _tuiShowSpecial_command,
- "Display only special registers\n");
- add_com ("+r", class_tui, _tuiScrollRegsForward_command,
- "Scroll the registers window forward\n");
- add_com ("-r", class_tui, _tuiScrollRegsBackward_command,
- "Scroll the register window backward\n");
- add_com ("tf", class_tui, _tuiToggleFloatRegs_command,
- "Toggle between single and double precision floating point registers.\n");
- add_cmd (TUI_FLOAT_REGS_NAME_LOWER,
- class_tui,
- _tuiToggleFloatRegs_command,
- "Toggle between single and double precision floating point \
-registers.\n",
- &togglelist);
- }
-
- return;
-} /* _initialize_tuiRegs */
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS **
-******************************************/
-
-
-/*
-** _tuiRegisterName().
-** Return the register name.
-*/
-static char *
-#ifdef __STDC__
-_tuiRegisterName (
- int regNum)
-#else
-_tuiRegisterName (regNum)
- int regNum;
-#endif
-{
- if (reg_names[regNum] != (char *) NULL && *(reg_names[regNum]) != (char) 0)
- return reg_names[regNum];
- else
- return ((char *) NULL);
-} /* tuiGetRegisterName */
-
-
-/*
-** _tuiRegisterFormat
-** Function to format the register name and value into a buffer,
-** suitable for printing or display
-*/
-static void
-#ifdef __STDC__
-_tuiRegisterFormat (
- char *buf,
- int bufLen,
- int regNum,
- TuiDataElementPtr dataElement,
- enum precision_type precision)
-#else
-_tuiRegisterFormat (buf, bufLen, regNum, dataElement, precision)
- char *buf;
- int bufLen;
- int regNum;
- TuiDataElementPtr dataElement;
- enum precision_type precision;
-#endif
-{
- char tmpBuf[15];
- char *fmt;
- GDB_FILE *stream;
-
- stream = gdb_file_init_astring(bufLen);
- pa_do_strcat_registers_info (regNum, 0, stream, precision);
- strcpy (buf, gdb_file_get_strbuf(stream));
- gdb_file_deallocate(&stream);
-
- return;
-} /* _tuiRegisterFormat */
-
-
-#define NUM_GENERAL_REGS 32
-/*
-** _tuiSetGeneralRegsContent().
-** Set the content of the data window to consist of the general registers.
-*/
-static TuiStatus
-#ifdef __STDC__
-_tuiSetGeneralRegsContent (
- int refreshValuesOnly)
-#else
-_tuiSetGeneralRegsContent (refreshValuesOnly)
- int refreshValuesOnly;
-#endif
-{
- return (_tuiSetRegsContent (0,
- NUM_GENERAL_REGS - 1,
- selected_frame,
- TUI_GENERAL_REGS,
- refreshValuesOnly));
-
-} /* _tuiSetGeneralRegsContent */
-
-
-#define START_SPECIAL_REGS PCOQ_HEAD_REGNUM
-/*
-** _tuiSetSpecialRegsContent().
-** Set the content of the data window to consist of the special registers.
-*/
-static TuiStatus
-#ifdef __STDC__
-_tuiSetSpecialRegsContent (
- int refreshValuesOnly)
-#else
-_tuiSetSpecialRegsContent (refreshValuesOnly)
- int refreshValuesOnly;
-#endif
-{
- TuiStatus ret = TUI_FAILURE;
- int i, endRegNum;
-
- endRegNum = FP0_REGNUM - 1;
-#if 0
- endRegNum = (-1);
- for (i = START_SPECIAL_REGS; (i < ARCH_NUM_REGS && endRegNum < 0); i++)
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
- endRegNum = i - 1;
-#endif
- ret = _tuiSetRegsContent (START_SPECIAL_REGS,
- endRegNum,
- selected_frame,
- TUI_SPECIAL_REGS,
- refreshValuesOnly);
-
- return ret;
-} /* _tuiSetSpecialRegsContent */
-
-
-/*
-** _tuiSetGeneralAndSpecialRegsContent().
-** Set the content of the data window to consist of the special registers.
-*/
-static TuiStatus
-#ifdef __STDC__
-_tuiSetGeneralAndSpecialRegsContent (
- int refreshValuesOnly)
-#else
-_tuiSetGeneralAndSpecialRegsContent (refreshValuesOnly)
- int refreshValuesOnly;
-#endif
-{
- TuiStatus ret = TUI_FAILURE;
- int i, endRegNum = (-1);
-
- endRegNum = FP0_REGNUM - 1;
-#if 0
- endRegNum = (-1);
- for (i = 0; (i < ARCH_NUM_REGS && endRegNum < 0); i++)
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
- endRegNum = i - 1;
-#endif
- ret = _tuiSetRegsContent (
- 0, endRegNum, selected_frame, TUI_SPECIAL_REGS, refreshValuesOnly);
-
- return ret;
-} /* _tuiSetGeneralAndSpecialRegsContent */
-
-/*
-** _tuiSetFloatRegsContent().
-** Set the content of the data window to consist of the float registers.
-*/
-static TuiStatus
-#ifdef __STDC__
-_tuiSetFloatRegsContent (
- TuiRegisterDisplayType dpyType,
- int refreshValuesOnly)
-#else
-_tuiSetFloatRegsContent (dpyType, refreshValuesOnly)
- TuiRegisterDisplayType dpyType;
- int refreshValuesOnly;
-#endif
-{
- TuiStatus ret = TUI_FAILURE;
- int i, startRegNum;
-
- startRegNum = FP0_REGNUM;
-#if 0
- startRegNum = (-1);
- for (i = ARCH_NUM_REGS - 1; (i >= 0 && startRegNum < 0); i--)
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) != TYPE_CODE_FLT)
- startRegNum = i + 1;
-#endif
- ret = _tuiSetRegsContent (startRegNum,
- ARCH_NUM_REGS - 1,
- selected_frame,
- dpyType,
- refreshValuesOnly);
-
- return ret;
-} /* _tuiSetFloatRegsContent */
-
-
-/*
-** _tuiRegValueHasChanged().
-** Answer TRUE if the register's value has changed, FALSE otherwise.
-** If TRUE, newValue is filled in with the new value.
-*/
-static int
-#ifdef __STDC__
-_tuiRegValueHasChanged (
- TuiDataElementPtr dataElement,
- struct frame_info *frame,
- char *newValue)
-#else
-_tuiRegValueHasChanged (dataElement, frame, newValue)
- TuiDataElementPtr dataElement;
- struct frame_info *frame;
- char *newValue;
-#endif
-{
- int hasChanged = FALSE;
-
- if (dataElement->itemNo != UNDEFINED_ITEM &&
- _tuiRegisterName (dataElement->itemNo) != (char *) NULL)
- {
- char rawBuf[MAX_REGISTER_RAW_SIZE];
- int i;
-
- if (_tuiGetRegisterRawValue (
- dataElement->itemNo, rawBuf, frame) == TUI_SUCCESS)
- {
- for (i = 0; (i < MAX_REGISTER_RAW_SIZE && !hasChanged); i++)
- hasChanged = (((char *) dataElement->value)[i] != rawBuf[i]);
- if (hasChanged && newValue != (char *) NULL)
- {
- for (i = 0; (i < MAX_REGISTER_RAW_SIZE); i++)
- newValue[i] = rawBuf[i];
- }
- }
- }
- return hasChanged;
-} /* _tuiRegValueHasChanged */
-
-
-
-/*
-** _tuiGetRegisterRawValue().
-** Get the register raw value. The raw value is returned in regValue.
-*/
-static TuiStatus
-#ifdef __STDC__
-_tuiGetRegisterRawValue (
- int regNum,
- char *regValue,
- struct frame_info *frame)
-#else
-_tuiGetRegisterRawValue (regNum, regValue, frame)
- int regNum;
- char *regValue;
- struct frame_info *frame;
-#endif
-{
- TuiStatus ret = TUI_FAILURE;
-
- if (target_has_registers)
- {
- read_relative_register_raw_bytes_for_frame (regNum, regValue, frame);
- ret = TUI_SUCCESS;
- }
-
- return ret;
-} /* _tuiGetRegisterRawValue */
-
-
-
-/*
-** _tuiSetRegisterElement().
-** Function to initialize a data element with the input and
-** the register value.
-*/
-static void
-#ifdef __STDC__
-_tuiSetRegisterElement (
- int regNum,
- struct frame_info *frame,
- TuiDataElementPtr dataElement,
- int refreshValueOnly)
-#else
-_tuiSetRegisterElement (regNum, frame, dataElement, refreshValueOnly)
- int regNum;
- struct frame_info *frame;
- TuiDataElementPtr dataElement;
- int refreshValueOnly;
-#endif
-{
- if (dataElement != (TuiDataElementPtr) NULL)
- {
- if (!refreshValueOnly)
- {
- dataElement->itemNo = regNum;
- dataElement->name = _tuiRegisterName (regNum);
- dataElement->highlight = FALSE;
- }
- if (dataElement->value == (Opaque) NULL)
- dataElement->value = (Opaque) xmalloc (MAX_REGISTER_RAW_SIZE);
- if (dataElement->value != (Opaque) NULL)
- _tuiGetRegisterRawValue (regNum, dataElement->value, frame);
- }
-
- return;
-} /* _tuiSetRegisterElement */
-
-
-/*
-** _tuiSetRegsContent().
-** Set the content of the data window to consist of the registers
-** numbered from startRegNum to endRegNum. Note that if
-** refreshValuesOnly is TRUE, startRegNum and endRegNum are ignored.
-*/
-static TuiStatus
-#ifdef __STDC__
-_tuiSetRegsContent (
- int startRegNum,
- int endRegNum,
- struct frame_info *frame,
- TuiRegisterDisplayType dpyType,
- int refreshValuesOnly)
-#else
-_tuiSetRegsContent (startRegNum, endRegNum, frame, dpyType, refreshValuesOnly)
- int startRegNum;
- int endRegNum;
- struct frame_info *frame;
- TuiRegisterDisplayType dpyType;
- int refreshValuesOnly;
-#endif
-{
- TuiStatus ret = TUI_FAILURE;
- int numRegs = endRegNum - startRegNum + 1;
- int allocatedHere = FALSE;
-
- if (dataWin->detail.dataDisplayInfo.regsContentCount > 0 &&
- !refreshValuesOnly)
- {
- freeDataContent (dataWin->detail.dataDisplayInfo.regsContent,
- dataWin->detail.dataDisplayInfo.regsContentCount);
- dataWin->detail.dataDisplayInfo.regsContentCount = 0;
- }
- if (dataWin->detail.dataDisplayInfo.regsContentCount <= 0)
- {
- dataWin->detail.dataDisplayInfo.regsContent =
- allocContent (numRegs, DATA_WIN);
- allocatedHere = TRUE;
- }
-
- if (dataWin->detail.dataDisplayInfo.regsContent != (TuiWinContent) NULL)
- {
- int i;
-
- if (!refreshValuesOnly || allocatedHere)
- {
- dataWin->generic.content = (OpaquePtr) NULL;
- dataWin->generic.contentSize = 0;
- addContentElements (&dataWin->generic, numRegs);
- dataWin->detail.dataDisplayInfo.regsContent =
- (TuiWinContent) dataWin->generic.content;
- dataWin->detail.dataDisplayInfo.regsContentCount = numRegs;
- }
- /*
- ** Now set the register names and values
- */
- for (i = startRegNum; (i <= endRegNum); i++)
- {
- TuiGenWinInfoPtr dataItemWin;
-
- dataItemWin = &dataWin->detail.dataDisplayInfo.
- regsContent[i - startRegNum]->whichElement.dataWindow;
- _tuiSetRegisterElement (
- i,
- frame,
- &((TuiWinElementPtr) dataItemWin->content[0])->whichElement.data,
- !allocatedHere && refreshValuesOnly);
- }
- dataWin->detail.dataDisplayInfo.regsColumnCount =
- tuiCalculateRegsColumnCount (dpyType);
-#ifdef LATER
- if (dataWin->detail.dataDisplayInfo.dataContentCount > 0)
- {
- /* delete all the windows? */
- /* realloc content equal to dataContentCount + regsContentCount */
- /* append dataWin->detail.dataDisplayInfo.dataContent to content */
- }
-#endif
- dataWin->generic.contentSize =
- dataWin->detail.dataDisplayInfo.regsContentCount +
- dataWin->detail.dataDisplayInfo.dataContentCount;
- ret = TUI_SUCCESS;
- }
-
- return ret;
-} /* _tuiSetRegsContent */
-
-
-/*
-** _tuiDisplayRegister().
-** Function to display a register in a window. If hilite is TRUE,
-** than the value will be displayed in reverse video
-*/
-static void
-#ifdef __STDC__
-_tuiDisplayRegister (
- int regNum,
- TuiGenWinInfoPtr winInfo, /* the data item window */
- enum precision_type precision)
-#else
-_tuiDisplayRegister (regNum, winInfo, precision)
- int regNum;
- TuiGenWinInfoPtr winInfo; /* the data item window */
- enum precision_type precision;
-#endif
-{
- if (winInfo->handle != (WINDOW *) NULL)
- {
- char buf[100];
- int valueCharsWide, labelWidth;
- TuiDataElementPtr dataElementPtr = &((TuiWinContent)
- winInfo->content)[0]->whichElement.data;
-
- if (IS_64BIT ||
- dataWin->detail.dataDisplayInfo.regsDisplayType == TUI_DFLOAT_REGS)
- {
- valueCharsWide = DOUBLE_FLOAT_VALUE_WIDTH;
- labelWidth = DOUBLE_FLOAT_LABEL_WIDTH;
- }
- else
- {
- if (dataWin->detail.dataDisplayInfo.regsDisplayType ==
- TUI_SFLOAT_REGS)
- {
- valueCharsWide = SINGLE_FLOAT_VALUE_WIDTH;
- labelWidth = SINGLE_FLOAT_LABEL_WIDTH;
- }
- else
- {
- valueCharsWide = SINGLE_VALUE_WIDTH;
- labelWidth = SINGLE_LABEL_WIDTH;
- }
- }
-
- buf[0] = (char) 0;
- _tuiRegisterFormat (buf,
- valueCharsWide + labelWidth,
- regNum,
- dataElementPtr,
- precision);
- if (dataElementPtr->highlight)
- wstandout (winInfo->handle);
-
- werase (winInfo->handle);
- wmove (winInfo->handle, 0, 0);
- waddstr (winInfo->handle, buf);
-
- if (dataElementPtr->highlight)
- wstandend (winInfo->handle);
- tuiRefreshWin (winInfo);
- }
- return;
-} /* _tuiDisplayRegister */
-
-
-static void
-#ifdef __STDC__
-_tui_vShowRegisters_commandSupport (
- va_list args)
-#else
-_tui_vShowRegisters_commandSupport (args)
- va_list args;
-#endif
-{
- TuiRegisterDisplayType dpyType = va_arg (args, TuiRegisterDisplayType);
-
- if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
- { /* Data window already displayed, show the registers */
- if (dataWin->detail.dataDisplayInfo.regsDisplayType != dpyType)
- tuiShowRegisters (dpyType);
- }
- else
- (tuiLayoutDef ())->regsDisplayType = dpyType;
-
- return;
-} /* _tui_vShowRegisters_commandSupport */
-
-
-static void
-#ifdef __STDC__
-_tuiShowFloat_command (
- char *arg,
- int fromTTY)
-#else
-_tuiShowFloat_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- if (m_winPtrIsNull (dataWin) || !dataWin->generic.isVisible ||
- (dataWin->detail.dataDisplayInfo.regsDisplayType != TUI_SFLOAT_REGS &&
- dataWin->detail.dataDisplayInfo.regsDisplayType != TUI_DFLOAT_REGS))
- tuiDo ((TuiOpaqueFuncPtr) _tui_vShowRegisters_commandSupport,
- (tuiLayoutDef ())->floatRegsDisplayType);
-
- return;
-} /* _tuiShowFloat_command */
-
-
-static void
-#ifdef __STDC__
-_tuiShowGeneral_command (
- char *arg,
- int fromTTY)
-#else
-_tuiShowGeneral_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vShowRegisters_commandSupport,
- TUI_GENERAL_REGS);
-
- return;
-} /* _tuiShowGeneral_command */
-
-
-static void
-#ifdef __STDC__
-_tuiShowSpecial_command (
- char *arg,
- int fromTTY)
-#else
-_tuiShowSpecial_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vShowRegisters_commandSupport,
- TUI_SPECIAL_REGS);
-
- return;
-} /* _tuiShowSpecial_command */
-
-
-static void
-#ifdef __STDC__
-_tuiToggleFloatRegs_command (
- char *arg,
- int fromTTY)
-#else
-_tuiToggleFloatRegs_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
- tuiDo ((TuiOpaqueFuncPtr) tuiToggleFloatRegs);
- else
- {
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
-
- if (layoutDef->floatRegsDisplayType == TUI_SFLOAT_REGS)
- layoutDef->floatRegsDisplayType = TUI_DFLOAT_REGS;
- else
- layoutDef->floatRegsDisplayType = TUI_SFLOAT_REGS;
- }
-
-
- return;
-} /* _tuiToggleFloatRegs_command */
-
-
-static void
-#ifdef __STDC__
-_tuiScrollRegsForward_command (
- char *arg,
- int fromTTY)
-#else
-_tuiScrollRegsForward_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll, FORWARD_SCROLL, dataWin, 1);
-
- return;
-} /* _tuiScrollRegsForward_command */
-
-
-static void
-#ifdef __STDC__
-_tuiScrollRegsBackward_command (
- char *arg,
- int fromTTY)
-#else
-_tuiScrollRegsBackward_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll, BACKWARD_SCROLL, dataWin, 1);
-
- return;
-} /* _tuiScrollRegsBackward_command */
diff --git a/contrib/gdb/gdb/tui/tuiRegs.h b/contrib/gdb/gdb/tui/tuiRegs.h
deleted file mode 100644
index 4a777ec9a9b6..000000000000
--- a/contrib/gdb/gdb/tui/tuiRegs.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef _TUI_REGS_H
-#define _TUI_REGS_H
-/*
-** This header file supports the display of registers in the data window.
-*/
-
-/*****************************************
-** TYPE DEFINITIONS **
-******************************************/
-
-
-
-/*****************************************
-** PUBLIC FUNCTION EXTERNAL DECLS **
-******************************************/
-extern void tuiCheckRegisterValues PARAMS ((struct frame_info *));
-extern void tuiShowRegisters PARAMS ((TuiRegisterDisplayType));
-extern void tuiDisplayRegistersFrom PARAMS ((int));
-extern int tuiDisplayRegistersFromLine PARAMS ((int, int));
-extern int tuiLastRegsLineNo PARAMS ((void));
-extern int tuiFirstRegElementInLine PARAMS ((int));
-extern int tuiLastRegElementInLine PARAMS ((int));
-extern int tuiLineFromRegElementNo PARAMS ((int));
-extern void tuiToggleFloatRegs PARAMS ((void));
-extern int tuiCalculateRegsColumnCount PARAMS ((TuiRegisterDisplayType));
-
-
-#endif /*_TUI_REGS_H*/
diff --git a/contrib/gdb/gdb/tui/tuiSource.c b/contrib/gdb/gdb/tui/tuiSource.c
deleted file mode 100644
index e0259d014b43..000000000000
--- a/contrib/gdb/gdb/tui/tuiSource.c
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
-** tuiSource.c
-** This module contains functions for displaying source in the source window
-*/
-
-#include "defs.h"
-#include <ctype.h>
-#include "symtab.h"
-#include "frame.h"
-#include "breakpoint.h"
-
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiStack.h"
-#include "tuiSourceWin.h"
-#include "tuiSource.h"
-
-
-/*****************************************
-** EXTERNAL FUNCTION DECLS **
-******************************************/
-
-extern int open_source_file PARAMS ((struct symtab *));
-extern void find_source_lines PARAMS ((struct symtab *, int));
-
-/*****************************************
-** EXTERNAL DATA DECLS **
-******************************************/
-extern int current_source_line;
-extern struct symtab *current_source_symtab;
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS **
-******************************************/
-
-static struct breakpoint *_hasBreak PARAMS ((char *, int));
-
-
-/*****************************************
-** STATIC LOCAL DATA **
-******************************************/
-
-
-/*****************************************
-** PUBLIC FUNCTIONS **
-******************************************/
-
-/*********************************
-** SOURCE/DISASSEM FUNCTIONS **
-*********************************/
-
-/*
-** tuiSetSourceContent().
-** Function to display source in the source window.
-*/
-TuiStatus
-#ifdef __STDC__
-tuiSetSourceContent (
- struct symtab *s,
- int lineNo,
- int noerror)
-#else
-tuiSetSourceContent (s, lineNo, noerror)
- struct symtab *s;
- int lineNo;
- int noerror;
-#endif
-{
- TuiStatus ret = TUI_FAILURE;
-
- if (s != (struct symtab *) NULL && s->filename != (char *) NULL)
- {
- register FILE *stream;
- register int i, desc, c, lineWidth, nlines;
- register char *srcLine;
-
- if ((ret = tuiAllocSourceBuffer (srcWin)) == TUI_SUCCESS)
- {
- lineWidth = srcWin->generic.width - 1;
- /*
- ** Take hilite (window border) into account, when calculating
- ** the number of lines
- */
- nlines = (lineNo + (srcWin->generic.height - 2)) - lineNo;
- desc = open_source_file (s);
- if (desc < 0)
- {
- if (!noerror)
- {
- char *name = alloca (strlen (s->filename) + 100);
- sprintf (name, "%s:%d", s->filename, lineNo);
- print_sys_errmsg (name, errno);
- }
- ret = TUI_FAILURE;
- }
- else
- {
- if (s->line_charpos == 0)
- find_source_lines (s, desc);
-
- if (lineNo < 1 || lineNo > s->nlines)
- {
- close (desc);
- printf_unfiltered (
- "Line number %d out of range; %s has %d lines.\n",
- lineNo, s->filename, s->nlines);
- }
- else if (lseek (desc, s->line_charpos[lineNo - 1], 0) < 0)
- {
- close (desc);
- perror_with_name (s->filename);
- }
- else
- {
- register int offset, curLineNo, curLine, curLen, threshold;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- /*
- ** Determine the threshold for the length of the line
- ** and the offset to start the display
- */
- offset = srcWin->detail.sourceInfo.horizontalOffset;
- threshold = (lineWidth - 1) + offset;
- stream = fdopen (desc, FOPEN_RT);
- clearerr (stream);
- curLine = 0;
- curLineNo =
- srcWin->detail.sourceInfo.startLineOrAddr.lineNo = lineNo;
- if (offset > 0)
- srcLine = (char *) xmalloc (
- (threshold + 1) * sizeof (char));
- while (curLine < nlines)
- {
- TuiWinElementPtr element = (TuiWinElementPtr)
- srcWin->generic.content[curLine];
- struct breakpoint *bp;
-
- /* get the first character in the line */
- c = fgetc (stream);
-
- if (offset == 0)
- srcLine = ((TuiWinElementPtr)
- srcWin->generic.content[
- curLine])->whichElement.source.line;
- /* Init the line with the line number */
- sprintf (srcLine, "%-6d", curLineNo);
- curLen = strlen (srcLine);
- i = curLen -
- ((curLen / tuiDefaultTabLen ()) * tuiDefaultTabLen ());
- while (i < tuiDefaultTabLen ())
- {
- srcLine[curLen] = ' ';
- i++;
- curLen++;
- }
- srcLine[curLen] = (char) 0;
-
- /*
- ** Set whether element is the execution point and
- ** whether there is a break point on it.
- */
- element->whichElement.source.lineOrAddr.lineNo =
- curLineNo;
- element->whichElement.source.isExecPoint =
- (strcmp (((TuiWinElementPtr)
- locator->content[0])->whichElement.locator.fileName,
- s->filename) == 0
- && curLineNo == ((TuiWinElementPtr)
- locator->content[0])->whichElement.locator.lineNo);
- bp = _hasBreak (s->filename, curLineNo);
- element->whichElement.source.hasBreak =
- (bp != (struct breakpoint *) NULL &&
- (!element->whichElement.source.isExecPoint ||
- (bp->disposition != del || bp->hit_count <= 0)));
- if (c != EOF)
- {
- i = strlen (srcLine) - 1;
- do
- {
- if ((c != '\n') &&
- (c != '\r') && (++i < threshold))
- {
- if (c < 040 && c != '\t')
- {
- srcLine[i++] = '^';
- srcLine[i] = c + 0100;
- }
- else if (c == 0177)
- {
- srcLine[i++] = '^';
- srcLine[i] = '?';
- }
- else
- { /*
- ** Store the charcter in the line
- ** buffer. If it is a tab, then
- ** translate to the correct number of
- ** chars so we don't overwrite our
- ** buffer.
- */
- if (c == '\t')
- {
- int j, maxTabLen = tuiDefaultTabLen ();
-
- for (j = i - (
- (i / maxTabLen) * maxTabLen);
- ((j < maxTabLen) &&
- i < threshold);
- i++, j++)
- srcLine[i] = ' ';
- i--;
- }
- else
- srcLine[i] = c;
- }
- srcLine[i + 1] = 0;
- }
- else
- { /*
- ** if we have not reached EOL, then eat
- ** chars until we do
- */
- while (c != EOF && c != '\n' && c != '\r')
- c = fgetc (stream);
- }
- }
- while (c != EOF && c != '\n' && c != '\r' &&
- i < threshold && (c = fgetc (stream)));
- }
- /* Now copy the line taking the offset into account */
- if (strlen (srcLine) > offset)
- strcpy (((TuiWinElementPtr) srcWin->generic.content[
- curLine])->whichElement.source.line,
- &srcLine[offset]);
- else
- ((TuiWinElementPtr)
- srcWin->generic.content[
- curLine])->whichElement.source.line[0] = (char) 0;
- curLine++;
- curLineNo++;
- }
- if (offset > 0)
- tuiFree (srcLine);
- fclose (stream);
- srcWin->generic.contentSize = nlines;
- ret = TUI_SUCCESS;
- }
- }
- }
- }
- return ret;
-} /* tuiSetSourceContent */
-
-
-/* elz: this function sets the contents of the source window to empty
- except for a line in the middle with a warning message about the
- source not being available. This function is called by
- tuiEraseSourceContents, which in turn is invoked when the source files
- cannot be accessed*/
-
-void
-#ifdef __STDC__
-tuiSetSourceContentNil (
- TuiWinInfoPtr winInfo,
- char *warning_string)
-#else
-tuiSetSourceContentNil (winInfo, warning_string)
- TuiWinInfoPtr winInfo;
- char *warning_string;
-#endif
-{
- int lineWidth;
- int nLines;
- int curr_line = 0;
-
- lineWidth = winInfo->generic.width - 1;
- nLines = winInfo->generic.height - 2;
-
- /* set to empty each line in the window, except for the one
- which contains the message*/
- while (curr_line < winInfo->generic.contentSize)
- {
- /* set the information related to each displayed line
- to null: i.e. the line number is 0, there is no bp,
- it is not where the program is stopped */
-
- TuiWinElementPtr element =
- (TuiWinElementPtr) winInfo->generic.content[curr_line];
- element->whichElement.source.lineOrAddr.lineNo = 0;
- element->whichElement.source.isExecPoint = FALSE;
- element->whichElement.source.hasBreak = FALSE;
-
- /* set the contents of the line to blank*/
- element->whichElement.source.line[0] = (char) 0;
-
- /* if the current line is in the middle of the screen, then we want to
- display the 'no source available' message in it.
- Note: the 'weird' arithmetic with the line width and height comes from
- the function tuiEraseSourceContent. We need to keep the screen and the
- window's actual contents in synch */
-
- if (curr_line == (nLines / 2 + 1))
- {
- int i;
- int xpos;
- int warning_length = strlen (warning_string);
- char *srcLine;
-
- srcLine = element->whichElement.source.line;
-
- if (warning_length >= ((lineWidth - 1) / 2))
- xpos = 1;
- else
- xpos = (lineWidth - 1) / 2 - warning_length;
-
- for (i = 0; i < xpos; i++)
- srcLine[i] = ' ';
-
- sprintf (srcLine + i, "%s", warning_string);
-
- for (i = xpos + warning_length; i < lineWidth; i++)
- srcLine[i] = ' ';
-
- srcLine[i] = '\n';
-
- } /* end if */
-
- curr_line++;
-
- } /* end while*/
-
-} /*tuiSetSourceContentNil*/
-
-
-
-
-/*
-** tuiShowSource().
-** Function to display source in the source window. This function
-** initializes the horizontal scroll to 0.
-*/
-void
-#ifdef __STDC__
-tuiShowSource (
- struct symtab *s,
- Opaque line,
- int noerror)
-#else
-tuiShowSource (s, line, noerror)
- struct symtab *s;
- Opaque line;
- int noerror;
-#endif
-{
- srcWin->detail.sourceInfo.horizontalOffset = 0;
- m_tuiShowSourceAsIs (s, line, noerror);
-
- return;
-} /* tuiShowSource */
-
-
-/*
-** tuiSourceIsDisplayed().
-** Answer whether the source is currently displayed in the source window.
-*/
-int
-#ifdef __STDC__
-tuiSourceIsDisplayed (
- char *fname)
-#else
-tuiSourceIsDisplayed (fname)
- char *fname;
-#endif
-{
- return (srcWin->generic.contentInUse &&
- (strcmp (((TuiWinElementPtr) (locatorWinInfoPtr ())->
- content[0])->whichElement.locator.fileName, fname) == 0));
-} /* tuiSourceIsDisplayed */
-
-
-/*
-** tuiVerticalSourceScroll().
-** Scroll the source forward or backward vertically
-*/
-void
-#ifdef __STDC__
-tuiVerticalSourceScroll (
- TuiScrollDirection scrollDirection,
- int numToScroll)
-#else
-tuiVerticalSourceScroll (scrollDirection, numToScroll)
- TuiScrollDirection scrollDirection;
- int numToScroll;
-#endif
-{
- if (srcWin->generic.content != (OpaquePtr) NULL)
- {
- int line;
- Opaque addr;
- struct symtab *s;
- TuiWinContent content = (TuiWinContent) srcWin->generic.content;
-
- if (current_source_symtab == (struct symtab *) NULL)
- s = find_pc_symtab (selected_frame->pc);
- else
- s = current_source_symtab;
-
- if (scrollDirection == FORWARD_SCROLL)
- {
- line = content[0]->whichElement.source.lineOrAddr.lineNo +
- numToScroll;
- if (line > s->nlines)
- /*line = s->nlines - winInfo->generic.contentSize + 1;*/
- /*elz: fix for dts 23398*/
- line = content[0]->whichElement.source.lineOrAddr.lineNo;
- }
- else
- {
- line = content[0]->whichElement.source.lineOrAddr.lineNo -
- numToScroll;
- if (line <= 0)
- line = 1;
- }
- tuiUpdateSourceWindowAsIs (srcWin, s, (Opaque) line, FALSE);
- }
-
- return;
-} /* tuiVerticalSourceScroll */
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS **
-******************************************/
-
-/*
-** _hasBreak().
-** Answer whether there is a break point at the input line in
-** the source file indicated
-*/
-static struct breakpoint *
-#ifdef __STDC__
-_hasBreak (
- char *sourceFileName,
- int lineNo)
-#else
-_hasBreak (sourceFileName, lineNo)
- char *sourceFileName;
- int lineNo;
-#endif
-{
- struct breakpoint *bpWithBreak = (struct breakpoint *) NULL;
- struct breakpoint *bp;
- extern struct breakpoint *breakpoint_chain;
-
-
- for (bp = breakpoint_chain;
- (bp != (struct breakpoint *) NULL &&
- bpWithBreak == (struct breakpoint *) NULL);
- bp = bp->next)
- if ((strcmp (sourceFileName, bp->source_file) == 0) &&
- (lineNo == bp->line_number))
- bpWithBreak = bp;
-
- return bpWithBreak;
-} /* _hasBreak */
diff --git a/contrib/gdb/gdb/tui/tuiSource.h b/contrib/gdb/gdb/tui/tuiSource.h
deleted file mode 100644
index f898c611c714..000000000000
--- a/contrib/gdb/gdb/tui/tuiSource.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _TUI_SOURCE_H
-#define _TUI_SOURCE_H
-/*
-** This header file supports
-*/
-
-
-#include "defs.h"
-#if 0
-#include "symtab.h"
-#include "breakpoint.h"
-#endif
-
-extern TuiStatus tuiSetSourceContent PARAMS ((struct symtab *, int, int));
-extern void tuiShowSource PARAMS ((struct symtab *, Opaque, int));
-extern void tuiShowSourceAsIs PARAMS ((struct symtab *, Opaque, int));
-extern int tuiSourceIsDisplayed PARAMS ((char *));
-extern void tuiVerticalSourceScroll PARAMS ((TuiScrollDirection, int));
-
-
-/*******************
-** MACROS **
-*******************/
-#define m_tuiShowSourceAsIs(s, line, noerror) tuiUpdateSourceWindowAsIs(srcWin, s, line, noerror)
-
-
-#endif /*_TUI_SOURCE_H*/
diff --git a/contrib/gdb/gdb/tui/tuiSourceWin.c b/contrib/gdb/gdb/tui/tuiSourceWin.c
deleted file mode 100644
index e20392598ad7..000000000000
--- a/contrib/gdb/gdb/tui/tuiSourceWin.c
+++ /dev/null
@@ -1,1098 +0,0 @@
-/*
-** tuiSourceWin.c
-** This module contains functions for displaying source or assembly in the "source" window.
-* The "source" window may be the assembly or the source windows.
-*/
-
-#include "defs.h"
-#include <ctype.h>
-#include "symtab.h"
-#include "frame.h"
-#include "breakpoint.h"
-
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiStack.h"
-#include "tuiSourceWin.h"
-#include "tuiSource.h"
-#include "tuiDisassem.h"
-
-
-/*****************************************
-** EXTERNAL FUNCTION DECLS **
-******************************************/
-
-/*****************************************
-** EXTERNAL DATA DECLS **
-******************************************/
-extern int current_source_line;
-extern struct symtab *current_source_symtab;
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS **
-******************************************/
-
-/*****************************************
-** STATIC LOCAL DATA **
-******************************************/
-
-
-/*****************************************
-** PUBLIC FUNCTIONS **
-******************************************/
-
-/*********************************
-** SOURCE/DISASSEM FUNCTIONS **
-*********************************/
-
-/*
-** tuiSrcWinIsDisplayed().
-*/
-int
-#ifdef __STDC__
-tuiSrcWinIsDisplayed (void)
-#else
-tuiSrcWinIsDisplayed ()
-#endif
-{
- return (m_winPtrNotNull (srcWin) && srcWin->generic.isVisible);
-} /* tuiSrcWinIsDisplayed */
-
-
-/*
-** tuiAsmWinIsDisplayed().
-*/
-int
-#ifdef __STDC__
-tuiAsmWinIsDisplayed (void)
-#else
-tuiAsmWinIsDisplayed ()
-#endif
-{
- return (m_winPtrNotNull (disassemWin) && disassemWin->generic.isVisible);
-} /* tuiAsmWinIsDisplayed */
-
-
-/*
-** tuiDisplayMainFunction().
-** Function to display the "main" routine"
-*/
-void
-#ifdef __STDC__
-tuiDisplayMainFunction (void)
-#else
-tuiDisplayMainFunction ()
-#endif
-{
- if ((sourceWindows ())->count > 0)
- {
- CORE_ADDR addr;
-
- addr = parse_and_eval_address ("main");
- if (addr <= (CORE_ADDR) 0)
- addr = parse_and_eval_address ("MAIN");
- if (addr > (CORE_ADDR) 0)
- {
- struct symtab_and_line sal;
-
- tuiUpdateSourceWindowsWithAddr ((Opaque) addr);
- sal = find_pc_line (addr, 0);
- tuiSwitchFilename (sal.symtab->filename);
- }
- }
-
- return;
-} /* tuiDisplayMainFunction */
-
-
-
-/*
-** tuiUpdateSourceWindow().
-** Function to display source in the source window. This function
-** initializes the horizontal scroll to 0.
-*/
-void
-#ifdef __STDC__
-tuiUpdateSourceWindow (
- TuiWinInfoPtr winInfo,
- struct symtab *s,
- Opaque lineOrAddr,
- int noerror)
-#else
-tuiUpdateSourceWindow (winInfo, s, lineOrAddr, noerror)
- TuiWinInfoPtr winInfo;
- struct symtab *s;
- Opaque lineOrAddr;
- int noerror;
-#endif
-{
- winInfo->detail.sourceInfo.horizontalOffset = 0;
- tuiUpdateSourceWindowAsIs (winInfo, s, lineOrAddr, noerror);
-
- return;
-} /* tuiUpdateSourceWindow */
-
-
-/*
-** tuiUpdateSourceWindowAsIs().
-** Function to display source in the source/asm window. This
-** function shows the source as specified by the horizontal offset.
-*/
-void
-#ifdef __STDC__
-tuiUpdateSourceWindowAsIs (
- TuiWinInfoPtr winInfo,
- struct symtab *s,
- Opaque lineOrAddr,
- int noerror)
-#else
-tuiUpdateSourceWindowAsIs (winInfo, s, lineOrAddr, noerror)
- TuiWinInfoPtr winInfo;
- struct symtab *s;
- Opaque lineOrAddr;
- int noerror;
-#endif
-{
- TuiStatus ret;
-
- if (winInfo->generic.type == SRC_WIN)
- ret = tuiSetSourceContent (s, (int) lineOrAddr, noerror);
- else
- ret = tuiSetDisassemContent (s, (Opaque) lineOrAddr);
-
- if (ret == TUI_FAILURE)
- {
- tuiClearSourceContent (winInfo, EMPTY_SOURCE_PROMPT);
- tuiClearExecInfoContent (winInfo);
- }
- else
- {
- tuiEraseSourceContent (winInfo, NO_EMPTY_SOURCE_PROMPT);
- tuiShowSourceContent (winInfo);
- tuiUpdateExecInfo (winInfo);
- if (winInfo->generic.type == SRC_WIN)
- {
- current_source_line = (int) lineOrAddr +
- (winInfo->generic.contentSize - 2);
- current_source_symtab = s;
- /*
- ** If the focus was in the asm win, put it in the src
- ** win if we don't have a split layout
- */
- if (tuiWinWithFocus () == disassemWin &&
- currentLayout () != SRC_DISASSEM_COMMAND)
- tuiSetWinFocusTo (srcWin);
- }
- }
-
-
- return;
-} /* tuiUpdateSourceWindowAsIs */
-
-
-/*
-** tuiUpdateSourceWindowsWithAddr().
-** Function to ensure that the source and/or disassemly windows
-** reflect the input address.
-*/
-void
-#ifdef __STDC__
-tuiUpdateSourceWindowsWithAddr (
- Opaque addr)
-#else
-tuiUpdateSourceWindowsWithAddr (addr)
- Opaque addr;
-#endif
-{
- if (addr > (Opaque) NULL)
- {
- struct symtab_and_line sal;
-
- switch (currentLayout ())
- {
- case DISASSEM_COMMAND:
- case DISASSEM_DATA_COMMAND:
- tuiShowDisassem (addr);
- break;
- case SRC_DISASSEM_COMMAND:
- tuiShowDisassemAndUpdateSource (addr);
- break;
- default:
- sal = find_pc_line ((CORE_ADDR) addr, 0);
- tuiShowSource (sal.symtab,
- (Opaque) sal.line,
- FALSE);
- break;
- }
- }
- else
- {
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- {
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
-
- tuiClearSourceContent (winInfo, EMPTY_SOURCE_PROMPT);
- tuiClearExecInfoContent (winInfo);
- }
- }
-
- return;
-} /* tuiUpdateSourceWindowsWithAddr */
-
-
-/*
-** tui_vUpdateSourceWindowsWithAddr()
-** Update the source window with the address in a va_list
-*/
-void
-#ifdef __STDC__
-tui_vUpdateSourceWindowsWithAddr (
- va_list args)
-#else
-tui_vUpdateSourceWindowsWithAddr (args)
- va_list args;
-#endif
-{
- Opaque addr = va_arg (args, Opaque);
-
- tuiUpdateSourceWindowsWithAddr (addr);
-
- return;
-} /* tui_vUpdateSourceWindowsWithAddr */
-
-
-/*
-** tuiUpdateSourceWindowsWithLine().
-** Function to ensure that the source and/or disassemly windows
-** reflect the input address.
-*/
-void
-#ifdef __STDC__
-tuiUpdateSourceWindowsWithLine (
- struct symtab *s,
- int line)
-#else
-tuiUpdateSourceWindowsWithLine (s, line)
- struct symtab *s;
- int line;
-#endif
-{
- switch (currentLayout ())
- {
- case DISASSEM_COMMAND:
- case DISASSEM_DATA_COMMAND:
- tuiUpdateSourceWindowsWithAddr ((Opaque) find_line_pc (s, line));
- break;
- default:
- tuiShowSource (s, (Opaque) line, FALSE);
- if (currentLayout () == SRC_DISASSEM_COMMAND)
- tuiShowDisassem ((Opaque) find_line_pc (s, line));
- break;
- }
-
- return;
-} /* tuiUpdateSourceWindowsWithLine */
-
-
-/*
-** tui_vUpdateSourceWindowsWithLine()
-** Update the source window with the line number in a va_list
-*/
-void
-#ifdef __STDC__
-tui_vUpdateSourceWindowsWithLine (
- va_list args)
-#else
-tui_vUpdateSourceWindowsWithLine (args)
- va_list args;
-#endif
-{
- struct symtab *s = va_arg (args, struct symtab *);
- int line = va_arg (args, int);
-
- tuiUpdateSourceWindowsWithLine (s, line);
-
- return;
-} /* tui_vUpdateSourceWindowsWithLine */
-
-
-/*
-** tuiClearSourceContent().
-*/
-void
-#ifdef __STDC__
-tuiClearSourceContent (
- TuiWinInfoPtr winInfo,
- int displayPrompt)
-#else
-tuiClearSourceContent (winInfo, displayPrompt)
- TuiWinInfoPtr winInfo;
- int displayPrompt;
-#endif
-{
- if (m_winPtrNotNull (winInfo))
- {
- register int i;
-
- winInfo->generic.contentInUse = FALSE;
- tuiEraseSourceContent (winInfo, displayPrompt);
- for (i = 0; i < winInfo->generic.contentSize; i++)
- {
- TuiWinElementPtr element =
- (TuiWinElementPtr) winInfo->generic.content[i];
- element->whichElement.source.hasBreak = FALSE;
- element->whichElement.source.isExecPoint = FALSE;
- }
- }
-
- return;
-} /* tuiClearSourceContent */
-
-
-/*
-** tuiClearAllSourceWinsContent().
-*/
-void
-#ifdef __STDC__
-tuiClearAllSourceWinsContent (
- int displayPrompt)
-#else
-tuiClearAllSourceWinsContent (displayPrompt)
- int displayPrompt;
-#endif
-{
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- tuiClearSourceContent ((TuiWinInfoPtr) (sourceWindows ())->list[i],
- displayPrompt);
-
- return;
-} /* tuiClearAllSourceWinsContent */
-
-
-/*
-** tuiEraseSourceContent().
-*/
-void
-#ifdef __STDC__
-tuiEraseSourceContent (
- TuiWinInfoPtr winInfo,
- int displayPrompt)
-#else
-tuiEraseSourceContent (winInfo, displayPrompt)
- TuiWinInfoPtr winInfo;
- int displayPrompt;
-#endif
-{
- int xPos;
- int halfWidth = (winInfo->generic.width - 2) / 2;
-
- if (winInfo->generic.handle != (WINDOW *) NULL)
- {
- werase (winInfo->generic.handle);
- checkAndDisplayHighlightIfNeeded (winInfo);
- if (displayPrompt == EMPTY_SOURCE_PROMPT)
- {
- char *noSrcStr;
-
- if (winInfo->generic.type == SRC_WIN)
- noSrcStr = NO_SRC_STRING;
- else
- noSrcStr = NO_DISASSEM_STRING;
- if (strlen (noSrcStr) >= halfWidth)
- xPos = 1;
- else
- xPos = halfWidth - strlen (noSrcStr);
- mvwaddstr (winInfo->generic.handle,
- (winInfo->generic.height / 2),
- xPos,
- noSrcStr);
-
- /* elz: added this function call to set the real contents of
- the window to what is on the screen, so that later calls
- to refresh, do display
- the correct stuff, and not the old image */
-
- tuiSetSourceContentNil (winInfo, noSrcStr);
- }
- tuiRefreshWin (&winInfo->generic);
- }
- return;
-} /* tuiEraseSourceContent */
-
-
-/*
-** tuiEraseAllSourceContent().
-*/
-void
-#ifdef __STDC__
-tuiEraseAllSourceWinsContent (
- int displayPrompt)
-#else
-tuiEraseAllSourceWinsContent (displayPrompt)
- int displayPrompt;
-#endif
-{
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- tuiEraseSourceContent ((TuiWinInfoPtr) (sourceWindows ())->list[i],
- displayPrompt);
-
- return;
-} /* tuiEraseAllSourceWinsContent */
-
-
-/*
-** tuiShowSourceContent().
-*/
-void
-#ifdef __STDC__
-tuiShowSourceContent (
- TuiWinInfoPtr winInfo)
-#else
-tuiShowSourceContent (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- int curLine, i, curX;
-
- tuiEraseSourceContent (winInfo, (winInfo->generic.contentSize <= 0));
- if (winInfo->generic.contentSize > 0)
- {
- char *line;
-
- for (curLine = 1; (curLine <= winInfo->generic.contentSize); curLine++)
- mvwaddstr (
- winInfo->generic.handle,
- curLine,
- 1,
- ((TuiWinElementPtr)
- winInfo->generic.content[curLine - 1])->whichElement.source.line);
- }
- checkAndDisplayHighlightIfNeeded (winInfo);
- tuiRefreshWin (&winInfo->generic);
- winInfo->generic.contentInUse = TRUE;
-
- return;
-} /* tuiShowSourceContent */
-
-
-/*
-** tuiShowAllSourceWinsContent()
-*/
-void
-#ifdef __STDC__
-tuiShowAllSourceWinsContent (void)
-#else
-tuiShowAllSourceWinsContent ()
-#endif
-{
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- tuiShowSourceContent ((TuiWinInfoPtr) (sourceWindows ())->list[i]);
-
- return;
-} /* tuiShowAllSourceWinsContent */
-
-
-/*
-** tuiHorizontalSourceScroll().
-** Scroll the source forward or backward horizontally
-*/
-void
-#ifdef __STDC__
-tuiHorizontalSourceScroll (
- TuiWinInfoPtr winInfo,
- TuiScrollDirection direction,
- int numToScroll)
-#else
-tuiHorizontalSourceScroll (winInfo, direction, numToScroll)
- TuiWinInfoPtr winInfo;
- TuiScrollDirection direction;
- int numToScroll;
-#endif
-{
- if (winInfo->generic.content != (OpaquePtr) NULL)
- {
- int offset;
- struct symtab *s;
-
- if (current_source_symtab == (struct symtab *) NULL)
- s = find_pc_symtab (selected_frame->pc);
- else
- s = current_source_symtab;
-
- if (direction == LEFT_SCROLL)
- offset = winInfo->detail.sourceInfo.horizontalOffset + numToScroll;
- else
- {
- if ((offset =
- winInfo->detail.sourceInfo.horizontalOffset - numToScroll) < 0)
- offset = 0;
- }
- winInfo->detail.sourceInfo.horizontalOffset = offset;
- tuiUpdateSourceWindowAsIs (
- winInfo,
- s,
- ((winInfo == srcWin) ?
- (Opaque) ((TuiWinElementPtr)
- winInfo->generic.content[0])->whichElement.source.lineOrAddr.lineNo :
- (Opaque) ((TuiWinElementPtr)
- winInfo->generic.content[0])->whichElement.source.lineOrAddr.addr),
- (int) FALSE);
- }
-
- return;
-} /* tuiHorizontalSourceScroll */
-
-
-/*
-** tuiSetHasExecPointAt().
-** Set or clear the hasBreak flag in the line whose line is lineNo.
-*/
-void
-#ifdef __STDC__
-tuiSetIsExecPointAt (
- Opaque lineOrAddr,
- TuiWinInfoPtr winInfo)
-#else
-tuiSetIsExecPointAt (lineOrAddr, winInfo)
- Opaque lineOrAddr;
- TuiWinInfoPtr winInfo;
-#endif
-{
- int i;
- TuiWinContent content = (TuiWinContent) winInfo->generic.content;
-
- i = 0;
- while (i < winInfo->generic.contentSize)
- {
- if (content[i]->whichElement.source.lineOrAddr.addr == lineOrAddr)
- content[i]->whichElement.source.isExecPoint = TRUE;
- else
- content[i]->whichElement.source.isExecPoint = FALSE;
- i++;
- }
-
- return;
-} /* tuiSetIsExecPointAt */
-
-
-/*
-** tuiSetHasBreakAt().
-** Set or clear the hasBreak flag in the line whose line is lineNo.
-*/
-void
-#ifdef __STDC__
-tuiSetHasBreakAt (
- struct breakpoint *bp,
- TuiWinInfoPtr winInfo,
- int hasBreak)
-#else
-tuiSetHasBreakAt (bp, winInfo, hasBreak)
- struct breakpoint *bp;
- TuiWinInfoPtr winInfo;
- int hasBreak;
-#endif
-{
- int i;
- TuiWinContent content = (TuiWinContent) winInfo->generic.content;
-
- i = 0;
- while (i < winInfo->generic.contentSize)
- {
- int gotIt;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-
- if (winInfo == srcWin)
- {
- char *fileNameDisplayed = (char *) NULL;
-
- if (((TuiWinElementPtr)
- locator->content[0])->whichElement.locator.fileName !=
- (char *) NULL)
- fileNameDisplayed = ((TuiWinElementPtr)
- locator->content[0])->whichElement.locator.fileName;
- else if (current_source_symtab != (struct symtab *) NULL)
- fileNameDisplayed = current_source_symtab->filename;
-
- gotIt = (fileNameDisplayed != (char *) NULL &&
- (strcmp (bp->source_file, fileNameDisplayed) == 0) &&
- content[i]->whichElement.source.lineOrAddr.lineNo ==
- bp->line_number);
- }
- else
- gotIt = (content[i]->whichElement.source.lineOrAddr.addr
- == (Opaque) bp->address);
- if (gotIt)
- {
- content[i]->whichElement.source.hasBreak = hasBreak;
- break;
- }
- i++;
- }
-
- return;
-} /* tuiSetHasBreakAt */
-
-
-/*
-** tuiAllSetHasBreakAt().
-** Set or clear the hasBreak flag in all displayed source windows.
-*/
-void
-#ifdef __STDC__
-tuiAllSetHasBreakAt (
- struct breakpoint *bp,
- int hasBreak)
-#else
-tuiAllSetHasBreakAt (bp, hasBreak)
- struct breakpoint *bp;
- int hasBreak;
-#endif
-{
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- tuiSetHasBreakAt (bp,
- (TuiWinInfoPtr) (sourceWindows ())->list[i], hasBreak);
-
- return;
-} /* tuiAllSetHasBreakAt */
-
-
-/*
-** tui_vAllSetHasBreakAt()
-** Set or clear the hasBreak flag in all displayed source windows,
-** with params in a va_list
-*/
-void
-#ifdef __STDC__
-tui_vAllSetHasBreakAt (
- va_list args)
-#else
-tui_vAllSetHasBreakAt (args)
- va_list args;
-#endif
-{
- struct breakpoint *bp = va_arg (args, struct breakpoint *);
- int hasBreak = va_arg (args, int);
-
- tuiAllSetHasBreakAt (bp, hasBreak);
-
- return;
-} /* tui_vAllSetHasBreakAt */
-
-
-
-/*********************************
-** EXECUTION INFO FUNCTIONS **
-*********************************/
-
-/*
-** tuiSetExecInfoContent().
-** Function to initialize the content of the execution info window,
-** based upon the input window which is either the source or
-** disassembly window.
-*/
-TuiStatus
-#ifdef __STDC__
-tuiSetExecInfoContent (
- TuiWinInfoPtr winInfo)
-#else
-tuiSetExecInfoContent (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- TuiStatus ret = TUI_SUCCESS;
-
- if (winInfo->detail.sourceInfo.executionInfo != (TuiGenWinInfoPtr) NULL)
- {
- TuiGenWinInfoPtr execInfoPtr = winInfo->detail.sourceInfo.executionInfo;
-
- if (execInfoPtr->content == (OpaquePtr) NULL)
- execInfoPtr->content =
- (OpaquePtr) allocContent (winInfo->generic.height,
- execInfoPtr->type);
- if (execInfoPtr->content != (OpaquePtr) NULL)
- {
- int i;
-
- for (i = 0; i < winInfo->generic.contentSize; i++)
- {
- TuiWinElementPtr element;
- TuiWinElementPtr srcElement;
-
- element = (TuiWinElementPtr) execInfoPtr->content[i];
- srcElement = (TuiWinElementPtr) winInfo->generic.content[i];
- /*
- ** First check to see if we have a breakpoint that is
- ** temporary. If so, and this is our current execution point,
- ** then clear the break indicator.
- */
- if (srcElement->whichElement.source.hasBreak &&
- srcElement->whichElement.source.isExecPoint)
- {
- struct breakpoint *bp;
- int found = FALSE;
- extern struct breakpoint *breakpoint_chain;
-
- for (bp = breakpoint_chain;
- (bp != (struct breakpoint *) NULL && !found);
- bp = bp->next)
- {
- found =
- (winInfo == srcWin &&
- bp->line_number ==
- srcElement->whichElement.source.lineOrAddr.lineNo) ||
- (winInfo == disassemWin &&
- bp->address == (CORE_ADDR)
- srcElement->whichElement.source.lineOrAddr.addr);
- if (found)
- srcElement->whichElement.source.hasBreak =
- (bp->disposition != del || bp->hit_count <= 0);
- }
- if (!found)
- srcElement->whichElement.source.hasBreak = FALSE;
- }
- /*
- ** Now update the exec info content based upon the state
- ** of each line as indicated by the source content.
- */
- if (srcElement->whichElement.source.hasBreak &&
- srcElement->whichElement.source.isExecPoint)
- element->whichElement.simpleString = breakLocationStr ();
- else if (srcElement->whichElement.source.hasBreak)
- element->whichElement.simpleString = breakStr ();
- else if (srcElement->whichElement.source.isExecPoint)
- element->whichElement.simpleString = locationStr ();
- else
- element->whichElement.simpleString = blankStr ();
- }
- execInfoPtr->contentSize = winInfo->generic.contentSize;
- }
- else
- ret = TUI_FAILURE;
- }
-
- return ret;
-} /* tuiSetExecInfoContent */
-
-
-/*
-** tuiShowExecInfoContent().
-*/
-void
-#ifdef __STDC__
-tuiShowExecInfoContent (
- TuiWinInfoPtr winInfo)
-#else
-tuiShowExecInfoContent (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- TuiGenWinInfoPtr execInfo = winInfo->detail.sourceInfo.executionInfo;
- int curLine;
-
- werase (execInfo->handle);
- tuiRefreshWin (execInfo);
- for (curLine = 1; (curLine <= execInfo->contentSize); curLine++)
- mvwaddstr (execInfo->handle,
- curLine,
- 0,
- ((TuiWinElementPtr)
- execInfo->content[curLine - 1])->whichElement.simpleString);
- tuiRefreshWin (execInfo);
- execInfo->contentInUse = TRUE;
-
- return;
-} /* tuiShowExecInfoContent */
-
-
-/*
-** tuiShowAllExecInfosContent()
-*/
-void
-#ifdef __STDC__
-tuiShowAllExecInfosContent (void)
-#else
-tuiShowAllExecInfosContent ()
-#endif
-{
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- tuiShowExecInfoContent ((TuiWinInfoPtr) (sourceWindows ())->list[i]);
-
- return;
-} /* tuiShowAllExecInfosContent */
-
-
-/*
-** tuiEraseExecInfoContent().
-*/
-void
-#ifdef __STDC__
-tuiEraseExecInfoContent (
- TuiWinInfoPtr winInfo)
-#else
-tuiEraseExecInfoContent (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- TuiGenWinInfoPtr execInfo = winInfo->detail.sourceInfo.executionInfo;
-
- werase (execInfo->handle);
- tuiRefreshWin (execInfo);
-
- return;
-} /* tuiEraseExecInfoContent */
-
-
-/*
-** tuiEraseAllExecInfosContent()
-*/
-void
-#ifdef __STDC__
-tuiEraseAllExecInfosContent (void)
-#else
-tuiEraseAllExecInfosContent ()
-#endif
-{
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- tuiEraseExecInfoContent ((TuiWinInfoPtr) (sourceWindows ())->list[i]);
-
- return;
-} /* tuiEraseAllExecInfosContent */
-
-
-/*
-** tuiClearExecInfoContent().
-*/
-void
-#ifdef __STDC__
-tuiClearExecInfoContent (
- TuiWinInfoPtr winInfo)
-#else
-tuiClearExecInfoContent (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- winInfo->detail.sourceInfo.executionInfo->contentInUse = FALSE;
- tuiEraseExecInfoContent (winInfo);
-
- return;
-} /* tuiClearExecInfoContent */
-
-
-/*
-** tuiClearAllExecInfosContent()
-*/
-void
-#ifdef __STDC__
-tuiClearAllExecInfosContent (void)
-#else
-tuiClearAllExecInfosContent ()
-#endif
-{
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- tuiClearExecInfoContent ((TuiWinInfoPtr) (sourceWindows ())->list[i]);
-
- return;
-} /* tuiClearAllExecInfosContent */
-
-
-/*
-** tuiUpdateExecInfo().
-** Function to update the execution info window
-*/
-void
-#ifdef __STDC__
-tuiUpdateExecInfo (
- TuiWinInfoPtr winInfo)
-#else
-tuiUpdateExecInfo (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- tuiSetExecInfoContent (winInfo);
- tuiShowExecInfoContent (winInfo);
-} /* tuiUpdateExecInfo
-
-
-/*
-** tuiUpdateAllExecInfos()
-*/
-void
-#ifdef __STDC__
-tuiUpdateAllExecInfos (void)
-#else
-tuiUpdateAllExecInfos ()
-#endif
-{
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- tuiUpdateExecInfo ((TuiWinInfoPtr) (sourceWindows ())->list[i]);
-
- return;
-} /* tuiUpdateAllExecInfos*/
-
-
-
-/* tuiUpdateOnEnd()
-** elz: This function clears the execution info from the source windows
-** and resets the locator to display no line info, procedure info, pc
-** info. It is called by stack_publish_stopped_with_no_frame, which
-** is called then the target terminates execution
-*/
-void
-#ifdef __STDC__
-tuiUpdateOnEnd (void)
-#else
-tuiUpdateOnEnd ()
-#endif
-{
- int i;
- TuiGenWinInfoPtr locator;
- char *filename;
- TuiWinInfoPtr winInfo;
-
- locator = locatorWinInfoPtr ();
-
- /* for all the windows (src, asm) */
- for (i = 0; i < (sourceWindows ())->count; i++)
- {
- winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
-
- tuiSetIsExecPointAt ((Opaque) - 1, winInfo); /* the target is'n running */
- /* -1 should not match any line number or pc */
- tuiSetExecInfoContent (winInfo); /*set winInfo so that > is'n displayed*/
- tuiShowExecInfoContent (winInfo); /* display the new contents */
- }
-
- /*now update the locator*/
- tuiClearLocatorDisplay ();
- tuiGetLocatorFilename (locator, &filename);
- tuiSetLocatorInfo (
- filename,
- (char *) NULL,
- 0,
- (Opaque) NULL,
- &((TuiWinElementPtr) locator->content[0])->whichElement.locator);
- tuiShowLocatorContent ();
-
- return;
-} /* tuiUpdateOnEnd */
-
-
-
-TuiStatus
-#ifdef __STDC__
-tuiAllocSourceBuffer (
- TuiWinInfoPtr winInfo)
-#else
-tuiAllocSourceBuffer (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- register char *srcLine, *srcLineBuf;
- register int i, lineWidth, c, maxLines;
- TuiStatus ret = TUI_FAILURE;
-
- maxLines = winInfo->generic.height; /* less the highlight box */
- lineWidth = winInfo->generic.width - 1;
- /*
- ** Allocate the buffer for the source lines. Do this only once since they
- ** will be re-used for all source displays. The only other time this will
- ** be done is when a window's size changes.
- */
- if (winInfo->generic.content == (OpaquePtr) NULL)
- {
- srcLineBuf = (char *) xmalloc ((maxLines * lineWidth) * sizeof (char));
- if (srcLineBuf == (char *) NULL)
- fputs_unfiltered (
- "Unable to Allocate Memory for Source or Disassembly Display.\n",
- gdb_stderr);
- else
- {
- /* allocate the content list */
- if ((winInfo->generic.content =
- (OpaquePtr) allocContent (maxLines, SRC_WIN)) == (OpaquePtr) NULL)
- {
- tuiFree (srcLineBuf);
- srcLineBuf = (char *) NULL;
- fputs_unfiltered (
- "Unable to Allocate Memory for Source or Disassembly Display.\n",
- gdb_stderr);
- }
- }
- for (i = 0; i < maxLines; i++)
- ((TuiWinElementPtr)
- winInfo->generic.content[i])->whichElement.source.line =
- srcLineBuf + (lineWidth * i);
- ret = TUI_SUCCESS;
- }
- else
- ret = TUI_SUCCESS;
-
- return ret;
-} /* tuiAllocSourceBuffer */
-
-
-/*
-** tuiLineIsDisplayed().
-** Answer whether the a particular line number or address is displayed
-** in the current source window.
-*/
-int
-#ifdef __STDC__
-tuiLineIsDisplayed (
- Opaque lineNoOrAddr,
- TuiWinInfoPtr winInfo,
- int checkThreshold)
-#else
-tuiLineIsDisplayed (lineNoOrAddr, winInfo, checkThreshold)
- Opaque lineNoOrAddr;
- TuiWinInfoPtr winInfo;
- int checkThreshold;
-#endif
-{
- int isDisplayed = FALSE;
- int i, threshold;
-
- if (checkThreshold)
- threshold = SCROLL_THRESHOLD;
- else
- threshold = 0;
- i = 0;
- while (i < winInfo->generic.contentSize - threshold && !isDisplayed)
- {
- if (winInfo == srcWin)
- isDisplayed = (((TuiWinElementPtr)
- winInfo->generic.content[i])->whichElement.source.lineOrAddr.lineNo
- == (int) lineNoOrAddr);
- else
- isDisplayed = (((TuiWinElementPtr)
- winInfo->generic.content[i])->whichElement.source.lineOrAddr.addr
- == lineNoOrAddr);
- i++;
- }
-
- return isDisplayed;
-} /* tuiLineIsDisplayed */
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS **
-******************************************/
diff --git a/contrib/gdb/gdb/tui/tuiSourceWin.h b/contrib/gdb/gdb/tui/tuiSourceWin.h
deleted file mode 100644
index 13f3a78ab180..000000000000
--- a/contrib/gdb/gdb/tui/tuiSourceWin.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef _TUI_SOURCEWIN_H
-#define _TUI_SOURCEWIN_H
-/*
-** This header file supports
-*/
-
-
-extern void tuiDisplayMainFunction PARAMS ((void));
-extern void tuiUpdateSourceWindow PARAMS
- ((TuiWinInfoPtr, struct symtab *, Opaque, int));
-extern void tuiUpdateSourceWindowAsIs PARAMS
- ((TuiWinInfoPtr, struct symtab *, Opaque, int));
-extern void tuiUpdateSourceWindowsWithAddr PARAMS ((Opaque));
-extern void tui_vUpdateSourceWindowsWithAddr PARAMS ((va_list));
-extern void tuiUpdateSourceWindowsWithLine PARAMS ((struct symtab *, int));
-extern void tui_vUpdateSourceWindowsWithLine PARAMS ((va_list));
-extern void tuiUpdateSourceWindowsFromLocator PARAMS ((void));
-extern void tuiClearSourceContent PARAMS ((TuiWinInfoPtr, int));
-extern void tuiClearAllSourceWinsContent PARAMS ((int));
-extern void tuiEraseSourceContent PARAMS ((TuiWinInfoPtr, int));
-extern void tuiEraseAllSourceWinsContent PARAMS ((int));
-extern void tuiSetSourceContentNil PARAMS ((TuiWinInfoPtr, char *));
-extern void tuiShowSourceContent PARAMS ((TuiWinInfoPtr));
-extern void tuiShowAllSourceWinsContent PARAMS ((void));
-extern void tuiHorizontalSourceScroll PARAMS ((TuiWinInfoPtr, TuiScrollDirection, int));
-extern void tuiUpdateOnEnd PARAMS ((void));
-
-extern TuiStatus tuiSetExecInfoContent PARAMS ((TuiWinInfoPtr));
-extern void tuiShowExecInfoContent PARAMS ((TuiWinInfoPtr));
-extern void tuiShowAllExecInfosContent PARAMS ((void));
-extern void tuiEraseExecInfoContent PARAMS ((TuiWinInfoPtr));
-extern void tuiEraseAllExecInfosContent PARAMS ((void));
-extern void tuiClearExecInfoContent PARAMS ((TuiWinInfoPtr));
-extern void tuiClearAllExecInfosContent PARAMS ((void));
-extern void tuiUpdateExecInfo PARAMS ((TuiWinInfoPtr));
-extern void tuiUpdateAllExecInfos PARAMS ((void));
-
-extern void tuiSetIsExecPointAt PARAMS ((Opaque, TuiWinInfoPtr));
-extern void tuiSetHasBreakAt PARAMS ((struct breakpoint *, TuiWinInfoPtr, int));
-extern void tuiAllSetHasBreakAt PARAMS ((struct breakpoint *, int));
-extern void tui_vAllSetHasBreakAt PARAMS ((va_list));
-extern TuiStatus tuiAllocSourceBuffer PARAMS ((TuiWinInfoPtr));
-extern int tuiLineIsDisplayed PARAMS ((Opaque, TuiWinInfoPtr, int));
-
-
-/*
-** Constant definitions
-*/
-#define SCROLL_THRESHOLD 2 /* threshold for lazy scroll */
-
-
-/*
-** Macros
-*/
-#define m_tuiSetBreakAt(bp, winInfo) tuiSetHasBreakAt((bp, winInfo, TRUE)
-#define m_tuiClearBreakAt(bp, winInfo) tuiSetHasBreakAt(bp, winInfo, FALSE)
-
-#define m_tuiAllSetBreakAt(bp) tuiAllSetHasBreakAt(bp, TRUE)
-#define m_tuiAllClearBreakAt(bp) tuiAllSetHasBreakAt(bp, FALSE)
-
-#define m_tuiSrcLineDisplayed(lineNo) tuiLineIsDisplayed((Opaque)(lineNo), srcWin, FALSE)
-#define m_tuiSrcAddrDisplayed(addr) tuiLineIsDisplayed((Opaque)(addr), disassemWin, FALSE)
-#define m_tuiSrcLineDisplayedWithinThreshold(lineNo) \
- tuiLineIsDisplayed((Opaque)(lineNo), srcWin, TRUE)
-#define m_tuiSrcAddrDisplayedWithinThreshold(addr) \
- tuiLineIsDisplayed((Opaque)(addr), disassemWin, TRUE)
-#define m_tuiLineDisplayedWithinThreshold(winInfo, lineOrAddr) \
- ( (winInfo == srcWin) ? \
- m_tuiSrcLineDisplayedWithinThreshold(lineOrAddr) : \
- m_tuiSrcAddrDisplayedWithinThreshold(lineOrAddr) )
-
-
-
-#endif /*_TUI_SOURCEWIN_H */
diff --git a/contrib/gdb/gdb/tui/tuiStack.c b/contrib/gdb/gdb/tui/tuiStack.c
deleted file mode 100644
index 401dfe23d82c..000000000000
--- a/contrib/gdb/gdb/tui/tuiStack.c
+++ /dev/null
@@ -1,554 +0,0 @@
-/*
-** This module contains functions for displaying the locator information in the locator window.
-*/
-
-#include "defs.h"
-#include "symtab.h"
-#include "breakpoint.h"
-#include "frame.h"
-
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiStack.h"
-#include "tuiSourceWin.h"
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS **
-******************************************/
-
-static char *_getFuncNameFromFrame PARAMS ((struct frame_info *));
-static void _tuiUpdateLocation_command PARAMS ((char *, int));
-
-
-
-/*****************************************
-** PUBLIC FUNCTION **
-******************************************/
-
-/*
-** tuiClearLocatorDisplay()
-*/
-void
-#ifdef __STDC__
-tuiClearLocatorDisplay (void)
-#else
-tuiClearLocatorDisplay ()
-#endif
-{
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- int i;
-
- if (locator->handle != (WINDOW *) NULL)
- {
- /* No need to werase, since writing a line of
- * blanks which we do below, is equivalent.
- */
- /* werase(locator->handle); */
- wmove (locator->handle, 0, 0);
- wstandout (locator->handle);
- for (i = 0; i < locator->width; i++)
- waddch (locator->handle, ' ');
- wstandend (locator->handle);
- tuiRefreshWin (locator);
- wmove (locator->handle, 0, 0);
- locator->contentInUse = FALSE;
- }
-
- return;
-} /* tuiClearLocatorDisplay */
-
-
-/*
-** tuiShowLocatorContent()
-*/
-void
-#ifdef __STDC__
-tuiShowLocatorContent (void)
-#else
-tuiShowLocatorContent ()
-#endif
-{
- char *string;
- TuiGenWinInfoPtr locator;
-
- locator = locatorWinInfoPtr ();
-
- if (m_genWinPtrNotNull (locator) && locator->handle != (WINDOW *) NULL)
- {
- string = displayableWinContentAt (locator, 0);
- if (string != (char *) NULL)
- {
- wmove (locator->handle, 0, 0);
- wstandout (locator->handle);
- waddstr (locator->handle, string);
- wstandend (locator->handle);
- tuiRefreshWin (locator);
- wmove (locator->handle, 0, 0);
- if (string != nullStr ())
- tuiFree (string);
- locator->contentInUse = TRUE;
- }
- }
-
- return;
-} /* tuiShowLocatorContent */
-
-
-/*
-** tuiSetLocatorInfo().
-** Function to update the locator, with the provided arguments.
-*/
-void
-#ifdef __STDC__
-tuiSetLocatorInfo (
- char *fname,
- char *procname,
- int lineNo,
- Opaque addr,
- TuiLocatorElementPtr element)
-#else
-tuiSetLocatorInfo (fname, procname, lineNo, addr, element)
- char *fname;
- char *procname;
- int lineNo;
- Opaque addr;
- TuiLocatorElementPtr element;
-#endif
-{
-#ifdef COMMENT
- /* first free the old info */
- if (element->fileName)
- tuiFree (element->fileName);
- if (element->procName)
- tuiFree (element->procName);
-
- if (fname == (char *) NULL)
- element->fileName = fname;
- else
- element->fileName = tuiStrDup (fname);
- if (procname == (char *) NULL)
- element->procName = procname;
- else
- element->procName = tuiStrDup (procname);
-#else
- element->fileName[0] = (char) 0;
- element->procName[0] = (char) 0;
- strcat_to_buf (element->fileName, MAX_LOCATOR_ELEMENT_LEN, fname);
- strcat_to_buf (element->procName, MAX_LOCATOR_ELEMENT_LEN, procname);
-#endif
- element->lineNo = lineNo;
- element->addr = (Opaque) addr;
-
- return;
-} /* tuiSetLocatorInfo */
-
-
-/*
-** tuiUpdateLocatorFilename().
-** Update only the filename portion of the locator.
-*/
-void
-#ifdef __STDC__
-tuiUpdateLocatorFilename (
- char *fileName)
-#else
-tuiUpdateLocatorFilename (fileName)
- char *fileName;
-#endif
-{
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-
- if (locator->content[0] == (Opaque) NULL)
- tuiSetLocatorContent ((struct frame_info *) NULL);
- ((TuiWinElementPtr) locator->content[0])->whichElement.locator.fileName[0] = (char) 0;
- strcat_to_buf (((TuiWinElementPtr) locator->content[0])->whichElement.locator.fileName,
- MAX_LOCATOR_ELEMENT_LEN,
- fileName);
-
- tuiShowLocatorContent ();
-
- return;
-} /* tuiUpdateLocatorFilename */
-
-
-/*
-** tui_vUpdateLocatorFilename().
-** Update only the filename portion of the locator with args in a va_list.
-*/
-void
-#ifdef __STDC__
-tui_vUpdateLocatorFilename (
- va_list args)
-#else
-tui_vUpdateLocatorFilename (args)
- va_list args;
-#endif
-{
- char *fileName;
-
- fileName = va_arg (args, char *);
- tuiUpdateLocatorFilename (fileName);
-
- return;
-} /* tui_vUpdateLocatorFilename */
-
-
-/*
-** tuiSwitchFilename().
-** Update the filename portion of the locator. Clear the other info in locator.
-** (elz)
-*/
-void
-#ifdef __STDC__
-tuiSwitchFilename (
- char *fileName)
-#else
-tuiSwitchFilename (fileName)
- char *fileName;
-#endif
-{
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-
- if (locator->content[0] == (Opaque) NULL)
- tuiSetLocatorContent ((struct frame_info *) NULL);
- ((TuiWinElementPtr) locator->content[0])->whichElement.locator.fileName[0] = (char) 0;
-
- tuiSetLocatorInfo (fileName,
- (char *) NULL,
- 0,
- (Opaque) NULL,
- &((TuiWinElementPtr) locator->content[0])->whichElement.locator);
-
- tuiShowLocatorContent ();
-
- return;
-} /* tuiSwitchFilename */
-
-
-/*
-** tuiGetLocatorFilename().
-** Get the filename portion of the locator.
-** (elz)
-*/
-void
-#ifdef __STDC__
-tuiGetLocatorFilename (
- TuiGenWinInfoPtr locator,
- char **filename)
-#else
-tuiGetLocatorFilename (locator, filename)
- TuiGenWinInfoPtr locator;
- char **filename;
-#endif
-{
-
- /* the current filename could be non known, in which case the xmalloc would
- allocate no memory, because the length would be 0 */
- if (((TuiWinElementPtr) locator->content[0])->whichElement.locator.fileName)
- {
- int name_length =
- strlen (((TuiWinElementPtr) locator->content[0])->whichElement.locator.fileName);
-
- (*filename) = (char *) xmalloc (name_length + 1);
- strcpy ((*filename),
- ((TuiWinElementPtr) locator->content[0])->whichElement.locator.fileName);
- }
-
- return;
-} /* tuiGetLocatorFilename */
-
-
-/*
-** tuiUpdateLocatorInfoFromFrame().
-** Function to update the locator, with the information extracted from frameInfo
-*/
-void
-#ifdef __STDC__
-tuiUpdateLocatorInfoFromFrame (
- struct frame_info *frameInfo,
- TuiLocatorElementPtr element)
-#else
-tuiUpdateLocatorInfoFromFrame (frameInfo, element)
- struct frame_info *frameInfo;
- TuiLocatorElementPtr element;
-#endif
-{
- struct symtab_and_line symtabAndLine;
-
- /* now get the new info */
- symtabAndLine = find_pc_line (frameInfo->pc,
- (frameInfo->next != (struct frame_info *) NULL &&
- !frameInfo->next->signal_handler_caller &&
- !frame_in_dummy (frameInfo->next)));
- if (symtabAndLine.symtab && symtabAndLine.symtab->filename)
- tuiSetLocatorInfo (symtabAndLine.symtab->filename,
- _getFuncNameFromFrame (frameInfo),
- symtabAndLine.line,
- (Opaque) frameInfo->pc,
- element);
- else
- tuiSetLocatorInfo ((char *) NULL,
- _getFuncNameFromFrame (frameInfo),
- 0,
- (Opaque) frameInfo->pc,
- element);
-
- return;
-} /* tuiUpdateLocatorInfoFromFrame */
-
-
-/*
-** tuiSetLocatorContent().
-** Function to set the content of the locator
-*/
-void
-#ifdef __STDC__
-tuiSetLocatorContent (
- struct frame_info *frameInfo)
-#else
-tuiSetLocatorContent (frameInfo)
- struct frame_info *frameInfo;
-#endif
-{
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- TuiWinElementPtr element;
- struct symtab_and_line symtabAndLine;
-
- /* Allocate the element if necessary */
- if (locator->contentSize <= 0)
- {
- TuiWinContent contentPtr;
-
- if ((locator->content = (OpaquePtr) allocContent (1, locator->type)) == (OpaquePtr) NULL)
- error ("Unable to Allocate Memory to Display Location.");
- locator->contentSize = 1;
- }
-
- if (frameInfo != (struct frame_info *) NULL)
- tuiUpdateLocatorInfoFromFrame (frameInfo,
- &((TuiWinElementPtr) locator->content[0])->whichElement.locator);
- else
- tuiSetLocatorInfo ((char *) NULL,
- (char *) NULL,
- 0,
- (Opaque) NULL,
- &((TuiWinElementPtr) locator->content[0])->whichElement.locator);
- return;
-} /* tuiSetLocatorContent */
-
-
-/*
-** tuiUpdateLocatorDisplay().
-** Function to update the locator display
-*/
-void
-#ifdef __STDC__
-tuiUpdateLocatorDisplay (
- struct frame_info *frameInfo)
-#else
-tuiUpdateLocatorDisplay (frameInfo)
- struct frame_info *frameInfo;
-#endif
-{
- tuiClearLocatorDisplay ();
- tuiSetLocatorContent (frameInfo);
- tuiShowLocatorContent ();
-
- return;
-} /* tuiUpdateLocatorDisplay */
-
-
-/*
-** tuiShowFrameInfo().
-** Function to print the frame inforrmation for the TUI.
-*/
-void
-#ifdef __STDC__
-tuiShowFrameInfo (
- struct frame_info *fi)
-#else
-tuiShowFrameInfo (fi)
- struct frame_info *fi;
-#endif
-{
- TuiWinInfoPtr winInfo;
- register int i;
-
- if (fi)
- {
- register int startLine, i;
- register struct symtab *s;
- CORE_ADDR low;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- int sourceAlreadyDisplayed;
-
-
- s = find_pc_symtab (fi->pc);
- sourceAlreadyDisplayed = tuiSourceIsDisplayed (s->filename);
- tuiUpdateLocatorDisplay (fi);
- for (i = 0; i < (sourceWindows ())->count; i++)
- {
- winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
- if (winInfo == srcWin)
- {
- startLine =
- (((TuiWinElementPtr) locator->content[0])->whichElement.locator.lineNo -
- (winInfo->generic.viewportHeight / 2)) + 1;
- if (startLine <= 0)
- startLine = 1;
- }
- else
- {
- if (find_pc_partial_function (fi->pc, (char **) NULL, &low, (CORE_ADDR) NULL) == 0)
- error ("No function contains program counter for selected frame.\n");
- else
- low = (CORE_ADDR) tuiGetLowDisassemblyAddress ((Opaque) low, (Opaque) fi->pc);
- }
-
- if (winInfo == srcWin)
- {
- if (!(sourceAlreadyDisplayed && m_tuiLineDisplayedWithinThreshold (
- winInfo,
- ((TuiWinElementPtr) locator->content[0])->whichElement.locator.lineNo)))
- tuiUpdateSourceWindow (winInfo, s, (Opaque) startLine, TRUE);
- else
- tuiSetIsExecPointAt ((Opaque)
- ((TuiWinElementPtr) locator->content[0])->whichElement.locator.lineNo,
- winInfo);
- }
- else
- {
- if (winInfo == disassemWin)
- {
- if (!m_tuiLineDisplayedWithinThreshold (winInfo,
- ((TuiWinElementPtr) locator->content[0])->whichElement.locator.addr))
- tuiUpdateSourceWindow (winInfo, s, (Opaque) low, TRUE);
- else
- tuiSetIsExecPointAt ((Opaque)
- ((TuiWinElementPtr) locator->content[0])->whichElement.locator.addr,
- winInfo);
- }
- }
- tuiUpdateExecInfo (winInfo);
- }
- }
- else
- {
- tuiUpdateLocatorDisplay (fi);
- for (i = 0; i < (sourceWindows ())->count; i++)
- {
- winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
- tuiClearSourceContent (winInfo, EMPTY_SOURCE_PROMPT);
- tuiUpdateExecInfo (winInfo);
- }
- }
-
- return;
-} /* tuiShowFrameInfo */
-
-
-/*
-** tui_vShowFrameInfo().
-** Function to print the frame inforrmation for the TUI with args in a va_list.
-*/
-void
-#ifdef __STDC__
-tui_vShowFrameInfo (
- va_list args)
-#else
-tui_vShowFrameInfo (args)
- va_list args;
-#endif
-{
- struct frame_info *fi;
-
- fi = va_arg (args, struct frame_info *);
- tuiShowFrameInfo (fi);
-
- return;
-} /* tui_vShowFrameInfo */
-
-
-/*
-** _initialize_tuiStack().
-** Function to initialize gdb commands, for tui window stack manipulation.
-*/
-void
-_initialize_tuiStack ()
-{
- if (tui_version)
- {
- add_com ("update", class_tui, _tuiUpdateLocation_command,
- "Update the source window and locator to display the current execution point.\n");
- }
-
- return;
-} /* _initialize_tuiStack */
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS **
-******************************************/
-
-/*
-** _getFuncNameFromFrame().
-*/
-static char *
-#ifdef __STDC__
-_getFuncNameFromFrame (
- struct frame_info *frameInfo)
-#else
-_getFuncNameFromFrame (frameInfo)
- struct frame_info *frameInfo;
-#endif
-{
- char *funcName = (char *) NULL;
-
- find_pc_partial_function (frameInfo->pc,
- &funcName,
- (CORE_ADDR *) NULL,
- (CORE_ADDR *) NULL);
- return funcName;
-} /* _getFuncNameFromFrame */
-
-
-/*
-** _tuiUpdateLocation_command().
-** Command to update the display with the current execution point
-*/
-static void
-#ifdef __STDC__
-_tuiUpdateLocation_command (
- char *arg,
- int fromTTY)
-#else
-_tuiUpdateLocation_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
-#ifndef TRY
- extern void frame_command PARAMS ((char *, int));
- frame_command ("0", FALSE);
-#else
- struct frame_info *curFrame;
-
- /* Obtain the current execution point */
- if ((curFrame = get_current_frame ()) != (struct frame_info *) NULL)
- {
- struct frame_info *frame;
- int curLevel = 0;
-
- for (frame = get_prev_frame (curLevel);
- (frame != (struct frame_info *) NULL && (frame != curFrame));
- frame = get_prev_frame (frame))
- curLevel++;
-
- if (curFrame != (struct frame_info *) NULL)
- print_frame_info (frame, curLevel, 0, 1);
- }
-#endif
-
- return;
-} /* _tuiUpdateLocation_command */
diff --git a/contrib/gdb/gdb/tui/tuiStack.h b/contrib/gdb/gdb/tui/tuiStack.h
deleted file mode 100644
index 20e9a92c61c2..000000000000
--- a/contrib/gdb/gdb/tui/tuiStack.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _TUI_STACK_H
-#define _TUI_STACK_H
-/*
-** This header file supports
-*/
-
-extern void tuiSetLocatorInfo PARAMS ((char *, char *, int, Opaque, TuiLocatorElementPtr));
-extern void tuiUpdateLocatorFilename PARAMS ((char *));
-extern void tui_vUpdateLocatorFilename PARAMS ((va_list));
-extern void tuiUpdateLocatorInfoFromFrame
- PARAMS ((struct frame_info *, TuiLocatorElementPtr));
-extern void tuiUpdateLocatorDisplay PARAMS ((struct frame_info *));
-extern void tuiSetLocatorContent PARAMS ((struct frame_info *));
-extern void tuiShowLocatorContent PARAMS ((void));
-extern void tuiClearLocatorContent PARAMS ((void));
-extern void tuiSwitchFilename PARAMS ((char *));
-extern void tuiShowFrameInfo PARAMS ((struct frame_info *));
-extern void tui_vShowFrameInfo PARAMS ((va_list));
-extern void tuiGetLocatorFilename PARAMS ((TuiGenWinInfoPtr, char **));
-
-
-#endif /*_TUI_STACK_H*/
diff --git a/contrib/gdb/gdb/tui/tuiWin.c b/contrib/gdb/gdb/tui/tuiWin.c
deleted file mode 100644
index 45bb0f6a4e92..000000000000
--- a/contrib/gdb/gdb/tui/tuiWin.c
+++ /dev/null
@@ -1,1650 +0,0 @@
-/*
-** tuiWin.c
-** This module contains procedures for handling tui window functions
-** like resize, scrolling, scrolling, changing focus, etc.
-**
-** Author: Susan B. Macchia
-*/
-
-
-#include <string.h>
-#include "defs.h"
-#include "command.h"
-#include "symtab.h"
-#include "breakpoint.h"
-#include "frame.h"
-
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiGeneralWin.h"
-#include "tuiStack.h"
-#include "tuiSourceWin.h"
-#include "tuiDataWin.h"
-
-/*******************************
-** External Declarations
-********************************/
-extern void init_page_info ();
-
-/*******************************
-** Static Local Decls
-********************************/
-static void _makeVisibleWithNewHeight PARAMS ((TuiWinInfoPtr));
-static void _makeInvisibleAndSetNewHeight PARAMS ((TuiWinInfoPtr, int));
-static TuiStatus _tuiAdjustWinHeights PARAMS ((TuiWinInfoPtr, int));
-static int _newHeightOk PARAMS ((TuiWinInfoPtr, int));
-static void _tuiSetTabWidth_command PARAMS ((char *, int));
-static void _tuiRefreshAll_command PARAMS ((char *, int));
-static void _tuiSetWinHeight_command PARAMS ((char *, int));
-static void _tuiXDBsetWinHeight_command PARAMS ((char *, int));
-static void _tuiAllWindowsInfo PARAMS ((char *, int));
-static void _tuiSetFocus_command PARAMS ((char *, int));
-static void _tuiScrollForward_command PARAMS ((char *, int));
-static void _tuiScrollBackward_command PARAMS ((char *, int));
-static void _tuiScrollLeft_command PARAMS ((char *, int));
-static void _tuiScrollRight_command PARAMS ((char *, int));
-static void _parseScrollingArgs PARAMS ((char *, TuiWinInfoPtr *, int *));
-
-
-/***************************************
-** DEFINITIONS
-***************************************/
-#define WIN_HEIGHT_USAGE "Usage: winheight <win_name> [+ | -] <#lines>\n"
-#define XDBWIN_HEIGHT_USAGE "Usage: w <#lines>\n"
-#define FOCUS_USAGE "Usage: focus {<win> | next | prev}\n"
-
-/***************************************
-** PUBLIC FUNCTIONS
-***************************************/
-
-/*
-** _initialize_tuiWin().
-** Function to initialize gdb commands, for tui window manipulation.
-*/
-void
-_initialize_tuiWin ()
-{
- if (tui_version)
- {
- add_com ("refresh", class_tui, _tuiRefreshAll_command,
- "Refresh the terminal display.\n");
- if (xdb_commands)
- add_com_alias ("U", "refresh", class_tui, 0);
- add_com ("tabset", class_tui, _tuiSetTabWidth_command,
- "Set the width (in characters) of tab stops.\n\
-Usage: tabset <n>\n");
- add_com ("winheight", class_tui, _tuiSetWinHeight_command,
- "Set the height of a specified window.\n\
-Usage: winheight <win_name> [+ | -] <#lines>\n\
-Window names are:\n\
-src : the source window\n\
-cmd : the command window\n\
-asm : the disassembly window\n\
-regs : the register display\n");
- add_com_alias ("wh", "winheight", class_tui, 0);
- add_info ("win", _tuiAllWindowsInfo,
- "List of all displayed windows.\n");
- add_com ("focus", class_tui, _tuiSetFocus_command,
- "Set focus to named window or next/prev window.\n\
-Usage: focus {<win> | next | prev}\n\
-Valid Window names are:\n\
-src : the source window\n\
-asm : the disassembly window\n\
-regs : the register display\n\
-cmd : the command window\n");
- add_com_alias ("fs", "focus", class_tui, 0);
- add_com ("+", class_tui, _tuiScrollForward_command,
- "Scroll window forward.\nUsage: + [win] [n]\n");
- add_com ("-", class_tui, _tuiScrollBackward_command,
- "Scroll window backward.\nUsage: - [win] [n]\n");
- add_com ("<", class_tui, _tuiScrollLeft_command,
- "Scroll window forward.\nUsage: < [win] [n]\n");
- add_com (">", class_tui, _tuiScrollRight_command,
- "Scroll window backward.\nUsage: > [win] [n]\n");
- if (xdb_commands)
- add_com ("w", class_xdb, _tuiXDBsetWinHeight_command,
- "XDB compatibility command for setting the height of a command window.\n\
-Usage: w <#lines>\n");
- }
-
- return;
-} /* _intialize_tuiWin */
-
-
-/*
-** tuiClearWinFocusFrom
-** Clear the logical focus from winInfo
-*/
-void
-#ifdef __STDC__
-tuiClearWinFocusFrom (
- TuiWinInfoPtr winInfo)
-#else
-tuiClearWinFocusFrom (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- if (m_winPtrNotNull (winInfo))
- {
- if (winInfo->generic.type != CMD_WIN)
- unhighlightWin (winInfo);
- tuiSetWinWithFocus ((TuiWinInfoPtr) NULL);
- }
-
- return;
-} /* tuiClearWinFocusFrom */
-
-
-/*
-** tuiClearWinFocus().
-** Clear the window that has focus.
-*/
-void
-#ifdef __STDC__
-tuiClearWinFocus (void)
-#else
-tuiClearWinFocus ()
-#endif
-{
- tuiClearWinFocusFrom (tuiWinWithFocus ());
-
- return;
-} /* tuiClearWinFocus */
-
-
-/*
-** tuiSetWinFocusTo
-** Set the logical focus to winInfo
-*/
-void
-#ifdef __STDC__
-tuiSetWinFocusTo (
- TuiWinInfoPtr winInfo)
-#else
-tuiSetWinFocusTo (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- if (m_winPtrNotNull (winInfo))
- {
- TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
-
- if (m_winPtrNotNull (winWithFocus) &&
- winWithFocus->generic.type != CMD_WIN)
- unhighlightWin (winWithFocus);
- tuiSetWinWithFocus (winInfo);
- if (winInfo->generic.type != CMD_WIN)
- highlightWin (winInfo);
- }
-
- return;
-} /* tuiSetWinFocusTo */
-
-
-char *
-#ifdef __STDC__
-tuiStrDup (
- char *str)
-#else
-tuiStrDup (str)
- char *str;
-#endif
-{
- char *newStr = (char *) NULL;
-
- if (str != (char *) NULL)
- {
- newStr = (char *) xmalloc (strlen (str) + 1);
- strcpy (newStr, str);
- }
-
- return newStr;
-} /* tuiStrDup */
-
-
-/*
-** tuiScrollForward().
-*/
-void
-#ifdef __STDC__
-tuiScrollForward (
- TuiWinInfoPtr winToScroll,
- int numToScroll)
-#else
-tuiScrollForward (winToScroll, numToScroll)
- TuiWinInfoPtr winToScroll;
- int numToScroll;
-#endif
-{
- if (winToScroll != cmdWin)
- {
- int _numToScroll = numToScroll;
-
- if (numToScroll == 0)
- _numToScroll = winToScroll->generic.height - 3;
- /*
- ** If we are scrolling the source or disassembly window, do a
- ** "psuedo" scroll since not all of the source is in memory,
- ** only what is in the viewport. If winToScroll is the
- ** command window do nothing since the term should handle it.
- */
- if (winToScroll == srcWin)
- tuiVerticalSourceScroll (FORWARD_SCROLL, _numToScroll);
- else if (winToScroll == disassemWin)
- tuiVerticalDisassemScroll (FORWARD_SCROLL, _numToScroll);
- else if (winToScroll == dataWin)
- tuiVerticalDataScroll (FORWARD_SCROLL, _numToScroll);
- }
-
- return;
-} /* tuiScrollForward */
-
-
-/*
-** tuiScrollBackward().
-*/
-void
-#ifdef __STDC__
-tuiScrollBackward (
- TuiWinInfoPtr winToScroll,
- int numToScroll)
-#else
-tuiScrollBackward (winToScroll, numToScroll)
- TuiWinInfoPtr winToScroll;
- int numToScroll;
-#endif
-{
- if (winToScroll != cmdWin)
- {
- int _numToScroll = numToScroll;
-
- if (numToScroll == 0)
- _numToScroll = winToScroll->generic.height - 3;
- /*
- ** If we are scrolling the source or disassembly window, do a
- ** "psuedo" scroll since not all of the source is in memory,
- ** only what is in the viewport. If winToScroll is the
- ** command window do nothing since the term should handle it.
- */
- if (winToScroll == srcWin)
- tuiVerticalSourceScroll (BACKWARD_SCROLL, _numToScroll);
- else if (winToScroll == disassemWin)
- tuiVerticalDisassemScroll (BACKWARD_SCROLL, _numToScroll);
- else if (winToScroll == dataWin)
- tuiVerticalDataScroll (BACKWARD_SCROLL, _numToScroll);
- }
- return;
-} /* tuiScrollBackward */
-
-
-/*
-** tuiScrollLeft().
-*/
-void
-#ifdef __STDC__
-tuiScrollLeft (
- TuiWinInfoPtr winToScroll,
- int numToScroll)
-#else
-tuiScrollLeft (winToScroll, numToScroll)
- TuiWinInfoPtr winToScroll;
- int numToScroll;
-#endif
-{
- if (winToScroll != cmdWin)
- {
- int _numToScroll = numToScroll;
-
- if (_numToScroll == 0)
- _numToScroll = 1;
- /*
- ** If we are scrolling the source or disassembly window, do a
- ** "psuedo" scroll since not all of the source is in memory,
- ** only what is in the viewport. If winToScroll is the
- ** command window do nothing since the term should handle it.
- */
- if (winToScroll == srcWin || winToScroll == disassemWin)
- tuiHorizontalSourceScroll (winToScroll, LEFT_SCROLL, _numToScroll);
- }
- return;
-} /* tuiScrollLeft */
-
-
-/*
-** tuiScrollRight().
-*/
-void
-#ifdef __STDC__
-tuiScrollRight (
- TuiWinInfoPtr winToScroll,
- int numToScroll)
-#else
-tuiScrollRight (winToScroll, numToScroll)
- TuiWinInfoPtr winToScroll;
- int numToScroll;
-#endif
-{
- if (winToScroll != cmdWin)
- {
- int _numToScroll = numToScroll;
-
- if (_numToScroll == 0)
- _numToScroll = 1;
- /*
- ** If we are scrolling the source or disassembly window, do a
- ** "psuedo" scroll since not all of the source is in memory,
- ** only what is in the viewport. If winToScroll is the
- ** command window do nothing since the term should handle it.
- */
- if (winToScroll == srcWin || winToScroll == disassemWin)
- tuiHorizontalSourceScroll (winToScroll, RIGHT_SCROLL, _numToScroll);
- }
- return;
-} /* tuiScrollRight */
-
-
-/*
-** tui_vScroll().
-** Scroll a window. Arguments are passed through a va_list.
-*/
-void
-#ifdef __STDC__
-tui_vScroll (
- va_list args)
-#else
-tui_vScroll (args)
- va_list args;
-#endif
-{
- TuiScrollDirection direction = va_arg (args, TuiScrollDirection);
- TuiWinInfoPtr winToScroll = va_arg (args, TuiWinInfoPtr);
- int numToScroll = va_arg (args, int);
-
- switch (direction)
- {
- case FORWARD_SCROLL:
- tuiScrollForward (winToScroll, numToScroll);
- break;
- case BACKWARD_SCROLL:
- tuiScrollBackward (winToScroll, numToScroll);
- break;
- case LEFT_SCROLL:
- tuiScrollLeft (winToScroll, numToScroll);
- break;
- case RIGHT_SCROLL:
- tuiScrollRight (winToScroll, numToScroll);
- break;
- default:
- break;
- }
-
- return;
-} /* tui_vScroll */
-
-
-/*
-** tuiRefreshAll().
-*/
-void
-#ifdef __STDC__
-tuiRefreshAll (void)
-#else
-tuiRefreshAll ()
-#endif
-{
- TuiWinType type;
-
- refreshAll (winList);
- for (type = SRC_WIN; type < MAX_MAJOR_WINDOWS; type++)
- {
- if (winList[type]->generic.isVisible)
- {
- switch (type)
- {
- case SRC_WIN:
- case DISASSEM_WIN:
- tuiClearWin (&winList[type]->generic);
- if (winList[type]->detail.sourceInfo.hasLocator)
- tuiClearLocatorDisplay ();
- tuiShowSourceContent (winList[type]);
- checkAndDisplayHighlightIfNeeded (winList[type]);
- tuiEraseExecInfoContent (winList[type]);
- tuiUpdateExecInfo (winList[type]);
- break;
- case DATA_WIN:
- tuiRefreshDataWin ();
- break;
- default:
- break;
- }
- }
- }
- tuiClearLocatorDisplay ();
- tuiShowLocatorContent ();
-
- return;
-} /* tuiRefreshAll */
-
-
-/*
-** tuiResizeAll().
-** Resize all the windows based on the the terminal size. This
-** function gets called from within the readline sinwinch handler.
-*/
-void
-#ifdef __STDC__
-tuiResizeAll (void)
-#else
-tuiResizeAll ()
-#endif
-{
- int heightDiff, widthDiff;
- extern int screenheight, screenwidth; /* in readline */
-
- widthDiff = screenwidth - termWidth ();
- heightDiff = screenheight - termHeight ();
- if (heightDiff || widthDiff)
- {
- TuiLayoutType curLayout = currentLayout ();
- TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
- TuiWinInfoPtr firstWin, secondWin;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- TuiWinType winType;
- int i, newHeight, splitDiff, cmdSplitDiff, numWinsDisplayed = 2;
-
- /* turn keypad off while we resize */
- if (winWithFocus != cmdWin)
- keypad (cmdWin->generic.handle, FALSE);
- init_page_info ();
- setTermHeightTo (screenheight);
- setTermWidthTo (screenwidth);
- if (curLayout == SRC_DISASSEM_COMMAND ||
- curLayout == SRC_DATA_COMMAND || curLayout == DISASSEM_DATA_COMMAND)
- numWinsDisplayed++;
- splitDiff = heightDiff / numWinsDisplayed;
- cmdSplitDiff = splitDiff;
- if (heightDiff % numWinsDisplayed)
- {
- if (heightDiff < 0)
- cmdSplitDiff--;
- else
- cmdSplitDiff++;
- }
- /* now adjust each window */
- clear ();
- refresh ();
- switch (curLayout)
- {
- case SRC_COMMAND:
- case DISASSEM_COMMAND:
- firstWin = (TuiWinInfoPtr) (sourceWindows ())->list[0];
- firstWin->generic.width += widthDiff;
- locator->width += widthDiff;
- /* check for invalid heights */
- if (heightDiff == 0)
- newHeight = firstWin->generic.height;
- else if ((firstWin->generic.height + splitDiff) >=
- (screenheight - MIN_CMD_WIN_HEIGHT - 1))
- newHeight = screenheight - MIN_CMD_WIN_HEIGHT - 1;
- else if ((firstWin->generic.height + splitDiff) <= 0)
- newHeight = MIN_WIN_HEIGHT;
- else
- newHeight = firstWin->generic.height + splitDiff;
-
- _makeInvisibleAndSetNewHeight (firstWin, newHeight);
- cmdWin->generic.origin.y = locator->origin.y + 1;
- cmdWin->generic.width += widthDiff;
- newHeight = screenheight - cmdWin->generic.origin.y;
- _makeInvisibleAndSetNewHeight (cmdWin, newHeight);
- _makeVisibleWithNewHeight (firstWin);
- _makeVisibleWithNewHeight (cmdWin);
- if (firstWin->generic.contentSize <= 0)
- tuiEraseSourceContent (firstWin, EMPTY_SOURCE_PROMPT);
- break;
- default:
- if (curLayout == SRC_DISASSEM_COMMAND)
- {
- firstWin = srcWin;
- firstWin->generic.width += widthDiff;
- secondWin = disassemWin;
- secondWin->generic.width += widthDiff;
- }
- else
- {
- firstWin = dataWin;
- firstWin->generic.width += widthDiff;
- secondWin = (TuiWinInfoPtr) (sourceWindows ())->list[0];
- secondWin->generic.width += widthDiff;
- }
- /* Change the first window's height/width */
- /* check for invalid heights */
- if (heightDiff == 0)
- newHeight = firstWin->generic.height;
- else if ((firstWin->generic.height +
- secondWin->generic.height + (splitDiff * 2)) >=
- (screenheight - MIN_CMD_WIN_HEIGHT - 1))
- newHeight = (screenheight - MIN_CMD_WIN_HEIGHT - 1) / 2;
- else if ((firstWin->generic.height + splitDiff) <= 0)
- newHeight = MIN_WIN_HEIGHT;
- else
- newHeight = firstWin->generic.height + splitDiff;
- _makeInvisibleAndSetNewHeight (firstWin, newHeight);
-
- if (firstWin == dataWin && widthDiff != 0)
- firstWin->detail.dataDisplayInfo.regsColumnCount =
- tuiCalculateRegsColumnCount (
- firstWin->detail.dataDisplayInfo.regsDisplayType);
- locator->width += widthDiff;
-
- /* Change the second window's height/width */
- /* check for invalid heights */
- if (heightDiff == 0)
- newHeight = secondWin->generic.height;
- else if ((firstWin->generic.height +
- secondWin->generic.height + (splitDiff * 2)) >=
- (screenheight - MIN_CMD_WIN_HEIGHT - 1))
- {
- newHeight = screenheight - MIN_CMD_WIN_HEIGHT - 1;
- if (newHeight % 2)
- newHeight = (newHeight / 2) + 1;
- else
- newHeight /= 2;
- }
- else if ((secondWin->generic.height + splitDiff) <= 0)
- newHeight = MIN_WIN_HEIGHT;
- else
- newHeight = secondWin->generic.height + splitDiff;
- secondWin->generic.origin.y = firstWin->generic.height - 1;
- _makeInvisibleAndSetNewHeight (secondWin, newHeight);
-
- /* Change the command window's height/width */
- cmdWin->generic.origin.y = locator->origin.y + 1;
- _makeInvisibleAndSetNewHeight (
- cmdWin, cmdWin->generic.height + cmdSplitDiff);
- _makeVisibleWithNewHeight (firstWin);
- _makeVisibleWithNewHeight (secondWin);
- _makeVisibleWithNewHeight (cmdWin);
- if (firstWin->generic.contentSize <= 0)
- tuiEraseSourceContent (firstWin, EMPTY_SOURCE_PROMPT);
- if (secondWin->generic.contentSize <= 0)
- tuiEraseSourceContent (secondWin, EMPTY_SOURCE_PROMPT);
- break;
- }
- /*
- ** Now remove all invisible windows, and their content so that they get
- ** created again when called for with the new size
- */
- for (winType = SRC_WIN; (winType < MAX_MAJOR_WINDOWS); winType++)
- {
- if (winType != CMD_WIN && m_winPtrNotNull (winList[winType]) &&
- !winList[winType]->generic.isVisible)
- {
- freeWindow (winList[winType]);
- winList[winType] = (TuiWinInfoPtr) NULL;
- }
- }
- tuiSetWinResizedTo (TRUE);
- /* turn keypad back on, unless focus is in the command window */
- if (winWithFocus != cmdWin)
- keypad (cmdWin->generic.handle, TRUE);
- }
- return;
-} /* tuiResizeAll */
-
-
-/*
-** tuiSigwinchHandler()
-** SIGWINCH signal handler for the tui. This signal handler is
-** always called, even when the readline package clears signals
-** because it is set as the old_sigwinch() (TUI only)
-*/
-void
-#ifdef __STDC__
-tuiSigwinchHandler (
- int signal)
-#else
-tuiSigwinchHandler (signal)
- int signal;
-#endif
-{
- /*
- ** Say that a resize was done so that the readline can do it
- ** later when appropriate.
- */
- tuiSetWinResizedTo (TRUE);
-
- return;
-} /* tuiSigwinchHandler */
-
-
-
-/*************************
-** STATIC LOCAL FUNCTIONS
-**************************/
-
-
-/*
-** _tuiScrollForward_command().
-*/
-static void
-#ifdef __STDC__
-_tuiScrollForward_command (
- char *arg,
- int fromTTY)
-#else
-_tuiScrollForward_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- int numToScroll = 1;
- TuiWinInfoPtr winToScroll;
-
- if (arg == (char *) NULL)
- _parseScrollingArgs (arg, &winToScroll, (int *) NULL);
- else
- _parseScrollingArgs (arg, &winToScroll, &numToScroll);
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll,
- FORWARD_SCROLL,
- winToScroll,
- numToScroll);
-
- return;
-} /* _tuiScrollForward_command */
-
-
-/*
-** _tuiScrollBackward_command().
-*/
-static void
-#ifdef __STDC__
-_tuiScrollBackward_command (
- char *arg,
- int fromTTY)
-#else
-_tuiScrollBackward_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- int numToScroll = 1;
- TuiWinInfoPtr winToScroll;
-
- if (arg == (char *) NULL)
- _parseScrollingArgs (arg, &winToScroll, (int *) NULL);
- else
- _parseScrollingArgs (arg, &winToScroll, &numToScroll);
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll,
- BACKWARD_SCROLL,
- winToScroll,
- numToScroll);
-
- return;
-} /* _tuiScrollBackward_command */
-
-
-/*
-** _tuiScrollLeft_command().
-*/
-static void
-#ifdef __STDC__
-_tuiScrollLeft_command (
- char *arg,
- int fromTTY)
-#else
-_tuiScrollLeft_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- int numToScroll;
- TuiWinInfoPtr winToScroll;
-
- _parseScrollingArgs (arg, &winToScroll, &numToScroll);
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll,
- LEFT_SCROLL,
- winToScroll,
- numToScroll);
-
- return;
-} /* _tuiScrollLeft_command */
-
-
-/*
-** _tuiScrollRight_command().
-*/
-static void
-#ifdef __STDC__
-_tuiScrollRight_command (
- char *arg,
- int fromTTY)
-#else
-_tuiScrollRight_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- int numToScroll;
- TuiWinInfoPtr winToScroll;
-
- _parseScrollingArgs (arg, &winToScroll, &numToScroll);
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll,
- RIGHT_SCROLL,
- winToScroll,
- numToScroll);
-
- return;
-} /* _tuiScrollRight_command */
-
-
-/*
-** _tuiSetFocus().
-** Set focus to the window named by 'arg'
-*/
-static void
-#ifdef __STDC__
-_tuiSetFocus (
- char *arg,
- int fromTTY)
-#else
-_tuiSetFocus (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- if (arg != (char *) NULL)
- {
- char *bufPtr = (char *) tuiStrDup (arg);
- int i;
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
-
- for (i = 0; (i < strlen (bufPtr)); i++)
- bufPtr[i] = toupper (arg[i]);
-
- if (subsetCompare (bufPtr, "NEXT"))
- winInfo = tuiNextWin (tuiWinWithFocus ());
- else if (subsetCompare (bufPtr, "PREV"))
- winInfo = tuiPrevWin (tuiWinWithFocus ());
- else
- winInfo = partialWinByName (bufPtr);
-
- if (winInfo == (TuiWinInfoPtr) NULL || !winInfo->generic.isVisible)
- warning ("Invalid window specified. \n\
-The window name specified must be valid and visible.\n");
- else
- {
- tuiSetWinFocusTo (winInfo);
- keypad (cmdWin->generic.handle, (winInfo != cmdWin));
- }
-
- if (dataWin->generic.isVisible)
- tuiRefreshDataWin ();
- tuiFree (bufPtr);
- printf_filtered ("Focus set to %s window.\n",
- winName ((TuiGenWinInfoPtr) tuiWinWithFocus ()));
- }
- else
- warning ("Incorrect Number of Arguments.\n%s", FOCUS_USAGE);
-
- return;
-} /* _tuiSetFocus */
-
-
-/*
-** _tui_vSetFocus()
-*/
-static void
-#ifdef __STDC__
-_tui_vSetFocus (
- va_list args)
-#else
-_tui_vSetFocus (args)
- va_list args;
-#endif
-{
- char *arg = va_arg (args, char *);
- int fromTTY = va_arg (args, int);
-
- _tuiSetFocus (arg, fromTTY);
-
- return;
-} /* tui_vSetFocus */
-
-
-/*
-** _tuiSetFocus_command()
-*/
-static void
-#ifdef __STDC__
-_tuiSetFocus_command (
- char *arg,
- int fromTTY)
-#else
-_tuiSetFocus_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vSetFocus, arg, fromTTY);
-
- return;
-} /* tui_SetFocus */
-
-
-/*
-** _tuiAllWindowsInfo().
-*/
-static void
-#ifdef __STDC__
-_tuiAllWindowsInfo (
- char *arg,
- int fromTTY)
-#else
-_tuiAllWindowsInfo (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- TuiWinType type;
- TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
-
- for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
- if (winList[type]->generic.isVisible)
- {
- if (winWithFocus == winList[type])
- printf_filtered (" %s\t(%d lines) <has focus>\n",
- winName (&winList[type]->generic),
- winList[type]->generic.height);
- else
- printf_filtered (" %s\t(%d lines)\n",
- winName (&winList[type]->generic),
- winList[type]->generic.height);
- }
-
- return;
-} /* _tuiAllWindowsInfo */
-
-
-/*
-** _tuiRefreshAll_command().
-*/
-static void
-#ifdef __STDC__
-_tuiRefreshAll_command (
- char *arg,
- int fromTTY)
-#else
-_tuiRefreshAll_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- tuiDo ((TuiOpaqueFuncPtr) tuiRefreshAll);
-}
-
-
-/*
-** _tuiSetWinTabWidth_command().
-** Set the height of the specified window.
-*/
-static void
-#ifdef __STDC__
-_tuiSetTabWidth_command (
- char *arg,
- int fromTTY)
-#else
-_tuiSetTabWidth_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- if (arg != (char *) NULL)
- {
- int ts;
-
- ts = atoi (arg);
- if (ts > 0)
- tuiSetDefaultTabLen (ts);
- else
- warning ("Tab widths greater than 0 must be specified.\n");
- }
-
- return;
-} /* _tuiSetTabWidth_command */
-
-
-/*
-** _tuiSetWinHeight().
-** Set the height of the specified window.
-*/
-static void
-#ifdef __STDC__
-_tuiSetWinHeight (
- char *arg,
- int fromTTY)
-#else
-_tuiSetWinHeight (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- if (arg != (char *) NULL)
- {
- char *buf = tuiStrDup (arg);
- char *bufPtr = buf;
- char *wname = (char *) NULL;
- int newHeight, i;
- TuiWinInfoPtr winInfo;
-
- wname = bufPtr;
- bufPtr = strchr (bufPtr, ' ');
- if (bufPtr != (char *) NULL)
- {
- *bufPtr = (char) 0;
-
- /*
- ** Validate the window name
- */
- for (i = 0; i < strlen (wname); i++)
- wname[i] = toupper (wname[i]);
- winInfo = partialWinByName (wname);
-
- if (winInfo == (TuiWinInfoPtr) NULL || !winInfo->generic.isVisible)
- warning ("Invalid window specified. \n\
-The window name specified must be valid and visible.\n");
- else
- {
- /* Process the size */
- while (*(++bufPtr) == ' ')
- ;
-
- if (*bufPtr != (char) 0)
- {
- int negate = FALSE;
- int fixedSize = TRUE;
- int inputNo;;
-
- if (*bufPtr == '+' || *bufPtr == '-')
- {
- if (*bufPtr == '-')
- negate = TRUE;
- fixedSize = FALSE;
- bufPtr++;
- }
- inputNo = atoi (bufPtr);
- if (inputNo > 0)
- {
- if (negate)
- inputNo *= (-1);
- if (fixedSize)
- newHeight = inputNo;
- else
- newHeight = winInfo->generic.height + inputNo;
- /*
- ** Now change the window's height, and adjust all
- ** other windows around it
- */
- if (_tuiAdjustWinHeights (winInfo,
- newHeight) == TUI_FAILURE)
- warning ("Invalid window height specified.\n%s",
- WIN_HEIGHT_USAGE);
- else
- init_page_info ();
- }
- else
- warning ("Invalid window height specified.\n%s",
- WIN_HEIGHT_USAGE);
- }
- }
- }
- else
- printf_filtered (WIN_HEIGHT_USAGE);
-
- if (buf != (char *) NULL)
- tuiFree (buf);
- }
- else
- printf_filtered (WIN_HEIGHT_USAGE);
-
- return;
-} /* _tuiSetWinHeight */
-
-
-/*
-** _tui_vSetWinHeight().
-** Set the height of the specified window, with va_list.
-*/
-static void
-#ifdef __STDC__
-_tui_vSetWinHeight (
- va_list args)
-#else
-_tui_vSetWinHeight (args)
- va_list args;
-#endif
-{
- char *arg = va_arg (args, char *);
- int fromTTY = va_arg (args, int);
-
- _tuiSetWinHeight (arg, fromTTY);
-
- return;
-} /* _tui_vSetWinHeight */
-
-
-/*
-** _tuiSetWinHeight_command().
-** Set the height of the specified window, with va_list.
-*/
-static void
-#ifdef __STDC__
-_tuiSetWinHeight_command (
- char *arg,
- int fromTTY)
-#else
-_tuiSetWinHeight_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vSetWinHeight, arg, fromTTY);
-
- return;
-} /* _tuiSetWinHeight_command */
-
-
-/*
-** _tuiXDBsetWinHeight().
-** XDB Compatibility command for setting the window height. This will
-** increase or decrease the command window by the specified amount.
-*/
-static void
-#ifdef __STDC__
-_tuiXDBsetWinHeight (
- char *arg,
- int fromTTY)
-#else
-_tuiXDBsetWinHeight (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- if (arg != (char *) NULL)
- {
- int inputNo = atoi (arg);
-
- if (inputNo > 0)
- { /* Add 1 for the locator */
- int newHeight = termHeight () - (inputNo + 1);
-
- if (!_newHeightOk (winList[CMD_WIN], newHeight) ||
- _tuiAdjustWinHeights (winList[CMD_WIN],
- newHeight) == TUI_FAILURE)
- warning ("Invalid window height specified.\n%s",
- XDBWIN_HEIGHT_USAGE);
- }
- else
- warning ("Invalid window height specified.\n%s",
- XDBWIN_HEIGHT_USAGE);
- }
- else
- warning ("Invalid window height specified.\n%s", XDBWIN_HEIGHT_USAGE);
-
- return;
-} /* _tuiXDBsetWinHeight */
-
-
-/*
-** _tui_vXDBsetWinHeight().
-** Set the height of the specified window, with va_list.
-*/
-static void
-#ifdef __STDC__
-_tui_vXDBsetWinHeight (
- va_list args)
-#else
-_tui_vXDBsetWinHeight (args)
- va_list args;
-#endif
-{
- char *arg = va_arg (args, char *);
- int fromTTY = va_arg (args, int);
-
- _tuiXDBsetWinHeight (arg, fromTTY);
-
- return;
-} /* _tui_vXDBsetWinHeight */
-
-
-/*
-** _tuiSetWinHeight_command().
-** Set the height of the specified window, with va_list.
-*/
-static void
-#ifdef __STDC__
-_tuiXDBsetWinHeight_command (
- char *arg,
- int fromTTY)
-#else
-_tuiXDBsetWinHeight_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vXDBsetWinHeight, arg, fromTTY);
-
- return;
-} /* _tuiXDBsetWinHeight_command */
-
-
-/*
-** _tuiAdjustWinHeights().
-** Function to adjust all window heights around the primary
-*/
-static TuiStatus
-#ifdef __STDC__
-_tuiAdjustWinHeights (
- TuiWinInfoPtr primaryWinInfo,
- int newHeight)
-#else
-_tuiAdjustWinHeights (primaryWinInfo, newHeight)
- TuiWinInfoPtr primaryWinInfo;
- int newHeight;
-#endif
-{
- TuiStatus status = TUI_FAILURE;
-
- if (_newHeightOk (primaryWinInfo, newHeight))
- {
- status = TUI_SUCCESS;
- if (newHeight != primaryWinInfo->generic.height)
- {
- int i, diff;
- TuiWinInfoPtr winInfo;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- TuiLayoutType curLayout = currentLayout ();
-
- diff = (newHeight - primaryWinInfo->generic.height) * (-1);
- if (curLayout == SRC_COMMAND || curLayout == DISASSEM_COMMAND)
- {
- TuiWinInfoPtr srcWinInfo;
-
- _makeInvisibleAndSetNewHeight (primaryWinInfo, newHeight);
- if (primaryWinInfo->generic.type == CMD_WIN)
- {
- winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[0];
- srcWinInfo = winInfo;
- }
- else
- {
- winInfo = winList[CMD_WIN];
- srcWinInfo = primaryWinInfo;
- }
- _makeInvisibleAndSetNewHeight (winInfo,
- winInfo->generic.height + diff);
- cmdWin->generic.origin.y = locator->origin.y + 1;
- _makeVisibleWithNewHeight (winInfo);
- _makeVisibleWithNewHeight (primaryWinInfo);
- if (srcWinInfo->generic.contentSize <= 0)
- tuiEraseSourceContent (srcWinInfo, EMPTY_SOURCE_PROMPT);
- }
- else
- {
- TuiWinInfoPtr firstWin, secondWin;
-
- if (curLayout == SRC_DISASSEM_COMMAND)
- {
- firstWin = srcWin;
- secondWin = disassemWin;
- }
- else
- {
- firstWin = dataWin;
- secondWin = (TuiWinInfoPtr) (sourceWindows ())->list[0];
- }
- if (primaryWinInfo == cmdWin)
- { /*
- ** Split the change in height accross the 1st & 2nd windows
- ** adjusting them as well.
- */
- int firstSplitDiff = diff / 2; /* subtract the locator */
- int secondSplitDiff = firstSplitDiff;
-
- if (diff % 2)
- {
- if (firstWin->generic.height >
- secondWin->generic.height)
- if (diff < 0)
- firstSplitDiff--;
- else
- firstSplitDiff++;
- else
- {
- if (diff < 0)
- secondSplitDiff--;
- else
- secondSplitDiff++;
- }
- }
- /* make sure that the minimum hieghts are honored */
- while ((firstWin->generic.height + firstSplitDiff) < 3)
- {
- firstSplitDiff++;
- secondSplitDiff--;
- }
- while ((secondWin->generic.height + secondSplitDiff) < 3)
- {
- secondSplitDiff++;
- firstSplitDiff--;
- }
- _makeInvisibleAndSetNewHeight (
- firstWin,
- firstWin->generic.height + firstSplitDiff);
- secondWin->generic.origin.y = firstWin->generic.height - 1;
- _makeInvisibleAndSetNewHeight (
- secondWin, secondWin->generic.height + secondSplitDiff);
- cmdWin->generic.origin.y = locator->origin.y + 1;
- _makeInvisibleAndSetNewHeight (cmdWin, newHeight);
- }
- else
- {
- if ((cmdWin->generic.height + diff) < 1)
- { /*
- ** If there is no way to increase the command window
- ** take real estate from the 1st or 2nd window.
- */
- if ((cmdWin->generic.height + diff) < 1)
- {
- int i;
- for (i = cmdWin->generic.height + diff;
- (i < 1); i++)
- if (primaryWinInfo == firstWin)
- secondWin->generic.height--;
- else
- firstWin->generic.height--;
- }
- }
- if (primaryWinInfo == firstWin)
- _makeInvisibleAndSetNewHeight (firstWin, newHeight);
- else
- _makeInvisibleAndSetNewHeight (
- firstWin,
- firstWin->generic.height);
- secondWin->generic.origin.y = firstWin->generic.height - 1;
- if (primaryWinInfo == secondWin)
- _makeInvisibleAndSetNewHeight (secondWin, newHeight);
- else
- _makeInvisibleAndSetNewHeight (
- secondWin, secondWin->generic.height);
- cmdWin->generic.origin.y = locator->origin.y + 1;
- if ((cmdWin->generic.height + diff) < 1)
- _makeInvisibleAndSetNewHeight (cmdWin, 1);
- else
- _makeInvisibleAndSetNewHeight (
- cmdWin, cmdWin->generic.height + diff);
- }
- _makeVisibleWithNewHeight (cmdWin);
- _makeVisibleWithNewHeight (secondWin);
- _makeVisibleWithNewHeight (firstWin);
- if (firstWin->generic.contentSize <= 0)
- tuiEraseSourceContent (firstWin, EMPTY_SOURCE_PROMPT);
- if (secondWin->generic.contentSize <= 0)
- tuiEraseSourceContent (secondWin, EMPTY_SOURCE_PROMPT);
- }
- }
- }
-
- return status;
-} /* _tuiAdjustWinHeights */
-
-
-/*
-** _makeInvisibleAndSetNewHeight().
-** Function make the target window (and auxillary windows associated
-** with the targer) invisible, and set the new height and location.
-*/
-static void
-#ifdef __STDC__
-_makeInvisibleAndSetNewHeight (
- TuiWinInfoPtr winInfo,
- int height)
-#else
-_makeInvisibleAndSetNewHeight (winInfo, height)
- TuiWinInfoPtr winInfo;
- int height;
-#endif
-{
- int i;
- struct symtab *s;
- TuiGenWinInfoPtr genWinInfo;
-
-
- m_beInvisible (&winInfo->generic);
- winInfo->generic.height = height;
- if (height > 1)
- winInfo->generic.viewportHeight = height - 1;
- else
- winInfo->generic.viewportHeight = height;
- if (winInfo != cmdWin)
- winInfo->generic.viewportHeight--;
-
- /* Now deal with the auxillary windows associated with winInfo */
- switch (winInfo->generic.type)
- {
- case SRC_WIN:
- case DISASSEM_WIN:
- genWinInfo = winInfo->detail.sourceInfo.executionInfo;
- m_beInvisible (genWinInfo);
- genWinInfo->height = height;
- genWinInfo->origin.y = winInfo->generic.origin.y;
- if (height > 1)
- genWinInfo->viewportHeight = height - 1;
- else
- genWinInfo->viewportHeight = height;
- if (winInfo != cmdWin)
- genWinInfo->viewportHeight--;
-
- if (m_hasLocator (winInfo))
- {
- genWinInfo = locatorWinInfoPtr ();
- m_beInvisible (genWinInfo);
- genWinInfo->origin.y = winInfo->generic.origin.y + height;
- }
- break;
- case DATA_WIN:
- /* delete all data item windows */
- for (i = 0; i < winInfo->generic.contentSize; i++)
- {
- genWinInfo = (TuiGenWinInfoPtr) & ((TuiWinElementPtr)
- winInfo->generic.content[i])->whichElement.dataWindow;
- tuiDelwin (genWinInfo->handle);
- genWinInfo->handle = (WINDOW *) NULL;
- }
- break;
- default:
- break;
- }
-
- return;
-} /* _makeInvisibleAndSetNewHeight */
-
-
-/*
-** _makeVisibleWithNewHeight().
-** Function to make the windows with new heights visible.
-** This means re-creating the windows' content since the window
-** had to be destroyed to be made invisible.
-*/
-static void
-#ifdef __STDC__
-_makeVisibleWithNewHeight (
- TuiWinInfoPtr winInfo)
-#else
-_makeVisibleWithNewHeight (winInfo)
- TuiWinInfoPtr winInfo;
-#endif
-{
- int i;
- struct symtab *s;
-
- m_beVisible (&winInfo->generic);
- checkAndDisplayHighlightIfNeeded (winInfo);
- switch (winInfo->generic.type)
- {
- case SRC_WIN:
- case DISASSEM_WIN:
- freeWinContent (winInfo->detail.sourceInfo.executionInfo);
- m_beVisible (winInfo->detail.sourceInfo.executionInfo);
- if (winInfo->generic.content != (OpaquePtr) NULL)
- {
- TuiLineOrAddress lineOrAddr;
-
- if (winInfo->generic.type == SRC_WIN)
- lineOrAddr.lineNo =
- winInfo->detail.sourceInfo.startLineOrAddr.lineNo;
- else
- lineOrAddr.addr =
- winInfo->detail.sourceInfo.startLineOrAddr.addr;
- freeWinContent (&winInfo->generic);
- tuiUpdateSourceWindow (winInfo,
- current_source_symtab,
- ((winInfo->generic.type == SRC_WIN) ?
- (Opaque) lineOrAddr.lineNo :
- lineOrAddr.addr),
- TRUE);
- }
- else if (selected_frame != (struct frame_info *) NULL)
- {
- Opaque line = 0;
- extern int current_source_line;
-
- s = find_pc_symtab (selected_frame->pc);
- if (winInfo->generic.type == SRC_WIN)
- line = (Opaque) current_source_line;
- else
- line = (Opaque) find_line_pc (s, current_source_line);
- tuiUpdateSourceWindow (winInfo, s, line, TRUE);
- }
- if (m_hasLocator (winInfo))
- {
- m_beVisible (locatorWinInfoPtr ());
- tuiClearLocatorDisplay ();
- tuiShowLocatorContent ();
- }
- break;
- case DATA_WIN:
- tuiDisplayAllData ();
- break;
- case CMD_WIN:
- winInfo->detail.commandInfo.curLine = 0;
- winInfo->detail.commandInfo.curch = 0;
- wmove (winInfo->generic.handle,
- winInfo->detail.commandInfo.curLine,
- winInfo->detail.commandInfo.curch);
- break;
- default:
- break;
- }
-
- return;
-} /* _makeVisibleWithNewHeight */
-
-
-static int
-#ifdef __STDC__
-_newHeightOk (
- TuiWinInfoPtr primaryWinInfo,
- int newHeight)
-#else
-_newHeightOk (primaryWinInfo, newHeight)
- TuiWinInfoPtr primaryWinInfo;
- int newHeight;
-#endif
-{
- int ok = (newHeight < termHeight ());
-
- if (ok)
- {
- int diff, curHeight;
- TuiLayoutType curLayout = currentLayout ();
-
- diff = (newHeight - primaryWinInfo->generic.height) * (-1);
- if (curLayout == SRC_COMMAND || curLayout == DISASSEM_COMMAND)
- {
- ok = ((primaryWinInfo->generic.type == CMD_WIN &&
- newHeight <= (termHeight () - 4) &&
- newHeight >= MIN_CMD_WIN_HEIGHT) ||
- (primaryWinInfo->generic.type != CMD_WIN &&
- newHeight <= (termHeight () - 2) &&
- newHeight >= MIN_WIN_HEIGHT));
- if (ok)
- { /* check the total height */
- TuiWinInfoPtr winInfo;
-
- if (primaryWinInfo == cmdWin)
- winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[0];
- else
- winInfo = cmdWin;
- ok = ((newHeight +
- (winInfo->generic.height + diff)) <= termHeight ());
- }
- }
- else
- {
- int curTotalHeight, totalHeight, minHeight;
- TuiWinInfoPtr firstWin, secondWin;
-
- if (curLayout == SRC_DISASSEM_COMMAND)
- {
- firstWin = srcWin;
- secondWin = disassemWin;
- }
- else
- {
- firstWin = dataWin;
- secondWin = (TuiWinInfoPtr) (sourceWindows ())->list[0];
- }
- /*
- ** We could simply add all the heights to obtain the same result
- ** but below is more explicit since we subtract 1 for the
- ** line that the first and second windows share, and add one
- ** for the locator.
- */
- curTotalHeight =
- (firstWin->generic.height + secondWin->generic.height - 1)
- + cmdWin->generic.height + 1 /*locator*/ ;
- if (primaryWinInfo == cmdWin)
- {
- /* locator included since first & second win share a line */
- ok = ((firstWin->generic.height +
- secondWin->generic.height + diff) >=
- (MIN_WIN_HEIGHT * 2) &&
- newHeight >= MIN_CMD_WIN_HEIGHT);
- if (ok)
- {
- totalHeight = newHeight + (firstWin->generic.height +
- secondWin->generic.height + diff);
- minHeight = MIN_CMD_WIN_HEIGHT;
- }
- }
- else
- {
- minHeight = MIN_WIN_HEIGHT;
- /*
- ** First see if we can increase/decrease the command
- ** window. And make sure that the command window is
- ** at least 1 line
- */
- ok = ((cmdWin->generic.height + diff) > 0);
- if (!ok)
- { /*
- ** Looks like we have to increase/decrease one of
- ** the other windows
- */
- if (primaryWinInfo == firstWin)
- ok = (secondWin->generic.height + diff) >= minHeight;
- else
- ok = (firstWin->generic.height + diff) >= minHeight;
- }
- if (ok)
- {
- if (primaryWinInfo == firstWin)
- totalHeight = newHeight +
- secondWin->generic.height +
- cmdWin->generic.height + diff;
- else
- totalHeight = newHeight +
- firstWin->generic.height +
- cmdWin->generic.height + diff;
- }
- }
- /*
- ** Now make sure that the proposed total height doesn't exceed
- ** the old total height.
- */
- if (ok)
- ok = (newHeight >= minHeight && totalHeight <= curTotalHeight);
- }
- }
-
- return ok;
-} /* _newHeightOk */
-
-
-/*
-** _parseScrollingArgs().
-*/
-static void
-#ifdef __STDC__
-_parseScrollingArgs (
- char *arg,
- TuiWinInfoPtr * winToScroll,
- int *numToScroll)
-#else
-_parseScrollingArgs (arg, winToScroll, numToScroll)
- char *arg;
- TuiWinInfoPtr *winToScroll;
- int *numToScroll;
-#endif
-{
- if (numToScroll)
- *numToScroll = 0;
- *winToScroll = tuiWinWithFocus ();
-
- /*
- ** First set up the default window to scroll, in case there is no
- ** window name arg
- */
- if (arg != (char *) NULL)
- {
- char *buf, *bufPtr;
-
- /* process the number of lines to scroll */
- buf = bufPtr = tuiStrDup (arg);
- if (isdigit (*bufPtr))
- {
- char *numStr;
-
- numStr = bufPtr;
- bufPtr = strchr (bufPtr, ' ');
- if (bufPtr != (char *) NULL)
- {
- *bufPtr = (char) 0;
- if (numToScroll)
- *numToScroll = atoi (numStr);
- bufPtr++;
- }
- else if (numToScroll)
- *numToScroll = atoi (numStr);
- }
-
- /* process the window name if one is specified */
- if (bufPtr != (char *) NULL)
- {
- char *wname;
- int i;
-
- if (*bufPtr == ' ')
- while (*(++bufPtr) == ' ')
- ;
-
- if (*bufPtr != (char) 0)
- wname = bufPtr;
-
- /* Validate the window name */
- for (i = 0; i < strlen (wname); i++)
- wname[i] = toupper (wname[i]);
- *winToScroll = partialWinByName (wname);
-
- if (*winToScroll == (TuiWinInfoPtr) NULL ||
- !(*winToScroll)->generic.isVisible)
- warning ("Invalid window specified. \n\
-The window name specified must be valid and visible.\n");
- else if (*winToScroll == cmdWin)
- *winToScroll = (TuiWinInfoPtr) (sourceWindows ())->list[0];
- }
- tuiFree (buf);
- }
-
- return;
-} /* _parseScrollingArgs */
diff --git a/contrib/gdb/gdb/tui/tuiWin.h b/contrib/gdb/gdb/tui/tuiWin.h
deleted file mode 100644
index cb8455dd8e08..000000000000
--- a/contrib/gdb/gdb/tui/tuiWin.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef _TUI_WIN_H
-#define _TUI_WIN_H
-/*
-** This header file supports
-*/
-
-/*****************************************
-** TYPE DEFINITIONS **
-******************************************/
-
-
-
-/*****************************************
-** PUBLIC FUNCTION EXTERNAL DECLS **
-******************************************/
-extern void tuiScrollForward PARAMS ((TuiWinInfoPtr, int));
-extern void tuiScrollBackward PARAMS ((TuiWinInfoPtr, int));
-extern void tuiScrollLeft PARAMS ((TuiWinInfoPtr, int));
-extern void tuiScrollRight PARAMS ((TuiWinInfoPtr, int));
-extern void tui_vScroll PARAMS ((va_list));
-extern void tuiSetWinFocusTo PARAMS ((TuiWinInfoPtr));
-extern void tuiClearWinFocusFrom PARAMS ((TuiWinInfoPtr));
-extern void tuiClearWinFocus PARAMS ((void));
-extern void tuiResizeAll PARAMS ((void));
-extern void tuiRefreshAll PARAMS ((void));
-extern void tuiSigwinchHandler PARAMS ((int));
-
-#endif /*_TUI_WIN_H*/
diff --git a/contrib/gdb/gdb/umax-xdep.c b/contrib/gdb/gdb/umax-xdep.c
deleted file mode 100644
index d54519e63846..000000000000
--- a/contrib/gdb/gdb/umax-xdep.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/* umax host stuff.
- Copyright (C) 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-
-#include "gdbcore.h"
-#include <sys/ptrace.h>
-#define PTRACE_ATTACH PT_ATTACH
-#define PTRACE_DETACH PT_FREEPROC
-
-#include <sys/file.h>
-#include "gdb_stat.h"
-
-/* Work with core dump and executable files, for GDB.
- This code would be in corefile.c if it weren't machine-dependent. */
-
-void
-core_file_command (filename, from_tty)
- char *filename;
- int from_tty;
-{
- int val;
- extern char registers[];
-
- /* Discard all vestiges of any previous core file
- and mark data and stack spaces as empty. */
-
- if (corefile)
- free (corefile);
- corefile = 0;
-
- if (corechan >= 0)
- close (corechan);
- corechan = -1;
-
- data_start = 0;
- data_end = 0;
- stack_start = STACK_END_ADDR;
- stack_end = STACK_END_ADDR;
-
- /* Now, if a new core file was specified, open it and digest it. */
-
- if (filename)
- {
- filename = tilde_expand (filename);
- make_cleanup (free, filename);
-
- if (have_inferior_p ())
- error ("To look at a core file, you must kill the program with \"kill\".");
- corechan = open (filename, O_RDONLY, 0);
- if (corechan < 0)
- perror_with_name (filename);
- /* 4.2-style (and perhaps also sysV-style) core dump file. */
- {
- struct ptrace_user u;
- int reg_offset;
-
- val = myread (corechan, &u, sizeof u);
- if (val < 0)
- perror_with_name (filename);
- data_start = exec_data_start;
-
- data_end = data_start + u.pt_dsize;
- stack_start = stack_end - u.pt_ssize;
- data_offset = sizeof u;
- stack_offset = data_offset + u.pt_dsize;
- reg_offset = 0;
-
- memcpy (&core_aouthdr, &u.pt_aouthdr, sizeof (AOUTHDR));
- printf_unfiltered ("Core file is from \"%s\".\n", u.pt_comm);
- if (u.pt_signal > 0)
- printf_unfiltered ("Program terminated with signal %d, %s.\n",
- u.pt_signal, safe_strsignal (u.pt_signal));
-
- /* Read the register values out of the core file and store
- them where `read_register' will find them. */
-
- {
- register int regno;
-
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- char buf[MAX_REGISTER_RAW_SIZE];
-
- val = lseek (corechan, register_addr (regno, reg_offset), 0);
- if (val < 0)
- perror_with_name (filename);
-
- val = myread (corechan, buf, sizeof buf);
- if (val < 0)
- perror_with_name (filename);
- supply_register (regno, buf);
- }
- }
- }
- if (filename[0] == '/')
- corefile = savestring (filename, strlen (filename));
- else
- {
- corefile = concat (current_directory, "/", filename, NULL);
- }
-
- flush_cached_frames ();
- select_frame (get_current_frame (), 0);
- validate_files ();
- }
- else if (from_tty)
- printf_unfiltered ("No core file now.\n");
-}
diff --git a/contrib/gdb/gdb/v850-tdep.c b/contrib/gdb/gdb/v850-tdep.c
deleted file mode 100644
index 534e95650662..000000000000
--- a/contrib/gdb/gdb/v850-tdep.c
+++ /dev/null
@@ -1,862 +0,0 @@
-/* Target-dependent code for the NEC V850 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 "obstack.h"
-#include "target.h"
-#include "value.h"
-#include "bfd.h"
-#include "gdb_string.h"
-#include "gdbcore.h"
-#include "symfile.h"
-#include "arch-utils.h"
-#include "regcache.h"
-
-
-static char *v850_generic_reg_names[] = REGISTER_NAMES;
-
-static char *v850e_reg_names[] =
-{
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
- "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
- "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
- "eipc", "eipsw", "fepc", "fepsw", "ecr", "psw", "sr6", "sr7",
- "sr8", "sr9", "sr10", "sr11", "sr12", "sr13", "sr14", "sr15",
- "ctpc", "ctpsw", "dbpc", "dbpsw", "ctbp", "sr21", "sr22", "sr23",
- "sr24", "sr25", "sr26", "sr27", "sr28", "sr29", "sr30", "sr31",
- "pc", "fp"
-};
-
-char **v850_register_names = v850_generic_reg_names;
-
-struct
- {
- char **regnames;
- int mach;
- }
-v850_processor_type_table[] =
-{
- {
- v850_generic_reg_names, bfd_mach_v850
- }
- ,
- {
- v850e_reg_names, bfd_mach_v850e
- }
- ,
- {
- v850e_reg_names, bfd_mach_v850ea
- }
- ,
- {
- NULL, 0
- }
-};
-
-/* Info gleaned from scanning a function's prologue. */
-
-struct pifsr /* Info about one saved reg */
- {
- int framereg; /* Frame reg (SP or FP) */
- int offset; /* Offset from framereg */
- int cur_frameoffset; /* Current frameoffset */
- int reg; /* Saved register number */
- };
-
-struct prologue_info
- {
- int framereg;
- int frameoffset;
- int start_function;
- struct pifsr *pifsrs;
- };
-
-static CORE_ADDR v850_scan_prologue (CORE_ADDR pc, struct prologue_info *fs);
-
-
-/* Should call_function allocate stack space for a struct return? */
-int
-v850_use_struct_convention (int gcc_p, struct type *type)
-{
- return (TYPE_NFIELDS (type) > 1 || TYPE_LENGTH (type) > 4);
-}
-
-
-
-/* Structure for mapping bits in register lists to register numbers. */
-struct reg_list
-{
- long mask;
- int regno;
-};
-
-/* Helper function for v850_scan_prologue to handle prepare instruction. */
-
-static void
-handle_prepare (int insn, int insn2, CORE_ADDR * current_pc_ptr,
- struct prologue_info *pi, struct pifsr **pifsr_ptr)
-{
- CORE_ADDR current_pc = *current_pc_ptr;
- struct pifsr *pifsr = *pifsr_ptr;
- long next = insn2 & 0xffff;
- long list12 = ((insn & 1) << 16) + (next & 0xffe0);
- long offset = (insn & 0x3e) << 1;
- static struct reg_list reg_table[] =
- {
- {0x00800, 20}, /* r20 */
- {0x00400, 21}, /* r21 */
- {0x00200, 22}, /* r22 */
- {0x00100, 23}, /* r23 */
- {0x08000, 24}, /* r24 */
- {0x04000, 25}, /* r25 */
- {0x02000, 26}, /* r26 */
- {0x01000, 27}, /* r27 */
- {0x00080, 28}, /* r28 */
- {0x00040, 29}, /* r29 */
- {0x10000, 30}, /* ep */
- {0x00020, 31}, /* lp */
- {0, 0} /* end of table */
- };
- int i;
-
- if ((next & 0x1f) == 0x0b) /* skip imm16 argument */
- current_pc += 2;
- else if ((next & 0x1f) == 0x13) /* skip imm16 argument */
- current_pc += 2;
- else if ((next & 0x1f) == 0x1b) /* skip imm32 argument */
- current_pc += 4;
-
- /* Calculate the total size of the saved registers, and add it
- it to the immediate value used to adjust SP. */
- for (i = 0; reg_table[i].mask != 0; i++)
- if (list12 & reg_table[i].mask)
- offset += REGISTER_RAW_SIZE (regtable[i].regno);
- pi->frameoffset -= offset;
-
- /* Calculate the offsets of the registers relative to the value
- the SP will have after the registers have been pushed and the
- imm5 value has been subtracted from it. */
- if (pifsr)
- {
- for (i = 0; reg_table[i].mask != 0; i++)
- {
- if (list12 & reg_table[i].mask)
- {
- int reg = reg_table[i].regno;
- offset -= REGISTER_RAW_SIZE (reg);
- pifsr->reg = reg;
- pifsr->offset = offset;
- pifsr->cur_frameoffset = pi->frameoffset;
-#ifdef DEBUG
- printf_filtered ("\tSaved register r%d, offset %d", reg, pifsr->offset);
-#endif
- pifsr++;
- }
- }
- }
-#ifdef DEBUG
- printf_filtered ("\tfound ctret after regsave func");
-#endif
-
- /* Set result parameters. */
- *current_pc_ptr = current_pc;
- *pifsr_ptr = pifsr;
-}
-
-
-/* Helper function for v850_scan_prologue to handle pushm/pushl instructions.
- FIXME: the SR bit of the register list is not supported; must check
- that the compiler does not ever generate this bit. */
-
-static void
-handle_pushm (int insn, int insn2, struct prologue_info *pi,
- struct pifsr **pifsr_ptr)
-{
- struct pifsr *pifsr = *pifsr_ptr;
- long list12 = ((insn & 0x0f) << 16) + (insn2 & 0xfff0);
- long offset = 0;
- static struct reg_list pushml_reg_table[] =
- {
- {0x80000, PS_REGNUM}, /* PSW */
- {0x40000, 1}, /* r1 */
- {0x20000, 2}, /* r2 */
- {0x10000, 3}, /* r3 */
- {0x00800, 4}, /* r4 */
- {0x00400, 5}, /* r5 */
- {0x00200, 6}, /* r6 */
- {0x00100, 7}, /* r7 */
- {0x08000, 8}, /* r8 */
- {0x04000, 9}, /* r9 */
- {0x02000, 10}, /* r10 */
- {0x01000, 11}, /* r11 */
- {0x00080, 12}, /* r12 */
- {0x00040, 13}, /* r13 */
- {0x00020, 14}, /* r14 */
- {0x00010, 15}, /* r15 */
- {0, 0} /* end of table */
- };
- static struct reg_list pushmh_reg_table[] =
- {
- {0x80000, 16}, /* r16 */
- {0x40000, 17}, /* r17 */
- {0x20000, 18}, /* r18 */
- {0x10000, 19}, /* r19 */
- {0x00800, 20}, /* r20 */
- {0x00400, 21}, /* r21 */
- {0x00200, 22}, /* r22 */
- {0x00100, 23}, /* r23 */
- {0x08000, 24}, /* r24 */
- {0x04000, 25}, /* r25 */
- {0x02000, 26}, /* r26 */
- {0x01000, 27}, /* r27 */
- {0x00080, 28}, /* r28 */
- {0x00040, 29}, /* r29 */
- {0x00010, 30}, /* r30 */
- {0x00020, 31}, /* r31 */
- {0, 0} /* end of table */
- };
- struct reg_list *reg_table;
- int i;
-
- /* Is this a pushml or a pushmh? */
- if ((insn2 & 7) == 1)
- reg_table = pushml_reg_table;
- else
- reg_table = pushmh_reg_table;
-
- /* Calculate the total size of the saved registers, and add it
- it to the immediate value used to adjust SP. */
- for (i = 0; reg_table[i].mask != 0; i++)
- if (list12 & reg_table[i].mask)
- offset += REGISTER_RAW_SIZE (regtable[i].regno);
- pi->frameoffset -= offset;
-
- /* Calculate the offsets of the registers relative to the value
- the SP will have after the registers have been pushed and the
- imm5 value is subtracted from it. */
- if (pifsr)
- {
- for (i = 0; reg_table[i].mask != 0; i++)
- {
- if (list12 & reg_table[i].mask)
- {
- int reg = reg_table[i].regno;
- offset -= REGISTER_RAW_SIZE (reg);
- pifsr->reg = reg;
- pifsr->offset = offset;
- pifsr->cur_frameoffset = pi->frameoffset;
-#ifdef DEBUG
- printf_filtered ("\tSaved register r%d, offset %d", reg, pifsr->offset);
-#endif
- pifsr++;
- }
- }
- }
-#ifdef DEBUG
- printf_filtered ("\tfound ctret after regsave func");
-#endif
-
- /* Set result parameters. */
- *pifsr_ptr = pifsr;
-}
-
-
-
-
-/* Function: scan_prologue
- Scan the prologue of the function that contains PC, and record what
- we find in PI. PI->fsr must be zeroed by the called. Returns the
- pc after the prologue. Note that the addresses saved in pi->fsr
- are actually just frame relative (negative offsets from the frame
- pointer). This is because we don't know the actual value of the
- frame pointer yet. In some circumstances, the frame pointer can't
- be determined till after we have scanned the prologue. */
-
-static CORE_ADDR
-v850_scan_prologue (CORE_ADDR pc, struct prologue_info *pi)
-{
- CORE_ADDR func_addr, prologue_end, current_pc;
- struct pifsr *pifsr, *pifsr_tmp;
- int fp_used;
- int ep_used;
- int reg;
- CORE_ADDR save_pc, save_end;
- int regsave_func_p;
- int r12_tmp;
-
- /* First, figure out the bounds of the prologue so that we can limit the
- search to something reasonable. */
-
- if (find_pc_partial_function (pc, NULL, &func_addr, NULL))
- {
- struct symtab_and_line sal;
-
- sal = find_pc_line (func_addr, 0);
-
- if (func_addr == entry_point_address ())
- pi->start_function = 1;
- else
- pi->start_function = 0;
-
-#if 0
- if (sal.line == 0)
- prologue_end = pc;
- else
- prologue_end = sal.end;
-#else
- prologue_end = pc;
-#endif
- }
- else
- { /* We're in the boondocks */
- func_addr = pc - 100;
- prologue_end = pc;
- }
-
- prologue_end = min (prologue_end, pc);
-
- /* Now, search the prologue looking for instructions that setup fp, save
- rp, adjust sp and such. We also record the frame offset of any saved
- registers. */
-
- pi->frameoffset = 0;
- pi->framereg = SP_REGNUM;
- fp_used = 0;
- ep_used = 0;
- pifsr = pi->pifsrs;
- regsave_func_p = 0;
- save_pc = 0;
- save_end = 0;
- r12_tmp = 0;
-
-#ifdef DEBUG
- printf_filtered ("Current_pc = 0x%.8lx, prologue_end = 0x%.8lx\n",
- (long) func_addr, (long) prologue_end);
-#endif
-
- for (current_pc = func_addr; current_pc < prologue_end;)
- {
- int insn;
- int insn2 = -1; /* dummy value */
-
-#ifdef DEBUG
- printf_filtered ("0x%.8lx ", (long) current_pc);
- TARGET_PRINT_INSN (current_pc, &tm_print_insn_info);
-#endif
-
- insn = read_memory_unsigned_integer (current_pc, 2);
- current_pc += 2;
- if ((insn & 0x0780) >= 0x0600) /* Four byte instruction? */
- {
- insn2 = read_memory_unsigned_integer (current_pc, 2);
- current_pc += 2;
- }
-
- if ((insn & 0xffc0) == ((10 << 11) | 0x0780) && !regsave_func_p)
- { /* jarl <func>,10 */
- long low_disp = insn2 & ~(long) 1;
- long disp = (((((insn & 0x3f) << 16) + low_disp)
- & ~(long) 1) ^ 0x00200000) - 0x00200000;
-
- save_pc = current_pc;
- save_end = prologue_end;
- regsave_func_p = 1;
- current_pc += disp - 4;
- prologue_end = (current_pc
- + (2 * 3) /* moves to/from ep */
- + 4 /* addi <const>,sp,sp */
- + 2 /* jmp [r10] */
- + (2 * 12) /* sst.w to save r2, r20-r29, r31 */
- + 20); /* slop area */
-
-#ifdef DEBUG
- printf_filtered ("\tfound jarl <func>,r10, disp = %ld, low_disp = %ld, new pc = 0x%.8lx\n",
- disp, low_disp, (long) current_pc + 2);
-#endif
- continue;
- }
- else if ((insn & 0xffc0) == 0x0200 && !regsave_func_p)
- { /* callt <imm6> */
- long ctbp = read_register (CTBP_REGNUM);
- long adr = ctbp + ((insn & 0x3f) << 1);
-
- save_pc = current_pc;
- save_end = prologue_end;
- regsave_func_p = 1;
- current_pc = ctbp + (read_memory_unsigned_integer (adr, 2) & 0xffff);
- prologue_end = (current_pc
- + (2 * 3) /* prepare list2,imm5,sp/imm */
- + 4 /* ctret */
- + 20); /* slop area */
-
-#ifdef DEBUG
- printf_filtered ("\tfound callt, ctbp = 0x%.8lx, adr = %.8lx, new pc = 0x%.8lx\n",
- ctbp, adr, (long) current_pc);
-#endif
- continue;
- }
- else if ((insn & 0xffc0) == 0x0780) /* prepare list2,imm5 */
- {
- handle_prepare (insn, insn2, &current_pc, pi, &pifsr);
- continue;
- }
- else if (insn == 0x07e0 && regsave_func_p && insn2 == 0x0144)
- { /* ctret after processing register save function */
- current_pc = save_pc;
- prologue_end = save_end;
- regsave_func_p = 0;
-#ifdef DEBUG
- printf_filtered ("\tfound ctret after regsave func");
-#endif
- continue;
- }
- else if ((insn & 0xfff0) == 0x07e0 && (insn2 & 5) == 1)
- { /* pushml, pushmh */
- handle_pushm (insn, insn2, pi, &pifsr);
- continue;
- }
- else if ((insn & 0xffe0) == 0x0060 && regsave_func_p)
- { /* jmp after processing register save function */
- current_pc = save_pc;
- prologue_end = save_end;
- regsave_func_p = 0;
-#ifdef DEBUG
- printf_filtered ("\tfound jmp after regsave func");
-#endif
- continue;
- }
- else if ((insn & 0x07c0) == 0x0780 /* jarl or jr */
- || (insn & 0xffe0) == 0x0060 /* jmp */
- || (insn & 0x0780) == 0x0580) /* branch */
- {
-#ifdef DEBUG
- printf_filtered ("\n");
-#endif
- break; /* Ran into end of prologue */
- }
-
- else if ((insn & 0xffe0) == ((SP_REGNUM << 11) | 0x0240)) /* add <imm>,sp */
- pi->frameoffset += ((insn & 0x1f) ^ 0x10) - 0x10;
- else if (insn == ((SP_REGNUM << 11) | 0x0600 | SP_REGNUM)) /* addi <imm>,sp,sp */
- pi->frameoffset += insn2;
- else if (insn == ((FP_RAW_REGNUM << 11) | 0x0000 | SP_REGNUM)) /* mov sp,fp */
- {
- fp_used = 1;
- pi->framereg = FP_RAW_REGNUM;
- }
-
- else if (insn == ((R12_REGNUM << 11) | 0x0640 | R0_REGNUM)) /* movhi hi(const),r0,r12 */
- r12_tmp = insn2 << 16;
- else if (insn == ((R12_REGNUM << 11) | 0x0620 | R12_REGNUM)) /* movea lo(const),r12,r12 */
- r12_tmp += insn2;
- else if (insn == ((SP_REGNUM << 11) | 0x01c0 | R12_REGNUM) && r12_tmp) /* add r12,sp */
- pi->frameoffset = r12_tmp;
- else if (insn == ((EP_REGNUM << 11) | 0x0000 | SP_REGNUM)) /* mov sp,ep */
- ep_used = 1;
- else if (insn == ((EP_REGNUM << 11) | 0x0000 | R1_REGNUM)) /* mov r1,ep */
- ep_used = 0;
- else if (((insn & 0x07ff) == (0x0760 | SP_REGNUM) /* st.w <reg>,<offset>[sp] */
- || (fp_used
- && (insn & 0x07ff) == (0x0760 | FP_RAW_REGNUM))) /* st.w <reg>,<offset>[fp] */
- && pifsr
- && (((reg = (insn >> 11) & 0x1f) >= SAVE1_START_REGNUM && reg <= SAVE1_END_REGNUM)
- || (reg >= SAVE2_START_REGNUM && reg <= SAVE2_END_REGNUM)
- || (reg >= SAVE3_START_REGNUM && reg <= SAVE3_END_REGNUM)))
- {
- pifsr->reg = reg;
- pifsr->offset = insn2 & ~1;
- pifsr->cur_frameoffset = pi->frameoffset;
-#ifdef DEBUG
- printf_filtered ("\tSaved register r%d, offset %d", reg, pifsr->offset);
-#endif
- pifsr++;
- }
-
- else if (ep_used /* sst.w <reg>,<offset>[ep] */
- && ((insn & 0x0781) == 0x0501)
- && pifsr
- && (((reg = (insn >> 11) & 0x1f) >= SAVE1_START_REGNUM && reg <= SAVE1_END_REGNUM)
- || (reg >= SAVE2_START_REGNUM && reg <= SAVE2_END_REGNUM)
- || (reg >= SAVE3_START_REGNUM && reg <= SAVE3_END_REGNUM)))
- {
- pifsr->reg = reg;
- pifsr->offset = (insn & 0x007e) << 1;
- pifsr->cur_frameoffset = pi->frameoffset;
-#ifdef DEBUG
- printf_filtered ("\tSaved register r%d, offset %d", reg, pifsr->offset);
-#endif
- pifsr++;
- }
-
-#ifdef DEBUG
- printf_filtered ("\n");
-#endif
- }
-
- if (pifsr)
- pifsr->framereg = 0; /* Tie off last entry */
-
- /* Fix up any offsets to the final offset. If a frame pointer was created, use it
- instead of the stack pointer. */
- for (pifsr_tmp = pi->pifsrs; pifsr_tmp && pifsr_tmp != pifsr; pifsr_tmp++)
- {
- pifsr_tmp->offset -= pi->frameoffset - pifsr_tmp->cur_frameoffset;
- pifsr_tmp->framereg = pi->framereg;
-
-#ifdef DEBUG
- printf_filtered ("Saved register r%d, offset = %d, framereg = r%d\n",
- pifsr_tmp->reg, pifsr_tmp->offset, pifsr_tmp->framereg);
-#endif
- }
-
-#ifdef DEBUG
- printf_filtered ("Framereg = r%d, frameoffset = %d\n", pi->framereg, pi->frameoffset);
-#endif
-
- return current_pc;
-}
-
-/* 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 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
- 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 ()).
-
- 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
-v850_init_extra_frame_info (struct frame_info *fi)
-{
- struct prologue_info pi;
- struct pifsr pifsrs[NUM_REGS + 1], *pifsr;
-
- if (fi->next)
- fi->pc = FRAME_SAVED_PC (fi->next);
-
- memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
-
- /* The call dummy doesn't save any registers on the stack, so we can return
- now. */
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return;
-
- pi.pifsrs = pifsrs;
-
- v850_scan_prologue (fi->pc, &pi);
-
- if (!fi->next && pi.framereg == SP_REGNUM)
- fi->frame = read_register (pi.framereg) - pi.frameoffset;
-
- for (pifsr = pifsrs; pifsr->framereg; pifsr++)
- {
- fi->fsr.regs[pifsr->reg] = pifsr->offset + fi->frame;
-
- if (pifsr->framereg == SP_REGNUM)
- fi->fsr.regs[pifsr->reg] += pi.frameoffset;
- }
-}
-
-/* Function: frame_chain
- Figure out the frame prior to FI. Unfortunately, this involves
- scanning the prologue of the caller, which will also be done
- shortly by v850_init_extra_frame_info. For the dummy frame, we
- just return the stack pointer that was in use at the time the
- function call was made. */
-
-CORE_ADDR
-v850_frame_chain (struct frame_info *fi)
-{
- struct prologue_info pi;
- CORE_ADDR callers_pc, fp;
-
- /* First, find out who called us */
- callers_pc = FRAME_SAVED_PC (fi);
- /* If caller is a call-dummy, then our FP bears no relation to his FP! */
- fp = v850_find_callers_reg (fi, FP_RAW_REGNUM);
- if (PC_IN_CALL_DUMMY (callers_pc, fp, fp))
- return fp; /* caller is call-dummy: return oldest value of FP */
-
- /* Caller is NOT a call-dummy, so everything else should just work.
- Even if THIS frame is a call-dummy! */
- pi.pifsrs = NULL;
-
- v850_scan_prologue (callers_pc, &pi);
-
- if (pi.start_function)
- return 0; /* Don't chain beyond the start function */
-
- if (pi.framereg == FP_RAW_REGNUM)
- return v850_find_callers_reg (fi, pi.framereg);
-
- return fi->frame - pi.frameoffset;
-}
-
-/* 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
-v850_find_callers_reg (struct frame_info *fi, int regnum)
-{
- for (; fi; fi = fi->next)
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return generic_read_register_dummy (fi->pc, fi->frame, regnum);
- else if (fi->fsr.regs[regnum] != 0)
- return read_memory_unsigned_integer (fi->fsr.regs[regnum],
- REGISTER_RAW_SIZE (regnum));
-
- return read_register (regnum);
-}
-
-/* Function: skip_prologue
- Return the address of the first code past the prologue of the function. */
-
-CORE_ADDR
-v850_skip_prologue (CORE_ADDR pc)
-{
- CORE_ADDR func_addr, func_end;
-
- /* See what the symbol table says */
-
- if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
- {
- struct symtab_and_line sal;
-
- sal = find_pc_line (func_addr, 0);
-
- if (sal.line != 0 && sal.end < func_end)
- return 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. */
- return pc;
- }
-
-/* We can't find the start of this function, so there's nothing we can do. */
- return pc;
-}
-
-/* Function: pop_frame
- This routine gets called when either the user uses the `return'
- command, or the call dummy breakpoint gets hit. */
-
-void
-v850_pop_frame (struct frame_info *frame)
-{
- int regnum;
-
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- generic_pop_dummy_frame ();
- else
- {
- write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
-
- for (regnum = 0; regnum < NUM_REGS; regnum++)
- if (frame->fsr.regs[regnum] != 0)
- write_register (regnum,
- read_memory_unsigned_integer (frame->fsr.regs[regnum],
- REGISTER_RAW_SIZE (regnum)));
-
- write_register (SP_REGNUM, FRAME_FP (frame));
- }
-
- flush_cached_frames ();
-}
-
-/* Function: push_arguments
- Setup arguments and RP for a call to the target. First four args
- go in R6->R9, subsequent args go into sp + 16 -> sp + ... Structs
- are passed by reference. 64 bit quantities (doubles and long
- longs) may be split between the regs and the stack. When calling a
- function that returns a struct, a pointer to the struct is passed
- in as a secret first argument (always in R6).
-
- Stack space for the args has NOT been allocated: that job is up to us.
- */
-
-CORE_ADDR
-v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- unsigned char struct_return, CORE_ADDR struct_addr)
-{
- int argreg;
- int argnum;
- int len = 0;
- int stack_offset;
-
- /* First, just for safety, make sure stack is aligned */
- sp &= ~3;
-
- /* Now make space on the stack for the args. */
- for (argnum = 0; argnum < nargs; argnum++)
- len += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 3) & ~3);
- sp -= len; /* possibly over-allocating, but it works... */
- /* (you might think we could allocate 16 bytes */
- /* less, but the ABI seems to use it all! ) */
- argreg = ARG0_REGNUM;
-
- /* the struct_return pointer occupies the first parameter-passing reg */
- if (struct_return)
- write_register (argreg++, struct_addr);
-
- stack_offset = 16;
- /* The offset onto the stack at which we will start copying parameters
- (after the registers are used up) begins at 16 rather than at zero.
- I don't really know why, that's just the way it seems to work. */
-
- /* 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. */
- for (argnum = 0; argnum < nargs; argnum++)
- {
- int len;
- char *val;
- char valbuf[REGISTER_RAW_SIZE (ARG0_REGNUM)];
-
- if (TYPE_CODE (VALUE_TYPE (*args)) == TYPE_CODE_STRUCT
- && TYPE_LENGTH (VALUE_TYPE (*args)) > 8)
- {
- store_address (valbuf, 4, VALUE_ADDRESS (*args));
- len = 4;
- val = valbuf;
- }
- else
- {
- len = TYPE_LENGTH (VALUE_TYPE (*args));
- val = (char *) VALUE_CONTENTS (*args);
- }
-
- while (len > 0)
- if (argreg <= ARGLAST_REGNUM)
- {
- CORE_ADDR regval;
-
- regval = extract_address (val, REGISTER_RAW_SIZE (argreg));
- write_register (argreg, regval);
-
- len -= REGISTER_RAW_SIZE (argreg);
- val += REGISTER_RAW_SIZE (argreg);
- argreg++;
- }
- else
- {
- write_memory (sp + stack_offset, val, 4);
-
- len -= 4;
- val += 4;
- stack_offset += 4;
- }
- 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
-v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
- write_register (RP_REGNUM, CALL_DUMMY_ADDRESS ());
- 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
-v850_frame_saved_pc (struct frame_info *fi)
-{
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return generic_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
- else
- return v850_find_callers_reg (fi, RP_REGNUM);
-}
-
-
-/* Function: fix_call_dummy
- Pokes the callee function's address into the CALL_DUMMY assembly stub.
- Assumes that the CALL_DUMMY looks like this:
- jarl <offset24>, r31
- trap
- */
-
-int
-v850_fix_call_dummy (char *dummy, CORE_ADDR sp, CORE_ADDR fun, int nargs,
- struct value **args, struct type *type, int gcc_p)
-{
- long offset24;
-
- offset24 = (long) fun - (long) entry_point_address ();
- offset24 &= 0x3fffff;
- offset24 |= 0xff800000; /* jarl <offset24>, r31 */
-
- store_unsigned_integer ((unsigned int *) &dummy[2], 2, offset24 & 0xffff);
- store_unsigned_integer ((unsigned int *) &dummy[0], 2, offset24 >> 16);
- return 0;
-}
-
-/* Change the register names based on the current machine type. */
-
-static int
-v850_target_architecture_hook (const bfd_arch_info_type *ap)
-{
- int i, j;
-
- if (ap->arch != bfd_arch_v850)
- return 0;
-
- for (i = 0; v850_processor_type_table[i].regnames != NULL; i++)
- {
- if (v850_processor_type_table[i].mach == ap->mach)
- {
- v850_register_names = v850_processor_type_table[i].regnames;
- tm_print_insn_info.mach = ap->mach;
- return 1;
- }
- }
-
- internal_error (__FILE__, __LINE__,
- "Architecture `%s' unrecognized", ap->printable_name);
-}
-
-void
-_initialize_v850_tdep (void)
-{
- tm_print_insn = print_insn_v850;
- target_architecture_hook = v850_target_architecture_hook;
-}
diff --git a/contrib/gdb/gdb/xmodem.c b/contrib/gdb/gdb/xmodem.c
deleted file mode 100644
index 7b8d77d10552..000000000000
--- a/contrib/gdb/gdb/xmodem.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/* XMODEM support for GDB, the GNU debugger.
- Copyright 1995, 2000, 2001 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "serial.h"
-#include "target.h"
-#include "xmodem.h"
-
-/* These definitions are for xmodem protocol. */
-
-#define SOH 0x01
-#define STX 0x02
-#define ACK 0x06
-#define NAK 0x15
-#define EOT 0x04
-#define CANCEL 0x18
-
-static int blknum; /* XMODEM block number */
-static int crcflag; /* Sez we are using CRC's instead of cksums */
-
-static int
-readchar (struct serial *desc, int timeout)
-{
- int c;
-
- c = serial_readchar (desc, timeout);
-
- if (remote_debug > 0)
- fputc_unfiltered (c, gdb_stdlog);
-
- if (c >= 0)
- return c;
-
- if (c == SERIAL_TIMEOUT)
- error ("Timeout reading from remote system.");
-
- perror_with_name ("xmodem.c:readchar()");
-}
-
-#define CRC16 0x1021 /* Generator polynomial (X^16 + X^12 + X^5 + 1) */
-
-static unsigned short *crctab;
-
-/* Call this to init the fast CRC-16 calculation table. */
-
-static void
-crcinit (void)
-{
- static int crctab_inited = 0;
- int val;
-
- if (crctab_inited == 1)
- return;
-
- crctab = xmalloc (256 * sizeof (short));
-
- for (val = 0; val <= 255; val++)
- {
- int i;
- unsigned int crc;
-
- crc = val << 8;
-
- for (i = 0; i < 8; ++i)
- {
- crc <<= 1;
-
- if (crc & 0x10000)
- crc ^= CRC16;
- }
-
- crctab[val] = crc;
- }
-
- crctab_inited = 1;
-}
-
-/* Calculate a CRC-16 for the LEN byte message pointed at by P. */
-
-static unsigned short
-docrc (unsigned char *p, int len)
-{
- unsigned short crc = 0;
-
- while (len-- > 0)
- crc = (crc << 8) ^ crctab[(crc >> 8) ^ *p++];
-
- return crc;
-}
-
-/* Start up the transmit process. Reset state variables. Wait for receiver to
- send NAK or CRC request. */
-
-int
-xmodem_init_xfer (struct serial *desc)
-{
- int c;
- int i;
-
- blknum = 1;
- crcflag = 0;
- crcinit ();
-
- for (i = 1; i <= 10; i++)
- {
- c = readchar (desc, 6);
-
- switch (c)
- {
- case 'C':
- crcflag = 1;
- case NAK:
- return 0;
- default:
- fprintf_unfiltered (gdb_stderr, "xmodem_init_xfer: Got unexpected character %c (0%o)\n", c, c);
- continue;
- case CANCEL: /* target aborted load */
- fprintf_unfiltered (gdb_stderr, "Got a CANCEL from the target.\n");
- continue;
- }
- }
- error ("xmodem_init_xfer: Too many unexpected characters.");
-}
-
-/* Take 128 bytes of data and make a packet out of it.
-
- * Each packet looks like this:
- * +-----+-------+-------+------+-----+
- * | SOH | Seq1. | Seq2. | data | SUM |
- * +-----+-------+-------+------+-----+
- * SOH = 0x01
- * Seq1 = The sequence number.
- * Seq2 = The complement of the sequence number.
- * Data = A 128 bytes of data.
- * SUM = Add the contents of the 128 bytes and use the low-order
- * 8 bits of the result.
- *
- * send_xmodem_packet fills in the XMODEM fields of PACKET and sends it to the
- * remote system. PACKET must be XMODEM_PACKETSIZE bytes long. The data must
- * start 3 bytes after the beginning of the packet to leave room for the
- * XMODEM header. LEN is the length of the data portion of the packet (and
- * must be <= 128 bytes). If it is < 128 bytes, ^Z padding will be added.
- */
-
-void
-xmodem_send_packet (struct serial *desc, unsigned char *packet, int len, int hashmark)
-{
- int i;
- int retries;
- int pktlen;
- int datasize;
-
- /* build the packet header */
-
- packet[1] = blknum;
- packet[2] = ~blknum;
-
- blknum++;
-
- if (len <= XMODEM_DATASIZE)
- {
- packet[0] = SOH;
- datasize = XMODEM_DATASIZE;
- }
- else if (len <= XMODEM_1KDATASIZE)
- {
- packet[0] = STX;
- datasize = XMODEM_1KDATASIZE;
- }
- else
- internal_error (__FILE__, __LINE__, "failed internal consistency check"); /* Packet way too large */
-
- /* Add ^Z padding if packet < 128 (or 1024) bytes */
-
- memset (packet + 3 + len, '\026', datasize - len);
-
- if (crcflag)
- {
- int crc;
-
- crc = docrc (packet + 3, datasize);
-
- packet[3 + datasize] = crc >> 8;
- packet[3 + datasize + 1] = crc;
- pktlen = datasize + 5;
- }
- else
- {
- int sum;
-
- sum = 0;
- for (i = 3; i < datasize + 3; i++)
- sum += packet[i];
-
- packet[3 + datasize] = sum; /* add the checksum */
- pktlen = datasize + 4;
- }
-
- for (retries = 3; retries >= 0; retries--)
- {
- int c;
-
- serial_write (desc, packet, pktlen);
-
- c = readchar (desc, 3);
- switch (c)
- {
- case ACK:
- return;
- case NAK:
- if (!hashmark)
- continue;
- putchar_unfiltered ('-');
- gdb_flush (gdb_stdout);
- continue;
- case CANCEL:
- error ("xmodem_send_packet: Transfer aborted by receiver.");
- default:
- fprintf_unfiltered (gdb_stderr, "xmodem_send_packet: Got unexpected character %c (0%o)\n", c, c);
- continue;
- }
- }
-
- serial_write (desc, "\004", 1); /* Send an EOT */
-
- error ("xmodem_send_packet: Excessive retries.");
-}
-
-/* Finish off the transfer. Send out the EOT, and wait for an ACK. */
-
-void
-xmodem_finish_xfer (struct serial *desc)
-{
- int retries;
-
- for (retries = 10; retries >= 0; retries--)
- {
- int c;
-
- serial_write (desc, "\004", 1); /* Send an EOT */
-
- c = readchar (desc, 3);
- switch (c)
- {
- case ACK:
- return;
- case NAK:
- continue;
- case CANCEL:
- error ("xmodem_finish_xfer: Transfer aborted by receiver.");
- default:
- fprintf_unfiltered (gdb_stderr, "xmodem_send_packet: Got unexpected character %c (0%o)\n", c, c);
- continue;
- }
- }
-
- error ("xmodem_finish_xfer: Excessive retries.");
-}
diff --git a/contrib/gdb/gdb/xmodem.h b/contrib/gdb/gdb/xmodem.h
deleted file mode 100644
index 86c5008d159a..000000000000
--- a/contrib/gdb/gdb/xmodem.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* XMODEM support for GDB, the GNU debugger.
- Copyright 1995, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-int xmodem_init_xfer (struct serial *desc);
-void send_xmodem_packet (struct serial *desc, unsigned char *packet, int len,
- int hashmark);
-void xmodem_finish_xfer (struct serial *desc);
-
-#define XMODEM_DATASIZE 128 /* The data size is ALWAYS 128 */
-#define XMODEM_1KDATASIZE 1024 /* Unless it's 1024!!! */
-#define XMODEM_PACKETSIZE 133 /* data + packet headers and crc */
-#define XMODEM_1KPACKETSIZE 1024 + 5 /* data + packet headers and crc */
-#define XMODEM_DATAOFFSET 3 /* Offset to start of actual data */
diff --git a/contrib/gdb/include/COPYING b/contrib/gdb/include/COPYING
deleted file mode 100644
index a43ea2126fb6..000000000000
--- a/contrib/gdb/include/COPYING
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/contrib/gdb/include/ChangeLog b/contrib/gdb/include/ChangeLog
deleted file mode 100644
index 3594591bb962..000000000000
--- a/contrib/gdb/include/ChangeLog
+++ /dev/null
@@ -1,973 +0,0 @@
-Tue Mar 12 17:29:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (bfd_wrapped_link_hash_lookup): Declare.
- (struct bfd_link_info): Add wrap_hash field.
-
-Wed Feb 14 16:49:17 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
-
- * ieee.h (ieee_record_enum_type): Define
- ieee_external_reference_info_enum.
-
-Fri Feb 2 17:09:25 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (DISASM_RAW_INSN): Delete.
-
-Tue Jan 23 09:21:47 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (INIT_DISASSEMBLE_INFO): Set endian to BFD_ENDIAN_UNKNOWN.
- New argument FPRINTF_FUNC.
-
-Mon Jan 22 16:37:59 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (disassemble_info): New members arch, mach, endian.
- (INIT_DISASSEMBLE_INFO): Initialize them.
- (DISASM_RAW_INSN{,FLAG}): Define.
-
-Thu Jan 18 11:32:38 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * demangle.h (cplus_demangle_opname): Change opname parameter to
- const char *.
- (cplus_mangle_opname): Change return type and opname parameter to
- const char *.
-
-Fri Jan 5 00:01:22 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.h (enum ieee_record): Add ieee_asn_record_enum,
- ieee_at_record_enum, ieee_ty_record_enum, ieee_atn_record_enum,
- ieee_bb_record_enum, and ieee_be_record_enum.
-
-Wed Jan 3 13:12:09 1996 Fred Fish <fnf@cygnus.com>
-
- * obstack.h: Update copyright to 1996.
- (_obstack_memory_used): Declare.
- (obstack_memory_used): Define macro.
-
-Thu Dec 28 11:42:12 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * libiberty.h (xstrdup): Declare.
-
-Thu Dec 21 14:47:17 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * wait.h: Protect all macros with #ifndef.
-
-Tue Oct 24 21:45:40 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add static_link field.
-
-Tue Sep 12 16:28:04 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Add symbol parameter to
- warning callback.
-
-Fri Sep 1 13:11:51 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Change warning callback
- to take BFD, section, and address arguments.
-
-Thu Aug 31 16:45:12 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Remove PE stuff.
-
-Tue Aug 22 03:18:23 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- * libiberty.h: Declare xstrerror. From Pat Rankin.
-
-Mon Aug 21 18:11:36 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Remove PE stuff.
-
-Wed Aug 2 08:14:12 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * dis-asm.h (print_insn_sparc64): Declare.
-
-Mon Jul 10 13:26:49 1995 Eric Youngdale <eric@aib.com>
-
- * bfdlink.h (struct bfd_link_info): Add new field symbolic.
-
-Sun Jul 2 17:48:40 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Change type of base_file to
- PTR.
-
-Thu Jun 29 00:02:45 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Added base_file member.
-
-Tue Jun 20 16:40:04 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * ansidecl.h: win32s is ANSI enough.
-
-Thu May 18 04:25:50 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
-
- * dis-asm.h (print_insn_arm): Delete declaration.
- (print_insn_{little,big}_arm): New declarations.
-
- * floatformat.h (floatformat_arm_ext): Declare.
-
-Sat May 13 10:14:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * coff/pe.h: New file.
- * bfdlink.h (subsytem, stack_heap_parameters): New.
- * coff/i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT,
- NT_DEF_RESERVE, NT_DEF_COMMIT): New.
- * coff/internal.h (internal_filehdr): New fields for PE.
- (IMAGE_DATA_DIRECTORY): New.
- (internal_aouthdr): New fields for PE.
-
-Thu May 4 14:36:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * demangle.h: Don't include ansidecl.h if IN_GCC.
-
-
-Tue Feb 21 00:37:28 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hp-symtab.h: Don't use bitfield enumerations, the HP C compiler
- does not handle them correctly.
-
-
-Thu Feb 9 14:20:27 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * libiberty.h (basename): Don't declare parameter type; some
- systems have this in their header files.
-
-Wed Feb 8 17:35:38 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_hash_entry): Change format of common
- symbol information, to remove restrictions on maximum size and
- alignment power, by using a pointer to a structure instead.
-
-Mon Feb 6 14:55:32 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (enum bfd_link_hash_type): Rename bfd_link_hash_weak
- to bfd_link_hash_undefweak. Add bfd_link_hash_defweak.
-
-Mon Jan 16 21:00:23 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * dis-asm.h (GDB_INIT_DISASSEMBLE_INFO, etc): Remove all
- GDB-specific definitions.
-
-Sun Jan 15 18:39:35 1995 Steve Chamberlain <sac@splat>
-
- * dis-asm.h (print_insn_w65): Declare.
-
-Thu Jan 12 17:51:17 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * libiberty.h (hex_p): Fix sense of test.
-
-Wed Jan 11 22:36:40 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * libiberty.h (_hex_array_size, _hex_bad, _hex_value, hex_init,
- hex_p, hex_value): New macros and declarations, for hex.c.
-
-Fri Jan 6 17:44:14 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * dis-asm.h: Make idempotent.
-
-Wed Dec 14 13:08:43 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * progress.h: New file, empty definitions for progress macros.
-
-
-Fri Nov 25 00:14:05 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hp-symtab.h: New file describing the debug symbols emitted
- by the HP C compilers.
-
-Fri Nov 11 15:48:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size from 24
- to 26 bits, and change u.c.alignment_power from 8 to 6 bits. 6
- bit in the alignment power is enough for a 64 bit address space.
-
-Mon Oct 31 13:02:51 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * demangle.h (cplus_mangle_opname): Declare.
-
-Tue Oct 25 11:38:02 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Fix comments for
- multiple_common field.
-
-Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
- * aout/aout64.h: Only define QMAGIC if it isn't already defined.
-
- * dis-asm.h: Add support for the ARM.
-
-Wed Aug 10 12:51:41 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libiberty.h (strsignal): Document its existence even if we
- can't declare it.
-
-Tue Aug 2 14:40:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * os9k.h: Remove u_int16, u_int32, and owner_id typedefs and
- expand their uses. Those names conflict with Mach headers.
-
-Fri Jul 22 14:17:12 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size into a
- bitfield. Add field u.c.alignment_power.
-
-Sun Jul 10 00:26:39 1994 Ian Dall (dall@hfrd.dsto.gov.au)
-
- * dis-asm.h: Add print_insn_ns32k declaration.
-
-Mon Jun 20 17:13:29 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * bfdlink.h (bfd_link_hash_table): Make creator a const pointer.
-
-Sat Jun 18 16:09:32 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * demangle.h (cplus_demangle_opname): Declare.
-
-Thu Jun 16 15:19:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_info): Add new field shared.
-
-Mon Jun 6 14:39:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_hash_entry): Remove written field:
- not needed for all backends.
-
-Thu Apr 28 19:06:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * dis-asm.h (disassembler): Declare.
-
-Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu)
-
- * obstack.h: Delete use of IN_GCC to control whether
- stddef.h or gstddef.h is included.
-
-Tue Mar 22 13:06:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (enum bfd_link_order_type): Add bfd_data_link_order.
- (struct bfd_link_order): Add data field to union.
-
-Mon Mar 21 18:45:26 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Change bitsize argument
- to add_to_set to reloc. Remove bitsize argument from constructor.
- Comment that reloc_overflow, reloc_dangerous and unattached_reloc
- must handle NULL pointers for reloc location.
- (enum bfd_link_order_type): Add bfd_section_reloc_link_order and
- bfd_symbol_reloc_link_order.
- (struct bfd_link_order): Add reloc field to union.
- (struct bfd_link_order_reloc): Define.
-
-Mon Mar 14 12:27:50 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ieee-float.h: Removed; no longer used.
-
-Tue Mar 1 18:10:49 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * os9k.h: os9000 target specific header file, the header of the
- object file is used now.
-
-Sun Feb 27 21:52:26 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * floatformat.h: New file, intended to replace ieee-float.h.
-
-Sun Feb 20 17:15:42 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
-
- * ansidecl.h (ANSI_PROTOTYPES): Define if using ANSI prototypes.
-
-Wed Feb 16 01:07:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * libiberty.h: Don't declare strsignal, to avoid conflicts with
- Solaris system header files.
-
-Sat Feb 12 22:11:32 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * libiberty.h (xexit): Use __volatile__ to avoid losing if
- compiling with gcc -traditional.
-
-Thu Feb 10 14:05:41 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * libiberty.h: New file. Declares functions provided by
- libiberty.
-
-Tue Feb 8 05:19:52 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- Handle obstack_chunk_alloc returning NULL. This allows
- obstacks to be used by libraries, without forcing them
- to call exit or longjmp.
- * obstack.h (struct obstack): Add alloc_failed flag.
- _obstack_begin, _obstack_begin_1): Declare to return int, not void.
- (obstack_finish): If alloc_failed, return NULL.
- (obstack_base, obstack_next_free, objstack_object_size):
- If alloc_failed, return 0.
- (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
- obstack_int_grow, obstack_blank): If alloc_failed, do nothing that
- could corrupt the obstack.
-
-Mon Jan 24 15:06:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Add name, reloc_name and
- addend argments to reloc_overflow callback.
-
-Fri Jan 21 19:13:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h (print_insn_big_powerpc, print_insn_little_powerpc,
- print_insn_rs6000): Declare.
-
-Thu Jan 6 14:15:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Add bitsize argument to
- add_to_set field. Add new callback named constructor.
-
-Thu Dec 30 10:44:06 1993 Ian Lance Taylor (ian@rtl.cygnus.com)
-
- * bfdlink.h: New file for new BFD linker backend routines.
-
-Mon Nov 29 10:43:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h (enum dis_insn_tyupe): Remove non-ANSI trailing comma.
-
-Sat Oct 2 20:42:26 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h: Move comment to right place.
-
-Mon Aug 9 19:03:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * obstack.h (obstack_chunkfun, obstack_freefun): Add defns from
- previous version. Are these Cygnus local changes?
-
-Fri Aug 6 17:05:47 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * getopt.h, obstack.h: Update to latest FSF version.
-
-Mon Aug 2 16:37:14 1993 Stu Grossman (grossman at cygnus.com)
-
- * coff/i386.h: Add Lynx magic number.
-
-Mon Aug 2 14:45:29 1993 John Gilmore (gnu@cygnus.com)
-
- * dis-asm.h: Move enum outside of struct defn to avoid warnings.
-
-Mon Aug 2 08:49:30 1993 Stu Grossman (grossman at cygnus.com)
-
- * wait.h (WEXITSTATUS, WSTOPSIG): Mask down to 8 bits. This is
- for systems that store stuff into the high 16 bits of a wait
- status.
-
-Fri Jul 30 18:38:02 1993 John Gilmore (gnu@cygnus.com)
-
- * dis-asm.h: Add new fields insn_info_valid, branch_delay_insns,
- data_size, insn_type, target, target2. These are used to return
- information from the instruction decoders back to the calling
- program. Add comments, make more readable.
-
-Mon Jul 19 22:14:14 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * nlm: New directory containing NLM/NetWare includes.
-
-Thu Jul 15 12:10:04 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * dis-asm.h (struct disassemble_info): New field application_data.
-
-Thu Jul 15 12:41:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h: Added declaration of print_insn_m88k.
-
-Thu Jul 8 09:05:26 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * opcode/h8300.h: Lots of little fixes for the h8/300h.
-
-Fri Jul 2 10:31:59 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ansidecl.h: Use ANSI macros if __mips and _SYSTYPE_SVR4 are
- defined, since RISC/OS cc handles ANSI declarations in SVR4 mode
- but does not define __STDC__.
-
-Sun Jun 20 18:27:52 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
-
- * dis-asm.h: Don't need to include ansidecl.h any more.
-
-Fri Jun 18 03:22:10 1993 John Gilmore (gnu@cygnus.com)
-
- * oasys.h: Eliminate "int8_type", "int16_type", "int32_type", and
- their variants. These changes are coordinated with corresponding
- changes in ../bfd/oasys.c.
-
-Wed Jun 16 10:43:08 1993 Fred Fish (fnf@cygnus.com)
-
- * bfd.h: Note that it has been removed.
-
-Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- Support for H8/300-H
- * dis-asm.h (print_insn_h8300, print_insn_h8300h): Declare it.
- * coff/h8300.h: New magic number.
- * coff/internal.h: New relocations.
- * opcode/h8300.h: Lots of new opcodes.
-
-Tue Jun 1 07:35:03 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * ansidecl.h (const): Don't define it if it's already defined.
-
-Thu May 27 18:19:51 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * dis-asm.h (print_insn_hppa): Declare it.
-
- * bfd.h: Moved to bfd directory. Small stub here includes it
- without requiring "-I../bfd".
-
-Thu Apr 29 12:06:13 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * bfd.h: Updated with BSF_FUNCTION.
-
-Mon Apr 26 18:15:50 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h, dis-asm.h: Updated with Hitachi SH.
-
-Fri Apr 23 18:41:38 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: Updated with alpha changes.
- * dis-asm.h: Added alpha.
-
-Fri Apr 16 17:35:30 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * bfd.h: Update for signed bfd_*get_*.
-
-Thu Apr 15 09:24:21 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * bfd.h: Updated for file_truncated error.
-
-Thu Apr 8 10:53:47 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ansidecl.h: If no ANSI, define const to be empty.
-
-Thu Apr 1 09:00:10 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * dis-asm.h: Declare a29k and i960 print_insn_*.
-
- * dis-asm.h: Add print_address_func and related stuff.
-
- * dis-asm.h (dis_asm_read_memory): Fix prototype.
-
-Wed Mar 31 17:40:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h: Add print_insn_sparc.
-
-Wed Mar 31 17:51:42 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Updated for BFD_RELOC_MIPS_GPREL and bfd_[gs]et_gp_size
- prototypes.
-
-Wed Mar 31 16:35:12 1993 Stu Grossman (grossman@cygnus.com)
-
- * dis-asm.h: (disassemble_info): Fix typo in prototype of
- dis_asm_memory_error().
-
-Tue Mar 30 19:09:23 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h (disassembler_info): Add read_memory_func,
- memory_error_func, buffer, and length.
- ({GDB_,}INIT_DISASSEMBLE_INFO): Set them.
- print_insn_*: Remove second argument.
-
-Tue Mar 30 14:48:55 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: Update for lma field of section.
-
-Tue Mar 30 12:22:55 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * ansidecl.h: Use ANSI versions on AIX regardless of __STDC__.
-
-Fri Mar 19 14:49:49 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * dis-asm.h: Add h8500.
-
-Thu Mar 18 13:49:09 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * ieee-float.h: Moved from ../gdb.
- * dis-asm.h: New file. Interface to dis-assembler.
-
-Thu Mar 11 10:52:57 1993 Fred Fish (fnf@cygnus.com)
-
- * demangle.h (DMGL_NO_OPTS): Add define (set to 0) to use
- in place of bare 0, for readability reasons.
-
-Tue Mar 2 17:50:11 1993 Fred Fish (fnf@cygnus.com)
-
- * demangle.h: Replace all references to cfront with ARM.
-
-Tue Feb 23 12:21:14 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update for new elements in JUMP_TABLE.
-
-Tue Feb 16 00:51:30 1993 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update for BFD_VERSION 2.1.
-
-Tue Jan 26 11:49:20 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update for SEC_IS_COMMON flag.
-
-Tue Jan 19 12:25:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfd.h: Update for bfd_asymbol_value bug fix.
-
-Fri Jan 8 16:37:18 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfd.h: Update to include ECOFF tdata and target_flavour.
-
-Sun Dec 27 17:52:30 1992 Fred Fish (fnf@cygnus.com)
-
- * bfd.h: Add declaration for bfd_get_size().
-
-Tue Dec 22 22:42:46 1992 Fred Fish (fnf@cygnus.com)
-
- * demangle.h: Protect file from multiple inclusions with
- #if !defined(DEMANGLE_H)...#define DEMANGLE_H...#endif.
-
-Mon Dec 21 21:25:50 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h: Update to get hppa_core_struct from bfd.c.
-
-Thu Dec 17 00:42:35 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update to get tekhex tdata name change from bfd.
-
-Mon Nov 9 23:55:42 1992 John Gilmore (gnu@cygnus.com)
-
- * ansidecl.h: Update comments to discourage use of EXFUN.
-
-Thu Nov 5 16:35:44 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update to bring in SEC_SHARED_LIBRARY.
-
-Thu Nov 5 03:21:32 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update to match EXFUN, bfd_seclet_struct, and SDEF
- cleanups in bfd.
-
-Wed Nov 4 07:28:05 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * bout.h (N_CALLNAME, N_BALNAME): Define as char-type values, so
- widening works consistently.
-
-Fri Oct 16 03:17:08 1992 John Gilmore (gnu@cygnus.com)
-
- * getopt.h: Update to Revised Standard FSF Version.
-
-Thu Oct 15 21:43:22 1992 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * getopt.h (struct option): use the provided enum for has_arg.
-
- * demangle.h (AUTO_DEMANGLING, GNU_DEMANGLING,
- LUCID_DEMANGLING): ultrix compilers require enums to be
- enums and ints to be ints and casts where they meet. cast some
- enums into ints.
-
-Thu Oct 15 04:35:51 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update after comment changes.
-
-Thu Oct 8 09:03:02 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h (bfd_get_symbol_leading_char): new macro for getting in xvec
-
-Thu Sep 3 09:10:50 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h (struct reloc_howto_struct): size needs to be signed if
- it's going to hold negative values.
-
-Sun Aug 30 17:50:27 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * demangle.h: New file, moved from ../gdb. Made independent
- of gdb. Allow demangling style option to be passed as a
- parameter to cplus_demangle(), but using the
- current_demangling_style global as the default.
-
-Sat Aug 29 10:07:55 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Merge comment change from current FSF version.
-
-Thu Aug 27 12:59:29 1992 Brendan Kehoe (brendan@cygnus.com)
-
- * bfd.h: add we32k
-
-Tue Aug 25 15:07:47 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: new after Z8000 stuff
-
-Mon Aug 17 09:01:23 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * bfd.h: Regenerated after page/segment size changes.
-
-Sat Aug 1 13:46:31 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Merge changes from current FSF version.
-
-Mon Jul 20 21:06:23 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h (area_id, flags): Remove, replace with extra_arg,
- use_extra_arg, and maybe_empty_object.
- * obstack.h (OBSTACK_MAYBE_EMPTY_OBJECT, OBSTACK_MMALLOC_LIKE):
- Remove, replaced by maybe_empty_object and use_extra_arg bitfields.
- * obstack.h (obstack_full_begin, _obstack_begin): Remove area_id
- and flags arguments.
- * obstack.h (obstack_alloc_arg): New macro to set extra_arg.
-
-Thu Jul 16 08:12:44 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: new after adding BFD_IS_RELAXABLE
-
-Sat Jul 4 03:22:23 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Regen after adding BSF_FILE.
-
-Mon Jun 29 14:18:36 1992 Fred Fish (fnf at sunfish)
-
- * obstack.h: Convert bcopy() use to memcpy(), which is more
- portable, more standard, and can take advantage of gcc's builtin
- functions for increased performance.
-
-Thu Jun 25 04:46:08 1992 John Gilmore (gnu at cygnus.com)
-
- * ansidecl.h (PARAMS): Incorporate this macro from gdb's defs.h.
- It's a cleaner way to forward-declare function prototypes.
-
-Fri Jun 19 15:46:32 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h: HPPA merge.
-
-Tue Jun 16 21:30:56 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: gratuitous white space changes merged from other prep
- releases.
-
-Thu Jun 11 01:10:55 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Regen'd from bfd.c after removing elf_core_tdata_struct.
-
-Mon May 18 17:29:03 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: merged changes from make-3.62.11.
-
- * getopt.h: merged changes from grep-1.6 (alpha).
-
-Fri May 8 14:53:32 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: merged changes from bison-1.18.
-
-Sat Mar 14 17:25:20 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Add "area_id" and "flags" members to obstack
- structure. Add obstack_chunkfun() and obstack_freefun() to
- set functions explicitly. Convert maybe_empty_object to
- a bit in "flags".
-
-Thu Feb 27 22:01:02 1992 Per Bothner (bothner@cygnus.com)
-
- * wait.h (WIFSTOPPED): Add IBM rs6000-specific version.
-
-Fri Feb 21 20:49:20 1992 John Gilmore (gnu at cygnus.com)
-
- * obstack.h: Add obstack_full_begin.
- * bfd.h, obstack.h: Protolint.
-
-Thu Jan 30 01:18:42 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Remove comma from enum declaration.
-
-Mon Jan 27 22:01:13 1992 Steve Chamberlain (sac at cygnus.com)
-
- * bfd.h : new target entr, bfd_relax_section
-
-Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h, ieee.h, opcode/m68k.h, opcode/sparc.h: ANSIfy enums.
-
-Thu Dec 12 20:59:56 1991 John Gilmore (gnu at cygnus.com)
-
- * fopen-same.h, fopen-bin.h: New files for configuring
- whether fopen distinguishes binary files or not. For use
- by host-dependent config files.
-
-Sat Nov 30 20:46:43 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * bfd.h: change the documentation format.
-
- * created coff, elf and opcode and aout directories. Moved:
-
- aout64.h ==> aout/aout64.h
- ar.h ==> aout/ar.h
- a.out.encap.h ==> aout/encap.h
- a.out.host.h ==> aout/host.h
- a.out.hp.h ==> aout/hp.h
- a.out.sun4.h ==> aout/sun4.h
- ranlib.h ==> aout/ranlib.h
- reloc.h ==> aout/reloc.h
- stab.def ==> aout/stab.def
- stab.gnu.h ==> aout/stab_gnu.h
-
- coff-a29k.h ==> coff/a29k.h
- coff-h8300.h ==> coff/h8300.h
- coff-i386.h ==> coff/i386.h
- coff-i960.h ==> coff/i960.h
- internalcoff.h ==> coff/internal.h
- coff-m68k.h ==> coff/m68k.h
- coff-m88k.h ==> coff/m88k.h
- coff-mips.h ==> coff/mips.h
- coff-rs6000.h ==> coff/rs6000.h
-
- elf-common.h ==> elf/common.h
- dwarf.h ==> elf/dwarf.h
- elf-external.h ==> elf/external.h
- elf-internal.h ==> elf/internal.h
-
- a29k-opcode.h ==> opcode/a29k.h
- arm-opcode.h ==> opcode/arm.h
- h8300-opcode.h ==> opcode/h8300.h
- i386-opcode.h ==> opcode/i386.h
- i860-opcode.h ==> opcode/i860.h
- i960-opcode.h ==> opcode/i960.h
- m68k-opcode.h ==> opcode/m68k.h
- m88k-opcode.h ==> opcode/m88k.h
- mips-opcode.h ==> opcode/mips.h
- np1-opcode.h ==> opcode/np1.h
- ns32k-opcode.h ==> opcode/ns32k.h
- pn-opcode.h ==> opcode/pn.h
- pyr-opcode.h ==> opcode/pyr.h
- sparc-opcode.h ==> opcode/sparc.h
- tahoe-opcode.h ==> opcode/tahoe.h
- vax-opcode.h ==> opcode/vax.h
-
-
-
-Wed Nov 27 10:38:31 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * internalcoff.h: (internal_scnhdr) took out #def dependency, now
- s_nreloc and s_nlnno are always long. (internal_reloc): allways
- has an offset field now.
-
-Fri Nov 22 08:12:58 1991 John Gilmore (gnu at cygnus.com)
-
- * coff-rs6000.h: Lint; use unsigned chars for external fields.
- * internalcoff.h: Lint; cast storage classes to signed char.
-
-Thu Nov 21 21:01:05 1991 Per Bothner (bothner at cygnus.com)
-
- * stab.def: Remove the GNU extended type codes (e.g. N_SETT).
- * aout64.h: The heuristic for distinguishing between
- sunos-style and bsd-style ZMAGIC files (wrt. where the
- text segment starts) is moved into (the default definition of)
- the macro N_HEADER_IN_TEXT. This definition is only used
- if no other definition is used - e.g. bfd/newsos3.c defines
- N_HEADER_IN_TEXT(x) to be always 0 (as before).
-
-Thu Nov 21 11:53:03 1991 John Gilmore (gnu at cygnus.com)
-
- * aout64.h (N_TXTADDR, N_TXTOFF, N_TXTSIZE): New definitions
- that should handle all uses. LOGICAL_ versions deleted.
- Eliminate N_HEADER_IN_TEXT, using a_entry to determine which
- kind of zmagic a.out file we are looking at.
- * coff-rs6000.h: Typo.
-
-Tue Nov 19 18:43:37 1991 Per Bothner (bothner at cygnus.com)
-
- (Note: This is a revised entry, as was aout64.h.)
- * aout64.h: Some cleanups of N_TXTADDR and N_TXTOFF:
- Will now work for both old- and new-style ZMAGIC files,
- depending on N_HEADER_IN_TEXT macro.
- Add LOGICAL_TXTADDR, LOICAL_TXTOFF and LOGICAL_TXTSIZE
- that don't count the exec header as part
- of the text segment, to be consistent with bfd.
- * a.out.sun4.h: Simplified/fixed for previous change.
-
-Mon Nov 18 00:02:06 1991 Fred Fish (fnf at cygnus.com)
-
- * dwarf.h: Update to DWARF draft 5 version from gcc2.
-
-Thu Nov 14 19:44:59 1991 Per Bothner (bothner at cygnus.com)
-
- * stab.def: Added defs for extended GNU symbol types,
- such as N_SETT. These are normally ifdef'd out (because
- of conflicts with a.out.gnu.h), but are used by bfb_stab_name().
-
-Thu Nov 14 19:17:03 1991 Fred Fish (fnf at cygnus.com)
-
- * elf-common.h: Add defines to support ELF symbol table code.
-
-Mon Nov 11 19:01:06 1991 Fred Fish (fnf at cygnus.com)
-
- * elf-internal.h, elf-external.h, elf-common.h: Add support for
- note sections, which are used in ELF core files to hold copies
- of various /proc structures.
-
-Thu Nov 7 08:58:26 1991 Steve Chamberlain (sac at cygnus.com)
-
- * internalcoff.h: took out the M88 dependency in the lineno
- struct.
- * coff-m88k.h: defines GET_LINENO_LNNO and PUT_LINENO_LNNO to use
- 32bit linno entries.
- * a29k-opcode.h: fixed encoding of mtacc
-
-Sun Nov 3 11:54:22 1991 Per Bothner (bothner at cygnus.com)
-
- * bfd.h: Updated from ../bfd/bfd-in.h (q.v).
-
-Fri Nov 1 11:13:53 1991 John Gilmore (gnu at cygnus.com)
-
- * internalcoff.h: Add x_csect defines.
-
-Fri Oct 25 03:18:20 1991 John Gilmore (gnu at cygnus.com)
-
- * Rename COFF-related files in `coff-ARCH.h' form.
- coff-a29k.h, coff-i386.h, coff-i960.h, coff-m68k.h, coff-m88k.h,
- coff-mips.h, coff-rs6000.h to be exact.
-
-Thu Oct 24 22:11:11 1991 John Gilmore (gnu at cygnus.com)
-
- RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and
- John Gilmore.
-
- * a.out.gnu.h: Update slightly.
- * bfd.h: Add new error code, fix doc, add bfd_arch_rs6000.
- * internalcoff.h: Add more F_ codes for filehdr. Add
- rs/6000-dependent fields to aouthdr. Add storage classes
- to syments. Add 6000-specific auxent. Add r_size in reloc.
- * rs6000coff.c: New file.
-
-Thu Oct 24 04:13:20 1991 Fred Fish (fnf at cygnus.com)
-
- * dwarf.h: New file for dwarf support. Copied from gcc2
- distribution.
-
-Wed Oct 16 13:31:45 1991 John Gilmore (gnu at cygnus.com)
-
- * aout64.h: Remove PAGE_SIZE defines; they are target-dependent.
- Add N_FN_SEQ for N_FN symbol type used on Sequent machines.
- * stab.def: Include N_FN_SEQ in table.
- * bout.h: External formats of structures use unsigned chars.
-
-Fri Oct 11 12:40:43 1991 Steve Chamberlain (steve at cygnus.com)
-
- * bfd.h:upgrade from bfd.c
- * internalcoff.h: add n_name, n_zeroes and n_offset macros
- * amdcoff.h: Define OMAGIC and AOUTHDRSZ.
-
-Fri Oct 11 10:58:06 1991 Per Bothner (bothner at cygnus.com)
-
- * a.out.host.h: Change SEGMENT_SIZE to 0x1000 for Sony.
- * bfd.h (align_power): Add (actually move) comment.
-
-Tue Oct 8 15:29:32 1991 Per Bothner (bothner at cygnus.com)
-
- * sys/h-rtbsd.h: Define MISSING_VFPRINT (for binutils/bucomm.c).
-
-Sun Oct 6 19:24:39 1991 John Gilmore (gnu at cygnus.com)
-
- * aout64.h: Move struct internal_exec to ../bfd/libaout.h so
- it can be shared by all `a.out-family' code. Rename
- EXTERNAL_LIST_SIZE to EXTERNAL_NLIST_SIZE. Use basic types
- for nlist members, and make strx integral rather than pointer.
- More commentary on n_type values.
- * bout.h: Provide a struct external_exec rather than an
- internal_exec.
- * m68kcoff.h: Remove `tagentries' which snuck in from the i960
- COFF port.
-
-Fri Oct 4 01:25:59 1991 John Gilmore (gnu at cygnus.com)
-
- * h8300-opcode.h: Remove `_enum' from the typedef for an enum.
- * bfd.h: Update to match bfd changes.
-
- * sys/h-i386mach.h, sysdep.h: Add 386 Mach host support.
-
-Tue Oct 1 04:58:42 1991 John Gilmore (gnu at cygnus.com)
-
- * bfd.h, elf-common.h, elf-external.h, elf-internal.h:
- Add preliminary ELF support, sufficient for GDB, from Fred Fish.
- * sysdep.h, sys/h-amix.h: Support Amiga SVR4.
-
- * sys/h-vaxult.h: Make it work. (David Taylor <taylor@think.com>)
- * a.out.vax.h: Remove unused and confusing file.
-
-Mon Sep 30 12:52:35 1991 Per Bothner (bothner at cygnus.com)
-
- * sysdep.h: Define NEWSOS3_SYS, and use it.
-
-Fri Sep 20 13:38:21 1991 John Gilmore (gnu at cygnus.com)
-
- * a.out.gnu.h (N_FN): Its value *really is* 0x1F.
- Fix it, and add comments warning about or-ing N_EXT with it
- and/or N_WARNING.
- * aout64.h (N_FN): Fix value, add comments about N_EXT.
- * stab.def (table at end): Update to show all the type
- values <0x20, including low order bits. Move N_FN to
- its rightful place.
-
-Tue Sep 17 17:41:37 1991 Stu Grossman (grossman at cygnus.com)
-
- * sys/h-irix3.h: sgi/irix support.
-
-Tue Sep 17 07:52:59 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * stab.def (N_DEFD): Add GNU Modula-2 debug stab, from Andrew
- Beers.
-
-Thu Sep 12 14:12:59 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * internalcoff.h (SYMNMLEN, FILNMLEN, DIMNUM): Define these
- for internalcoff, separately from the various external coff's.
- * amdcoff.h, bcs88kcoff.h, i386coff.h, intel-coff.h, m68kcoff.h,
- m88k-bcs.h: Prefix SYMNMLEN, FILNMLEN, and DIMNUM with E_'s for
- the external struct definitions.
- * ecoff.h: Remove these #define's, kludge no longer needed.
-
- * sys/h-ultra3.h: Add new Ultracomputer host.
- * sysdep.h: Add ULTRA3_SYM1_SYS and use it.
-
-Tue Sep 10 10:11:46 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * i386coff.h (LINESZ): Always 6, not based on sizeof().
- (Fix from Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.)
-
-Wed Sep 4 08:58:37 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * a.out.gnu.h, aout64.h: Add N_WARNING. Change N_FN to 0x0E,
- to match SunOS and BSD. Add N_COMM as 0x12 for SunOS shared lib
- support.
- * stab.def: Add N_COMM to table, fix overlap comment.
-
-Tue Sep 3 06:29:20 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- Merge with latest FSF versions of these files.
-
- * stab.gnu.h: Add LAST_UNUSED_STAB_CODE.
- * stab.def: Update to GPL2. Move N_WARNING out, since not a
- debug symbol. Change comments, and reorder table to numeric
- order. Update final table comment.
- (N_DSLINE, N_BSLINE): Renumber from 0x66 and 0x68, to 0x46 and 0x48.
-
- * obstack.h: GPL2. Merge.
-
-Fri Aug 23 01:54:23 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * a.out.gnu.h, a.out.sun4.h: Make SEGMENT_SIZE able to depend
- on the particular a.out being examined.
- * a.out.sun4.h: Define segment sizes for Sun-3's and Sun-4's.
- * FIXME: a.out.gnu.h is almost obsolete.
- * FIXME: a.out.sun4.h should be renamed a.out.sun.h now.
-
-Wed Aug 21 20:32:13 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * Start a ChangeLog for the includes directory.
-
- * a.out.gnu.h (N_FN): Fix value -- was 15, should be 0x1E.
- * stab.def: Update allocation table in comments at end,
- to reflect reality as I know it.
-
-
-Local Variables:
-mode: indented-text
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/contrib/gdb/include/ansidecl.h b/contrib/gdb/include/ansidecl.h
deleted file mode 100644
index be04e42d56a3..000000000000
--- a/contrib/gdb/include/ansidecl.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/* ANSI and traditional C compatability macros
- Copyright 1991, 1992 Free Software Foundation, Inc.
- This file is part of the GNU C 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. */
-
-/* ANSI and traditional C compatibility macros
-
- ANSI C is assumed if __STDC__ is #defined.
-
- Macro ANSI C definition Traditional C definition
- ----- ---- - ---------- ----------- - ----------
- PTR `void *' `char *'
- LONG_DOUBLE `long double' `double'
- VOLATILE `volatile' `'
- SIGNED `signed' `'
- PTRCONST `void *const' `char *'
- ANSI_PROTOTYPES 1 not defined
-
- CONST is also defined, but is obsolete. Just use const.
-
- DEFUN (name, arglist, args)
-
- Defines function NAME.
-
- ARGLIST lists the arguments, separated by commas and enclosed in
- parentheses. ARGLIST becomes the argument list in traditional C.
-
- ARGS list the arguments with their types. It becomes a prototype in
- ANSI C, and the type declarations in traditional C. Arguments should
- be separated with `AND'. For functions with a variable number of
- arguments, the last thing listed should be `DOTS'.
-
- DEFUN_VOID (name)
-
- Defines a function NAME, which takes no arguments.
-
- obsolete -- EXFUN (name, (prototype)) -- obsolete.
-
- Replaced by PARAMS. Do not use; will disappear someday soon.
- Was used in external function declarations.
- In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in
- parentheses). In traditional C it is `NAME()'.
- For a function that takes no arguments, PROTOTYPE should be `(void)'.
-
- PARAMS ((args))
-
- We could use the EXFUN macro to handle prototype declarations, but
- the name is misleading and the result is ugly. So we just define a
- simple macro to handle the parameter lists, as in:
-
- static int foo PARAMS ((int, char));
-
- This produces: `static int foo();' or `static int foo (int, char);'
-
- EXFUN would have done it like this:
-
- static int EXFUN (foo, (int, char));
-
- but the function is not external...and it's hard to visually parse
- the function name out of the mess. EXFUN should be considered
- obsolete; new code should be written to use PARAMS.
-
- For example:
- extern int printf PARAMS ((CONST char *format DOTS));
- int DEFUN(fprintf, (stream, format),
- FILE *stream AND CONST char *format DOTS) { ... }
- void DEFUN_VOID(abort) { ... }
-*/
-
-#ifndef _ANSIDECL_H
-
-#define _ANSIDECL_H 1
-
-
-/* Every source file includes this file,
- so they will all get the switch for lint. */
-/* LINTLIBRARY */
-
-
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32)
-/* All known AIX compilers implement these things (but don't always
- define __STDC__). The RISC/OS MIPS compiler defines these things
- in SVR4 mode, but does not define __STDC__. */
-
-#define PTR void *
-#define PTRCONST void *CONST
-#define LONG_DOUBLE long double
-
-#define AND ,
-#define NOARGS void
-#define CONST const
-#define VOLATILE volatile
-#define SIGNED signed
-#define DOTS , ...
-
-#define EXFUN(name, proto) name proto
-#define DEFUN(name, arglist, args) name(args)
-#define DEFUN_VOID(name) name(void)
-
-#define PROTO(type, name, arglist) type name arglist
-#define PARAMS(paramlist) paramlist
-#define ANSI_PROTOTYPES 1
-
-#else /* Not ANSI C. */
-
-#define PTR char *
-#define PTRCONST PTR
-#define LONG_DOUBLE double
-
-#define AND ;
-#define NOARGS
-#define CONST
-#ifndef const /* some systems define it in header files for non-ansi mode */
-#define const
-#endif
-#define VOLATILE
-#define SIGNED
-#define DOTS
-
-#define EXFUN(name, proto) name()
-#define DEFUN(name, arglist, args) name arglist args;
-#define DEFUN_VOID(name) name()
-#define PROTO(type, name, arglist) type name ()
-#define PARAMS(paramlist) ()
-
-#endif /* ANSI C. */
-
-#endif /* ansidecl.h */
diff --git a/contrib/gdb/include/aout/ChangeLog b/contrib/gdb/include/aout/ChangeLog
deleted file mode 100644
index 307448bc87fd..000000000000
--- a/contrib/gdb/include/aout/ChangeLog
+++ /dev/null
@@ -1,174 +0,0 @@
-Mon Mar 11 12:15:52 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * stab.def: Use __define_stab_duplicate rather than __define_stab
- for duplicate entries N_BROWS and N_MOD2.
- * stab_gnu.h (__define_stab_duplicate): Define before including
- stab.def.
-
-Fri Oct 27 17:47:16 1995 Niklas Hallqvist <niklas@appli.se>
-
- * aout64.h, host.h, hp300hpux.h, sun4.h: Changed PAGE_SIZE to
- TARGET_PAGE_SIZE.
-
-Tue Sep 12 12:07:02 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * sun4.h (struct internal_sun4_dynamic_link): Change all fields
- from long to unsigned long.
-
-Wed Jul 12 00:15:13 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
-
- * sun4.h (PAGE_SIZE): Undefine before defining.
-
-Thu Jun 16 14:22:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * aout64.h (BMAGIC): Define.
-
-Sat Jun 11 16:16:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Add weak symbols as an extension to a.out.
- * aout64.h (N_WEAKU, N_WEAKA, N_WEAKT, N_WEAKD, N_WEAKB): Define.
- * stab.def: Update symbol value table.
-
-Thu Jun 2 17:13:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * sun4.h (EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE): Correct from 28 to
- 24. Fix up ld_got comment.
-
-Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dynix3.h: Cleanup, adapt to current bfd version.
-
-Sat Feb 26 10:25:53 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * aout64.h: Add casts to avoid warnings from SVR4 cc.
-
-Fri Feb 11 12:56:04 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * ar.h (ARMAG, ARMAGB, ARFMAG): Change '\n' to '\012', for greater
- portability.
-
-Fri Jan 21 00:59:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * sun4.h: Added information about SunOS shared libraries.
-
-Fri Jan 7 08:20:13 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * aout64.h (N_TXTADDR): Add comment regarding OMAGIC and NMAGIC.
-
-Sat Dec 25 14:55:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * aout64.h (N_DATOFF): Don't pad (revert change of 8 Jul 1993).
-
-Tue Nov 16 15:43:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * aout64.h: New macros ZMAGIC_DISK_BLOCK_SIZE and N_DISK_BLOCK_SIZE
- for Linux ZMAGIC.
- (N_TXTOFF, N_DATOFF): Use them.
-
-Thu Nov 4 00:33:48 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * aout64.h (RELOC_STD_BITS_RELATIVE_LITTLE): Fixed value to match
- sun3 system; used to overlap other fields.
- (RELOC_STD_BITS_JMPTABLE_LITTLE): Likewise.
-
-Wed Nov 3 13:48:27 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * aout64.h (RELOC_STD_BITS_BASEREL_LITTLE): Make it 0x10 (Ken's
- suggestion) to avoid conflict with RELOC_STD_BITS_EXTERN_LITTLE.
-
-Fri Oct 29 15:09:52 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * hp300hpux.h (N_SHARED_LIB): Define to be 0.
-
-Mon Sep 13 21:00:56 1993 John Gilmore (gnu@cygnus.com)
-
- * ar.h (ARMAP_TIME_OFFSET): Add and describe.
-
-Mon Aug 23 Sean Fagan (sef@cygnus.com)
-
- * aout64.h [ARCH_SIZE != 64]: Allow N_BADMAG to be overridden.
-
-Mon Aug 16 14:30:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stab_gnu.h: Include aout/stab.def not just stab.def.
-
-Sun Jul 18 21:41:47 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * dynix3.h: New, for symmetry running dynix.
-
-Thu Jul 8 12:52:22 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * aout64.h (N_BADMAG): Recognize QMAGIC.
- N_TXTOFF, N_TXTADDR, N_TXTSIZE: Special code for QMAGIC.
- N_DATOFF: Pad text size if we need to.
-
-Fri Jun 18 19:19:38 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stab.def (N_ECOML): Fix comment.
-
-Mon May 31 09:21:30 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * stab.def: Remove Solaris information on N_FUN stabstring grammar;
- I've transferred it to gdb/doc/stabs.texinfo, where it belongs.
-
-Mon May 10 05:48:43 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * hp300hpux.h: Patch from Glenn Engel for linker problem and
- compatibility fix:
- (OMAGIC, NMAGIC): New definitions.
- (SHAREMAGIC): Deleted.
- (HPUX_DOT_O_MAGIC): New macro.
- (_N_BADMAG): Adjusted.
- (N_HEADER_IN_TEXT, N_DATADDR): New macros.
-
-Thu Apr 29 12:07:37 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * hp300hpux.h: New file from Glenn Engel, glenne@lsid.hp.com.
-
-Tue Apr 27 05:51:04 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * aout64.h (struct external_exec, *MAGIC, N_BADMAG): Don't define
- if `external_exec' is already defined as a macro.
- (N_DATOFF, N_TRELOFF, N_DRELOFF, N_SYMOFF, N_STROFF): Don't define
- if already defined.
- (struct external_nlist, EXTERNAL_NLIST_SIZE): Don't define if
- `external_nlist' is already defined as a macro.
-
-Sat Aug 15 04:23:02 1992 John Gilmore (gnu@cygnus.com)
-
- * adobe.h: Add description of a.out.adobe format.
-
-Fri Jul 3 00:36:52 1992 John Gilmore (gnu at cygnus.com)
-
- * stab.def: Update more Solaris definitions.
- * stab_gnu.h: Add N_SO language types, and Solaris basic float types.
-
-Sun Jun 14 10:53:53 1992 John Gilmore (gnu at cygnus.com)
-
- * stab.def: Update descriptions of Solaris-2 stabs; add N_UNDF.
-
-Thu Jun 11 01:12:07 1992 John Gilmore (gnu at cygnus.com)
-
- * stab.def: Add N_OBJ and N_OPT from Solaris-2.
-
-Thu Jan 30 18:12:44 1992 John Gilmore (gnu at cygnus.com)
-
- * aout/aout64.h: N_TXTSIZE needs some more parentheses.
- I don't trust C precedence.
-
-Wed Dec 18 14:32:01 1991 Per Bothner (bothner at cygnus.com)
-
- * aout/aout64.h: Move common sunos-specific test
- to recognize shared libraries into new macro N_SHARED_LIB.
- Use it to simplify&reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE.
-
-Sat Nov 30 20:34:52 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * ChangeLog, aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h,
- reloc.h, stab.def, stab_gnu.h, sun4.h: All moved from the
- devo/include directory
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/contrib/gdb/include/aout/adobe.h b/contrib/gdb/include/aout/adobe.h
deleted file mode 100644
index 3d2f15c6cb72..000000000000
--- a/contrib/gdb/include/aout/adobe.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/* `a.out.adobe' differences from standard a.out files */
-
-#ifndef __A_OUT_ADOBE_H__
-#define __A_OUT_ADOBE_H__
-
-#define BYTES_IN_WORD 4
-
-/* Struct external_exec is the same. */
-
-/* This is the layout on disk of the 32-bit or 64-bit exec header. */
-
-struct external_exec
-{
- bfd_byte e_info[4]; /* magic number and stuff */
- bfd_byte e_text[BYTES_IN_WORD]; /* length of text section in bytes */
- bfd_byte e_data[BYTES_IN_WORD]; /* length of data section in bytes */
- bfd_byte e_bss[BYTES_IN_WORD]; /* length of bss area in bytes */
- bfd_byte e_syms[BYTES_IN_WORD]; /* length of symbol table in bytes */
- bfd_byte e_entry[BYTES_IN_WORD]; /* start address */
- bfd_byte e_trsize[BYTES_IN_WORD]; /* length of text relocation info */
- bfd_byte e_drsize[BYTES_IN_WORD]; /* length of data relocation info */
-};
-
-#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7)
-
-/* Magic numbers for a.out files */
-
-#undef ZMAGIC
-#define ZMAGIC 0xAD0BE /* Cute, eh? */
-#undef OMAGIC
-#undef NMAGIC
-
-#define N_BADMAG(x) ((x).a_info != ZMAGIC)
-
-/* By default, segment size is constant. But some machines override this
- to be a function of the a.out header (e.g. machine type). */
-#ifndef N_SEGSIZE
-#define N_SEGSIZE(x) SEGMENT_SIZE
-#endif
-#undef N_SEGSIZE /* FIXMEXXXX */
-
-/* Segment information for the a.out.Adobe format is specified after the
- file header. It contains N segment descriptors, followed by one with
- a type of zero.
-
- The actual text of the segments starts at N_TXTOFF in the file,
- regardless of how many or how few segment headers there are. */
-
-struct external_segdesc {
- unsigned char e_type[1];
- unsigned char e_size[3];
- unsigned char e_virtbase[4];
- unsigned char e_filebase[4];
-};
-
-struct internal_segdesc {
- unsigned int a_type:8; /* Segment type N_TEXT, N_DATA, 0 */
- unsigned int a_size:24; /* Segment size */
- bfd_vma a_virtbase; /* Virtual address */
- unsigned int a_filebase; /* Base address in object file */
-};
-
-#define N_TXTADDR(x) \
-
-/* This is documented to be at 1024, but appears to really be at 2048.
- FIXME?! */
-#define N_TXTOFF(x) 2048
-
-#define N_TXTSIZE(x) ((x).a_text)
-
-#define N_DATADDR(x)
-
-#define N_BSSADDR(x)
-
-/* Offsets of the various portions of the file after the text segment. */
-
-#define N_DATOFF(x) ( N_TXTOFF(x) + N_TXTSIZE(x) )
-#define N_TRELOFF(x) ( N_DATOFF(x) + (x).a_data )
-#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
-#define N_SYMOFF(x) ( N_DRELOFF(x) + (x).a_drsize )
-#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
-
-/* Symbols */
-struct external_nlist {
- bfd_byte e_strx[BYTES_IN_WORD]; /* index into string table of name */
- bfd_byte e_type[1]; /* type of symbol */
- bfd_byte e_other[1]; /* misc info (usually empty) */
- bfd_byte e_desc[2]; /* description field */
- bfd_byte e_value[BYTES_IN_WORD]; /* value of symbol */
-};
-
-#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD)
-
-struct internal_nlist {
- unsigned long n_strx; /* index into string table of name */
- unsigned char n_type; /* type of symbol */
- unsigned char n_other; /* misc info (usually empty) */
- unsigned short n_desc; /* description field */
- bfd_vma n_value; /* value of symbol */
-};
-
-/* The n_type field is the symbol type, containing: */
-
-#define N_UNDF 0 /* Undefined symbol */
-#define N_ABS 2 /* Absolute symbol -- defined at particular addr */
-#define N_TEXT 4 /* Text sym -- defined at offset in text seg */
-#define N_DATA 6 /* Data sym -- defined at offset in data seg */
-#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg */
-#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink) */
-#define N_FN 0x1f /* File name of .o file */
-#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh) */
-/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT,
- N_DATA, or N_BSS. When the low-order bit of other types is set,
- (e.g. N_WARNING versus N_FN), they are two different types. */
-#define N_EXT 1 /* External symbol (as opposed to local-to-this-file) */
-#define N_TYPE 0x1e
-#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol */
-
-#define N_INDR 0x0a
-
-/* The following symbols refer to set elements.
- All the N_SET[ATDB] symbols with the same name form one set.
- Space is allocated for the set in the text section, and each set
- elements value is stored into one word of the space.
- The first word of the space is the length of the set (number of elements).
-
- The address of the set is made into an N_SETV symbol
- whose name is the same as the name of the set.
- This symbol acts like a N_DATA global symbol
- in that it can satisfy undefined external references. */
-
-/* These appear as input to LD, in a .o file. */
-#define N_SETA 0x14 /* Absolute set element symbol */
-#define N_SETT 0x16 /* Text set element symbol */
-#define N_SETD 0x18 /* Data set element symbol */
-#define N_SETB 0x1A /* Bss set element symbol */
-
-/* This is output from LD. */
-#define N_SETV 0x1C /* Pointer to set vector in data area. */
-
-/* Warning symbol. The text gives a warning message, the next symbol
- in the table will be undefined. When the symbol is referenced, the
- message is printed. */
-
-#define N_WARNING 0x1e
-
-/* Relocations
-
- There are two types of relocation flavours for a.out systems,
- standard and extended. The standard form is used on systems where the
- instruction has room for all the bits of an offset to the operand, whilst
- the extended form is used when an address operand has to be split over n
- instructions. Eg, on the 68k, each move instruction can reference
- the target with a displacement of 16 or 32 bits. On the sparc, move
- instructions use an offset of 14 bits, so the offset is stored in
- the reloc field, and the data in the section is ignored.
-*/
-
-/* This structure describes a single relocation to be performed.
- The text-relocation section of the file is a vector of these structures,
- all of which apply to the text section.
- Likewise, the data-relocation section applies to the data section. */
-
-struct reloc_std_external {
- bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
- bfd_byte r_index[3]; /* symbol table index of symbol */
- bfd_byte r_type[1]; /* relocation type */
-};
-
-#define RELOC_STD_BITS_PCREL_BIG 0x80
-#define RELOC_STD_BITS_PCREL_LITTLE 0x01
-
-#define RELOC_STD_BITS_LENGTH_BIG 0x60
-#define RELOC_STD_BITS_LENGTH_SH_BIG 5 /* To shift to units place */
-#define RELOC_STD_BITS_LENGTH_LITTLE 0x06
-#define RELOC_STD_BITS_LENGTH_SH_LITTLE 1
-
-#define RELOC_STD_BITS_EXTERN_BIG 0x10
-#define RELOC_STD_BITS_EXTERN_LITTLE 0x08
-
-#define RELOC_STD_BITS_BASEREL_BIG 0x08
-#define RELOC_STD_BITS_BASEREL_LITTLE 0x08
-
-#define RELOC_STD_BITS_JMPTABLE_BIG 0x04
-#define RELOC_STD_BITS_JMPTABLE_LITTLE 0x04
-
-#define RELOC_STD_BITS_RELATIVE_BIG 0x02
-#define RELOC_STD_BITS_RELATIVE_LITTLE 0x02
-
-#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry */
-
-struct reloc_std_internal
-{
- bfd_vma r_address; /* Address (within segment) to be relocated. */
- /* The meaning of r_symbolnum depends on r_extern. */
- unsigned int r_symbolnum:24;
- /* Nonzero means value is a pc-relative offset
- and it should be relocated for changes in its own address
- as well as for changes in the symbol or section specified. */
- unsigned int r_pcrel:1;
- /* Length (as exponent of 2) of the field to be relocated.
- Thus, a value of 2 indicates 1<<2 bytes. */
- unsigned int r_length:2;
- /* 1 => relocate with value of symbol.
- r_symbolnum is the index of the symbol
- in files the symbol table.
- 0 => relocate with the address of a segment.
- r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
- (the N_EXT bit may be set also, but signifies nothing). */
- unsigned int r_extern:1;
- /* The next three bits are for SunOS shared libraries, and seem to
- be undocumented. */
- unsigned int r_baserel:1; /* Linkage table relative */
- unsigned int r_jmptable:1; /* pc-relative to jump table */
- unsigned int r_relative:1; /* "relative relocation" */
- /* unused */
- unsigned int r_pad:1; /* Padding -- set to zero */
-};
-
-
-/* EXTENDED RELOCS */
-
-struct reloc_ext_external {
- bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
- bfd_byte r_index[3]; /* symbol table index of symbol */
- bfd_byte r_type[1]; /* relocation type */
- bfd_byte r_addend[BYTES_IN_WORD]; /* datum addend */
-};
-
-#define RELOC_EXT_BITS_EXTERN_BIG 0x80
-#define RELOC_EXT_BITS_EXTERN_LITTLE 0x01
-
-#define RELOC_EXT_BITS_TYPE_BIG 0x1F
-#define RELOC_EXT_BITS_TYPE_SH_BIG 0
-#define RELOC_EXT_BITS_TYPE_LITTLE 0xF8
-#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3
-
-/* Bytes per relocation entry */
-#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD)
-
-enum reloc_type
-{
- /* simple relocations */
- RELOC_8, /* data[0:7] = addend + sv */
- RELOC_16, /* data[0:15] = addend + sv */
- RELOC_32, /* data[0:31] = addend + sv */
- /* pc-rel displacement */
- RELOC_DISP8, /* data[0:7] = addend - pc + sv */
- RELOC_DISP16, /* data[0:15] = addend - pc + sv */
- RELOC_DISP32, /* data[0:31] = addend - pc + sv */
- /* Special */
- RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */
- RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */
- RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */
- RELOC_22, /* data[0:21] = (addend + sv) */
- RELOC_13, /* data[0:12] = (addend + sv) */
- RELOC_LO10, /* data[0:9] = (addend + sv) */
- RELOC_SFA_BASE,
- RELOC_SFA_OFF13,
- /* P.I.C. (base-relative) */
- RELOC_BASE10, /* Not sure - maybe we can do this the */
- RELOC_BASE13, /* right way now */
- RELOC_BASE22,
- /* for some sort of pc-rel P.I.C. (?) */
- RELOC_PC10,
- RELOC_PC22,
- /* P.I.C. jump table */
- RELOC_JMP_TBL,
- /* reputedly for shared libraries somehow */
- RELOC_SEGOFF16,
- RELOC_GLOB_DAT,
- RELOC_JMP_SLOT,
- RELOC_RELATIVE,
-
- RELOC_11,
- RELOC_WDISP2_14,
- RELOC_WDISP19,
- RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */
- RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */
-
- /* 29K relocation types */
- RELOC_JUMPTARG,
- RELOC_CONST,
- RELOC_CONSTH,
-
- NO_RELOC
- };
-
-
-struct reloc_internal {
- bfd_vma r_address; /* offset of of data to relocate */
- long r_index; /* symbol table index of symbol */
- enum reloc_type r_type; /* relocation type */
- bfd_vma r_addend; /* datum addend */
-};
-
-#endif /* __A_OUT_ADOBE_H__ */
diff --git a/contrib/gdb/include/aout/aout64.h b/contrib/gdb/include/aout/aout64.h
deleted file mode 100644
index 76f1140b6826..000000000000
--- a/contrib/gdb/include/aout/aout64.h
+++ /dev/null
@@ -1,475 +0,0 @@
-/* `a.out' object-file definitions, including extensions to 64-bit fields */
-
-#ifndef __A_OUT_64_H__
-#define __A_OUT_64_H__
-
-/* This is the layout on disk of the 32-bit or 64-bit exec header. */
-
-#ifndef external_exec
-struct external_exec
-{
- bfd_byte e_info[4]; /* magic number and stuff */
- bfd_byte e_text[BYTES_IN_WORD]; /* length of text section in bytes */
- bfd_byte e_data[BYTES_IN_WORD]; /* length of data section in bytes */
- bfd_byte e_bss[BYTES_IN_WORD]; /* length of bss area in bytes */
- bfd_byte e_syms[BYTES_IN_WORD]; /* length of symbol table in bytes */
- bfd_byte e_entry[BYTES_IN_WORD]; /* start address */
- bfd_byte e_trsize[BYTES_IN_WORD]; /* length of text relocation info */
- bfd_byte e_drsize[BYTES_IN_WORD]; /* length of data relocation info */
-};
-
-#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7)
-
-/* Magic numbers for a.out files */
-
-#if ARCH_SIZE==64
-#define OMAGIC 0x1001 /* Code indicating object file */
-#define ZMAGIC 0x1002 /* Code indicating demand-paged executable. */
-#define NMAGIC 0x1003 /* Code indicating pure executable. */
-
-/* There is no 64-bit QMAGIC as far as I know. */
-
-#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
- && N_MAGIC(x) != NMAGIC \
- && N_MAGIC(x) != ZMAGIC)
-#else
-#define OMAGIC 0407 /* ...object file or impure executable. */
-#define NMAGIC 0410 /* Code indicating pure executable. */
-#define ZMAGIC 0413 /* Code indicating demand-paged executable. */
-#define BMAGIC 0415 /* Used by a b.out object. */
-
-/* This indicates a demand-paged executable with the header in the text.
- It is used by 386BSD (and variants) and Linux, at least. */
-#ifndef QMAGIC
-#define QMAGIC 0314
-#endif
-# ifndef N_BADMAG
-# define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
- && N_MAGIC(x) != NMAGIC \
- && N_MAGIC(x) != ZMAGIC \
- && N_MAGIC(x) != QMAGIC)
-# endif /* N_BADMAG */
-#endif
-
-#endif
-
-#ifdef QMAGIC
-#define N_IS_QMAGIC(x) (N_MAGIC (x) == QMAGIC)
-#else
-#define N_IS_QMAGIC(x) (0)
-#endif
-
-/* The difference between TARGET_PAGE_SIZE and N_SEGSIZE is that TARGET_PAGE_SIZE is
- the finest granularity at which you can page something, thus it
- controls the padding (if any) before the text segment of a ZMAGIC
- file. N_SEGSIZE is the resolution at which things can be marked as
- read-only versus read/write, so it controls the padding between the
- text segment and the data segment (in memory; on disk the padding
- between them is TARGET_PAGE_SIZE). TARGET_PAGE_SIZE and N_SEGSIZE are the same
- for most machines, but different for sun3. */
-
-/* By default, segment size is constant. But some machines override this
- to be a function of the a.out header (e.g. machine type). */
-
-#ifndef N_SEGSIZE
-#define N_SEGSIZE(x) SEGMENT_SIZE
-#endif
-
-/* Virtual memory address of the text section.
- This is getting very complicated. A good reason to discard a.out format
- for something that specifies these fields explicitly. But til then...
-
- * OMAGIC and NMAGIC files:
- (object files: text for "relocatable addr 0" right after the header)
- start at 0, offset is EXEC_BYTES_SIZE, size as stated.
- * The text address, offset, and size of ZMAGIC files depend
- on the entry point of the file:
- * entry point below TEXT_START_ADDR:
- (hack for SunOS shared libraries)
- start at 0, offset is 0, size as stated.
- * If N_HEADER_IN_TEXT(x) is true (which defaults to being the
- case when the entry point is EXEC_BYTES_SIZE or further into a page):
- no padding is needed; text can start after exec header. Sun
- considers the text segment of such files to include the exec header;
- for BFD's purposes, we don't, which makes more work for us.
- start at TEXT_START_ADDR + EXEC_BYTES_SIZE, offset is EXEC_BYTES_SIZE,
- size as stated minus EXEC_BYTES_SIZE.
- * If N_HEADER_IN_TEXT(x) is false (which defaults to being the case when
- the entry point is less than EXEC_BYTES_SIZE into a page (e.g. page
- aligned)): (padding is needed so that text can start at a page boundary)
- start at TEXT_START_ADDR, offset TARGET_PAGE_SIZE, size as stated.
-
- Specific configurations may want to hardwire N_HEADER_IN_TEXT,
- for efficiency or to allow people to play games with the entry point.
- In that case, you would #define N_HEADER_IN_TEXT(x) as 1 for sunos,
- and as 0 for most other hosts (Sony News, Vax Ultrix, etc).
- (Do this in the appropriate bfd target file.)
- (The default is a heuristic that will break if people try changing
- the entry point, perhaps with the ld -e flag.)
-
- * QMAGIC is always like a ZMAGIC for which N_HEADER_IN_TEXT is true,
- and for which the starting address is TARGET_PAGE_SIZE (or should this be
- SEGMENT_SIZE?) (TEXT_START_ADDR only applies to ZMAGIC, not to QMAGIC).
- */
-
-/* This macro is only relevant for ZMAGIC files; QMAGIC always has the header
- in the text. */
-#ifndef N_HEADER_IN_TEXT
-#define N_HEADER_IN_TEXT(x) (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
-#endif
-
-/* Sun shared libraries, not linux. This macro is only relevant for ZMAGIC
- files. */
-#ifndef N_SHARED_LIB
-#define N_SHARED_LIB(x) ((x).a_entry < TEXT_START_ADDR)
-#endif
-
-/* Returning 0 not TEXT_START_ADDR for OMAGIC and NMAGIC is based on
- the assumption that we are dealing with a .o file, not an
- executable. This is necessary for OMAGIC (but means we don't work
- right on the output from ld -N); more questionable for NMAGIC. */
-
-#ifndef N_TXTADDR
-#define N_TXTADDR(x) \
- (/* The address of a QMAGIC file is always one page in, */ \
- /* with the header in the text. */ \
- N_IS_QMAGIC (x) ? TARGET_PAGE_SIZE + EXEC_BYTES_SIZE : \
- N_MAGIC(x) != ZMAGIC ? 0 : /* object file or NMAGIC */\
- N_SHARED_LIB(x) ? 0 : \
- N_HEADER_IN_TEXT(x) ? \
- TEXT_START_ADDR + EXEC_BYTES_SIZE : /* no padding */\
- TEXT_START_ADDR /* a page of padding */\
- )
-#endif
-
-/* If N_HEADER_IN_TEXT is not true for ZMAGIC, there is some padding
- to make the text segment start at a certain boundary. For most
- systems, this boundary is TARGET_PAGE_SIZE. But for Linux, in the
- time-honored tradition of crazy ZMAGIC hacks, it is 1024 which is
- not what TARGET_PAGE_SIZE needs to be for QMAGIC. */
-
-#ifndef ZMAGIC_DISK_BLOCK_SIZE
-#define ZMAGIC_DISK_BLOCK_SIZE TARGET_PAGE_SIZE
-#endif
-
-#define N_DISK_BLOCK_SIZE(x) \
- (N_MAGIC(x) == ZMAGIC ? ZMAGIC_DISK_BLOCK_SIZE : TARGET_PAGE_SIZE)
-
-/* Offset in an a.out of the start of the text section. */
-#ifndef N_TXTOFF
-#define N_TXTOFF(x) \
- (/* For {O,N,Q}MAGIC, no padding. */ \
- N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE : \
- N_SHARED_LIB(x) ? 0 : \
- N_HEADER_IN_TEXT(x) ? \
- EXEC_BYTES_SIZE : /* no padding */\
- ZMAGIC_DISK_BLOCK_SIZE /* a page of padding */\
- )
-#endif
-/* Size of the text section. It's always as stated, except that we
- offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF
- for ZMAGIC files that nominally include the exec header
- as part of the first page of text. (BFD doesn't consider the
- exec header to be part of the text segment.) */
-#ifndef N_TXTSIZE
-#define N_TXTSIZE(x) \
- (/* For QMAGIC, we don't consider the header part of the text section. */\
- N_IS_QMAGIC (x) ? (x).a_text - EXEC_BYTES_SIZE : \
- (N_MAGIC(x) != ZMAGIC || N_SHARED_LIB(x)) ? (x).a_text : \
- N_HEADER_IN_TEXT(x) ? \
- (x).a_text - EXEC_BYTES_SIZE: /* no padding */\
- (x).a_text /* a page of padding */\
- )
-#endif
-/* The address of the data segment in virtual memory.
- It is the text segment address, plus text segment size, rounded
- up to a N_SEGSIZE boundary for pure or pageable files. */
-#ifndef N_DATADDR
-#define N_DATADDR(x) \
- (N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+N_TXTSIZE(x)) \
- : (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1))))
-#endif
-/* The address of the BSS segment -- immediately after the data segment. */
-
-#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
-
-/* Offsets of the various portions of the file after the text segment. */
-
-/* For {Q,Z}MAGIC, there is padding to make the data segment start on
- a page boundary. Most of the time the a_text field (and thus
- N_TXTSIZE) already contains this padding. It is possible that for
- BSDI and/or 386BSD it sometimes doesn't contain the padding, and
- perhaps we should be adding it here. But this seems kind of
- questionable and probably should be BSDI/386BSD-specific if we do
- do it.
-
- For NMAGIC (at least for hp300 BSD, probably others), there is
- padding in memory only, not on disk, so we must *not* ever pad here
- for NMAGIC. */
-
-#ifndef N_DATOFF
-#define N_DATOFF(x) \
- (N_TXTOFF(x) + N_TXTSIZE(x))
-#endif
-
-#ifndef N_TRELOFF
-#define N_TRELOFF(x) ( N_DATOFF(x) + (x).a_data )
-#endif
-#ifndef N_DRELOFF
-#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
-#endif
-#ifndef N_SYMOFF
-#define N_SYMOFF(x) ( N_DRELOFF(x) + (x).a_drsize )
-#endif
-#ifndef N_STROFF
-#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
-#endif
-
-/* Symbols */
-#ifndef external_nlist
-struct external_nlist {
- bfd_byte e_strx[BYTES_IN_WORD]; /* index into string table of name */
- bfd_byte e_type[1]; /* type of symbol */
- bfd_byte e_other[1]; /* misc info (usually empty) */
- bfd_byte e_desc[2]; /* description field */
- bfd_byte e_value[BYTES_IN_WORD]; /* value of symbol */
-};
-#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD)
-#endif
-
-struct internal_nlist {
- unsigned long n_strx; /* index into string table of name */
- unsigned char n_type; /* type of symbol */
- unsigned char n_other; /* misc info (usually empty) */
- unsigned short n_desc; /* description field */
- bfd_vma n_value; /* value of symbol */
-};
-
-/* The n_type field is the symbol type, containing: */
-
-#define N_UNDF 0 /* Undefined symbol */
-#define N_ABS 2 /* Absolute symbol -- defined at particular addr */
-#define N_TEXT 4 /* Text sym -- defined at offset in text seg */
-#define N_DATA 6 /* Data sym -- defined at offset in data seg */
-#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg */
-#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink) */
-#define N_FN 0x1f /* File name of .o file */
-#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh) */
-/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT,
- N_DATA, or N_BSS. When the low-order bit of other types is set,
- (e.g. N_WARNING versus N_FN), they are two different types. */
-#define N_EXT 1 /* External symbol (as opposed to local-to-this-file) */
-#define N_TYPE 0x1e
-#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol */
-
-#define N_INDR 0x0a
-
-/* The following symbols refer to set elements.
- All the N_SET[ATDB] symbols with the same name form one set.
- Space is allocated for the set in the text section, and each set
- elements value is stored into one word of the space.
- The first word of the space is the length of the set (number of elements).
-
- The address of the set is made into an N_SETV symbol
- whose name is the same as the name of the set.
- This symbol acts like a N_DATA global symbol
- in that it can satisfy undefined external references. */
-
-/* These appear as input to LD, in a .o file. */
-#define N_SETA 0x14 /* Absolute set element symbol */
-#define N_SETT 0x16 /* Text set element symbol */
-#define N_SETD 0x18 /* Data set element symbol */
-#define N_SETB 0x1A /* Bss set element symbol */
-
-/* This is output from LD. */
-#define N_SETV 0x1C /* Pointer to set vector in data area. */
-
-/* Warning symbol. The text gives a warning message, the next symbol
- in the table will be undefined. When the symbol is referenced, the
- message is printed. */
-
-#define N_WARNING 0x1e
-
-/* Weak symbols. These are a GNU extension to the a.out format. The
- semantics are those of ELF weak symbols. Weak symbols are always
- externally visible. The N_WEAK? values are squeezed into the
- available slots. The value of a N_WEAKU symbol is 0. The values
- of the other types are the definitions. */
-#define N_WEAKU 0x0d /* Weak undefined symbol. */
-#define N_WEAKA 0x0e /* Weak absolute symbol. */
-#define N_WEAKT 0x0f /* Weak text symbol. */
-#define N_WEAKD 0x10 /* Weak data symbol. */
-#define N_WEAKB 0x11 /* Weak bss symbol. */
-
-/* Relocations
-
- There are two types of relocation flavours for a.out systems,
- standard and extended. The standard form is used on systems where the
- instruction has room for all the bits of an offset to the operand, whilst
- the extended form is used when an address operand has to be split over n
- instructions. Eg, on the 68k, each move instruction can reference
- the target with a displacement of 16 or 32 bits. On the sparc, move
- instructions use an offset of 14 bits, so the offset is stored in
- the reloc field, and the data in the section is ignored.
-*/
-
-/* This structure describes a single relocation to be performed.
- The text-relocation section of the file is a vector of these structures,
- all of which apply to the text section.
- Likewise, the data-relocation section applies to the data section. */
-
-struct reloc_std_external {
- bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
- bfd_byte r_index[3]; /* symbol table index of symbol */
- bfd_byte r_type[1]; /* relocation type */
-};
-
-#define RELOC_STD_BITS_PCREL_BIG ((unsigned int) 0x80)
-#define RELOC_STD_BITS_PCREL_LITTLE ((unsigned int) 0x01)
-
-#define RELOC_STD_BITS_LENGTH_BIG ((unsigned int) 0x60)
-#define RELOC_STD_BITS_LENGTH_SH_BIG 5
-#define RELOC_STD_BITS_LENGTH_LITTLE ((unsigned int) 0x06)
-#define RELOC_STD_BITS_LENGTH_SH_LITTLE 1
-
-#define RELOC_STD_BITS_EXTERN_BIG ((unsigned int) 0x10)
-#define RELOC_STD_BITS_EXTERN_LITTLE ((unsigned int) 0x08)
-
-#define RELOC_STD_BITS_BASEREL_BIG ((unsigned int) 0x08)
-#define RELOC_STD_BITS_BASEREL_LITTLE ((unsigned int) 0x10)
-
-#define RELOC_STD_BITS_JMPTABLE_BIG ((unsigned int) 0x04)
-#define RELOC_STD_BITS_JMPTABLE_LITTLE ((unsigned int) 0x20)
-
-#define RELOC_STD_BITS_RELATIVE_BIG ((unsigned int) 0x02)
-#define RELOC_STD_BITS_RELATIVE_LITTLE ((unsigned int) 0x40)
-
-#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry */
-
-struct reloc_std_internal
-{
- bfd_vma r_address; /* Address (within segment) to be relocated. */
- /* The meaning of r_symbolnum depends on r_extern. */
- unsigned int r_symbolnum:24;
- /* Nonzero means value is a pc-relative offset
- and it should be relocated for changes in its own address
- as well as for changes in the symbol or section specified. */
- unsigned int r_pcrel:1;
- /* Length (as exponent of 2) of the field to be relocated.
- Thus, a value of 2 indicates 1<<2 bytes. */
- unsigned int r_length:2;
- /* 1 => relocate with value of symbol.
- r_symbolnum is the index of the symbol
- in files the symbol table.
- 0 => relocate with the address of a segment.
- r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
- (the N_EXT bit may be set also, but signifies nothing). */
- unsigned int r_extern:1;
- /* The next three bits are for SunOS shared libraries, and seem to
- be undocumented. */
- unsigned int r_baserel:1; /* Linkage table relative */
- unsigned int r_jmptable:1; /* pc-relative to jump table */
- unsigned int r_relative:1; /* "relative relocation" */
- /* unused */
- unsigned int r_pad:1; /* Padding -- set to zero */
-};
-
-
-/* EXTENDED RELOCS */
-
-struct reloc_ext_external {
- bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
- bfd_byte r_index[3]; /* symbol table index of symbol */
- bfd_byte r_type[1]; /* relocation type */
- bfd_byte r_addend[BYTES_IN_WORD]; /* datum addend */
-};
-
-#define RELOC_EXT_BITS_EXTERN_BIG ((unsigned int) 0x80)
-#define RELOC_EXT_BITS_EXTERN_LITTLE ((unsigned int) 0x01)
-
-#define RELOC_EXT_BITS_TYPE_BIG ((unsigned int) 0x1F)
-#define RELOC_EXT_BITS_TYPE_SH_BIG 0
-#define RELOC_EXT_BITS_TYPE_LITTLE ((unsigned int) 0xF8)
-#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3
-
-/* Bytes per relocation entry */
-#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD)
-
-enum reloc_type
-{
- /* simple relocations */
- RELOC_8, /* data[0:7] = addend + sv */
- RELOC_16, /* data[0:15] = addend + sv */
- RELOC_32, /* data[0:31] = addend + sv */
- /* pc-rel displacement */
- RELOC_DISP8, /* data[0:7] = addend - pc + sv */
- RELOC_DISP16, /* data[0:15] = addend - pc + sv */
- RELOC_DISP32, /* data[0:31] = addend - pc + sv */
- /* Special */
- RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */
- RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */
- RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */
- RELOC_22, /* data[0:21] = (addend + sv) */
- RELOC_13, /* data[0:12] = (addend + sv) */
- RELOC_LO10, /* data[0:9] = (addend + sv) */
- RELOC_SFA_BASE,
- RELOC_SFA_OFF13,
- /* P.I.C. (base-relative) */
- RELOC_BASE10, /* Not sure - maybe we can do this the */
- RELOC_BASE13, /* right way now */
- RELOC_BASE22,
- /* for some sort of pc-rel P.I.C. (?) */
- RELOC_PC10,
- RELOC_PC22,
- /* P.I.C. jump table */
- RELOC_JMP_TBL,
- /* reputedly for shared libraries somehow */
- RELOC_SEGOFF16,
- RELOC_GLOB_DAT,
- RELOC_JMP_SLOT,
- RELOC_RELATIVE,
-
- RELOC_11,
- RELOC_WDISP2_14,
- RELOC_WDISP19,
- RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */
- RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */
-
- /* 29K relocation types */
- RELOC_JUMPTARG,
- RELOC_CONST,
- RELOC_CONSTH,
-
- /* All the new ones I can think of, for sparc v9 */
-
- RELOC_64, /* data[0:63] = addend + sv */
- RELOC_DISP64, /* data[0:63] = addend - pc + sv */
- RELOC_WDISP21, /* data[0:20] = (addend + sv - pc)>>2 */
- RELOC_DISP21, /* data[0:20] = addend - pc + sv */
- RELOC_DISP14, /* data[0:13] = addend - pc + sv */
- /* Q .
- What are the other ones,
- Since this is a clean slate, can we throw away the ones we dont
- understand ? Should we sort the values ? What about using a
- microcode format like the 68k ?
- */
- NO_RELOC
- };
-
-
-struct reloc_internal {
- bfd_vma r_address; /* offset of of data to relocate */
- long r_index; /* symbol table index of symbol */
- enum reloc_type r_type; /* relocation type */
- bfd_vma r_addend; /* datum addend */
-};
-
-/* Q.
- Should the length of the string table be 4 bytes or 8 bytes ?
-
- Q.
- What about archive indexes ?
-
- */
-
-#endif /* __A_OUT_64_H__ */
diff --git a/contrib/gdb/include/aout/ar.h b/contrib/gdb/include/aout/ar.h
deleted file mode 100644
index 7b5dcdabd106..000000000000
--- a/contrib/gdb/include/aout/ar.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* archive file definition for GNU software */
-
-/* So far this is correct for BSDish archives. Don't forget that
- files must begin on an even byte boundary. */
-
-#ifndef __GNU_AR_H__
-#define __GNU_AR_H__
-
-/* Note that the usual '\n' in magic strings may translate to different
- characters, as allowed by ANSI. '\012' has a fixed value, and remains
- compatible with existing BSDish archives. */
-
-#define ARMAG "!<arch>\012" /* For COFF and a.out archives */
-#define ARMAGB "!<bout>\012" /* For b.out archives */
-#define SARMAG 8
-#define ARFMAG "`\012"
-
-/* The ar_date field of the armap (__.SYMDEF) member of an archive
- must be greater than the modified date of the entire file, or
- BSD-derived linkers complain. We originally write the ar_date with
- this offset from the real file's mod-time. After finishing the
- file, we rewrite ar_date if it's not still greater than the mod date. */
-
-#define ARMAP_TIME_OFFSET 60
-
-struct ar_hdr {
- char ar_name[16]; /* name of this member */
- char ar_date[12]; /* file mtime */
- char ar_uid[6]; /* owner uid; printed as decimal */
- char ar_gid[6]; /* owner gid; printed as decimal */
- char ar_mode[8]; /* file mode, printed as octal */
- char ar_size[10]; /* file size, printed as decimal */
- char ar_fmag[2]; /* should contain ARFMAG */
-};
-
-#endif /* __GNU_AR_H__ */
diff --git a/contrib/gdb/include/aout/dynix3.h b/contrib/gdb/include/aout/dynix3.h
deleted file mode 100644
index efeeebfc4ccd..000000000000
--- a/contrib/gdb/include/aout/dynix3.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * a.out specifics for Sequent Symmetry running Dynix 3.x
- */
-#ifndef A_OUT_DYNIX3_H
-#define A_OUT_DYNIX3_H
-
-#define external_exec dynix_external_exec
-
-/* struct exec for Dynix 3
- *
- * a_gdtbl and a_bootstrap are only for standalone binaries.
- * Shared data fields are not supported by the kernel as of Dynix 3.1,
- * but are supported by Dynix compiler programs.
- */
-struct dynix_external_exec {
- unsigned char e_info[4];
- unsigned char e_text[4];
- unsigned char e_data[4];
- unsigned char e_bss[4];
- unsigned char e_syms[4];
- unsigned char e_entry[4];
- unsigned char e_trsize[4];
- unsigned char e_drsize[4];
- unsigned char e_g_code[8], e_g_data[8], e_g_desc[8];
- unsigned char e_shdata[4];
- unsigned char e_shbss[4];
- unsigned char e_shdrsize[4];
- unsigned char e_bootstrap[44];
- unsigned char e_reserved[12];
- unsigned char e_version[4];
-};
-
-#define EXEC_BYTES_SIZE (128)
-
-/*
- * All executables under Dynix are demand paged with read-only text,
- * Thus no NMAGIC.
- *
- * ZMAGIC has a page of 0s at virtual 0,
- * XMAGIC has an invalid page at virtual 0
- */
-#define OMAGIC 0x12eb /* .o */
-#define ZMAGIC 0x22eb /* zero @ 0, demand load */
-#define XMAGIC 0x32eb /* invalid @ 0, demand load */
-#define SMAGIC 0x42eb /* standalone, not supported here */
-
-#define N_BADMAG(x) ((OMAGIC != N_MAGIC(x)) && \
- (ZMAGIC != N_MAGIC(x)) && \
- (XMAGIC != N_MAGIC(x)) && \
- (SMAGIC != N_MAGIC(x)))
-
-#define N_ADDRADJ(x) ((ZMAGIC == N_MAGIC(x) || XMAGIC == N_MAGIC(x)) ? 0x1000 : 0)
-
-#define N_TXTOFF(x) (EXEC_BYTES_SIZE)
-#define N_DATOFF(x) (N_TXTOFF(x) + N_TXTSIZE(x))
-#define N_SHDATOFF(x) (N_DATOFF(x) + (x).a_data)
-#define N_TRELOFF(x) (N_SHDATOFF(x) + (x).a_shdata)
-#define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize)
-#define N_SHDRELOFF(x) (N_DRELOFF(x) + (x).a_drsize)
-#define N_SYMOFF(x) (N_SHDRELOFF(x) + (x).a_shdrsize)
-#define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms)
-
-#define N_TXTADDR(x) \
- (((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? 0 \
- : TEXT_START_ADDR + EXEC_BYTES_SIZE)
-
-#define N_TXTSIZE(x) \
- (((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? ((x).a_text) \
- : ((x).a_text - N_ADDRADJ(x) - EXEC_BYTES_SIZE))
-
-#endif /* A_OUT_DYNIX3_H */
diff --git a/contrib/gdb/include/aout/encap.h b/contrib/gdb/include/aout/encap.h
deleted file mode 100644
index b215d49be168..000000000000
--- a/contrib/gdb/include/aout/encap.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* Yet Another Try at encapsulating bsd object files in coff.
- Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc.
- Written by Pace Willisson 12/9/88
-
- This file is obsolete. It needs to be converted to just define a bunch
- of stuff that BFD can use to do coff-encapsulated files. --gnu@cygnus.com
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public 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 only use the coff headers to tell the kernel
- * how to exec the file. Therefore, the only fields that need to
- * be filled in are the scnptr and vaddr for the text and data
- * sections, and the vaddr for the bss. As far as coff is concerned,
- * there is no symbol table, relocation, or line numbers.
- *
- * A normal bsd header (struct exec) is placed after the coff headers,
- * and before the real text. I defined a the new fields 'a_machtype'
- * and a_flags. If a_machtype is M_386, and a_flags & A_ENCAP is
- * true, then the bsd header is preceeded by a coff header. Macros
- * like N_TXTOFF and N_TXTADDR use this field to find the bsd header.
- *
- * The only problem is to track down the bsd exec header. The
- * macros HEADER_OFFSET, etc do this.
- */
-
-#define N_FLAGS_COFF_ENCAPSULATE 0x20 /* coff header precedes bsd header */
-
-/* Describe the COFF header used for encapsulation. */
-
-struct coffheader
-{
- /* filehdr */
- unsigned short f_magic;
- unsigned short f_nscns;
- long f_timdat;
- long f_symptr;
- long f_nsyms;
- unsigned short f_opthdr;
- unsigned short f_flags;
- /* aouthdr */
- short magic;
- short vstamp;
- long tsize;
- long dsize;
- long bsize;
- long entry;
- long text_start;
- long data_start;
- struct coffscn
- {
- char s_name[8];
- long s_paddr;
- long s_vaddr;
- long s_size;
- long s_scnptr;
- long s_relptr;
- long s_lnnoptr;
- unsigned short s_nreloc;
- unsigned short s_nlnno;
- long s_flags;
- } scns[3];
-};
-
-/* Describe some of the parameters of the encapsulation,
- including how to find the encapsulated BSD header. */
-
-/* FIXME, this is dumb. The same tools can't handle a.outs for different
- architectures, just because COFF_MAGIC is different; so you need a
- separate GNU nm for every architecture!!? Unfortunately, it needs to
- be this way, since the COFF_MAGIC value is determined by the kernel
- we're trying to fool here. */
-
-#define COFF_MAGIC_I386 0514 /* I386MAGIC */
-#define COFF_MAGIC_M68K 0520 /* MC68MAGIC */
-#define COFF_MAGIC_A29K 0x17A /* Used by asm29k cross-tools */
-
-#ifdef COFF_MAGIC
-short __header_offset_temp;
-#define HEADER_OFFSET(f) \
- (__header_offset_temp = 0, \
- fread ((char *)&__header_offset_temp, sizeof (short), 1, (f)), \
- fseek ((f), -sizeof (short), 1), \
- __header_offset_temp==COFF_MAGIC ? sizeof(struct coffheader) : 0)
-#else
-#define HEADER_OFFSET(f) 0
-#endif
-
-#define HEADER_SEEK(f) (fseek ((f), HEADER_OFFSET((f)), 1))
-
-/* Describe the characteristics of the BSD header
- that appears inside the encapsulation. */
-
-/* Encapsulated coff files that are linked ZMAGIC have a text segment
- offset just past the header (and a matching TXTADDR), excluding
- the headers from the text segment proper but keeping the physical
- layout and the virtual memory layout page-aligned.
-
- Non-encapsulated a.out files that are linked ZMAGIC have a text
- segment that starts at 0 and an N_TXTADR similarly offset to 0.
- They too are page-aligned with each other, but they include the
- a.out header as part of the text.
-
- The _N_HDROFF gets sizeof struct exec added to it, so we have
- to compensate here. See <a.out.gnu.h>. */
-
-#undef _N_HDROFF
-#undef N_TXTADDR
-#undef N_DATADDR
-
-#define _N_HDROFF(x) ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
- sizeof (struct coffheader) : 0)
-
-/* Address of text segment in memory after it is loaded. */
-#define N_TXTADDR(x) \
- ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
- sizeof (struct coffheader) + sizeof (struct exec) : 0)
-#define SEGMENT_SIZE 0x400000
-
-#define N_DATADDR(x) \
- ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
- (SEGMENT_SIZE + ((N_TXTADDR(x)+(x).a_text-1) & ~(SEGMENT_SIZE-1))) : \
- (N_TXTADDR(x)+(x).a_text))
diff --git a/contrib/gdb/include/aout/host.h b/contrib/gdb/include/aout/host.h
deleted file mode 100644
index 8e36212716c1..000000000000
--- a/contrib/gdb/include/aout/host.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Parameters about the a.out format, based on the host system on which
- the program is compiled. */
-
-/* Address of data segment in memory after it is loaded.
- It is up to you to define SEGMENT_SIZE
- on machines not listed here. */
-#ifndef SEGMENT_SIZE
-#if defined(hp300) || defined(pyr)
-#define SEGMENT_SIZE page_size
-#endif
-#ifdef sony
-#define SEGMENT_SIZE 0x1000
-#endif /* Sony. */
-#ifdef is68k
-#define SEGMENT_SIZE 0x20000
-#endif
-#if defined(m68k) && defined(PORTAR)
-#define TARGET_PAGE_SIZE 0x400
-#define SEGMENT_SIZE TARGET_PAGE_SIZE
-#endif
-#endif /*!defined(SEGMENT_SIZE)*/
-
diff --git a/contrib/gdb/include/aout/hp.h b/contrib/gdb/include/aout/hp.h
deleted file mode 100644
index 002f49cf453d..000000000000
--- a/contrib/gdb/include/aout/hp.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Special version of <a.out.h> for use under hp-ux.
- Copyright 1988, 1991 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* THIS FILE IS OBSOLETE. It needs to be revised as a variant "external"
- a.out format for use with BFD. */
-
-/* The `exec' structure and overall layout must be close to HP's when
- we are running on an HP system, otherwise we will not be able to
- execute the resulting file. */
-
-/* Allow this file to be included twice. */
-#ifndef __GNU_EXEC_MACROS__
-
-struct exec
-{
- unsigned short a_machtype; /* machine type */
- unsigned short a_magic; /* magic number */
- unsigned long a_spare1;
- unsigned long a_spare2;
- unsigned long a_text; /* length of text, in bytes */
- unsigned long a_data; /* length of data, in bytes */
- unsigned long a_bss; /* length of uninitialized data area for file, in bytes */
- unsigned long a_trsize; /* length of relocation info for text, in bytes */
- unsigned long a_drsize; /* length of relocation info for data, in bytes */
- unsigned long a_spare3; /* HP = pascal interface size */
- unsigned long a_spare4; /* HP = symbol table size */
- unsigned long a_spare5; /* HP = debug name table size */
- unsigned long a_entry; /* start address */
- unsigned long a_spare6; /* HP = source line table size */
- unsigned long a_spare7; /* HP = value table size */
- unsigned long a_syms; /* length of symbol table data in file, in bytes */
- unsigned long a_spare8;
-};
-
-/* Tell a.out.gnu.h not to define `struct exec'. */
-#define __STRUCT_EXEC_OVERRIDE__
-
-#include "../a.out.gnu.h"
-
-#undef N_MAGIC
-#undef N_MACHTYPE
-#undef N_FLAGS
-#undef N_SET_INFO
-#undef N_SET_MAGIC
-#undef N_SET_MACHTYPE
-#undef N_SET_FLAGS
-
-#define N_MAGIC(exec) ((exec) . a_magic)
-#define N_MACHTYPE(exec) ((exec) . a_machtype)
-#define N_SET_MAGIC(exec, magic) (((exec) . a_magic) = (magic))
-#define N_SET_MACHTYPE(exec, machtype) (((exec) . a_machtype) = (machtype))
-
-#undef N_BADMAG
-#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
-
-#define _N_BADMACH(x) \
-(((N_MACHTYPE (x)) != HP9000S200_ID) && \
- ((N_MACHTYPE (x)) != HP98x6_ID))
-
-#define HP98x6_ID 0x20A
-#define HP9000S200_ID 0x20C
-
-#undef _N_HDROFF
-#define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
-
-#define SEGMENT_SIZE 0x1000
-
-#endif /* __GNU_EXEC_MACROS__ */
diff --git a/contrib/gdb/include/aout/hp300hpux.h b/contrib/gdb/include/aout/hp300hpux.h
deleted file mode 100644
index 44d5196144da..000000000000
--- a/contrib/gdb/include/aout/hp300hpux.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Special version of <a.out.h> for use under hp-ux.
- Copyright (C) 1988,1993 Free Software Foundation, Inc. */
-
-struct hp300hpux_exec_bytes
-{
- unsigned char e_info[4]; /* a_machtype/a_magic */
- unsigned char e_spare1[4];
- unsigned char e_spare2[4];
- unsigned char e_text[4]; /* length of text, in bytes */
- unsigned char e_data[4]; /* length of data, in bytes */
- unsigned char e_bss[4]; /* length of uninitialized data area , in bytes */
- unsigned char e_trsize[4]; /* length of relocation info for text, in bytes*/
- unsigned char e_drsize[4]; /* length of relocation info for data, in bytes*/
- unsigned char e_passize[4];/* HP = pascal interface size */
- unsigned char e_syms[4]; /* HP = symbol table size */
- unsigned char e_spare5[4]; /* HP = debug name table size */
- unsigned char e_entry[4]; /* start address */
- unsigned char e_spare6[4]; /* HP = source line table size */
- unsigned char e_supsize[4];/* HP = value table size */
- unsigned char e_drelocs[4];
- unsigned char e_extension[4]; /* file offset of extension */
-};
-#define EXEC_BYTES_SIZE 64
-
-struct hp300hpux_nlist_bytes
- {
- unsigned char e_value[4];
- unsigned char e_type[1];
- unsigned char e_length[1]; /* length of ascii symbol name */
- unsigned char e_almod[2]; /* alignment mod */
- unsigned char e_shlib[2]; /* info about dynamic linking */
- };
-#define EXTERNAL_NLIST_SIZE 10
-
-struct hp300hpux_reloc
- {
- unsigned char r_address[4];/* offset of of data to relocate */
- unsigned char r_index[2]; /* symbol table index of symbol */
- unsigned char r_type[1]; /* relocation type */
- unsigned char r_length[1]; /* length of item to reloc */
- };
-
-struct hp300hpux_header_extension
-{
- unsigned char e_syms[4];
- unsigned char unique_headers[12*4];
- unsigned char e_header[2]; /* type of header */
- unsigned char e_version[2]; /* version */
- unsigned char e_size[4]; /* bytes following*/
- unsigned char e_extension[4];/* file offset of next extension */
-};
-#define EXTERNAL_EXTENSION_HEADER_SIZE (16*4)
-
-/* hpux separates object files (0x106) and impure executables (0x107) */
-/* but the bfd code does not distinguish between them. Since we want to*/
-/* read hpux .o files, we add an special define and use it below in */
-/* offset and address calculations. */
-
-#define HPUX_DOT_O_MAGIC 0x106
-#define OMAGIC 0x107 /* object file or impure executable. */
-#define NMAGIC 0x108 /* Code indicating pure executable. */
-#define ZMAGIC 0x10B /* demand-paged executable. */
-
-#define N_HEADER_IN_TEXT(x) 0
-
-#if 0 /* libaout.h only uses the lower 8 bits */
-#define HP98x6_ID 0x20A
-#define HP9000S200_ID 0x20C
-#endif
-#define HP98x6_ID 0x0A
-#define HP9000S200_ID 0x0C
-
-#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
-
-#define N_DATADDR(x) \
- ((N_MAGIC(x)==OMAGIC || N_MAGIC(x)==HPUX_DOT_O_MAGIC) ? \
- (N_TXTADDR(x)+N_TXTSIZE(x)) \
- : (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1))))
-
-#define _N_BADMACH(x) \
-(((N_MACHTYPE (x)) != HP9000S200_ID) && \
- ((N_MACHTYPE (x)) != HP98x6_ID))
-
-#define _N_BADMAG(x) (N_MAGIC(x) != HPUX_DOT_O_MAGIC \
- && N_MAGIC(x) != OMAGIC \
- && N_MAGIC(x) != NMAGIC \
- && N_MAGIC(x) != ZMAGIC )
-
-#undef _N_HDROFF
-#define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
-
-#undef N_DATOFF
-#undef N_PASOFF
-#undef N_SYMOFF
-#undef N_SUPOFF
-#undef N_TRELOFF
-#undef N_DRELOFF
-#undef N_STROFF
-
-#define N_DATOFF(x) ( N_TXTOFF(x) + N_TXTSIZE(x) )
-#define N_PASOFF(x) ( N_DATOFF(x) + (x).a_data)
-#define N_SYMOFF(x) ( N_PASOFF(x) /* + (x).a_passize*/ )
-#define N_SUPOFF(x) ( N_SYMOFF(x) + (x).a_syms )
-#define N_TRELOFF(x) ( N_SUPOFF(x) /* + 0 (x).a_supsize*/ )
-#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
-#define N_EXTHOFF(x) ( N_DRELOFF(x) /* + 0 (x).a_drsize */)
-#define N_STROFF(x) ( 0 /* no string table */ )
-
-/* use these when the file has gnu symbol tables */
-#define N_GNU_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
-#define N_GNU_DRELOFF(x) (N_GNU_TRELOFF(x) + (x).a_trsize)
-#define N_GNU_SYMOFF(x) (N_GNU_DRELOFF(x) + (x).a_drsize)
-
-#define TARGET_PAGE_SIZE 0x1000
-#define SEGMENT_SIZE 0x1000
-#define TEXT_START_ADDR 0
-
-#undef N_SHARED_LIB
-#define N_SHARED_LIB(x) ( 0 /* no shared libraries */ )
diff --git a/contrib/gdb/include/aout/hppa.h b/contrib/gdb/include/aout/hppa.h
deleted file mode 100644
index 7e185de768a4..000000000000
--- a/contrib/gdb/include/aout/hppa.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "filehdr.h"
-#include "aouthdr.h"
-#include "scnhdr.h"
-#include "spacehdr.h"
-#include "syms.h"
-
-
diff --git a/contrib/gdb/include/aout/ranlib.h b/contrib/gdb/include/aout/ranlib.h
deleted file mode 100644
index 982600514b65..000000000000
--- a/contrib/gdb/include/aout/ranlib.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* ranlib.h -- archive library index member definition for GNU.
- Copyright 1990-1991 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* The Symdef member of an archive contains two things:
- a table that maps symbol-string offsets to file offsets,
- and a symbol-string table. All the symbol names are
- run together (each with trailing null) in the symbol-string
- table. There is a single longword bytecount on the front
- of each of these tables. Thus if we have two symbols,
- "foo" and "_bar", that are in archive members at offsets
- 200 and 900, it would look like this:
- 16 ; byte count of index table
- 0 ; offset of "foo" in string table
- 200 ; offset of foo-module in file
- 4 ; offset of "bar" in string table
- 900 ; offset of bar-module in file
- 9 ; byte count of string table
- "foo\0_bar\0" ; string table */
-
-#define RANLIBMAG "__.SYMDEF" /* Archive file name containing index */
-#define RANLIBSKEW 3 /* Creation time offset */
-
-/* Format of __.SYMDEF:
- First, a longword containing the size of the 'symdef' data that follows.
- Second, zero or more 'symdef' structures.
- Third, a longword containing the length of symbol name strings.
- Fourth, zero or more symbol name strings (each followed by a null). */
-
-struct symdef
- {
- union
- {
- unsigned long string_offset; /* In the file */
- char *name; /* In memory, sometimes */
- } s;
- /* this points to the front of the file header (AKA member header --
- a struct ar_hdr), not to the front of the file or into the file).
- in other words it only tells you which file to read */
- unsigned long file_offset;
- };
-
-/* Compatability with BSD code */
-
-#define ranlib symdef
-#define ran_un s
-#define ran_strx string_offset
-#define ran_name name
-#define ran_off file_offset
diff --git a/contrib/gdb/include/aout/reloc.h b/contrib/gdb/include/aout/reloc.h
deleted file mode 100644
index 563c552a3578..000000000000
--- a/contrib/gdb/include/aout/reloc.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* reloc.h -- Header file for relocation information.
- Copyright 1989-1991 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. */
-
-/* Relocation types for a.out files using reloc_info_extended
- (SPARC and AMD 29000). */
-
-#ifndef _RELOC_H_READ_
-#define _RELOC_H_READ_ 1
-
-enum reloc_type
- {
- RELOC_8, RELOC_16, RELOC_32, /* simple relocations */
- RELOC_DISP8, RELOC_DISP16, RELOC_DISP32, /* pc-rel displacement */
- RELOC_WDISP30, RELOC_WDISP22,
- RELOC_HI22, RELOC_22,
- RELOC_13, RELOC_LO10,
- RELOC_SFA_BASE, RELOC_SFA_OFF13,
- RELOC_BASE10, RELOC_BASE13, RELOC_BASE22, /* P.I.C. (base-relative) */
- RELOC_PC10, RELOC_PC22, /* for some sort of pc-rel P.I.C. (?) */
- RELOC_JMP_TBL, /* P.I.C. jump table */
- RELOC_SEGOFF16, /* reputedly for shared libraries somehow */
- RELOC_GLOB_DAT, RELOC_JMP_SLOT, RELOC_RELATIVE,
- RELOC_11,
- RELOC_WDISP2_14,
- RELOC_WDISP19,
- RELOC_HHI22,
- RELOC_HLO10,
-
- /* 29K relocation types */
- RELOC_JUMPTARG, RELOC_CONST, RELOC_CONSTH,
-
- RELOC_WDISP14, RELOC_WDISP21,
-
- NO_RELOC
- };
-
-#define RELOC_TYPE_NAMES \
-"8", "16", "32", "DISP8", \
-"DISP16", "DISP32", "WDISP30", "WDISP22", \
-"HI22", "22", "13", "LO10", \
-"SFA_BASE", "SFAOFF13", "BASE10", "BASE13", \
-"BASE22", "PC10", "PC22", "JMP_TBL", \
-"SEGOFF16", "GLOB_DAT", "JMP_SLOT", "RELATIVE", \
-"11", "WDISP2_14", "WDISP19", "HHI22", \
-"HLO10", \
-"JUMPTARG", "CONST", "CONSTH", "WDISP14", \
-"WDISP21", \
-"NO_RELOC"
-
-#endif /* _RELOC_H_READ_ */
-
-/* end of reloc.h */
diff --git a/contrib/gdb/include/aout/stab.def b/contrib/gdb/include/aout/stab.def
deleted file mode 100644
index 3c6b456d3a97..000000000000
--- a/contrib/gdb/include/aout/stab.def
+++ /dev/null
@@ -1,264 +0,0 @@
-/* Table of DBX symbol codes for the GNU system.
- Copyright (C) 1988, 91, 92, 93, 94, 95, 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. */
-
-/* New stab from Solaris 2. This uses an n_type of 0, which in a.out files
- overlaps the N_UNDF used for ordinary symbols. In ELF files, the
- debug information is in a different file section, so there is no conflict.
- This symbol's n_value gives the size of the string section associated
- with this file. The symbol's n_strx (relative to the just-updated
- string section start address) gives the name of the source file,
- e.g. "foo.c", without any path information. The symbol's n_desc gives
- the count of upcoming symbols associated with this file (not including
- this one). */
-/* __define_stab (N_UNDF, 0x00, "UNDF") */
-
-/* Global variable. Only the name is significant.
- To find the address, look in the corresponding external symbol. */
-__define_stab (N_GSYM, 0x20, "GSYM")
-
-/* Function name for BSD Fortran. Only the name is significant.
- To find the address, look in the corresponding external symbol. */
-__define_stab (N_FNAME, 0x22, "FNAME")
-
-/* Function name or text-segment variable for C. Value is its address.
- Desc is supposedly starting line number, but GCC doesn't set it
- and DBX seems not to miss it. */
-__define_stab (N_FUN, 0x24, "FUN")
-
-/* Data-segment variable with internal linkage. Value is its address.
- "Static Sym". */
-__define_stab (N_STSYM, 0x26, "STSYM")
-
-/* BSS-segment variable with internal linkage. Value is its address. */
-__define_stab (N_LCSYM, 0x28, "LCSYM")
-
-/* Name of main routine. Only the name is significant. */
-__define_stab (N_MAIN, 0x2a, "MAIN")
-
-/* Solaris2: Read-only data symbols. */
-__define_stab (N_ROSYM, 0x2c, "ROSYM")
-
-/* Global symbol in Pascal.
- Supposedly the value is its line number; I'm skeptical. */
-__define_stab (N_PC, 0x30, "PC")
-
-/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */
-__define_stab (N_NSYMS, 0x32, "NSYMS")
-
-/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */
-__define_stab (N_NOMAP, 0x34, "NOMAP")
-
-/* New stab from Solaris 2. Like N_SO, but for the object file. Two in
- a row provide the build directory and the relative path of the .o from it.
- Solaris2 uses this to avoid putting the stabs info into the linked
- executable; this stab goes into the ".stab.index" section, and the debugger
- reads the real stabs directly from the .o files instead. */
-__define_stab (N_OBJ, 0x38, "OBJ")
-
-/* New stab from Solaris 2. Options for the debugger, related to the
- source language for this module. E.g. whether to use ANSI
- integral promotions or traditional integral promotions. */
-__define_stab (N_OPT, 0x3c, "OPT")
-
-/* Register variable. Value is number of register. */
-__define_stab (N_RSYM, 0x40, "RSYM")
-
-/* Modula-2 compilation unit. Can someone say what info it contains? */
-__define_stab (N_M2C, 0x42, "M2C")
-
-/* Line number in text segment. Desc is the line number;
- value is corresponding address. On Solaris2, the line number is
- relative to the start of the current function. */
-__define_stab (N_SLINE, 0x44, "SLINE")
-
-/* Similar, for data segment. */
-__define_stab (N_DSLINE, 0x46, "DSLINE")
-
-/* Similar, for bss segment. */
-__define_stab (N_BSLINE, 0x48, "BSLINE")
-
-/* Sun's source-code browser stabs. ?? Don't know what the fields are.
- Supposedly the field is "path to associated .cb file". THIS VALUE
- OVERLAPS WITH N_BSLINE! */
-__define_stab_duplicate (N_BROWS, 0x48, "BROWS")
-
-/* GNU Modula-2 definition module dependency. Value is the modification time
- of the definition file. Other is non-zero if it is imported with the
- GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there
- are enough empty fields? */
-__define_stab(N_DEFD, 0x4a, "DEFD")
-
-/* New in Solaris2. Function start/body/end line numbers. */
-__define_stab(N_FLINE, 0x4C, "FLINE")
-
-/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2
- and one is for C++. Still,... */
-/* GNU C++ exception variable. Name is variable name. */
-__define_stab (N_EHDECL, 0x50, "EHDECL")
-/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */
-__define_stab_duplicate (N_MOD2, 0x50, "MOD2")
-
-/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if
- this entry is immediately followed by a CAUGHT stab saying what exception
- was caught. Multiple CAUGHT stabs means that multiple exceptions
- can be caught here. If Desc is 0, it means all exceptions are caught
- here. */
-__define_stab (N_CATCH, 0x54, "CATCH")
-
-/* Structure or union element. Value is offset in the structure. */
-__define_stab (N_SSYM, 0x60, "SSYM")
-
-/* Solaris2: Last stab emitted for module. */
-__define_stab (N_ENDM, 0x62, "ENDM")
-
-/* Name of main source file.
- Value is starting text address of the compilation.
- If multiple N_SO's appear, the first to contain a trailing / is the
- compilation directory. The first to not contain a trailing / is the
- source file name, relative to the compilation directory. Others (perhaps
- resulting from cfront) are ignored.
- On Solaris2, value is undefined, but desc is a source-language code. */
-
-__define_stab (N_SO, 0x64, "SO")
-
-/* Automatic variable in the stack. Value is offset from frame pointer.
- Also used for type descriptions. */
-__define_stab (N_LSYM, 0x80, "LSYM")
-
-/* Beginning of an include file. Only Sun uses this.
- In an object file, only the name is significant.
- The Sun linker puts data into some of the other fields. */
-__define_stab (N_BINCL, 0x82, "BINCL")
-
-/* Name of sub-source file (#include file).
- Value is starting text address of the compilation. */
-__define_stab (N_SOL, 0x84, "SOL")
-
-/* Parameter variable. Value is offset from argument pointer.
- (On most machines the argument pointer is the same as the frame pointer. */
-__define_stab (N_PSYM, 0xa0, "PSYM")
-
-/* End of an include file. No name.
- This and N_BINCL act as brackets around the file's output.
- In an object file, there is no significant data in this entry.
- The Sun linker puts data into some of the fields. */
-__define_stab (N_EINCL, 0xa2, "EINCL")
-
-/* Alternate entry point. Value is its address. */
-__define_stab (N_ENTRY, 0xa4, "ENTRY")
-
-/* Beginning of lexical block.
- The desc is the nesting level in lexical blocks.
- The value is the address of the start of the text for the block.
- The variables declared inside the block *precede* the N_LBRAC symbol.
- On Solaris2, the value is relative to the start of the current function. */
-__define_stab (N_LBRAC, 0xc0, "LBRAC")
-
-/* Place holder for deleted include file. Replaces a N_BINCL and everything
- up to the corresponding N_EINCL. The Sun linker generates these when
- it finds multiple identical copies of the symbols from an include file.
- This appears only in output from the Sun linker. */
-__define_stab (N_EXCL, 0xc2, "EXCL")
-
-/* Modula-2 scope information. Can someone say what info it contains? */
-__define_stab (N_SCOPE, 0xc4, "SCOPE")
-
-/* End of a lexical block. Desc matches the N_LBRAC's desc.
- The value is the address of the end of the text for the block.
- On Solaris2, the value is relative to the start of the current function. */
-__define_stab (N_RBRAC, 0xe0, "RBRAC")
-
-/* Begin named common block. Only the name is significant. */
-__define_stab (N_BCOMM, 0xe2, "BCOMM")
-
-/* End named common block. Only the name is significant
- (and it should match the N_BCOMM). */
-__define_stab (N_ECOMM, 0xe4, "ECOMM")
-
-/* Member of a common block; value is offset within the common block.
- This should occur within a BCOMM/ECOMM pair. */
-__define_stab (N_ECOML, 0xe8, "ECOML")
-
-/* Solaris2: Pascal "with" statement: type,,0,0,offset */
-__define_stab (N_WITH, 0xea, "WITH")
-
-/* These STAB's are used on Gould systems for Non-Base register symbols
- or something like that. FIXME. I have assigned the values at random
- since I don't have a Gould here. Fixups from Gould folk welcome... */
-__define_stab (N_NBTEXT, 0xF0, "NBTEXT")
-__define_stab (N_NBDATA, 0xF2, "NBDATA")
-__define_stab (N_NBBSS, 0xF4, "NBBSS")
-__define_stab (N_NBSTS, 0xF6, "NBSTS")
-__define_stab (N_NBLCS, 0xF8, "NBLCS")
-
-/* Second symbol entry containing a length-value for the preceding entry.
- The value is the length. */
-__define_stab (N_LENG, 0xfe, "LENG")
-
-/* The above information, in matrix format.
-
- STAB MATRIX
- _________________________________________________
- | 00 - 1F are not dbx stab symbols |
- | In most cases, the low bit is the EXTernal bit|
-
- | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA |
- | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT |
-
- | 08 BSS | 0A INDR | 0C FN_SEQ | 0E WEAKA |
- | 09 |EXT | 0B | 0D WEAKU | 0F WEAKT |
-
- | 10 WEAKD | 12 COMM | 14 SETA | 16 SETT |
- | 11 WEAKB | 13 | 15 | 17 |
-
- | 18 SETD | 1A SETB | 1C SETV | 1E WARNING|
- | 19 | 1B | 1D | 1F FN |
-
- |_______________________________________________|
- | Debug entries with bit 01 set are unused. |
- | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM |
- | 28 LCSYM | 2A MAIN | 2C ROSYM | 2E |
- | 30 PC | 32 NSYMS | 34 NOMAP | 36 |
- | 38 OBJ | 3A | 3C OPT | 3E |
- | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE |
- | 48 BSLINE*| 4A DEFD | 4C FLINE | 4E |
- | 50 EHDECL*| 52 | 54 CATCH | 56 |
- | 58 | 5A | 5C | 5E |
- | 60 SSYM | 62 ENDM | 64 SO | 66 |
- | 68 | 6A | 6C | 6E |
- | 70 | 72 | 74 | 76 |
- | 78 | 7A | 7C | 7E |
- | 80 LSYM | 82 BINCL | 84 SOL | 86 |
- | 88 | 8A | 8C | 8E |
- | 90 | 92 | 94 | 96 |
- | 98 | 9A | 9C | 9E |
- | A0 PSYM | A2 EINCL | A4 ENTRY | A6 |
- | A8 | AA | AC | AE |
- | B0 | B2 | B4 | B6 |
- | B8 | BA | BC | BE |
- | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 |
- | C8 | CA | CC | CE |
- | D0 | D2 | D4 | D6 |
- | D8 | DA | DC | DE |
- | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 |
- | E8 ECOML | EA WITH | EC | EE |
- | F0 | F2 | F4 | F6 |
- | F8 | FA | FC | FE LENG |
- +-----------------------------------------------+
- * 50 EHDECL is also MOD2.
- * 48 BSLINE is also BROWS.
- */
diff --git a/contrib/gdb/include/aout/stab_gnu.h b/contrib/gdb/include/aout/stab_gnu.h
deleted file mode 100644
index 7d18e14a2634..000000000000
--- a/contrib/gdb/include/aout/stab_gnu.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef __GNU_STAB__
-
-/* Indicate the GNU stab.h is in use. */
-
-#define __GNU_STAB__
-
-#define __define_stab(NAME, CODE, STRING) NAME=CODE,
-#define __define_stab_duplicate(NAME, CODE, STRING) NAME=CODE,
-
-enum __stab_debug_code
-{
-#include "aout/stab.def"
-LAST_UNUSED_STAB_CODE
-};
-
-#undef __define_stab
-
-/* Definitions of "desc" field for N_SO stabs in Solaris2. */
-
-#define N_SO_AS 1
-#define N_SO_C 2
-#define N_SO_ANSI_C 3
-#define N_SO_CC 4 /* C++ */
-#define N_SO_FORTRAN 5
-#define N_SO_PASCAL 6
-
-/* Solaris2: Floating point type values in basic types. */
-
-#define NF_NONE 0
-#define NF_SINGLE 1 /* IEEE 32-bit */
-#define NF_DOUBLE 2 /* IEEE 64-bit */
-#define NF_COMPLEX 3 /* Fortran complex */
-#define NF_COMPLEX16 4 /* Fortran double complex */
-#define NF_COMPLEX32 5 /* Fortran complex*16 */
-#define NF_LDOUBLE 6 /* Long double (whatever that is) */
-
-#endif /* __GNU_STAB_ */
diff --git a/contrib/gdb/include/aout/sun4.h b/contrib/gdb/include/aout/sun4.h
deleted file mode 100644
index f42a0dd45988..000000000000
--- a/contrib/gdb/include/aout/sun4.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/* SPARC-specific values for a.out files */
-
-/* Some systems, e.g., AIX, may have defined this in header files already
- included. */
-#undef TARGET_PAGE_SIZE
-#define TARGET_PAGE_SIZE 0x2000 /* 8K. aka NBPG in <sys/param.h> */
-/* Note that some SPARCs have 4K pages, some 8K, some others. */
-
-#define SEG_SIZE_SPARC TARGET_PAGE_SIZE
-#define SEG_SIZE_SUN3 0x20000 /* Resolution of r/w protection hw */
-
-#define TEXT_START_ADDR TARGET_PAGE_SIZE /* Location 0 is not accessible */
-#define N_HEADER_IN_TEXT(x) 1
-
-/* Non-default definitions of the accessor macros... */
-
-/* Segment size varies on Sun-3 versus Sun-4. */
-
-#define N_SEGSIZE(x) (N_MACHTYPE(x) == M_SPARC? SEG_SIZE_SPARC: \
- N_MACHTYPE(x) == M_68020? SEG_SIZE_SUN3: \
- /* Guess? */ TARGET_PAGE_SIZE)
-
-/* Virtual Address of text segment from the a.out file. For OMAGIC,
- (almost always "unlinked .o's" these days), should be zero.
- Sun added a kludge so that shared libraries linked ZMAGIC get
- an address of zero if a_entry (!!!) is lower than the otherwise
- expected text address. These kludges have gotta go!
- For linked files, should reflect reality if we know it. */
-
-/* This differs from the version in aout64.h (which we override by defining
- it here) only for NMAGIC (we return TEXT_START_ADDR+EXEC_BYTES_SIZE;
- they return 0). */
-
-#define N_TXTADDR(x) \
- (N_MAGIC(x)==OMAGIC? 0 \
- : (N_MAGIC(x) == ZMAGIC && (x).a_entry < TEXT_START_ADDR)? 0 \
- : TEXT_START_ADDR+EXEC_BYTES_SIZE)
-
-/* When a file is linked against a shared library on SunOS 4, the
- dynamic bit in the exec header is set, and the first symbol in the
- symbol table is __DYNAMIC. Its value is the address of the
- following structure. */
-
-struct external_sun4_dynamic
-{
- /* The version number of the structure. SunOS 4.1.x creates files
- with version number 3, which is what this structure is based on.
- According to gdb, version 2 is similar. I believe that version 2
- used a different type of procedure linkage table, and there may
- have been other differences. */
- bfd_byte ld_version[4];
- /* The virtual address of a 28 byte structure used in debugging.
- The contents are filled in at run time by ld.so. */
- bfd_byte ldd[4];
- /* The virtual address of another structure with information about
- how to relocate the executable at run time. */
- bfd_byte ld[4];
-};
-
-/* The size of the debugging structure pointed to by the debugger
- field of __DYNAMIC. */
-#define EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE (24)
-
-/* The structure pointed to by the linker field of __DYNAMIC. As far
- as I can tell, most of the addresses in this structure are offsets
- within the file, but some are actually virtual addresses. */
-
-struct internal_sun4_dynamic_link
-{
- /* Linked list of loaded objects. This is filled in at runtime by
- ld.so and probably by dlopen. */
- unsigned long ld_loaded;
-
- /* The address of the list of names of shared objects which must be
- included at runtime. Each entry in the list is 16 bytes: the 4
- byte address of the string naming the object (e.g., for -lc this
- is "c"); 4 bytes of flags--the high bit is whether to search for
- the object using the library path; the 2 byte major version
- number; the 2 byte minor version number; the 4 byte address of
- the next entry in the list (zero if this is the last entry). The
- version numbers seem to only be non-zero when doing library
- searching. */
- unsigned long ld_need;
-
- /* The address of the path to search for the shared objects which
- must be included. This points to a string in PATH format which
- is generated from the -L arguments to the linker. According to
- the man page, ld.so implicitly adds ${LD_LIBRARY_PATH} to the
- beginning of this string and /lib:/usr/lib:/usr/local/lib to the
- end. The string is terminated by a null byte. This field is
- zero if there is no additional path. */
- unsigned long ld_rules;
-
- /* The address of the global offset table. This appears to be a
- virtual address, not a file offset. The first entry in the
- global offset table seems to be the virtual address of the
- sun4_dynamic structure (the same value as the __DYNAMIC symbol).
- The global offset table is used for PIC code to hold the
- addresses of variables. A dynamically linked file which does not
- itself contain PIC code has a four byte global offset table. */
- unsigned long ld_got;
-
- /* The address of the procedure linkage table. This appears to be a
- virtual address, not a file offset.
-
- On a SPARC, the table is composed of 12 byte entries, each of
- which consists of three instructions. The first entry is
- sethi %hi(0),%g1
- jmp %g1
- nop
- These instructions are changed by ld.so into a jump directly into
- ld.so itself. Each subsequent entry is
- save %sp, -96, %sp
- call <address of first entry in procedure linkage table>
- <reloc_number | 0x01000000>
- The reloc_number is the number of the reloc to use to resolve
- this entry. The reloc will be a JMP_SLOT reloc against some
- symbol that is not defined in this object file but should be
- defined in a shared object (if it is not, ld.so will report a
- runtime error and exit). The constant 0x010000000 turns the
- reloc number into a sethi of %g0, which does nothing since %g0 is
- hardwired to zero.
-
- When one of these entries is executed, it winds up calling into
- ld.so. ld.so looks at the reloc number, available via the return
- address, to determine which entry this is. It then looks at the
- reloc and patches up the entry in the table into a sethi and jmp
- to the real address followed by a nop. This means that the reloc
- lookup only has to happen once, and it also means that the
- relocation only needs to be done if the function is actually
- called. The relocation is expensive because ld.so must look up
- the symbol by name.
-
- The size of the procedure linkage table is given by the ld_plt_sz
- field. */
- unsigned long ld_plt;
-
- /* The address of the relocs. These are in the same format as
- ordinary relocs. Symbol index numbers refer to the symbols
- pointed to by ld_stab. I think the only way to determine the
- number of relocs is to assume that all the bytes from ld_rel to
- ld_hash contain reloc entries. */
- unsigned long ld_rel;
-
- /* The address of a hash table of symbols. The hash table has
- roughly the same number of entries as there are dynamic symbols;
- I think the only way to get the exact size is to assume that
- every byte from ld_hash to ld_stab is devoted to the hash table.
-
- Each entry in the hash table is eight bytes. The first four
- bytes are a symbol index into the dynamic symbols. The second
- four bytes are the index of the next hash table entry in the
- bucket. The ld_buckets field gives the number of buckets, say B.
- The first B entries in the hash table each start a bucket which
- is chained through the second four bytes of each entry. A value
- of zero ends the chain.
-
- The hash function is simply
- h = 0;
- while (*string != '\0')
- h = (h << 1) + *string++;
- h &= 0x7fffffff;
-
- To look up a symbol, compute the hash value of the name. Take
- the modulos of hash value and the number of buckets. Start at
- that entry in the hash table. See if the symbol (from the first
- four bytes of the hash table entry) has the name you are looking
- for. If not, use the chain field (the second four bytes of the
- hash table entry) to move on to the next entry in this bucket.
- If the chain field is zero you have reached the end of the
- bucket, and the symbol is not in the hash table. */
- unsigned long ld_hash;
-
- /* The address of the symbol table. This is a list of
- external_nlist structures. The string indices are relative to
- the ld_symbols field. I think the only way to determine the
- number of symbols is to assume that all the bytes between ld_stab
- and ld_symbols are external_nlist structures. */
- unsigned long ld_stab;
-
- /* I don't know what this is for. It seems to always be zero. */
- unsigned long ld_stab_hash;
-
- /* The number of buckets in the hash table. */
- unsigned long ld_buckets;
-
- /* The address of the symbol string table. The first string in this
- string table need not be the empty string. */
- unsigned long ld_symbols;
-
- /* The size in bytes of the symbol string table. */
- unsigned long ld_symb_size;
-
- /* The size in bytes of the text segment. */
- unsigned long ld_text;
-
- /* The size in bytes of the procedure linkage table. */
- unsigned long ld_plt_sz;
-};
-
-/* The external form of the structure. */
-
-struct external_sun4_dynamic_link
-{
- bfd_byte ld_loaded[4];
- bfd_byte ld_need[4];
- bfd_byte ld_rules[4];
- bfd_byte ld_got[4];
- bfd_byte ld_plt[4];
- bfd_byte ld_rel[4];
- bfd_byte ld_hash[4];
- bfd_byte ld_stab[4];
- bfd_byte ld_stab_hash[4];
- bfd_byte ld_buckets[4];
- bfd_byte ld_symbols[4];
- bfd_byte ld_symb_size[4];
- bfd_byte ld_text[4];
- bfd_byte ld_plt_sz[4];
-};
diff --git a/contrib/gdb/include/bfdlink.h b/contrib/gdb/include/bfdlink.h
deleted file mode 100644
index 47d80b8c195f..000000000000
--- a/contrib/gdb/include/bfdlink.h
+++ /dev/null
@@ -1,452 +0,0 @@
-/* bfdlink.h -- header file for BFD link routines
- Copyright 1993 Free Software Foundation, Inc.
- Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
-
-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 BFDLINK_H
-#define BFDLINK_H
-
-/* Which symbols to strip during a link. */
-enum bfd_link_strip
-{
- strip_none, /* Don't strip any symbols. */
- strip_debugger, /* Strip debugging symbols. */
- strip_some, /* keep_hash is the list of symbols to keep. */
- strip_all /* Strip all symbols. */
-};
-
-/* Which local symbols to discard during a link. This is irrelevant
- if strip_all is used. */
-enum bfd_link_discard
-{
- discard_none, /* Don't discard any locals. */
- discard_l, /* Discard locals with a certain prefix. */
- discard_all /* Discard all locals. */
-};
-
-/* These are the possible types of an entry in the BFD link hash
- table. */
-
-enum bfd_link_hash_type
-{
- bfd_link_hash_new, /* Symbol is new. */
- bfd_link_hash_undefined, /* Symbol seen before, but undefined. */
- bfd_link_hash_undefweak, /* Symbol is weak and undefined. */
- bfd_link_hash_defined, /* Symbol is defined. */
- bfd_link_hash_defweak, /* Symbol is weak and defined. */
- bfd_link_hash_common, /* Symbol is common. */
- bfd_link_hash_indirect, /* Symbol is an indirect link. */
- bfd_link_hash_warning /* Like indirect, but warn if referenced. */
-};
-
-/* The linking routines use a hash table which uses this structure for
- its elements. */
-
-struct bfd_link_hash_entry
-{
- /* Base hash table entry structure. */
- struct bfd_hash_entry root;
- /* Type of this entry. */
- enum bfd_link_hash_type type;
-
- /* Undefined and common symbols are kept in a linked list through
- this field. This field is not in the union because that would
- force us to remove entries from the list when we changed their
- type, which would force the list to be doubly linked, which would
- waste more memory. When an undefined or common symbol is
- created, it should be added to this list, the head of which is in
- the link hash table itself. As symbols are defined, they need
- not be removed from the list; anything which reads the list must
- doublecheck the symbol type.
-
- Weak symbols are not kept on this list.
-
- Defined and defweak symbols use this field as a reference marker.
- If the field is not NULL, or this structure is the tail of the
- undefined symbol list, the symbol has been referenced. If the
- symbol is undefined and becomes defined, this field will
- automatically be non-NULL since the symbol will have been on the
- undefined symbol list. */
- struct bfd_link_hash_entry *next;
- /* A union of information depending upon the type. */
- union
- {
- /* Nothing is kept for bfd_hash_new. */
- /* bfd_link_hash_undefined, bfd_link_hash_undefweak. */
- struct
- {
- bfd *abfd; /* BFD symbol was found in. */
- } undef;
- /* bfd_link_hash_defined, bfd_link_hash_defweak. */
- struct
- {
- bfd_vma value; /* Symbol value. */
- asection *section; /* Symbol section. */
- } def;
- /* bfd_link_hash_indirect, bfd_link_hash_warning. */
- struct
- {
- struct bfd_link_hash_entry *link; /* Real symbol. */
- const char *warning; /* Warning (bfd_link_hash_warning only). */
- } i;
- /* bfd_link_hash_common. */
- struct
- {
- /* The linker needs to know three things about common
- symbols: the size, the alignment, and the section in
- which the symbol should be placed. We store the size
- here, and we allocate a small structure to hold the
- section and the alignment. The alignment is stored as a
- power of two. We don't store all the information
- directly because we don't want to increase the size of
- the union; this structure is a major space user in the
- linker. */
- bfd_size_type size; /* Common symbol size. */
- struct bfd_link_hash_common_entry
- {
- unsigned int alignment_power; /* Alignment. */
- asection *section; /* Symbol section. */
- } *p;
- } c;
- } u;
-};
-
-/* This is the link hash table. It is a derived class of
- bfd_hash_table. */
-
-struct bfd_link_hash_table
-{
- /* The hash table itself. */
- struct bfd_hash_table table;
- /* The back end which created this hash table. This indicates the
- type of the entries in the hash table, which is sometimes
- important information when linking object files of different
- types together. */
- const bfd_target *creator;
- /* A linked list of undefined and common symbols, linked through the
- next field in the bfd_link_hash_entry structure. */
- struct bfd_link_hash_entry *undefs;
- /* Entries are added to the tail of the undefs list. */
- struct bfd_link_hash_entry *undefs_tail;
-};
-
-/* Look up an entry in a link hash table. If FOLLOW is true, this
- follows bfd_link_hash_indirect and bfd_link_hash_warning links to
- the real symbol. */
-extern struct bfd_link_hash_entry *bfd_link_hash_lookup
- PARAMS ((struct bfd_link_hash_table *, const char *, boolean create,
- boolean copy, boolean follow));
-
-/* Look up an entry in the main linker hash table if the symbol might
- be wrapped. This should only be used for references to an
- undefined symbol, not for definitions of a symbol. */
-
-extern struct bfd_link_hash_entry *bfd_wrapped_link_hash_lookup
- PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean, boolean,
- boolean));
-
-/* Traverse a link hash table. */
-extern void bfd_link_hash_traverse
- PARAMS ((struct bfd_link_hash_table *,
- boolean (*) (struct bfd_link_hash_entry *, PTR),
- PTR));
-
-/* Add an entry to the undefs list. */
-extern void bfd_link_add_undef
- PARAMS ((struct bfd_link_hash_table *, struct bfd_link_hash_entry *));
-
-/* This structure holds all the information needed to communicate
- between BFD and the linker when doing a link. */
-
-struct bfd_link_info
-{
- /* Function callbacks. */
- const struct bfd_link_callbacks *callbacks;
- /* true if BFD should generate a relocateable object file. */
- boolean relocateable;
- /* true if BFD should generate a shared object. */
- boolean shared;
- /* true if BFD should pre-bind symbols in a shared object. */
- boolean symbolic;
- /* true if shared objects should be linked directly, not shared. */
- boolean static_link;
- /* Which symbols to strip. */
- enum bfd_link_strip strip;
- /* Which local symbols to discard. */
- enum bfd_link_discard discard;
- /* The local symbol prefix to discard if using discard_l. */
- unsigned int lprefix_len;
- const char *lprefix;
- /* true if symbols should be retained in memory, false if they
- should be freed and reread. */
- boolean keep_memory;
- /* The list of input BFD's involved in the link. These are chained
- together via the link_next field. */
- bfd *input_bfds;
- /* If a symbol should be created for each input BFD, this is section
- where those symbols should be placed. It must be a section in
- the output BFD. It may be NULL, in which case no such symbols
- will be created. This is to support CREATE_OBJECT_SYMBOLS in the
- linker command language. */
- asection *create_object_symbols_section;
- /* Hash table handled by BFD. */
- struct bfd_link_hash_table *hash;
- /* Hash table of symbols to keep. This is NULL unless strip is
- strip_some. */
- struct bfd_hash_table *keep_hash;
- /* Hash table of symbols to report back via notice_callback. If
- this is NULL no symbols are reported back. */
- struct bfd_hash_table *notice_hash;
- /* Hash table of symbols which are being wrapped (the --wrap linker
- option). If this is NULL, no symbols are being wrapped. */
- struct bfd_hash_table *wrap_hash;
-
- /* If a base output file is wanted, then this points to it */
- PTR base_file;
-};
-
-/* This structures holds a set of callback functions. These are
- called by the BFD linker routines. The first argument to each
- callback function is the bfd_link_info structure being used. Each
- function returns a boolean value. If the function returns false,
- then the BFD function which called it will return with a failure
- indication. */
-
-struct bfd_link_callbacks
-{
- /* A function which is called when an object is added from an
- archive. ABFD is the archive element being added. NAME is the
- name of the symbol which caused the archive element to be pulled
- in. */
- boolean (*add_archive_element) PARAMS ((struct bfd_link_info *,
- bfd *abfd,
- const char *name));
- /* A function which is called when a symbol is found with multiple
- definitions. NAME is the symbol which is defined multiple times.
- OBFD is the old BFD, OSEC is the old section, OVAL is the old
- value, NBFD is the new BFD, NSEC is the new section, and NVAL is
- the new value. OBFD may be NULL. OSEC and NSEC may be
- bfd_com_section or bfd_ind_section. */
- boolean (*multiple_definition) PARAMS ((struct bfd_link_info *,
- const char *name,
- bfd *obfd,
- asection *osec,
- bfd_vma oval,
- bfd *nbfd,
- asection *nsec,
- bfd_vma nval));
- /* A function which is called when a common symbol is defined
- multiple times. NAME is the symbol appearing multiple times.
- OBFD is the BFD of the existing symbol; it may be NULL if this is
- not known. OTYPE is the type of the existing symbol, which may
- be bfd_link_hash_defined, bfd_link_hash_defweak,
- bfd_link_hash_common, or bfd_link_hash_indirect. If OTYPE is
- bfd_link_hash_common, OSIZE is the size of the existing symbol.
- NBFD is the BFD of the new symbol. NTYPE is the type of the new
- symbol, one of bfd_link_hash_defined, bfd_link_hash_common, or
- bfd_link_hash_indirect. If NTYPE is bfd_link_hash_common, NSIZE
- is the size of the new symbol. */
- boolean (*multiple_common) PARAMS ((struct bfd_link_info *,
- const char *name,
- bfd *obfd,
- enum bfd_link_hash_type otype,
- bfd_vma osize,
- bfd *nbfd,
- enum bfd_link_hash_type ntype,
- bfd_vma nsize));
- /* A function which is called to add a symbol to a set. ENTRY is
- the link hash table entry for the set itself (e.g.,
- __CTOR_LIST__). RELOC is the relocation to use for an entry in
- the set when generating a relocateable file, and is also used to
- get the size of the entry when generating an executable file.
- ABFD, SEC and VALUE identify the value to add to the set. */
- boolean (*add_to_set) PARAMS ((struct bfd_link_info *,
- struct bfd_link_hash_entry *entry,
- bfd_reloc_code_real_type reloc,
- bfd *abfd, asection *sec, bfd_vma value));
- /* A function which is called when the name of a g++ constructor or
- destructor is found. This is only called by some object file
- formats. CONSTRUCTOR is true for a constructor, false for a
- destructor. This will use BFD_RELOC_CTOR when generating a
- relocateable file. NAME is the name of the symbol found. ABFD,
- SECTION and VALUE are the value of the symbol. */
- boolean (*constructor) PARAMS ((struct bfd_link_info *,
- boolean constructor,
- const char *name, bfd *abfd, asection *sec,
- bfd_vma value));
- /* A function which is called to issue a linker warning. For
- example, this is called when there is a reference to a warning
- symbol. WARNING is the warning to be issued. SYMBOL is the name
- of the symbol which triggered the warning; it may be NULL if
- there is none. ABFD, SECTION and ADDRESS identify the location
- which trigerred the warning; either ABFD or SECTION or both may
- be NULL if the location is not known. */
- boolean (*warning) PARAMS ((struct bfd_link_info *,
- const char *warning, const char *symbol,
- bfd *abfd, asection *section,
- bfd_vma address));
- /* A function which is called when a relocation is attempted against
- an undefined symbol. NAME is the symbol which is undefined.
- ABFD, SECTION and ADDRESS identify the location from which the
- reference is made. In some cases SECTION may be NULL. */
- boolean (*undefined_symbol) PARAMS ((struct bfd_link_info *,
- const char *name, bfd *abfd,
- asection *section, bfd_vma address));
- /* A function which is called when a reloc overflow occurs. NAME is
- the name of the symbol or section the reloc is against,
- RELOC_NAME is the name of the relocation, and ADDEND is any
- addend that is used. ABFD, SECTION and ADDRESS identify the
- location at which the overflow occurs; if this is the result of a
- bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
- ABFD will be NULL. */
- boolean (*reloc_overflow) PARAMS ((struct bfd_link_info *,
- const char *name,
- const char *reloc_name, bfd_vma addend,
- bfd *abfd, asection *section,
- bfd_vma address));
- /* A function which is called when a dangerous reloc is performed.
- The canonical example is an a29k IHCONST reloc which does not
- follow an IHIHALF reloc. MESSAGE is an appropriate message.
- ABFD, SECTION and ADDRESS identify the location at which the
- problem occurred; if this is the result of a
- bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
- ABFD will be NULL. */
- boolean (*reloc_dangerous) PARAMS ((struct bfd_link_info *,
- const char *message,
- bfd *abfd, asection *section,
- bfd_vma address));
- /* A function which is called when a reloc is found to be attached
- to a symbol which is not being written out. NAME is the name of
- the symbol. ABFD, SECTION and ADDRESS identify the location of
- the reloc; if this is the result of a
- bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
- ABFD will be NULL. */
- boolean (*unattached_reloc) PARAMS ((struct bfd_link_info *,
- const char *name,
- bfd *abfd, asection *section,
- bfd_vma address));
- /* A function which is called when a symbol in notice_hash is
- defined or referenced. NAME is the symbol. ABFD, SECTION and
- ADDRESS are the value of the symbol. If SECTION is
- bfd_und_section, this is a reference. */
- boolean (*notice) PARAMS ((struct bfd_link_info *, const char *name,
- bfd *abfd, asection *section, bfd_vma address));
-};
-
-/* The linker builds link_order structures which tell the code how to
- include input data in the output file. */
-
-/* These are the types of link_order structures. */
-
-enum bfd_link_order_type
-{
- bfd_undefined_link_order, /* Undefined. */
- bfd_indirect_link_order, /* Built from a section. */
- bfd_fill_link_order, /* Fill with a 16 bit constant. */
- bfd_data_link_order, /* Set to explicit data. */
- bfd_section_reloc_link_order, /* Relocate against a section. */
- bfd_symbol_reloc_link_order /* Relocate against a symbol. */
-};
-
-/* This is the link_order structure itself. These form a chain
- attached to the section whose contents they are describing. */
-
-struct bfd_link_order
-{
- /* Next link_order in chain. */
- struct bfd_link_order *next;
- /* Type of link_order. */
- enum bfd_link_order_type type;
- /* Offset within output section. */
- bfd_vma offset;
- /* Size within output section. */
- bfd_size_type size;
- /* Type specific information. */
- union
- {
- struct
- {
- /* Section to include. If this is used, then
- section->output_section must be the section the
- link_order is attached to, section->output_offset must
- equal the link_order offset field, and section->_raw_size
- must equal the link_order size field. Maybe these
- restrictions should be relaxed someday. */
- asection *section;
- } indirect;
- struct
- {
- /* Value to fill with. */
- unsigned int value;
- } fill;
- struct
- {
- /* Data to put into file. The size field gives the number
- of bytes which this field points to. */
- bfd_byte *contents;
- } data;
- struct
- {
- /* Description of reloc to generate. Used for
- bfd_section_reloc_link_order and
- bfd_symbol_reloc_link_order. */
- struct bfd_link_order_reloc *p;
- } reloc;
- } u;
-};
-
-/* A linker order of type bfd_section_reloc_link_order or
- bfd_symbol_reloc_link_order means to create a reloc against a
- section or symbol, respectively. This is used to implement -Ur to
- generate relocs for the constructor tables. The
- bfd_link_order_reloc structure describes the reloc that BFD should
- create. It is similar to a arelent, but I didn't use arelent
- because the linker does not know anything about most symbols, and
- any asymbol structure it creates will be partially meaningless.
- This information could logically be in the bfd_link_order struct,
- but I didn't want to waste the space since these types of relocs
- are relatively rare. */
-
-struct bfd_link_order_reloc
-{
- /* Reloc type. */
- bfd_reloc_code_real_type reloc;
-
- union
- {
- /* For type bfd_section_reloc_link_order, this is the section
- the reloc should be against. This must be a section in the
- output BFD, not any of the input BFDs. */
- asection *section;
- /* For type bfd_symbol_reloc_link_order, this is the name of the
- symbol the reloc should be against. */
- const char *name;
- } u;
-
- /* Addend to use. The object file should contain zero. The BFD
- backend is responsible for filling in the contents of the object
- file correctly. For some object file formats (e.g., COFF) the
- addend must be stored into in the object file, and for some
- (e.g., SPARC a.out) it is kept in the reloc. */
- bfd_vma addend;
-};
-
-/* Allocate a new link_order for a section. */
-extern struct bfd_link_order *bfd_new_link_order PARAMS ((bfd *, asection *));
-
-#endif
diff --git a/contrib/gdb/include/bout.h b/contrib/gdb/include/bout.h
deleted file mode 100644
index 8fc28cc3d6d7..000000000000
--- a/contrib/gdb/include/bout.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * This file is a modified version of 'a.out.h'. It is to be used in 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.
- * ==> THIS IS NO LONGER TRUE USING BFD. WE CAN GENERATE ANY BYTE ORDER
- * FOR THE HEADER, AND READ ANY BYTE ORDER. PREFERENCE WOULD BE TO
- * USE LITTLE-ENDIAN BYTE ORDER THROUGHOUT, REGARDLESS OF HOST. <==
- *
- * 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 external_exec {
- /* Standard stuff */
- unsigned char e_info[4]; /* Identifies this as a b.out file */
- unsigned char e_text[4]; /* Length of text */
- unsigned char e_data[4]; /* Length of data */
- unsigned char e_bss[4]; /* Length of uninitialized data area */
- unsigned char e_syms[4]; /* Length of symbol table */
- unsigned char e_entry[4]; /* Runtime start address */
- unsigned char e_trsize[4]; /* Length of text relocation info */
- unsigned char e_drsize[4]; /* Length of data relocation info */
-
- /* Added for i960 */
- unsigned char e_tload[4]; /* Text runtime load address */
- unsigned char e_dload[4]; /* Data runtime load address */
- unsigned char e_talign[1]; /* Alignment of text segment */
- unsigned char e_dalign[1]; /* Alignment of data segment */
- unsigned char e_balign[1]; /* Alignment of bss segment */
- unsigned char e_relaxable[1]; /* Assembled with enough info to allow linker to relax */
-};
-
-#define EXEC_BYTES_SIZE (sizeof (struct external_exec))
-
-/* These macros use the a_xxx field names, since they operate on the exec
- structure after it's been byte-swapped and realigned on the host machine. */
-#define N_BADMAG(x) (((x).a_info)!=BMAGIC)
-#define N_TXTOFF(x) EXEC_BYTES_SIZE
-#define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text )
-#define N_TROFF(x) ( N_DATOFF(x) + (x).a_data )
-#define N_TRELOFF N_TROFF
-#define N_DROFF(x) ( N_TROFF(x) + (x).a_trsize )
-#define N_DRELOFF N_DROFF
-#define N_SYMOFF(x) ( N_DROFF(x) + (x).a_drsize )
-#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
-#define N_DATADDR(x) ( (x).a_dload )
-
-/* Address of text segment in memory after it is loaded. */
-#if !defined (N_TXTADDR)
-#define N_TXTADDR(x) 0
-#endif
-
-/* 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 ((char)-1)
-#define N_BALNAME ((char)-2)
-#define IS_CALLNAME(x) (N_CALLNAME == (x))
-#define IS_BALNAME(x) (N_BALNAME == (x))
-#define IS_OTHER(x) ((x)>0 && (x) <=32)
-
-#define b_out_relocation_info relocation_info
-struct relocation_info {
- int r_address; /* File address of item to be relocated */
- unsigned
-#define r_index r_symbolnum
- r_symbolnum:24,/* Index of symbol on which relocation is based,
- * if r_extern is set. Otherwise set to
- * either N_TEXT, N_DATA, or N_BSS to
- * indicate section 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 -- used for 13 bit pcrel
- * 2 => 4 bytes
- */
- 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' */
- r_relaxable:1; /* 1 if enough info is left to relax
- the data */
-};
diff --git a/contrib/gdb/include/coff/ChangeLog b/contrib/gdb/include/coff/ChangeLog
deleted file mode 100644
index 06c7f80f468a..000000000000
--- a/contrib/gdb/include/coff/ChangeLog
+++ /dev/null
@@ -1,622 +0,0 @@
-Thu Mar 14 15:22:44 1996 Jeffrey A Law (law@cygnus.com)
-
- * internal.h (R_MEM_INDIRECT): New reloc for the h8300.
-
-Fri Feb 9 10:44:11 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * aux-coff.h: Rename from aux.h, to avoid problems on hapless DOS
- systems which think that aux is a com port.
-
-Mon Feb 5 18:35:00 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i960.h (F_I960HX): Define.
-
-Wed Jan 31 13:11:54 1996 Richard Henderson <rth@tamu.edu>
-
- * aux.h: New file.
- * internal.h, m68k.h: Protect against multiple inclusion.
-
-Wed Nov 22 13:48:39 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.h (_RCONST, STYP_RCONST, RELOC_SECTION_RCONST): Define.
- (NUM_RELOC_SECTIONS): Update.
- * symconst.h (scRConst): Define.
-
-Tue Nov 14 18:54:29 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (C_NT_WEAK): Define.
-
-Thu Nov 9 14:08:30 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * rs6000.h (STYP_OVRFLO): Define.
-
-Tue Nov 7 14:38:45 1995 Kim Knuttila <krk@cygnus.com>
-
- * coff/powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define.
- * coff/pe.h: Added defines for file level flags
-
-Mon Nov 6 17:28:01 1995 Harry Dolan <dolan@ssd.intel.com>
-
- * i860.h: New file, based on i386.h.
-
-Wed Nov 1 15:25:18 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * m68k.h (PAGEMAGICEXECSWAPPED): Define.
- (PAGEMAGICPEXECSWAPPED): Define.
- (PAGEMAGICPEXECTSHLIB): Define.
- (PAGEMAGICPEXECPAGED): Define.
- (_COMMENT): DEFINE.
- * m88k.h (_COMMENT): Define.
-
-Wed Oct 18 18:36:19 1995 Geoffrey Noer <noer@cygnus.com>
-
- * sym.h: #if 0'd out runtime_pdr struct because it chokes
- Visual C++ and there aren't any references to it elsewhere in gdb.
-
-Mon Oct 16 11:12:24 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * rs6000.h (SMALL_AOUTSZ): Define.
-
- * internal.h (XMC_TD): Define.
-
-Tue Oct 10 18:41:03 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (struct internal_aouthdr): Add o_cputype field.
- * rs6000.h (AOUTHDR): Rename o_resv1 to o_cputype.
-
-Mon Oct 9 14:45:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * rs6000.h (AOUTHDR): Add o_maxdata field. Add comments.
- (_PAD, _LOADER): Define.
- (STYP_LOADER): Define.
- * internal.h (struct internal_aouthdr): Add o_maxdata field.
-
-Thu Oct 5 10:02:57 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.h: Define section name macros and STYP macros for various
- Alpha sections: .got, .hash, .dynsym, .dynstr, .rel.dyn, .conflic,
- .comment, .liblist, .dynamic.
-
-Wed Oct 4 10:56:35 1995 Kim Knuttila <krk@cygnus.com>
-
- * pe.h: Moved DOSMAGIC and NT_SIGNATURE defines here
- * powerpc.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines
- Also removed other unused defines (various MAGIC ones)
- * i386.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines
- * arm.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines
- * apollo.h: removed unused DEFAULT_* defines
- * alpha.h: removed unused DEFAULT_* defines
- * h8500.h: removed unused DEFAULT_* defines
- * h8300.h: removed unused DEFAULT_* defines
- * i960.h: removed unused DEFAULT_* defines
- * m88k.h: removed unused DEFAULT_* defines
- * we32k.h: removed unused DEFAULT_* defines
- * rs6000.h: removed unused DEFAULT_* defines
- * mips.h: removed unused DEFAULT_* defines
- * m68k.h: removed unused DEFAULT_* defines
- * z8k.h: removed unused DEFAULT_* defines
- * w65.h: removed unused DEFAULT_* defines
- * sparc.h: removed unused DEFAULT_* defines
- * sh.h: removed unused DEFAULT_* defines
-
-Fri Sep 29 08:40:08 1995 Kim Knuttila <krk@cygnus.com>
-
- * powerpc.h: Reformatted to GNU coding conventions.
-
-Wed Sep 27 06:50:50 1995 Kim Knuttila <krk@nellie>
-
- * pe.h: added defines for more section characteristics
- * powerpc.h (new file): base coff definitions for ppc PE
-
-Tue Sep 12 12:08:20 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (struct internal_syment): Change n_numaux field from
- char to unsigned char.
-
-Fri Sep 1 15:39:36 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
-
- * mips.h (struct rpdr_ext): Define.
-
-Thu Aug 31 16:51:50 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * internal.h (internal_aouthdr, internal_filehdr):
- don't indirect the pe stuff.
-
-Tue Aug 29 14:16:07 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * i386.h (NT_DEF_RESERVE, NT_DEF_COMMIT): Make the same
- as 'the other' compiler.
- * internal.h (NT_IMAGE_BASE): Deleted.
- (NT_EXE_IMAGE_BASE, NT_DLL_IMAGE_BASE): New.
- (PE_DEF_SECTION_ALIGNMENT, PE_DEF_FILE_ALIGNMENT): New.
- (R_IMAGEBASE): New.
-
-Mon Aug 21 18:12:19 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * internal.h: (internal_filehdr): Moved PE stuff into
- internal_extra_pe_filehdr.
- (internal_aouthdr): Moved PE stuff into
- interanl_extra_pe_aouthdr.
-
-Mon Jul 24 14:05:39 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h: Move R_SH_* relocs from here...
- * sh.h: ...to here.
- (R_SH_SWITCH16, R_SH_SWITCH32): Define.
- (R_SH_USES, R_SH_COUNT, R_SH_ALIGN): Define.
-
-Thu Jun 29 00:04:25 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * internal.h (NT_DEF_RESERVE, NT_DEF_COMMIT): Increase a lot.
-
-Tue May 16 15:08:20 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * internal.h (NT_subsystem, NT_stack_heap): Delete
-
-Tue May 16 15:08:20 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * internal.h (NT_subsystem, NT_stack_heap): Now extern.
-
-Tue Feb 14 17:59:37 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.h (struct ecoff_fdrtab_entry): Define.
- (struct ecoff_find_line): Define.
-
-Sat Feb 4 14:38:03 1995 David Mosberger-Tang <davidm@piston.cs.arizona.edu>
-
- * sym.h (struct pdr): field "prof" added.
-
- * alpha.h (PDR_BITS1_PROF_*): added, macros for PDR_BITS*_RESERVED_*
- updated accordingly.
-
-Sun Jan 15 18:38:33 1995 Steve Chamberlain <sac@splat>
-
- * w65.h: New file.
-
-Wed Nov 23 22:43:38 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * sh.h (SH_ARCH_MAGIC_BIG, SH_ARCH_MAGIC_LITTLE): New.
- (SHBADMAG): Changed to suit.
-
-Tue Jul 26 17:46:08 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i960.h (F_I960JX): New macro.
-
-Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * alpha.h: Add definitions for alpha file header flags, encoding
- the object type of the file.
-
-Mon Jun 20 13:47:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ecoff.h (ecoff_swap_tir_in): Remove declaration.
- (ecoff_swap_tir_out): Likewise.
- (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise.
- (struct ecoff_debug_swap): Add new fields: swap_tir_in,
- swap_rndx_in, swap_tir_out, swap_rndx_out, read_debug_info.
-
-Sun Jun 12 03:51:52 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symconst.h: Pick up SGI define for stIndirect.
-
-Fri Apr 22 13:05:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (REGINFO): Don't define.
- (struct ecoff_reginfo): Don't define.
-
- * sh.h (SH_ARCH_MAGIC): Rename from SHMAGIC. SHMAGIC is used by
- several targets to mean a shared library.
- (SHBADMAG): Corresponding change.
-
-Thu Apr 14 13:00:53 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (RELOC_BITS3_TYPE_BIG): Changed from 0x1e to 0x3e.
- (RELOC_BITS3_TYPEHI_LITTLE): Define.
- (RELOC_BITS3_TYPEHI_SH_LITTLE): Define.
- (MIPS_R_PCREL16): Change value from 8 to 12 to match Irix 4.
- (MIPS_R_RELHI): Define.
- (MIPS_R_RELLO): Define.
- (MIPS_R_SWITCH): Change value from 9 to 22.
-
-Thu Apr 7 14:19:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (MIPS_R_SWITCH): Define.
-
-Thu Mar 31 19:28:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * internal.h (internal_aouthdr): Added comments for Apollo fields.
-
-Thu Mar 31 16:28:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (STYP_ECOFF_LIB): Define as used on Irix 4.
-
-Fri Mar 25 17:16:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (struct ecoff_debug_info): Add adjust field.
- (struct ecoff_value_adjust): Define.
-
-Tue Mar 22 13:22:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (MIPS_R_PCREL16): Define.
-
-Sat Feb 26 10:26:38 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ecoff.h: Add casts to avoid warnings from SVR4 cc.
-
-Mon Feb 21 09:48:46 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
-
- * sym.h (struct runtime_pdr): Make field adr bfd_vma, not unsigned
- long.
- (SYMR): Make field value bfd_vma, not long.
-
-Fri Feb 4 23:35:53 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * rs6000.h (STYP_DEBUG): Define.
-
-Wed Feb 2 14:31:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h (union internal_auxent): Change x_csect.x_scnlen into
- a union of a long and a pointer to a symbol. XCOFF sometimes uses
- this field as a symbol index.
-
-Mon Jan 10 23:54:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (ecoff_debug_info): Remove fields line_end,
- external_dnr_end, external_pdr_end, external_sym_end,
- external_opt_end, external_aux_end, ss_end, external_fdr_end.
- Replace ifdbase with ifdmap.
-
-Wed Jan 5 17:05:36 1994 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * ecoff.h (STYP_EXTENDESC, STYP_COMMENT, STYP_XDATA, STYP_PDATA):
- Define.
-
-Wed Jan 5 16:58:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (NUM_RELOC_SECTIONS): Define.
-
-Tue Dec 21 09:24:56 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
-
- * sparc.h (struct external_reloc): Rename field r_addend to
- r_offset.
-
-Sat Dec 11 16:12:32 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h (R_DISP7, R_SH_IMM16): New reloc types.
-
-Tue Nov 23 14:23:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (struct ecoff_debug_swap): Added *_end fields for all
- the symbolic information pointers.
-
- * sym.h: Named the EXTR structure ecoff_extr.
-
-Fri Nov 19 08:21:18 1993 Ken Raeburn (raeburn@rover.cygnus.com)
-
- * sparc.h (RELSZ): Use correct size.
-
-Wed Nov 17 17:18:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (struct ecoff_debug_info): Define.
-
-Tue Nov 2 17:56:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (struct ecoff_debug_swap): Define.
-
-Thu Oct 28 17:07:50 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * i386.h (I386LYNXMAGIC): Rename to LYNXCOFFMAGIC.
- * m68k.h (LYNXCOFFMAGIC): Define.
- * sparc.h: New file.
-
-Tue Oct 19 15:34:50 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * alpha.h (external_aouthdr): Split four byte padding field into
- two byte bldrev field and two byte padding field.
-
- * ecoff.h (_LITA, _PDATA, _XDATA, STYP_LITA): Defined.
-
-Wed Oct 13 15:52:34 1993 Ken Raeburn (raeburn@cygnus.com)
-
- Sun Oct 10 17:27:10 1993 Troy Rollo (troy@cbme.unsw.edu.au)
-
- * coff/internal.h: Added o_sri, o_inlib and o_vid for Apollos
- as well as R_DIR16.
-
- * coff/apollo.h: New file
-
-Mon Oct 11 17:16:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (REGINFO, struct ecoff_reginfo): Define.
-
-Tue Oct 5 10:52:53 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * rs6000.h: Change non-ASCII characters in comment to octal
- escapes.
-
-Tue Sep 28 03:27:04 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * ecoff.h (_FINI, STYP_ECOFF_FINI): Add to support .fini section.
-
-Fri Sep 24 11:53:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (BADMAG): Recognize MIPS_MAGIC_LITTLE3 and MIPS_MAGIC_BIG3.
- * ecoff.h: Define MIPS_MAGIC_LITTLE3 and MIPS_MAGIC_BIG3.
-
-Thu Sep 23 21:07:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * mips.h (BADMAG): Recognize MIPS_MAGIC_LITTLE2 and MIPS_MAGIC_BIG2.
- * ecoff.h: Define MIPS_MAGIC_LITTLE2 and MIPS_MAGIC_BIG2.
-
-Thu Sep 16 20:27:21 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
-
- * sym.h, symconst.h: Add comment stating these files are not part
- of GDB, GAS, etc. In 1991, when we asked rms whether we could
- include these files in GDB (although they are copyrighted by
- someone besides the FSF), he said it was OK if they were not
- considered part of GDB.
-
-Fri Sep 10 17:40:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (AUX_PUT_ANY): Cast val argument to bfd_vma.
-
- * alpha.c (external_aouthdr): Need four bytes of padding between
- vstamp and tsize.
-
-Tue Sep 7 14:20:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (AUX_GET_ANY, AUX_PUT_ANY): Changed to reflect further
- change in bfd swapping routine names.
-
-Tue Sep 7 10:15:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * ecoff.h (AUX_GET_ANY): Change name of _do_getb32 to reflect bfd
- changes.
-
-Fri Aug 13 14:30:32 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ecoff.h (RELOC_SECTION_NONE): Define.
-
-Thu Aug 12 11:24:42 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * alpha.h (struct external_reloc): Add r_symndx field.
- (RELSZ): Correct.
- (RELOC_BITS*): Correct.
- (ALPHA_R_*): Define.
- * ecoff.h (RELOC_SECTION_{XDATA,PDATA,FINI,LITA,ABS}): Define.
- (r_extern): Undefine.
- * internal.h (struct internal_reloc): Make r_vaddr bfd_vma rather
- than long. Add r_extern field.
-
- * alpha.h (PDR_BITS*): Define.
- * sym.h (PDR): Give correct names to new fields.
-
- * ecoff.h: Moved MIPS reloc definitions from here...
- * mips.h: to here.
-
-Tue Aug 3 11:17:53 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * alpha.h: Corrected external symbolic debugging structures to
- match actual usage.
- * internal.h (internal_filehdr, internal_aouthdr,
- internal_scnhdr): Changed type of some fields to bfd_vma so they
- can hold 64 bits.
- * sym.h (HDRR, FDR, PDR, EXTR): Likewise.
- (PDR): Added new fields found on Alpha.
- * symconst.h (magicSym2): Define; new value found on Alpha.
-
- * ecoff.h: New file.
- * alpha.h, mips.h: Moved common information into ecoff.h. Moved
- external structure definitions in from ecoff-ext.h.
- * ecoff-ext.h: Removed; information now in alpha.h and mips.h.
-
-Sun Jul 18 21:43:59 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * i386.h: Recognize I386PTXMAGIC.
-
-Fri Jul 16 09:54:35 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h (MIPS_AOUT_{OZ}MAGIC): Renamed from {OZ}MAGIC.
-
-Thu Jul 15 12:23:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m88k.h (union external_auxent): Move x_fcn back inside x_fcnary.
- ({GET,PUT}_FCN_{LNNOPTR,ENDNDX}): Adjust accordingly.
-
-Sun Jul 11 18:00:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m68k.h: Define MC68KBCSMAGIC.
-
-Thu Jun 10 11:46:28 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h (_INIT, STYP_MIPS_INIT): Define (used on Irix4).
- (STYP_OTHER_LOAD): Define as STYP_MIPS_INIT.
-
-Wed Jun 9 15:09:09 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h (OMAGIC): Define.
-
-Mon Apr 26 18:04:47 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h, sh.h: Support for SH.
-
-Sat Apr 24 21:34:59 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * a29k.h: Define _LIT.
-
-Fri Apr 23 18:41:23 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * alpha.h: New file.
-
-Thu Apr 8 12:36:34 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * internal.h (C_SHADOW, C_VERSION): Copied in from m88k.h.
- * m88k.h, i386.h, we32k.h: Don't define all the storage classes;
- they're already in internal.h.
-
-Wed Apr 7 11:51:24 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * internal.h: Change n_sclass to unsigned char.
- Change C_EFCN to 0xff, change RS/6000 dbx symbols
- to no longer be signed.
-
-Fri Mar 19 14:52:56 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h: Add H8/500 reloc types.
-
-Wed Mar 17 09:46:03 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ecoff-ext.h (AUX_PUT_ANY): Don't use void values in branches of
- conditional expression.
-
-Thu Mar 4 14:12:06 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ecoff-ext.h (AUX_GET_*): Rewrote to use new macro AUX_GET_ANY.
- (AUX_PUT_*): New macros corresponding to the AUX_GET macros.
- (ecoff_swap_tir_out): Added prototype.
-
- * mips.h (N_BTMASK, N_TMASK, N_BTSHFT, N_TSHIFT): Define; these
- are needed to interpret gcc debugging output.
-
-Tue Feb 9 07:43:27 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * we32k.h (BTYPE, ISPTR, ISFCN, ISARY, DECREF): Removed
- more definitions duplicated in internal.h.
-
-Wed Feb 3 09:18:24 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h (RELOC_BITS3_TYPE_*): Correct for big endian machines.
-
-Mon Jan 25 11:35:51 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * internal.h (internal_aouthdr): Added additional fields used only
- by MIPS ECOFF.
-
-Thu Jan 21 10:28:38 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h (AOUTHDR): Added additional fields used by ECOFF.
-
-Tue Jan 19 12:21:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * i386.h, we32k.h (N_*, T_*, DT_*): Removed still more definitions
- duplicated in internal.h.
-
- * mips.h (RELOC_SECTION_*, ECOFF_R_*): Defined constants for ECOFF
- relocs.
-
-Fri Jan 15 18:17:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff-ext.h: Added prototypes for new ECOFF swapping functions.
- (opt_ext): New structure.
- * mips.h (ZMAGIC): Defined to be 0413.
- (_LIB): Defined to be ".lib"
- (external_reloc): MIPS ECOFF relocs are only 8 bytes. Added
- macros to aid in swapping.
-
-Fri Jan 8 16:19:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff-ext.h: Added prototypes for ECOFF swapping functions.
- * internal.h (internal_scnhdr): Always provide s_align field, not
- just on i960.
- (internal_reloc): Always provide r_size field, not just on
- RS/6000.
- * mips.h (_RDATA, _SDATA, _SBSS, _LIT4, _LIT8, STYP_RDATA,
- STYP_SDATA, STYP_SBSS, STYP_LIT4, STYP_LIT8): Defined.
- (CODE_MASK, MIPS_IS_STAB, MIPS_MARK_STAB, MIPS_UNMARK_STAB,
- STABS_SYMBOL): Moved in from gdb/mipsread.c.
-
-Wed Jan 6 14:01:46 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * i386.h, we32k.h: removed STYP_* defines, since they duplicated
- those in internal.h.
-
-Tue Dec 29 15:40:07 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * i386.h: define I386AIXMAGIC for Danbury AIX PS/2 compiler.
-
-Sat Dec 12 16:07:57 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * i386.h: don't define BTYPE, ISPTR, ISFCN, ISARY, DECREF: they
- are defined in internal.h.
-
-Thu Nov 12 09:52:01 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h: (internal_reloc): r_offset is now a long.
- * z8k.h: slight comment enhancement
-
-Wed Sep 30 07:46:08 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h: changed z8k reloc types
-
-Fri Aug 28 10:16:31 1992 Brendan Kehoe (brendan@cygnus.com)
-
- * we32k.h: new file
-
-Thu Aug 27 13:00:01 1992 Brendan Kehoe (brendan@cygnus.com)
-
- * symconst.h: comment out cruft at the end of #endif
-
-Tue Aug 25 15:06:49 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h: added #define for STYP_LIT, removed from a29k and
- h8300.
-
- * z8k.h: added z8000 support
-
-Thu Jul 16 16:32:00 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h: added R_RELLONG_NEG reloc type
-
-Fri Jun 12 20:11:04 1992 John Gilmore (gnu at cygnus.com)
-
- * symconst.h: Fix unterminated comment.
-
-Wed Jun 10 07:57:49 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * i386.h: a.out magic numbers from
- mohring@informatik.tu-muenchen.de
-
-Mon Jun 8 20:13:33 1992 John Gilmore (gnu at cygnus.com)
-
- * ecoff-ext.h, mips.h: Use unsigned chars everywhere.
- (Suggested by Antti Miettinen.)
-
-Tue Apr 14 15:18:44 1992 John Gilmore (gnu at cygnus.com)
-
- * sym.h: Add comments.
- * symconst.h: Merge with Fred's changes.
-
-Tue Apr 14 14:30:05 1992 Fred Fish (fnf@cygnus.com)
-
- * symconst.h: Pick up SGI defines for stStruct, stUnion, stEnum,
- langCplusplus, and langCplusplusV2.
-
-Thu Apr 2 19:47:43 1992 John Gilmore (gnu at cygnus.com)
-
- * sym.h, symconst.h: MIPS has provided redistributable versions
- of these files. Thanks!
- * ecoff-ext.h: Add weakext bit to match new sym.h.
-
-Fri Mar 6 00:10:46 1992 John Gilmore (gnu at cygnus.com)
-
- * ecoff-ext.h: Add relative file descriptors.
-
-Thu Feb 27 11:53:04 1992 John Gilmore (gnu at cygnus.com)
-
- * ecoff-ext.h: New file for external (in-file) form of ecoff
- symbol structures.
-
-Thu Feb 6 11:33:32 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * h8300.h: made the external_lineno l_lnno field 4 bytes wide.
- andded GET/PUT_LINENO_LNNO macros
-
-Sat Nov 30 20:38:35 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * ChangeLog, a29k.h, h8300.h, i386.h, i960.h, internal.h, m68k.h,
- m88k.h, mips.h, rs6000.h: move from above coff-<foo>.h
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/contrib/gdb/include/coff/a29k.h b/contrib/gdb/include/coff/a29k.h
deleted file mode 100644
index 13b35f251afd..000000000000
--- a/contrib/gdb/include/coff/a29k.h
+++ /dev/null
@@ -1,305 +0,0 @@
-/* COFF spec for AMD 290*0
- Contributed by David Wood @ New York University.
- */
-
-#ifndef AMD
-# define AMD
-#endif
-
-/****************************************************************/
-
-/*
-** File Header and related definitions
-*/
-
-struct external_filehdr
-{
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof (FILHDR)
-
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
-
-/*
-** Magic numbers for Am29000
-** (AT&T will assign the "real" magic number)
-*/
-
-#define SIPFBOMAGIC 0572 /* Am29000 (Byte 0 is MSB) */
-#define SIPRBOMAGIC 0573 /* Am29000 (Byte 0 is LSB) */
-
-
-#define A29K_MAGIC_BIG SIPFBOMAGIC
-#define A29K_MAGIC_LITTLE SIPRBOMAGIC
-#define A29KBADMAG(x) (((x).f_magic!=A29K_MAGIC_BIG) && \
- ((x).f_magic!=A29K_MAGIC_LITTLE))
-
-#define OMAGIC A29K_MAGIC_BIG
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
-
-/*
-** File header flags currently known to us.
-**
-** Am29000 will use the F_AR32WR and F_AR32W flags to indicate
-** the byte ordering in the file.
-*/
-
-/*--------------------------------------------------------------*/
-
-/*
-** Optional (a.out) header
-*/
-
-typedef struct external_aouthdr
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-} AOUTHDR;
-
-#define AOUTSZ (sizeof(AOUTHDR))
-#define AOUTHDRSZ (sizeof(AOUTHDR))
-
-/* aouthdr magic numbers */
-#define NMAGIC 0410 /* separate i/d executable */
-#define SHMAGIC 0406 /* NYU/Ultra3 shared data executable
- (writable text) */
-
-#define _ETEXT "_etext"
-
-/*--------------------------------------------------------------*/
-
-/*
-** Section header and related definitions
-*/
-
-struct external_scnhdr
-{
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof (SCNHDR)
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _LIT ".lit"
-
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
-
-/*
-** Section types - with additional section type for global
-** registers which will be relocatable for the Am29000.
-**
-** In instances where it is necessary for a linker to produce an
-** output file which contains text or data not based at virtual
-** address 0, e.g. for a ROM, then the linker should accept
-** address base information as command input and use PAD sections
-** to skip over unused addresses.
-*/
-
-#define STYP_BSSREG 0x1200 /* Global register area (like STYP_INFO) */
-#define STYP_ENVIR 0x2200 /* Environment (like STYP_INFO) */
-#define STYP_ABS 0x4000 /* Absolute (allocated, not reloc, loaded) */
-
-/*--------------------------------------------------------------*/
-
-/*
-** Relocation information declaration and related definitions
-*/
-
-struct external_reloc {
- char r_vaddr[4]; /* (virtual) address of reference */
- char r_symndx[4]; /* index into symbol table */
- char r_type[2]; /* relocation type */
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10 /* sizeof (RELOC) */
-
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
-
-/*
-** Relocation types for the Am29000
-*/
-
-#define R_ABS 0 /* reference is absolute */
-
-#define R_IREL 030 /* instruction relative (jmp/call) */
-#define R_IABS 031 /* instruction absolute (jmp/call) */
-#define R_ILOHALF 032 /* instruction low half (const) */
-#define R_IHIHALF 033 /* instruction high half (consth) part 1 */
-#define R_IHCONST 034 /* instruction high half (consth) part 2 */
- /* constant offset of R_IHIHALF relocation */
-#define R_BYTE 035 /* relocatable byte value */
-#define R_HWORD 036 /* relocatable halfword value */
-#define R_WORD 037 /* relocatable word value */
-
-#define R_IGLBLRC 040 /* instruction global register RC */
-#define R_IGLBLRA 041 /* instruction global register RA */
-#define R_IGLBLRB 042 /* instruction global register RB */
-
-/*
-NOTE:
-All the "I" forms refer to 29000 instruction formats. The linker is
-expected to know how the numeric information is split and/or aligned
-within the instruction word(s). R_BYTE works for instructions, too.
-
-If the parameter to a CONSTH instruction is a relocatable type, two
-relocation records are written. The first has an r_type of R_IHIHALF
-(33 octal) and a normal r_vaddr and r_symndx. The second relocation
-record has an r_type of R_IHCONST (34 octal), a normal r_vaddr (which
-is redundant), and an r_symndx containing the 32-bit constant offset
-to the relocation instead of the actual symbol table index. This
-second record is always written, even if the constant offset is zero.
-The constant fields of the instruction are set to zero.
-*/
-
-/*--------------------------------------------------------------*/
-
-/*
-** Line number entry declaration and related definitions
-*/
-
-struct external_lineno
-{
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-#define LINENO struct external_lineno
-#define LINESZ 6 /* sizeof (LINENO) */
-
-/*--------------------------------------------------------------*/
-
-/*
-** Symbol entry declaration and related definitions
-*/
-
-#define E_SYMNMLEN 8 /* Number of characters in a symbol name */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ sizeof(SYMENT)
-
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
-
-/*
-** Storage class definitions - new classes for global registers.
-*/
-
-#define C_GLBLREG 19 /* global register */
-#define C_EXTREG 20 /* external global register */
-#define C_DEFREG 21 /* ext. def. of global register */
-
-
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
-
-/*
-** Derived symbol mask/shifts.
-*/
-
-#define N_BTMASK (0xf)
-#define N_BTSHFT (4)
-#define N_TMASK (0x30)
-#define N_TSHIFT (2)
-
-/*--------------------------------------------------------------*/
-
-/*
-** Auxiliary symbol table entry declaration and related
-** definitions.
-*/
-
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-};
-
-#define AUXENT union external_auxent
-#define AUXESZ 18
diff --git a/contrib/gdb/include/coff/alpha.h b/contrib/gdb/include/coff/alpha.h
deleted file mode 100644
index 1f1bfb6ccc7f..000000000000
--- a/contrib/gdb/include/coff/alpha.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/* ECOFF support on Alpha machines.
- coff/ecoff.h must be included before this file. */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- unsigned char f_magic[2]; /* magic number */
- unsigned char f_nscns[2]; /* number of sections */
- unsigned char f_timdat[4]; /* time & date stamp */
- unsigned char f_symptr[8]; /* file pointer to symtab */
- unsigned char f_nsyms[4]; /* number of symtab entries */
- unsigned char f_opthdr[2]; /* sizeof(optional hdr) */
- unsigned char f_flags[2]; /* flags */
-};
-
-/* Magic numbers are defined in coff/ecoff.h. */
-#define ALPHA_ECOFF_BADMAG(x) ((x).f_magic!=ALPHA_MAGIC)
-
-/* The object type is encoded in the f_flags. */
-#define F_ALPHA_OBJECT_TYPE_MASK 0x3000
-#define F_ALPHA_NO_SHARED 0x1000
-#define F_ALPHA_SHARABLE 0x2000
-#define F_ALPHA_CALL_SHARED 0x3000
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct external_aouthdr
-{
- unsigned char magic[2]; /* type of file */
- unsigned char vstamp[2]; /* version stamp */
- unsigned char bldrev[2]; /* ?? */
- unsigned char padding[2]; /* pad to quadword boundary */
- unsigned char tsize[8]; /* text size in bytes */
- unsigned char dsize[8]; /* initialized data " " */
- unsigned char bsize[8]; /* uninitialized data " " */
- unsigned char entry[8]; /* entry pt. */
- unsigned char text_start[8]; /* base of text used for this file */
- unsigned char data_start[8]; /* base of data used for this file */
- unsigned char bss_start[8]; /* base of bss used for this file */
- unsigned char gprmask[4]; /* bitmask of general registers used */
- unsigned char fprmask[4]; /* bitmask of floating point registers used */
- unsigned char gp_value[8]; /* value for gp register */
-} AOUTHDR;
-
-/* compute size of a header */
-
-#define AOUTSZ (sizeof(AOUTHDR))
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr {
- unsigned char s_name[8]; /* section name */
- unsigned char s_paddr[8]; /* physical address, aliased s_nlib */
- unsigned char s_vaddr[8]; /* virtual address */
- unsigned char s_size[8]; /* section size */
- unsigned char s_scnptr[8]; /* file ptr to raw data for section */
- unsigned char s_relptr[8]; /* file ptr to relocation */
- unsigned char s_lnnoptr[8]; /* file ptr to line numbers */
- unsigned char s_nreloc[2]; /* number of relocation entries */
- unsigned char s_nlnno[2]; /* number of line number entries*/
- unsigned char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc {
- unsigned char r_vaddr[8];
- unsigned char r_symndx[4];
- unsigned char r_bits[4];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
-/* Constants to unpack the r_bits field. The Alpha seems to always be
- little endian, so I haven't bothered to define big endian variants
- of these. */
-
-#define RELOC_BITS0_TYPE_LITTLE 0xff
-#define RELOC_BITS0_TYPE_SH_LITTLE 0
-
-#define RELOC_BITS1_EXTERN_LITTLE 0x01
-
-#define RELOC_BITS1_OFFSET_LITTLE 0x7e
-#define RELOC_BITS1_OFFSET_SH_LITTLE 1
-
-#define RELOC_BITS1_RESERVED_LITTLE 0x80
-#define RELOC_BITS1_RESERVED_SH_LITTLE 7
-#define RELOC_BITS2_RESERVED_LITTLE 0xff
-#define RELOC_BITS2_RESERVED_SH_LEFT_LITTLE 1
-#define RELOC_BITS3_RESERVED_LITTLE 0x03
-#define RELOC_BITS3_RESERVED_SH_LEFT_LITTLE 9
-
-#define RELOC_BITS3_SIZE_LITTLE 0xfc
-#define RELOC_BITS3_SIZE_SH_LITTLE 2
-
-/* The r_type field in a reloc is one of the following values. */
-#define ALPHA_R_IGNORE 0
-#define ALPHA_R_REFLONG 1
-#define ALPHA_R_REFQUAD 2
-#define ALPHA_R_GPREL32 3
-#define ALPHA_R_LITERAL 4
-#define ALPHA_R_LITUSE 5
-#define ALPHA_R_GPDISP 6
-#define ALPHA_R_BRADDR 7
-#define ALPHA_R_HINT 8
-#define ALPHA_R_SREL16 9
-#define ALPHA_R_SREL32 10
-#define ALPHA_R_SREL64 11
-#define ALPHA_R_OP_PUSH 12
-#define ALPHA_R_OP_STORE 13
-#define ALPHA_R_OP_PSUB 14
-#define ALPHA_R_OP_PRSHIFT 15
-#define ALPHA_R_GPVALUE 16
-
-/********************** SYMBOLIC INFORMATION **********************/
-
-/* Written by John Gilmore. */
-
-/* ECOFF uses COFF-like section structures, but its own symbol format.
- This file defines the symbol format in fields whose size and alignment
- will not vary on different host systems. */
-
-/* File header as a set of bytes */
-
-struct hdr_ext {
- unsigned char h_magic[2];
- unsigned char h_vstamp[2];
- unsigned char h_ilineMax[4];
- unsigned char h_idnMax[4];
- unsigned char h_ipdMax[4];
- unsigned char h_isymMax[4];
- unsigned char h_ioptMax[4];
- unsigned char h_iauxMax[4];
- unsigned char h_issMax[4];
- unsigned char h_issExtMax[4];
- unsigned char h_ifdMax[4];
- unsigned char h_crfd[4];
- unsigned char h_iextMax[4];
- unsigned char h_cbLine[8];
- unsigned char h_cbLineOffset[8];
- unsigned char h_cbDnOffset[8];
- unsigned char h_cbPdOffset[8];
- unsigned char h_cbSymOffset[8];
- unsigned char h_cbOptOffset[8];
- unsigned char h_cbAuxOffset[8];
- unsigned char h_cbSsOffset[8];
- unsigned char h_cbSsExtOffset[8];
- unsigned char h_cbFdOffset[8];
- unsigned char h_cbRfdOffset[8];
- unsigned char h_cbExtOffset[8];
-};
-
-/* File descriptor external record */
-
-struct fdr_ext {
- unsigned char f_adr[8];
- unsigned char f_cbLineOffset[8];
- unsigned char f_cbLine[8];
- unsigned char f_cbSs[8];
- unsigned char f_rss[4];
- unsigned char f_issBase[4];
- unsigned char f_isymBase[4];
- unsigned char f_csym[4];
- unsigned char f_ilineBase[4];
- unsigned char f_cline[4];
- unsigned char f_ioptBase[4];
- unsigned char f_copt[4];
- unsigned char f_ipdFirst[4];
- unsigned char f_cpd[4];
- unsigned char f_iauxBase[4];
- unsigned char f_caux[4];
- unsigned char f_rfdBase[4];
- unsigned char f_crfd[4];
- unsigned char f_bits1[1];
- unsigned char f_bits2[3];
- unsigned char f_padding[4];
-};
-
-#define FDR_BITS1_LANG_BIG 0xF8
-#define FDR_BITS1_LANG_SH_BIG 3
-#define FDR_BITS1_LANG_LITTLE 0x1F
-#define FDR_BITS1_LANG_SH_LITTLE 0
-
-#define FDR_BITS1_FMERGE_BIG 0x04
-#define FDR_BITS1_FMERGE_LITTLE 0x20
-
-#define FDR_BITS1_FREADIN_BIG 0x02
-#define FDR_BITS1_FREADIN_LITTLE 0x40
-
-#define FDR_BITS1_FBIGENDIAN_BIG 0x01
-#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80
-
-#define FDR_BITS2_GLEVEL_BIG 0xC0
-#define FDR_BITS2_GLEVEL_SH_BIG 6
-#define FDR_BITS2_GLEVEL_LITTLE 0x03
-#define FDR_BITS2_GLEVEL_SH_LITTLE 0
-
-/* We ignore the `reserved' field in bits2. */
-
-/* Procedure descriptor external record */
-
-struct pdr_ext {
- unsigned char p_adr[8];
- unsigned char p_cbLineOffset[8];
- unsigned char p_isym[4];
- unsigned char p_iline[4];
- unsigned char p_regmask[4];
- unsigned char p_regoffset[4];
- unsigned char p_iopt[4];
- unsigned char p_fregmask[4];
- unsigned char p_fregoffset[4];
- unsigned char p_frameoffset[4];
- unsigned char p_lnLow[4];
- unsigned char p_lnHigh[4];
- unsigned char p_gp_prologue[1];
- unsigned char p_bits1[1];
- unsigned char p_bits2[1];
- unsigned char p_localoff[1];
- unsigned char p_framereg[2];
- unsigned char p_pcreg[2];
-};
-
-#define PDR_BITS1_GP_USED_BIG 0x80
-#define PDR_BITS1_REG_FRAME_BIG 0x40
-#define PDR_BITS1_PROF_BIG 0x20
-#define PDR_BITS1_RESERVED_BIG 0x1f
-#define PDR_BITS1_RESERVED_SH_LEFT_BIG 8
-#define PDR_BITS2_RESERVED_BIG 0xff
-#define PDR_BITS2_RESERVED_SH_BIG 0
-
-#define PDR_BITS1_GP_USED_LITTLE 0x01
-#define PDR_BITS1_REG_FRAME_LITTLE 0x02
-#define PDR_BITS1_PROF_LITTLE 0x04
-#define PDR_BITS1_RESERVED_LITTLE 0xf8
-#define PDR_BITS1_RESERVED_SH_LITTLE 3
-#define PDR_BITS2_RESERVED_LITTLE 0xff
-#define PDR_BITS2_RESERVED_SH_LEFT_LITTLE 5
-
-/* Line numbers */
-
-struct line_ext {
- unsigned char l_line[4];
-};
-
-/* Symbol external record */
-
-struct sym_ext {
- unsigned char s_value[8];
- unsigned char s_iss[4];
- unsigned char s_bits1[1];
- unsigned char s_bits2[1];
- unsigned char s_bits3[1];
- unsigned char s_bits4[1];
-};
-
-#define SYM_BITS1_ST_BIG 0xFC
-#define SYM_BITS1_ST_SH_BIG 2
-#define SYM_BITS1_ST_LITTLE 0x3F
-#define SYM_BITS1_ST_SH_LITTLE 0
-
-#define SYM_BITS1_SC_BIG 0x03
-#define SYM_BITS1_SC_SH_LEFT_BIG 3
-#define SYM_BITS1_SC_LITTLE 0xC0
-#define SYM_BITS1_SC_SH_LITTLE 6
-
-#define SYM_BITS2_SC_BIG 0xE0
-#define SYM_BITS2_SC_SH_BIG 5
-#define SYM_BITS2_SC_LITTLE 0x07
-#define SYM_BITS2_SC_SH_LEFT_LITTLE 2
-
-#define SYM_BITS2_RESERVED_BIG 0x10
-#define SYM_BITS2_RESERVED_LITTLE 0x08
-
-#define SYM_BITS2_INDEX_BIG 0x0F
-#define SYM_BITS2_INDEX_SH_LEFT_BIG 16
-#define SYM_BITS2_INDEX_LITTLE 0xF0
-#define SYM_BITS2_INDEX_SH_LITTLE 4
-
-#define SYM_BITS3_INDEX_SH_LEFT_BIG 8
-#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4
-
-#define SYM_BITS4_INDEX_SH_LEFT_BIG 0
-#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12
-
-/* External symbol external record */
-
-struct ext_ext {
- struct sym_ext es_asym;
- unsigned char es_bits1[1];
- unsigned char es_bits2[3];
- unsigned char es_ifd[4];
-};
-
-#define EXT_BITS1_JMPTBL_BIG 0x80
-#define EXT_BITS1_JMPTBL_LITTLE 0x01
-
-#define EXT_BITS1_COBOL_MAIN_BIG 0x40
-#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02
-
-#define EXT_BITS1_WEAKEXT_BIG 0x20
-#define EXT_BITS1_WEAKEXT_LITTLE 0x04
-
-/* Dense numbers external record */
-
-struct dnr_ext {
- unsigned char d_rfd[4];
- unsigned char d_index[4];
-};
-
-/* Relative file descriptor */
-
-struct rfd_ext {
- unsigned char rfd[4];
-};
-
-/* Optimizer symbol external record */
-
-struct opt_ext {
- unsigned char o_bits1[1];
- unsigned char o_bits2[1];
- unsigned char o_bits3[1];
- unsigned char o_bits4[1];
- struct rndx_ext o_rndx;
- unsigned char o_offset[4];
-};
-
-#define OPT_BITS2_VALUE_SH_LEFT_BIG 16
-#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0
-
-#define OPT_BITS3_VALUE_SH_LEFT_BIG 8
-#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8
-
-#define OPT_BITS4_VALUE_SH_LEFT_BIG 0
-#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16
diff --git a/contrib/gdb/include/coff/apollo.h b/contrib/gdb/include/coff/apollo.h
deleted file mode 100644
index c481d482e8bf..000000000000
--- a/contrib/gdb/include/coff/apollo.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/*** coff information for Apollo M68K */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-
-/* Motorola 68000/68008/68010/68020 */
-#define MC68MAGIC 0520
-#define MC68KWRMAGIC 0520 /* writeable text segments */
-#define MC68TVMAGIC 0521
-#define MC68KROMAGIC 0521 /* readonly shareable text segments */
-#define MC68KPGMAGIC 0522 /* demand paged text segments */
-#define M68MAGIC 0210
-#define M68TVMAGIC 0211
-
-/* Apollo 68000-based machines have a different magic number. This comes
- * from /usr/include/apollo/filehdr.h
- */
-#define APOLLOM68KMAGIC 0627
-
-#define OMAGIC M68MAGIC
-#define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \
- ((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && \
- ((x).f_magic!=APOLLOM68KMAGIC) )
-
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
- char o_sri[4]; /* Apollo specific - .sri data pointer */
- char o_inlib[4]; /* Apollo specific - .inlib data pointer */
- char vid[8]; /* Apollo specific - 64 bit version ID */
-}
-AOUTHDR;
-
-#define APOLLO_COFF_VERSION_NUMBER 1 /* the value of the aouthdr magic */
-#define AOUTHDRSZ (sizeof(AOUTHDR))
-#define AOUTSZ (sizeof(AOUTHDR))
-
-
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr {
- /* Apollo allow for larger section names by allowing it to be in
- * the string table.
- */
- char s_name[8];
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-/* If s_zeores is all zeroes, s_offset gives the real location of the name
- * in the string table.
- */
-
-#define s_zeroes section_name.s_name
-#define s_offset (section_name.s_name+4)
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _TV ".tv"
-#define _INIT ".init"
-#define _FINI ".fini"
-#define _LINES ".lines"
-#define _BLOCKS ".blocks"
-#define _SRI ".sri" /* Static Resource Information (systype,
- et al.) */
-#define _MIR ".mir" /* Module Information Records */
-#define _APTV ".aptv" /* Apollo-style transfer vectors. */
-#define _INLIB ".inlib" /* Shared Library information */
-#define _RWDI ".rwdi" /* Read/write data initialization directives for
- compressed sections */
-#define _UNWIND ".unwind" /* Stack unwind information */
-
-#define SCNHDR struct external_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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-
-#define LINENO struct external_lineno
-#define LINESZ sizeof(LINENO)
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-#ifdef M68K_COFF_OFFSET
- char r_offset[4];
-#endif
-
-};
-
-
-#define RELOC struct external_reloc
-
-#define RELSZ sizeof(struct external_reloc)
-
-/* Apollo specific STYP flags */
-
-#define STYP_RELOCATED_NOT_LOADED 0x00010000 /* Section is relocated normally during linking, but need
- not be loaded during program execution */
-#define STYP_DEBUG 0x00020000 /* debug section */
-#define STYP_OVERLAY 0x00040000 /* Section is overlayed */
-#define STYP_INSTRUCTION 0x00200000 /* Section contains executable code */
-
-#define STYP_ZERO 0x00800000 /* Section is initialized to zero */
-#define STYP_INSTALLED 0x02000000 /* Section should be installable in KGT */
-#define STYP_LOOK_INSTALLED 0x04000000 /* Look for section in KGT */
-#define STYP_SECALIGN1 0x08000000 /* Specially aligned section */
-#define STYP_SECALIGN2 0x10000000 /* " " " */
-#define STYP_COMPRESSED 0x20000000 /* No section data per se (s_scnptr = 0), but there are
- initialization directives for it in .rwdi section
- (used in conjunction with STYP_BSS) */
diff --git a/contrib/gdb/include/coff/arm.h b/contrib/gdb/include/coff/arm.h
deleted file mode 100644
index 33b11cbb1de8..000000000000
--- a/contrib/gdb/include/coff/arm.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/*** coff information for the ARM */
-
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved external references)
- * F_LNNO line numbers 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 (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-
-
-
-#define ARMMAGIC 0xa00 /* I just made these up */
-
-#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-
-
-}
-AOUTHDR;
-
-
-#define AOUTSZ (sizeof(AOUTHDR))
-
-#define OMAGIC 0404 /* object files, eg as output */
-#define ZMAGIC 0413 /* demand load format, eg normal ld output */
-#define STMAGIC 0401 /* target shlib */
-#define SHMAGIC 0443 /* host shlib */
-
-
-/* define some NT default values */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _COMMENT ".comment"
-#define _LIB ".lib"
-
-/********************** 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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-
-#define LINENO struct external_lineno
-#define LINESZ 6
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-#define N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-# define _ETEXT "etext"
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
- char r_offset[4];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ sizeof (RELOC)
diff --git a/contrib/gdb/include/coff/aux-coff.h b/contrib/gdb/include/coff/aux-coff.h
deleted file mode 100644
index c89c124d3e05..000000000000
--- a/contrib/gdb/include/coff/aux-coff.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Modifications of internal.h and m68k.h needed by A/UX
- Suggested by Ian Lance Taylor <ian@cygnus.com> */
-
-#ifndef GNU_COFF_AUX_H
-#define GNU_COFF_AUX_H 1
-
-#include "coff/internal.h"
-#include "coff/m68k.h"
-
-/* Section contains 64-byte padded pathnames of shared libraries */
-#undef STYP_LIB
-#define STYP_LIB 0x200
-
-/* Section contains shared library initialization code */
-#undef STYP_INIT
-#define STYP_INIT 0x400
-
-/* Section contains .ident information */
-#undef STYP_IDENT
-#define STYP_IDENT 0x800
-
-/* Section types used by bfd and gas not defined (directly) by A/UX */
-#undef STYP_OVER
-#define STYP_OVER 0
-#undef STYP_INFO
-#define STYP_INFO STYP_IDENT
-
-/* Traditional name of the section tagged with STYP_LIB */
-#define _LIB ".lib"
-
-#endif /* GNU_COFF_AUX_H */
diff --git a/contrib/gdb/include/coff/ecoff.h b/contrib/gdb/include/coff/ecoff.h
deleted file mode 100644
index 120f88849e0e..000000000000
--- a/contrib/gdb/include/coff/ecoff.h
+++ /dev/null
@@ -1,408 +0,0 @@
-#ifndef ECOFF_H
-#define ECOFF_H
-
-/* Generic ECOFF support.
- This does not include symbol information, found in sym.h and
- symconst.h. */
-
-/* Mips magic numbers used in filehdr. MIPS_MAGIC_LITTLE is used on
- little endian machines. MIPS_MAGIC_BIG is used on big endian
- machines. Where is MIPS_MAGIC_1 from? */
-#define MIPS_MAGIC_1 0x0180
-#define MIPS_MAGIC_LITTLE 0x0162
-#define MIPS_MAGIC_BIG 0x0160
-
-/* These are the magic numbers used for MIPS code compiled at ISA
- level 2. */
-#define MIPS_MAGIC_LITTLE2 0x0166
-#define MIPS_MAGIC_BIG2 0x0163
-
-/* These are the magic numbers used for MIPS code compiled at ISA
- level 3. */
-#define MIPS_MAGIC_LITTLE3 0x142
-#define MIPS_MAGIC_BIG3 0x140
-
-/* Alpha magic numbers used in filehdr. */
-#define ALPHA_MAGIC 0x183
-
-/* Magic numbers used in a.out header. */
-#define ECOFF_AOUT_OMAGIC 0407 /* not demand paged (ld -N). */
-#define ECOFF_AOUT_ZMAGIC 0413 /* demand load format, eg normal ld output */
-
-/* Names of special sections. */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _RDATA ".rdata"
-#define _SDATA ".sdata"
-#define _SBSS ".sbss"
-#define _LITA ".lita"
-#define _LIT4 ".lit4"
-#define _LIT8 ".lit8"
-#define _LIB ".lib"
-#define _INIT ".init"
-#define _FINI ".fini"
-#define _PDATA ".pdata"
-#define _XDATA ".xdata"
-#define _GOT ".got"
-#define _HASH ".hash"
-#define _DYNSYM ".dynsym"
-#define _DYNSTR ".dynstr"
-#define _RELDYN ".rel.dyn"
-#define _CONFLIC ".conflic"
-#define _COMMENT ".comment"
-#define _LIBLIST ".liblist"
-#define _DYNAMIC ".dynamic"
-#define _RCONST ".rconst"
-
-/* ECOFF uses some additional section flags. */
-#define STYP_RDATA 0x100
-#define STYP_SDATA 0x200
-#define STYP_SBSS 0x400
-#define STYP_GOT 0x1000
-#define STYP_DYNAMIC 0x2000
-#define STYP_DYNSYM 0x4000
-#define STYP_RELDYN 0x8000
-#define STYP_DYNSTR 0x10000
-#define STYP_HASH 0x20000
-#define STYP_LIBLIST 0x40000
-#define STYP_CONFLIC 0x100000
-#define STYP_ECOFF_FINI 0x1000000
-#define STYP_EXTENDESC 0x2000000 /* 0x02FFF000 bits => scn type, rest clr */
-#define STYP_LITA 0x4000000
-#define STYP_LIT8 0x8000000
-#define STYP_LIT4 0x10000000
-#define STYP_ECOFF_LIB 0x40000000
-#define STYP_ECOFF_INIT 0x80000000
-#define STYP_OTHER_LOAD (STYP_ECOFF_INIT | STYP_ECOFF_FINI)
-
-/* extended section types */
-#define STYP_COMMENT 0x2100000
-#define STYP_RCONST 0x2200000
-#define STYP_XDATA 0x2400000
-#define STYP_PDATA 0x2800000
-
-/* The linker needs a section to hold small common variables while
- linking. There is no convenient way to create it when the linker
- needs it, so we always create one for each BFD. We then avoid
- writing it out. */
-#define SCOMMON ".scommon"
-
-/* If the extern bit in a reloc is 1, then r_symndx is an index into
- the external symbol table. If the extern bit is 0, then r_symndx
- indicates a section, and is one of the following values. */
-#define RELOC_SECTION_NONE 0
-#define RELOC_SECTION_TEXT 1
-#define RELOC_SECTION_RDATA 2
-#define RELOC_SECTION_DATA 3
-#define RELOC_SECTION_SDATA 4
-#define RELOC_SECTION_SBSS 5
-#define RELOC_SECTION_BSS 6
-#define RELOC_SECTION_INIT 7
-#define RELOC_SECTION_LIT8 8
-#define RELOC_SECTION_LIT4 9
-#define RELOC_SECTION_XDATA 10
-#define RELOC_SECTION_PDATA 11
-#define RELOC_SECTION_FINI 12
-#define RELOC_SECTION_LITA 13
-#define RELOC_SECTION_ABS 14
-#define RELOC_SECTION_RCONST 15
-
-#define NUM_RELOC_SECTIONS 16
-
-/********************** STABS **********************/
-
-/* gcc uses mips-tfile to output type information in special stabs
- entries. These must match the corresponding definition in
- gcc/config/mips.h. At some point, these should probably go into a
- shared include file, but currently gcc and gdb do not share any
- directories. */
-#define CODE_MASK 0x8F300
-#define ECOFF_IS_STAB(sym) (((sym)->index & 0xFFF00) == CODE_MASK)
-#define ECOFF_MARK_STAB(code) ((code)+CODE_MASK)
-#define ECOFF_UNMARK_STAB(code) ((code)-CODE_MASK)
-#define STABS_SYMBOL "@stabs"
-
-/********************** COFF **********************/
-
-/* gcc also uses mips-tfile to output COFF debugging information.
- These are the values it uses when outputting the .type directive.
- These should also be in a shared include file. */
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-/********************** AUX **********************/
-
-/* The auxiliary type information is the same on all known ECOFF
- targets. I can't see any reason that it would ever change, so I am
- going to gamble and define the external structures here, in the
- target independent ECOFF header file. The internal forms are
- defined in coff/sym.h, which was originally donated by MIPS
- Computer Systems. */
-
-/* Type information external record */
-
-struct tir_ext {
- unsigned char t_bits1[1];
- unsigned char t_tq45[1];
- unsigned char t_tq01[1];
- unsigned char t_tq23[1];
-};
-
-#define TIR_BITS1_FBITFIELD_BIG ((unsigned int) 0x80)
-#define TIR_BITS1_FBITFIELD_LITTLE ((unsigned int) 0x01)
-
-#define TIR_BITS1_CONTINUED_BIG ((unsigned int) 0x40)
-#define TIR_BITS1_CONTINUED_LITTLE ((unsigned int) 0x02)
-
-#define TIR_BITS1_BT_BIG ((unsigned int) 0x3F)
-#define TIR_BITS1_BT_SH_BIG 0
-#define TIR_BITS1_BT_LITTLE ((unsigned int) 0xFC)
-#define TIR_BITS1_BT_SH_LITTLE 2
-
-#define TIR_BITS_TQ4_BIG ((unsigned int) 0xF0)
-#define TIR_BITS_TQ4_SH_BIG 4
-#define TIR_BITS_TQ5_BIG ((unsigned int) 0x0F)
-#define TIR_BITS_TQ5_SH_BIG 0
-#define TIR_BITS_TQ4_LITTLE ((unsigned int) 0x0F)
-#define TIR_BITS_TQ4_SH_LITTLE 0
-#define TIR_BITS_TQ5_LITTLE ((unsigned int) 0xF0)
-#define TIR_BITS_TQ5_SH_LITTLE 4
-
-#define TIR_BITS_TQ0_BIG ((unsigned int) 0xF0)
-#define TIR_BITS_TQ0_SH_BIG 4
-#define TIR_BITS_TQ1_BIG ((unsigned int) 0x0F)
-#define TIR_BITS_TQ1_SH_BIG 0
-#define TIR_BITS_TQ0_LITTLE ((unsigned int) 0x0F)
-#define TIR_BITS_TQ0_SH_LITTLE 0
-#define TIR_BITS_TQ1_LITTLE ((unsigned int) 0xF0)
-#define TIR_BITS_TQ1_SH_LITTLE 4
-
-#define TIR_BITS_TQ2_BIG ((unsigned int) 0xF0)
-#define TIR_BITS_TQ2_SH_BIG 4
-#define TIR_BITS_TQ3_BIG ((unsigned int) 0x0F)
-#define TIR_BITS_TQ3_SH_BIG 0
-#define TIR_BITS_TQ2_LITTLE ((unsigned int) 0x0F)
-#define TIR_BITS_TQ2_SH_LITTLE 0
-#define TIR_BITS_TQ3_LITTLE ((unsigned int) 0xF0)
-#define TIR_BITS_TQ3_SH_LITTLE 4
-
-/* Relative symbol external record */
-
-struct rndx_ext {
- unsigned char r_bits[4];
-};
-
-#define RNDX_BITS0_RFD_SH_LEFT_BIG 4
-#define RNDX_BITS1_RFD_BIG ((unsigned int) 0xF0)
-#define RNDX_BITS1_RFD_SH_BIG 4
-
-#define RNDX_BITS0_RFD_SH_LEFT_LITTLE 0
-#define RNDX_BITS1_RFD_LITTLE ((unsigned int) 0x0F)
-#define RNDX_BITS1_RFD_SH_LEFT_LITTLE 8
-
-#define RNDX_BITS1_INDEX_BIG ((unsigned int) 0x0F)
-#define RNDX_BITS1_INDEX_SH_LEFT_BIG 16
-#define RNDX_BITS2_INDEX_SH_LEFT_BIG 8
-#define RNDX_BITS3_INDEX_SH_LEFT_BIG 0
-
-#define RNDX_BITS1_INDEX_LITTLE ((unsigned int) 0xF0)
-#define RNDX_BITS1_INDEX_SH_LITTLE 4
-#define RNDX_BITS2_INDEX_SH_LEFT_LITTLE 4
-#define RNDX_BITS3_INDEX_SH_LEFT_LITTLE 12
-
-/* Auxiliary symbol information external record */
-
-union aux_ext {
- struct tir_ext a_ti;
- struct rndx_ext a_rndx;
- unsigned char a_dnLow[4];
- unsigned char a_dnHigh[4];
- unsigned char a_isym[4];
- unsigned char a_iss[4];
- unsigned char a_width[4];
- unsigned char a_count[4];
-};
-
-#define AUX_GET_ANY(bigend, ax, field) \
- ((bigend) ? bfd_getb32 ((ax)->field) : bfd_getl32 ((ax)->field))
-
-#define AUX_GET_DNLOW(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnLow)
-#define AUX_GET_DNHIGH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnHigh)
-#define AUX_GET_ISYM(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_isym)
-#define AUX_GET_ISS(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_iss)
-#define AUX_GET_WIDTH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_width)
-#define AUX_GET_COUNT(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_count)
-
-#define AUX_PUT_ANY(bigend, val, ax, field) \
- ((bigend) \
- ? (bfd_putb32 ((bfd_vma) (val), (ax)->field), 0) \
- : (bfd_putl32 ((bfd_vma) (val), (ax)->field), 0))
-
-#define AUX_PUT_DNLOW(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_dnLow)
-#define AUX_PUT_DNHIGH(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_dnHigh)
-#define AUX_PUT_ISYM(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_isym)
-#define AUX_PUT_ISS(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_iss)
-#define AUX_PUT_WIDTH(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_width)
-#define AUX_PUT_COUNT(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_count)
-
-/********************** SYMBOLS **********************/
-
-/* For efficiency, gdb deals directly with the unswapped symbolic
- information (that way it only takes the time to swap information
- that it really needs to read). gdb originally retrieved the
- information directly from the BFD backend information, but that
- strategy, besides being sort of ugly, does not work for MIPS ELF,
- which also uses ECOFF debugging information. This structure holds
- pointers to the (mostly) unswapped symbolic information. */
-
-struct ecoff_debug_info
-{
- /* The swapped ECOFF symbolic header. */
- HDRR symbolic_header;
-
- /* Pointers to the unswapped symbolic information. Note that the
- pointers to external structures point to different sorts of
- information on different ECOFF targets. The ecoff_debug_swap
- structure provides the sizes of the structures and the functions
- needed to swap the information in and out. These pointers are
- all pointers to arrays, not single structures. They will be NULL
- if there are no instances of the relevant structure. These
- fields are also used by the assembler to output ECOFF debugging
- information. */
- unsigned char *line;
- PTR external_dnr; /* struct dnr_ext */
- PTR external_pdr; /* struct pdr_ext */
- PTR external_sym; /* struct sym_ext */
- PTR external_opt; /* struct opt_ext */
- union aux_ext *external_aux;
- char *ss;
- char *ssext;
- PTR external_fdr; /* struct fdr_ext */
- PTR external_rfd; /* struct rfd_ext */
- PTR external_ext; /* struct ext_ext */
-
- /* These fields are used when linking. They may disappear at some
- point. */
- char *ssext_end;
- PTR external_ext_end;
-
- /* When linking, this field holds a mapping from the input FDR
- numbers to the output numbers, and is used when writing out the
- external symbols. It is NULL if no mapping is required. */
- RFDT *ifdmap;
-
- /* The swapped FDR information. Currently this is never NULL, but
- code using this structure should probably double-check in case
- this changes in the future. This is a pointer to an array, not a
- single structure. */
- FDR *fdr;
-
- /* When relaxing MIPS embedded PIC code, we may need to adjust
- symbol values when they are output. This is a linked list of
- structures indicating how values should be adjusted. There is no
- requirement that the entries be in any order, or that they not
- overlap. This field is normally NULL, in which case no
- adjustments need to be made. */
- struct ecoff_value_adjust *adjust;
-};
-
-/* This structure describes how to adjust symbol values when
- outputting MIPS embedded PIC code. These adjustments only apply to
- the internal symbols, as the external symbol values will come from
- the hash table and have already been adjusted. */
-
-struct ecoff_value_adjust
-{
- /* Next entry on adjustment list. */
- struct ecoff_value_adjust *next;
- /* Starting VMA of adjustment. This is the VMA in the ECOFF file,
- not the offset from the start of the section. Thus it should
- indicate a particular section. */
- bfd_vma start;
- /* Ending VMA of adjustment. */
- bfd_vma end;
- /* Adjustment. This should be added to the value of the symbol, or
- FDR. This is zero for the last entry in the array. */
- long adjust;
-};
-
-/* These structures are used by the ECOFF find_nearest_line function. */
-
-struct ecoff_fdrtab_entry
-{
- /* Base address in .text of this FDR. */
- bfd_vma base_addr;
- FDR *fdr;
-};
-
-struct ecoff_find_line
-{
- /* Allocated memory to hold function and file names. */
- char *find_buffer;
-
- /* FDR table, sorted by address: */
- long fdrtab_len;
- struct ecoff_fdrtab_entry *fdrtab;
-};
-
-/********************** SWAPPING **********************/
-
-/* The generic ECOFF code needs to be able to swap debugging
- information in and out in the specific format used by a particular
- ECOFF implementation. This structure provides the information
- needed to do this. */
-
-struct ecoff_debug_swap
-{
- /* Symbol table magic number. */
- int sym_magic;
- /* Alignment of debugging information. E.g., 4. */
- bfd_size_type debug_align;
- /* Sizes of external symbolic information. */
- bfd_size_type external_hdr_size;
- bfd_size_type external_dnr_size;
- bfd_size_type external_pdr_size;
- bfd_size_type external_sym_size;
- bfd_size_type external_opt_size;
- bfd_size_type external_fdr_size;
- bfd_size_type external_rfd_size;
- bfd_size_type external_ext_size;
- /* Functions to swap in external symbolic data. */
- void (*swap_hdr_in) PARAMS ((bfd *, PTR, HDRR *));
- void (*swap_dnr_in) PARAMS ((bfd *, PTR, DNR *));
- void (*swap_pdr_in) PARAMS ((bfd *, PTR, PDR *));
- void (*swap_sym_in) PARAMS ((bfd *, PTR, SYMR *));
- void (*swap_opt_in) PARAMS ((bfd *, PTR, OPTR *));
- void (*swap_fdr_in) PARAMS ((bfd *, PTR, FDR *));
- void (*swap_rfd_in) PARAMS ((bfd *, PTR, RFDT *));
- void (*swap_ext_in) PARAMS ((bfd *, PTR, EXTR *));
- void (*swap_tir_in) PARAMS ((int, const struct tir_ext *, TIR *));
- void (*swap_rndx_in) PARAMS ((int, const struct rndx_ext *, RNDXR *));
- /* Functions to swap out external symbolic data. */
- void (*swap_hdr_out) PARAMS ((bfd *, const HDRR *, PTR));
- void (*swap_dnr_out) PARAMS ((bfd *, const DNR *, PTR));
- void (*swap_pdr_out) PARAMS ((bfd *, const PDR *, PTR));
- void (*swap_sym_out) PARAMS ((bfd *, const SYMR *, PTR));
- void (*swap_opt_out) PARAMS ((bfd *, const OPTR *, PTR));
- void (*swap_fdr_out) PARAMS ((bfd *, const FDR *, PTR));
- void (*swap_rfd_out) PARAMS ((bfd *, const RFDT *, PTR));
- void (*swap_ext_out) PARAMS ((bfd *, const EXTR *, PTR));
- void (*swap_tir_out) PARAMS ((int, const TIR *, struct tir_ext *));
- void (*swap_rndx_out) PARAMS ((int, const RNDXR *, struct rndx_ext *));
- /* Function to read symbol data and set up pointers in
- ecoff_debug_info structure. The section argument is used for
- ELF, not straight ECOFF. */
- boolean (*read_debug_info) PARAMS ((bfd *, asection *,
- struct ecoff_debug_info *));
-};
-
-#endif /* ! defined (ECOFF_H) */
diff --git a/contrib/gdb/include/coff/h8300.h b/contrib/gdb/include/coff/h8300.h
deleted file mode 100644
index 8fe8f6165fed..000000000000
--- a/contrib/gdb/include/coff/h8300.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/*** coff information for Hitachi H8/300 and H8/300-H */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-
-
-#define H8300MAGIC 0x8300
-#define H8300HMAGIC 0x8301
-
-
-#define H8300BADMAG(x) (((x).f_magic!=H8300MAGIC))
-#define H8300HBADMAG(x) (((x).f_magic!=H8300HMAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ (sizeof(AOUTHDR))
-#define AOUTSZ (sizeof(AOUTHDR))
-
-
-
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#define SCNHDR struct external_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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[4]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#define LINENO struct external_lineno
-#define LINESZ sizeof(LINENO)
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the h8 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes */
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
-
-
-
diff --git a/contrib/gdb/include/coff/h8500.h b/contrib/gdb/include/coff/h8500.h
deleted file mode 100644
index 5a8c9feace90..000000000000
--- a/contrib/gdb/include/coff/h8500.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*** coff information for Hitachi H8/500 */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-
-
-#define H8500MAGIC 0x8500
-
-
-#define H8500BADMAG(x) ((0xffff && ((x).f_magic)!=H8500MAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ (sizeof(AOUTHDR))
-#define AOUTSZ (sizeof(AOUTHDR))
-
-
-
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#define SCNHDR struct external_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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[4]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#define LINENO struct external_lineno
-#define LINESZ sizeof(LINENO)
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the h8 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes */
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
-
-
-
diff --git a/contrib/gdb/include/coff/i386.h b/contrib/gdb/include/coff/i386.h
deleted file mode 100644
index b7ecf0b6e140..000000000000
--- a/contrib/gdb/include/coff/i386.h
+++ /dev/null
@@ -1,224 +0,0 @@
-/*** coff information for Intel 386/486. */
-
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved external references)
- * F_LNNO line numbers 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 (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-
-
-
-#define I386MAGIC 0x14c
-#define I386PTXMAGIC 0x154
-#define I386AIXMAGIC 0x175
-
-/* This is Lynx's all-platform magic number for executables. */
-
-#define LYNXCOFFMAGIC 0415
-
-#define I386BADMAG(x) (((x).f_magic != I386MAGIC) \
- && (x).f_magic != I386AIXMAGIC \
- && (x).f_magic != I386PTXMAGIC \
- && (x).f_magic != LYNXCOFFMAGIC)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-
-
-}
-AOUTHDR;
-
-
-#define AOUTSZ (sizeof(AOUTHDR))
-
-#define OMAGIC 0404 /* object files, eg as output */
-#define ZMAGIC 0413 /* demand load format, eg normal ld output */
-#define STMAGIC 0401 /* target shlib */
-#define SHMAGIC 0443 /* host shlib */
-
-
-/* define some NT default values */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _COMMENT ".comment"
-#define _LIB ".lib"
-
-/********************** 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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-
-#define LINENO struct external_lineno
-#define LINESZ 6
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-#define N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-# define _ETEXT "etext"
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
diff --git a/contrib/gdb/include/coff/i860.h b/contrib/gdb/include/coff/i860.h
deleted file mode 100644
index e09ec5f0e51b..000000000000
--- a/contrib/gdb/include/coff/i860.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/* This file was hacked from i386.h [dolan@ssd.intel.com] */
-
-/*** coff information for Intel 860. */
-
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-
-/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved external references)
- * F_LNNO line numbers 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 (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-
-
-
-#define I860MAGIC 0x14d
-
-#define I860BADMAG(x) ((x).f_magic != I860MAGIC)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-
-#define AOUTSZ (sizeof(AOUTHDR))
-
-/* FIXME: What are the a.out magic numbers? */
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _COMMENT ".comment"
-#define _LIB ".lib"
-
-/********************** 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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-
-#define LINENO struct external_lineno
-#define LINESZ 6
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-#define N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-# define _ETEXT "etext"
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ 10
diff --git a/contrib/gdb/include/coff/i960.h b/contrib/gdb/include/coff/i960.h
deleted file mode 100644
index c20893c94781..000000000000
--- a/contrib/gdb/include/coff/i960.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/*** coff information for 80960. Origins: Intel corp, natch. */
-
-/* NOTE: Tagentries (cf TAGBITS) are no longer used by the 960 */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-#define OMAGIC (0407) /* old impure format. data immediately
- follows text. both sections are rw. */
-#define NMAGIC (0410) /* split i&d, read-only text */
-
-/*
-* Intel 80960 (I960) processor flags.
-* F_I960TYPE == mask for processor type field.
-*/
-
-#define F_I960TYPE (0xf000)
-#define F_I960CORE (0x1000)
-#define F_I960KB (0x2000)
-#define F_I960SB (0x2000)
-#define F_I960MC (0x3000)
-#define F_I960XA (0x4000)
-#define F_I960CA (0x5000)
-#define F_I960KA (0x6000)
-#define F_I960SA (0x6000)
-#define F_I960JX (0x7000)
-#define F_I960HX (0x8000)
-
-
-/** i80960 Magic Numbers
-*/
-
-#define I960ROMAGIC (0x160) /* read-only text segments */
-#define I960RWMAGIC (0x161) /* read-write text segments */
-
-#define I960BADMAG(x) (((x).f_magic!=I960ROMAGIC) && ((x).f_magic!=I960RWMAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct {
- unsigned long phys_addr;
- unsigned long bitarray;
-} TAGBITS;
-
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
- char tagentries[4]; /* 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)))*/
-#define AOUTSZ (sizeof(AOUTHDR))
-
-
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
- char s_align[4]; /* section alignment */
-};
-
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-/********************** 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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
- char padding[2]; /* force alignment */
-};
-
-
-#define LINENO struct external_lineno
-#define LINESZ 8
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_flags[2];
- char e_type[4];
- char e_sclass[1];
- char e_numaux[1];
- char pad2[2];
-};
-
-
-
-
-#define N_BTMASK (0x1f)
-#define N_TMASK (0x60)
-#define N_BTSHFT (5)
-#define N_TSHIFT (2)
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
- /******************************************
- * I960-specific *2nd* aux. entry formats
- ******************************************/
- struct {
- /* This is a very old typo that keeps getting propagated. */
-#define x_stdindx x_stindx
- char x_stindx[4]; /* sys. table entry */
- } x_sc; /* system call entry */
-
- struct {
- char x_balntry[4]; /* BAL entry point */
- } x_bal; /* BAL-callable function */
-
- struct {
- char x_timestamp[4]; /* time stamp */
- char x_idstring[20]; /* producer identity string */
- } x_ident; /* Producer ident info */
-
-};
-
-
-
-#define SYMENT struct external_syment
-#define SYMESZ sizeof(SYMENT) /* FIXME - calc by hand */
-#define AUXENT union external_auxent
-#define AUXESZ sizeof(AUXENT) /* FIXME - calc by hand */
-
-# define _ETEXT "_etext"
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
- char pad[2];
-};
-
-
-/* Relevent values for r_type and i960. Would someone please document them */
-
-
-#define RELOC struct external_reloc
-#define RELSZ 12
-
diff --git a/contrib/gdb/include/coff/internal.h b/contrib/gdb/include/coff/internal.h
deleted file mode 100644
index b43cf766421c..000000000000
--- a/contrib/gdb/include/coff/internal.h
+++ /dev/null
@@ -1,648 +0,0 @@
-/* Internal format of COFF object file data structures, for GNU BFD.
- This file is part of BFD, the Binary File Descriptor library. */
-
-#ifndef GNU_COFF_INTERNAL_H
-#define GNU_COFF_INTERNAL_H 1
-
-/* First, make "signed char" work, even on old compilers. */
-#ifndef signed
-#ifndef __STDC__
-#define signed /**/
-#endif
-#endif
-
-/********************** FILE HEADER **********************/
-
-/* extra stuff in a PE header. */
-
-struct internal_extra_pe_filehdr
-{
- /* DOS header data follows for PE stuff */
- unsigned short e_magic; /* Magic number, 0x5a4d */
- unsigned short e_cblp; /* Bytes on last page of file, 0x90 */
- unsigned short e_cp; /* Pages in file, 0x3 */
- unsigned short e_crlc; /* Relocations, 0x0 */
- unsigned short e_cparhdr; /* Size of header in paragraphs, 0x4 */
- unsigned short e_minalloc; /* Minimum extra paragraphs needed, 0x0 */
- unsigned short e_maxalloc; /* Maximum extra paragraphs needed, 0xFFFF */
- unsigned short e_ss; /* Initial (relative) SS value, 0x0 */
- unsigned short e_sp; /* Initial SP value, 0xb8 */
- unsigned short e_csum; /* Checksum, 0x0 */
- unsigned short e_ip; /* Initial IP value, 0x0 */
- unsigned short e_cs; /* Initial (relative) CS value, 0x0 */
- unsigned short e_lfarlc; /* File address of relocation table, 0x40 */
- unsigned short e_ovno; /* Overlay number, 0x0 */
- unsigned short e_res[4]; /* Reserved words, all 0x0 */
- unsigned short e_oemid; /* OEM identifier (for e_oeminfo), 0x0 */
- unsigned short e_oeminfo; /* OEM information; e_oemid specific, 0x0 */
- unsigned short e_res2[10]; /* Reserved words, all 0x0 */
- bfd_vma e_lfanew; /* File address of new exe header, 0x80 */
- unsigned long dos_message[16]; /* text which always follows dos header */
- bfd_vma nt_signature; /* required NT signature, 0x4550 */
-};
-
-struct internal_filehdr
-{
- struct internal_extra_pe_filehdr pe;
-
- /* standard coff internal info */
- unsigned short f_magic; /* magic number */
- unsigned short f_nscns; /* number of sections */
- long f_timdat; /* time & date stamp */
- bfd_vma 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 external references)
- * F_LNNO line numbers stripped from file
- * F_LSYMS local symbols stripped from file
- * F_AR16WR file is 16-bit little-endian
- * F_AR32WR file is 32-bit little-endian
- * F_AR32W file is 32-bit big-endian
- * F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports
- * F_SHROBJ rs/6000 aix: file is a shared object
- * F_DLL PE format DLL
- */
-
-#define F_RELFLG (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-#define F_AR16WR (0x0080)
-#define F_AR32WR (0x0100)
-#define F_AR32W (0x0200)
-#define F_DYNLOAD (0x1000)
-#define F_SHROBJ (0x2000)
-#define F_DLL (0x2000)
-
-/* extra structure which is used in the optional header */
-typedef struct _IMAGE_DATA_DIRECTORY
-{
- bfd_vma VirtualAddress;
- long Size;
-} IMAGE_DATA_DIRECTORY;
-#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
-
-/* default image base for NT */
-#define NT_EXE_IMAGE_BASE 0x400000
-#define NT_DLL_IMAGE_BASE 0x10000000
-
-/* Extra stuff in a PE aouthdr */
-
-#define PE_DEF_SECTION_ALIGNMENT 0x1000
-#define PE_DEF_FILE_ALIGNMENT 0x200
-
-struct internal_extra_pe_aouthdr
-{
- /* PE stuff */
- bfd_vma ImageBase; /* address of specific location in memory that
- file is located, NT default 0x10000 */
-
- bfd_vma SectionAlignment; /* section alignment default 0x1000 */
- bfd_vma FileAlignment; /* file alignment default 0x200 */
- short MajorOperatingSystemVersion; /* minimum version of the operating */
- short MinorOperatingSystemVersion; /* system req'd for exe, default to 1*/
- short MajorImageVersion; /* user defineable field to store version of */
- short MinorImageVersion; /* exe or dll being created, default to 0 */
- short MajorSubsystemVersion; /* minimum subsystem version required to */
- short MinorSubsystemVersion; /* run exe; default to 3.1 */
- long Reserved1; /* seems to be 0 */
- long SizeOfImage; /* size of memory to allocate for prog */
- long SizeOfHeaders; /* size of PE header and section table */
- long CheckSum; /* set to 0 */
- short Subsystem;
-
- /* type of subsystem exe uses for user interface,
- possible values:
- 1 - NATIVE Doesn't require a subsystem
- 2 - WINDOWS_GUI runs in Windows GUI subsystem
- 3 - WINDOWS_CUI runs in Windows char sub. (console app)
- 5 - OS2_CUI runs in OS/2 character subsystem
- 7 - POSIX_CUI runs in Posix character subsystem */
- short DllCharacteristics; /* flags for DLL init, use 0 */
- bfd_vma SizeOfStackReserve; /* amount of memory to reserve */
- bfd_vma SizeOfStackCommit; /* amount of memory initially committed for
- initial thread's stack, default is 0x1000 */
- bfd_vma SizeOfHeapReserve; /* amount of virtual memory to reserve and */
- bfd_vma SizeOfHeapCommit; /* commit, don't know what to defaut it to */
- long LoaderFlags; /* can probably set to 0 */
- long NumberOfRvaAndSizes; /* number of entries in next entry, 16 */
- IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
-};
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-struct internal_aouthdr
-{
- short magic; /* type of file */
- short vstamp; /* version stamp */
- bfd_vma tsize; /* text size in bytes, padded to FW bdry*/
- bfd_vma dsize; /* initialized data " " */
- bfd_vma bsize; /* uninitialized data " " */
- bfd_vma entry; /* entry pt. */
- bfd_vma text_start; /* base of text used for this file */
- bfd_vma data_start; /* base of data used for this file */
-
- /* i960 stuff */
- unsigned long tagentries; /* number of tag entries to follow */
-
- /* RS/6000 stuff */
- unsigned long o_toc; /* address of TOC */
- short o_snentry; /* section number for entry point */
- short o_sntext; /* section number for text */
- short o_sndata; /* section number for data */
- short o_sntoc; /* section number for toc */
- short o_snloader; /* section number for loader section */
- short o_snbss; /* section number for bss */
- short o_algntext; /* max alignment for text */
- short o_algndata; /* max alignment for data */
- short o_modtype; /* Module type field, 1R,RE,RO */
- short o_cputype; /* Encoded CPU type */
- unsigned long o_maxstack; /* max stack size allowed. */
- unsigned long o_maxdata; /* max data size allowed. */
-
- /* ECOFF stuff */
- bfd_vma bss_start; /* Base of bss section. */
- bfd_vma gp_value; /* GP register value. */
- unsigned long gprmask; /* General registers used. */
- unsigned long cprmask[4]; /* Coprocessor registers used. */
- unsigned long fprmask; /* Floating pointer registers used. */
-
- /* Apollo stuff */
- long o_inlib; /* inlib data */
- long o_sri; /* Static Resource Information */
- long vid[2]; /* Version id */
-
-
- struct internal_extra_pe_aouthdr pe;
-
-};
-
-/********************** STORAGE CLASSES **********************/
-
-/* This used to be defined as -1, but now n_sclass is unsigned. */
-#define C_EFCN 0xff /* 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_AUTOARG 19 /* auto argument */
-#define C_LASTENT 20 /* dummy entry (end of block) */
-#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 WINDOWS_NT */
-#define C_SECTION 104 /* section name */
-#define C_NT_WEAK 105 /* weak external */
-
- /* New storage classes for 80960 */
-
-/* C_LEAFPROC is obsolete. Use C_LEAFEXT or C_LEAFSTAT */
-#define C_LEAFPROC 108 /* Leaf procedure, "call" via BAL */
-
-#define C_SCALL 107 /* Procedure reachable via system call */
-#define C_LEAFEXT 108 /* External leaf */
-#define C_LEAFSTAT 113 /* Static leaf */
-#define C_OPTVAR 109 /* Optimized variable */
-#define C_DEFINE 110 /* Preprocessor #define */
-#define C_PRAGMA 111 /* Advice to compiler or linker */
-#define C_SEGMENT 112 /* 80960 segment name */
-
- /* Storage classes for m88k */
-#define C_SHADOW 107 /* shadow symbol */
-#define C_VERSION 108 /* coff version symbol */
-
- /* New storage classes for RS/6000 */
-#define C_HIDEXT 107 /* Un-named external symbol */
-#define C_BINCL 108 /* Marks beginning of include file */
-#define C_EINCL 109 /* Marks ending of include file */
-
- /* storage classes for stab symbols for RS/6000 */
-#define C_GSYM (0x80)
-#define C_LSYM (0x81)
-#define C_PSYM (0x82)
-#define C_RSYM (0x83)
-#define C_RPSYM (0x84)
-#define C_STSYM (0x85)
-#define C_TCSYM (0x86)
-#define C_BCOMM (0x87)
-#define C_ECOML (0x88)
-#define C_ECOMM (0x89)
-#define C_DECL (0x8c)
-#define C_ENTRY (0x8d)
-#define C_FUN (0x8e)
-#define C_BSTAT (0x8f)
-#define C_ESTAT (0x90)
-
-/********************** SECTION HEADER **********************/
-struct internal_scnhdr
-{
- char s_name[8]; /* section name */
- bfd_vma s_paddr; /* physical address, aliased s_nlib */
- bfd_vma s_vaddr; /* virtual address */
- bfd_vma s_size; /* section size */
- bfd_vma s_scnptr; /* file ptr to raw data for section */
- bfd_vma s_relptr; /* file ptr to relocation */
- bfd_vma s_lnnoptr; /* file ptr to line numbers */
- unsigned long s_nreloc; /* number of relocation entries */
- unsigned long s_nlnno; /* number of line number entries*/
- long s_flags; /* flags */
- long s_align; /* used on I960 */
-};
-
-/*
- * s_flags "type"
- */
-#define STYP_REG (0x0000) /* "regular": allocated, relocated, loaded */
-#define STYP_DSECT (0x0001) /* "dummy": relocated only*/
-#define STYP_NOLOAD (0x0002) /* "noload": allocated, relocated, not loaded */
-#define STYP_GROUP (0x0004) /* "grouped": formed of input sections */
-#define STYP_PAD (0x0008) /* "padding": not allocated, not relocated, loaded */
-#define STYP_COPY (0x0010) /* "copy": for decision function used by field update; not allocated, not relocated,
- loaded; reloc & lineno entries processed normally */
-#define STYP_TEXT (0x0020) /* section contains text only */
-#define S_SHRSEG (0x0020) /* In 3b Update files (output of ogen), sections which appear in SHARED segments of the Pfile
- will have the S_SHRSEG flag set by ogen, to inform dufr that updating 1 copy of the proc. will
- update all process invocations. */
-#define STYP_DATA (0x0040) /* section contains data only */
-#define STYP_BSS (0x0080) /* section contains bss only */
-#define S_NEWFCN (0x0100) /* In a minimal file or an update file, a new function (as compared with a replaced function) */
-#define STYP_INFO (0x0200) /* comment: not allocated not relocated, not loaded */
-#define STYP_OVER (0x0400) /* overlay: relocated not allocated or loaded */
-#define STYP_LIB (0x0800) /* for .lib: same as INFO */
-#define STYP_MERGE (0x2000) /* merge section -- combines with text, data or bss sections only */
-#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions wherever padding is necessary and there is a
-
- word of contiguous bytes
- beginning on a word boundary. */
-
-#define STYP_LIT 0x8020 /* Literal data (like STYP_TEXT) */
-
-
-
-/********************** 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 internal_lineno
-{
- union
- {
- long l_symndx; /* function name symbol index, iff l_lnno == 0*/
- long l_paddr; /* (physical) address of line number */
- } l_addr;
- unsigned long l_lnno; /* line number */
-};
-
-/********************** 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 internal_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 */
- unsigned short n_flags; /* copy of flags from filhdr */
- unsigned short n_type; /* type and derived type */
- unsigned char n_sclass; /* storage class */
- unsigned char n_numaux; /* number of aux. entries */
-};
-
-#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 ((short)0) /* undefined symbol */
-#define N_ABS ((short)-1) /* value of symbol is absolute */
-#define N_DEBUG ((short)-2) /* debugging symbol -- value is meaningless */
-#define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */
-#define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/
-
-/*
- * Type of a symbol, in low N 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, in n_type
-*/
-#define DT_NON (0) /* no derived type */
-#define DT_PTR (1) /* pointer */
-#define DT_FCN (2) /* function */
-#define DT_ARY (3) /* array */
-
-#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 ISTAG(x) ((x)==C_STRTAG||(x)==C_UNTAG||(x)==C_ENTAG)
-#define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
-
-
-union internal_auxent
-{
- struct
- {
-
- union
- {
- long l; /* str, un, or enum tag indx */
- struct coff_ptr_struct *p;
- } x_tagndx;
-
- 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 # */
- union
- { /* entry ndx past block end */
- long l;
- struct coff_ptr_struct *p;
- } x_endndx;
- } 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_tvfill; /* tv fill value */
- unsigned short x_tvlen; /* length of .tv */
- unsigned short x_tvran[2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
- /******************************************
- * RS/6000-specific auxent - last auxent for every external symbol
- ******************************************/
- struct
- {
- union
- { /* csect length or enclosing csect */
- long l;
- struct coff_ptr_struct *p;
- } x_scnlen;
- long x_parmhash; /* parm type hash index */
- unsigned short x_snhash; /* sect num with parm hash */
- unsigned char x_smtyp; /* symbol align and type */
- /* 0-4 - Log 2 of alignment */
- /* 5-7 - symbol type */
- unsigned char x_smclas; /* storage mapping class */
- long x_stab; /* dbx stab info index */
- unsigned short x_snstab; /* sect num with dbx stab */
- } x_csect; /* csect definition information */
-
-/* x_smtyp values: */
-
-#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */
-#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */
-/* Symbol type values: */
-#define XTY_ER 0 /* External reference */
-#define XTY_SD 1 /* Csect definition */
-#define XTY_LD 2 /* Label definition */
-#define XTY_CM 3 /* .BSS */
-#define XTY_EM 4 /* Error message */
-#define XTY_US 5 /* "Reserved for internal use" */
-
-/* x_smclas values: */
-
-#define XMC_PR 0 /* Read-only program code */
-#define XMC_RO 1 /* Read-only constant */
-#define XMC_DB 2 /* Read-only debug dictionary table */
-#define XMC_TC 3 /* Read-write general TOC entry */
-#define XMC_UA 4 /* Read-write unclassified */
-#define XMC_RW 5 /* Read-write data */
-#define XMC_GL 6 /* Read-only global linkage */
-#define XMC_XO 7 /* Read-only extended operation */
-#define XMC_SV 8 /* Read-only supervisor call */
-#define XMC_BS 9 /* Read-write BSS */
-#define XMC_DS 10 /* Read-write descriptor csect */
-#define XMC_UC 11 /* Read-write unnamed Fortran common */
-#define XMC_TI 12 /* Read-only traceback index csect */
-#define XMC_TB 13 /* Read-only traceback table csect */
-/* 14 ??? */
-#define XMC_TC0 15 /* Read-write TOC anchor */
-#define XMC_TD 16 /* Read-write data in TOC */
-
- /******************************************
- * I960-specific *2nd* aux. entry formats
- ******************************************/
- struct
- {
- /* This is a very old typo that keeps getting propagated. */
-#define x_stdindx x_stindx
- long x_stindx; /* sys. table entry */
- } x_sc; /* system call entry */
-
- struct
- {
- unsigned long x_balntry; /* BAL entry point */
- } x_bal; /* BAL-callable function */
-
- struct
- {
- unsigned long x_timestamp; /* time stamp */
- char x_idstring[20]; /* producer identity string */
- } x_ident; /* Producer ident info */
-
-};
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct internal_reloc
-{
- bfd_vma r_vaddr; /* Virtual address of reference */
- long r_symndx; /* Index into symbol table */
- unsigned short r_type; /* Relocation type */
- unsigned char r_size; /* Used by RS/6000 and ECOFF */
- unsigned char r_extern; /* Used by ECOFF */
- unsigned long r_offset; /* Used by Alpha ECOFF, SPARC, others */
-};
-
-#define R_RELBYTE 017
-#define R_RELWORD 020
-#define R_PCRBYTE 022
-#define R_PCRWORD 023
-#define R_PCRLONG 024
-
-#define R_DIR16 01
-#define R_DIR32 06
-#define R_PCLONG 020
-#define R_RELBYTE 017
-#define R_RELWORD 020
-#define R_IMAGEBASE 07
-
-
-#define R_PCR16L 128
-#define R_PCR26L 129
-#define R_VRT16 130
-#define R_HVRT16 131
-#define R_LVRT16 132
-#define R_VRT32 133
-#define R_RELLONG (0x11) /* Direct 32-bit relocation */
-#define R_IPRSHORT (0x18)
-#define R_IPRMED (0x19) /* 24-bit ip-relative relocation */
-#define R_IPRLONG (0x1a)
-#define R_OPTCALL (0x1b) /* 32-bit optimizable call (leafproc/sysproc) */
-#define R_OPTCALLX (0x1c) /* 64-bit optimizable call (leafproc/sysproc) */
-#define R_GETSEG (0x1d)
-#define R_GETPA (0x1e)
-#define R_TAGWORD (0x1f)
-#define R_JUMPTARG 0x20 /* strange 29k 00xx00xx reloc */
-
-
-#define R_MOVB1 0x41 /* Special h8 16bit or 8 bit reloc for mov.b */
-#define R_MOVB2 0x42 /* Special h8 opcode for 8bit which could be 16 */
-#define R_JMP1 0x43 /* Special h8 16bit jmp which could be pcrel */
-#define R_JMP2 0x44 /* a branch which used to be a jmp */
-#define R_RELLONG_NEG 0x45
-
-#define R_JMPL1 0x46 /* Special h8 24bit jmp which could be pcrel */
-#define R_JMPL_B8 0x47 /* a 8 bit pcrel which used to be a jmp */
-
-#define R_MOVLB1 0x48 /* Special h8 24bit or 8 bit reloc for mov.b */
-#define R_MOVLB2 0x49 /* Special h8 opcode for 8bit which could be 24 */
-
-/* An h8300 memory indirect jump/call. Forces the address of the jump/call
- target into the function vector (in page zero), and the address of the
- vector entry to be placed in the jump/call instruction. */
-#define R_MEM_INDIRECT 0x4a
-
-/* Z8k modes */
-#define R_IMM16 0x01 /* 16 bit abs */
-#define R_JR 0x02 /* jr 8 bit disp */
-#define R_IMM4L 0x23 /* low nibble */
-#define R_IMM8 0x22 /* 8 bit abs */
-#define R_IMM32 R_RELLONG /* 32 bit abs */
-#define R_CALL R_DA /* Absolute address which could be a callr */
-#define R_JP R_DA /* Absolute address which could be a jp */
-#define R_REL16 0x04 /* 16 bit PC rel */
-#define R_CALLR 0x05 /* callr 12 bit disp */
-#define R_SEG 0x10 /* set if in segmented mode */
-#define R_IMM4H 0x24 /* high nibble */
-#define R_DISP7 0x25 /* djnz displacement */
-
-/* H8500 modes */
-
-#define R_H8500_IMM8 1 /* 8 bit immediate */
-#define R_H8500_IMM16 2 /* 16 bit immediate */
-#define R_H8500_PCREL8 3 /* 8 bit pcrel */
-#define R_H8500_PCREL16 4 /* 16 bit pcrel */
-#define R_H8500_HIGH8 5 /* high 8 bits of 24 bit address */
-#define R_H8500_LOW16 7 /* low 16 bits of 24 bit immediate */
-#define R_H8500_IMM24 6 /* 24 bit immediate */
-#define R_H8500_IMM32 8 /* 32 bit immediate */
-#define R_H8500_HIGH16 9 /* high 16 bits of 32 bit immediate */
-
-/* W65 modes */
-
-#define R_W65_ABS8 1 /* addr & 0xff */
-#define R_W65_ABS16 2 /* addr & 0xffff */
-#define R_W65_ABS24 3 /* addr & 0xffffff */
-
-#define R_W65_ABS8S8 4 /* (addr >> 8) & 0xff */
-#define R_W65_ABS8S16 5 /* (addr >> 16) & 0xff */
-
-#define R_W65_ABS16S8 6 /* (addr >> 8) & 0ffff */
-#define R_W65_ABS16S16 7 /* (addr >> 16) & 0ffff */
-
-#define R_W65_PCR8 8
-#define R_W65_PCR16 9
-
-#define R_W65_DP 10 /* direct page 8 bits only */
-
-#endif /* GNU_COFF_INTERNAL_H */
diff --git a/contrib/gdb/include/coff/m68k.h b/contrib/gdb/include/coff/m68k.h
deleted file mode 100644
index a3c15be16184..000000000000
--- a/contrib/gdb/include/coff/m68k.h
+++ /dev/null
@@ -1,221 +0,0 @@
-/*** coff information for M68K */
-
-#ifndef GNU_COFF_M68K_H
-#define GNU_COFF_M68K_H 1
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-
-/* Motorola 68000/68008/68010/68020 */
-#define MC68MAGIC 0520
-#define MC68KWRMAGIC 0520 /* writeable text segments */
-#define MC68TVMAGIC 0521
-#define MC68KROMAGIC 0521 /* readonly shareable text segments */
-#define MC68KPGMAGIC 0522 /* demand paged text segments */
-#define M68MAGIC 0210
-#define M68TVMAGIC 0211
-
-/* this is the magic of the Bull dpx/2 */
-#define MC68KBCSMAGIC 0526
-
-/* This is Lynx's all-platform magic number for executables. */
-
-#define LYNXCOFFMAGIC 0415
-
-#define OMAGIC M68MAGIC
-
-/* This intentionally does not include MC68KBCSMAGIC; it only includes
- magic numbers which imply that names do not have underscores. */
-#define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \
- ((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && ((x).f_magic!=LYNXCOFFMAGIC) )
-
-/* Magic numbers for the a.out header. */
-
-#define PAGEMAGICEXECSWAPPED 0407 /* executable (swapped) */
-#define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */
-#define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */
-#define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-#define AOUTSZ (sizeof(AOUTHDR))
-
-
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _COMMENT ".comment"
-
-#define SCNHDR struct external_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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-
-#define LINENO struct external_lineno
-#define LINESZ sizeof(LINENO)
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-#ifdef M68K_COFF_OFFSET
- char r_offset[4];
-#endif
-
-};
-
-
-#define RELOC struct external_reloc
-
-#define RELSZ sizeof(struct external_reloc)
-
-#endif /* GNU_COFF_M68K_H */
diff --git a/contrib/gdb/include/coff/m88k.h b/contrib/gdb/include/coff/m88k.h
deleted file mode 100644
index 9068dd3f1245..000000000000
--- a/contrib/gdb/include/coff/m88k.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/*** coff information for 88k bcs */
-
-/********************** FILE HEADER **********************/
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-#define MC88MAGIC 0540 /* 88k BCS executable */
-#define MC88DMAGIC 0541 /* DG/UX executable */
-#define MC88OMAGIC 0555 /* Object file */
-
-#define MC88BADMAG(x) (((x).f_magic!=MC88MAGIC) &&((x).f_magic!=MC88DMAGIC) && ((x).f_magic != MC88OMAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-#define PAGEMAGIC3 0414 /* Split i&d, zero mapped */
-#define PAGEMAGICBCS 0413
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-
-/* compute size of a header */
-
-#define AOUTSZ (sizeof(AOUTHDR))
-
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr
-{
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[4]; /* number of relocation entries */
- char s_nlnno[4]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _COMMENT ".comment"
-
-/********************** 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 external_lineno{
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
-
- char l_lnno[4];
-
-};
-
-#define LINENO struct external_lineno
-#define LINESZ 8
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
- char pad2[2];
-};
-
-
-
-
-#define N_BTMASK 017
-#define N_TMASK 060
-#define N_BTSHFT 4
-#define N_TSHIFT 2
-
-
-/* Note that this isn't the same shape as other coffs */
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- /* 4 */
- union {
- char x_fsize[4]; /* size of function */
- struct {
- char x_lnno[4]; /* declaration line number */
- char x_size[4]; /* str/union/array size */
- } x_lnsz;
- } x_misc;
-
- /* 12 */
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- /* 20 */
-
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[4]; /* # relocation entries */
- char x_nlinno[4]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-};
-
-#define GET_FCN_LNNOPTR(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *)ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
-#define GET_FCN_ENDNDX(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
-#define PUT_FCN_LNNOPTR(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
-#define PUT_FCN_ENDNDX(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
-#define GET_LNSZ_SIZE(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
-#define GET_LNSZ_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
-#define PUT_LNSZ_LNNO(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
-#define PUT_LNSZ_SIZE(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
-#define GET_SCN_SCNLEN(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_scnlen)
-#define GET_SCN_NRELOC(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nreloc)
-#define GET_SCN_NLINNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nlinno)
-#define PUT_SCN_SCNLEN(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_scn.x_scnlen)
-#define PUT_SCN_NRELOC(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *)ext->x_scn.x_nreloc)
-#define PUT_SCN_NLINNO(abfd,in, ext) bfd_h_put_32(abfd,in, (bfd_byte *) ext->x_scn.x_nlinno)
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno))
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-
-
-#define SYMENT struct external_syment
-#define SYMESZ 20
-#define AUXENT union external_auxent
-#define AUXESZ 20
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
- char r_offset[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 12
-
-#define NO_TVNDX
diff --git a/contrib/gdb/include/coff/mips.h b/contrib/gdb/include/coff/mips.h
deleted file mode 100644
index f35187e83b17..000000000000
--- a/contrib/gdb/include/coff/mips.h
+++ /dev/null
@@ -1,368 +0,0 @@
-/* ECOFF support on MIPS machines.
- coff/ecoff.h must be included before this file. */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- unsigned char f_magic[2]; /* magic number */
- unsigned char f_nscns[2]; /* number of sections */
- unsigned char f_timdat[4]; /* time & date stamp */
- unsigned char f_symptr[4]; /* file pointer to symtab */
- unsigned char f_nsyms[4]; /* number of symtab entries */
- unsigned char f_opthdr[2]; /* sizeof(optional hdr) */
- unsigned char f_flags[2]; /* flags */
-};
-
-/* Magic numbers are defined in coff/ecoff.h. */
-#define MIPS_ECOFF_BADMAG(x) (((x).f_magic!=MIPS_MAGIC_1) && \
- ((x).f_magic!=MIPS_MAGIC_LITTLE) &&\
- ((x).f_magic!=MIPS_MAGIC_BIG) && \
- ((x).f_magic!=MIPS_MAGIC_LITTLE2) && \
- ((x).f_magic!=MIPS_MAGIC_BIG2) && \
- ((x).f_magic!=MIPS_MAGIC_LITTLE3) && \
- ((x).f_magic!=MIPS_MAGIC_BIG3))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct external_aouthdr
-{
- unsigned char magic[2]; /* type of file */
- unsigned char vstamp[2]; /* version stamp */
- unsigned char tsize[4]; /* text size in bytes, padded to FW bdry*/
- unsigned char dsize[4]; /* initialized data " " */
- unsigned char bsize[4]; /* uninitialized data " " */
- unsigned char entry[4]; /* entry pt. */
- unsigned char text_start[4]; /* base of text used for this file */
- unsigned char data_start[4]; /* base of data used for this file */
- unsigned char bss_start[4]; /* base of bss used for this file */
- unsigned char gprmask[4]; /* ?? */
- unsigned char cprmask[4][4]; /* ?? */
- unsigned char gp_value[4]; /* value for gp register */
-} AOUTHDR;
-
-/* compute size of a header */
-
-#define AOUTSZ (sizeof(AOUTHDR))
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr {
- unsigned char s_name[8]; /* section name */
- unsigned char s_paddr[4]; /* physical address, aliased s_nlib */
- unsigned char s_vaddr[4]; /* virtual address */
- unsigned char s_size[4]; /* section size */
- unsigned char s_scnptr[4]; /* file ptr to raw data for section */
- unsigned char s_relptr[4]; /* file ptr to relocation */
- unsigned char s_lnnoptr[4]; /* file ptr to line numbers */
- unsigned char s_nreloc[2]; /* number of relocation entries */
- unsigned char s_nlnno[2]; /* number of line number entries*/
- unsigned char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc {
- unsigned char r_vaddr[4];
- unsigned char r_bits[4];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 8
-
-/* MIPS ECOFF uses a packed 8 byte format for relocs. These constants
- are used to unpack the r_bits field. */
-
-#define RELOC_BITS0_SYMNDX_SH_LEFT_BIG 16
-#define RELOC_BITS0_SYMNDX_SH_LEFT_LITTLE 0
-
-#define RELOC_BITS1_SYMNDX_SH_LEFT_BIG 8
-#define RELOC_BITS1_SYMNDX_SH_LEFT_LITTLE 8
-
-#define RELOC_BITS2_SYMNDX_SH_LEFT_BIG 0
-#define RELOC_BITS2_SYMNDX_SH_LEFT_LITTLE 16
-
-/* Originally, ECOFF used four bits for the reloc type and had three
- reserved bits. Irix 4 added another bit for the reloc type, which
- was easy because it was big endian and one of the spare bits became
- the new most significant bit. To make this also work for little
- endian ECOFF, we need to wrap one of the reserved bits around to
- become the most significant bit of the reloc type. */
-#define RELOC_BITS3_TYPE_BIG 0x3E
-#define RELOC_BITS3_TYPE_SH_BIG 1
-#define RELOC_BITS3_TYPE_LITTLE 0x78
-#define RELOC_BITS3_TYPE_SH_LITTLE 3
-#define RELOC_BITS3_TYPEHI_LITTLE 0x04
-#define RELOC_BITS3_TYPEHI_SH_LITTLE 2
-
-#define RELOC_BITS3_EXTERN_BIG 0x01
-#define RELOC_BITS3_EXTERN_LITTLE 0x80
-
-/* The r_type field in a reloc is one of the following values. I
- don't know if any other values can appear. These seem to be all
- that occur in the Ultrix 4.2 libraries. */
-#define MIPS_R_IGNORE 0
-#define MIPS_R_REFHALF 1
-#define MIPS_R_REFWORD 2
-#define MIPS_R_JMPADDR 3
-#define MIPS_R_REFHI 4
-#define MIPS_R_REFLO 5
-#define MIPS_R_GPREL 6
-#define MIPS_R_LITERAL 7
-
-/* These reloc types are a Cygnus extension used when generating
- position independent code for embedded systems. The numbers are
- taken from Irix 4, but at least for internal relocs Irix 5 does not
- give them the same meaning. For an internal reloc the symbol index
- of RELHI and RELLO is modified as described below for
- MIPS_R_SWITCH. */
-#define MIPS_R_PCREL16 12
-#define MIPS_R_RELHI 13
-#define MIPS_R_RELLO 14
-
-/* This reloc type is a Cygnus extension used when generating position
- independent code for embedded systems. It is used for an entry in
- a switch table, which looks like this:
- .word $L3-$LS12
- The object file will contain the correct difference, and does not
- require adjustment. However, when the linker is relaxing PC
- relative calls, it is possible for $L3 to move farther away. This
- reloc always appears in the .text section, and is always against
- the .text section. However, the symbol index is not
- RELOC_SECTION_TEXT. It is, instead, the distance between this
- switch table entry and $LS12. Thus, the original value of $L12 is
- vaddr - symndx
- and the original value of $L3 is
- vaddr - symndx + addend
- where addend is the value in the object file. Knowing this, the
- linker can know whether the addend in the object file must be
- adjusted. */
-#define MIPS_R_SWITCH 22
-
-/********************** STABS **********************/
-
-#define MIPS_IS_STAB ECOFF_IS_STAB
-#define MIPS_MARK_STAB ECOFF_MARK_STAB
-#define MIPS_UNMARK_STAB ECOFF_UNMARK_STAB
-
-/********************** SYMBOLIC INFORMATION **********************/
-
-/* Written by John Gilmore. */
-
-/* ECOFF uses COFF-like section structures, but its own symbol format.
- This file defines the symbol format in fields whose size and alignment
- will not vary on different host systems. */
-
-/* File header as a set of bytes */
-
-struct hdr_ext {
- unsigned char h_magic[2];
- unsigned char h_vstamp[2];
- unsigned char h_ilineMax[4];
- unsigned char h_cbLine[4];
- unsigned char h_cbLineOffset[4];
- unsigned char h_idnMax[4];
- unsigned char h_cbDnOffset[4];
- unsigned char h_ipdMax[4];
- unsigned char h_cbPdOffset[4];
- unsigned char h_isymMax[4];
- unsigned char h_cbSymOffset[4];
- unsigned char h_ioptMax[4];
- unsigned char h_cbOptOffset[4];
- unsigned char h_iauxMax[4];
- unsigned char h_cbAuxOffset[4];
- unsigned char h_issMax[4];
- unsigned char h_cbSsOffset[4];
- unsigned char h_issExtMax[4];
- unsigned char h_cbSsExtOffset[4];
- unsigned char h_ifdMax[4];
- unsigned char h_cbFdOffset[4];
- unsigned char h_crfd[4];
- unsigned char h_cbRfdOffset[4];
- unsigned char h_iextMax[4];
- unsigned char h_cbExtOffset[4];
-};
-
-/* File descriptor external record */
-
-struct fdr_ext {
- unsigned char f_adr[4];
- unsigned char f_rss[4];
- unsigned char f_issBase[4];
- unsigned char f_cbSs[4];
- unsigned char f_isymBase[4];
- unsigned char f_csym[4];
- unsigned char f_ilineBase[4];
- unsigned char f_cline[4];
- unsigned char f_ioptBase[4];
- unsigned char f_copt[4];
- unsigned char f_ipdFirst[2];
- unsigned char f_cpd[2];
- unsigned char f_iauxBase[4];
- unsigned char f_caux[4];
- unsigned char f_rfdBase[4];
- unsigned char f_crfd[4];
- unsigned char f_bits1[1];
- unsigned char f_bits2[3];
- unsigned char f_cbLineOffset[4];
- unsigned char f_cbLine[4];
-};
-
-#define FDR_BITS1_LANG_BIG 0xF8
-#define FDR_BITS1_LANG_SH_BIG 3
-#define FDR_BITS1_LANG_LITTLE 0x1F
-#define FDR_BITS1_LANG_SH_LITTLE 0
-
-#define FDR_BITS1_FMERGE_BIG 0x04
-#define FDR_BITS1_FMERGE_LITTLE 0x20
-
-#define FDR_BITS1_FREADIN_BIG 0x02
-#define FDR_BITS1_FREADIN_LITTLE 0x40
-
-#define FDR_BITS1_FBIGENDIAN_BIG 0x01
-#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80
-
-#define FDR_BITS2_GLEVEL_BIG 0xC0
-#define FDR_BITS2_GLEVEL_SH_BIG 6
-#define FDR_BITS2_GLEVEL_LITTLE 0x03
-#define FDR_BITS2_GLEVEL_SH_LITTLE 0
-
-/* We ignore the `reserved' field in bits2. */
-
-/* Procedure descriptor external record */
-
-struct pdr_ext {
- unsigned char p_adr[4];
- unsigned char p_isym[4];
- unsigned char p_iline[4];
- unsigned char p_regmask[4];
- unsigned char p_regoffset[4];
- unsigned char p_iopt[4];
- unsigned char p_fregmask[4];
- unsigned char p_fregoffset[4];
- unsigned char p_frameoffset[4];
- unsigned char p_framereg[2];
- unsigned char p_pcreg[2];
- unsigned char p_lnLow[4];
- unsigned char p_lnHigh[4];
- unsigned char p_cbLineOffset[4];
-};
-
-/* Runtime procedure table */
-
-struct rpdr_ext {
- unsigned char p_adr[4];
- unsigned char p_regmask[4];
- unsigned char p_regoffset[4];
- unsigned char p_fregmask[4];
- unsigned char p_fregoffset[4];
- unsigned char p_frameoffset[4];
- unsigned char p_framereg[2];
- unsigned char p_pcreg[2];
- unsigned char p_irpss[4];
- unsigned char p_reserved[4];
- unsigned char p_exception_info[4];
-};
-
-/* Line numbers */
-
-struct line_ext {
- unsigned char l_line[4];
-};
-
-/* Symbol external record */
-
-struct sym_ext {
- unsigned char s_iss[4];
- unsigned char s_value[4];
- unsigned char s_bits1[1];
- unsigned char s_bits2[1];
- unsigned char s_bits3[1];
- unsigned char s_bits4[1];
-};
-
-#define SYM_BITS1_ST_BIG 0xFC
-#define SYM_BITS1_ST_SH_BIG 2
-#define SYM_BITS1_ST_LITTLE 0x3F
-#define SYM_BITS1_ST_SH_LITTLE 0
-
-#define SYM_BITS1_SC_BIG 0x03
-#define SYM_BITS1_SC_SH_LEFT_BIG 3
-#define SYM_BITS1_SC_LITTLE 0xC0
-#define SYM_BITS1_SC_SH_LITTLE 6
-
-#define SYM_BITS2_SC_BIG 0xE0
-#define SYM_BITS2_SC_SH_BIG 5
-#define SYM_BITS2_SC_LITTLE 0x07
-#define SYM_BITS2_SC_SH_LEFT_LITTLE 2
-
-#define SYM_BITS2_RESERVED_BIG 0x10
-#define SYM_BITS2_RESERVED_LITTLE 0x08
-
-#define SYM_BITS2_INDEX_BIG 0x0F
-#define SYM_BITS2_INDEX_SH_LEFT_BIG 16
-#define SYM_BITS2_INDEX_LITTLE 0xF0
-#define SYM_BITS2_INDEX_SH_LITTLE 4
-
-#define SYM_BITS3_INDEX_SH_LEFT_BIG 8
-#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4
-
-#define SYM_BITS4_INDEX_SH_LEFT_BIG 0
-#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12
-
-/* External symbol external record */
-
-struct ext_ext {
- unsigned char es_bits1[1];
- unsigned char es_bits2[1];
- unsigned char es_ifd[2];
- struct sym_ext es_asym;
-};
-
-#define EXT_BITS1_JMPTBL_BIG 0x80
-#define EXT_BITS1_JMPTBL_LITTLE 0x01
-
-#define EXT_BITS1_COBOL_MAIN_BIG 0x40
-#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02
-
-#define EXT_BITS1_WEAKEXT_BIG 0x20
-#define EXT_BITS1_WEAKEXT_LITTLE 0x04
-
-/* Dense numbers external record */
-
-struct dnr_ext {
- unsigned char d_rfd[4];
- unsigned char d_index[4];
-};
-
-/* Relative file descriptor */
-
-struct rfd_ext {
- unsigned char rfd[4];
-};
-
-/* Optimizer symbol external record */
-
-struct opt_ext {
- unsigned char o_bits1[1];
- unsigned char o_bits2[1];
- unsigned char o_bits3[1];
- unsigned char o_bits4[1];
- struct rndx_ext o_rndx;
- unsigned char o_offset[4];
-};
-
-#define OPT_BITS2_VALUE_SH_LEFT_BIG 16
-#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0
-
-#define OPT_BITS3_VALUE_SH_LEFT_BIG 8
-#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8
-
-#define OPT_BITS4_VALUE_SH_LEFT_BIG 0
-#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16
diff --git a/contrib/gdb/include/coff/pe.h b/contrib/gdb/include/coff/pe.h
deleted file mode 100644
index f13b8b979ea6..000000000000
--- a/contrib/gdb/include/coff/pe.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/* PE COFF header information */
-
-#ifndef _PE_H
-#define _PE_H
-
-/* NT specific file attributes */
-#define IMAGE_FILE_RELOCS_STRIPPED 0x0001
-#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002
-#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004
-#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008
-#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080
-#define IMAGE_FILE_32BIT_MACHINE 0x0100
-#define IMAGE_FILE_DEBUG_STRIPPED 0x0200
-#define IMAGE_FILE_SYSTEM 0x1000
-#define IMAGE_FILE_DLL 0x2000
-#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
-
-/* additional flags to be set for section headers to allow the NT loader to
- read and write to the section data (to replace the addresses of data in
- dlls for one thing); also to execute the section in .text's case */
-#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000
-#define IMAGE_SCN_MEM_EXECUTE 0x20000000
-#define IMAGE_SCN_MEM_READ 0x40000000
-#define IMAGE_SCN_MEM_WRITE 0x80000000
-
-/*
- * Section characteristics added for ppc-nt
- */
-
-#define IMAGE_SCN_TYPE_NO_PAD 0x00000008 /* Reserved. */
-
-#define IMAGE_SCN_CNT_CODE 0x00000020 /* Section contains code. */
-#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 /* Section contains initialized data. */
-#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 /* Section contains uninitialized data. */
-
-#define IMAGE_SCN_LNK_OTHER 0x00000100 /* Reserved. */
-#define IMAGE_SCN_LNK_INFO 0x00000200 /* Section contains comments or some other type of information. */
-#define IMAGE_SCN_LNK_REMOVE 0x00000800 /* Section contents will not become part of image. */
-#define IMAGE_SCN_LNK_COMDAT 0x00001000 /* Section contents comdat. */
-
-#define IMAGE_SCN_MEM_FARDATA 0x00008000
-
-#define IMAGE_SCN_MEM_PURGEABLE 0x00020000
-#define IMAGE_SCN_MEM_16BIT 0x00020000
-#define IMAGE_SCN_MEM_LOCKED 0x00040000
-#define IMAGE_SCN_MEM_PRELOAD 0x00080000
-
-#define IMAGE_SCN_ALIGN_1BYTES 0x00100000
-#define IMAGE_SCN_ALIGN_2BYTES 0x00200000
-#define IMAGE_SCN_ALIGN_4BYTES 0x00300000
-#define IMAGE_SCN_ALIGN_8BYTES 0x00400000
-#define IMAGE_SCN_ALIGN_16BYTES 0x00500000 /* Default alignment if no others are specified. */
-#define IMAGE_SCN_ALIGN_32BYTES 0x00600000
-#define IMAGE_SCN_ALIGN_64BYTES 0x00700000
-
-
-#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 /* Section contains extended relocations. */
-#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 /* Section is not cachable. */
-#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 /* Section is not pageable. */
-#define IMAGE_SCN_MEM_SHARED 0x10000000 /* Section is shareable. */
-
-
-/* Magic values that are true for all dos/nt implementations */
-#define DOSMAGIC 0x5a4d
-#define NT_SIGNATURE 0x00004550
-
- /* NT allows long filenames, we want to accommodate this. This may break
- some of the bfd functions */
-#undef FILNMLEN
-#define FILNMLEN 18 /* # characters in a file name */
-
-
-#ifdef COFF_IMAGE_WITH_PE
-/* The filehdr is only weired in images */
-
-#undef FILHDR
-struct external_PE_filehdr
-{
- /* DOS header fields */
- char e_magic[2]; /* Magic number, 0x5a4d */
- char e_cblp[2]; /* Bytes on last page of file, 0x90 */
- char e_cp[2]; /* Pages in file, 0x3 */
- char e_crlc[2]; /* Relocations, 0x0 */
- char e_cparhdr[2]; /* Size of header in paragraphs, 0x4 */
- char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0 */
- char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF */
- char e_ss[2]; /* Initial (relative) SS value, 0x0 */
- char e_sp[2]; /* Initial SP value, 0xb8 */
- char e_csum[2]; /* Checksum, 0x0 */
- char e_ip[2]; /* Initial IP value, 0x0 */
- char e_cs[2]; /* Initial (relative) CS value, 0x0 */
- char e_lfarlc[2]; /* File address of relocation table, 0x40 */
- char e_ovno[2]; /* Overlay number, 0x0 */
- char e_res[4][2]; /* Reserved words, all 0x0 */
- char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0 */
- char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0 */
- char e_res2[10][2]; /* Reserved words, all 0x0 */
- char e_lfanew[4]; /* File address of new exe header, 0x80 */
- char dos_message[16][4]; /* other stuff, always follow DOS header */
- char nt_signature[4]; /* required NT signature, 0x4550 */
-
- /* From standard header */
-
-
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-
-};
-
-
-#define FILHDR struct external_PE_filehdr
-
-
-#endif
-
-typedef struct
-{
- AOUTHDR standard;
-
- /* NT extra fields; see internal.h for descriptions */
- char ImageBase[4];
- char SectionAlignment[4];
- char FileAlignment[4];
- char MajorOperatingSystemVersion[2];
- char MinorOperatingSystemVersion[2];
- char MajorImageVersion[2];
- char MinorImageVersion[2];
- char MajorSubsystemVersion[2];
- char MinorSubsystemVersion[2];
- char Reserved1[4];
- char SizeOfImage[4];
- char SizeOfHeaders[4];
- char CheckSum[4];
- char Subsystem[2];
- char DllCharacteristics[2];
- char SizeOfStackReserve[4];
- char SizeOfStackCommit[4];
- char SizeOfHeapReserve[4];
- char SizeOfHeapCommit[4];
- char LoaderFlags[4];
- char NumberOfRvaAndSizes[4];
- /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
- char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars */
-
-} PEAOUTHDR;
-
-
-#undef AOUTSZ
-#define AOUTSZ sizeof(PEAOUTHDR)
-
-#undef E_FILNMLEN
-#define E_FILNMLEN 18 /* # characters in a file name */
-#endif
-
-
-
diff --git a/contrib/gdb/include/coff/powerpc.h b/contrib/gdb/include/coff/powerpc.h
deleted file mode 100644
index 6866fc8a0dc7..000000000000
--- a/contrib/gdb/include/coff/powerpc.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/* Basic coff information for the PowerPC
- *
- * Based on coff/rs6000.h, coff/i386.h and others.
- *
- * Initial release: Kim Knuttila (krk@cygnus.com)
- */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved external references)
- * F_LNNO line numbers 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 (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-
-/* extra NT defines */
-#define PPCMAGIC 0760 /* peeked on aa PowerPC Windows NT box */
-#define DOSMAGIC 0x5a4d /* from arm.h, i386.h */
-#define NT_SIGNATURE 0x00004550 /* from arm.h, i386.h */
-
-/* from winnt.h */
-#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
-
-#define PPCBADMAG(x) ((x).f_magic != PPCMAGIC)
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-#define AOUTSZ (sizeof(AOUTHDR))
-
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries */
- char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _COMMENT ".comment"
-#define _LIB ".lib"
-
-/********************** 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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0 */
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-#define LINENO struct external_lineno
-#define LINESZ 6
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-
-/* Allow the file name length to be overridden in the including file */
-#ifndef E_FILNMLEN
-#define E_FILNMLEN 14
-#endif
-
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-
-#define N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-};
-
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-#define _ETEXT "etext"
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
diff --git a/contrib/gdb/include/coff/rs6000.h b/contrib/gdb/include/coff/rs6000.h
deleted file mode 100644
index 62a6f86cc7c8..000000000000
--- a/contrib/gdb/include/coff/rs6000.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/* IBM RS/6000 "XCOFF" file definitions for BFD.
- Copyright (C) 1990, 1991 Free Software Foundation, Inc.
- FIXME: Can someone provide a transliteration of this name into ASCII?
- Using the following chars caused a compiler warning on HIUX (so I replaced
- them with octal escapes), and isn't useful without an understanding of what
- character set it is.
- Written by Mimi Ph\373\364ng-Th\345o V\365 of IBM
- and John Gilmore of Cygnus Support. */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
- /* IBM RS/6000 */
-#define U802WRMAGIC 0730 /* writeable text segments **chh** */
-#define U802ROMAGIC 0735 /* readonly sharable text segments */
-#define U802TOCMAGIC 0737 /* readonly text segments and TOC */
-
-#define BADMAG(x) \
- ((x).f_magic != U802ROMAGIC && (x).f_magic != U802WRMAGIC && \
- (x).f_magic != U802TOCMAGIC)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- unsigned char magic[2]; /* type of file */
- unsigned char vstamp[2]; /* version stamp */
- unsigned char tsize[4]; /* text size in bytes, padded to FW bdry */
- unsigned char dsize[4]; /* initialized data " " */
- unsigned char bsize[4]; /* uninitialized data " " */
- unsigned char entry[4]; /* entry pt. */
- unsigned char text_start[4]; /* base of text used for this file */
- unsigned char data_start[4]; /* base of data used for this file */
- unsigned char o_toc[4]; /* address of TOC */
- unsigned char o_snentry[2]; /* section number of entry point */
- unsigned char o_sntext[2]; /* section number of .text section */
- unsigned char o_sndata[2]; /* section number of .data section */
- unsigned char o_sntoc[2]; /* section number of TOC */
- unsigned char o_snloader[2]; /* section number of .loader section */
- unsigned char o_snbss[2]; /* section number of .bss section */
- unsigned char o_algntext[2]; /* .text alignment */
- unsigned char o_algndata[2]; /* .data alignment */
- unsigned char o_modtype[2]; /* module type (??) */
- unsigned char o_cputype[2]; /* cpu type */
- unsigned char o_maxstack[4]; /* max stack size (??) */
- unsigned char o_maxdata[4]; /* max data size (??) */
- unsigned char o_resv2[12]; /* reserved */
-}
-AOUTHDR;
-
-#define AOUTSZ (sizeof(AOUTHDR))
-#define SMALL_AOUTSZ (28)
-
-#define RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
-#define RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
-#define RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
-
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _PAD ".pad"
-#define _LOADER ".loader"
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-/* XCOFF uses a special .loader section with type STYP_LOADER. */
-#define STYP_LOADER 0x1000
-
-/* XCOFF uses a special .debug section with type STYP_DEBUG. */
-#define STYP_DEBUG 0x2000
-
-/* XCOFF handles line number or relocation overflow by creating
- another section header with STYP_OVRFLO set. */
-#define STYP_OVRFLO 0x8000
-
-/********************** 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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-
-#define LINENO struct external_lineno
-#define LINESZ sizeof(LINENO)
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
- struct {
- unsigned char x_scnlen[4];
- unsigned char x_parmhash[4];
- unsigned char x_snhash[2];
- unsigned char x_smtyp[1];
- unsigned char x_smclas[1];
- unsigned char x_stab[4];
- unsigned char x_snstab[2];
- } x_csect;
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-#define DBXMASK 0x80 /* for dbx storage mask */
-#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK)
-
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_size[1];
- char r_type[1];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
-#define DEFAULT_DATA_SECTION_ALIGNMENT 4
-#define DEFAULT_BSS_SECTION_ALIGNMENT 4
-#define DEFAULT_TEXT_SECTION_ALIGNMENT 4
-/* For new sections we havn't heard of before */
-#define DEFAULT_SECTION_ALIGNMENT 4
diff --git a/contrib/gdb/include/coff/sh.h b/contrib/gdb/include/coff/sh.h
deleted file mode 100644
index af49674a9ee8..000000000000
--- a/contrib/gdb/include/coff/sh.h
+++ /dev/null
@@ -1,253 +0,0 @@
-/*** coff information for Hitachi SH */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-
-
-#define SH_ARCH_MAGIC_BIG 0x0500
-#define SH_ARCH_MAGIC_LITTLE 0x0550 /* Little endian SH */
-
-
-#define SHBADMAG(x) \
- (((x).f_magic!=SH_ARCH_MAGIC_BIG) && \
- ((x).f_magic!=SH_ARCH_MAGIC_LITTLE))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ (sizeof(AOUTHDR))
-#define AOUTSZ (sizeof(AOUTHDR))
-
-
-
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#define SCNHDR struct external_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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[4]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#define LINENO struct external_lineno
-#define LINESZ sizeof(LINENO)
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the h8 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes */
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
-/* SH relocation types. Not all of these are actually used. */
-
-#define R_SH_UNUSED 0 /* only used internally */
-#define R_SH_PCREL8 3 /* 8 bit pcrel */
-#define R_SH_PCREL16 4 /* 16 bit pcrel */
-#define R_SH_HIGH8 5 /* high 8 bits of 24 bit address */
-#define R_SH_LOW16 7 /* low 16 bits of 24 bit immediate */
-#define R_SH_IMM24 6 /* 24 bit immediate */
-#define R_SH_PCDISP8BY4 9 /* PC rel 8 bits *4 +ve */
-#define R_SH_PCDISP8BY2 10 /* PC rel 8 bits *2 +ve */
-#define R_SH_PCDISP8 11 /* 8 bit branch */
-#define R_SH_PCDISP 12 /* 12 bit branch */
-#define R_SH_IMM32 14 /* 32 bit immediate */
-#define R_SH_IMM8 16 /* 8 bit immediate */
-#define R_SH_IMM8BY2 17 /* 8 bit immediate *2 */
-#define R_SH_IMM8BY4 18 /* 8 bit immediate *4 */
-#define R_SH_IMM4 19 /* 4 bit immediate */
-#define R_SH_IMM4BY2 20 /* 4 bit immediate *2 */
-#define R_SH_IMM4BY4 21 /* 4 bit immediate *4 */
-#define R_SH_PCRELIMM8BY2 22 /* PC rel 8 bits *2 unsigned */
-#define R_SH_PCRELIMM8BY4 23 /* PC rel 8 bits *4 unsigned */
-#define R_SH_IMM16 24 /* 16 bit immediate */
-
-/* The switch table reloc types are used for relaxing. They are
- generated for expressions such as
- .word L1 - L2
- The r_offset field holds the difference between the reloc address
- and L2. */
-#define R_SH_SWITCH16 25 /* 16 bit switch table entry */
-#define R_SH_SWITCH32 26 /* 16 bit switch table entry */
-
-/* The USES reloc type is used for relaxing. The compiler will
- generate .uses pseudo-ops when it finds a function call which it
- can relax. The r_offset field of the USES reloc holds the PC
- relative offset to the instruction which loads the register used in
- the function call. */
-#define R_SH_USES 27 /* .uses pseudo-op */
-
-/* The COUNT reloc type is used for relaxing. The assembler will
- generate COUNT relocs for addresses referred to by the register
- loads associated with USES relocs. The r_offset field of the COUNT
- reloc holds the number of times the address is references in the
- object file. */
-#define R_SH_COUNT 28 /* Count of constant pool uses */
-
-/* The ALIGN reloc type is used for relaxing. The r_offset field is
- the power of two to which subsequent portions of the object file
- must be aligned. */
-#define R_SH_ALIGN 29 /* .align pseudo-op */
-
-
-
diff --git a/contrib/gdb/include/coff/sparc.h b/contrib/gdb/include/coff/sparc.h
deleted file mode 100644
index 0e3217b25f13..000000000000
--- a/contrib/gdb/include/coff/sparc.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*** coff information for Sparc. */
-
-/* This file is an amalgamation of several standard include files that
- define coff format, such as filehdr.h, aouthdr.h, and so forth. In
- addition, all datatypes have been translated into character arrays of
- (presumed) equivalent size. This is necessary so that this file can
- be used with different systems while still yielding the same results. */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr
-{
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-#define F_RELFLG (0x0001) /* relocation info stripped */
-#define F_EXEC (0x0002) /* file is executable */
-#define F_LNNO (0x0004) /* line numbers stripped */
-#define F_LSYMS (0x0008) /* local symbols stripped */
-
-#define SPARCMAGIC (0540)
-
-/* This is Lynx's all-platform magic number for executables. */
-
-#define LYNXCOFFMAGIC (0415)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-#define AOUTSZ (sizeof(AOUTHDR))
-
-#define OMAGIC 0404 /* object files, eg as output */
-#define ZMAGIC 0413 /* demand load format, eg normal ld output */
-#define STMAGIC 0401 /* target shlib */
-#define SHMAGIC 0443 /* host shlib */
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr
-{
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-/* Names of "special" sections. */
-
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _TV ".tv"
-#define _INIT ".init"
-#define _FINI ".fini"
-#define _COMMENT ".comment"
-#define _LIB ".lib"
-
-/********************** 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 external_lineno
-{
- union {
- char l_symndx[4]; /* fn name symbol index, iff l_lnno == 0 */
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-#define LINENO struct external_lineno
-#define LINESZ (6)
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN (8) /* # characters in a symbol name */
-#define E_FILNMLEN (14) /* # characters in a file name */
-#define E_DIMNUM (4) /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
-#if 0 /* of doubtful value */
- char e_nptr[2][4];
- struct {
- char e_leading_zero[1];
- char e_dbx_type[1];
- char e_dbx_desc[2];
- } e_dbx;
-#endif
- } e;
-
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
- char padding[2];
-};
-
-#define N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-union external_auxent
-{
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* .tv section info (in auxent of sym .tv)) */
-
- char x_fill[20]; /* forces to 20-byte size */
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 20
-#define AUXENT union external_auxent
-#define AUXESZ 20
-
-#define _ETEXT "etext"
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
- char r_spare[2];
- char r_offset[4];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ sizeof (RELOC)
-
diff --git a/contrib/gdb/include/coff/sym.h b/contrib/gdb/include/coff/sym.h
deleted file mode 100644
index 76204af59adc..000000000000
--- a/contrib/gdb/include/coff/sym.h
+++ /dev/null
@@ -1,484 +0,0 @@
-/* Declarations of internal format of MIPS ECOFF symbols.
- Originally contributed by MIPS Computer Systems and Third Eye Software.
- Changes contributed by Cygnus Support are in the public domain.
-
- This file is just aggregated with the files that make up the GNU
- release; it is not considered part of GAS, GDB, or other GNU
- programs. */
-
-/*
- * |-----------------------------------------------------------|
- * | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.|
- * | MIPS Computer Systems, Inc. grants reproduction and use |
- * | rights to all parties, PROVIDED that this comment is |
- * | maintained in the copy. |
- * |-----------------------------------------------------------|
- */
-#ifndef _SYM_H
-#define _SYM_H
-
-/* (C) Copyright 1984 by Third Eye Software, Inc.
- *
- * Third Eye Software, Inc. grants reproduction and use rights to
- * all parties, PROVIDED that this comment is maintained in the copy.
- *
- * Third Eye makes no claims about the applicability of this
- * symbol table to a particular use.
- */
-
-/*
- * This file contains the definition of the Third Eye Symbol Table.
- *
- * Symbols are assumed to be in 'encounter order' - i.e. the order that
- * the things they represent were encountered by the compiler/assembler/loader.
- * EXCEPT for globals! These are assumed to be bunched together,
- * probably right after the last 'normal' symbol. Globals ARE sorted
- * in ascending order.
- *
- * -----------------------------------------------------------------------
- * A brief word about Third Eye naming/use conventions:
- *
- * All arrays and index's are 0 based.
- * All "ifooMax" values are the highest legal value PLUS ONE. This makes
- * them good for allocating arrays, etc. All checks are "ifoo < ifooMax".
- *
- * "isym" Index into the SYMbol table.
- * "ipd" Index into the Procedure Descriptor array.
- * "ifd" Index into the File Descriptor array.
- * "iss" Index into String Space.
- * "cb" Count of Bytes.
- * "rgPd" array whose domain is "0..ipdMax-1" and RanGe is PDR.
- * "rgFd" array whose domain is "0..ifdMax-1" and RanGe is FDR.
- */
-
-
-/*
- * Symbolic Header (HDR) structure.
- * As long as all the pointers are set correctly,
- * we don't care WHAT order the various sections come out in!
- *
- * A file produced solely for the use of CDB will probably NOT have
- * any instructions or data areas in it, as these are available
- * in the original.
- */
-
-typedef struct {
- short magic; /* to verify validity of the table */
- short vstamp; /* version stamp */
- long ilineMax; /* number of line number entries */
- bfd_vma cbLine; /* number of bytes for line number entries */
- bfd_vma cbLineOffset; /* offset to start of line number entries*/
- long idnMax; /* max index into dense number table */
- bfd_vma cbDnOffset; /* offset to start dense number table */
- long ipdMax; /* number of procedures */
- bfd_vma cbPdOffset; /* offset to procedure descriptor table */
- long isymMax; /* number of local symbols */
- bfd_vma cbSymOffset; /* offset to start of local symbols*/
- long ioptMax; /* max index into optimization symbol entries */
- bfd_vma cbOptOffset; /* offset to optimization symbol entries */
- long iauxMax; /* number of auxillary symbol entries */
- bfd_vma cbAuxOffset; /* offset to start of auxillary symbol entries*/
- long issMax; /* max index into local strings */
- bfd_vma cbSsOffset; /* offset to start of local strings */
- long issExtMax; /* max index into external strings */
- bfd_vma cbSsExtOffset; /* offset to start of external strings */
- long ifdMax; /* number of file descriptor entries */
- bfd_vma cbFdOffset; /* offset to file descriptor table */
- long crfd; /* number of relative file descriptor entries */
- bfd_vma cbRfdOffset; /* offset to relative file descriptor table */
- long iextMax; /* max index into external symbols */
- bfd_vma cbExtOffset; /* offset to start of external symbol entries*/
- /* If you add machine dependent fields, add them here */
- } HDRR, *pHDRR;
-#define cbHDRR sizeof(HDRR)
-#define hdrNil ((pHDRR)0)
-
-/*
- * The FDR and PDR structures speed mapping of address <-> name.
- * They are sorted in ascending memory order and are kept in
- * memory by CDB at runtime.
- */
-
-/*
- * File Descriptor
- *
- * There is one of these for EVERY FILE, whether compiled with
- * full debugging symbols or not. The name of a file should be
- * the path name given to the compiler. This allows the user
- * to simply specify the names of the directories where the COMPILES
- * were done, and we will be able to find their files.
- * A field whose comment starts with "R - " indicates that it will be
- * setup at runtime.
- */
-typedef struct fdr {
- bfd_vma adr; /* memory address of beginning of file */
- long rss; /* file name (of source, if known) */
- long issBase; /* file's string space */
- bfd_vma cbSs; /* number of bytes in the ss */
- long isymBase; /* beginning of symbols */
- long csym; /* count file's of symbols */
- long ilineBase; /* file's line symbols */
- long cline; /* count of file's line symbols */
- long ioptBase; /* file's optimization entries */
- long copt; /* count of file's optimization entries */
- unsigned short ipdFirst;/* start of procedures for this file */
- short cpd; /* count of procedures for this file */
- long iauxBase; /* file's auxiliary entries */
- long caux; /* count of file's auxiliary entries */
- long rfdBase; /* index into the file indirect table */
- long crfd; /* count file indirect entries */
- unsigned lang: 5; /* language for this file */
- unsigned fMerge : 1; /* whether this file can be merged */
- unsigned fReadin : 1; /* true if it was read in (not just created) */
- unsigned fBigendian : 1;/* if set, was compiled on big endian machine */
- /* aux's will be in compile host's sex */
- unsigned glevel : 2; /* level this file was compiled with */
- unsigned reserved : 22; /* reserved for future use */
- bfd_vma cbLineOffset; /* byte offset from header for this file ln's */
- bfd_vma cbLine; /* size of lines for this file */
- } FDR, *pFDR;
-#define cbFDR sizeof(FDR)
-#define fdNil ((pFDR)0)
-#define ifdNil -1
-#define ifdTemp 0
-#define ilnNil -1
-
-
-/*
- * Procedure Descriptor
- *
- * There is one of these for EVERY TEXT LABEL.
- * If a procedure is in a file with full symbols, then isym
- * will point to the PROC symbols, else it will point to the
- * global symbol for the label.
- */
-
-typedef struct pdr {
- bfd_vma adr; /* memory address of start of procedure */
- long isym; /* start of local symbol entries */
- long iline; /* start of line number entries*/
- long regmask; /* save register mask */
- long regoffset; /* save register offset */
- long iopt; /* start of optimization symbol entries*/
- long fregmask; /* save floating point register mask */
- long fregoffset; /* save floating point register offset */
- long frameoffset; /* frame size */
- short framereg; /* frame pointer register */
- short pcreg; /* offset or reg of return pc */
- long lnLow; /* lowest line in the procedure */
- long lnHigh; /* highest line in the procedure */
- bfd_vma cbLineOffset; /* byte offset for this procedure from the fd base */
- /* These fields are new for 64 bit ECOFF. */
- unsigned gp_prologue : 8; /* byte size of GP prologue */
- unsigned gp_used : 1; /* true if the procedure uses GP */
- unsigned reg_frame : 1; /* true if register frame procedure */
- unsigned prof : 1; /* true if compiled with -pg */
- unsigned reserved : 13; /* reserved: must be zero */
- unsigned localoff : 8; /* offset of local variables from vfp */
- } PDR, *pPDR;
-#define cbPDR sizeof(PDR)
-#define pdNil ((pPDR) 0)
-#define ipdNil -1
-
-/*
- * The structure of the runtime procedure descriptor created by the loader
- * for use by the static exception system.
- */
-/*
- * If 0'd out because exception_info chokes Visual C++ and because there
- * don't seem to be any references to this structure elsewhere in gdb.
- */
-#if 0
-typedef struct runtime_pdr {
- bfd_vma adr; /* memory address of start of procedure */
- long regmask; /* save register mask */
- long regoffset; /* save register offset */
- long fregmask; /* save floating point register mask */
- long fregoffset; /* save floating point register offset */
- long frameoffset; /* frame size */
- short framereg; /* frame pointer register */
- short pcreg; /* offset or reg of return pc */
- long irpss; /* index into the runtime string table */
- long reserved;
- struct exception_info *exception_info;/* pointer to exception array */
-} RPDR, *pRPDR;
-#define cbRPDR sizeof(RPDR)
-#define rpdNil ((pRPDR) 0)
-#endif
-
-/*
- * Line Numbers
- *
- * Line Numbers are segregated from the normal symbols because they
- * are [1] smaller , [2] are of no interest to your
- * average loader, and [3] are never needed in the middle of normal
- * scanning and therefore slow things down.
- *
- * By definition, the first LINER for any given procedure will have
- * the first line of a procedure and represent the first address.
- */
-
-typedef long LINER, *pLINER;
-#define lineNil ((pLINER)0)
-#define cbLINER sizeof(LINER)
-#define ilineNil -1
-
-
-
-/*
- * The Symbol Structure (GFW, to those who Know!)
- */
-
-typedef struct {
- long iss; /* index into String Space of name */
- bfd_vma value; /* value of symbol */
- unsigned st : 6; /* symbol type */
- unsigned sc : 5; /* storage class - text, data, etc */
- unsigned reserved : 1; /* reserved */
- unsigned index : 20; /* index into sym/aux table */
- } SYMR, *pSYMR;
-#define symNil ((pSYMR)0)
-#define cbSYMR sizeof(SYMR)
-#define isymNil -1
-#define indexNil 0xfffff
-#define issNil -1
-#define issNull 0
-
-
-/* The following converts a memory resident string to an iss.
- * This hack is recognized in SbFIss, in sym.c of the debugger.
- */
-#define IssFSb(sb) (0x80000000 | ((unsigned long)(sb)))
-
-/* E X T E R N A L S Y M B O L R E C O R D
- *
- * Same as the SYMR except it contains file context to determine where
- * the index is.
- */
-typedef struct ecoff_extr {
- unsigned jmptbl:1; /* symbol is a jump table entry for shlibs */
- unsigned cobol_main:1; /* symbol is a cobol main procedure */
- unsigned weakext:1; /* symbol is weak external */
- unsigned reserved:13; /* reserved for future use */
- int ifd; /* where the iss and index fields point into */
- SYMR asym; /* symbol for the external */
- } EXTR, *pEXTR;
-#define extNil ((pEXTR)0)
-#define cbEXTR sizeof(EXTR)
-
-
-/* A U X I L L A R Y T Y P E I N F O R M A T I O N */
-
-/*
- * Type Information Record
- */
-typedef struct {
- unsigned fBitfield : 1; /* set if bit width is specified */
- unsigned continued : 1; /* indicates additional TQ info in next AUX */
- unsigned bt : 6; /* basic type */
- unsigned tq4 : 4;
- unsigned tq5 : 4;
- /* ---- 16 bit boundary ---- */
- unsigned tq0 : 4;
- unsigned tq1 : 4; /* 6 type qualifiers - tqPtr, etc. */
- unsigned tq2 : 4;
- unsigned tq3 : 4;
- } TIR, *pTIR;
-#define cbTIR sizeof(TIR)
-#define tiNil ((pTIR)0)
-#define itqMax 6
-
-/*
- * Relative symbol record
- *
- * If the rfd field is 4095, the index field indexes into the global symbol
- * table.
- */
-
-typedef struct {
- unsigned rfd : 12; /* index into the file indirect table */
- unsigned index : 20; /* index int sym/aux/iss tables */
- } RNDXR, *pRNDXR;
-#define cbRNDXR sizeof(RNDXR)
-#define rndxNil ((pRNDXR)0)
-
-/* dense numbers or sometimes called block numbers are stored in this type,
- * a rfd of 0xffffffff is an index into the global table.
- */
-typedef struct {
- unsigned long rfd; /* index into the file table */
- unsigned long index; /* index int sym/aux/iss tables */
- } DNR, *pDNR;
-#define cbDNR sizeof(DNR)
-#define dnNil ((pDNR)0)
-
-
-
-/*
- * Auxillary information occurs only if needed.
- * It ALWAYS occurs in this order when present.
-
- isymMac used by stProc only
- TIR type info
- TIR additional TQ info (if first TIR was not enough)
- rndx if (bt == btStruct,btUnion,btEnum,btSet,btRange,
- btTypedef):
- rsym.index == iaux for btSet or btRange
- else rsym.index == isym
- dimLow btRange, btSet
- dimMac btRange, btSet
- rndx0 As many as there are tq arrays
- dimLow0
- dimHigh0
- ...
- rndxMax-1
- dimLowMax-1
- dimHighMax-1
- width in bits if (bit field), width in bits.
- */
-#define cAuxMax (6 + (idimMax*3))
-
-/* a union of all possible info in the AUX universe */
-typedef union {
- TIR ti; /* type information record */
- RNDXR rndx; /* relative index into symbol table */
- long dnLow; /* low dimension */
- long dnHigh; /* high dimension */
- long isym; /* symbol table index (end of proc) */
- long iss; /* index into string space (not used) */
- long width; /* width for non-default sized struc fields */
- long count; /* count of ranges for variant arm */
- } AUXU, *pAUXU;
-#define cbAUXU sizeof(AUXU)
-#define auxNil ((pAUXU)0)
-#define iauxNil -1
-
-
-/*
- * Optimization symbols
- *
- * Optimization symbols contain some overlap information with the normal
- * symbol table. In particular, the proc information
- * is somewhat redundant but necessary to easily find the other information
- * present.
- *
- * All of the offsets are relative to the beginning of the last otProc
- */
-
-typedef struct {
- unsigned ot: 8; /* optimization type */
- unsigned value: 24; /* address where we are moving it to */
- RNDXR rndx; /* points to a symbol or opt entry */
- unsigned long offset; /* relative offset this occured */
- } OPTR, *pOPTR;
-#define optNil ((pOPTR) 0)
-#define cbOPTR sizeof(OPTR)
-#define ioptNil -1
-
-/*
- * File Indirect
- *
- * When a symbol is referenced across files the following procedure is used:
- * 1) use the file index to get the File indirect entry.
- * 2) use the file indirect entry to get the File descriptor.
- * 3) add the sym index to the base of that file's sym table
- *
- */
-
-typedef long RFDT, *pRFDT;
-#define cbRFDT sizeof(RFDT)
-#define rfdNil -1
-
-/*
- * The file indirect table in the mips loader is known as an array of FITs.
- * This is done to keep the code in the loader readable in the area where
- * these tables are merged. Note this is only a name change.
- */
-typedef long FIT, *pFIT;
-#define cbFIT sizeof(FIT)
-#define ifiNil -1
-#define fiNil ((pFIT) 0)
-
-#ifdef _LANGUAGE_PASCAL
-#define ifdNil -1
-#define ilnNil -1
-#define ipdNil -1
-#define ilineNil -1
-#define isymNil -1
-#define indexNil 16#fffff
-#define issNil -1
-#define issNull 0
-#define itqMax 6
-#define iauxNil -1
-#define ioptNil -1
-#define rfdNil -1
-#define ifiNil -1
-#endif /* _LANGUAGE_PASCAL */
-
-
-/* Dense numbers
- *
- * Rather than use file index, symbol index pairs to represent symbols
- * and globals, we use dense number so that they can be easily embeded
- * in intermediate code and the programs that process them can
- * use direct access tabls instead of hash table (which would be
- * necesary otherwise because of the sparse name space caused by
- * file index, symbol index pairs. Dense number are represented
- * by RNDXRs.
- */
-
-/*
- * The following table defines the meaning of each SYM field as
- * a function of the "st". (scD/B == scData OR scBss)
- *
- * Note: the value "isymMac" is used by symbols that have the concept
- * of enclosing a block of related information. This value is the
- * isym of the first symbol AFTER the end associated with the primary
- * symbol. For example if a procedure was at isym==90 and had an
- * isymMac==155, the associated end would be at isym==154, and the
- * symbol at 155 would probably (although not necessarily) be the
- * symbol for the next procedure. This allows rapid skipping over
- * internal information of various sorts. "stEnd"s ALWAYS have the
- * isym of the primary symbol that started the block.
- *
-
-ST SC VALUE INDEX
--------- ------ -------- ------
-stFile scText address isymMac
-stLabel scText address ---
-stGlobal scD/B address iaux
-stStatic scD/B address iaux
-stParam scAbs offset iaux
-stLocal scAbs offset iaux
-stProc scText address iaux (isymMac is first AUX)
-stStaticProc scText address iaux (isymMac is first AUX)
-
-stMember scNil ordinal --- (if member of enum)
- (mipsread thinks the case below has a bit, not byte, offset.)
-stMember scNil byte offset iaux (if member of struct/union)
-stMember scBits bit offset iaux (bit field spec)
-
-stBlock scText address isymMac (text block)
- (the code seems to think that rather than scNil, we see scInfo for
- the two cases below.)
-stBlock scNil cb isymMac (struct/union member define)
-stBlock scNil cMembers isymMac (enum member define)
-
- (New types added by SGI to simplify things:)
-stStruct scInfo cb isymMac (struct type define)
-stUnion scInfo cb isymMac (union type define)
-stEnum scInfo cMembers isymMac (enum type define)
-
-stEnd scText address isymStart
-stEnd scNil ------- isymStart (struct/union/enum)
-
-stTypedef scNil ------- iaux
-stRegReloc sc??? value old register number
-stForward sc??? new address isym to original symbol
-
-stConstant scInfo value --- (scalar)
-stConstant scInfo iss --- (complex, e.g. string)
-
- *
- */
-#endif
diff --git a/contrib/gdb/include/coff/symconst.h b/contrib/gdb/include/coff/symconst.h
deleted file mode 100644
index f40eef2a3115..000000000000
--- a/contrib/gdb/include/coff/symconst.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/* Declarations of constants for internal format of MIPS ECOFF symbols.
- Originally contributed by MIPS Computer Systems and Third Eye Software.
- Changes contributed by Cygnus Support are in the public domain.
-
- This file is just aggregated with the files that make up the GNU
- release; it is not considered part of GAS, GDB, or other GNU
- programs. */
-
-/*
- * |-----------------------------------------------------------|
- * | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.|
- * | MIPS Computer Systems, Inc. grants reproduction and use |
- * | rights to all parties, PROVIDED that this comment is |
- * | maintained in the copy. |
- * |-----------------------------------------------------------|
- */
-
-/* (C) Copyright 1984 by Third Eye Software, Inc.
- *
- * Third Eye Software, Inc. grants reproduction and use rights to
- * all parties, PROVIDED that this comment is maintained in the copy.
- *
- * Third Eye makes no claims about the applicability of this
- * symbol table to a particular use.
- */
-
-/* glevels for field in FDR */
-#define GLEVEL_0 2
-#define GLEVEL_1 1
-#define GLEVEL_2 0 /* for upward compat reasons. */
-#define GLEVEL_3 3
-
-/* magic number fo symheader */
-#define magicSym 0x7009
-/* The Alpha uses this value instead, for some reason. */
-#define magicSym2 0x1992
-
-/* Language codes */
-#define langC 0
-#define langPascal 1
-#define langFortran 2
-#define langAssembler 3 /* one Assembley inst might map to many mach */
-#define langMachine 4
-#define langNil 5
-#define langAda 6
-#define langPl1 7
-#define langCobol 8
-#define langStdc 9 /* FIXME: Collides with SGI langCplusplus */
-#define langCplusplus 9 /* FIXME: Collides with langStdc */
-#define langCplusplusV2 10 /* SGI addition */
-#define langMax 11 /* maximun allowed 32 -- 5 bits */
-
-/* The following are value definitions for the fields in the SYMR */
-
-/*
- * Storage Classes
- */
-
-#define scNil 0
-#define scText 1 /* text symbol */
-#define scData 2 /* initialized data symbol */
-#define scBss 3 /* un-initialized data symbol */
-#define scRegister 4 /* value of symbol is register number */
-#define scAbs 5 /* value of symbol is absolute */
-#define scUndefined 6 /* who knows? */
-#define scCdbLocal 7 /* variable's value is IN se->va.?? */
-#define scBits 8 /* this is a bit field */
-#define scCdbSystem 9 /* variable's value is IN CDB's address space */
-#define scDbx 9 /* overlap dbx internal use */
-#define scRegImage 10 /* register value saved on stack */
-#define scInfo 11 /* symbol contains debugger information */
-#define scUserStruct 12 /* address in struct user for current process */
-#define scSData 13 /* load time only small data */
-#define scSBss 14 /* load time only small common */
-#define scRData 15 /* load time only read only data */
-#define scVar 16 /* Var parameter (fortran,pascal) */
-#define scCommon 17 /* common variable */
-#define scSCommon 18 /* small common */
-#define scVarRegister 19 /* Var parameter in a register */
-#define scVariant 20 /* Variant record */
-#define scSUndefined 21 /* small undefined(external) data */
-#define scInit 22 /* .init section symbol */
-#define scBasedVar 23 /* Fortran or PL/1 ptr based var */
-#define scXData 24 /* exception handling data */
-#define scPData 25 /* Procedure section */
-#define scFini 26 /* .fini section */
-#define scRConst 27 /* .rconst section */
-#define scMax 32
-
-
-/*
- * Symbol Types
- */
-
-#define stNil 0 /* Nuthin' special */
-#define stGlobal 1 /* external symbol */
-#define stStatic 2 /* static */
-#define stParam 3 /* procedure argument */
-#define stLocal 4 /* local variable */
-#define stLabel 5 /* label */
-#define stProc 6 /* " " Procedure */
-#define stBlock 7 /* beginnning of block */
-#define stEnd 8 /* end (of anything) */
-#define stMember 9 /* member (of anything - struct/union/enum */
-#define stTypedef 10 /* type definition */
-#define stFile 11 /* file name */
-#define stRegReloc 12 /* register relocation */
-#define stForward 13 /* forwarding address */
-#define stStaticProc 14 /* load time only static procs */
-#define stConstant 15 /* const */
-#define stStaParam 16 /* Fortran static parameters */
- /* These new symbol types have been recently added to SGI machines. */
-#define stStruct 26 /* Beginning of block defining a struct type */
-#define stUnion 27 /* Beginning of block defining a union type */
-#define stEnum 28 /* Beginning of block defining an enum type */
-#define stIndirect 34 /* Indirect type specification */
- /* Pseudo-symbols - internal to debugger */
-#define stStr 60 /* string */
-#define stNumber 61 /* pure number (ie. 4 NOR 2+2) */
-#define stExpr 62 /* 2+2 vs. 4 */
-#define stType 63 /* post-coersion SER */
-#define stMax 64
-
-/* definitions for fields in TIR */
-
-/* type qualifiers for ti.tq0 -> ti.(itqMax-1) */
-#define tqNil 0 /* bt is what you see */
-#define tqPtr 1 /* pointer */
-#define tqProc 2 /* procedure */
-#define tqArray 3 /* duh */
-#define tqFar 4 /* longer addressing - 8086/8 land */
-#define tqVol 5 /* volatile */
-#define tqConst 6 /* const */
-#define tqMax 8
-
-/* basic types as seen in ti.bt */
-#define btNil 0 /* undefined (also, enum members) */
-#define btAdr 1 /* address - integer same size as pointer */
-#define btChar 2 /* character */
-#define btUChar 3 /* unsigned character */
-#define btShort 4 /* short */
-#define btUShort 5 /* unsigned short */
-#define btInt 6 /* int */
-#define btUInt 7 /* unsigned int */
-#define btLong 8 /* long */
-#define btULong 9 /* unsigned long */
-#define btFloat 10 /* float (real) */
-#define btDouble 11 /* Double (real) */
-#define btStruct 12 /* Structure (Record) */
-#define btUnion 13 /* Union (variant) */
-#define btEnum 14 /* Enumerated */
-#define btTypedef 15 /* defined via a typedef, isymRef points */
-#define btRange 16 /* subrange of int */
-#define btSet 17 /* pascal sets */
-#define btComplex 18 /* fortran complex */
-#define btDComplex 19 /* fortran double complex */
-#define btIndirect 20 /* forward or unnamed typedef */
-#define btFixedDec 21 /* Fixed Decimal */
-#define btFloatDec 22 /* Float Decimal */
-#define btString 23 /* Varying Length Character String */
-#define btBit 24 /* Aligned Bit String */
-#define btPicture 25 /* Picture */
-#define btVoid 26 /* void */
-#define btLongLong 27 /* long long */
-#define btULongLong 28 /* unsigned long long */
-#define btMax 64
-
-#if (_MFG == _MIPS)
-/* optimization type codes */
-#define otNil 0
-#define otReg 1 /* move var to reg */
-#define otBlock 2 /* begin basic block */
-#define otProc 3 /* procedure */
-#define otInline 4 /* inline procedure */
-#define otEnd 5 /* whatever you started */
-#define otMax 6 /* KEEP UP TO DATE */
-#endif /* (_MFG == _MIPS) */
diff --git a/contrib/gdb/include/coff/w65.h b/contrib/gdb/include/coff/w65.h
deleted file mode 100644
index c80b9fee5de0..000000000000
--- a/contrib/gdb/include/coff/w65.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*** coff information for WDC 65816 */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-
-
-#define W65MAGIC 0x6500
-
-
-#define W65BADMAG(x) (((x).f_magic!=W65MAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ (sizeof(AOUTHDR))
-#define AOUTSZ (sizeof(AOUTHDR))
-
-
-
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#define SCNHDR struct external_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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[4]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#define LINENO struct external_lineno
-#define LINESZ sizeof(LINENO)
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the w65 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes */
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
-
-
-
diff --git a/contrib/gdb/include/coff/we32k.h b/contrib/gdb/include/coff/we32k.h
deleted file mode 100644
index 414c4506e0b0..000000000000
--- a/contrib/gdb/include/coff/we32k.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*** coff information for we32k */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-
-/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved external references)
- * F_LNNO line numbers 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 (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-#define F_BM32B (0020000)
-#define F_BM32MAU (0040000)
-
-#define WE32KMAGIC 0x170 /* we32k sans transfer vector */
-#define FBOMAGIC 0x170 /* we32k sans transfer vector */
-#define MTVMAGIC 0x171 /* we32k with transfer vector */
-#define RBOMAGIC 0x172 /* reserved */
-#define WE32KBADMAG(x) (((x).f_magic != WE32KMAGIC) \
- && ((x).f_magic != FBOMAGIC) \
- && ((x).f_magic != RBOMAGIC) \
- && ((x).f_magic != MTVMAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-#define AOUTSZ (sizeof(AOUTHDR))
-
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ sizeof(SCNHDR)
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _TV ".tv"
-#define _INIT ".init"
-#define _FINI ".fini"
-
-/********************** 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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-
-#define LINENO struct external_lineno
-#define LINESZ sizeof(LINENO)
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-#define N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-# define _ETEXT "etext"
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ sizeof(RELOC)
-
diff --git a/contrib/gdb/include/coff/z8k.h b/contrib/gdb/include/coff/z8k.h
deleted file mode 100644
index 48817952829f..000000000000
--- a/contrib/gdb/include/coff/z8k.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*** coff information for Zilog Z800N */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-
-/* Type of cpu is stored in flags */
-#define F_Z8001 0x1000
-#define F_Z8002 0x2000
-#define F_MACHMASK 0xf000
-
-#define Z8KMAGIC 0x8000
-
-#define Z8KBADMAG(x) (((x).f_magic!=Z8KMAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ sizeof(FILHDR)
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ (sizeof(AOUTHDR))
-#define AOUTSZ (sizeof(AOUTHDR))
-
-
-
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#define SCNHDR struct external_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 external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[4]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#define LINENO struct external_lineno
-#define LINESZ sizeof(LINENO)
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the z8k don't have room in the instruction for the entire
- offset - eg with segments */
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
diff --git a/contrib/gdb/include/demangle.h b/contrib/gdb/include/demangle.h
deleted file mode 100644
index d4d0a3f428e3..000000000000
--- a/contrib/gdb/include/demangle.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Defs for interface to demanglers.
- Copyright 1992, 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, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public 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 (DEMANGLE_H)
-#define DEMANGLE_H
-
-#ifdef IN_GCC
-
-/* Add prototype support. */
-#ifndef PROTO
-#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
-#define PROTO(ARGS) ARGS
-#else
-#define PROTO(ARGS) ()
-#endif
-#endif
-
-#define PARAMS(ARGS) PROTO(ARGS)
-
-#ifdef __STDC__
-#define PTR void *
-#else
-#ifndef const
-#define const
-#endif
-#define PTR char *
-#endif
-
-#else /* ! IN_GCC */
-#include <ansidecl.h>
-#endif /* IN_GCC */
-
-/* Options passed to cplus_demangle (in 2nd parameter). */
-
-#define DMGL_NO_OPTS 0 /* For readability... */
-#define DMGL_PARAMS (1 << 0) /* Include function args */
-#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
-
-#define DMGL_AUTO (1 << 8)
-#define DMGL_GNU (1 << 9)
-#define DMGL_LUCID (1 << 10)
-#define DMGL_ARM (1 << 11)
-/* If none of these are set, use 'current_demangling_style' as the default. */
-#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM)
-
-/* Enumeration of possible demangling styles.
-
- Lucid and ARM styles are still kept logically distinct, even though
- they now both behave identically. The resulting style is actual the
- union of both. I.E. either style recognizes both "__pt__" and "__rf__"
- for operator "->", even though the first is lucid style and the second
- is ARM style. (FIXME?) */
-
-extern enum demangling_styles
-{
- unknown_demangling = 0,
- auto_demangling = DMGL_AUTO,
- gnu_demangling = DMGL_GNU,
- lucid_demangling = DMGL_LUCID,
- arm_demangling = DMGL_ARM
-} current_demangling_style;
-
-/* Define string names for the various demangling styles. */
-
-#define AUTO_DEMANGLING_STYLE_STRING "auto"
-#define GNU_DEMANGLING_STYLE_STRING "gnu"
-#define LUCID_DEMANGLING_STYLE_STRING "lucid"
-#define ARM_DEMANGLING_STYLE_STRING "arm"
-
-/* Some macros to test what demangling style is active. */
-
-#define CURRENT_DEMANGLING_STYLE current_demangling_style
-#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
-#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
-#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
-#define ARM_DEMANGLING (CURRENT_DEMANGLING_STYLE & DMGL_ARM)
-
-extern char *
-cplus_demangle PARAMS ((const char *mangled, int options));
-
-extern int
-cplus_demangle_opname PARAMS ((const char *opname, char *result, int options));
-
-extern const char *
-cplus_mangle_opname PARAMS ((const char *opname, int options));
-
-/* Note: This sets global state. FIXME if you care about multi-threading. */
-
-extern void
-set_cplus_marker_for_demangling PARAMS ((int ch));
-
-#endif /* DEMANGLE_H */
diff --git a/contrib/gdb/include/dis-asm.h b/contrib/gdb/include/dis-asm.h
deleted file mode 100644
index d70bd514e9cd..000000000000
--- a/contrib/gdb/include/dis-asm.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* Interface between the opcode library and its callers.
- Written by Cygnus Support, 1993.
-
- The opcode library (libopcodes.a) provides instruction decoders for
- a large variety of instruction sets, callable with an identical
- interface, for making instruction-processing programs more independent
- of the instruction set being processed. */
-
-#ifndef DIS_ASM_H
-#define DIS_ASM_H
-
-#include <stdio.h>
-#include "bfd.h"
-
-typedef int (*fprintf_ftype) PARAMS((FILE*, const char*, ...));
-
-enum dis_insn_type {
- dis_noninsn, /* Not a valid instruction */
- dis_nonbranch, /* Not a branch instruction */
- dis_branch, /* Unconditional branch */
- dis_condbranch, /* Conditional branch */
- dis_jsr, /* Jump to subroutine */
- dis_condjsr, /* Conditional jump to subroutine */
- dis_dref, /* Data reference instruction */
- dis_dref2 /* Two data references in instruction */
-};
-
-/* This struct is passed into the instruction decoding routine,
- and is passed back out into each callback. The various fields are used
- for conveying information from your main routine into your callbacks,
- for passing information into the instruction decoders (such as the
- addresses of the callback functions), or for passing information
- back from the instruction decoders to their callers.
-
- It must be initialized before it is first passed; this can be done
- by hand, or using one of the initialization macros below. */
-
-typedef struct disassemble_info {
- fprintf_ftype fprintf_func;
- FILE *stream;
- PTR application_data;
-
- /* Target description. We could replace this with a pointer to the bfd,
- but that would require one. There currently isn't any such requirement
- so to avoid introducing one we record these explicitly. */
- /* The bfd_arch value. */
- enum bfd_architecture arch;
- /* The bfd_mach value. */
- unsigned long mach;
- /* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */
- enum bfd_endian endian;
-
- /* For use by the disassembler.
- The top 16 bits are reserved for public use (and are documented here).
- The bottom 16 bits are for the internal use of the disassembler. */
- unsigned long flags;
- PTR private_data;
-
- /* Function used to get bytes to disassemble. MEMADDR is the
- address of the stuff to be disassembled, MYADDR is the address to
- put the bytes in, and LENGTH is the number of bytes to read.
- INFO is a pointer to this struct.
- Returns an errno value or 0 for success. */
- int (*read_memory_func)
- PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, int length,
- struct disassemble_info *info));
-
- /* Function which should be called if we get an error that we can't
- recover from. STATUS is the errno value from read_memory_func and
- MEMADDR is the address that we were trying to read. INFO is a
- pointer to this struct. */
- void (*memory_error_func)
- PARAMS ((int status, bfd_vma memaddr, struct disassemble_info *info));
-
- /* Function called to print ADDR. */
- void (*print_address_func)
- PARAMS ((bfd_vma addr, struct disassemble_info *info));
-
- /* These are for buffer_read_memory. */
- bfd_byte *buffer;
- bfd_vma buffer_vma;
- int buffer_length;
-
- /* Results from instruction decoders. Not all decoders yet support
- this information. This info is set each time an instruction is
- decoded, and is only valid for the last such instruction.
-
- To determine whether this decoder supports this information, set
- insn_info_valid to 0, decode an instruction, then check it. */
-
- char insn_info_valid; /* Branch info has been set. */
- char branch_delay_insns; /* How many sequential insn's will run before
- a branch takes effect. (0 = normal) */
- char data_size; /* Size of data reference in insn, in bytes */
- enum dis_insn_type insn_type; /* Type of instruction */
- bfd_vma target; /* Target address of branch or dref, if known;
- zero if unknown. */
- bfd_vma target2; /* Second target address for dref2 */
-
-} disassemble_info;
-
-
-/* Standard disassemblers. Disassemble one instruction at the given
- target address. Return number of bytes processed. */
-typedef int (*disassembler_ftype)
- PARAMS((bfd_vma, disassemble_info *));
-
-extern int print_insn_big_mips PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_mips PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i386 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m68k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_z8001 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_z8002 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8300 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8300h PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8500 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_alpha PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_big_arm PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_arm PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_sparc PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_sparc64 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_big_a29k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_a29k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i960 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_shl PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_hppa PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m88k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_ns32k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_big_powerpc PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_powerpc PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_rs6000 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
-
-/* Fetch the disassembler for a given BFD, if that support is available. */
-extern disassembler_ftype disassembler PARAMS ((bfd *));
-
-
-/* This block of definitions is for particular callers who read instructions
- into a buffer before calling the instruction decoder. */
-
-/* Here is a function which callers may wish to use for read_memory_func.
- It gets bytes from a buffer. */
-extern int buffer_read_memory
- PARAMS ((bfd_vma, bfd_byte *, int, struct disassemble_info *));
-
-/* This function goes with buffer_read_memory.
- It prints a message using info->fprintf_func and info->stream. */
-extern void perror_memory PARAMS ((int, bfd_vma, struct disassemble_info *));
-
-
-/* Just print the address in hex. This is included for completeness even
- though both GDB and objdump provide their own (to print symbolic
- addresses). */
-extern void generic_print_address
- PARAMS ((bfd_vma, struct disassemble_info *));
-
-/* Macro to initialize a disassemble_info struct. This should be called
- by all applications creating such a struct. */
-#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
- (INFO).fprintf_func = (FPRINTF_FUNC), \
- (INFO).stream = (STREAM), \
- (INFO).buffer = NULL, \
- (INFO).buffer_vma = 0, \
- (INFO).buffer_length = 0, \
- (INFO).read_memory_func = buffer_read_memory, \
- (INFO).memory_error_func = perror_memory, \
- (INFO).print_address_func = generic_print_address, \
- (INFO).arch = bfd_arch_unknown, \
- (INFO).mach = 0, \
- (INFO).endian = BFD_ENDIAN_UNKNOWN, \
- (INFO).flags = 0, \
- (INFO).insn_info_valid = 0
-
-#endif /* ! defined (DIS_ASM_H) */
diff --git a/contrib/gdb/include/elf/ChangeLog b/contrib/gdb/include/elf/ChangeLog
deleted file mode 100644
index b56f9bb1d8dd..000000000000
--- a/contrib/gdb/include/elf/ChangeLog
+++ /dev/null
@@ -1,195 +0,0 @@
-Mon Feb 19 01:55:56 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (R_SPARC_{PLT32,HIPLT22,LOPLT10,PCPLT32,PCPLT22,
- PCPLT10,5,6}): Don't define ifdef SPARC64_OLD_RELOCS.
-
-Tue Feb 6 11:33:58 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (enum sparc_elf_reloc_type): Define.
-
-Wed Jan 17 09:09:16 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * common.h: Define EM_SPARC32PLUS.
- * sparc.h: New file.
-
-Thu Jan 11 16:27:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc.h (SHF_EXCLUDE, SHT_ORDERED): New fields from the abi.
-
-Thu Nov 30 16:47:18 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (struct elf_segment_map): Add includes_filehdr and
- includes_phdrs fields.
-
-Tue Nov 28 16:58:10 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (struct elf_segment_map): Define.
-
-Tue Oct 31 15:19:36 1995 Fred Fish <fnf@cygnus.com>
-
- * common.h, dwarf.h, external.h, hppa.h, internal.h,
- mips.h, ppc.h: Protect against multiple inclusions.
-
-Thu Sep 21 13:51:58 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc.h (EF_PPC_RELOCATABLE_LIB): Add new flag bit.
-
-Fri Sep 1 15:32:17 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
-
- * mips.h: Add some definitions used on Irix 5.
-
-Tue Jun 20 10:18:28 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa.h (CPU_PA_RISC1_0): Protect from redefinitions.
- (CPU_PA_RISC1_1): Likewise.
-
-Wed Mar 8 18:14:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc.h: New file for PowerPC support.
-
-Tue Feb 14 13:59:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * common.h (EM_PPC): Use offical value of 20, not 17.
- (EM_PPC_OLD): Define this to be the old value of EM_PPC.
-
-
-Tue Jan 24 09:40:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * common.h (EM_PPC): New macro, PowerPC machine id.
-
-Tue Jan 17 10:51:38 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * mips.h (SHT_MIPS_MSYM, SHT_MIPS_DWARF, SHT_MIPS_EVENTS): Define.
-
-
-Mon Oct 17 13:43:59 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * internal.h (Elf_Internal_Shdr): Remove rawdata and size fields.
- Add bfd_section field.
-
-Tue May 24 16:11:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (Elf32_External_gptab): Define.
-
-Mon May 16 13:22:04 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * common.h (EM_HPPA): Delete.
- (EM_PARISC): Add.
- * hppa.h: New file.
-
-Mon May 9 13:27:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * common.h (SHN_LORESERVE): Rename from SHN_LORESERV.
- (ELF32_R_TYPE, ELF32_R_INFO): Don't rely on size of unsigned char.
- (ELF64_R_TYPE): Don't rely on size of unsigned long.
-
-Mon Apr 25 15:53:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h (Elf_Internal_Shdr): Use PTR, not void *.
-
-Fri Mar 11 00:34:59 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mips.h (SHN_MIPS_TEXT, SHN_MIPS_DATA): Define.
-
-Sat Mar 5 14:08:54 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * internal.h: Remove Elf32_*, Elf64_* typedefs. These names
- cause conflicts with system headers, e.g. link.h in gdb/solib.c.
- Combine 32- and 64-bit versions of *_Internal_Dyn.
- * common.h: Replace uses of Elf64_Word, Elf64_Xword typedefs
- by their expansion.
- * mips.h: Replace uses of Elf32_Word, Elf32_Sword, Elf32_Addr
- typedefs by their expansion. Add DT_MIPS_RLD_MAP definition.
-
-Fri Feb 18 10:39:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * common.h (EM_CYGNUS_POWERPC): Define. This may be temporary,
- depending upon how quickly I can find a real PowerPC ABI.
-
-Mon Feb 7 08:27:13 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * internal.h: Change HOST_64_BIT to BFD_HOST_64_BIT.
-
-Wed Feb 2 14:12:18 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * common.h: Add comments regarding value of EM_HPPA and how to
- pick an unofficial value.
-
-Wed Nov 17 17:14:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (SHT_MIPS_OPTIONS): Define.
-
-Mon Nov 8 17:57:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h: Added some more MIPS ABI macro definitions.
-
-Wed Nov 3 22:07:17 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
-
- * common.h (EM_MIPS_RS4_BE): New macro.
-
-Tue Oct 12 07:28:18 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h: New file. MIPS ABI specific information.
-
-Mon Jun 21 13:13:43 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
-
- * internal.h: Combined 32- and 64-bit versions of all structures
- except *_Internal_Dyn. This will simply the assembler interface,
- and some bfd code.
-
-Tue May 25 02:00:16 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * external.h, internal.h, common.h: Added 64-bit versions of some
- structures and macros. Renamed old versions to put "32" in the
- name. Some are unchanged.
-
-Thu Apr 29 12:12:20 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * common.h (EM_HPPA, NT_VERSION, STN_UNDEF, DT_*): New macros.
- * external.h (Elf_External_Dyn): New type.
-
- * internal.h (Elf_Intenral_Shdr): New field `size'.
- (Elf_Internal_Dyn): New type.
-
-Tue Apr 20 16:03:45 1993 Fred Fish (fnf@cygnus.com)
-
- * dwarf.h (LANG_CHILL): Change value to one randomly picked in
- the user defined range, to reduce probability of collisions.
-
-Sun Nov 15 09:34:02 1992 Fred Fish (fnf@cygnus.com)
-
- * dwarf.h (AT_src_coords): Whitespace change only.
- * dwarf.h (AT_body_begin, AT_body_end, LANG_MODULA2):
- Add from latest gcc.
- * dwarf.h (LANG_CHILL): Add as GNU extension.
-
-Sat Aug 1 13:46:53 1992 Fred Fish (fnf@cygnus.com)
-
- * dwarf.h: Replace with current version from gcc distribution.
-
-Fri Jun 19 19:05:09 1992 John Gilmore (gnu at cygnus.com)
-
- * internal.h: Add real struct tags to all the Type_Defs, so they
- can be used in prototypes where the Type_Defs are not known.
-
-Fri Apr 3 20:58:58 1992 Mark Eichin (eichin at cygnus.com)
-
- * common.h: added ELF_R_{SYM,TYPE,INFO} for handling relocation
- info
- added EM_MIPS, and corrected value of EM_860 based on System V ABI
- manual.
-
- * external.h: added Elf_External_{Rel,Rela}.
-
- * internal.h: added Elf_Internal_{Rel,Rela}.
- added rawdata to Elf_Internal_Shdr.
-
-Sat Nov 30 20:43:59 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * common.h, dwarf.h, external.h, internal.h, ChangeLog; moved from
- ../elf-<foo>
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/contrib/gdb/include/elf/common.h b/contrib/gdb/include/elf/common.h
deleted file mode 100644
index c9e74741c575..000000000000
--- a/contrib/gdb/include/elf/common.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/* ELF support for BFD.
- Copyright (C) 1991, 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support, from information published
- in "UNIX System V Release 4, Programmers Guide: ANSI C and
- Programming Support Tools".
-
-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. */
-
-
-/* This file is part of ELF support for BFD, and contains the portions
- that are common to both the internal and external representations.
- For example, ELFMAG0 is the byte 0x7F in both the internal (in-memory)
- and external (in-file) representations. */
-
-#ifndef _ELF_COMMON_H
-#define _ELF_COMMON_H
-
-/* Fields in e_ident[] */
-
-#define EI_MAG0 0 /* File identification byte 0 index */
-#define ELFMAG0 0x7F /* Magic number byte 0 */
-
-#define EI_MAG1 1 /* File identification byte 1 index */
-#define ELFMAG1 'E' /* Magic number byte 1 */
-
-#define EI_MAG2 2 /* File identification byte 2 index */
-#define ELFMAG2 'L' /* Magic number byte 2 */
-
-#define EI_MAG3 3 /* File identification byte 3 index */
-#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 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 EI_VERSION 6 /* File version */
-
-#define EI_PAD 7 /* Start of padding bytes */
-
-
-/* Values for e_type, which identifies the object file type */
-
-#define ET_NONE 0 /* No file type */
-#define ET_REL 1 /* Relocatable file */
-#define ET_EXEC 2 /* Executable file */
-#define ET_DYN 3 /* Shared object file */
-#define ET_CORE 4 /* Core file */
-#define ET_LOPROC 0xFF00 /* Processor-specific */
-#define ET_HIPROC 0xFFFF /* Processor-specific */
-
-/* Values for e_machine, which identifies the architecture */
-
-#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_860 7 /* Intel 80860 */
-#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
-
-#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */
-
-#define EM_SPARC64 11 /* SPARC v9 (not official) 64-bit */
-
-#define EM_PARISC 15 /* HPPA */
-
-#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
-
-#define EM_PPC 20 /* PowerPC */
-
-/* If it is necessary to assign new unofficial EM_* values, please pick large
- random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
- with official or non-GNU unofficial values. */
-
-/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_POWERPC 0x9025
-
-/* Old version of PowerPC, this should be removed shortly. */
-#define EM_PPC_OLD 17
-
-
-/* Values for e_version */
-
-#define EV_NONE 0 /* Invalid ELF version */
-#define EV_CURRENT 1 /* Current version */
-
-/* Values for program header, p_type field */
-
-#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 */
-#define PT_NOTE 4 /* Auxiliary information */
-#define PT_SHLIB 5 /* Reserved, unspecified semantics */
-#define PT_PHDR 6 /* Entry for header table itself */
-#define PT_LOPROC 0x70000000 /* Processor-specific */
-#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
-
-/* Program segment permissions, in program header p_flags field */
-
-#define PF_X (1 << 0) /* Segment is executable */
-#define PF_W (1 << 1) /* Segment is writable */
-#define PF_R (1 << 2) /* Segment is readable */
-#define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
-
-/* Values for section header, sh_type field */
-
-#define SHT_NULL 0 /* Section header table entry unused */
-#define SHT_PROGBITS 1 /* Program specific (private) data */
-#define SHT_SYMTAB 2 /* Link editing symbol table */
-#define SHT_STRTAB 3 /* A string table */
-#define SHT_RELA 4 /* Relocation entries with addends */
-#define SHT_HASH 5 /* A symbol hash table */
-#define SHT_DYNAMIC 6 /* Information for dynamic linking */
-#define SHT_NOTE 7 /* Information that marks file */
-#define SHT_NOBITS 8 /* Section occupies no space in file */
-#define SHT_REL 9 /* Relocation entries, no addends */
-#define SHT_SHLIB 10 /* Reserved, unspecified semantics */
-#define SHT_DYNSYM 11 /* Dynamic linking symbol table */
-#define SHT_LOPROC 0x70000000 /* Processor-specific semantics, lo */
-#define SHT_HIPROC 0x7FFFFFFF /* Processor-specific semantics, hi */
-#define SHT_LOUSER 0x80000000 /* Application-specific semantics */
-#define SHT_HIUSER 0x8FFFFFFF /* Application-specific semantics */
-
-/* Values for section header, sh_flags field */
-
-#define SHF_WRITE (1 << 0) /* Writable data during execution */
-#define SHF_ALLOC (1 << 1) /* Occupies memory during execution */
-#define SHF_EXECINSTR (1 << 2) /* Executable machine instructions */
-#define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */
-
-/* Values of note segment descriptor types for core files. */
-
-#define NT_PRSTATUS 1 /* Contains copy of prstatus struct */
-#define NT_FPREGSET 2 /* Contains copy of fpregset struct */
-#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */
-
-/* Values of note segment descriptor types for object files. */
-/* (Only for hppa right now. Should this be moved elsewhere?) */
-
-#define NT_VERSION 1 /* Contains a version string. */
-
-/* These three macros disassemble and assemble a symbol table st_info field,
- which contains the symbol binding and symbol type. The STB_ and STT_
- defines identify the binding and type. */
-
-#define ELF_ST_BIND(val) (((unsigned int)(val)) >> 4)
-#define ELF_ST_TYPE(val) ((val) & 0xF)
-#define ELF_ST_INFO(bind,type) (((bind) << 4) + ((type) & 0xF))
-
-#define STN_UNDEF 0 /* undefined symbol index */
-
-#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_LOPROC 13 /* Application-specific semantics */
-#define STB_HIPROC 15 /* Application-specific semantics */
-
-#define STT_NOTYPE 0 /* Symbol type is unspecified */
-#define STT_OBJECT 1 /* Symbol is a data object */
-#define STT_FUNC 2 /* Symbol is a code object */
-#define STT_SECTION 3 /* Symbol associated with a section */
-#define STT_FILE 4 /* Symbol gives a file name */
-#define STT_LOPROC 13 /* Application-specific semantics */
-#define STT_HIPROC 15 /* Application-specific semantics */
-
-/* Special section indices, which may show up in st_shndx fields, among
- other places. */
-
-#define SHN_UNDEF 0 /* Undefined section reference */
-#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_ABS 0xFFF1 /* Associated symbol is absolute */
-#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
-#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
-
-/* relocation info handling macros */
-
-#define ELF32_R_SYM(i) ((i) >> 8)
-#define ELF32_R_TYPE(i) ((i) & 0xff)
-#define ELF32_R_INFO(s,t) (((s) << 8) + ((t) & 0xff))
-
-#define ELF64_R_SYM(i) ((i) >> 32)
-#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
-#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 32) + (bfd_vma) (t))
-
-/* Dynamic section tags */
-
-#define DT_NULL 0
-#define DT_NEEDED 1
-#define DT_PLTRELSZ 2
-#define DT_PLTGOT 3
-#define DT_HASH 4
-#define DT_STRTAB 5
-#define DT_SYMTAB 6
-#define DT_RELA 7
-#define DT_RELASZ 8
-#define DT_RELAENT 9
-#define DT_STRSZ 10
-#define DT_SYMENT 11
-#define DT_INIT 12
-#define DT_FINI 13
-#define DT_SONAME 14
-#define DT_RPATH 15
-#define DT_SYMBOLIC 16
-#define DT_REL 17
-#define DT_RELSZ 18
-#define DT_RELENT 19
-#define DT_PLTREL 20
-#define DT_DEBUG 21
-#define DT_TEXTREL 22
-#define DT_JMPREL 23
-#define DT_LOPROC 0x70000000
-#define DT_HIPROC 0x7fffffff
-
-#endif /* _ELF_COMMON_H */
diff --git a/contrib/gdb/include/elf/dwarf.h b/contrib/gdb/include/elf/dwarf.h
deleted file mode 100644
index 4333d5eda40f..000000000000
--- a/contrib/gdb/include/elf/dwarf.h
+++ /dev/null
@@ -1,319 +0,0 @@
-/* Declarations and definitions of codes relating to the DWARF symbolic
- debugging information format.
-
- Written by Ron Guilmette (rfg@ncd.com)
-
-Copyright (C) 1992 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute 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.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This file is derived from the DWARF specification (a public document)
- Revision 1.0.1 (April 8, 1992) developed by the UNIX International
- Programming Languages Special Interest Group (UI/PLSIG) and distributed
- by UNIX International. Copies of this specification are available from
- UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
-*/
-
-#ifndef _ELF_DWARF_H
-#define _ELF_DWARF_H
-
-/* Tag names and codes. */
-
-enum dwarf_tag {
- TAG_padding = 0x0000,
- TAG_array_type = 0x0001,
- TAG_class_type = 0x0002,
- TAG_entry_point = 0x0003,
- TAG_enumeration_type = 0x0004,
- TAG_formal_parameter = 0x0005,
- TAG_global_subroutine = 0x0006,
- TAG_global_variable = 0x0007,
- /* 0x0008 -- reserved */
- /* 0x0009 -- reserved */
- TAG_label = 0x000a,
- TAG_lexical_block = 0x000b,
- TAG_local_variable = 0x000c,
- TAG_member = 0x000d,
- /* 0x000e -- reserved */
- TAG_pointer_type = 0x000f,
- TAG_reference_type = 0x0010,
- TAG_compile_unit = 0x0011,
- TAG_string_type = 0x0012,
- TAG_structure_type = 0x0013,
- TAG_subroutine = 0x0014,
- TAG_subroutine_type = 0x0015,
- TAG_typedef = 0x0016,
- TAG_union_type = 0x0017,
- TAG_unspecified_parameters = 0x0018,
- TAG_variant = 0x0019,
- TAG_common_block = 0x001a,
- TAG_common_inclusion = 0x001b,
- TAG_inheritance = 0x001c,
- TAG_inlined_subroutine = 0x001d,
- TAG_module = 0x001e,
- TAG_ptr_to_member_type = 0x001f,
- TAG_set_type = 0x0020,
- TAG_subrange_type = 0x0021,
- TAG_with_stmt = 0x0022,
-
- /* GNU extensions */
-
- TAG_format_label = 0x8000, /* for FORTRAN 77 and Fortran 90 */
- TAG_namelist = 0x8001, /* For Fortran 90 */
- TAG_function_template = 0x8002, /* for C++ */
- TAG_class_template = 0x8003 /* for C++ */
-};
-
-#define TAG_lo_user 0x8000 /* implementation-defined range start */
-#define TAG_hi_user 0xffff /* implementation-defined range end */
-#define TAG_source_file TAG_compile_unit /* for backward compatibility */
-
-/* Form names and codes. */
-
-enum dwarf_form {
- FORM_ADDR = 0x1,
- FORM_REF = 0x2,
- FORM_BLOCK2 = 0x3,
- FORM_BLOCK4 = 0x4,
- FORM_DATA2 = 0x5,
- FORM_DATA4 = 0x6,
- FORM_DATA8 = 0x7,
- FORM_STRING = 0x8
-};
-
-/* Attribute names and codes. */
-
-enum dwarf_attribute {
- AT_sibling = (0x0010|FORM_REF),
- AT_location = (0x0020|FORM_BLOCK2),
- AT_name = (0x0030|FORM_STRING),
- AT_fund_type = (0x0050|FORM_DATA2),
- AT_mod_fund_type = (0x0060|FORM_BLOCK2),
- AT_user_def_type = (0x0070|FORM_REF),
- AT_mod_u_d_type = (0x0080|FORM_BLOCK2),
- AT_ordering = (0x0090|FORM_DATA2),
- AT_subscr_data = (0x00a0|FORM_BLOCK2),
- AT_byte_size = (0x00b0|FORM_DATA4),
- AT_bit_offset = (0x00c0|FORM_DATA2),
- AT_bit_size = (0x00d0|FORM_DATA4),
- /* (0x00e0|FORM_xxxx) -- reserved */
- AT_element_list = (0x00f0|FORM_BLOCK4),
- AT_stmt_list = (0x0100|FORM_DATA4),
- AT_low_pc = (0x0110|FORM_ADDR),
- AT_high_pc = (0x0120|FORM_ADDR),
- AT_language = (0x0130|FORM_DATA4),
- AT_member = (0x0140|FORM_REF),
- AT_discr = (0x0150|FORM_REF),
- AT_discr_value = (0x0160|FORM_BLOCK2),
- /* (0x0170|FORM_xxxx) -- reserved */
- /* (0x0180|FORM_xxxx) -- reserved */
- AT_string_length = (0x0190|FORM_BLOCK2),
- AT_common_reference = (0x01a0|FORM_REF),
- AT_comp_dir = (0x01b0|FORM_STRING),
- AT_const_value_string = (0x01c0|FORM_STRING),
- AT_const_value_data2 = (0x01c0|FORM_DATA2),
- AT_const_value_data4 = (0x01c0|FORM_DATA4),
- AT_const_value_data8 = (0x01c0|FORM_DATA8),
- AT_const_value_block2 = (0x01c0|FORM_BLOCK2),
- AT_const_value_block4 = (0x01c0|FORM_BLOCK4),
- AT_containing_type = (0x01d0|FORM_REF),
- AT_default_value_addr = (0x01e0|FORM_ADDR),
- AT_default_value_data2 = (0x01e0|FORM_DATA2),
- AT_default_value_data4 = (0x01e0|FORM_DATA4),
- AT_default_value_data8 = (0x01e0|FORM_DATA8),
- AT_default_value_string = (0x01e0|FORM_STRING),
- AT_friends = (0x01f0|FORM_BLOCK2),
- AT_inline = (0x0200|FORM_STRING),
- AT_is_optional = (0x0210|FORM_STRING),
- AT_lower_bound_ref = (0x0220|FORM_REF),
- AT_lower_bound_data2 = (0x0220|FORM_DATA2),
- AT_lower_bound_data4 = (0x0220|FORM_DATA4),
- AT_lower_bound_data8 = (0x0220|FORM_DATA8),
- AT_private = (0x0240|FORM_STRING),
- AT_producer = (0x0250|FORM_STRING),
- AT_program = (0x0230|FORM_STRING),
- AT_protected = (0x0260|FORM_STRING),
- AT_prototyped = (0x0270|FORM_STRING),
- AT_public = (0x0280|FORM_STRING),
- AT_pure_virtual = (0x0290|FORM_STRING),
- AT_return_addr = (0x02a0|FORM_BLOCK2),
- AT_abstract_origin = (0x02b0|FORM_REF),
- AT_start_scope = (0x02c0|FORM_DATA4),
- AT_stride_size = (0x02e0|FORM_DATA4),
- AT_upper_bound_ref = (0x02f0|FORM_REF),
- AT_upper_bound_data2 = (0x02f0|FORM_DATA2),
- AT_upper_bound_data4 = (0x02f0|FORM_DATA4),
- AT_upper_bound_data8 = (0x02f0|FORM_DATA8),
- AT_virtual = (0x0300|FORM_STRING),
-
- /* GNU extensions. */
-
- AT_sf_names = (0x8000|FORM_DATA4),
- AT_src_info = (0x8010|FORM_DATA4),
- AT_mac_info = (0x8020|FORM_DATA4),
- AT_src_coords = (0x8030|FORM_DATA4),
- AT_body_begin = (0x8040|FORM_ADDR),
- AT_body_end = (0x8050|FORM_ADDR)
-};
-
-#define AT_lo_user 0x8000 /* implementation-defined range start */
-#define AT_hi_user 0xffff /* implementation-defined range end */
-
-/* Location atom names and codes. */
-
-enum dwarf_location_atom {
- OP_REG = 0x01,
- OP_BASEREG = 0x02,
- OP_ADDR = 0x03,
- OP_CONST = 0x04,
- OP_DEREF2 = 0x05,
- OP_DEREF4 = 0x06,
- OP_ADD = 0x07
-};
-
-#define OP_LO_USER 0x80 /* implementation-defined range start */
-#define OP_HI_USER 0xff /* implementation-defined range end */
-
-/* Fundamental type names and codes. */
-
-enum dwarf_fundamental_type {
- FT_char = 0x0001,
- FT_signed_char = 0x0002,
- FT_unsigned_char = 0x0003,
- FT_short = 0x0004,
- FT_signed_short = 0x0005,
- FT_unsigned_short = 0x0006,
- FT_integer = 0x0007,
- FT_signed_integer = 0x0008,
- FT_unsigned_integer = 0x0009,
- FT_long = 0x000a,
- FT_signed_long = 0x000b,
- FT_unsigned_long = 0x000c,
- FT_pointer = 0x000d, /* an alias for (void *) */
- FT_float = 0x000e,
- FT_dbl_prec_float = 0x000f,
- FT_ext_prec_float = 0x0010, /* breaks "classic" svr4 SDB */
- FT_complex = 0x0011, /* breaks "classic" svr4 SDB */
- FT_dbl_prec_complex = 0x0012, /* breaks "classic" svr4 SDB */
- /* 0x0013 -- reserved */
- FT_void = 0x0014,
- FT_boolean = 0x0015, /* breaks "classic" svr4 SDB */
- FT_ext_prec_complex = 0x0016, /* breaks "classic" svr4 SDB */
- FT_label = 0x0017,
-
- /* GNU extensions
- The low order byte must indicate the size (in bytes) for the type.
- All of these types will probably break "classic" svr4 SDB */
-
- FT_long_long = 0x8008,
- FT_signed_long_long = 0x8108,
- FT_unsigned_long_long = 0x8208,
-
- FT_int8 = 0x9001,
- FT_signed_int8 = 0x9101,
- FT_unsigned_int8 = 0x9201,
- FT_int16 = 0x9302,
- FT_signed_int16 = 0x9402,
- FT_unsigned_int16 = 0x9502,
- FT_int32 = 0x9604,
- FT_signed_int32 = 0x9704,
- FT_unsigned_int32 = 0x9804,
- FT_int64 = 0x9908,
- FT_signed_int64 = 0x9a08,
- FT_unsigned_int64 = 0x9b08,
-
- FT_real32 = 0xa004,
- FT_real64 = 0xa108,
- FT_real96 = 0xa20c,
- FT_real128 = 0xa310
-};
-
-#define FT_lo_user 0x8000 /* implementation-defined range start */
-#define FT_hi_user 0xffff /* implementation defined range end */
-
-/* Type modifier names and codes. */
-
-enum dwarf_type_modifier {
- MOD_pointer_to = 0x01,
- MOD_reference_to = 0x02,
- MOD_const = 0x03,
- MOD_volatile = 0x04
-};
-
-#define MOD_lo_user 0x80 /* implementation-defined range start */
-#define MOD_hi_user 0xff /* implementation-defined range end */
-
-/* Array ordering names and codes. */
-
-enum dwarf_array_dim_ordering {
- ORD_row_major = 0,
- ORD_col_major = 1
-};
-
-/* Array subscript format names and codes. */
-
-enum dwarf_subscr_data_formats {
- FMT_FT_C_C = 0x0,
- FMT_FT_C_X = 0x1,
- FMT_FT_X_C = 0x2,
- FMT_FT_X_X = 0x3,
- FMT_UT_C_C = 0x4,
- FMT_UT_C_X = 0x5,
- FMT_UT_X_C = 0x6,
- FMT_UT_X_X = 0x7,
- FMT_ET = 0x8
-};
-
-/* Derived from above for ease of use. */
-
-#define FMT_CODE(_FUNDAMENTAL_TYPE_P, _UB_CONST_P, _LB_CONST_P) \
- (((_FUNDAMENTAL_TYPE_P) ? 0 : 4) \
- | ((_UB_CONST_P) ? 0 : 2) \
- | ((_LB_CONST_P) ? 0 : 1))
-
-/* Source language names and codes. */
-
-enum dwarf_source_language {
- LANG_C89 = 0x00000001,
- LANG_C = 0x00000002,
- LANG_ADA83 = 0x00000003,
- LANG_C_PLUS_PLUS = 0x00000004,
- LANG_COBOL74 = 0x00000005,
- LANG_COBOL85 = 0x00000006,
- LANG_FORTRAN77 = 0x00000007,
- LANG_FORTRAN90 = 0x00000008,
- LANG_PASCAL83 = 0x00000009,
- LANG_MODULA2 = 0x0000000a,
-
- /* GNU extensions */
-
- LANG_CHILL = 0x00009af3 /* random value for GNU Chill */
-};
-
-#define LANG_lo_user 0x00008000 /* implementation-defined range start */
-#define LANG_hi_user 0x0000ffff /* implementation-defined range end */
-
-/* Names and codes for GNU "macinfo" extension. */
-
-enum dwarf_macinfo_record_type {
- MACINFO_start = 's',
- MACINFO_resume = 'r',
- MACINFO_define = 'd',
- MACINFO_undef = 'u'
-};
-
-#endif /* _ELF_DWARF_H */
diff --git a/contrib/gdb/include/elf/external.h b/contrib/gdb/include/elf/external.h
deleted file mode 100644
index e6618cb752fa..000000000000
--- a/contrib/gdb/include/elf/external.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/* ELF support for BFD.
- Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support, from information published
- in "UNIX System V Release 4, Programmers Guide: ANSI C and
- Programming Support Tools".
-
-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. */
-
-
-/* This file is part of ELF support for BFD, and contains the portions
- that describe how ELF is represented externally by the BFD library.
- I.E. it describes the in-file representation of ELF. It requires
- the elf-common.h file which contains the portions that are common to
- both the internal and external representations. */
-
-/* The 64-bit stuff is kind of random. Perhaps someone will publish a
- spec someday. */
-
-#ifndef _ELF_EXTERNAL_H
-#define _ELF_EXTERNAL_H
-
-/* ELF Header (32-bit implementations) */
-
-typedef struct {
- unsigned char e_ident[16]; /* ELF "magic number" */
- unsigned char e_type[2]; /* Identifies object file type */
- unsigned char e_machine[2]; /* Specifies required architecture */
- unsigned char e_version[4]; /* Identifies object file version */
- unsigned char e_entry[4]; /* Entry point virtual address */
- unsigned char e_phoff[4]; /* Program header table file offset */
- unsigned char e_shoff[4]; /* Section header table file offset */
- unsigned char e_flags[4]; /* Processor-specific flags */
- unsigned char e_ehsize[2]; /* ELF header size in bytes */
- unsigned char e_phentsize[2]; /* Program header table entry size */
- unsigned char e_phnum[2]; /* Program header table entry count */
- unsigned char e_shentsize[2]; /* Section header table entry size */
- unsigned char e_shnum[2]; /* Section header table entry count */
- unsigned char e_shstrndx[2]; /* Section header string table index */
-} Elf32_External_Ehdr;
-
-typedef struct {
- unsigned char e_ident[16]; /* ELF "magic number" */
- unsigned char e_type[2]; /* Identifies object file type */
- unsigned char e_machine[2]; /* Specifies required architecture */
- unsigned char e_version[4]; /* Identifies object file version */
- unsigned char e_entry[8]; /* Entry point virtual address */
- unsigned char e_phoff[8]; /* Program header table file offset */
- unsigned char e_shoff[8]; /* Section header table file offset */
- unsigned char e_flags[4]; /* Processor-specific flags */
- unsigned char e_ehsize[2]; /* ELF header size in bytes */
- unsigned char e_phentsize[2]; /* Program header table entry size */
- unsigned char e_phnum[2]; /* Program header table entry count */
- unsigned char e_shentsize[2]; /* Section header table entry size */
- unsigned char e_shnum[2]; /* Section header table entry count */
- unsigned char e_shstrndx[2]; /* Section header string table index */
-} Elf64_External_Ehdr;
-
-/* Program header */
-
-typedef struct {
- unsigned char p_type[4]; /* Identifies program segment type */
- unsigned char p_offset[4]; /* Segment file offset */
- unsigned char p_vaddr[4]; /* Segment virtual address */
- unsigned char p_paddr[4]; /* Segment physical address */
- unsigned char p_filesz[4]; /* Segment size in file */
- unsigned char p_memsz[4]; /* Segment size in memory */
- unsigned char p_flags[4]; /* Segment flags */
- unsigned char p_align[4]; /* Segment alignment, file & memory */
-} Elf32_External_Phdr;
-
-typedef struct {
- unsigned char p_type[4]; /* Identifies program segment type */
- unsigned char p_flags[4]; /* Segment flags */
- unsigned char p_offset[8]; /* Segment file offset */
- unsigned char p_vaddr[8]; /* Segment virtual address */
- unsigned char p_paddr[8]; /* Segment physical address */
- unsigned char p_filesz[8]; /* Segment size in file */
- unsigned char p_memsz[8]; /* Segment size in memory */
- unsigned char p_align[8]; /* Segment alignment, file & memory */
-} Elf64_External_Phdr;
-
-/* Section header */
-
-typedef struct {
- unsigned char sh_name[4]; /* Section name, index in string tbl */
- unsigned char sh_type[4]; /* Type of section */
- unsigned char sh_flags[4]; /* Miscellaneous section attributes */
- unsigned char sh_addr[4]; /* Section virtual addr at execution */
- unsigned char sh_offset[4]; /* Section file offset */
- unsigned char sh_size[4]; /* Size of section in bytes */
- unsigned char sh_link[4]; /* Index of another section */
- unsigned char sh_info[4]; /* Additional section information */
- unsigned char sh_addralign[4]; /* Section alignment */
- unsigned char sh_entsize[4]; /* Entry size if section holds table */
-} Elf32_External_Shdr;
-
-typedef struct {
- unsigned char sh_name[4]; /* Section name, index in string tbl */
- unsigned char sh_type[4]; /* Type of section */
- unsigned char sh_flags[8]; /* Miscellaneous section attributes */
- unsigned char sh_addr[8]; /* Section virtual addr at execution */
- unsigned char sh_offset[8]; /* Section file offset */
- unsigned char sh_size[8]; /* Size of section in bytes */
- unsigned char sh_link[4]; /* Index of another section */
- unsigned char sh_info[4]; /* Additional section information */
- unsigned char sh_addralign[8]; /* Section alignment */
- unsigned char sh_entsize[8]; /* Entry size if section holds table */
-} Elf64_External_Shdr;
-
-/* Symbol table entry */
-
-typedef struct {
- unsigned char st_name[4]; /* Symbol name, index in string tbl */
- unsigned char st_value[4]; /* Value of the symbol */
- unsigned char st_size[4]; /* Associated symbol size */
- unsigned char st_info[1]; /* Type and binding attributes */
- unsigned char st_other[1]; /* No defined meaning, 0 */
- unsigned char st_shndx[2]; /* Associated section index */
-} Elf32_External_Sym;
-
-typedef struct {
- unsigned char st_name[4]; /* Symbol name, index in string tbl */
- unsigned char st_info[1]; /* Type and binding attributes */
- unsigned char st_other[1]; /* No defined meaning, 0 */
- unsigned char st_shndx[2]; /* Associated section index */
- unsigned char st_value[8]; /* Value of the symbol */
- unsigned char st_size[8]; /* Associated symbol size */
-} Elf64_External_Sym;
-
-/* Note segments */
-
-typedef struct {
- unsigned char namesz[4]; /* Size of entry's owner string */
- unsigned char descsz[4]; /* Size of the note descriptor */
- unsigned char type[4]; /* Interpretation of the descriptor */
- char name[1]; /* Start of the name+desc data */
-} Elf_External_Note;
-
-/* Relocation Entries */
-typedef struct {
- unsigned char r_offset[4]; /* Location at which to apply the action */
- unsigned char r_info[4]; /* index and type of relocation */
-} Elf32_External_Rel;
-
-typedef struct {
- unsigned char r_offset[4]; /* Location at which to apply the action */
- unsigned char r_info[4]; /* index and type of relocation */
- unsigned char r_addend[4]; /* Constant addend used to compute value */
-} Elf32_External_Rela;
-
-typedef struct {
- unsigned char r_offset[8]; /* Location at which to apply the action */
- unsigned char r_info[8]; /* index and type of relocation */
-} Elf64_External_Rel;
-
-typedef struct {
- unsigned char r_offset[8]; /* Location at which to apply the action */
- unsigned char r_info[8]; /* index and type of relocation */
- unsigned char r_addend[8]; /* Constant addend used to compute value */
-} Elf64_External_Rela;
-
-/* dynamic section structure */
-
-typedef struct {
- unsigned char d_tag[4]; /* entry tag value */
- union {
- unsigned char d_val[4];
- unsigned char d_ptr[4];
- } d_un;
-} Elf32_External_Dyn;
-
-typedef struct {
- unsigned char d_tag[8]; /* entry tag value */
- union {
- unsigned char d_val[8];
- unsigned char d_ptr[8];
- } d_un;
-} Elf64_External_Dyn;
-
-#endif /* _ELF_EXTERNAL_H */
diff --git a/contrib/gdb/include/elf/hppa.h b/contrib/gdb/include/elf/hppa.h
deleted file mode 100644
index c34077fa1947..000000000000
--- a/contrib/gdb/include/elf/hppa.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* HPPA ELF support for BFD.
- Copyright (C) 1993, 1994 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. */
-
-/* This file holds definitions specific to the HPPA ELF ABI. Note
- that most of this is not actually implemented by BFD. */
-
-#ifndef _ELF_HPPA_H
-#define _ELF_HPPA_H
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* Target processor IDs to be placed in the low 16 bits of the flags
- field. Note these names are shared with SOM, and therefore do not
- follow ELF naming conventions. */
-
-/* PA 1.0 big endian. */
-#ifndef CPU_PA_RISC1_0
-#define CPU_PA_RISC1_0 0x0000020b
-#endif
-
-/* PA 1.1 big endian. */
-#ifndef CPU_PA_RISC1_1
-#define CPU_PA_RISC1_1 0x00000210
-#endif
-
-/* PA 1.0 little endian (unsupported) is 0x0000028b. */
-/* PA 1.1 little endian (unsupported) is 0x00000290. */
-
-/* Trap null address dereferences. */
-#define ELF_PARISC_TRAPNIL 0x00010000
-
-/* .PARISC.archext section is present. */
-#define EF_PARISC_EXT 0x00020000
-
-/* Processor specific section types. */
-
-/* Holds the global offset table, a table of pointers to external
- data. */
-#define SHT_PARISC_GOT SHT_LOPROC+0
-
-/* Nonloadable section containing information in architecture
- extensions used by the code. */
-#define SHT_PARISC_ARCH SHT_LOPROC+1
-
-/* Section in which $global$ is defined. */
-#define SHT_PARISC_GLOBAL SHT_LOPROC+2
-
-/* Section holding millicode routines (mul, div, rem, dyncall, etc. */
-#define SHT_PARISC_MILLI SHT_LOPROC+3
-
-/* Section holding unwind information for use by debuggers. */
-#define SHT_PARISC_UNWIND SHT_LOPROC+4
-
-/* Section holding the procedure linkage table. */
-#define SHT_PARISC_PLT SHT_LOPROC+5
-
-/* Short initialized and uninitialized data. */
-#define SHT_PARISC_SDATA SHT_LOPROC+6
-#define SHT_PARISC_SBSS SHT_LOPROC+7
-
-/* Optional section holding argument location/relocation info. */
-#define SHT_PARISC_SYMEXTN SHT_LOPROC+8
-
-/* Option section for linker stubs. */
-#define SHT_PARISC_STUBS SHT_LOPROC+9
-
-/* Processor specific section flags. */
-
-/* This section is near the global data pointer and thus allows short
- addressing modes to be used. */
-#define SHF_PARISC_SHORT 0x20000000
-
-/* Processor specific symbol types. */
-
-/* Millicode function entry point. */
-#define STT_PARISC_MILLICODE STT_LOPROC+0
-
-#endif /* _ELF_HPPA_H */
diff --git a/contrib/gdb/include/elf/internal.h b/contrib/gdb/include/elf/internal.h
deleted file mode 100644
index 6375e892051d..000000000000
--- a/contrib/gdb/include/elf/internal.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/* ELF support for BFD.
- Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support, from information published
- in "UNIX System V Release 4, Programmers Guide: ANSI C and
- Programming Support Tools".
-
-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. */
-
-
-/* This file is part of ELF support for BFD, and contains the portions
- that describe how ELF is represented internally in the BFD library.
- I.E. it describes the in-memory representation of ELF. It requires
- the elf-common.h file which contains the portions that are common to
- both the internal and external representations. */
-
-
-/* NOTE that these structures are not kept in the same order as they appear
- in the object file. In some cases they've been reordered for more optimal
- packing under various circumstances. */
-
-#ifndef _ELF_INTERNAL_H
-#define _ELF_INTERNAL_H
-
-/* ELF Header */
-
-#define EI_NIDENT 16 /* Size of e_ident[] */
-
-typedef struct elf_internal_ehdr {
- unsigned char e_ident[EI_NIDENT]; /* ELF "magic number" */
- bfd_vma e_entry; /* Entry point virtual address */
- bfd_signed_vma e_phoff; /* Program header table file offset */
- bfd_signed_vma e_shoff; /* Section header table file offset */
- unsigned long e_version; /* Identifies object file version */
- unsigned long e_flags; /* Processor-specific flags */
- unsigned short e_type; /* Identifies object file type */
- unsigned short e_machine; /* Specifies required architecture */
- unsigned short e_ehsize; /* ELF header size in bytes */
- unsigned short e_phentsize; /* Program header table entry size */
- unsigned short e_phnum; /* Program header table entry count */
- unsigned short e_shentsize; /* Section header table entry size */
- unsigned short e_shnum; /* Section header table entry count */
- unsigned short e_shstrndx; /* Section header string table index */
-} Elf_Internal_Ehdr;
-
-#define elf32_internal_ehdr elf_internal_ehdr
-#define Elf32_Internal_Ehdr Elf_Internal_Ehdr
-#define elf64_internal_ehdr elf_internal_ehdr
-#define Elf64_Internal_Ehdr Elf_Internal_Ehdr
-
-/* Program header */
-
-struct elf_internal_phdr {
- unsigned long p_type; /* Identifies program segment type */
- unsigned long p_flags; /* Segment flags */
- bfd_vma p_offset; /* Segment file offset */
- bfd_vma p_vaddr; /* Segment virtual address */
- bfd_vma p_paddr; /* Segment physical address */
- bfd_vma p_filesz; /* Segment size in file */
- bfd_vma p_memsz; /* Segment size in memory */
- bfd_vma p_align; /* Segment alignment, file & memory */
-};
-
-typedef struct elf_internal_phdr Elf_Internal_Phdr;
-#define elf32_internal_phdr elf_internal_phdr
-#define Elf32_Internal_Phdr Elf_Internal_Phdr
-#define elf64_internal_phdr elf_internal_phdr
-#define Elf64_Internal_Phdr Elf_Internal_Phdr
-
-/* Section header */
-
-typedef struct elf_internal_shdr {
- unsigned int sh_name; /* Section name, index in string tbl */
- unsigned int sh_type; /* Type of section */
- bfd_vma sh_flags; /* Miscellaneous section attributes */
- bfd_vma sh_addr; /* Section virtual addr at execution */
- bfd_size_type sh_size; /* Size of section in bytes */
- bfd_size_type sh_entsize; /* Entry size if section holds table */
- unsigned long sh_link; /* Index of another section */
- unsigned long sh_info; /* Additional section information */
- file_ptr sh_offset; /* Section file offset */
- unsigned int sh_addralign; /* Section alignment */
-
- /* The internal rep also has some cached info associated with it. */
- asection * bfd_section; /* Associated BFD section. */
- PTR contents; /* Section contents. */
-} Elf_Internal_Shdr;
-
-#define elf32_internal_shdr elf_internal_shdr
-#define Elf32_Internal_Shdr Elf_Internal_Shdr
-#define elf64_internal_shdr elf_internal_shdr
-#define Elf64_Internal_Shdr Elf_Internal_Shdr
-
-/* Symbol table entry */
-
-struct elf_internal_sym {
- bfd_vma st_value; /* Value of the symbol */
- bfd_vma st_size; /* Associated symbol size */
- unsigned long st_name; /* Symbol name, index in string tbl */
- unsigned char st_info; /* Type and binding attributes */
- unsigned char st_other; /* No defined meaning, 0 */
- unsigned short st_shndx; /* Associated section index */
-};
-
-typedef struct elf_internal_sym Elf_Internal_Sym;
-
-#define elf32_internal_sym elf_internal_sym
-#define elf64_internal_sym elf_internal_sym
-#define Elf32_Internal_Sym Elf_Internal_Sym
-#define Elf64_Internal_Sym Elf_Internal_Sym
-
-/* Note segments */
-
-typedef struct elf_internal_note {
- unsigned long namesz; /* Size of entry's owner string */
- unsigned long descsz; /* Size of the note descriptor */
- unsigned long type; /* Interpretation of the descriptor */
- char name[1]; /* Start of the name+desc data */
-} Elf_Internal_Note;
-#define Elf32_Internal_Note Elf_Internal_Note
-#define elf32_internal_note elf_internal_note
-
-/* Relocation Entries */
-
-typedef struct elf_internal_rel {
- bfd_vma r_offset; /* Location at which to apply the action */
- /* This needs to support 64-bit values in elf64. */
- bfd_vma r_info; /* index and type of relocation */
-} Elf_Internal_Rel;
-
-#define elf32_internal_rel elf_internal_rel
-#define Elf32_Internal_Rel Elf_Internal_Rel
-#define elf64_internal_rel elf_internal_rel
-#define Elf64_Internal_Rel Elf_Internal_Rel
-
-typedef struct elf_internal_rela {
- bfd_vma r_offset; /* Location at which to apply the action */
- bfd_vma r_info; /* Index and Type of relocation */
- bfd_signed_vma r_addend; /* Constant addend used to compute value */
-} Elf_Internal_Rela;
-
-#define elf32_internal_rela elf_internal_rela
-#define elf64_internal_rela elf_internal_rela
-#define Elf32_Internal_Rela Elf_Internal_Rela
-#define Elf64_Internal_Rela Elf_Internal_Rela
-
-/* dynamic section structure */
-
-typedef struct elf_internal_dyn {
- /* This needs to support 64-bit values in elf64. */
- bfd_vma d_tag; /* entry tag value */
- union {
- /* This needs to support 64-bit values in elf64. */
- bfd_vma d_val;
- bfd_vma d_ptr;
- } d_un;
-} Elf_Internal_Dyn;
-
-#define elf32_internal_dyn elf_internal_dyn
-#define elf64_internal_dyn elf_internal_dyn
-#define Elf32_Internal_Dyn Elf_Internal_Dyn
-#define Elf64_Internal_Dyn Elf_Internal_Dyn
-
-/* This structure is used to describe how sections should be assigned
- to program segments. */
-
-struct elf_segment_map
-{
- /* Next program segment. */
- struct elf_segment_map *next;
- /* Program segment type. */
- unsigned long p_type;
- /* Program segment flags. */
- unsigned long p_flags;
- /* Program segment physical address. */
- bfd_vma p_paddr;
- /* Whether the p_flags field is valid; if not, the flags are based
- on the section flags. */
- unsigned int p_flags_valid : 1;
- /* Whether the p_paddr field is valid; if not, the physical address
- is based on the section lma values. */
- unsigned int p_paddr_valid : 1;
- /* Whether this segment includes the file header. */
- unsigned int includes_filehdr : 1;
- /* Whether this segment includes the program headers. */
- unsigned int includes_phdrs : 1;
- /* Number of sections (may be 0). */
- unsigned int count;
- /* Sections. Actual number of elements is in count field. */
- asection *sections[1];
-};
-
-#endif /* _ELF_INTERNAL_H */
diff --git a/contrib/gdb/include/elf/mips.h b/contrib/gdb/include/elf/mips.h
deleted file mode 100644
index f0d8cd789650..000000000000
--- a/contrib/gdb/include/elf/mips.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/* MIPS ELF support for BFD.
- Copyright (C) 1993, 1994 Free Software Foundation, Inc.
-
- By Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>, from
- information in the System V Application Binary Interface, MIPS
- Processor Supplement.
-
-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. */
-
-/* This file holds definitions specific to the MIPS ELF ABI. Note
- that most of this is not actually implemented by BFD. */
-
-#ifndef _ELF_MIPS_H
-#define _ELF_MIPS_H
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* At least one .noreorder directive appears in the source. */
-#define EF_MIPS_NOREORDER 0x00000001
-
-/* File contains position independent code. */
-#define EF_MIPS_PIC 0x00000002
-
-/* Code in file uses the standard calling sequence for calling
- position independent code. */
-#define EF_MIPS_CPIC 0x00000004
-
-/* Four bit MIPS architecture field. */
-#define EF_MIPS_ARCH 0xf0000000
-
-/* -mips1 code. */
-#define E_MIPS_ARCH_1 0x00000000
-
-/* -mips2 code. */
-#define E_MIPS_ARCH_2 0x10000000
-
-/* -mips3 code. */
-#define E_MIPS_ARCH_3 0x20000000
-
-/* Processor specific section indices. These sections do not actually
- exist. Symbols with a st_shndx field corresponding to one of these
- values have a special meaning. */
-
-/* Defined and allocated common symbol. Value is virtual address. If
- relocated, alignment must be preserved. */
-#define SHN_MIPS_ACOMMON 0xff00
-
-/* Defined and allocated text symbol. Value is virtual address.
- Occur in the dynamic symbol table of Alpha OSF/1 and Irix 5 executables. */
-#define SHN_MIPS_TEXT 0xff01
-
-/* Defined and allocated data symbol. Value is virtual address.
- Occur in the dynamic symbol table of Alpha OSF/1 and Irix 5 executables. */
-#define SHN_MIPS_DATA 0xff02
-
-/* Small common symbol. */
-#define SHN_MIPS_SCOMMON 0xff03
-
-/* Small undefined symbol. */
-#define SHN_MIPS_SUNDEFINED 0xff04
-
-/* Processor specific section types. */
-
-/* Section contains the set of dynamic shared objects used when
- statically linking. */
-#define SHT_MIPS_LIBLIST 0x70000000
-
-/* I'm not sure what this is, but it's used on Irix 5. */
-#define SHT_MIPS_MSYM 0x70000001
-
-/* Section contains list of symbols whose definitions conflict with
- symbols defined in shared objects. */
-#define SHT_MIPS_CONFLICT 0x70000002
-
-/* Section contains the global pointer table. */
-#define SHT_MIPS_GPTAB 0x70000003
-
-/* Section contains microcode information. The exact format is
- unspecified. */
-#define SHT_MIPS_UCODE 0x70000004
-
-/* Section contains some sort of debugging information. The exact
- format is unspecified. It's probably ECOFF symbols. */
-#define SHT_MIPS_DEBUG 0x70000005
-
-/* Section contains register usage information. */
-#define SHT_MIPS_REGINFO 0x70000006
-
-/* Section contains miscellaneous options (used on Irix). */
-#define SHT_MIPS_OPTIONS 0x7000000d
-
-/* DWARF debugging section (used on Irix 6). */
-#define SHT_MIPS_DWARF 0x7000001e
-
-/* Events section. This appears on Irix 6. I don't know what it
- means. */
-#define SHT_MIPS_EVENTS 0x70000021
-
-/* A section of type SHT_MIPS_LIBLIST contains an array of the
- following structure. The sh_link field is the section index of the
- string table. The sh_info field is the number of entries in the
- section. */
-typedef struct
-{
- /* String table index for name of shared object. */
- unsigned long l_name;
- /* Time stamp. */
- unsigned long l_time_stamp;
- /* Checksum of symbol names and common sizes. */
- unsigned long l_checksum;
- /* String table index for version. */
- unsigned long l_version;
- /* Flags. */
- unsigned long l_flags;
-} Elf32_Lib;
-
-/* The l_flags field of an Elf32_Lib structure may contain the
- following flags. */
-
-/* Require an exact match at runtime. */
-#define LL_EXACT_MATCH 0x00000001
-
-/* Ignore version incompatibilities at runtime. */
-#define LL_IGNORE_INT_VER 0x00000002
-
-/* A section of type SHT_MIPS_CONFLICT is an array of indices into the
- .dynsym section. Each element has the following type. */
-typedef unsigned long Elf32_Conflict;
-
-/* A section of type SHT_MIPS_GPTAB contains information about how
- much GP space would be required for different -G arguments. This
- information is only used so that the linker can provide informative
- suggestions as to the best -G value to use. The sh_info field is
- the index of the section for which this information applies. The
- contents of the section are an array of the following union. The
- first element uses the gt_header field. The remaining elements use
- the gt_entry field. */
-typedef union
-{
- struct
- {
- /* -G value actually used for this object file. */
- unsigned long gt_current_g_value;
- /* Unused. */
- unsigned long gt_unused;
- } gt_header;
- struct
- {
- /* If this -G argument has been used... */
- unsigned long gt_g_value;
- /* ...this many GP section bytes would be required. */
- unsigned long gt_bytes;
- } gt_entry;
-} Elf32_gptab;
-
-/* The external version of Elf32_gptab. */
-
-typedef union
-{
- struct
- {
- unsigned char gt_current_g_value[4];
- unsigned char gt_unused[4];
- } gt_header;
- struct
- {
- unsigned char gt_g_value[4];
- unsigned char gt_bytes[4];
- } gt_entry;
-} Elf32_External_gptab;
-
-/* A section of type SHT_MIPS_REGINFO contains the following
- structure. */
-typedef struct
-{
- /* Mask of general purpose registers used. */
- unsigned long ri_gprmask;
- /* Mask of co-processor registers used. */
- unsigned long ri_cprmask[4];
- /* GP register value for this object file. */
- long ri_gp_value;
-} Elf32_RegInfo;
-
-/* The external version of the Elf_RegInfo structure. */
-typedef struct
-{
- unsigned char ri_gprmask[4];
- unsigned char ri_cprmask[4][4];
- unsigned char ri_gp_value[4];
-} Elf32_External_RegInfo;
-
-/* MIPS ELF .reginfo swapping routines. */
-extern void bfd_mips_elf32_swap_reginfo_in
- PARAMS ((bfd *, const Elf32_External_RegInfo *, Elf32_RegInfo *));
-extern void bfd_mips_elf32_swap_reginfo_out
- PARAMS ((bfd *, const Elf32_RegInfo *, Elf32_External_RegInfo *));
-
-/* Processor specific section flags. */
-
-/* This section must be in the global data area. */
-#define SHF_MIPS_GPREL 0x10000000
-
-/* Processor specific program header types. */
-
-/* Register usage information. Identifies one .reginfo section. */
-#define PT_MIPS_REGINFO 0x70000000
-
-/* Runtime procedure table. */
-#define PT_MIPS_RTPROC 0x70000001
-
-/* Processor specific dynamic array tags. */
-
-/* 32 bit version number for runtime linker interface. */
-#define DT_MIPS_RLD_VERSION 0x70000001
-
-/* Time stamp. */
-#define DT_MIPS_TIME_STAMP 0x70000002
-
-/* Checksum of external strings and common sizes. */
-#define DT_MIPS_ICHECKSUM 0x70000003
-
-/* Index of version string in string table. */
-#define DT_MIPS_IVERSION 0x70000004
-
-/* 32 bits of flags. */
-#define DT_MIPS_FLAGS 0x70000005
-
-/* Base address of the segment. */
-#define DT_MIPS_BASE_ADDRESS 0x70000006
-
-/* Address of .conflict section. */
-#define DT_MIPS_CONFLICT 0x70000008
-
-/* Address of .liblist section. */
-#define DT_MIPS_LIBLIST 0x70000009
-
-/* Number of local global offset table entries. */
-#define DT_MIPS_LOCAL_GOTNO 0x7000000a
-
-/* Number of entries in the .conflict section. */
-#define DT_MIPS_CONFLICTNO 0x7000000b
-
-/* Number of entries in the .liblist section. */
-#define DT_MIPS_LIBLISTNO 0x70000010
-
-/* Number of entries in the .dynsym section. */
-#define DT_MIPS_SYMTABNO 0x70000011
-
-/* Index of first external dynamic symbol not referenced locally. */
-#define DT_MIPS_UNREFEXTNO 0x70000012
-
-/* Index of first dynamic symbol in global offset table. */
-#define DT_MIPS_GOTSYM 0x70000013
-
-/* Number of page table entries in global offset table. */
-#define DT_MIPS_HIPAGENO 0x70000014
-
-/* Address of run time loader map, used for debugging. */
-#define DT_MIPS_RLD_MAP 0x70000016
-
-/* Flags which may appear in a DT_MIPS_FLAGS entry. */
-
-/* No flags. */
-#define RHF_NONE 0x00000000
-
-/* Uses shortcut pointers. */
-#define RHF_QUICKSTART 0x00000001
-
-/* Hash size is not a power of two. */
-#define RHF_NOTPOT 0x00000002
-
-/* Ignore LD_LIBRARY_PATH. */
-#define RHS_NO_LIBRARY_REPLACEMENT \
- 0x00000004
-
-/* Special values for the st_other field in the symbol table. These
- are used in an Irix 5 dynamic symbol table. */
-
-#define STO_DEFAULT 0x00
-#define STO_INTERNAL 0x01
-#define STO_HIDDEN 0x02
-#define STO_PROTECTED 0x03
-
-#endif /* _ELF_MIPS_H */
diff --git a/contrib/gdb/include/elf/ppc.h b/contrib/gdb/include/elf/ppc.h
deleted file mode 100644
index 1da118ddd842..000000000000
--- a/contrib/gdb/include/elf/ppc.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* PPC ELF support for BFD.
- Copyright (C) 1995 Free Software Foundation, Inc.
-
- By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
- in the System V Application Binary Interface, PowerPC Processor Supplement
- and the PowerPC Embedded Application Binary Interface (eabi).
-
-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. */
-
-/* This file holds definitions specific to the PPC ELF ABI. Note
- that most of this is not actually implemented by BFD. */
-
-#ifndef _ELF_PPC_H
-#define _ELF_PPC_H
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag */
-
- /* CYGNUS local bits below */
-#define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag */
-#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag */
-
-/* Processor specific section headers, sh_type field */
-
-#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
- entries in this section \
- based on the address \
- specified in the associated \
- symbol table entry. */
-
-/* Processor specific section flags, sh_flags field */
-
-#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \
- this section from executable \
- and shared objects that it \
- builds when those objects \
- are not to be furhter \
- relocated. */
-#endif /* _ELF_PPC_H */
diff --git a/contrib/gdb/include/elf/sparc.h b/contrib/gdb/include/elf/sparc.h
deleted file mode 100644
index 84408e31adda..000000000000
--- a/contrib/gdb/include/elf/sparc.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* SPARC ELF support for BFD.
- Copyright (C) 1996 Free Software Foundation, Inc.
-
- By Doug Evans, Cygnus Support, <dje@cygnus.com>.
-
-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_SPARC_H
-#define _ELF_SPARC_H
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* These are defined by Sun. */
-
-#define EF_SPARC_32PLUS_MASK 0xffff00 /* bits indicating V8+ type */
-#define EF_SPARC_32PLUS 0x000100 /* generic V8+ features */
-#define EF_SPARC_SUN_US1 0x000200 /* Sun UltraSPARC1 extensions */
-
-/* Relocation types. */
-
-enum elf_sparc_reloc_type {
- R_SPARC_NONE = 0,
- R_SPARC_8, R_SPARC_16, R_SPARC_32,
- R_SPARC_DISP8, R_SPARC_DISP16, R_SPARC_DISP32,
- R_SPARC_WDISP30, R_SPARC_WDISP22,
- R_SPARC_HI22, R_SPARC_22,
- R_SPARC_13, R_SPARC_LO10,
- R_SPARC_GOT10, R_SPARC_GOT13, R_SPARC_GOT22,
- R_SPARC_PC10, R_SPARC_PC22,
- R_SPARC_WPLT30,
- R_SPARC_COPY,
- R_SPARC_GLOB_DAT, R_SPARC_JMP_SLOT,
- R_SPARC_RELATIVE,
- R_SPARC_UA32,
-
- /* ??? These 6 relocs are new but not currently used. For binary
- compatility in the sparc64-elf toolchain, we leave them out.
- A non-binary upward compatible change is expected for sparc64-elf. */
-#ifndef SPARC64_OLD_RELOCS
- /* ??? New relocs on the UltraSPARC. Not sure what they're for yet. */
- R_SPARC_PLT32, R_SPARC_HIPLT22, R_SPARC_LOPLT10,
- R_SPARC_PCPLT32, R_SPARC_PCPLT22, R_SPARC_PCPLT10,
-#endif
-
- /* v9 relocs */
- R_SPARC_10, R_SPARC_11, R_SPARC_64,
- R_SPARC_OLO10, R_SPARC_HH22, R_SPARC_HM10, R_SPARC_LM22,
- R_SPARC_PC_HH22, R_SPARC_PC_HM10, R_SPARC_PC_LM22,
- R_SPARC_WDISP16, R_SPARC_WDISP19,
- R_SPARC_GLOB_JMP,
- R_SPARC_7,
-#ifndef SPARC64_OLD_RELOCS
- R_SPARC_5, R_SPARC_6,
-#endif
-
- R_SPARC_max
-};
-
-#endif /* _ELF_SPARC_H */
diff --git a/contrib/gdb/include/floatformat.h b/contrib/gdb/include/floatformat.h
deleted file mode 100644
index 01e3dcb2944d..000000000000
--- a/contrib/gdb/include/floatformat.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* IEEE floating point support declarations, for GDB, the GNU Debugger.
- Copyright (C) 1991 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#if !defined (FLOATFORMAT_H)
-#define FLOATFORMAT_H 1
-
-#include "ansidecl.h"
-
-/* A floatformat consists of a sign bit, an exponent and a mantissa. Once the
- bytes are concatenated according to the byteorder flag, then each of those
- fields is contiguous. We number the bits with 0 being the most significant
- (i.e. BITS_BIG_ENDIAN type numbering), and specify which bits each field
- contains with the *_start and *_len fields. */
-
-enum floatformat_byteorders { floatformat_little, floatformat_big };
-
-enum floatformat_intbit { floatformat_intbit_yes, floatformat_intbit_no };
-
-struct floatformat
-{
- enum floatformat_byteorders byteorder;
- unsigned int totalsize; /* Total size of number in bits */
-
- /* Sign bit is always one bit long. 1 means negative, 0 means positive. */
- unsigned int sign_start;
-
- unsigned int exp_start;
- unsigned int exp_len;
- /* Amount added to "true" exponent. 0x3fff for many IEEE extendeds. */
- unsigned int exp_bias;
- /* Exponent value which indicates NaN. This is the actual value stored in
- the float, not adjusted by the exp_bias. This usually consists of all
- one bits. */
- unsigned int exp_nan;
-
- unsigned int man_start;
- unsigned int man_len;
-
- /* Is the integer bit explicit or implicit? */
- enum floatformat_intbit intbit;
-};
-
-/* floatformats for IEEE single and double, big and little endian. */
-
-extern const struct floatformat floatformat_ieee_single_big;
-extern const struct floatformat floatformat_ieee_single_little;
-extern const struct floatformat floatformat_ieee_double_big;
-extern const struct floatformat floatformat_ieee_double_little;
-
-/* floatformats for various extendeds. */
-
-extern const struct floatformat floatformat_i387_ext;
-extern const struct floatformat floatformat_m68881_ext;
-extern const struct floatformat floatformat_i960_ext;
-extern const struct floatformat floatformat_m88110_ext;
-extern const struct floatformat floatformat_arm_ext;
-
-/* Convert from FMT to a double.
- FROM is the address of the extended float.
- Store the double in *TO. */
-
-extern void
-floatformat_to_double PARAMS ((const struct floatformat *, char *, double *));
-
-/* The converse: convert the double *FROM to FMT
- and store where TO points. */
-
-extern void
-floatformat_from_double PARAMS ((const struct floatformat *,
- double *, char *));
-
-#endif /* defined (FLOATFORMAT_H) */
diff --git a/contrib/gdb/include/fopen-bin.h b/contrib/gdb/include/fopen-bin.h
deleted file mode 100644
index b868f63d46d1..000000000000
--- a/contrib/gdb/include/fopen-bin.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Macros for the 'type' part of an fopen, freopen or fdopen.
-
- <Read|Write>[Update]<Binary file|text file>
-
- This version is for "binary" systems, where text and binary files are
- different. An example is Mess-Dose. Many Unix systems could also
- cope with a "b" in the string, indicating binary files, but some reject this
- (and thereby don't conform to ANSI C, but what else is new?).
-
- This file is designed for inclusion by host-dependent .h files. No
- user application should include it directly, since that would make
- the application unable to be configured for both "same" and "binary"
- variant systems. */
-
-#define FOPEN_RB "rb"
-#define FOPEN_WB "wb"
-#define FOPEN_AB "ab"
-#define FOPEN_RUB "r+b"
-#define FOPEN_WUB "w+b"
-#define FOPEN_AUB "a+b"
-
-#define FOPEN_RT "r"
-#define FOPEN_WT "w"
-#define FOPEN_AT "a"
-#define FOPEN_RUT "r+"
-#define FOPEN_WUT "w+"
-#define FOPEN_AUT "a+"
diff --git a/contrib/gdb/include/fopen-same.h b/contrib/gdb/include/fopen-same.h
deleted file mode 100644
index 0f37529d33e0..000000000000
--- a/contrib/gdb/include/fopen-same.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Macros for the 'type' part of an fopen, freopen or fdopen.
-
- <Read|Write>[Update]<Binary file|text file>
-
- This version is for "same" systems, where text and binary files are
- the same. An example is Unix. Many Unix systems could also add a
- "b" to the string, indicating binary files, but some reject this
- (and thereby don't conform to ANSI C, but what else is new?).
-
- This file is designed for inclusion by host-dependent .h files. No
- user application should include it directly, since that would make
- the application unable to be configured for both "same" and "binary"
- variant systems. */
-
-#define FOPEN_RB "r"
-#define FOPEN_WB "w"
-#define FOPEN_AB "a"
-#define FOPEN_RUB "r+"
-#define FOPEN_WUB "w+"
-#define FOPEN_AUB "a+"
-
-#define FOPEN_RT "r"
-#define FOPEN_WT "w"
-#define FOPEN_AT "a"
-#define FOPEN_RUT "r+"
-#define FOPEN_WUT "w+"
-#define FOPEN_AUT "a+"
diff --git a/contrib/gdb/include/gdbm.h b/contrib/gdb/include/gdbm.h
deleted file mode 100644
index 3ebc26d198a7..000000000000
--- a/contrib/gdb/include/gdbm.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* GNU DBM - DataBase Manager include file
- Copyright 1989, 1991 Free Software Foundation, Inc.
- Written by Philip A. Nelson.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public 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 may contact the author by:
- e-mail: phil@wwu.edu
- us-mail: Philip A. Nelson
- Computer Science Department
- Western Washington University
- Bellingham, WA 98226
- phone: (206) 676-3035
-
-*************************************************************************/
-
-/* Parameters to gdbm_open for READERS, WRITERS, and WRITERS who
- can create the database. */
-#define GDBM_READER 0
-#define GDBM_WRITER 1
-#define GDBM_WRCREAT 2
-#define GDBM_NEWDB 3
-
-/* Parameters to gdbm_store for simple insertion or replacement. */
-#define GDBM_INSERT 0
-#define GDBM_REPLACE 1
-
-
-/* The data and key structure. This structure is defined for compatibility. */
-typedef struct {
- char *dptr;
- int dsize;
- } datum;
-
-
-/* The file information header. This is good enough for most applications. */
-typedef struct {int dummy[10];} *GDBM_FILE;
-
-
-/* These are the routines! */
-
-extern GDBM_FILE gdbm_open ();
-
-extern void gdbm_close ();
-
-extern datum gdbm_fetch ();
-
-extern int gdbm_store ();
-
-extern int gdbm_delete ();
-
-extern datum gdbm_firstkey ();
-
-extern datum gdbm_nextkey ();
-
-extern int gdbm_reorganize ();
-
-
-/* gdbm sends back the following error codes in the variable gdbm_errno. */
-typedef enum { NO_ERROR,
- MALLOC_ERROR,
- BLOCK_SIZE_ERROR,
- FILE_OPEN_ERROR,
- FILE_WRITE_ERROR,
- FILE_SEEK_ERROR,
- FILE_READ_ERROR,
- BAD_MAGIC_NUMBER,
- EMPTY_DATABASE,
- CANT_BE_READER,
- CANT_BE_WRITER,
- READER_CANT_RECOVER,
- READER_CANT_DELETE,
- READER_CANT_STORE,
- READER_CANT_REORGANIZE,
- UNKNOWN_UPDATE,
- ITEM_NOT_FOUND,
- REORGANIZE_FAILED,
- CANNOT_REPLACE}
- gdbm_error;
diff --git a/contrib/gdb/include/getopt.h b/contrib/gdb/include/getopt.h
deleted file mode 100644
index abf915383200..000000000000
--- a/contrib/gdb/include/getopt.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Declarations for getopt.
- Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
-
- This program 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, or
- (at your option) any later version.
-
- This program is distributed in the hope that 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 this program; if not, write to the Free Software
- Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef _GETOPT_H
-#define _GETOPT_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns EOF, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message `getopt' prints
- for unrecognized options. */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized. */
-
-extern int optopt;
-
-/* Describe the long-named options requested by the application.
- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of `struct option' terminated by an element containing a name which is
- zero.
-
- The field `has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
-
- If the field `flag' is not NULL, it points to a variable that is set
- to the value given in the field `val' when the option is found, but
- left unchanged if the option is not found.
-
- To have a long-named option do something other than set an `int' to
- a compiled-in constant, such as set a value from `optarg', set the
- option's `flag' field to zero and its `val' field to a nonzero
- value (the equivalent single-letter option character, if there is
- one). For long options that have a zero `flag' field, `getopt'
- returns the contents of the `val' field. */
-
-struct option
-{
-#if __STDC__
- const char *name;
-#else
- char *name;
-#endif
- /* has_arg can't be an enum because some compilers complain about
- type mismatches in all the code that assumes it is an int. */
- int has_arg;
- int *flag;
- int val;
-};
-
-/* Names for the values of the `has_arg' field of `struct option'. */
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-#if __STDC__
-#if defined(__GNU_LIBRARY__)
-/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in stdlib.h. To avoid compilation
- errors, only prototype getopt for the GNU C library. */
-extern int getopt (int argc, char *const *argv, const char *shortopts);
-#else /* not __GNU_LIBRARY__ */
-extern int getopt ();
-#endif /* not __GNU_LIBRARY__ */
-extern int getopt_long (int argc, char *const *argv, const char *shortopts,
- const struct option *longopts, int *longind);
-extern int getopt_long_only (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind);
-
-/* Internal only. Users should not call this directly. */
-extern int _getopt_internal (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind,
- int long_only);
-#else /* not __STDC__ */
-extern int getopt ();
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
-#endif /* not __STDC__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GETOPT_H */
diff --git a/contrib/gdb/include/hp-symtab.h b/contrib/gdb/include/hp-symtab.h
deleted file mode 100644
index 051c4c63ed2d..000000000000
--- a/contrib/gdb/include/hp-symtab.h
+++ /dev/null
@@ -1,983 +0,0 @@
-/* Definitions and structures for reading debug symbols from the
- native HP C compiler.
-
- Written by the Center for Software Science at the University of Utah
- and by Cygnus Support.
-
- Copyright 1994 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 HP_SYMTAB_INCLUDED
-#define HP_SYMTAB_INCLUDED
-
-/* General information:
-
- This header file defines and describes only the basic data structures
- necessary to read debug symbols produced by the HP C compiler using the
- SOM object file format. Definitions and structures used by other compilers
- for other languages or object file formats may be missing.
- (For a full description of the debug format, ftp hpux-symtab.h from
- jaguar.cs.utah.edu:/dist).
-
-
- Debug symbols are contained entirely within an unloadable space called
- $DEBUG$. $DEBUG$ contains several subspaces which group related
- debug symbols.
-
- $GNTT$ contains information for global variables, types and contants.
-
- $LNTT$ contains information for procedures (including nesting), scoping
- information, local variables, types, and constants.
-
- $SLT$ contains source line information so that code addresses may be
- mapped to source lines.
-
- $VT$ contains various strings and constants for named objects (variables,
- typedefs, functions, etc). Strings are stored as null-terminated character
- lists. Constants always begin on word boundaries. The first byte of
- the VT must be zero (a null string).
-
- $XT$ is not currently used by GDB.
-
- Many structures within the subspaces point to other structures within
- the same subspace, or to structures within a different subspace. These
- pointers are represented as a structure index from the beginning of
- the appropriate subspace. */
-
-/* Used to describe where a constant is stored. */
-enum location_type
-{
- LOCATION_IMMEDIATE,
- LOCATION_PTR,
- LOCATION_VT,
-};
-
-/* Languages supported by this debug format. Within the data structures
- this type is limited to 4 bits for a maximum of 16 languages. */
-enum hp_language
-{
- HP_LANGUAGE_UNKNOWN,
- HP_LANGUAGE_C,
- HP_LANGUAGE_F77,
- HP_LANGUAGE_PASCAL,
- HP_LANGUAGE_COBOL,
- HP_LANGUAGE_BASIC,
- HP_LANGUAGE_ADA,
- HP_LANGUAGE_CPLUSPLUS,
-};
-
-
-/* Basic data types available in this debug format. Within the data
- structures this type is limited to 5 bits for a maximum of 32 basic
- data types. */
-enum hp_type
-{
- HP_TYPE_UNDEFINED,
- HP_TYPE_BOOLEAN,
- HP_TYPE_CHAR,
- HP_TYPE_INT,
- HP_TYPE_UNSIGNED_INT,
- HP_TYPE_REAL,
- HP_TYPE_COMPLEX,
- HP_TYPE_STRING200,
- HP_TYPE_LONGSTRING200,
- HP_TYPE_TEXT,
- HP_TYPE_FLABEL,
- HP_TYPE_FTN_STRING_SPEC,
- HP_TYPE_MOD_STRING_SPEC,
- HP_TYPE_PACKED_DECIMAL,
- HP_TYPE_REAL_3000,
- HP_TYPE_MOD_STRING_3000,
- HP_TYPE_ANYPOINTER,
- HP_TYPE_GLOBAL_ANYPOINTER,
- HP_TYPE_LOCAL_ANYPOINTER,
- HP_TYPE_COMPLEXS3000,
- HP_TYPE_FTN_STRING_S300_COMPAT,
- HP_TYPE_FTN_STRING_VAX_COMPAT,
- HP_TYPE_BOOLEAN_S300_COMPAT,
- HP_TYPE_BOOLEAN_VAX_COMPAT,
- HP_TYPE_WIDE_CHAR,
- HP_TYPE_LONG,
- HP_TYPE_UNSIGNED_LONG,
- HP_TYPE_DOUBLE,
- HP_TYPE_TEMPLATE_ARG,
-};
-
-/* An immediate name and type table entry.
-
- extension and immediate will always be one.
- global will always be zero.
- hp_type is the basic type this entry describes.
- bitlength is the length in bits for the basic type. */
-struct dnttp_immediate
-{
- unsigned int extension: 1;
- unsigned int immediate: 1;
- unsigned int global: 1;
- unsigned int type: 5;
- unsigned int bitlength: 24;
-};
-
-/* A nonimmediate name and type table entry.
-
- extension will always be one.
- immediate will always be zero.
- if global is zero, this entry points into the LNTT
- if global is one, this entry points into the GNTT
- index is the index within the GNTT or LNTT for this entry. */
-struct dnttp_nonimmediate
-{
- unsigned int extension: 1;
- unsigned int immediate: 1;
- unsigned int global: 1;
- unsigned int index: 29;
-};
-
-/* A pointer to an entry in the GNTT and LNTT tables. It has two
- forms depending on the type being described.
-
- The immediate form is used for simple entries and is one
- word.
-
- The nonimmediate form is used for complex entries and contains
- an index into the LNTT or GNTT which describes the entire type.
-
- If a dnttpointer is -1, then it is a NIL entry. */
-
-#define DNTTNIL (-1)
-typedef union dnttpointer
-{
- struct dnttp_immediate dntti;
- struct dnttp_nonimmediate dnttp;
- int word;
-} dnttpointer;
-
-/* An index into the source line table. As with dnttpointers, a sltpointer
- of -1 indicates a NIL entry. */
-#define SLTNIL (-1)
-typedef int sltpointer;
-
-/* Unsigned byte offset into the VT. */
-typedef unsigned int vtpointer;
-
-/* A DNTT entry (used within the GNTT and LNTT).
-
- DNTT entries are variable sized objects, but are always a multiple
- of 3 words (we call each group of 3 words a "block").
-
- The first bit in each block is an extension bit. This bit is zero
- for the first block of a DNTT entry. If the entry requires more
- than one block, then this bit is set to one in all blocks after
- the first one. */
-
-/* Each DNTT entry describes a particular debug symbol (beginning of
- a source file, a function, variables, structures, etc.
-
- The type of the DNTT entry is stored in the "kind" field within the
- DNTT entry itself. */
-
-enum dntt_entry_type
-{
- DNTT_TYPE_NIL = -1,
- DNTT_TYPE_SRCFILE,
- DNTT_TYPE_MODULE,
- DNTT_TYPE_FUNCTION,
- DNTT_TYPE_ENTRY,
- DNTT_TYPE_BEGIN,
- DNTT_TYPE_END,
- DNTT_TYPE_IMPORT,
- DNTT_TYPE_LABEL,
- DNTT_TYPE_FPARAM,
- DNTT_TYPE_SVAR,
- DNTT_TYPE_DVAR,
- DNTT_TYPE_HOLE1,
- DNTT_TYPE_CONST,
- DNTT_TYPE_TYPEDEF,
- DNTT_TYPE_TAGDEF,
- DNTT_TYPE_POINTER,
- DNTT_TYPE_ENUM,
- DNTT_TYPE_MEMENUM,
- DNTT_TYPE_SET,
- DNTT_TYPE_SUBRANGE,
- DNTT_TYPE_ARRAY,
- DNTT_TYPE_STRUCT,
- DNTT_TYPE_UNION,
- DNTT_TYPE_FIELD,
- DNTT_TYPE_VARIANT,
- DNTT_TYPE_FILE,
- DNTT_TYPE_FUNCTYPE,
- DNTT_TYPE_WITH,
- DNTT_TYPE_COMMON,
- DNTT_TYPE_COBSTRUCT,
- DNTT_TYPE_XREF,
- DNTT_TYPE_SA,
- DNTT_TYPE_MACRO,
- DNTT_TYPE_BLOCKDATA,
- DNTT_TYPE_CLASS_SCOPE,
- DNTT_TYPE_REFERENCE,
- DNTT_TYPE_PTRMEM,
- DNTT_TYPE_PTRMEMFUNC,
- DNTT_TYPE_CLASS,
- DNTT_TYPE_GENFIELD,
- DNTT_TYPE_VFUNC,
- DNTT_TYPE_MEMACCESS,
- DNTT_TYPE_INHERITANCE,
- DNTT_TYPE_FRIEND_CLASS,
- DNTT_TYPE_FRIEND_FUNC,
- DNTT_TYPE_MODIFIER,
- DNTT_TYPE_OBJECT_ID,
- DNTT_TYPE_MEMFUNC,
- DNTT_TYPE_TEMPLATE,
- DNTT_TYPE_TEMPLATE_ARG,
- DNTT_TYPE_FUNC_TEMPLATE,
- DNTT_TYPE_LINK,
- DNTT_TYPE_MAX,
-};
-
-/* DNTT_TYPE_SRCFILE:
-
- One DNTT_TYPE_SRCFILE symbol is output for the start of each source
- file and at the begin and end of an included file. A DNTT_TYPE_SRCFILE
- entry is also output before each DNTT_TYPE_FUNC symbol so that debuggers
- can determine what file a function was defined in.
-
- LANGUAGE describes the source file's language.
-
- NAME points to an VT entry providing the source file's name.
-
- Note the name used for DNTT_TYPE_SRCFILE entries are exactly as seen
- by the compiler (ie they may be relative or absolute). C include files
- via <> inclusion must use absolute paths.
-
- ADDRESS points to an SLT entry from which line number and code locations
- may be determined. */
-
-struct dntt_type_srcfile
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int language: 4;
- unsigned int unused: 17;
- vtpointer name;
- sltpointer address;
-};
-
-/* DNTT_TYPE_MODULE:
-
- A DNTT_TYPE_MODULE symbol is emitted for the start of a pascal
- module or C source file.
-
- Each DNTT_TYPE_MODULE must have an associated DNTT_TYPE_END symbol.
-
- NAME points to a VT entry providing the module's name. Note C
- source files are considered nameless modules.
-
- ALIAS point to a VT entry providing a secondary name.
-
- ADDRESS points to an SLT entry from which line number and code locations
- may be determined. */
-
-struct dntt_type_module
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int unused: 21;
- vtpointer name;
- vtpointer alias;
- dnttpointer unused2;
- sltpointer address;
-};
-
-/* DNTT_TYPE_FUNCTION:
-
- A DNTT_TYPE_FUNCTION symbol is emitted for each function definition;
- a DNTT_TYPE_ENTRY symbols is used for secondary entry points. Both
- symbols used the dntt_type_function structure.
-
- Each DNTT_TYPE_FUNCTION must have a matching DNTT_TYPE_END.
-
- GLOBAL is nonzero if the function has global scope.
-
- LANGUAGE describes the function's source language.
-
- OPT_LEVEL describes the optimization level the function was compiled
- with.
-
- VARARGS is nonzero if the function uses varargs.
-
- NAME points to a VT entry providing the function's name.
-
- ALIAS points to a VT entry providing a secondary name for the function.
-
- FIRSTPARAM points to a LNTT entry which describes the parameter list.
-
- ADDRESS points to an SLT entry from which line number and code locations
- may be determined.
-
- ENTRYADDR is the memory address corresponding the the function's entry point
-
- RETVAL points to a LNTT entry describing the function's return value.
-
- LOWADDR is the lowest memory address associated with this function.
-
- HIADDR is the highest memory address associated with this function. */
-
-struct dntt_type_function
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int global: 1;
- unsigned int language: 4;
- unsigned int nest_level: 5;
- unsigned int opt_level: 2;
- unsigned int varargs: 1;
- unsigned int lang_info: 4;
- unsigned int inlined: 1;
- unsigned int localalloc: 1;
- unsigned int expansion: 1;
- unsigned int unused: 1;
- vtpointer name;
- vtpointer alias;
- dnttpointer firstparam;
- sltpointer address;
- CORE_ADDR entryaddr;
- dnttpointer retval;
- CORE_ADDR lowaddr;
- CORE_ADDR hiaddr;
-};
-
-/* DNTT_TYPE_BEGIN:
-
- A DNTT_TYPE_BEGIN symbol is emitted to begin a new nested scope.
- Every DNTT_TYPE_BEGIN symbol must have a matching DNTT_TYPE_END symbol.
-
- CLASSFLAG is nonzero if this is the beginning of a c++ class definition.
-
- ADDRESS points to an SLT entry from which line number and code locations
- may be determined. */
-
-struct dntt_type_begin
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int classflag: 1;
- unsigned int unused: 20;
- sltpointer address;
-};
-
-/* DNTT_TYPE_END:
-
- A DNTT_TYPE_END symbol is emitted when closing a scope started by
- a DNTT_TYPE_MODULE, DNTT_TYPE_FUNCTION, and DNTT_TYPE_BEGIN symbols.
-
- ENDKIND describes what type of scope the DNTT_TYPE_END is closing
- (DNTT_TYPE_MODULE, DNTT_TYPE_BEGIN, etc).
-
- CLASSFLAG is nonzero if this is the end of a c++ class definition.
-
- ADDRESS points to an SLT entry from which line number and code locations
- may be determined.
-
- BEGINSCOPE points to the LNTT entry which opened the scope. */
-
-struct dntt_type_end
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int endkind: 10;
- unsigned int classflag: 1;
- unsigned int unused: 10;
- sltpointer address;
- dnttpointer beginscope;
-};
-
-/* DNTT_TYPE_IMPORT is unused by GDB. */
-/* DNTT_TYPE_LABEL is unused by GDB. */
-
-/* DNTT_TYPE_FPARAM:
-
- A DNTT_TYPE_FPARAM symbol is emitted for a function argument. When
- chained together the symbols represent an argument list for a function.
-
- REGPARAM is nonzero if this parameter was passed in a register.
-
- INDIRECT is nonzero if this parameter is a pointer to the parameter
- (pass by reference or pass by value for large items).
-
- LONGADDR is nonzero if the parameter is a 64bit pointer.
-
- NAME is a pointer into the VT for the parameter's name.
-
- LOCATION describes where the parameter is stored. Depending on the
- parameter type LOCATION could be a register number, or an offset
- from the stack pointer.
-
- TYPE points to a NTT entry describing the type of this parameter.
-
- NEXTPARAM points to the LNTT entry describing the next parameter. */
-
-struct dntt_type_fparam
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int regparam: 1;
- unsigned int indirect: 1;
- unsigned int longaddr: 1;
- unsigned int copyparam: 1;
- unsigned int dflt: 1;
- unsigned int unused: 16;
- vtpointer name;
- int location;
- dnttpointer type;
- dnttpointer nextparam;
- int misc;
-};
-
-/* DNTT_TYPE_SVAR:
-
- A DNTT_TYPE_SVAR is emitted to describe a variable in static storage.
-
- GLOBAL is nonzero if the variable has global scope.
-
- INDIRECT is nonzero if the variable is a pointer to an object.
-
- LONGADDR is nonzero if the variable is in long pointer space.
-
- STATICMEM is nonzero if the variable is a member of a class.
-
- A_UNION is nonzero if the variable is an anonymous union member.
-
- NAME is a pointer into the VT for the variable's name.
-
- LOCATION provides the memory address for the variable.
-
- TYPE is a pointer into either the GNTT or LNTT which describes
- the type of this variable. */
-
-struct dntt_type_svar
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int global: 1;
- unsigned int indirect: 1;
- unsigned int longaddr: 1;
- unsigned int staticmem: 1;
- unsigned int a_union: 1;
- unsigned int unused: 16;
- vtpointer name;
- CORE_ADDR location;
- dnttpointer type;
- unsigned int offset;
- unsigned int displacement;
-};
-
-/* DNTT_TYPE_DVAR:
-
- A DNTT_TYPE_DVAR is emitted to describe automatic variables and variables
- held in registers.
-
- GLOBAL is nonzero if the variable has global scope.
-
- INDIRECT is nonzero if the variable is a pointer to an object.
-
- REGVAR is nonzero if the variable is in a register.
-
- A_UNION is nonzero if the variable is an anonymous union member.
-
- NAME is a pointer into the VT for the variable's name.
-
- LOCATION provides the memory address or register number for the variable.
-
- TYPE is a pointer into either the GNTT or LNTT which describes
- the type of this variable. */
-
-struct dntt_type_dvar
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int global: 1;
- unsigned int indirect: 1;
- unsigned int regvar: 1;
- unsigned int a_union: 1;
- unsigned int unused: 17;
- vtpointer name;
- int location;
- dnttpointer type;
- unsigned int offset;
-};
-
-/* DNTT_TYPE_CONST:
-
- A DNTT_TYPE_CONST symbol is emitted for program constants.
-
- GLOBAL is nonzero if the constant has global scope.
-
- INDIRECT is nonzero if the constant is a pointer to an object.
-
- LOCATION_TYPE describes where to find the constant's value
- (in the VT, memory, or embedded in an instruction).
-
- CLASSMEM is nonzero if the constant is a member of a class.
-
- NAME is a pointer into the VT for the constant's name.
-
- LOCATION provides the memory address, register number or pointer
- into the VT for the constant's value.
-
- TYPE is a pointer into either the GNTT or LNTT which describes
- the type of this variable. */
-
-struct dntt_type_const
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int global: 1;
- unsigned int indirect: 1;
- unsigned int: 3;
- unsigned int classmem: 1;
- unsigned int unused: 15;
- vtpointer name;
- CORE_ADDR location;
- dnttpointer type;
- unsigned int offset;
- unsigned int displacement;
-};
-
-/* DNTT_TYPE_TYPEDEF and DNTT_TYPE_TAGDEF:
-
- The same structure is used to describe typedefs and tagdefs.
-
- DNTT_TYPE_TYPEDEFS are associated with C "typedefs".
-
- DNTT_TYPE_TAGDEFs are associated with C "struct", "union", and "enum"
- tags, which may have the same name as a typedef in the same scope.
-
- GLOBAL is nonzero if the typedef/tagdef has global scope.
-
- TYPEINFO is used to determine if full type information is available
- for a tag. (usually 1, but can be zero for opaque types in C).
-
- NAME is a pointer into the VT for the constant's name.
-
- TYPE points to the underlying type for the typedef/tagdef in the
- GNTT or LNTT. */
-
-struct dntt_type_type
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int global: 1;
- unsigned int typeinfo: 1;
- unsigned int unused: 19;
- vtpointer name;
- dnttpointer type;
-};
-
-/* DNTT_TYPE_POINTER:
-
- Used to describe a pointer to an underlying type.
-
- POINTSTO is a pointer into the GNTT or LNTT for the type which this
- pointer points to.
-
- BITLENGTH is the length of the pointer (not the underlying type). */
-
-struct dntt_type_pointer
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int unused: 21;
- dnttpointer pointsto;
- unsigned int bitlength;
-};
-
-
-/* DNTT_TYPE_ENUM:
-
- Used to describe enumerated types.
-
- FIRSTMEM is a pointer to a DNTT_TYPE_MEMENUM in the GNTT/LNTT which
- describes the first member (and contains a pointer to the chain of
- members).
-
- BITLENGTH is the number of bits used to hold the values of the enum's
- members. */
-
-struct dntt_type_enum
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int unused: 21;
- dnttpointer firstmem;
- unsigned int bitlength;
-};
-
-/* DNTT_TYPE_MEMENUM
-
- Used to describe members of an enumerated type.
-
- CLASSMEM is nonzero if this member is part of a class.
-
- NAME points into the VT for the name of this member.
-
- VALUE is the value of this enumeration member.
-
- NEXTMEM points to the next DNTT_TYPE_MEMENUM in the chain. */
-
-struct dntt_type_memenum
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int classmem: 1;
- unsigned int unused: 20;
- vtpointer name;
- unsigned int value;
- dnttpointer nextmem;
-};
-
-/* DNTT_TYPE_SET
-
- DECLARATION describes the bitpacking of the set.
-
- SUBTYPE points to a DNTT entry describing the type of the members.
-
- BITLENGTH is the size of the set. */
-
-struct dntt_type_set
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int declaration: 2;
- unsigned int unused: 19;
- dnttpointer subtype;
- unsigned int bitlength;
-};
-
-/* DNTT_TYPE_SUBRANGE
-
- DYN_LOW describes the lower bound of the subrange:
-
- 00 for a constant lower bound (found in LOWBOUND).
-
- 01 for a dynamic lower bound with the lower bound found in the the
- memory address pointed to by LOWBOUND.
-
- 10 for a dynamic lower bound described by an variable found in the
- DNTT/LNTT (LOWBOUND would be a pointer into the DNTT/LNTT).
-
- DYN_HIGH is similar to DYN_LOW, except it describes the upper bound.
-
- SUBTYPE points to the type of the subrange.
-
- BITLENGTH is the length in bits needed to describe the subrange's
- values. */
-
-struct dntt_type_subrange
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int dyn_low: 2;
- unsigned int dyn_high: 2;
- unsigned int unused: 17;
- int lowbound;
- int highbound;
- dnttpointer subtype;
- unsigned int bitlength;
-};
-
-/* DNTT_TYPE_ARRAY
-
- DECLARATION describes the bit packing used in the array.
-
- ARRAYISBYTES is nonzero if the field in arraylength describes the
- length in bytes rather than in bits. A value of zero is used to
- describe an array with size 2**32.
-
- ELEMISBYTES is nonzero if the length if each element in the array
- is describes in bytes rather than bits. A value of zero is used
- to an element with size 2**32.
-
- ELEMORDER is nonzero if the elements are indexed in increasing order.
-
- JUSTIFIED if the elements are left justified to index zero.
-
- ARRAYLENGTH is the length of the array.
-
- INDEXTYPE is a DNTT pointer to the type used to index the array.
-
- ELEMTYPE is a DNTT pointer to the type for the array elements.
-
- ELEMLENGTH is the length of each element in the array (including
- any padding).
-
- Multi-dimensional arrays are represented by ELEMTYPE pointing to
- another DNTT_TYPE_ARRAY. */
-
-struct dntt_type_array
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int declaration: 2;
- unsigned int dyn_low: 2;
- unsigned int dyn_high: 2;
- unsigned int arrayisbytes: 1;
- unsigned int elemisbytes: 1;
- unsigned int elemorder: 1;
- unsigned int justified: 1;
- unsigned int unused: 11;
- unsigned int arraylength;
- dnttpointer indextype;
- dnttpointer elemtype;
- unsigned int elemlength;
-};
-
-/* DNTT_TYPE_STRUCT
-
- DNTT_TYPE_STRUCT is used to describe a C structure.
-
- DECLARATION describes the bitpacking used.
-
- FIRSTFIELD is a DNTT pointer to the first field of the structure
- (each field contains a pointer to the next field, walk the list
- to access all fields of the structure).
-
- VARTAGFIELD and VARLIST are used for Pascal variant records.
-
- BITLENGTH is the size of the structure in bits. */
-
-struct dntt_type_struct
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int declaration: 2;
- unsigned int unused: 19;
- dnttpointer firstfield;
- dnttpointer vartagfield;
- dnttpointer varlist;
- unsigned int bitlength;
-};
-
-/* DNTT_TYPE_UNION
-
- DNTT_TYPE_UNION is used to describe a C union.
-
- FIRSTFIELD is a DNTT pointer to the beginning of the field chain.
-
- BITLENGTH is the size of the union in bits. */
-
-struct dntt_type_union
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int unused: 21;
- dnttpointer firstfield;
- unsigned int bitlength;
-};
-
-/* DNTT_TYPE_FIELD
-
- DNTT_TYPE_FIELD describes one field in a structure or union.
-
- VISIBILITY is used to describe the visibility of the field
- (for c++. public = 0, protected = 1, private = 2).
-
- A_UNION is nonzero if this field is a member of an anonymous union.
-
- STATICMEM is nonzero if this field is a static member of a template.
-
- NAME is a pointer into the VT for the name of the field.
-
- BITOFFSET gives the offset of this field in bits from the beginning
- of the structure or union this field is a member of.
-
- TYPE is a DNTT pointer to the type describing this field.
-
- BITLENGTH is the size of the entry in bits.
-
- NEXTFIELD is a DNTT pointer to the next field in the chain. */
-
-struct dntt_type_field
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int visibility: 2;
- unsigned int a_union: 1;
- unsigned int staticmem: 1;
- unsigned int unused: 17;
- vtpointer name;
- unsigned int bitoffset;
- dnttpointer type;
- unsigned int bitlength;
- dnttpointer nextfield;
-};
-
-/* DNTT_TYPE_VARIANT is unused by GDB. */
-/* DNTT_TYPE_FILE is unused by GDB. */
-
-/* DNTT_TYPE_COMMON is unused by GDB. */
-/* DNTT_TYPE_LINK is unused by GDB. */
-/* DNTT_TYPE_FFUNC_LINK is unused by GDB. */
-/* DNTT_TYPE_TEMPLATE is unused by GDB. */
-
-/* DNTT_TYPE_FUNCTYPE
-
- VARARGS is nonzero if this function uses varargs.
-
- FIRSTPARAM is a DNTT pointer to the first entry in the parameter
- chain.
-
- RETVAL is a DNTT pointer to the type of the return value. */
-
-struct dntt_type_functype
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int varargs: 1;
- unsigned int info: 4;
- unsigned int unused: 16;
- unsigned int bitlength;
- dnttpointer firstparam;
- dnttpointer retval;
-};
-
-/* DNTT_TYPE_WITH is unued by GDB. */
-/* DNTT_TYPE_COBSTRUCT is unused by GDB. */
-/* DNTT_TYPE_MODIFIER is unused by GDB. */
-/* DNTT_TYPE_GENFIELD is unused by GDB. */
-/* DNTT_TYPE_MEMACCESS is unused by GDB. */
-/* DNTT_TYPE_VFUNC is unused by GDB. */
-/* DNTT_TYPE_CLASS_SCOPE is unused by GDB. */
-/* DNTT_TYPE_FRIEND_CLASS is unused by GDB. */
-/* DNTT_TYPE_FRIEND_FUNC is unused by GDB. */
-/* DNTT_TYPE_CLASS unused by GDB. */
-/* DNTT_TYPE_TEMPLATE unused by GDB. */
-/* DNTT_TYPE_TEMPL_ARG is unused by GDB. */
-/* DNTT_TYPE_PTRMEM not used by GDB */
-/* DNTT_TYPE_INHERITANCE is unused by GDB. */
-/* DNTT_TYPE_OBJECT_ID is unused by GDB. */
-/* DNTT_TYPE_XREF is unused by GDB. */
-/* DNTT_TYPE_SA is unused by GDB. */
-
-/* DNTT_TYPE_GENERIC and DNTT_TYPE_BLOCK are convience structures
- so we can examine a DNTT entry in a generic fashion. */
-struct dntt_type_generic
-{
- unsigned int word[9];
-};
-
-struct dntt_type_block
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int unused: 21;
- unsigned int word[2];
-};
-
-/* One entry in a DNTT (either the LNTT or GNTT). */
-union dnttentry
-{
- struct dntt_type_srcfile dsfile;
- struct dntt_type_module dmodule;
- struct dntt_type_function dfunc;
- struct dntt_type_function dentry;
- struct dntt_type_begin dbegin;
- struct dntt_type_end dend;
- struct dntt_type_fparam dfparam;
- struct dntt_type_svar dsvar;
- struct dntt_type_dvar ddvar;
- struct dntt_type_const dconst;
- struct dntt_type_type dtype;
- struct dntt_type_type dtag;
- struct dntt_type_pointer dptr;
- struct dntt_type_enum denum;
- struct dntt_type_memenum dmember;
- struct dntt_type_set dset;
- struct dntt_type_subrange dsubr;
- struct dntt_type_array darray;
- struct dntt_type_struct dstruct;
- struct dntt_type_union dunion;
- struct dntt_type_field dfield;
- struct dntt_type_functype dfunctype;
- struct dntt_type_generic dgeneric;
- struct dntt_type_block dblock;
-};
-
-/* Source line entry types. */
-enum slttype
-{
- SLT_NORMAL,
- SLT_SRCFILE,
- SLT_MODULE,
- SLT_FUNCTION,
- SLT_ENTRY,
- SLT_BEGIN,
- SLT_END,
- SLT_WITH,
- SLT_EXIT,
- SLT_ASSIST,
- SLT_MARKER,
-};
-
-/* A normal source line entry. Simply provides a mapping of a source
- line number to a code address.
-
- SLTDESC will always be SLT_NORMAL or SLT_EXIT. */
-
-struct slt_normal
-{
- unsigned int sltdesc: 4;
- unsigned int line: 28;
- CORE_ADDR address;
-};
-
-/* A special source line entry. Provides a mapping of a declaration
- to a line number. These entries point back into the DNTT which
- references them. */
-
-struct slt_special
-{
- unsigned int sltdesc: 4;
- unsigned int line: 28;
- dnttpointer backptr;
-};
-
-/* Used to describe nesting.
-
- For nested languages, an slt_assist entry must follow each SLT_FUNC
- entry in the SLT. The address field will point forward to the
- first slt_normal entry within the function's scope. */
-
-struct slt_assist
-{
- unsigned int sltdesc: 4;
- unsigned int unused: 28;
- sltpointer address;
-};
-
-struct slt_generic
-{
- unsigned int word[2];
-};
-
-union sltentry
-{
- struct slt_normal snorm;
- struct slt_special sspec;
- struct slt_assist sasst;
- struct slt_generic sgeneric;
-};
-
-#endif /* HP_SYMTAB_INCLUDED */
diff --git a/contrib/gdb/include/ieee.h b/contrib/gdb/include/ieee.h
deleted file mode 100644
index 5ade39d33e35..000000000000
--- a/contrib/gdb/include/ieee.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* IEEE Standard 695-1980 "Universal Format for Object Modules" header file
- Contributed by Cygnus Support. */
-
-#define N_W_VARIABLES 8
-#define Module_Beginning 0xe0
-
-typedef struct ieee_module {
- char *processor;
- char *module_name;
-} ieee_module_begin_type;
-
-#define Address_Descriptor 0xec
-typedef struct ieee_address {
-bfd_vma number_of_bits_mau;
- bfd_vma number_of_maus_in_address;
-
- unsigned char byte_order;
-#define IEEE_LITTLE 0xcc
-#define IEEE_BIG 0xcd
-} ieee_address_descriptor_type;
-
-typedef union ieee_w_variable {
- file_ptr offset[N_W_VARIABLES];
- struct {
- file_ptr extension_record;
- file_ptr environmental_record;
- file_ptr section_part;
- file_ptr external_part;
- file_ptr debug_information_part;
- file_ptr data_part;
- file_ptr trailer_part;
- file_ptr me_record;
- } r;
-} ieee_w_variable_type;
-
-
-
-
-
-typedef enum ieee_record
-{
- ieee_number_start_enum = 0x00,
- ieee_number_end_enum=0x7f,
- ieee_number_repeat_start_enum = 0x80,
- ieee_number_repeat_end_enum = 0x88,
- ieee_number_repeat_4_enum = 0x84,
- ieee_number_repeat_3_enum = 0x83,
- ieee_number_repeat_2_enum = 0x82,
- ieee_number_repeat_1_enum = 0x81,
- ieee_module_beginning_enum = 0xe0,
- ieee_module_end_enum = 0xe1,
- ieee_extension_length_1_enum = 0xde,
- ieee_extension_length_2_enum = 0xdf,
- ieee_section_type_enum = 0xe6,
- ieee_section_alignment_enum = 0xe7,
- ieee_external_symbol_enum = 0xe8,
- ieee_comma = 0x90,
- ieee_external_reference_enum = 0xe9,
- ieee_set_current_section_enum = 0xe5,
- ieee_address_descriptor_enum = 0xec,
- ieee_load_constant_bytes_enum = 0xed,
- ieee_load_with_relocation_enum = 0xe4,
-
- ieee_variable_A_enum = 0xc1,
- ieee_variable_B_enum = 0xc2,
- ieee_variable_C_enum = 0xc3,
- ieee_variable_D_enum = 0xc4,
- ieee_variable_E_enum = 0xc5,
- ieee_variable_F_enum = 0xc6,
- ieee_variable_G_enum = 0xc7,
- ieee_variable_H_enum = 0xc8,
- ieee_variable_I_enum = 0xc9,
- ieee_variable_J_enum = 0xca,
- ieee_variable_K_enum = 0xcb,
- ieee_variable_L_enum = 0xcc,
- ieee_variable_M_enum = 0xcd,
- ieee_variable_N_enum = 0xce,
- ieee_variable_O_enum = 0xcf,
- ieee_variable_P_enum = 0xd0,
- ieee_variable_Q_enum = 0xd1,
- ieee_variable_R_enum = 0xd2,
- ieee_variable_S_enum = 0xd3,
- ieee_variable_T_enum = 0xd4,
- ieee_variable_U_enum = 0xd5,
- ieee_variable_V_enum = 0xd6,
- ieee_variable_W_enum = 0xd7,
- ieee_variable_X_enum = 0xd8,
- ieee_variable_Y_enum = 0xd9,
- ieee_variable_Z_enum = 0xda,
- ieee_function_plus_enum = 0xa5,
- ieee_function_minus_enum = 0xa6,
- ieee_function_signed_open_b_enum = 0xba,
- ieee_function_signed_close_b_enum = 0xbb,
-
- ieee_function_unsigned_open_b_enum = 0xbc,
- ieee_function_unsigned_close_b_enum = 0xbd,
-
- ieee_function_either_open_b_enum = 0xbe,
- ieee_function_either_close_b_enum = 0xbf,
- ieee_record_seperator_enum = 0xdb,
-
- ieee_e2_first_byte_enum = 0xe2,
- ieee_section_size_enum = 0xe2d3,
- ieee_physical_region_size_enum = 0xe2c1,
- ieee_region_base_address_enum = 0xe2c2,
- ieee_mau_size_enum = 0xe2c6,
- ieee_m_value_enum = 0xe2cd,
- ieee_section_base_address_enum = 0xe2cc,
- ieee_asn_record_enum = 0xe2ce,
- ieee_section_offset_enum = 0xe2d2,
- ieee_value_starting_address_enum = 0xe2c7,
- ieee_assign_value_to_variable_enum = 0xe2d7,
- ieee_set_current_pc_enum = 0xe2d0,
- ieee_value_record_enum = 0xe2c9,
- ieee_nn_record = 0xf0,
- ieee_at_record_enum = 0xf1,
- ieee_ty_record_enum = 0xf2,
- ieee_attribute_record_enum = 0xf1c9,
- ieee_atn_record_enum = 0xf1ce,
- ieee_external_reference_info_record_enum = 0xf1d8,
- ieee_weak_external_reference_enum= 0xf4,
- ieee_repeat_data_enum = 0xf7,
- ieee_bb_record_enum = 0xf8,
- ieee_be_record_enum = 0xf9
-} ieee_record_enum_type;
-
-
-typedef struct ieee_section {
- unsigned int section_index;
- unsigned int section_type;
- char *section_name;
- unsigned int parent_section_index;
- unsigned int sibling_section_index;
- unsigned int context_index;
-} ieee_section_type;
-#define IEEE_REFERENCE_BASE 11
-#define IEEE_PUBLIC_BASE 32
-#define IEEE_SECTION_NUMBER_BASE 1
-
diff --git a/contrib/gdb/include/libiberty.h b/contrib/gdb/include/libiberty.h
deleted file mode 100644
index dc083c8fe38a..000000000000
--- a/contrib/gdb/include/libiberty.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* Function declarations for libiberty.
- Written by Cygnus Support, 1994.
-
- The libiberty library provides a number of functions which are
- missing on some operating systems. We do not declare those here,
- to avoid conflicts with the system header files on operating
- systems that do support those functions. In this file we only
- declare those functions which are specific to libiberty. */
-
-#ifndef LIBIBERTY_H
-#define LIBIBERTY_H
-
-#include "ansidecl.h"
-
-/* Build an argument vector from a string. Allocates memory using
- malloc. Use freeargv to free the vector. */
-
-extern char **buildargv PARAMS ((char *));
-
-/* Free a vector returned by buildargv. */
-
-extern void freeargv PARAMS ((char **));
-
-/* Return the last component of a path name. */
-
-extern char *basename ();
-
-/* Concatenate an arbitrary number of strings, up to (char *) NULL.
- Allocates memory using xmalloc. */
-
-extern char *concat PARAMS ((const char *, ...));
-
-/* Check whether two file descriptors refer to the same file. */
-
-extern int fdmatch PARAMS ((int fd1, int fd2));
-
-/* Get the amount of time the process has run, in microseconds. */
-
-extern long get_run_time PARAMS ((void));
-
-/* Allocate memory filled with spaces. Allocates using malloc. */
-
-extern const char *spaces PARAMS ((int count));
-
-/* Return the maximum error number for which strerror will return a
- string. */
-
-extern int errno_max PARAMS ((void));
-
-/* Return the name of an errno value (e.g., strerrno (EINVAL) returns
- "EINVAL"). */
-
-extern const char *strerrno PARAMS ((int));
-
-/* Given the name of an errno value, return the value. */
-
-extern int strtoerrno PARAMS ((const char *));
-
-/* ANSI's strerror(), but more robust. */
-
-extern char *xstrerror PARAMS ((int));
-
-/* Return the maximum signal number for which strsignal will return a
- string. */
-
-extern int signo_max PARAMS ((void));
-
-/* Return a signal message string for a signal number
- (e.g., strsignal (SIGHUP) returns something like "Hangup"). */
-/* This is commented out as it can conflict with one in system headers.
- We still document its existence though. */
-
-/*extern const char *strsignal PARAMS ((int));*/
-
-/* Return the name of a signal number (e.g., strsigno (SIGHUP) returns
- "SIGHUP"). */
-
-extern const char *strsigno PARAMS ((int));
-
-/* Given the name of a signal, return its number. */
-
-extern int strtosigno PARAMS ((const char *));
-
-/* Register a function to be run by xexit. Returns 0 on success. */
-
-extern int xatexit PARAMS ((void (*fn) (void)));
-
-/* Exit, calling all the functions registered with xatexit. */
-
-#ifndef __GNUC__
-extern void xexit PARAMS ((int status));
-#else
-typedef void libiberty_voidfn PARAMS ((int status));
-__volatile__ libiberty_voidfn xexit;
-#endif
-
-/* Set the program name used by xmalloc. */
-
-extern void xmalloc_set_program_name PARAMS ((const char *));
-
-/* Allocate memory without fail. If malloc fails, this will print a
- message to stderr (using the name set by xmalloc_set_program_name,
- if any) and then call xexit.
-
- FIXME: We do not declare the parameter type (size_t) in order to
- avoid conflicts with other declarations of xmalloc that exist in
- programs which use libiberty. */
-
-extern PTR xmalloc ();
-
-/* Reallocate memory without fail. This works like xmalloc.
-
- FIXME: We do not declare the parameter types for the same reason as
- xmalloc. */
-
-extern PTR xrealloc ();
-
-/* Copy a string into a memory buffer without fail. */
-
-extern char *xstrdup PARAMS ((const char *));
-
-/* hex character manipulation routines */
-
-#define _hex_array_size 256
-#define _hex_bad 99
-extern char _hex_value[_hex_array_size];
-extern void hex_init PARAMS ((void));
-#define hex_p(c) (hex_value (c) != _hex_bad)
-/* If you change this, note well: Some code relies on side effects in
- the argument being performed exactly once. */
-#define hex_value(c) (_hex_value[(unsigned char) (c)])
-
-#endif /* ! defined (LIBIBERTY_H) */
diff --git a/contrib/gdb/include/mpw/ChangeLog b/contrib/gdb/include/mpw/ChangeLog
deleted file mode 100644
index 8dbad87eab47..000000000000
--- a/contrib/gdb/include/mpw/ChangeLog
+++ /dev/null
@@ -1,61 +0,0 @@
-Tue Feb 27 12:23:04 1996 Raymond Jou <rjou@mexican.cygnus.com>
-
- * mpw.h (HAVE_VPRINTF): Add and define to have the value 1.
-
-Fri Dec 29 14:40:46 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h (HAVE_STDLIB_H, etc): Define to have the value 1.
- (HAVE_FCNTL_H): Define.
-
-Mon Dec 11 15:39:06 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h (open, access): Define as mpw_open and mpw_access.
-
-Thu Nov 9 15:38:37 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h: Include unix.h if USE_MW_HEADERS, otherwise include
- various original MPW include files (ioctl.h, etc).
- (EIO): Define if not defined.
- * sys/ioctl.h: Remove, not needed.
-
-Wed Oct 25 12:30:44 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h: Don't include errno.h or ioctl.h.
- (ENOENT, EACCES, ENOSYS): Define if not defined.
- (fdopen): Declare if __STDC__.
- (R_OK, W_OK, X_OK): Define if not defined.
-
-Tue Sep 26 14:57:21 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h: New file, universally useful MPW host definitions.
- Many of these used to live in bfd/hosts/mpw.h.
- * grp.h: Remove RCS comment.
- * sys/ioctl.h: Add a comment line.
-
-Wed Dec 14 13:12:14 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * spin.h: New file, cursor spinning for progress.
-
-Thu Jun 30 15:32:07 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * fcntl.h (open): Allow optional third arg.
-
-Thu Apr 14 12:54:51 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * dir.h, dirent.h, fcntl.h, grp.h, pwd.h, stat.h: New files.
- * sys/ioctl.h: New file.
-
-Mon Feb 21 09:44:45 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * sys/stat.h (struct stat): New field st_rsize.
- (S_IFMT, etc): Use different bit positions.
- (fstat): Add parameter names to prototype.
-
-Mon Jan 31 19:30:16 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * README: New file.
- * utime.h, varargs.h: New files, simulated Posix.
- * sys/{file,param,resource,stat,time,types}.h: New files, more
- simulated Posix.
-
-
diff --git a/contrib/gdb/include/mpw/README b/contrib/gdb/include/mpw/README
deleted file mode 100644
index 10e92de79f68..000000000000
--- a/contrib/gdb/include/mpw/README
+++ /dev/null
@@ -1 +0,0 @@
-This is a collection of include files that help imitate Posix in MPW.
diff --git a/contrib/gdb/include/mpw/dir.h b/contrib/gdb/include/mpw/dir.h
deleted file mode 100644
index e6ccd2d59227..000000000000
--- a/contrib/gdb/include/mpw/dir.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* The <dir.h> header gives the layout of a directory. */
-
-#pragma once
-
-#ifndef _DIR_H
-#define _DIR_H
-
-#ifndef _TYPES_H /* not quite right */
-#include <sys/types.h>
-#endif
-
-#define DIRBLKSIZ 512 /* size of directory block */
-
-#ifndef DIRSIZ
-#define DIRSIZ 14
-#endif
-
-struct direct {
- ino_t d_ino;
- char d_name[DIRSIZ];
-};
-
-#endif /* _DIR_H */
diff --git a/contrib/gdb/include/mpw/dirent.h b/contrib/gdb/include/mpw/dirent.h
deleted file mode 100644
index 38000b2c5f36..000000000000
--- a/contrib/gdb/include/mpw/dirent.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef __dirent_h
-#define __dirent_h
-
-#include "sys/dir.h"
-
-struct dirent {
- long d_ino; /* inode number of entry */
- off_t d_off; /* offset of disk directory entry */
- unsigned short d_reclen; /* length of this record */
- char d_name[1]; /* name of file */
-};
-
-/*
-#define DIRENTBASESIZE \
- (((struct dirent *) 0)->d_name - (char *) 0)
-#define DIRENTSIZE(namelen) \
- ((DIRENTBASESIZE + (namelen) + NBPW) & ~(NBPW - 1))
-*/
-
-/* from Mips posix/dirent.h */
-
-/*
-#undef rewinddir
-*/
-
-extern DIR *opendir();
-extern struct dirent *readdir();
-extern void rewinddir();
-extern int closedir();
-
-#endif /* ! __dirent_h */
diff --git a/contrib/gdb/include/mpw/fcntl.h b/contrib/gdb/include/mpw/fcntl.h
deleted file mode 100644
index 30999b4b17df..000000000000
--- a/contrib/gdb/include/mpw/fcntl.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * FCntl.h -- faccess(), fcntl(), and open() mode flags
- *
- * Portions copyright American Telephone & Telegraph
- * Used with permission, Apple Computer Inc. (1985,1988,1990,1992)
- * All rights reserved.
- */
-
-#ifndef __FCNTL__
-#define __FCNTL__
-
-#ifndef __TYPES__
-#include <Types.h>
-#endif
-
-/*
- * For use by lseek():
- */
-
-#ifndef __STDIO__ /* these defns exactly paralled in StdIO.h for fseek() */
-#define SEEK_CUR 1
-#define SEEK_END 2
-#define SEEK_SET 0
-#endif
-
-/*
- * faccess() commands; for general use
- */
- /* 'd' => "directory" ops */
-#define F_DELETE (('d'<<8)|0x01)
-#define F_RENAME (('d'<<8)|0x02)
-
-/*
- * more faccess() commands; for use only by MPW tools
- */
-
-#define F_OPEN (('d'<<8)|0x00) /* reserved for operating system use */
- /* 'e' => "editor" ops */
-#define F_GTABINFO (('e'<<8)|0x00) /* get tab offset for file */
-#define F_STABINFO (('e'<<8)|0x01) /* set " " " " */
-#define F_GFONTINFO (('e'<<8)|0x02) /* get font number and size for file */
-#define F_SFONTINFO (('e'<<8)|0x03) /* set " " " " " " */
-#define F_GPRINTREC (('e'<<8)|0x04) /* get print record for file */
-#define F_SPRINTREC (('e'<<8)|0x05) /* set " " " " */
-#define F_GSELINFO (('e'<<8)|0x06) /* get selection information for file */
-#define F_SSELINFO (('e'<<8)|0x07) /* set " " " " */
-#define F_GWININFO (('e'<<8)|0x08) /* get current window position */
-#define F_SWININFO (('e'<<8)|0x09) /* set " " " */
-#define F_GSCROLLINFO (('e'<<8)|0x0A) /* get scroll information */
-#define F_SSCROLLINFO (('e'<<8)|0x0B) /* set " " */
-#define F_GMARKER (('e'<<8)|0x0D) /* Get Marker */
-#define F_SMARKER (('e'<<8)|0x0C) /* Set " */
-#define F_GSAVEONCLOSE (('e'<<8)|0x0F) /* Get Save on close */
-#define F_SSAVEONCLOSE (('e'<<8)|0x0E) /* Set " " " */
-
-/*
- * argument structures used by various faccess() commands
- */
-
-struct MarkElement {
- int start; /* start position of mark */
- int end; /* end position */
- unsigned char charCount; /* number of chars in mark name */
- char name[64]; /* mark name */
-} ; /* note: marker names may be up to 64 characters long */
-
-#ifndef __cplusplus
-typedef struct MarkElement MarkElement;
-#endif
-
-struct SelectionRecord {
- long startingPos;
- long endingPos;
- long displayTop;
-};
-
-#ifndef __cplusplus
-typedef struct SelectionRecord SelectionRecord;
-#endif
-
-
-/*
- * Mode values accessible to open()
- */
-#define O_RDONLY 0 /* Bits 0 and 1 are used internally */
-#define O_WRONLY 1 /* Values 0..2 are historical */
-#define O_RDWR 2 /* NOTE: it goes 0, 1, 2, *!* 8, 16, 32, ... */
-#define O_APPEND (1<< 3) /* append (writes guaranteed at the end) */
-#define O_RSRC (1<< 4) /* Open the resource fork */
-#define O_ALIAS (1<< 5) /* Open alias file */
-#define O_CREAT (1<< 8) /* Open with file create */
-#define O_TRUNC (1<< 9) /* Open with truncation */
-#define O_EXCL (1<<10) /* w/ O_CREAT: Exclusive "create-only" */
-#define O_BINARY (1<<11) /* Open as a binary stream */
-#define O_NRESOLVE (1<<14) /* Don't resolve any aliases */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * function prototypes
- */
-int close(int);
-int creat(const char*);
-int dup(int filedes); /* OBSOLETE: fcntl(filedes, F_DUPFD, 0) is preferred */
-int faccess(char*, unsigned int, long*);
-int fcntl(int, unsigned int, int);
-long lseek(int, long, int);
-int open(const char*, int, ...);
-int read(int, char*, unsigned);
-int unlink(char*);
-int write(int, const char*, unsigned);
-
-#ifdef __cplusplus
-}
-#endif
-
-/*
- * fcntl() commands
- */
-#define F_DUPFD 0 /* Duplicate files (file descriptor) */
-
-#endif __FCNTL__
diff --git a/contrib/gdb/include/mpw/grp.h b/contrib/gdb/include/mpw/grp.h
deleted file mode 100644
index faf2c6a6be9b..000000000000
--- a/contrib/gdb/include/mpw/grp.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-#include "sys/types.h"
-
-struct group {
- char *gr_name;
- gid_t gr_gid;
- char *gr_passwd;
- char **gr_mem;
-};
diff --git a/contrib/gdb/include/mpw/mpw.h b/contrib/gdb/include/mpw/mpw.h
deleted file mode 100644
index 58702e725ff8..000000000000
--- a/contrib/gdb/include/mpw/mpw.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Mac MPW host-specific definitions. */
-
-#ifndef __INCLUDE_MPW_H
-#define __INCLUDE_MPW_H
-
-#ifndef MPW
-#define MPW
-#endif
-
-/* MPW C is basically ANSI, but doesn't actually enable __STDC__,
- nor does it allow __STDC__ to be #defined. */
-
-#ifndef ALMOST_STDC
-#define ALMOST_STDC
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-
-#define HAVE_TIME_T_IN_TIME_H 1
-
-#define HAVE_STDLIB_H 1
-
-#define HAVE_ERRNO_H 1
-
-#define HAVE_STDDEF_H 1
-
-#define HAVE_STRING_H 1
-
-#define HAVE_STDARG_H 1
-
-#define HAVE_VPRINTF 1
-
-#ifdef USE_MW_HEADERS
-
-#include <unix.h>
-
-#else
-
-#include <fcntl.h>
-#include <ioctl.h>
-#include <sys/stat.h>
-
-#define HAVE_FCNTL_H 1
-
-#ifndef O_ACCMODE
-#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
-#endif
-
-#ifndef fileno
-#define fileno(fp) ((fp)->_file)
-#endif
-
-/* stdio.h does not define this if __STDC__, so define here. */
-
-#ifdef __STDC__
-FILE *fdopen(int fildes, const char *mode);
-#endif
-
-#endif /* USE_MW_HEADERS */
-
-/* Add ersatz definitions, for systems that lack them. */
-
-#ifndef EIO
-#define EIO 96
-#endif
-#ifndef ENOENT
-#define ENOENT 97
-#endif
-#ifndef EACCES
-#define EACCES 98
-#endif
-#ifndef ENOSYS
-#define ENOSYS 99
-#endif
-
-#ifndef R_OK
-#define R_OK 4
-#define W_OK 2
-#define X_OK 1
-#endif
-
-/* Binary files have different characteristics; for instance, no cr/nl
- translation. */
-
-#define USE_BINARY_FOPEN
-
-#include <spin.h>
-
-#ifdef MPW_C
-#undef __PTR_TO_INT
-#define __PTR_TO_INT(P) ((int)(P))
-#undef __INT_TO_PTR
-#define __INT_TO_PTR(P) ((char *)(P))
-#endif /* MPW_C */
-
-#define NO_FCNTL
-
-int fstat ();
-
-FILE *mpw_fopen ();
-int mpw_fseek ();
-int mpw_fread ();
-int mpw_fwrite ();
-int mpw_access ();
-int mpw_open ();
-int mpw_creat ();
-void mpw_abort (void);
-
-/* Map these standard functions to improved versions in libiberty. */
-
-#define fopen mpw_fopen
-#define fseek mpw_fseek
-#define fread mpw_fread
-#define fwrite mpw_fwrite
-#define open mpw_open
-#define access mpw_access
-#define creat mpw_creat
-#define abort mpw_abort
-
-#define POSIX_UTIME
-
-#define LOSING_TOTALLY
-
-/* Define this so that files will be closed before being unlinked. */
-
-#define CLOSE_BEFORE_UNLINK
-
-#endif /* __INCLUDE_MPW_H */
diff --git a/contrib/gdb/include/mpw/pwd.h b/contrib/gdb/include/mpw/pwd.h
deleted file mode 100644
index 2d4fb70401aa..000000000000
--- a/contrib/gdb/include/mpw/pwd.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef __pwd_h
-#define __pwd_h
-
-#include <sys/types.h>
-
-struct passwd {
- char *pw_name;
- uid_t pw_uid;
- gid_t pw_gid;
- char *pw_dir;
- char *pw_shell;
- char *pw_passwd;
-};
-
-#endif /* ! __pwd_h */
diff --git a/contrib/gdb/include/mpw/spin.h b/contrib/gdb/include/mpw/spin.h
deleted file mode 100644
index 867d14502c00..000000000000
--- a/contrib/gdb/include/mpw/spin.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Progress macros that use SpinCursor in MPW.
- Copyright (C) 1994 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 _SPIN_H
-#define _SPIN_H
-
-/* For MPW, progress macros just need to "spin the cursor" frequently,
- preferably several times per second on a 68K Mac. */
-
-/* In order to determine if we're meeting the goal, define this macro
- and information about frequency of spinning will be collected and
- displayed. */
-
-#define SPIN_MEASUREMENT
-
-#include <CursorCtl.h>
-
-/* Programs use this macro to indicate the start of a lengthy
- activity. STR identifies the particular activity, while N
- indicates the expected duration, in unspecified units. If N is
- zero, then the expected time to completion is unknown. */
-
-#undef START_PROGRESS
-#define START_PROGRESS(STR,N) mpw_start_progress (STR, N, __FILE__, __LINE__);
-
-/* Programs use this macro to indicate that progress has been made on a
- lengthy activity. */
-
-#undef PROGRESS
-#ifdef SPIN_MEASUREMENT
-#define PROGRESS(X) mpw_progress_measured (X, __FILE__, __LINE__);
-#else
-#define PROGRESS(X) mpw_progress (X);
-#endif
-
-/* Programs use this macro to indicate the end of a lengthy activity.
- STR must match a STR passed to START_PROGRESS previously. */
-
-#undef END_PROGRESS
-#define END_PROGRESS(STR) mpw_end_progress (STR, __FILE__, __LINE__);
-
-extern void mpw_start_progress (char *, int, char *, int);
-
-extern void mpw_progress (int);
-
-extern void mpw_progress_measured (int, char *, int);
-
-extern void mpw_end_progress (char *, char *, int);
-
-#endif /* _SPIN_H */
diff --git a/contrib/gdb/include/mpw/stat.h b/contrib/gdb/include/mpw/stat.h
deleted file mode 100644
index 057b8d531139..000000000000
--- a/contrib/gdb/include/mpw/stat.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* The <sys/stat.h> header defines a struct that is used in the stat() and
- * fstat functions. The information in this struct comes from the i-node of
- * some file. These calls are the only approved way to inspect i-nodes.
- */
-
-#ifndef _STAT_H
-#define _STAT_H
-
-#ifndef _TYPES_H /* not quite right */
-#include <sys/types.h>
-#endif
-
-struct stat {
- dev_t st_dev; /* major/minor device number */
- ino_t st_ino; /* i-node number */
- mode_t st_mode; /* file mode, protection bits, etc. */
- short int st_nlink; /* # links; TEMPORARY HACK: should be nlink_t*/
- uid_t st_uid; /* uid of the file's owner */
- short int st_gid; /* gid; TEMPORARY HACK: should be gid_t */
- dev_t st_rdev;
- off_t st_size; /* file size */
- time_t st_atime; /* time of last access */
- time_t st_mtime; /* time of last data modification */
- time_t st_ctime; /* time of last file status change */
-};
-
-/* Traditional mask definitions for st_mode. */
-#define S_IFMT 0170000 /* type of file */
-#define S_IFREG 0100000 /* regular */
-#define S_IFBLK 0060000 /* block special */
-#define S_IFDIR 0040000 /* directory */
-#define S_IFCHR 0020000 /* character special */
-#define S_IFIFO 0010000 /* this is a FIFO */
-#define S_ISUID 0004000 /* set user id on execution */
-#define S_ISGID 0002000 /* set group id on execution */
- /* next is reserved for future use */
-#define S_ISVTX 01000 /* save swapped text even after use */
-
-/* POSIX masks for st_mode. */
-#define S_IRWXU 00700 /* owner: rwx------ */
-#define S_IRUSR 00400 /* owner: r-------- */
-#define S_IWUSR 00200 /* owner: -w------- */
-#define S_IXUSR 00100 /* owner: --x------ */
-
-#define S_IRWXG 00070 /* group: ---rwx--- */
-#define S_IRGRP 00040 /* group: ---r----- */
-#define S_IWGRP 00020 /* group: ----w---- */
-#define S_IXGRP 00010 /* group: -----x--- */
-
-#define S_IRWXO 00007 /* others: ------rwx */
-#define S_IROTH 00004 /* others: ------r-- */
-#define S_IWOTH 00002 /* others: -------w- */
-#define S_IXOTH 00001 /* others: --------x */
-
-/* The following macros test st_mode (from POSIX Sec. 5.6.1.1. */
-#define S_ISREG(m) ((m & S_IFMT) == S_IFREG) /* is a reg file */
-#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */
-#define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR) /* is a char spec */
-#define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK) /* is a block spec */
-#define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO) /* is a pipe/FIFO */
-
-
-/* Function Prototypes. */
-#ifndef _ANSI_H
-#include <ansi.h>
-#endif
-
-_PROTOTYPE( int chmod, (const char *_path, int _mode) );
-_PROTOTYPE( int fstat, (int _fildes, struct stat *_buf) );
-_PROTOTYPE( int mkdir, (const char *_path, int _mode) );
-_PROTOTYPE( int mkfifo, (const char *_path, int _mode) );
-_PROTOTYPE( int stat , (const char *_path, struct stat *_buf) );
-_PROTOTYPE( mode_t umask, (int _cmask) );
-
-#endif /* _STAT_H */
diff --git a/contrib/gdb/include/mpw/sys/file.h b/contrib/gdb/include/mpw/sys/file.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/contrib/gdb/include/mpw/sys/file.h
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/contrib/gdb/include/mpw/sys/param.h b/contrib/gdb/include/mpw/sys/param.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/contrib/gdb/include/mpw/sys/param.h
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/contrib/gdb/include/mpw/sys/resource.h b/contrib/gdb/include/mpw/sys/resource.h
deleted file mode 100644
index d39439d61d52..000000000000
--- a/contrib/gdb/include/mpw/sys/resource.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __SYS_RESOURCE_H__
-#define __SYS_RESOURCE_H__
-
-struct rusage {
- struct timeval ru_utime;
- struct timeval ru_stime;
-};
-
-#endif /* __SYS_RESOURCE_H__ */
diff --git a/contrib/gdb/include/mpw/sys/stat.h b/contrib/gdb/include/mpw/sys/stat.h
deleted file mode 100644
index b65c72e10c6a..000000000000
--- a/contrib/gdb/include/mpw/sys/stat.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Imitation sys/stat.h. */
-
-#ifndef __SYS_STAT_H__
-#define __SYS_STAT_H__
-
-#include <sys/types.h>
-#include <time.h>
-
-struct stat {
- dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- short st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- dev_t st_rdev;
- off_t st_size;
- off_t st_rsize;
- time_t st_atime;
- int st_spare1;
- time_t st_mtime;
- int st_spare2;
- time_t st_ctime;
- int st_spare3;
- long st_blksize;
- long st_blocks;
- long st_spare4[2];
-};
-
-#define S_IFMT 0170000L
-#define S_IFDIR 0040000L
-#define S_IFREG 0100000L
-#define S_IREAD 0400
-#define S_IWRITE 0200
-#define S_IEXEC 0100
-
-#define S_IFIFO 010000 /* FIFO special */
-#define S_IFCHR 020000 /* character special */
-#define S_IFBLK 030000 /* block special */
-
-int stat (char *path, struct stat *buf);
-int fstat (int fd, struct stat *buf);
-
-#endif /* __SYS_STAT_H___ */
diff --git a/contrib/gdb/include/mpw/sys/time.h b/contrib/gdb/include/mpw/sys/time.h
deleted file mode 100644
index f9e485232a21..000000000000
--- a/contrib/gdb/include/mpw/sys/time.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Imitation sys/time.h. */
-
-#ifndef __SYS_TIME_H__
-#define __SYS_TIME_H__
-
-#include <time.h>
-
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-
-#endif /* __SYS_TIME_H__ */
diff --git a/contrib/gdb/include/mpw/sys/types.h b/contrib/gdb/include/mpw/sys/types.h
deleted file mode 100644
index d7d9c9f44ba0..000000000000
--- a/contrib/gdb/include/mpw/sys/types.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* Imitation sys/types.h. */
-
-#ifndef __SYS_TYPES_H__
-#define __SYS_TYPES_H__
-
-#include <Types.h>
-
-typedef short dev_t;
-typedef short ino_t;
-typedef unsigned short mode_t;
-typedef unsigned short uid_t;
-typedef unsigned short gid_t;
-typedef long off_t;
-
-#endif /* __SYS_TYPES_H__ */
diff --git a/contrib/gdb/include/mpw/utime.h b/contrib/gdb/include/mpw/utime.h
deleted file mode 100644
index e8bf66f2ba5c..000000000000
--- a/contrib/gdb/include/mpw/utime.h
+++ /dev/null
@@ -1,7 +0,0 @@
-
-struct utimbuf {
- time_t actime;
- time_t modtime;
-};
-
-int utime (char *, struct utimbuf *);
diff --git a/contrib/gdb/include/mpw/varargs.h b/contrib/gdb/include/mpw/varargs.h
deleted file mode 100644
index acb9e4504a2d..000000000000
--- a/contrib/gdb/include/mpw/varargs.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* varargs.h. */
-#ifndef __va_list__
-#define __va_list__
-typedef char *va_list;
-#endif
-#define va_dcl int va_alist;
-#define va_start(list) list = (char *) &va_alist
-#define va_end(list)
-#define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]
diff --git a/contrib/gdb/include/nlm/ChangeLog b/contrib/gdb/include/nlm/ChangeLog
deleted file mode 100644
index d9ea3d09e0aa..000000000000
--- a/contrib/gdb/include/nlm/ChangeLog
+++ /dev/null
@@ -1,83 +0,0 @@
-Fri May 6 13:31:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * external.h (nlmNAME(External_Custom_Header)): Add length,
- dataOffset, and dataStamp field.
- (nlmNAME(External_Cygnus_Ext_Header)): Remove.
- * internal.h (Nlm_Internal_Custom_Header): Add hdrLength,
- dataOffset, dataStamp and hdr fields.
-
-Fri Apr 22 11:12:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * external.h (struct nlmNAME(external_cygnus_ext_header)): Rename
- from nlmNAME(external_cygnus_section_header). Change stamp field
- to 8 bytes. Add bytes field.
- * internal.h (nlm_internal_cygnus_ext_header): Rename from
- nlm_internal_cygnus_section_header. Change stamp field to 8
- bytes.
-
-Thu Apr 21 11:57:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h (struct nlm_internal_cygnus_section_header): Define.
- * external.h (struct nlmNAME(external_cygnus_section_header):
- Define.
-
-Wed Apr 20 14:27:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h (struct nlm_internal_custom_header): Remove
- debugRecOffset and debugRecLength fields. Add data field.
- * external.h (struct nlmNAME(external_custom_header)): Remove
- debugRecOffset and debugRecLength fields.
-
-Mon Feb 7 08:28:40 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * internal.h: Change HOST_64_BIT to BFD_HOST_64_BIT.
-
-Thu Dec 2 14:14:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * alpha-ext.h: New file describing formats of information in Alpha
- NetWare files.
- * common.h: Define some non-external Alpha information.
-
-Wed Nov 17 17:38:58 1993 Sean Eric Fagan (sef@cygnus.com)
-
- * external.h: Don't define external_fixed_header here.
- * i386-ext.h, sparc32-ext.h: New header files to define
- external_fixed_header for particular CPU's.
-
-Wed Oct 27 11:45:56 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h (Nlm_Internal_Extended_Header): Added fields
- sharedDebugRecordOffset and sharedDebugRecordCount.
- * external.h (NlmNAME(External_Extended_Header)): Likewise.
-
- * common.h (NLM_SIGNATURE): Do not define (it's different for each
- backend).
-
-Tue Aug 31 13:24:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h: Change length fields of type char to type unsigned
- char.
-
-Sat Jul 31 02:12:14 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * common.h (NLM_HIBIT, NLM_HEADER_VERSION): Define.
-
-Thu Jul 22 16:09:47 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * common.h (NLM_CAT*, NLM_ARCH_SIZE, NLM_TARGET_LONG_SIZE,
- NLM_TARGET_ADDRESS_SIZE, NLM_NAME, NlmNAME, nlmNAME): New
- macros.
- * external.h (TARGET_LONG_SIZE, TARGET_ADDRESS_SIZE): Remove
- macros, convert usages to NLM_ equivalents.
- * external.h: Use nlmNAME and NlmNAME macros to derive both
- 32 and 64 bit versions.
-
-Mon Jul 19 22:12:40 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * (common.h, external.h, internal.h): New files for NLM/NetWare
- support.
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/contrib/gdb/include/nlm/alpha-ext.h b/contrib/gdb/include/nlm/alpha-ext.h
deleted file mode 100644
index 37199dd1dc0d..000000000000
--- a/contrib/gdb/include/nlm/alpha-ext.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/* Alpha NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
- By Ian Lance Taylor, Cygnus Support
-
-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. */
-
-/* An Alpha NLM starts with an instance of this structure. */
-
-struct nlm32_alpha_external_prefix_header
-{
- /* Magic number. Must be NLM32_ALPHA_MAGIC. */
- unsigned char magic[4];
- /* Format descriptor. Current value is 2. */
- unsigned char format[4];
- /* Size of prefix header. */
- unsigned char size[4];
- /* Padding. */
- unsigned char pad1[4];
- /* More fields may be added later, supposedly. */
-};
-
-/* The external format of an Alpha NLM reloc. This is the same as an
- Alpha ECOFF reloc. */
-
-struct nlm32_alpha_external_reloc
-{
- unsigned char r_vaddr[8];
- unsigned char r_symndx[4];
- unsigned char r_bits[4];
-};
-
-/* Constants to unpack the r_bits field of a reloc. */
-
-#define RELOC_BITS0_TYPE_LITTLE 0xff
-#define RELOC_BITS0_TYPE_SH_LITTLE 0
-
-#define RELOC_BITS1_EXTERN_LITTLE 0x01
-
-#define RELOC_BITS1_OFFSET_LITTLE 0x7e
-#define RELOC_BITS1_OFFSET_SH_LITTLE 1
-
-#define RELOC_BITS1_RESERVED_LITTLE 0x80
-#define RELOC_BITS1_RESERVED_SH_LITTLE 7
-#define RELOC_BITS2_RESERVED_LITTLE 0xff
-#define RELOC_BITS2_RESERVED_SH_LEFT_LITTLE 1
-#define RELOC_BITS3_RESERVED_LITTLE 0x03
-#define RELOC_BITS3_RESERVED_SH_LEFT_LITTLE 9
-
-#define RELOC_BITS3_SIZE_LITTLE 0xfc
-#define RELOC_BITS3_SIZE_SH_LITTLE 2
-
-/* The external format of the fixed header. */
-
-typedef struct nlm32_alpha_external_fixed_header
-{
-
- /* The signature field identifies the file as an NLM. It must contain
- the signature string, which depends upon the NLM target. */
-
- unsigned char signature[24];
-
- /* The version of the header. At this time, the highest version number
- is 4. */
-
- unsigned char version[4];
-
- /* The name of the module, which must be a DOS name (1-8 characters followed
- by a period and a 1-3 character extension). The first byte is the byte
- length of the name and the last byte is a null terminator byte. This
- field is fixed length, and any unused bytes should be null bytes. The
- value is set by the OUTPUT keyword to NLMLINK. */
-
- unsigned char moduleName[14];
-
- /* Padding to make it come out correct. */
-
- unsigned char pad1[2];
-
- /* The byte offset of the code image from the start of the file. */
-
- unsigned char codeImageOffset[4];
-
- /* The size of the code image, in bytes. */
-
- unsigned char codeImageSize[4];
-
- /* The byte offset of the data image from the start of the file. */
-
- unsigned char dataImageOffset[4];
-
- /* The size of the data image, in bytes. */
-
- unsigned char dataImageSize[4];
-
- /* The size of the uninitialized data region that the loader is to be
- allocated at load time. Uninitialized data follows the initialized
- data in the NLM address space. */
-
- unsigned char uninitializedDataSize[4];
-
- /* The byte offset of the custom data from the start of the file. The
- custom data is set by the CUSTOM keyword to NLMLINK. It is possible
- for this to be EOF if there is no custom data. */
-
- unsigned char customDataOffset[4];
-
- /* The size of the custom data, in bytes. */
-
- unsigned char customDataSize[4];
-
- /* The byte offset of the module dependencies from the start of the file.
- The module dependencies are determined by the MODULE keyword in
- NLMLINK. */
-
- unsigned char moduleDependencyOffset[4];
-
- /* The number of module dependencies at the moduleDependencyOffset. */
-
- unsigned char numberOfModuleDependencies[4];
-
- /* The byte offset of the relocation fixup data from the start of the file */
-
- unsigned char relocationFixupOffset[4];
-
- unsigned char numberOfRelocationFixups[4];
-
- unsigned char externalReferencesOffset[4];
-
- unsigned char numberOfExternalReferences[4];
-
- unsigned char publicsOffset[4];
-
- unsigned char numberOfPublics[4];
-
- /* The byte offset of the internal debug info from the start of the file.
- It is possible for this to be EOF if there is no debug info. */
-
- unsigned char debugInfoOffset[4];
-
- unsigned char numberOfDebugRecords[4];
-
- unsigned char codeStartOffset[4];
-
- unsigned char exitProcedureOffset[4];
-
- unsigned char checkUnloadProcedureOffset[4];
-
- unsigned char moduleType[4];
-
- unsigned char flags[4];
-
-} Nlm32_alpha_External_Fixed_Header;
diff --git a/contrib/gdb/include/nlm/common.h b/contrib/gdb/include/nlm/common.h
deleted file mode 100644
index e96550a92f6d..000000000000
--- a/contrib/gdb/include/nlm/common.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/* NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support
-
-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. */
-
-
-/* This file is part of NLM support for BFD, and contains the portions
- that are common to both the internal and external representations. */
-
-/* Semi-portable string concatenation in cpp.
- The NLM_CAT4 hack is to avoid a problem with some strict ANSI C
- preprocessors. The problem is, "32_" or "64_" are not a valid
- preprocessing tokens, and we don't want extra underscores (e.g.,
- "nlm_32_"). The XNLM_CAT2 macro will cause the inner NLM_CAT macros
- to be evaluated first, producing still-valid pp-tokens. Then the
- final concatenation can be done. (Sigh.) */
-
-#ifdef SABER
-# define NLM_CAT(a,b) a##b
-# define NLM_CAT3(a,b,c) a##b##c
-# define NLM_CAT4(a,b,c,d) a##b##c##d
-#else
-# ifdef __STDC__
-# define NLM_CAT(a,b) a##b
-# define NLM_CAT3(a,b,c) a##b##c
-# define XNLM_CAT2(a,b) NLM_CAT(a,b)
-# define NLM_CAT4(a,b,c,d) XNLM_CAT2(NLM_CAT(a,b),NLM_CAT(c,d))
-# else
-# define NLM_CAT(a,b) a/**/b
-# define NLM_CAT3(a,b,c) a/**/b/**/c
-# define NLM_CAT4(a,b,c,d) a/**/b/**/c/**/d
-# endif
-#endif
-
-/* If NLM_ARCH_SIZE is not defined, default to 32. NLM_ARCH_SIZE is
- optionally defined by the application. */
-
-#ifndef NLM_ARCH_SIZE
-# define NLM_ARCH_SIZE 32
-#endif
-
-#if NLM_ARCH_SIZE == 32
-# define NLM_TARGET_LONG_SIZE 4
-# define NLM_TARGET_ADDRESS_SIZE 4
-# define NLM_NAME(x,y) NLM_CAT4(x,32,_,y)
-# define NLM_HIBIT (((bfd_vma) 1) << 31)
-#endif
-#if NLM_ARCH_SIZE == 64
-# define NLM_TARGET_LONG_SIZE 8
-# define NLM_TARGET_ADDRESS_SIZE 8
-# define NLM_NAME(x,y) NLM_CAT4(x,64,_,y)
-# define NLM_HIBIT (((bfd_vma) 1) << 63)
-#endif
-
-#define NlmNAME(X) NLM_NAME(Nlm,X)
-#define nlmNAME(X) NLM_NAME(nlm,X)
-
-/* Give names to things that should not change. */
-
-#define NLM_MAX_DESCRIPTION_LENGTH 127
-#define NLM_MAX_SCREEN_NAME_LENGTH 71
-#define NLM_MAX_THREAD_NAME_LENGTH 71
-#define NLM_MAX_COPYRIGHT_MESSAGE_LENGTH 255
-#define NLM_OTHER_DATA_LENGTH 400 /* FIXME */
-#define NLM_OLD_THREAD_NAME_LENGTH 5
-#define NLM_SIGNATURE_SIZE 24
-#define NLM_HEADER_VERSION 4
-#define NLM_MODULE_NAME_SIZE 14
-#define NLM_DEFAULT_STACKSIZE (8 * 1024)
-
-/* Alpha information. This should probably be in a separate Alpha
- header file, but it can't go in alpha-ext.h because some of it is
- needed by nlmconv.c. */
-
-/* Magic number in Alpha prefix header. */
-#define NLM32_ALPHA_MAGIC (0x83561840)
-
-/* The r_type field in an Alpha reloc is one of the following values. */
-#define ALPHA_R_IGNORE 0
-#define ALPHA_R_REFLONG 1
-#define ALPHA_R_REFQUAD 2
-#define ALPHA_R_GPREL32 3
-#define ALPHA_R_LITERAL 4
-#define ALPHA_R_LITUSE 5
-#define ALPHA_R_GPDISP 6
-#define ALPHA_R_BRADDR 7
-#define ALPHA_R_HINT 8
-#define ALPHA_R_SREL16 9
-#define ALPHA_R_SREL32 10
-#define ALPHA_R_SREL64 11
-#define ALPHA_R_OP_PUSH 12
-#define ALPHA_R_OP_STORE 13
-#define ALPHA_R_OP_PSUB 14
-#define ALPHA_R_OP_PRSHIFT 15
-#define ALPHA_R_GPVALUE 16
-#define ALPHA_R_NW_RELOC 250
-
-/* A local reloc, other than ALPHA_R_GPDISP or ALPHA_R_IGNORE, must be
- against one of these symbol indices. */
-#define ALPHA_RELOC_SECTION_TEXT 1
-#define ALPHA_RELOC_SECTION_DATA 3
-
-/* An ALPHA_R_NW_RELOC has one of these values in the size field. If
- it is SETGP, the r_vaddr field holds the GP value to use. If it is
- LITA, the r_vaddr field holds the address of the .lita section and
- the r_symndx field holds the size of the .lita section. */
-#define ALPHA_R_NW_RELOC_SETGP 1
-#define ALPHA_R_NW_RELOC_LITA 2
diff --git a/contrib/gdb/include/nlm/external.h b/contrib/gdb/include/nlm/external.h
deleted file mode 100644
index f77a5bb3dda0..000000000000
--- a/contrib/gdb/include/nlm/external.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/* NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support
-
-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. */
-
-
-/* This file is part of NLM support for BFD, and contains the portions
- that describe how NLM is represented externally by the BFD library.
- I.E. it describes the in-file representation of NLM. It requires
- the nlm/common.h file which contains the portions that are common to
- both the internal and external representations.
-
- Note that an NLM header consists of three parts:
-
- (1) A fixed length header that has specific fields of known length,
- at specific offsets in the file.
-
- (2) A variable length header that has specific fields in a specific
- order, but some fields may be variable length.
-
- (3) A auxiliary header that has various optional fields in no specific
- order. There is no way to identify the end of the auxiliary headers
- except by finding a header without a recognized 'stamp'.
-
- The exact format of the fixed length header unfortunately varies
- from one NLM target to another, due to padding. Each target
- defines the correct external format in a separate header file.
-
-*/
-
-/* NLM Header */
-
-/* The version header is one of the optional auxiliary headers and
- follows the fixed length and variable length NLM headers. */
-
-typedef struct nlmNAME(external_version_header)
-{
-
- /* The header is recognized by "VeRsIoN#" in the stamp field. */
- char stamp[8];
-
- unsigned char majorVersion[NLM_TARGET_LONG_SIZE];
-
- unsigned char minorVersion[NLM_TARGET_LONG_SIZE];
-
- unsigned char revision[NLM_TARGET_LONG_SIZE];
-
- unsigned char year[NLM_TARGET_LONG_SIZE];
-
- unsigned char month[NLM_TARGET_LONG_SIZE];
-
- unsigned char day[NLM_TARGET_LONG_SIZE];
-
-} NlmNAME(External_Version_Header);
-
-
-typedef struct nlmNAME(external_copyright_header)
-{
-
- /* The header is recognized by "CoPyRiGhT=" in the stamp field. */
-
- char stamp[10];
-
- unsigned char copyrightMessageLength[1];
-
- /* There is a variable length field here called 'copyrightMessage'
- that is the length specified by copyrightMessageLength. */
-
-} NlmNAME(External_Copyright_Header);
-
-
-typedef struct nlmNAME(external_extended_header)
-{
-
- /* The header is recognized by "MeSsAgEs" in the stamp field. */
-
- char stamp[8];
-
- unsigned char languageID[NLM_TARGET_LONG_SIZE];
-
- unsigned char messageFileOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char messageFileLength[NLM_TARGET_LONG_SIZE];
-
- unsigned char messageCount[NLM_TARGET_LONG_SIZE];
-
- unsigned char helpFileOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char helpFileLength[NLM_TARGET_LONG_SIZE];
-
- unsigned char RPCDataOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char RPCDataLength[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedCodeOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedCodeLength[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedDataOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedDataLength[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedRelocationFixupOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedRelocationFixupCount[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedExternalReferenceOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedExternalReferenceCount[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedPublicsOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedPublicsCount[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedDebugRecordOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedDebugRecordCount[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedInitializationOffset[NLM_TARGET_ADDRESS_SIZE];
-
- unsigned char SharedExitProcedureOffset[NLM_TARGET_ADDRESS_SIZE];
-
- unsigned char productID[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved0[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved1[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved2[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved3[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved4[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved5[NLM_TARGET_LONG_SIZE];
-
-} NlmNAME(External_Extended_Header);
-
-
-typedef struct nlmNAME(external_custom_header)
-{
-
- /* The header is recognized by "CuStHeAd" in the stamp field. */
- char stamp[8];
-
- /* Length of this header. */
- unsigned char length[NLM_TARGET_LONG_SIZE];
-
- /* Offset to data. */
- unsigned char dataOffset[NLM_TARGET_LONG_SIZE];
-
- /* Length of data. */
- unsigned char dataLength[NLM_TARGET_LONG_SIZE];
-
- /* Stamp for this customer header--we recognize "CyGnUsEx". */
- char dataStamp[8];
-
-} NlmNAME(External_Custom_Header);
diff --git a/contrib/gdb/include/nlm/i386-ext.h b/contrib/gdb/include/nlm/i386-ext.h
deleted file mode 100644
index d33ad2da770a..000000000000
--- a/contrib/gdb/include/nlm/i386-ext.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* i386 NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 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. */
-
-/* The external format of the fixed header. */
-
-typedef struct nlm32_i386_external_fixed_header
-{
-
- /* The signature field identifies the file as an NLM. It must contain
- the signature string, which depends upon the NLM target. */
-
- unsigned char signature[24];
-
- /* The version of the header. At this time, the highest version number
- is 4. */
-
- unsigned char version[4];
-
- /* The name of the module, which must be a DOS name (1-8 characters followed
- by a period and a 1-3 character extension). The first byte is the byte
- length of the name and the last byte is a null terminator byte. This
- field is fixed length, and any unused bytes should be null bytes. The
- value is set by the OUTPUT keyword to NLMLINK. */
-
- unsigned char moduleName[14];
-
- /* The byte offset of the code image from the start of the file. */
-
- unsigned char codeImageOffset[4];
-
- /* The size of the code image, in bytes. */
-
- unsigned char codeImageSize[4];
-
- /* The byte offset of the data image from the start of the file. */
-
- unsigned char dataImageOffset[4];
-
- /* The size of the data image, in bytes. */
-
- unsigned char dataImageSize[4];
-
- /* The size of the uninitialized data region that the loader is to be
- allocated at load time. Uninitialized data follows the initialized
- data in the NLM address space. */
-
- unsigned char uninitializedDataSize[4];
-
- /* The byte offset of the custom data from the start of the file. The
- custom data is set by the CUSTOM keyword to NLMLINK. It is possible
- for this to be EOF if there is no custom data. */
-
- unsigned char customDataOffset[4];
-
- /* The size of the custom data, in bytes. */
-
- unsigned char customDataSize[4];
-
- /* The byte offset of the module dependencies from the start of the file.
- The module dependencies are determined by the MODULE keyword in
- NLMLINK. */
-
- unsigned char moduleDependencyOffset[4];
-
- /* The number of module dependencies at the moduleDependencyOffset. */
-
- unsigned char numberOfModuleDependencies[4];
-
- /* The byte offset of the relocation fixup data from the start of the file */
-
- unsigned char relocationFixupOffset[4];
-
- unsigned char numberOfRelocationFixups[4];
-
- unsigned char externalReferencesOffset[4];
-
- unsigned char numberOfExternalReferences[4];
-
- unsigned char publicsOffset[4];
-
- unsigned char numberOfPublics[4];
-
- /* The byte offset of the internal debug info from the start of the file.
- It is possible for this to be EOF if there is no debug info. */
-
- unsigned char debugInfoOffset[4];
-
- unsigned char numberOfDebugRecords[4];
-
- unsigned char codeStartOffset[4];
-
- unsigned char exitProcedureOffset[4];
-
- unsigned char checkUnloadProcedureOffset[4];
-
- unsigned char moduleType[4];
-
- unsigned char flags[4];
-
-} Nlm32_i386_External_Fixed_Header;
diff --git a/contrib/gdb/include/nlm/internal.h b/contrib/gdb/include/nlm/internal.h
deleted file mode 100644
index dd27dc407f59..000000000000
--- a/contrib/gdb/include/nlm/internal.h
+++ /dev/null
@@ -1,309 +0,0 @@
-/* NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support.
-
-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. */
-
-
-/* This file is part of NLM support for BFD, and contains the portions
- that describe how NLM is represented internally in the BFD library.
- I.E. it describes the in-memory representation of NLM. It requires
- the nlm/common.h file which contains the portions that are common to
- both the internal and external representations. */
-
-#if 0
-
-/* Types used by various structures, functions, etc. */
-
-typedef unsigned long Nlm32_Addr; /* Unsigned program address */
-typedef unsigned long Nlm32_Off; /* Unsigned file offset */
-typedef long Nlm32_Sword; /* Signed large integer */
-typedef unsigned long Nlm32_Word; /* Unsigned large integer */
-typedef unsigned short Nlm32_Half; /* Unsigned medium integer */
-typedef unsigned char Nlm32_Char; /* Unsigned tiny integer */
-
-#ifdef BFD_HOST_64_BIT
-typedef unsigned BFD_HOST_64_BIT Nlm64_Addr;
-typedef unsigned BFD_HOST_64_BIT Nlm64_Off;
-typedef BFD_HOST_64_BIT Nlm64_Sxword;
-typedef unsigned BFD_HOST_64_BIT Nlm64_Xword;
-#endif
-typedef long Nlm64_Sword;
-typedef unsigned long Nlm64_Word;
-typedef unsigned short Nlm64_Half;
-
-#endif /* 0 */
-
-/* This structure contains the internal form of the portion of the NLM
- header that is fixed length. */
-
-typedef struct nlm_internal_fixed_header
-{
- /* The signature field identifies the file as an NLM. It must contain
- the signature string, which depends upon the NLM target. */
-
- char signature[NLM_SIGNATURE_SIZE];
-
- /* The version of the header. At this time, the highest version number
- is 4. */
-
- long version;
-
- /* The name of the module, which must be a DOS name (1-8 characters followed
- by a period and a 1-3 character extension. The first byte is the byte
- length of the name and the last byte is a null terminator byte. This
- field is fixed length, and any unused bytes should be null bytes. The
- value is set by the OUTPUT keyword to NLMLINK. */
-
- char moduleName[NLM_MODULE_NAME_SIZE];
-
- /* The byte offset of the code image from the start of the file. */
-
- file_ptr codeImageOffset;
-
- /* The size of the code image, in bytes. */
-
- bfd_size_type codeImageSize;
-
- /* The byte offset of the data image from the start of the file. */
-
- file_ptr dataImageOffset;
-
- /* The size of the data image, in bytes. */
-
- bfd_size_type dataImageSize;
-
- /* The size of the uninitialized data region that the loader is to be
- allocated at load time. Uninitialized data follows the initialized
- data in the NLM address space. */
-
- bfd_size_type uninitializedDataSize;
-
- /* The byte offset of the custom data from the start of the file. The
- custom data is set by the CUSTOM keyword to NLMLINK. */
-
- file_ptr customDataOffset;
-
- /* The size of the custom data, in bytes. */
-
- bfd_size_type customDataSize;
-
- /* The byte offset of the module dependencies from the start of the file.
- The module dependencies are determined by the MODULE keyword in
- NLMLINK. */
-
- file_ptr moduleDependencyOffset;
-
- /* The number of module dependencies at the moduleDependencyOffset. */
-
- long numberOfModuleDependencies;
-
- /* The byte offset of the relocation fixup data from the start of the file */
-
- file_ptr relocationFixupOffset;
- long numberOfRelocationFixups;
- file_ptr externalReferencesOffset;
- long numberOfExternalReferences;
- file_ptr publicsOffset;
- long numberOfPublics;
- file_ptr debugInfoOffset;
- long numberOfDebugRecords;
- file_ptr codeStartOffset;
- file_ptr exitProcedureOffset;
- file_ptr checkUnloadProcedureOffset;
- long moduleType;
- long flags;
-} Nlm_Internal_Fixed_Header;
-
-#define nlm32_internal_fixed_header nlm_internal_fixed_header
-#define Nlm32_Internal_Fixed_Header Nlm_Internal_Fixed_Header
-#define nlm64_internal_fixed_header nlm_internal_fixed_header
-#define Nlm64_Internal_Fixed_Header Nlm_Internal_Fixed_Header
-
-/* This structure contains the portions of the NLM header that are either
- variable in size in the external representation, or else are not at a
- fixed offset relative to the start of the NLM header due to preceding
- variable sized fields.
-
- Note that all the fields must exist in the external header, and in
- the order used here (the same order is used in the internal form
- for consistency, not out of necessity). */
-
-typedef struct nlm_internal_variable_header
-{
-
- /* The descriptionLength field contains the length of the text in
- descriptionText, excluding the null terminator. The descriptionText
- field contains the NLM description obtained from the DESCRIPTION
- keyword in NLMLINK plus the null byte terminator. The descriptionText
- can be up to NLM_MAX_DESCRIPTION_LENGTH characters. */
-
- unsigned char descriptionLength;
- char descriptionText[NLM_MAX_DESCRIPTION_LENGTH + 1];
-
- /* The stackSize field contains the size of the stack in bytes, as
- specified by the STACK or STACKSIZE keyword in NLMLINK. If no size
- is specified, the default is NLM_DEFAULT_STACKSIZE. */
-
- long stackSize;
-
- /* The reserved field is included only for completeness. It should contain
- zero. */
-
- long reserved;
-
- /* This field is fixed length, should contain " LONG" (note leading
- space), and is unused. */
-
- char oldThreadName[NLM_OLD_THREAD_NAME_LENGTH];
-
- /* The screenNameLength field contains the length of the actual text stored
- in the screenName field, excluding the null byte terminator. The
- screenName field contains the screen name as specified by the SCREENNAME
- keyword in NLMLINK, and can be up to NLM_MAX_SCREEN_NAME_LENGTH
- characters. */
-
- unsigned char screenNameLength;
- char screenName[NLM_MAX_SCREEN_NAME_LENGTH + 1];
-
- /* The threadNameLength field contains the length of the actual text stored
- in the threadName field, excluding the null byte terminator. The
- threadName field contains the thread name as specified by the THREADNAME
- keyword in NLMLINK, and can be up to NLM_MAX_THREAD_NAME_LENGTH
- characters. */
-
- unsigned char threadNameLength;
- char threadName[NLM_MAX_THREAD_NAME_LENGTH + 1];
-
-} Nlm_Internal_Variable_Header;
-
-#define nlm32_internal_variable_header nlm_internal_variable_header
-#define Nlm32_Internal_Variable_Header Nlm_Internal_Variable_Header
-#define nlm64_internal_variable_header nlm_internal_variable_header
-#define Nlm64_Internal_Variable_Header Nlm_Internal_Variable_Header
-
-/* The version header is one of the optional auxiliary headers and
- follows the fixed length and variable length NLM headers. */
-
-typedef struct nlm_internal_version_header
-{
- /* The header is recognized by "VeRsIoN#" in the stamp field. */
- char stamp[8];
- long majorVersion;
- long minorVersion;
- long revision;
- long year;
- long month;
- long day;
-} Nlm_Internal_Version_Header;
-
-#define nlm32_internal_version_header nlm_internal_version_header
-#define Nlm32_Internal_Version_Header Nlm_Internal_Version_Header
-#define nlm64_internal_version_header nlm_internal_version_header
-#define Nlm64_Internal_Version_Header Nlm_Internal_Version_Header
-
-typedef struct nlm_internal_copyright_header
-{
- /* The header is recognized by "CoPyRiGhT=" in the stamp field. */
- char stamp[10];
- unsigned char copyrightMessageLength;
- char copyrightMessage[NLM_MAX_COPYRIGHT_MESSAGE_LENGTH];
-} Nlm_Internal_Copyright_Header;
-
-#define nlm32_internal_copyright_header nlm_internal_copyright_header
-#define Nlm32_Internal_Copyright_Header Nlm_Internal_Copyright_Header
-#define nlm64_internal_copyright_header nlm_internal_copyright_header
-#define Nlm64_Internal_Copyright_Header Nlm_Internal_Copyright_Header
-
-typedef struct nlm_internal_extended_header
-{
- /* The header is recognized by "MeSsAgEs" in the stamp field. */
- char stamp[8];
- long languageID;
- file_ptr messageFileOffset;
- bfd_size_type messageFileLength;
- long messageCount;
- file_ptr helpFileOffset;
- bfd_size_type helpFileLength;
- file_ptr RPCDataOffset;
- bfd_size_type RPCDataLength;
- file_ptr sharedCodeOffset;
- bfd_size_type sharedCodeLength;
- file_ptr sharedDataOffset;
- bfd_size_type sharedDataLength;
- file_ptr sharedRelocationFixupOffset;
- long sharedRelocationFixupCount;
- file_ptr sharedExternalReferenceOffset;
- long sharedExternalReferenceCount;
- file_ptr sharedPublicsOffset;
- long sharedPublicsCount;
- file_ptr sharedDebugRecordOffset;
- long sharedDebugRecordCount;
- bfd_vma SharedInitializationOffset;
- bfd_vma SharedExitProcedureOffset;
- long productID;
- long reserved0;
- long reserved1;
- long reserved2;
- long reserved3;
- long reserved4;
- long reserved5;
-} Nlm_Internal_Extended_Header;
-
-#define nlm32_internal_extended_header nlm_internal_extended_header
-#define Nlm32_Internal_Extended_Header Nlm_Internal_Extended_Header
-#define nlm64_internal_extended_header nlm_internal_extended_header
-#define Nlm64_Internal_Extended_Header Nlm_Internal_Extended_Header
-
-/* The format of a custom header as stored internally is different
- from the external format. This is how we store a custom header
- which we do not recognize. */
-
-typedef struct nlm_internal_custom_header
-{
- /* The header is recognized by "CuStHeAd" in the stamp field. */
- char stamp[8];
- bfd_size_type hdrLength;
- file_ptr dataOffset;
- bfd_size_type dataLength;
- char dataStamp[8];
- PTR hdr;
-} Nlm_Internal_Custom_Header;
-
-#define nlm32_internal_custom_header nlm_internal_custom_header
-#define Nlm32_Internal_Custom_Header Nlm_Internal_Custom_Header
-#define nlm64_internal_custom_header nlm_internal_custom_header
-#define Nlm64_Internal_Custom_Header Nlm_Internal_Custom_Header
-
-/* The internal Cygnus header is written out externally as a custom
- header. We don't try to replicate that structure here. */
-
-typedef struct nlm_internal_cygnus_ext_header
-{
- /* The header is recognized by "CyGnUsEx" in the stamp field. */
- char stamp[8];
- /* File location of debugging information. */
- file_ptr offset;
- /* Length of debugging information. */
- bfd_size_type length;
-} Nlm_Internal_Cygnus_Ext_Header;
-
-#define nlm32_internal_cygnus_ext_header nlm_internal_cygnus_ext_header
-#define Nlm32_Internal_Cygnus_Ext_Header Nlm_Internal_Cygnus_Ext_Header
-#define nlm64_internal_cygnus_ext_header nlm_internal_cygnus_ext_header
-#define Nlm64_Internal_Cygnus_Ext_Header Nlm_Internal_Cygnus_Ext_Header
diff --git a/contrib/gdb/include/nlm/ppc-ext.h b/contrib/gdb/include/nlm/ppc-ext.h
deleted file mode 100644
index 0aae10772f56..000000000000
--- a/contrib/gdb/include/nlm/ppc-ext.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/* PowerPC NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1994 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. */
-
-#ifdef OLDFORMAT
-
-/* The format of a PowerPC NLM changed. These structures are only
- used in the old format. */
-
-/* A PowerPC NLM starts with an instance of this structure. */
-
-struct nlm32_powerpc_external_prefix_header
-{
- /* Signature. Must be "AppleNLM". */
- char signature[8];
- /* Version number. Current value is 1. */
- unsigned char headerVersion[4];
- /* ??. Should be set to 0. */
- unsigned char origins[4];
- /* File creation date in standard Unix time format (seconds since
- 1/1/70). */
- unsigned char date[4];
-};
-
-#define NLM32_POWERPC_SIGNATURE "AppleNLM"
-#define NLM32_POWERPC_HEADER_VERSION 1
-
-/* The external format of a PowerPC NLM reloc. This is the same as an
- XCOFF dynamic reloc. */
-
-struct nlm32_powerpc_external_reloc
-{
- /* Address. */
- unsigned char l_vaddr[4];
- /* Symbol table index. This is 0 for .text and 1 for .data. 2
- means .bss, but I don't know if it is used. In XCOFF, larger
- numbers are indices into the dynamic symbol table, but they are
- presumably not used in an NLM. */
- unsigned char l_symndx[4];
- /* Relocation type. */
- unsigned char l_rtype[2];
- /* Section number being relocated. */
- unsigned char l_rsecnm[2];
-};
-
-#endif /* OLDFORMAT */
-
-/* The external format of the fixed header. */
-
-typedef struct nlm32_powerpc_external_fixed_header
-{
-
- /* The signature field identifies the file as an NLM. It must contain
- the signature string, which depends upon the NLM target. */
-
- unsigned char signature[24];
-
- /* The version of the header. At this time, the highest version number
- is 4. */
-
- unsigned char version[4];
-
- /* The name of the module, which must be a DOS name (1-8 characters followed
- by a period and a 1-3 character extension). The first byte is the byte
- length of the name and the last byte is a null terminator byte. This
- field is fixed length, and any unused bytes should be null bytes. The
- value is set by the OUTPUT keyword to NLMLINK. */
-
- unsigned char moduleName[14];
-
- /* Padding to make it come out correct. */
-
- unsigned char pad1[2];
-
- /* The byte offset of the code image from the start of the file. */
-
- unsigned char codeImageOffset[4];
-
- /* The size of the code image, in bytes. */
-
- unsigned char codeImageSize[4];
-
- /* The byte offset of the data image from the start of the file. */
-
- unsigned char dataImageOffset[4];
-
- /* The size of the data image, in bytes. */
-
- unsigned char dataImageSize[4];
-
- /* The size of the uninitialized data region that the loader is to be
- allocated at load time. Uninitialized data follows the initialized
- data in the NLM address space. */
-
- unsigned char uninitializedDataSize[4];
-
- /* The byte offset of the custom data from the start of the file. The
- custom data is set by the CUSTOM keyword to NLMLINK. It is possible
- for this to be EOF if there is no custom data. */
-
- unsigned char customDataOffset[4];
-
- /* The size of the custom data, in bytes. */
-
- unsigned char customDataSize[4];
-
- /* The byte offset of the module dependencies from the start of the file.
- The module dependencies are determined by the MODULE keyword in
- NLMLINK. */
-
- unsigned char moduleDependencyOffset[4];
-
- /* The number of module dependencies at the moduleDependencyOffset. */
-
- unsigned char numberOfModuleDependencies[4];
-
- /* The byte offset of the relocation fixup data from the start of the file */
-
- unsigned char relocationFixupOffset[4];
-
- unsigned char numberOfRelocationFixups[4];
-
- unsigned char externalReferencesOffset[4];
-
- unsigned char numberOfExternalReferences[4];
-
- unsigned char publicsOffset[4];
-
- unsigned char numberOfPublics[4];
-
- /* The byte offset of the internal debug info from the start of the file.
- It is possible for this to be EOF if there is no debug info. */
-
- unsigned char debugInfoOffset[4];
-
- unsigned char numberOfDebugRecords[4];
-
- unsigned char codeStartOffset[4];
-
- unsigned char exitProcedureOffset[4];
-
- unsigned char checkUnloadProcedureOffset[4];
-
- unsigned char moduleType[4];
-
- unsigned char flags[4];
-
-} Nlm32_powerpc_External_Fixed_Header;
diff --git a/contrib/gdb/include/nlm/sparc32-ext.h b/contrib/gdb/include/nlm/sparc32-ext.h
deleted file mode 100644
index 0deb2dee9230..000000000000
--- a/contrib/gdb/include/nlm/sparc32-ext.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* SPARC NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 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. */
-
-/* The external format of the fixed header. */
-
-typedef struct nlm32_sparc_external_fixed_header
-{
-
- /* The signature field identifies the file as an NLM. It must contain
- the signature string, which depends upon the NLM target. */
-
- unsigned char signature[24];
-
- /* The version of the header. At this time, the highest version number
- is 4. */
-
- unsigned char version[4];
-
- /* The name of the module, which must be a DOS name (1-8 characters followed
- by a period and a 1-3 character extension). The first byte is the byte
- length of the name and the last byte is a null terminator byte. This
- field is fixed length, and any unused bytes should be null bytes. The
- value is set by the OUTPUT keyword to NLMLINK. */
-
- unsigned char moduleName[14];
-
- /* Padding to make it come out correct. */
-
- unsigned char pad1[2];
-
- /* The byte offset of the code image from the start of the file. */
-
- unsigned char codeImageOffset[4];
-
- /* The size of the code image, in bytes. */
-
- unsigned char codeImageSize[4];
-
- /* The byte offset of the data image from the start of the file. */
-
- unsigned char dataImageOffset[4];
-
- /* The size of the data image, in bytes. */
-
- unsigned char dataImageSize[4];
-
- /* The size of the uninitialized data region that the loader is to be
- allocated at load time. Uninitialized data follows the initialized
- data in the NLM address space. */
-
- unsigned char uninitializedDataSize[4];
-
- /* The byte offset of the custom data from the start of the file. The
- custom data is set by the CUSTOM keyword to NLMLINK. It is possible
- for this to be EOF if there is no custom data. */
-
- unsigned char customDataOffset[4];
-
- /* The size of the custom data, in bytes. */
-
- unsigned char customDataSize[4];
-
- /* The byte offset of the module dependencies from the start of the file.
- The module dependencies are determined by the MODULE keyword in
- NLMLINK. */
-
- unsigned char moduleDependencyOffset[4];
-
- /* The number of module dependencies at the moduleDependencyOffset. */
-
- unsigned char numberOfModuleDependencies[4];
-
- /* The byte offset of the relocation fixup data from the start of the file */
-
- unsigned char relocationFixupOffset[4];
-
- unsigned char numberOfRelocationFixups[4];
-
- unsigned char externalReferencesOffset[4];
-
- unsigned char numberOfExternalReferences[4];
-
- unsigned char publicsOffset[4];
-
- unsigned char numberOfPublics[4];
-
- /* The byte offset of the internal debug info from the start of the file.
- It is possible for this to be EOF if there is no debug info. */
-
- unsigned char debugInfoOffset[4];
-
- unsigned char numberOfDebugRecords[4];
-
- unsigned char codeStartOffset[4];
-
- unsigned char exitProcedureOffset[4];
-
- unsigned char checkUnloadProcedureOffset[4];
-
- unsigned char moduleType[4];
-
- unsigned char flags[4];
-
-} Nlm32_sparc_External_Fixed_Header;
diff --git a/contrib/gdb/include/oasys.h b/contrib/gdb/include/oasys.h
deleted file mode 100644
index 867d2503134e..000000000000
--- a/contrib/gdb/include/oasys.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* Oasys object format header file for BFD.
- Contributed by Cygnus Support. */
-
-#define OASYS_MAX_SEC_COUNT 16
-/* **** */
-
-typedef struct oasys_archive_header {
- unsigned int version;
- char create_date[12];
- char revision_date[12];
- unsigned int mod_count;
- file_ptr mod_tbl_offset;
- unsigned int sym_tbl_size;
- unsigned int sym_count;
- file_ptr sym_tbl_offset;
- unsigned int xref_count;
- file_ptr xref_lst_offset;
-} oasys_archive_header_type;
-
-typedef struct oasys_extarchive_header {
- bfd_byte version[4];
- bfd_byte create_date[12];
- bfd_byte revision_date[12];
- bfd_byte mod_count[4];
- bfd_byte mod_tbl_offset[4];
- bfd_byte sym_tbl_size[4];
- bfd_byte sym_count[4];
- bfd_byte sym_tbl_offset[4];
- bfd_byte xref_count[4];
- bfd_byte xref_lst_offset[4];
-} oasys_extarchive_header_type;
-
-typedef struct oasys_module_table {
- int mod_number;
- char mod_date[12];
- unsigned int mod_size;
- unsigned int dep_count;
- unsigned int depee_count;
- file_ptr file_offset;
- unsigned int sect_count;
- char *module_name;
- unsigned int module_name_size;
-} oasys_module_table_type;
-
-
-typedef struct oasys_extmodule_table_a {
- bfd_byte mod_number[4];
- bfd_byte mod_date[12];
- bfd_byte mod_size[4];
- bfd_byte dep_count[4];
- bfd_byte depee_count[4];
- bfd_byte sect_count[4];
- bfd_byte file_offset[4];
- bfd_byte mod_name[32];
-} oasys_extmodule_table_type_a_type;
-
-typedef struct oasys_extmodule_table_b {
- bfd_byte mod_number[4];
- bfd_byte mod_date[12];
- bfd_byte mod_size[4];
- bfd_byte dep_count[4];
- bfd_byte depee_count[4];
- bfd_byte sect_count[4];
- bfd_byte file_offset[4];
- bfd_byte mod_name_length[4];
-} oasys_extmodule_table_type_b_type;
-
-
-typedef enum oasys_record {
- oasys_record_is_end_enum = 0,
- oasys_record_is_data_enum = 1,
- oasys_record_is_symbol_enum = 2,
- oasys_record_is_header_enum = 3,
- oasys_record_is_named_section_enum = 4,
- oasys_record_is_com_enum = 5,
- oasys_record_is_debug_enum = 6,
- oasys_record_is_section_enum = 7,
- oasys_record_is_debug_file_enum = 8,
- oasys_record_is_module_enum = 9,
- oasys_record_is_local_enum = 10
-} oasys_record_enum_type;
-
-
-
-typedef struct oasys_record_header {
- unsigned char length;
- unsigned char check_sum;
- unsigned char type;
- unsigned char fill;
-} oasys_record_header_type;
-
-typedef struct oasys_data_record {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte addr[4];
- /* maximum total size of data record is 255 bytes */
- bfd_byte data[246];
-} oasys_data_record_type;
-
-typedef struct oasys_header_record {
- oasys_record_header_type header;
- unsigned char version_number;
- unsigned char rev_number;
- char module_name[26-6];
- char description[64-26];
-} oasys_header_record_type;
-
-#define OASYS_VERSION_NUMBER 0
-#define OASYS_REV_NUMBER 0
-
-typedef struct oasys_symbol_record {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte value[4];
- bfd_byte refno[2];
- char name[64];
-} oasys_symbol_record_type;
-
-#define RELOCATION_PCREL_BIT 0x80
-#define RELOCATION_32BIT_BIT 0x40
-#define RELOCATION_TYPE_BITS 0x30
-#define RELOCATION_TYPE_ABS 0x00
-#define RELOCATION_TYPE_REL 0x10
-#define RELOCATION_TYPE_UND 0x20
-#define RELOCATION_TYPE_COM 0x30
-#define RELOCATION_SECT_BITS 0x0f
-
-typedef struct oasys_section_record {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte value[4];
- bfd_byte vma[4];
- bfd_byte fill[3];
-} oasys_section_record_type;
-
-typedef struct oasys_end_record {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte entry[4];
- bfd_byte fill[2];
- bfd_byte zero;
-} oasys_end_record_type;
-
-typedef union oasys_record_union {
- oasys_record_header_type header;
- oasys_data_record_type data;
- oasys_section_record_type section;
- oasys_symbol_record_type symbol;
- oasys_header_record_type first;
- oasys_end_record_type end;
- bfd_byte pad[256];
-} oasys_record_union_type;
diff --git a/contrib/gdb/include/obstack.h b/contrib/gdb/include/obstack.h
deleted file mode 100644
index 416b8bf53151..000000000000
--- a/contrib/gdb/include/obstack.h
+++ /dev/null
@@ -1,518 +0,0 @@
-/* obstack.h - object stack macros
- Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
-
-This program 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, or (at your option) any
-later version.
-
-This program is distributed in the hope that 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 this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Summary:
-
-All the apparent functions defined here are macros. The idea
-is that you would use these pre-tested macros to solve a
-very specific set of problems, and they would run fast.
-Caution: no side-effects in arguments please!! They may be
-evaluated MANY times!!
-
-These macros operate a stack of objects. Each object starts life
-small, and may grow to maturity. (Consider building a word syllable
-by syllable.) An object can move while it is growing. Once it has
-been "finished" it never changes address again. So the "top of the
-stack" is typically an immature growing object, while the rest of the
-stack is of mature, fixed size and fixed address objects.
-
-These routines grab large chunks of memory, using a function you
-supply, called `obstack_chunk_alloc'. On occasion, they free chunks,
-by calling `obstack_chunk_free'. You must define them and declare
-them before using any obstack macros.
-
-Each independent stack is represented by a `struct obstack'.
-Each of the obstack macros expects a pointer to such a structure
-as the first argument.
-
-One motivation for this package is the problem of growing char strings
-in symbol tables. Unless you are "fascist pig with a read-only mind"
---Gosper's immortal quote from HAKMEM item 154, out of context--you
-would not like to put any arbitrary upper limit on the length of your
-symbols.
-
-In practice this often means you will build many short symbols and a
-few long symbols. At the time you are reading a symbol you don't know
-how long it is. One traditional method is to read a symbol into a
-buffer, realloc()ating the buffer every time you try to read a symbol
-that is longer than the buffer. This is beaut, but you still will
-want to copy the symbol from the buffer to a more permanent
-symbol-table entry say about half the time.
-
-With obstacks, you can work differently. Use one obstack for all symbol
-names. As you read a symbol, grow the name in the obstack gradually.
-When the name is complete, finalize it. Then, if the symbol exists already,
-free the newly read name.
-
-The way we do this is to take a large chunk, allocating memory from
-low addresses. When you want to build a symbol in the chunk you just
-add chars above the current "high water mark" in the chunk. When you
-have finished adding chars, because you got to the end of the symbol,
-you know how long the chars are, and you can create a new object.
-Mostly the chars will not burst over the highest address of the chunk,
-because you would typically expect a chunk to be (say) 100 times as
-long as an average object.
-
-In case that isn't clear, when we have enough chars to make up
-the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
-so we just point to it where it lies. No moving of chars is
-needed and this is the second win: potentially long strings need
-never be explicitly shuffled. Once an object is formed, it does not
-change its address during its lifetime.
-
-When the chars burst over a chunk boundary, we allocate a larger
-chunk, and then copy the partly formed object from the end of the old
-chunk to the beginning of the new larger chunk. We then carry on
-accreting characters to the end of the object as we normally would.
-
-A special macro is provided to add a single char at a time to a
-growing object. This allows the use of register variables, which
-break the ordinary 'growth' macro.
-
-Summary:
- We allocate large chunks.
- We carve out one object at a time from the current chunk.
- Once carved, an object never moves.
- We are free to append data of any size to the currently
- growing object.
- Exactly one object is growing in an obstack at any one time.
- You can run one obstack per control block.
- You may have as many control blocks as you dare.
- Because of the way we do it, you can `unwind' an obstack
- back to a previous state. (You may remove objects much
- as you would with a stack.)
-*/
-
-
-/* Don't do the contents of this file more than once. */
-
-#ifndef __OBSTACK_H__
-#define __OBSTACK_H__
-
-/* We use subtraction of (char *)0 instead of casting to int
- because on word-addressable machines a simple cast to int
- may ignore the byte-within-word field of the pointer. */
-
-#ifndef __PTR_TO_INT
-#define __PTR_TO_INT(P) ((P) - (char *)0)
-#endif
-
-#ifndef __INT_TO_PTR
-#define __INT_TO_PTR(P) ((P) + (char *)0)
-#endif
-
-/* We need the type of the resulting object. In ANSI C it is ptrdiff_t
- but in traditional C it is usually long. If we are in ANSI C and
- don't already have ptrdiff_t get it. */
-
-#if defined (__STDC__) && ! defined (offsetof)
-#if defined (__GNUC__) && defined (IN_GCC)
-/* On Next machine, the system's stddef.h screws up if included
- after we have defined just ptrdiff_t, so include all of stddef.h.
- Otherwise, define just ptrdiff_t, which is all we need. */
-#ifndef __NeXT__
-#define __need_ptrdiff_t
-#endif
-#endif
-
-#include <stddef.h>
-#endif
-
-#ifdef __STDC__
-#define PTR_INT_TYPE ptrdiff_t
-#else
-#define PTR_INT_TYPE long
-#endif
-
-struct _obstack_chunk /* Lives at front of each chunk. */
-{
- char *limit; /* 1 past end of this chunk */
- struct _obstack_chunk *prev; /* address of prior chunk or NULL */
- char contents[4]; /* objects begin here */
-};
-
-struct obstack /* control current object in current chunk */
-{
- long chunk_size; /* preferred size to allocate chunks in */
- struct _obstack_chunk* chunk; /* address of current struct obstack_chunk */
- char *object_base; /* address of object we are building */
- char *next_free; /* where to add next char to current object */
- char *chunk_limit; /* address of char after current chunk */
- PTR_INT_TYPE temp; /* Temporary for some macros. */
- int alignment_mask; /* Mask of alignment for each object. */
- struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
- void (*freefun) (); /* User's function to free a chunk. */
- char *extra_arg; /* first arg for chunk alloc/dealloc funcs */
- unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
- unsigned maybe_empty_object:1;/* There is a possibility that the current
- chunk contains a zero-length object. This
- prevents freeing the chunk if we allocate
- a bigger chunk to replace it. */
- unsigned alloc_failed:1; /* chunk alloc func returned 0 */
-};
-
-/* Declare the external functions we use; they are in obstack.c. */
-
-#ifdef __STDC__
-extern void _obstack_newchunk (struct obstack *, int);
-extern void _obstack_free (struct obstack *, void *);
-extern int _obstack_begin (struct obstack *, int, int,
- void *(*) (), void (*) ());
-extern int _obstack_begin_1 (struct obstack *, int, int,
- void *(*) (), void (*) (), void *);
-extern int _obstack_memory_used (struct obstack *);
-#else
-extern void _obstack_newchunk ();
-extern void _obstack_free ();
-extern int _obstack_begin ();
-extern int _obstack_begin_1 ();
-extern int _obstack_memory_used ();
-#endif
-
-#ifdef __STDC__
-
-/* Do the function-declarations after the structs
- but before defining the macros. */
-
-void obstack_init (struct obstack *obstack);
-
-void * obstack_alloc (struct obstack *obstack, int size);
-
-void * obstack_copy (struct obstack *obstack, void *address, int size);
-void * obstack_copy0 (struct obstack *obstack, void *address, int size);
-
-void obstack_free (struct obstack *obstack, void *block);
-
-void obstack_blank (struct obstack *obstack, int size);
-
-void obstack_grow (struct obstack *obstack, void *data, int size);
-void obstack_grow0 (struct obstack *obstack, void *data, int size);
-
-void obstack_1grow (struct obstack *obstack, int data_char);
-void obstack_ptr_grow (struct obstack *obstack, void *data);
-void obstack_int_grow (struct obstack *obstack, int data);
-
-void * obstack_finish (struct obstack *obstack);
-
-int obstack_object_size (struct obstack *obstack);
-
-int obstack_room (struct obstack *obstack);
-void obstack_1grow_fast (struct obstack *obstack, int data_char);
-void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
-void obstack_int_grow_fast (struct obstack *obstack, int data);
-void obstack_blank_fast (struct obstack *obstack, int size);
-
-void * obstack_base (struct obstack *obstack);
-void * obstack_next_free (struct obstack *obstack);
-int obstack_alignment_mask (struct obstack *obstack);
-int obstack_chunk_size (struct obstack *obstack);
-int obstack_memory_used (struct obstack *obstack);
-
-#endif /* __STDC__ */
-
-/* Non-ANSI C cannot really support alternative functions for these macros,
- so we do not declare them. */
-
-/* Pointer to beginning of object being allocated or to be allocated next.
- Note that this might not be the final address of the object
- because a new chunk might be needed to hold the final size. */
-
-#define obstack_base(h) ((h)->alloc_failed ? 0 : (h)->object_base)
-
-/* Size for allocating ordinary chunks. */
-
-#define obstack_chunk_size(h) ((h)->chunk_size)
-
-/* Pointer to next byte not yet allocated in current chunk. */
-
-#define obstack_next_free(h) ((h)->alloc_failed ? 0 : (h)->next_free)
-
-/* Mask specifying low bits that should be clear in address of an object. */
-
-#define obstack_alignment_mask(h) ((h)->alignment_mask)
-
-#define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-
-#define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-
-#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), (void (*) ()) (freefun))
-
-#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg))
-
-#define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
-
-#define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)()) (newfreefun))
-
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
-
-#define obstack_blank_fast(h,n) ((h)->next_free += (n))
-
-#define obstack_memory_used(h) _obstack_memory_used (h)
-
-#if defined (__GNUC__) && defined (__STDC__)
-#if __GNUC__ < 2
-#define __extension__
-#endif
-
-/* For GNU C, if not -traditional,
- we can define these macros to compute all args only once
- without using a global variable.
- Also, we can avoid using the `temp' slot, to make faster code. */
-
-#define obstack_object_size(OBSTACK) \
- __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- __o->alloc_failed ? 0 : \
- (unsigned) (__o->next_free - __o->object_base); })
-
-#define obstack_room(OBSTACK) \
- __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- (unsigned) (__o->chunk_limit - __o->next_free); })
-
-#define obstack_grow(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len > __o->chunk_limit) \
- _obstack_newchunk (__o, __len); \
- if (!__o->alloc_failed) \
- { \
- bcopy (where, __o->next_free, __len); \
- __o->next_free += __len; \
- } \
- (void) 0; })
-
-#define obstack_grow0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, __len + 1); \
- if (!__o->alloc_failed) \
- { \
- bcopy (where, __o->next_free, __len); \
- __o->next_free += __len; \
- *(__o->next_free)++ = 0; \
- } \
- (void) 0; })
-
-#define obstack_1grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, 1); \
- if (!__o->alloc_failed) \
- *(__o->next_free)++ = (datum); \
- (void) 0; })
-
-/* These assume that the obstack alignment is good enough for pointers or ints,
- and that the data added so far to the current object
- shares that much alignment. */
-
-#define obstack_ptr_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (void *)); \
- if (!__o->alloc_failed) \
- *((void **)__o->next_free)++ = ((void *)datum); \
- (void) 0; })
-
-#define obstack_int_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (int) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (int)); \
- if (!__o->alloc_failed) \
- *((int *)__o->next_free)++ = ((int)datum); \
- (void) 0; })
-
-#define obstack_ptr_grow_fast(h,aptr) (*((void **)(h)->next_free)++ = (void *)aptr)
-#define obstack_int_grow_fast(h,aint) (*((int *)(h)->next_free)++ = (int)aint)
-
-#define obstack_blank(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- if (!__o->alloc_failed) \
- __o->next_free += __len; \
- (void) 0; })
-
-#define obstack_alloc(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_blank (__h, (length)); \
- obstack_finish (__h); })
-
-#define obstack_copy(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow (__h, (where), (length)); \
- obstack_finish (__h); })
-
-#define obstack_copy0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow0 (__h, (where), (length)); \
- obstack_finish (__h); })
-
-/* The local variable is named __o1 to avoid a name conflict
- when obstack_blank is called. */
-#define obstack_finish(OBSTACK) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- void *value; \
- if (__o1->alloc_failed) \
- value = 0; \
- else \
- { \
- value = (void *) __o1->object_base; \
- if (__o1->next_free == value) \
- __o1->maybe_empty_object = 1; \
- __o1->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
- & ~ (__o1->alignment_mask)); \
- if (__o1->next_free - (char *)__o1->chunk \
- > __o1->chunk_limit - (char *)__o1->chunk) \
- __o1->next_free = __o1->chunk_limit; \
- __o1->object_base = __o1->next_free; \
- } \
- value; })
-
-#define obstack_free(OBSTACK, OBJ) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- void *__obj = (OBJ); \
- if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = __obj; \
- else (obstack_free) (__o, __obj); })
-
-#else /* not __GNUC__ or not __STDC__ */
-
-#define obstack_object_size(h) \
- (unsigned) ((h)->alloc_failed ? 0 : (h)->next_free - (h)->object_base)
-
-#define obstack_room(h) \
- (unsigned) ((h)->chunk_limit - (h)->next_free)
-
-/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
- so that we can avoid having void expressions
- in the arms of the conditional expression.
- Casting the third operand to void was tried before,
- but some compilers won't accept it. */
-
-#define obstack_grow(h,where,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- (bcopy (where, (h)->next_free, (h)->temp), \
- (h)->next_free += (h)->temp)))
-
-#define obstack_grow0(h,where,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- (bcopy (where, (h)->next_free, (h)->temp), \
- (h)->next_free += (h)->temp, \
- *((h)->next_free)++ = 0)))
-
-#define obstack_1grow(h,datum) \
-( (((h)->next_free + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), 1), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- (*((h)->next_free)++ = (datum))))
-
-#define obstack_ptr_grow(h,datum) \
-( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- (*((char **)(((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *)datum))))
-
-#define obstack_int_grow(h,datum) \
-( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- (*((int *)(((h)->next_free+=sizeof(int))-sizeof(int))) = ((int)datum))))
-
-#define obstack_ptr_grow_fast(h,aptr) (*((char **)(h)->next_free)++ = (char *)aptr)
-#define obstack_int_grow_fast(h,aint) (*((int *)(h)->next_free)++ = (int)aint)
-
-#define obstack_blank(h,length) \
-( (h)->temp = (length), \
- (((h)->chunk_limit - (h)->next_free < (h)->temp) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- ((h)->alloc_failed ? 0 : \
- ((h)->next_free += (h)->temp)))
-
-#define obstack_alloc(h,length) \
- (obstack_blank ((h), (length)), obstack_finish ((h)))
-
-#define obstack_copy(h,where,length) \
- (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
-
-#define obstack_copy0(h,where,length) \
- (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-
-#define obstack_finish(h) \
-( (h)->alloc_failed ? 0 : \
- (((h)->next_free == (h)->object_base \
- ? (((h)->maybe_empty_object = 1), 0) \
- : 0), \
- (h)->temp = __PTR_TO_INT ((h)->object_base), \
- (h)->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \
- & ~ ((h)->alignment_mask)), \
- (((h)->next_free - (char *)(h)->chunk \
- > (h)->chunk_limit - (char *)(h)->chunk) \
- ? ((h)->next_free = (h)->chunk_limit) : 0), \
- (h)->object_base = (h)->next_free, \
- __INT_TO_PTR ((h)->temp)))
-
-#ifdef __STDC__
-#define obstack_free(h,obj) \
-( (h)->temp = (char *)(obj) - (char *) (h)->chunk, \
- (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
-#else
-#define obstack_free(h,obj) \
-( (h)->temp = (char *)(obj) - (char *) (h)->chunk, \
- (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
-#endif
-
-#endif /* not __GNUC__ or not __STDC__ */
-
-#endif /* not __OBSTACK_H__ */
diff --git a/contrib/gdb/include/opcode/ChangeLog b/contrib/gdb/include/opcode/ChangeLog
deleted file mode 100644
index f56df4bd5985..000000000000
--- a/contrib/gdb/include/opcode/ChangeLog
+++ /dev/null
@@ -1,812 +0,0 @@
-Thu Mar 7 15:08:23 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (O): Mark operand letter as in use.
-
-Tue Feb 20 20:46:21 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (sparc_{encode,decode}_sparclet_cpreg): Declare.
- Mark operand letters uU as in use.
-
-Mon Feb 19 01:59:08 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_SPARCLET.
- (sparc_opcode_arch): Delete member `conflicts'. Add `supported'.
- (SPARC_OPCODE_SUPPORTED): New macro.
- (SPARC_OPCODE_CONFLICT_P): Rewrite.
- (F_NOTV9): Delete.
-
-Fri Feb 16 12:23:34 1996 Jeffrey A Law (law@cygnus.com)
-
- * sparc.h (sparc_opcode_lookup_arch) Make return type in
- declaration consistent with return type in definition.
-
-Wed Feb 14 18:14:11 1996 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (i386_optab): Remove Data32 from pushf and popf.
-
-Thu Feb 8 14:27:21 1996 James Carlson <carlson@xylogics.com>
-
- * i386.h (i386_regtab): Add 80486 test registers.
-
-Mon Feb 5 18:35:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i960.h (I_HX): Define.
- (i960_opcodes): Add HX instruction.
-
-Mon Jan 29 12:43:39 1996 Ken Raeburn <raeburn@cygnus.com>
-
- * i386.h: Fix waiting forms of finit, fstenv, fsave, fstsw, fstcw,
- and fclex.
-
-Wed Jan 24 22:36:59 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (enum sparc_opcode_arch_val): Replaces sparc_architecture.
- (SPARC_OPCODE_CONFLICT_P): Renamed from ARCHITECTURES_CONFLICT_P.
- (bfd_* defines): Delete.
- (sparc_opcode_archs): Replaces architecture_pname.
- (sparc_opcode_lookup_arch): Declare.
- (NUMOPCODES): Delete.
-
-Mon Jan 22 08:24:32 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (enum sparc_architecture): Add v9a.
- (ARCHITECTURES_CONFLICT_P): Update.
-
-Thu Dec 28 13:27:53 1995 John Hassey <hassey@rtp.dg.com>
-
- * i386.h: Added Pentium Pro instructions.
-
-Thu Nov 2 22:59:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k.h: Document new 'W' operand place.
-
-Tue Oct 24 10:49:10 1995 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h: Add lci and syncdma instructions.
-
-Mon Oct 23 11:09:16 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * mips.h: Added INSN_4100 flag to mark NEC VR4100 specific
- instructions.
-
-Mon Oct 16 10:28:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc.h (PPC_OPCODE_{COMMON,ANY}): New opcode flags for
- assembler's -mcom and -many switches.
-
-Wed Oct 11 16:56:33 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * i386.h: Fix cmpxchg8b extension opcode description.
-
-Thu Oct 5 18:03:36 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * i386.h: Add Pentium instructions wrmsr, rdtsc, rdmsr, cmpxchg8b,
- and register cr4.
-
-Tue Sep 19 15:26:43 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k.h: Change comment: split type P into types 0, 1 and 2.
-
-Wed Aug 30 13:50:55 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc.h (sparc_{encode,decode}_prefetch): Declare.
-
-Tue Aug 29 15:34:58 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc.h (sparc_{encode,decode}_{asi,membar}): Declare.
-
-Wed Aug 2 18:32:19 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68kmri.h: Remove.
-
- * m68k.h: Move tables into opcodes/m68k-opc.c, leaving just the
- declarations. Remove F_ALIAS and flag field of struct
- m68k_opcode. Change arch field of struct m68k_opcode to unsigned
- int. Make name and args fields of struct m68k_opcode const.
-
-Wed Aug 2 08:16:46 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc.h (F_NOTV9): Define.
-
-Tue Jul 11 14:20:42 1995 Jeff Spiegel <jeffs@lsil.com>
-
- * mips.h (INSN_4010): Define.
-
-Wed Jun 21 18:49:51 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * m68k.h (TBL1): Reverse sense of "round" argument in result.
-
- Changes from Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>:
- * m68k.h: Fix argument descriptions of coprocessor
- instructions to allow only alterable operands where appropriate.
- [!NO_DEFAULT_SIZES]: An omitted size defaults to `w'.
- (m68k_opcode_aliases): Add more aliases.
-
-
-Fri Apr 14 22:15:34 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * m68k.h: Added explcitly short-sized conditional branches, and a
- bunch of aliases (fmov*, ftest*, tdivul) to support gcc's
- svr4-based configurations.
-
-
-Mon Mar 13 21:30:01 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- Mon Feb 27 08:36:39 1995 Bryan Ford <baford@cs.utah.edu>
- * i386.h: added missing Data16/Data32 flags to a few instructions.
-
-Wed Mar 8 15:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (OP_MASK_FR, OP_SH_FR): Define.
- (OP_MASK_BCC, OP_SH_BCC): Define.
- (OP_MASK_PREFX, OP_SH_PREFX): Define.
- (OP_MASK_CCC, OP_SH_CCC): Define.
- (INSN_READ_FPR_R): Define.
- (INSN_RFE): Delete.
-
-Wed Mar 8 03:13:23 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * m68k.h (enum m68k_architecture): Deleted.
- (struct m68k_opcode_alias): New type.
- (m68k_opcodes): Now const. Deleted opcode aliases with exactly
- matching constraints, values and flags. As a side effect of this,
- the MOTOROLA_SYNTAX_ONLY and MIT_SYNTAX_ONLY macros, which so far
- as I know were never used, now may need re-examining.
- (numopcodes): Now const.
- (m68k_opcode_aliases, numaliases): New variables.
- (endop): Deleted.
- [DONT_DEFINE_TABLE]: Declare numopcodes, numaliases, and
- m68k_opcode_aliases; update declaration of m68k_opcodes.
-
-
-Mon Mar 6 10:02:00 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa.h (delay_type): Delete unused enumeration.
- (pa_opcode): Replace unused delayed field with an architecture
- field.
- (pa_opcodes): Mark each instruction as either PA1.0 or PA1.1.
-
-Fri Mar 3 16:10:24 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (INSN_ISA4): Define.
-
-Fri Feb 24 19:13:37 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (M_DLA_AB, M_DLI): Define.
-
-Thu Feb 23 17:33:09 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa.h (fstwx): Fix single-bit error.
-
-Wed Feb 15 12:19:52 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (M_ULD, M_ULD_A, M_USD, M_USD_A): Define.
-
-
-Mon Feb 6 10:35:23 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * i386.h: added cpuid instruction , and dr[0-7] aliases for the
- debug registers. From Charles Hannum (mycroft@netbsd.org).
-
-Mon Feb 6 03:31:54 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- Changes from Bryan Ford <baford@schirf.cs.utah.edu> for 16-bit
- i386 support:
- * i386.h (MOV_AX_DISP32): New macro.
- (i386_optab): Added Data16 and Data32 as needed. Added "w" forms
- of several call/return instructions.
- (ADDR_PREFIX_OPCODE): New macro.
-
-Mon Jan 23 16:45:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- Sat Jan 21 17:50:38 1995 Pat Rankin (rankin@eql.caltech.edu)
-
- * ../include/opcode/vax.h (struct vot_wot, field `args'): make
- it pointer to const char;
- (struct vot, field `name'): ditto.
-
-Thu Jan 19 14:47:53 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * vax.h: Supply and properly group all values in end sentinel.
-
-Tue Jan 17 10:55:30 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * mips.h (INSN_ISA, INSN_4650): Define.
-
-
-
-Wed Oct 19 13:34:17 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * a29k.h: Add operand type 'I' for `inv' and `iretinv'. On
- systems with a separate instruction and data cache, such as the
- 29040, these instructions take an optional argument.
-
-Wed Sep 14 17:44:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * mips.h (INSN_STORE_MEMORY): Correct value to not conflict with
- INSN_TRAP.
-
-Tue Sep 6 11:39:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * mips.h (INSN_STORE_MEMORY): Define.
-
-Thu Jul 28 19:28:07 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * sparc.h: Document new operand type 'x'.
-
-Tue Jul 26 17:48:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i960.h (I_CX2): New instruction category. It includes
- instructions available on Cx and Jx processors.
- (I_JX): New instruction category, for JX-only instructions.
- (i960_opcodes): Put eshro and sysctl in I_CX2 category. Added
- Jx-only instructions, in I_JX category.
-
-Wed Jul 13 18:43:47 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * ns32k.h (endop): Made pointer const too.
-
-Sun Jul 10 11:01:09 1994 Ian Dall (dall@hfrd.dsto.gov.au)
-
- * ns32k.h: Drop Q operand type as there is no correct use
- for it. Add I and Z operand types which allow better checking.
-
-Thu Jul 7 12:34:48 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * h8300.h (xor.l) :fix bit pattern.
- (L_2): New size of operand.
- (trapa): Use it.
-
-Fri Jun 10 16:38:11 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m68k.h: Move "trap" before "tpcc" to change disassembly.
-
-Fri Jun 3 15:57:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * sparc.h: Include v9 definitions.
-
-Thu Jun 2 12:23:17 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * m68k.h (m68060): Defined.
- (m68040up, mfloat, mmmu): Include it.
- (struct m68k_opcode): Widen `arch' field.
- (m68k_opcodes): Updated for M68060. Removed comments that were
- instructions commented out by "JF" years ago.
-
-Thu Apr 28 18:31:14 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * m68k.h (struct m68k_opcode): Shorten `arch' field to 8 bits, and
- add a one-bit `flags' field.
- (F_ALIAS): New macro.
-
-Wed Apr 27 11:29:52 1994 Steve Chamberlain (sac@cygnus.com)
-
- * h8300.h (dec, inc): Get encoding right.
-
-Mon Apr 4 13:12:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc.h (struct powerpc_operand): Removed signedp field; just use
- a flag instead.
- (PPC_OPERAND_SIGNED): Define.
- (PPC_OPERAND_SIGNOPT): Define.
-
-Thu Mar 31 19:34:08 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i386.h (IS_JUMP_ON_ECX_ZERO, "jcxz" pattern): Operand size
- prefix is 0x66, not 0x67. Patch from H.J. Lu (hlu@nynexst.com).
-
-Thu Mar 3 15:51:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i386.h: Reverse last change. It'll be handled in gas instead.
-
-Thu Feb 24 15:29:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i386.h (sar): Disabled the two-operand Imm1 form, since it was
- slower on the 486 and used the implicit shift count despite the
- explicit operand. The one-operand form is still available to get
- the shorter form with the implicit shift count.
-
-Thu Feb 17 12:27:52 1994 Torbjorn Granlund (tege@mexican.cygnus.com)
-
- * hppa.h: Fix typo in fstws arg string.
-
-Wed Feb 9 21:23:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc.h (struct powerpc_opcode): Make operands field unsigned.
-
-Mon Feb 7 19:14:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc.h (PPC_OPCODE_601): Define.
-
-Fri Feb 4 23:43:50 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa.h (addb): Use '@' for addb and addib pseudo ops.
- (so we can determine valid completers for both addb and addb[tf].)
-
- * hppa.h (xmpyu): No floating point format specifier for the
- xmpyu instruction.
-
-Fri Feb 4 23:36:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc.h (PPC_OPERAND_NEXT): Define.
- (PPC_OPERAND_NEGATIVE): Change value to make room for above.
- (struct powerpc_macro): Define.
- (powerpc_macros, powerpc_num_macros): Declare.
-
-Fri Jan 21 19:13:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc.h: New file. Header file for PowerPC opcode table.
-
-Mon Jan 17 00:14:23 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa.h: More minor template fixes for sfu and copr (to allow
- for easier disassembly).
-
- * hppa.h: Fix templates for all the sfu and copr instructions.
-
-Wed Dec 15 15:12:42 1993 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i386.h (push): Permit Imm16 operand too.
-
-Sat Dec 11 16:14:06 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * h8300.h (andc): Exists in base arch.
-
-Wed Dec 1 12:15:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * From Hisashi MINAMINO <minamino@sramhc.sra.co.jp>
- * hppa.h: #undef NONE to avoid conflict with hiux include files.
-
-Sun Nov 21 22:06:57 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa.h: Add FP quadword store instructions.
-
-Wed Nov 17 17:13:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h: (M_J_A): Added.
- (M_LA): Removed.
-
-Mon Nov 8 12:12:47 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (OP_MASK_CACHE, OP_SH_CACHE): Define. From Ted Lemon
- <mellon@pepper.ncd.com>.
-
-Sun Nov 7 00:30:11 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa.h: Immediate field in probei instructions is unsigned,
- not low-sign extended.
-
-Wed Nov 3 10:30:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m88k.h (RRI10MASK): Change from 0xfc00ffe0 to 0xfc00fc00.
-
-Tue Nov 2 12:41:30 1993 Ken Raeburn (raeburn@rover.cygnus.com)
-
- * i386.h: Add "fxch" without operand.
-
-Mon Nov 1 18:13:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (M_JAL_1, M_JAL_2, M_JAL_A): Added.
-
-Sat Oct 2 22:26:11 1993 Jeffrey A Law (law@snake.cs.utah.edu)
-
- * hppa.h: Add gfw and gfr to the opcode table.
-
-Wed Sep 29 16:23:00 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * m88k.h: extended to handle m88110.
-
-Tue Sep 28 19:19:08 1993 Jeffrey A Law (law@snake.cs.utah.edu)
-
- * hppa.h (be, ble): Use operand type 'z' to denote absolute branch
- addresses.
-
-Tue Sep 14 14:04:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * i960.h (i960_opcodes): Properly bracket initializers.
-
-Mon Sep 13 12:50:52 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * m88k.h (BOFLAG): rewrite to avoid nested comment.
-
-Mon Sep 13 15:46:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m68k.h (two): Protect second argument with parentheses.
-
-Fri Sep 10 16:29:47 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * i386.h (i386_optab): Added new instruction "rsm" (for i386sl).
- Deleted old in/out instructions in "#if 0" section.
-
-Thu Sep 9 17:42:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * i386.h (i386_optab): Properly bracket initializers.
-
-Wed Aug 25 13:50:56 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * hppa.h (pa_opcode): Use '|' for movb and movib insns. (From
- Jeff Law, law@cs.utah.edu).
-
-Mon Aug 23 16:55:03 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * i386.h (lcall): Accept Imm32 operand also.
-
-Mon Aug 23 12:43:11 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (M_ABSU): Removed (absolute value of unsigned number??).
- (M_DABS): Added.
-
-Thu Aug 19 15:08:37 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (INSN_*): Changed values. Removed unused definitions.
- Added INSN_COND_BRANCH_LIKELY, INSN_ISA2 and INSN_ISA3. Split
- INSN_LOAD_DELAY into INSN_LOAD_MEMORY_DELAY and
- INSN_LOAD_COPROC_DELAY. Split INSN_COPROC_DELAY into
- INSN_COPROC_MOVE_DELAY and INSN_COPROC_MEMORY_DELAY.
- (M_*): Added new values for r6000 and r4000 macros.
- (ANY_DELAY): Removed.
-
-Wed Aug 18 15:37:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h: Added M_LI_S and M_LI_SS.
-
-Tue Aug 17 07:08:08 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * h8300.h: Get some rare mov.bs correct.
-
-Thu Aug 5 09:15:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * sparc.h: Don't define const ourself; rely on ansidecl.h having
- been included.
-
-Fri Jul 30 18:41:11 1993 John Gilmore (gnu@cygnus.com)
-
- * sparc.h (F_JSR, F_UNBR, F_CONDBR): Add new flags to mark
- jump instructions, for use in disassemblers.
-
-Thu Jul 22 07:25:27 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * m88k.h: Make bitfields just unsigned, not unsigned long or
- unsigned short.
-
-Wed Jul 21 11:55:31 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * hppa.h: New argument type 'y'. Use in various float instructions.
-
-Mon Jul 19 17:17:03 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * hppa.h (break): First immediate field is unsigned.
-
- * hppa.h: Add rfir instruction.
-
-Sun Jul 18 16:28:08 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * mips.h: Split the actual table out into ../../opcodes/mips-opc.c.
-
-Fri Jul 16 09:59:29 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h: Reworked the hazard information somewhat, and fixed some
- bugs in the instruction hazard descriptions.
-
-Thu Jul 15 12:42:01 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m88k.h: Corrected a couple of opcodes.
-
-Tue Jul 6 15:17:35 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h: Replaced with version from Ralph Campbell and OSF. The
- new version includes instruction hazard information, but is
- otherwise reasonably similar.
-
-Thu Jul 1 20:36:17 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * h8300.h: Fix typo in UNOP3 (affected sh[al][lr].l).
-
-Fri Jun 11 18:38:44 1993 Ken Raeburn (raeburn@cygnus.com)
-
- Patches from Jeff Law, law@cs.utah.edu:
- * hppa.h: Clean up some of the OLD_TABLE, non-OLD_TABLE braindamage.
- Make the tables be the same for the following instructions:
- "bb", "addb[tf]", "addib[tf]", "add", "add[loc]", "addco",
- "sh[123]add", "sh[123]add[lo]", "sub", "sub[obt]", "sub[bt]o",
- "ds", "comclr", "addi", "addi[ot]", "addito", "subi", "subio",
- "comiclr", "fadd", "fsub", "fmpy", "fdiv", "fsqrt", "fabs",
- "frnd", "fcpy", "fcnvff", "fcnvxf", "fcnvfx", "fcnvfxt",
- "fcmp", and "ftest".
-
- * hppa.h: Make new and old tables the same for "break", "mtctl",
- "mfctl", "bb", "ssm", "rsm", "xmpyu", "fmpyadd", "fmpysub".
- Fix typo in last patch. Collapse several #ifdefs into a
- single #ifdef.
-
- * hppa.h: Delete remaining OLD_TABLE code. Bring some
- of the comments up-to-date.
-
- * hppa.h: Update "free list" of letters and update
- comments describing each letter's function.
-
-Fri Jun 4 15:41:37 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * h8300.h: checkpoint, includes H8/300-H opcodes.
-
-Thu Jun 3 15:42:59 1993 Stu Grossman (grossman@cygnus.com)
-
- * Patches from Jeffrey Law <law@cs.utah.edu>.
- * hppa.h: Rework single precision FP
- instructions so that they correctly disassemble code
- PA1.1 code.
-
-Thu May 27 19:21:22 1993 Bruce Bauman (boot@osf.org)
-
- * i386.h (i386_optab, mov pattern): Remove Mem16 restriction from
- mov to allow instructions like mov ss,xyz(ecx) to assemble.
-
-Tue May 25 00:39:40 1993 Ken Raeburn (raeburn@cygnus.com)
-
- * hppa.h: Use new version from Utah if OLD_TABLE isn't defined;
- gdb will define it for now.
-
-Mon May 24 15:20:06 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * sparc.h: Don't end enumerator list with comma.
-
-Fri May 14 15:15:50 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Based on patches from davidj@ICSI.Berkeley.EDU (David Johnson):
- * mips.h (OP_MASK_COPZ, OP_SH_COPZ): Define.
- ("bc2t"): Correct typo.
- ("[ls]wc[023]"): Use T rather than t.
- ("c[0123]"): Define general coprocessor instructions.
-
-Mon May 10 06:02:25 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * m68k.h: Move split point for gcc compilation more towards
- middle.
-
-Fri Apr 9 13:26:16 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * rs6k.h: Clean up instructions for primary opcode 19 (many were
- simply wrong, ics, rfi, & rfsvc were missing).
- Add "a" to opr_ext for "bb". Doc fix.
-
-Thu Mar 18 13:45:31 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * i386.h: 486 extensions from John Hassey (hassey@dg-rtp.dg.com).
- * mips.h: Add casts, to suppress warnings about shifting too much.
- * m68k.h: Document the placement code '9'.
-
-Thu Feb 18 02:03:14 1993 John Gilmore (gnu@cygnus.com)
-
- * m68k.h (BREAK_UP_BIG_DECL, AND_OTHER_PART): Add kludge which
- allows callers to break up the large initialized struct full of
- opcodes into two half-sized ones. This permits GCC to compile
- this module, since it takes exponential space for initializers.
- (numopcodes, endop): Revise to use AND_OTHER_PART in size calcs.
-
-Thu Feb 4 02:06:56 1993 John Gilmore (gnu@cygnus.com)
-
- * a29k.h: Remove RCS crud, update GPL to v2, update copyrights.
- * convex.h: Added, from GDB's convx-opcode.h. Added CONST to all
- initialized structs in it.
-
-Thu Jan 28 21:32:22 1993 John Gilmore (gnu@cygnus.com)
-
- Delta 88 changes inspired by Carl Greco, <cgreco@Creighton.Edu>:
- * m88k.h (PMEM): Avoid previous definition from <sys/param.h>.
- (AND): Change to AND_ to avoid ansidecl.h `AND' conflict.
-
-Sat Jan 23 18:10:49 PST 1993 Ralph Campbell (ralphc@pyramid.com)
-
- * mips.h: document "i" and "j" operands correctly.
-
-Thu Jan 7 15:58:13 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h: Removed endianness dependency.
-
-Sun Jan 3 14:13:35 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * h8300.h: include info on number of cycles per instruction.
-
-Mon Dec 21 21:29:08 1992 Stu Grossman (grossman at cygnus.com)
-
- * hppa.h: Move handy aliases to the front. Fix masks for extract
- and deposit instructions.
-
-Sat Dec 12 16:09:48 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * i386.h: accept shld and shrd both with and without the shift
- count argument, which is always %cl.
-
-Fri Nov 27 17:13:18 1992 Ken Raeburn (raeburn at cygnus.com)
-
- * i386.h (i386_optab_end, i386_regtab_end): Now const.
- (one_byte_segment_defaults, two_byte_segment_defaults,
- i386_prefixtab_end): Ditto.
-
-Mon Nov 23 10:47:25 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * vax.h (bb*): Use "v" (bitfield type), not "a" (address operand)
- for operand 2; from John Carr, jfc@dsg.dec.com.
-
-Wed Nov 4 07:36:49 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * m68k.h: Define FIXED_SIZE_BRANCH, so bsr and bra instructions
- always use 16-bit offsets. Makes calculated-size jump tables
- feasible.
-
-Fri Oct 16 22:52:43 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * i386.h: Fix one-operand forms of in* and out* patterns.
-
-Tue Sep 22 14:08:14 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * m68k.h: Added CPU32 support.
-
-Tue Sep 22 00:38:41 1992 John Gilmore (gnu@cygnus.com)
-
- * mips.h (break): Disassemble the argument. Patch from
- jonathan@cs.stanford.edu (Jonathan Stone).
-
-Wed Sep 9 11:25:28 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * m68k.h: merged Motorola and MIT syntax.
-
-Thu Sep 3 09:33:22 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * m68k.h (pmove): make the tests less strict, the 68k book is
- wrong.
-
-Tue Aug 25 23:25:19 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * m68k.h (m68ec030): Defined as alias for 68030.
- (m68k_opcodes): New type characters "3" for 68030 MMU regs and "t"
- for immediate 0-7 added. Set up some opcodes (ptest, bkpt) to use
- them. Tightened description of "fmovex" to distinguish it from
- some "pmove" encodings. Added "pmove" for 68030 MMU regs, cleaned
- up descriptions that claimed versions were available for chips not
- supporting them. Added "pmovefd".
-
-Mon Aug 24 12:04:51 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * m68k.h: fix where the . goes in divull
-
-Wed Aug 19 11:22:24 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * m68k.h: the cas2 instruction is supposed to be written with
- indirection on the last two operands, which can be either data or
- address registers. Added a new operand type 'r' which accepts
- either register type. Added new cases for cas2l and cas2w which
- use them. Corrected masks for cas2 which failed to recognize use
- of address register.
-
-Fri Aug 14 14:20:38 1992 Per Bothner (bothner@cygnus.com)
-
- * m68k.h: Merged in patches (mostly m68040-specific) from
- Colin Smith <colin@wrs.com>.
-
- * m68k.h: Merged m68kmri.h and m68k.h (using the former as a
- base). Also cleaned up duplicates, re-ordered instructions for
- the sake of dis-assembling (so aliases come after standard names).
- * m68kmri.h: Now just defines some macros, and #includes m68k.h.
-
-Wed Aug 12 16:38:15 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * m68kmri.h: added various opcodes. Moved jbxx to bxxes. Filled in
- all missing .s
-
-Mon Aug 10 23:22:33 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * sparc.h: Moved tables to BFD library.
-
- * i386.h (i386_optab): Add fildq, fistpq aliases used by gcc.
-
-Sun Jun 28 13:29:03 1992 Fred Fish (fnf@cygnus.com)
-
- * h8300.h: Finish filling in all the holes in the opcode table,
- so that the Lucid C compiler can digest this as well...
-
-Fri Jun 26 21:27:17 1992 John Gilmore (gnu at cygnus.com)
-
- * i386.h: Add setc, setnc, addr16, data16, repz, repnz aliases.
- Fix opcodes on various sizes of fild/fist instructions
- (16bit=no suffix, 32bit="l" suffix, 64bit="ll" suffix).
- Use tabs to indent for comments. Fixes suggested by Minh Tran-Le.
-
-Thu Jun 25 16:13:26 1992 Stu Grossman (grossman at cygnus.com)
-
- * h8300.h: Fill in all the holes in the opcode table so that the
- losing HPUX C compiler can digest this...
-
-Thu Jun 11 12:15:25 1992 John Gilmore (gnu at cygnus.com)
-
- * mips.h: Fix decoding of coprocessor instructions, somewhat.
- (Fix by Eric Anderson, 3jean@maas-neotek.arc.nasa.gov.)
-
-Thu May 28 11:17:44 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
-
- * sparc.h: Add new architecture variant sparclite; add its scan
- and divscc opcodes. Define ARCHITECTURES_CONFLICT_P macro.
-
-Tue May 5 14:23:27 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * mips.h: Add some more opcode synonyms (from Frank Yellin,
- fy@lucid.com).
-
-Thu Apr 16 18:25:26 1992 Per Bothner (bothner@cygnus.com)
-
- * rs6k.h: New version from IBM (Metin).
-
-Thu Apr 9 00:31:19 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * rs6k.h: Fix incorrect extended opcode for instructions `fm'
- and `fd'. (From metin@ibmpa.awdpa.ibm.com (Metin G. Ozisik).)
-
-Tue Apr 7 13:38:47 1992 Stu Grossman (grossman at cygnus.com)
-
- * rs6k.h: Move from ../../gdb/rs6k-opcode.h.
-
-Fri Apr 3 11:30:20 1992 Fred Fish (fnf@cygnus.com)
-
- * m68k.h (one, two): Cast macro args to unsigned to suppress
- complaints from compiler and lint about integer overflow during
- shift.
-
-Sun Mar 29 12:22:08 1992 John Gilmore (gnu at cygnus.com)
-
- * sparc.h (OP): Avoid signed overflow when shifting to high order bit.
-
-Fri Mar 6 00:22:38 1992 John Gilmore (gnu at cygnus.com)
-
- * mips.h: Make bitfield layout depend on the HOST compiler,
- not on the TARGET system.
-
-Fri Feb 21 01:29:51 1992 K. Richard Pixley (rich@cygnus.com)
-
- * i386.h: added inb, inw, outb, outw opcodes, added att syntax for
- scmp, slod, smov, ssca, ssto. Curtesy Minh Tran-Le
- <TRANLE@INTELLICORP.COM>.
-
-Thu Jan 30 07:31:44 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * h8300.h: turned op_type enum into #define list
-
-Thu Jan 30 01:07:24 1992 John Gilmore (gnu at cygnus.com)
-
- * sparc.h: Remove "cypress" architecture. Remove "fitox" and
- similar instructions -- they've been renamed to "fitoq", etc.
- REALLY fix tsubcctv. Fix "fcmpeq" and "fcmpq" which had wrong
- number of arguments.
- * h8300.h: Remove extra ; which produces compiler warning.
-
-Tue Jan 28 22:59:22 1992 Stu Grossman (grossman at cygnus.com)
-
- * sparc.h: fix opcode for tsubcctv.
-
-Tue Jan 7 17:19:39 1992 K. Richard Pixley (rich at cygnus.com)
-
- * sparc.h: fba and cba are now aliases for fb and cb respectively.
-
-Fri Dec 27 10:55:50 1991 Per Bothner (bothner at cygnus.com)
-
- * sparc.h (nop): Made the 'lose' field be even tighter,
- so only a standard 'nop' is disassembled as a nop.
-
-Sun Dec 22 12:18:18 1991 Michael Tiemann (tiemann at cygnus.com)
-
- * sparc.h (nop): Add RD_GO to `lose' so that only %g0 in dest is
- disassembled as a nop.
-
-Tue Dec 10 00:22:20 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * sparc.h: fix a typo.
-
-Sat Nov 30 20:40:51 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * a29k.h, arm.h, h8300.h, i386.h, i860.h, i960.h , m68k.h,
- m88k.h, mips.h , np1.h, ns32k.h, pn.h, pyr.h, sparc.h, tahoe.h,
- vax.h, ChangeLog: renamed from ../<foo>-opcode.h
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/contrib/gdb/include/opcode/a29k.h b/contrib/gdb/include/opcode/a29k.h
deleted file mode 100644
index 002e127d15ef..000000000000
--- a/contrib/gdb/include/opcode/a29k.h
+++ /dev/null
@@ -1,285 +0,0 @@
-/* Table of opcodes for the AMD 29000 family.
- Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
-
-This file is part of GDB and GAS.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct a29k_opcode {
- /* Name of the instruction. */
- char *name;
-
- /* Opcode word */
- unsigned long opcode;
-
- /* A string of characters which describe the operands.
- Valid characters are:
- , Itself. The character appears in the assembly code.
- a RA. The register number is in bits 8-15 of the instruction.
- b RB. The register number is in bits 0-7 of the instruction.
- c RC. The register number is in bits 16-23 of the instruction.
- i An immediate operand is in bits 0-7 of the instruction.
- x Bits 0-7 and 16-23 of the instruction are bits 0-7 and 8-15
- (respectively) of the immediate operand.
- h Same as x but the instruction contains bits 16-31 of the
- immediate operand.
- X Same as x but bits 16-31 of the signed immediate operand
- are set to 1 (thus the operand is always negative).
- P,A Bits 0-7 and 16-23 of the instruction are bits 2-9 and 10-17
- (respectively) of the immediate operand.
- P=PC-relative, sign-extended to 32 bits.
- A=Absolute, zero-extended to 32 bits.
- e CE bit (bit 23) for a load/store instruction.
- n Control field (bits 16-22) for a load/store instruction.
- v Immediate operand in bits 16-23 of the instruction.
- (used for trap numbers).
- s SA. Special-purpose register number in bits 8-15
- of the instruction.
- u UI--bit 7 of the instruction.
- r RND--bits 4-6 of the instruction.
- d FD--bits 2-3 of the instruction.
- f FS--bits 0-1 of the instruction.
- I ID--bits 16-17 of the instruction.
-
- Extensions for 29050:
-
- d FMT--bits 2-3 of the instruction (not really new).
- f ACN--bits 0-1 of the instruction (not really new).
- F FUNC--Special function in bits 18-21 of the instruction.
- C ACN--bits 16-17 specifying the accumlator register. */
- char *args;
-};
-
-#ifndef CONST
-#define CONST
-#endif /* CONST */
-
-static CONST struct a29k_opcode a29k_opcodes[] =
-{
-
-{ "add", 0x14000000, "c,a,b" },
-{ "add", 0x15000000, "c,a,i" },
-{ "addc", 0x1c000000, "c,a,b" },
-{ "addc", 0x1d000000, "c,a,i" },
-{ "addcs", 0x18000000, "c,a,b" },
-{ "addcs", 0x19000000, "c,a,i" },
-{ "addcu", 0x1a000000, "c,a,b" },
-{ "addcu", 0x1b000000, "c,a,i" },
-{ "adds", 0x10000000, "c,a,b" },
-{ "adds", 0x11000000, "c,a,i" },
-{ "addu", 0x12000000, "c,a,b" },
-{ "addu", 0x13000000, "c,a,i" },
-{ "and", 0x90000000, "c,a,b" },
-{ "and", 0x91000000, "c,a,i" },
-{ "andn", 0x9c000000, "c,a,b" },
-{ "andn", 0x9d000000, "c,a,i" },
-{ "aseq", 0x70000000, "v,a,b" },
-{ "aseq", 0x71000000, "v,a,i" },
-{ "asge", 0x5c000000, "v,a,b" },
-{ "asge", 0x5d000000, "v,a,i" },
-{ "asgeu", 0x5e000000, "v,a,b" },
-{ "asgeu", 0x5f000000, "v,a,i" },
-{ "asgt", 0x58000000, "v,a,b" },
-{ "asgt", 0x59000000, "v,a,i" },
-{ "asgtu", 0x5a000000, "v,a,b" },
-{ "asgtu", 0x5b000000, "v,a,i" },
-{ "asle", 0x54000000, "v,a,b" },
-{ "asle", 0x55000000, "v,a,i" },
-{ "asleu", 0x56000000, "v,a,b" },
-{ "asleu", 0x57000000, "v,a,i" },
-{ "aslt", 0x50000000, "v,a,b" },
-{ "aslt", 0x51000000, "v,a,i" },
-{ "asltu", 0x52000000, "v,a,b" },
-{ "asltu", 0x53000000, "v,a,i" },
-{ "asneq", 0x72000000, "v,a,b" },
-{ "asneq", 0x73000000, "v,a,i" },
-{ "call", 0xa8000000, "a,P" },
-{ "call", 0xa9000000, "a,A" },
-{ "calli", 0xc8000000, "a,b" },
-{ "class", 0xe6000000, "c,a,f" },
-{ "clz", 0x08000000, "c,b" },
-{ "clz", 0x09000000, "c,i" },
-{ "const", 0x03000000, "a,x" },
-{ "consth", 0x02000000, "a,h" },
-{ "consthz", 0x05000000, "a,h" },
-{ "constn", 0x01000000, "a,X" },
-{ "convert", 0xe4000000, "c,a,u,r,d,f" },
-{ "cpbyte", 0x2e000000, "c,a,b" },
-{ "cpbyte", 0x2f000000, "c,a,i" },
-{ "cpeq", 0x60000000, "c,a,b" },
-{ "cpeq", 0x61000000, "c,a,i" },
-{ "cpge", 0x4c000000, "c,a,b" },
-{ "cpge", 0x4d000000, "c,a,i" },
-{ "cpgeu", 0x4e000000, "c,a,b" },
-{ "cpgeu", 0x4f000000, "c,a,i" },
-{ "cpgt", 0x48000000, "c,a,b" },
-{ "cpgt", 0x49000000, "c,a,i" },
-{ "cpgtu", 0x4a000000, "c,a,b" },
-{ "cpgtu", 0x4b000000, "c,a,i" },
-{ "cple", 0x44000000, "c,a,b" },
-{ "cple", 0x45000000, "c,a,i" },
-{ "cpleu", 0x46000000, "c,a,b" },
-{ "cpleu", 0x47000000, "c,a,i" },
-{ "cplt", 0x40000000, "c,a,b" },
-{ "cplt", 0x41000000, "c,a,i" },
-{ "cpltu", 0x42000000, "c,a,b" },
-{ "cpltu", 0x43000000, "c,a,i" },
-{ "cpneq", 0x62000000, "c,a,b" },
-{ "cpneq", 0x63000000, "c,a,i" },
-{ "dadd", 0xf1000000, "c,a,b" },
-{ "ddiv", 0xf7000000, "c,a,b" },
-{ "deq", 0xeb000000, "c,a,b" },
-{ "dge", 0xef000000, "c,a,b" },
-{ "dgt", 0xed000000, "c,a,b" },
-{ "div", 0x6a000000, "c,a,b" },
-{ "div", 0x6b000000, "c,a,i" },
-{ "div0", 0x68000000, "c,b" },
-{ "div0", 0x69000000, "c,i" },
-{ "divide", 0xe1000000, "c,a,b" },
-{ "dividu", 0xe3000000, "c,a,b" },
-{ "divl", 0x6c000000, "c,a,b" },
-{ "divl", 0x6d000000, "c,a,i" },
-{ "divrem", 0x6e000000, "c,a,b" },
-{ "divrem", 0x6f000000, "c,a,i" },
-{ "dmac", 0xd9000000, "F,C,a,b" },
-{ "dmsm", 0xdb000000, "c,a,b" },
-{ "dmul", 0xf5000000, "c,a,b" },
-{ "dsub", 0xf3000000, "c,a,b" },
-{ "emulate", 0xd7000000, "v,a,b" },
-{ "exbyte", 0x0a000000, "c,a,b" },
-{ "exbyte", 0x0b000000, "c,a,i" },
-{ "exhw", 0x7c000000, "c,a,b" },
-{ "exhw", 0x7d000000, "c,a,i" },
-{ "exhws", 0x7e000000, "c,a" },
-{ "extract", 0x7a000000, "c,a,b" },
-{ "extract", 0x7b000000, "c,a,i" },
-{ "fadd", 0xf0000000, "c,a,b" },
-{ "fdiv", 0xf6000000, "c,a,b" },
-{ "fdmul", 0xf9000000, "c,a,b" },
-{ "feq", 0xea000000, "c,a,b" },
-{ "fge", 0xee000000, "c,a,b" },
-{ "fgt", 0xec000000, "c,a,b" },
-{ "fmac", 0xd8000000, "F,C,a,b" },
-{ "fmsm", 0xda000000, "c,a,b" },
-{ "fmul", 0xf4000000, "c,a,b" },
-{ "fsub", 0xf2000000, "c,a,b" },
-{ "halt", 0x89000000, "" },
-{ "inbyte", 0x0c000000, "c,a,b" },
-{ "inbyte", 0x0d000000, "c,a,i" },
-{ "inhw", 0x78000000, "c,a,b" },
-{ "inhw", 0x79000000, "c,a,i" },
-{ "inv", 0x9f000000, "I" },
-{ "iret", 0x88000000, "" },
-{ "iretinv", 0x8c000000, "I" },
-{ "jmp", 0xa0000000, "P" },
-{ "jmp", 0xa1000000, "A" },
-{ "jmpf", 0xa4000000, "a,P" },
-{ "jmpf", 0xa5000000, "a,A" },
-{ "jmpfdec", 0xb4000000, "a,P" },
-{ "jmpfdec", 0xb5000000, "a,A" },
-{ "jmpfi", 0xc4000000, "a,b" },
-{ "jmpi", 0xc0000000, "b" },
-{ "jmpt", 0xac000000, "a,P" },
-{ "jmpt", 0xad000000, "a,A" },
-{ "jmpti", 0xcc000000, "a,b" },
-{ "load", 0x16000000, "e,n,a,b" },
-{ "load", 0x17000000, "e,n,a,i" },
-{ "loadl", 0x06000000, "e,n,a,b" },
-{ "loadl", 0x07000000, "e,n,a,i" },
-{ "loadm", 0x36000000, "e,n,a,b" },
-{ "loadm", 0x37000000, "e,n,a,i" },
-{ "loadset", 0x26000000, "e,n,a,b" },
-{ "loadset", 0x27000000, "e,n,a,i" },
-{ "mfacc", 0xe9000100, "c,d,f" },
-{ "mfsr", 0xc6000000, "c,s" },
-{ "mftlb", 0xb6000000, "c,a" },
-{ "mtacc", 0xe8010000, "a,d,f" },
-{ "mtsr", 0xce000000, "s,b" },
-{ "mtsrim", 0x04000000, "s,x" },
-{ "mttlb", 0xbe000000, "a,b" },
-{ "mul", 0x64000000, "c,a,b" },
-{ "mul", 0x65000000, "c,a,i" },
-{ "mull", 0x66000000, "c,a,b" },
-{ "mull", 0x67000000, "c,a,i" },
-{ "multiplu", 0xe2000000, "c,a,b" },
-{ "multiply", 0xe0000000, "c,a,b" },
-{ "multm", 0xde000000, "c,a,b" },
-{ "multmu", 0xdf000000, "c,a,b" },
-{ "mulu", 0x74000000, "c,a,b" },
-{ "mulu", 0x75000000, "c,a,i" },
-{ "nand", 0x9a000000, "c,a,b" },
-{ "nand", 0x9b000000, "c,a,i" },
-{ "nop", 0x70400101, "" },
-{ "nor", 0x98000000, "c,a,b" },
-{ "nor", 0x99000000, "c,a,i" },
-{ "or", 0x92000000, "c,a,b" },
-{ "or", 0x93000000, "c,a,i" },
-{ "orn", 0xaa000000, "c,a,b" },
-{ "orn", 0xab000000, "c,a,i" },
-
-/* The description of "setip" in Chapter 8 ("instruction set") of the user's
- manual claims that these are absolute register numbers. But section
- 7.2.1 explains that they are not. The latter is correct, so print
- these normally ("lr0", "lr5", etc.). */
-{ "setip", 0x9e000000, "c,a,b" },
-
-{ "sll", 0x80000000, "c,a,b" },
-{ "sll", 0x81000000, "c,a,i" },
-{ "sqrt", 0xe5000000, "c,a,f" },
-{ "sra", 0x86000000, "c,a,b" },
-{ "sra", 0x87000000, "c,a,i" },
-{ "srl", 0x82000000, "c,a,b" },
-{ "srl", 0x83000000, "c,a,i" },
-{ "store", 0x1e000000, "e,n,a,b" },
-{ "store", 0x1f000000, "e,n,a,i" },
-{ "storel", 0x0e000000, "e,n,a,b" },
-{ "storel", 0x0f000000, "e,n,a,i" },
-{ "storem", 0x3e000000, "e,n,a,b" },
-{ "storem", 0x3f000000, "e,n,a,i" },
-{ "sub", 0x24000000, "c,a,b" },
-{ "sub", 0x25000000, "c,a,i" },
-{ "subc", 0x2c000000, "c,a,b" },
-{ "subc", 0x2d000000, "c,a,i" },
-{ "subcs", 0x28000000, "c,a,b" },
-{ "subcs", 0x29000000, "c,a,i" },
-{ "subcu", 0x2a000000, "c,a,b" },
-{ "subcu", 0x2b000000, "c,a,i" },
-{ "subr", 0x34000000, "c,a,b" },
-{ "subr", 0x35000000, "c,a,i" },
-{ "subrc", 0x3c000000, "c,a,b" },
-{ "subrc", 0x3d000000, "c,a,i" },
-{ "subrcs", 0x38000000, "c,a,b" },
-{ "subrcs", 0x39000000, "c,a,i" },
-{ "subrcu", 0x3a000000, "c,a,b" },
-{ "subrcu", 0x3b000000, "c,a,i" },
-{ "subrs", 0x30000000, "c,a,b" },
-{ "subrs", 0x31000000, "c,a,i" },
-{ "subru", 0x32000000, "c,a,b" },
-{ "subru", 0x33000000, "c,a,i" },
-{ "subs", 0x20000000, "c,a,b" },
-{ "subs", 0x21000000, "c,a,i" },
-{ "subu", 0x22000000, "c,a,b" },
-{ "subu", 0x23000000, "c,a,i" },
-{ "xnor", 0x96000000, "c,a,b" },
-{ "xnor", 0x97000000, "c,a,i" },
-{ "xor", 0x94000000, "c,a,b" },
-{ "xor", 0x95000000, "c,a,i" },
-
-{ "", 0x0, "" } /* Dummy entry, not included in NUM_OPCODES. This
- lets code examine entry i+1 without checking
- if we've run off the end of the table. */
-};
-
-CONST unsigned int num_opcodes = (((sizeof a29k_opcodes) / (sizeof a29k_opcodes[0])) - 1);
diff --git a/contrib/gdb/include/opcode/arm.h b/contrib/gdb/include/opcode/arm.h
deleted file mode 100644
index c7087eb9ed4c..000000000000
--- a/contrib/gdb/include/opcode/arm.h
+++ /dev/null
@@ -1,294 +0,0 @@
-/* ARM opcode list.
- Copyright (C) 1989, Free Software Foundation, Inc.
-
-This file is part of GDB and GAS.
-
-GDB and GAS are free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-GDB and GAS are distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GDB or GAS; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* types of instruction (encoded in bits 26 and 27 of the instruction) */
-
-#define TYPE_ARITHMETIC 0
-#define TYPE_LDR_STR 1
-#define TYPE_BLOCK_BRANCH 2
-#define TYPE_SWI 3
-
-/* bit 25 decides whether an instruction is a block move or a branch */
-#define SUBTYPE_BLOCK 0
-#define SUBTYPE_BRANCH 1
-
-/* codes to distinguish the arithmetic instructions */
-
-#define OPCODE_AND 0
-#define OPCODE_EOR 1
-#define OPCODE_SUB 2
-#define OPCODE_RSB 3
-#define OPCODE_ADD 4
-#define OPCODE_ADC 5
-#define OPCODE_SBC 6
-#define OPCODE_RSC 7
-#define OPCODE_TST 8
-#define OPCODE_TEQ 9
-#define OPCODE_CMP 10
-#define OPCODE_CMN 11
-#define OPCODE_ORR 12
-#define OPCODE_MOV 13
-#define OPCODE_BIC 14
-#define OPCODE_MVN 15
-
-/* condition codes */
-
-#define COND_EQ 0
-#define COND_NE 1
-#define COND_CS 2
-#define COND_CC 3
-#define COND_MI 4
-#define COND_PL 5
-#define COND_VS 6
-#define COND_VC 7
-#define COND_HI 8
-#define COND_LS 9
-#define COND_GE 10
-#define COND_LT 11
-#define COND_GT 12
-#define COND_LE 13
-#define COND_AL 14
-#define COND_NV 15
-
-/* Describes the format of an ARM machine instruction */
-
-struct generic_fmt {
- unsigned rest :25; /* the rest of the instruction */
- unsigned subtype :1; /* used to decide between block and branch */
- unsigned type :2; /* one of TYPE_* */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct arith_fmt {
- unsigned operand2 :12; /* #nn or rn or rn shift #m or rn shift rm */
- unsigned dest :4; /* place where the answer goes */
- unsigned operand1 :4; /* first operand to instruction */
- unsigned set :1; /* == 1 means set processor flags */
- unsigned opcode :4; /* one of OPCODE_* defined above */
- unsigned immed :1; /* operand2 is an immediate value */
- unsigned type :2; /* == TYPE_ARITHMETIC */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct ldr_str_fmt {
- unsigned offset :12; /* #nn or rn or rn shift #m */
- unsigned reg :4; /* destination for LDR, source for STR */
- unsigned base :4; /* base register */
- unsigned is_load :1; /* == 1 for LDR */
- unsigned writeback :1; /* == 1 means write back (base+offset) into base */
- unsigned byte :1; /* == 1 means byte access else word */
- unsigned up :1; /* == 1 means add offset else subtract it */
- unsigned pre_index :1; /* == 1 means [a,b] form else [a],b form */
- unsigned immed :1; /* == 0 means immediate offset */
- unsigned type :2; /* == TYPE_LDR_STR */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct block_fmt {
- unsigned mask :16; /* register mask */
- unsigned base :4; /* register used as base of move */
- unsigned is_load :1; /* == 1 for LDM */
- unsigned writeback :1; /* == 1 means update base after move */
- unsigned set :1; /* == 1 means set flags in pc if included in mask */
- unsigned increment :1; /* == 1 means increment base register */
- unsigned before :1; /* == 1 means inc/dec before each move */
- unsigned is_block :1; /* == SUBTYPE_BLOCK */
- unsigned type :2; /* == TYPE_BLOCK_BRANCH */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct branch_fmt {
- unsigned dest :24; /* destination of the branch */
- unsigned link :1; /* branch with link (function call) */
- unsigned is_branch :1; /* == SUBTYPE_BRANCH */
- unsigned type :2; /* == TYPE_BLOCK_BRANCH */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-#define ROUND_N 0
-#define ROUND_P 1
-#define ROUND_M 2
-#define ROUND_Z 3
-
-#define FLOAT2_MVF 0
-#define FLOAT2_MNF 1
-#define FLOAT2_ABS 2
-#define FLOAT2_RND 3
-#define FLOAT2_SQT 4
-#define FLOAT2_LOG 5
-#define FLOAT2_LGN 6
-#define FLOAT2_EXP 7
-#define FLOAT2_SIN 8
-#define FLOAT2_COS 9
-#define FLOAT2_TAN 10
-#define FLOAT2_ASN 11
-#define FLOAT2_ACS 12
-#define FLOAT2_ATN 13
-
-#define FLOAT3_ADF 0
-#define FLOAT3_MUF 1
-#define FLOAT3_SUF 2
-#define FLOAT3_RSF 3
-#define FLOAT3_DVF 4
-#define FLOAT3_RDF 5
-#define FLOAT3_POW 6
-#define FLOAT3_RPW 7
-#define FLOAT3_RMF 8
-#define FLOAT3_FML 9
-#define FLOAT3_FDV 10
-#define FLOAT3_FRD 11
-#define FLOAT3_POL 12
-
-struct float2_fmt {
- unsigned operand2 :3; /* second operand */
- unsigned immed :1; /* == 1 if second operand is a constant */
- unsigned pad1 :1; /* == 0 */
- unsigned rounding :2; /* ROUND_* */
- unsigned is_double :1; /* == 1 if precision is double (only if not extended) */
- unsigned pad2 :4; /* == 1 */
- unsigned dest :3; /* destination */
- unsigned is_2_op :1; /* == 1 if 2 operand ins */
- unsigned operand1 :3; /* first operand (only of is_2_op == 0) */
- unsigned is_extended :1; /* == 1 if precision is extended */
- unsigned opcode :4; /* FLOAT2_* or FLOAT3_* depending on is_2_op */
- unsigned must_be_2 :2; /* == 2 */
- unsigned type :2; /* == TYPE_SWI */
- unsigned cond :4; /* COND_* */
-};
-
-struct swi_fmt {
- unsigned argument :24; /* argument to SWI (syscall number) */
- unsigned must_be_3 :2; /* == 3 */
- unsigned type :2; /* == TYPE_SWI */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-union insn_fmt {
- struct generic_fmt generic;
- struct arith_fmt arith;
- struct ldr_str_fmt ldr_str;
- struct block_fmt block;
- struct branch_fmt branch;
- struct swi_fmt swi;
- unsigned long ins;
-};
-
-struct opcode {
- unsigned long value, mask; /* recognise instruction if (op&mask)==value */
- char *assembler; /* how to disassemble this instruction */
-};
-
-/* format of the assembler string :
-
- %% %
- %<bitfield>d print the bitfield in decimal
- %<bitfield>x print the bitfield in hex
- %<bitfield>r print as an ARM register
- %<bitfield>f print a floating point constant if >7 else an fp register
- %c print condition code (always bits 28-31)
- %P print floating point precision in arithmetic insn
- %Q print floating point precision in ldf/stf insn
- %R print floating point rounding mode
- %<bitnum>'c print specified char iff bit is one
- %<bitnum>`c print specified char iff bit is zero
- %<bitnum>?ab print a if bit is one else print b
- %p print 'p' iff bits 12-15 are 15
- %o print operand2 (immediate or register + shift)
- %a print address for ldr/str instruction
- %b print branch destination
- %A print address for ldc/stc/ldf/stf instruction
- %m print register mask for ldm/stm instruction
-*/
-
-static struct opcode opcodes[] = {
- /* ARM instructions */
- 0x00000090, 0x0fe000f0, "mul%20's %12-15r, %16-19r, %0-3r",
- 0x00200090, 0x0fe000f0, "mla%20's %12-15r, %16-19r, %0-3r, %8-11r",
- 0x00000000, 0x0de00000, "and%c%20's %12-15r, %16-19r, %o",
- 0x00200000, 0x0de00000, "eor%c%20's %12-15r, %16-19r, %o",
- 0x00400000, 0x0de00000, "sub%c%20's %12-15r, %16-19r, %o",
- 0x00600000, 0x0de00000, "rsb%c%20's %12-15r, %16-19r, %o",
- 0x00800000, 0x0de00000, "add%c%20's %12-15r, %16-19r, %o",
- 0x00a00000, 0x0de00000, "adc%c%20's %12-15r, %16-19r, %o",
- 0x00c00000, 0x0de00000, "sbc%c%20's %12-15r, %16-19r, %o",
- 0x00e00000, 0x0de00000, "rsc%c%20's %12-15r, %16-19r, %o",
- 0x01000000, 0x0de00000, "tst%c%p %16-19r, %o",
- 0x01200000, 0x0de00000, "teq%c%p %16-19r, %o",
- 0x01400000, 0x0de00000, "cmp%c%p %16-19r, %o",
- 0x01600000, 0x0de00000, "cmn%c%p %16-19r, %o",
- 0x01800000, 0x0de00000, "orr%c%20's %12-15r, %16-19r, %o",
- 0x01a00000, 0x0de00000, "mov%c%20's %12-15r, %o",
- 0x01c00000, 0x0de00000, "bic%c%20's %12-15r, %16-19r, %o",
- 0x01e00000, 0x0de00000, "mvn%c%20's %12-15r, %o",
- 0x04000000, 0x0c100000, "str%c%22'b %12-15r, %a",
- 0x04100000, 0x0c100000, "ldr%c%22'b %12-15r, %a",
- 0x08000000, 0x0e100000, "stm%c%23?id%24?ba %16-19r%22`!, %m",
- 0x08100000, 0x0e100000, "ldm%c%23?id%24?ba %16-19r%22`!, %m%22'^",
- 0x0a000000, 0x0e000000, "b%c%24'l %b",
- 0x0f000000, 0x0f000000, "swi%c %0-23x",
- /* Floating point coprocessor instructions */
- 0x0e000100, 0x0ff08f10, "adf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e100100, 0x0ff08f10, "muf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e200100, 0x0ff08f10, "suf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e300100, 0x0ff08f10, "rsf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e400100, 0x0ff08f10, "dvf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e500100, 0x0ff08f10, "rdf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e600100, 0x0ff08f10, "pow%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e700100, 0x0ff08f10, "rpw%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e800100, 0x0ff08f10, "rmf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e900100, 0x0ff08f10, "fml%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0ea00100, 0x0ff08f10, "fdv%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0eb00100, 0x0ff08f10, "frd%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0ec00100, 0x0ff08f10, "pol%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e008100, 0x0ff08f10, "mvf%c%P%R %12-14f, %0-3f",
- 0x0e108100, 0x0ff08f10, "mnf%c%P%R %12-14f, %0-3f",
- 0x0e208100, 0x0ff08f10, "abs%c%P%R %12-14f, %0-3f",
- 0x0e308100, 0x0ff08f10, "rnd%c%P%R %12-14f, %0-3f",
- 0x0e408100, 0x0ff08f10, "sqt%c%P%R %12-14f, %0-3f",
- 0x0e508100, 0x0ff08f10, "log%c%P%R %12-14f, %0-3f",
- 0x0e608100, 0x0ff08f10, "lgn%c%P%R %12-14f, %0-3f",
- 0x0e708100, 0x0ff08f10, "exp%c%P%R %12-14f, %0-3f",
- 0x0e808100, 0x0ff08f10, "sin%c%P%R %12-14f, %0-3f",
- 0x0e908100, 0x0ff08f10, "cos%c%P%R %12-14f, %0-3f",
- 0x0ea08100, 0x0ff08f10, "tan%c%P%R %12-14f, %0-3f",
- 0x0eb08100, 0x0ff08f10, "asn%c%P%R %12-14f, %0-3f",
- 0x0ec08100, 0x0ff08f10, "acs%c%P%R %12-14f, %0-3f",
- 0x0ed08100, 0x0ff08f10, "atn%c%P%R %12-14f, %0-3f",
- 0x0e000110, 0x0ff00f1f, "flt%c%P%R %16-18f, %12-15r",
- 0x0e100110, 0x0fff0f98, "fix%c%R %12-15r, %0-2f",
- 0x0e200110, 0x0fff0fff, "wfs%c %12-15r",
- 0x0e300110, 0x0fff0fff, "rfs%c %12-15r",
- 0x0e400110, 0x0fff0fff, "wfc%c %12-15r",
- 0x0e500110, 0x0fff0fff, "rfc%c %12-15r",
- 0x0e90f110, 0x0ff8fff0, "cmf%c %16-18f, %0-3f",
- 0x0eb0f110, 0x0ff8fff0, "cnf%c %16-18f, %0-3f",
- 0x0ed0f110, 0x0ff8fff0, "cmfe%c %16-18f, %0-3f",
- 0x0ef0f110, 0x0ff8fff0, "cnfe%c %16-18f, %0-3f",
- 0x0c000100, 0x0e100f00, "stf%c%Q %12-14f, %A",
- 0x0c100100, 0x0e100f00, "ldf%c%Q %12-14f, %A",
- /* Generic coprocessor instructions */
- 0x0e000000, 0x0f000010, "cdp%c %8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0e000010, 0x0f100010, "mrc%c %8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0e100010, 0x0f100010, "mcr%c %8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0c000000, 0x0e100000, "stc%c%22`l %8-11d, cr%12-15d, %A",
- 0x0c100000, 0x0e100000, "ldc%c%22`l %8-11d, cr%12-15d, %A",
- /* the rest */
- 0x00000000, 0x00000000, "undefined instruction %0-31x",
-};
-#define N_OPCODES (sizeof opcodes / sizeof opcodes[0])
diff --git a/contrib/gdb/include/opcode/convex.h b/contrib/gdb/include/opcode/convex.h
deleted file mode 100644
index efaeebb65a5f..000000000000
--- a/contrib/gdb/include/opcode/convex.h
+++ /dev/null
@@ -1,1711 +0,0 @@
-/* Information for instruction disassembly on the Convex.
- Copyright 1989, 1993 Free Software Foundation.
-
-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 CONST
-#define CONST
-#endif /* CONST */
-
-#define xxx 0
-#define rrr 1
-#define rr 2
-#define rxr 3
-#define r 4
-#define nops 5
-#define nr 6
-#define pcrel 7
-#define lr 8
-#define rxl 9
-#define rlr 10
-#define rrl 11
-#define iml 12
-#define imr 13
-#define a1r 14
-#define a1l 15
-#define a2r 16
-#define a2l 17
-#define a3 18
-#define a4 19
-#define a5 20
-#define V 1
-#define S 2
-#define VM 3
-#define A 4
-#define VL 5
-#define VS 6
-#define VLS 7
-#define PSW 8
-/* Prevent an error during "make depend". */
-#if !defined (PC)
-#define PC 9
-#endif
-#define ITR 10
-#define VV 11
-#define ITSR 12
-#define TOC 13
-#define CIR 14
-#define TTR 15
-#define VMU 16
-#define VML 17
-#define ICR 18
-#define TCPU 19
-#define CPUID 20
-#define TID 21
-
-CONST char *op[] = {
- "",
- "v0\0v1\0v2\0v3\0v4\0v5\0v6\0v7",
- "s0\0s1\0s2\0s3\0s4\0s5\0s6\0s7",
- "vm",
- "sp\0a1\0a2\0a3\0a4\0a5\0ap\0fp",
- "vl",
- "vs",
- "vls",
- "psw",
- "pc",
- "itr",
- "vv",
- "itsr",
- "toc",
- "cir",
- "ttr",
- "vmu",
- "vml",
- "icr",
- "tcpu",
- "cpuid",
- "tid",
-};
-
-CONST struct formstr format0[] = {
- {0,0,rrr,V,S,S}, /* mov */
- {0,0,rrr,S,S,V}, /* mov */
- {1,1,rrr,V,V,V}, /* merg.t */
- {2,1,rrr,V,V,V}, /* mask.t */
- {1,2,rrr,V,S,V}, /* merg.f */
- {2,2,rrr,V,S,V}, /* mask.f */
- {1,1,rrr,V,S,V}, /* merg.t */
- {2,1,rrr,V,S,V}, /* mask.t */
- {3,3,rrr,V,V,V}, /* mul.s */
- {3,4,rrr,V,V,V}, /* mul.d */
- {4,3,rrr,V,V,V}, /* div.s */
- {4,4,rrr,V,V,V}, /* div.d */
- {3,3,rrr,V,S,V}, /* mul.s */
- {3,4,rrr,V,S,V}, /* mul.d */
- {4,3,rrr,V,S,V}, /* div.s */
- {4,4,rrr,V,S,V}, /* div.d */
- {5,0,rrr,V,V,V}, /* and */
- {6,0,rrr,V,V,V}, /* or */
- {7,0,rrr,V,V,V}, /* xor */
- {8,0,rrr,V,V,V}, /* shf */
- {5,0,rrr,V,S,V}, /* and */
- {6,0,rrr,V,S,V}, /* or */
- {7,0,rrr,V,S,V}, /* xor */
- {8,0,rrr,V,S,V}, /* shf */
- {9,3,rrr,V,V,V}, /* add.s */
- {9,4,rrr,V,V,V}, /* add.d */
- {10,3,rrr,V,V,V}, /* sub.s */
- {10,4,rrr,V,V,V}, /* sub.d */
- {9,3,rrr,V,S,V}, /* add.s */
- {9,4,rrr,V,S,V}, /* add.d */
- {10,3,rrr,V,S,V}, /* sub.s */
- {10,4,rrr,V,S,V}, /* sub.d */
- {9,5,rrr,V,V,V}, /* add.b */
- {9,6,rrr,V,V,V}, /* add.h */
- {9,7,rrr,V,V,V}, /* add.w */
- {9,8,rrr,V,V,V}, /* add.l */
- {9,5,rrr,V,S,V}, /* add.b */
- {9,6,rrr,V,S,V}, /* add.h */
- {9,7,rrr,V,S,V}, /* add.w */
- {9,8,rrr,V,S,V}, /* add.l */
- {10,5,rrr,V,V,V}, /* sub.b */
- {10,6,rrr,V,V,V}, /* sub.h */
- {10,7,rrr,V,V,V}, /* sub.w */
- {10,8,rrr,V,V,V}, /* sub.l */
- {10,5,rrr,V,S,V}, /* sub.b */
- {10,6,rrr,V,S,V}, /* sub.h */
- {10,7,rrr,V,S,V}, /* sub.w */
- {10,8,rrr,V,S,V}, /* sub.l */
- {3,5,rrr,V,V,V}, /* mul.b */
- {3,6,rrr,V,V,V}, /* mul.h */
- {3,7,rrr,V,V,V}, /* mul.w */
- {3,8,rrr,V,V,V}, /* mul.l */
- {3,5,rrr,V,S,V}, /* mul.b */
- {3,6,rrr,V,S,V}, /* mul.h */
- {3,7,rrr,V,S,V}, /* mul.w */
- {3,8,rrr,V,S,V}, /* mul.l */
- {4,5,rrr,V,V,V}, /* div.b */
- {4,6,rrr,V,V,V}, /* div.h */
- {4,7,rrr,V,V,V}, /* div.w */
- {4,8,rrr,V,V,V}, /* div.l */
- {4,5,rrr,V,S,V}, /* div.b */
- {4,6,rrr,V,S,V}, /* div.h */
- {4,7,rrr,V,S,V}, /* div.w */
- {4,8,rrr,V,S,V}, /* div.l */
-};
-
-CONST struct formstr format1[] = {
- {11,0,xxx,0,0,0}, /* exit */
- {12,0,a3,0,0,0}, /* jmp */
- {13,2,a3,0,0,0}, /* jmpi.f */
- {13,1,a3,0,0,0}, /* jmpi.t */
- {14,2,a3,0,0,0}, /* jmpa.f */
- {14,1,a3,0,0,0}, /* jmpa.t */
- {15,2,a3,0,0,0}, /* jmps.f */
- {15,1,a3,0,0,0}, /* jmps.t */
- {16,0,a3,0,0,0}, /* tac */
- {17,0,a1r,A,0,0}, /* ldea */
- {18,8,a1l,VLS,0,0}, /* ld.l */
- {18,9,a1l,VM,0,0}, /* ld.x */
- {19,0,a3,0,0,0}, /* tas */
- {20,0,a3,0,0,0}, /* pshea */
- {21,8,a2l,VLS,0,0}, /* st.l */
- {21,9,a2l,VM,0,0}, /* st.x */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {22,0,a3,0,0,0}, /* call */
- {23,0,a3,0,0,0}, /* calls */
- {24,0,a3,0,0,0}, /* callq */
- {25,0,a1r,A,0,0}, /* pfork */
- {26,5,a2r,S,0,0}, /* ste.b */
- {26,6,a2r,S,0,0}, /* ste.h */
- {26,7,a2r,S,0,0}, /* ste.w */
- {26,8,a2r,S,0,0}, /* ste.l */
- {18,5,a1r,A,0,0}, /* ld.b */
- {18,6,a1r,A,0,0}, /* ld.h */
- {18,7,a1r,A,0,0}, /* ld.w */
- {27,7,a1r,A,0,0}, /* incr.w */
- {21,5,a2r,A,0,0}, /* st.b */
- {21,6,a2r,A,0,0}, /* st.h */
- {21,7,a2r,A,0,0}, /* st.w */
- {27,8,a1r,S,0,0}, /* incr.l */
- {18,5,a1r,S,0,0}, /* ld.b */
- {18,6,a1r,S,0,0}, /* ld.h */
- {18,7,a1r,S,0,0}, /* ld.w */
- {18,8,a1r,S,0,0}, /* ld.l */
- {21,5,a2r,S,0,0}, /* st.b */
- {21,6,a2r,S,0,0}, /* st.h */
- {21,7,a2r,S,0,0}, /* st.w */
- {21,8,a2r,S,0,0}, /* st.l */
- {18,5,a1r,V,0,0}, /* ld.b */
- {18,6,a1r,V,0,0}, /* ld.h */
- {18,7,a1r,V,0,0}, /* ld.w */
- {18,8,a1r,V,0,0}, /* ld.l */
- {21,5,a2r,V,0,0}, /* st.b */
- {21,6,a2r,V,0,0}, /* st.h */
- {21,7,a2r,V,0,0}, /* st.w */
- {21,8,a2r,V,0,0}, /* st.l */
-};
-
-CONST struct formstr format2[] = {
- {28,5,rr,A,A,0}, /* cvtw.b */
- {28,6,rr,A,A,0}, /* cvtw.h */
- {29,7,rr,A,A,0}, /* cvtb.w */
- {30,7,rr,A,A,0}, /* cvth.w */
- {28,5,rr,S,S,0}, /* cvtw.b */
- {28,6,rr,S,S,0}, /* cvtw.h */
- {29,7,rr,S,S,0}, /* cvtb.w */
- {30,7,rr,S,S,0}, /* cvth.w */
- {28,3,rr,S,S,0}, /* cvtw.s */
- {31,7,rr,S,S,0}, /* cvts.w */
- {32,3,rr,S,S,0}, /* cvtd.s */
- {31,4,rr,S,S,0}, /* cvts.d */
- {31,8,rr,S,S,0}, /* cvts.l */
- {32,8,rr,S,S,0}, /* cvtd.l */
- {33,3,rr,S,S,0}, /* cvtl.s */
- {33,4,rr,S,S,0}, /* cvtl.d */
- {34,0,rr,A,A,0}, /* ldpa */
- {8,0,nr,A,0,0}, /* shf */
- {18,6,nr,A,0,0}, /* ld.h */
- {18,7,nr,A,0,0}, /* ld.w */
- {33,7,rr,S,S,0}, /* cvtl.w */
- {28,8,rr,S,S,0}, /* cvtw.l */
- {35,1,rr,S,S,0}, /* plc.t */
- {36,0,rr,S,S,0}, /* tzc */
- {37,6,rr,A,A,0}, /* eq.h */
- {37,7,rr,A,A,0}, /* eq.w */
- {37,6,nr,A,0,0}, /* eq.h */
- {37,7,nr,A,0,0}, /* eq.w */
- {37,5,rr,S,S,0}, /* eq.b */
- {37,6,rr,S,S,0}, /* eq.h */
- {37,7,rr,S,S,0}, /* eq.w */
- {37,8,rr,S,S,0}, /* eq.l */
- {38,6,rr,A,A,0}, /* leu.h */
- {38,7,rr,A,A,0}, /* leu.w */
- {38,6,nr,A,0,0}, /* leu.h */
- {38,7,nr,A,0,0}, /* leu.w */
- {38,5,rr,S,S,0}, /* leu.b */
- {38,6,rr,S,S,0}, /* leu.h */
- {38,7,rr,S,S,0}, /* leu.w */
- {38,8,rr,S,S,0}, /* leu.l */
- {39,6,rr,A,A,0}, /* ltu.h */
- {39,7,rr,A,A,0}, /* ltu.w */
- {39,6,nr,A,0,0}, /* ltu.h */
- {39,7,nr,A,0,0}, /* ltu.w */
- {39,5,rr,S,S,0}, /* ltu.b */
- {39,6,rr,S,S,0}, /* ltu.h */
- {39,7,rr,S,S,0}, /* ltu.w */
- {39,8,rr,S,S,0}, /* ltu.l */
- {40,6,rr,A,A,0}, /* le.h */
- {40,7,rr,A,A,0}, /* le.w */
- {40,6,nr,A,0,0}, /* le.h */
- {40,7,nr,A,0,0}, /* le.w */
- {40,5,rr,S,S,0}, /* le.b */
- {40,6,rr,S,S,0}, /* le.h */
- {40,7,rr,S,S,0}, /* le.w */
- {40,8,rr,S,S,0}, /* le.l */
- {41,6,rr,A,A,0}, /* lt.h */
- {41,7,rr,A,A,0}, /* lt.w */
- {41,6,nr,A,0,0}, /* lt.h */
- {41,7,nr,A,0,0}, /* lt.w */
- {41,5,rr,S,S,0}, /* lt.b */
- {41,6,rr,S,S,0}, /* lt.h */
- {41,7,rr,S,S,0}, /* lt.w */
- {41,8,rr,S,S,0}, /* lt.l */
- {9,7,rr,S,A,0}, /* add.w */
- {8,0,rr,A,A,0}, /* shf */
- {0,0,rr,A,A,0}, /* mov */
- {0,0,rr,S,A,0}, /* mov */
- {0,7,rr,S,S,0}, /* mov.w */
- {8,0,rr,S,S,0}, /* shf */
- {0,0,rr,S,S,0}, /* mov */
- {0,0,rr,A,S,0}, /* mov */
- {5,0,rr,A,A,0}, /* and */
- {6,0,rr,A,A,0}, /* or */
- {7,0,rr,A,A,0}, /* xor */
- {42,0,rr,A,A,0}, /* not */
- {5,0,rr,S,S,0}, /* and */
- {6,0,rr,S,S,0}, /* or */
- {7,0,rr,S,S,0}, /* xor */
- {42,0,rr,S,S,0}, /* not */
- {40,3,rr,S,S,0}, /* le.s */
- {40,4,rr,S,S,0}, /* le.d */
- {41,3,rr,S,S,0}, /* lt.s */
- {41,4,rr,S,S,0}, /* lt.d */
- {9,3,rr,S,S,0}, /* add.s */
- {9,4,rr,S,S,0}, /* add.d */
- {10,3,rr,S,S,0}, /* sub.s */
- {10,4,rr,S,S,0}, /* sub.d */
- {37,3,rr,S,S,0}, /* eq.s */
- {37,4,rr,S,S,0}, /* eq.d */
- {43,6,rr,A,A,0}, /* neg.h */
- {43,7,rr,A,A,0}, /* neg.w */
- {3,3,rr,S,S,0}, /* mul.s */
- {3,4,rr,S,S,0}, /* mul.d */
- {4,3,rr,S,S,0}, /* div.s */
- {4,4,rr,S,S,0}, /* div.d */
- {9,6,rr,A,A,0}, /* add.h */
- {9,7,rr,A,A,0}, /* add.w */
- {9,6,nr,A,0,0}, /* add.h */
- {9,7,nr,A,0,0}, /* add.w */
- {9,5,rr,S,S,0}, /* add.b */
- {9,6,rr,S,S,0}, /* add.h */
- {9,7,rr,S,S,0}, /* add.w */
- {9,8,rr,S,S,0}, /* add.l */
- {10,6,rr,A,A,0}, /* sub.h */
- {10,7,rr,A,A,0}, /* sub.w */
- {10,6,nr,A,0,0}, /* sub.h */
- {10,7,nr,A,0,0}, /* sub.w */
- {10,5,rr,S,S,0}, /* sub.b */
- {10,6,rr,S,S,0}, /* sub.h */
- {10,7,rr,S,S,0}, /* sub.w */
- {10,8,rr,S,S,0}, /* sub.l */
- {3,6,rr,A,A,0}, /* mul.h */
- {3,7,rr,A,A,0}, /* mul.w */
- {3,6,nr,A,0,0}, /* mul.h */
- {3,7,nr,A,0,0}, /* mul.w */
- {3,5,rr,S,S,0}, /* mul.b */
- {3,6,rr,S,S,0}, /* mul.h */
- {3,7,rr,S,S,0}, /* mul.w */
- {3,8,rr,S,S,0}, /* mul.l */
- {4,6,rr,A,A,0}, /* div.h */
- {4,7,rr,A,A,0}, /* div.w */
- {4,6,nr,A,0,0}, /* div.h */
- {4,7,nr,A,0,0}, /* div.w */
- {4,5,rr,S,S,0}, /* div.b */
- {4,6,rr,S,S,0}, /* div.h */
- {4,7,rr,S,S,0}, /* div.w */
- {4,8,rr,S,S,0}, /* div.l */
-};
-
-CONST struct formstr format3[] = {
- {32,3,rr,V,V,0}, /* cvtd.s */
- {31,4,rr,V,V,0}, /* cvts.d */
- {33,4,rr,V,V,0}, /* cvtl.d */
- {32,8,rr,V,V,0}, /* cvtd.l */
- {0,0,rrl,S,S,VM}, /* mov */
- {0,0,rlr,S,VM,S}, /* mov */
- {0,0,0,0,0,0},
- {44,0,rr,S,S,0}, /* lop */
- {36,0,rr,V,V,0}, /* tzc */
- {44,0,rr,V,V,0}, /* lop */
- {0,0,0,0,0,0},
- {42,0,rr,V,V,0}, /* not */
- {8,0,rr,S,V,0}, /* shf */
- {35,1,rr,V,V,0}, /* plc.t */
- {45,2,rr,V,V,0}, /* cprs.f */
- {45,1,rr,V,V,0}, /* cprs.t */
- {37,3,rr,V,V,0}, /* eq.s */
- {37,4,rr,V,V,0}, /* eq.d */
- {43,3,rr,V,V,0}, /* neg.s */
- {43,4,rr,V,V,0}, /* neg.d */
- {37,3,rr,S,V,0}, /* eq.s */
- {37,4,rr,S,V,0}, /* eq.d */
- {43,3,rr,S,S,0}, /* neg.s */
- {43,4,rr,S,S,0}, /* neg.d */
- {40,3,rr,V,V,0}, /* le.s */
- {40,4,rr,V,V,0}, /* le.d */
- {41,3,rr,V,V,0}, /* lt.s */
- {41,4,rr,V,V,0}, /* lt.d */
- {40,3,rr,S,V,0}, /* le.s */
- {40,4,rr,S,V,0}, /* le.d */
- {41,3,rr,S,V,0}, /* lt.s */
- {41,4,rr,S,V,0}, /* lt.d */
- {37,5,rr,V,V,0}, /* eq.b */
- {37,6,rr,V,V,0}, /* eq.h */
- {37,7,rr,V,V,0}, /* eq.w */
- {37,8,rr,V,V,0}, /* eq.l */
- {37,5,rr,S,V,0}, /* eq.b */
- {37,6,rr,S,V,0}, /* eq.h */
- {37,7,rr,S,V,0}, /* eq.w */
- {37,8,rr,S,V,0}, /* eq.l */
- {40,5,rr,V,V,0}, /* le.b */
- {40,6,rr,V,V,0}, /* le.h */
- {40,7,rr,V,V,0}, /* le.w */
- {40,8,rr,V,V,0}, /* le.l */
- {40,5,rr,S,V,0}, /* le.b */
- {40,6,rr,S,V,0}, /* le.h */
- {40,7,rr,S,V,0}, /* le.w */
- {40,8,rr,S,V,0}, /* le.l */
- {41,5,rr,V,V,0}, /* lt.b */
- {41,6,rr,V,V,0}, /* lt.h */
- {41,7,rr,V,V,0}, /* lt.w */
- {41,8,rr,V,V,0}, /* lt.l */
- {41,5,rr,S,V,0}, /* lt.b */
- {41,6,rr,S,V,0}, /* lt.h */
- {41,7,rr,S,V,0}, /* lt.w */
- {41,8,rr,S,V,0}, /* lt.l */
- {43,5,rr,V,V,0}, /* neg.b */
- {43,6,rr,V,V,0}, /* neg.h */
- {43,7,rr,V,V,0}, /* neg.w */
- {43,8,rr,V,V,0}, /* neg.l */
- {43,5,rr,S,S,0}, /* neg.b */
- {43,6,rr,S,S,0}, /* neg.h */
- {43,7,rr,S,S,0}, /* neg.w */
- {43,8,rr,S,S,0}, /* neg.l */
-};
-
-CONST struct formstr format4[] = {
- {46,0,nops,0,0,0}, /* nop */
- {47,0,pcrel,0,0,0}, /* br */
- {48,2,pcrel,0,0,0}, /* bri.f */
- {48,1,pcrel,0,0,0}, /* bri.t */
- {49,2,pcrel,0,0,0}, /* bra.f */
- {49,1,pcrel,0,0,0}, /* bra.t */
- {50,2,pcrel,0,0,0}, /* brs.f */
- {50,1,pcrel,0,0,0}, /* brs.t */
-};
-
-CONST struct formstr format5[] = {
- {51,5,rr,V,V,0}, /* ldvi.b */
- {51,6,rr,V,V,0}, /* ldvi.h */
- {51,7,rr,V,V,0}, /* ldvi.w */
- {51,8,rr,V,V,0}, /* ldvi.l */
- {28,3,rr,V,V,0}, /* cvtw.s */
- {31,7,rr,V,V,0}, /* cvts.w */
- {28,8,rr,V,V,0}, /* cvtw.l */
- {33,7,rr,V,V,0}, /* cvtl.w */
- {52,5,rxr,V,V,0}, /* stvi.b */
- {52,6,rxr,V,V,0}, /* stvi.h */
- {52,7,rxr,V,V,0}, /* stvi.w */
- {52,8,rxr,V,V,0}, /* stvi.l */
- {52,5,rxr,S,V,0}, /* stvi.b */
- {52,6,rxr,S,V,0}, /* stvi.h */
- {52,7,rxr,S,V,0}, /* stvi.w */
- {52,8,rxr,S,V,0}, /* stvi.l */
-};
-
-CONST struct formstr format6[] = {
- {53,0,r,A,0,0}, /* ldsdr */
- {54,0,r,A,0,0}, /* ldkdr */
- {55,3,r,S,0,0}, /* ln.s */
- {55,4,r,S,0,0}, /* ln.d */
- {56,0,nops,0,0,0}, /* patu */
- {57,0,r,A,0,0}, /* pate */
- {58,0,nops,0,0,0}, /* pich */
- {59,0,nops,0,0,0}, /* plch */
- {0,0,lr,PSW,A,0}, /* mov */
- {0,0,rxl,A,PSW,0}, /* mov */
- {0,0,lr,PC,A,0}, /* mov */
- {60,0,r,S,0,0}, /* idle */
- {0,0,lr,ITR,S,0}, /* mov */
- {0,0,rxl,S,ITR,0}, /* mov */
- {0,0,0,0,0,0},
- {0,0,rxl,S,ITSR,0}, /* mov */
- {61,0,nops,0,0,0}, /* rtnq */
- {62,0,nops,0,0,0}, /* cfork */
- {63,0,nops,0,0,0}, /* rtn */
- {64,0,nops,0,0,0}, /* wfork */
- {65,0,nops,0,0,0}, /* join */
- {66,0,nops,0,0,0}, /* rtnc */
- {67,3,r,S,0,0}, /* exp.s */
- {67,4,r,S,0,0}, /* exp.d */
- {68,3,r,S,0,0}, /* sin.s */
- {68,4,r,S,0,0}, /* sin.d */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {69,3,r,S,0,0}, /* cos.s */
- {69,4,r,S,0,0}, /* cos.d */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {70,7,r,A,0,0}, /* psh.w */
- {0,0,0,0,0,0},
- {71,7,r,A,0,0}, /* pop.w */
- {0,0,0,0,0,0},
- {70,7,r,S,0,0}, /* psh.w */
- {70,8,r,S,0,0}, /* psh.l */
- {71,7,r,S,0,0}, /* pop.w */
- {71,8,r,S,0,0}, /* pop.l */
- {72,0,nops,0,0,0}, /* eni */
- {73,0,nops,0,0,0}, /* dsi */
- {74,0,nops,0,0,0}, /* bkpt */
- {75,0,nops,0,0,0}, /* msync */
- {76,0,r,S,0,0}, /* mski */
- {77,0,r,S,0,0}, /* xmti */
- {0,0,rxl,S,VV,0}, /* mov */
- {78,0,nops,0,0,0}, /* tstvv */
- {0,0,lr,VS,A,0}, /* mov */
- {0,0,rxl,A,VS,0}, /* mov */
- {0,0,lr,VL,A,0}, /* mov */
- {0,0,rxl,A,VL,0}, /* mov */
- {0,7,lr,VS,S,0}, /* mov.w */
- {0,7,rxl,S,VS,0}, /* mov.w */
- {0,7,lr,VL,S,0}, /* mov.w */
- {0,7,rxl,S,VL,0}, /* mov.w */
- {79,0,r,A,0,0}, /* diag */
- {80,0,nops,0,0,0}, /* pbkpt */
- {81,3,r,S,0,0}, /* sqrt.s */
- {81,4,r,S,0,0}, /* sqrt.d */
- {82,0,nops,0,0,0}, /* casr */
- {0,0,0,0,0,0},
- {83,3,r,S,0,0}, /* atan.s */
- {83,4,r,S,0,0}, /* atan.d */
-};
-
-CONST struct formstr format7[] = {
- {84,5,r,V,0,0}, /* sum.b */
- {84,6,r,V,0,0}, /* sum.h */
- {84,7,r,V,0,0}, /* sum.w */
- {84,8,r,V,0,0}, /* sum.l */
- {85,0,r,V,0,0}, /* all */
- {86,0,r,V,0,0}, /* any */
- {87,0,r,V,0,0}, /* parity */
- {0,0,0,0,0,0},
- {88,5,r,V,0,0}, /* max.b */
- {88,6,r,V,0,0}, /* max.h */
- {88,7,r,V,0,0}, /* max.w */
- {88,8,r,V,0,0}, /* max.l */
- {89,5,r,V,0,0}, /* min.b */
- {89,6,r,V,0,0}, /* min.h */
- {89,7,r,V,0,0}, /* min.w */
- {89,8,r,V,0,0}, /* min.l */
- {84,3,r,V,0,0}, /* sum.s */
- {84,4,r,V,0,0}, /* sum.d */
- {90,3,r,V,0,0}, /* prod.s */
- {90,4,r,V,0,0}, /* prod.d */
- {88,3,r,V,0,0}, /* max.s */
- {88,4,r,V,0,0}, /* max.d */
- {89,3,r,V,0,0}, /* min.s */
- {89,4,r,V,0,0}, /* min.d */
- {90,5,r,V,0,0}, /* prod.b */
- {90,6,r,V,0,0}, /* prod.h */
- {90,7,r,V,0,0}, /* prod.w */
- {90,8,r,V,0,0}, /* prod.l */
- {35,2,lr,VM,S,0}, /* plc.f */
- {35,1,lr,VM,S,0}, /* plc.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-CONST struct formstr formatx[] = {
- {0,0,0,0,0,0},
-};
-
-CONST struct formstr format1a[] = {
- {91,0,imr,A,0,0}, /* halt */
- {92,0,a4,0,0,0}, /* sysc */
- {18,6,imr,A,0,0}, /* ld.h */
- {18,7,imr,A,0,0}, /* ld.w */
- {5,0,imr,A,0,0}, /* and */
- {6,0,imr,A,0,0}, /* or */
- {7,0,imr,A,0,0}, /* xor */
- {8,0,imr,A,0,0}, /* shf */
- {9,6,imr,A,0,0}, /* add.h */
- {9,7,imr,A,0,0}, /* add.w */
- {10,6,imr,A,0,0}, /* sub.h */
- {10,7,imr,A,0,0}, /* sub.w */
- {3,6,imr,A,0,0}, /* mul.h */
- {3,7,imr,A,0,0}, /* mul.w */
- {4,6,imr,A,0,0}, /* div.h */
- {4,7,imr,A,0,0}, /* div.w */
- {18,7,iml,VL,0,0}, /* ld.w */
- {18,7,iml,VS,0,0}, /* ld.w */
- {0,0,0,0,0,0},
- {8,7,imr,S,0,0}, /* shf.w */
- {93,0,a5,0,0,0}, /* trap */
- {0,0,0,0,0,0},
- {37,6,imr,A,0,0}, /* eq.h */
- {37,7,imr,A,0,0}, /* eq.w */
- {38,6,imr,A,0,0}, /* leu.h */
- {38,7,imr,A,0,0}, /* leu.w */
- {39,6,imr,A,0,0}, /* ltu.h */
- {39,7,imr,A,0,0}, /* ltu.w */
- {40,6,imr,A,0,0}, /* le.h */
- {40,7,imr,A,0,0}, /* le.w */
- {41,6,imr,A,0,0}, /* lt.h */
- {41,7,imr,A,0,0}, /* lt.w */
-};
-
-CONST struct formstr format1b[] = {
- {18,4,imr,S,0,0}, /* ld.d */
- {18,10,imr,S,0,0}, /* ld.u */
- {18,8,imr,S,0,0}, /* ld.l */
- {18,7,imr,S,0,0}, /* ld.w */
- {5,0,imr,S,0,0}, /* and */
- {6,0,imr,S,0,0}, /* or */
- {7,0,imr,S,0,0}, /* xor */
- {8,0,imr,S,0,0}, /* shf */
- {9,6,imr,S,0,0}, /* add.h */
- {9,7,imr,S,0,0}, /* add.w */
- {10,6,imr,S,0,0}, /* sub.h */
- {10,7,imr,S,0,0}, /* sub.w */
- {3,6,imr,S,0,0}, /* mul.h */
- {3,7,imr,S,0,0}, /* mul.w */
- {4,6,imr,S,0,0}, /* div.h */
- {4,7,imr,S,0,0}, /* div.w */
- {9,3,imr,S,0,0}, /* add.s */
- {10,3,imr,S,0,0}, /* sub.s */
- {3,3,imr,S,0,0}, /* mul.s */
- {4,3,imr,S,0,0}, /* div.s */
- {40,3,imr,S,0,0}, /* le.s */
- {41,3,imr,S,0,0}, /* lt.s */
- {37,6,imr,S,0,0}, /* eq.h */
- {37,7,imr,S,0,0}, /* eq.w */
- {38,6,imr,S,0,0}, /* leu.h */
- {38,7,imr,S,0,0}, /* leu.w */
- {39,6,imr,S,0,0}, /* ltu.h */
- {39,7,imr,S,0,0}, /* ltu.w */
- {40,6,imr,S,0,0}, /* le.h */
- {40,7,imr,S,0,0}, /* le.w */
- {41,6,imr,S,0,0}, /* lt.h */
- {41,7,imr,S,0,0}, /* lt.w */
-};
-
-CONST struct formstr e0_format0[] = {
- {10,3,rrr,S,V,V}, /* sub.s */
- {10,4,rrr,S,V,V}, /* sub.d */
- {4,3,rrr,S,V,V}, /* div.s */
- {4,4,rrr,S,V,V}, /* div.d */
- {10,11,rrr,S,V,V}, /* sub.s.f */
- {10,12,rrr,S,V,V}, /* sub.d.f */
- {4,11,rrr,S,V,V}, /* div.s.f */
- {4,12,rrr,S,V,V}, /* div.d.f */
- {3,11,rrr,V,V,V}, /* mul.s.f */
- {3,12,rrr,V,V,V}, /* mul.d.f */
- {4,11,rrr,V,V,V}, /* div.s.f */
- {4,12,rrr,V,V,V}, /* div.d.f */
- {3,11,rrr,V,S,V}, /* mul.s.f */
- {3,12,rrr,V,S,V}, /* mul.d.f */
- {4,11,rrr,V,S,V}, /* div.s.f */
- {4,12,rrr,V,S,V}, /* div.d.f */
- {5,2,rrr,V,V,V}, /* and.f */
- {6,2,rrr,V,V,V}, /* or.f */
- {7,2,rrr,V,V,V}, /* xor.f */
- {8,2,rrr,V,V,V}, /* shf.f */
- {5,2,rrr,V,S,V}, /* and.f */
- {6,2,rrr,V,S,V}, /* or.f */
- {7,2,rrr,V,S,V}, /* xor.f */
- {8,2,rrr,V,S,V}, /* shf.f */
- {9,11,rrr,V,V,V}, /* add.s.f */
- {9,12,rrr,V,V,V}, /* add.d.f */
- {10,11,rrr,V,V,V}, /* sub.s.f */
- {10,12,rrr,V,V,V}, /* sub.d.f */
- {9,11,rrr,V,S,V}, /* add.s.f */
- {9,12,rrr,V,S,V}, /* add.d.f */
- {10,11,rrr,V,S,V}, /* sub.s.f */
- {10,12,rrr,V,S,V}, /* sub.d.f */
- {9,13,rrr,V,V,V}, /* add.b.f */
- {9,14,rrr,V,V,V}, /* add.h.f */
- {9,15,rrr,V,V,V}, /* add.w.f */
- {9,16,rrr,V,V,V}, /* add.l.f */
- {9,13,rrr,V,S,V}, /* add.b.f */
- {9,14,rrr,V,S,V}, /* add.h.f */
- {9,15,rrr,V,S,V}, /* add.w.f */
- {9,16,rrr,V,S,V}, /* add.l.f */
- {10,13,rrr,V,V,V}, /* sub.b.f */
- {10,14,rrr,V,V,V}, /* sub.h.f */
- {10,15,rrr,V,V,V}, /* sub.w.f */
- {10,16,rrr,V,V,V}, /* sub.l.f */
- {10,13,rrr,V,S,V}, /* sub.b.f */
- {10,14,rrr,V,S,V}, /* sub.h.f */
- {10,15,rrr,V,S,V}, /* sub.w.f */
- {10,16,rrr,V,S,V}, /* sub.l.f */
- {3,13,rrr,V,V,V}, /* mul.b.f */
- {3,14,rrr,V,V,V}, /* mul.h.f */
- {3,15,rrr,V,V,V}, /* mul.w.f */
- {3,16,rrr,V,V,V}, /* mul.l.f */
- {3,13,rrr,V,S,V}, /* mul.b.f */
- {3,14,rrr,V,S,V}, /* mul.h.f */
- {3,15,rrr,V,S,V}, /* mul.w.f */
- {3,16,rrr,V,S,V}, /* mul.l.f */
- {4,13,rrr,V,V,V}, /* div.b.f */
- {4,14,rrr,V,V,V}, /* div.h.f */
- {4,15,rrr,V,V,V}, /* div.w.f */
- {4,16,rrr,V,V,V}, /* div.l.f */
- {4,13,rrr,V,S,V}, /* div.b.f */
- {4,14,rrr,V,S,V}, /* div.h.f */
- {4,15,rrr,V,S,V}, /* div.w.f */
- {4,16,rrr,V,S,V}, /* div.l.f */
-};
-
-CONST struct formstr e0_format1[] = {
- {0,0,0,0,0,0},
- {94,0,a3,0,0,0}, /* tst */
- {95,0,a3,0,0,0}, /* lck */
- {96,0,a3,0,0,0}, /* ulk */
- {17,0,a1r,S,0,0}, /* ldea */
- {97,0,a1r,A,0,0}, /* spawn */
- {98,0,a1r,A,0,0}, /* ldcmr */
- {99,0,a2r,A,0,0}, /* stcmr */
- {100,0,a1r,A,0,0}, /* popr */
- {101,0,a2r,A,0,0}, /* pshr */
- {102,7,a1r,A,0,0}, /* rcvr.w */
- {103,7,a2r,A,0,0}, /* matm.w */
- {104,7,a2r,A,0,0}, /* sndr.w */
- {104,8,a2r,S,0,0}, /* sndr.l */
- {102,8,a1r,S,0,0}, /* rcvr.l */
- {103,8,a2r,S,0,0}, /* matm.l */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {105,7,a2r,A,0,0}, /* putr.w */
- {105,8,a2r,S,0,0}, /* putr.l */
- {106,7,a1r,A,0,0}, /* getr.w */
- {106,8,a1r,S,0,0}, /* getr.l */
- {26,13,a2r,S,0,0}, /* ste.b.f */
- {26,14,a2r,S,0,0}, /* ste.h.f */
- {26,15,a2r,S,0,0}, /* ste.w.f */
- {26,16,a2r,S,0,0}, /* ste.l.f */
- {107,7,a2r,A,0,0}, /* matr.w */
- {108,7,a2r,A,0,0}, /* mat.w */
- {109,7,a1r,A,0,0}, /* get.w */
- {110,7,a1r,A,0,0}, /* rcv.w */
- {0,0,0,0,0,0},
- {111,7,a1r,A,0,0}, /* inc.w */
- {112,7,a2r,A,0,0}, /* put.w */
- {113,7,a2r,A,0,0}, /* snd.w */
- {107,8,a2r,S,0,0}, /* matr.l */
- {108,8,a2r,S,0,0}, /* mat.l */
- {109,8,a1r,S,0,0}, /* get.l */
- {110,8,a1r,S,0,0}, /* rcv.l */
- {0,0,0,0,0,0},
- {111,8,a1r,S,0,0}, /* inc.l */
- {112,8,a2r,S,0,0}, /* put.l */
- {113,8,a2r,S,0,0}, /* snd.l */
- {18,13,a1r,V,0,0}, /* ld.b.f */
- {18,14,a1r,V,0,0}, /* ld.h.f */
- {18,15,a1r,V,0,0}, /* ld.w.f */
- {18,16,a1r,V,0,0}, /* ld.l.f */
- {21,13,a2r,V,0,0}, /* st.b.f */
- {21,14,a2r,V,0,0}, /* st.h.f */
- {21,15,a2r,V,0,0}, /* st.w.f */
- {21,16,a2r,V,0,0}, /* st.l.f */
-};
-
-CONST struct formstr e0_format2[] = {
- {28,5,rr,V,V,0}, /* cvtw.b */
- {28,6,rr,V,V,0}, /* cvtw.h */
- {29,7,rr,V,V,0}, /* cvtb.w */
- {30,7,rr,V,V,0}, /* cvth.w */
- {28,13,rr,V,V,0}, /* cvtw.b.f */
- {28,14,rr,V,V,0}, /* cvtw.h.f */
- {29,15,rr,V,V,0}, /* cvtb.w.f */
- {30,15,rr,V,V,0}, /* cvth.w.f */
- {31,8,rr,V,V,0}, /* cvts.l */
- {32,7,rr,V,V,0}, /* cvtd.w */
- {33,3,rr,V,V,0}, /* cvtl.s */
- {28,4,rr,V,V,0}, /* cvtw.d */
- {31,16,rr,V,V,0}, /* cvts.l.f */
- {32,15,rr,V,V,0}, /* cvtd.w.f */
- {33,11,rr,V,V,0}, /* cvtl.s.f */
- {28,12,rr,V,V,0}, /* cvtw.d.f */
- {114,0,rr,S,S,0}, /* enal */
- {8,7,rr,S,S,0}, /* shf.w */
- {115,0,rr,S,S,0}, /* enag */
- {0,0,0,0,0,0},
- {28,4,rr,S,S,0}, /* cvtw.d */
- {32,7,rr,S,S,0}, /* cvtd.w */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {116,3,rr,S,S,0}, /* frint.s */
- {116,4,rr,S,S,0}, /* frint.d */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {116,3,rr,V,V,0}, /* frint.s */
- {116,4,rr,V,V,0}, /* frint.d */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {116,11,rr,V,V,0}, /* frint.s.f */
- {116,12,rr,V,V,0}, /* frint.d.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {81,3,rr,V,V,0}, /* sqrt.s */
- {81,4,rr,V,V,0}, /* sqrt.d */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {81,11,rr,V,V,0}, /* sqrt.s.f */
- {81,12,rr,V,V,0}, /* sqrt.d.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-CONST struct formstr e0_format3[] = {
- {32,11,rr,V,V,0}, /* cvtd.s.f */
- {31,12,rr,V,V,0}, /* cvts.d.f */
- {33,12,rr,V,V,0}, /* cvtl.d.f */
- {32,16,rr,V,V,0}, /* cvtd.l.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {36,2,rr,V,V,0}, /* tzc.f */
- {44,2,rr,V,V,0}, /* lop.f */
- {117,2,rr,V,V,0}, /* xpnd.f */
- {42,2,rr,V,V,0}, /* not.f */
- {8,2,rr,S,V,0}, /* shf.f */
- {35,17,rr,V,V,0}, /* plc.t.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {37,11,rr,V,V,0}, /* eq.s.f */
- {37,12,rr,V,V,0}, /* eq.d.f */
- {43,11,rr,V,V,0}, /* neg.s.f */
- {43,12,rr,V,V,0}, /* neg.d.f */
- {37,11,rr,S,V,0}, /* eq.s.f */
- {37,12,rr,S,V,0}, /* eq.d.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {40,11,rr,V,V,0}, /* le.s.f */
- {40,12,rr,V,V,0}, /* le.d.f */
- {41,11,rr,V,V,0}, /* lt.s.f */
- {41,12,rr,V,V,0}, /* lt.d.f */
- {40,11,rr,S,V,0}, /* le.s.f */
- {40,12,rr,S,V,0}, /* le.d.f */
- {41,11,rr,S,V,0}, /* lt.s.f */
- {41,12,rr,S,V,0}, /* lt.d.f */
- {37,13,rr,V,V,0}, /* eq.b.f */
- {37,14,rr,V,V,0}, /* eq.h.f */
- {37,15,rr,V,V,0}, /* eq.w.f */
- {37,16,rr,V,V,0}, /* eq.l.f */
- {37,13,rr,S,V,0}, /* eq.b.f */
- {37,14,rr,S,V,0}, /* eq.h.f */
- {37,15,rr,S,V,0}, /* eq.w.f */
- {37,16,rr,S,V,0}, /* eq.l.f */
- {40,13,rr,V,V,0}, /* le.b.f */
- {40,14,rr,V,V,0}, /* le.h.f */
- {40,15,rr,V,V,0}, /* le.w.f */
- {40,16,rr,V,V,0}, /* le.l.f */
- {40,13,rr,S,V,0}, /* le.b.f */
- {40,14,rr,S,V,0}, /* le.h.f */
- {40,15,rr,S,V,0}, /* le.w.f */
- {40,16,rr,S,V,0}, /* le.l.f */
- {41,13,rr,V,V,0}, /* lt.b.f */
- {41,14,rr,V,V,0}, /* lt.h.f */
- {41,15,rr,V,V,0}, /* lt.w.f */
- {41,16,rr,V,V,0}, /* lt.l.f */
- {41,13,rr,S,V,0}, /* lt.b.f */
- {41,14,rr,S,V,0}, /* lt.h.f */
- {41,15,rr,S,V,0}, /* lt.w.f */
- {41,16,rr,S,V,0}, /* lt.l.f */
- {43,13,rr,V,V,0}, /* neg.b.f */
- {43,14,rr,V,V,0}, /* neg.h.f */
- {43,15,rr,V,V,0}, /* neg.w.f */
- {43,16,rr,V,V,0}, /* neg.l.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-CONST struct formstr e0_format4[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-CONST struct formstr e0_format5[] = {
- {51,13,rr,V,V,0}, /* ldvi.b.f */
- {51,14,rr,V,V,0}, /* ldvi.h.f */
- {51,15,rr,V,V,0}, /* ldvi.w.f */
- {51,16,rr,V,V,0}, /* ldvi.l.f */
- {28,11,rr,V,V,0}, /* cvtw.s.f */
- {31,15,rr,V,V,0}, /* cvts.w.f */
- {28,16,rr,V,V,0}, /* cvtw.l.f */
- {33,15,rr,V,V,0}, /* cvtl.w.f */
- {52,13,rxr,V,V,0}, /* stvi.b.f */
- {52,14,rxr,V,V,0}, /* stvi.h.f */
- {52,15,rxr,V,V,0}, /* stvi.w.f */
- {52,16,rxr,V,V,0}, /* stvi.l.f */
- {52,13,rxr,S,V,0}, /* stvi.b.f */
- {52,14,rxr,S,V,0}, /* stvi.h.f */
- {52,15,rxr,S,V,0}, /* stvi.w.f */
- {52,16,rxr,S,V,0}, /* stvi.l.f */
-};
-
-CONST struct formstr e0_format6[] = {
- {0,0,rxl,S,CIR,0}, /* mov */
- {0,0,lr,CIR,S,0}, /* mov */
- {0,0,lr,TOC,S,0}, /* mov */
- {0,0,lr,CPUID,S,0}, /* mov */
- {0,0,rxl,S,TTR,0}, /* mov */
- {0,0,lr,TTR,S,0}, /* mov */
- {118,0,nops,0,0,0}, /* ctrsl */
- {119,0,nops,0,0,0}, /* ctrsg */
- {0,0,rxl,S,VMU,0}, /* mov */
- {0,0,lr,VMU,S,0}, /* mov */
- {0,0,rxl,S,VML,0}, /* mov */
- {0,0,lr,VML,S,0}, /* mov */
- {0,0,rxl,S,ICR,0}, /* mov */
- {0,0,lr,ICR,S,0}, /* mov */
- {0,0,rxl,S,TCPU,0}, /* mov */
- {0,0,lr,TCPU,S,0}, /* mov */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {120,0,nops,0,0,0}, /* stop */
- {0,0,0,0,0,0},
- {0,0,rxl,S,TID,0}, /* mov */
- {0,0,lr,TID,S,0}, /* mov */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-CONST struct formstr e0_format7[] = {
- {84,13,r,V,0,0}, /* sum.b.f */
- {84,14,r,V,0,0}, /* sum.h.f */
- {84,15,r,V,0,0}, /* sum.w.f */
- {84,16,r,V,0,0}, /* sum.l.f */
- {85,2,r,V,0,0}, /* all.f */
- {86,2,r,V,0,0}, /* any.f */
- {87,2,r,V,0,0}, /* parity.f */
- {0,0,0,0,0,0},
- {88,13,r,V,0,0}, /* max.b.f */
- {88,14,r,V,0,0}, /* max.h.f */
- {88,15,r,V,0,0}, /* max.w.f */
- {88,16,r,V,0,0}, /* max.l.f */
- {89,13,r,V,0,0}, /* min.b.f */
- {89,14,r,V,0,0}, /* min.h.f */
- {89,15,r,V,0,0}, /* min.w.f */
- {89,16,r,V,0,0}, /* min.l.f */
- {84,11,r,V,0,0}, /* sum.s.f */
- {84,12,r,V,0,0}, /* sum.d.f */
- {90,11,r,V,0,0}, /* prod.s.f */
- {90,12,r,V,0,0}, /* prod.d.f */
- {88,11,r,V,0,0}, /* max.s.f */
- {88,12,r,V,0,0}, /* max.d.f */
- {89,11,r,V,0,0}, /* min.s.f */
- {89,12,r,V,0,0}, /* min.d.f */
- {90,13,r,V,0,0}, /* prod.b.f */
- {90,14,r,V,0,0}, /* prod.h.f */
- {90,15,r,V,0,0}, /* prod.w.f */
- {90,16,r,V,0,0}, /* prod.l.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-CONST struct formstr e1_format0[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {10,18,rrr,S,V,V}, /* sub.s.t */
- {10,19,rrr,S,V,V}, /* sub.d.t */
- {4,18,rrr,S,V,V}, /* div.s.t */
- {4,19,rrr,S,V,V}, /* div.d.t */
- {3,18,rrr,V,V,V}, /* mul.s.t */
- {3,19,rrr,V,V,V}, /* mul.d.t */
- {4,18,rrr,V,V,V}, /* div.s.t */
- {4,19,rrr,V,V,V}, /* div.d.t */
- {3,18,rrr,V,S,V}, /* mul.s.t */
- {3,19,rrr,V,S,V}, /* mul.d.t */
- {4,18,rrr,V,S,V}, /* div.s.t */
- {4,19,rrr,V,S,V}, /* div.d.t */
- {5,1,rrr,V,V,V}, /* and.t */
- {6,1,rrr,V,V,V}, /* or.t */
- {7,1,rrr,V,V,V}, /* xor.t */
- {8,1,rrr,V,V,V}, /* shf.t */
- {5,1,rrr,V,S,V}, /* and.t */
- {6,1,rrr,V,S,V}, /* or.t */
- {7,1,rrr,V,S,V}, /* xor.t */
- {8,1,rrr,V,S,V}, /* shf.t */
- {9,18,rrr,V,V,V}, /* add.s.t */
- {9,19,rrr,V,V,V}, /* add.d.t */
- {10,18,rrr,V,V,V}, /* sub.s.t */
- {10,19,rrr,V,V,V}, /* sub.d.t */
- {9,18,rrr,V,S,V}, /* add.s.t */
- {9,19,rrr,V,S,V}, /* add.d.t */
- {10,18,rrr,V,S,V}, /* sub.s.t */
- {10,19,rrr,V,S,V}, /* sub.d.t */
- {9,20,rrr,V,V,V}, /* add.b.t */
- {9,21,rrr,V,V,V}, /* add.h.t */
- {9,22,rrr,V,V,V}, /* add.w.t */
- {9,23,rrr,V,V,V}, /* add.l.t */
- {9,20,rrr,V,S,V}, /* add.b.t */
- {9,21,rrr,V,S,V}, /* add.h.t */
- {9,22,rrr,V,S,V}, /* add.w.t */
- {9,23,rrr,V,S,V}, /* add.l.t */
- {10,20,rrr,V,V,V}, /* sub.b.t */
- {10,21,rrr,V,V,V}, /* sub.h.t */
- {10,22,rrr,V,V,V}, /* sub.w.t */
- {10,23,rrr,V,V,V}, /* sub.l.t */
- {10,20,rrr,V,S,V}, /* sub.b.t */
- {10,21,rrr,V,S,V}, /* sub.h.t */
- {10,22,rrr,V,S,V}, /* sub.w.t */
- {10,23,rrr,V,S,V}, /* sub.l.t */
- {3,20,rrr,V,V,V}, /* mul.b.t */
- {3,21,rrr,V,V,V}, /* mul.h.t */
- {3,22,rrr,V,V,V}, /* mul.w.t */
- {3,23,rrr,V,V,V}, /* mul.l.t */
- {3,20,rrr,V,S,V}, /* mul.b.t */
- {3,21,rrr,V,S,V}, /* mul.h.t */
- {3,22,rrr,V,S,V}, /* mul.w.t */
- {3,23,rrr,V,S,V}, /* mul.l.t */
- {4,20,rrr,V,V,V}, /* div.b.t */
- {4,21,rrr,V,V,V}, /* div.h.t */
- {4,22,rrr,V,V,V}, /* div.w.t */
- {4,23,rrr,V,V,V}, /* div.l.t */
- {4,20,rrr,V,S,V}, /* div.b.t */
- {4,21,rrr,V,S,V}, /* div.h.t */
- {4,22,rrr,V,S,V}, /* div.w.t */
- {4,23,rrr,V,S,V}, /* div.l.t */
-};
-
-CONST struct formstr e1_format1[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {26,20,a2r,S,0,0}, /* ste.b.t */
- {26,21,a2r,S,0,0}, /* ste.h.t */
- {26,22,a2r,S,0,0}, /* ste.w.t */
- {26,23,a2r,S,0,0}, /* ste.l.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {18,20,a1r,V,0,0}, /* ld.b.t */
- {18,21,a1r,V,0,0}, /* ld.h.t */
- {18,22,a1r,V,0,0}, /* ld.w.t */
- {18,23,a1r,V,0,0}, /* ld.l.t */
- {21,20,a2r,V,0,0}, /* st.b.t */
- {21,21,a2r,V,0,0}, /* st.h.t */
- {21,22,a2r,V,0,0}, /* st.w.t */
- {21,23,a2r,V,0,0}, /* st.l.t */
-};
-
-CONST struct formstr e1_format2[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {28,20,rr,V,V,0}, /* cvtw.b.t */
- {28,21,rr,V,V,0}, /* cvtw.h.t */
- {29,22,rr,V,V,0}, /* cvtb.w.t */
- {30,22,rr,V,V,0}, /* cvth.w.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {31,23,rr,V,V,0}, /* cvts.l.t */
- {32,22,rr,V,V,0}, /* cvtd.w.t */
- {33,18,rr,V,V,0}, /* cvtl.s.t */
- {28,19,rr,V,V,0}, /* cvtw.d.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {116,18,rr,V,V,0}, /* frint.s.t */
- {116,19,rr,V,V,0}, /* frint.d.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {81,18,rr,V,V,0}, /* sqrt.s.t */
- {81,19,rr,V,V,0}, /* sqrt.d.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-CONST struct formstr e1_format3[] = {
- {32,18,rr,V,V,0}, /* cvtd.s.t */
- {31,19,rr,V,V,0}, /* cvts.d.t */
- {33,19,rr,V,V,0}, /* cvtl.d.t */
- {32,23,rr,V,V,0}, /* cvtd.l.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {36,1,rr,V,V,0}, /* tzc.t */
- {44,1,rr,V,V,0}, /* lop.t */
- {117,1,rr,V,V,0}, /* xpnd.t */
- {42,1,rr,V,V,0}, /* not.t */
- {8,1,rr,S,V,0}, /* shf.t */
- {35,24,rr,V,V,0}, /* plc.t.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {37,18,rr,V,V,0}, /* eq.s.t */
- {37,19,rr,V,V,0}, /* eq.d.t */
- {43,18,rr,V,V,0}, /* neg.s.t */
- {43,19,rr,V,V,0}, /* neg.d.t */
- {37,18,rr,S,V,0}, /* eq.s.t */
- {37,19,rr,S,V,0}, /* eq.d.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {40,18,rr,V,V,0}, /* le.s.t */
- {40,19,rr,V,V,0}, /* le.d.t */
- {41,18,rr,V,V,0}, /* lt.s.t */
- {41,19,rr,V,V,0}, /* lt.d.t */
- {40,18,rr,S,V,0}, /* le.s.t */
- {40,19,rr,S,V,0}, /* le.d.t */
- {41,18,rr,S,V,0}, /* lt.s.t */
- {41,19,rr,S,V,0}, /* lt.d.t */
- {37,20,rr,V,V,0}, /* eq.b.t */
- {37,21,rr,V,V,0}, /* eq.h.t */
- {37,22,rr,V,V,0}, /* eq.w.t */
- {37,23,rr,V,V,0}, /* eq.l.t */
- {37,20,rr,S,V,0}, /* eq.b.t */
- {37,21,rr,S,V,0}, /* eq.h.t */
- {37,22,rr,S,V,0}, /* eq.w.t */
- {37,23,rr,S,V,0}, /* eq.l.t */
- {40,20,rr,V,V,0}, /* le.b.t */
- {40,21,rr,V,V,0}, /* le.h.t */
- {40,22,rr,V,V,0}, /* le.w.t */
- {40,23,rr,V,V,0}, /* le.l.t */
- {40,20,rr,S,V,0}, /* le.b.t */
- {40,21,rr,S,V,0}, /* le.h.t */
- {40,22,rr,S,V,0}, /* le.w.t */
- {40,23,rr,S,V,0}, /* le.l.t */
- {41,20,rr,V,V,0}, /* lt.b.t */
- {41,21,rr,V,V,0}, /* lt.h.t */
- {41,22,rr,V,V,0}, /* lt.w.t */
- {41,23,rr,V,V,0}, /* lt.l.t */
- {41,20,rr,S,V,0}, /* lt.b.t */
- {41,21,rr,S,V,0}, /* lt.h.t */
- {41,22,rr,S,V,0}, /* lt.w.t */
- {41,23,rr,S,V,0}, /* lt.l.t */
- {43,20,rr,V,V,0}, /* neg.b.t */
- {43,21,rr,V,V,0}, /* neg.h.t */
- {43,22,rr,V,V,0}, /* neg.w.t */
- {43,23,rr,V,V,0}, /* neg.l.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-CONST struct formstr e1_format4[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-CONST struct formstr e1_format5[] = {
- {51,20,rr,V,V,0}, /* ldvi.b.t */
- {51,21,rr,V,V,0}, /* ldvi.h.t */
- {51,22,rr,V,V,0}, /* ldvi.w.t */
- {51,23,rr,V,V,0}, /* ldvi.l.t */
- {28,18,rr,V,V,0}, /* cvtw.s.t */
- {31,22,rr,V,V,0}, /* cvts.w.t */
- {28,23,rr,V,V,0}, /* cvtw.l.t */
- {33,22,rr,V,V,0}, /* cvtl.w.t */
- {52,20,rxr,V,V,0}, /* stvi.b.t */
- {52,21,rxr,V,V,0}, /* stvi.h.t */
- {52,22,rxr,V,V,0}, /* stvi.w.t */
- {52,23,rxr,V,V,0}, /* stvi.l.t */
- {52,20,rxr,S,V,0}, /* stvi.b.t */
- {52,21,rxr,S,V,0}, /* stvi.h.t */
- {52,22,rxr,S,V,0}, /* stvi.w.t */
- {52,23,rxr,S,V,0}, /* stvi.l.t */
-};
-
-CONST struct formstr e1_format6[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-CONST struct formstr e1_format7[] = {
- {84,20,r,V,0,0}, /* sum.b.t */
- {84,21,r,V,0,0}, /* sum.h.t */
- {84,22,r,V,0,0}, /* sum.w.t */
- {84,23,r,V,0,0}, /* sum.l.t */
- {85,1,r,V,0,0}, /* all.t */
- {86,1,r,V,0,0}, /* any.t */
- {87,1,r,V,0,0}, /* parity.t */
- {0,0,0,0,0,0},
- {88,20,r,V,0,0}, /* max.b.t */
- {88,21,r,V,0,0}, /* max.h.t */
- {88,22,r,V,0,0}, /* max.w.t */
- {88,23,r,V,0,0}, /* max.l.t */
- {89,20,r,V,0,0}, /* min.b.t */
- {89,21,r,V,0,0}, /* min.h.t */
- {89,22,r,V,0,0}, /* min.w.t */
- {89,23,r,V,0,0}, /* min.l.t */
- {84,18,r,V,0,0}, /* sum.s.t */
- {84,19,r,V,0,0}, /* sum.d.t */
- {90,18,r,V,0,0}, /* prod.s.t */
- {90,19,r,V,0,0}, /* prod.d.t */
- {88,18,r,V,0,0}, /* max.s.t */
- {88,19,r,V,0,0}, /* max.d.t */
- {89,18,r,V,0,0}, /* min.s.t */
- {89,19,r,V,0,0}, /* min.d.t */
- {90,20,r,V,0,0}, /* prod.b.t */
- {90,21,r,V,0,0}, /* prod.h.t */
- {90,22,r,V,0,0}, /* prod.w.t */
- {90,23,r,V,0,0}, /* prod.l.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-char *lop[] = {
- "mov", /* 0 */
- "merg", /* 1 */
- "mask", /* 2 */
- "mul", /* 3 */
- "div", /* 4 */
- "and", /* 5 */
- "or", /* 6 */
- "xor", /* 7 */
- "shf", /* 8 */
- "add", /* 9 */
- "sub", /* 10 */
- "exit", /* 11 */
- "jmp", /* 12 */
- "jmpi", /* 13 */
- "jmpa", /* 14 */
- "jmps", /* 15 */
- "tac", /* 16 */
- "ldea", /* 17 */
- "ld", /* 18 */
- "tas", /* 19 */
- "pshea", /* 20 */
- "st", /* 21 */
- "call", /* 22 */
- "calls", /* 23 */
- "callq", /* 24 */
- "pfork", /* 25 */
- "ste", /* 26 */
- "incr", /* 27 */
- "cvtw", /* 28 */
- "cvtb", /* 29 */
- "cvth", /* 30 */
- "cvts", /* 31 */
- "cvtd", /* 32 */
- "cvtl", /* 33 */
- "ldpa", /* 34 */
- "plc", /* 35 */
- "tzc", /* 36 */
- "eq", /* 37 */
- "leu", /* 38 */
- "ltu", /* 39 */
- "le", /* 40 */
- "lt", /* 41 */
- "not", /* 42 */
- "neg", /* 43 */
- "lop", /* 44 */
- "cprs", /* 45 */
- "nop", /* 46 */
- "br", /* 47 */
- "bri", /* 48 */
- "bra", /* 49 */
- "brs", /* 50 */
- "ldvi", /* 51 */
- "stvi", /* 52 */
- "ldsdr", /* 53 */
- "ldkdr", /* 54 */
- "ln", /* 55 */
- "patu", /* 56 */
- "pate", /* 57 */
- "pich", /* 58 */
- "plch", /* 59 */
- "idle", /* 60 */
- "rtnq", /* 61 */
- "cfork", /* 62 */
- "rtn", /* 63 */
- "wfork", /* 64 */
- "join", /* 65 */
- "rtnc", /* 66 */
- "exp", /* 67 */
- "sin", /* 68 */
- "cos", /* 69 */
- "psh", /* 70 */
- "pop", /* 71 */
- "eni", /* 72 */
- "dsi", /* 73 */
- "bkpt", /* 74 */
- "msync", /* 75 */
- "mski", /* 76 */
- "xmti", /* 77 */
- "tstvv", /* 78 */
- "diag", /* 79 */
- "pbkpt", /* 80 */
- "sqrt", /* 81 */
- "casr", /* 82 */
- "atan", /* 83 */
- "sum", /* 84 */
- "all", /* 85 */
- "any", /* 86 */
- "parity", /* 87 */
- "max", /* 88 */
- "min", /* 89 */
- "prod", /* 90 */
- "halt", /* 91 */
- "sysc", /* 92 */
- "trap", /* 93 */
- "tst", /* 94 */
- "lck", /* 95 */
- "ulk", /* 96 */
- "spawn", /* 97 */
- "ldcmr", /* 98 */
- "stcmr", /* 99 */
- "popr", /* 100 */
- "pshr", /* 101 */
- "rcvr", /* 102 */
- "matm", /* 103 */
- "sndr", /* 104 */
- "putr", /* 105 */
- "getr", /* 106 */
- "matr", /* 107 */
- "mat", /* 108 */
- "get", /* 109 */
- "rcv", /* 110 */
- "inc", /* 111 */
- "put", /* 112 */
- "snd", /* 113 */
- "enal", /* 114 */
- "enag", /* 115 */
- "frint", /* 116 */
- "xpnd", /* 117 */
- "ctrsl", /* 118 */
- "ctrsg", /* 119 */
- "stop", /* 120 */
-};
-
-char *rop[] = {
- "", /* 0 */
- ".t", /* 1 */
- ".f", /* 2 */
- ".s", /* 3 */
- ".d", /* 4 */
- ".b", /* 5 */
- ".h", /* 6 */
- ".w", /* 7 */
- ".l", /* 8 */
- ".x", /* 9 */
- ".u", /* 10 */
- ".s.f", /* 11 */
- ".d.f", /* 12 */
- ".b.f", /* 13 */
- ".h.f", /* 14 */
- ".w.f", /* 15 */
- ".l.f", /* 16 */
- ".t.f", /* 17 */
- ".s.t", /* 18 */
- ".d.t", /* 19 */
- ".b.t", /* 20 */
- ".h.t", /* 21 */
- ".w.t", /* 22 */
- ".l.t", /* 23 */
- ".t.t", /* 24 */
-};
diff --git a/contrib/gdb/include/opcode/h8300.h b/contrib/gdb/include/opcode/h8300.h
deleted file mode 100644
index 9d726e2e38e6..000000000000
--- a/contrib/gdb/include/opcode/h8300.h
+++ /dev/null
@@ -1,550 +0,0 @@
-/* Opcode table for the H8-300
- Copyright (C) 1991,1992 Free Software Foundation.
- Written by Steve Chamberlain, sac@cygnus.com.
-
- This file is part of GDB, the GNU Debugger and GAS, the GNU Assembler.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Instructions are stored as a sequence of nibbles.
- If the nibble has value 15 or less then the representation is complete.
- Otherwise, we record what it contains with several flags. */
-
-typedef int op_type;
-
-#define Hex0 0
-#define Hex1 1
-#define Hex2 2
-#define Hex3 3
-#define Hex4 4
-#define Hex5 5
-#define Hex6 6
-#define Hex7 7
-#define Hex8 8
-#define Hex9 9
-#define HexA 10
-#define HexB 11
-#define HexC 12
-#define HexD 13
-#define HexE 14
-#define HexF 15
-
-#define START 0x20
-#define SRC 0x40
-#define DST 0x80
-#define L_8 0x01
-#define L_16 0x02
-#define L_32 0x04
-#define L_P 0x08
-#define L_24 0x10
-
-#define REG 0x100
-#define IMM 0x1000
-#define DISP 0x2000
-#define IND 0x4000
-#define INC 0x8000
-#define DEC 0x10000
-#define L_3 0x20000
-#define KBIT 0x40000
-#define DBIT 0x80000
-#define DISPREG 0x100000
-#define IGNORE 0x200000
-#define E 0x400000 /* FIXME: end of nibble sequence? */
-#define L_2 0x800000
-#define CCR 0x4000000
-#define ABS 0x8000000
-#define B30 0x1000000 /* bit 3 must be low */
-#define B31 0x2000000 /* bit 3 must be high */
-#define ABSJMP 0x10000000
-#define ABSMOV 0x20000000
-#define PCREL 0x40000000
-#define MEMIND 0x80000000
-
-#define IMM3 IMM|L_3
-#define IMM2 IMM|L_2
-
-#define SIZE (L_2|L_3|L_8|L_16|L_32|L_P|L_24)
-#define MODE (REG|IMM|DISP|IND|INC|DEC|CCR|ABS|MEMIND)
-
-#define RD8 (DST|L_8|REG)
-#define RD16 (DST|L_16|REG)
-#define RD32 (DST|L_32|REG)
-#define RS8 (SRC|L_8|REG)
-#define RS16 (SRC|L_16|REG)
-#define RS32 (SRC|L_32|REG)
-
-#define RSP (SRC|L_P|REG)
-#define RDP (DST|L_P|REG)
-
-#define IMM8 (IMM|SRC|L_8)
-#define IMM16 (IMM|SRC|L_16)
-#define IMM32 (IMM|SRC|L_32)
-
-#define ABS8SRC (SRC|ABS|L_8)
-#define ABS8DST (DST|ABS|L_8)
-
-#define DISP8 (PCREL|L_8)
-#define DISP16 (PCREL|L_16)
-
-#define DISP8SRC (DISP|L_8|SRC)
-#define DISP16SRC (DISP|L_16|SRC)
-
-#define DISP8DST (DISP|L_8|DST)
-#define DISP16DST (DISP|L_16|DST)
-
-#define ABS16SRC (SRC|ABS|L_16)
-#define ABS16DST (DST|ABS|L_16)
-#define ABS24SRC (SRC|ABS|L_24)
-#define ABS24DST (DST|ABS|L_24)
-
-#define RDDEC (DST|DEC)
-#define RSINC (SRC|INC)
-
-#define RDIND (DST|IND)
-#define RSIND (SRC|IND)
-
-#if 1
-#define OR8 RS8 /* ??? OR as in One Register? */
-#define OR16 RS16
-#define OR32 RS32
-#else
-#define OR8 RD8
-#define OR16 RD16
-#define OR32 RD32
-#endif
-
-struct code
-{
- op_type nib[30];
-};
-
-struct arg
-{
- op_type nib[3];
-};
-
-struct h8_opcode
-{
- int how;
- int inbase;
- int time;
- char *name;
- struct arg args;
- struct code data;
- int length;
- int noperands;
- int idx;
- int size;
-};
-
-#ifdef DEFINE_TABLE
-
-#define BITOP(code, imm, name, op00, op01,op10,op11, op20,op21)\
-{ code, 1, 2, name, {imm,RD8,E}, {op00, op01, imm, RD8, E, 0, 0, 0, 0}, 0, 0, 0, 0},\
-{ code, 1, 6, name, {imm,RDIND,E}, {op10, op11, B30|RDIND, 0, op00,op01, imm, 0, E}, 0, 0, 0, 0},\
-{ code, 1, 6, name, {imm,ABS8DST,E},{op20, op21, ABS8DST, IGNORE, op00,op01, imm, 0,E}, 0, 0, 0, 0}
-
-#define EBITOP(code, imm, name, op00, op01,op10,op11, op20,op21)\
- BITOP(code,imm, name, op00+1, op01, op10,op11, op20,op21),\
- BITOP(code,RS8, name, op00, op01, op10,op11, op20,op21)
-
-#define WTWOP(code,name, op1, op2) \
-{ code, 1, 2, name, {RS16, RD16, E}, { op1, op2, RS16, RD16, E, 0, 0, 0, 0}, 0, 0, 0, 0}
-
-#define BRANCH(code, name, op) \
-{ code, 1, 4,name,{DISP8,E,0}, { 0x4, op, DISP8, IGNORE, E, 0, 0, 0, 0}, 0, 0, 0, 0}, \
-{ code, 0, 6,name,{DISP16,E,0}, { 0x5, 0x8, op, 0x0, DISP16, IGNORE, IGNORE, IGNORE, E,0}, 0, 0, 0, 0}
-
-#define SOP(code, x,name) \
-{code, 1, x, name
-
-#define NEW_SOP(code, in,x,name) \
-{code, in, x, name
-#define EOP ,0,0,0 }
-
-#define TWOOP(code, name, op1, op2,op3) \
-{ code,1, 2,name, {IMM8, RD8, E}, { op1, RD8, IMM8, IGNORE, E, 0, 0, 0, 0}, 0, 0, 0, 0},\
-{ code, 1, 2,name, {RS8, RD8, E}, { op2, op3, RS8, RD8, E, 0, 0, 0, 0}, 0, 0, 0, 0}
-
-#define UNOP(code,name, op1, op2) \
-{ code, 1, 2, name, {OR8, E, 0}, { op1, op2, 0, OR8, E, 0, 0, 0, 0}, 0, 0, 0, 0}
-
-#define UNOP3(code, name, op1, op2, op3) \
-{ O(code,SB), 1, 2, name, {OR8, E, 0}, {op1, op2, op3+0, OR8, E, 0, 0, 0, 0}, 0, 0, 0, 0}, \
-{ O(code,SW), 0, 2, name, {OR16, E, 0}, {op1, op2, op3+1, OR16, E, 0, 0, 0, 0}, 0, 0, 0, 0}, \
-{ O(code,SL), 0, 2, name, {OR32, E, 0}, {op1, op2, op3+3, OR32|B30, E, 0, 0, 0, 0}, 0, 0, 0, 0}
-
-#define IMM32LIST IMM32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define IMM24LIST IMM24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define IMM16LIST IMM16,IGNORE,IGNORE,IGNORE
-#define A16LIST L_16,IGNORE,IGNORE,IGNORE
-#define DISP24LIST DISP|L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define ABS24LIST ABS|L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define A24LIST L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define PREFIX32 0x0,0x1,0x0,0x0
-#define PREFIXLDC 0x0,0x1,0x4,0x0
-
-
-#define O(op, size) (op*4+size)
-
-#define O_RECOMPILE 0
-#define O_ADD 1
-#define O_ADDX 2
-#define O_AND 3
-#define O_BAND 4
-#define O_BRA 5
-#define O_BRN 6
-#define O_BHI 7
-#define O_BLS 8
-#define O_BCC 9
-#define O_BCS 10
-#define O_BNE 11
-#define O_BVC 12
-#define O_BVS 13
-#define O_BPL 14
-#define O_BMI 15
-#define O_BGE 16
-#define O_BLT 17
-#define O_BGT 18
-#define O_BLE 19
-#define O_ANDC 20
-#define O_BEQ 21
-#define O_BCLR 22
-#define O_BIAND 23
-#define O_BILD 24
-#define O_BIOR 25
-#define O_BIXOR 26
-#define O_BIST 27
-#define O_BLD 28
-#define O_BNOT 29
-#define O_BSET 30
-#define O_BSR 31
-#define O_BXOR 32
-#define O_CMP 33
-#define O_DAA 34
-#define O_DAS 35
-#define O_DEC 36
-#define O_DIVU 37
-#define O_DIVS 38
-#define O_INC 39
-#define O_LDC 40
-#define O_MOV_TO_MEM 41
-#define O_OR 42
-#define O_ROTL 43
-#define O_ROTR 44
-#define O_ROTXL 45
-#define O_ROTXR 46
-#define O_BPT 47
-#define O_SHAL 48
-#define O_SHAR 49
-#define O_SHLL 50
-#define O_SHLR 51
-#define O_SUB 52
-#define O_SUBS 53
-#define O_TRAPA 54
-#define O_XOR 55
-#define O_XORC 56
-#define O_BOR 57
-#define O_BST 58
-#define O_BTST 59
-#define O_EEPMOV 60
-#define O_EXTS 61
-#define O_EXTU 62
-#define O_JMP 63
-#define O_JSR 64
-#define O_MULU 65
-#define O_MULS 66
-#define O_NOP 67
-#define O_NOT 68
-#define O_ORC 69
-#define O_RTE 70
-#define O_STC 71
-#define O_SUBX 72
-#define O_NEG 73
-#define O_RTS 74
-#define O_SLEEP 75
-#define O_ILL 76
-#define O_ADDS 77
-#define O_SYSCALL 78
-#define O_MOV_TO_REG 79
-#define O_LAST 80
-#define SB 0
-#define SW 1
-#define SL 2
-
-
-/* FIXME: Lots of insns have "E, 0, 0, 0, 0" in the nibble code sequences.
- Methinks the zeroes aren't necessary. Once confirmed, nuke 'em. */
-
-struct h8_opcode h8_opcodes[] =
-{
- TWOOP(O(O_ADD,SB),"add.b", 0x8, 0x0,0x8),
-
- NEW_SOP(O(O_ADD,SW),1,2,"add.w"),{RS16,RD16,E },{0x0,0x9,RS16,RD16,E} EOP,
- NEW_SOP(O(O_ADD,SW),0,4,"add.w"),{IMM16,RD16,E },{0x7,0x9,0x1,RD16,IMM16,IGNORE,IGNORE,IGNORE,E} EOP,
- NEW_SOP(O(O_ADD,SL),0,2,"add.l"),{RS32,RD32,E }, {0x0,0xA,B31|RS32,B30|RD32,E} EOP,
- NEW_SOP(O(O_ADD,SL),0,6,"add.l"),{IMM32,RD32,E },{0x7,0xA,0x1,B30|RD32,IMM32LIST,E} EOP,
- NEW_SOP(O(O_ADDS,SL),1,2,"adds"), {KBIT,RDP,E}, {0x0,0xB,KBIT,RDP,E,0,0,0,0} EOP,
-
- TWOOP(O(O_ADDX,SB),"addx",0x9,0x0,0xE),
- TWOOP(O(O_AND,SB), "and.b",0xE,0x1,0x6),
-
- NEW_SOP(O(O_AND,SW),0,2,"and.w"),{RS16,RD16,E },{0x6,0x6,RS16,RD16,E} EOP,
- NEW_SOP(O(O_AND,SW),0,4,"and.w"),{IMM16,RD16,E },{0x7,0x9,0x6,RD16,IMM16,IGNORE,IGNORE,IGNORE,E} EOP,
-
- NEW_SOP(O(O_AND,SL),0,6,"and.l"),{IMM32,RD32,E },{0x7,0xA,0x6,B30|RD32,IMM32LIST,E} EOP,
- NEW_SOP(O(O_AND,SL),0,2,"and.l") ,{RS32,RD32,E },{0x0,0x1,0xF,0x0,0x6,0x6,B30|RS32,B30|RD32,E} EOP,
-
- NEW_SOP(O(O_ANDC,SB),1,2,"andc"), {IMM8,CCR,E},{ 0x0,0x6,IMM8,IGNORE,E,0,0,0,0} EOP,
-
- BITOP(O(O_BAND,SB), IMM3,"band",0x7,0x6,0x7,0xC,0x7,0xE),
- BRANCH(O(O_BRA,SB),"bra",0x0),
- BRANCH(O(O_BRA,SB),"bt",0x0),
- BRANCH(O(O_BRN,SB),"brn",0x1),
- BRANCH(O(O_BRN,SB),"bf",0x1),
- BRANCH(O(O_BHI,SB),"bhi",0x2),
- BRANCH(O(O_BLS,SB),"bls",0x3),
- BRANCH(O(O_BCC,SB),"bcc",0x4),
- BRANCH(O(O_BCC,SB),"bhs",0x4),
- BRANCH(O(O_BCS,SB),"bcs",0x5),
- BRANCH(O(O_BCS,SB),"blo",0x5),
- BRANCH(O(O_BNE,SB),"bne",0x6),
- BRANCH(O(O_BEQ,SB),"beq",0x7),
- BRANCH(O(O_BVC,SB),"bvc",0x8),
- BRANCH(O(O_BVS,SB),"bvs",0x9),
- BRANCH(O(O_BPL,SB),"bpl",0xA),
- BRANCH(O(O_BMI,SB),"bmi",0xB),
- BRANCH(O(O_BGE,SB),"bge",0xC),
- BRANCH(O(O_BLT,SB),"blt",0xD),
- BRANCH(O(O_BGT,SB),"bgt",0xE),
- BRANCH(O(O_BLE,SB),"ble",0xF),
-
- EBITOP(O(O_BCLR,SB),IMM3, "bclr", 0x6,0x2,0x7,0xD,0x7,0xF),
- BITOP(O(O_BIAND,SB),IMM3|B31,"biand",0x7,0x6,0x7,0xC,0x7,0xE),
- BITOP(O(O_BILD,SB), IMM3|B31,"bild", 0x7,0x7,0x7,0xC,0x7,0xE),
- BITOP(O(O_BIOR,SB), IMM3|B31,"bior", 0x7,0x4,0x7,0xC,0x7,0xE),
- BITOP(O(O_BIST,SB), IMM3|B31,"bist", 0x6,0x7,0x7,0xD,0x7,0xF),
- BITOP(O(O_BIXOR,SB),IMM3|B31,"bixor",0x7,0x5,0x7,0xC,0x7,0xE),
- BITOP(O(O_BLD,SB), IMM3|B30,"bld", 0x7,0x7,0x7,0xC,0x7,0xE),
- EBITOP(O(O_BNOT,SB),IMM3|B30,"bnot", 0x6,0x1,0x7,0xD,0x7,0xF),
- BITOP(O(O_BOR,SB), IMM3|B30,"bor", 0x7,0x4,0x7,0xC,0x7,0xE),
- EBITOP(O(O_BSET,SB),IMM3|B30,"bset", 0x6,0x0,0x7,0xD,0x7,0xF),
-
- SOP(O(O_BSR,SB),6,"bsr"),{DISP8,E,0},{ 0x5,0x5,DISP8,IGNORE,E,0,0,0,0} EOP,
- SOP(O(O_BSR,SB),6,"bsr"),{DISP16,E,0},{ 0x5,0xC,0x0,0x0,DISP16,IGNORE,IGNORE,IGNORE,E,0,0,0,0} EOP,
- BITOP(O(O_BST,SB), IMM3|B30,"bst",0x6,0x7,0x7,0xD,0x7,0xF),
- EBITOP(O(O_BTST,SB), IMM3|B30,"btst",0x6,0x3,0x7,0xC,0x7,0xE),
- BITOP(O(O_BXOR,SB), IMM3|B30,"bxor",0x7,0x5,0x7,0xC,0x7,0xE),
-
- TWOOP(O(O_CMP,SB), "cmp.b",0xA,0x1,0xC),
- WTWOP(O(O_CMP,SW), "cmp.w",0x1,0xD),
-
- NEW_SOP(O(O_CMP,SW),1,2,"cmp.w"),{RS16,RD16,E },{0x1,0xD,RS16,RD16,E} EOP,
- NEW_SOP(O(O_CMP,SW),0,4,"cmp.w"),{IMM16,RD16,E },{0x7,0x9,0x2,RD16,IMM16,IGNORE,IGNORE,IGNORE,E} EOP,
-
- NEW_SOP(O(O_CMP,SL),0,6,"cmp.l"),{IMM32,RD32,E },{0x7,0xA,0x2,B30|RD32,IMM32LIST,E} EOP,
- NEW_SOP(O(O_CMP,SL),0,2,"cmp.l") ,{RS32,RD32,E },{0x1,0xF,B31|RS32,B30|RD32,E} EOP,
-
- UNOP(O(O_DAA,SB), "daa",0x0,0xF),
- UNOP(O(O_DAS,SB), "das",0x1,0xF),
- UNOP(O(O_DEC,SB), "dec.b",0x1,0xA),
-
- NEW_SOP(O(O_DEC, SW),0,2,"dec.w") ,{DBIT,RD16,E },{0x1,0xB,0x5|DBIT,RD16,E} EOP,
- NEW_SOP(O(O_DEC, SL),0,2,"dec.l") ,{DBIT,RD32,E },{0x1,0xB,0x7|DBIT,RD32|B30,E} EOP,
-
- NEW_SOP(O(O_DIVU,SB),1,6,"divxu.b"), {RS8,RD16,E}, {0x5,0x1,RS8,RD16,E,0,0,0,0}EOP,
- NEW_SOP(O(O_DIVU,SW),0,20,"divxu.w"),{RS16,RD32,E},{0x5,0x3,RS16,B30|RD32,E}EOP,
-
- NEW_SOP(O(O_DIVS,SB),0,20,"divxs.b") ,{RS8,RD16,E },{0x0,0x1,0xD,0x0,0x5,0x1,RS8,RD16,E} EOP,
- NEW_SOP(O(O_DIVS,SW),0,02,"divxs.w") ,{RS16,RD32,E },{0x0,0x1,0xD,0x0,0x5,0x3,RS16,B30|RD32,E} EOP,
-
- NEW_SOP(O(O_EEPMOV,SB),1,50,"eepmov"),{ E,0,0},{0x7,0xB,0x5,0xC,0x5,0x9,0x8,0xF,E}EOP,
- NEW_SOP(O(O_EEPMOV,SW),0,50,"eepmovw"),{E,0,0},{0x7,0xB,0xD,0x4,0x5,0x9,0x8,0xF,E} EOP,
-
- NEW_SOP(O(O_EXTS,SW),0,2,"exts.w"),{OR16,E,0},{0x1,0x7,0xD,OR16,E }EOP,
- NEW_SOP(O(O_EXTS,SL),0,2,"exts.l"),{OR32,E,0},{0x1,0x7,0xF,OR32|B30,E }EOP,
-
- NEW_SOP(O(O_EXTU,SW),0,2,"extu.w"),{OR16,E,0},{0x1,0x7,0x5,OR16,E }EOP,
- NEW_SOP(O(O_EXTU,SL),0,2,"extu.l"),{OR32,E,0},{0x1,0x7,0x7,OR32|B30,E }EOP,
-
- UNOP(O(O_INC,SB), "inc",0x0,0xA),
-
- NEW_SOP(O(O_INC,SW),0,2,"inc.w") ,{DBIT,RD16,E },{0x0,0xB,0x5|DBIT,RD16,E} EOP,
- NEW_SOP(O(O_INC,SL),0,2,"inc.l") ,{DBIT,RD32,E },{0x0,0xB,0x7|DBIT,RD32|B30,E} EOP,
-
- SOP(O(O_JMP,SB),4,"jmp"),{RSIND,E,0},{0x5,0x9,B30|RSIND,0x0,E,0,0,0,0}EOP,
- SOP(O(O_JMP,SB),6,"jmp"),{SRC|ABSJMP,E,0},{0x5,0xA,SRC|ABSJMP,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,E}EOP,
- SOP(O(O_JMP,SB),8,"jmp"),{SRC|MEMIND,E,0},{0x5,0xB,SRC|MEMIND,IGNORE,E,0,0,0,0}EOP,
-
- SOP(O(O_JSR,SB),6,"jsr"),{SRC|RSIND,E,0}, {0x5,0xD,B30|RSIND,0x0,E,0,0,0,0}EOP,
- SOP(O(O_JSR,SB),8,"jsr"),{SRC|ABSJMP,E,0},{0x5,0xE,SRC|ABSJMP,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,E}EOP,
- SOP(O(O_JSR,SB),8,"jsr"),{SRC|MEMIND,E,0},{0x5,0xF,SRC|MEMIND,IGNORE,E,0,0,0,0}EOP,
-
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{IMM8,CCR,E}, { 0x0,0x7,IMM8,IGNORE,E,0,0,0,0}EOP,
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{OR8,CCR,E}, { 0x0,0x3,0x0,OR8,E,0,0,0,0}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{ABS16SRC,CCR,E}, {PREFIXLDC,0x6,0xB,0x0,0x0,ABS16SRC,IGNORE,IGNORE,IGNORE,E}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{ABS24SRC,CCR,E}, {PREFIXLDC,0x6,0xB,0x2,0x0,0x0,0x0,SRC|ABS24LIST,E}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{DISP|SRC|L_16,CCR,E},{PREFIXLDC,0x6,0x9,B30|DISPREG,0,DISP|L_16,IGNORE,IGNORE,IGNORE,E}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{DISP|SRC|L_24,CCR,E},{PREFIXLDC,0x7,0x8,B30|DISPREG,0,0x6,0xB,0x2,0x0,0x0,0x0,SRC|DISP24LIST,E}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{RSINC,CCR,E}, {PREFIXLDC,0x6,0xD,B30|RSINC,0x0,E}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{RSIND,CCR,E}, {PREFIXLDC,0x6,0x9,B30|RDIND,0x0,E} EOP,
-
-
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{ABSMOV|ABS|SRC|L_16,RD8,E}, { 0x6,0xA,0x0,RD8,ABSMOV|SRC|ABS|A16LIST,E}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{ABSMOV|ABS|SRC|L_24,RD8,E }, { 0x6,0xA,0x2,RD8,0x0,0x0,SRC|ABSMOV|ABS|A24LIST,E }EOP,
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{RS8,ABSMOV|ABS|L_16|DST,E}, { 0x6,0xA,0x8,RS8,ABSMOV|DST|ABS|A16LIST,E}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{RS8,ABSMOV|ABS|DST|L_24,E }, { 0x6,0xA,0xA,RS8,0x0,0x0,DST|ABSMOV|ABS|A24LIST,E }EOP,
-
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{DISP|L_24|SRC,RD8,E}, { 0x7,0x8,B30|DISPREG,0x0,0x6,0xA,0x2,RD8,0x0,0x0,SRC|DISP24LIST,E}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{RS8,DISP|L_24|DST,E}, { 0x7,0x8,B30|DISPREG,0x0,0x6,0xA,0xA,RS8,0x0,0x0,DST|DISP24LIST,E}EOP,
-
-
-
- SOP(O(O_MOV_TO_REG,SB),2,"mov.b"),{RS8,RD8,E}, { 0x0,0xC,RS8,RD8,E,0,0,0,0}EOP,
- SOP(O(O_MOV_TO_REG,SB),2,"mov.b"),{IMM8,RD8,E}, { 0xF,RD8,IMM8,IGNORE,E,0,0,0,0}EOP,
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{RSIND,RD8,E}, { 0x6,0x8,B30|RSIND,RD8,E,0,0,0,0}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{DISP16SRC,RD8,E}, { 0x6,0xE,B30|DISPREG,RD8,DISP16SRC,IGNORE,IGNORE,IGNORE,E}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{RSINC,RD8,E}, { 0x6,0xC,B30|RSINC,RD8,E,0,0,0,0}EOP,
-
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{ABS8SRC,RD8,E}, { 0x2,RD8,ABS8SRC,IGNORE,E,0,0,0,0}EOP,
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{RS8,RDIND,E}, { 0x6,0x8,RDIND|B31,RS8,E,0,0,0,0}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{RS8,DISP16DST,E}, { 0x6,0xE,DISPREG|B31,RS8,DISP16DST,IGNORE,IGNORE,IGNORE,E}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{RS8,RDDEC|B31,E}, { 0x6,0xC,RDDEC|B31,RS8,E,0,0,0,0}EOP,
-
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{RS8,ABS8DST,E}, { 0x3,RS8,ABS8DST,IGNORE,E,0,0,0,0}EOP,
-
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{RS16,RDIND,E}, { 0x6,0x9,RDIND|B31,RS16,E,0,0,0,0}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{DISP|L_24|SRC,RD16,E},{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0x2,RD16,0x0,0x0,SRC|DISP24LIST,E}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{RS16,DISP|L_24|DST,E},{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0xA,RS16,0x0,0x0,DST|DISP24LIST,E}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{ABS|L_24|SRC,RD16,E },{ 0x6,0xB,0x2,RD16,0x0,0x0,SRC|ABS24LIST,E }EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{RS16,ABS|L_24|DST,E },{ 0x6,0xB,0xA,RS16,0x0,0x0,DST|ABS24LIST,E }EOP,
- SOP(O(O_MOV_TO_REG,SW),2,"mov.w"),{RS16,RD16,E}, { 0x0,0xD,RS16, RD16,E,0,0,0,0}EOP,
- SOP(O(O_MOV_TO_REG,SW),4,"mov.w"),{IMM16,RD16,E}, { 0x7,0x9,0x0,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}EOP,
- SOP(O(O_MOV_TO_REG,SW),4,"mov.w"),{RSIND,RD16,E}, { 0x6,0x9,B30|RSIND,RD16,E,0,0,0,0}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{DISP16SRC,RD16,E}, { 0x6,0xF,B30|DISPREG,RD16,DISP16SRC,IGNORE,IGNORE,IGNORE,E}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{RSINC,RD16,E}, { 0x6,0xD,B30|RSINC,RD16,E,0,0,0,0}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{ABS16SRC,RD16,E}, { 0x6,0xB,0x0,RD16,ABS16SRC,IGNORE,IGNORE,IGNORE,E}EOP,
-
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{RS16,DISP16DST,E}, { 0x6,0xF,DISPREG|B31,RS16,DISP16DST,IGNORE,IGNORE,IGNORE,E}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{RS16,RDDEC,E}, { 0x6,0xD,RDDEC|B31,RS16,E,0,0,0,0}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{RS16,ABS16DST,E}, { 0x6,0xB,0x8,RS16,ABS16DST,IGNORE,IGNORE,IGNORE,E}EOP,
-
- SOP(O(O_MOV_TO_REG,SL),4,"mov.l"),{IMM32,RD32,E}, { 0x7,0xA,0x0,B30|RD32,IMM32LIST,E}EOP,
- SOP(O(O_MOV_TO_REG,SL),2,"mov.l"),{RS32,RD32,E}, { 0x0,0xF,B31|RS32,B30|RD32,E,0,0,0,0}EOP,
-
- SOP(O(O_MOV_TO_REG,SL),4,"mov.l"),{RSIND,RD32,E}, { PREFIX32,0x6,0x9,RSIND|B30,B30|RD32,E,0,0,0,0 }EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{DISP16SRC,RD32,E}, { PREFIX32,0x6,0xF,DISPREG|B30,B30|RD32,DISP16SRC,IGNORE,IGNORE,IGNORE,E }EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{DISP|L_24|SRC,RD32,E},{ PREFIX32,0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0x2,B30|RD32,0x0,0x0,SRC|DISP24LIST,E }EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{RSINC,RD32,E}, { PREFIX32,0x6,0xD,B30|RSINC,B30|RD32,E,0,0,0,0 }EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{ABS16SRC,RD32,E}, { PREFIX32,0x6,0xB,0x0,B30|RD32,ABS16SRC,IGNORE,IGNORE,IGNORE,E }EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{ABS24SRC,RD32,E }, { PREFIX32,0x6,0xB,0x2,B30|RD32,0x0,0x0,SRC|ABS24LIST,E }EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{RS32,RDIND,E}, { PREFIX32,0x6,0x9,RDIND|B31,B30|RS32,E,0,0,0,0 }EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{RS32,DISP16DST,E}, { PREFIX32,0x6,0xF,DISPREG|B31,B30|RS32,DISP16DST,IGNORE,IGNORE,IGNORE,E }EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{RS32,DISP|L_24|DST,E},{ PREFIX32,0x7,0x8,B31|DISPREG,0x0,0x6,0xB,0xA,B30|RS32,0x0,0x0,DST|DISP24LIST,E }EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{RS32,RDDEC,E}, { PREFIX32,0x6,0xD,RDDEC|B31,B30|RS32,E,0,0,0,0 }EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{RS32,ABS16DST,E}, { PREFIX32,0x6,0xB,0x8,B30|RS32,ABS16DST,IGNORE,IGNORE,IGNORE,E }EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{RS32,ABS24DST,E }, { PREFIX32,0x6,0xB,0xA,B30|RS32,0x0,0x0,DST|ABS24LIST,E }EOP,
-
- SOP(O(O_MOV_TO_REG,SB),10,"movfpe"),{ABS16SRC,RD8,E},{ 0x6,0xA,0x4,RD8,ABS16SRC,IGNORE,IGNORE,IGNORE,E}EOP,
- SOP(O(O_MOV_TO_MEM,SB),10,"movtpe"),{RS8,ABS16DST,E},{ 0x6,0xA,0xC,RS8,ABS16DST,IGNORE,IGNORE,IGNORE,E}EOP,
-
- NEW_SOP(O(O_MULU,SB),1,14,"mulxu.b"),{RS8,RD16,E}, { 0x5,0x0,RS8,RD16,E,0,0,0,0}EOP,
- NEW_SOP(O(O_MULU,SW),0,14,"mulxu.w"),{RS16,RD32,E},{ 0x5,0x2,RS16,B30|RD32,E,0,0,0,0}EOP,
-
- NEW_SOP(O(O_MULS,SB),0,20,"mulxs.b"),{RS8,RD16,E}, { 0x0,0x1,0xc,0x0,0x5,0x0,RS8,RD16,E}EOP,
- NEW_SOP(O(O_MULS,SW),0,20,"mulxs.w"),{RS16,RD32,E},{ 0x0,0x1,0xc,0x0,0x5,0x2,RS16,B30|RD32,E}EOP,
-
- /* ??? This can use UNOP3. */
- NEW_SOP(O(O_NEG,SB),1,2,"neg.b"),{ OR8,E, 0},{ 0x1,0x7,0x8,OR8,E,0,0,0,0}EOP,
- NEW_SOP(O(O_NEG,SW),0,2,"neg.w"),{ OR16,E,0},{ 0x1,0x7,0x9,OR16,E}EOP,
- NEW_SOP(O(O_NEG,SL),0,2,"neg.l"),{ OR32,E,0},{ 0x1,0x7,0xB,B30|OR32,E}EOP,
-
- NEW_SOP(O(O_NOP,SB),1,2,"nop"),{E,0,0},{ 0x0,0x0,0x0,0x0,E,0,0,0,0}EOP,
-
- /* ??? This can use UNOP3. */
- NEW_SOP(O(O_NOT,SB),1,2,"not.b"),{ OR8,E, 0},{ 0x1,0x7,0x0,OR8,E,0,0,0,0}EOP,
- NEW_SOP(O(O_NOT,SW),0,2,"not.w"),{ OR16,E,0},{ 0x1,0x7,0x1,OR16,E}EOP,
- NEW_SOP(O(O_NOT,SL),0,2,"not.l"),{ OR32,E,0},{ 0x1,0x7,0x3,B30|OR32,E}EOP,
-
- TWOOP(O(O_OR, SB),"or.b",0xC,0x1,0x4),
- NEW_SOP(O(O_OR,SW),0,4,"or.w"),{IMM16,RD16,E },{0x7,0x9,0x4,RD16,IMM16,IGNORE,IGNORE,IGNORE,E} EOP,
- NEW_SOP(O(O_OR,SW),0,2,"or.w"),{RS16,RD16,E },{0x6,0x4,RS16,RD16,E} EOP,
-
- NEW_SOP(O(O_OR,SL),0,6,"or.l"),{IMM32,RD32,E },{0x7,0xA,0x4,B30|RD32,IMM32LIST,E} EOP,
- NEW_SOP(O(O_OR,SL),0,2,"or.l"),{RS32,RD32,E },{0x0,0x1,0xF,0x0,0x6,0x4,B30|RS32,B30|RD32,E} EOP,
-
- NEW_SOP(O(O_ORC,SB),1,2,"orc"),{IMM8,CCR,E},{ 0x0,0x4,IMM8,IGNORE,E,0,0,0,0}EOP,
-
- NEW_SOP(O(O_MOV_TO_REG,SW),1,6,"pop.w"),{OR16,E,0},{ 0x6,0xD,0x7,OR16,E,0,0,0,0}EOP,
- NEW_SOP(O(O_MOV_TO_REG,SL),0,6,"pop.l"),{OR32,E,0},{ PREFIX32,0x6,0xD,0x7,OR32|B30,E,0,0,0,0}EOP,
- NEW_SOP(O(O_MOV_TO_MEM,SW),1,6,"push.w"),{OR16,E,0},{ 0x6,0xD,0xF,OR16,E,0,0,0,0}EOP,
- NEW_SOP(O(O_MOV_TO_MEM,SL),0,6,"push.l"),{OR32,E,0},{ PREFIX32,0x6,0xD,0xF,OR32|B30,E,0,0,0,0}EOP,
-
- UNOP3(O_ROTL, "rotl", 0x1,0x2,0x8),
- UNOP3(O_ROTR, "rotr", 0x1,0x3,0x8),
- UNOP3(O_ROTXL, "rotxl",0x1,0x2,0x0),
- UNOP3(O_ROTXR, "rotxr",0x1,0x3,0x0),
-
- SOP(O(O_BPT,SB), 10,"bpt"),{E,0,0},{ 0x7,0xA,0xF,0xF,E,0,0,0,0}EOP,
- SOP(O(O_RTE,SB), 10,"rte"),{E,0,0},{ 0x5,0x6,0x7,0x0,E,0,0,0,0}EOP,
- SOP(O(O_RTS,SB), 8,"rts"),{E,0,0},{ 0x5,0x4,0x7,0x0,E,0,0,0,0}EOP,
-
- UNOP3(O_SHAL, "shal",0x1,0x0,0x8),
- UNOP3(O_SHAR, "shar",0x1,0x1,0x8),
- UNOP3(O_SHLL, "shll",0x1,0x0,0x0),
- UNOP3(O_SHLR, "shlr",0x1,0x1,0x0),
-
- SOP(O(O_SLEEP,SB),2,"sleep"),{E,0,0},{ 0x0,0x1,0x8,0x0,E,0,0,0,0} EOP,
-
- NEW_SOP(O(O_STC,SB), 1,2,"stc"),{CCR,RD8,E},{ 0x0,0x2,0x0,RD8,E,0,0,0,0} EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{CCR,RSIND,E}, {PREFIXLDC,0x6,0x9,B31|RDIND,0x0,E} EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{CCR,DISP|DST|L_16,E},{PREFIXLDC,0x6,0x9,B31|DISPREG,0,DST|DISP|L_16,IGNORE,IGNORE,IGNORE,E}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{CCR,DISP|DST|L_24,E},{PREFIXLDC,0x7,0x8,B31|DISPREG,0,0x6,0xB,0x2,0x0,0x0,0x0,DST|DISP24LIST,E}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{CCR,RDDEC,E}, {PREFIXLDC,0x6,0xD,B31|RDDEC,0x0,E}EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{CCR,ABS16SRC,E}, {PREFIXLDC,0x6,0xB,0x8,0x0,ABS16DST,IGNORE,IGNORE,IGNORE,E}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{CCR,ABS24SRC,E}, {PREFIXLDC,0x6,0xB,0xA,0x0,0x0,0x0,DST|ABS24LIST,E}EOP,
-
- SOP(O(O_SUB,SB),2,"sub.b"),{RS8,RD8,E},{ 0x1,0x8,RS8,RD8,E,0,0,0,0}EOP,
-
- NEW_SOP(O(O_SUB,SW),1,2,"sub.w"),{RS16,RD16,E }, {0x1,0x9,RS16,RD16,E} EOP,
- NEW_SOP(O(O_SUB,SW),0,4,"sub.w"),{IMM16,RD16,E }, {0x7,0x9,0x3,RD16,IMM16,IGNORE,IGNORE,IGNORE,E} EOP,
- NEW_SOP(O(O_SUB,SL),0,2,"sub.l") ,{RS32,RD32,E }, {0x1,0xA,B31|RS32,B30|RD32,E} EOP,
- NEW_SOP(O(O_SUB,SL),0,6,"sub.l"), {IMM32,RD32,E },{0x7,0xA,0x3,B30|RD32,IMM32LIST,E} EOP,
-
- SOP(O(O_SUBS,SL),2,"subs"),{KBIT,RDP,E},{ 0x1,0xB,KBIT,RDP,E,0,0,0,0}EOP,
- TWOOP(O(O_SUBX,SB),"subx",0xB,0x1,0xE),
-
- NEW_SOP(O(O_TRAPA,SB),0,2,"trapa"),{ IMM2,E}, {0x5,0x7,IMM2,IGNORE,E }EOP,
-
- TWOOP(O(O_XOR, SB),"xor",0xD,0x1,0x5),
-
- NEW_SOP(O(O_XOR,SW),0,4,"xor.w"),{IMM16,RD16,E },{0x7,0x9,0x5,RD16,IMM16,IGNORE,IGNORE,IGNORE,E} EOP,
- NEW_SOP(O(O_XOR,SW),0,2,"xor.w"),{RS16,RD16,E },{0x6,0x5,RS16,RD16,E} EOP,
-
- NEW_SOP(O(O_XOR,SL),0,6,"xor.l"),{IMM32,RD32,E },{0x7,0xA,0x5,B30|RD32,IMM32LIST,E} EOP,
- NEW_SOP(O(O_XOR,SL),0,2,"xor.l") ,{RS32,RD32,E },{0x0,0x1,0xF,0x0,0x6,0x5,B30|RS32,B30|RD32,E} EOP,
-
- SOP(O(O_XORC,SB),2,"xorc"),{IMM8,CCR,E},{ 0x0,0x5,IMM8,IGNORE,E,0,0,0,0}EOP,
- 0
-};
-#else
-extern struct h8_opcode h8_opcodes[] ;
-#endif
-
-
-
-
diff --git a/contrib/gdb/include/opcode/hppa.h b/contrib/gdb/include/opcode/hppa.h
deleted file mode 100644
index 6f50e6bbea62..000000000000
--- a/contrib/gdb/include/opcode/hppa.h
+++ /dev/null
@@ -1,471 +0,0 @@
-/* Table of opcodes for the PA-RISC.
- Copyright (C) 1990, 1991, 1993, 1995 Free Software Foundation, Inc.
-
- Contributed by the Center for Software Science at the
- University of Utah (pa-gdb-bugs@cs.utah.edu).
-
-This file is part of GAS, the GNU Assembler, and GDB, the GNU disassembler.
-
-GAS/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.
-
-GAS/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 GAS or GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#if !defined(__STDC__) && !defined(const)
-#define const
-#endif
-
-/*
- * Structure of an opcode table entry.
- */
-
-/* There are two kinds of delay slot nullification: normal which is
- * controled by the nullification bit, and conditional, which depends
- * on the direction of the branch and its success or failure.
- *
- * NONE is unfortunately #defined in the hiux system include files.
- * #undef it away.
- */
-#undef NONE
-struct pa_opcode
-{
- const char *name;
- unsigned long int match; /* Bits that must be set... */
- unsigned long int mask; /* ... in these bits. */
- char *args;
- enum pa_arch arch;
-};
-
-/*
- All hppa opcodes are 32 bits.
-
- The match component is a mask saying which bits must match a
- particular opcode in order for an instruction to be an instance
- of that opcode.
-
- The args component is a string containing one character
- for each operand of the instruction.
-
- Bit positions in this description follow HP usage of lsb = 31,
- "at" is lsb of field.
-
- In the args field, the following characters must match exactly:
-
- '+,() '
-
- In the args field, the following characters are unused:
-
- ' "#$% *+- ./ 3 :; = '
- ' B L [\] _'
- ' e gh lm qr { } '
-
- Here are all the characters:
-
- ' !"#$%&'()*+-,./0123456789:;<=>?@'
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'
- 'abcdefghijklmnopqrstuvwxyz{|}~'
-
-Kinds of operands:
- x integer register field at 15.
- b integer register field at 10.
- t integer register field at 31.
- y floating point register field at 31
- 5 5 bit immediate at 15.
- s 2 bit space specifier at 17.
- S 3 bit space specifier at 18.
- c indexed load completer.
- C short load and store completer.
- Y Store Bytes Short completer
- < non-negated compare/subtract conditions.
- a compare/subtract conditions
- d non-negated add conditions
- & logical instruction conditions
- U unit instruction conditions
- > shift/extract/deposit conditions.
- ~ bvb,bb conditions
- V 5 bit immediate value at 31
- i 11 bit immediate value at 31
- j 14 bit immediate value at 31
- k 21 bit immediate value at 31
- n nullification for branch instructions
- N nullification for spop and copr instructions
- w 12 bit branch displacement
- W 17 bit branch displacement (PC relative)
- z 17 bit branch displacement (just a number, not an address)
-
-Also these:
-
- p 5 bit shift count at 26 (to support the SHD instruction) encoded as
- 31-p
- P 5 bit bit position at 26
- T 5 bit field length at 31 (encoded as 32-T)
- A 13 bit immediate at 18 (to support the BREAK instruction)
- ^ like b, but describes a control register
- Z System Control Completer (to support LPA, LHA, etc.)
- D 26 bit immediate at 31 (to support the DIAG instruction)
-
- f 3 bit Special Function Unit identifier at 25
- O 20 bit Special Function Unit operation split between 15 bits at 20
- and 5 bits at 31
- o 15 bit Special Function Unit operation at 20
- 2 22 bit Special Function Unit operation split between 17 bits at 20
- and 5 bits at 31
- 1 15 bit Special Function Unit operation split between 10 bits at 20
- and 5 bits at 31
- 0 10 bit Special Function Unit operation split between 5 bits at 20
- and 5 bits at 31
- u 3 bit coprocessor unit identifier at 25
- F Source Floating Point Operand Format Completer encoded 2 bits at 20
- I Source Floating Point Operand Format Completer encoded 1 bits at 20
- (for 0xe format FP instructions)
- G Destination Floating Point Operand Format Completer encoded 2 bits at 18
- M Floating-Point Compare Conditions (encoded as 5 bits at 31)
- ? non-negated/negated compare/subtract conditions.
- @ non-negated/negated add conditions.
- ! non-negated add conditions.
-
- s 2 bit space specifier at 17.
- b register field at 10.
- r 5 bit immediate value at 31 (for the break instruction)
- (very similar to V above, except the value is unsigned instead of
- low_sign_ext)
- R 5 bit immediate value at 15 (for the ssm, rsm, probei instructions)
- (same as r above, except the value is in a different location)
- Q 5 bit immediate value at 10 (a bit position specified in
- the bb instruction. It's the same as r above, except the
- value is in a different location)
- | shift/extract/deposit conditions when used in a conditional branch
-
-And these (PJH) for PA-89 F.P. registers and instructions:
-
- v a 't' operand type extended to handle L/R register halves.
- E a 'b' operand type extended to handle L/R register halves.
- X an 'x' operand type extended to handle L/R register halves.
- J a 'b' operand type further extended to handle extra 1.1 registers
- K a 'x' operand type further extended to handle extra 1.1 registers
- 4 a variation of the 'b' operand type for 'fmpyadd' and 'fmpysub'
- 6 a variation of the 'x' operand type for 'fmpyadd' and 'fmpysub'
- 7 a variation of the 't' operand type for 'fmpyadd' and 'fmpysub'
- 8 5 bit register field at 20 (used in 'fmpyadd' and 'fmpysub')
- 9 5 bit register field at 25 (used in 'fmpyadd' and 'fmpysub')
- H Floating Point Operand Format at 26 for 'fmpyadd' and 'fmpysub'
- (very similar to 'F')
-*/
-
-/* The order of the opcodes in this table is significant:
-
- * The assembler requires that all instances of the same mnemonic must be
- consecutive. If they aren't, the assembler will bomb at runtime.
-
- * The disassembler should not care about the order of the opcodes. */
-
-static const struct pa_opcode pa_opcodes[] =
-{
-
-/* pseudo-instructions */
-
-{ "b", 0xe8000000, 0xffe0e000, "nW", pa10}, /* bl foo,r0 */
-{ "ldi", 0x34000000, 0xffe0c000, "j,x", pa10}, /* ldo val(r0),r */
-{ "comib", 0x84000000, 0xfc000000, "?n5,b,w", pa10}, /* comib{tf}*/
-{ "comb", 0x80000000, 0xfc000000, "?nx,b,w", pa10}, /* comb{tf} */
-{ "addb", 0xa0000000, 0xfc000000, "@nx,b,w", pa10}, /* addb{tf} */
-{ "addib", 0xa4000000, 0xfc000000, "@n5,b,w", pa10}, /* addib{tf}*/
-{ "nop", 0x08000240, 0xffffffff, "", pa10}, /* or 0,0,0 */
-{ "copy", 0x08000240, 0xffe0ffe0, "x,t", pa10}, /* or r,0,t */
-{ "mtsar", 0x01601840, 0xffe0ffff, "x", pa10}, /* mtctl r,cr11 */
-
-/* Loads and Stores for integer registers. */
-{ "ldw", 0x48000000, 0xfc000000, "j(s,b),x", pa10},
-{ "ldw", 0x48000000, 0xfc000000, "j(b),x", pa10},
-{ "ldh", 0x44000000, 0xfc000000, "j(s,b),x", pa10},
-{ "ldh", 0x44000000, 0xfc000000, "j(b),x", pa10},
-{ "ldb", 0x40000000, 0xfc000000, "j(s,b),x", pa10},
-{ "ldb", 0x40000000, 0xfc000000, "j(b),x", pa10},
-{ "stw", 0x68000000, 0xfc000000, "x,j(s,b)", pa10},
-{ "stw", 0x68000000, 0xfc000000, "x,j(b)", pa10},
-{ "sth", 0x64000000, 0xfc000000, "x,j(s,b)", pa10},
-{ "sth", 0x64000000, 0xfc000000, "x,j(b)", pa10},
-{ "stb", 0x60000000, 0xfc000000, "x,j(s,b)", pa10},
-{ "stb", 0x60000000, 0xfc000000, "x,j(b)", pa10},
-{ "ldwm", 0x4c000000, 0xfc000000, "j(s,b),x", pa10},
-{ "ldwm", 0x4c000000, 0xfc000000, "j(b),x", pa10},
-{ "stwm", 0x6c000000, 0xfc000000, "x,j(s,b)", pa10},
-{ "stwm", 0x6c000000, 0xfc000000, "x,j(b)", pa10},
-{ "ldwx", 0x0c000080, 0xfc001fc0, "cx(s,b),t", pa10},
-{ "ldwx", 0x0c000080, 0xfc001fc0, "cx(b),t", pa10},
-{ "ldhx", 0x0c000040, 0xfc001fc0, "cx(s,b),t", pa10},
-{ "ldhx", 0x0c000040, 0xfc001fc0, "cx(b),t", pa10},
-{ "ldbx", 0x0c000000, 0xfc001fc0, "cx(s,b),t", pa10},
-{ "ldbx", 0x0c000000, 0xfc001fc0, "cx(b),t", pa10},
-{ "ldwax", 0x0c000180, 0xfc00dfc0, "cx(b),t", pa10},
-{ "ldcwx", 0x0c0001c0, 0xfc001fc0, "cx(s,b),t", pa10},
-{ "ldcwx", 0x0c0001c0, 0xfc001fc0, "cx(b),t", pa10},
-{ "ldws", 0x0c001080, 0xfc001fc0, "C5(s,b),t", pa10},
-{ "ldws", 0x0c001080, 0xfc001fc0, "C5(b),t", pa10},
-{ "ldhs", 0x0c001040, 0xfc001fc0, "C5(s,b),t", pa10},
-{ "ldhs", 0x0c001040, 0xfc001fc0, "C5(b),t", pa10},
-{ "ldbs", 0x0c001000, 0xfc001fc0, "C5(s,b),t", pa10},
-{ "ldbs", 0x0c001000, 0xfc001fc0, "C5(b),t", pa10},
-{ "ldwas", 0x0c001180, 0xfc00dfc0, "C5(b),t", pa10},
-{ "ldcws", 0x0c0011c0, 0xfc001fc0, "C5(s,b),t", pa10},
-{ "ldcws", 0x0c0011c0, 0xfc001fc0, "C5(b),t", pa10},
-{ "stws", 0x0c001280, 0xfc001fc0, "Cx,V(s,b)", pa10},
-{ "stws", 0x0c001280, 0xfc001fc0, "Cx,V(b)", pa10},
-{ "sths", 0x0c001240, 0xfc001fc0, "Cx,V(s,b)", pa10},
-{ "sths", 0x0c001240, 0xfc001fc0, "Cx,V(b)", pa10},
-{ "stbs", 0x0c001200, 0xfc001fc0, "Cx,V(s,b)", pa10},
-{ "stbs", 0x0c001200, 0xfc001fc0, "Cx,V(b)", pa10},
-{ "stwas", 0x0c001380, 0xfc00dfc0, "Cx,V(b)", pa10},
-{ "stbys", 0x0c001300, 0xfc001fc0, "Yx,V(s,b)", pa10},
-{ "stbys", 0x0c001300, 0xfc001fc0, "Yx,V(b)", pa10},
-
-/* Immediate instructions. */
-{ "ldo", 0x34000000, 0xfc00c000, "j(b),x", pa10},
-{ "ldil", 0x20000000, 0xfc000000, "k,b", pa10},
-{ "addil", 0x28000000, 0xfc000000, "k,b", pa10},
-
-/* Branching instructions. */
-{ "bl", 0xe8000000, 0xfc00e000, "nW,b", pa10},
-{ "gate", 0xe8002000, 0xfc00e000, "nW,b", pa10},
-{ "blr", 0xe8004000, 0xfc00e001, "nx,b", pa10},
-{ "bv", 0xe800c000, 0xfc00e001, "nx(b)", pa10},
-{ "bv", 0xe800c000, 0xfc00e001, "n(b)", pa10},
-{ "be", 0xe0000000, 0xfc000000, "nz(S,b)", pa10},
-{ "ble", 0xe4000000, 0xfc000000, "nz(S,b)", pa10},
-{ "movb", 0xc8000000, 0xfc000000, "|nx,b,w", pa10},
-{ "movib", 0xcc000000, 0xfc000000, "|n5,b,w", pa10},
-{ "combt", 0x80000000, 0xfc000000, "<nx,b,w", pa10},
-{ "combf", 0x88000000, 0xfc000000, "<nx,b,w", pa10},
-{ "comibt", 0x84000000, 0xfc000000, "<n5,b,w", pa10},
-{ "comibf", 0x8c000000, 0xfc000000, "<n5,b,w", pa10},
-{ "addbt", 0xa0000000, 0xfc000000, "!nx,b,w", pa10},
-{ "addbf", 0xa8000000, 0xfc000000, "!nx,b,w", pa10},
-{ "addibt", 0xa4000000, 0xfc000000, "!n5,b,w", pa10},
-{ "addibf", 0xac000000, 0xfc000000, "!n5,b,w", pa10},
-{ "bvb", 0xc0000000, 0xffe00000, "~nx,w", pa10},
-{ "bb", 0xc4000000, 0xfc000000, "~nx,Q,w", pa10},
-
-/* Computation Instructions */
-
-{ "add", 0x08000600, 0xfc000fe0, "dx,b,t", pa10},
-{ "addl", 0x08000a00, 0xfc000fe0, "dx,b,t", pa10},
-{ "addo", 0x08000e00, 0xfc000fe0, "dx,b,t", pa10},
-{ "addc", 0x08000700, 0xfc000fe0, "dx,b,t", pa10},
-{ "addco", 0x08000f00, 0xfc000fe0, "dx,b,t", pa10},
-{ "sh1add", 0x08000640, 0xfc000fe0, "dx,b,t", pa10},
-{ "sh1addl", 0x08000a40, 0xfc000fe0, "dx,b,t", pa10},
-{ "sh1addo", 0x08000e40, 0xfc000fe0, "dx,b,t", pa10},
-{ "sh2add", 0x08000680, 0xfc000fe0, "dx,b,t", pa10},
-{ "sh2addl", 0x08000a80, 0xfc000fe0, "dx,b,t", pa10},
-{ "sh2addo", 0x08000e80, 0xfc000fe0, "dx,b,t", pa10},
-{ "sh3add", 0x080006c0, 0xfc000fe0, "dx,b,t", pa10},
-{ "sh3addl", 0x08000ac0, 0xfc000fe0, "dx,b,t", pa10},
-{ "sh3addo", 0x08000ec0, 0xfc000fe0, "dx,b,t", pa10},
-{ "sub", 0x08000400, 0xfc000fe0, "ax,b,t", pa10},
-{ "subo", 0x08000c00, 0xfc000fe0, "ax,b,t", pa10},
-{ "subb", 0x08000500, 0xfc000fe0, "ax,b,t", pa10},
-{ "subbo", 0x08000d00, 0xfc000fe0, "ax,b,t", pa10},
-{ "subt", 0x080004c0, 0xfc000fe0, "ax,b,t", pa10},
-{ "subto", 0x08000cc0, 0xfc000fe0, "ax,b,t", pa10},
-{ "ds", 0x08000440, 0xfc000fe0, "ax,b,t", pa10},
-{ "comclr", 0x08000880, 0xfc000fe0, "ax,b,t", pa10},
-{ "or", 0x08000240, 0xfc000fe0, "&x,b,t", pa10},
-{ "xor", 0x08000280, 0xfc000fe0, "&x,b,t", pa10},
-{ "and", 0x08000200, 0xfc000fe0, "&x,b,t", pa10},
-{ "andcm", 0x08000000, 0xfc000fe0, "&x,b,t", pa10},
-{ "uxor", 0x08000380, 0xfc000fe0, "Ux,b,t", pa10},
-{ "uaddcm", 0x08000980, 0xfc000fe0, "Ux,b,t", pa10},
-{ "uaddcmt", 0x080009c0, 0xfc000fe0, "Ux,b,t", pa10},
-{ "dcor", 0x08000b80, 0xfc1f0fe0, "Ub,t", pa10},
-{ "idcor", 0x08000bc0, 0xfc1f0fe0, "Ub,t", pa10},
-{ "addi", 0xb4000000, 0xfc000800, "di,b,x", pa10},
-{ "addio", 0xb4000800, 0xfc000800, "di,b,x", pa10},
-{ "addit", 0xb0000000, 0xfc000800, "di,b,x", pa10},
-{ "addito", 0xb0000800, 0xfc000800, "di,b,x", pa10},
-{ "subi", 0x94000000, 0xfc000800, "ai,b,x", pa10},
-{ "subio", 0x94000800, 0xfc000800, "ai,b,x", pa10},
-{ "comiclr", 0x90000000, 0xfc000800, "ai,b,x", pa10},
-
-/* Extract and Deposit Instructions */
-
-{ "vshd", 0xd0000000, 0xfc001fe0, ">x,b,t", pa10},
-{ "shd", 0xd0000800, 0xfc001c00, ">x,b,p,t", pa10},
-{ "vextru", 0xd0001000, 0xfc001fe0, ">b,T,x", pa10},
-{ "vextrs", 0xd0001400, 0xfc001fe0, ">b,T,x", pa10},
-{ "extru", 0xd0001800, 0xfc001c00, ">b,P,T,x", pa10},
-{ "extrs", 0xd0001c00, 0xfc001c00, ">b,P,T,x", pa10},
-{ "zvdep", 0xd4000000, 0xfc001fe0, ">x,T,b", pa10},
-{ "vdep", 0xd4000400, 0xfc001fe0, ">x,T,b", pa10},
-{ "zdep", 0xd4000800, 0xfc001c00, ">x,p,T,b", pa10},
-{ "dep", 0xd4000c00, 0xfc001c00, ">x,p,T,b", pa10},
-{ "zvdepi", 0xd4001000, 0xfc001fe0, ">5,T,b", pa10},
-{ "vdepi", 0xd4001400, 0xfc001fe0, ">5,T,b", pa10},
-{ "zdepi", 0xd4001800, 0xfc001c00, ">5,p,T,b", pa10},
-{ "depi", 0xd4001c00, 0xfc001c00, ">5,p,T,b", pa10},
-
-/* System Control Instructions */
-
-{ "break", 0x00000000, 0xfc001fe0, "r,A", pa10},
-{ "rfi", 0x00000c00, 0xffffffff, "", pa10},
-{ "rfir", 0x00000ca0, 0xffffffff, "", pa11},
-{ "ssm", 0x00000d60, 0xffe0ffe0, "R,t", pa10},
-{ "rsm", 0x00000e60, 0xffe0ffe0, "R,t", pa10},
-{ "mtsm", 0x00001860, 0xffe0ffff, "x", pa10},
-{ "ldsid", 0x000010a0, 0xfc1f3fe0, "(s,b),t", pa10},
-{ "ldsid", 0x000010a0, 0xfc1f3fe0, "(b),t", pa10},
-{ "mtsp", 0x00001820, 0xffe01fff, "x,S", pa10},
-{ "mtctl", 0x00001840, 0xfc00ffff, "x,^", pa10},
-{ "mfsp", 0x000004a0, 0xffff1fe0, "S,t", pa10},
-{ "mfctl", 0x000008a0, 0xfc1fffe0, "^,t", pa10},
-{ "sync", 0x00000400, 0xffffffff, "", pa10},
-{ "syncdma", 0x00100400, 0xffffffff, "", pa10},
-{ "prober", 0x04001180, 0xfc003fe0, "(s,b),x,t", pa10},
-{ "prober", 0x04001180, 0xfc003fe0, "(b),x,t", pa10},
-{ "proberi", 0x04003180, 0xfc003fe0, "(s,b),R,t", pa10},
-{ "proberi", 0x04003180, 0xfc003fe0, "(b),R,t", pa10},
-{ "probew", 0x040011c0, 0xfc003fe0, "(s,b),x,t", pa10},
-{ "probew", 0x040011c0, 0xfc003fe0, "(b),x,t", pa10},
-{ "probewi", 0x040031c0, 0xfc003fe0, "(s,b),R,t", pa10},
-{ "probewi", 0x040031c0, 0xfc003fe0, "(b),R,t", pa10},
-{ "lpa", 0x04001340, 0xfc003fc0, "Zx(s,b),t", pa10},
-{ "lpa", 0x04001340, 0xfc003fc0, "Zx(b),t", pa10},
-{ "lha", 0x04001300, 0xfc003fc0, "Zx(s,b),t", pa10},
-{ "lha", 0x04001300, 0xfc003fc0, "Zx(b),t", pa10},
-{ "lci", 0x04001300, 0xfc003fe0, "x(s,b),t", pa10},
-{ "lci", 0x04001300, 0xfc003fe0, "x(b),t", pa10},
-{ "pdtlb", 0x04001200, 0xfc003fdf, "Zx(s,b)", pa10},
-{ "pdtlb", 0x04001200, 0xfc003fdf, "Zx(b)", pa10},
-{ "pitlb", 0x04000200, 0xfc003fdf, "Zx(s,b)", pa10},
-{ "pitlb", 0x04000200, 0xfc003fdf, "Zx(b)", pa10},
-{ "pdtlbe", 0x04001240, 0xfc003fdf, "Zx(s,b)", pa10},
-{ "pdtlbe", 0x04001240, 0xfc003fdf, "Zx(b)", pa10},
-{ "pitlbe", 0x04000240, 0xfc003fdf, "Zx(s,b)", pa10},
-{ "pitlbe", 0x04000240, 0xfc003fdf, "Zx(b)", pa10},
-{ "idtlba", 0x04001040, 0xfc003fff, "x,(s,b)", pa10},
-{ "idtlba", 0x04001040, 0xfc003fff, "x,(b)", pa10},
-{ "iitlba", 0x04000040, 0xfc003fff, "x,(s,b)", pa10},
-{ "iitlba", 0x04000040, 0xfc003fff, "x,(b)", pa10},
-{ "idtlbp", 0x04001000, 0xfc003fff, "x,(s,b)", pa10},
-{ "idtlbp", 0x04001000, 0xfc003fff, "x,(b)", pa10},
-{ "iitlbp", 0x04000000, 0xfc003fff, "x,(s,b)", pa10},
-{ "iitlbp", 0x04000000, 0xfc003fff, "x,(b)", pa10},
-{ "pdc", 0x04001380, 0xfc003fdf, "Zx(s,b)", pa10},
-{ "pdc", 0x04001380, 0xfc003fdf, "Zx(b)", pa10},
-{ "fdc", 0x04001280, 0xfc003fdf, "Zx(s,b)", pa10},
-{ "fdc", 0x04001280, 0xfc003fdf, "Zx(b)", pa10},
-{ "fic", 0x04000280, 0xfc003fdf, "Zx(s,b)", pa10},
-{ "fic", 0x04000280, 0xfc003fdf, "Zx(b)", pa10},
-{ "fdce", 0x040012c0, 0xfc003fdf, "Zx(s,b)", pa10},
-{ "fdce", 0x040012c0, 0xfc003fdf, "Zx(b)", pa10},
-{ "fice", 0x040002c0, 0xfc003fdf, "Zx(s,b)", pa10},
-{ "fice", 0x040002c0, 0xfc003fdf, "Zx(b)", pa10},
-{ "diag", 0x14000000, 0xfc000000, "D", pa10},
-
-/* gfw and gfr are not in the HP PA 1.1 manual, but they are in either
- the Timex FPU or the Mustang ERS (not sure which) manual. */
-{ "gfw", 0x04001680, 0xfc003fdf, "Zx(s,b)", pa11},
-{ "gfw", 0x04001680, 0xfc003fdf, "Zx(b)", pa11},
-{ "gfr", 0x04001a80, 0xfc003fdf, "Zx(s,b)", pa11},
-{ "gfr", 0x04001a80, 0xfc003fdf, "Zx(b)", pa11},
-
-/* Floating Point Coprocessor Instructions */
-
-{ "fldwx", 0x24000000, 0xfc001f80, "cx(s,b),v", pa10},
-{ "fldwx", 0x24000000, 0xfc001f80, "cx(b),v", pa10},
-{ "flddx", 0x2c000000, 0xfc001fc0, "cx(s,b),y", pa10},
-{ "flddx", 0x2c000000, 0xfc001fc0, "cx(b),y", pa10},
-{ "fstwx", 0x24000200, 0xfc001f80, "cv,x(s,b)", pa10},
-{ "fstwx", 0x24000200, 0xfc001f80, "cv,x(b)", pa10},
-{ "fstdx", 0x2c000200, 0xfc001fc0, "cy,x(s,b)", pa10},
-{ "fstdx", 0x2c000200, 0xfc001fc0, "cy,x(b)", pa10},
-{ "fstqx", 0x3c000200, 0xfc001fc0, "cy,x(s,b)", pa10},
-{ "fstqx", 0x3c000200, 0xfc001fc0, "cy,x(b)", pa10},
-{ "fldws", 0x24001000, 0xfc001f80, "C5(s,b),v", pa10},
-{ "fldws", 0x24001000, 0xfc001f80, "C5(b),v", pa10},
-{ "fldds", 0x2c001000, 0xfc001fc0, "C5(s,b),y", pa10},
-{ "fldds", 0x2c001000, 0xfc001fc0, "C5(b),y", pa10},
-{ "fstws", 0x24001200, 0xfc001f80, "Cv,5(s,b)", pa10},
-{ "fstws", 0x24001200, 0xfc001f80, "Cv,5(b)", pa10},
-{ "fstds", 0x2c001200, 0xfc001fc0, "Cy,5(s,b)", pa10},
-{ "fstds", 0x2c001200, 0xfc001fc0, "Cy,5(b)", pa10},
-{ "fstqs", 0x3c001200, 0xfc001fc0, "Cy,5(s,b)", pa10},
-{ "fstqs", 0x3c001200, 0xfc001fc0, "Cy,5(b)", pa10},
-{ "fadd", 0x30000600, 0xfc00e7e0, "FE,X,v", pa10},
-{ "fadd", 0x38000600, 0xfc00e720, "IJ,K,v", pa10},
-{ "fsub", 0x30002600, 0xfc00e7e0, "FE,X,v", pa10},
-{ "fsub", 0x38002600, 0xfc00e720, "IJ,K,v", pa10},
-{ "fmpy", 0x30004600, 0xfc00e7e0, "FE,X,v", pa10},
-{ "fmpy", 0x38004600, 0xfc00e720, "IJ,K,v", pa10},
-{ "fdiv", 0x30006600, 0xfc00e7e0, "FE,X,v", pa10},
-{ "fdiv", 0x38006600, 0xfc00e720, "IJ,K,v", pa10},
-{ "fsqrt", 0x30008000, 0xfc1fe7e0, "FE,v", pa10},
-{ "fsqrt", 0x38008000, 0xfc1fe720, "FJ,v", pa10},
-{ "fabs", 0x30006000, 0xfc1fe7e0, "FE,v", pa10},
-{ "fabs", 0x38006000, 0xfc1fe720, "FJ,v", pa10},
-{ "frem", 0x30008600, 0xfc00e7e0, "FE,X,v", pa10},
-{ "frem", 0x38008600, 0xfc00e720, "FJ,K,v", pa10},
-{ "frnd", 0x3000a000, 0xfc1fe7e0, "FE,v", pa10},
-{ "frnd", 0x3800a000, 0xfc1fe720, "FJ,v", pa10},
-{ "fcpy", 0x30004000, 0xfc1fe7e0, "FE,v", pa10},
-{ "fcpy", 0x38004000, 0xfc1fe720, "FJ,v", pa10},
-{ "fcnvff", 0x30000200, 0xfc1f87e0, "FGE,v", pa10},
-{ "fcnvff", 0x38000200, 0xfc1f8720, "FGJ,v", pa10},
-{ "fcnvxf", 0x30008200, 0xfc1f87e0, "FGE,v", pa10},
-{ "fcnvxf", 0x38008200, 0xfc1f8720, "FGJ,v", pa10},
-{ "fcnvfx", 0x30010200, 0xfc1f87e0, "FGE,v", pa10},
-{ "fcnvfx", 0x38010200, 0xfc1f8720, "FGJ,v", pa10},
-{ "fcnvfxt", 0x30018200, 0xfc1f87e0, "FGE,v", pa10},
-{ "fcnvfxt", 0x38018200, 0xfc1f8720, "FGJ,v", pa10},
-{ "fcmp", 0x30000400, 0xfc00e7e0, "FME,X", pa10},
-{ "fcmp", 0x38000400, 0xfc00e720, "IMJ,K", pa10},
-{ "xmpyu", 0x38004700, 0xfc00e720, "E,X,v", pa11},
-{ "fmpyadd", 0x18000000, 0xfc000000, "H4,6,7,9,8", pa11},
-{ "fmpysub", 0x98000000, 0xfc000000, "H4,6,7,9,8", pa11},
-{ "ftest", 0x30002420, 0xffffffff, "", pa10},
-
-
-/* Assist Instructions */
-
-{ "spop0", 0x10000000, 0xfc000600, "f,ON", pa10},
-{ "spop1", 0x10000200, 0xfc000600, "f,oNt", pa10},
-{ "spop2", 0x10000400, 0xfc000600, "f,1Nb", pa10},
-{ "spop3", 0x10000600, 0xfc000600, "f,0Nx,b", pa10},
-{ "copr", 0x30000000, 0xfc000000, "u,2N", pa10},
-{ "cldwx", 0x24000000, 0xfc001e00, "ucx(s,b),t", pa10},
-{ "cldwx", 0x24000000, 0xfc001e00, "ucx(b),t", pa10},
-{ "clddx", 0x2c000000, 0xfc001e00, "ucx(s,b),t", pa10},
-{ "clddx", 0x2c000000, 0xfc001e00, "ucx(b),t", pa10},
-{ "cstwx", 0x24000200, 0xfc001e00, "uct,x(s,b)", pa10},
-{ "cstwx", 0x24000200, 0xfc001e00, "uct,x(b)", pa10},
-{ "cstdx", 0x2c000200, 0xfc001e00, "uct,x(s,b)", pa10},
-{ "cstdx", 0x2c000200, 0xfc001e00, "uct,x(b)", pa10},
-{ "cldws", 0x24001000, 0xfc001e00, "uC5(s,b),t", pa10},
-{ "cldws", 0x24001000, 0xfc001e00, "uC5(b),t", pa10},
-{ "cldds", 0x2c001000, 0xfc001e00, "uC5(s,b),t", pa10},
-{ "cldds", 0x2c001000, 0xfc001e00, "uC5(b),t", pa10},
-{ "cstws", 0x24001200, 0xfc001e00, "uCt,5(s,b)", pa10},
-{ "cstws", 0x24001200, 0xfc001e00, "uCt,5(b)", pa10},
-{ "cstds", 0x2c001200, 0xfc001e00, "uCt,5(s,b)", pa10},
-{ "cstds", 0x2c001200, 0xfc001e00, "uCt,5(b)", pa10},
-};
-
-#define NUMOPCODES ((sizeof pa_opcodes)/(sizeof pa_opcodes[0]))
-
-/* SKV 12/18/92. Added some denotations for various operands. */
-
-#define PA_IMM11_AT_31 'i'
-#define PA_IMM14_AT_31 'j'
-#define PA_IMM21_AT_31 'k'
-#define PA_DISP12 'w'
-#define PA_DISP17 'W'
-
-#define N_HPPA_OPERAND_FORMATS 5
diff --git a/contrib/gdb/include/opcode/i386.h b/contrib/gdb/include/opcode/i386.h
deleted file mode 100644
index 849a86fa7b25..000000000000
--- a/contrib/gdb/include/opcode/i386.h
+++ /dev/null
@@ -1,898 +0,0 @@
-/* i386-opcode.h -- Intel 80386 opcode table
- Copyright 1989, 1991, 1992, 1995 Free Software Foundation.
-
-This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-static const template i386_optab[] = {
-
-#define _ None
-/* move instructions */
-#define MOV_AX_DISP32 0xa0
-{ "mov", 2, 0xa0, _, DW|NoModrm, { Disp32, Acc, 0 } },
-{ "mov", 2, 0x88, _, DW|Modrm, { Reg, Reg|Mem, 0 } },
-{ "mov", 2, 0xb0, _, ShortFormW, { Imm, Reg, 0 } },
-{ "mov", 2, 0xc6, _, W|Modrm, { Imm, Reg|Mem, 0 } },
-{ "mov", 2, 0x8c, _, D|Modrm, { SReg3|SReg2, Reg16|Mem, 0 } },
-/* move to/from control debug registers */
-{ "mov", 2, 0x0f20, _, D|Modrm, { Control, Reg32, 0} },
-{ "mov", 2, 0x0f21, _, D|Modrm, { Debug, Reg32, 0} },
-{ "mov", 2, 0x0f24, _, D|Modrm, { Test, Reg32, 0} },
-
-/* move with sign extend */
-/* "movsbl" & "movsbw" must not be unified into "movsb" to avoid
- conflict with the "movs" string move instruction. Thus,
- {"movsb", 2, 0x0fbe, _, ReverseRegRegmem|Modrm, { Reg8|Mem, Reg16|Reg32, 0} },
- is not kosher; we must seperate the two instructions. */
-{"movsbl", 2, 0x0fbe, _, ReverseRegRegmem|Modrm|Data32, { Reg8|Mem, Reg32, 0} },
-{"movsbw", 2, 0x0fbe, _, ReverseRegRegmem|Modrm|Data16, { Reg8|Mem, Reg16, 0} },
-{"movswl", 2, 0x0fbf, _, ReverseRegRegmem|Modrm, { Reg16|Mem, Reg32, 0} },
-
-/* move with zero extend */
-{"movzb", 2, 0x0fb6, _, ReverseRegRegmem|Modrm, { Reg8|Mem, Reg16|Reg32, 0} },
-{"movzwl", 2, 0x0fb7, _, ReverseRegRegmem|Modrm, { Reg16|Mem, Reg32, 0} },
-
-/* push instructions */
-{"push", 1, 0x50, _, ShortForm, { WordReg,0,0 } },
-{"push", 1, 0xff, 0x6, Modrm, { WordReg|WordMem, 0, 0 } },
-{"push", 1, 0x6a, _, NoModrm, { Imm8S, 0, 0} },
-{"push", 1, 0x68, _, NoModrm, { Imm16|Imm32, 0, 0} },
-{"push", 1, 0x06, _, Seg2ShortForm, { SReg2,0,0 } },
-{"push", 1, 0x0fa0, _, Seg3ShortForm, { SReg3,0,0 } },
-/* push all */
-{"pusha", 0, 0x60, _, NoModrm, { 0, 0, 0 } },
-
-/* pop instructions */
-{"pop", 1, 0x58, _, ShortForm, { WordReg,0,0 } },
-{"pop", 1, 0x8f, 0x0, Modrm, { WordReg|WordMem, 0, 0 } },
-#define POP_SEG_SHORT 0x7
-{"pop", 1, 0x07, _, Seg2ShortForm, { SReg2,0,0 } },
-{"pop", 1, 0x0fa1, _, Seg3ShortForm, { SReg3,0,0 } },
-/* pop all */
-{"popa", 0, 0x61, _, NoModrm, { 0, 0, 0 } },
-
-/* xchg exchange instructions
- xchg commutes: we allow both operand orders */
-{"xchg", 2, 0x90, _, ShortForm, { WordReg, Acc, 0 } },
-{"xchg", 2, 0x90, _, ShortForm, { Acc, WordReg, 0 } },
-{"xchg", 2, 0x86, _, W|Modrm, { Reg, Reg|Mem, 0 } },
-{"xchg", 2, 0x86, _, W|Modrm, { Reg|Mem, Reg, 0 } },
-
-/* in/out from ports */
-{"in", 2, 0xe4, _, W|NoModrm, { Imm8, Acc, 0 } },
-{"in", 2, 0xec, _, W|NoModrm, { InOutPortReg, Acc, 0 } },
-{"in", 1, 0xe4, _, W|NoModrm, { Imm8, 0, 0 } },
-{"in", 1, 0xec, _, W|NoModrm, { InOutPortReg, 0, 0 } },
-{"out", 2, 0xe6, _, W|NoModrm, { Acc, Imm8, 0 } },
-{"out", 2, 0xee, _, W|NoModrm, { Acc, InOutPortReg, 0 } },
-{"out", 1, 0xe6, _, W|NoModrm, { Imm8, 0, 0 } },
-{"out", 1, 0xee, _, W|NoModrm, { InOutPortReg, 0, 0 } },
-
-/* load effective address */
-{"lea", 2, 0x8d, _, Modrm, { WordMem, WordReg, 0 } },
-
-/* load segment registers from memory */
-{"lds", 2, 0xc5, _, Modrm, { Mem, Reg32, 0} },
-{"les", 2, 0xc4, _, Modrm, { Mem, Reg32, 0} },
-{"lfs", 2, 0x0fb4, _, Modrm, { Mem, Reg32, 0} },
-{"lgs", 2, 0x0fb5, _, Modrm, { Mem, Reg32, 0} },
-{"lss", 2, 0x0fb2, _, Modrm, { Mem, Reg32, 0} },
-
-/* flags register instructions */
-{"clc", 0, 0xf8, _, NoModrm, { 0, 0, 0} },
-{"cld", 0, 0xfc, _, NoModrm, { 0, 0, 0} },
-{"cli", 0, 0xfa, _, NoModrm, { 0, 0, 0} },
-{"clts", 0, 0x0f06, _, NoModrm, { 0, 0, 0} },
-{"cmc", 0, 0xf5, _, NoModrm, { 0, 0, 0} },
-{"lahf", 0, 0x9f, _, NoModrm, { 0, 0, 0} },
-{"sahf", 0, 0x9e, _, NoModrm, { 0, 0, 0} },
-{"pushfl", 0, 0x9c, _, NoModrm|Data32, { 0, 0, 0} },
-{"popfl", 0, 0x9d, _, NoModrm|Data32, { 0, 0, 0} },
-{"pushfw", 0, 0x9c, _, NoModrm|Data16, { 0, 0, 0} },
-{"popfw", 0, 0x9d, _, NoModrm|Data16, { 0, 0, 0} },
-{"pushf", 0, 0x9c, _, NoModrm, { 0, 0, 0} },
-{"popf", 0, 0x9d, _, NoModrm, { 0, 0, 0} },
-{"stc", 0, 0xf9, _, NoModrm, { 0, 0, 0} },
-{"std", 0, 0xfd, _, NoModrm, { 0, 0, 0} },
-{"sti", 0, 0xfb, _, NoModrm, { 0, 0, 0} },
-
-{"add", 2, 0x0, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"add", 2, 0x83, 0, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"add", 2, 0x4, _, W|NoModrm, { Imm, Acc, 0} },
-{"add", 2, 0x80, 0, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"inc", 1, 0x40, _, ShortForm, { WordReg, 0, 0} },
-{"inc", 1, 0xfe, 0, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"sub", 2, 0x28, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"sub", 2, 0x83, 5, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"sub", 2, 0x2c, _, W|NoModrm, { Imm, Acc, 0} },
-{"sub", 2, 0x80, 5, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"dec", 1, 0x48, _, ShortForm, { WordReg, 0, 0} },
-{"dec", 1, 0xfe, 1, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"sbb", 2, 0x18, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"sbb", 2, 0x83, 3, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"sbb", 2, 0x1c, _, W|NoModrm, { Imm, Acc, 0} },
-{"sbb", 2, 0x80, 3, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"cmp", 2, 0x38, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"cmp", 2, 0x83, 7, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"cmp", 2, 0x3c, _, W|NoModrm, { Imm, Acc, 0} },
-{"cmp", 2, 0x80, 7, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"test", 2, 0x84, _, W|Modrm, { Reg|Mem, Reg, 0} },
-{"test", 2, 0x84, _, W|Modrm, { Reg, Reg|Mem, 0} },
-{"test", 2, 0xa8, _, W|NoModrm, { Imm, Acc, 0} },
-{"test", 2, 0xf6, 0, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"and", 2, 0x20, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"and", 2, 0x83, 4, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"and", 2, 0x24, _, W|NoModrm, { Imm, Acc, 0} },
-{"and", 2, 0x80, 4, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"or", 2, 0x08, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"or", 2, 0x83, 1, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"or", 2, 0x0c, _, W|NoModrm, { Imm, Acc, 0} },
-{"or", 2, 0x80, 1, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"xor", 2, 0x30, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"xor", 2, 0x83, 6, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"xor", 2, 0x34, _, W|NoModrm, { Imm, Acc, 0} },
-{"xor", 2, 0x80, 6, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"adc", 2, 0x10, _, DW|Modrm, { Reg, Reg|Mem, 0} },
-{"adc", 2, 0x83, 2, Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"adc", 2, 0x14, _, W|NoModrm, { Imm, Acc, 0} },
-{"adc", 2, 0x80, 2, W|Modrm, { Imm, Reg|Mem, 0} },
-
-{"neg", 1, 0xf6, 3, W|Modrm, { Reg|Mem, 0, 0} },
-{"not", 1, 0xf6, 2, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"aaa", 0, 0x37, _, NoModrm, { 0, 0, 0} },
-{"aas", 0, 0x3f, _, NoModrm, { 0, 0, 0} },
-{"daa", 0, 0x27, _, NoModrm, { 0, 0, 0} },
-{"das", 0, 0x2f, _, NoModrm, { 0, 0, 0} },
-{"aad", 0, 0xd50a, _, NoModrm, { 0, 0, 0} },
-{"aam", 0, 0xd40a, _, NoModrm, { 0, 0, 0} },
-
-/* conversion insns */
-/* conversion: intel naming */
-{"cbw", 0, 0x98, _, NoModrm|Data16, { 0, 0, 0} },
-{"cwd", 0, 0x99, _, NoModrm|Data16, { 0, 0, 0} },
-{"cwde", 0, 0x98, _, NoModrm|Data32, { 0, 0, 0} },
-{"cdq", 0, 0x99, _, NoModrm|Data32, { 0, 0, 0} },
-/* att naming */
-{"cbtw", 0, 0x98, _, NoModrm|Data16, { 0, 0, 0} },
-{"cwtl", 0, 0x98, _, NoModrm|Data32, { 0, 0, 0} },
-{"cwtd", 0, 0x99, _, NoModrm|Data16, { 0, 0, 0} },
-{"cltd", 0, 0x99, _, NoModrm|Data32, { 0, 0, 0} },
-
-/* Warning! the mul/imul (opcode 0xf6) must only have 1 operand! They are
- expanding 64-bit multiplies, and *cannot* be selected to accomplish
- 'imul %ebx, %eax' (opcode 0x0faf must be used in this case)
- These multiplies can only be selected with single operand forms. */
-{"mul", 1, 0xf6, 4, W|Modrm, { Reg|Mem, 0, 0} },
-{"imul", 1, 0xf6, 5, W|Modrm, { Reg|Mem, 0, 0} },
-
-
-
-
-/* imulKludge here is needed to reverse the i.rm.reg & i.rm.regmem fields.
- These instructions are exceptions: 'imul $2, %eax, %ecx' would put
- '%eax' in the reg field and '%ecx' in the regmem field if we did not
- switch them. */
-{"imul", 2, 0x0faf, _, Modrm|ReverseRegRegmem, { WordReg|Mem, WordReg, 0} },
-{"imul", 3, 0x6b, _, Modrm|ReverseRegRegmem, { Imm8S, WordReg|Mem, WordReg} },
-{"imul", 3, 0x69, _, Modrm|ReverseRegRegmem, { Imm16|Imm32, WordReg|Mem, WordReg} },
-/*
- imul with 2 operands mimicks imul with 3 by puting register both
- in i.rm.reg & i.rm.regmem fields
-*/
-{"imul", 2, 0x6b, _, Modrm|imulKludge, { Imm8S, WordReg, 0} },
-{"imul", 2, 0x69, _, Modrm|imulKludge, { Imm16|Imm32, WordReg, 0} },
-{"div", 1, 0xf6, 6, W|Modrm, { Reg|Mem, 0, 0} },
-{"div", 2, 0xf6, 6, W|Modrm, { Reg|Mem, Acc, 0} },
-{"idiv", 1, 0xf6, 7, W|Modrm, { Reg|Mem, 0, 0} },
-{"idiv", 2, 0xf6, 7, W|Modrm, { Reg|Mem, Acc, 0} },
-
-{"rol", 2, 0xd0, 0, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"rol", 2, 0xc0, 0, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"rol", 2, 0xd2, 0, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"rol", 1, 0xd0, 0, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"ror", 2, 0xd0, 1, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"ror", 2, 0xc0, 1, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"ror", 2, 0xd2, 1, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"ror", 1, 0xd0, 1, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"rcl", 2, 0xd0, 2, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"rcl", 2, 0xc0, 2, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"rcl", 2, 0xd2, 2, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"rcl", 1, 0xd0, 2, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"rcr", 2, 0xd0, 3, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"rcr", 2, 0xc0, 3, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"rcr", 2, 0xd2, 3, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"rcr", 1, 0xd0, 3, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"sal", 2, 0xd0, 4, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"sal", 2, 0xc0, 4, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"sal", 2, 0xd2, 4, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"sal", 1, 0xd0, 4, W|Modrm, { Reg|Mem, 0, 0} },
-{"shl", 2, 0xd0, 4, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"shl", 2, 0xc0, 4, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"shl", 2, 0xd2, 4, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"shl", 1, 0xd0, 4, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"shld", 3, 0x0fa4, _, Modrm, { Imm8, WordReg, WordReg|Mem} },
-{"shld", 3, 0x0fa5, _, Modrm, { ShiftCount, WordReg, WordReg|Mem} },
-{"shld", 2, 0x0fa5, _, Modrm, { WordReg, WordReg|Mem, 0} },
-
-{"shr", 2, 0xd0, 5, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"shr", 2, 0xc0, 5, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"shr", 2, 0xd2, 5, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"shr", 1, 0xd0, 5, W|Modrm, { Reg|Mem, 0, 0} },
-
-{"shrd", 3, 0x0fac, _, Modrm, { Imm8, WordReg, WordReg|Mem} },
-{"shrd", 3, 0x0fad, _, Modrm, { ShiftCount, WordReg, WordReg|Mem} },
-{"shrd", 2, 0x0fad, _, Modrm, { WordReg, WordReg|Mem, 0} },
-
-{"sar", 2, 0xd0, 7, W|Modrm, { Imm1, Reg|Mem, 0} },
-{"sar", 2, 0xc0, 7, W|Modrm, { Imm8, Reg|Mem, 0} },
-{"sar", 2, 0xd2, 7, W|Modrm, { ShiftCount, Reg|Mem, 0} },
-{"sar", 1, 0xd0, 7, W|Modrm, { Reg|Mem, 0, 0} },
-
-/* control transfer instructions */
-#define CALL_PC_RELATIVE 0xe8
-{"call", 1, 0xe8, _, JumpDword, { Disp32, 0, 0} },
-{"call", 1, 0xff, 2, Modrm|Data32, { Reg|Mem|JumpAbsolute, 0, 0} },
-{"callw", 1, 0xff, 2, Modrm|Data16, { Reg|Mem|JumpAbsolute, 0, 0} },
-#define CALL_FAR_IMMEDIATE 0x9a
-{"lcall", 2, 0x9a, _, JumpInterSegment, { Imm16, Abs32|Imm32, 0} },
-{"lcall", 1, 0xff, 3, Modrm|Data32, { Mem, 0, 0} },
-{"lcallw", 1, 0xff, 3, Modrm|Data16, { Mem, 0, 0} },
-
-#define JUMP_PC_RELATIVE 0xeb
-{"jmp", 1, 0xeb, _, Jump, { Disp, 0, 0} },
-{"jmp", 1, 0xff, 4, Modrm, { Reg32|Mem|JumpAbsolute, 0, 0} },
-#define JUMP_FAR_IMMEDIATE 0xea
-{"ljmp", 2, 0xea, _, JumpInterSegment, { Imm16, Imm32, 0} },
-{"ljmp", 1, 0xff, 5, Modrm|Data32, { Mem, 0, 0} },
-
-{"ret", 0, 0xc3, _, NoModrm|Data32, { 0, 0, 0} },
-{"ret", 1, 0xc2, _, NoModrm|Data32, { Imm16, 0, 0} },
-{"retw", 0, 0xc3, _, NoModrm|Data16, { 0, 0, 0} },
-{"retw", 1, 0xc2, _, NoModrm|Data16, { Imm16, 0, 0} },
-{"lret", 0, 0xcb, _, NoModrm|Data32, { 0, 0, 0} },
-{"lret", 1, 0xca, _, NoModrm|Data32, { Imm16, 0, 0} },
-{"lretw", 0, 0xcb, _, NoModrm|Data16, { 0, 0, 0} },
-{"lretw", 1, 0xca, _, NoModrm|Data16, { Imm16, 0, 0} },
-{"enter", 2, 0xc8, _, NoModrm|Data32, { Imm16, Imm8, 0} },
-{"leave", 0, 0xc9, _, NoModrm|Data32, { 0, 0, 0} },
-{"enterw", 2, 0xc8, _, NoModrm|Data16, { Imm16, Imm8, 0} },
-{"leavew", 0, 0xc9, _, NoModrm|Data16, { 0, 0, 0} },
-
-/* conditional jumps */
-{"jo", 1, 0x70, _, Jump, { Disp, 0, 0} },
-
-{"jno", 1, 0x71, _, Jump, { Disp, 0, 0} },
-
-{"jb", 1, 0x72, _, Jump, { Disp, 0, 0} },
-{"jc", 1, 0x72, _, Jump, { Disp, 0, 0} },
-{"jnae", 1, 0x72, _, Jump, { Disp, 0, 0} },
-
-{"jnb", 1, 0x73, _, Jump, { Disp, 0, 0} },
-{"jnc", 1, 0x73, _, Jump, { Disp, 0, 0} },
-{"jae", 1, 0x73, _, Jump, { Disp, 0, 0} },
-
-{"je", 1, 0x74, _, Jump, { Disp, 0, 0} },
-{"jz", 1, 0x74, _, Jump, { Disp, 0, 0} },
-
-{"jne", 1, 0x75, _, Jump, { Disp, 0, 0} },
-{"jnz", 1, 0x75, _, Jump, { Disp, 0, 0} },
-
-{"jbe", 1, 0x76, _, Jump, { Disp, 0, 0} },
-{"jna", 1, 0x76, _, Jump, { Disp, 0, 0} },
-
-{"jnbe", 1, 0x77, _, Jump, { Disp, 0, 0} },
-{"ja", 1, 0x77, _, Jump, { Disp, 0, 0} },
-
-{"js", 1, 0x78, _, Jump, { Disp, 0, 0} },
-
-{"jns", 1, 0x79, _, Jump, { Disp, 0, 0} },
-
-{"jp", 1, 0x7a, _, Jump, { Disp, 0, 0} },
-{"jpe", 1, 0x7a, _, Jump, { Disp, 0, 0} },
-
-{"jnp", 1, 0x7b, _, Jump, { Disp, 0, 0} },
-{"jpo", 1, 0x7b, _, Jump, { Disp, 0, 0} },
-
-{"jl", 1, 0x7c, _, Jump, { Disp, 0, 0} },
-{"jnge", 1, 0x7c, _, Jump, { Disp, 0, 0} },
-
-{"jnl", 1, 0x7d, _, Jump, { Disp, 0, 0} },
-{"jge", 1, 0x7d, _, Jump, { Disp, 0, 0} },
-
-{"jle", 1, 0x7e, _, Jump, { Disp, 0, 0} },
-{"jng", 1, 0x7e, _, Jump, { Disp, 0, 0} },
-
-{"jnle", 1, 0x7f, _, Jump, { Disp, 0, 0} },
-{"jg", 1, 0x7f, _, Jump, { Disp, 0, 0} },
-
-#if 0 /* XXX where are these macros used?
- To get them working again, they need to take
- an entire template as the parameter,
- and check for Data16/Data32 flags. */
-/* these turn into pseudo operations when disp is larger than 8 bits */
-#define IS_JUMP_ON_CX_ZERO(o) \
- (o == 0x66e3)
-#define IS_JUMP_ON_ECX_ZERO(o) \
- (o == 0xe3)
-#endif
-
-{"jcxz", 1, 0xe3, _, JumpByte|Data16, { Disp, 0, 0} },
-{"jecxz", 1, 0xe3, _, JumpByte|Data32, { Disp, 0, 0} },
-
-#define IS_LOOP_ECX_TIMES(o) \
- (o == 0xe2 || o == 0xe1 || o == 0xe0)
-
-{"loop", 1, 0xe2, _, JumpByte, { Disp, 0, 0} },
-
-{"loopz", 1, 0xe1, _, JumpByte, { Disp, 0, 0} },
-{"loope", 1, 0xe1, _, JumpByte, { Disp, 0, 0} },
-
-{"loopnz", 1, 0xe0, _, JumpByte, { Disp, 0, 0} },
-{"loopne", 1, 0xe0, _, JumpByte, { Disp, 0, 0} },
-
-/* set byte on flag instructions */
-{"seto", 1, 0x0f90, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setno", 1, 0x0f91, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setb", 1, 0x0f92, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setc", 1, 0x0f92, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setnae", 1, 0x0f92, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setnb", 1, 0x0f93, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setnc", 1, 0x0f93, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setae", 1, 0x0f93, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"sete", 1, 0x0f94, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setz", 1, 0x0f94, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setne", 1, 0x0f95, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setnz", 1, 0x0f95, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setbe", 1, 0x0f96, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setna", 1, 0x0f96, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setnbe", 1, 0x0f97, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"seta", 1, 0x0f97, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"sets", 1, 0x0f98, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setns", 1, 0x0f99, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setp", 1, 0x0f9a, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setpe", 1, 0x0f9a, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setnp", 1, 0x0f9b, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setpo", 1, 0x0f9b, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setl", 1, 0x0f9c, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setnge", 1, 0x0f9c, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setnl", 1, 0x0f9d, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setge", 1, 0x0f9d, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setle", 1, 0x0f9e, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setng", 1, 0x0f9e, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-{"setnle", 1, 0x0f9f, 0, Modrm, { Reg8|Mem, 0, 0} },
-{"setg", 1, 0x0f9f, 0, Modrm, { Reg8|Mem, 0, 0} },
-
-#define IS_STRING_INSTRUCTION(o) \
- ((o) == 0xa6 || (o) == 0x6c || (o) == 0x6e || (o) == 0x6e || \
- (o) == 0xac || (o) == 0xa4 || (o) == 0xae || (o) == 0xaa || \
- (o) == 0xd7)
-
-/* string manipulation */
-{"cmps", 0, 0xa6, _, W|NoModrm, { 0, 0, 0} },
-{"scmp", 0, 0xa6, _, W|NoModrm, { 0, 0, 0} },
-{"ins", 0, 0x6c, _, W|NoModrm, { 0, 0, 0} },
-{"outs", 0, 0x6e, _, W|NoModrm, { 0, 0, 0} },
-{"lods", 0, 0xac, _, W|NoModrm, { 0, 0, 0} },
-{"slod", 0, 0xac, _, W|NoModrm, { 0, 0, 0} },
-{"movs", 0, 0xa4, _, W|NoModrm, { 0, 0, 0} },
-{"smov", 0, 0xa4, _, W|NoModrm, { 0, 0, 0} },
-{"scas", 0, 0xae, _, W|NoModrm, { 0, 0, 0} },
-{"ssca", 0, 0xae, _, W|NoModrm, { 0, 0, 0} },
-{"stos", 0, 0xaa, _, W|NoModrm, { 0, 0, 0} },
-{"ssto", 0, 0xaa, _, W|NoModrm, { 0, 0, 0} },
-{"xlat", 0, 0xd7, _, NoModrm, { 0, 0, 0} },
-
-/* bit manipulation */
-{"bsf", 2, 0x0fbc, _, Modrm|ReverseRegRegmem, { Reg|Mem, Reg, 0} },
-{"bsr", 2, 0x0fbd, _, Modrm|ReverseRegRegmem, { Reg|Mem, Reg, 0} },
-{"bt", 2, 0x0fa3, _, Modrm, { Reg, Reg|Mem, 0} },
-{"bt", 2, 0x0fba, 4, Modrm, { Imm8, Reg|Mem, 0} },
-{"btc", 2, 0x0fbb, _, Modrm, { Reg, Reg|Mem, 0} },
-{"btc", 2, 0x0fba, 7, Modrm, { Imm8, Reg|Mem, 0} },
-{"btr", 2, 0x0fb3, _, Modrm, { Reg, Reg|Mem, 0} },
-{"btr", 2, 0x0fba, 6, Modrm, { Imm8, Reg|Mem, 0} },
-{"bts", 2, 0x0fab, _, Modrm, { Reg, Reg|Mem, 0} },
-{"bts", 2, 0x0fba, 5, Modrm, { Imm8, Reg|Mem, 0} },
-
-/* interrupts & op. sys insns */
-/* See gas/config/tc-i386.c for conversion of 'int $3' into the special
- int 3 insn. */
-#define INT_OPCODE 0xcd
-#define INT3_OPCODE 0xcc
-{"int", 1, 0xcd, _, NoModrm, { Imm8, 0, 0} },
-{"int3", 0, 0xcc, _, NoModrm, { 0, 0, 0} },
-{"into", 0, 0xce, _, NoModrm, { 0, 0, 0} },
-{"iret", 0, 0xcf, _, NoModrm|Data32, { 0, 0, 0} },
-{"iretw", 0, 0xcf, _, NoModrm|Data16, { 0, 0, 0} },
-/* i386sl, i486sl, later 486, and Pentium */
-{"rsm", 0, 0x0faa, _, NoModrm,{ 0, 0, 0} },
-
-{"boundl", 2, 0x62, _, Modrm|Data32, { Reg32, Mem, 0} },
-{"boundw", 2, 0x62, _, Modrm|Data16, { Reg16, Mem, 0} },
-
-{"hlt", 0, 0xf4, _, NoModrm, { 0, 0, 0} },
-{"wait", 0, 0x9b, _, NoModrm, { 0, 0, 0} },
-/* nop is actually 'xchgl %eax, %eax' */
-{"nop", 0, 0x90, _, NoModrm, { 0, 0, 0} },
-
-/* protection control */
-{"arpl", 2, 0x63, _, Modrm, { Reg16, Reg16|Mem, 0} },
-{"lar", 2, 0x0f02, _, Modrm|ReverseRegRegmem, { WordReg|Mem, WordReg, 0} },
-{"lgdt", 1, 0x0f01, 2, Modrm, { Mem, 0, 0} },
-{"lidt", 1, 0x0f01, 3, Modrm, { Mem, 0, 0} },
-{"lldt", 1, 0x0f00, 2, Modrm, { WordReg|Mem, 0, 0} },
-{"lmsw", 1, 0x0f01, 6, Modrm, { WordReg|Mem, 0, 0} },
-{"lsl", 2, 0x0f03, _, Modrm|ReverseRegRegmem, { WordReg|Mem, WordReg, 0} },
-{"ltr", 1, 0x0f00, 3, Modrm, { WordReg|Mem, 0, 0} },
-
-{"sgdt", 1, 0x0f01, 0, Modrm, { Mem, 0, 0} },
-{"sidt", 1, 0x0f01, 1, Modrm, { Mem, 0, 0} },
-{"sldt", 1, 0x0f00, 0, Modrm, { WordReg|Mem, 0, 0} },
-{"smsw", 1, 0x0f01, 4, Modrm, { WordReg|Mem, 0, 0} },
-{"str", 1, 0x0f00, 1, Modrm, { Reg16|Mem, 0, 0} },
-
-{"verr", 1, 0x0f00, 4, Modrm, { WordReg|Mem, 0, 0} },
-{"verw", 1, 0x0f00, 5, Modrm, { WordReg|Mem, 0, 0} },
-
-/* floating point instructions */
-
-/* load */
-{"fld", 1, 0xd9c0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"flds", 1, 0xd9, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem float */
-{"fldl", 1, 0xdd, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem double */
-{"fldl", 1, 0xd9c0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"fild", 1, 0xdf, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem word (16) */
-{"fildl", 1, 0xdb, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem dword (32) */
-{"fildq",1, 0xdf, 5, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem qword (64) */
-{"fildll",1, 0xdf, 5, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem qword (64) */
-{"fldt", 1, 0xdb, 5, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem efloat */
-{"fbld", 1, 0xdf, 4, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem bcd */
-
-/* store (no pop) */
-{"fst", 1, 0xddd0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"fsts", 1, 0xd9, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem float */
-{"fstl", 1, 0xdd, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem double */
-{"fstl", 1, 0xddd0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"fist", 1, 0xdf, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem word (16) */
-{"fistl", 1, 0xdb, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem dword (32) */
-
-/* store (with pop) */
-{"fstp", 1, 0xddd8, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"fstps", 1, 0xd9, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem float */
-{"fstpl", 1, 0xdd, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem double */
-{"fstpl", 1, 0xddd8, _, ShortForm, { FloatReg, 0, 0} }, /* register */
-{"fistp", 1, 0xdf, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem word (16) */
-{"fistpl",1, 0xdb, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem dword (32) */
-{"fistpq",1, 0xdf, 7, Modrm, { Mem, 0, 0} }, /* %st0 --> mem qword (64) */
-{"fistpll",1,0xdf, 7, Modrm, { Mem, 0, 0} }, /* %st0 --> mem qword (64) */
-{"fstpt", 1, 0xdb, 7, Modrm, { Mem, 0, 0} }, /* %st0 --> mem efloat */
-{"fbstp", 1, 0xdf, 6, Modrm, { Mem, 0, 0} }, /* %st0 --> mem bcd */
-
-/* exchange %st<n> with %st0 */
-{"fxch", 1, 0xd9c8, _, ShortForm, { FloatReg, 0, 0} },
-{"fxch", 0, 0xd9c9, _, NoModrm, { 0, 0, 0} }, /* alias for fxch %st, %st(1) */
-
-/* comparison (without pop) */
-{"fcom", 1, 0xd8d0, _, ShortForm, { FloatReg, 0, 0} },
-{"fcoms", 1, 0xd8, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem float */
-{"ficoml", 1, 0xda, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem word */
-{"fcoml", 1, 0xdc, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem double */
-{"fcoml", 1, 0xd8d0, _, ShortForm, { FloatReg, 0, 0} },
-{"ficoms", 1, 0xde, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem dword */
-
-/* comparison (with pop) */
-{"fcomp", 1, 0xd8d8, _, ShortForm, { FloatReg, 0, 0} },
-{"fcomps", 1, 0xd8, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem float */
-{"ficompl", 1, 0xda, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem word */
-{"fcompl", 1, 0xdc, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem double */
-{"fcompl", 1, 0xd8d8, _, ShortForm, { FloatReg, 0, 0} },
-{"ficomps", 1, 0xde, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem dword */
-{"fcompp", 0, 0xded9, _, NoModrm, { 0, 0, 0} }, /* compare %st0, %st1 & pop 2 */
-
-/* unordered comparison (with pop) */
-{"fucom", 1, 0xdde0, _, ShortForm, { FloatReg, 0, 0} },
-{"fucomp", 1, 0xdde8, _, ShortForm, { FloatReg, 0, 0} },
-{"fucompp", 0, 0xdae9, _, NoModrm, { 0, 0, 0} }, /* ucompare %st0, %st1 & pop twice */
-
-{"ftst", 0, 0xd9e4, _, NoModrm, { 0, 0, 0} }, /* test %st0 */
-{"fxam", 0, 0xd9e5, _, NoModrm, { 0, 0, 0} }, /* examine %st0 */
-
-/* load constants into %st0 */
-{"fld1", 0, 0xd9e8, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- 1.0 */
-{"fldl2t", 0, 0xd9e9, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- log2(10) */
-{"fldl2e", 0, 0xd9ea, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- log2(e) */
-{"fldpi", 0, 0xd9eb, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- pi */
-{"fldlg2", 0, 0xd9ec, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- log10(2) */
-{"fldln2", 0, 0xd9ed, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- ln(2) */
-{"fldz", 0, 0xd9ee, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- 0.0 */
-
-/* arithmetic */
-
-/* add */
-{"fadd", 1, 0xd8c0, _, ShortForm, { FloatReg, 0, 0} },
-{"fadd", 2, 0xd8c0, _, ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
-{"fadd", 0, 0xdcc1, _, NoModrm, { 0, 0, 0} }, /* alias for fadd %st, %st(1) */
-{"faddp", 1, 0xdac0, _, ShortForm, { FloatReg, 0, 0} },
-{"faddp", 2, 0xdac0, _, ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
-{"faddp", 0, 0xdec1, _, NoModrm, { 0, 0, 0} }, /* alias for faddp %st, %st(1) */
-{"fadds", 1, 0xd8, 0, Modrm, { Mem, 0, 0} },
-{"fiaddl", 1, 0xda, 0, Modrm, { Mem, 0, 0} },
-{"faddl", 1, 0xdc, 0, Modrm, { Mem, 0, 0} },
-{"fiadds", 1, 0xde, 0, Modrm, { Mem, 0, 0} },
-
-/* sub */
-/* Note: intel has decided that certain of these operations are reversed
- in assembler syntax. */
-{"fsub", 1, 0xd8e0, _, ShortForm, { FloatReg, 0, 0} },
-{"fsub", 2, 0xd8e0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fsub", 2, 0xdce8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#else
-{"fsub", 2, 0xdce0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#endif
-{"fsub", 0, 0xdce1, _, NoModrm, { 0, 0, 0} },
-{"fsubp", 1, 0xdae0, _, ShortForm, { FloatReg, 0, 0} },
-{"fsubp", 2, 0xdae0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fsubp", 2, 0xdee8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#else
-{"fsubp", 2, 0xdee0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#endif
-{"fsubp", 0, 0xdee1, _, NoModrm, { 0, 0, 0} },
-{"fsubs", 1, 0xd8, 4, Modrm, { Mem, 0, 0} },
-{"fisubl", 1, 0xda, 4, Modrm, { Mem, 0, 0} },
-{"fsubl", 1, 0xdc, 4, Modrm, { Mem, 0, 0} },
-{"fisubs", 1, 0xde, 4, Modrm, { Mem, 0, 0} },
-
-/* sub reverse */
-{"fsubr", 1, 0xd8e8, _, ShortForm, { FloatReg, 0, 0} },
-{"fsubr", 2, 0xd8e8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fsubr", 2, 0xdce0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#else
-{"fsubr", 2, 0xdce8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#endif
-{"fsubr", 0, 0xdce9, _, NoModrm, { 0, 0, 0} },
-{"fsubrp", 1, 0xdae8, _, ShortForm, { FloatReg, 0, 0} },
-{"fsubrp", 2, 0xdae8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fsubrp", 2, 0xdee0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#else
-{"fsubrp", 2, 0xdee8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#endif
-{"fsubrp", 0, 0xdee9, _, NoModrm, { 0, 0, 0} },
-{"fsubrs", 1, 0xd8, 5, Modrm, { Mem, 0, 0} },
-{"fisubrl", 1, 0xda, 5, Modrm, { Mem, 0, 0} },
-{"fsubrl", 1, 0xdc, 5, Modrm, { Mem, 0, 0} },
-{"fisubrs", 1, 0xde, 5, Modrm, { Mem, 0, 0} },
-
-/* mul */
-{"fmul", 1, 0xd8c8, _, ShortForm, { FloatReg, 0, 0} },
-{"fmul", 2, 0xd8c8, _, ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
-{"fmul", 0, 0xdcc9, _, NoModrm, { 0, 0, 0} },
-{"fmulp", 1, 0xdac8, _, ShortForm, { FloatReg, 0, 0} },
-{"fmulp", 2, 0xdac8, _, ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
-{"fmulp", 0, 0xdec9, _, NoModrm, { 0, 0, 0} },
-{"fmuls", 1, 0xd8, 1, Modrm, { Mem, 0, 0} },
-{"fimull", 1, 0xda, 1, Modrm, { Mem, 0, 0} },
-{"fmull", 1, 0xdc, 1, Modrm, { Mem, 0, 0} },
-{"fimuls", 1, 0xde, 1, Modrm, { Mem, 0, 0} },
-
-/* div */
-/* Note: intel has decided that certain of these operations are reversed
- in assembler syntax. */
-{"fdiv", 1, 0xd8f0, _, ShortForm, { FloatReg, 0, 0} },
-{"fdiv", 2, 0xd8f0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fdiv", 2, 0xdcf8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#else
-{"fdiv", 2, 0xdcf0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#endif
-{"fdiv", 0, 0xdcf1, _, NoModrm, { 0, 0, 0} },
-{"fdivp", 1, 0xdaf0, _, ShortForm, { FloatReg, 0, 0} },
-{"fdivp", 2, 0xdaf0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fdivp", 2, 0xdef8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#else
-{"fdivp", 2, 0xdef0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#endif
-{"fdivp", 0, 0xdef1, _, NoModrm, { 0, 0, 0} },
-{"fdivs", 1, 0xd8, 6, Modrm, { Mem, 0, 0} },
-{"fidivl", 1, 0xda, 6, Modrm, { Mem, 0, 0} },
-{"fdivl", 1, 0xdc, 6, Modrm, { Mem, 0, 0} },
-{"fidivs", 1, 0xde, 6, Modrm, { Mem, 0, 0} },
-
-/* div reverse */
-{"fdivr", 1, 0xd8f8, _, ShortForm, { FloatReg, 0, 0} },
-{"fdivr", 2, 0xd8f8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fdivr", 2, 0xdcf0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#else
-{"fdivr", 2, 0xdcf8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#endif
-{"fdivr", 0, 0xdcf9, _, NoModrm, { 0, 0, 0} },
-{"fdivrp", 1, 0xdaf8, _, ShortForm, { FloatReg, 0, 0} },
-{"fdivrp", 2, 0xdaf8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-#ifdef NON_BROKEN_OPCODES
-{"fdivrp", 2, 0xdef0, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#else
-{"fdivrp", 2, 0xdef8, _, ShortForm, { FloatAcc, FloatReg, 0} },
-#endif
-{"fdivrp", 0, 0xdef9, _, NoModrm, { 0, 0, 0} },
-{"fdivrs", 1, 0xd8, 7, Modrm, { Mem, 0, 0} },
-{"fidivrl", 1, 0xda, 7, Modrm, { Mem, 0, 0} },
-{"fdivrl", 1, 0xdc, 7, Modrm, { Mem, 0, 0} },
-{"fidivrs", 1, 0xde, 7, Modrm, { Mem, 0, 0} },
-
-{"f2xm1", 0, 0xd9f0, _, NoModrm, { 0, 0, 0} },
-{"fyl2x", 0, 0xd9f1, _, NoModrm, { 0, 0, 0} },
-{"fptan", 0, 0xd9f2, _, NoModrm, { 0, 0, 0} },
-{"fpatan", 0, 0xd9f3, _, NoModrm, { 0, 0, 0} },
-{"fxtract", 0, 0xd9f4, _, NoModrm, { 0, 0, 0} },
-{"fprem1", 0, 0xd9f5, _, NoModrm, { 0, 0, 0} },
-{"fdecstp", 0, 0xd9f6, _, NoModrm, { 0, 0, 0} },
-{"fincstp", 0, 0xd9f7, _, NoModrm, { 0, 0, 0} },
-{"fprem", 0, 0xd9f8, _, NoModrm, { 0, 0, 0} },
-{"fyl2xp1", 0, 0xd9f9, _, NoModrm, { 0, 0, 0} },
-{"fsqrt", 0, 0xd9fa, _, NoModrm, { 0, 0, 0} },
-{"fsincos", 0, 0xd9fb, _, NoModrm, { 0, 0, 0} },
-{"frndint", 0, 0xd9fc, _, NoModrm, { 0, 0, 0} },
-{"fscale", 0, 0xd9fd, _, NoModrm, { 0, 0, 0} },
-{"fsin", 0, 0xd9fe, _, NoModrm, { 0, 0, 0} },
-{"fcos", 0, 0xd9ff, _, NoModrm, { 0, 0, 0} },
-
-{"fchs", 0, 0xd9e0, _, NoModrm, { 0, 0, 0} },
-{"fabs", 0, 0xd9e1, _, NoModrm, { 0, 0, 0} },
-
-/* processor control */
-{"fninit", 0, 0xdbe3, _, NoModrm, { 0, 0, 0} },
-{"finit", 0, 0x9bdbe3, _, NoModrm, { 0, 0, 0} },
-{"fldcw", 1, 0xd9, 5, Modrm, { Mem, 0, 0} },
-{"fnstcw", 1, 0xd9, 7, Modrm, { Mem, 0, 0} },
-{"fstcw", 1, 0x9bd9, 7, Modrm, { Mem, 0, 0} },
-{"fnstsw", 1, 0xdfe0, _, NoModrm, { Acc, 0, 0} },
-{"fnstsw", 1, 0xdd, 7, Modrm, { Mem, 0, 0} },
-{"fnstsw", 0, 0xdfe0, _, NoModrm, { 0, 0, 0} },
-{"fstsw", 1, 0x9bdfe0, _, NoModrm, { Acc, 0, 0} },
-{"fstsw", 1, 0x9bdd, 7, Modrm, { Mem, 0, 0} },
-{"fstsw", 0, 0x9bdfe0, _, NoModrm, { 0, 0, 0} },
-{"fnclex", 0, 0xdbe2, _, NoModrm, { 0, 0, 0} },
-{"fclex", 0, 0x9bdbe2, _, NoModrm, { 0, 0, 0} },
-/*
- We ignore the short format (287) versions of fstenv/fldenv & fsave/frstor
- instructions; i'm not sure how to add them or how they are different.
- My 386/387 book offers no details about this.
-*/
-{"fnstenv", 1, 0xd9, 6, Modrm, { Mem, 0, 0} },
-{"fstenv", 1, 0x9bd9, 6, Modrm, { Mem, 0, 0} },
-{"fldenv", 1, 0xd9, 4, Modrm, { Mem, 0, 0} },
-{"fnsave", 1, 0xdd, 6, Modrm, { Mem, 0, 0} },
-{"fsave", 1, 0x9bdd, 6, Modrm, { Mem, 0, 0} },
-{"frstor", 1, 0xdd, 4, Modrm, { Mem, 0, 0} },
-
-{"ffree", 1, 0xddc0, _, ShortForm, { FloatReg, 0, 0} },
-{"fnop", 0, 0xd9d0, _, NoModrm, { 0, 0, 0} },
-{"fwait", 0, 0x9b, _, NoModrm, { 0, 0, 0} },
-
-/*
- opcode prefixes; we allow them as seperate insns too
- (see prefix table below)
-*/
-{"aword", 0, 0x67, _, NoModrm, { 0, 0, 0} },
-{"addr16", 0, 0x67, _, NoModrm, { 0, 0, 0} },
-{"word", 0, 0x66, _, NoModrm, { 0, 0, 0} },
-{"data16", 0, 0x66, _, NoModrm, { 0, 0, 0} },
-{"lock", 0, 0xf0, _, NoModrm, { 0, 0, 0} },
-{"cs", 0, 0x2e, _, NoModrm, { 0, 0, 0} },
-{"ds", 0, 0x3e, _, NoModrm, { 0, 0, 0} },
-{"es", 0, 0x26, _, NoModrm, { 0, 0, 0} },
-{"fs", 0, 0x64, _, NoModrm, { 0, 0, 0} },
-{"gs", 0, 0x65, _, NoModrm, { 0, 0, 0} },
-{"ss", 0, 0x36, _, NoModrm, { 0, 0, 0} },
-{"rep", 0, 0xf3, _, NoModrm, { 0, 0, 0} },
-{"repe", 0, 0xf3, _, NoModrm, { 0, 0, 0} },
-{"repz", 0, 0xf3, _, NoModrm, { 0, 0, 0} },
-{"repne", 0, 0xf2, _, NoModrm, { 0, 0, 0} },
-{"repnz", 0, 0xf2, _, NoModrm, { 0, 0, 0} },
-
-/* 486 extensions */
-
-{"bswap", 1, 0x0fc8, _, ShortForm, { Reg32,0,0 } },
-{"xadd", 2, 0x0fc0, _, DW|Modrm, { Reg, Reg|Mem, 0 } },
-{"cmpxchg", 2, 0x0fb0, _, DW|Modrm, { Reg, Reg|Mem, 0 } },
-{"invd", 0, 0x0f08, _, NoModrm, { 0, 0, 0} },
-{"wbinvd", 0, 0x0f09, _, NoModrm, { 0, 0, 0} },
-{"invlpg", 1, 0x0f01, 7, Modrm, { Mem, 0, 0} },
-
-/* 586 and late 486 extensions */
-{"cpuid", 0, 0x0fa2, _, NoModrm, { 0, 0, 0} },
-
-/* Pentium extensions */
-{"wrmsr", 0, 0x0f30, _, NoModrm, { 0, 0, 0} },
-{"rdtsc", 0, 0x0f31, _, NoModrm, { 0, 0, 0} },
-{"rdmsr", 0, 0x0f32, _, NoModrm, { 0, 0, 0} },
-{"cmpxchg8b", 1, 0x0fc7, 1, Modrm, { Mem, 0, 0} },
-
-/* Pentium Pro extensions */
-{"rdpmc", 0, 0x0f33, _, NoModrm, { 0, 0, 0} },
-
-{"cmovo", 2, 0x0f40, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovno", 2, 0x0f41, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovb", 2, 0x0f42, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovae", 2, 0x0f43, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmove", 2, 0x0f44, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovne", 2, 0x0f45, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovbe", 2, 0x0f46, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmova", 2, 0x0f47, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovs", 2, 0x0f48, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovns", 2, 0x0f49, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovp", 2, 0x0f4a, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovnp", 2, 0x0f4b, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovl", 2, 0x0f4c, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovge", 2, 0x0f4d, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovle", 2, 0x0f4e, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-{"cmovg", 2, 0x0f4f, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
-
-{"fcmovb", 2, 0xdac0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmove", 2, 0xdac8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovbe",2, 0xdad0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovu", 2, 0xdad8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnb", 2, 0xdbc0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovne", 2, 0xdbc8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnbe",2, 0xdbd0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnu", 2, 0xdbd8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-
-{"fcomi", 2, 0xdbf0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucomi", 2, 0xdbe8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcomip", 2, 0xdff0, _, ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucomip",2, 0xdfe8, _, ShortForm, { FloatReg, FloatAcc, 0} },
-
-{"", 0, 0, 0, 0, { 0, 0, 0} } /* sentinel */
-};
-#undef _
-
-static const template *const i386_optab_end
- = i386_optab + sizeof (i386_optab)/sizeof(i386_optab[0]);
-
-/* 386 register table */
-
-static const reg_entry i386_regtab[] = {
- /* 8 bit regs */
- {"al", Reg8|Acc, 0}, {"cl", Reg8|ShiftCount, 1}, {"dl", Reg8, 2},
- {"bl", Reg8, 3},
- {"ah", Reg8, 4}, {"ch", Reg8, 5}, {"dh", Reg8, 6}, {"bh", Reg8, 7},
- /* 16 bit regs */
- {"ax", Reg16|Acc, 0}, {"cx", Reg16, 1}, {"dx", Reg16|InOutPortReg, 2}, {"bx", Reg16, 3},
- {"sp", Reg16, 4}, {"bp", Reg16, 5}, {"si", Reg16, 6}, {"di", Reg16, 7},
- /* 32 bit regs */
- {"eax", Reg32|Acc, 0}, {"ecx", Reg32, 1}, {"edx", Reg32, 2}, {"ebx", Reg32, 3},
- {"esp", Reg32, 4}, {"ebp", Reg32, 5}, {"esi", Reg32, 6}, {"edi", Reg32, 7},
- /* segment registers */
- {"es", SReg2, 0}, {"cs", SReg2, 1}, {"ss", SReg2, 2},
- {"ds", SReg2, 3}, {"fs", SReg3, 4}, {"gs", SReg3, 5},
- /* control registers */
- {"cr0", Control, 0}, {"cr2", Control, 2}, {"cr3", Control, 3},
- {"cr4", Control, 4},
- /* debug registers */
- {"db0", Debug, 0}, {"db1", Debug, 1}, {"db2", Debug, 2},
- {"db3", Debug, 3}, {"db6", Debug, 6}, {"db7", Debug, 7},
- {"dr0", Debug, 0}, {"dr1", Debug, 1}, {"dr2", Debug, 2},
- {"dr3", Debug, 3}, {"dr6", Debug, 6}, {"dr7", Debug, 7},
- /* test registers */
- {"tr3", Test, 3}, {"tr4", Test, 4}, {"tr5", Test, 5},
- {"tr6", Test, 6}, {"tr7", Test, 7},
- /* float registers */
- {"st(0)", FloatReg|FloatAcc, 0},
- {"st", FloatReg|FloatAcc, 0},
- {"st(1)", FloatReg, 1}, {"st(2)", FloatReg, 2},
- {"st(3)", FloatReg, 3}, {"st(4)", FloatReg, 4}, {"st(5)", FloatReg, 5},
- {"st(6)", FloatReg, 6}, {"st(7)", FloatReg, 7}
-};
-
-#define MAX_REG_NAME_SIZE 8 /* for parsing register names from input */
-
-static const reg_entry *const i386_regtab_end
- = i386_regtab + sizeof(i386_regtab)/sizeof(i386_regtab[0]);
-
-/* segment stuff */
-static const seg_entry cs = { "cs", 0x2e };
-static const seg_entry ds = { "ds", 0x3e };
-static const seg_entry ss = { "ss", 0x36 };
-static const seg_entry es = { "es", 0x26 };
-static const seg_entry fs = { "fs", 0x64 };
-static const seg_entry gs = { "gs", 0x65 };
-static const seg_entry null = { "", 0x0 };
-
-/*
- This table is used to store the default segment register implied by all
- possible memory addressing modes.
- It is indexed by the mode & modrm entries of the modrm byte as follows:
- index = (mode<<3) | modrm;
-*/
-static const seg_entry *const one_byte_segment_defaults[] = {
- /* mode 0 */
- &ds, &ds, &ds, &ds, &null, &ds, &ds, &ds,
- /* mode 1 */
- &ds, &ds, &ds, &ds, &null, &ss, &ds, &ds,
- /* mode 2 */
- &ds, &ds, &ds, &ds, &null, &ss, &ds, &ds,
- /* mode 3 --- not a memory reference; never referenced */
-};
-
-static const seg_entry *const two_byte_segment_defaults[] = {
- /* mode 0 */
- &ds, &ds, &ds, &ds, &ss, &ds, &ds, &ds,
- /* mode 1 */
- &ds, &ds, &ds, &ds, &ss, &ds, &ds, &ds,
- /* mode 2 */
- &ds, &ds, &ds, &ds, &ss, &ds, &ds, &ds,
- /* mode 3 --- not a memory reference; never referenced */
-};
-
-static const prefix_entry i386_prefixtab[] = {
-#define ADDR_PREFIX_OPCODE 0x67
- { "addr16", 0x67 }, /* address size prefix ==> 16bit addressing
- * (How is this useful?) */
-#define WORD_PREFIX_OPCODE 0x66
- { "data16", 0x66 }, /* operand size prefix */
- { "lock", 0xf0 }, /* bus lock prefix */
- { "wait", 0x9b }, /* wait for coprocessor */
- { "cs", 0x2e }, { "ds", 0x3e }, /* segment overrides ... */
- { "es", 0x26 }, { "fs", 0x64 },
- { "gs", 0x65 }, { "ss", 0x36 },
-/* REPE & REPNE used to detect rep/repne with a non-string instruction */
-#define REPNE 0xf2
-#define REPE 0xf3
- { "rep", 0xf3 }, /* repeat string instructions */
- { "repe", 0xf3 }, { "repz", 0xf3 },
- { "repne", 0xf2 }, { "repnz", 0xf2 }
-};
-
-static const prefix_entry *const i386_prefixtab_end
- = i386_prefixtab + sizeof(i386_prefixtab)/sizeof(i386_prefixtab[0]);
-
-/* end of i386-opcode.h */
diff --git a/contrib/gdb/include/opcode/i860.h b/contrib/gdb/include/opcode/i860.h
deleted file mode 100644
index b6ebd25c6487..000000000000
--- a/contrib/gdb/include/opcode/i860.h
+++ /dev/null
@@ -1,491 +0,0 @@
-/* Table of opcodes for the i860.
- Copyright (C) 1989 Free Software Foundation, Inc.
-
-This file is part of GAS, the GNU Assembler, and GDB, the GNU disassembler.
-
-GAS/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.
-
-GAS/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 GAS or GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#if !defined(__STDC__) && !defined(const)
-#define const
-#endif
-
-/*
- * Structure of an opcode table entry.
- */
-struct i860_opcode
-{
- const char *name;
- unsigned long match; /* Bits that must be set. */
- unsigned long lose; /* Bits that must not be set. */
- const char *args;
- /* Nonzero if this is a possible expand-instruction. */
- char expand;
-};
-
-enum expand_type
-{
- E_MOV = 1, E_ADDR, E_U32, E_AND, E_S32, E_DELAY
-};
-
-/*
- All i860 opcodes are 32 bits, except for the pseudoinstructions
- and the operations utilizing a 32-bit address expression, an
- unsigned 32-bit constant, or a signed 32-bit constant.
- These opcodes are expanded into a two-instruction sequence for
- any situation where the immediate operand does not fit in 32 bits.
- In the case of the add and subtract operations the expansion is
- to a three-instruction sequence (ex: orh, or, adds). In cases
- where the address is to be relocated, the instruction is
- expanded to handle the worse case, this could be optimized at
- the final link if the actual address were known.
-
- The pseudoinstructions are: mov, fmov, pmov, nop, and fnop.
- These instructions are implemented as a one or two instruction
- sequence of other operations.
-
- The match component is a mask saying which bits must match a
- particular opcode in order for an instruction to be an instance
- of that opcode.
-
- The args component is a string containing one character
- for each operand of the instruction.
-
-Kinds of operands:
- # Number used by optimizer. It is ignored.
- 1 src1 integer register.
- 2 src2 integer register.
- d dest register.
- c ctrlreg control register.
- i 16 bit immediate.
- I 16 bit immediate, aligned.
- 5 5 bit immediate.
- l lbroff 26 bit PC relative immediate.
- r sbroff 16 bit PC relative immediate.
- s split 16 bit immediate.
- S split 16 bit immediate, aligned.
- e src1 floating point register.
- f src2 floating point register.
- g dest floating point register.
-
-*/
-
-/* The order of the opcodes in this table is significant:
-
- * The assembler requires that all instances of the same mnemonic must be
- consecutive. If they aren't, the assembler will bomb at runtime.
-
- * The disassembler should not care about the order of the opcodes. */
-
-static struct i860_opcode i860_opcodes[] =
-{
-
-/* REG-Format Instructions */
-{ "ld.c", 0x30000000, 0xcc000000, "c,d", 0 }, /* ld.c csrc2,idest */
-{ "ld.b", 0x00000000, 0xfc000000, "1(2),d", 0 }, /* ld.b isrc1(isrc2),idest */
-{ "ld.b", 0x04000000, 0xf8000000, "I(2),d", E_ADDR }, /* ld.b #const(isrc2),idest */
-{ "ld.s", 0x10000000, 0xec000001, "1(2),d", 0 }, /* ld.s isrc1(isrc2),idest */
-{ "ld.s", 0x14000001, 0xe8000000, "I(2),d", E_ADDR }, /* ld.s #const(isrc2),idest */
-{ "ld.l", 0x10000001, 0xec000000, "1(2),d", 0 }, /* ld.l isrc1(isrc2),idest */
-{ "ld.l", 0x14000001, 0xe8000000, "I(2),d", E_ADDR }, /* ld.l #const(isrc2),idest */
-
-{ "st.c", 0x38000000, 0xc4000000, "1,c", 0 }, /* st.c isrc1ni,csrc2 */
-{ "st.b", 0x0c000000, 0xf0000000, "1,S(2)", E_ADDR }, /* st.b isrc1ni,#const(isrc2) */
-{ "st.s", 0x1c000000, 0xe0000000, "1,S(2)", E_ADDR }, /* st.s isrc1ni,#const(isrc2) */
-{ "st.l", 0x1c000001, 0xe0000000, "1,S(2)", E_ADDR }, /* st.l isrc1ni,#const(isrc2) */
-
-{ "ixfr", 0x08000000, 0xf4000000, "1,g", 0 }, /* ixfr isrc1ni,fdest */
-
-{ "fld.l", 0x20000002, 0xdc000001, "1(2),g", 0 }, /* fld.l isrc1(isrc2),fdest */
-{ "fld.l", 0x24000002, 0xd8000001, "i(2),g", E_ADDR }, /* fld.l #const(isrc2),fdest */
-{ "fld.l", 0x20000003, 0xdc000000, "1(2)++,g", 0 }, /* fld.l isrc1(isrc2)++,fdest */
-{ "fld.l", 0x24000003, 0xd8000000, "i(2)++,g", E_ADDR }, /* fld.l #const(isrc2)++,fdest */
-{ "fld.d", 0x20000000, 0xdc000007, "1(2),g", 0 }, /* fld.d isrc1(isrc2),fdest */
-{ "fld.d", 0x24000000, 0xd8000007, "i(2),g", E_ADDR }, /* fld.d #const(isrc2),fdest */
-{ "fld.d", 0x20000001, 0xdc000006, "1(2)++,g", 0 }, /* fld.d isrc1(isrc2)++,fdest */
-{ "fld.d", 0x24000001, 0xd8000006, "i(2)++,g", E_ADDR }, /* fld.d #const(isrc2)++,fdest */
-{ "fld.q", 0x20000004, 0xdc000003, "1(2),g", 0 }, /* fld.q isrc1(isrc2),fdest */
-{ "fld.q", 0x24000004, 0xd8000003, "i(2),g", E_ADDR }, /* fld.q #const(isrc2),fdest */
-{ "fld.q", 0x20000005, 0xdc000002, "1(2)++,g", 0 }, /* fld.q isrc1(isrc2)++,fdest */
-{ "fld.q", 0x24000005, 0xd8000002, "i(2)++,g", E_ADDR }, /* fld.q #const(isrc2)++,fdest */
-
-{ "pfld.l", 0x60000000, 0x9c000003, "1(2),g", 0 }, /* pfld.l isrc1(isrc2),fdest */
-{ "pfld.l", 0x64000000, 0x98000003, "i(2),g", E_ADDR }, /* pfld.l #const(isrc2),fdest */
-{ "pfld.l", 0x60000001, 0x9c000002, "1(2)++,g", 0 }, /* pfld.l isrc1(isrc2)++,fdest */
-{ "pfld.l", 0x64000001, 0x98000002, "i(2)++,g", E_ADDR }, /* pfld.l #const(isrc2)++,fdest */
-{ "pfld.d", 0x60000000, 0x9c000007, "1(2),g", 0 }, /* pfld.d isrc1(isrc2),fdest */
-{ "pfld.d", 0x64000000, 0x98000007, "i(2),g", E_ADDR }, /* pfld.d #const(isrc2),fdest */
-{ "pfld.d", 0x60000001, 0x9c000006, "1(2)++,g", 0 }, /* pfld.d isrc1(isrc2)++,fdest */
-{ "pfld.d", 0x64000001, 0x98000006, "i(2)++,g", E_ADDR }, /* pfld.d #const(isrc2)++,fdest */
-
-{ "fst.l", 0x28000002, 0xd4000001, "g,1(2)", 0 }, /* fst.l fdest,isrc1(isrc2) */
-{ "fst.l", 0x2c000002, 0xd0000001, "g,i(2)", E_ADDR }, /* fst.l fdest,#const(isrc2) */
-{ "fst.l", 0x28000003, 0xd4000000, "g,1(2)++", 0 }, /* fst.l fdest,isrc1(isrc2)++ */
-{ "fst.l", 0x2c000003, 0xd0000000, "g,i(2)++", E_ADDR }, /* fst.l fdest,#const(isrc2)++ */
-{ "fst.d", 0x28000000, 0xd4000007, "g,1(2)", 0 }, /* fst.d fdest,isrc1(isrc2) */
-{ "fst.d", 0x2c000000, 0xd0000007, "g,i(2)", E_ADDR }, /* fst.d fdest,#const(isrc2) */
-{ "fst.d", 0x28000001, 0xd4000006, "g,1(2)++", 0 }, /* fst.d fdest,isrc1(isrc2)++ */
-{ "fst.d", 0x2c000001, 0xd0000006, "g,i(2)++", E_ADDR }, /* fst.d fdest,#const(isrc2)++ */
-
-{ "pst.d", 0x3c000000, 0xc0000007, "g,i(2)", E_ADDR }, /* pst.d fdest,#const(isrc2) */
-{ "pst.d", 0x3c000001, 0xc0000006, "g,i(2)++", E_ADDR }, /* pst.d fdest,#const(isrc2)++ */
-
-{ "addu", 0x80000000, 0x7c000000, "1,2,d", 0 }, /* addu isrc1,isrc2,idest */
-{ "addu", 0x84000000, 0x78000000, "i,2,d", E_S32 }, /* addu #const,isrc2,idest */
-{ "adds", 0x90000000, 0x6c000000, "1,2,d", 0 }, /* adds isrc1,isrc2,idest */
-{ "adds", 0x94000000, 0x68000000, "i,2,d", E_S32 }, /* adds #const,isrc2,idest */
-{ "subu", 0x88000000, 0x74000000, "1,2,d", 0 }, /* subu isrc1,isrc2,idest */
-{ "subu", 0x8c000000, 0x70000000, "i,2,d", E_S32 }, /* subu #const,isrc2,idest */
-{ "subs", 0x98000000, 0x64000000, "1,2,d", 0 }, /* subs isrc1,isrc2,idest */
-{ "subs", 0x9c000000, 0x60000000, "i,2,d", E_S32 }, /* subs #const,isrc2,idest */
-
-{ "shl", 0xa0000000, 0x5c000000, "1,2,d", 0 }, /* shl isrc1,isrc2,idest */
-{ "shl", 0xa4000000, 0x58000000, "i,2,d", 0 }, /* shl #const,isrc2,idest */
-{ "shr", 0xa8000000, 0x54000000, "1,2,d", 0 }, /* shr isrc1,isrc2,idest */
-{ "shr", 0xac000000, 0x50000000, "i,2,d", 0 }, /* shr #const,isrc2,idest */
-{ "shrd", 0xb0000000, 0x4c000000, "1,2,d", 0 }, /* shrd isrc1,isrc2,idest */
-{ "shra", 0xb8000000, 0x44000000, "1,2,d", 0 }, /* shra isrc1,isrc2,idest */
-{ "shra", 0xbc000000, 0x40000000, "i,2,d", 0 }, /* shra #const,isrc2,idest */
-
-{ "mov", 0xa0000000, 0x5c00f800, "2,d", 0 }, /* shl r0,isrc2,idest */
-{ "mov", 0x94000000, 0x69e00000, "i,d", E_MOV }, /* adds #const,r0,idest */
-{ "nop", 0xa0000000, 0x5ffff800, "", 0 }, /* shl r0,r0,r0 */
-{ "fnop", 0xb0000000, 0x4ffff800, "", 0 }, /* shrd r0,r0,r0 */
-
-{ "trap", 0x44000000, 0xb8000000, "1,2,d", 0 }, /* trap isrc1ni,isrc2,idest */
-
-{ "flush", 0x34000000, 0xc81f0001, "i(2)", E_ADDR }, /* flush #const(isrc2) */
-{ "flush", 0x34000001, 0xc81f0000, "i(2)++", E_ADDR }, /* flush #const(isrc2)++ */
-
-{ "and", 0xc0000000, 0x3c000000, "1,2,d", 0 }, /* and isrc1,isrc2,idest */
-{ "and", 0xc4000000, 0x38000000, "i,2,d", E_AND }, /* and #const,isrc2,idest */
-{ "andh", 0xc8000000, 0x34000000, "1,2,d", 0 }, /* andh isrc1,isrc2,idest */
-{ "andh", 0xcc000000, 0x30000000, "i,2,d", 0 }, /* andh #const,isrc2,idest */
-{ "andnot", 0xd0000000, 0x2c000000, "1,2,d", 0 }, /* andnot isrc1,isrc2,idest */
-{ "andnot", 0xd4000000, 0x28000000, "i,2,d", E_U32 }, /* andnot #const,isrc2,idest */
-{ "andnoth", 0xd8000000, 0x24000000, "1,2,d", 0 }, /* andnoth isrc1,isrc2,idest */
-{ "andnoth", 0xdc000000, 0x20000000, "i,2,d", 0 }, /* andnoth #const,isrc2,idest */
-{ "or", 0xe0000000, 0x1c000000, "1,2,d", 0 }, /* or isrc1,isrc2,idest */
-{ "or", 0xe4000000, 0x18000000, "i,2,d", E_U32 }, /* or #const,isrc2,idest */
-{ "orh", 0xe8000000, 0x14000000, "1,2,d", 0 }, /* orh isrc1,isrc2,idest */
-{ "orh", 0xec000000, 0x10000000, "i,2,d", 0 }, /* orh #const,isrc2,idest */
-{ "xor", 0xf0000000, 0x0c000000, "1,2,d", 0 }, /* xor isrc1,isrc2,idest */
-{ "xor", 0xf4000000, 0x08000000, "i,2,d", E_U32 }, /* xor #const,isrc2,idest */
-{ "xorh", 0xf8000000, 0x04000000, "1,2,d", 0 }, /* xorh isrc1,isrc2,idest */
-{ "xorh", 0xfc000000, 0x00000000, "i,2,d", 0 }, /* xorh #const,isrc2,idest */
-
-{ "bte", 0x58000000, 0xa4000000, "1,2,s", 0 }, /* bte isrc1s,isrc2,sbroff */
-{ "bte", 0x5c000000, 0xa0000000, "5,2,s", 0 }, /* bte #const5,isrc2,sbroff */
-{ "btne", 0x50000000, 0xac000000, "1,2,s", 0 }, /* btne isrc1s,isrc2,sbroff */
-{ "btne", 0x54000000, 0xa8000000, "5,2,s", 0 }, /* btne #const5,isrc2,sbroff */
-{ "bla", 0xb4000000, 0x48000000, "1,2,s", E_DELAY }, /* bla isrc1s,isrc2,sbroff */
-{ "bri", 0x40000000, 0xbc000000, "1", E_DELAY }, /* bri isrc1ni */
-
-/* Core Escape Instruction Format */
-{ "lock", 0x4c000001, 0xb000001e, "", 0 }, /* lock set BL in dirbase */
-{ "calli", 0x4c000002, 0xb000001d, "1", E_DELAY }, /* calli isrc1ni */
-{ "intovr", 0x4c000004, 0xb000001b, "", 0 }, /* intovr trap on integer overflow */
-{ "unlock", 0x4c000007, 0xb0000018, "", 0 }, /* unlock clear BL in dirbase */
-
-/* CTRL-Format Instructions */
-{ "br", 0x68000000, 0x94000000, "l", E_DELAY }, /* br lbroff */
-{ "call", 0x6c000000, 0x90000000, "l", E_DELAY }, /* call lbroff */
-{ "bc", 0x70000000, 0x8c000000, "l", 0 }, /* bc lbroff */
-{ "bc.t", 0x74000000, 0x88000000, "l", E_DELAY }, /* bc.t lbroff */
-{ "bnc", 0x78000000, 0x84000000, "l", 0 }, /* bnc lbroff */
-{ "bnc.t", 0x7c000000, 0x80000000, "l", E_DELAY }, /* bnc.t lbroff */
-
-/* Floating Point Escape Instruction Format - pfam.p fsrc1,fsrc2,fdest */
-{ "r2p1.ss", 0x48000400, 0xb40003ff, "e,f,g", 0 },
-{ "r2p1.sd", 0x48000480, 0xb400037f, "e,f,g", 0 },
-{ "r2p1.dd", 0x48000580, 0xb400027f, "e,f,g", 0 },
-{ "r2pt.ss", 0x48000401, 0xb40003fe, "e,f,g", 0 },
-{ "r2pt.sd", 0x48000481, 0xb400037e, "e,f,g", 0 },
-{ "r2pt.dd", 0x48000581, 0xb400027e, "e,f,g", 0 },
-{ "r2ap1.ss", 0x48000402, 0xb40003fd, "e,f,g", 0 },
-{ "r2ap1.sd", 0x48000482, 0xb400037d, "e,f,g", 0 },
-{ "r2ap1.dd", 0x48000582, 0xb400027d, "e,f,g", 0 },
-{ "r2apt.ss", 0x48000403, 0xb40003fc, "e,f,g", 0 },
-{ "r2apt.sd", 0x48000483, 0xb400037c, "e,f,g", 0 },
-{ "r2apt.dd", 0x48000583, 0xb400027c, "e,f,g", 0 },
-{ "i2p1.ss", 0x48000404, 0xb40003fb, "e,f,g", 0 },
-{ "i2p1.sd", 0x48000484, 0xb400037b, "e,f,g", 0 },
-{ "i2p1.dd", 0x48000584, 0xb400027b, "e,f,g", 0 },
-{ "i2pt.ss", 0x48000405, 0xb40003fa, "e,f,g", 0 },
-{ "i2pt.sd", 0x48000485, 0xb400037a, "e,f,g", 0 },
-{ "i2pt.dd", 0x48000585, 0xb400027a, "e,f,g", 0 },
-{ "i2ap1.ss", 0x48000406, 0xb40003f9, "e,f,g", 0 },
-{ "i2ap1.sd", 0x48000486, 0xb4000379, "e,f,g", 0 },
-{ "i2ap1.dd", 0x48000586, 0xb4000279, "e,f,g", 0 },
-{ "i2apt.ss", 0x48000407, 0xb40003f8, "e,f,g", 0 },
-{ "i2apt.sd", 0x48000487, 0xb4000378, "e,f,g", 0 },
-{ "i2apt.dd", 0x48000587, 0xb4000278, "e,f,g", 0 },
-{ "rat1p2.ss", 0x48000408, 0xb40003f7, "e,f,g", 0 },
-{ "rat1p2.sd", 0x48000488, 0xb4000377, "e,f,g", 0 },
-{ "rat1p2.dd", 0x48000588, 0xb4000277, "e,f,g", 0 },
-{ "m12apm.ss", 0x48000409, 0xb40003f6, "e,f,g", 0 },
-{ "m12apm.sd", 0x48000489, 0xb4000376, "e,f,g", 0 },
-{ "m12apm.dd", 0x48000589, 0xb4000276, "e,f,g", 0 },
-{ "ra1p2.ss", 0x4800040a, 0xb40003f5, "e,f,g", 0 },
-{ "ra1p2.sd", 0x4800048a, 0xb4000375, "e,f,g", 0 },
-{ "ra1p2.dd", 0x4800058a, 0xb4000275, "e,f,g", 0 },
-{ "m12ttpa.ss", 0x4800040b, 0xb40003f4, "e,f,g", 0 },
-{ "m12ttpa.sd", 0x4800048b, 0xb4000374, "e,f,g", 0 },
-{ "m12ttpa.dd", 0x4800058b, 0xb4000274, "e,f,g", 0 },
-{ "iat1p2.ss", 0x4800040c, 0xb40003f3, "e,f,g", 0 },
-{ "iat1p2.sd", 0x4800048c, 0xb4000373, "e,f,g", 0 },
-{ "iat1p2.dd", 0x4800058c, 0xb4000273, "e,f,g", 0 },
-{ "m12tpm.ss", 0x4800040d, 0xb40003f2, "e,f,g", 0 },
-{ "m12tpm.sd", 0x4800048d, 0xb4000372, "e,f,g", 0 },
-{ "m12tpm.dd", 0x4800058d, 0xb4000272, "e,f,g", 0 },
-{ "ia1p2.ss", 0x4800040e, 0xb40003f1, "e,f,g", 0 },
-{ "ia1p2.sd", 0x4800048e, 0xb4000371, "e,f,g", 0 },
-{ "ia1p2.dd", 0x4800058e, 0xb4000271, "e,f,g", 0 },
-{ "m12tpa.ss", 0x4800040f, 0xb40003f0, "e,f,g", 0 },
-{ "m12tpa.sd", 0x4800048f, 0xb4000370, "e,f,g", 0 },
-{ "m12tpa.dd", 0x4800058f, 0xb4000270, "e,f,g", 0 },
-
-/* Floating Point Escape Instruction Format - pfsm.p fsrc1,fsrc2,fdest */
-{ "r2s1.ss", 0x48000410, 0xb40003ef, "e,f,g", 0 },
-{ "r2s1.sd", 0x48000490, 0xb400036f, "e,f,g", 0 },
-{ "r2s1.dd", 0x48000590, 0xb400026f, "e,f,g", 0 },
-{ "r2st.ss", 0x48000411, 0xb40003ee, "e,f,g", 0 },
-{ "r2st.sd", 0x48000491, 0xb400036e, "e,f,g", 0 },
-{ "r2st.dd", 0x48000591, 0xb400026e, "e,f,g", 0 },
-{ "r2as1.ss", 0x48000412, 0xb40003ed, "e,f,g", 0 },
-{ "r2as1.sd", 0x48000492, 0xb400036d, "e,f,g", 0 },
-{ "r2as1.dd", 0x48000592, 0xb400026d, "e,f,g", 0 },
-{ "r2ast.ss", 0x48000413, 0xb40003ec, "e,f,g", 0 },
-{ "r2ast.sd", 0x48000493, 0xb400036c, "e,f,g", 0 },
-{ "r2ast.dd", 0x48000593, 0xb400026c, "e,f,g", 0 },
-{ "i2s1.ss", 0x48000414, 0xb40003eb, "e,f,g", 0 },
-{ "i2s1.sd", 0x48000494, 0xb400036b, "e,f,g", 0 },
-{ "i2s1.dd", 0x48000594, 0xb400026b, "e,f,g", 0 },
-{ "i2st.ss", 0x48000415, 0xb40003ea, "e,f,g", 0 },
-{ "i2st.sd", 0x48000495, 0xb400036a, "e,f,g", 0 },
-{ "i2st.dd", 0x48000595, 0xb400026a, "e,f,g", 0 },
-{ "i2as1.ss", 0x48000416, 0xb40003e9, "e,f,g", 0 },
-{ "i2as1.sd", 0x48000496, 0xb4000369, "e,f,g", 0 },
-{ "i2as1.dd", 0x48000596, 0xb4000269, "e,f,g", 0 },
-{ "i2ast.ss", 0x48000417, 0xb40003e8, "e,f,g", 0 },
-{ "i2ast.sd", 0x48000497, 0xb4000368, "e,f,g", 0 },
-{ "i2ast.dd", 0x48000597, 0xb4000268, "e,f,g", 0 },
-{ "rat1s2.ss", 0x48000418, 0xb40003e7, "e,f,g", 0 },
-{ "rat1s2.sd", 0x48000498, 0xb4000367, "e,f,g", 0 },
-{ "rat1s2.dd", 0x48000598, 0xb4000267, "e,f,g", 0 },
-{ "m12asm.ss", 0x48000419, 0xb40003e6, "e,f,g", 0 },
-{ "m12asm.sd", 0x48000499, 0xb4000366, "e,f,g", 0 },
-{ "m12asm.dd", 0x48000599, 0xb4000266, "e,f,g", 0 },
-{ "ra1s2.ss", 0x4800041a, 0xb40003e5, "e,f,g", 0 },
-{ "ra1s2.sd", 0x4800049a, 0xb4000365, "e,f,g", 0 },
-{ "ra1s2.dd", 0x4800059a, 0xb4000265, "e,f,g", 0 },
-{ "m12ttsa.ss", 0x4800041b, 0xb40003e4, "e,f,g", 0 },
-{ "m12ttsa.sd", 0x4800049b, 0xb4000364, "e,f,g", 0 },
-{ "m12ttsa.dd", 0x4800059b, 0xb4000264, "e,f,g", 0 },
-{ "iat1s2.ss", 0x4800041c, 0xb40003e3, "e,f,g", 0 },
-{ "iat1s2.sd", 0x4800049c, 0xb4000363, "e,f,g", 0 },
-{ "iat1s2.dd", 0x4800059c, 0xb4000263, "e,f,g", 0 },
-{ "m12tsm.ss", 0x4800041d, 0xb40003e2, "e,f,g", 0 },
-{ "m12tsm.sd", 0x4800049d, 0xb4000362, "e,f,g", 0 },
-{ "m12tsm.dd", 0x4800059d, 0xb4000262, "e,f,g", 0 },
-{ "ia1s2.ss", 0x4800041e, 0xb40003e1, "e,f,g", 0 },
-{ "ia1s2.sd", 0x4800049e, 0xb4000361, "e,f,g", 0 },
-{ "ia1s2.dd", 0x4800059e, 0xb4000261, "e,f,g", 0 },
-{ "m12tsa.ss", 0x4800041f, 0xb40003e0, "e,f,g", 0 },
-{ "m12tsa.sd", 0x4800049f, 0xb4000360, "e,f,g", 0 },
-{ "m12tsa.dd", 0x4800059f, 0xb4000260, "e,f,g", 0 },
-
-/* Floating Point Escape Instruction Format - pfmam.p fsrc1,fsrc2,fdest */
-{ "mr2p1.ss", 0x48000000, 0xb40007ff, "e,f,g", 0 },
-{ "mr2p1.sd", 0x48000080, 0xb400077f, "e,f,g", 0 },
-{ "mr2p1.dd", 0x48000180, 0xb400067f, "e,f,g", 0 },
-{ "mr2pt.ss", 0x48000001, 0xb40007fe, "e,f,g", 0 },
-{ "mr2pt.sd", 0x48000081, 0xb400077e, "e,f,g", 0 },
-{ "mr2pt.dd", 0x48000181, 0xb400067e, "e,f,g", 0 },
-{ "mr2mp1.ss", 0x48000002, 0xb40007fd, "e,f,g", 0 },
-{ "mr2mp1.sd", 0x48000082, 0xb400077d, "e,f,g", 0 },
-{ "mr2mp1.dd", 0x48000182, 0xb400067d, "e,f,g", 0 },
-{ "mr2mpt.ss", 0x48000003, 0xb40007fc, "e,f,g", 0 },
-{ "mr2mpt.sd", 0x48000083, 0xb400077c, "e,f,g", 0 },
-{ "mr2mpt.dd", 0x48000183, 0xb400067c, "e,f,g", 0 },
-{ "mi2p1.ss", 0x48000004, 0xb40007fb, "e,f,g", 0 },
-{ "mi2p1.sd", 0x48000084, 0xb400077b, "e,f,g", 0 },
-{ "mi2p1.dd", 0x48000184, 0xb400067b, "e,f,g", 0 },
-{ "mi2pt.ss", 0x48000005, 0xb40007fa, "e,f,g", 0 },
-{ "mi2pt.sd", 0x48000085, 0xb400077a, "e,f,g", 0 },
-{ "mi2pt.dd", 0x48000185, 0xb400067a, "e,f,g", 0 },
-{ "mi2mp1.ss", 0x48000006, 0xb40007f9, "e,f,g", 0 },
-{ "mi2mp1.sd", 0x48000086, 0xb4000779, "e,f,g", 0 },
-{ "mi2mp1.dd", 0x48000186, 0xb4000679, "e,f,g", 0 },
-{ "mi2mpt.ss", 0x48000007, 0xb40007f8, "e,f,g", 0 },
-{ "mi2mpt.sd", 0x48000087, 0xb4000778, "e,f,g", 0 },
-{ "mi2mpt.dd", 0x48000187, 0xb4000678, "e,f,g", 0 },
-{ "mrmt1p2.ss", 0x48000008, 0xb40007f7, "e,f,g", 0 },
-{ "mrmt1p2.sd", 0x48000088, 0xb4000777, "e,f,g", 0 },
-{ "mrmt1p2.dd", 0x48000188, 0xb4000677, "e,f,g", 0 },
-{ "mm12mpm.ss", 0x48000009, 0xb40007f6, "e,f,g", 0 },
-{ "mm12mpm.sd", 0x48000089, 0xb4000776, "e,f,g", 0 },
-{ "mm12mpm.dd", 0x48000189, 0xb4000676, "e,f,g", 0 },
-{ "mrm1p2.ss", 0x4800000a, 0xb40007f5, "e,f,g", 0 },
-{ "mrm1p2.sd", 0x4800008a, 0xb4000775, "e,f,g", 0 },
-{ "mrm1p2.dd", 0x4800018a, 0xb4000675, "e,f,g", 0 },
-{ "mm12ttpm.ss",0x4800000b, 0xb40007f4, "e,f,g", 0 },
-{ "mm12ttpm.sd",0x4800008b, 0xb4000774, "e,f,g", 0 },
-{ "mm12ttpm.dd",0x4800018b, 0xb4000674, "e,f,g", 0 },
-{ "mimt1p2.ss", 0x4800000c, 0xb40007f3, "e,f,g", 0 },
-{ "mimt1p2.sd", 0x4800008c, 0xb4000773, "e,f,g", 0 },
-{ "mimt1p2.dd", 0x4800018c, 0xb4000673, "e,f,g", 0 },
-{ "mm12tpm.ss", 0x4800000d, 0xb40007f2, "e,f,g", 0 },
-{ "mm12tpm.sd", 0x4800008d, 0xb4000772, "e,f,g", 0 },
-{ "mm12tpm.dd", 0x4800018d, 0xb4000672, "e,f,g", 0 },
-{ "mim1p2.ss", 0x4800000e, 0xb40007f1, "e,f,g", 0 },
-{ "mim1p2.sd", 0x4800008e, 0xb4000771, "e,f,g", 0 },
-{ "mim1p2.dd", 0x4800018e, 0xb4000671, "e,f,g", 0 },
-
-/* Floating Point Escape Instruction Format - pfmsm.p fsrc1,fsrc2,fdest */
-{ "mr2s1.ss", 0x48000010, 0xb40007ef, "e,f,g", 0 },
-{ "mr2s1.sd", 0x48000090, 0xb400076f, "e,f,g", 0 },
-{ "mr2s1.dd", 0x48000190, 0xb400066f, "e,f,g", 0 },
-{ "mr2st.ss", 0x48000011, 0xb40007ee, "e,f,g", 0 },
-{ "mr2st.sd", 0x48000091, 0xb400076e, "e,f,g", 0 },
-{ "mr2st.dd", 0x48000191, 0xb400066e, "e,f,g", 0 },
-{ "mr2ms1.ss", 0x48000012, 0xb40007ed, "e,f,g", 0 },
-{ "mr2ms1.sd", 0x48000092, 0xb400076d, "e,f,g", 0 },
-{ "mr2ms1.dd", 0x48000192, 0xb400066d, "e,f,g", 0 },
-{ "mr2mst.ss", 0x48000013, 0xb40007ec, "e,f,g", 0 },
-{ "mr2mst.sd", 0x48000093, 0xb400076c, "e,f,g", 0 },
-{ "mr2mst.dd", 0x48000193, 0xb400066c, "e,f,g", 0 },
-{ "mi2s1.ss", 0x48000014, 0xb40007eb, "e,f,g", 0 },
-{ "mi2s1.sd", 0x48000094, 0xb400076b, "e,f,g", 0 },
-{ "mi2s1.dd", 0x48000194, 0xb400066b, "e,f,g", 0 },
-{ "mi2st.ss", 0x48000015, 0xb40007ea, "e,f,g", 0 },
-{ "mi2st.sd", 0x48000095, 0xb400076a, "e,f,g", 0 },
-{ "mi2st.dd", 0x48000195, 0xb400066a, "e,f,g", 0 },
-{ "mi2ms1.ss", 0x48000016, 0xb40007e9, "e,f,g", 0 },
-{ "mi2ms1.sd", 0x48000096, 0xb4000769, "e,f,g", 0 },
-{ "mi2ms1.dd", 0x48000196, 0xb4000669, "e,f,g", 0 },
-{ "mi2mst.ss", 0x48000017, 0xb40007e8, "e,f,g", 0 },
-{ "mi2mst.sd", 0x48000097, 0xb4000768, "e,f,g", 0 },
-{ "mi2mst.dd", 0x48000197, 0xb4000668, "e,f,g", 0 },
-{ "mrmt1s2.ss", 0x48000018, 0xb40007e7, "e,f,g", 0 },
-{ "mrmt1s2.sd", 0x48000098, 0xb4000767, "e,f,g", 0 },
-{ "mrmt1s2.dd", 0x48000198, 0xb4000667, "e,f,g", 0 },
-{ "mm12msm.ss", 0x48000019, 0xb40007e6, "e,f,g", 0 },
-{ "mm12msm.sd", 0x48000099, 0xb4000766, "e,f,g", 0 },
-{ "mm12msm.dd", 0x48000199, 0xb4000666, "e,f,g", 0 },
-{ "mrm1s2.ss", 0x4800001a, 0xb40007e5, "e,f,g", 0 },
-{ "mrm1s2.sd", 0x4800009a, 0xb4000765, "e,f,g", 0 },
-{ "mrm1s2.dd", 0x4800019a, 0xb4000665, "e,f,g", 0 },
-{ "mm12ttsm.ss",0x4800001b, 0xb40007e4, "e,f,g", 0 },
-{ "mm12ttsm.sd",0x4800009b, 0xb4000764, "e,f,g", 0 },
-{ "mm12ttsm.dd",0x4800019b, 0xb4000664, "e,f,g", 0 },
-{ "mimt1s2.ss", 0x4800001c, 0xb40007e3, "e,f,g", 0 },
-{ "mimt1s2.sd", 0x4800009c, 0xb4000763, "e,f,g", 0 },
-{ "mimt1s2.dd", 0x4800019c, 0xb4000663, "e,f,g", 0 },
-{ "mm12tsm.ss", 0x4800001d, 0xb40007e2, "e,f,g", 0 },
-{ "mm12tsm.sd", 0x4800009d, 0xb4000762, "e,f,g", 0 },
-{ "mm12tsm.dd", 0x4800019d, 0xb4000662, "e,f,g", 0 },
-{ "mim1s2.ss", 0x4800001e, 0xb40007e1, "e,f,g", 0 },
-{ "mim1s2.sd", 0x4800009e, 0xb4000761, "e,f,g", 0 },
-{ "mim1s2.dd", 0x4800019e, 0xb4000661, "e,f,g", 0 },
-
-
-{ "fmul.ss", 0x48000020, 0xb40007df, "e,f,g", 0 }, /* fmul.p fsrc1,fsrc2,fdest */
-{ "fmul.sd", 0x480000a0, 0xb400075f, "e,f,g", 0 }, /* fmul.p fsrc1,fsrc2,fdest */
-{ "fmul.dd", 0x480001a0, 0xb400065f, "e,f,g", 0 }, /* fmul.p fsrc1,fsrc2,fdest */
-{ "pfmul.ss", 0x48000420, 0xb40003df, "e,f,g", 0 }, /* pfmul.p fsrc1,fsrc2,fdest */
-{ "pfmul.sd", 0x480004a0, 0xb400035f, "e,f,g", 0 }, /* pfmul.p fsrc1,fsrc2,fdest */
-{ "pfmul.dd", 0x480005a0, 0xb400025f, "e,f,g", 0 }, /* pfmul.p fsrc1,fsrc2,fdest */
-{ "pfmul3.dd", 0x480005a4, 0xb400025b, "e,f,g", 0 }, /* pfmul3.p fsrc1,fsrc2,fdest */
-{ "fmlow.dd", 0x480001a1, 0xb400065e, "e,f,g", 0 }, /* fmlow.dd fsrc1,fsrc2,fdest */
-{ "frcp.ss", 0x48000022, 0xb40007dd, "f,g", 0 }, /* frcp.p fsrc2,fdest */
-{ "frcp.sd", 0x480000a2, 0xb400075d, "f,g", 0 }, /* frcp.p fsrc2,fdest */
-{ "frcp.dd", 0x480001a2, 0xb400065d, "f,g", 0 }, /* frcp.p fsrc2,fdest */
-{ "frsqr.ss", 0x48000023, 0xb40007dc, "f,g", 0 }, /* frsqr.p fsrc2,fdest */
-{ "frsqr.sd", 0x480000a3, 0xb400075c, "f,g", 0 }, /* frsqr.p fsrc2,fdest */
-{ "frsqr.dd", 0x480001a3, 0xb400065c, "f,g", 0 }, /* frsqr.p fsrc2,fdest */
-{ "fadd.ss", 0x48000030, 0xb40007cf, "e,f,g", 0 }, /* fadd.p fsrc1,fsrc2,fdest */
-{ "fadd.sd", 0x480000b0, 0xb400074f, "e,f,g", 0 }, /* fadd.p fsrc1,fsrc2,fdest */
-{ "fadd.dd", 0x480001b0, 0xb400064f, "e,f,g", 0 }, /* fadd.p fsrc1,fsrc2,fdest */
-{ "pfadd.ss", 0x48000430, 0xb40003cf, "e,f,g", 0 }, /* pfadd.p fsrc1,fsrc2,fdest */
-{ "pfadd.sd", 0x480004b0, 0xb400034f, "e,f,g", 0 }, /* pfadd.p fsrc1,fsrc2,fdest */
-{ "pfadd.dd", 0x480005b0, 0xb400024f, "e,f,g", 0 }, /* pfadd.p fsrc1,fsrc2,fdest */
-{ "fsub.ss", 0x48000031, 0xb40007ce, "e,f,g", 0 }, /* fsub.p fsrc1,fsrc2,fdest */
-{ "fsub.sd", 0x480000b1, 0xb400074e, "e,f,g", 0 }, /* fsub.p fsrc1,fsrc2,fdest */
-{ "fsub.dd", 0x480001b1, 0xb400064e, "e,f,g", 0 }, /* fsub.p fsrc1,fsrc2,fdest */
-{ "pfsub.ss", 0x48000431, 0xb40003ce, "e,f,g", 0 }, /* pfsub.p fsrc1,fsrc2,fdest */
-{ "pfsub.sd", 0x480004b1, 0xb400034e, "e,f,g", 0 }, /* pfsub.p fsrc1,fsrc2,fdest */
-{ "pfsub.dd", 0x480005b1, 0xb400024e, "e,f,g", 0 }, /* pfsub.p fsrc1,fsrc2,fdest */
-{ "fix.ss", 0x48000032, 0xb40007cd, "e,g", 0 }, /* fix.p fsrc1,fdest */
-{ "fix.sd", 0x480000b2, 0xb400074d, "e,g", 0 }, /* fix.p fsrc1,fdest */
-{ "fix.dd", 0x480001b2, 0xb400064d, "e,g", 0 }, /* fix.p fsrc1,fdest */
-{ "pfix.ss", 0x48000432, 0xb40003cd, "e,g", 0 }, /* pfix.p fsrc1,fdest */
-{ "pfix.sd", 0x480004b2, 0xb400034d, "e,g", 0 }, /* pfix.p fsrc1,fdest */
-{ "pfix.dd", 0x480005b2, 0xb400024d, "e,g", 0 }, /* pfix.p fsrc1,fdest */
-{ "famov.ss", 0x48000033, 0xb40007cc, "e,g", 0 }, /* famov.p fsrc1,fdest */
-{ "famov.ds", 0x48000133, 0xb40006cc, "e,g", 0 }, /* famov.p fsrc1,fdest */
-{ "famov.sd", 0x480000b3, 0xb400074c, "e,g", 0 }, /* famov.p fsrc1,fdest */
-{ "famov.dd", 0x480001b3, 0xb400064c, "e,g", 0 }, /* famov.p fsrc1,fdest */
-{ "pfamov.ss", 0x48000433, 0xb40003cc, "e,g", 0 }, /* pfamov.p fsrc1,fdest */
-{ "pfamov.ds", 0x48000533, 0xb40002cc, "e,g", 0 }, /* pfamov.p fsrc1,fdest */
-{ "pfamov.sd", 0x480004b3, 0xb400034c, "e,g", 0 }, /* pfamov.p fsrc1,fdest */
-{ "pfamov.dd", 0x480005b3, 0xb400024c, "e,g", 0 }, /* pfamov.p fsrc1,fdest */
-/* pfgt has R bit cleared; pfle has R bit set */
-{ "pfgt.ss", 0x48000434, 0xb40003cb, "e,f,g", 0 }, /* pfgt.p fsrc1,fsrc2,fdest */
-{ "pfgt.sd", 0x48000434, 0xb40003cb, "e,f,g", 0 }, /* pfgt.p fsrc1,fsrc2,fdest */
-{ "pfgt.dd", 0x48000534, 0xb40002cb, "e,f,g", 0 }, /* pfgt.p fsrc1,fsrc2,fdest */
-/* pfgt has R bit cleared; pfle has R bit set */
-{ "pfle.ss", 0x480004b4, 0xb400034b, "e,f,g", 0 }, /* pfle.p fsrc1,fsrc2,fdest */
-{ "pfle.sd", 0x480004b4, 0xb400034b, "e,f,g", 0 }, /* pfle.p fsrc1,fsrc2,fdest */
-{ "pfle.dd", 0x480005b4, 0xb400024b, "e,f,g", 0 }, /* pfle.p fsrc1,fsrc2,fdest */
-{ "ftrunc.ss", 0x4800003a, 0xb40007c5, "e,g", 0 }, /* ftrunc.p fsrc1,fdest */
-{ "ftrunc.sd", 0x480000ba, 0xb4000745, "e,g", 0 }, /* ftrunc.p fsrc1,fdest */
-{ "ftrunc.dd", 0x480001ba, 0xb4000645, "e,g", 0 }, /* ftrunc.p fsrc1,fdest */
-{ "pftrunc.ss", 0x4800043a, 0xb40003c5, "e,g", 0 }, /* pftrunc.p fsrc1,fdest */
-{ "pftrunc.sd", 0x480004ba, 0xb4000345, "e,g", 0 }, /* pftrunc.p fsrc1,fdest */
-{ "pftrunc.dd", 0x480005ba, 0xb4000245, "e,g", 0 }, /* pftrunc.p fsrc1,fdest */
-{ "fxfr", 0x48000040, 0xb40007bf, "e,d", 0 }, /* fxfr fsrc1,idest */
-{ "fiadd.ss", 0x48000049, 0xb40007b6, "e,f,g", 0 }, /* fiadd.w fsrc1,fsrc2,fdest */
-{ "fiadd.dd", 0x480001c9, 0xb4000636, "e,f,g", 0 }, /* fiadd.w fsrc1,fsrc2,fdest */
-{ "pfiadd.ss", 0x48000449, 0xb40003b6, "e,f,g", 0 }, /* pfiadd.w fsrc1,fsrc2,fdest */
-{ "pfiadd.dd", 0x480005c9, 0xb4000236, "e,f,g", 0 }, /* pfiadd.w fsrc1,fsrc2,fdest */
-{ "fisub.ss", 0x4800004d, 0xb40007b2, "e,f,g", 0 }, /* fisub.w fsrc1,fsrc2,fdest */
-{ "fisub.dd", 0x480001cd, 0xb4000632, "e,f,g", 0 }, /* fisub.w fsrc1,fsrc2,fdest */
-{ "pfisub.ss", 0x4800044d, 0xb40003b2, "e,f,g", 0 }, /* pfisub.w fsrc1,fsrc2,fdest */
-{ "pfisub.dd", 0x480005cd, 0xb4000232, "e,f,g", 0 }, /* pfisub.w fsrc1,fsrc2,fdest */
-{ "fzchkl", 0x48000057, 0xb40007a8, "e,f,g", 0 }, /* fzchkl fsrc1,fsrc2,fdest */
-{ "pfzchkl", 0x48000457, 0xb40003a8, "e,f,g", 0 }, /* pfzchkl fsrc1,fsrc2,fdest */
-{ "fzchks", 0x4800005f, 0xb40007a0, "e,f,g", 0 }, /* fzchks fsrc1,fsrc2,fdest */
-{ "pfzchks", 0x4800045f, 0xb40003a0, "e,f,g", 0 }, /* pfzchks fsrc1,fsrc2,fdest */
-{ "faddp", 0x48000050, 0xb40007af, "e,f,g", 0 }, /* faddp fsrc1,fsrc2,fdest */
-{ "pfaddp", 0x48000450, 0xb40003af, "e,f,g", 0 }, /* pfaddp fsrc1,fsrc2,fdest */
-{ "faddz", 0x48000051, 0xb40007ae, "e,f,g", 0 }, /* faddz fsrc1,fsrc2,fdest */
-{ "pfaddz", 0x48000451, 0xb40003ae, "e,f,g", 0 }, /* pfaddz fsrc1,fsrc2,fdest */
-{ "form", 0x4800005a, 0xb40007a5, "e,g", 0 }, /* form fsrc1,fdest */
-{ "pform", 0x4800045a, 0xb40003a5, "e,g", 0 }, /* pform fsrc1,fdest */
-
-/* Floating point pseudo-instructions */
-{ "fmov.ss", 0x48000049, 0xb7e007b6, "e,g", 0 }, /* fiadd.ss fsrc1,f0,fdest */
-{ "fmov.dd", 0x480001c9, 0xb7e00636, "e,g", 0 }, /* fiadd.dd fsrc1,f0,fdest */
-{ "fmov.sd", 0x480000b0, 0xb7e0074f, "e,g", 0 }, /* fadd.sd fsrc1,f0,fdest */
-{ "fmov.ds", 0x48000130, 0xb7e006cf, "e,g", 0 }, /* fadd.ds fsrc1,f0,fdest */
-{ "pfmov.ds", 0x48000530, 0xb73002cf, "e,g", 0 }, /* pfadd.ds fsrc1,f0,fdest */
-{ "pfmov.dd", 0x480005c9, 0xb7e00236, "e,g", 0 }, /* pfiadd.dd fsrc1,f0,fdest */
-
-
-};
-
-#define NUMOPCODES ((sizeof i860_opcodes)/(sizeof i860_opcodes[0]))
-
-
diff --git a/contrib/gdb/include/opcode/i960.h b/contrib/gdb/include/opcode/i960.h
deleted file mode 100644
index 8030ad8a843e..000000000000
--- a/contrib/gdb/include/opcode/i960.h
+++ /dev/null
@@ -1,509 +0,0 @@
-/* Basic 80960 instruction formats.
- *
- * The 'COJ' instructions are actually COBR instructions with the 'b' in
- * the mnemonic replaced by a 'j'; they are ALWAYS "de-optimized" if necessary:
- * if the displacement will not fit in 13 bits, the assembler will replace them
- * with the corresponding compare and branch instructions.
- *
- * All of the 'MEMn' instructions are the same format; the 'n' in the name
- * indicates the default index scale factor (the size of the datum operated on).
- *
- * The FBRA formats are not actually an instruction format. They are the
- * "convenience directives" for branching on floating-point comparisons,
- * each of which generates 2 instructions (a 'bno' and one other branch).
- *
- * The CALLJ format is not actually an instruction format. It indicates that
- * the instruction generated (a CTRL-format 'call') should have its relocation
- * specially flagged for link-time replacement with a 'bal' or 'calls' if
- * appropriate.
- */
-
-#define CTRL 0
-#define COBR 1
-#define COJ 2
-#define REG 3
-#define MEM1 4
-#define MEM2 5
-#define MEM4 6
-#define MEM8 7
-#define MEM12 8
-#define MEM16 9
-#define FBRA 10
-#define CALLJ 11
-
-/* Masks for the mode bits in REG format instructions */
-#define M1 0x0800
-#define M2 0x1000
-#define M3 0x2000
-
-/* Generate the 12-bit opcode for a REG format instruction by placing the
- * high 8 bits in instruction bits 24-31, the low 4 bits in instruction bits
- * 7-10.
- */
-
-#define REG_OPC(opc) ((opc & 0xff0) << 20) | ((opc & 0xf) << 7)
-
-/* Generate a template for a REG format instruction: place the opcode bits
- * in the appropriate fields and OR in mode bits for the operands that will not
- * be used. I.e.,
- * set m1=1, if src1 will not be used
- * set m2=1, if src2 will not be used
- * set m3=1, if dst will not be used
- *
- * Setting the "unused" mode bits to 1 speeds up instruction execution(!).
- * The information is also useful to us because some 1-operand REG instructions
- * use the src1 field, others the dst field; and some 2-operand REG instructions
- * use src1/src2, others src1/dst. The set mode bits enable us to distinguish.
- */
-#define R_0(opc) ( REG_OPC(opc) | M1 | M2 | M3 ) /* No operands */
-#define R_1(opc) ( REG_OPC(opc) | M2 | M3 ) /* 1 operand: src1 */
-#define R_1D(opc) ( REG_OPC(opc) | M1 | M2 ) /* 1 operand: dst */
-#define R_2(opc) ( REG_OPC(opc) | M3 ) /* 2 ops: src1/src2 */
-#define R_2D(opc) ( REG_OPC(opc) | M2 ) /* 2 ops: src1/dst */
-#define R_3(opc) ( REG_OPC(opc) ) /* 3 operands */
-
-/* DESCRIPTOR BYTES FOR REGISTER OPERANDS
- *
- * Interpret names as follows:
- * R: global or local register only
- * RS: global, local, or (if target allows) special-function register only
- * RL: global or local register, or integer literal
- * RSL: global, local, or (if target allows) special-function register;
- * or integer literal
- * F: global, local, or floating-point register
- * FL: global, local, or floating-point register; or literal (including
- * floating point)
- *
- * A number appended to a name indicates that registers must be aligned,
- * as follows:
- * 2: register number must be multiple of 2
- * 4: register number must be multiple of 4
- */
-
-#define SFR 0x10 /* Mask for the "sfr-OK" bit */
-#define LIT 0x08 /* Mask for the "literal-OK" bit */
-#define FP 0x04 /* Mask for "floating-point-OK" bit */
-
-/* This macro ors the bits together. Note that 'align' is a mask
- * for the low 0, 1, or 2 bits of the register number, as appropriate.
- */
-#define OP(align,lit,fp,sfr) ( align | lit | fp | sfr )
-
-#define R OP( 0, 0, 0, 0 )
-#define RS OP( 0, 0, 0, SFR )
-#define RL OP( 0, LIT, 0, 0 )
-#define RSL OP( 0, LIT, 0, SFR )
-#define F OP( 0, 0, FP, 0 )
-#define FL OP( 0, LIT, FP, 0 )
-#define R2 OP( 1, 0, 0, 0 )
-#define RL2 OP( 1, LIT, 0, 0 )
-#define F2 OP( 1, 0, FP, 0 )
-#define FL2 OP( 1, LIT, FP, 0 )
-#define R4 OP( 3, 0, 0, 0 )
-#define RL4 OP( 3, LIT, 0, 0 )
-#define F4 OP( 3, 0, FP, 0 )
-#define FL4 OP( 3, LIT, FP, 0 )
-
-#define M 0x7f /* Memory operand (MEMA & MEMB format instructions) */
-
-/* Macros to extract info from the register operand descriptor byte 'od'.
- */
-#define SFR_OK(od) (od & SFR) /* TRUE if sfr operand allowed */
-#define LIT_OK(od) (od & LIT) /* TRUE if literal operand allowed */
-#define FP_OK(od) (od & FP) /* TRUE if floating-point op allowed */
-#define REG_ALIGN(od,n) ((od & 0x3 & n) == 0)
- /* TRUE if reg #n is properly aligned */
-#define MEMOP(od) (od == M) /* TRUE if operand is a memory operand*/
-
-/* Description of a single i80960 instruction */
-struct i960_opcode {
- long opcode; /* 32 bits, constant fields filled in, rest zeroed */
- char *name; /* Assembler mnemonic */
- short iclass; /* Class: see #defines below */
- char format; /* REG, COBR, CTRL, MEMn, COJ, FBRA, or CALLJ */
- char num_ops; /* Number of operands */
- char operand[3];/* Operand descriptors; same order as assembler instr */
-};
-
-/* Classes of 960 intructions:
- * - each instruction falls into one class.
- * - each target architecture supports one or more classes.
- *
- * EACH CONSTANT MUST CONTAIN 1 AND ONLY 1 SET BIT!: see targ_has_iclass().
- */
-#define I_BASE 0x01 /* 80960 base instruction set */
-#define I_CX 0x02 /* 80960Cx instruction */
-#define I_DEC 0x04 /* Decimal instruction */
-#define I_FP 0x08 /* Floating point instruction */
-#define I_KX 0x10 /* 80960Kx instruction */
-#define I_MIL 0x20 /* Military instruction */
-#define I_CASIM 0x40 /* CA simulator instruction */
-#define I_CX2 0x80 /* Cx/Jx/Hx instructions */
-#define I_JX 0x100 /* Jx/Hx instruction */
-#define I_HX 0x200 /* Hx instructions */
-
-/******************************************************************************
- *
- * TABLE OF i960 INSTRUCTION DESCRIPTIONS
- *
- ******************************************************************************/
-
-const struct i960_opcode i960_opcodes[] = {
-
- /* if a CTRL instruction has an operand, it's always a displacement */
-
- /* callj default=='call' */
- { 0x09000000, "callj", I_BASE, CALLJ, 1, { 0, 0, 0 } },
- { 0x08000000, "b", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x09000000, "call", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x0a000000, "ret", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x0b000000, "bal", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x10000000, "bno", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* bf same as bno */
- { 0x10000000, "bf", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* bru same as bno */
- { 0x10000000, "bru", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x11000000, "bg", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* brg same as bg */
- { 0x11000000, "brg", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x12000000, "be", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* bre same as be */
- { 0x12000000, "bre", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x13000000, "bge", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* brge same as bge */
- { 0x13000000, "brge", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x14000000, "bl", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* brl same as bl */
- { 0x14000000, "brl", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x15000000, "bne", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* brlg same as bne */
- { 0x15000000, "brlg", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x16000000, "ble", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* brle same as ble */
- { 0x16000000, "brle", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x17000000, "bo", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* bt same as bo */
- { 0x17000000, "bt", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* bro same as bo */
- { 0x17000000, "bro", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x18000000, "faultno", I_BASE, CTRL, 0, { 0, 0, 0 } },
- /* faultf same as faultno */
- { 0x18000000, "faultf", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x19000000, "faultg", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1a000000, "faulte", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1b000000, "faultge", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1c000000, "faultl", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1d000000, "faultne", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1e000000, "faultle", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1f000000, "faulto", I_BASE, CTRL, 0, { 0, 0, 0 } },
- /* faultt syn for faulto */
- { 0x1f000000, "faultt", I_BASE, CTRL, 0, { 0, 0, 0 } },
-
- { 0x01000000, "syscall", I_CASIM,CTRL, 0, { 0, 0, 0 } },
-
- /* If a COBR (or COJ) has 3 operands, the last one is always a
- * displacement and does not appear explicitly in the table.
- */
-
- { 0x20000000, "testno", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x21000000, "testg", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x22000000, "teste", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x23000000, "testge", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x24000000, "testl", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x25000000, "testne", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x26000000, "testle", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x27000000, "testo", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x30000000, "bbc", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x31000000, "cmpobg", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x32000000, "cmpobe", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x33000000, "cmpobge", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x34000000, "cmpobl", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x35000000, "cmpobne", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x36000000, "cmpoble", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x37000000, "bbs", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x38000000, "cmpibno", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x39000000, "cmpibg", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3a000000, "cmpibe", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3b000000, "cmpibge", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3c000000, "cmpibl", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3d000000, "cmpibne", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3e000000, "cmpible", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3f000000, "cmpibo", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x31000000, "cmpojg", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x32000000, "cmpoje", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x33000000, "cmpojge", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x34000000, "cmpojl", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x35000000, "cmpojne", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x36000000, "cmpojle", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x38000000, "cmpijno", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x39000000, "cmpijg", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3a000000, "cmpije", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3b000000, "cmpijge", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3c000000, "cmpijl", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3d000000, "cmpijne", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3e000000, "cmpijle", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3f000000, "cmpijo", I_BASE, COJ, 3, { RL, RS, 0 } },
-
- { 0x80000000, "ldob", I_BASE, MEM1, 2, { M, R, 0 } },
- { 0x82000000, "stob", I_BASE, MEM1, 2, { R, M, 0 } },
- { 0x84000000, "bx", I_BASE, MEM1, 1, { M, 0, 0 } },
- { 0x85000000, "balx", I_BASE, MEM1, 2, { M, R, 0 } },
- { 0x86000000, "callx", I_BASE, MEM1, 1, { M, 0, 0 } },
- { 0x88000000, "ldos", I_BASE, MEM2, 2, { M, R, 0 } },
- { 0x8a000000, "stos", I_BASE, MEM2, 2, { R, M, 0 } },
- { 0x8c000000, "lda", I_BASE, MEM1, 2, { M, R, 0 } },
- { 0x90000000, "ld", I_BASE, MEM4, 2, { M, R, 0 } },
- { 0x92000000, "st", I_BASE, MEM4, 2, { R, M, 0 } },
- { 0x98000000, "ldl", I_BASE, MEM8, 2, { M, R2, 0 } },
- { 0x9a000000, "stl", I_BASE, MEM8, 2, { R2, M, 0 } },
- { 0xa0000000, "ldt", I_BASE, MEM12, 2, { M, R4, 0 } },
- { 0xa2000000, "stt", I_BASE, MEM12, 2, { R4, M, 0 } },
- { 0xb0000000, "ldq", I_BASE, MEM16, 2, { M, R4, 0 } },
- { 0xb2000000, "stq", I_BASE, MEM16, 2, { R4, M, 0 } },
- { 0xc0000000, "ldib", I_BASE, MEM1, 2, { M, R, 0 } },
- { 0xc2000000, "stib", I_BASE, MEM1, 2, { R, M, 0 } },
- { 0xc8000000, "ldis", I_BASE, MEM2, 2, { M, R, 0 } },
- { 0xca000000, "stis", I_BASE, MEM2, 2, { R, M, 0 } },
-
- { R_3(0x580), "notbit", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x581), "and", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x582), "andnot", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x583), "setbit", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x584), "notand", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x586), "xor", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x587), "or", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x588), "nor", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x589), "xnor", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_2D(0x58a), "not", I_BASE, REG, 2, { RSL,RS, 0 } },
- { R_3(0x58b), "ornot", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x58c), "clrbit", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x58d), "notor", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x58e), "nand", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x58f), "alterbit", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x590), "addo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x591), "addi", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x592), "subo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x593), "subi", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x598), "shro", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x59a), "shrdi", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x59b), "shri", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x59c), "shlo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x59d), "rotate", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x59e), "shli", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_2(0x5a0), "cmpo", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x5a1), "cmpi", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x5a2), "concmpo", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x5a3), "concmpi", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_3(0x5a4), "cmpinco", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x5a5), "cmpinci", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x5a6), "cmpdeco", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x5a7), "cmpdeci", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_2(0x5ac), "scanbyte", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x5ae), "chkbit", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_3(0x5b0), "addc", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x5b2), "subc", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_2D(0x5cc), "mov", I_BASE, REG, 2, { RSL,RS, 0 } },
- { R_2D(0x5dc), "movl", I_BASE, REG, 2, { RL2,R2, 0 } },
- { R_2D(0x5ec), "movt", I_BASE, REG, 2, { RL4,R4, 0 } },
- { R_2D(0x5fc), "movq", I_BASE, REG, 2, { RL4,R4, 0 } },
- { R_3(0x610), "atmod", I_BASE, REG, 3, { RS, RSL,R } },
- { R_3(0x612), "atadd", I_BASE, REG, 3, { RS, RSL,RS } },
- { R_2D(0x640), "spanbit", I_BASE, REG, 2, { RSL,RS, 0 } },
- { R_2D(0x641), "scanbit", I_BASE, REG, 2, { RSL,RS, 0 } },
- { R_3(0x645), "modac", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x650), "modify", I_BASE, REG, 3, { RSL,RSL,R } },
- { R_3(0x651), "extract", I_BASE, REG, 3, { RSL,RSL,R } },
- { R_3(0x654), "modtc", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x655), "modpc", I_BASE, REG, 3, { RSL,RSL,R } },
- { R_1(0x660), "calls", I_BASE, REG, 1, { RSL, 0, 0 } },
- { R_0(0x66b), "mark", I_BASE, REG, 0, { 0, 0, 0 } },
- { R_0(0x66c), "fmark", I_BASE, REG, 0, { 0, 0, 0 } },
- { R_0(0x66d), "flushreg", I_BASE, REG, 0, { 0, 0, 0 } },
- { R_0(0x66f), "syncf", I_BASE, REG, 0, { 0, 0, 0 } },
- { R_3(0x670), "emul", I_BASE, REG, 3, { RSL,RSL,R2 } },
- { R_3(0x671), "ediv", I_BASE, REG, 3, { RSL,RL2,RS } },
- { R_2D(0x672), "cvtadr", I_CASIM,REG, 2, { RL, R2, 0 } },
- { R_3(0x701), "mulo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x708), "remo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x70b), "divo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x741), "muli", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x748), "remi", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x749), "modi", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x74b), "divi", I_BASE, REG, 3, { RSL,RSL,RS } },
-
- /* Floating-point instructions */
-
- { R_2D(0x674), "cvtir", I_FP, REG, 2, { RL, F, 0 } },
- { R_2D(0x675), "cvtilr", I_FP, REG, 2, { RL, F, 0 } },
- { R_3(0x676), "scalerl", I_FP, REG, 3, { RL, FL2,F2 } },
- { R_3(0x677), "scaler", I_FP, REG, 3, { RL, FL, F } },
- { R_3(0x680), "atanr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x681), "logepr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x682), "logr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x683), "remr", I_FP, REG, 3, { FL, FL, F } },
- { R_2(0x684), "cmpor", I_FP, REG, 2, { FL, FL, 0 } },
- { R_2(0x685), "cmpr", I_FP, REG, 2, { FL, FL, 0 } },
- { R_2D(0x688), "sqrtr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x689), "expr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x68a), "logbnr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x68b), "roundr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x68c), "sinr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x68d), "cosr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x68e), "tanr", I_FP, REG, 2, { FL, F, 0 } },
- { R_1(0x68f), "classr", I_FP, REG, 1, { FL, 0, 0 } },
- { R_3(0x690), "atanrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x691), "logeprl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x692), "logrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x693), "remrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_2(0x694), "cmporl", I_FP, REG, 2, { FL2,FL2, 0 } },
- { R_2(0x695), "cmprl", I_FP, REG, 2, { FL2,FL2, 0 } },
- { R_2D(0x698), "sqrtrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x699), "exprl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x69a), "logbnrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x69b), "roundrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x69c), "sinrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x69d), "cosrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x69e), "tanrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_1(0x69f), "classrl", I_FP, REG, 1, { FL2, 0, 0 } },
- { R_2D(0x6c0), "cvtri", I_FP, REG, 2, { FL, R, 0 } },
- { R_2D(0x6c1), "cvtril", I_FP, REG, 2, { FL, R2, 0 } },
- { R_2D(0x6c2), "cvtzri", I_FP, REG, 2, { FL, R, 0 } },
- { R_2D(0x6c3), "cvtzril", I_FP, REG, 2, { FL, R2, 0 } },
- { R_2D(0x6c9), "movr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x6d9), "movrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x6e1), "movre", I_FP, REG, 2, { FL4,F4, 0 } },
- { R_3(0x6e2), "cpysre", I_FP, REG, 3, { FL4,FL4,F4 } },
- { R_3(0x6e3), "cpyrsre", I_FP, REG, 3, { FL4,FL4,F4 } },
- { R_3(0x78b), "divr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x78c), "mulr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x78d), "subr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x78f), "addr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x79b), "divrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x79c), "mulrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x79d), "subrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x79f), "addrl", I_FP, REG, 3, { FL2,FL2,F2 } },
-
- /* These are the floating point branch instructions. Each actually
- * generates 2 branch instructions: the first a CTRL instruction with
- * the indicated opcode, and the second a 'bno'.
- */
-
- { 0x12000000, "brue", I_FP, FBRA, 1, { 0, 0, 0 } },
- { 0x11000000, "brug", I_FP, FBRA, 1, { 0, 0, 0 } },
- { 0x13000000, "bruge", I_FP, FBRA, 1, { 0, 0, 0 } },
- { 0x14000000, "brul", I_FP, FBRA, 1, { 0, 0, 0 } },
- { 0x16000000, "brule", I_FP, FBRA, 1, { 0, 0, 0 } },
- { 0x15000000, "brulg", I_FP, FBRA, 1, { 0, 0, 0 } },
-
-
- /* Decimal instructions */
-
- { R_3(0x642), "daddc", I_DEC, REG, 3, { RSL,RSL,RS } },
- { R_3(0x643), "dsubc", I_DEC, REG, 3, { RSL,RSL,RS } },
- { R_2D(0x644), "dmovt", I_DEC, REG, 2, { RSL,RS, 0 } },
-
-
- /* KX extensions */
-
- { R_2(0x600), "synmov", I_KX, REG, 2, { R, R, 0 } },
- { R_2(0x601), "synmovl", I_KX, REG, 2, { R, R, 0 } },
- { R_2(0x602), "synmovq", I_KX, REG, 2, { R, R, 0 } },
- { R_2D(0x615), "synld", I_KX, REG, 2, { R, R, 0 } },
-
-
- /* MC extensions */
-
- { R_3(0x603), "cmpstr", I_MIL, REG, 3, { R, R, RL } },
- { R_3(0x604), "movqstr", I_MIL, REG, 3, { R, R, RL } },
- { R_3(0x605), "movstr", I_MIL, REG, 3, { R, R, RL } },
- { R_2D(0x613), "inspacc", I_MIL, REG, 2, { R, R, 0 } },
- { R_2D(0x614), "ldphy", I_MIL, REG, 2, { R, R, 0 } },
- { R_3(0x617), "fill", I_MIL, REG, 3, { R, RL, RL } },
- { R_2D(0x646), "condrec", I_MIL, REG, 2, { R, R, 0 } },
- { R_2D(0x656), "receive", I_MIL, REG, 2, { R, R, 0 } },
- { R_3(0x662), "send", I_MIL, REG, 3, { R, RL, R } },
- { R_1(0x663), "sendserv", I_MIL, REG, 1, { R, 0, 0 } },
- { R_1(0x664), "resumprcs", I_MIL, REG, 1, { R, 0, 0 } },
- { R_1(0x665), "schedprcs", I_MIL, REG, 1, { R, 0, 0 } },
- { R_0(0x666), "saveprcs", I_MIL, REG, 0, { 0, 0, 0 } },
- { R_1(0x668), "condwait", I_MIL, REG, 1, { R, 0, 0 } },
- { R_1(0x669), "wait", I_MIL, REG, 1, { R, 0, 0 } },
- { R_1(0x66a), "signal", I_MIL, REG, 1, { R, 0, 0 } },
- { R_1D(0x673), "ldtime", I_MIL, REG, 1, { R2, 0, 0 } },
-
-
- /* CX extensions */
-
- { R_3(0x5d8), "eshro", I_CX2, REG, 3, { RSL,RSL,RS } },
- { R_3(0x630), "sdma", I_CX, REG, 3, { RSL,RSL,RL } },
- { R_3(0x631), "udma", I_CX, REG, 0, { 0, 0, 0 } },
- { R_3(0x659), "sysctl", I_CX2, REG, 3, { RSL,RSL,RL } },
-
-
- /* Jx extensions. */
- { R_3(0x780), "addono", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x790), "addog", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7a0), "addoe", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7b0), "addoge", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7c0), "addol", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7d0), "addone", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7e0), "addole", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7f0), "addoo", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x781), "addino", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x791), "addig", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7a1), "addie", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7b1), "addige", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7c1), "addil", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7d1), "addine", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7e1), "addile", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7f1), "addio", I_JX, REG, 3, { RSL,RSL,RS } },
-
- { R_2D(0x5ad), "bswap", I_JX, REG, 2, { RSL, RS, 0 } },
-
- { R_2(0x594), "cmpob", I_JX, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x595), "cmpib", I_JX, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x596), "cmpos", I_JX, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x597), "cmpis", I_JX, REG, 2, { RSL,RSL, 0 } },
-
- { R_3(0x784), "selno", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x794), "selg", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7a4), "sele", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7b4), "selge", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7c4), "sell", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7d4), "selne", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7e4), "selle", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7f4), "selo", I_JX, REG, 3, { RSL,RSL,RS } },
-
- { R_3(0x782), "subono", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x792), "subog", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7a2), "suboe", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7b2), "suboge", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7c2), "subol", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7d2), "subone", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7e2), "subole", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7f2), "suboo", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x783), "subino", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x793), "subig", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7a3), "subie", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7b3), "subige", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7c3), "subil", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7d3), "subine", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7e3), "subile", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7f3), "subio", I_JX, REG, 3, { RSL,RSL,RS } },
-
- { R_3(0x65c), "dcctl", I_JX, REG, 3, { RSL,RSL,RL } },
- { R_3(0x65b), "icctl", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_2D(0x658), "intctl", I_JX, REG, 2, { RSL, RS, 0 } },
- { R_0(0x5b4), "intdis", I_JX, REG, 0, { 0, 0, 0 } },
- { R_0(0x5b5), "inten", I_JX, REG, 0, { 0, 0, 0 } },
- { R_0(0x65d), "halt", I_JX, REG, 0, { 0, 0, 0 } },
-
- /* Hx extensions. */
- { 0xac000000, "dcinva", I_HX, MEM1, 1, { M, 0, 0 } },
-
- /* END OF TABLE */
-
- { 0, NULL, 0, 0, 0, { 0, 0, 0 } }
-};
-
- /* end of i960-opcode.h */
diff --git a/contrib/gdb/include/opcode/m68k.h b/contrib/gdb/include/opcode/m68k.h
deleted file mode 100644
index e0b371c92bb7..000000000000
--- a/contrib/gdb/include/opcode/m68k.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/* Opcode table header for m680[01234]0/m6888[12]/m68851.
- Copyright 1989, 1991, 1992, 1993, 1994, 1995 Free Software Foundation.
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
-
-/* These are used as bit flags for the arch field in the m68k_opcode
- structure. */
-#define _m68k_undef 0
-#define m68000 0x001
-#define m68008 m68000 /* synonym for -m68000. otherwise unused. */
-#define m68010 0x002
-#define m68020 0x004
-#define m68030 0x008
-#define m68ec030 m68030 /* similar enough to -m68030 to ignore differences;
- gas will deal with the few differences. */
-#define m68040 0x010
-/* there is no 68050 */
-#define m68060 0x020
-#define m68881 0x040
-#define m68882 m68881 /* synonym for -m68881. otherwise unused. */
-#define m68851 0x080
-#define cpu32 0x100 /* e.g., 68332 */
-
- /* handy aliases */
-#define m68040up (m68040 | m68060)
-#define m68030up (m68030 | m68040up)
-#define m68020up (m68020 | m68030up)
-#define m68010up (m68010 | cpu32 | m68020up)
-#define m68000up (m68000 | m68010up)
-
-#define mfloat (m68881 | m68882 | m68040 | m68060)
-#define mmmu (m68851 | m68030 | m68040 | m68060)
-
-/* The structure used to hold information for an opcode. */
-
-struct m68k_opcode
-{
- /* The opcode name. */
- const char *name;
- /* The opcode itself. */
- unsigned long opcode;
- /* The mask used by the disassembler. */
- unsigned long match;
- /* The arguments. */
- const char *args;
- /* The architectures which support this opcode. */
- unsigned int arch;
-};
-
-/* The structure used to hold information for an opcode alias. */
-
-struct m68k_opcode_alias
-{
- /* The alias name. */
- const char *alias;
- /* The instruction for which this is an alias. */
- const char *primary;
-};
-
-/* We store four bytes of opcode for all opcodes because that is the
- most any of them need. The actual length of an instruction is
- always at least 2 bytes, and is as much longer as necessary to hold
- the operands it has.
-
- The match field is a mask saying which bits must match particular
- opcode in order for an instruction to be an instance of that
- opcode.
-
- The args field is a string containing two characters for each
- operand of the instruction. The first specifies the kind of
- operand; the second, the place it is stored. */
-
-/* Kinds of operands:
- Characters used: AaBCcDdFfIJkLlMOQRrSsTtUVWXYZ0123|*~%;@!&$?/#^+-
-
- D data register only. Stored as 3 bits.
- A address register only. Stored as 3 bits.
- a address register indirect only. Stored as 3 bits.
- R either kind of register. Stored as 4 bits.
- r either kind of register indirect only. Stored as 4 bits.
- At the moment, used only for cas2 instruction.
- F floating point coprocessor register only. Stored as 3 bits.
- O an offset (or width): immediate data 0-31 or data register.
- Stored as 6 bits in special format for BF... insns.
- + autoincrement only. Stored as 3 bits (number of the address register).
- - autodecrement only. Stored as 3 bits (number of the address register).
- Q quick immediate data. Stored as 3 bits.
- This matches an immediate operand only when value is in range 1 .. 8.
- M moveq immediate data. Stored as 8 bits.
- This matches an immediate operand only when value is in range -128..127
- T trap vector immediate data. Stored as 4 bits.
-
- k K-factor for fmove.p instruction. Stored as a 7-bit constant or
- a three bit register offset, depending on the field type.
-
- # immediate data. Stored in special places (b, w or l)
- which say how many bits to store.
- ^ immediate data for floating point instructions. Special places
- are offset by 2 bytes from '#'...
- B pc-relative address, converted to an offset
- that is treated as immediate data.
- d displacement and register. Stores the register as 3 bits
- and stores the displacement in the entire second word.
-
- C the CCR. No need to store it; this is just for filtering validity.
- S the SR. No need to store, just as with CCR.
- U the USP. No need to store, just as with CCR.
-
- I Coprocessor ID. Not printed if 1. The Coprocessor ID is always
- extracted from the 'd' field of word one, which means that an extended
- coprocessor opcode can be skipped using the 'i' place, if needed.
-
- s System Control register for the floating point coprocessor.
-
- J Misc register for movec instruction, stored in 'j' format.
- Possible values:
- 0x000 SFC Source Function Code reg [60, 40, 30, 20, 10]
- 0x001 DFC Data Function Code reg [60, 40, 30, 20, 10]
- 0x002 CACR Cache Control Register [60, 40, 30, 20]
- 0x003 TC MMU Translation Control [60, 40]
- 0x004 ITT0 Instruction Transparent
- Translation reg 0 [60, 40]
- 0x005 ITT1 Instruction Transparent
- Translation reg 1 [60, 40]
- 0x006 DTT0 Data Transparent
- Translation reg 0 [60, 40]
- 0x007 DTT1 Data Transparent
- Translation reg 1 [60, 40]
- 0x008 BUSCR Bus Control Register [60]
- 0x800 USP User Stack Pointer [60, 40, 30, 20, 10]
- 0x801 VBR Vector Base reg [60, 40, 30, 20, 10]
- 0x802 CAAR Cache Address Register [ 30, 20]
- 0x803 MSP Master Stack Pointer [ 40, 30, 20]
- 0x804 ISP Interrupt Stack Pointer [ 40, 30, 20]
- 0x805 MMUSR MMU Status reg [ 40]
- 0x806 URP User Root Pointer [60, 40]
- 0x807 SRP Supervisor Root Pointer [60, 40]
- 0x808 PCR Processor Configuration reg [60]
-
- L Register list of the type d0-d7/a0-a7 etc.
- (New! Improved! Can also hold fp0-fp7, as well!)
- The assembler tries to see if the registers match the insn by
- looking at where the insn wants them stored.
-
- l Register list like L, but with all the bits reversed.
- Used for going the other way. . .
-
- c cache identifier which may be "nc" for no cache, "ic"
- for instruction cache, "dc" for data cache, or "bc"
- for both caches. Used in cinv and cpush. Always
- stored in position "d".
-
- The remainder are all stored as 6 bits using an address mode and a
- register number; they differ in which addressing modes they match.
-
- * all (modes 0-6,7.*)
- ~ alterable memory (modes 2-6,7.0,7.1)
- (not 0,1,7.~)
- % alterable (modes 0-6,7.0,7.1)(not 7.~)
- ; data (modes 0,2-6,7.*)(not 1)
- @ data, but not immediate (modes 0,2-6,7.? ? ?)
- (not 1,7.?)
- This may really be ;,
- the 68020 book says it is
- ! control (modes 2,5,6,7.*-)
- (not 0,1,3,4,7.4)
- & alterable control (modes 2,5,6,7.0,7.1)
- (not 0,1,7.? ? ?)
- $ alterable data (modes 0,2-6,7.0,7.1)
- (not 1,7.~)
- ? alterable control, or data register (modes 0,2,5,6,7.0,7.1)
- (not 1,3,4,7.~)
- / control, or data register (modes 0,2,5,6,7.0,7.1,7.2,7.3)
- (not 1,3,4,7.4)
- ` control, plus pre-dec, not simple indir. (modes 4,5,6,7.*-)
- (not 0,1,2,3,7.4) */
-
-/* For the 68851: */
-/*
- I didn't use much imagination in choosing the
- following codes, so many of them aren't very
- mnemonic. -rab
-
- 0 32 bit pmmu register
- Possible values:
- 000 TC Translation Control Register (68030, 68851)
-
- 1 16 bit pmmu register
- 111 AC Access Control (68851)
-
- 2 8 bit pmmu register
- 100 CAL Current Access Level (68851)
- 101 VAL Validate Access Level (68851)
- 110 SCC Stack Change Control (68851)
-
- 3 68030-only pmmu registers (32 bit)
- 010 TT0 Transparent Translation reg 0
- (aka Access Control reg 0 -- AC0 -- on 68ec030)
- 011 TT1 Transparent Translation reg 1
- (aka Access Control reg 1 -- AC1 -- on 68ec030)
-
- W wide pmmu registers
- Possible values:
- 001 DRP Dma Root Pointer (68851)
- 010 SRP Supervisor Root Pointer (68030, 68851)
- 011 CRP Cpu Root Pointer (68030, 68851)
-
- f function code register (68030, 68851)
- 0 SFC
- 1 DFC
-
- V VAL register only (68851)
-
- X BADx, BACx (16 bit)
- 100 BAD Breakpoint Acknowledge Data (68851)
- 101 BAC Breakpoint Acknowledge Control (68851)
-
- Y PSR (68851) (MMUSR on 68030) (ACUSR on 68ec030)
- Z PCSR (68851)
-
- | memory (modes 2-6, 7.*)
-
- t address test level (68030 only)
- Stored as 3 bits, range 0-7.
- Also used for breakpoint instruction now.
-
-*/
-
-/* Places to put an operand, for non-general operands:
- s source, low bits of first word.
- d dest, shifted 9 in first word
- 1 second word, shifted 12
- 2 second word, shifted 6
- 3 second word, shifted 0
- 4 third word, shifted 12
- 5 third word, shifted 6
- 6 third word, shifted 0
- 7 second word, shifted 7
- 8 second word, shifted 10
- 9 second word, shifted 5
- D store in both place 1 and place 3; for divul and divsl.
- B first word, low byte, for branch displacements
- W second word (entire), for branch displacements
- L second and third words (entire), for branch displacements
- (also overloaded for move16)
- b second word, low byte
- w second word (entire) [variable word/long branch offset for dbra]
- W second word (entire) (must be signed 16 bit value)
- l second and third word (entire)
- g variable branch offset for bra and similar instructions.
- The place to store depends on the magnitude of offset.
- t store in both place 7 and place 8; for floating point operations
- c branch offset for cpBcc operations.
- The place to store is word two if bit six of word one is zero,
- and words two and three if bit six of word one is one.
- i Increment by two, to skip over coprocessor extended operands. Only
- works with the 'I' format.
- k Dynamic K-factor field. Bits 6-4 of word 2, used as a register number.
- Also used for dynamic fmovem instruction.
- C floating point coprocessor constant - 7 bits. Also used for static
- K-factors...
- j Movec register #, stored in 12 low bits of second word.
-
- Places to put operand, for general operands:
- d destination, shifted 6 bits in first word
- b source, at low bit of first word, and immediate uses one byte
- w source, at low bit of first word, and immediate uses two bytes
- l source, at low bit of first word, and immediate uses four bytes
- s source, at low bit of first word.
- Used sometimes in contexts where immediate is not allowed anyway.
- f single precision float, low bit of 1st word, immediate uses 4 bytes
- F double precision float, low bit of 1st word, immediate uses 8 bytes
- x extended precision float, low bit of 1st word, immediate uses 12 bytes
- p packed float, low bit of 1st word, immediate uses 12 bytes
-*/
-
-extern const struct m68k_opcode m68k_opcodes[];
-extern const struct m68k_opcode_alias m68k_opcode_aliases[];
-
-extern const int m68k_numopcodes, m68k_numaliases;
-
-/* end of m68k-opcode.h */
diff --git a/contrib/gdb/include/opcode/m88k.h b/contrib/gdb/include/opcode/m88k.h
deleted file mode 100644
index a17fa0361dac..000000000000
--- a/contrib/gdb/include/opcode/m88k.h
+++ /dev/null
@@ -1,923 +0,0 @@
-/* Table of opcodes for the motorola 88k family.
- Copyright 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
-
-This file is part of GDB and GAS.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/*
- * Disassembler Instruction Table
- *
- * The first field of the table is the opcode field. If an opcode
- * is specified which has any non-opcode bits on, a system error
- * will occur when the system attempts the install it into the
- * instruction table. The second parameter is a pointer to the
- * instruction mnemonic. Each operand is specified by offset, width,
- * and type. The offset is the bit number of the least significant
- * bit of the operand with bit 0 being the least significant bit of
- * the instruction. The width is the number of bits used to specify
- * the operand. The type specifies the output format to be used for
- * the operand. The valid formats are: register, register indirect,
- * hex constant, and bit field specification. The last field is a
- * pointer to the next instruction in the linked list. These pointers
- * are initialized by init_disasm().
- *
- * Structure Format
- *
- * struct INSTAB {
- * UPINT opcode;
- * char *mnemonic;
- * struct OPSPEC op1,op2,op3;
- * struct SIM_FLAGS flgs;
- * struct INSTAB *next;
- * }
- *
- * struct OPSPEC {
- * UPINT offset:5;
- * UPINT width:6;
- * UPINT type:5;
- * }
- *
- * Revision History
- *
- * Revision 1.0 11/08/85 Creation date
- * 1.1 02/05/86 Updated instruction mnemonic table MD
- * 1.2 06/16/86 Updated SIM_FLAGS for floating point
- * 1.3 09/20/86 Updated for new encoding
- * 05/11/89 R. Trawick adapted from Motorola disassembler
- */
-
-#include <stdio.h>
-
-
-/*
- * This file contains the structures and constants needed to build the M88000
- * simulator. It is the main include file, containing all the
- * structures, macros and definitions except for the floating point
- * instruction set.
- */
-
-/*
- * The following flag informs the Simulator as to what type of byte ordering
- * will be used. For instance, a BOFLAG = 1 indicates a DEC VAX and IBM type
- * of ordering shall be used.
-*/
-
-/* # define BOFLAG 1 */ /* BYTE ORDERING FLAG */
-
-/* define the number of bits in the primary opcode field of the instruction,
- * the destination field, the source 1 and source 2 fields.
- */
-# define OP 8 /* size of opcode field */
-# define DEST 6 /* size of destination */
-# define SOURCE1 6 /* size of source1 */
-# define SOURCE2 6 /* size of source2 */
-
-# define REGs 32 /* number of registers */
-
-# define WORD long
-# define FLAG unsigned
-# define STATE short
-
-# define TRUE 1
-# define FALSE 0
-
-# define READ 0
-# define WRITE 1
-
-/* The next four equates define the priorities that the various classes
- * of instructions have regarding writing results back into registers and
- * signalling exceptions.
- */
-/* PMEM is also defined in <sys/param.h> on Delta 88's. Sigh! */
-#undef PMEM
-
-# define PINT 0 /* Integer Priority */
-# define PFLT 1 /* Floating Point Priority */
-# define PMEM 2 /* Memory Priority */
-# define NA 3 /* Not Applicable, instruction doesnt write to regs */
-# define HIPRI 3 /* highest of these priorities */
-
-/* The instruction registers are an artificial mechanism to speed up
- * simulator execution. In the real processor, an instruction register
- * is 32 bits wide. In the simulator, the 32 bit instruction is kept in
- * a structure field called rawop, and the instruction is partially decoded,
- * and split into various fields and flags which make up the other fields
- * of the structure.
- * The partial decode is done when the instructions are initially loaded
- * into simulator memory. The simulator code memory is not an array of
- * 32 bit words, but is an array of instruction register structures.
- * Yes this wastes memory, but it executes much quicker.
- */
-
-struct IR_FIELDS {
- unsigned op:OP,
- dest: DEST,
- src1: SOURCE1,
- src2: SOURCE2;
- int ltncy,
- extime,
- wb_pri; /* writeback priority */
- unsigned imm_flags:2,/* immediate size */
- rs1_used:1, /* register source 1 used */
- rs2_used:1, /* register source 2 used */
- rsd_used:1, /* register source/dest. used */
- c_flag:1, /* complement */
- u_flag:1, /* upper half word */
- n_flag:1, /* execute next */
- wb_flag:1, /* uses writeback slot */
- dest_64:1, /* dest size */
- s1_64:1, /* source 1 size */
- s2_64:1, /* source 2 size */
- scale_flag:1, /* scaled register */
- brk_flg:1;
- };
-
-struct mem_segs {
- struct mem_wrd *seg; /* pointer (returned by calloc) to segment */
- unsigned long baseaddr; /* base load address from file headers */
- unsigned long endaddr; /* Ending address of segment */
- int flags; /* segment control flags (none defined 12/5/86) */
-};
-
-#define MAXSEGS (10) /* max number of segment allowed */
-#define MEMSEGSIZE (sizeof(struct mem_segs))/* size of mem_segs structure */
-
-
-#define BRK_RD (0x01) /* break on memory read */
-#define BRK_WR (0x02) /* break on memory write */
-#define BRK_EXEC (0x04) /* break on execution */
-#define BRK_CNT (0x08) /* break on terminal count */
-
-
-struct mem_wrd {
- struct IR_FIELDS opcode; /* simulator instruction break down */
- union {
- unsigned long l; /* memory element break down */
- unsigned short s[2];
- unsigned char c[4];
- } mem;
-};
-
-#define MEMWRDSIZE (sizeof(struct mem_wrd)) /* size of each 32 bit memory model */
-
-/* External declarations */
-
-extern struct mem_segs memory[];
-extern struct PROCESSOR m78000;
-
-struct PROCESSOR {
- unsigned WORD
- ip, /* execute instruction pointer */
- vbr, /* vector base register */
- psr; /* processor status register */
-
- WORD S1bus, /* source 1 */
- S2bus, /* source 2 */
- Dbus, /* destination */
- DAbus, /* data address bus */
- ALU,
- Regs[REGs], /* data registers */
- time_left[REGs], /* max clocks before reg is available */
- wb_pri[REGs], /* writeback priority of reg */
- SFU0_regs[REGs], /* integer unit control regs */
- SFU1_regs[REGs], /* floating point control regs */
- Scoreboard[REGs],
- Vbr;
- unsigned WORD scoreboard,
- Psw,
- Tpsw;
- FLAG jump_pending:1; /* waiting for a jump instr. */
- };
-
-# define i26bit 1 /* size of immediate field */
-# define i16bit 2
-# define i10bit 3
-
-/* Definitions for fields in psr */
-
-# define mode 31
-# define rbo 30
-# define ser 29
-# define carry 28
-# define sf7m 11
-# define sf6m 10
-# define sf5m 9
-# define sf4m 8
-# define sf3m 7
-# define sf2m 6
-# define sf1m 5
-# define mam 4
-# define inm 3
-# define exm 2
-# define trm 1
-# define ovfm 0
-
-#define MODEMASK (1<<(mode-1))
-# define SILENT 0 /* simulate without output to crt */
-# define VERBOSE 1 /* simulate in verbose mode */
-# define PR_INSTR 2 /* only print instructions */
-
-# define RESET 16 /* reset phase */
-
-# define PHASE1 0 /* data path phases */
-# define PHASE2 1
-
-/* the 1 clock operations */
-
-# define ADDU 1
-# define ADDC 2
-# define ADDUC 3
-# define ADD 4
-
-# define SUBU ADD+1
-# define SUBB ADD+2
-# define SUBUB ADD+3
-# define SUB ADD+4
-
-# define AND_ ADD+5
-# define OR ADD+6
-# define XOR ADD+7
-# define CMP ADD+8
-
-/* the LOADS */
-
-# define LDAB CMP+1
-# define LDAH CMP+2
-# define LDA CMP+3
-# define LDAD CMP+4
-
-# define LDB LDAD+1
-# define LDH LDAD+2
-# define LD LDAD+3
-# define LDD LDAD+4
-# define LDBU LDAD+5
-# define LDHU LDAD+6
-
-/* the STORES */
-
-# define STB LDHU+1
-# define STH LDHU+2
-# define ST LDHU+3
-# define STD LDHU+4
-
-/* the exchange */
-
-# define XMEMBU LDHU+5
-# define XMEM LDHU+6
-
-/* the branches */
-# define JSR STD+1
-# define BSR STD+2
-# define BR STD+3
-# define JMP STD+4
-# define BB1 STD+5
-# define BB0 STD+6
-# define RTN STD+7
-# define BCND STD+8
-
-/* the TRAPS */
-# define TB1 BCND+1
-# define TB0 BCND+2
-# define TCND BCND+3
-# define RTE BCND+4
-# define TBND BCND+5
-
-/* the MISC instructions */
-# define MUL TBND + 1
-# define DIV MUL +2
-# define DIVU MUL +3
-# define MASK MUL +4
-# define FF0 MUL +5
-# define FF1 MUL +6
-# define CLR MUL +7
-# define SET MUL +8
-# define EXT MUL +9
-# define EXTU MUL +10
-# define MAK MUL +11
-# define ROT MUL +12
-
-/* control register manipulations */
-
-# define LDCR ROT +1
-# define STCR ROT +2
-# define XCR ROT +3
-
-# define FLDCR ROT +4
-# define FSTCR ROT +5
-# define FXCR ROT +6
-
-
-# define NOP XCR +1
-
-/* floating point instructions */
-
-# define FADD NOP +1
-# define FSUB NOP +2
-# define FMUL NOP +3
-# define FDIV NOP +4
-# define FSQRT NOP +5
-# define FCMP NOP +6
-# define FIP NOP +7
-# define FLT NOP +8
-# define INT NOP +9
-# define NINT NOP +10
-# define TRNC NOP +11
-# define FLDC NOP +12
-# define FSTC NOP +13
-# define FXC NOP +14
-
-# define UEXT(src,off,wid) ((((unsigned int)(src))>>(off)) & ((1<<(wid)) - 1))
-# define SEXT(src,off,wid) (((((int)(src))<<(32-((off)+(wid)))) >>(32-(wid))) )
-# define MAKE(src,off,wid) \
- ((((unsigned int)(src)) & ((1<<(wid)) - 1)) << (off))
-
-# define opword(n) (unsigned long) (memaddr->mem.l)
-
-/* Constants and Masks */
-
-#define SFU0 0x80000000
-#define SFU1 0x84000000
-#define SFU7 0x9c000000
-#define RRI10 0xf0000000
-#define RRR 0xf4000000
-#define SFUMASK 0xfc00ffe0
-#define RRRMASK 0xfc00ffe0
-#define RRI10MASK 0xfc00fc00
-#define DEFMASK 0xfc000000
-#define CTRL 0x0000f000
-#define CTRLMASK 0xfc00f800
-
-/* Operands types */
-
-enum operand_type {
- HEX = 1,
- REG = 2,
- CONT = 3,
- IND = 3,
- BF = 4,
- REGSC = 5 /* scaled register */,
- CRREG = 6 /* control register */,
- FCRREG = 7 /* floating point control register */,
- PCREL = 8,
- CONDMASK = 9,
- XREG = 10, /* extended register */
- DEC = 11, /* decimal */
-};
-
-/* Hashing Specification */
-
-#define HASHVAL 79
-
-/* Type definitions */
-
-typedef unsigned int UINT;
-
-/* Structure templates */
-
-#if never
-typedef struct {
- unsigned int offset:5;
- unsigned int width:6;
- unsigned int type:5;
-} OPSPEC;
-#endif
-
-typedef struct {
- unsigned int offset;
- unsigned int width;
- enum operand_type type;
-} OPSPEC;
-
- struct SIM_FLAGS {
- int ltncy, /* latency (max number of clocks needed to execute) */
- extime, /* execution time (min number of clocks needed to execute) */
- wb_pri; /* writeback slot priority */
- unsigned op:OP, /* simulator version of opcode */
- imm_flags:2, /* 10,16 or 26 bit immediate flags */
- rs1_used:1, /* register source 1 used */
- rs2_used:1, /* register source 2 used */
- rsd_used:1, /* register source/dest used */
- c_flag:1, /* complement */
- u_flag:1, /* upper half word */
- n_flag:1, /* execute next */
- wb_flag:1, /* uses writeback slot */
- dest_64:1, /* double precision dest */
- s1_64:1, /* double precision source 1 */
- s2_64:1, /* double precision source 2 */
- scale_flag:1; /* register is scaled */
-};
-
-typedef struct INSTRUCTAB {
- unsigned int opcode;
- char *mnemonic;
- OPSPEC op1,op2,op3;
- struct SIM_FLAGS flgs;
- struct INSTRUCTAB *next;
-} INSTAB;
-
-
-#define NO_OPERAND {0,0,0}
-
-/* Opcode Mnemonic Op 1 Spec Op 2 Spec Op 3 Spec Simflags Next */
-
-static INSTAB instructions[] = {
- {0xf400c800,"jsr ",{0,5,REG} ,NO_OPERAND ,NO_OPERAND , {2,2,NA,JSR , 0,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf400cc00,"jsr.n ",{0,5,REG} ,NO_OPERAND ,NO_OPERAND , {1,1,NA,JSR , 0,0,1,0,0,0,1,1,0,0,0,0}, NULL },
- {0xf400c000,"jmp ",{0,5,REG} ,NO_OPERAND ,NO_OPERAND , {2,2,NA,JMP , 0,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf400c400,"jmp.n ",{0,5,REG} ,NO_OPERAND ,NO_OPERAND , {1,1,NA,JMP , 0,0,1,0,0,0,1,1,0,0,0,0}, NULL },
- {0xc8000000,"bsr ",{0,26,PCREL},NO_OPERAND ,NO_OPERAND , {2,2,NA,BSR , i26bit,0,0,0,0,0,0,1,0,0,0,0}, NULL },
- {0xcc000000,"bsr.n ",{0,26,PCREL},NO_OPERAND ,NO_OPERAND , {1,1,NA,BSR , i26bit,0,0,0,0,0,1,1,0,0,0,0}, NULL },
- {0xc0000000,"br ",{0,26,PCREL},NO_OPERAND ,NO_OPERAND , {2,2,NA,BR , i26bit,0,0,0,0,0,0,1,0,0,0,0}, NULL },
- {0xc4000000,"br.n ",{0,26,PCREL},NO_OPERAND ,NO_OPERAND , {1,1,NA,BR , i26bit,0,0,0,0,0,1,1,0,0,0,0}, NULL },
- {0xd0000000,"bb0 ",{21,5,HEX} ,{16,5,REG} ,{0,16,PCREL},{2,2,NA,BB0, i16bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xd4000000,"bb0.n ",{21,5,HEX} ,{16,5,REG} ,{0,16,PCREL},{1,1,NA,BB0, i16bit,0,1,0,0,0,1,1,0,0,0,0}, NULL },
- {0xd8000000,"bb1 ",{21,5,HEX},{16,5,REG} ,{0,16,PCREL},{2,2,NA,BB1, i16bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xdc000000,"bb1.n ",{21,5,HEX},{16,5,REG} ,{0,16,PCREL},{1,1,NA,BB1, i16bit,0,1,0,0,0,1,1,0,0,0,0}, NULL },
- {0xf000d000,"tb0 ",{21,5,HEX} ,{16,5,REG} ,{0,10,HEX}, {2,2,NA,TB0 , i10bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf000d800,"tb1 ",{21,5,HEX} ,{16,5,REG} ,{0,10,HEX}, {2,2,NA,TB1 , i10bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xe8000000,"bcnd ",{21,5,CONDMASK},{16,5,REG},{0,16,PCREL},{2,2,NA,BCND, i16bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xec000000,"bcnd.n ",{21,5,CONDMASK},{16,5,REG},{0,16,PCREL},{1,1,NA,BCND, i16bit,0,1,0,0,0,1,1,0,0,0,0}, NULL },
- {0xf000e800,"tcnd ",{21,5,CONDMASK},{16,5,REG},{0,10,HEX}, {2,2,NA,TCND, i10bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf8000000,"tbnd ",{16,5,REG} ,{0,16,HEX} ,NO_OPERAND , {2,2,NA,TBND, i10bit,1,0,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf400f800,"tbnd ",{16,5,REG} ,{0,5,REG} ,NO_OPERAND , {2,2,NA,TBND, 0,1,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf400fc00,"rte ",NO_OPERAND ,NO_OPERAND ,NO_OPERAND , {2,2,NA,RTE , 0,0,0,0,0,0,0,1,0,0,0,0}, NULL },
- {0x1c000000,"ld.b ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LDB ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001c00,"ld.b ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LDB , 0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0x0c000000,"ld.bu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LDBU, i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4000c00,"ld.bu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LDBU ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0x18000000,"ld.h ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LDH ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001800,"ld.h ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LDH ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001a00,"ld.h ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,LDH ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0x08000000,"ld.hu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LDHU, i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4000800,"ld.hu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LDHU ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4000a00,"ld.hu ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,LDHU ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0x14000000,"ld ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LD ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001400,"ld ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LD ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001600,"ld ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,LD ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0x10000000,"ld.d ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LDD ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001000,"ld.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LDD ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001200,"ld.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,LDD ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0xf4001500,"ld.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LD ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001700,"ld.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,LD ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0x2c000000,"st.b ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,NA,STB ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4002c00,"st.b ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,NA,STB ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0x28000000,"st.h ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,NA,STH ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4002800,"st.h ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,NA,STH ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4002a00,"st.h ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,NA,STH ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0x24000000,"st ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,NA,ST ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4002400,"st ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,NA,ST ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4002600,"st ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,NA,ST ,0,1,1,1,0,0,0,1,0,0,0,1} ,NULL },
- {0x20000000,"st.d ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,NA,STD ,i16bit,0,1,0,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4002000,"st.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,NA,STD ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4002200,"st.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,NA,STD ,0,1,1,1,0,0,0,1,0,0,0,1} ,NULL },
- {0xf4002500,"st.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,NA,ST ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4002700,"st.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,NA,ST ,0,1,1,1,0,0,0,1,0,0,0,1} ,NULL },
-/* m88100 only:
- {0x00000000,"xmem.bu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,XMEMBU ,i16bit,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- */
- {0xf4000000,"xmem.bu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,XMEM ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
-/* m88100 only:
- {0x04000000,"xmem ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,XMEM ,i16bit,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- */
- {0xf4000400,"xmem ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,XMEM ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4000600,"xmem ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,XMEM ,0,1,1,1,0,0,0,1,0,0,0,1} ,NULL },
- {0xf4000500,"xmem.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,XMEM ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4000700,"xmem.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,XMEM ,0,1,1,1,0,0,0,1,0,0,0,1} ,NULL },
-/* m88100 only:
- {0xf4003e00,"lda.b ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,PINT,LDAH, 0,1,1,1,0,0,0,0,0,0,0,1} ,NULL },
- */
- {0xf4003e00,"lda.x ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,PINT,LDAH, 0,1,1,1,0,0,0,0,0,0,0,1} ,NULL },
- {0xf4003a00,"lda.h ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,PINT,LDAH, 0,1,1,1,0,0,0,0,0,0,0,1} ,NULL },
- {0xf4003600,"lda ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,PINT,LDA , 0,1,1,1,0,0,0,0,0,0,0,1} ,NULL },
- {0xf4003200,"lda.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,PINT,LDAD, 0,1,1,1,0,0,0,0,0,0,0,1} ,NULL },
-
- {0x80004000,"ldcr ",{21,5,REG} ,{5,6,CRREG} ,NO_OPERAND ,{1,1,PINT,LDCR, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x80008000,"stcr ",{16,5,REG} ,{5,6,CRREG} ,NO_OPERAND ,{1,1,PINT,STCR, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x8000c000,"xcr ",{21,5,REG} ,{16,5,REG} ,{5,6,CRREG},{1,1,PINT,XCR, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
-
- {0xf4006000,"addu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADDU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006200,"addu.ci ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADDU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006100,"addu.co ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADDU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006300,"addu.cio ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADDU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006400,"subu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUBU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006600,"subu.ci ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUBU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006500,"subu.co ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUBU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006700,"subu.cio ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUBU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006800,"divu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {32,32,PINT,DIVU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006900,"divu.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,}, NULL },
- {0xf4006e00,"muls ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,}, NULL },
- {0xf4006c00,"mulu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,4,PINT,MUL, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007000,"add ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADD , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007200,"add.ci ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADD , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007100,"add.co ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADD , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007300,"add.cio ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADD , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007400,"sub ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUB , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007600,"sub.ci ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUB , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007500,"sub.co ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUB , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007700,"sub.cio ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUB , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007800,"divs ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {32,32,PINT,DIV , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007c00,"cmp ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,CMP, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
-
- {0x60000000,"addu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,ADDU, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x64000000,"subu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,SUBU, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
-
- {0x68000000,"divu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {32,32,PINT,DIVU, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x6c000000,"mulu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {4,1,PINT,MUL, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x70000000,"add ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,ADD, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x74000000,"sub ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,SUB, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x78000000,"divs ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {32,32,PINT,DIV, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x7c000000,"cmp ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,CMP, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
-
- {0xf4004000,"and ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,AND_ ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4004400,"and.c ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,AND_ ,0,1,1,1,1,0,0,0,0,0,0,0} ,NULL },
- {0xf4005800,"or ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,OR ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4005c00,"or.c ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,OR ,0,1,1,1,1,0,0,0,0,0,0,0} ,NULL },
- {0xf4005000,"xor ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,XOR ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4005400,"xor.c ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,XOR ,0,1,1,1,1,0,0,0,0,0,0,0} ,NULL },
- {0x40000000,"and ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,AND_ ,i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x44000000,"and.u ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,AND_ ,i16bit,1,0,1,0,1,0,0,0,0,0,0} ,NULL },
- {0x58000000,"or ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,OR ,i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x5c000000,"or.u ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,OR ,i16bit,1,0,1,0,1,0,0,0,0,0,0} ,NULL },
- {0x50000000,"xor ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,XOR ,i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x54000000,"xor.u ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,XOR ,i16bit,1,0,1,0,1,0,0,0,0,0,0} ,NULL },
- {0x48000000,"mask ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,MASK ,i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x4c000000,"mask.u ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,MASK ,i16bit,1,0,1,0,1,0,0,0,0,0,0} ,NULL },
- {0xf400ec00,"ff0 ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {1,1,PINT,FF0 ,0,0,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf400e800,"ff1 ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {1,1,PINT,FF1 ,0,0,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf0008000,"clr ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,CLR ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf0008800,"set ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,SET ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf0009000,"ext ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,EXT ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf0009800,"extu ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,EXTU ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf000a000,"mak ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,MAK ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf000a800,"rot ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,ROT ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4008000,"clr ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,CLR ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4008800,"set ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SET ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4009000,"ext ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,EXT ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4009800,"extu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,EXTU ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf400a000,"mak ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,MAK ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf400a800,"rot ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ROT ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
-
- {0x84002800,"fadd.sss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {5,1,PFLT,FADD ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84002880,"fadd.ssd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,0,0,1,0} ,NULL },
- {0x84002a00,"fadd.sds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,0,1,0,0} ,NULL },
- {0x84002a80,"fadd.sdd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,0,1,1,0} ,NULL },
- {0x84002820,"fadd.dss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x840028a0,"fadd.dsd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,1,0,1,0} ,NULL },
- {0x84002a20,"fadd.dds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,1,1,0,0} ,NULL },
- {0x84002aa0,"fadd.ddd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,1,1,1,0} ,NULL },
- {0x84003000,"fsub.sss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {5,1,PFLT,FSUB ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84003080,"fsub.ssd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,0,0,1,0} ,NULL },
- {0x84003200,"fsub.sds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,0,1,0,0} ,NULL },
- {0x84003280,"fsub.sdd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,0,1,1,0} ,NULL },
- {0x84003020,"fsub.dss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x840030a0,"fsub.dsd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,1,0,1,0} ,NULL },
- {0x84003220,"fsub.dds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,1,1,0,0} ,NULL },
- {0x840032a0,"fsub.ddd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,1,1,1,0} ,NULL },
- {0x84000000,"fmul.sss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,1,PFLT,FMUL ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84000080,"fmul.ssd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,0,0,1,0} ,NULL },
- {0x84000200,"fmul.sds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,0,1,0,0} ,NULL },
- {0x84000280,"fmul.sdd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,0,1,1,0} ,NULL },
- {0x84000020,"fmul.dss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x840000a0,"fmul.dsd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,1,0,1,0} ,NULL },
- {0x84000220,"fmul.dds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,1,1,0,0} ,NULL },
- {0x840002a0,"fmul.ddd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,1,1,1,0} ,NULL },
- {0x84007000,"fdiv.sss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {30,30,PFLT,FDIV ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84007080,"fdiv.ssd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,0,0,1,0} ,NULL },
- {0x84007200,"fdiv.sds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,0,1,0,0} ,NULL },
- {0x84007280,"fdiv.sdd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,0,1,1,0} ,NULL },
- {0x84007020,"fdiv.dss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x840070a0,"fdiv.dsd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,1,0,1,0} ,NULL },
- {0x84007220,"fdiv.dds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,1,1,0,0} ,NULL },
- {0x840072a0,"fdiv.ddd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,1,1,1,0} ,NULL },
- {0x84007800,"fsqrt.ss ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,FLT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84007820,"fsqrt.sd ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,FLT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84007880,"fsqrt.ds ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,FLT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x840078a0,"fsqrt.dd ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {6,1,PFLT,FLT ,0,0,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x84003800,"fcmp.ss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {5,1,PFLT,FCMP ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84003880,"fcmp.sd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,1,PFLT,FCMP ,0,1,1,1,0,0,0,1,0,1,0,0} ,NULL },
- {0x84003a00,"fcmp.ds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,1,PFLT,FCMP ,0,1,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x84003a80,"fcmp.dd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,1,PFLT,FCMP ,0,1,1,1,0,0,0,1,1,1,0,0} ,NULL },
- {0x84002000,"flt.s ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,FLT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84002020,"flt.d ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {6,1,PFLT,FLT ,0,0,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x84004800,"int.s ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,INT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84004880,"int.d ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {6,1,PFLT,INT ,0,0,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x84005000,"nint.s ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,INT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84005080,"nint.d ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {6,1,PFLT,INT ,0,0,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x84005800,"trnc.s ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,TRNC ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84005880,"trnc.d ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {6,1,PFLT,TRNC ,0,0,1,1,0,0,0,1,1,0,0,0} ,NULL },
-
- {0x80004800,"fldcr ",{21,5,REG} ,{5,6,FCRREG} ,NO_OPERAND , {1,1,PFLT,FLDC ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x80008800,"fstcr ",{16,5,REG} ,{5,6,FCRREG} ,NO_OPERAND , {1,1,PFLT,FSTC ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x8000c800,"fxcr ",{21,5,REG} ,{16,5,REG} ,{5,6,FCRREG} , {1,1,PFLT,FXC ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
-
-/* The following are new for the 88110. */
-
- {0x8400aaa0,"fadd.ddd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aa80,"fadd.dds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aac0,"fadd.ddx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aa20,"fadd.dsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aa00,"fadd.dss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aa40,"fadd.dsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ab20,"fadd.dxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ab00,"fadd.dxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ab40,"fadd.dxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a8a0,"fadd.sdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a880,"fadd.sds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a8c0,"fadd.sdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a820,"fadd.ssd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a800,"fadd.sss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a840,"fadd.ssx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a920,"fadd.sxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a900,"fadd.sxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a940,"fadd.sxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aca0,"fadd.xdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ac80,"fadd.xds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400acc0,"fadd.xdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ac20,"fadd.xsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ac00,"fadd.xss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ac40,"fadd.xsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ad20,"fadd.xxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ad00,"fadd.xxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ad40,"fadd.xxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400ba80,"fcmp.sdd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ba00,"fcmp.sds ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bb00,"fcmp.sdx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b880,"fcmp.ssd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b800,"fcmp.sss ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b900,"fcmp.ssx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bc80,"fcmp.sxd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bc00,"fcmp.sxs ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bd00,"fcmp.sxx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400baa0,"fcmpu.sdd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ba20,"fcmpu.sds ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bb20,"fcmpu.sdx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b8a0,"fcmpu.ssd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b820,"fcmpu.sss ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b920,"fcmpu.ssx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bca0,"fcmpu.sxd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bc20,"fcmpu.sxs ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bd20,"fcmpu.sxx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x84000820,"fcvt.sd ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84000880,"fcvt.ds ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x84008880,"fcvt.ds ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840088c0,"fcvt.dx ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008820,"fcvt.sd ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008840,"fcvt.sx ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008920,"fcvt.xd ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008900,"fcvt.xs ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400f2a0,"fdiv.ddd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f280,"fdiv.dds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f2c0,"fdiv.ddx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f220,"fdiv.dsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f200,"fdiv.dss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f240,"fdiv.dsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f320,"fdiv.dxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f300,"fdiv.dxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f340,"fdiv.dxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f0a0,"fdiv.sdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f080,"fdiv.sds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f0c0,"fdiv.sdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f020,"fdiv.ssd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f000,"fdiv.sss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f040,"fdiv.ssx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f120,"fdiv.sxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f100,"fdiv.sxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f140,"fdiv.sxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f4a0,"fdiv.xdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f480,"fdiv.xds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f4c0,"fdiv.xdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f420,"fdiv.xsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f400,"fdiv.xss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f440,"fdiv.xsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f520,"fdiv.xxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f500,"fdiv.xxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f540,"fdiv.xxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x84002220,"flt.ds ",{21,5,XREG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84002200,"flt.ss ",{21,5,XREG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84002240,"flt.xs ",{21,5,XREG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x840082a0,"fmul.ddd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008280,"fmul.dds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840082c0,"fmul.ddx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008220,"fmul.dsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008200,"fmul.dss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008240,"fmul.dsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008320,"fmul.dxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008300,"fmul.dxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008340,"fmul.dxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840080a0,"fmul.sdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008080,"fmul.sds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840080c0,"fmul.sdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008020,"fmul.ssd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008000,"fmul.sss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008040,"fmul.ssx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008120,"fmul.sxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008100,"fmul.sxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008140,"fmul.sxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840084a0,"fmul.xdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008480,"fmul.xds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840084c0,"fmul.xdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008420,"fmul.xsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008400,"fmul.xss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008440,"fmul.xsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008520,"fmul.xxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008500,"fmul.xxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008540,"fmul.xxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400f8a0,"fsqrt.dd ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f880,"fsqrt.ds ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f8c0,"fsqrt.dx ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f820,"fsqrt.sd ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f800,"fsqrt.ss ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f840,"fsqrt.sx ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f920,"fsqrt.xd ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f900,"fsqrt.xs ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f940,"fsqrt.xx ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400b2a0,"fsub.ddd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b280,"fsub.dds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b2c0,"fsub.ddx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b220,"fsub.dsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b200,"fsub.dss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b240,"fsub.dsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b320,"fsub.dxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b300,"fsub.dxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b340,"fsub.dxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b0a0,"fsub.sdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b080,"fsub.sds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b0c0,"fsub.sdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b020,"fsub.ssd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b000,"fsub.sss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b040,"fsub.ssx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b120,"fsub.sxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b100,"fsub.sxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b140,"fsub.sxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b4a0,"fsub.xdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b480,"fsub.xds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b4c0,"fsub.xdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b420,"fsub.xsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b400,"fsub.xss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b440,"fsub.xsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b520,"fsub.xxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b500,"fsub.xxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b540,"fsub.xxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400fc00,"illop", {0,2,DEC}, NO_OPERAND, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400c800,"int.ss ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400c880,"int.sd ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400c900,"int.sx ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x04000000,"ld ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x00000000,"ld.d ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x3c000000,"ld.x ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf0001400,"ld ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001000,"ld.d ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001800,"ld.x ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001500,"ld.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001100,"ld.d.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001900,"ld.x.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf0001600,"ld ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001200,"ld.d ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001a00,"ld.x ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001700,"ld.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001300,"ld.d.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001b00,"ld.x.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400c000,"mov.s ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400c080,"mov.d ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84004200,"mov.s ", {21,5,XREG}, {0,5,REG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84004280,"mov.d ", {21,5,XREG}, {0,5,REG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400c300,"mov ", {21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf4006d00,"mulu.d ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400d080,"nint.sd ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400d000,"nint.ss ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400d100,"nint.sx ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88002020,"padd.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88002040,"padd.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88002060,"padd ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x880021e0,"padds.s ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880021a0,"padds.s.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880021c0,"padds.s.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880020e0,"padds.u ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880020a0,"padds.u.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880020c0,"padds.u.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88002160,"padds.us ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88002120,"padds.us.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88002140,"padds.us.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88003860,"pcmp ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88000000,"pmul ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88006260,"ppack.16 ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006240,"ppack.16.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006460,"ppack.32 ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006420,"ppack.32.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006440,"ppack.32.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006160,"ppack.8 ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88007200,"prot ", {21,5,REG}, {16,5,REG}, {5,6,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88007800,"prot ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88003020,"psub.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88003040,"psub.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88003060,"psub ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x880031e0,"psubs.s ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880031a0,"psubs.s.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880031c0,"psubs.s.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880030e0,"psubs.u ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880030a0,"psubs.u.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880030c0,"psubs.u.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88003160,"psubs.us ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88003120,"psubs.us.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88003140,"psubs.us.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88006800,"punpk.n ", {21,5,REG}, {16,5,REG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006820,"punpk.b ", {21,5,REG}, {16,5,REG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x34000000,"st ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x30000000,"st.d ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x38000000,"st.x ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf4002c80,"st.b.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002880,"st.h.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002480,"st.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002080,"st.d.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002d80,"st.b.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002980,"st.h.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002580,"st.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002180,"st.d.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf0002400,"st ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002000,"st.d ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002100,"st.d.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002180,"st.d.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002080,"st.d.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002500,"st.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002580,"st.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002480,"st.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002800,"st.x ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002900,"st.x.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002980,"st.x.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002880,"st.x.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf4002f80,"st.b.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002e80,"st.b.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002380,"st.d.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002280,"st.d.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002b80,"st.h.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002a80,"st.h.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002780,"st.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002680,"st.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf0002600,"st ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002200,"st.d ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002300,"st.d.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002380,"st.d.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002280,"st.d.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002700,"st.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002780,"st.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002680,"st.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002a00,"st.x ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002b00,"st.x.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002b80,"st.x.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002a80,"st.x.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400d880,"trnc.sd ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400d800,"trnc.ss ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400d900,"trnc.sx ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
-};
-
-/*
- * Local Variables:
- * fill-column: 131
- * End:
- */
diff --git a/contrib/gdb/include/opcode/mips.h b/contrib/gdb/include/opcode/mips.h
deleted file mode 100644
index 14ceec96119a..000000000000
--- a/contrib/gdb/include/opcode/mips.h
+++ /dev/null
@@ -1,481 +0,0 @@
-/* mips.h. Mips opcode list for GDB, the GNU debugger.
- Copyright 1993, 1995 Free Software Foundation, Inc.
- Contributed by Ralph Campbell and OSF
- Commented and modified by Ian Lance Taylor, Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* These are bit masks and shift counts to use to access the various
- fields of an instruction. To retrieve the X field of an
- instruction, use the expression
- (i >> OP_SH_X) & OP_MASK_X
- To set the same field (to j), use
- i = (i &~ (OP_MASK_X << OP_SH_X)) | (j << OP_SH_X)
-
- Make sure you use fields that are appropriate for the instruction,
- of course.
-
- The 'i' format uses OP, RS, RT and IMMEDIATE.
-
- The 'j' format uses OP and TARGET.
-
- The 'r' format uses OP, RS, RT, RD, SHAMT and FUNCT.
-
- The 'b' format uses OP, RS, RT and DELTA.
-
- The floating point 'i' format uses OP, RS, RT and IMMEDIATE.
-
- The floating point 'r' format uses OP, FMT, FT, FS, FD and FUNCT.
-
- A breakpoint instruction uses OP, CODE and SPEC (10 bits of the
- breakpoint instruction are not defined; Kane says the breakpoint
- code field in BREAK is 20 bits; yet MIPS assemblers and debuggers
- only use ten bits).
-
- The syscall instruction uses SYSCALL.
-
- The general coprocessor instructions use COPZ. */
-
-#define OP_MASK_OP 0x3f
-#define OP_SH_OP 26
-#define OP_MASK_RS 0x1f
-#define OP_SH_RS 21
-#define OP_MASK_FR 0x1f
-#define OP_SH_FR 21
-#define OP_MASK_FMT 0x1f
-#define OP_SH_FMT 21
-#define OP_MASK_BCC 0x7
-#define OP_SH_BCC 18
-#define OP_MASK_CODE 0x3ff
-#define OP_SH_CODE 16
-#define OP_MASK_RT 0x1f
-#define OP_SH_RT 16
-#define OP_MASK_FT 0x1f
-#define OP_SH_FT 16
-#define OP_MASK_CACHE 0x1f
-#define OP_SH_CACHE 16
-#define OP_MASK_RD 0x1f
-#define OP_SH_RD 11
-#define OP_MASK_FS 0x1f
-#define OP_SH_FS 11
-#define OP_MASK_PREFX 0x1f
-#define OP_SH_PREFX 11
-#define OP_MASK_CCC 0x7
-#define OP_SH_CCC 8
-#define OP_MASK_SYSCALL 0xfffff
-#define OP_SH_SYSCALL 6
-#define OP_MASK_SHAMT 0x1f
-#define OP_SH_SHAMT 6
-#define OP_MASK_FD 0x1f
-#define OP_SH_FD 6
-#define OP_MASK_TARGET 0x3ffffff
-#define OP_SH_TARGET 0
-#define OP_MASK_COPZ 0x1ffffff
-#define OP_SH_COPZ 0
-#define OP_MASK_IMMEDIATE 0xffff
-#define OP_SH_IMMEDIATE 0
-#define OP_MASK_DELTA 0xffff
-#define OP_SH_DELTA 0
-#define OP_MASK_FUNCT 0x3f
-#define OP_SH_FUNCT 0
-#define OP_MASK_SPEC 0x3f
-#define OP_SH_SPEC 0
-
-/* This structure holds information for a particular instruction. */
-
-struct mips_opcode
-{
- /* The name of the instruction. */
- const char *name;
- /* A string describing the arguments for this instruction. */
- const char *args;
- /* The basic opcode for the instruction. When assembling, this
- opcode is modified by the arguments to produce the actual opcode
- that is used. If pinfo is INSN_MACRO, then this is instead the
- ISA level of the macro (0 or 1 is always supported, 2 is ISA 2,
- etc.). */
- unsigned long match;
- /* If pinfo is not INSN_MACRO, then this is a bit mask for the
- relevant portions of the opcode when disassembling. If the
- actual opcode anded with the match field equals the opcode field,
- then we have found the correct instruction. If pinfo is
- INSN_MACRO, then this field is the macro identifier. */
- unsigned long mask;
- /* For a macro, this is INSN_MACRO. Otherwise, it is a collection
- of bits describing the instruction, notably any relevant hazard
- information. */
- unsigned long pinfo;
-};
-
-/* These are the characters which may appears in the args field of an
- instruction. They appear in the order in which the fields appear
- when the instruction is used. Commas and parentheses in the args
- string are ignored when assembling, and written into the output
- when disassembling.
-
- Each of these characters corresponds to a mask field defined above.
-
- "<" 5 bit shift amount (OP_*_SHAMT)
- ">" shift amount between 32 and 63, stored after subtracting 32 (OP_*_SHAMT)
- "a" 26 bit target address (OP_*_TARGET)
- "b" 5 bit base register (OP_*_RS)
- "c" 10 bit breakpoint code (OP_*_CODE)
- "d" 5 bit destination register specifier (OP_*_RD)
- "h" 5 bit prefx hint (OP_*_PREFX)
- "i" 16 bit unsigned immediate (OP_*_IMMEDIATE)
- "j" 16 bit signed immediate (OP_*_DELTA)
- "k" 5 bit cache opcode in target register position (OP_*_CACHE)
- "o" 16 bit signed offset (OP_*_DELTA)
- "p" 16 bit PC relative branch target address (OP_*_DELTA)
- "r" 5 bit same register used as both source and target (OP_*_RS)
- "s" 5 bit source register specifier (OP_*_RS)
- "t" 5 bit target register (OP_*_RT)
- "u" 16 bit upper 16 bits of address (OP_*_IMMEDIATE)
- "v" 5 bit same register used as both source and destination (OP_*_RS)
- "w" 5 bit same register used as both target and destination (OP_*_RT)
- "C" 25 bit coprocessor function code (OP_*_COPZ)
- "B" 20 bit syscall function code (OP_*_SYSCALL)
- "x" accept and ignore register name
- "z" must be zero register
-
- Floating point instructions:
- "D" 5 bit destination register (OP_*_FD)
- "M" 3 bit compare condition code (OP_*_CCC) (only used for mips4 and up)
- "N" 3 bit branch condition code (OP_*_BCC) (only used for mips4 and up)
- "S" 5 bit fs source 1 register (OP_*_FS)
- "T" 5 bit ft source 2 register (OP_*_FT)
- "R" 5 bit fr source 3 register (OP_*_FR)
- "V" 5 bit same register used as floating source and destination (OP_*_FS)
- "W" 5 bit same register used as floating target and destination (OP_*_FT)
-
- Coprocessor instructions:
- "E" 5 bit target register (OP_*_RT)
- "G" 5 bit destination register (OP_*_RD)
-
- Macro instructions:
- "A" General 32 bit expression
- "I" 32 bit immediate
- "F" 64 bit floating point constant in .rdata
- "L" 64 bit floating point constant in .lit8
- "f" 32 bit floating point constant
- "l" 32 bit floating point constant in .lit4
-*/
-
-/* These are the bits which may be set in the pinfo field of an
- instructions, if it is not equal to INSN_MACRO. */
-
-/* Modifies the general purpose register in OP_*_RD. */
-#define INSN_WRITE_GPR_D 0x00000001
-/* Modifies the general purpose register in OP_*_RT. */
-#define INSN_WRITE_GPR_T 0x00000002
-/* Modifies general purpose register 31. */
-#define INSN_WRITE_GPR_31 0x00000004
-/* Modifies the floating point register in OP_*_FD. */
-#define INSN_WRITE_FPR_D 0x00000008
-/* Modifies the floating point register in OP_*_FS. */
-#define INSN_WRITE_FPR_S 0x00000010
-/* Modifies the floating point register in OP_*_FT. */
-#define INSN_WRITE_FPR_T 0x00000020
-/* Reads the general purpose register in OP_*_RS. */
-#define INSN_READ_GPR_S 0x00000040
-/* Reads the general purpose register in OP_*_RT. */
-#define INSN_READ_GPR_T 0x00000080
-/* Reads the floating point register in OP_*_FS. */
-#define INSN_READ_FPR_S 0x00000100
-/* Reads the floating point register in OP_*_FT. */
-#define INSN_READ_FPR_T 0x00000200
-/* Reads the floating point register in OP_*_FR. */
-#define INSN_READ_FPR_R 0x00000400
-/* Modifies coprocessor condition code. */
-#define INSN_WRITE_COND_CODE 0x00000800
-/* Reads coprocessor condition code. */
-#define INSN_READ_COND_CODE 0x00001000
-/* TLB operation. */
-#define INSN_TLB 0x00002000
-/* Reads coprocessor register other than floating point register. */
-#define INSN_COP 0x00004000
-/* Instruction loads value from memory, requiring delay. */
-#define INSN_LOAD_MEMORY_DELAY 0x00008000
-/* Instruction loads value from coprocessor, requiring delay. */
-#define INSN_LOAD_COPROC_DELAY 0x00010000
-/* Instruction has unconditional branch delay slot. */
-#define INSN_UNCOND_BRANCH_DELAY 0x00020000
-/* Instruction has conditional branch delay slot. */
-#define INSN_COND_BRANCH_DELAY 0x00040000
-/* Conditional branch likely: if branch not taken, insn nullified. */
-#define INSN_COND_BRANCH_LIKELY 0x00080000
-/* Moves to coprocessor register, requiring delay. */
-#define INSN_COPROC_MOVE_DELAY 0x00100000
-/* Loads coprocessor register from memory, requiring delay. */
-#define INSN_COPROC_MEMORY_DELAY 0x00200000
-/* Reads the HI register. */
-#define INSN_READ_HI 0x00400000
-/* Reads the LO register. */
-#define INSN_READ_LO 0x00800000
-/* Modifies the HI register. */
-#define INSN_WRITE_HI 0x01000000
-/* Modifies the LO register. */
-#define INSN_WRITE_LO 0x02000000
-/* Takes a trap (easier to keep out of delay slot). */
-#define INSN_TRAP 0x04000000
-/* Instruction stores value into memory. */
-#define INSN_STORE_MEMORY 0x08000000
-/* MIPS ISA field--CPU level at which insn is supported. */
-#define INSN_ISA 0x70000000
-/* MIPS ISA 2 instruction (R6000 or R4000). */
-#define INSN_ISA2 0x10000000
-/* MIPS ISA 3 instruction (R4000). */
-#define INSN_ISA3 0x20000000
-/* MIPS R4650 instruction. */
-#define INSN_4650 0x30000000
-/* MIPS ISA 4 instruction (R8000). */
-#define INSN_ISA4 0x40000000
-/* LSI R4010 instruction. */
-#define INSN_4010 0x50000000
-/* NEC VR4100 instruction. */
-#define INSN_4100 0x60000000
-
-/* Instruction is actually a macro. It should be ignored by the
- disassembler, and requires special treatment by the assembler. */
-#define INSN_MACRO 0xffffffff
-
-/* This is a list of macro expanded instructions.
- *
- * _I appended means immediate
- * _A appended means address
- * _AB appended means address with base register
- * _D appended means 64 bit floating point constant
- * _S appended means 32 bit floating point constant
- */
-enum {
- M_ABS,
- M_ADD_I,
- M_ADDU_I,
- M_AND_I,
- M_BEQ_I,
- M_BEQL_I,
- M_BGE,
- M_BGEL,
- M_BGE_I,
- M_BGEL_I,
- M_BGEU,
- M_BGEUL,
- M_BGEU_I,
- M_BGEUL_I,
- M_BGT,
- M_BGTL,
- M_BGT_I,
- M_BGTL_I,
- M_BGTU,
- M_BGTUL,
- M_BGTU_I,
- M_BGTUL_I,
- M_BLE,
- M_BLEL,
- M_BLE_I,
- M_BLEL_I,
- M_BLEU,
- M_BLEUL,
- M_BLEU_I,
- M_BLEUL_I,
- M_BLT,
- M_BLTL,
- M_BLT_I,
- M_BLTL_I,
- M_BLTU,
- M_BLTUL,
- M_BLTU_I,
- M_BLTUL_I,
- M_BNE_I,
- M_BNEL_I,
- M_DABS,
- M_DADD_I,
- M_DADDU_I,
- M_DDIV_3,
- M_DDIV_3I,
- M_DDIVU_3,
- M_DDIVU_3I,
- M_DIV_3,
- M_DIV_3I,
- M_DIVU_3,
- M_DIVU_3I,
- M_DLA_AB,
- M_DLI,
- M_DMUL,
- M_DMUL_I,
- M_DMULO,
- M_DMULO_I,
- M_DMULOU,
- M_DMULOU_I,
- M_DREM_3,
- M_DREM_3I,
- M_DREMU_3,
- M_DREMU_3I,
- M_DSUB_I,
- M_DSUBU_I,
- M_J_A,
- M_JAL_1,
- M_JAL_2,
- M_JAL_A,
- M_L_DOB,
- M_L_DAB,
- M_LA_AB,
- M_LB_A,
- M_LB_AB,
- M_LBU_A,
- M_LBU_AB,
- M_LD_A,
- M_LD_OB,
- M_LD_AB,
- M_LDC1_AB,
- M_LDC2_AB,
- M_LDC3_AB,
- M_LDL_AB,
- M_LDR_AB,
- M_LH_A,
- M_LH_AB,
- M_LHU_A,
- M_LHU_AB,
- M_LI,
- M_LI_D,
- M_LI_DD,
- M_LI_S,
- M_LI_SS,
- M_LL_AB,
- M_LLD_AB,
- M_LS_A,
- M_LW_A,
- M_LW_AB,
- M_LWC0_A,
- M_LWC0_AB,
- M_LWC1_A,
- M_LWC1_AB,
- M_LWC2_A,
- M_LWC2_AB,
- M_LWC3_A,
- M_LWC3_AB,
- M_LWL_A,
- M_LWL_AB,
- M_LWR_A,
- M_LWR_AB,
- M_LWU_AB,
- M_MUL,
- M_MUL_I,
- M_MULO,
- M_MULO_I,
- M_MULOU,
- M_MULOU_I,
- M_NOR_I,
- M_OR_I,
- M_REM_3,
- M_REM_3I,
- M_REMU_3,
- M_REMU_3I,
- M_ROL,
- M_ROL_I,
- M_ROR,
- M_ROR_I,
- M_S_DA,
- M_S_DOB,
- M_S_DAB,
- M_S_S,
- M_SC_AB,
- M_SCD_AB,
- M_SD_A,
- M_SD_OB,
- M_SD_AB,
- M_SDC1_AB,
- M_SDC2_AB,
- M_SDC3_AB,
- M_SDL_AB,
- M_SDR_AB,
- M_SEQ,
- M_SEQ_I,
- M_SGE,
- M_SGE_I,
- M_SGEU,
- M_SGEU_I,
- M_SGT,
- M_SGT_I,
- M_SGTU,
- M_SGTU_I,
- M_SLE,
- M_SLE_I,
- M_SLEU,
- M_SLEU_I,
- M_SLT_I,
- M_SLTU_I,
- M_SNE,
- M_SNE_I,
- M_SB_A,
- M_SB_AB,
- M_SH_A,
- M_SH_AB,
- M_SW_A,
- M_SW_AB,
- M_SWC0_A,
- M_SWC0_AB,
- M_SWC1_A,
- M_SWC1_AB,
- M_SWC2_A,
- M_SWC2_AB,
- M_SWC3_A,
- M_SWC3_AB,
- M_SWL_A,
- M_SWL_AB,
- M_SWR_A,
- M_SWR_AB,
- M_SUB_I,
- M_SUBU_I,
- M_TEQ_I,
- M_TGE_I,
- M_TGEU_I,
- M_TLT_I,
- M_TLTU_I,
- M_TNE_I,
- M_TRUNCWD,
- M_TRUNCWS,
- M_ULD,
- M_ULD_A,
- M_ULH,
- M_ULH_A,
- M_ULHU,
- M_ULHU_A,
- M_ULW,
- M_ULW_A,
- M_USH,
- M_USH_A,
- M_USW,
- M_USW_A,
- M_USD,
- M_USD_A,
- M_XOR_I
-};
-
-/* The order of overloaded instructions matters. Label arguments and
- register arguments look the same. Instructions that can have either
- for arguments must apear in the correct order in this table for the
- assembler to pick the right one. In other words, entries with
- immediate operands must apear after the same instruction with
- registers.
-
- Many instructions are short hand for other instructions (i.e., The
- jal <register> instruction is short for jalr <register>). */
-
-extern const struct mips_opcode mips_opcodes[];
-extern const int bfd_mips_num_opcodes;
-#define NUMOPCODES bfd_mips_num_opcodes
diff --git a/contrib/gdb/include/opcode/np1.h b/contrib/gdb/include/opcode/np1.h
deleted file mode 100644
index d23adc7566cf..000000000000
--- a/contrib/gdb/include/opcode/np1.h
+++ /dev/null
@@ -1,422 +0,0 @@
-/* Print GOULD NPL instructions for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1989 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 GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct gld_opcode
-{
- char *name;
- unsigned long opcode;
- unsigned long mask;
- char *args;
- int length;
-};
-
-/* We store four bytes of opcode for all opcodes because that
- is the most any of them need. The actual length of an instruction
- is always at least 2 bytes, and at most four. The length of the
- instruction is based on the opcode.
-
- The mask component is a mask saying which bits must match
- particular opcode in order for an instruction to be an instance
- of that opcode.
-
- The args component is a string containing characters
- that are used to format the arguments to the instruction. */
-
-/* Kinds of operands:
- r Register in first field
- R Register in second field
- b Base register in first field
- B Base register in second field
- v Vector register in first field
- V Vector register in first field
- A Optional address register (base register)
- X Optional index register
- I Immediate data (16bits signed)
- O Offset field (16bits signed)
- h Offset field (15bits signed)
- d Offset field (14bits signed)
- S Shift count field
-
- any other characters are printed as is...
-*/
-
-/* The assembler requires that this array be sorted as follows:
- all instances of the same mnemonic must be consecutive.
- All instances of the same mnemonic with the same number of operands
- must be consecutive.
- */
-struct gld_opcode gld_opcodes[] =
-{
-{ "lb", 0xb4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lnb", 0xb8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lbs", 0xec080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lh", 0xb4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "lnh", 0xb8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "lw", 0xb4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lnw", 0xb8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "ld", 0xb4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "lnd", 0xb8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "li", 0xf8000000, 0xfc7f0000, "r,I", 4 },
-{ "lpa", 0x50080000, 0xfc080000, "r,xOA,X", 4 },
-{ "la", 0x50000000, 0xfc080000, "r,xOA,X", 4 },
-{ "labr", 0x58080000, 0xfc080000, "b,xOA,X", 4 },
-{ "lbp", 0x90080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lhp", 0x90000001, 0xfc080001, "r,xOA,X", 4 },
-{ "lwp", 0x90000000, 0xfc080000, "r,xOA,X", 4 },
-{ "ldp", 0x90000002, 0xfc080002, "r,xOA,X", 4 },
-{ "suabr", 0x58000000, 0xfc080000, "b,xOA,X", 4 },
-{ "lf", 0xbc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lfbr", 0xbc080000, 0xfc080000, "b,xOA,X", 4 },
-{ "lwbr", 0x5c000000, 0xfc080000, "b,xOA,X", 4 },
-{ "stb", 0xd4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "sth", 0xd4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "stw", 0xd4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "std", 0xd4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "stf", 0xdc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "stfbr", 0xdc080000, 0xfc080000, "b,xOA,X", 4 },
-{ "stwbr", 0x54000000, 0xfc080000, "b,xOA,X", 4 },
-{ "zmb", 0xd8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "zmh", 0xd8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "zmw", 0xd8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "zmd", 0xd8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "stbp", 0x94080000, 0xfc080000, "r,xOA,X", 4 },
-{ "sthp", 0x94000001, 0xfc080001, "r,xOA,X", 4 },
-{ "stwp", 0x94000000, 0xfc080000, "r,xOA,X", 4 },
-{ "stdp", 0x94000002, 0xfc080002, "r,xOA,X", 4 },
-{ "lil", 0xf80b0000, 0xfc7f0000, "r,D", 4 },
-{ "lwsl1", 0xec000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lwsl2", 0xfc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lwsl3", 0xfc080000, 0xfc080000, "r,xOA,X", 4 },
-
-{ "lvb", 0xb0080000, 0xfc080000, "v,xOA,X", 4 },
-{ "lvh", 0xb0000001, 0xfc080001, "v,xOA,X", 4 },
-{ "lvw", 0xb0000000, 0xfc080000, "v,xOA,X", 4 },
-{ "lvd", 0xb0000002, 0xfc080002, "v,xOA,X", 4 },
-{ "liv", 0x3c040000, 0xfc0f0000, "v,R", 2 },
-{ "livf", 0x3c080000, 0xfc0f0000, "v,R", 2 },
-{ "stvb", 0xd0080000, 0xfc080000, "v,xOA,X", 4 },
-{ "stvh", 0xd0000001, 0xfc080001, "v,xOA,X", 4 },
-{ "stvw", 0xd0000000, 0xfc080000, "v,xOA,X", 4 },
-{ "stvd", 0xd0000002, 0xfc080002, "v,xOA,X", 4 },
-
-{ "trr", 0x2c000000, 0xfc0f0000, "r,R", 2 },
-{ "trn", 0x2c040000, 0xfc0f0000, "r,R", 2 },
-{ "trnd", 0x2c0c0000, 0xfc0f0000, "r,R", 2 },
-{ "trabs", 0x2c010000, 0xfc0f0000, "r,R", 2 },
-{ "trabsd", 0x2c090000, 0xfc0f0000, "r,R", 2 },
-{ "trc", 0x2c030000, 0xfc0f0000, "r,R", 2 },
-{ "xcr", 0x28040000, 0xfc0f0000, "r,R", 2 },
-{ "cxcr", 0x2c060000, 0xfc0f0000, "r,R", 2 },
-{ "cxcrd", 0x2c0e0000, 0xfc0f0000, "r,R", 2 },
-{ "tbrr", 0x2c020000, 0xfc0f0000, "r,B", 2 },
-{ "trbr", 0x28030000, 0xfc0f0000, "b,R", 2 },
-{ "xcbr", 0x28020000, 0xfc0f0000, "b,B", 2 },
-{ "tbrbr", 0x28010000, 0xfc0f0000, "b,B", 2 },
-
-{ "trvv", 0x28050000, 0xfc0f0000, "v,V", 2 },
-{ "trvvn", 0x2c050000, 0xfc0f0000, "v,V", 2 },
-{ "trvvnd", 0x2c0d0000, 0xfc0f0000, "v,V", 2 },
-{ "trvab", 0x2c070000, 0xfc0f0000, "v,V", 2 },
-{ "trvabd", 0x2c0f0000, 0xfc0f0000, "v,V", 2 },
-{ "cmpv", 0x14060000, 0xfc0f0000, "v,V", 2 },
-{ "expv", 0x14070000, 0xfc0f0000, "v,V", 2 },
-{ "mrvvlt", 0x10030000, 0xfc0f0000, "v,V", 2 },
-{ "mrvvle", 0x10040000, 0xfc0f0000, "v,V", 2 },
-{ "mrvvgt", 0x14030000, 0xfc0f0000, "v,V", 2 },
-{ "mrvvge", 0x14040000, 0xfc0f0000, "v,V", 2 },
-{ "mrvveq", 0x10050000, 0xfc0f0000, "v,V", 2 },
-{ "mrvvne", 0x10050000, 0xfc0f0000, "v,V", 2 },
-{ "mrvrlt", 0x100d0000, 0xfc0f0000, "v,R", 2 },
-{ "mrvrle", 0x100e0000, 0xfc0f0000, "v,R", 2 },
-{ "mrvrgt", 0x140d0000, 0xfc0f0000, "v,R", 2 },
-{ "mrvrge", 0x140e0000, 0xfc0f0000, "v,R", 2 },
-{ "mrvreq", 0x100f0000, 0xfc0f0000, "v,R", 2 },
-{ "mrvrne", 0x140f0000, 0xfc0f0000, "v,R", 2 },
-{ "trvr", 0x140b0000, 0xfc0f0000, "r,V", 2 },
-{ "trrv", 0x140c0000, 0xfc0f0000, "v,R", 2 },
-
-{ "bu", 0x40000000, 0xff880000, "xOA,X", 4 },
-{ "bns", 0x70080000, 0xff880000, "xOA,X", 4 },
-{ "bnco", 0x70880000, 0xff880000, "xOA,X", 4 },
-{ "bge", 0x71080000, 0xff880000, "xOA,X", 4 },
-{ "bne", 0x71880000, 0xff880000, "xOA,X", 4 },
-{ "bunge", 0x72080000, 0xff880000, "xOA,X", 4 },
-{ "bunle", 0x72880000, 0xff880000, "xOA,X", 4 },
-{ "bgt", 0x73080000, 0xff880000, "xOA,X", 4 },
-{ "bnany", 0x73880000, 0xff880000, "xOA,X", 4 },
-{ "bs" , 0x70000000, 0xff880000, "xOA,X", 4 },
-{ "bco", 0x70800000, 0xff880000, "xOA,X", 4 },
-{ "blt", 0x71000000, 0xff880000, "xOA,X", 4 },
-{ "beq", 0x71800000, 0xff880000, "xOA,X", 4 },
-{ "buge", 0x72000000, 0xff880000, "xOA,X", 4 },
-{ "bult", 0x72800000, 0xff880000, "xOA,X", 4 },
-{ "ble", 0x73000000, 0xff880000, "xOA,X", 4 },
-{ "bany", 0x73800000, 0xff880000, "xOA,X", 4 },
-{ "brlnk", 0x44000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bib", 0x48000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bih", 0x48080000, 0xfc080000, "r,xOA,X", 4 },
-{ "biw", 0x4c000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bid", 0x4c080000, 0xfc080000, "r,xOA,X", 4 },
-{ "bivb", 0x60000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bivh", 0x60080000, 0xfc080000, "r,xOA,X", 4 },
-{ "bivw", 0x64000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bivd", 0x64080000, 0xfc080000, "r,xOA,X", 4 },
-{ "bvsb", 0x68000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bvsh", 0x68080000, 0xfc080000, "r,xOA,X", 4 },
-{ "bvsw", 0x6c000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bvsd", 0x6c080000, 0xfc080000, "r,xOA,X", 4 },
-
-{ "camb", 0x80080000, 0xfc080000, "r,xOA,X", 4 },
-{ "camh", 0x80000001, 0xfc080001, "r,xOA,X", 4 },
-{ "camw", 0x80000000, 0xfc080000, "r,xOA,X", 4 },
-{ "camd", 0x80000002, 0xfc080002, "r,xOA,X", 4 },
-{ "car", 0x10000000, 0xfc0f0000, "r,R", 2 },
-{ "card", 0x14000000, 0xfc0f0000, "r,R", 2 },
-{ "ci", 0xf8050000, 0xfc7f0000, "r,I", 4 },
-{ "chkbnd", 0x5c080000, 0xfc080000, "r,xOA,X", 4 },
-
-{ "cavv", 0x10010000, 0xfc0f0000, "v,V", 2 },
-{ "cavr", 0x10020000, 0xfc0f0000, "v,R", 2 },
-{ "cavvd", 0x10090000, 0xfc0f0000, "v,V", 2 },
-{ "cavrd", 0x100b0000, 0xfc0f0000, "v,R", 2 },
-
-{ "anmb", 0x84080000, 0xfc080000, "r,xOA,X", 4 },
-{ "anmh", 0x84000001, 0xfc080001, "r,xOA,X", 4 },
-{ "anmw", 0x84000000, 0xfc080000, "r,xOA,X", 4 },
-{ "anmd", 0x84000002, 0xfc080002, "r,xOA,X", 4 },
-{ "anr", 0x04000000, 0xfc0f0000, "r,R", 2 },
-{ "ani", 0xf8080000, 0xfc7f0000, "r,I", 4 },
-{ "ormb", 0xb8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "ormh", 0xb8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "ormw", 0xb8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "ormd", 0xb8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "orr", 0x08000000, 0xfc0f0000, "r,R", 2 },
-{ "oi", 0xf8090000, 0xfc7f0000, "r,I", 4 },
-{ "eomb", 0x8c080000, 0xfc080000, "r,xOA,X", 4 },
-{ "eomh", 0x8c000001, 0xfc080001, "r,xOA,X", 4 },
-{ "eomw", 0x8c000000, 0xfc080000, "r,xOA,X", 4 },
-{ "eomd", 0x8c000002, 0xfc080002, "r,xOA,X", 4 },
-{ "eor", 0x0c000000, 0xfc0f0000, "r,R", 2 },
-{ "eoi", 0xf80a0000, 0xfc7f0000, "r,I", 4 },
-
-{ "anvv", 0x04010000, 0xfc0f0000, "v,V", 2 },
-{ "anvr", 0x04020000, 0xfc0f0000, "v,R", 2 },
-{ "orvv", 0x08010000, 0xfc0f0000, "v,V", 2 },
-{ "orvr", 0x08020000, 0xfc0f0000, "v,R", 2 },
-{ "eovv", 0x0c010000, 0xfc0f0000, "v,V", 2 },
-{ "eovr", 0x0c020000, 0xfc0f0000, "v,R", 2 },
-
-{ "sacz", 0x100c0000, 0xfc0f0000, "r,R", 2 },
-{ "sla", 0x1c400000, 0xfc600000, "r,S", 2 },
-{ "sll", 0x1c600000, 0xfc600000, "r,S", 2 },
-{ "slc", 0x24400000, 0xfc600000, "r,S", 2 },
-{ "slad", 0x20400000, 0xfc600000, "r,S", 2 },
-{ "slld", 0x20600000, 0xfc600000, "r,S", 2 },
-{ "sra", 0x1c000000, 0xfc600000, "r,S", 2 },
-{ "srl", 0x1c200000, 0xfc600000, "r,S", 2 },
-{ "src", 0x24000000, 0xfc600000, "r,S", 2 },
-{ "srad", 0x20000000, 0xfc600000, "r,S", 2 },
-{ "srld", 0x20200000, 0xfc600000, "r,S", 2 },
-{ "sda", 0x3c030000, 0xfc0f0000, "r,R", 2 },
-{ "sdl", 0x3c020000, 0xfc0f0000, "r,R", 2 },
-{ "sdc", 0x3c010000, 0xfc0f0000, "r,R", 2 },
-{ "sdad", 0x3c0b0000, 0xfc0f0000, "r,R", 2 },
-{ "sdld", 0x3c0a0000, 0xfc0f0000, "r,R", 2 },
-
-{ "svda", 0x3c070000, 0xfc0f0000, "v,R", 2 },
-{ "svdl", 0x3c060000, 0xfc0f0000, "v,R", 2 },
-{ "svdc", 0x3c050000, 0xfc0f0000, "v,R", 2 },
-{ "svdad", 0x3c0e0000, 0xfc0f0000, "v,R", 2 },
-{ "svdld", 0x3c0d0000, 0xfc0f0000, "v,R", 2 },
-
-{ "sbm", 0xac080000, 0xfc080000, "f,xOA,X", 4 },
-{ "zbm", 0xac000000, 0xfc080000, "f,xOA,X", 4 },
-{ "tbm", 0xa8080000, 0xfc080000, "f,xOA,X", 4 },
-{ "incmb", 0xa0000000, 0xfc080000, "xOA,X", 4 },
-{ "incmh", 0xa0080000, 0xfc080000, "xOA,X", 4 },
-{ "incmw", 0xa4000000, 0xfc080000, "xOA,X", 4 },
-{ "incmd", 0xa4080000, 0xfc080000, "xOA,X", 4 },
-{ "sbmd", 0x7c080000, 0xfc080000, "r,xOA,X", 4 },
-{ "zbmd", 0x7c000000, 0xfc080000, "r,xOA,X", 4 },
-{ "tbmd", 0x78080000, 0xfc080000, "r,xOA,X", 4 },
-
-{ "ssm", 0x9c080000, 0xfc080000, "f,xOA,X", 4 },
-{ "zsm", 0x9c000000, 0xfc080000, "f,xOA,X", 4 },
-{ "tsm", 0x98080000, 0xfc080000, "f,xOA,X", 4 },
-
-{ "admb", 0xc8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "admh", 0xc8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "admw", 0xc8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "admd", 0xc8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "adr", 0x38000000, 0xfc0f0000, "r,R", 2 },
-{ "armb", 0xe8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "armh", 0xe8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "armw", 0xe8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "armd", 0xe8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "adi", 0xf8010000, 0xfc0f0000, "r,I", 4 },
-{ "sumb", 0xcc080000, 0xfc080000, "r,xOA,X", 4 },
-{ "sumh", 0xcc000001, 0xfc080001, "r,xOA,X", 4 },
-{ "sumw", 0xcc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "sumd", 0xcc000002, 0xfc080002, "r,xOA,X", 4 },
-{ "sur", 0x3c000000, 0xfc0f0000, "r,R", 2 },
-{ "sui", 0xf8020000, 0xfc0f0000, "r,I", 4 },
-{ "mpmb", 0xc0080000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpmh", 0xc0000001, 0xfc080001, "r,xOA,X", 4 },
-{ "mpmw", 0xc0000000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpr", 0x38020000, 0xfc0f0000, "r,R", 2 },
-{ "mprd", 0x3c0f0000, 0xfc0f0000, "r,R", 2 },
-{ "mpi", 0xf8030000, 0xfc0f0000, "r,I", 4 },
-{ "dvmb", 0xc4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "dvmh", 0xc4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "dvmw", 0xc4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "dvr", 0x380a0000, 0xfc0f0000, "r,R", 2 },
-{ "dvi", 0xf8040000, 0xfc0f0000, "r,I", 4 },
-{ "exs", 0x38080000, 0xfc0f0000, "r,R", 2 },
-
-{ "advv", 0x30000000, 0xfc0f0000, "v,V", 2 },
-{ "advvd", 0x30080000, 0xfc0f0000, "v,V", 2 },
-{ "adrv", 0x34000000, 0xfc0f0000, "v,R", 2 },
-{ "adrvd", 0x34080000, 0xfc0f0000, "v,R", 2 },
-{ "suvv", 0x30010000, 0xfc0f0000, "v,V", 2 },
-{ "suvvd", 0x30090000, 0xfc0f0000, "v,V", 2 },
-{ "surv", 0x34010000, 0xfc0f0000, "v,R", 2 },
-{ "survd", 0x34090000, 0xfc0f0000, "v,R", 2 },
-{ "mpvv", 0x30020000, 0xfc0f0000, "v,V", 2 },
-{ "mprv", 0x34020000, 0xfc0f0000, "v,R", 2 },
-
-{ "adfw", 0xe0080000, 0xfc080000, "r,xOA,X", 4 },
-{ "adfd", 0xe0080002, 0xfc080002, "r,xOA,X", 4 },
-{ "adrfw", 0x38010000, 0xfc0f0000, "r,R", 2 },
-{ "adrfd", 0x38090000, 0xfc0f0000, "r,R", 2 },
-{ "surfw", 0xe0000000, 0xfc080000, "r,xOA,X", 4 },
-{ "surfd", 0xe0000002, 0xfc080002, "r,xOA,X", 4 },
-{ "surfw", 0x38030000, 0xfc0f0000, "r,R", 2 },
-{ "surfd", 0x380b0000, 0xfc0f0000, "r,R", 2 },
-{ "mpfw", 0xe4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpfd", 0xe4080002, 0xfc080002, "r,xOA,X", 4 },
-{ "mprfw", 0x38060000, 0xfc0f0000, "r,R", 2 },
-{ "mprfd", 0x380e0000, 0xfc0f0000, "r,R", 2 },
-{ "rfw", 0xe4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "rfd", 0xe4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "rrfw", 0x0c0e0000, 0xfc0f0000, "r", 2 },
-{ "rrfd", 0x0c0f0000, 0xfc0f0000, "r", 2 },
-
-{ "advvfw", 0x30040000, 0xfc0f0000, "v,V", 2 },
-{ "advvfd", 0x300c0000, 0xfc0f0000, "v,V", 2 },
-{ "adrvfw", 0x34040000, 0xfc0f0000, "v,R", 2 },
-{ "adrvfd", 0x340c0000, 0xfc0f0000, "v,R", 2 },
-{ "suvvfw", 0x30050000, 0xfc0f0000, "v,V", 2 },
-{ "suvvfd", 0x300d0000, 0xfc0f0000, "v,V", 2 },
-{ "survfw", 0x34050000, 0xfc0f0000, "v,R", 2 },
-{ "survfd", 0x340d0000, 0xfc0f0000, "v,R", 2 },
-{ "mpvvfw", 0x30060000, 0xfc0f0000, "v,V", 2 },
-{ "mpvvfd", 0x300e0000, 0xfc0f0000, "v,V", 2 },
-{ "mprvfw", 0x34060000, 0xfc0f0000, "v,R", 2 },
-{ "mprvfd", 0x340e0000, 0xfc0f0000, "v,R", 2 },
-{ "rvfw", 0x30070000, 0xfc0f0000, "v", 2 },
-{ "rvfd", 0x300f0000, 0xfc0f0000, "v", 2 },
-
-{ "fltw", 0x38070000, 0xfc0f0000, "r,R", 2 },
-{ "fltd", 0x380f0000, 0xfc0f0000, "r,R", 2 },
-{ "fixw", 0x38050000, 0xfc0f0000, "r,R", 2 },
-{ "fixd", 0x380d0000, 0xfc0f0000, "r,R", 2 },
-{ "cfpds", 0x3c090000, 0xfc0f0000, "r,R", 2 },
-
-{ "fltvw", 0x080d0000, 0xfc0f0000, "v,V", 2 },
-{ "fltvd", 0x080f0000, 0xfc0f0000, "v,V", 2 },
-{ "fixvw", 0x080c0000, 0xfc0f0000, "v,V", 2 },
-{ "fixvd", 0x080e0000, 0xfc0f0000, "v,V", 2 },
-{ "cfpvds", 0x0c0d0000, 0xfc0f0000, "v,V", 2 },
-
-{ "orvrn", 0x000a0000, 0xfc0f0000, "r,V", 2 },
-{ "andvrn", 0x00080000, 0xfc0f0000, "r,V", 2 },
-{ "frsteq", 0x04090000, 0xfc0f0000, "r,V", 2 },
-{ "sigma", 0x0c080000, 0xfc0f0000, "r,V", 2 },
-{ "sigmad", 0x0c0a0000, 0xfc0f0000, "r,V", 2 },
-{ "sigmf", 0x08080000, 0xfc0f0000, "r,V", 2 },
-{ "sigmfd", 0x080a0000, 0xfc0f0000, "r,V", 2 },
-{ "prodf", 0x04080000, 0xfc0f0000, "r,V", 2 },
-{ "prodfd", 0x040a0000, 0xfc0f0000, "r,V", 2 },
-{ "maxv", 0x10080000, 0xfc0f0000, "r,V", 2 },
-{ "maxvd", 0x100a0000, 0xfc0f0000, "r,V", 2 },
-{ "minv", 0x14080000, 0xfc0f0000, "r,V", 2 },
-{ "minvd", 0x140a0000, 0xfc0f0000, "r,V", 2 },
-
-{ "lpsd", 0xf0000000, 0xfc080000, "xOA,X", 4 },
-{ "ldc", 0xf0080000, 0xfc080000, "xOA,X", 4 },
-{ "spm", 0x040c0000, 0xfc0f0000, "r", 2 },
-{ "rpm", 0x040d0000, 0xfc0f0000, "r", 2 },
-{ "tritr", 0x00070000, 0xfc0f0000, "r", 2 },
-{ "trrit", 0x00060000, 0xfc0f0000, "r", 2 },
-{ "rpswt", 0x04080000, 0xfc0f0000, "r", 2 },
-{ "exr", 0xf8070000, 0xfc0f0000, "", 4 },
-{ "halt", 0x00000000, 0xfc0f0000, "", 2 },
-{ "wait", 0x00010000, 0xfc0f0000, "", 2 },
-{ "nop", 0x00020000, 0xfc0f0000, "", 2 },
-{ "eiae", 0x00030000, 0xfc0f0000, "", 2 },
-{ "efae", 0x000d0000, 0xfc0f0000, "", 2 },
-{ "diae", 0x000e0000, 0xfc0f0000, "", 2 },
-{ "dfae", 0x000f0000, 0xfc0f0000, "", 2 },
-{ "spvc", 0xf8060000, 0xfc0f0000, "r,T,N", 4 },
-{ "rdsts", 0x00090000, 0xfc0f0000, "r", 2 },
-{ "setcpu", 0x000c0000, 0xfc0f0000, "r", 2 },
-{ "cmc", 0x000b0000, 0xfc0f0000, "r", 2 },
-{ "trrcu", 0x00040000, 0xfc0f0000, "r", 2 },
-{ "attnio", 0x00050000, 0xfc0f0000, "", 2 },
-{ "fudit", 0x28080000, 0xfc0f0000, "", 2 },
-{ "break", 0x28090000, 0xfc0f0000, "", 2 },
-{ "frzss", 0x280a0000, 0xfc0f0000, "", 2 },
-{ "ripi", 0x04040000, 0xfc0f0000, "r,R", 2 },
-{ "xcp", 0x04050000, 0xfc0f0000, "r", 2 },
-{ "block", 0x04060000, 0xfc0f0000, "", 2 },
-{ "unblock", 0x04070000, 0xfc0f0000, "", 2 },
-{ "trsc", 0x08060000, 0xfc0f0000, "r,R", 2 },
-{ "tscr", 0x08070000, 0xfc0f0000, "r,R", 2 },
-{ "fq", 0x04080000, 0xfc0f0000, "r", 2 },
-{ "flupte", 0x2c080000, 0xfc0f0000, "r", 2 },
-{ "rviu", 0x040f0000, 0xfc0f0000, "", 2 },
-{ "ldel", 0x280c0000, 0xfc0f0000, "r,R", 2 },
-{ "ldu", 0x280d0000, 0xfc0f0000, "r,R", 2 },
-{ "stdecc", 0x280b0000, 0xfc0f0000, "r,R", 2 },
-{ "trpc", 0x08040000, 0xfc0f0000, "r", 2 },
-{ "tpcr", 0x08050000, 0xfc0f0000, "r", 2 },
-{ "ghalt", 0x0c050000, 0xfc0f0000, "r", 2 },
-{ "grun", 0x0c040000, 0xfc0f0000, "", 2 },
-{ "tmpr", 0x2c0a0000, 0xfc0f0000, "r,R", 2 },
-{ "trmp", 0x2c0b0000, 0xfc0f0000, "r,R", 2 },
-
-{ "trrve", 0x28060000, 0xfc0f0000, "r", 2 },
-{ "trver", 0x28070000, 0xfc0f0000, "r", 2 },
-{ "trvlr", 0x280f0000, 0xfc0f0000, "r", 2 },
-
-{ "linkfl", 0x18000000, 0xfc0f0000, "r,R", 2 },
-{ "linkbl", 0x18020000, 0xfc0f0000, "r,R", 2 },
-{ "linkfp", 0x18010000, 0xfc0f0000, "r,R", 2 },
-{ "linkbp", 0x18030000, 0xfc0f0000, "r,R", 2 },
-{ "linkpl", 0x18040000, 0xfc0f0000, "r,R", 2 },
-{ "ulinkl", 0x18080000, 0xfc0f0000, "r,R", 2 },
-{ "ulinkp", 0x18090000, 0xfc0f0000, "r,R", 2 },
-{ "ulinktl", 0x180a0000, 0xfc0f0000, "r,R", 2 },
-{ "ulinktp", 0x180b0000, 0xfc0f0000, "r,R", 2 },
-};
-
-int numopcodes = sizeof(gld_opcodes) / sizeof(gld_opcodes[0]);
-
-struct gld_opcode *endop = gld_opcodes + sizeof(gld_opcodes) /
- sizeof(gld_opcodes[0]);
diff --git a/contrib/gdb/include/opcode/ns32k.h b/contrib/gdb/include/opcode/ns32k.h
deleted file mode 100644
index 42bb8b87aad6..000000000000
--- a/contrib/gdb/include/opcode/ns32k.h
+++ /dev/null
@@ -1,491 +0,0 @@
-/* ns32k-opcode.h -- Opcode table for National Semi 32k processor
- Copyright (C) 1987 Free Software Foundation, Inc.
-
-This file is part of GAS, the GNU Assembler.
-
-GAS is free software; you can 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.
-
-GAS is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GAS; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-#ifdef SEQUENT_COMPATABILITY
-#define DEF_MODEC 20
-#define DEF_MODEL 21
-#endif
-
-#ifndef DEF_MODEC
-#define DEF_MODEC 20
-#endif
-
-#ifndef DEF_MODEL
-#define DEF_MODEL 20
-#endif
-/*
- After deciding the instruction entry (via hash.c) the instruction parser
- will try to match the operands after the instruction to the required set
- given in the entry operandfield. Every operand will result in a change in
- the opcode or the addition of data to the opcode.
- The operands in the source instruction are checked for inconsistent
- semantics.
-
- F : 32 bit float general form
- L : 64 bit float "
- B : byte "
- W : word "
- D : double-word "
- A : double-word gen-address-form ie no regs, no immediate
- I : integer writeable gen int except immediate (A + reg)
- Z : floating writeable gen float except immediate (Z + freg)
- d : displacement
- b : displacement - pc relative addressing acb
- p : displacement - pc relative addressing br bcond bsr cxp
- q : quick
- i : immediate (8 bits)
- This is not a standard ns32k operandtype, it is used to build
- instructions like svc arg1,arg2
- Svc is the instruction SuperVisorCall and is sometimes used to
- call OS-routines from usermode. Some args might be handy!
- r : register number (3 bits)
- O : setcfg instruction optionslist
- C : cinv instruction optionslist
- S : stringinstruction optionslist
- U : registerlist save,enter
- u : registerlist restore,exit
- M : mmu register
- P : cpu register
- g : 3:rd operand of inss or exts instruction
- G : 4:th operand of inss or exts instruction
- Those operands are encoded in the same byte.
- This byte is placed last in the instruction.
- f : operand of sfsr
- H : sequent-hack for bsr (Warning)
-
-column 1 instructions
- 2 number of bits in opcode.
- 3 number of bits in opcode explicitly
- determined by the instruction type.
- 4 opcodeseed, the number we build our opcode
- from.
- 5 operandtypes, used by operandparser.
- 6 size in bytes of immediate
-*/
-struct ns32k_opcode {
- char *name;
- unsigned char opcode_id_size; /* not used by the assembler */
- unsigned char opcode_size;
- unsigned long opcode_seed;
- char *operands;
- unsigned char im_size; /* not used by dissassembler */
- char *default_args; /* default to those args when none given */
- char default_modec; /* default to this addr-mode when ambigous
- ie when the argument of a general addr-mode
- is a plain constant */
- char default_model; /* is a plain label */
-};
-
-#ifdef comment
-/* This section was from the gdb version of this file. */
-
-#ifndef ns32k_opcodeT
-#define ns32k_opcodeT int
-#endif /* no ns32k_opcodeT */
-
-struct not_wot /* ns32k opcode table: wot to do with this */
- /* particular opcode */
-{
- int obits; /* number of opcode bits */
- int ibits; /* number of instruction bits */
- ns32k_opcodeT code; /* op-code (may be > 8 bits!) */
- char *args; /* how to compile said opcode */
-};
-
-struct not /* ns32k opcode text */
-{
- char * name; /* opcode name: lowercase string [key] */
- struct not_wot detail; /* rest of opcode table [datum] */
-};
-
-/* Instructions look like this:
-
- basic instruction--1, 2, or 3 bytes
- index byte for operand A, if operand A is indexed--1 byte
- index byte for operand B, if operand B is indexed--1 byte
- addressing extension for operand A
- addressing extension for operand B
- implied operands
-
- Operand A is the operand listed first in the following opcode table.
- Operand B is the operand listed second in the following opcode table.
- All instructions have at most 2 general operands, so this is enough.
- The implied operands are associated with operands other than A and B.
-
- Each operand has a digit and a letter.
-
- The digit gives the position in the assembly language. The letter,
- one of the following, tells us what kind of operand it is. */
-
-/* F : 32 bit float
- * L : 64 bit float
- * B : byte
- * W : word
- * D : double-word
- * I : integer not immediate
- * Z : floating not immediate
- * d : displacement
- * q : quick
- * i : immediate (8 bits)
- * r : register number (3 bits)
- * p : displacement - pc relative addressing
-*/
-
-
-#endif /* comment */
-
-static const struct ns32k_opcode ns32k_opcodes[]=
-{
- { "absf", 14,24, 0x35be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "absl", 14,24, 0x34be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "absb", 14,24, 0x304e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "absw", 14,24, 0x314e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "absd", 14,24, 0x334e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "acbb", 7,16, 0x4c, "2I1q3p", 1, "", DEF_MODEC,DEF_MODEL },
- { "acbw", 7,16, 0x4d, "2I1q3p", 2, "", DEF_MODEC,DEF_MODEL },
- { "acbd", 7,16, 0x4f, "2I1q3p", 4, "", DEF_MODEC,DEF_MODEL },
- { "addf", 14,24, 0x01be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "addl", 14,24, 0x00be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "addb", 6,16, 0x00, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "addw", 6,16, 0x01, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "addd", 6,16, 0x03, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "addcb", 6,16, 0x10, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "addcw", 6,16, 0x11, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "addcd", 6,16, 0x13, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "addpb", 14,24, 0x3c4e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "addpw", 14,24, 0x3d4e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "addpd", 14,24, 0x3f4e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "addqb", 7,16, 0x0c, "2I1q", 1, "", DEF_MODEC,DEF_MODEL },
- { "addqw", 7,16, 0x0d, "2I1q", 2, "", DEF_MODEC,DEF_MODEL },
- { "addqd", 7,16, 0x0f, "2I1q", 4, "", DEF_MODEC,DEF_MODEL },
- { "addr", 6,16, 0x27, "1A2I", 4, "", 21,21 },
- { "adjspb", 11,16, 0x057c, "1B", 1, "", DEF_MODEC,DEF_MODEL },
- { "adjspw", 11,16, 0x057d, "1W", 2, "", DEF_MODEC,DEF_MODEL },
- { "adjspd", 11,16, 0x057f, "1D", 4, "", DEF_MODEC,DEF_MODEL },
- { "andb", 6,16, 0x28, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "andw", 6,16, 0x29, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "andd", 6,16, 0x2b, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "ashb", 14,24, 0x044e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "ashw", 14,24, 0x054e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "ashd", 14,24, 0x074e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "beq", 8,8, 0x0a, "1p", 0, "", 21,21 },
- { "bne", 8,8, 0x1a, "1p", 0, "", 21,21 },
- { "bcs", 8,8, 0x2a, "1p", 0, "", 21,21 },
- { "bcc", 8,8, 0x3a, "1p", 0, "", 21,21 },
- { "bhi", 8,8, 0x4a, "1p", 0, "", 21,21 },
- { "bls", 8,8, 0x5a, "1p", 0, "", 21,21 },
- { "bgt", 8,8, 0x6a, "1p", 0, "", 21,21 },
- { "ble", 8,8, 0x7a, "1p", 0, "", 21,21 },
- { "bfs", 8,8, 0x8a, "1p", 0, "", 21,21 },
- { "bfc", 8,8, 0x9a, "1p", 0, "", 21,21 },
- { "blo", 8,8, 0xaa, "1p", 0, "", 21,21 },
- { "bhs", 8,8, 0xba, "1p", 0, "", 21,21 },
- { "blt", 8,8, 0xca, "1p", 0, "", 21,21 },
- { "bge", 8,8, 0xda, "1p", 0, "", 21,21 },
- { "but", 8,8, 0xea, "1p", 0, "", 21,21 },
- { "buf", 8,8, 0xfa, "1p", 0, "", 21,21 },
- { "bicb", 6,16, 0x08, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "bicw", 6,16, 0x09, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "bicd", 6,16, 0x0b, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "bicpsrb", 11,16, 0x17c, "1B", 1, "", DEF_MODEC,DEF_MODEL },
- { "bicpsrw", 11,16, 0x17d, "1W", 2, "", DEF_MODEC,DEF_MODEL },
- { "bispsrb", 11,16, 0x37c, "1B", 1, "", DEF_MODEC,DEF_MODEL },
- { "bispsrw", 11,16, 0x37d, "1W", 2, "", DEF_MODEC,DEF_MODEL },
- { "bpt", 8,8, 0xf2, "", 0, "", DEF_MODEC,DEF_MODEL },
- { "br", 8,8, 0xea, "1p", 0, "", 21,21 },
-#ifdef SEQUENT_COMPATABILITY
- { "bsr", 8,8, 0x02, "1H", 0, "", 21,21 },
-#else
- { "bsr", 8,8, 0x02, "1p", 0, "", 21,21 },
-#endif
- { "caseb", 11,16, 0x77c, "1B", 1, "", DEF_MODEC,DEF_MODEL },
- { "casew", 11,16, 0x77d, "1W", 2, "", DEF_MODEC,DEF_MODEL },
- { "cased", 11,16, 0x77f, "1D", 4, "", DEF_MODEC,DEF_MODEL },
- { "cbitb", 14,24, 0x084e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "cbitw", 14,24, 0x094e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "cbitd", 14,24, 0x0b4e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "cbitib", 14,24, 0x0c4e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "cbitiw", 14,24, 0x0d4e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "cbitid", 14,24, 0x0f4e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "checkb", 11,24, 0x0ee, "2A3B1r", 1, "", DEF_MODEC,DEF_MODEL },
- { "checkw", 11,24, 0x1ee, "2A3W1r", 2, "", DEF_MODEC,DEF_MODEL },
- { "checkd", 11,24, 0x3ee, "2A3D1r", 4, "", DEF_MODEC,DEF_MODEL },
- { "cinv", 14,24, 0x271e, "2D1C", 4, "", DEF_MODEC,DEF_MODEL },
- { "cmpf", 14,24, 0x09be, "1F2F", 4, "", DEF_MODEC,DEF_MODEL },
- { "cmpl", 14,24, 0x08be, "1L2L", 8, "", DEF_MODEC,DEF_MODEL },
- { "cmpb", 6,16, 0x04, "1B2B", 1, "", DEF_MODEC,DEF_MODEL },
- { "cmpw", 6,16, 0x05, "1W2W", 2, "", DEF_MODEC,DEF_MODEL },
- { "cmpd", 6,16, 0x07, "1D2D", 4, "", DEF_MODEC,DEF_MODEL },
- { "cmpmb", 14,24, 0x04ce, "1A2A3b", 1, "", DEF_MODEC,DEF_MODEL },
- { "cmpmw", 14,24, 0x05ce, "1A2A3b", 2, "", DEF_MODEC,DEF_MODEL },
- { "cmpmd", 14,24, 0x07ce, "1A2A3b", 4, "", DEF_MODEC,DEF_MODEL },
- { "cmpqb", 7,16, 0x1c, "2B1q", 1, "", DEF_MODEC,DEF_MODEL },
- { "cmpqw", 7,16, 0x1d, "2W1q", 2, "", DEF_MODEC,DEF_MODEL },
- { "cmpqd", 7,16, 0x1f, "2D1q", 4, "", DEF_MODEC,DEF_MODEL },
- { "cmpsb", 16,24, 0x040e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "cmpsw", 16,24, 0x050e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "cmpsd", 16,24, 0x070e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "cmpst", 16,24, 0x840e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "comb", 14,24, 0x344e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "comw", 14,24, 0x354e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "comd", 14,24, 0x374e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "cvtp", 11,24, 0x036e, "2A3D1r", 4, "", DEF_MODEC,DEF_MODEL },
- { "cxp", 8,8, 0x22, "1p", 0, "", 21,21 },
- { "cxpd", 11,16, 0x07f, "1A", 4, "", DEF_MODEC,DEF_MODEL },
- { "deib", 14,24, 0x2cce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "deiw", 14,24, 0x2dce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "deid", 14,24, 0x2fce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "dia", 8,8, 0xc2, "", 1, "", DEF_MODEC,DEF_MODEL },
- { "divf", 14,24, 0x21be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "divl", 14,24, 0x20be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "divb", 14,24, 0x3cce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "divw", 14,24, 0x3dce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "divd", 14,24, 0x3fce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "enter", 8,8, 0x82, "1U2d", 0, "", DEF_MODEC,DEF_MODEL },
- { "exit", 8,8, 0x92, "1u", 0, "", DEF_MODEC,DEF_MODEL },
- { "extb", 11,24, 0x02e, "2I3B1r4d", 1, "", DEF_MODEC,DEF_MODEL },
- { "extw", 11,24, 0x12e, "2I3W1r4d", 2, "", DEF_MODEC,DEF_MODEL },
- { "extd", 11,24, 0x32e, "2I3D1r4d", 4, "", DEF_MODEC,DEF_MODEL },
- { "extsb", 14,24, 0x0cce, "1I2I4G3g", 1, "", DEF_MODEC,DEF_MODEL },
- { "extsw", 14,24, 0x0dce, "1I2I4G3g", 2, "", DEF_MODEC,DEF_MODEL },
- { "extsd", 14,24, 0x0fce, "1I2I4G3g", 4, "", DEF_MODEC,DEF_MODEL },
- { "ffsb", 14,24, 0x046e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "ffsw", 14,24, 0x056e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "ffsd", 14,24, 0x076e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "flag", 8,8, 0xd2, "", 0, "", DEF_MODEC,DEF_MODEL },
- { "floorfb", 14,24, 0x3c3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "floorfw", 14,24, 0x3d3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "floorfd", 14,24, 0x3f3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "floorlb", 14,24, 0x383e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "floorlw", 14,24, 0x393e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "floorld", 14,24, 0x3b3e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "ibitb", 14,24, 0x384e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "ibitw", 14,24, 0x394e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "ibitd", 14,24, 0x3b4e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "indexb", 11,24, 0x42e, "2B3B1r", 1, "", DEF_MODEC,DEF_MODEL },
- { "indexw", 11,24, 0x52e, "2W3W1r", 2, "", DEF_MODEC,DEF_MODEL },
- { "indexd", 11,24, 0x72e, "2D3D1r", 4, "", DEF_MODEC,DEF_MODEL },
- { "insb", 11,24, 0x0ae, "2B3I1r4d", 1, "", DEF_MODEC,DEF_MODEL },
- { "insw", 11,24, 0x1ae, "2W3I1r4d", 2, "", DEF_MODEC,DEF_MODEL },
- { "insd", 11,24, 0x3ae, "2D3I1r4d", 4, "", DEF_MODEC,DEF_MODEL },
- { "inssb", 14,24, 0x08ce, "1B2I4G3g", 1, "", DEF_MODEC,DEF_MODEL },
- { "inssw", 14,24, 0x09ce, "1W2I4G3g", 2, "", DEF_MODEC,DEF_MODEL },
- { "inssd", 14,24, 0x0bce, "1D2I4G3g", 4, "", DEF_MODEC,DEF_MODEL },
- { "jsr", 11,16, 0x67f, "1A", 4, "", 21,21 },
- { "jump", 11,16, 0x27f, "1A", 4, "", 21,21 },
- { "lfsr", 19,24, 0x00f3e,"1D", 4, "", DEF_MODEC,DEF_MODEL },
- { "lmr", 15,24, 0x0b1e, "2D1M", 4, "", DEF_MODEC,DEF_MODEL },
- { "lprb", 7,16, 0x6c, "2B1P", 1, "", DEF_MODEC,DEF_MODEL },
- { "lprw", 7,16, 0x6d, "2W1P", 2, "", DEF_MODEC,DEF_MODEL },
- { "lprd", 7,16, 0x6f, "2D1P", 4, "", DEF_MODEC,DEF_MODEL },
- { "lshb", 14,24, 0x144e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "lshw", 14,24, 0x154e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "lshd", 14,24, 0x174e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "meib", 14,24, 0x24ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "meiw", 14,24, 0x25ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "meid", 14,24, 0x27ce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "modb", 14,24, 0x38ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "modw", 14,24, 0x39ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "modd", 14,24, 0x3bce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "movf", 14,24, 0x05be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "movl", 14,24, 0x04be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "movb", 6,16, 0x14, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "movw", 6,16, 0x15, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "movd", 6,16, 0x17, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "movbf", 14,24, 0x043e, "1B2Z", 1, "", DEF_MODEC,DEF_MODEL },
- { "movwf", 14,24, 0x053e, "1W2Z", 2, "", DEF_MODEC,DEF_MODEL },
- { "movdf", 14,24, 0x073e, "1D2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "movbl", 14,24, 0x003e, "1B2Z", 1, "", DEF_MODEC,DEF_MODEL },
- { "movwl", 14,24, 0x013e, "1W2Z", 2, "", DEF_MODEC,DEF_MODEL },
- { "movdl", 14,24, 0x033e, "1D2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "movfl", 14,24, 0x1b3e, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "movlf", 14,24, 0x163e, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "movmb", 14,24, 0x00ce, "1A2A3b", 1, "", DEF_MODEC,DEF_MODEL },
- { "movmw", 14,24, 0x01ce, "1A2A3b", 2, "", DEF_MODEC,DEF_MODEL },
- { "movmd", 14,24, 0x03ce, "1A2A3b", 4, "", DEF_MODEC,DEF_MODEL },
- { "movqb", 7,16, 0x5c, "2I1q", 1, "", DEF_MODEC,DEF_MODEL },
- { "movqw", 7,16, 0x5d, "2I1q", 2, "", DEF_MODEC,DEF_MODEL },
- { "movqd", 7,16, 0x5f, "2I1q", 4, "", DEF_MODEC,DEF_MODEL },
- { "movsb", 16,24, 0x000e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "movsw", 16,24, 0x010e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "movsd", 16,24, 0x030e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "movst", 16,24, 0x800e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "movsub", 14,24, 0x0cae, "1A2A", 1, "", DEF_MODEC,DEF_MODEL },
- { "movsuw", 14,24, 0x0dae, "1A2A", 2, "", DEF_MODEC,DEF_MODEL },
- { "movsud", 14,24, 0x0fae, "1A2A", 4, "", DEF_MODEC,DEF_MODEL },
- { "movusb", 14,24, 0x1cae, "1A2A", 1, "", DEF_MODEC,DEF_MODEL },
- { "movusw", 14,24, 0x1dae, "1A2A", 2, "", DEF_MODEC,DEF_MODEL },
- { "movusd", 14,24, 0x1fae, "1A2A", 4, "", DEF_MODEC,DEF_MODEL },
- { "movxbd", 14,24, 0x1cce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "movxwd", 14,24, 0x1dce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "movxbw", 14,24, 0x10ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "movzbd", 14,24, 0x18ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "movzwd", 14,24, 0x19ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "movzbw", 14,24, 0x14ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "mulf", 14,24, 0x31be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "mull", 14,24, 0x30be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "mulb", 14,24, 0x20ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "mulw", 14,24, 0x21ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "muld", 14,24, 0x23ce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "negf", 14,24, 0x15be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "negl", 14,24, 0x14be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "negb", 14,24, 0x204e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "negw", 14,24, 0x214e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "negd", 14,24, 0x234e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "nop", 8,8, 0xa2, "", 0, "", DEF_MODEC,DEF_MODEL },
- { "notb", 14,24, 0x244e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "notw", 14,24, 0x254e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "notd", 14,24, 0x274e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "orb", 6,16, 0x18, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "orw", 6,16, 0x19, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "ord", 6,16, 0x1b, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "quob", 14,24, 0x30ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "quow", 14,24, 0x31ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "quod", 14,24, 0x33ce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "rdval", 19,24, 0x0031e,"1A", 4, "", DEF_MODEC,DEF_MODEL },
- { "remb", 14,24, 0x34ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "remw", 14,24, 0x35ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "remd", 14,24, 0x37ce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "restore", 8,8, 0x72, "1u", 0, "", DEF_MODEC,DEF_MODEL },
- { "ret", 8,8, 0x12, "1d", 0, "", DEF_MODEC,DEF_MODEL },
- { "reti", 8,8, 0x52, "", 0, "", DEF_MODEC,DEF_MODEL },
- { "rett", 8,8, 0x42, "1d", 0, "", DEF_MODEC,DEF_MODEL },
- { "rotb", 14,24, 0x004e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "rotw", 14,24, 0x014e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "rotd", 14,24, 0x034e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "roundfb", 14,24, 0x243e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "roundfw", 14,24, 0x253e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "roundfd", 14,24, 0x273e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "roundlb", 14,24, 0x203e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "roundlw", 14,24, 0x213e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "roundld", 14,24, 0x233e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "rxp", 8,8, 0x32, "1d", 0, "", DEF_MODEC,DEF_MODEL },
- { "seqb", 11,16, 0x3c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "seqw", 11,16, 0x3d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "seqd", 11,16, 0x3f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sneb", 11,16, 0xbc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "snew", 11,16, 0xbd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sned", 11,16, 0xbf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "scsb", 11,16, 0x13c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "scsw", 11,16, 0x13d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "scsd", 11,16, 0x13f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sccb", 11,16, 0x1bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sccw", 11,16, 0x1bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sccd", 11,16, 0x1bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "shib", 11,16, 0x23c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "shiw", 11,16, 0x23d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "shid", 11,16, 0x23f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "slsb", 11,16, 0x2bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "slsw", 11,16, 0x2bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "slsd", 11,16, 0x2bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sgtb", 11,16, 0x33c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sgtw", 11,16, 0x33d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sgtd", 11,16, 0x33f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sleb", 11,16, 0x3bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "slew", 11,16, 0x3bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sled", 11,16, 0x3bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfsb", 11,16, 0x43c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfsw", 11,16, 0x43d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfsd", 11,16, 0x43f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfcb", 11,16, 0x4bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfcw", 11,16, 0x4bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfcd", 11,16, 0x4bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "slob", 11,16, 0x53c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "slow", 11,16, 0x53d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "slod", 11,16, 0x53f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "shsb", 11,16, 0x5bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "shsw", 11,16, 0x5bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "shsd", 11,16, 0x5bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sltb", 11,16, 0x63c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sltw", 11,16, 0x63d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sltd", 11,16, 0x63f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sgeb", 11,16, 0x6bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sgew", 11,16, 0x6bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sged", 11,16, 0x6bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sutb", 11,16, 0x73c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sutw", 11,16, 0x73d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sutd", 11,16, 0x73f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sufb", 11,16, 0x7bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sufw", 11,16, 0x7bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sufd", 11,16, 0x7bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "save", 8,8, 0x62, "1U", 0, "", DEF_MODEC,DEF_MODEL },
- { "sbitb", 14,24, 0x184e, "1B2A", 1, "", DEF_MODEC,DEF_MODEL },
- { "sbitw", 14,24, 0x194e, "1W2A", 2, "", DEF_MODEC,DEF_MODEL },
- { "sbitd", 14,24, 0x1b4e, "1D2A", 4, "", DEF_MODEC,DEF_MODEL },
- { "sbitib", 14,24, 0x1c4e, "1B2A", 1, "", DEF_MODEC,DEF_MODEL },
- { "sbitiw", 14,24, 0x1d4e, "1W2A", 2, "", DEF_MODEC,DEF_MODEL },
- { "sbitid", 14,24, 0x1f4e, "1D2A", 4, "", DEF_MODEC,DEF_MODEL },
- { "setcfg", 15,24, 0x0b0e, "1O", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfsr", 14,24, 0x373e, "1f", 0, "", DEF_MODEC,DEF_MODEL },
- { "skpsb", 16,24, 0x0c0e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "skpsw", 16,24, 0x0d0e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "skpsd", 16,24, 0x0f0e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "skpst", 16,24, 0x8c0e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "smr", 15,24, 0x0f1e, "2I1M", 4, "", DEF_MODEC,DEF_MODEL },
- { "sprb", 7,16, 0x2c, "2I1P", 1, "", DEF_MODEC,DEF_MODEL },
- { "sprw", 7,16, 0x2d, "2I1P", 2, "", DEF_MODEC,DEF_MODEL },
- { "sprd", 7,16, 0x2f, "2I1P", 4, "", DEF_MODEC,DEF_MODEL },
- { "subf", 14,24, 0x11be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "subl", 14,24, 0x10be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "subb", 6,16, 0x20, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "subw", 6,16, 0x21, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "subd", 6,16, 0x23, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "subcb", 6,16, 0x30, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "subcw", 6,16, 0x31, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "subcd", 6,16, 0x33, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "subpb", 14,24, 0x2c4e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "subpw", 14,24, 0x2d4e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "subpd", 14,24, 0x2f4e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
-#ifdef NS32K_SVC_IMMED_OPERANDS
- { "svc", 8,8, 0xe2, "2i1i", 1, "", DEF_MODEC,DEF_MODEL }, /* not really, but some unix uses it */
-#else
- { "svc", 8,8, 0xe2, "", 0, "", DEF_MODEC,DEF_MODEL },
-#endif
- { "tbitb", 6,16, 0x34, "1B2A", 1, "", DEF_MODEC,DEF_MODEL },
- { "tbitw", 6,16, 0x35, "1W2A", 2, "", DEF_MODEC,DEF_MODEL },
- { "tbitd", 6,16, 0x37, "1D2A", 4, "", DEF_MODEC,DEF_MODEL },
- { "truncfb", 14,24, 0x2c3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "truncfw", 14,24, 0x2d3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "truncfd", 14,24, 0x2f3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "trunclb", 14,24, 0x283e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "trunclw", 14,24, 0x293e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "truncld", 14,24, 0x2b3e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "wait", 8,8, 0xb2, "", 0, "", DEF_MODEC,DEF_MODEL },
- { "wrval", 19,24, 0x0071e,"1A", 0, "", DEF_MODEC,DEF_MODEL },
- { "xorb", 6,16, 0x38, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "xorw", 6,16, 0x39, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "xord", 6,16, 0x3b, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "dotf", 14,24, 0x0dfe, "1F2F", 4, "", DEF_MODEC,DEF_MODEL },
- { "dotl", 14,24, 0x0cfe, "1L2L", 8, "", DEF_MODEC,DEF_MODEL },
- { "logbf", 14,24, 0x15fe, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "logbl", 14,24, 0x14fe, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "polyf", 14,24, 0x09fe, "1F2F", 4, "", DEF_MODEC,DEF_MODEL },
- { "polyl", 14,24, 0x08fe, "1L2L", 8, "", DEF_MODEC,DEF_MODEL },
- { "scalbf", 14,24, 0x11fe, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "scalbl", 14,24, 0x10fe, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
-};
-
-static const int numopcodes=sizeof(ns32k_opcodes)/sizeof(ns32k_opcodes[0]);
-
-static const struct ns32k_opcode *const endop = ns32k_opcodes+sizeof(ns32k_opcodes)/sizeof(ns32k_opcodes[0]);
-
-#define MAX_ARGS 4
-#define ARG_LEN 50
-
diff --git a/contrib/gdb/include/opcode/pn.h b/contrib/gdb/include/opcode/pn.h
deleted file mode 100644
index 0f59a2a53ce9..000000000000
--- a/contrib/gdb/include/opcode/pn.h
+++ /dev/null
@@ -1,282 +0,0 @@
-/* Print GOULD PN (PowerNode) instructions for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1989 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 GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct gld_opcode
-{
- char *name;
- unsigned long opcode;
- unsigned long mask;
- char *args;
- int length;
-};
-
-/* We store four bytes of opcode for all opcodes because that
- is the most any of them need. The actual length of an instruction
- is always at least 2 bytes, and at most four. The length of the
- instruction is based on the opcode.
-
- The mask component is a mask saying which bits must match
- particular opcode in order for an instruction to be an instance
- of that opcode.
-
- The args component is a string containing characters
- that are used to format the arguments to the instruction. */
-
-/* Kinds of operands:
- r Register in first field
- R Register in second field
- b Base register in first field
- B Base register in second field
- v Vector register in first field
- V Vector register in first field
- A Optional address register (base register)
- X Optional index register
- I Immediate data (16bits signed)
- O Offset field (16bits signed)
- h Offset field (15bits signed)
- d Offset field (14bits signed)
- S Shift count field
-
- any other characters are printed as is...
-*/
-
-/* The assembler requires that this array be sorted as follows:
- all instances of the same mnemonic must be consecutive.
- All instances of the same mnemonic with the same number of operands
- must be consecutive.
- */
-struct gld_opcode gld_opcodes[] =
-{
-{ "abm", 0xa0080000, 0xfc080000, "f,xOA,X", 4 },
-{ "abr", 0x18080000, 0xfc0c0000, "r,f", 2 },
-{ "aci", 0xfc770000, 0xfc7f8000, "r,I", 4 },
-{ "adfd", 0xe0080002, 0xfc080002, "r,xOA,X", 4 },
-{ "adfw", 0xe0080000, 0xfc080000, "r,xOA,X", 4 },
-{ "adi", 0xc8010000, 0xfc7f0000, "r,I", 4 },
-{ "admb", 0xb8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "admd", 0xb8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "admh", 0xb8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "admw", 0xb8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "adr", 0x38000000, 0xfc0f0000, "r,R", 2 },
-{ "adrfd", 0x38090000, 0xfc0f0000, "r,R", 2 },
-{ "adrfw", 0x38010000, 0xfc0f0000, "r,R", 2 },
-{ "adrm", 0x38080000, 0xfc0f0000, "r,R", 2 },
-{ "ai", 0xfc030000, 0xfc07ffff, "I", 4 },
-{ "anmb", 0x84080000, 0xfc080000, "r,xOA,X", 4 },
-{ "anmd", 0x84000002, 0xfc080002, "r,xOA,X", 4 },
-{ "anmh", 0x84000001, 0xfc080001, "r,xOA,X", 4 },
-{ "anmw", 0x84000000, 0xfc080000, "r,xOA,X", 4 },
-{ "anr", 0x04000000, 0xfc0f0000, "r,R", 2 },
-{ "armb", 0xe8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "armd", 0xe8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "armh", 0xe8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "armw", 0xe8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bcf", 0xf0000000, 0xfc080000, "I,xOA,X", 4 },
-{ "bct", 0xec000000, 0xfc080000, "I,xOA,X", 4 },
-{ "bei", 0x00060000, 0xffff0000, "", 2 },
-{ "bft", 0xf0000000, 0xff880000, "xOA,X", 4 },
-{ "bib", 0xf4000000, 0xfc780000, "r,xOA", 4 },
-{ "bid", 0xf4600000, 0xfc780000, "r,xOA", 4 },
-{ "bih", 0xf4200000, 0xfc780000, "r,xOA", 4 },
-{ "biw", 0xf4400000, 0xfc780000, "r,xOA", 4 },
-{ "bl", 0xf8800000, 0xff880000, "xOA,X", 4 },
-{ "bsub", 0x5c080000, 0xff8f0000, "", 2 },
-{ "bsubm", 0x28080000, 0xfc080000, "", 4 },
-{ "bu", 0xec000000, 0xff880000, "xOA,X", 4 },
-{ "call", 0x28080000, 0xfc0f0000, "", 2 },
-{ "callm", 0x5c080000, 0xff880000, "", 4 },
-{ "camb", 0x90080000, 0xfc080000, "r,xOA,X", 4 },
-{ "camd", 0x90000002, 0xfc080002, "r,xOA,X", 4 },
-{ "camh", 0x90000001, 0xfc080001, "r,xOA,X", 4 },
-{ "camw", 0x90000000, 0xfc080000, "r.xOA,X", 4 },
-{ "car", 0x10000000, 0xfc0f0000, "r,R", 2 },
-{ "cd", 0xfc060000, 0xfc070000, "r,f", 4 },
-{ "cea", 0x000f0000, 0xffff0000, "", 2 },
-{ "ci", 0xc8050000, 0xfc7f0000, "r,I", 4 },
-{ "cmc", 0x040a0000, 0xfc7f0000, "r", 2 },
-{ "cmmb", 0x94080000, 0xfc080000, "r,xOA,X", 4 },
-{ "cmmd", 0x94000002, 0xfc080002, "r,xOA,X", 4 },
-{ "cmmh", 0x94000001, 0xfc080001, "r,xOA,X", 4 },
-{ "cmmw", 0x94000000, 0xfc080000, "r,xOA,X", 4 },
-{ "cmr", 0x14000000, 0xfc0f0000, "r,R", 2 },
-{ "daci", 0xfc7f0000, 0xfc7f8000, "r,I", 4 },
-{ "dae", 0x000e0000, 0xffff0000, "", 2 },
-{ "dai", 0xfc040000, 0xfc07ffff, "I", 4 },
-{ "dci", 0xfc6f0000, 0xfc7f8000, "r,I", 4 },
-{ "di", 0xfc010000, 0xfc07ffff, "I", 4 },
-{ "dvfd", 0xe4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "dvfw", 0xe4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "dvi", 0xc8040000, 0xfc7f0000, "r,I", 4 },
-{ "dvmb", 0xc4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "dvmh", 0xc4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "dvmw", 0xc4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "dvr", 0x380a0000, 0xfc0f0000, "r,R", 2 },
-{ "dvrfd", 0x380c0000, 0xfc0f0000, "r,R", 4 },
-{ "dvrfw", 0x38040000, 0xfc0f0000, "r,xOA,X", 4 },
-{ "eae", 0x00080000, 0xffff0000, "", 2 },
-{ "eci", 0xfc670000, 0xfc7f8080, "r,I", 4 },
-{ "ecwcs", 0xfc4f0000, 0xfc7f8000, "", 4 },
-{ "ei", 0xfc000000, 0xfc07ffff, "I", 4 },
-{ "eomb", 0x8c080000, 0xfc080000, "r,xOA,X", 4 },
-{ "eomd", 0x8c000002, 0xfc080002, "r,xOA,X", 4 },
-{ "eomh", 0x8c000001, 0xfc080001, "r,xOA,X", 4 },
-{ "eomw", 0x8c000000, 0xfc080000, "r,xOA,X", 4 },
-{ "eor", 0x0c000000, 0xfc0f0000, "r,R", 2 },
-{ "eorm", 0x0c080000, 0xfc0f0000, "r,R", 2 },
-{ "es", 0x00040000, 0xfc7f0000, "r", 2 },
-{ "exm", 0xa8000000, 0xff880000, "xOA,X", 4 },
-{ "exr", 0xc8070000, 0xfc7f0000, "r", 2 },
-{ "exrr", 0xc8070002, 0xfc7f0002, "r", 2 },
-{ "fixd", 0x380d0000, 0xfc0f0000, "r,R", 2 },
-{ "fixw", 0x38050000, 0xfc0f0000, "r,R", 2 },
-{ "fltd", 0x380f0000, 0xfc0f0000, "r,R", 2 },
-{ "fltw", 0x38070000, 0xfc0f0000, "r,R", 2 },
-{ "grio", 0xfc3f0000, 0xfc7f8000, "r,I", 4 },
-{ "halt", 0x00000000, 0xffff0000, "", 2 },
-{ "hio", 0xfc370000, 0xfc7f8000, "r,I", 4 },
-{ "jwcs", 0xfa080000, 0xff880000, "xOA,X", 4 },
-{ "la", 0x50000000, 0xfc000000, "r,xOA,X", 4 },
-{ "labr", 0x58080000, 0xfc080000, "b,xOA,X", 4 },
-{ "lb", 0xac080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lcs", 0x00030000, 0xfc7f0000, "r", 2 },
-{ "ld", 0xac000002, 0xfc080002, "r,xOA,X", 4 },
-{ "lear", 0x80000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lf", 0xcc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lfbr", 0xcc080000, 0xfc080000, "b,xOA,X", 4 },
-{ "lh", 0xac000001, 0xfc080001, "r,xOA,X", 4 },
-{ "li", 0xc8000000, 0xfc7f0000, "r,I", 4 },
-{ "lmap", 0x2c070000, 0xfc7f0000, "r", 2 },
-{ "lmb", 0xb0080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lmd", 0xb0000002, 0xfc080002, "r,xOA,X", 4 },
-{ "lmh", 0xb0000001, 0xfc080001, "r,xOA,X", 4 },
-{ "lmw", 0xb0000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lnb", 0xb4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lnd", 0xb4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "lnh", 0xb4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "lnw", 0xb4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lpsd", 0xf9800000, 0xff880000, "r,xOA,X", 4 },
-{ "lpsdcm", 0xfa800000, 0xff880000, "r,xOA,X", 4 },
-{ "lw", 0xac000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lwbr", 0x5c000000, 0xfc080000, "b,xOA,X", 4 },
-{ "mpfd", 0xe4080002, 0xfc080002, "r,xOA,X", 4 },
-{ "mpfw", 0xe4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpi", 0xc8030000, 0xfc7f0000, "r,I", 4 },
-{ "mpmb", 0xc0080000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpmh", 0xc0000001, 0xfc080001, "r,xOA,X", 4 },
-{ "mpmw", 0xc0000000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpr", 0x38020000, 0xfc0f0000, "r,R", 2 },
-{ "mprfd", 0x380e0000, 0xfc0f0000, "r,R", 2 },
-{ "mprfw", 0x38060000, 0xfc0f0000, "r,R", 2 },
-{ "nop", 0x00020000, 0xffff0000, "", 2 },
-{ "ormb", 0x88080000, 0xfc080000, "r,xOA,X", 4 },
-{ "ormd", 0x88000002, 0xfc080002, "r,xOA,X", 4 },
-{ "ormh", 0x88000001, 0xfc080001, "r,xOA,X", 4 },
-{ "ormw", 0x88000000, 0xfc080000, "r,xOA,X", 4 },
-{ "orr", 0x08000000, 0xfc0f0000, "r,R", 2 },
-{ "orrm", 0x08080000, 0xfc0f0000, "r,R", 2 },
-{ "rdsts", 0x00090000, 0xfc7f0000, "r", 2 },
-{ "return", 0x280e0000, 0xfc7f0000, "", 2 },
-{ "ri", 0xfc020000, 0xfc07ffff, "I", 4 },
-{ "rnd", 0x00050000, 0xfc7f0000, "r", 2 },
-{ "rpswt", 0x040b0000, 0xfc7f0000, "r", 2 },
-{ "rschnl", 0xfc2f0000, 0xfc7f8000, "r,I", 4 },
-{ "rsctl", 0xfc470000, 0xfc7f8000, "r,I", 4 },
-{ "rwcs", 0x000b0000, 0xfc0f0000, "r,R", 2 },
-{ "sacz", 0x10080000, 0xfc0f0000, "r,R", 2 },
-{ "sbm", 0x98080000, 0xfc080000, "f,xOA,X", 4 },
-{ "sbr", 0x18000000, 0xfc0c0000, "r,f", 4 },
-{ "sea", 0x000d0000, 0xffff0000, "", 2 },
-{ "setcpu", 0x2c090000, 0xfc7f0000, "r", 2 },
-{ "sio", 0xfc170000, 0xfc7f8000, "r,I", 4 },
-{ "sipu", 0x000a0000, 0xffff0000, "", 2 },
-{ "sla", 0x1c400000, 0xfc600000, "r,S", 2 },
-{ "slad", 0x20400000, 0xfc600000, "r,S", 2 },
-{ "slc", 0x24400000, 0xfc600000, "r,S", 2 },
-{ "sll", 0x1c600000, 0xfc600000, "r,S", 2 },
-{ "slld", 0x20600000, 0xfc600000, "r,S", 2 },
-{ "smc", 0x04070000, 0xfc070000, "", 2 },
-{ "sra", 0x1c000000, 0xfc600000, "r,S", 2 },
-{ "srad", 0x20000000, 0xfc600000, "r,S", 2 },
-{ "src", 0x24000000, 0xfc600000, "r,S", 2 },
-{ "srl", 0x1c200000, 0xfc600000, "r,S", 2 },
-{ "srld", 0x20200000, 0xfc600000, "r,S", 2 },
-{ "stb", 0xd4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "std", 0xd4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "stf", 0xdc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "stfbr", 0x54000000, 0xfc080000, "b,xOA,X", 4 },
-{ "sth", 0xd4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "stmb", 0xd8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "stmd", 0xd8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "stmh", 0xd8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "stmw", 0xd8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "stpio", 0xfc270000, 0xfc7f8000, "r,I", 4 },
-{ "stw", 0xd4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "stwbr", 0x54000000, 0xfc080000, "b,xOA,X", 4 },
-{ "suabr", 0x58000000, 0xfc080000, "b,xOA,X", 4 },
-{ "sufd", 0xe0000002, 0xfc080002, "r,xOA,X", 4 },
-{ "sufw", 0xe0000000, 0xfc080000, "r,xOA,X", 4 },
-{ "sui", 0xc8020000, 0xfc7f0000, "r,I", 4 },
-{ "sumb", 0xbc080000, 0xfc080000, "r,xOA,X", 4 },
-{ "sumd", 0xbc000002, 0xfc080002, "r,xOA,X", 4 },
-{ "sumh", 0xbc000001, 0xfc080001, "r,xOA,X", 4 },
-{ "sumw", 0xbc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "sur", 0x3c000000, 0xfc0f0000, "r,R", 2 },
-{ "surfd", 0x380b0000, 0xfc0f0000, "r,xOA,X", 4 },
-{ "surfw", 0x38030000, 0xfc0f0000, "r,R", 2 },
-{ "surm", 0x3c080000, 0xfc0f0000, "r,R", 2 },
-{ "svc", 0xc8060000, 0xffff0000, "", 4 },
-{ "tbm", 0xa4080000, 0xfc080000, "f,xOA,X", 4 },
-{ "tbr", 0x180c0000, 0xfc0c0000, "r,f", 2 },
-{ "tbrr", 0x2c020000, 0xfc0f0000, "r,B", 2 },
-{ "tccr", 0x28040000, 0xfc7f0000, "", 2 },
-{ "td", 0xfc050000, 0xfc070000, "r,f", 4 },
-{ "tio", 0xfc1f0000, 0xfc7f8000, "r,I", 4 },
-{ "tmapr", 0x2c0a0000, 0xfc0f0000, "r,R", 2 },
-{ "tpcbr", 0x280c0000, 0xfc7f0000, "r", 2 },
-{ "trbr", 0x2c010000, 0xfc0f0000, "b,R", 2 },
-{ "trc", 0x2c030000, 0xfc0f0000, "r,R", 2 },
-{ "trcc", 0x28050000, 0xfc7f0000, "", 2 },
-{ "trcm", 0x2c0b0000, 0xfc0f0000, "r,R", 2 },
-{ "trn", 0x2c040000, 0xfc0f0000, "r,R", 2 },
-{ "trnm", 0x2c0c0000, 0xfc0f0000, "r,R", 2 },
-{ "trr", 0x2c000000, 0xfc0f0000, "r,R", 2 },
-{ "trrm", 0x2c080000, 0xfc0f0000, "r,R", 2 },
-{ "trsc", 0x2c0e0000, 0xfc0f0000, "r,R", 2 },
-{ "trsw", 0x28000000, 0xfc7f0000, "r", 2 },
-{ "tscr", 0x2c0f0000, 0xfc0f0000, "r,R", 2 },
-{ "uei", 0x00070000, 0xffff0000, "", 2 },
-{ "wait", 0x00010000, 0xffff0000, "", 2 },
-{ "wcwcs", 0xfc5f0000, 0xfc7f8000, "", 4 },
-{ "wwcs", 0x000c0000, 0xfc0f0000, "r,R", 2 },
-{ "xcbr", 0x28020000, 0xfc0f0000, "b,B", 2 },
-{ "xcr", 0x2c050000, 0xfc0f0000, "r,R", 2 },
-{ "xcrm", 0x2c0d0000, 0xfc0f0000, "r,R", 2 },
-{ "zbm", 0x9c080000, 0xfc080000, "f,xOA,X", 4 },
-{ "zbr", 0x18040000, 0xfc0c0000, "r,f", 2 },
-{ "zmb", 0xf8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "zmd", 0xf8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "zmh", 0xf8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "zmw", 0xf8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "zr", 0x0c000000, 0xfc0f0000, "r", 2 },
-};
-
-int numopcodes = sizeof(gld_opcodes) / sizeof(gld_opcodes[0]);
-
-struct gld_opcode *endop = gld_opcodes + sizeof(gld_opcodes) /
- sizeof(gld_opcodes[0]);
diff --git a/contrib/gdb/include/opcode/ppc.h b/contrib/gdb/include/opcode/ppc.h
deleted file mode 100644
index a9e3b24ab30e..000000000000
--- a/contrib/gdb/include/opcode/ppc.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/* ppc.h -- Header file for PowerPC opcode table
- Copyright 1994, 1995 Free Software Foundation, Inc.
- Written by Ian Lance Taylor, Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef PPC_H
-#define PPC_H
-
-/* The opcode table is an array of struct powerpc_opcode. */
-
-struct powerpc_opcode
-{
- /* The opcode name. */
- const char *name;
-
- /* The opcode itself. Those bits which will be filled in with
- operands are zeroes. */
- unsigned long opcode;
-
- /* The opcode mask. This is used by the disassembler. This is a
- mask containing ones indicating those bits which must match the
- opcode field, and zeroes indicating those bits which need not
- match (and are presumably filled in by operands). */
- unsigned long mask;
-
- /* One bit flags for the opcode. These are used to indicate which
- specific processors support the instructions. The defined values
- are listed below. */
- unsigned long flags;
-
- /* An array of operand codes. Each code is an index into the
- operand table. They appear in the order which the operands must
- appear in assembly code, and are terminated by a zero. */
- unsigned char operands[8];
-};
-
-/* The table itself is sorted by major opcode number, and is otherwise
- in the order in which the disassembler should consider
- instructions. */
-extern const struct powerpc_opcode powerpc_opcodes[];
-extern const int powerpc_num_opcodes;
-
-/* Values defined for the flags field of a struct powerpc_opcode. */
-
-/* Opcode is defined for the PowerPC architecture. */
-#define PPC_OPCODE_PPC (01)
-
-/* Opcode is defined for the POWER (RS/6000) architecture. */
-#define PPC_OPCODE_POWER (02)
-
-/* Opcode is defined for the POWER2 (Rios 2) architecture. */
-#define PPC_OPCODE_POWER2 (04)
-
-/* Opcode is only defined on 32 bit architectures. */
-#define PPC_OPCODE_32 (010)
-
-/* Opcode is only defined on 64 bit architectures. */
-#define PPC_OPCODE_64 (020)
-
-/* Opcode is supported by the Motorola PowerPC 601 processor. The 601
- is assumed to support all PowerPC (PPC_OPCODE_PPC) instructions,
- but it also supports many additional POWER instructions. */
-#define PPC_OPCODE_601 (040)
-
-/* Opcode is supported in both the Power and PowerPC architectures
- (ie, compiler's -mcpu=common or assembler's -mcom). */
-#define PPC_OPCODE_COMMON (0100)
-
-/* Opcode is supported for any Power or PowerPC platform (this is
- for the assembler's -many option, and it eliminates duplicates). */
-#define PPC_OPCODE_ANY (0200)
-
-/* A macro to extract the major opcode from an instruction. */
-#define PPC_OP(i) (((i) >> 26) & 0x3f)
-
-/* The operands table is an array of struct powerpc_operand. */
-
-struct powerpc_operand
-{
- /* The number of bits in the operand. */
- int bits;
-
- /* How far the operand is left shifted in the instruction. */
- int shift;
-
- /* Insertion function. This is used by the assembler. To insert an
- operand value into an instruction, check this field.
-
- If it is NULL, execute
- i |= (op & ((1 << o->bits) - 1)) << o->shift;
- (i is the instruction which we are filling in, o is a pointer to
- this structure, and op is the opcode value; this assumes twos
- complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction and the operand value. It will return the new value
- of the instruction. If the ERRMSG argument is not NULL, then if
- the operand value is illegal, *ERRMSG will be set to a warning
- string (the operand will be inserted in any case). If the
- operand value is legal, *ERRMSG will be unchanged (most operands
- can accept any value). */
- unsigned long (*insert) PARAMS ((unsigned long instruction, long op,
- const char **errmsg));
-
- /* Extraction function. This is used by the disassembler. To
- extract this operand type from an instruction, check this field.
-
- If it is NULL, compute
- op = ((i) >> o->shift) & ((1 << o->bits) - 1);
- if ((o->flags & PPC_OPERAND_SIGNED) != 0
- && (op & (1 << (o->bits - 1))) != 0)
- op -= 1 << o->bits;
- (i is the instruction, o is a pointer to this structure, and op
- is the result; this assumes twos complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction value. It will return the value of the operand. If
- the INVALID argument is not NULL, *INVALID will be set to
- non-zero if this operand type can not actually be extracted from
- this operand (i.e., the instruction does not match). If the
- operand is valid, *INVALID will not be changed. */
- long (*extract) PARAMS ((unsigned long instruction, int *invalid));
-
- /* One bit syntax flags. */
- unsigned long flags;
-};
-
-/* Elements in the table are retrieved by indexing with values from
- the operands field of the powerpc_opcodes table. */
-
-extern const struct powerpc_operand powerpc_operands[];
-
-/* Values defined for the flags field of a struct powerpc_operand. */
-
-/* This operand takes signed values. */
-#define PPC_OPERAND_SIGNED (01)
-
-/* This operand takes signed values, but also accepts a full positive
- range of values when running in 32 bit mode. That is, if bits is
- 16, it takes any value from -0x8000 to 0xffff. In 64 bit mode,
- this flag is ignored. */
-#define PPC_OPERAND_SIGNOPT (02)
-
-/* This operand does not actually exist in the assembler input. This
- is used to support extended mnemonics such as mr, for which two
- operands fields are identical. The assembler should call the
- insert function with any op value. The disassembler should call
- the extract function, ignore the return value, and check the value
- placed in the valid argument. */
-#define PPC_OPERAND_FAKE (04)
-
-/* The next operand should be wrapped in parentheses rather than
- separated from this one by a comma. This is used for the load and
- store instructions which want their operands to look like
- reg,displacement(reg)
- */
-#define PPC_OPERAND_PARENS (010)
-
-/* This operand may use the symbolic names for the CR fields, which
- are
- lt 0 gt 1 eq 2 so 3 un 3
- cr0 0 cr1 1 cr2 2 cr3 3
- cr4 4 cr5 5 cr6 6 cr7 7
- These may be combined arithmetically, as in cr2*4+gt. These are
- only supported on the PowerPC, not the POWER. */
-#define PPC_OPERAND_CR (020)
-
-/* This operand names a register. The disassembler uses this to print
- register names with a leading 'r'. */
-#define PPC_OPERAND_GPR (040)
-
-/* This operand names a floating point register. The disassembler
- prints these with a leading 'f'. */
-#define PPC_OPERAND_FPR (0100)
-
-/* This operand is a relative branch displacement. The disassembler
- prints these symbolically if possible. */
-#define PPC_OPERAND_RELATIVE (0200)
-
-/* This operand is an absolute branch address. The disassembler
- prints these symbolically if possible. */
-#define PPC_OPERAND_ABSOLUTE (0400)
-
-/* This operand is optional, and is zero if omitted. This is used for
- the optional BF and L fields in the comparison instructions. The
- assembler must count the number of operands remaining on the line,
- and the number of operands remaining for the opcode, and decide
- whether this operand is present or not. The disassembler should
- print this operand out only if it is not zero. */
-#define PPC_OPERAND_OPTIONAL (01000)
-
-/* This flag is only used with PPC_OPERAND_OPTIONAL. If this operand
- is omitted, then for the next operand use this operand value plus
- 1, ignoring the next operand field for the opcode. This wretched
- hack is needed because the Power rotate instructions can take
- either 4 or 5 operands. The disassembler should print this operand
- out regardless of the PPC_OPERAND_OPTIONAL field. */
-#define PPC_OPERAND_NEXT (02000)
-
-/* This operand should be regarded as a negative number for the
- purposes of overflow checking (i.e., the normal most negative
- number is disallowed and one more than the normal most positive
- number is allowed). This flag will only be set for a signed
- operand. */
-#define PPC_OPERAND_NEGATIVE (04000)
-
-/* The POWER and PowerPC assemblers use a few macros. We keep them
- with the operands table for simplicity. The macro table is an
- array of struct powerpc_macro. */
-
-struct powerpc_macro
-{
- /* The macro name. */
- const char *name;
-
- /* The number of operands the macro takes. */
- unsigned int operands;
-
- /* One bit flags for the opcode. These are used to indicate which
- specific processors support the instructions. The values are the
- same as those for the struct powerpc_opcode flags field. */
- unsigned long flags;
-
- /* A format string to turn the macro into a normal instruction.
- Each %N in the string is replaced with operand number N (zero
- based). */
- const char *format;
-};
-
-extern const struct powerpc_macro powerpc_macros[];
-extern const int powerpc_num_macros;
-
-#endif /* PPC_H */
diff --git a/contrib/gdb/include/opcode/pyr.h b/contrib/gdb/include/opcode/pyr.h
deleted file mode 100644
index 06632b8d9197..000000000000
--- a/contrib/gdb/include/opcode/pyr.h
+++ /dev/null
@@ -1,287 +0,0 @@
-/* pyramid.opcode.h -- gdb initial attempt. */
-
-/* pyramid opcode table: wot to do with this
- particular opcode */
-
-struct pyr_datum
-{
- char nargs;
- char * args; /* how to compile said opcode */
- unsigned long mask; /* Bit vector: which operand modes are valid
- for this opcode */
- unsigned char code; /* op-code (always 6(?) bits */
-};
-
-typedef struct pyr_insn_format {
- unsigned int mode :4;
- unsigned int operator :8;
- unsigned int index_scale :2;
- unsigned int index_reg :6;
- unsigned int operand_1 :6;
- unsigned int operand_2:6;
-} pyr_insn_format;
-
-
-/* We store four bytes of opcode for all opcodes.
- Pyramid is sufficiently RISCy that:
- - insns are always an integral number of words;
- - the length of any insn can be told from the first word of
- the insn. (ie, if there are zero, one, or two words of
- immediate operand/offset).
-
-
- The args component is a string containing two characters for each
- operand of the instruction. The first specifies the kind of operand;
- the second, the place it is stored. */
-
-/* Kinds of operands:
- mask assembler syntax description
- 0x0001: movw Rn,Rn register to register
- 0x0002: movw K,Rn quick immediate to register
- 0x0004: movw I,Rn long immediate to register
- 0x0008: movw (Rn),Rn register indirect to register
- movw (Rn)[x],Rn register indirect to register
- 0x0010: movw I(Rn),Rn offset register indirect to register
- movw I(Rn)[x],Rn offset register indirect, indexed, to register
-
- 0x0020: movw Rn,(Rn) register to register indirect
- 0x0040: movw K,(Rn) quick immediate to register indirect
- 0x0080: movw I,(Rn) long immediate to register indirect
- 0x0100: movw (Rn),(Rn) register indirect to-register indirect
- 0x0100: movw (Rn),(Rn) register indirect to-register indirect
- 0x0200: movw I(Rn),(Rn) register indirect+offset to register indirect
- 0x0200: movw I(Rn),(Rn) register indirect+offset to register indirect
-
- 0x0400: movw Rn,I(Rn) register to register indirect+offset
- 0x0800: movw K,I(Rn) quick immediate to register indirect+offset
- 0x1000: movw I,I(Rn) long immediate to register indirect+offset
- 0x1000: movw (Rn),I(Rn) register indirect to-register indirect+offset
- 0x1000: movw I(Rn),I(Rn) register indirect+offset to register indirect
- +offset
- 0x0000: (irregular) ???
-
-
- Each insn has a four-bit field encoding the type(s) of its operands.
-*/
-
-/* Some common combinations
- */
-
-/* the first 5,(0x1|0x2|0x4|0x8|0x10) ie (1|2|4|8|16), ie ( 32 -1)*/
-#define GEN_TO_REG (31)
-
-#define UNKNOWN ((unsigned long)-1)
-#define ANY (GEN_TO_REG | (GEN_TO_REG << 5) | (GEN_TO_REG << 15))
-
-#define CONVERT (1|8|0x10|0x20|0x200)
-
-#define K_TO_REG (2)
-#define I_TO_REG (4)
-#define NOTK_TO_REG (GEN_TO_REG & ~K_TO_REG)
-#define NOTI_TO_REG (GEN_TO_REG & ~I_TO_REG)
-
-/* The assembler requires that this array be sorted as follows:
- all instances of the same mnemonic must be consecutive.
- All instances of the same mnemonic with the same number of operands
- must be consecutive.
- */
-
-struct pyr_opcode /* pyr opcode text */
-{
- char * name; /* opcode name: lowercase string [key] */
- struct pyr_datum datum; /* rest of opcode table [datum] */
-};
-
-#define pyr_how args
-#define pyr_nargs nargs
-#define pyr_mask mask
-#define pyr_name name
-
-struct pyr_opcode pyr_opcodes[] =
-{
- {"movb", { 2, "", UNKNOWN, 0x11}, },
- {"movh", { 2, "", UNKNOWN, 0x12} },
- {"movw", { 2, "", ANY, 0x10} },
- {"movl", { 2, "", ANY, 0x13} },
- {"mnegw", { 2, "", (0x1|0x8|0x10), 0x14} },
- {"mnegf", { 2, "", 0x1, 0x15} },
- {"mnegd", { 2, "", 0x1, 0x16} },
- {"mcomw", { 2, "", (0x1|0x8|0x10), 0x17} },
- {"mabsw", { 2, "", (0x1|0x8|0x10), 0x18} },
- {"mabsf", { 2, "", 0x1, 0x19} },
- {"mabsd", { 2, "", 0x1, 0x1a} },
- {"mtstw", { 2, "", (0x1|0x8|0x10), 0x1c} },
- {"mtstf", { 2, "", 0x1, 0x1d} },
- {"mtstd", { 2, "", 0x1, 0x1e} },
- {"mova", { 2, "", 0x8|0x10, 0x1f} },
- {"movzbw", { 2, "", (0x1|0x8|0x10), 0x20} },
- {"movzhw", { 2, "", (0x1|0x8|0x10), 0x21} },
- /* 2 insns out of order here */
- {"movbl", { 2, "", 1, 0x4f} },
- {"filbl", { 2, "", 1, 0x4e} },
-
- {"cvtbw", { 2, "", CONVERT, 0x22} },
- {"cvthw", { 2, "", CONVERT, 0x23} },
- {"cvtwb", { 2, "", CONVERT, 0x24} },
- {"cvtwh", { 2, "", CONVERT, 0x25} },
- {"cvtwf", { 2, "", CONVERT, 0x26} },
- {"cvtwd", { 2, "", CONVERT, 0x27} },
- {"cvtfw", { 2, "", CONVERT, 0x28} },
- {"cvtfd", { 2, "", CONVERT, 0x29} },
- {"cvtdw", { 2, "", CONVERT, 0x2a} },
- {"cvtdf", { 2, "", CONVERT, 0x2b} },
-
- {"addw", { 2, "", GEN_TO_REG, 0x40} },
- {"addwc", { 2, "", GEN_TO_REG, 0x41} },
- {"subw", { 2, "", GEN_TO_REG, 0x42} },
- {"subwb", { 2, "", GEN_TO_REG, 0x43} },
- {"rsubw", { 2, "", GEN_TO_REG, 0x44} },
- {"mulw", { 2, "", GEN_TO_REG, 0x45} },
- {"emul", { 2, "", GEN_TO_REG, 0x47} },
- {"umulw", { 2, "", GEN_TO_REG, 0x46} },
- {"divw", { 2, "", GEN_TO_REG, 0x48} },
- {"ediv", { 2, "", GEN_TO_REG, 0x4a} },
- {"rdivw", { 2, "", GEN_TO_REG, 0x4b} },
- {"udivw", { 2, "", GEN_TO_REG, 0x49} },
- {"modw", { 2, "", GEN_TO_REG, 0x4c} },
- {"umodw", { 2, "", GEN_TO_REG, 0x4d} },
-
-
- {"addf", { 2, "", 1, 0x50} },
- {"addd", { 2, "", 1, 0x51} },
- {"subf", { 2, "", 1, 0x52} },
- {"subd", { 2, "", 1, 0x53} },
- {"mulf", { 2, "", 1, 0x56} },
- {"muld", { 2, "", 1, 0x57} },
- {"divf", { 2, "", 1, 0x58} },
- {"divd", { 2, "", 1, 0x59} },
-
-
- {"cmpb", { 2, "", UNKNOWN, 0x61} },
- {"cmph", { 2, "", UNKNOWN, 0x62} },
- {"cmpw", { 2, "", UNKNOWN, 0x60} },
- {"ucmpb", { 2, "", UNKNOWN, 0x66} },
- /* WHY no "ucmph"??? */
- {"ucmpw", { 2, "", UNKNOWN, 0x65} },
- {"xchw", { 2, "", UNKNOWN, 0x0f} },
-
-
- {"andw", { 2, "", GEN_TO_REG, 0x30} },
- {"orw", { 2, "", GEN_TO_REG, 0x31} },
- {"xorw", { 2, "", GEN_TO_REG, 0x32} },
- {"bicw", { 2, "", GEN_TO_REG, 0x33} },
- {"lshlw", { 2, "", GEN_TO_REG, 0x38} },
- {"ashlw", { 2, "", GEN_TO_REG, 0x3a} },
- {"ashll", { 2, "", GEN_TO_REG, 0x3c} },
- {"ashrw", { 2, "", GEN_TO_REG, 0x3b} },
- {"ashrl", { 2, "", GEN_TO_REG, 0x3d} },
- {"rotlw", { 2, "", GEN_TO_REG, 0x3e} },
- {"rotrw", { 2, "", GEN_TO_REG, 0x3f} },
-
- /* push and pop insns are "going away next release". */
- {"pushw", { 2, "", GEN_TO_REG, 0x0c} },
- {"popw", { 2, "", (0x1|0x8|0x10), 0x0d} },
- {"pusha", { 2, "", (0x8|0x10), 0x0e} },
-
- {"bitsw", { 2, "", UNKNOWN, 0x35} },
- {"bitcw", { 2, "", UNKNOWN, 0x36} },
- /* some kind of ibra/dbra insns??*/
- {"icmpw", { 2, "", UNKNOWN, 0x67} },
- {"dcmpw", { 2, "", (1|4|0x20|0x80|0x400|0x1000), 0x69} },/*FIXME*/
- {"acmpw", { 2, "", 1, 0x6b} },
-
- /* Call is written as a 1-op insn, but is always (dis)assembled as a 2-op
- insn with a 2nd op of tr14. The assembler will have to grok this. */
- {"call", { 2, "", GEN_TO_REG, 0x04} },
- {"call", { 1, "", GEN_TO_REG, 0x04} },
-
- {"callk", { 1, "", UNKNOWN, 0x06} },/* system call?*/
- /* Ret is usually written as a 0-op insn, but gets disassembled as a
- 1-op insn. The operand is always tr15. */
- {"ret", { 0, "", UNKNOWN, 0x09} },
- {"ret", { 1, "", UNKNOWN, 0x09} },
- {"adsf", { 2, "", (1|2|4), 0x08} },
- {"retd", { 2, "", UNKNOWN, 0x0a} },
- {"btc", { 2, "", UNKNOWN, 0x01} },
- {"bfc", { 2, "", UNKNOWN, 0x02} },
- /* Careful: halt is 0x00000000. Jump must have some other (mode?)bit set?? */
- {"jump", { 1, "", UNKNOWN, 0x00} },
- {"btp", { 2, "", UNKNOWN, 0xf00} },
- /* read control-stack pointer is another 1-or-2 operand insn. */
- {"rcsp", { 2, "", UNKNOWN, 0x01f} },
- {"rcsp", { 1, "", UNKNOWN, 0x01f} }
-};
-
-/* end: pyramid.opcode.h */
-/* One day I will have to take the time to find out what operands
- are valid for these insns, and guess at what they mean.
-
- I can't imagine what the "I???" insns (iglob, etc) do.
-
- the arithmetic-sounding insns ending in "p" sound awfully like BCD
- arithmetic insns:
- dshlp -> Decimal SHift Left Packed
- dshrp -> Decimal SHift Right Packed
- and cvtlp would be convert long to packed.
- I have no idea how the operands are interpreted; but having them be
- a long register with (address, length) of an in-memory packed BCD operand
- would not be surprising.
- They are unlikely to be a packed bcd string: 64 bits of long give
- is only 15 digits+sign, which isn't enough for COBOL.
- */
-#if 0
- {"wcsp", { 2, "", UNKNOWN, 0x00} }, /*write csp?*/
- /* The OSx Operating System Porting Guide claims SSL does things
- with tr12 (a register reserved to it) to do with static block-structure
- references. SSL=Set Static Link? It's "Going away next release". */
- {"ssl", { 2, "", UNKNOWN, 0x00} },
- {"ccmps", { 2, "", UNKNOWN, 0x00} },
- {"lcd", { 2, "", UNKNOWN, 0x00} },
- {"uemul", { 2, "", UNKNOWN, 0x00} }, /*unsigned emul*/
- {"srf", { 2, "", UNKNOWN, 0x00} }, /*Gidget time???*/
- {"mnegp", { 2, "", UNKNOWN, 0x00} }, /move-neg phys?*/
- {"ldp", { 2, "", UNKNOWN, 0x00} }, /*load phys?*/
- {"ldti", { 2, "", UNKNOWN, 0x00} },
- {"ldb", { 2, "", UNKNOWN, 0x00} },
- {"stp", { 2, "", UNKNOWN, 0x00} },
- {"stti", { 2, "", UNKNOWN, 0x00} },
- {"stb", { 2, "", UNKNOWN, 0x00} },
- {"stu", { 2, "", UNKNOWN, 0x00} },
- {"addp", { 2, "", UNKNOWN, 0x00} },
- {"subp", { 2, "", UNKNOWN, 0x00} },
- {"mulp", { 2, "", UNKNOWN, 0x00} },
- {"divp", { 2, "", UNKNOWN, 0x00} },
- {"dshlp", { 2, "", UNKNOWN, 0x00} }, /* dec shl packed? */
- {"dshrp", { 2, "", UNKNOWN, 0x00} }, /* dec shr packed? */
- {"movs", { 2, "", UNKNOWN, 0x00} }, /*move (string?)?*/
- {"cmpp", { 2, "", UNKNOWN, 0x00} }, /* cmp phys?*/
- {"cmps", { 2, "", UNKNOWN, 0x00} }, /* cmp (string?)?*/
- {"cvtlp", { 2, "", UNKNOWN, 0x00} }, /* cvt long to p??*/
- {"cvtpl", { 2, "", UNKNOWN, 0x00} }, /* cvt p to l??*/
- {"dintr", { 2, "", UNKNOWN, 0x00} }, /* ?? intr ?*/
- {"rphysw", { 2, "", UNKNOWN, 0x00} }, /* read phys word?*/
- {"wphysw", { 2, "", UNKNOWN, 0x00} }, /* write phys word?*/
- {"cmovs", { 2, "", UNKNOWN, 0x00} },
- {"rsubw", { 2, "", UNKNOWN, 0x00} },
- {"bicpsw", { 2, "", UNKNOWN, 0x00} }, /* clr bit in psw? */
- {"bispsw", { 2, "", UNKNOWN, 0x00} }, /* set bit in psw? */
- {"eio", { 2, "", UNKNOWN, 0x00} }, /* ?? ?io ? */
- {"callp", { 2, "", UNKNOWN, 0x00} }, /* call phys?*/
- {"callr", { 2, "", UNKNOWN, 0x00} },
- {"lpcxt", { 2, "", UNKNOWN, 0x00} }, /*load proc context*/
- {"rei", { 2, "", UNKNOWN, 0x00} }, /*ret from intrpt*/
- {"rport", { 2, "", UNKNOWN, 0x00} }, /*read-port?*/
- {"rtod", { 2, "", UNKNOWN, 0x00} }, /*read-time-of-day?*/
- {"ssi", { 2, "", UNKNOWN, 0x00} },
- {"vtpa", { 2, "", UNKNOWN, 0x00} }, /*virt-to-phys-addr?*/
- {"wicl", { 2, "", UNKNOWN, 0x00} }, /* write icl ? */
- {"wport", { 2, "", UNKNOWN, 0x00} }, /*write-port?*/
- {"wtod", { 2, "", UNKNOWN, 0x00} }, /*write-time-of-day?*/
- {"flic", { 2, "", UNKNOWN, 0x00} },
- {"iglob", { 2, "", UNKNOWN, 0x00} }, /* I global? */
- {"iphys", { 2, "", UNKNOWN, 0x00} }, /* I physical? */
- {"ipid", { 2, "", UNKNOWN, 0x00} }, /* I pid? */
- {"ivect", { 2, "", UNKNOWN, 0x00} }, /* I vector? */
- {"lamst", { 2, "", UNKNOWN, 0x00} },
- {"tio", { 2, "", UNKNOWN, 0x00} },
-#endif
diff --git a/contrib/gdb/include/opcode/rs6k.h b/contrib/gdb/include/opcode/rs6k.h
deleted file mode 100644
index fac9cf43f354..000000000000
--- a/contrib/gdb/include/opcode/rs6k.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/* IBM RS/6000 instruction set definitions, for GNU software. */
-
-/* These are all possible instruction formats as used in IBM Assembler
- Language Reference, Appendix A. */
-
-typedef enum { A=0, B, D, I, M, SC, X, XL, XO, XFL, XFX } InsnFmt;
-
-/* Extended opcode masks. Used for extracting extended opcode values from
- instructions. Each instruction's format decides which mask applies.
- They *should* retain the same order as the above formats. */
-
-static int eopMask[] =
- { 0x1f, 0, 0, 0, 0, 0, 0x3ff, 0x3ff, 0x1ff, 0x3ff, 0x3ff };
-
-/* All the things you need to know about an opcode. */
-
-typedef struct rs6000_insn {
- char *operator; /* opcode name */
- char *opr_ext; /* opcode name extension */
- InsnFmt format; /* opcode format */
- char p_opcode; /* primary opcode */
- int e_opcode; /* extended opcode */
- char oprnd_format[6]; /* operand format */
-} OPCODE;
-
-/* operand format specifiers */
-
-#define TO 1
-#define RA 2
-#define SI 3
-#define RT 4
-#define UI 5
-#define BF 6
-#define BFA 7
-#define BT 8
-#define BA 9
-#define BB 10
-#define BO 11
-#define BI 12
-#define RB 13
-#define RS 14
-#define SH 15
-#define MB 16
-#define ME 17
-#define SPR 18
-#define DIS 19
-#define FXM 21
-#define FRT 22
-#define NB 23
-#define FRS 24
-#define FRA 25
-#define FRB 26
-#define FRC 27
-#define FLM 28
-#define I 29
-#define LI 30
-#define A2 31
-#define TA14 32 /* 14 bit representation of target address */
-#define TA24 33 /* 24 bit representation of target address */
-#define FL1 34
-#define FL2 35
-#define LEV 36
-
-/* RS/6000 INSTRUCTION SET
- (sorted on primary and extended opcode)
-
- oprtr primary ext.
-operator ext format opcode opcode operand format
-------- ------- ------ ------- ------ --------------- */
-
-struct rs6000_insn rs6k_ops [] = {
-
-{"ti", 0, D, 3, -1, {TO,RA,SI,0} },
-{"muli", 0, D, 7, -1, {RT,RA,SI,0} },
-{"sfi", 0, D, 8, -1, {RT,RA,SI,0} },
-{"dozi", 0, D, 9, -1, {RT,RA,SI,0} },
-{"cmpli", 0, D, 10, -1, {BF,RA,UI,0} },
-{"cmpi", 0, D, 11, -1, {BF,RA,SI,0} },
-{"ai", 0, D, 12, -1, {RT,RA,SI,0} },
-{"ai.", 0, D, 13, -1, {RT,RA,SI,0} },
-{"lil", 0, D, 14, -1, {RT,SI,0} }, /* same as `cal' */
-{"cal", 0, D, 14, -1, {RT,DIS,RA,0} },
-{"liu", 0, D, 15, -1, {RT, UI,0} }, /* same as `cau' */
-{"cau", 0, D, 15, -1, {RT,RA,UI,0} },
-
-/* "1" indicates an exception--"bb" is only usable for some values of
- BO, so the disassembler first matches this instruction and then changes
- it to "bc" if that is the case. */
-{"bb", "1tfla", B, 16, -1, {LI,A2,0} },
-{"bc", "la", B, 16, -1, {BO,BI,TA14,0} },
-
-{"svc", "la", SC, 17, -1, {LEV,FL1,FL2,0} },
-{"b", "la", I, 18, -1, {TA24,0} },
-{"mcrf", 0, XL, 19, 0, {BF,BFA,0} },
-{"bcr", "l", XL, 19, 16, {BO,BI,0} },
-{"crnor", 0, XL, 19, 33, {BT,BA,BB,0} },
-{"rfi", 0, X, 19, 50, {0} },
-{"rfsvc", 0, X, 19, 82, {0} },
-{"crandc", 0, XL, 19, 129, {BT,BA,BB,0} },
-{"ics", 0, X, 19, 150, {0} },
-{"crxor", 0, XL, 19, 193, {BT,BA,BB,0} },
-{"crnand", 0, XL, 19, 225, {BT,BA,BB,0} },
-{"crand", 0, XL, 19, 257, {BT,BA,BB,0} },
-{"creqv", 0, XL, 19, 289, {BT,BA,BB,0} },
-{"crorc", 0, XL, 19, 417, {BT,BA,BB,0} },
-{"cror", 0, XL, 19, 449, {BT,BA,BB,0} },
-{"bcc", "l", XL, 19, 528, {BO,BI,0} },
-{"rlimi", ".", M, 20, -1, {RA,RS,SH,MB,ME,0} /*??*/},
-{"rlinm", ".", M, 21, -1, {RA,RS,SH,MB,ME,0} /*??*/},
-{"rlmi", ".", M, 22, -1, {RA,RS,RB,MB,ME,0} /*??*/},
-{"rlnm", ".", M, 23, -1, {RA,RS,RB,MB,ME,0} /*??*/},
-{"oril", 0, D, 24, -1, {RA,RS,UI,0} },
-{"oriu", 0, D, 25, -1, {RA,RS,UI,0} },
-{"xoril", 0, D, 26, -1, {RA,RS,UI,0} },
-{"xoriu", 0, D, 27, -1, {RA,RS,UI,0} },
-{"andil.", 0, D, 28, -1, {RA,RS,UI,0} },
-{"andiu.", 0, D, 29, -1, {RA,RS,UI,0} },
-{"cmp", 0, X, 31, 0, {BF,RA,RB,0} },
-{"t", 0, X, 31, 4, {TO,RA,RB,0} },
-{"sf", "o.", XO, 31, 8, {RT,RA,RB,0} },
-{"a", "o.", XO, 31, 10, {RT,RA,RB,0} },
-{"mfcr", 0, X, 31, 19, {RT,0} },
-{"lx", 0, X, 31, 23, {RT,RA,RB,0} },
-{"sl", ".", X, 31, 24, {RA,RS,RB,0} },
-{"cntlz", ".", XO, 31, 26, {RA,RS,0} },
-{"and", ".", X, 31, 28, {RA,RS,RB,0} },
-{"maskg", ".", X, 31, 29, {RA,RS,RB,0} },
-{"cmpl", 0, X, 31, 32, {BF,RA,RB,0} },
-{"sfe", "o.", XO, 31, 136, {RT,RA,RB,0} },
-{"lux", 0, X, 31, 55, {RT,RA,RB,0} },
-{"andc", ".", X, 31, 60, {RA,RS,RB,0} },
-{"mfmsr", 0, X, 31, 83, {RT,0} },
-{"lbzx", 0, X, 31, 87, {RT,RA,RB,0} },
-{"neg", "o.", XO, 31, 104, {RT,RA,0} },
-{"mul", "o.", XO, 31, 107, {RT,RA,RB,0} },
-{"lbzux", 0, X, 31, 119, {RT,RA,RB,0} },
-{"nor", ".", X, 31, 124, {RA,RS,RB,0} },
-{"ae", "o.", XO, 31, 138, {RT,RA,RB,0} },
-{"mtcrf", 0, XFX, 31, 144, {FXM,RS,0} },
-{"stx", 0, X, 31, 151, {RS,RA,RB,0} },
-{"slq", ".", X, 31, 152, {RA,RS,RB,0} },
-{"sle", ".", X, 31, 153, {RA,RS,RB,0} },
-{"stux", 0, X, 31, 183, {RS,RA,RB,0} },
-{"sliq", ".", X, 31, 184, {RA,RS,SH,0} },
-{"sfze", "o.", XO, 31, 200, {RT,RA,0} },
-{"aze", "o.", XO, 31, 202, {RT,RA,0} },
-{"stbx", 0, X, 31, 215, {RS,RA,RB,0} },
-{"sllq", ".", X, 31, 216, {RA,RS,RB,0} },
-{"sleq", ".", X, 31, 217, {RA,RS,RB,0} },
-{"sfme", "o.", XO, 31, 232, {RT,RA,0} },
-{"ame", "o.", XO, 31, 234, {RT,RA,0} },
-{"muls", "o.", XO, 31, 235, {RT,RA,RB,0} },
-{"stbux", 0, X, 31, 247, {RS,RA,RB,0} },
-{"slliq", ".", X, 31, 248, {RA,RS,SH,0} },
-{"doz", "o.", X, 31, 264, {RT,RA,RB,0} },
-{"cax", "o.", XO, 31, 266, {RT,RA,RB,0} },
-{"lscbx", ".", X, 31, 277, {RT,RA,RB,0} },
-{"lhzx", 0, X, 31, 279, {RT,RA,RB,0} },
-{"eqv", ".", X, 31, 284, {RA,RS,RB,0} },
-{"lhzux", 0, X, 31, 311, {RT,RA,RB,0} },
-{"xor", ".", X, 31, 316, {RA,RS,RB,0} },
-{"div", "o.", XO, 31, 331, {RT,RA,RB,0} },
-{"mfspr", 0, X, 31, 339, {RT,SPR,0} },
-{"lhax", 0, X, 31, 343, {RT,RA,RB,0} },
-{"abs", "o.", XO, 31, 360, {RT,RA,0} },
-{"divs", "o.", XO, 31, 363, {RT,RA,RB,0} },
-{"lhaux", 0, X, 31, 375, {RT,RA,RB,0} },
-{"sthx", 0, X, 31, 407, {RS,RA,RB,0} },
-{"orc", ".", X, 31, 412, {RA,RS,RB,0} },
-{"sthux", 0, X, 31, 439, {RS,RA,RB,0} },
-{"or", ".", X, 31, 444, {RA,RS,RB,0} },
-{"mtspr", 0, X, 31, 467, {SPR,RS,0} },
-{"nand", ".", X, 31, 476, {RA,RS,RB,0} },
-{"nabs", "o.", XO, 31, 488, {RT,RA,0} },
-{"mcrxr", 0, X, 31, 512, {BF,0} },
-{"lsx", 0, X, 31, 533, {RT,RA,RB,0} },
-{"lbrx", 0, X, 31, 534, {RT,RA,RB,0} },
-{"lfsx", 0, X, 31, 535, {FRT,RA,RB,0} },
-{"sr", ".", X, 31, 536, {RA,RS,RB,0} },
-{"rrib", ".", X, 31, 537, {RA,RS,RB,0} },
-{"maskir", ".", X, 31, 541, {RA,RS,RB,0} },
-{"lfsux", 0, X, 31, 567, {FRT,RA,RB,0} },
-{"lsi", 0, X, 31, 597, {RT,RA,NB,0} },
-{"lfdx", 0, X, 31, 599, {FRT,RA,RB,0} },
-{"lfdux", 0, X, 31, 631, {FRT,RA,RB,0} },
-{"stsx", 0, X, 31, 661, {RS,RA,RB,0} },
-{"stbrx", 0, X, 31, 662, {RS,RA,RB,0} },
-{"stfsx", 0, X, 31, 663, {FRS,RA,RB,0} },
-{"srq", ".", X, 31, 664, {RA,RS,RB,0} },
-{"sre", ".", X, 31, 665, {RA,RS,RB,0} },
-{"stfsux", 0, X, 31, 695, {FRS,RA,RB,0} },
-{"sriq", ".", X, 31, 696, {RA,RS,SH,0} },
-{"stsi", 0, X, 31, 725, {RS,RA,NB,0} },
-{"stfdx", 0, X, 31, 727, {FRS,RA,RB,0} },
-{"srlq", ".", X, 31, 728, {RA,RS,RB,0} },
-{"sreq", ".", X, 31, 729, {RA,RS,RB,0} },
-{"stfdux", 0, X, 31, 759, {FRS,RA,RB,0} },
-{"srliq", ".", X, 31, 760, {RA,RS,SH,0} },
-{"lhbrx", 0, X, 31, 790, {RT,RA,RB,0} },
-{"sra", ".", X, 31, 792, {RA,RS,RB,0} },
-{"srai", ".", X, 31, 824, {RA,RS,SH,0} },
-{"sthbrx", 0, X, 31, 918, {RS,RA,RB,0} },
-{"sraq", ".", X, 31, 920, {RA,RS,RB,0} },
-{"srea", ".", X, 31, 921, {RA,RS,RB,0} },
-{"exts", ".", X, 31, 922, {RA,RS,0} },
-{"sraiq", ".", X, 31, 952, {RA,RS,SH,0} },
-{"l", 0, D, 32, -1, {RT,DIS,RA,0} },
-{"lu", 0, D, 33, -1, {RT,DIS,RA,0} },
-{"lbz", 0, D, 34, -1, {RT,DIS,RA,0} },
-{"lbzu", 0, D, 35, -1, {RT,DIS,RA,0} },
-{"st", 0, D, 36, -1, {RS,DIS,RA,0} },
-{"stu", 0, D, 37, -1, {RS,DIS,RA,0} },
-{"stb", 0, D, 38, -1, {RS,DIS,RA,0} },
-{"stbu", 0, D, 39, -1, {RS,DIS,RA,0} },
-{"lhz", 0, D, 40, -1, {RT,DIS,RA,0} },
-{"lhzu", 0, D, 41, -1, {RT,DIS,RA,0} },
-{"lha", 0, D, 42, -1, {RT,DIS,RA,0} },
-{"lhau", 0, D, 43, -1, {RT,DIS,RA,0} },
-{"sth", 0, D, 44, -1, {RS,DIS,RA,0} },
-{"sthu", 0, D, 45, -1, {RS,DIS,RA,0} },
-{"lm", 0, D, 46, -1, {RT,DIS,RA,0} },
-{"stm", 0, D, 47, -1, {RS,DIS,RA,0} },
-{"lfs", 0, D, 48, -1, {FRT,DIS,RA,0} },
-{"lfsu", 0, D, 49, -1, {FRT,DIS,RA,0} },
-{"lfd", 0, D, 50, -1, {FRT,DIS,RA,0} },
-{"lfdu", 0, D, 51, -1, {FRT,DIS,RA,0} },
-{"stfs", 0, D, 52, -1, {FRS,DIS,RA,0} },
-{"stfsu", 0, D, 53, -1, {FRS,DIS,RA,0} },
-{"stfd", 0, D, 54, -1, {FRS,DIS,RA,0} },
-{"stfdu", 0, D, 55, -1, {FRS,DIS,RA,0} },
-{"fcmpu", 0, X, 63, 0, {BF,FRA,FRB,0} },
-{"frsp", ".", X, 63, 12, {FRT,FRB,0} },
-{"fd", ".", A, 63, 18, {FRT,FRA,FRB,0} },
-{"fs", ".", A, 63, 20, {FRT,FRA,FRB,0} },
-{"fa", ".", A, 63, 21, {FRT,FRA,FRB,0} },
-{"fm", ".", A, 63, 25, {FRT,FRA,FRC,0} },
-{"fms", ".", A, 63, 28, {FRT,FRA,FRC,FRB,0} },
-{"fma", ".", A, 63, 29, {FRT,FRA,FRC,FRB,0} },
-{"fnms", ".", A, 63, 30, {FRT,FRA,FRC,FRB,0} },
-{"fnma", ".", A, 63, 31, {FRT,FRA,FRC,FRB,0} },
-{"fcmpo", 0, X, 63, 32, {BF,FRA,FRB,0} },
-{"mtfsb1", ".", X, 63, 38, {BT,0} },
-{"fneg", ".", X, 63, 40, {FRT,FRB,0} },
-{"mcrfs", 0, X, 63, 64, {BF,BFA,0} },
-{"mtfsb0", ".", X, 63, 70, {BT,0} },
-{"fmr", ".", X, 63, 72, {FRT,FRB,0} },
-{"mtfsfi", ".", X, 63, 134, {BF,I,0} },
-{"fnabs", ".", X, 63, 136, {FRT,FRB,0} },
-{"fabs", ".", X, 63, 264, {FRT,FRB,0} },
-{"mffs", ".", X, 63, 583, {FRT,0} },
-{"mtfsf", ".", XFL, 63, 711, {FLM,FRB,0} },
-};
-
-#define NOPCODES (sizeof (rs6k_ops) / sizeof (struct rs6000_insn))
diff --git a/contrib/gdb/include/opcode/sparc.h b/contrib/gdb/include/opcode/sparc.h
deleted file mode 100644
index b9281e6070cb..000000000000
--- a/contrib/gdb/include/opcode/sparc.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/* Definitions for opcode table for the sparc.
- Copyright (C) 1989, 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
-
-This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
-the GNU Binutils.
-
-GAS/GDB is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GAS/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 GAS or GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-/* The SPARC opcode table (and other related data) is defined in
- the opcodes library in sparc-opc.c. If you change anything here, make
- sure you fix up that file, and vice versa. */
-
- /* FIXME-someday: perhaps the ,a's and such should be embedded in the
- instruction's name rather than the args. This would make gas faster, pinsn
- slower, but would mess up some macros a bit. xoxorich. */
-
-/* List of instruction sets variations.
- These values are such that each element is either a superset of a
- preceding each one or they conflict in which case SPARC_OPCODE_CONFLICT_P
- returns non-zero.
- The values are indices into `sparc_opcode_archs' defined in sparc-opc.c.
- Don't change this without updating sparc-opc.c. */
-
-enum sparc_opcode_arch_val {
- SPARC_OPCODE_ARCH_V6 = 0,
- SPARC_OPCODE_ARCH_V7,
- SPARC_OPCODE_ARCH_V8,
- SPARC_OPCODE_ARCH_SPARCLET,
- SPARC_OPCODE_ARCH_SPARCLITE,
- /* v9 variants must appear last */
- SPARC_OPCODE_ARCH_V9,
- SPARC_OPCODE_ARCH_V9A, /* v9 with ultrasparc additions */
- SPARC_OPCODE_ARCH_BAD /* error return from sparc_opcode_lookup_arch */
-};
-
-/* The highest architecture in the table. */
-#define SPARC_OPCODE_ARCH_MAX (SPARC_OPCODE_ARCH_BAD - 1)
-
-/* Table of cpu variants. */
-
-struct sparc_opcode_arch {
- const char *name;
- /* Mask of sparc_opcode_arch_val's supported.
- EG: For v7 this would be ((1 << v6) | (1 << v7)). */
- /* These are short's because sparc_opcode.architecture is. */
- short supported;
-};
-
-extern const struct sparc_opcode_arch sparc_opcode_archs[];
-
-/* Given architecture name, look up it's sparc_opcode_arch_val value. */
-extern enum sparc_opcode_arch_val sparc_opcode_lookup_arch ();
-
-/* Return the bitmask of supported architectures for ARCH. */
-#define SPARC_OPCODE_SUPPORTED(ARCH) (sparc_opcode_archs[ARCH].supported)
-
-/* Non-zero if ARCH1 conflicts with ARCH2.
- IE: ARCH1 as a supported bit set that ARCH2 doesn't, and vice versa. */
-#define SPARC_OPCODE_CONFLICT_P(ARCH1, ARCH2) \
-(((SPARC_OPCODE_SUPPORTED (ARCH1) & SPARC_OPCODE_SUPPORTED (ARCH2)) \
- != SPARC_OPCODE_SUPPORTED (ARCH1)) \
- && ((SPARC_OPCODE_SUPPORTED (ARCH1) & SPARC_OPCODE_SUPPORTED (ARCH2)) \
- != SPARC_OPCODE_SUPPORTED (ARCH2)))
-
-/* Structure of an opcode table entry. */
-
-struct sparc_opcode {
- const char *name;
- unsigned long match; /* Bits that must be set. */
- unsigned long lose; /* Bits that must not be set. */
- const char *args;
- /* This was called "delayed" in versions before the flags. */
- char flags;
- short architecture; /* Bitmask of sparc_opcode_arch_val's. */
-};
-
-#define F_DELAYED 1 /* Delayed branch */
-#define F_ALIAS 2 /* Alias for a "real" instruction */
-#define F_UNBR 4 /* Unconditional branch */
-#define F_CONDBR 8 /* Conditional branch */
-#define F_JSR 16 /* Subroutine call */
-/* FIXME: Add F_ANACHRONISTIC flag for v9. */
-
-/*
-
-All sparc opcodes are 32 bits, except for the `set' instruction (really a
-macro), which is 64 bits. It is handled as a special case.
-
-The match component is a mask saying which bits must match a particular
-opcode in order for an instruction to be an instance of that opcode.
-
-The args component is a string containing one character for each operand of the
-instruction.
-
-Kinds of operands:
- # Number used by optimizer. It is ignored.
- 1 rs1 register.
- 2 rs2 register.
- d rd register.
- e frs1 floating point register.
- v frs1 floating point register (double/even).
- V frs1 floating point register (quad/multiple of 4).
- f frs2 floating point register.
- B frs2 floating point register (double/even).
- R frs2 floating point register (quad/multiple of 4).
- g frsd floating point register.
- H frsd floating point register (double/even).
- J frsd floating point register (quad/multiple of 4).
- b crs1 coprocessor register
- c crs2 coprocessor register
- D crsd coprocessor register
- m alternate space register (asr) in rd
- M alternate space register (asr) in rs1
- h 22 high bits.
- K MEMBAR mask (7 bits). (v9)
- j 10 bit Immediate. (v9)
- I 11 bit Immediate. (v9)
- i 13 bit Immediate.
- n 22 bit immediate.
- k 2+14 bit PC relative immediate. (v9)
- G 19 bit PC relative immediate. (v9)
- l 22 bit PC relative immediate.
- L 30 bit PC relative immediate.
- a Annul. The annul bit is set.
- A Alternate address space. Stored as 8 bits.
- C Coprocessor state register.
- F floating point state register.
- p Processor state register.
- N Branch predict clear ",pn" (v9)
- T Branch predict set ",pt" (v9)
- z %icc. (v9)
- Z %xcc. (v9)
- q Floating point queue.
- r Single register that is both rs1 and rd.
- O Single register that is both rs2 and rd.
- Q Coprocessor queue.
- S Special case.
- t Trap base register.
- w Window invalid mask register.
- y Y register.
- u sparclet coprocessor registers in rd position
- U sparclet coprocessor registers in rs1 position
- E %ccr. (v9)
- s %fprs. (v9)
- P %pc. (v9)
- W %tick. (v9)
- o %asi. (v9)
- 6 %fcc0. (v9)
- 7 %fcc1. (v9)
- 8 %fcc2. (v9)
- 9 %fcc3. (v9)
- ! Privileged Register in rd (v9)
- ? Privileged Register in rs1 (v9)
- * Prefetch function constant. (v9)
- x OPF field (v9 impdep).
-
-The following chars are unused: (note: ,[] are used as punctuation)
-[XY3450]
-
-*/
-
-#define OP2(x) (((x)&0x7) << 22) /* op2 field of format2 insns */
-#define OP3(x) (((x)&0x3f) << 19) /* op3 field of format3 insns */
-#define OP(x) ((unsigned)((x)&0x3) << 30) /* op field of all insns */
-#define OPF(x) (((x)&0x1ff) << 5) /* opf field of float insns */
-#define OPF_LOW5(x) OPF((x)&0x1f) /* v9 */
-#define F3F(x, y, z) (OP(x) | OP3(y) | OPF(z)) /* format3 float insns */
-#define F3I(x) (((x)&0x1) << 13) /* immediate field of format 3 insns */
-#define F2(x, y) (OP(x) | OP2(y)) /* format 2 insns */
-#define F3(x, y, z) (OP(x) | OP3(y) | F3I(z)) /* format3 insns */
-#define F1(x) (OP(x))
-#define DISP30(x) ((x)&0x3fffffff)
-#define ASI(x) (((x)&0xff) << 5) /* asi field of format3 insns */
-#define RS2(x) ((x)&0x1f) /* rs2 field */
-#define SIMM13(x) ((x)&0x1fff) /* simm13 field */
-#define RD(x) (((x)&0x1f) << 25) /* destination register field */
-#define RS1(x) (((x)&0x1f) << 14) /* rs1 field */
-#define ASI_RS2(x) (SIMM13(x))
-#define MEMBAR(x) ((x)&0x7f)
-
-#define ANNUL (1<<29)
-#define BPRED (1<<19) /* v9 */
-#define IMMED F3I(1)
-#define RD_G0 RD(~0)
-#define RS1_G0 RS1(~0)
-#define RS2_G0 RS2(~0)
-
-extern struct sparc_opcode sparc_opcodes[];
-extern const int sparc_num_opcodes;
-
-int sparc_encode_asi ();
-char *sparc_decode_asi ();
-int sparc_encode_membar ();
-char *sparc_decode_membar ();
-int sparc_encode_prefetch ();
-char *sparc_decode_prefetch ();
-int sparc_encode_sparclet_cpreg ();
-char *sparc_decode_sparclet_cpreg ();
-
-/*
- * Local Variables:
- * fill-column: 131
- * comment-column: 0
- * End:
- */
-
-/* end of sparc.h */
diff --git a/contrib/gdb/include/opcode/tahoe.h b/contrib/gdb/include/opcode/tahoe.h
deleted file mode 100644
index b5cee249ee44..000000000000
--- a/contrib/gdb/include/opcode/tahoe.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Ported by the State University of New York at Buffalo by the Distributed
- * Computer Systems Lab, Department of Computer Science, 1991.
- */
-
-#ifndef tahoe_opcodeT
-#define tahoe_opcodeT int
-#endif /* no tahoe_opcodeT */
-
-struct vot_wot /* tahoe opcode table: wot to do with this */
- /* particular opcode */
-{
- char * args; /* how to compile said opcode */
- tahoe_opcodeT code; /* op-code (may be > 8 bits!) */
-};
-
-struct vot /* tahoe opcode text */
-{
- char * name; /* opcode name: lowercase string [key] */
- struct vot_wot detail; /* rest of opcode table [datum] */
-};
-
-#define vot_how args
-#define vot_code code
-#define vot_detail detail
-#define vot_name name
-
-static struct vot
-votstrs[] =
-{
-{ "halt", {"", 0x00 } },
-{ "sinf", {"", 0x05 } },
-{ "ldf", {"rl", 0x06 } },
-{ "ldd", {"rq", 0x07 } },
-{ "addb2", {"rbmb", 0x08 } },
-{ "movb", {"rbwb", 0x09 } },
-{ "addw2", {"rwmw", 0x0a } },
-{ "movw", {"rwww", 0x0b } },
-{ "addl2", {"rlml", 0x0c } },
-{ "movl", {"rlwl", 0x0d } },
-{ "bbs", {"rlvlbw", 0x0e } },
-{ "nop", {"", 0x10 } },
-{ "brb", {"bb", 0x11 } },
-{ "brw", {"bw", 0x13 } },
-{ "cosf", {"", 0x15 } },
-{ "lnf", {"rl", 0x16 } },
-{ "lnd", {"rq", 0x17 } },
-{ "addb3", {"rbrbwb", 0x18 } },
-{ "cmpb", {"rbwb", 0x19 } },
-{ "addw3", {"rwrwww", 0x1a } },
-{ "cmpw", {"rwww", 0x1b } },
-{ "addl3", {"rlrlwl", 0x1c } },
-{ "cmpl", {"rlwl", 0x1d } },
-{ "bbc", {"rlvlbw", 0x1e } },
-{ "rei", {"", 0x20 } },
-{ "bneq", {"bb", 0x21 } },
-{ "bnequ", {"bb", 0x21 } },
-{ "cvtwl", {"rwwl", 0x23 } },
-{ "stf", {"wl", 0x26 } },
-{ "std", {"wq", 0x27 } },
-{ "subb2", {"rbmb", 0x28 } },
-{ "mcomb", {"rbwb", 0x29 } },
-{ "subw2", {"rwmw", 0x2a } },
-{ "mcomw", {"rwww", 0x2b } },
-{ "subl2", {"rlml", 0x2c } },
-{ "mcoml", {"rlwl", 0x2d } },
-{ "emul", {"rlrlrlwq", 0x2e } },
-{ "aoblss", {"rlmlbw", 0x2f } },
-{ "bpt", {"", 0x30 } },
-{ "beql", {"bb", 0x31 } },
-{ "beqlu", {"bb", 0x31 } },
-{ "cvtwb", {"rwwb", 0x33 } },
-{ "logf", {"", 0x35 } },
-{ "cmpf", {"rl", 0x36 } },
-{ "cmpd", {"rq", 0x37 } },
-{ "subb3", {"rbrbwb", 0x38 } },
-{ "bitb", {"rbrb", 0x39 } },
-{ "subw3", {"rwrwww", 0x3a } },
-{ "bitw", {"rwrw", 0x3b } },
-{ "subl3", {"rlrlwl", 0x3c } },
-{ "bitl", {"rlrl", 0x3d } },
-{ "ediv", {"rlrqwlwl", 0x3e } },
-{ "aobleq", {"rlmlbw", 0x3f } },
-{ "ret", {"", 0x40 } },
-{ "bgtr", {"bb", 0x41 } },
-{ "sqrtf", {"", 0x45 } },
-{ "cmpf2", {"rl", 0x46 } },
-{ "cmpd2", {"rqrq", 0x47 } },
-{ "shll", {"rbrlwl", 0x48 } },
-{ "clrb", {"wb", 0x49 } },
-{ "shlq", {"rbrqwq", 0x4a } },
-{ "clrw", {"ww", 0x4b } },
-{ "mull2", {"rlml", 0x4c } },
-{ "clrl", {"wl", 0x4d } },
-{ "shal", {"rbrlwl", 0x4e } },
-{ "bleq", {"bb", 0x51 } },
-{ "expf", {"", 0x55 } },
-{ "tstf", {"", 0x56 } },
-{ "tstd", {"", 0x57 } },
-{ "shrl", {"rbrlwl", 0x58 } },
-{ "tstb", {"rb", 0x59 } },
-{ "shrq", {"rbrqwq", 0x5a } },
-{ "tstw", {"rw", 0x5b } },
-{ "mull3", {"rlrlwl", 0x5c } },
-{ "tstl", {"rl", 0x5d } },
-{ "shar", {"rbrlwl", 0x5e } },
-{ "bbssi", {"rlmlbw", 0x5f } },
-{ "ldpctx", {"", 0x60 } },
-{ "pushd", {"", 0x67 } },
-{ "incb", {"mb", 0x69 } },
-{ "incw", {"mw", 0x6b } },
-{ "divl2", {"rlml", 0x6c } },
-{ "incl", {"ml", 0x6d } },
-{ "cvtlb", {"rlwb", 0x6f } },
-{ "svpctx", {"", 0x70 } },
-{ "jmp", {"ab", 0x71 } },
-{ "cvlf", {"rl", 0x76 } },
-{ "cvld", {"rl", 0x77 } },
-{ "decb", {"mb", 0x79 } },
-{ "decw", {"mw", 0x7b } },
-{ "divl3", {"rlrlwl", 0x7c } },
-{ "decl", {"ml", 0x7d } },
-{ "cvtlw", {"rlww", 0x7f } },
-{ "bgeq", {"bb", 0x81 } },
-{ "movs2", {"abab", 0x82 } },
-{ "cvfl", {"wl", 0x86 } },
-{ "cvdl", {"wl", 0x87 } },
-{ "orb2", {"rbmb", 0x88 } },
-{ "cvtbl", {"rbwl", 0x89 } },
-{ "orw2", {"rwmw", 0x8a } },
-{ "bispsw", {"rw", 0x8b } },
-{ "orl2", {"rlml", 0x8c } },
-{ "adwc", {"rlml", 0x8d } },
-{ "adda", {"rlml", 0x8e } },
-{ "blss", {"bb", 0x91 } },
-{ "cmps2", {"abab", 0x92 } },
-{ "ldfd", {"rl", 0x97 } },
-{ "orb3", {"rbrbwb", 0x98 } },
-{ "cvtbw", {"rbww", 0x99 } },
-{ "orw3", {"rwrwww", 0x9a } },
-{ "bicpsw", {"rw", 0x9b } },
-{ "orl3", {"rlrlwl", 0x9c } },
-{ "sbwc", {"rlml", 0x9d } },
-{ "suba", {"rlml", 0x9e } },
-{ "bgtru", {"bb", 0xa1 } },
-{ "cvdf", {"", 0xa6 } },
-{ "andb2", {"rbmb", 0xa8 } },
-{ "movzbl", {"rbwl", 0xa9 } },
-{ "andw2", {"rwmw", 0xaa } },
-{ "loadr", {"rwal", 0xab } },
-{ "andl2", {"rlml", 0xac } },
-{ "mtpr", {"rlrl", 0xad } },
-{ "ffs", {"rlwl", 0xae } },
-{ "blequ", {"bb", 0xb1 } },
-{ "negf", {"", 0xb6 } },
-{ "negd", {"", 0xb7 } },
-{ "andb3", {"rbrbwb", 0xb8 } },
-{ "movzbw", {"rbww", 0xb9 } },
-{ "andw3", {"rwrwww", 0xba } },
-{ "storer", {"rwal", 0xbb } },
-{ "andl3", {"rlrlwl", 0xbc } },
-{ "mfpr", {"rlwl", 0xbd } },
-{ "ffc", {"rlwl", 0xbe } },
-{ "calls", {"rbab", 0xbf } },
-{ "prober", {"rbabrl", 0xc0 } },
-{ "bvc", {"bb", 0xc1 } },
-{ "movs3", {"ababrw", 0xc2 } },
-{ "movzwl", {"rwwl", 0xc3 } },
-{ "addf", {"rl", 0xc6 } },
-{ "addd", {"rq", 0xc7 } },
-{ "xorb2", {"rbmb", 0xc8 } },
-{ "movob", {"rbwb", 0xc9 } },
-{ "xorw2", {"rwmw", 0xca } },
-{ "movow", {"rwww", 0xcb } },
-{ "xorl2", {"rlml", 0xcc } },
-{ "movpsl", {"wl", 0xcd } },
-{ "kcall", {"rw", 0xcf } },
-{ "probew", {"rbabrl", 0xd0 } },
-{ "bvs", {"bb", 0xd1 } },
-{ "cmps3", {"ababrw", 0xd2 } },
-{ "subf", {"rq", 0xd6 } },
-{ "subd", {"rq", 0xd7 } },
-{ "xorb3", {"rbrbwb", 0xd8 } },
-{ "pushb", {"rb", 0xd9 } },
-{ "xorw3", {"rwrwww", 0xda } },
-{ "pushw", {"rw", 0xdb } },
-{ "xorl3", {"rlrlwl", 0xdc } },
-{ "pushl", {"rl", 0xdd } },
-{ "insque", {"abab", 0xe0 } },
-{ "bcs", {"bb", 0xe1 } },
-{ "bgequ", {"bb", 0xe1 } },
-{ "mulf", {"rq", 0xe6 } },
-{ "muld", {"rq", 0xe7 } },
-{ "mnegb", {"rbwb", 0xe8 } },
-{ "movab", {"abwl", 0xe9 } },
-{ "mnegw", {"rwww", 0xea } },
-{ "movaw", {"awwl", 0xeb } },
-{ "mnegl", {"rlwl", 0xec } },
-{ "moval", {"alwl", 0xed } },
-{ "remque", {"ab", 0xf0 } },
-{ "bcc", {"bb", 0xf1 } },
-{ "blssu", {"bb", 0xf1 } },
-{ "divf", {"rq", 0xf6 } },
-{ "divd", {"rq", 0xf7 } },
-{ "movblk", {"alalrw", 0xf8 } },
-{ "pushab", {"ab", 0xf9 } },
-{ "pushaw", {"aw", 0xfb } },
-{ "casel", {"rlrlrl", 0xfc } },
-{ "pushal", {"al", 0xfd } },
-{ "callf", {"rbab", 0xfe } },
-{ "" , "" } /* empty is end sentinel */
-
-};
diff --git a/contrib/gdb/include/opcode/vax.h b/contrib/gdb/include/opcode/vax.h
deleted file mode 100644
index f3afebde7e3b..000000000000
--- a/contrib/gdb/include/opcode/vax.h
+++ /dev/null
@@ -1,382 +0,0 @@
-/* Vax opcde list.
- Copyright (C) 1989, 1995 Free Software Foundation, Inc.
-
-This file is part of GDB and GAS.
-
-GDB and GAS are free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-GDB and GAS are distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GDB or GAS; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef vax_opcodeT
-#define vax_opcodeT int
-#endif /* no vax_opcodeT */
-
-struct vot_wot /* vax opcode table: wot to do with this */
- /* particular opcode */
-{
- const char *args; /* how to compile said opcode */
- vax_opcodeT code; /* op-code (may be > 8 bits!) */
-};
-
-struct vot /* vax opcode text */
-{
- const char *name; /* opcode name: lowercase string [key] */
- struct vot_wot detail; /* rest of opcode table [datum] */
-};
-
-#define vot_how args
-#define vot_code code
-#define vot_detail detail
-#define vot_name name
-
-static const struct vot
-votstrs[] =
-{
-{ "halt", {"", 0x00 } },
-{ "nop", {"", 0x01 } },
-{ "rei", {"", 0x02 } },
-{ "bpt", {"", 0x03 } },
-{ "ret", {"", 0x04 } },
-{ "rsb", {"", 0x05 } },
-{ "ldpctx", {"", 0x06 } },
-{ "svpctx", {"", 0x07 } },
-{ "cvtps", {"rwabrwab", 0x08 } },
-{ "cvtsp", {"rwabrwab", 0x09 } },
-{ "index", {"rlrlrlrlrlwl", 0x0a } },
-{ "crc", {"abrlrwab", 0x0b } },
-{ "prober", {"rbrwab", 0x0c } },
-{ "probew", {"rbrwab", 0x0d } },
-{ "insque", {"abab", 0x0e } },
-{ "remque", {"abwl", 0x0f } },
-{ "bsbb", {"bb", 0x10 } },
-{ "brb", {"bb", 0x11 } },
-{ "bneq", {"bb", 0x12 } },
-{ "bnequ", {"bb", 0x12 } },
-{ "beql", {"bb", 0x13 } },
-{ "beqlu", {"bb", 0x13 } },
-{ "bgtr", {"bb", 0x14 } },
-{ "bleq", {"bb", 0x15 } },
-{ "jsb", {"ab", 0x16 } },
-{ "jmp", {"ab", 0x17 } },
-{ "bgeq", {"bb", 0x18 } },
-{ "blss", {"bb", 0x19 } },
-{ "bgtru", {"bb", 0x1a } },
-{ "blequ", {"bb", 0x1b } },
-{ "bvc", {"bb", 0x1c } },
-{ "bvs", {"bb", 0x1d } },
-{ "bcc", {"bb", 0x1e } },
-{ "bgequ", {"bb", 0x1e } },
-{ "blssu", {"bb", 0x1f } },
-{ "bcs", {"bb", 0x1f } },
-{ "addp4", {"rwabrwab", 0x20 } },
-{ "addp6", {"rwabrwabrwab", 0x21 } },
-{ "subp4", {"rwabrwab", 0x22 } },
-{ "subp6", {"rwabrwabrwab", 0x23 } },
-{ "cvtpt", {"rwababrwab", 0x24 } },
-{ "mulp", {"rwabrwabrwab", 0x25 } },
-{ "cvttp", {"rwababrwab", 0x26 } },
-{ "divp", {"rwabrwabrwab", 0x27 } },
-{ "movc3", {"rwabab", 0x28 } },
-{ "cmpc3", {"rwabab", 0x29 } },
-{ "scanc", {"rwababrb", 0x2a } },
-{ "spanc", {"rwababrb", 0x2b } },
-{ "movc5", {"rwabrbrwab", 0x2c } },
-{ "cmpc5", {"rwabrbrwab", 0x2d } },
-{ "movtc", {"rwabrbabrwab", 0x2e } },
-{ "movtuc", {"rwabrbabrwab", 0x2f } },
-{ "bsbw", {"bw", 0x30 } },
-{ "brw", {"bw", 0x31 } },
-{ "cvtwl", {"rwwl", 0x32 } },
-{ "cvtwb", {"rwwb", 0x33 } },
-{ "movp", {"rwabab", 0x34 } },
-{ "cmpp3", {"rwabab", 0x35 } },
-{ "cvtpl", {"rwabwl", 0x36 } },
-{ "cmpp4", {"rwabrwab", 0x37 } },
-{ "editpc", {"rwababab", 0x38 } },
-{ "matchc", {"rwabrwab", 0x39 } },
-{ "locc", {"rbrwab", 0x3a } },
-{ "skpc", {"rbrwab", 0x3b } },
-{ "movzwl", {"rwwl", 0x3c } },
-{ "acbw", {"rwrwmwbw", 0x3d } },
-{ "movaw", {"awwl", 0x3e } },
-{ "pushaw", {"aw", 0x3f } },
-{ "addf2", {"rfmf", 0x40 } },
-{ "addf3", {"rfrfwf", 0x41 } },
-{ "subf2", {"rfmf", 0x42 } },
-{ "subf3", {"rfrfwf", 0x43 } },
-{ "mulf2", {"rfmf", 0x44 } },
-{ "mulf3", {"rfrfwf", 0x45 } },
-{ "divf2", {"rfmf", 0x46 } },
-{ "divf3", {"rfrfwf", 0x47 } },
-{ "cvtfb", {"rfwb", 0x48 } },
-{ "cvtfw", {"rfww", 0x49 } },
-{ "cvtfl", {"rfwl", 0x4a } },
-{ "cvtrfl", {"rfwl", 0x4b } },
-{ "cvtbf", {"rbwf", 0x4c } },
-{ "cvtwf", {"rwwf", 0x4d } },
-{ "cvtlf", {"rlwf", 0x4e } },
-{ "acbf", {"rfrfmfbw", 0x4f } },
-{ "movf", {"rfwf", 0x50 } },
-{ "cmpf", {"rfrf", 0x51 } },
-{ "mnegf", {"rfwf", 0x52 } },
-{ "tstf", {"rf", 0x53 } },
-{ "emodf", {"rfrbrfwlwf", 0x54 } },
-{ "polyf", {"rfrwab", 0x55 } },
-{ "cvtfd", {"rfwd", 0x56 } },
- /* opcode 57 is not defined yet */
-{ "adawi", {"rwmw", 0x58 } },
- /* opcode 59 is not defined yet */
- /* opcode 5a is not defined yet */
- /* opcode 5b is not defined yet */
-{ "insqhi", {"abaq", 0x5c } },
-{ "insqti", {"abaq", 0x5d } },
-{ "remqhi", {"aqwl", 0x5e } },
-{ "remqti", {"aqwl", 0x5f } },
-{ "addd2", {"rdmd", 0x60 } },
-{ "addd3", {"rdrdwd", 0x61 } },
-{ "subd2", {"rdmd", 0x62 } },
-{ "subd3", {"rdrdwd", 0x63 } },
-{ "muld2", {"rdmd", 0x64 } },
-{ "muld3", {"rdrdwd", 0x65 } },
-{ "divd2", {"rdmd", 0x66 } },
-{ "divd3", {"rdrdwd", 0x67 } },
-{ "cvtdb", {"rdwb", 0x68 } },
-{ "cvtdw", {"rdww", 0x69 } },
-{ "cvtdl", {"rdwl", 0x6a } },
-{ "cvtrdl", {"rdwl", 0x6b } },
-{ "cvtbd", {"rbwd", 0x6c } },
-{ "cvtwd", {"rwwd", 0x6d } },
-{ "cvtld", {"rlwd", 0x6e } },
-{ "acbd", {"rdrdmdbw", 0x6f } },
-{ "movd", {"rdwd", 0x70 } },
-{ "cmpd", {"rdrd", 0x71 } },
-{ "mnegd", {"rdwd", 0x72 } },
-{ "tstd", {"rd", 0x73 } },
-{ "emodd", {"rdrbrdwlwd", 0x74 } },
-{ "polyd", {"rdrwab", 0x75 } },
-{ "cvtdf", {"rdwf", 0x76 } },
- /* opcode 77 is not defined yet */
-{ "ashl", {"rbrlwl", 0x78 } },
-{ "ashq", {"rbrqwq", 0x79 } },
-{ "emul", {"rlrlrlwq", 0x7a } },
-{ "ediv", {"rlrqwlwl", 0x7b } },
-{ "clrd", {"wd", 0x7c } },
-{ "clrg", {"wg", 0x7c } },
-{ "clrq", {"wd", 0x7c } },
-{ "movq", {"rqwq", 0x7d } },
-{ "movaq", {"aqwl", 0x7e } },
-{ "movad", {"adwl", 0x7e } },
-{ "pushaq", {"aq", 0x7f } },
-{ "pushad", {"ad", 0x7f } },
-{ "addb2", {"rbmb", 0x80 } },
-{ "addb3", {"rbrbwb", 0x81 } },
-{ "subb2", {"rbmb", 0x82 } },
-{ "subb3", {"rbrbwb", 0x83 } },
-{ "mulb2", {"rbmb", 0x84 } },
-{ "mulb3", {"rbrbwb", 0x85 } },
-{ "divb2", {"rbmb", 0x86 } },
-{ "divb3", {"rbrbwb", 0x87 } },
-{ "bisb2", {"rbmb", 0x88 } },
-{ "bisb3", {"rbrbwb", 0x89 } },
-{ "bicb2", {"rbmb", 0x8a } },
-{ "bicb3", {"rbrbwb", 0x8b } },
-{ "xorb2", {"rbmb", 0x8c } },
-{ "xorb3", {"rbrbwb", 0x8d } },
-{ "mnegb", {"rbwb", 0x8e } },
-{ "caseb", {"rbrbrb", 0x8f } },
-{ "movb", {"rbwb", 0x90 } },
-{ "cmpb", {"rbrb", 0x91 } },
-{ "mcomb", {"rbwb", 0x92 } },
-{ "bitb", {"rbrb", 0x93 } },
-{ "clrb", {"wb", 0x94 } },
-{ "tstb", {"rb", 0x95 } },
-{ "incb", {"mb", 0x96 } },
-{ "decb", {"mb", 0x97 } },
-{ "cvtbl", {"rbwl", 0x98 } },
-{ "cvtbw", {"rbww", 0x99 } },
-{ "movzbl", {"rbwl", 0x9a } },
-{ "movzbw", {"rbww", 0x9b } },
-{ "rotl", {"rbrlwl", 0x9c } },
-{ "acbb", {"rbrbmbbw", 0x9d } },
-{ "movab", {"abwl", 0x9e } },
-{ "pushab", {"ab", 0x9f } },
-{ "addw2", {"rwmw", 0xa0 } },
-{ "addw3", {"rwrwww", 0xa1 } },
-{ "subw2", {"rwmw", 0xa2 } },
-{ "subw3", {"rwrwww", 0xa3 } },
-{ "mulw2", {"rwmw", 0xa4 } },
-{ "mulw3", {"rwrwww", 0xa5 } },
-{ "divw2", {"rwmw", 0xa6 } },
-{ "divw3", {"rwrwww", 0xa7 } },
-{ "bisw2", {"rwmw", 0xa8 } },
-{ "bisw3", {"rwrwww", 0xa9 } },
-{ "bicw2", {"rwmw", 0xaa } },
-{ "bicw3", {"rwrwww", 0xab } },
-{ "xorw2", {"rwmw", 0xac } },
-{ "xorw3", {"rwrwww", 0xad } },
-{ "mnegw", {"rwww", 0xae } },
-{ "casew", {"rwrwrw", 0xaf } },
-{ "movw", {"rwww", 0xb0 } },
-{ "cmpw", {"rwrw", 0xb1 } },
-{ "mcomw", {"rwww", 0xb2 } },
-{ "bitw", {"rwrw", 0xb3 } },
-{ "clrw", {"ww", 0xb4 } },
-{ "tstw", {"rw", 0xb5 } },
-{ "incw", {"mw", 0xb6 } },
-{ "decw", {"mw", 0xb7 } },
-{ "bispsw", {"rw", 0xb8 } },
-{ "bicpsw", {"rw", 0xb9 } },
-{ "popr", {"rw", 0xba } },
-{ "pushr", {"rw", 0xbb } },
-{ "chmk", {"rw", 0xbc } },
-{ "chme", {"rw", 0xbd } },
-{ "chms", {"rw", 0xbe } },
-{ "chmu", {"rw", 0xbf } },
-{ "addl2", {"rlml", 0xc0 } },
-{ "addl3", {"rlrlwl", 0xc1 } },
-{ "subl2", {"rlml", 0xc2 } },
-{ "subl3", {"rlrlwl", 0xc3 } },
-{ "mull2", {"rlml", 0xc4 } },
-{ "mull3", {"rlrlwl", 0xc5 } },
-{ "divl2", {"rlml", 0xc6 } },
-{ "divl3", {"rlrlwl", 0xc7 } },
-{ "bisl2", {"rlml", 0xc8 } },
-{ "bisl3", {"rlrlwl", 0xc9 } },
-{ "bicl2", {"rlml", 0xca } },
-{ "bicl3", {"rlrlwl", 0xcb } },
-{ "xorl2", {"rlml", 0xcc } },
-{ "xorl3", {"rlrlwl", 0xcd } },
-{ "mnegl", {"rlwl", 0xce } },
-{ "casel", {"rlrlrl", 0xcf } },
-{ "movl", {"rlwl", 0xd0 } },
-{ "cmpl", {"rlrl", 0xd1 } },
-{ "mcoml", {"rlwl", 0xd2 } },
-{ "bitl", {"rlrl", 0xd3 } },
-{ "clrf", {"wf", 0xd4 } },
-{ "clrl", {"wl", 0xd4 } },
-{ "tstl", {"rl", 0xd5 } },
-{ "incl", {"ml", 0xd6 } },
-{ "decl", {"ml", 0xd7 } },
-{ "adwc", {"rlml", 0xd8 } },
-{ "sbwc", {"rlml", 0xd9 } },
-{ "mtpr", {"rlrl", 0xda } },
-{ "mfpr", {"rlwl", 0xdb } },
-{ "movpsl", {"wl", 0xdc } },
-{ "pushl", {"rl", 0xdd } },
-{ "moval", {"alwl", 0xde } },
-{ "movaf", {"afwl", 0xde } },
-{ "pushal", {"al", 0xdf } },
-{ "pushaf", {"af", 0xdf } },
-{ "bbs", {"rlvbbb", 0xe0 } },
-{ "bbc", {"rlvbbb", 0xe1 } },
-{ "bbss", {"rlvbbb", 0xe2 } },
-{ "bbcs", {"rlvbbb", 0xe3 } },
-{ "bbsc", {"rlvbbb", 0xe4 } },
-{ "bbcc", {"rlvbbb", 0xe5 } },
-{ "bbssi", {"rlvbbb", 0xe6 } },
-{ "bbcci", {"rlvbbb", 0xe7 } },
-{ "blbs", {"rlbb", 0xe8 } },
-{ "blbc", {"rlbb", 0xe9 } },
-{ "ffs", {"rlrbvbwl", 0xea } },
-{ "ffc", {"rlrbvbwl", 0xeb } },
-{ "cmpv", {"rlrbvbrl", 0xec } },
-{ "cmpzv", {"rlrbvbrl", 0xed } },
-{ "extv", {"rlrbvbwl", 0xee } },
-{ "extzv", {"rlrbvbwl", 0xef } },
-{ "insv", {"rlrlrbvb", 0xf0 } },
-{ "acbl", {"rlrlmlbw", 0xf1 } },
-{ "aoblss", {"rlmlbb", 0xf2 } },
-{ "aobleq", {"rlmlbb", 0xf3 } },
-{ "sobgeq", {"mlbb", 0xf4 } },
-{ "sobgtr", {"mlbb", 0xf5 } },
-{ "cvtlb", {"rlwb", 0xf6 } },
-{ "cvtlw", {"rlww", 0xf7 } },
-{ "ashp", {"rbrwabrbrwab", 0xf8 } },
-{ "cvtlp", {"rlrwab", 0xf9 } },
-{ "callg", {"abab", 0xfa } },
-{ "calls", {"rlab", 0xfb } },
-{ "xfc", {"", 0xfc } },
- /* undefined opcodes here */
-{ "cvtdh", {"rdwh", 0x32fd } },
-{ "cvtgf", {"rgwh", 0x33fd } },
-{ "addg2", {"rgmg", 0x40fd } },
-{ "addg3", {"rgrgwg", 0x41fd } },
-{ "subg2", {"rgmg", 0x42fd } },
-{ "subg3", {"rgrgwg", 0x43fd } },
-{ "mulg2", {"rgmg", 0x44fd } },
-{ "mulg3", {"rgrgwg", 0x45fd } },
-{ "divg2", {"rgmg", 0x46fd } },
-{ "divg3", {"rgrgwg", 0x47fd } },
-{ "cvtgb", {"rgwb", 0x48fd } },
-{ "cvtgw", {"rgww", 0x49fd } },
-{ "cvtgl", {"rgwl", 0x4afd } },
-{ "cvtrgl", {"rgwl", 0x4bfd } },
-{ "cvtbg", {"rbwg", 0x4cfd } },
-{ "cvtwg", {"rwwg", 0x4dfd } },
-{ "cvtlg", {"rlwg", 0x4efd } },
-{ "acbg", {"rgrgmgbw", 0x4ffd } },
-{ "movg", {"rgwg", 0x50fd } },
-{ "cmpg", {"rgrg", 0x51fd } },
-{ "mnegg", {"rgwg", 0x52fd } },
-{ "tstg", {"rg", 0x53fd } },
-{ "emodg", {"rgrwrgwlwg", 0x54fd } },
-{ "polyg", {"rgrwab", 0x55fd } },
-{ "cvtgh", {"rgwh", 0x56fd } },
- /* undefined opcodes here */
-{ "addh2", {"rhmh", 0x60fd } },
-{ "addh3", {"rhrhwh", 0x61fd } },
-{ "subh2", {"rhmh", 0x62fd } },
-{ "subh3", {"rhrhwh", 0x63fd } },
-{ "mulh2", {"rhmh", 0x64fd } },
-{ "mulh3", {"rhrhwh", 0x65fd } },
-{ "divh2", {"rhmh", 0x66fd } },
-{ "divh3", {"rhrhwh", 0x67fd } },
-{ "cvthb", {"rhwb", 0x68fd } },
-{ "cvthw", {"rhww", 0x69fd } },
-{ "cvthl", {"rhwl", 0x6afd } },
-{ "cvtrhl", {"rhwl", 0x6bfd } },
-{ "cvtbh", {"rbwh", 0x6cfd } },
-{ "cvtwh", {"rwwh", 0x6dfd } },
-{ "cvtlh", {"rlwh", 0x6efd } },
-{ "acbh", {"rhrhmhbw", 0x6ffd } },
-{ "movh", {"rhwh", 0x70fd } },
-{ "cmph", {"rhrh", 0x71fd } },
-{ "mnegh", {"rhwh", 0x72fd } },
-{ "tsth", {"rh", 0x73fd } },
-{ "emodh", {"rhrwrhwlwh", 0x74fd } },
-{ "polyh", {"rhrwab", 0x75fd } },
-{ "cvthg", {"rhwg", 0x76fd } },
- /* undefined opcodes here */
-{ "clrh", {"wh", 0x7cfd } },
-{ "clro", {"wo", 0x7cfd } },
-{ "movo", {"rowo", 0x7dfd } },
-{ "movah", {"ahwl", 0x7efd } },
-{ "movao", {"aowl", 0x7efd } },
-{ "pushah", {"ah", 0x7ffd } },
-{ "pushao", {"ao", 0x7ffd } },
- /* undefined opcodes here */
-{ "cvtfh", {"rfwh", 0x98fd } },
-{ "cvtfg", {"rfwg", 0x99fd } },
- /* undefined opcodes here */
-{ "cvthf", {"rhwf", 0xf6fd } },
-{ "cvthd", {"rhwd", 0xf7fd } },
- /* undefined opcodes here */
-{ "bugl", {"rl", 0xfdff } },
-{ "bugw", {"rw", 0xfeff } },
- /* undefined opcodes here */
-
-{ "", {"", 0} } /* empty is end sentinel */
-
-}; /* votstrs */
-
-/* end: vax.opcode.h */
diff --git a/contrib/gdb/include/os9k.h b/contrib/gdb/include/os9k.h
deleted file mode 100644
index 0f2eed2d3b1b..000000000000
--- a/contrib/gdb/include/os9k.h
+++ /dev/null
@@ -1,169 +0,0 @@
-#if !defined(_MODULE_H)
-#define _MODULE_H
-
-/* OS-9000 i386 module header definitions */
-#define _MPF386
-
-/* sizeof common header less parity field */
-#define N_M_PARITY (sizeof(mh_com)-sizeof(unisgned short))
-#define OLD_M_PARITY 46
-#define M_PARITY N_M_PARITY
-
-#ifdef _MPF68K
-#define MODSYNC 0x4afd /* module header sync code for 680x0 processors */
-#endif
-
-#ifdef _MPF386
-#define MODSYNC 0x4afc /* module header sync code for 80386 processors */
-#endif
-
-#define MODREV 1 /* module format revision 1 */
-#define CRCCON 0x800fe3 /* crc polynomial constant */
-
-/* Module access permission values */
-#define MP_OWNER_READ 0x0001
-#define MP_OWNER_WRITE 0x0002
-#define MP_OWNER_EXEC 0x0004
-#define MP_GROUP_READ 0x0010
-#define MP_GROUP_WRITE 0x0020
-#define MP_GROUP_EXEC 0x0040
-#define MP_WORLD_READ 0x0100
-#define MP_WORLD_WRITE 0x0200
-#define MP_WORLD_EXEC 0x0400
-#define MP_WORLD_ACCESS 0x0777
-#define MP_OWNER_MASK 0x000f
-#define MP_GROUP_MASK 0x00f0
-#define MP_WORLD_MASK 0x0f00
-#define MP_SYSTM_MASK 0xf000
-
-/* Module Type/Language values */
-#define MT_ANY 0
-#define MT_PROGRAM 0x0001
-#define MT_SUBROUT 0x0002
-#define MT_MULTI 0x0003
-#define MT_DATA 0x0004
-#define MT_TRAPLIB 0x000b
-#define MT_SYSTEM 0x000c
-#define MT_FILEMAN 0x000d
-#define MT_DEVDRVR 0x000e
-#define MT_DEVDESC 0x000f
-#define MT_MASK 0xff00
-
-#define ML_ANY 0
-#define ML_OBJECT 1
-#define ML_ICODE 2
-#define ML_PCODE 3
-#define ML_CCODE 4
-#define ML_CBLCODE 5
-#define ML_FRTNCODE 6
-#define ML_MASK 0x00ff
-
-#define mktypelang(type,lang) (((type)<<8)|(lang))
-
-/* Module Attribute values */
-#define MA_REENT 0x80
-#define MA_GHOST 0x40
-#define MA_SUPER 0x20
-#define MA_MASK 0xff00
-#define MR_MASK 0x00ff
-
-#define mkattrevs(attr, revs) (((attr)<<8)|(revs))
-
-#define m_user m_owner.grp_usr.usr
-#define m_group m_owner.grp_usr.grp
-#define m_group_user m_owner.group_user
-
-/* macro definitions for accessing module header fields */
-#define MODNAME(mod) ((u_char*)((u_char*)mod + ((Mh_com)mod)->m_name))
-#if 0
-/* Appears not to be used, and the u_int32 typedef is gone (because it
- conflicted with a Mach header. */
-#define MODSIZE(mod) ((u_int32)((Mh_com)mod)->m_size)
-#endif /* 0 */
-#define MHCOM_BYTES_SIZE 80
-#define N_BADMAG(a) (((a).a_info) != MODSYNC)
-
-typedef struct mh_com {
- /* sync bytes ($4afc). */
- unsigned char m_sync[2];
- unsigned char m_sysrev[2]; /* system revision check value */
- unsigned char
- m_size[4]; /* module size */
- unsigned char
- m_owner[4]; /* group/user id */
- unsigned char
- m_name[4]; /* offset to module name */
- unsigned char
- m_access[2], /* access permissions */
- m_tylan[2], /* type/lang */
- m_attrev[2], /* rev/attr */
- m_edit[2]; /* edition */
- unsigned char
- m_needs[4], /* module hardware requirements flags. (reserved) */
- m_usage[4], /* comment string offset */
- m_symbol[4], /* symbol table offset */
- m_exec[4], /* offset to execution entry point */
- m_excpt[4], /* offset to exception entry point */
- m_data[4], /* data storage requirement */
- m_stack[4], /* stack size */
- m_idata[4], /* offset to initialized data */
- m_idref[4], /* offset to data reference lists */
- m_init[4], /* initialization routine offset */
- m_term[4]; /* termination routine offset */
- unsigned char
- m_ident[2]; /* ident code for ident program */
- char
- m_spare[8]; /* reserved bytes */
- unsigned char
- m_parity[2]; /* header parity */
-} mh_com,*Mh_com;
-
-/* Executable memory module */
-typedef mh_com *Mh_exec,mh_exec;
-
-/* Data memory module */
-typedef mh_com *Mh_data,mh_data;
-
-/* File manager memory module */
-typedef mh_com *Mh_fman,mh_fman;
-
-/* device driver module */
-typedef mh_com *Mh_drvr,mh_drvr;
-
-/* trap handler module */
-typedef mh_com mh_trap, *Mh_trap;
-
-/* Device descriptor module */
-typedef mh_com *Mh_dev,mh_dev;
-
-/* Configuration module */
-typedef mh_com *Mh_config, mh_config;
-
-#if 0
-
-#if !defined(_MODDIR_H)
-/* go get _os_fmod (and others) */
-#include <moddir.h>
-#endif
-
-error_code _os_crc(void *, u_int32, int *);
-error_code _os_datmod(char *, u_int32, u_int16 *, u_int16 *, u_int32, void **, mh_data **);
-error_code _os_get_moddir(void *, u_int32 *);
-error_code _os_initdata(mh_com *, void *);
-error_code _os_link(char **, mh_com **, void **, u_int16 *, u_int16 *);
-error_code _os_linkm(mh_com *, void **, u_int16 *, u_int16 *);
-error_code _os_load(char *, mh_com **, void **, u_int32, u_int16 *, u_int16 *, u_int32);
-error_code _os_mkmodule(char *, u_int32, u_int16 *, u_int16 *, u_int32, void **, mh_com **, u_int32);
-error_code _os_modaddr(void *, mh_com **);
-error_code _os_setcrc(mh_com *);
-error_code _os_slink(u_int32, char *, void **, void **, mh_com **);
-error_code _os_slinkm(u_int32, mh_com *, void **, void **);
-error_code _os_unlink(mh_com *);
-error_code _os_unload(char *, u_int32);
-error_code _os_tlink(u_int32, char *, void **, mh_trap **, void *, u_int32);
-error_code _os_tlinkm(u_int32, mh_com *, void **, void *, u_int32);
-error_code _os_iodel(mh_com *);
-error_code _os_vmodul(mh_com *, mh_com *, u_int32);
-#endif /* 0 */
-
-#endif
diff --git a/contrib/gdb/include/progress.h b/contrib/gdb/include/progress.h
deleted file mode 100644
index f18318a45140..000000000000
--- a/contrib/gdb/include/progress.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Default definitions for progress macros.
- Copyright (C) 1994 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* The default definitions below are intended to be replaced by real
- definitions, if building the tools for an interactive programming
- environment. */
-
-#ifndef _PROGRESS_H
-#define _PROGRESS_H
-
-#ifndef START_PROGRESS
-#define START_PROGRESS(STR,N)
-#endif
-
-#ifndef PROGRESS
-#define PROGRESS(X)
-#endif
-
-#ifndef END_PROGRESS
-#define END_PROGRESS(STR)
-#endif
-
-#endif /* _PROGRESS_H */
diff --git a/contrib/gdb/include/wait.h b/contrib/gdb/include/wait.h
deleted file mode 100644
index fa3c9ccb1d7e..000000000000
--- a/contrib/gdb/include/wait.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Define how to access the int that the wait system call stores.
- This has been compatible in all Unix systems since time immemorial,
- but various well-meaning people have defined various different
- words for the same old bits in the same old int (sometimes claimed
- to be a struct). We just know it's an int and we use these macros
- to access the bits. */
-
-/* The following macros are defined equivalently to their definitions
- in POSIX.1. We fail to define WNOHANG and WUNTRACED, which POSIX.1
- <sys/wait.h> defines, since our code does not use waitpid(). We
- also fail to declare wait() and waitpid(). */
-
-#ifndef WIFEXITED
-#define WIFEXITED(w) (((w)&0377) == 0)
-#endif
-
-#ifndef WIFSIGNALED
-#define WIFSIGNALED(w) (((w)&0377) != 0177 && ((w)&~0377) == 0)
-#endif
-
-#ifndef WIFSTOPPED
-#ifdef IBM6000
-
-/* Unfortunately, the above comment (about being compatible in all Unix
- systems) is not quite correct for AIX, sigh. And AIX 3.2 can generate
- status words like 0x57c (sigtrap received after load), and gdb would
- choke on it. */
-
-#define WIFSTOPPED(w) ((w)&0x40)
-
-#else
-#define WIFSTOPPED(w) (((w)&0377) == 0177)
-#endif
-#endif
-
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(w) (((w) >> 8) & 0377) /* same as WRETCODE */
-#endif
-
-#ifndef WTERMSIG
-#define WTERMSIG(w) ((w) & 0177)
-#endif
-
-#ifndef WSTOPSIG
-#define WSTOPSIG WEXITSTATUS
-#endif
-
-/* These are not defined in POSIX, but are used by our programs. */
-
-#define WAITTYPE int
-
-#ifndef WCOREDUMP
-#define WCOREDUMP(w) (((w)&0200) != 0)
-#endif
-
-#ifndef WSETEXIT
-#define WSETEXIT(w,status) ((w) = (0 | ((status) << 8)))
-#endif
-
-#ifndef WSETSTOP
-#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8)))
-#endif
-
diff --git a/contrib/gdb/libiberty/COPYING.LIB b/contrib/gdb/libiberty/COPYING.LIB
deleted file mode 100644
index eb685a5ec981..000000000000
--- a/contrib/gdb/libiberty/COPYING.LIB
+++ /dev/null
@@ -1,481 +0,0 @@
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library 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.
-
- This library is distributed in the hope that 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 this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/contrib/gdb/libiberty/ChangeLog b/contrib/gdb/libiberty/ChangeLog
deleted file mode 100644
index b28ef2f6ed52..000000000000
--- a/contrib/gdb/libiberty/ChangeLog
+++ /dev/null
@@ -1,1815 +0,0 @@
-Tue Mar 19 22:02:07 1996 Jason Merrill <jason@yorick.cygnus.com>
-
- * cplus-dem.c (demangle_template): Fix for non-mangled pointer
- arguments.
-
-Fri Mar 8 17:24:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: If srcdir is `.' and with_target_subdir is not
- `.', then set MULTISRCTOP before calling config-ml.in.
-
-Thu Mar 7 13:37:10 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.c (mpw_open): Add debugging output option.
-
-Wed Mar 6 17:36:03 1996 Jason Merrill <jason@yorick.cygnus.com>
-
- * cplus-dem.c (demangle_template): Fix for address-of-extern arguments.
-
-Tue Feb 27 12:00:50 1996 Raymond Jou <rjou@mexican.cygnus.com>
-
- * mpw.c (mpwify_filename): Change 6 to 5 in
- strncmp (unixname, "/tmp/", 5).
-
-Tue Feb 20 10:55:53 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * cplus-dem.c (demangle_template): Initialize is_bool. Correctly
- handle 0 as a pointer value parameter.
-
-Mon Feb 5 16:41:44 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (all): Depend upon required-list.
- (required-list): New target.
- (clean): Remove required-list.
-
-Wed Jan 31 10:19:41 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * win32.c: Deleted.
- * config.table (i386-*-win32): Deleted.
- * config/mh-i386win32: Deleted.
-
-Thu Jan 18 11:34:17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * cplus-dem.c (cplus_demangle_opname): Change opname parameter to
- const char *.
- (cplus_mangle_opname): Change return type and opname parameter to
- const char *. Don't cast return value.
-
-Tue Jan 16 12:13:11 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.c: Include Timer.h, in order to get m68k Microseconds trap
- definition.
-
-Wed Jan 3 13:15:04 1996 Fred Fish <fnf@cygnus.com>
-
- * obstack.c: Update copyright to 1996.
- (_obstack_memory_used): Define new function. Called via
- obstack_memory_used macro.
-
-Thu Dec 28 11:39:40 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * xstrdup.c: New file.
- * Makefile.in (CFILES): Add xstrdup.c.
- (REQUIRED_OFILES): Add xstrdup.o.
- (xstrdup.o): New target.
-
-Mon Dec 11 18:18:52 1995 Mike Stump <mrs@cygnus.com>
-
- * atexit.c: New stub to provide atexit on systems that have
- on_exit, like SunOS 4.1.x systems.
- * functions.def (on_exit, atexit): Ditto.
-
-Mon Dec 11 15:42:14 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.c (mpw_abort): Remove decl.
- (mpw_access): Move debugging printf.
-
-Sat Dec 2 01:25:23 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * config.table: Consistently use ${host} rather than ${xhost} or
- ${target}.
- * configure.in: Don't bother to set ${xhost} before calling
- config.table.
-
-Tue Nov 28 14:16:57 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
-
- * Makefile.in (.c.o): Use test instead of the left bracket, to
- avoid problems with some versions of make.
-
-Tue Nov 28 11:45:17 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Fix INCDIR edit to work with Nov 14 change.
-
-Tue Nov 21 11:26:34 1995 Fred Fish <fnf@rtl.cygnus.com>
-
- * config/mh-hpux: Remove. It was only used to define EXTRA_OFILES,
- which was set to just alloca.o, which is now automatically marked
- as needed by the autoconfiguration process.
-
-Tue Nov 21 14:15:06 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * config.table: Check ${with_cross_host} rather than comparing
- ${host} and ${target}.
-
-Thu Nov 16 14:34:42 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: If with_target_subdir is empty, set xhost to
- ${host} rather than ${target} before calling config.table.
-
-Tue Nov 14 01:38:30 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (MULTITOP): Deleted.
- (MULTISRCTOP, MULTIBUILDTOP): New.
- (FLAGS_TO_PASS): Delete INCDIR.
- (INCDIR): Add $(MULTISRCTOP).
- (install_to_libdir): Add $(MULTISUBDIR). Call $(MULTIDO).
- * configure.in: Delete call to cfg-ml-com.in. Call config-ml.in
- instead of cfg-ml-pos.in.
- (cross-compile check): Change to test for with_target_subdir.
- (EXTRA_LINKS): Delete.
-
-Sun Nov 12 12:13:04 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Add getpagesize.c.o to needed-list.
- * mpw.c [USE_MW_HEADERS]: Conditionalize compiling of
- functions that are supplied by Metrowerks libraries.
- (fstat): Clean up descriptor->pointer conversion code.
- (InstallConsole, etc): Empty definitions, for when linking
- with SIOUX.
-
-Sun Nov 5 19:25:27 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * Makefile.in (FLAGS_TO_PASS): Also pass PICFLAGS.
- (.c.o): Stylistic change.
-
-Thu Nov 2 12:06:29 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * strtol.c, strtoul.c: Don't include <stdlib.h>. From
- phdm@info.ucl.ac.be (Philippe De Muyter).
-
-Wed Nov 1 11:59:36 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Correct sed call.
-
-Mon Oct 30 13:03:45 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * configure.in: Clean up / simplify for native.
-
- * configure.in: Merge in stuff from ../xiberty/configure.in.
- * Makefile.in (CC): Add definition (so it can be overrridden
- by ../configure).
-
-Tue Oct 24 17:57:27 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.sed: Leave strerror.c.o in standard list of functions.
- * mpw.c (R_OK, ENOENT, EACCESS, ENOSYS): Remove.
- (link): Remove useless definition with error return.
- (last_microseconds, warn_if_spin_delay, record_for_spin_delay):
- Use UnsignedWide type for microsecond counts.
-
-Thu Oct 19 10:52:07 1995 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * memcmp.c (memcmp): Argument types are const void *, not void
- *const.
-
- * strncasecmp.c (strncasecmp): Include ansidecl.h/stdarg.h, not
- sys/types.h.
- * strcasecmp.c (strcasecmp): Ditto.
-
-Tue Oct 10 11:03:24 1995 Fred Fish <fnf@cygnus.com>
-
- * Makefile.in (BISON): Remove macro.
-
-Tue Sep 26 15:06:46 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * Makefile.in (HFILES): Add default empty definition.
- * mpw-config.in (config.h): Only update if changed.
- * mpw-make.in: Remove.
- * mpw-make.sed: New file, edits Makefile.in into MPW makefile.
- * mpw.c: Remove semi-clone of strerror code.
- (sys_nerr, sys_errlist): Define here.
- (Microseconds): Only define as A-line trap if m68k Mac.
-
-Wed Sep 20 12:53:32 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (maintainer-clean): New synonym for distclean.
-
-Mon Aug 28 19:47:52 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * config.table: For host, generalize rs6000-ibm-aix*
- to *-ibm-aix* so we also include powerpc.
-
-Tue Aug 22 03:18:05 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- Fri Jun 16 18:35:40 1995 Pat Rankin (rankin@eql.caltech.edu)
-
- * xstrerror.c: New file.
- * Makefile.in, vmsbuild.com: Compile it.
-
-Mon Jul 31 12:16:32 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * config.table (i386-*-win32): New.
-
-Fri Jul 21 11:35:52 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (MULTITOP): New variable.
- (MULTIDIRS, MULTISUBDIR, MULTIDO, MULTICLEAN): Likewise.
- (all): Add multilib support.
- (install_to_tooldir, *clean): Likewise.
-
-Mon Jul 10 11:47:27 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * makefile.dos (OBJS): Add hex.o. From DJ Delorie.
-
-Fri Jun 30 17:28:59 1995 Pat Rankin (rankin@eql.caltech.edu)
-
- * vmsbuild.com: create "new-lib.olb", build libiberty under that
- name, and then make it become "liberty.olb" when done, so that an
- incomplete build attempt never leaves behind something which looks
- like a complete library.
-
-Thu Jun 29 00:22:02 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * config/mh-i386pe: New file for PE hosts.
- * config.table: Understand PE hosts.
-
-Wed Jun 28 19:13:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * cplus-dem.c: Update from gcc.
-
- * argv.c, dummy.c: If __STDC__, #include "alloca-conf.h" after
- <stddef.h>.
- * alloca-norm.h: If __STDC__, declare alloca with its parameter.
-
-Thu Jun 22 18:57:47 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-make.in (ALL_CFLAGS): Define NEED_basename.
- * mpw.c: Only test DebugPI once whenever printing debug info.
- (mpwify_filename): If filename is /tmp/foo, change it into :_foo,
- also fix to not write on input filename buffer.
- (mpw_access): Use stat() instead of open(), works for directories
- as well as files.
-
-Mon Jun 19 00:33:22 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * Makefile.in: Massage broken shells that require 'else true'.
-
-Sat Jun 17 23:21:58 1995 Fred Fish <fnf@cygnus.com>
-
- * alloca-norm.h: Declare alloca as type "PTR" to match functions.def.
- Declare __builtin_alloca in the sparc case, as argv.c did.
- * argv.c: Replace inline version of alloca-norm.h at start of file with
- a #include of alloca-conf.h. Precede it with an include of ansidecl.h
- because alloca-norm.h needs to declare alloca as "PTR".
-
-Mon Jun 12 14:24:26 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * win32.c: New file.
-
-Fri Jun 9 15:16:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * dummy.c: #include "alloca-conf.h".
-
-Wed Jun 7 11:46:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * Makefile.in (mostlyclean): Remove stamp-picdir.
- (clean): Don't.
-
-Mon Jun 5 18:46:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * config.table (frags): Use toplevel pic frags.
-
- * Makefile.in (PICFLAG): New macro.
- (all): Depend on stamp-picdir.
- (needed-list): Ditto.
- (.c.o): Also build pic object.
- (stamp-picdir): New rule.
- (mostlyclean): Remove pic.
- (clean): Remove stamp-picdir.
-
-Fri Mar 24 16:55:48 1995 Pat Rankin (rankin@eql.caltech.edu)
-
- * vmsbuild.com (config.h): Add `#define NEED_basename'.
-
-Tue May 23 10:12:46 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * clock.c, getopt.c, strtod.c, vsprintf.c: Change from using LGPL
- to libio-style copyright.
- * getpagesize.c: Remove FSF copyright.
-
-Sat May 20 12:30:23 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- Added improved VMS support from Pat Rankin:
-
- Fri Mar 17 18:40:36 1995 Pat Rankin (rankin@eql.caltech.edu)
-
- * vmsbuild.com: new file.
-
- * getpagesize.c (getpagesize): implement for VMS;
- * strerror.c (strerror, strerrno, strtoerrno): add rudimentary
- support for EVMSERR.
-
-Thu May 18 17:01:42 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
-
- * floatformat.c (floatformat_arm_ext): Define.
-
-Tue May 16 13:30:59 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * basename.c, bcmp.c, getcwd.c, insque.c, rename.c, sigsetmask.c,
- strerror.c, strsignal.c: Remove FSF copyright.
- * sigsetmask.c: #include <sys/types.h> - seems to be needed by ISC.
-
-Mon May 15 19:53:17 1995 Per Bothner <bothner@kalessin.cygnus.com>
-
- * bcopy.c, bzero.c, memcmp.c, memcpy.c, memset.c, strchr.c,
- strrchr.c, strstr.c, vfork.c: Remove FSF Copyright, because this
- might contaminate libstdc++ with the LGPL. (OK'd by RMS 11 Oct 94.)
- * strchr.c, strrchr.c: Add cast to suppress const warning.
-
-Thu May 4 14:36:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * cplus-dem.c: Use const instead of CONST. Don't include
- ansidecl.h directly.
-
-Wed Apr 19 01:30:27 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * cplus-dem.c: Don't include libiberty.h. Do declare xmalloc and
- xrealloc.
- (-DMAIN): Don't rely on an externally-defined version number;
- instead, require the version number to be defined as a
- preprocessor macro. Handle the RS/6000 leading dot. Define
- xmalloc, xrealloc and fatal. Don't strip a leading underscore
- if we couldn't demangle the word.
-
-Tue Apr 4 13:03:51 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- (Old mpw.c change descriptions retained for informational value.)
- * mpw.c (warning_threshold): Default to .4 sec.
- (overflow_count, current_progress): New globals.
- (warn_if_spin_delay): Include current progress type,
- such as program name, in message.
- (mpw_start_progress): Set current_progress variable from arg.
- (mpw_end_progress): Report spin delays by power-of-two-size
- buckets instead of constant-size buckets.
-
- * mpw.c: Clean up formatting, types, returns, etc.
- (ENOSYS): Define.
- (mpw_fread, mpw_fwrite): Define.
- (sleep): Define correctly.
-
- * mpw.c: New code to implement cursor spinning support.
- (umask): New function.
- (mpw_fopen, mpw_fseek, stat, fstat): Call PROGRESS.
-
- * mpw.c (mpw_basename, mpw_mixed_basename): New functions, find
- basenames for MPW and MPW/Unix filenames.
- (mpw_special_init): New function, calls Macsbug if desired.
-
- * mpw.c: Add GPL notice.
- (mpwify_filename): Add more transformations.
- (mpw_fopen): Call mpwify_filename on file names.
- (rename): Remove.
- (chdir, getcwd): Add simple definitions.
-
- * mpw.c: Random cleanups, remove unused code bits.
- Added copy of strerror.c for gcc's use.
- (stat, fstat, _stat): New versions based on Guido van Rossum code.
-
- * mpw.c (mpw_fseek): Make it work correctly when doing SEEK_CUR.
-
- * mpw.c (stat): Remove hack definition, get from sys/stat.h.
- (fork, vfork, etc): Print error messages if called.
- (getrusage, sbrk, environ, isatty, link, utime, mkdir, rmdir,
- rename, chown): Define.
-
- * mpw-config.in: New file, MPW version of configure.in.
- * mpw-make.in: New file, MPW version of Makefile.in.
- * mpw.c: New file, MPW compatibility routines.
-
-Fri Mar 24 14:10:30 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * basename.c: Include config.h before checking for NEED_basename.
-
-Thu Mar 23 19:09:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * functions.def: Add DEFFUNC for basename.
-
- * basename.c: Only define basename if NEED_basename.
-
-Thu Mar 16 13:36:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * config.table: Fix --enable-shared logic for native builds.
-
-Mon Mar 13 11:05:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * cplus-dem.c (demangle_template): Demangle bool literals properly.
-
-Mon Mar 6 23:57:28 1995 Stu Grossman (grossman@cygnus.com)
-
- * strtol.c strtoul.c: Replace these with less buggy versions from
- NetBSD. (strtoul in particular couldn't handle base 16.)
-
-Wed Mar 1 15:59:01 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * config/mt-vxworks5 (HDEFINES): Define NO_SYS_PARAM_H.
-
- * clock.c: If NO_SYS_PARAM_H is defined, don't include
- <sys/param.h>.
- * getcwd.c, getpagesize.c, getruntime.c: Likewise.
-
-Fri Feb 17 15:40:55 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * getruntime.c (get_run_time): Don't assume that CLOCKS_PER_SEC is
- a number; ANSI appears to permit any expression, including a
- function call.
-
- * config.table (*-*-vxworks5*): Use mt-vxworks5 when configuring
- xiberty.
- * config/mt-vxworks5: New file.
-
-Thu Feb 9 14:19:45 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * basename.c (basename): Change argument to be const.
-
-Wed Feb 8 18:06:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * Makefile.in (lneeded-list): Don't worry about xmalloc.
-
-Sun Jan 15 00:40:36 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * Makefile.in (distclean): Delete xhost-mkfrag.
-
-Thu Jan 12 16:54:18 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * Makefile.in (lneeded-list): If alloca.o is needed, so is xmalloc.o.
-
-Wed Jan 11 22:39:56 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * hex.c: New file.
- * Makefile.in (REQUIRED_OFILES, CFILES): List it.
- (hex.o): Add dependencies.
-
- * cplus-dem.c (demangle_prefix): For GNU style constructor and
- destructor names, try demangling the remainder of the string.
-
-Wed Dec 28 00:49:15 1994 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
-
- * vasprintf.c (int_vasprintf): New static function.
- (vasprintf): Use int_vasprintf. Removes assumption that va_list
- is assignment compatible.
-
-Sat Nov 5 19:29:12 1994 Jason Merrill (jason@phydeaux.cygnus.com)
-
- * Makefile.in (LIBCFLAGS): New variable.
- (FLAGS_TO_PASS): Pass it.
- (.c.o): Use it.
-
-Thu Nov 3 19:09:47 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * getopt.c, getopt1.c: Do compile these functions under Linux,
- since many native versions are based on glibc but are buggy.
-
-Mon Oct 24 15:16:46 1994 Per Bothner <bothner@kalessin.cygnus.com>
-
- * vasprintf.c: Make 'format' arg be const, to avoid a mismatch
- with prototype in GNU libc. Support stdarg.h as well as varargs.h.
-
-Tue Oct 11 17:48:27 1994 Jason Merrill (jason@phydeaux.cygnus.com)
-
- * Makefile.in (REQUIRED_OFILES): Add vasprintf.o.
- * functions.def: Remove vasprintf.
-
-Wed Sep 14 17:04:55 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * xmalloc.c (first_break): New static variable.
- (xmalloc_set_program_name): Record sbrk (0) in first_break.
- (xmalloc): If memory allocation fails, try to report how much
- memory was allocated by the program up to this point.
- (xrealloc): Likewise.
-
-Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
- * Makefile.in (ERRORS_CC): New variable, defaulted to $(CC). Use it
- when linking dummy.
- * config.table: Add host RISCiX Makefile frag.
- * config/mh-riscix: New file.
-
-Thu Aug 25 17:29:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * Makefile.in (FLAGS_TO_PASS): Define.
- ($(RULE1)): Use $(FLAGS_TO_PASS).
-
-Wed Aug 24 17:08:47 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * vasprintf.c: Include <string.h>.
- (vasprintf): Add casts to void for va_arg to avoid gcc warnings.
- * xatexit.c: Declare malloc.
-
-Fri Aug 19 15:29:12 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * cplus-dem.c (demangle_args): Fix a bug in previous patch (the
- one below).
-
-Thu Aug 18 14:37:14 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * cplus-dem.c (demangle args): Handle ARM repeat encoding where
- the type index is greater than 9.
-
-Wed Aug 17 16:13:49 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * cplus-dem.c (demangle_qualified): accept optional '_' between
- qualified name. This is baecause the template name may end with
- numeric and can mixed up with the length of next qualified name.
-
-Wed Aug 3 05:52:14 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
-
- * config/mt-sunos4: Use our standard location for cross-includes
- and cross-libs when the target is also a "host" environment (ie no
- newlib; includes and such don't belong to us). This is specific
- to the Cygnus Support environment.
-
-Tue Aug 2 15:25:12 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * cplus-dem.c (demangle_template): demangle as xxx<'Q'> not
- xxx<ch=81>.
-
-Mon Aug 1 17:02:48 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * cplus-dem.c (main): flush stdout to make pipe work.
-
-Sat Jul 16 12:56:32 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * config.table (*-*-cxux7*): Recognize.
- * floatformat.c (floatformat_m88110_ext) [HARRIS_FLOAT_FORMAT]:
- Harris-specific float format.
- * config/mh-cxux7: New file.
-
-Wed Jun 29 00:26:17 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * cplus-dem.c (demangle_template): Make sure that the result of
- consume_count doesn't index beyond the end of the string.
-
-Mon Jun 20 23:54:37 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * cplus-dem.c (gnu_special): Handle vtable mangling of gcc-2.4.5 and
- earlier. Improve test for new vtable mangling. Change output back
- to `virtual table'.
-
-Mon Jun 20 11:37:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * obstack.c: Always compile this code, even if using the GNU
- library. Avoids problems with relatively recent binary
- incompatibility.
-
-Thu Jun 16 17:54:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * cplus-dem.c: Include libiberty.h.
- (xmalloc, xrealloc, free): Don't declare.
- (strstr): Don't declare parameters.
- (xmalloc, xrealloc): Don't define.
- (long_options): Add no-strip-underscores.
- (main): Call xmalloc_set_program_name. Pass n in short options to
- getopt_long. Handle option 'n' to not strip underscores.
- (usage): Mention -n and --no-strip-underscores.
-
-Sun Jun 12 01:37:09 1994 Jason Merrill (jason@deneb.cygnus.com)
-
- * cplus-dem.c (demangle_template): Separate consecutive >'s with a
- space.
- (gnu_special): Demangle template and qualified names in a vtable name.
-
-Fri May 27 12:27:52 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- From gas-2.3 and binutils-2.4 net releases:
-
- Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
-
- * makefile.dos: [new] Makefile for dos/go32
- * configure.bat: update for latest files
- * msdos.c: remove some functions now in libc.a
-
-Fri May 20 18:53:32 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * cplus-dem.c (gnu_special): Recognize thunks, as well as
- the new naming style for vtables (when -fvtable-thunks).
-
-Wed May 18 13:34:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in (XTRAFLAGS): Don't define.
- (.c.o, dummy.o): Don't use XTRAFLAGS.
- ($(RULE1)): Don't pass XTRAFLAGS down in recursive call.
-
-Fri May 13 16:02:12 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * vasprintf.c: New file.
- * Makefile.in, functions.def: Add it.
-
-Fri May 13 16:20:28 1994 Jason Merrill (jason@deneb.cygnus.com)
-
- * cplus-dem.c (demangle_fund_type): Grok bool.
-
-Fri May 6 14:44:21 1994 Steve Chamberlain (sac@cygnus.com)
-
- * config.table: Add go32
- * config/mh-go32: New template.
-
-Fri May 6 11:01:59 1994 D. V. Henkel-Wallace (gumby@rtl.cygnus.com)
-
- * config.table, config/mt-sunos4: config for when sun4 is cross target.
-
-Mon Apr 11 00:54:33 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu)
-
- * getopt.c [not __GNU_LIBRARY__] [__GCC__] [not __STDC__]:
- Declare strlen to return int. Don't include stddef.h.
-
-Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu)
-
- * getopt.c: Delete use of IN_GCC to control whether
- stddef.h or gstddef.h is included.
-
-Thu Apr 14 14:00:56 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * cplus-dem.c (demangle_signature): Fix a bug in template function
- type numbering.
-
-Wed Apr 13 17:23:03 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * cplus-dem.c (demangle_signature): Fix template function with arm
- style argument type number, Tn.
-
-Wed Apr 13 17:11:15 1994 Jason Merrill (jason@deneb.cygnus.com)
-
- * cplus-dem.c (optable): Add new[] and delete[].
-
-Fri Apr 8 11:21:42 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * argv.c (buildargv): Don't produce empty argument just because
- there is trailing whitespace.
-
-Wed Apr 6 11:42:14 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * cplus-dem.c (demangle_template): fix 'Q' qualified name bug.
- Handle 'p' same as 'P'.
- * cplus-dem.c (do_type): Handle 'p' same as 'P'.
-
-Sat Mar 26 12:00:13 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * floatformat.c (get_field, put_field): Fix off by one error in
- little endian case.
-
-Thu Mar 24 10:40:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * floatformat.c (floatformat_from_double): Pass unsigned char *,
- not char *, to put_field.
-
-Fri Mar 18 12:34:33 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * memmove.c: Re-wrote; placed in public domain.
-
-Wed Mar 16 10:33:07 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * cplus-dem.c (demangle_prefix): If ARM demangling, don't treat
- __Q* as a constructor.
-
-Mon Mar 14 12:26:02 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ieee-float.c: Removed; no longer used.
- * Makefile.in: Changed accordingly.
-
-Mon Mar 7 12:28:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * floatformat.c (get_field): Removed unused local variable i.
- (put_field): Removed unused local variable i.
-
-Sun Feb 27 21:50:11 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * floatformat.c: New file, intended to replace ieee-float.c.
- * Makefile.in: Change accordingly.
-
-Thu Feb 24 11:51:12 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * getopt.c: Remove #ifdef GETOPT_COMPAT and #if 0 code.
- (_getopt_initialize): New function, broken out of _getopt_internal.
- (_getopt_internal):
- If long_only and the ARGV-element has the form "-f", where f is
- a valid short option, don't consider it an abbreviated form of
- a long option that starts with f. Otherwise there would be no
- way to give the -f short option.
-
-Thu Feb 10 14:44:16 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu)
-
- * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC]:
- Test just __STDC__, not emacs.
-
-Wed Feb 9 00:14:00 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu)
-
- * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC]
- [emacs] [not __STDC__]: Don't include stddef.h. Don't declare strlen.
-
-Fri Dec 24 19:43:00 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu)
-
- * getopt.c (_NO_PROTO): Define before config.h is included.
-
-Mon Sep 20 15:59:03 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * getopt.c, getopt1.c [emacs || CONFIG_BROKETS]: Include
- <config.h> only under these, else "config.h".
-
-Thu Aug 12 18:16:49 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
-
- * getopt.c, getopt1.c [HAVE_CONFIG_H]: Include
- <config.h> instead of "config.h".
-
-Sun Feb 20 17:17:01 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
-
- * concat.c: Check ANSI_PROTOTYPES rather than __STDC__ to decide
- whether to use prototypes or not.
- * strerror.c (const): Never undefine; let ansidecl.h handle it.
- * strsignal.c (const): Likewise.
-
-Thu Feb 17 13:27:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * xatexit.c (_xexit_cleanup): Declare as extern; don't initialize.
- Merging common and initialized variables need not be supported by
- ANSI C compilers.
- (xatexit): Initialize _xexit_cleanup if not already set.
- * xexit.c: Comment fix.
-
-Wed Feb 16 01:15:36 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * xmalloc.c: Don't declare xexit; it's declared in libiberty.h.
- (xrealloc): If oldmem is NULL, allocate with malloc, rather than
- assuming that realloc works correctly.
-
-Tue Feb 15 09:26:16 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * concat.c, ieee-float.c: Replace inclusion of <string.h>
- with explicit function declarations, as recommended by Ian Taylor.
-
-Sat Feb 12 10:31:11 1994 David J. Mackenzie (djm@rtl.cygnus.com)
-
- * xmalloc.c (xmalloc, xrealloc): Use PTR and size_t throughout.
- (malloc, realloc): Declare.
-
-Thu Feb 10 17:08:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * argv.c, basename.c: Include ansidecl.h and libiberty.h.
- * concat.c, fdmatch.c, getruntime.c, spaces.c: Likewise.
- * strerror.c, strsignal.c, xatexit.c, xexit.c: Likewise.
- * xmalloc.c: Likewise.
- * concat.c: Don't declare xmalloc. If __STDC__, use <stdarg.h>
- macros, not <varargs.h> macros.
- * spaces.c (spaces): Make return type const. Don't crash if
- malloc returns NULL.
- * strerror.c (struct error_info): Make name and msg fields const.
- (error_names): Make const.
- (strerrno): Make const.
- (strtoerrno): Make argument const.
- * strsignal.c (struct signal_info): Make name and msg fields
- const.
- (signal_names, sys_siglist): Make const.
- (strsignal, strsigno): Make const.
- (strtosigno): Make argument const.
- * xatexit.c: Declare parameter types.
- * xmalloc.c (name): Make const.
- (xmalloc_set_program_name): Make argument const.
- * Makefile.in (INCDIR): Define.
- (.c.o): Use $(INCDIR).
- (dummy.o): Likewise.
- (argv.o, basename.o): New targets; depend on libiberty.h.
- (concat.o, fdmatch.o, getruntime.o, spaces.o): Likewise.
- (strerror.o, strsignal.o, xatexit.o, xexit.o): Likewise.
- (xmalloc.o): Likewise.
- (cplus-dem.o): New target; depend on demangle.h.
- (getopt.o, getopt1.o): New targets; depend on getopt.h.
- (ieee-float.o): New target; depend on ieee-float.h.
- (obstack.o): New target; depend on obstack.h.
-
-Tue Feb 8 05:29:08 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- Handle obstack_chunk_alloc returning NULL. This allows
- obstacks to be used by libraries, without forcing them
- to call exit or longjmp.
- * obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
- If CALL_CHUNKFUN returns NULL, set alloc_failed, else clear it.
- (_obstack_begin, _obstack_begin_1): Return 1 if successful, 0 if not.
-
-Tue Feb 8 00:32:28 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * concat.c, ieee-float.c: Include <string.h>.
-
-Sun Feb 6 21:28:46 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * xmalloc.c (xmalloc_set_program_name): New function.
- (xmalloc, xrealloc): Include the name in the error message, if set.
-
- * Replace atexit.c with xatexit.c.
- * Makefile.in (CFILES), functions.def: Change references.
-
-Sat Feb 5 14:02:32 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * getruntime.c (get_run_time): Use getrusage or times if
- HAVE_GETRUSAGE or HAVE_TIMES are defined.
-
-Fri Feb 4 15:49:38 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * atexit.c: New file.
- * Makefile.in (CFILES), functions.def: Add it.
- * xexit.c: New file.
- * Makefile.in (CFILES, REQUIRED_OFILES): Add it.
- * xmalloc.c (xmalloc, xrealloc): Call xexit instead of exit.
- Change request for 0 bytes into request for 1 byte.
-
-Wed Feb 2 11:36:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * xmalloc.c (xmalloc, xrealloc): Print size using %lu, and cast to
- unsigned long, to avoid warnings.
-
-Fri Jan 28 17:49:06 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * dummy.c: Don't include time.h ever; always define clock_t as
- "unsigned long". Until gcc/fixincludes ensures that clock_t
- exists, __STDC__ isn't a sufficient test. And if clock() doesn't
- exist, clock_t probably doesn't either.
-
-Mon Jan 24 11:52:31 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * clock.c, getruntime.c: New files.
- * Makefile.in: Add to file lists.
- * functions.def (clock): Add to list.
- * dummy.c (time.h): Add if __STDC__.
- (clock_t): #define as "unsigned long" if not __STDC__.
-
-Tue Jan 11 11:27:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * strtod.c: Declare atof. From edler@jan.ultra.nyu.edu (Jan
- Edler).
-
-Tue Dec 28 14:17:30 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in (errors): Use CFLAGS as well as LDFLAGS when
- linking.
-
-Fri Dec 17 12:26:07 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * cplus-dem.c (demangle_arm_pt): New function. Common code
- for ARM template demangling.
- * cplus-dem.c (demangle_class_name): Use demangle_arm_pt.
- * cplus-dem.c (demangle_prefix): Likewise.
-
-Tue Nov 30 15:47:48 1993 Jason Merrill (jason@deneb.cygnus.com)
-
- * cplus-dem.c (cplus_demangle_opname): Add CONST to please gcc.
-
-Sat Nov 27 11:05:50 1993 Fred Fish (fnf@cygnus.com)
-
- Merge changes from tom@basil.icce.rug.nl (Tom R.Hageman)
- * strerror.c, strsignal.c: As a small space optimization, don't
- include messages when they aren't actually used.
-
- Merge changes from takefive.co.at!joe (Josef Leherbauer)
- * cplus-dem.c (demangle_prefix, demangle_function_name,
- cplus_demangle_opname): Fixes for systems where cplus_marker
- is something other than '$'.
-
-Fri Nov 26 13:51:11 1993 Per Bothner (bothner@kalessin.cygnus.com)
-
- * waitpid.c: Simple-minded approcimation to waitpid
- using vanilla wait.
- * functions.def, Makefile.in: Update accordingly,
-
-Thu Nov 18 18:01:15 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * cplus-dem.c(demangle_template): fix bug template instantiation
- with value of user defined type.
-
-Wed Nov 17 18:30:21 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * cplus-dem.c(cplus_demangle_opname): add the subject new function
- to support unified search of operator in class.
-
-Wed Nov 10 09:47:22 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- gcc -Wall lint:
- * strtoul.c (strtoul): use "(digit = *s) != '\0'" not just
- "digit = *s" as condition in while loop.
-
-Tue Nov 9 15:52:22 1993 Mark Eichin (eichin@cygnus.com)
-
- * Makefile.in: pass SHELL to recursive make
-
-Thu Nov 4 12:09:26 1993 Per Bothner (bothner@kalessin.cygnus.com)
-
- * vfprintf.c, vprintf.c, vsprintf.c: Make format arg
- be (const char*), for ANSI (and gcc w/fixproto) consistency.
-
-Thu Nov 4 08:29:04 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config.table: Make *-*-hiux* use mh-hpux.
-
-Fri Oct 22 07:53:15 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * config.table: Add * to end of all OS names.
-
-Tue Oct 19 17:12:01 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * Makefile.in (lneeded-list): ensure that object file names are
- not duplicated, as multiple instances of the same object file in
- a library causes problems on some machines
-
-Mon Oct 18 21:59:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * strcasecmp.c, strncasecmp.c: Change u_char to unsigned char.
-
-Fri Oct 15 22:17:11 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * strncasecmp.c: new file, implements strncasecmp
- * strcasecmp.c: new file, implement strcasecmp
-
- * Makefile.in (CFILES): list these two new source files
-
- * functions.def: add strcasecmp and strncasecmp entries
-
-Fri Oct 15 14:53:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * strtoul.c (strtoul), strtol.c (strtol): Handle overflow
- according to ANSI C.
-
-Thu Oct 14 16:34:19 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * cplus-dem.c: add support of ARM global constructor/destructor,
- and 'G' for passing record or union in parameter.
-
-Wed Oct 13 13:36:19 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in: Fix comment to clarify that stuff in REQUIRED_OFILES
- should not be in functions.def.
-
-Wed Oct 13 13:13:38 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * functions.def: Removed xmalloc. Stuff in REQUIRED_OFILES should
- not be in functions.def.
-
-Mon Oct 4 18:26:39 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * cplus-dem.c: change globl constructor/destructor to proper name
-
-Tue Sep 28 18:11:07 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * cplus-dem.c: fix bug in constructor/destructor
-
-Tue Sep 28 16:20:49 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * cplus-dem.c: support both old and new _vt$... vtbl mangled names
-
-Fri Sep 24 19:07:16 1993 Jason Merrill (jason@deneb.cygnus.com)
-
- * cplus-dem.c: Fix demangle_template prototype
-
-Fri Sep 24 17:32:55 1993 Kung Hsu (kung@cirdan.cygnus.com)
-
- * cplus-dem.c: fix template demangling
- * cplus-dem.c: fix const type demangling
- * cplus-dem.c: fix constructor/destructor, virtual table,
- qualifier, global constructor/destructor demangling
-
-Wed Sep 1 23:13:11 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * strsignal.c, strerror.c: Use fully-bracketed initializer to
- keep gcc -Wall happy.
-
-Fri Aug 27 10:30:09 1993 Jason Merrill (jason@deneb.cygnus.com)
-
- * cplus-dem.c (do_type): Add CONSTS to make gcc happy with last
- patch.
-
-Fri Aug 27 11:24:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- Patch from Paul Flinders:
- * cplus-dem.c (do_type): Deal with arrays.
-
-Tue Aug 24 14:23:50 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * cplus-dem.c (demangle_qualified: Deal with GNU format for more
- than 9 classes.
-
-Wed Aug 18 19:50:29 1993 Jason Merrill (jason@deneb.cygnus.com)
-
- * Makefile.in (dummy.o): Redirect to /dev/null to avoid "variable
- not initialized" warnings under HP/UX
-
-Sun Aug 15 20:42:40 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * strerror.c: Move include of stdio.h after sys_errlist #define.
- Also remove NULL definition (stdio.h always defines NULL, so it
- never did anything but clutter up the code).
-
-Sat Aug 14 14:21:49 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * Makefile.in, functions.def: handle xmalloc.c
-
- * xmalloc.c: provide xmalloc and xrealloc functions
-
-Thu Aug 12 17:38:57 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * cplus-dem.c: Fix a comment.
-
-Sat Aug 7 13:56:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * getopt1.c: Declare const the way getopt.c does.
-
-Fri Aug 6 17:03:13 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * obstack.c, alloca.c: Update from FSF.
- * getopt.c, getopt1.c: Update to current FSF version, which
- doesn't use alloca.
-
-Tue Jul 27 14:03:57 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
-
- * Makefile.in (demangle): Add the target with a message saying
- where demangle went.
-
-Mon Jul 26 15:49:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * Makefile.in: Remove obsolete `demangle' target.
-
-Thu Jul 22 08:31:01 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * cplus-dem.c (arm_special): Apply patch from arg@lucid.com to
- avoid infinite loop on vtbl symbols with disambiguating "junk"
- tacked on the end.
-
-Mon Jul 19 14:10:37 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * strsignal.c: work around some systems losing definitions of
- sys_siglist
-
- * config/mh-lynxos: this system has a losing definition of
- sys_siglist
-
- * config.table: use mh-lynxos for *-*-lynxos
-
-Mon Jul 19 17:08:52 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
-
- * config.table: Add support for HPPA BSD hosts.
-
- * config/mh-hpbsd: New file.
-
-Mon Jul 12 18:00:40 1993 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in (TAGS): make work when srcdir != objdir.
-
-Sun Jun 27 15:35:31 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * cplus-dem.c (main): Add long options, including --help and
- --version.
- (usage): New function from code in main.
-
-Tue Jun 22 11:37:38 1993 Per Bothner (bothner@deneb.cygnus.com)
-
- * config.table: New shell scipt, sourced by both ./configure,in
- and ../xiberty/configure.in, to avoid maintainance lossages.
- * configure.in and ../xiberty/configure.in: Use config.table.
-
- * configure.in: Don't use mh-aix for AIX 3.2, only for 3.1.
- * configure.in: Map *-*-irix* (except irix4) to mh-sysv.
- * ../xiberty/configure.in: Update from ./configure.in.
-
-Tue Jun 15 17:05:31 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: remove parentdir support
-
-Wed May 26 12:59:09 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * cplus-dem.c (xrealloc): Match definition with prototype.
-
-Tue May 25 14:27:51 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * cplus-dem.c (demangle_prefix): Demangle cfront
- local variables as an extension to ARM demangling.
-
-Fri May 21 09:53:57 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * ieee-float.c: Don't require pointers to double to be aligned.
-
-Tue May 18 17:12:10 1993 Fred Fish (fnf@cygnus.com)
-
- (merge changes from dlong@cse.ucsc.edu)
- * cplus-dem.c (consume_count): Simplify.
- * cplus-dem.c (arm_pt, demangle_class_name): New functions.
- * cplus-dem.c (various): Calls to arm_pt, demangle_class_name.
-
- * cplus-dem.c (xmalloc, xrealloc, strstr): Make extern decls into
- full prototypes.
- * cplus-dem.c (free): Add prototype.
- * cplus-dem.c (optable): Fully bracketize initializer.
-
-Fri May 14 17:13:05 1993 Per Bothner (bothner@cygnus.com)
-
- * cplus-dem.c: Whether initial underscores are stripped
- depends on the external variable prepends_underscore
- (which is generated by the binutils Makefile).
-
-Fri May 14 07:32:20 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * cplus-dem.c (mop_up, arm_special): Remove some unused variables.
-
-Tue May 4 20:31:59 1993 Fred Fish (fnf@cygnus.com)
-
- * cplus-dem.c (consume_count): Return zero if arg does not
- start with digit, and don't consume any input.
-
-Tue May 4 08:10:28 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * Makefile.in (demangle): Use ${srcdir} not $^.
-
- * strtod.c: New file, needed at least for BSD 4.3.
-
-Sun May 2 11:30:42 1993 Fred Fish (fnf@cygnus.com)
-
- * strsignal.c (sys_siglist): For ANSI compilations, type is
- "const char *const". Also remove conditionalization on __STDC__
- since const is defined away for non-ANSI.
-
-Wed Apr 28 19:29:55 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * configure.in: Recognize *-*-hpux.
- * config/mh-hpux: New file.
-
-Tue Apr 27 15:22:19 1993 Per Bothner (bothner@cygnus.com)
-
- * tmpnam.c: Added ANSI tmpnam() function.
- * functions.def, Makefile.in: Update accordingly.
-
-Tue Apr 27 13:38:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * cplus-dem.c (demangle_function_name): Get the demangling of
- stop__1A right.
-
-Fri Apr 16 23:48:24 1993 Jim Kingdon (kingdon at calvin)
-
- * cplus-dem.c: Declare strstr return type.
-
-Fri Mar 26 12:01:26 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * strsignal.c: Add some AIX signals.
-
-Thu Mar 25 15:17:23 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (MAKEOVERRIDES): Define to be empty.
-
-Wed Mar 24 01:59:25 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com)
-
- * Makefile.in: add installcheck & dvi targets
-
-Thu Mar 18 14:05:44 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * ieee-float.c: New file, moved from ../gdb (since it is
- needed by ../opcode/m68k-dis.c).
-
-Tue Mar 2 17:47:31 1993 Fred Fish (fnf@cygnus.com)
-
- * cplus-dem.c: Replace all references to cfront with ARM.
-
-Fri Feb 26 00:17:07 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * cplus-dem.c: Fix main program (when compiled with -DMAIN)
- to be more useful as a filter.
-
-Sat Feb 20 21:41:39 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
-
- * Makefile.in (install_to_libdir, install_to_tooldir): Go into the
- destination directory before running $(RANLIB), in case that
- program tries to create a file in the current directory as part of
- its work.
-
-Thu Feb 18 23:00:19 1993 John Gilmore (gnu@cygnus.com)
-
- * strsignal.c (sys_siglist): Remove yet another *%^&%&$# "const"
- because BSD 4.4 lacks one. Isn't this fun?
-
-Thu Feb 18 11:24:25 1993 Fred Fish (fnf@cygnus.com)
-
- * cplus-dem.c (demangle_signature): Set func_done after
- demangling a template.
- * cplus-dem.c (demangle_template): Fix several small bugs
- in demangling GNU style templates.
- * cplus-dem.c (demangle_prefix): Fix for templates in GNU
- style constructors.
- * cplus-dem.c (gnu_special): Fix for templates in GNU style
- static data members.
-
-Tue Feb 16 17:28:35 1993 Fred Fish (fnf@cygnus.com)
-
- * cplus-dem.c (demangle_signature): Modify to include type
- modifiers like static and const in remembered types.
-
-Thu Feb 11 22:20:47 1993 Fred Fish (fnf@cygnus.com)
-
- * cplus-dem.c (demangled_qualified): Add new parameter that tells
- whether to prepend or append the qualifiers.
- * cplus-dem.c (string_prepends): Used now, remove #if 0.
- * cplus-dem.c (demangle_signature): Call demangle_qualified
- with prepending.
- * cplus_dem.c (gnu_special): Recognize static data members that
- use qualified names.
- * cplus-dem.c (demangle_qualified): Accumulate qualifiers in a
- temporary buffer and the prepend or append them to the result,
- as specified by the new "append" flag.
- * cplus-dem.c (do_type): Call demangled_qualified with
- appending.
-
-Mon Dec 28 10:47:19 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * strsignal.c (signal_table): Now const.
- (init_signal_tables): Variable eip now points to const.
-
- * strerror.c (error_table): Now const.
- (init_error_tables): Variable eip now points to const.
-
-Tue Dec 15 15:36:50 1992 Per Bothner (bothner@cygnus.com)
-
- * memchr.c (memchr): New (ANSI standard) function.
- * Makefile.in, functions.def: Added memchr.
- * Makefile.in (AR_FLAGS): Use rc instad of non-standard cq.
-
-Wed Dec 2 22:49:10 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * getopt.c: remove use of USG around <alloca.h>, which never meant
- anything anyway
-
- * config/mh-{aix,apollo68,ncr3000,sysv,sysv4}: removed definitions
- of USG and USGr4
-
-Thu Nov 19 03:09:33 1992 Brendan Kehoe (brendan@lisa.cygnus.com)
-
- * cplus-dem.c (demangle_fund_type): Recognize `w', a wide character;
- it's now a type according to the ANSI X3J16 working paper; output
- "wchar_t" for it.
- (demangle_template): Accept `w' as an integral type.
- (xmalloc, xrealloc): Use `char *', not `PTR'. Cast calls to their
- counterparts malloc and realloc to `char *'.
- (main): Exit with a 0 status.
- * Makefile.in (demangle): Don't expect the user to define
- DEMANGLE, instead force to be cplus-dem.c. Look in $(srcdir)/../include
- for demangle.h. Pass it any HDEFINES or XTRAFLAGS.
-
-Wed Nov 18 18:56:20 1992 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in (AR_FLAGS): Avoid verbosity.
- * config/mh-sysv4: Remove AR_FLAGS override, use INSTALL=cp,
- replace USGr4 with HAVE_SYSCONF.
- * config/mh-solaris: Remove; mh-sysv4 works now.
- * getpagesize.c: Replace USGr4 with HAVE_SYSCONF.
- * configure.in: Simplify host matching table, remove separate
- solaris config file.
-
-Sun Nov 15 09:35:16 1992 Fred Fish (fnf@cygnus.com)
-
- * configure.in (i[34]86-*-solaris2*): Add, use mh-sysv4.
-
-Tue Nov 3 21:27:03 1992 Brendan Kehoe (brendan@cygnus.com)
-
- * cplus-dem.c (xmalloc, xrealloc): Add decls.
- (remember_type): Don't cast xmalloc.
- (string_need): Likewise; don't cast xrealloc either.
-
-Fri Oct 23 08:52:01 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in, functions.defs, rename.c: added simple
- implementation of rename, since some binutils programs use it.
-
-Thu Oct 15 15:18:22 1992 Per Bothner (bothner@cygnus.com)
-
- * strsignal.c: Add appropriate 'const' to sys_siglist
- extern declaration (if __STDC__). (Needed for Linux.)
- * strsignal.c (strsignal): Add cast to remove const-ness.
-
-Fri Oct 9 03:22:55 1992 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in (needed.awk, needed2.awk): Remove erroneous \'s
- before "'s, diagnosed by BSD 4.4 awk.
-
-Thu Oct 8 15:25:12 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: create config.h and needed-list through $(CONFIG_H)
- and $(NEEDED_LIST), to give some hooks for xiberty.
-
-Thu Oct 1 23:31:42 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * configure.in: use cpu-vendor-triple instead of nested cases
-
-Wed Sep 30 11:26:59 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in, argv.c, basename.c, bcmp.c, bcopy.c, bzero.c,
- concat.c, cplus-dem.c, fdmatch.c, getcwd.c, getopt.c, getopt1.c,
- getpagesize.c, insque.c, memcmp.c, memcpy.c, memmove.c, memset.c,
- obstack.c, sigsetmask.c, spaces.c, strchr.c, strerror.c,
- strrchr.c, strsignal.c, strstr.c, vfork.c, vsprintf.c:
- Convert from using GPL to LGPL.
-
-Sat Sep 26 04:01:30 1992 John Gilmore (gnu@cygnus.com)
-
- * Makefile.in (errors): Leave dummy.o and dummy around so that
- we can see how the needed list was generated (it's sometimes wrong).
- (mostlyclean): Remove them.
-
-Mon Sep 21 14:50:42 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * getcwd.c: supply a default if MAXPATHLEN is not defined.
-
- * config/mh-irix4: set EXTRA_OFILES to alloca.o, from WRS.
-
-Wed Sep 9 12:41:48 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: Use XTRAFLAGS when compiling, so that xiberty works
- when cross-compiling.
-
-Thu Sep 3 13:29:39 1992 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * cplus-dem.c: (demangle_prefix): reduction in strength of strstr
- as a time optimization.
-
- * cplus-dem.c (cplus_demangle): remove strpbrk test. Appears to
- be more expensive than simply demangling.
-
- * cplus-dem.c (cplus_match): new function.
-
-Tue Sep 1 15:24:04 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * cplus-dem.c: #include <stdio.h>, to define NULL.
- Define current_demangling_style.
-
-Sun Aug 30 17:58:19 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * cplus-dem.c: New file, moved from ../gdb.
- * cplus-dem.c (set_cplus_marker_for_demangling): New exported
- function, to avoid compiling in target-dependency for CPLUS_MARKER.
- * cplus-dem.c (cplus_demangle): Allow demangling style option
- to be passed as a parameter, but using the global variable
- current_demangling_style as a default.
- * Makefile.in: Update for cplus-dem.c
-
-Sat Aug 29 10:44:09 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.c: Merge in comment changes from FSF version. Now
- matches the FSF version exactly.
-
-Fri Aug 28 18:39:08 1992 John Gilmore (gnu@cygnus.com)
-
- * obstack.c (CALL_FREEFUN): Can't use ?: with void values (at
- least on losing DECstations!); use if-then-else instead.
-
-Wed Aug 19 14:40:34 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: always create installation directories.
-
-Mon Aug 10 17:33:40 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * Makefile.in: clean up definition of CFILES, more comments
-
-Sat Aug 8 23:10:59 1992 Fred Fish (fnf@cygnus.com)
-
- * getopt.c (my_index): Make first arg const to match strchr,
- which it sometimes is remapped to.
-
-Sat Aug 1 13:48:50 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.c (DEFAULT_ALIGNMENT): Update to match FSF version.
- * obstack.c (_obstack_begin): Initialize use_extra_arg.
- * obstack.c (_obstack_begin_1): New, from FSF version.
-
-Mon Jul 20 21:07:58 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.c (CALL_CHECKFUN, CALL_FREEFUN): Use use_extra_arg and
- extra_arg.
- * obstack.c (_obstack_begin): Remove area_id and flags arguments
- (previously added for mmalloc support, interface has changed).
- Also convert flags usage to use use_extra_arg and maybe_empty_object.
-
-Fri Jul 10 00:41:53 1992 Fred Fish (fnf@cygnus.com)
-
- * argv.c: Move expandargv inline and eliminate static variables.
- Rewrite to always allocate in powers of two. Fix to return an
- argv with a single null string arg if passed a null string.
-
-Fri Jul 3 20:27:29 1992 Fred Fish (fnf@cygnus.com)
-
- * random.c, sigsetmask.c, strerror.c, strsignal.c: Remove
- "(void)" casts from function calls where the return value is
- ignored, in accordance with GNU coding standards.
-
-Mon Jun 29 10:54:19 1992 Fred Fish (fnf at cygnus.com)
-
- * bcopy.c, strerror.c, strsignal.c: Lint.
-
-Thu Jun 25 09:18:41 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * getopt.c: merge changes from make.
-
-Thu Jun 25 04:43:22 1992 John Gilmore (gnu at cygnus.com)
-
- * alloca.c: Incorporate fixes from gdb/alloca.c.
- FIXME: Eventually move gdb's alloca configuration files here,
- and remove gdb/alloca.c and its Makefile.in support.
-
-Tue Jun 23 21:56:30 1992 Fred Fish (fnf@cygnus.com)
-
- * dummy.c: Define NOTHING to /*nothing*/, change return type
- of main to int and return zero.
- * functions.def: Supply NOTHING as the fourth arg to macros
- that don't have an explicit arg, to satisfy picky preprocessors.
-
-Wed Jun 17 18:13:58 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in: Clean up *clean rules, as per standards.texi.
-
-Tue Jun 16 16:11:59 1992 K. Richard Pixley (rich@rtl.cygnus.com)
-
- * getopt.c, getopt1.c: merged largely gratuitous, mostly
- whitespace diffs from other prep distributions.
-
-Mon Jun 15 12:25:46 1992 Fred Fish (fnf@cygnus.com)
-
- * config/mh-ncr3000 (INSTALL): Don't use /usr/ucb/install,
- it is broken on ncr 3000's.
-
-Mon Jun 15 01:03:26 1992 John Gilmore (gnu at cygnus.com)
-
- * sigsetmask.c: Rewrite. Old one was very confused about its
- arguments and result. New one can't do much, but at least knows
- what it can't do, and it's good enough for GDB's use.
-
-Sun Jun 14 15:17:40 1992 Stu Grossman (grossman at cygnus.com)
-
- * functions.def: Use proper prototype for strtoul.
-
-Fri Jun 12 19:22:40 1992 John Gilmore (gnu at cygnus.com)
-
- * Makefile.in: Add random.c.
- * config/mh-*: Use "true" rather than "echo >/dev/null" for ranlib.
- * configure.in: update solaris2 config.
-
-Wed Jun 10 16:31:29 1992 Fred Fish (fnf@cygnus.com)
-
- * random.c: Add for random() and srandom().
- * functions.def: Add random
-
-Tue Jun 9 17:27:18 1992 Fred Fish (fnf@cygnus.com)
-
- * config/{mh-ncr3000, mh-sysv4}: Add definition for INSTALL
- using /usr/ucb/install.
-
-Mon Jun 1 13:20:17 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * strerror.c: Kludge to guard against a conflict with
- possible declaration of sys_errlist in errno.h.
-
-Sun May 31 15:07:47 1992 Mark Eichin (eichin at cygnus.com)
-
- * configure.in, config/mh-solaris: add solaris2 config support.
-
-Fri May 29 17:23:23 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * sigsetmask.c: #ifdef out sigsetmask if SIG_SETMASK
- is not defined (should be defined in signal.h, says Posix.).
-
-Mon May 18 17:35:04 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.c: merged changes from make-3.62.11.
-
-Fri May 8 14:53:07 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.c: merged changes from bison-1.18.
-
-Tue May 5 11:51:40 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * Makefile.in: Don't have $(EXTRA_OFILES) depend on config.h,
- since that introduces a circular dependency.
- ($(EXTRA_OFILES) are used to build config.h.)
-
- * strtoul.c: Fixes to handle non-decimal bases better.
-
-Wed Apr 22 09:27:51 1992 Fred Fish (fnf@cygnus.com)
-
- * config/mh-ncr3000: Replace MINUS_G with CFLAGS.
- * Makefile.dos: Finish MINUS_G eradication.
- * Makefile.in (CFILES): Add strsignal.c.
- * Makefile.in (REQUIRED_OFILES): Add strerror.o strsignal.o
- * Makefile.in (needed-list): Split creation of errors file to
- separate make target.
- * Makefile.in (config.h, needed2.awk, errors): New targets.
- * Makefile.in (clean): Split to multiple lines, add needed2.awk
- and config.h.
- * dummy.c (DEFFUNC, DEFVAR): Add defines and undefs.
- * functions.def (strerror): Remove from optional list.
- * functions.def (sys_nerr, sys_errlist, sys_siglist): DEFVAR's
- * functions.def (strerror, psignal): DEFFUNC's
- * strerror.c: Rewrite from scratch to use sys_errlist only if
- available, add errno_max(), add strerrno(), add strtoerrno(),
- add test driver.
- * strsignal.c: New file, signal equivalent to strerror.c.
- Uses sys_siglist if available, defines signo_max(), strsignal(),
- strsigno(), strtosigno(), psignal(), and test driver.
-
-Mon Apr 20 20:49:32 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in: do not print recursion line.
-
- * Makefile.in: allow CFLAGS to be passed in from command line.
- Removed MINUS_G. Default CFLAGS to -g.
-
-Mon Apr 20 12:57:46 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * config/mh-aix: New. EXTRA_OFILES lists copysign.o,
- so libg++ users don't have to be inconvenienced by a
- libc.a bug (libc.a needs copysign, but doesn't define it!).
- * configure.in: Use config/mh-aix.
- * strtoul.c: Handle '-' as required by ANSI.
- Clean up radix handling.
- * strstr.c: Fix buggy algorithm.
- * Makefile.in: Change so that ${EXTRA_OFILES} is
- appended to needed-list (which is used by libg++).
-
-Fri Apr 10 22:51:41 1992 Fred Fish (fnf@cygnus.com)
-
- * configure.in: Recognize new ncr3000 config.
- * config/mh-ncr3000: New config file.
-
-Wed Apr 1 23:31:43 1992 John Gilmore (gnu at cygnus.com)
-
- * argv.c, dummy.c: Lint.
-
-Tue Mar 31 18:46:44 1992 Fred Fish (fnf@cygnus.com)
-
- * config/mh-sysv4: New config file.
- * configure.in (host_makefile_frag): Set to config/mh-sysv4 for
- host_os == sysv4.
- * getpagesize.c: For SVR4, use sysconf(_SC_PAGESIZE) to get
- pagesize.
-
-Sun Mar 29 12:26:42 1992 John Gilmore (gnu at cygnus.com)
-
- * getopt.c: Lint.
-
-Fri Mar 27 08:32:55 1992 Fred Fish (fnf@cygnus.com)
-
- * functions.def (alloca): Fix return type and args to avoid
- type clash with gcc's builtin alloca.
-
-Tue Mar 24 23:33:42 1992 K. Richard Pixley (rich@cygnus.com)
-
- * configure.in, config/mh-irix4: irix4 support.
-
- * Makefile.in, functions.def, alloca.c: added alloca.
-
-Tue Mar 24 17:34:46 1992 Stu Grossman (grossman at cygnus.com)
-
- * obstack.c (CALL_FREEFUN): Make it compile on DECstations.
-
-Thu Mar 19 13:57:42 1992 Fred Fish (fnf@cygnus.com)
-
- * argv.c: Fix various external function definitions to be
- correct in an ANSI compilation environment.
-
-Sat Mar 14 17:28:17 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.c: Changes to support calling mmalloc functions,
- which take an additional argument over malloc functions.
-
-Fri Mar 6 22:01:10 1992 K. Richard Pixley (rich@cygnus.com)
-
- * added check target.
-
-Thu Feb 27 22:19:39 1992 Per Bothner (bothner@cygnus.com)
-
- * argv.c: #include alloca-conf.h (needed by AIX).
-
-Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com)
-
- * Makefile.in, configure.in: removed traces of namesubdir,
- -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced
- copyrights to '92, changed some from Cygnus to FSF.
-
-Sat Feb 22 01:09:21 1992 Stu Grossman (grossman at cygnus.com)
-
- * argv.c: Check in Fred's version which fixes problems with
- alloca().
-
-Fri Feb 7 21:46:08 1992 Stu Grossman (grossman at cygnus.com)
-
- * makefile.dos: Remove NUL to keep patch from failing.
-
-Thu Jan 30 22:48:41 1992 Stu Grossman (grossman at cygnus.com)
-
- * getopt.c (_getopt_internal): Fix usage of enum has_arg.
-
-Mon Jan 20 18:53:23 1992 Stu Grossman (grossman at cygnus.com)
-
- * getopt.c, getopt1.c, ../include/getopt.h: Get latest versions.
-
-Sat Jan 18 16:53:01 1992 Fred Fish (fnf at cygnus.com)
-
- * argv.c: New file to build and destroy standard argument
- vectors from a command string.
-
- * Makefile.in: Add argv.c and argv.o to appropriate macros.
-
-Fri Dec 20 12:12:57 1991 Fred Fish (fnf at cygnus.com)
-
- * configure.in: Change svr4 references to sysv4.
-
- * rindex.c: Declare return type of externally used function
- strrchr().
-
-Thu Dec 19 18:35:03 1991 John Gilmore (gnu at cygnus.com)
-
- * Makefile.in: Remove "***" in normal output, since Make produces
- this on errors, and it's convenient to search for.
-
-Tue Dec 17 23:21:30 1991 Per Bothner (bothner at cygnus.com)
-
- * memcmp.c, memcpy.c, memmove.c, memset.c, strchr.c, strrchr.c:
- New ANSI functions. The old non-ANSI functions (such as bcopy)
- should be avoided.
- * bcopy.c: Fix to correctly handle overlapping regions.
- * index.c, rindex.c: Re-write in terms of strchr() and strrchr().
- * functions.def: Add the new functions.
- * functions.def: Add 4th parameter to DEF macro,
- an ansidecl.h-style prototype.
- * dummy.c: Use expanded DEF macro to create a dummy function
- call, with correct parameter types. (This avoids some
- complaints from gcc about predefined builtins.)
-
- Move the functionality of config/mh-default into Makefile.in.
- This avoid duplication, and simplifies things slightly.
- * Makefile.in: Tweak so we don't need config/mh-default.
- * README: Update.
- * configure.in: No longer need config/mh-default.
- * config/mh-default: Deleted.
- * config/mh-sysv: Remove lines copied from old mh-default.
-
-Tue Dec 17 05:46:46 1991 John Gilmore (gnu at cygnus.com)
-
- * fdmatch.c (fdmatch): Don't compare st_rdev, which is for
- 'mknod' device numbers.
-
-Mon Dec 16 12:25:34 1991 Fred Fish (fnf at cygnus.com)
-
- * fdmatch.c, Makefile.in: Add new function that takes two
- open file descriptors and returns nonzero if they refer to
- the same file, zero otherwise. (used in gdb)
-
-Wed Dec 11 17:40:39 1991 Steve Chamberlain (sac at rtl.cygnus.com)
- From DJ:
- * msdos.c: stub functions for dos.
- * makefile.dos, configdj.bat: new.
- * getopt.c: Don't include alloca-conf.h in a GO32 world.
-
-
-Tue Dec 10 04:14:49 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: infodir belongs in datadir.
-
-Fri Dec 6 23:26:45 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: remove spaces following hyphens because bsd make
- can't cope. added standards.text support. install using
- INSTALL_DATA.
-
- * configure.in: remove commontargets as it is no longer a
- recognized hook.
-
-Thu Dec 5 22:46:46 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * Makefile.in: idestdir and ddestdir go away. Added copyrights
- and shift gpl to v2. Added ChangeLog if it didn't exist. docdir
- and mandir now keyed off datadir by default.
-
-Fri Nov 22 19:15:29 1991 John Gilmore (gnu at cygnus.com)
-
- * Makefile.in: find-needed.awk does not fit in 14 chars.
-
- * Makefile.in: Suppress error checking when compiling the test
- program, because Ultrix make/sh aborts there due to a bug.
-
-Fri Nov 22 12:23:17 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in: Re-did how EXTRA_OFILES is used to be more useful.
- * README: Explained how the auto-configuration works,
- and how to add new files and/or configurations.
-
-Fri Nov 22 09:45:23 1991 John Gilmore (gnu at cygnus.com)
-
- * strtoul.c: Avoid defining ULONG_MAX if already defined;
- cast a const char * to char * for pedants.
-
- * getopt.c: Only define "const" after local include files get to,
- and only if they haven't defined it.
-
-Thu Nov 21 16:58:53 1991 John Gilmore (gnu at cygnus.com)
-
- * getcwd.c (remove getwd.c): GNU code should call getcwd(). We
- emulate it with getwd() if available. This avoids callers having
- to find a MAXPATHLEN or PATH_MAX value from somewhere.
- * Makefile.in, functions.def: getwd->getcwd.
- * configure.in: Use generic case for every system.
- * config/mh-{delta88,mach,rs6000,svr4}: Remove.
- * config/mh-sysv: Use default handling, just add -DUSG.
-
-Thu Nov 14 10:58:05 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in, config/mh-default: Re-do make magic
- so that for the default ("automatic") mode we only
- compile the files we actually need. Do this using
- a recursive make: The top-level generates the list
- of needed files (loosely, the ones missing in libc),
- and then passes that list to the recursive make.
- * config/mh-mach: Remove obsolete STRERROR-{C,O} macros.
-
-Tue Nov 12 19:10:57 1991 John Gilmore (gnu at cygnus.com)
-
- RS/6000 host support (grumble).
-
- * configure.in: Build alloca-conf.h file from alloca-norm.h
- (everything else) or alloca-botch.h (rs/6000).
- * Makefile.in: Include . on the include path.
- * getopt.c: Use alloca-conf.h.
- * alloca-norm.h: How to declare alloca on reasonable machines.
- * alloca-botch.h: How to declare alloca on braindead machines.
-
-Tue Nov 12 09:21:48 1991 Fred Fish (fnf at cygnus.com)
-
- * concat.c : New file, like concat() in gdb but can take a
- variable number of arguments rather than fixed at 3 args. For
- now, client applications must supply an xmalloc(), which is a
- front end function to malloc() that deals with out-of-memory
- conditions.
-
- * Makefile.in: Add concat.c and concat.o to appropriate macros.
-
-Sat Nov 9 13:29:59 1991 Fred Fish (fnf at cygnus.com)
-
- * config/mh-svr4: Add sigsetmask to list of required functions.
-
-Sun Nov 3 11:57:56 1991 Per Bothner (bothner at cygnus.com)
-
- * vsprintf.c: New file.
- * functions.def, Makefile.in: Add vsprintf.
-
-Sun Oct 27 16:31:22 1991 John Gilmore (gnu at cygnus.com)
-
- * configure.in, config/mh-rs6000: Add rs/6000 host support.
- * Makefile.in: Compile with debug info.
-
-Fri Oct 25 17:01:12 1991 Per Bothner (bothner at cygnus.com)
-
- * Makefile.in, configure.in, and new files: dummy.c, functions.def,
- config/mf-default: Added a default configuration mode,
- which includes into libiberty.a functions that are "missing" in libc.
- * strdup.c, vprintf.c, vfprintf.c: New files.
-
-Thu Oct 24 02:29:26 1991 Fred Fish (fnf at cygnus.com)
-
- * config/hmake-svr4: New file.
-
- * config/hmake-sysv: Add HOST_CFILES and HOST_OFILES.
-
- * basename.c, bcmp.c, bcopy.c, bzero.c, getpagesize.c getwd.c,
- index.c, insque.c, rindex.c, spaces.c, strstr.c, vfork.c: New
- files containing either portable C versions or emulations using
- native library calls.
-
- * strerror.c: Add copyright, internal documentation, etc.
-
- * strtol.c: Replace hardwired hex constants with some more
- portable macros. Remove illegal (according to gcc) cast.
-
- * strtoul.c: Replace hardwired hex constant with more portable
- macro.
-
- * Makefile.in: Move TARGETLIB and CFLAGS where makefile fragments
- can override them. Add new source and object file names to CFILES
- and OFILES respectively.
-
- * configure.in: Add support for SVR4 makefile fragments.
-
-Tue Oct 22 19:00:23 1991 Steve Chamberlain (steve at cygnus.com)
-
- * Makefile.in: Move RANLIB, AR and AR_FLAGS to where they can be
- over-ridden by config/hmake-*
- * configure.in: added m88kcvs to sysv list
-
-Fri Oct 4 01:29:08 1991 John Gilmore (gnu at cygnus.com)
-
- * Makefile.in: Most hosts need strerror, but one or two don't,
- and they override these definitions in the host-dependent makefile
- fragment.
- * config/hmake-mach: The odd man out on strerror -- it's supplied.
- * strerror.c: New file.
-
- * strtol.c, strtoul.c: Add strtol to libiberty, since Mach lacks
- it and bfd uses it.
- * configure.in, Makefile.in, config/hmake-mach: Only configure
- strtol & strotoul in on Mach.
-
-Tue Sep 3 06:36:23 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * obstack.c: Merge with latest FSF version.
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/contrib/gdb/libiberty/Makefile.in b/contrib/gdb/libiberty/Makefile.in
deleted file mode 100644
index 7f11d51439de..000000000000
--- a/contrib/gdb/libiberty/Makefile.in
+++ /dev/null
@@ -1,321 +0,0 @@
-#
-# Makefile
-# Copyright (C) 1990, 1991, 1992, 1995 Free Software Foundation
-#
-# 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 was written, and is maintained by K. Richard Pixley
-# <rich@cygnus.com>.
-
-#
-# Makefile for libiberty directory
-#
-
-srcdir = .
-
-prefix = /usr/local
-
-exec_prefix = $(prefix)
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
-
-datadir = $(prefix)/lib
-
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-infodir = $(prefix)/info
-includedir = $(prefix)/include
-oldincludedir =
-docdir = $(datadir)/doc
-
-SHELL = /bin/sh
-
-# Multilib support variables.
-MULTISRCTOP =
-MULTIBUILDTOP =
-MULTIDIRS =
-MULTISUBDIR =
-MULTIDO = true
-MULTICLEAN = true
-
-INSTALL = install -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL)
-
-AR = ar
-AR_FLAGS = rc
-
-ERRORS_CC = $(CC)
-CC = cc
-CFLAGS = -g
-LIBCFLAGS = $(CFLAGS)
-MAKEINFO = makeinfo
-RANLIB = ranlib
-
-PICFLAG =
-
-MAKEOVERRIDES =
-
-TARGETLIB = libiberty.a
-
-CONFIG_H = lconfig.h
-NEEDED_LIST = lneeded-list
-
-# HOST_OFILES contains the list of objects that should be in the
-# library (in addition to the REQUIRED_OFILES and EXTRA_OFILES).
-# A configuration may override this with a fixed list a object files
-# names (hard to maintain), or some other way to generate a list.
-HOST_OFILES=`cat needed-list`
-
-# Extra targets that the top-level target depends on.
-# Specifically, what needs to be made before HOST_OFILES can be used.
-# Can be empty if HOST_OFILES is just a list of file names.
-DO_ALSO = needed-list
-
-# A configuration can specify extra .o files that should be included,
-# even if they are in libc. (Perhaps the libc version is buggy.)
-EXTRA_OFILES =
-
-# Flags to pass to a recursive make.
-FLAGS_TO_PASS = \
- "AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
- "CC=$(CC)" \
- "CFLAGS=$(CFLAGS)" \
- "LIBCFLAGS=$(LIBCFLAGS)" \
- "EXTRA_OFILES=$(EXTRA_OFILES)" \
- "HDEFINES=$(HDEFINES)" \
- "LDFLAGS=$(LDFLAGS)" \
- "LOADLIBES=$(LOADLIBES)" \
- "PICFLAG=$(PICFLAG)" \
- "RANLIB=$(RANLIB)" \
- "SHELL=$(SHELL)"
-
-all: stamp-picdir $(TARGETLIB) required-list
- @if [ "$(RULE1)" != "not-used" ]; then \
- $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all; \
- else true; \
- fi
-
-.PHONY: check installcheck
-check installcheck:
-
-
-#### Host, target, and site specific Makefile fragments come in here.
-###
-
-INCDIR=$(srcdir)/$(MULTISRCTOP)../include
-
-COMPILE.c = $(CC) -c $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES)
-.c.o:
- test -z "$(PICFLAG)" || \
- $(COMPILE.c) $(PICFLAG) $< -o pic/$@
- $(COMPILE.c) $<
-
-# The default target just invokes make recursively.
-# However, the automatic configuration (in config/mh_default).
-# first causes it to figure out the objects missing in libc.
-info install-info clean-info dvi:
-
-# Include files that are in this directory.
-HFILES =
-
-# NOTE: If you add new files to the library, add them to this list
-# (alphabetical), and add them to REQUIRED_OFILES or 'functions.def'.
-CFILES = alloca.c argv.c basename.c bcmp.c bcopy.c bzero.c \
- clock.c concat.c cplus-dem.c fdmatch.c \
- getcwd.c getopt.c getopt1.c getpagesize.c getruntime.c \
- floatformat.c hex.c index.c insque.c \
- memchr.c memcmp.c memcpy.c memmove.c memset.c \
- obstack.c random.c rename.c rindex.c sigsetmask.c spaces.c \
- strcasecmp.c strncasecmp.c \
- strchr.c strdup.c strerror.c strrchr.c strsignal.c \
- strstr.c strtod.c strtol.c strtoul.c tmpnam.c \
- vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c \
- xatexit.c xexit.c xmalloc.c xstrdup.c xstrerror.c
-# These are always included in the library.
-REQUIRED_OFILES = argv.o basename.o concat.o cplus-dem.o fdmatch.o \
- getopt.o getopt1.o getruntime.o hex.o \
- floatformat.o obstack.o spaces.o strerror.o strsignal.o \
- vasprintf.o xatexit.o xexit.o xmalloc.o xstrdup.o xstrerror.o
-
-# Do we want/need any config overrides?
-#
-
-STAGESTUFF = $(TARGETLIB) *.o
-
-INSTALL_DEST = libdir
-install: install_to_$(INSTALL_DEST)
-
-install_to_libdir: all
- $(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB).n
- ( cd $(libdir) ; $(RANLIB) $(libdir)/$(TARGETLIB).n )
- mv -f $(libdir)/$(TARGETLIB).n $(libdir)$(MULTISUBDIR)/$(TARGETLIB)
- @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
-
-install_to_tooldir: all
- $(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib/$(TARGETLIB).n
- ( cd $(tooldir) ; $(RANLIB) $(tooldir)/lib/$(TARGETLIB).n )
- mv -f $(tooldir)/lib/$(TARGETLIB).n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
- @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
-
-# The default configuration adds to libiberty all those functions that are
-# missing in libc. More precisely, it includes whatever $(CC) fails to find.
-# Then a sed+awk combination translates the ld error messages into
-# a list of .o files.
-
-needed-list: stamp-picdir $(NEEDED_LIST)
- cp $(NEEDED_LIST) needed-list
-
-lneeded-list: $(EXTRA_OFILES) needed.awk errors
- rm -f lneeded-list
- f=""; \
- for i in `awk -f needed.awk <errors` $(EXTRA_OFILES) ; do \
- case " $$f " in \
- *" $$i "*) ;; \
- *) f="$$f $$i" ;; \
- esac ; \
- done ; \
- echo $$f >>lneeded-list
-
-# Generate an awk script that looks for functions in functions.def
-
-needed.awk: $(srcdir)/functions.def Makefile
- echo "# !Automatically generated from $(srcdir)/functions.def"\
- "- DO NOT EDIT!" >needed.awk
- grep '^DEF(' < $(srcdir)/functions.def \
- | sed -e '/DEF/s|DEF.\([^,]*\).*|/\1/ { printf "\1.o " }|' \
- >>needed.awk
-
-config.h: $(CONFIG_H)
- cp $(CONFIG_H) config.h
-
-lconfig.h: needed2.awk errors
- echo "/* !Automatically generated from $(srcdir)/functions.def"\
- "- DO NOT EDIT! */" >lconfig.h
- awk -f needed2.awk <errors >>lconfig.h
-
-# Generate an awk script that looks for variables in functions.def
-
-needed2.awk: $(srcdir)/functions.def Makefile
- echo "# !Automatically generated from $(srcdir)/functions.def"\
- "- DO NOT EDIT!" >needed2.awk
- grep '^DEFVAR(' < $(srcdir)/functions.def \
- | sed -e '/DEFVAR/s|DEFVAR.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' \
- >>needed2.awk
- grep '^DEFFUNC(' < $(srcdir)/functions.def \
- | sed -e '/DEFFUNC/s|DEFFUNC.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' \
- >>needed2.awk
-
-dummy.o: $(srcdir)/dummy.c $(srcdir)/functions.def
- $(CC) -c $(CFLAGS) -I. -I$(INCDIR) $(HDEFINES) $(srcdir)/dummy.c 2>/dev/null
-
-errors: dummy.o $(EXTRA_OFILES)
- -($(ERRORS_CC) -o dummy $(CFLAGS) $(LDFLAGS) $(ERRORS_LDFLAGS) dummy.o $(EXTRA_OFILES) $(LOADLIBES)) >errors 2>&1 || true
-
-# required-list is used when building a shared bfd/opcodes/libiberty library.
-required-list: Makefile
- echo $(REQUIRED_OFILES) > required-list
-
-$(HOST_OFILES) $(REQUIRED_OFILES) : config.h
-
-RULE1 = $(TARGETLIB)
-$(RULE1): $(REQUIRED_OFILES) $(DO_ALSO) .always.
- @$(MAKE) RULE1=not-used RULE2=$(TARGETLIB) $(FLAGS_TO_PASS) \
- "HOST_OFILES=$(HOST_OFILES)"
-
-# Rule invoked by recursive make in $(RULE1).
-RULE2 = not-used
-$(RULE2): $(REQUIRED_OFILES) $(HOST_OFILES)
- rm -rf $(TARGETLIB)
- $(AR) $(AR_FLAGS) $(TARGETLIB) \
- $(REQUIRED_OFILES) $(HOST_OFILES)
- $(RANLIB) $(TARGETLIB)
-
-stamp-picdir:
- if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \
- mkdir pic; \
- else true; fi
- touch stamp-picdir
-
-.always.:
-# Do nothing.
-
-.PHONY: all etags tags ls clean stage1 stage2 .always.
-
-etags tags: TAGS
-
-TAGS: $(CFILES) $(HFILES)
- etags `for i in $(HFILES) $(CFILES); do echo $(srcdir)/$$i ; done`
-
-# The standalone demangler (c++filt) has been moved to binutils.
-demangle:
- @echo "The standalone demangler, now named c++filt, is now"
- @echo "a part of binutils."
- @false
-
-ls:
- @echo Makefile $(HFILES) $(CFILES)
-
-# Need to deal with profiled libraries, too.
-
-mostlyclean:
- rm -rf *.o pic core errs \#* *.E a.out
- rm -f needed.awk needed2.awk errors dummy needed-list config.h
- rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
- @$(MULTICLEAN) multi-clean DO=mostlyclean
-clean: mostlyclean
- rm -f *.a required-list
- @$(MULTICLEAN) multi-clean DO=clean
-distclean: clean
- rm -f *~ Makefile config.status alloca-conf.h xhost-mkfrag TAGS
- @$(MULTICLEAN) multi-clean DO=distclean
-maintainer-clean realclean: distclean
-
-force:
-
-Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
- $(SHELL) ./config.status
-
-argv.o: $(INCDIR)/libiberty.h
-basename.o: $(INCDIR)/libiberty.h
-concat.o: $(INCDIR)/libiberty.h
-cplus-dem.o: $(INCDIR)/demangle.h
-fdmatch.o: $(INCDIR)/libiberty.h
-getopt.o: $(INCDIR)/getopt.h
-getopt1.o: $(INCDIR)/getopt.h
-getruntime.o: $(INCDIR)/libiberty.h
-hex.o: $(INCDIR)/libiberty.h
-floatformat.o: $(INCDIR)/floatformat.h
-obstack.o: $(INCDIR)/obstack.h
-spaces.o: $(INCDIR)/libiberty.h
-strerror.o: $(INCDIR)/libiberty.h
-strsignal.o: $(INCDIR)/libiberty.h
-xatexit.o: $(INCDIR)/libiberty.h
-xexit.o: $(INCDIR)/libiberty.h
-xmalloc.o: $(INCDIR)/libiberty.h
-xstrdup.o: $(INCDIR)/libiberty.h
-xstrerror.o: $(INCDIR)/libiberty.h
diff --git a/contrib/gdb/libiberty/README b/contrib/gdb/libiberty/README
deleted file mode 100644
index 5081bbac1968..000000000000
--- a/contrib/gdb/libiberty/README
+++ /dev/null
@@ -1,129 +0,0 @@
-This directory contains the -liberty library of free software.
-It is a collection of subroutines used by various GNU programs.
-Current members include:
-
- getopt -- get options from command line
- obstack -- stacks of arbitrarily-sized objects
- strerror -- error message strings corresponding to errno
- strtol -- string-to-long conversion
- strtoul -- string-to-unsigned-long conversion
-
-We expect many of the GNU subroutines that are floating around to
-eventually arrive here.
-
-To build the library, do:
-
- ./configure HOSTTYPE
- make
-
-Please report bugs and fixes to "bug-gnu-utils@prep.ai.mit.edu". Thank you.
-
-ADDING A NEW FILE
-=================
-
-There are two sets of files: Those that are "required" will be
-included in the library for all configurations, while those
-that are "optional" will be included in the library only if "needed."
-
-To add a new required file, edit Makefile to add the source file
-name to CFILES and the object file to REQUIRED_OFILES.
-
-Adding a new optional file is more fragile. As a general rule,
-an optional file will be included in the library if it provides
-functionality missing in the "standard" C library.
-For most hosts, the Makefile automatically figures out which
-functionality is missing by compiling and linking a dummy test
-program, and examining the error messages.
-
-So to get this to work, you should do the following:
-
-1) Select one function defined in the file you're adding.
-For example, the getcwd function.
-2) Add that function to the list in the file functions.def.
-3) The name of the new file must be the same as the function
-you've chosen with the .c suffix added. E.g. getcwd() must be
-defined in getcwd.c. (The file can define other functions as well.)
-4) In Makefile.in, add the name of the source file (e.g. getcwd.c)
-to CFILES.
-
-The file you've added (e.g. getcwd.c) should compile and work
-on all hosts where it is needed (e.g. not found when linking
-the dummy.c program). It does not have to work or even
-compile on hosts where it is not needed.
-
-HOW THE AUTOMATIC CONFIGURATION WORKS
-=====================================
-
-The libiberty.a target (in RULE1) depends on $(DO_ALSO).
-For normal configurations, DO_ALSO=needed-list.
-
-So needed-list is first made. The needed-list rule compiles
-dummy.c. Because dummy.c includes functions.def, the
-resulting object file will contain a call to each of the
-optional functions (for simplicity assume each optional file
-defines a single function). This object file will be linked
-against the standard libraries (as defined by using $(CC)
-and various flags). Any function missing will causes the
-linker to emit an error message. We assume the name
-of the missing function(s) are in the error message(s).
-The awk script find-needed.awk has been generated from
-functions.def. It is used to search the linker output
-messages for words that match the functions listed in
-functions.def. The list of functions found is written
-on a single line to the file needed-list.
-
-After needed-list has been generated, the libiberty.a
-target (in RULE1) just calls 'make' recursively.
-It passes the contents of needed-list using the
-definition (expanded) HOST_OFILES="`cat needed-list`".
-It also tells the inferior 'make' to use RULE2.
-
-The inferior 'make' is very conventional: The main
-rule is $(RULE2) (which is libiberty.a). It depends
-on a list of object files: $(REQUIRED_OFILES) $(HOST_OFILES)
-(and $(EXTRA_OFILES), which is usually empty). The superior
-'make' passes in $(HOST_OFILES); the others are fixed
-in the Makefile.
-
-ADDING A NEW CONFIGURATION
-==========================
-
-On most hosts you should be able to use the scheme for automatically
-figuring out which files are needed. In that case, you probably
-don't need a special Makefile stub for that configuration.
-
-If the fully automatic scheme doesn't work, you may be able to get
-by with defining EXTRA_OFILES in your Makefile stub. This is
-a list of object file names that should be treated as required
-for this configuration - they will be included in libiberty.a,
-regardless of whatever might be in the C library. Moreover,
-when the dummy.c program is linked, it will be linked with
-$(EXTRA_OFILES). Therefore, if a function in functions.def
-is defined by one of the EXTRA_OFILES, it will not be listed as
-"needed". Thus if your hal9000 host needs a special implementation
-of getcwd, you can just create hal9000-getcwd.c, and define:
- EXTRA_OFILES=hal9000-getcwd.o
-Or if you want to use the libiberty version of strstr(),
-even though there is a version in the C library (it might be
-buggy or slow), just define:
- EXTRA_OFILES=strstr.o
-
-You can create a "manual" host configuration FOO with a file
-config/mh-FOO. In it, the HOST_OFILES macro should explicitly
-list that subset of the optional files that should be in the
-library. You should also set:
- DO_ALSO =
-This overrides all of the magic needed to automatically
-determine which files are "needed." However, keeping that list
-up to date is another matter...
-
-HOW THE MANUAL CONFIGURATION WORKS
-==================================
-
-This also uses a recursive make, but the superior make
-does not do anything interesting - it just calls the
-inferior make with HOST_OFILES defined as $(HOST_OFILES),
-which is the list you created in your configuration.
-
-You probably don't want to depend on manual configuration,
-because keeping the HOST_OFILES list up-to-date will be a pain.
diff --git a/contrib/gdb/libiberty/alloca-botch.h b/contrib/gdb/libiberty/alloca-botch.h
deleted file mode 100644
index c909573f58c6..000000000000
--- a/contrib/gdb/libiberty/alloca-botch.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* RS/6000 AIX botched alloca and requires a pragma, which ordinary compilers
- throw up about, so we have to put it in a specially-configured file.
- Like this one. */
-
-#pragma alloca
diff --git a/contrib/gdb/libiberty/alloca-norm.h b/contrib/gdb/libiberty/alloca-norm.h
deleted file mode 100644
index 8d91b5ad4295..000000000000
--- a/contrib/gdb/libiberty/alloca-norm.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* "Normal" configuration for alloca. */
-
-#ifdef __GNUC__
-#define alloca __builtin_alloca
-#else /* not __GNUC__ */
-#ifdef sparc
-#include <alloca.h>
-extern char *__builtin_alloca(); /* Stupid include file doesn't declare it */
-#else
-#ifdef __STDC__
-PTR alloca (size_t);
-#else
-PTR alloca (); /* must agree with functions.def */
-#endif
-#endif /* sparc */
-#endif /* not __GNUC__ */
diff --git a/contrib/gdb/libiberty/alloca.c b/contrib/gdb/libiberty/alloca.c
deleted file mode 100644
index 9c472ead6dfc..000000000000
--- a/contrib/gdb/libiberty/alloca.c
+++ /dev/null
@@ -1,475 +0,0 @@
-/* alloca.c -- allocate automatically reclaimed memory
- (Mostly) portable public-domain implementation -- D A Gwyn
-
- This implementation of the PWB library alloca function,
- which is used to allocate space off the run-time stack so
- that it is automatically reclaimed upon procedure exit,
- was inspired by discussions with J. Q. Johnson of Cornell.
- J.Otto Tennant <jot@cray.com> contributed the Cray support.
-
- There are some preprocessor constants that can
- be defined when compiling for your specific system, for
- improved efficiency; however, the defaults should be okay.
-
- The general concept of this implementation is to keep
- track of all alloca-allocated blocks, and reclaim any
- that are found to be deeper in the stack than the current
- invocation. This heuristic does not reclaim storage as
- soon as it becomes invalid, but it will do so eventually.
-
- As a special case, alloca(0) reclaims storage without
- allocating any. It is a good idea to use alloca(0) in
- your main control loop, etc. to force garbage collection. */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-/* If compiling with GCC, this file's not needed. */
-#ifndef alloca
-
-#ifdef emacs
-#ifdef static
-/* actually, only want this if static is defined as ""
- -- this is for usg, in which emacs must undefine static
- in order to make unexec workable
- */
-#ifndef STACK_DIRECTION
-you
-lose
--- must know STACK_DIRECTION at compile-time
-#endif /* STACK_DIRECTION undefined */
-#endif /* static */
-#endif /* emacs */
-
-/* If your stack is a linked list of frames, you have to
- provide an "address metric" ADDRESS_FUNCTION macro. */
-
-#if defined (CRAY) && defined (CRAY_STACKSEG_END)
-long i00afunc ();
-#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
-#else
-#define ADDRESS_FUNCTION(arg) &(arg)
-#endif
-
-#if __STDC__
-typedef void *pointer;
-#else
-typedef char *pointer;
-#endif
-
-#define NULL 0
-
-/* Different portions of Emacs need to call different versions of
- malloc. The Emacs executable needs alloca to call xmalloc, because
- ordinary malloc isn't protected from input signals. On the other
- hand, the utilities in lib-src need alloca to call malloc; some of
- them are very simple, and don't have an xmalloc routine.
-
- Non-Emacs programs expect this to call use xmalloc.
-
- Callers below should use malloc. */
-
-#ifndef emacs
-#define malloc xmalloc
-extern pointer xmalloc ();
-#endif
-
-/* Define STACK_DIRECTION if you know the direction of stack
- growth for your system; otherwise it will be automatically
- deduced at run-time.
-
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
-
-#ifndef STACK_DIRECTION
-#define STACK_DIRECTION 0 /* Direction unknown. */
-#endif
-
-#if STACK_DIRECTION != 0
-
-#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
-
-#else /* STACK_DIRECTION == 0; need run-time code. */
-
-static int stack_dir; /* 1 or -1 once known. */
-#define STACK_DIR stack_dir
-
-static void
-find_stack_direction ()
-{
- static char *addr = NULL; /* Address of first `dummy', once known. */
- auto char dummy; /* To get stack address. */
-
- if (addr == NULL)
- { /* Initial entry. */
- addr = ADDRESS_FUNCTION (dummy);
-
- find_stack_direction (); /* Recurse once. */
- }
- else
- {
- /* Second entry. */
- if (ADDRESS_FUNCTION (dummy) > addr)
- stack_dir = 1; /* Stack grew upward. */
- else
- stack_dir = -1; /* Stack grew downward. */
- }
-}
-
-#endif /* STACK_DIRECTION == 0 */
-
-/* An "alloca header" is used to:
- (a) chain together all alloca'ed blocks;
- (b) keep track of stack depth.
-
- It is very important that sizeof(header) agree with malloc
- alignment chunk size. The following default should work okay. */
-
-#ifndef ALIGN_SIZE
-#define ALIGN_SIZE sizeof(double)
-#endif
-
-typedef union hdr
-{
- char align[ALIGN_SIZE]; /* To force sizeof(header). */
- struct
- {
- union hdr *next; /* For chaining headers. */
- char *deep; /* For stack depth measure. */
- } h;
-} header;
-
-static header *last_alloca_header = NULL; /* -> last alloca header. */
-
-/* Return a pointer to at least SIZE bytes of storage,
- which will be automatically reclaimed upon exit from
- the procedure that called alloca. Originally, this space
- was supposed to be taken from the current stack frame of the
- caller, but that method cannot be made to work for some
- implementations of C, for example under Gould's UTX/32. */
-
-pointer
-alloca (size)
- unsigned size;
-{
- auto char probe; /* Probes stack depth: */
- register char *depth = ADDRESS_FUNCTION (probe);
-
-#if STACK_DIRECTION == 0
- if (STACK_DIR == 0) /* Unknown growth direction. */
- find_stack_direction ();
-#endif
-
- /* Reclaim garbage, defined as all alloca'd storage that
- was allocated from deeper in the stack than currently. */
-
- {
- register header *hp; /* Traverses linked list. */
-
- for (hp = last_alloca_header; hp != NULL;)
- if ((STACK_DIR > 0 && hp->h.deep > depth)
- || (STACK_DIR < 0 && hp->h.deep < depth))
- {
- register header *np = hp->h.next;
-
- free ((pointer) hp); /* Collect garbage. */
-
- hp = np; /* -> next header. */
- }
- else
- break; /* Rest are not deeper. */
-
- last_alloca_header = hp; /* -> last valid storage. */
- }
-
- if (size == 0)
- return NULL; /* No allocation required. */
-
- /* Allocate combined header + user data storage. */
-
- {
- register pointer new = malloc (sizeof (header) + size);
- /* Address of header. */
-
- ((header *) new)->h.next = last_alloca_header;
- ((header *) new)->h.deep = depth;
-
- last_alloca_header = (header *) new;
-
- /* User storage begins just after header. */
-
- return (pointer) ((char *) new + sizeof (header));
- }
-}
-
-#if defined (CRAY) && defined (CRAY_STACKSEG_END)
-
-#ifdef DEBUG_I00AFUNC
-#include <stdio.h>
-#endif
-
-#ifndef CRAY_STACK
-#define CRAY_STACK
-#ifndef CRAY2
-/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
-struct stack_control_header
- {
- long shgrow:32; /* Number of times stack has grown. */
- long shaseg:32; /* Size of increments to stack. */
- long shhwm:32; /* High water mark of stack. */
- long shsize:32; /* Current size of stack (all segments). */
- };
-
-/* The stack segment linkage control information occurs at
- the high-address end of a stack segment. (The stack
- grows from low addresses to high addresses.) The initial
- part of the stack segment linkage control information is
- 0200 (octal) words. This provides for register storage
- for the routine which overflows the stack. */
-
-struct stack_segment_linkage
- {
- long ss[0200]; /* 0200 overflow words. */
- long sssize:32; /* Number of words in this segment. */
- long ssbase:32; /* Offset to stack base. */
- long:32;
- long sspseg:32; /* Offset to linkage control of previous
- segment of stack. */
- long:32;
- long sstcpt:32; /* Pointer to task common address block. */
- long sscsnm; /* Private control structure number for
- microtasking. */
- long ssusr1; /* Reserved for user. */
- long ssusr2; /* Reserved for user. */
- long sstpid; /* Process ID for pid based multi-tasking. */
- long ssgvup; /* Pointer to multitasking thread giveup. */
- long sscray[7]; /* Reserved for Cray Research. */
- long ssa0;
- long ssa1;
- long ssa2;
- long ssa3;
- long ssa4;
- long ssa5;
- long ssa6;
- long ssa7;
- long sss0;
- long sss1;
- long sss2;
- long sss3;
- long sss4;
- long sss5;
- long sss6;
- long sss7;
- };
-
-#else /* CRAY2 */
-/* The following structure defines the vector of words
- returned by the STKSTAT library routine. */
-struct stk_stat
- {
- long now; /* Current total stack size. */
- long maxc; /* Amount of contiguous space which would
- be required to satisfy the maximum
- stack demand to date. */
- long high_water; /* Stack high-water mark. */
- long overflows; /* Number of stack overflow ($STKOFEN) calls. */
- long hits; /* Number of internal buffer hits. */
- long extends; /* Number of block extensions. */
- long stko_mallocs; /* Block allocations by $STKOFEN. */
- long underflows; /* Number of stack underflow calls ($STKRETN). */
- long stko_free; /* Number of deallocations by $STKRETN. */
- long stkm_free; /* Number of deallocations by $STKMRET. */
- long segments; /* Current number of stack segments. */
- long maxs; /* Maximum number of stack segments so far. */
- long pad_size; /* Stack pad size. */
- long current_address; /* Current stack segment address. */
- long current_size; /* Current stack segment size. This
- number is actually corrupted by STKSTAT to
- include the fifteen word trailer area. */
- long initial_address; /* Address of initial segment. */
- long initial_size; /* Size of initial segment. */
- };
-
-/* The following structure describes the data structure which trails
- any stack segment. I think that the description in 'asdef' is
- out of date. I only describe the parts that I am sure about. */
-
-struct stk_trailer
- {
- long this_address; /* Address of this block. */
- long this_size; /* Size of this block (does not include
- this trailer). */
- long unknown2;
- long unknown3;
- long link; /* Address of trailer block of previous
- segment. */
- long unknown5;
- long unknown6;
- long unknown7;
- long unknown8;
- long unknown9;
- long unknown10;
- long unknown11;
- long unknown12;
- long unknown13;
- long unknown14;
- };
-
-#endif /* CRAY2 */
-#endif /* not CRAY_STACK */
-
-#ifdef CRAY2
-/* Determine a "stack measure" for an arbitrary ADDRESS.
- I doubt that "lint" will like this much. */
-
-static long
-i00afunc (long *address)
-{
- struct stk_stat status;
- struct stk_trailer *trailer;
- long *block, size;
- long result = 0;
-
- /* We want to iterate through all of the segments. The first
- step is to get the stack status structure. We could do this
- more quickly and more directly, perhaps, by referencing the
- $LM00 common block, but I know that this works. */
-
- STKSTAT (&status);
-
- /* Set up the iteration. */
-
- trailer = (struct stk_trailer *) (status.current_address
- + status.current_size
- - 15);
-
- /* There must be at least one stack segment. Therefore it is
- a fatal error if "trailer" is null. */
-
- if (trailer == 0)
- abort ();
-
- /* Discard segments that do not contain our argument address. */
-
- while (trailer != 0)
- {
- block = (long *) trailer->this_address;
- size = trailer->this_size;
- if (block == 0 || size == 0)
- abort ();
- trailer = (struct stk_trailer *) trailer->link;
- if ((block <= address) && (address < (block + size)))
- break;
- }
-
- /* Set the result to the offset in this segment and add the sizes
- of all predecessor segments. */
-
- result = address - block;
-
- if (trailer == 0)
- {
- return result;
- }
-
- do
- {
- if (trailer->this_size <= 0)
- abort ();
- result += trailer->this_size;
- trailer = (struct stk_trailer *) trailer->link;
- }
- while (trailer != 0);
-
- /* We are done. Note that if you present a bogus address (one
- not in any segment), you will get a different number back, formed
- from subtracting the address of the first block. This is probably
- not what you want. */
-
- return (result);
-}
-
-#else /* not CRAY2 */
-/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
- Determine the number of the cell within the stack,
- given the address of the cell. The purpose of this
- routine is to linearize, in some sense, stack addresses
- for alloca. */
-
-static long
-i00afunc (long address)
-{
- long stkl = 0;
-
- long size, pseg, this_segment, stack;
- long result = 0;
-
- struct stack_segment_linkage *ssptr;
-
- /* Register B67 contains the address of the end of the
- current stack segment. If you (as a subprogram) store
- your registers on the stack and find that you are past
- the contents of B67, you have overflowed the segment.
-
- B67 also points to the stack segment linkage control
- area, which is what we are really interested in. */
-
- stkl = CRAY_STACKSEG_END ();
- ssptr = (struct stack_segment_linkage *) stkl;
-
- /* If one subtracts 'size' from the end of the segment,
- one has the address of the first word of the segment.
-
- If this is not the first segment, 'pseg' will be
- nonzero. */
-
- pseg = ssptr->sspseg;
- size = ssptr->sssize;
-
- this_segment = stkl - size;
-
- /* It is possible that calling this routine itself caused
- a stack overflow. Discard stack segments which do not
- contain the target address. */
-
- while (!(this_segment <= address && address <= stkl))
- {
-#ifdef DEBUG_I00AFUNC
- fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
-#endif
- if (pseg == 0)
- break;
- stkl = stkl - pseg;
- ssptr = (struct stack_segment_linkage *) stkl;
- size = ssptr->sssize;
- pseg = ssptr->sspseg;
- this_segment = stkl - size;
- }
-
- result = address - this_segment;
-
- /* If you subtract pseg from the current end of the stack,
- you get the address of the previous stack segment's end.
- This seems a little convoluted to me, but I'll bet you save
- a cycle somewhere. */
-
- while (pseg != 0)
- {
-#ifdef DEBUG_I00AFUNC
- fprintf (stderr, "%011o %011o\n", pseg, size);
-#endif
- stkl = stkl - pseg;
- ssptr = (struct stack_segment_linkage *) stkl;
- size = ssptr->sssize;
- pseg = ssptr->sspseg;
- result += size;
- }
- return (result);
-}
-
-#endif /* not CRAY2 */
-#endif /* CRAY */
-
-#endif /* no alloca */
diff --git a/contrib/gdb/libiberty/argv.c b/contrib/gdb/libiberty/argv.c
deleted file mode 100644
index 40582abe4082..000000000000
--- a/contrib/gdb/libiberty/argv.c
+++ /dev/null
@@ -1,328 +0,0 @@
-/* Create and destroy argument vectors (argv's)
- Copyright (C) 1992 Free Software Foundation, Inc.
- Written by Fred Fish @ Cygnus Support
-
-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. */
-
-
-/* Create and destroy argument vectors. An argument vector is simply an
- array of string pointers, terminated by a NULL pointer. */
-
-#include "ansidecl.h"
-#include "libiberty.h"
-
-#define isspace(ch) ((ch) == ' ' || (ch) == '\t')
-
-/* Routines imported from standard C runtime libraries. */
-
-#ifdef __STDC__
-
-#include <stddef.h>
-extern void *memcpy (void *s1, const void *s2, size_t n); /* 4.11.2.1 */
-extern size_t strlen (const char *s); /* 4.11.6.3 */
-extern void *malloc (size_t size); /* 4.10.3.3 */
-extern void *realloc (void *ptr, size_t size); /* 4.10.3.4 */
-extern void free (void *ptr); /* 4.10.3.2 */
-extern char *strdup (const char *s); /* Non-ANSI */
-
-#else /* !__STDC__ */
-
-extern char *memcpy (); /* Copy memory region */
-extern int strlen (); /* Count length of string */
-extern char *malloc (); /* Standard memory allocater */
-extern char *realloc (); /* Standard memory reallocator */
-extern void free (); /* Free malloc'd memory */
-extern char *strdup (); /* Duplicate a string */
-
-#endif /* __STDC__ */
-
-#include "alloca-conf.h"
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef EOS
-#define EOS '\0'
-#endif
-
-#define INITIAL_MAXARGC 8 /* Number of args + NULL in initial argv */
-
-
-/*
-
-NAME
-
- freeargv -- free an argument vector
-
-SYNOPSIS
-
- void freeargv (vector)
- char **vector;
-
-DESCRIPTION
-
- Free an argument vector that was built using buildargv. Simply scans
- through the vector, freeing the memory for each argument until the
- terminating NULL is found, and then frees the vector itself.
-
-RETURNS
-
- No value.
-
-*/
-
-void freeargv (vector)
-char **vector;
-{
- register char **scan;
-
- if (vector != NULL)
- {
- for (scan = vector; *scan != NULL; scan++)
- {
- free (*scan);
- }
- free (vector);
- }
-}
-
-/*
-
-NAME
-
- buildargv -- build an argument vector from a string
-
-SYNOPSIS
-
- char **buildargv (sp)
- char *sp;
-
-DESCRIPTION
-
- Given a pointer to a string, parse the string extracting fields
- separated by whitespace and optionally enclosed within either single
- or double quotes (which are stripped off), and build a vector of
- pointers to copies of the string for each field. The input string
- remains unchanged.
-
- All of the memory for the pointer array and copies of the string
- is obtained from malloc. All of the memory can be returned to the
- system with the single function call freeargv, which takes the
- returned result of buildargv, as it's argument.
-
- The memory for the argv array is dynamically expanded as necessary.
-
-RETURNS
-
- Returns a pointer to the argument vector if successful. Returns NULL
- if the input string pointer is NULL or if there is insufficient
- memory to complete building the argument vector.
-
-NOTES
-
- In order to provide a working buffer for extracting arguments into,
- with appropriate stripping of quotes and translation of backslash
- sequences, we allocate a working buffer at least as long as the input
- string. This ensures that we always have enough space in which to
- work, since the extracted arg is never larger than the input string.
-
- If the input is a null string (as opposed to a NULL pointer), then
- buildarg returns an argv that has one arg, a null string.
-
- Argv is always kept terminated with a NULL arg pointer, so it can
- be passed to freeargv at any time, or returned, as appropriate.
-*/
-
-char **buildargv (input)
-char *input;
-{
- char *arg;
- char *copybuf;
- int squote = 0;
- int dquote = 0;
- int bsquote = 0;
- int argc = 0;
- int maxargc = 0;
- char **argv = NULL;
- char **nargv;
-
- if (input != NULL)
- {
- copybuf = alloca (strlen (input) + 1);
- /* Is a do{}while to always execute the loop once. Always return an
- argv, even for null strings. See NOTES above, test case below. */
- do
- {
- /* Pick off argv[argc] */
- while (isspace (*input))
- {
- input++;
- }
- if ((maxargc == 0) || (argc >= (maxargc - 1)))
- {
- /* argv needs initialization, or expansion */
- if (argv == NULL)
- {
- maxargc = INITIAL_MAXARGC;
- nargv = (char **) malloc (maxargc * sizeof (char *));
- }
- else
- {
- maxargc *= 2;
- nargv = (char **) realloc (argv, maxargc * sizeof (char *));
- }
- if (nargv == NULL)
- {
- if (argv != NULL)
- {
- freeargv (argv);
- argv = NULL;
- }
- break;
- }
- argv = nargv;
- argv[argc] = NULL;
- }
- /* Begin scanning arg */
- arg = copybuf;
- while (*input != EOS)
- {
- if (isspace (*input) && !squote && !dquote && !bsquote)
- {
- break;
- }
- else
- {
- if (bsquote)
- {
- bsquote = 0;
- *arg++ = *input;
- }
- else if (*input == '\\')
- {
- bsquote = 1;
- }
- else if (squote)
- {
- if (*input == '\'')
- {
- squote = 0;
- }
- else
- {
- *arg++ = *input;
- }
- }
- else if (dquote)
- {
- if (*input == '"')
- {
- dquote = 0;
- }
- else
- {
- *arg++ = *input;
- }
- }
- else
- {
- if (*input == '\'')
- {
- squote = 1;
- }
- else if (*input == '"')
- {
- dquote = 1;
- }
- else
- {
- *arg++ = *input;
- }
- }
- input++;
- }
- }
- *arg = EOS;
- argv[argc] = strdup (copybuf);
- if (argv[argc] == NULL)
- {
- freeargv (argv);
- argv = NULL;
- break;
- }
- argc++;
- argv[argc] = NULL;
-
- while (isspace (*input))
- {
- input++;
- }
- }
- while (*input != EOS);
- }
- return (argv);
-}
-
-#ifdef MAIN
-
-/* Simple little test driver. */
-
-static char *tests[] =
-{
- "a simple command line",
- "arg 'foo' is single quoted",
- "arg \"bar\" is double quoted",
- "arg \"foo bar\" has embedded whitespace",
- "arg 'Jack said \\'hi\\'' has single quotes",
- "arg 'Jack said \\\"hi\\\"' has double quotes",
- "a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9",
-
- /* This should be expanded into only one argument. */
- "trailing-whitespace ",
-
- "",
- NULL
-};
-
-main ()
-{
- char **argv;
- char **test;
- char **targs;
-
- for (test = tests; *test != NULL; test++)
- {
- printf ("buildargv(\"%s\")\n", *test);
- if ((argv = buildargv (*test)) == NULL)
- {
- printf ("failed!\n\n");
- }
- else
- {
- for (targs = argv; *targs != NULL; targs++)
- {
- printf ("\t\"%s\"\n", *targs);
- }
- printf ("\n");
- }
- freeargv (argv);
- }
-
-}
-
-#endif /* MAIN */
diff --git a/contrib/gdb/libiberty/atexit.c b/contrib/gdb/libiberty/atexit.c
deleted file mode 100644
index 4463cb695018..000000000000
--- a/contrib/gdb/libiberty/atexit.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
-/* This function is in the public domain. --Mike Stump. */
-
-#ifndef NEED_on_exit
-int
-atexit(f)
- void (*f)();
-{
- /* If the system doesn't provide a definition for atexit, use on_exit
- if the system provides that. */
- on_exit (f, 0);
- return 0;
-}
-#endif
diff --git a/contrib/gdb/libiberty/basename.c b/contrib/gdb/libiberty/basename.c
deleted file mode 100644
index 689b0c2d39a0..000000000000
--- a/contrib/gdb/libiberty/basename.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Return the basename of a pathname.
- This file is in the public domain. */
-
-/*
-NAME
- basename -- return pointer to last component of a pathname
-
-SYNOPSIS
- char *basename (const char *name)
-
-DESCRIPTION
- Given a pointer to a string containing a typical pathname
- (/usr/src/cmd/ls/ls.c for example), returns a pointer to the
- last component of the pathname ("ls.c" in this case).
-
-BUGS
- Presumes a UNIX style path with UNIX style separators.
-*/
-
-#include "ansidecl.h"
-#include "libiberty.h"
-
-#include "config.h"
-
-#ifdef NEED_basename
-
-char *
-basename (name)
- const char *name;
-{
- const char *base = name;
-
- while (*name)
- {
- if (*name++ == '/')
- {
- base = name;
- }
- }
- return (char *) base;
-}
-
-#endif
diff --git a/contrib/gdb/libiberty/bcmp.c b/contrib/gdb/libiberty/bcmp.c
deleted file mode 100644
index 11e4417db159..000000000000
--- a/contrib/gdb/libiberty/bcmp.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* bcmp
- This function is in the public domain. */
-
-/*
-
-NAME
-
- bcmp -- compare two memory regions
-
-SYNOPSIS
-
- int bcmp (char *from, char *to, int count)
-
-DESCRIPTION
-
- Compare two memory regions and return zero if they are identical,
- non-zero otherwise. If count is zero, return zero.
-
-NOTES
-
- No guarantee is made about the non-zero returned value. In
- particular, the results may be signficantly different than
- strcmp(), where the return value is guaranteed to be less than,
- equal to, or greater than zero, according to lexicographical
- sorting of the compared regions.
-
-BUGS
-
-*/
-
-
-int
-bcmp (from, to, count)
- char *from, *to;
- int count;
-{
- int rtnval = 0;
-
- while (count-- > 0)
- {
- if (*from++ != *to++)
- {
- rtnval = 1;
- break;
- }
- }
- return (rtnval);
-}
-
diff --git a/contrib/gdb/libiberty/bcopy.c b/contrib/gdb/libiberty/bcopy.c
deleted file mode 100644
index b655363d879e..000000000000
--- a/contrib/gdb/libiberty/bcopy.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* bcopy -- copy memory regions of arbitary length
-
-NAME
- bcopy -- copy memory regions of arbitrary length
-
-SYNOPSIS
- void bcopy (char *in, char *out, int length)
-
-DESCRIPTION
- Copy LENGTH bytes from memory region pointed to by IN to memory
- region pointed to by OUT.
-
-BUGS
- Significant speed improvements can be made in some cases by
- implementing copies of multiple bytes simultaneously, or unrolling
- the copy loop.
-
-*/
-
-void
-bcopy (src, dest, len)
- register char *src, *dest;
- int len;
-{
- if (dest < src)
- while (len--)
- *dest++ = *src++;
- else
- {
- char *lasts = src + (len-1);
- char *lastd = dest + (len-1);
- while (len--)
- *(char *)lastd-- = *(char *)lasts--;
- }
-}
diff --git a/contrib/gdb/libiberty/bzero.c b/contrib/gdb/libiberty/bzero.c
deleted file mode 100644
index d01644b7f4b8..000000000000
--- a/contrib/gdb/libiberty/bzero.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Portable version of bzero for systems without it.
- This function is in the public domain. */
-
-/*
-NAME
- bzero -- zero the contents of a specified memory region
-
-SYNOPSIS
- void bzero (char *to, int count)
-
-DESCRIPTION
- Zero COUNT bytes of memory pointed to by TO.
-
-BUGS
- Significant speed enhancements may be made in some environments
- by zeroing more than a single byte at a time, or by unrolling the
- loop.
-
-*/
-
-
-void
-bzero (to, count)
- char *to;
- int count;
-{
- while (count-- > 0)
- {
- *to++ = 0;
- }
-}
diff --git a/contrib/gdb/libiberty/clock.c b/contrib/gdb/libiberty/clock.c
deleted file mode 100644
index b60de1657a45..000000000000
--- a/contrib/gdb/libiberty/clock.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ANSI-compatible clock function.
- Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-
-This file is part of the libiberty library. This library is free
-software; you can redistribute 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 library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-As a special exception, if you link this library with files
-compiled with a GNU compiler to produce an executable, this does not cause
-the resulting executable to be covered by the GNU General Public License.
-This exception does not however invalidate any other reasons why
-the executable file might be covered by the GNU General Public License. */
-
-#ifdef HAVE_GETRUSAGE
-#include <sys/time.h>
-#include <sys/resource.h>
-#endif
-
-#ifdef HAVE_TIMES
-#ifndef NO_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <sys/times.h>
-#endif
-
-/* FIXME: should be able to declare as clock_t. */
-
-long
-clock ()
-{
-#ifdef HAVE_GETRUSAGE
- struct rusage rusage;
-
- getrusage (0, &rusage);
- return (rusage.ru_utime.tv_sec * 1000000 + rusage.ru_utime.tv_usec
- + rusage.ru_stime.tv_sec * 1000000 + rusage.ru_stime.tv_usec);
-#else
-#ifdef HAVE_TIMES
- struct tms tms;
-
- times (&tms);
- return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
-#else
-#ifdef VMS
- struct
- {
- int proc_user_time;
- int proc_system_time;
- int child_user_time;
- int child_system_time;
- } vms_times;
-
- times (&vms_times);
- return (vms_times.proc_user_time + vms_times.proc_system_time) * 10000;
-#else
- /* A fallback, if nothing else available. */
- return 0;
-#endif /* VMS */
-#endif /* HAVE_TIMES */
-#endif /* HAVE_GETRUSAGE */
-}
-
diff --git a/contrib/gdb/libiberty/concat.c b/contrib/gdb/libiberty/concat.c
deleted file mode 100644
index 5b132c85764f..000000000000
--- a/contrib/gdb/libiberty/concat.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/* Concatenate variable number of strings.
- Copyright (C) 1991, 1994 Free Software Foundation, Inc.
- Written by Fred Fish @ Cygnus Support
-
-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. */
-
-
-/*
-
-NAME
-
- concat -- concatenate a variable number of strings
-
-SYNOPSIS
-
- #include <varargs.h>
-
- char *concat (s1, s2, s3, ..., NULL)
-
-DESCRIPTION
-
- Concatenate a variable number of strings and return the result
- in freshly malloc'd memory.
-
- Returns NULL if insufficient memory is available. The argument
- list is terminated by the first NULL pointer encountered. Pointers
- to empty strings are ignored.
-
-NOTES
-
- This function uses xmalloc() which is expected to be a front end
- function to malloc() that deals with low memory situations. In
- typical use, if malloc() returns NULL then xmalloc() diverts to an
- error handler routine which never returns, and thus xmalloc will
- never return a NULL pointer. If the client application wishes to
- deal with low memory situations itself, it should supply an xmalloc
- that just directly invokes malloc and blindly returns whatever
- malloc returns.
-*/
-
-
-#include "ansidecl.h"
-#include "libiberty.h"
-
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#ifdef __STDC__
-#include <stddef.h>
-extern size_t strlen (const char *s);
-#else
-extern int strlen ();
-#endif
-
-#define NULLP (char *)0
-
-/* VARARGS */
-#ifdef ANSI_PROTOTYPES
-char *
-concat (const char *first, ...)
-#else
-char *
-concat (va_alist)
- va_dcl
-#endif
-{
- register int length;
- register char *newstr;
- register char *end;
- register const char *arg;
- va_list args;
-#ifndef ANSI_PROTOTYPES
- const char *first;
-#endif
-
- /* First compute the size of the result and get sufficient memory. */
-
-#ifdef ANSI_PROTOTYPES
- va_start (args, first);
-#else
- va_start (args);
- first = va_arg (args, const char *);
-#endif
-
- if (first == NULLP)
- length = 0;
- else
- {
- length = strlen (first);
- while ((arg = va_arg (args, const char *)) != NULLP)
- {
- length += strlen (arg);
- }
- }
- newstr = (char *) xmalloc (length + 1);
- va_end (args);
-
- /* Now copy the individual pieces to the result string. */
-
- if (newstr != NULLP)
- {
-#ifdef ANSI_PROTOTYPES
- va_start (args, first);
-#else
- va_start (args);
- first = va_arg (args, const char *);
-#endif
- end = newstr;
- if (first != NULLP)
- {
- arg = first;
- while (*arg)
- {
- *end++ = *arg++;
- }
- while ((arg = va_arg (args, const char *)) != NULLP)
- {
- while (*arg)
- {
- *end++ = *arg++;
- }
- }
- }
- *end = '\000';
- va_end (args);
- }
-
- return (newstr);
-}
-
-#ifdef MAIN
-
-/* Simple little test driver. */
-
-#include <stdio.h>
-
-int
-main ()
-{
- printf ("\"\" = \"%s\"\n", concat (NULLP));
- printf ("\"a\" = \"%s\"\n", concat ("a", NULLP));
- printf ("\"ab\" = \"%s\"\n", concat ("a", "b", NULLP));
- printf ("\"abc\" = \"%s\"\n", concat ("a", "b", "c", NULLP));
- printf ("\"abcd\" = \"%s\"\n", concat ("ab", "cd", NULLP));
- printf ("\"abcde\" = \"%s\"\n", concat ("ab", "c", "de", NULLP));
- printf ("\"abcdef\" = \"%s\"\n", concat ("", "a", "", "bcd", "ef", NULLP));
- return 0;
-}
-
-#endif
diff --git a/contrib/gdb/libiberty/config.table b/contrib/gdb/libiberty/config.table
deleted file mode 100644
index 1b67dd5ae883..000000000000
--- a/contrib/gdb/libiberty/config.table
+++ /dev/null
@@ -1,63 +0,0 @@
-case "${host}" in
- rs6000-ibm-aix3.1 | rs6000-ibm-aix)
- frag=mh-aix
- files=${xsrcdir}alloca-botch.h ;;
- *-ibm-aix*) files=${xsrcdir}alloca-botch.h ;;
- arm-*-riscix*) frag=mh-riscix ;;
- m68k-apollo-bsd*) frag=mh-a68bsd ;;
- m68k-apollo-sysv*) frag=mh-apollo68 ;;
- i[345]86-ncr-sysv4*) frag=mh-ncr3000 ;;
- *-*-cxux7*) frag=mh-cxux7 ;;
- *-*-lynxos*) frag=mh-lynxos ;;
- *-*-dgux*) frag=mh-sysv ;;
- hppa*-hp-bsd*) frag=mh-hpbsd ;;
- *-*-hpux*) frag=mh-hpux ;;
- *-*-hiux*) frag=mh-hpux ;;
- *-*-irix4*) frag=mh-irix4 ;;
- *-*-irix*) frag=mh-sysv ;;
- *-*-m88kbcs*) frag=mh-sysv ;;
- *-*-solaris2*) frag=mh-sysv4 ;;
- *-*-sysv4*) frag=mh-sysv4 ;;
- *-*-sysv*) frag=mh-sysv ;;
- *-*-go32) frag=mh-go32 ;;
-
- *-*-vxworks5*)
- # VxWorks 5 needs special action, because the usual
- # autoconfiguration scheme does not work.
- frag=mt-vxworks5
- ;;
-esac
-
-# Try to handle funky case of solaris 2 -> sun 4.
-case "${host}" in
- sparc-sun-sunos4.1.3)
- if [ "${with_cross_host}" != "${host}" ] ; then
- frag=mt-sunos4
- fi
- ;;
-esac
-
-frags=$frag
-
-# If they didn't specify --enable-shared, don't generate shared libs.
-if [ "${enable_shared}" = "yes" ]; then
- case "${host}" in
- hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;
- i[345]86-*-*) frags="${frags} ../../config/mh-x86pic" ;;
- *-*-*) frags="${frags} ../../config/mh-${host_cpu}pic" ;;
- esac
-fi
-
-echo "# Warning: this fragment is automatically generated" > temp-frag
-
-for frag in ${frags}; do
- frag=${srcdir}/${xsrcdir}config/$frag
- if [ -f ${frag} ]; then
- echo "Appending ${frag} to xhost-mkfrag"
- echo "# Following fragment copied from ${frag}" >> temp-frag
- cat ${frag} >> temp-frag
- fi
-done
-
-frag=xhost-mkfrag
-${moveifchange} temp-frag xhost-mkfrag
diff --git a/contrib/gdb/libiberty/config/mh-a68bsd b/contrib/gdb/libiberty/config/mh-a68bsd
deleted file mode 100644
index 3c5a237e60ba..000000000000
--- a/contrib/gdb/libiberty/config/mh-a68bsd
+++ /dev/null
@@ -1,2 +0,0 @@
-RANLIB=ranlib
-CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__
diff --git a/contrib/gdb/libiberty/config/mh-aix b/contrib/gdb/libiberty/config/mh-aix
deleted file mode 100644
index c7b848d976aa..000000000000
--- a/contrib/gdb/libiberty/config/mh-aix
+++ /dev/null
@@ -1,10 +0,0 @@
-HDEFINES = -D__IEEE_BIG_ENDIAN
-RANLIB=true
-INSTALL=cp
-
-# Most releases of AIX 3.1 include an incorrect internal version of copysign
-# in libc.a for use by some libc public functions including modf. The public
-# version of copysign in libm.a is usable. For the sake of libg++ (which
-# uses modf), we add copysign here. Supposedly, this problem is fixed in AIX
-# 3.1.8 and above, including all releases of AIX 3.2.
-EXTRA_OFILES = copysign.o
diff --git a/contrib/gdb/libiberty/config/mh-apollo68 b/contrib/gdb/libiberty/config/mh-apollo68
deleted file mode 100644
index 651770ce31cd..000000000000
--- a/contrib/gdb/libiberty/config/mh-apollo68
+++ /dev/null
@@ -1,2 +0,0 @@
-RANLIB=true
-CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__
diff --git a/contrib/gdb/libiberty/config/mh-cxux7 b/contrib/gdb/libiberty/config/mh-cxux7
deleted file mode 100644
index 6d4d30bf46ff..000000000000
--- a/contrib/gdb/libiberty/config/mh-cxux7
+++ /dev/null
@@ -1,3 +0,0 @@
-HDEFINES = -DHAVE_SYSCONF -DHARRIS_FLOAT_FORMAT
-RANLIB=true
-INSTALL = cp
diff --git a/contrib/gdb/libiberty/config/mh-go32 b/contrib/gdb/libiberty/config/mh-go32
deleted file mode 100644
index 7c9fe4fa0bf0..000000000000
--- a/contrib/gdb/libiberty/config/mh-go32
+++ /dev/null
@@ -1,4 +0,0 @@
-HDEFINES=-DHAVE_GETRUSAGE
-CC=i386-go32-gcc -O2 -fno-omit-frame-pointer
-AR=i386-go32-ar
-RANLIB=i386-go32-ranlib
diff --git a/contrib/gdb/libiberty/config/mh-hpbsd b/contrib/gdb/libiberty/config/mh-hpbsd
deleted file mode 100644
index ce11dcd6ac98..000000000000
--- a/contrib/gdb/libiberty/config/mh-hpbsd
+++ /dev/null
@@ -1,2 +0,0 @@
-# HPPA hosts using BSD
-RANLIB=true
diff --git a/contrib/gdb/libiberty/config/mh-irix4 b/contrib/gdb/libiberty/config/mh-irix4
deleted file mode 100644
index ace767827122..000000000000
--- a/contrib/gdb/libiberty/config/mh-irix4
+++ /dev/null
@@ -1,4 +0,0 @@
-CC = cc -cckr
-RANLIB = true
-INSTALL = cp
-EXTRA_OFILES = alloca.o
diff --git a/contrib/gdb/libiberty/config/mh-lynxos b/contrib/gdb/libiberty/config/mh-lynxos
deleted file mode 100644
index 2f22110e880c..000000000000
--- a/contrib/gdb/libiberty/config/mh-lynxos
+++ /dev/null
@@ -1 +0,0 @@
-HDEFINES = -DLOSING_SYS_SIGLIST
diff --git a/contrib/gdb/libiberty/config/mh-ncr3000 b/contrib/gdb/libiberty/config/mh-ncr3000
deleted file mode 100644
index 3a45c22b1281..000000000000
--- a/contrib/gdb/libiberty/config/mh-ncr3000
+++ /dev/null
@@ -1,19 +0,0 @@
-# Host configuration file 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.
-# Unfortunately though, the AT&T compiler sometimes generates code that
-# the assembler barfs on if -g is used, so disable it by default as well.
-CC = /usr/ccs/ATT/cc
-CFLAGS =
-
-RANLIB = true
-
-# The /usr/ucb/install program is incompatible (complains about unknown
-# group staff). Use good old cp...
-INSTALL = cp
-
-# The l flag generates a warning from the SVR4 archiver, remove it.
-AR_FLAGS = cq
diff --git a/contrib/gdb/libiberty/config/mh-riscix b/contrib/gdb/libiberty/config/mh-riscix
deleted file mode 100644
index 0209279de56a..000000000000
--- a/contrib/gdb/libiberty/config/mh-riscix
+++ /dev/null
@@ -1,6 +0,0 @@
-# The native linker only reports the first undefined symbol if linking with a
-# shared library. So build using gcc and link statically (this requires
-# gcc 2.6.0 or above).
-
-ERRORS_CC = gcc
-ERRORS_LDFLAGS = -static
diff --git a/contrib/gdb/libiberty/config/mh-sysv b/contrib/gdb/libiberty/config/mh-sysv
deleted file mode 100644
index eb102d550108..000000000000
--- a/contrib/gdb/libiberty/config/mh-sysv
+++ /dev/null
@@ -1 +0,0 @@
-RANLIB=true
diff --git a/contrib/gdb/libiberty/config/mh-sysv4 b/contrib/gdb/libiberty/config/mh-sysv4
deleted file mode 100644
index 4d1aa3cd61d5..000000000000
--- a/contrib/gdb/libiberty/config/mh-sysv4
+++ /dev/null
@@ -1,3 +0,0 @@
-HDEFINES = -DHAVE_SYSCONF
-RANLIB=true
-INSTALL = cp
diff --git a/contrib/gdb/libiberty/config/mt-sunos4 b/contrib/gdb/libiberty/config/mt-sunos4
deleted file mode 100644
index c25baa6ead68..000000000000
--- a/contrib/gdb/libiberty/config/mt-sunos4
+++ /dev/null
@@ -1,2 +0,0 @@
-XTRAFLAGS = -isystem /s1/cygnus/dejagnu/sparc-sun-sunos4.1.3/include/
-LOADLIBES = -L/s1/cygnus/dejagnu/sparc-sun-sunos4.1.3/lib
diff --git a/contrib/gdb/libiberty/config/mt-vxworks5 b/contrib/gdb/libiberty/config/mt-vxworks5
deleted file mode 100644
index f1a46d361ae2..000000000000
--- a/contrib/gdb/libiberty/config/mt-vxworks5
+++ /dev/null
@@ -1,27 +0,0 @@
-# VxWorks 5.x target Makefile fragment.
-# The autoconfiguration fails for a VxWorks target, because the
-# libraries are actually on the target board, not in the file system.
-# Therefore, we compute the dependencies by hand.
-
-HDEFINES = -DNO_SYS_PARAM_H
-CONFIG_H = vxconfig.h
-NEEDED_LIST = vxneeded-list
-
-vxconfig.h: Makefile
- if [ -f ../newlib/Makefile ]; then \
- $(MAKE) $(FLAGS_TO_PASS) xconfig.h; \
- cp xconfig.h vxconfig.h; \
- else \
- echo "#define NEED_sys_nerr 1" >vxconfig.h; \
- echo "#define NEED_sys_errlist 1" >>vxconfig.h; \
- echo "#define NEED_sys_siglist 1" >>vxconfig.h; \
- echo "#define NEED_psignal 1" >>vxconfig.h; \
- fi
-
-vxneeded-list: Makefile
- if [ -f ../newlib/Makefile ]; then \
- $(MAKE) $(FLAGS_TO_PASS) xneeded-list; \
- cp xneeded-list vxneeded-list; \
- else \
- echo getopt.o getpagesize.o insque.o random.o strcasecmp.o strncasecmp.o strdup.o vfork.o sigsetmask.o waitpid.o >vxneeded-list; \
- fi
diff --git a/contrib/gdb/libiberty/configure.bat b/contrib/gdb/libiberty/configure.bat
deleted file mode 100644
index ed33777174b3..000000000000
--- a/contrib/gdb/libiberty/configure.bat
+++ /dev/null
@@ -1,15 +0,0 @@
-@echo off
-if "%1" == "h8/300" goto h8300
-
-echo Configuring libiberty for go32
-copy Makefile.dos Makefile
-echo #define NEED_sys_siglist 1 >> config.h
-echo #define NEED_psignal 1 >> config.h
-update alloca-normal.h alloca-conf.h
-goto exit
-
-:h8300
-echo Configuring libiberty for H8/300
-copy Makefile.dos Makefile
-
-:exit
diff --git a/contrib/gdb/libiberty/configure.in b/contrib/gdb/libiberty/configure.in
deleted file mode 100644
index 84e4eac6c89e..000000000000
--- a/contrib/gdb/libiberty/configure.in
+++ /dev/null
@@ -1,77 +0,0 @@
-# This file is a shell script fragment that supplies the information
-# necessary for a configure script to process the program in
-# this directory. For more information, look at ../configure.
-
-configdirs=
-srctrigger=getopt1.c
-srcname="-liberty library"
-
-# per-host:
-
-files="alloca-norm.h"
-links="alloca-conf.h"
-
-. ${srcdir}/config.table
-host_makefile_frag=${frag}
-
-# per-target:
-
-# post-target:
-
-# If this is the target libiberty, check at compile time whether we are using
-# newlib. If we are, we already know the files we need, since the linker
-# will fail when run on some of the newlib targets.
-if [ -n "${with_target_subdir}" ] ; then
- cat > Makefile.tem <<'!EOF!'
-CONFIG_H = xconfig.h
-NEEDED_LIST = xneeded-list
-
-xconfig.h: Makefile
- if [ -f ../newlib/Makefile ]; then \
- echo "#define NEED_sys_nerr 1" >xconfig.h; \
- echo "#define NEED_sys_errlist 1" >>xconfig.h; \
- echo "#define NEED_sys_siglist 1" >>xconfig.h; \
- echo "#define NEED_psignal 1" >>xconfig.h; \
- else \
- $(MAKE) $(FLAGS_TO_PASS) lconfig.h; \
- cp lconfig.h xconfig.h; \
- fi
-
-xneeded-list: Makefile
- if [ -f ../newlib/Makefile ]; then \
- echo insque.o random.o strdup.o alloca.o >xneeded-list; \
- else \
- $(MAKE) $(FLAGS_TO_PASS) lneeded-list; \
- cp lneeded-list xneeded-list; \
- fi
-!EOF!
-sed -e "/^####/ r Makefile.tem" \
- -e '/INSTALL_DEST =/s/libdir/tooldir/' ${Makefile} > Makefile.tem3
-mv Makefile.tem3 ${Makefile}
-rm -f Makefile.tem
-fi
-
-# We need multilib support, but only if configuring for the target.
-if [ -n "${with_target_subdir}" ] ; then
- case ${srcdir} in
- .)
- if [ "${with_target_subdir}" != "." ] ; then
-
- # Set MULTISRCTOP to the value we need if we are not doing
- # multilib. This will be overridden if --enable-multilib was
- # used.
- sed -e "s:^MULTISRCTOP[ ]*=.*$:MULTISRCTOP = ../:" \
- ${Makefile} > Makefile.tem
- rm -f ${Makefile}
- mv Makefile.tem ${Makefile}
-
- . ${srcdir}/${with_multisrctop}../../config-ml.in
- else
- . ${srcdir}/${with_multisrctop}../config-ml.in
- fi
- ;;
- *)
- . ${srcdir}/../config-ml.in
- ;;
- esac
-fi
diff --git a/contrib/gdb/libiberty/copysign.c b/contrib/gdb/libiberty/copysign.c
deleted file mode 100644
index 0b5f8c3d9df8..000000000000
--- a/contrib/gdb/libiberty/copysign.c
+++ /dev/null
@@ -1,140 +0,0 @@
-#include <ansidecl.h>
-
-#ifdef __IEEE_BIG_ENDIAN
-
-typedef union
-{
- double value;
- struct
- {
- unsigned int sign : 1;
- unsigned int exponent: 11;
- unsigned int fraction0:4;
- unsigned int fraction1:16;
- unsigned int fraction2:16;
- unsigned int fraction3:16;
-
- } number;
- struct
- {
- unsigned int sign : 1;
- unsigned int exponent: 11;
- unsigned int quiet:1;
- unsigned int function0:3;
- unsigned int function1:16;
- unsigned int function2:16;
- unsigned int function3:16;
- } nan;
- struct
- {
- unsigned long msw;
- unsigned long lsw;
- } parts;
- long aslong[2];
-} __ieee_double_shape_type;
-
-#endif
-
-#ifdef __IEEE_LITTLE_ENDIAN
-
-typedef union
-{
- double value;
- struct
- {
-#ifdef __SMALL_BITFIELDS
- unsigned int fraction3:16;
- unsigned int fraction2:16;
- unsigned int fraction1:16;
- unsigned int fraction0: 4;
-#else
- unsigned int fraction1:32;
- unsigned int fraction0:20;
-#endif
- unsigned int exponent :11;
- unsigned int sign : 1;
- } number;
- struct
- {
-#ifdef __SMALL_BITFIELDS
- unsigned int function3:16;
- unsigned int function2:16;
- unsigned int function1:16;
- unsigned int function0:3;
-#else
- unsigned int function1:32;
- unsigned int function0:19;
-#endif
- unsigned int quiet:1;
- unsigned int exponent: 11;
- unsigned int sign : 1;
- } nan;
- struct
- {
- unsigned long lsw;
- unsigned long msw;
- } parts;
-
- long aslong[2];
-
-} __ieee_double_shape_type;
-
-#endif
-
-#ifdef __IEEE_BIG_ENDIAN
-typedef union
-{
- float value;
- struct
- {
- unsigned int sign : 1;
- unsigned int exponent: 8;
- unsigned int fraction0: 7;
- unsigned int fraction1: 16;
- } number;
- struct
- {
- unsigned int sign:1;
- unsigned int exponent:8;
- unsigned int quiet:1;
- unsigned int function0:6;
- unsigned int function1:16;
- } nan;
- long p1;
-
-} __ieee_float_shape_type;
-#endif
-
-#ifdef __IEEE_LITTLE_ENDIAN
-typedef union
-{
- float value;
- struct
- {
- unsigned int fraction0: 7;
- unsigned int fraction1: 16;
- unsigned int exponent: 8;
- unsigned int sign : 1;
- } number;
- struct
- {
- unsigned int function1:16;
- unsigned int function0:6;
- unsigned int quiet:1;
- unsigned int exponent:8;
- unsigned int sign:1;
- } nan;
- long p1;
-
-} __ieee_float_shape_type;
-#endif
-
-
-double DEFUN(copysign, (x, y), double x AND double y)
-{
- __ieee_double_shape_type a,b;
- b.value = y;
- a.value = x;
- a.number.sign =b.number.sign;
- return a.value;
-}
diff --git a/contrib/gdb/libiberty/cplus-dem.c b/contrib/gdb/libiberty/cplus-dem.c
deleted file mode 100644
index a7f868022789..000000000000
--- a/contrib/gdb/libiberty/cplus-dem.c
+++ /dev/null
@@ -1,3019 +0,0 @@
-/* Demangler for GNU C++
- Copyright 1989, 1991, 1994, 1995, 1996 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.uucp)
- Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
-
-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; cplus_mangle_opname and cplus_demangle.
-
- This file imports xmalloc and xrealloc, which are like malloc and
- realloc except that they generate a fatal error if there is no
- available memory. */
-
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <demangle.h>
-#undef CURRENT_DEMANGLING_STYLE
-#define CURRENT_DEMANGLING_STYLE work->options
-
-extern char *xmalloc PARAMS((unsigned));
-extern char *xrealloc PARAMS((char *, unsigned));
-
-char *
-mystrstr (s1, s2)
- char *s1, *s2;
-{
- register char *p = s1;
- register int len = strlen (s2);
-
- for (; (p = strchr (p, *s2)) != 0; p++)
- {
- if (strncmp (p, s2, len) == 0)
- {
- return (p);
- }
- }
- return (0);
-}
-
-/* In order to allow a single demangler executable to demangle strings
- using various common values of CPLUS_MARKER, as well as any specific
- one set at compile time, we maintain a string containing all the
- commonly used ones, and check to see if the marker we are looking for
- is in that string. CPLUS_MARKER is usually '$' on systems where the
- assembler can deal with that. Where the assembler can't, it's usually
- '.' (but on many systems '.' is used for other things). We put the
- current defined CPLUS_MARKER first (which defaults to '$'), followed
- by the next most common value, followed by an explicit '$' in case
- the value of CPLUS_MARKER is not '$'.
-
- We could avoid this if we could just get g++ to tell us what the actual
- cplus marker character is as part of the debug information, perhaps by
- ensuring that it is the character that terminates the gcc<n>_compiled
- marker symbol (FIXME). */
-
-#if !defined (CPLUS_MARKER)
-#define CPLUS_MARKER '$'
-#endif
-
-enum demangling_styles current_demangling_style = gnu_demangling;
-
-static char cplus_markers[] = { CPLUS_MARKER, '.', '$', '\0' };
-
-void
-set_cplus_marker_for_demangling (ch)
- int ch;
-{
- cplus_markers[0] = ch;
-}
-
-/* Stuff that is shared between sub-routines.
- * Using a shared structure allows cplus_demangle to be reentrant. */
-
-struct work_stuff
-{
- int options;
- char **typevec;
- int ntypes;
- int typevec_size;
- int constructor;
- int destructor;
- int static_type; /* A static member function */
- int const_type; /* A const member function */
-};
-
-#define PRINT_ANSI_QUALIFIERS (work -> options & DMGL_ANSI)
-#define PRINT_ARG_TYPES (work -> options & DMGL_PARAMS)
-
-static const struct optable
-{
- const char *in;
- const char *out;
- int flags;
-} optable[] = {
- {"nw", " new", DMGL_ANSI}, /* new (1.92, ansi) */
- {"dl", " delete", DMGL_ANSI}, /* new (1.92, ansi) */
- {"new", " new", 0}, /* old (1.91, and 1.x) */
- {"delete", " delete", 0}, /* old (1.91, and 1.x) */
- {"vn", " new []", DMGL_ANSI}, /* GNU, pending ansi */
- {"vd", " delete []", DMGL_ANSI}, /* GNU, pending ansi */
- {"as", "=", DMGL_ANSI}, /* ansi */
- {"ne", "!=", DMGL_ANSI}, /* old, ansi */
- {"eq", "==", DMGL_ANSI}, /* old, ansi */
- {"ge", ">=", DMGL_ANSI}, /* old, ansi */
- {"gt", ">", DMGL_ANSI}, /* old, ansi */
- {"le", "<=", DMGL_ANSI}, /* old, ansi */
- {"lt", "<", DMGL_ANSI}, /* old, ansi */
- {"plus", "+", 0}, /* old */
- {"pl", "+", DMGL_ANSI}, /* ansi */
- {"apl", "+=", DMGL_ANSI}, /* ansi */
- {"minus", "-", 0}, /* old */
- {"mi", "-", DMGL_ANSI}, /* ansi */
- {"ami", "-=", DMGL_ANSI}, /* ansi */
- {"mult", "*", 0}, /* old */
- {"ml", "*", DMGL_ANSI}, /* ansi */
- {"amu", "*=", DMGL_ANSI}, /* ansi (ARM/Lucid) */
- {"aml", "*=", DMGL_ANSI}, /* ansi (GNU/g++) */
- {"convert", "+", 0}, /* old (unary +) */
- {"negate", "-", 0}, /* old (unary -) */
- {"trunc_mod", "%", 0}, /* old */
- {"md", "%", DMGL_ANSI}, /* ansi */
- {"amd", "%=", DMGL_ANSI}, /* ansi */
- {"trunc_div", "/", 0}, /* old */
- {"dv", "/", DMGL_ANSI}, /* ansi */
- {"adv", "/=", DMGL_ANSI}, /* ansi */
- {"truth_andif", "&&", 0}, /* old */
- {"aa", "&&", DMGL_ANSI}, /* ansi */
- {"truth_orif", "||", 0}, /* old */
- {"oo", "||", DMGL_ANSI}, /* ansi */
- {"truth_not", "!", 0}, /* old */
- {"nt", "!", DMGL_ANSI}, /* ansi */
- {"postincrement","++", 0}, /* old */
- {"pp", "++", DMGL_ANSI}, /* ansi */
- {"postdecrement","--", 0}, /* old */
- {"mm", "--", DMGL_ANSI}, /* ansi */
- {"bit_ior", "|", 0}, /* old */
- {"or", "|", DMGL_ANSI}, /* ansi */
- {"aor", "|=", DMGL_ANSI}, /* ansi */
- {"bit_xor", "^", 0}, /* old */
- {"er", "^", DMGL_ANSI}, /* ansi */
- {"aer", "^=", DMGL_ANSI}, /* ansi */
- {"bit_and", "&", 0}, /* old */
- {"ad", "&", DMGL_ANSI}, /* ansi */
- {"aad", "&=", DMGL_ANSI}, /* ansi */
- {"bit_not", "~", 0}, /* old */
- {"co", "~", DMGL_ANSI}, /* ansi */
- {"call", "()", 0}, /* old */
- {"cl", "()", DMGL_ANSI}, /* ansi */
- {"alshift", "<<", 0}, /* old */
- {"ls", "<<", DMGL_ANSI}, /* ansi */
- {"als", "<<=", DMGL_ANSI}, /* ansi */
- {"arshift", ">>", 0}, /* old */
- {"rs", ">>", DMGL_ANSI}, /* ansi */
- {"ars", ">>=", DMGL_ANSI}, /* ansi */
- {"component", "->", 0}, /* old */
- {"pt", "->", DMGL_ANSI}, /* ansi; Lucid C++ form */
- {"rf", "->", DMGL_ANSI}, /* ansi; ARM/GNU form */
- {"indirect", "*", 0}, /* old */
- {"method_call", "->()", 0}, /* old */
- {"addr", "&", 0}, /* old (unary &) */
- {"array", "[]", 0}, /* old */
- {"vc", "[]", DMGL_ANSI}, /* ansi */
- {"compound", ", ", 0}, /* old */
- {"cm", ", ", DMGL_ANSI}, /* ansi */
- {"cond", "?:", 0}, /* old */
- {"cn", "?:", DMGL_ANSI}, /* pseudo-ansi */
- {"max", ">?", 0}, /* old */
- {"mx", ">?", DMGL_ANSI}, /* pseudo-ansi */
- {"min", "<?", 0}, /* old */
- {"mn", "<?", DMGL_ANSI}, /* pseudo-ansi */
- {"nop", "", 0}, /* old (for operator=) */
- {"rm", "->*", DMGL_ANSI} /* ansi */
-};
-
-
-typedef struct string /* Beware: these aren't required to be */
-{ /* '\0' terminated. */
- char *b; /* pointer to start of string */
- char *p; /* pointer after last character */
- char *e; /* pointer after end of allocated space */
-} string;
-
-#define STRING_EMPTY(str) ((str) -> b == (str) -> p)
-#define PREPEND_BLANK(str) {if (!STRING_EMPTY(str)) \
- string_prepend(str, " ");}
-#define APPEND_BLANK(str) {if (!STRING_EMPTY(str)) \
- string_append(str, " ");}
-
-#define ARM_VTABLE_STRING "__vtbl__" /* Lucid/ARM virtual table prefix */
-#define ARM_VTABLE_STRLEN 8 /* strlen (ARM_VTABLE_STRING) */
-
-/* Prototypes for local functions */
-
-static char *
-mop_up PARAMS ((struct work_stuff *, string *, int));
-
-#if 0
-static int
-demangle_method_args PARAMS ((struct work_stuff *work, const char **, string *));
-#endif
-
-static int
-demangle_template PARAMS ((struct work_stuff *work, const char **, string *,
- string *));
-
-static int
-demangle_qualified PARAMS ((struct work_stuff *, const char **, string *,
- int, int));
-
-static int
-demangle_class PARAMS ((struct work_stuff *, const char **, string *));
-
-static int
-demangle_fund_type PARAMS ((struct work_stuff *, const char **, string *));
-
-static int
-demangle_signature PARAMS ((struct work_stuff *, const char **, string *));
-
-static int
-demangle_prefix PARAMS ((struct work_stuff *, const char **, string *));
-
-static int
-gnu_special PARAMS ((struct work_stuff *, const char **, string *));
-
-static int
-arm_special PARAMS ((struct work_stuff *, const char **, string *));
-
-static void
-string_need PARAMS ((string *, int));
-
-static void
-string_delete PARAMS ((string *));
-
-static void
-string_init PARAMS ((string *));
-
-static void
-string_clear PARAMS ((string *));
-
-#if 0
-static int
-string_empty PARAMS ((string *));
-#endif
-
-static void
-string_append PARAMS ((string *, const char *));
-
-static void
-string_appends PARAMS ((string *, string *));
-
-static void
-string_appendn PARAMS ((string *, const char *, int));
-
-static void
-string_prepend PARAMS ((string *, const char *));
-
-static void
-string_prependn PARAMS ((string *, const char *, int));
-
-static int
-get_count PARAMS ((const char **, int *));
-
-static int
-consume_count PARAMS ((const char **));
-
-static int
-demangle_args PARAMS ((struct work_stuff *, const char **, string *));
-
-static int
-do_type PARAMS ((struct work_stuff *, const char **, string *));
-
-static int
-do_arg PARAMS ((struct work_stuff *, const char **, string *));
-
-static void
-demangle_function_name PARAMS ((struct work_stuff *, const char **, string *,
- const char *));
-
-static void
-remember_type PARAMS ((struct work_stuff *, const char *, int));
-
-static void
-forget_types PARAMS ((struct work_stuff *));
-
-static void
-string_prepends PARAMS ((string *, string *));
-
-/* Translate count to integer, consuming tokens in the process.
- Conversion terminates on the first non-digit character.
- Trying to consume something that isn't a count results in
- no consumption of input and a return of 0. */
-
-static int
-consume_count (type)
- const char **type;
-{
- int count = 0;
-
- while (isdigit (**type))
- {
- count *= 10;
- count += **type - '0';
- (*type)++;
- }
- return (count);
-}
-
-int
-cplus_demangle_opname (opname, result, options)
- const char *opname;
- char *result;
- int options;
-{
- int len, i, len1, ret;
- string type;
- struct work_stuff work[1];
- const char *tem;
-
- len = strlen(opname);
- result[0] = '\0';
- ret = 0;
- work->options = options;
-
- if (opname[0] == '_' && opname[1] == '_'
- && opname[2] == 'o' && opname[3] == 'p')
- {
- /* ANSI. */
- /* type conversion operator. */
- tem = opname + 4;
- if (do_type (work, &tem, &type))
- {
- strcat (result, "operator ");
- strncat (result, type.b, type.p - type.b);
- string_delete (&type);
- ret = 1;
- }
- }
- else if (opname[0] == '_' && opname[1] == '_'
- && opname[2] >= 'a' && opname[2] <= 'z'
- && opname[3] >= 'a' && opname[3] <= 'z')
- {
- if (opname[4] == '\0')
- {
- /* Operator. */
- for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
- {
- if (strlen (optable[i].in) == 2
- && memcmp (optable[i].in, opname + 2, 2) == 0)
- {
- strcat (result, "operator");
- strcat (result, optable[i].out);
- ret = 1;
- break;
- }
- }
- }
- else
- {
- if (opname[2] == 'a' && opname[5] == '\0')
- {
- /* Assignment. */
- for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
- {
- if (strlen (optable[i].in) == 3
- && memcmp (optable[i].in, opname + 2, 3) == 0)
- {
- strcat (result, "operator");
- strcat (result, optable[i].out);
- ret = 1;
- break;
- }
- }
- }
- }
- }
- else if (len >= 3
- && opname[0] == 'o'
- && opname[1] == 'p'
- && strchr (cplus_markers, opname[2]) != NULL)
- {
- /* see if it's an assignment expression */
- if (len >= 10 /* op$assign_ */
- && memcmp (opname + 3, "assign_", 7) == 0)
- {
- for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
- {
- len1 = len - 10;
- if (strlen (optable[i].in) == len1
- && memcmp (optable[i].in, opname + 10, len1) == 0)
- {
- strcat (result, "operator");
- strcat (result, optable[i].out);
- strcat (result, "=");
- ret = 1;
- break;
- }
- }
- }
- else
- {
- for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
- {
- len1 = len - 3;
- if (strlen (optable[i].in) == len1
- && memcmp (optable[i].in, opname + 3, len1) == 0)
- {
- strcat (result, "operator");
- strcat (result, optable[i].out);
- ret = 1;
- break;
- }
- }
- }
- }
- else if (len >= 5 && memcmp (opname, "type", 4) == 0
- && strchr (cplus_markers, opname[4]) != NULL)
- {
- /* type conversion operator */
- tem = opname + 5;
- if (do_type (work, &tem, &type))
- {
- strcat (result, "operator ");
- strncat (result, type.b, type.p - type.b);
- string_delete (&type);
- ret = 1;
- }
- }
- return ret;
-
-}
-/* Takes operator name as e.g. "++" and returns mangled
- operator name (e.g. "postincrement_expr"), or NULL if not found.
-
- If OPTIONS & DMGL_ANSI == 1, return the ANSI name;
- if OPTIONS & DMGL_ANSI == 0, return the old GNU name. */
-
-const char *
-cplus_mangle_opname (opname, options)
- const char *opname;
- int options;
-{
- int i;
- int len;
-
- len = strlen (opname);
- for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
- {
- if (strlen (optable[i].out) == len
- && (options & DMGL_ANSI) == (optable[i].flags & DMGL_ANSI)
- && memcmp (optable[i].out, opname, len) == 0)
- return optable[i].in;
- }
- return (0);
-}
-
-/* check to see whether MANGLED can match TEXT in the first TEXT_LEN
- characters. */
-
-int cplus_match (mangled, text, text_len)
- const char *mangled;
- char *text;
- int text_len;
-{
- if (strncmp (mangled, text, text_len) != 0) {
- return(0); /* cannot match either */
- } else {
- return(1); /* matches mangled, may match demangled */
- }
-}
-
-/* char *cplus_demangle (const char *mangled, int options)
-
- If MANGLED is a mangled function name produced by GNU C++, then
- a pointer to a malloced string giving a C++ representation
- of the name will be returned; otherwise NULL will be returned.
- It is the caller's responsibility to free the string which
- is returned.
-
- The OPTIONS arg may contain one or more of the following bits:
-
- DMGL_ANSI ANSI qualifiers such as `const' and `void' are
- included.
- DMGL_PARAMS Function parameters are included.
-
- For example,
-
- cplus_demangle ("foo__1Ai", DMGL_PARAMS) => "A::foo(int)"
- cplus_demangle ("foo__1Ai", DMGL_PARAMS | DMGL_ANSI) => "A::foo(int)"
- cplus_demangle ("foo__1Ai", 0) => "A::foo"
-
- cplus_demangle ("foo__1Afe", DMGL_PARAMS) => "A::foo(float,...)"
- cplus_demangle ("foo__1Afe", DMGL_PARAMS | DMGL_ANSI)=> "A::foo(float,...)"
- cplus_demangle ("foo__1Afe", 0) => "A::foo"
-
- Note that any leading underscores, or other such characters prepended by
- the compilation system, are presumed to have already been stripped from
- MANGLED. */
-
-char *
-cplus_demangle (mangled, options)
- const char *mangled;
- int options;
-{
- string decl;
- int success = 0;
- struct work_stuff work[1];
- char *demangled = NULL;
-
- if ((mangled != NULL) && (*mangled != '\0'))
- {
- memset ((char *) work, 0, sizeof (work));
- work -> options = options;
- if ((work->options & DMGL_STYLE_MASK) == 0)
- work->options |= (int)current_demangling_style & DMGL_STYLE_MASK;
-
- string_init (&decl);
-
- /* First check to see if gnu style demangling is active and if the
- string to be demangled contains a CPLUS_MARKER. If so, attempt to
- recognize one of the gnu special forms rather than looking for a
- standard prefix. In particular, don't worry about whether there
- is a "__" string in the mangled string. Consider "_$_5__foo" for
- example. */
-
- if ((AUTO_DEMANGLING || GNU_DEMANGLING))
- {
- success = gnu_special (work, &mangled, &decl);
- }
- if (!success)
- {
- success = demangle_prefix (work, &mangled, &decl);
- }
- if (success && (*mangled != '\0'))
- {
- success = demangle_signature (work, &mangled, &decl);
- }
- if (work->constructor == 2)
- {
- string_prepend(&decl, "global constructors keyed to ");
- work->constructor = 0;
- }
- else if (work->destructor == 2)
- {
- string_prepend(&decl, "global destructors keyed to ");
- work->destructor = 0;
- }
- demangled = mop_up (work, &decl, success);
- }
- return (demangled);
-}
-
-static char *
-mop_up (work, declp, success)
- struct work_stuff *work;
- string *declp;
- int success;
-{
- char *demangled = NULL;
-
- /* Discard the remembered types, if any. */
-
- forget_types (work);
- if (work -> typevec != NULL)
- {
- free ((char *) work -> typevec);
- }
-
- /* If demangling was successful, ensure that the demangled string is null
- terminated and return it. Otherwise, free the demangling decl. */
-
- if (!success)
- {
- string_delete (declp);
- }
- else
- {
- string_appendn (declp, "", 1);
- demangled = declp -> b;
- }
- return (demangled);
-}
-
-/*
-
-LOCAL FUNCTION
-
- demangle_signature -- demangle the signature part of a mangled name
-
-SYNOPSIS
-
- static int
- demangle_signature (struct work_stuff *work, const char **mangled,
- string *declp);
-
-DESCRIPTION
-
- Consume and demangle the signature portion of the mangled name.
-
- DECLP is the string where demangled output is being built. At
- entry it contains the demangled root name from the mangled name
- prefix. I.E. either a demangled operator name or the root function
- name. In some special cases, it may contain nothing.
-
- *MANGLED points to the current unconsumed location in the mangled
- name. As tokens are consumed and demangling is performed, the
- pointer is updated to continuously point at the next token to
- be consumed.
-
- Demangling GNU style mangled names is nasty because there is no
- explicit token that marks the start of the outermost function
- argument list.
-*/
-
-static int
-demangle_signature (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
-{
- int success = 1;
- int func_done = 0;
- int expect_func = 0;
- const char *oldmangled = NULL;
- string trawname;
- string tname;
-
- while (success && (**mangled != '\0'))
- {
- switch (**mangled)
- {
- case 'Q':
- oldmangled = *mangled;
- success = demangle_qualified (work, mangled, declp, 1, 0);
- if (success)
- {
- remember_type (work, oldmangled, *mangled - oldmangled);
- }
- if (AUTO_DEMANGLING || GNU_DEMANGLING)
- {
- expect_func = 1;
- }
- oldmangled = NULL;
- break;
-
- case 'S':
- /* Static member function */
- if (oldmangled == NULL)
- {
- oldmangled = *mangled;
- }
- (*mangled)++;
- work -> static_type = 1;
- break;
-
- case 'C':
- /* a const member function */
- if (oldmangled == NULL)
- {
- oldmangled = *mangled;
- }
- (*mangled)++;
- work -> const_type = 1;
- break;
-
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- if (oldmangled == NULL)
- {
- oldmangled = *mangled;
- }
- success = demangle_class (work, mangled, declp);
- if (success)
- {
- remember_type (work, oldmangled, *mangled - oldmangled);
- }
- if (AUTO_DEMANGLING || GNU_DEMANGLING)
- {
- expect_func = 1;
- }
- oldmangled = NULL;
- break;
-
- case 'F':
- /* Function */
- /* ARM style demangling includes a specific 'F' character after
- the class name. For GNU style, it is just implied. So we can
- safely just consume any 'F' at this point and be compatible
- with either style. */
-
- oldmangled = NULL;
- func_done = 1;
- (*mangled)++;
-
- /* For lucid/ARM style we have to forget any types we might
- have remembered up to this point, since they were not argument
- types. GNU style considers all types seen as available for
- back references. See comment in demangle_args() */
-
- if (LUCID_DEMANGLING || ARM_DEMANGLING)
- {
- forget_types (work);
- }
- success = demangle_args (work, mangled, declp);
- break;
-
- case 't':
- /* G++ Template */
- string_init(&trawname);
- string_init(&tname);
- if (oldmangled == NULL)
- {
- oldmangled = *mangled;
- }
- success = demangle_template (work, mangled, &tname, &trawname);
- if (success)
- {
- remember_type (work, oldmangled, *mangled - oldmangled);
- }
- string_append(&tname, "::");
- string_prepends(declp, &tname);
- if (work -> destructor & 1)
- {
- string_prepend (&trawname, "~");
- string_appends (declp, &trawname);
- work->destructor -= 1;
- }
- if ((work->constructor & 1) || (work->destructor & 1))
- {
- string_appends (declp, &trawname);
- work->constructor -= 1;
- }
- string_delete(&trawname);
- string_delete(&tname);
- oldmangled = NULL;
- expect_func = 1;
- break;
-
- case '_':
- /* At the outermost level, we cannot have a return type specified,
- so if we run into another '_' at this point we are dealing with
- a mangled name that is either bogus, or has been mangled by
- some algorithm we don't know how to deal with. So just
- reject the entire demangling. */
- success = 0;
- break;
-
- default:
- if (AUTO_DEMANGLING || GNU_DEMANGLING)
- {
- /* Assume we have stumbled onto the first outermost function
- argument token, and start processing args. */
- func_done = 1;
- success = demangle_args (work, mangled, declp);
- }
- else
- {
- /* Non-GNU demanglers use a specific token to mark the start
- of the outermost function argument tokens. Typically 'F',
- for ARM-demangling, for example. So if we find something
- we are not prepared for, it must be an error. */
- success = 0;
- }
- break;
- }
-/*
- if (AUTO_DEMANGLING || GNU_DEMANGLING)
-*/
- {
- if (success && expect_func)
- {
- func_done = 1;
- success = demangle_args (work, mangled, declp);
- }
- }
- }
- if (success && !func_done)
- {
- if (AUTO_DEMANGLING || GNU_DEMANGLING)
- {
- /* With GNU style demangling, bar__3foo is 'foo::bar(void)', and
- bar__3fooi is 'foo::bar(int)'. We get here when we find the
- first case, and need to ensure that the '(void)' gets added to
- the current declp. Note that with ARM, the first case
- represents the name of a static data member 'foo::bar',
- which is in the current declp, so we leave it alone. */
- success = demangle_args (work, mangled, declp);
- }
- }
- if (success && work -> static_type && PRINT_ARG_TYPES)
- {
- string_append (declp, " static");
- }
- if (success && work -> const_type && PRINT_ARG_TYPES)
- {
- string_append (declp, " const");
- }
- return (success);
-}
-
-#if 0
-
-static int
-demangle_method_args (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
-{
- int success = 0;
-
- if (work -> static_type)
- {
- string_append (declp, *mangled + 1);
- *mangled += strlen (*mangled);
- success = 1;
- }
- else
- {
- success = demangle_args (work, mangled, declp);
- }
- return (success);
-}
-
-#endif
-
-static int
-demangle_template (work, mangled, tname, trawname)
- struct work_stuff *work;
- const char **mangled;
- string *tname;
- string *trawname;
-{
- int i;
- int is_pointer;
- int is_real;
- int is_integral;
- int is_char;
- int is_bool;
- int r;
- int need_comma = 0;
- int success = 0;
- int done;
- const char *old_p;
- const char *start;
- int symbol_len;
- string temp;
-
- (*mangled)++;
- start = *mangled;
- /* get template name */
- if ((r = consume_count (mangled)) == 0 || strlen (*mangled) < r)
- {
- return (0);
- }
- if (trawname)
- string_appendn (trawname, *mangled, r);
- string_appendn (tname, *mangled, r);
- *mangled += r;
- string_append (tname, "<");
- /* get size of template parameter list */
- if (!get_count (mangled, &r))
- {
- return (0);
- }
- for (i = 0; i < r; i++)
- {
- if (need_comma)
- {
- string_append (tname, ", ");
- }
- /* Z for type parameters */
- if (**mangled == 'Z')
- {
- (*mangled)++;
- /* temp is initialized in do_type */
- success = do_type (work, mangled, &temp);
- if (success)
- {
- string_appends (tname, &temp);
- }
- string_delete(&temp);
- if (!success)
- {
- break;
- }
- }
- else
- {
- /* otherwise, value parameter */
- old_p = *mangled;
- is_pointer = 0;
- is_real = 0;
- is_integral = 0;
- is_char = 0;
- is_bool = 0;
- done = 0;
- /* temp is initialized in do_type */
- success = do_type (work, mangled, &temp);
-/*
- if (success)
- {
- string_appends (tname, &temp);
- }
-*/
- string_delete(&temp);
- if (!success)
- {
- break;
- }
-/*
- string_append (tname, "=");
-*/
- while (*old_p && !done)
- {
- switch (*old_p)
- {
- case 'P':
- case 'p':
- case 'R':
- done = is_pointer = 1;
- break;
- case 'C': /* const */
- case 'S': /* explicitly signed [char] */
- case 'U': /* unsigned */
- case 'V': /* volatile */
- case 'F': /* function */
- case 'M': /* member function */
- case 'O': /* ??? */
- old_p++;
- continue;
- case 'Q': /* qualified name */
- done = is_integral = 1;
- break;
- case 'T': /* remembered type */
- abort ();
- break;
- case 'v': /* void */
- abort ();
- break;
- case 'x': /* long long */
- case 'l': /* long */
- case 'i': /* int */
- case 's': /* short */
- case 'w': /* wchar_t */
- done = is_integral = 1;
- break;
- case 'b': /* bool */
- done = is_bool = 1;
- break;
- case 'c': /* char */
- done = is_char = 1;
- break;
- case 'r': /* long double */
- case 'd': /* double */
- case 'f': /* float */
- done = is_real = 1;
- break;
- default:
- /* it's probably user defined type, let's assume
- it's integral, it seems hard to figure out
- what it really is */
- done = is_integral = 1;
- }
- }
- if (is_integral)
- {
- if (**mangled == 'm')
- {
- string_appendn (tname, "-", 1);
- (*mangled)++;
- }
- while (isdigit (**mangled))
- {
- string_appendn (tname, *mangled, 1);
- (*mangled)++;
- }
- }
- else if (is_char)
- {
- char tmp[2];
- int val;
- if (**mangled == 'm')
- {
- string_appendn (tname, "-", 1);
- (*mangled)++;
- }
- string_appendn (tname, "'", 1);
- val = consume_count(mangled);
- if (val == 0)
- {
- success = 0;
- break;
- }
- tmp[0] = (char)val;
- tmp[1] = '\0';
- string_appendn (tname, &tmp[0], 1);
- string_appendn (tname, "'", 1);
- }
- else if (is_bool)
- {
- int val = consume_count (mangled);
- if (val == 0)
- string_appendn (tname, "false", 5);
- else if (val == 1)
- string_appendn (tname, "true", 4);
- else
- success = 0;
- }
- else if (is_real)
- {
- if (**mangled == 'm')
- {
- string_appendn (tname, "-", 1);
- (*mangled)++;
- }
- while (isdigit (**mangled))
- {
- string_appendn (tname, *mangled, 1);
- (*mangled)++;
- }
- if (**mangled == '.') /* fraction */
- {
- string_appendn (tname, ".", 1);
- (*mangled)++;
- while (isdigit (**mangled))
- {
- string_appendn (tname, *mangled, 1);
- (*mangled)++;
- }
- }
- if (**mangled == 'e') /* exponent */
- {
- string_appendn (tname, "e", 1);
- (*mangled)++;
- while (isdigit (**mangled))
- {
- string_appendn (tname, *mangled, 1);
- (*mangled)++;
- }
- }
- }
- else if (is_pointer)
- {
- if (!get_count (mangled, &symbol_len))
- {
- success = 0;
- break;
- }
- if (symbol_len == 0)
- string_appendn (tname, "0", 1);
- else
- {
- char *p = xmalloc (symbol_len + 1), *q;
- strncpy (p, *mangled, symbol_len);
- p [symbol_len] = '\0';
- q = cplus_demangle (p, work->options);
- string_appendn (tname, "&", 1);
- if (q)
- {
- string_append (tname, q);
- free (q);
- }
- else
- string_append (tname, p);
- free (p);
- }
- *mangled += symbol_len;
- }
- }
- need_comma = 1;
- }
- if (tname->p[-1] == '>')
- string_append (tname, " ");
- string_append (tname, ">");
-
-/*
- if (work -> static_type)
- {
- string_append (declp, *mangled + 1);
- *mangled += strlen (*mangled);
- success = 1;
- }
- else
- {
- success = demangle_args (work, mangled, declp);
- }
- }
-*/
- return (success);
-}
-
-static int
-arm_pt (work, mangled, n, anchor, args)
- struct work_stuff *work;
- const char *mangled;
- int n;
- const char **anchor, **args;
-{
- /* ARM template? */
- if (ARM_DEMANGLING && (*anchor = mystrstr (mangled, "__pt__")))
- {
- int len;
- *args = *anchor + 6;
- len = consume_count (args);
- if (*args + len == mangled + n && **args == '_')
- {
- ++*args;
- return 1;
- }
- }
- return 0;
-}
-
-static void
-demangle_arm_pt (work, mangled, n, declp)
- struct work_stuff *work;
- const char **mangled;
- int n;
- string *declp;
-{
- const char *p;
- const char *args;
- const char *e = *mangled + n;
-
- /* ARM template? */
- if (arm_pt (work, *mangled, n, &p, &args))
- {
- string arg;
- string_init (&arg);
- string_appendn (declp, *mangled, p - *mangled);
- string_append (declp, "<");
- /* should do error checking here */
- while (args < e) {
- string_clear (&arg);
- do_type (work, &args, &arg);
- string_appends (declp, &arg);
- string_append (declp, ",");
- }
- string_delete (&arg);
- --declp->p;
- string_append (declp, ">");
- }
- else
- {
- string_appendn (declp, *mangled, n);
- }
- *mangled += n;
-}
-
-static int
-demangle_class_name (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
-{
- int n;
- int success = 0;
-
- n = consume_count (mangled);
- if (strlen (*mangled) >= n)
- {
- demangle_arm_pt (work, mangled, n, declp);
- success = 1;
- }
-
- return (success);
-}
-
-/*
-
-LOCAL FUNCTION
-
- demangle_class -- demangle a mangled class sequence
-
-SYNOPSIS
-
- static int
- demangle_class (struct work_stuff *work, const char **mangled,
- strint *declp)
-
-DESCRIPTION
-
- DECLP points to the buffer into which demangling is being done.
-
- *MANGLED points to the current token to be demangled. On input,
- it points to a mangled class (I.E. "3foo", "13verylongclass", etc.)
- On exit, it points to the next token after the mangled class on
- success, or the first unconsumed token on failure.
-
- If the CONSTRUCTOR or DESTRUCTOR flags are set in WORK, then
- we are demangling a constructor or destructor. In this case
- we prepend "class::class" or "class::~class" to DECLP.
-
- Otherwise, we prepend "class::" to the current DECLP.
-
- Reset the constructor/destructor flags once they have been
- "consumed". This allows demangle_class to be called later during
- the same demangling, to do normal class demangling.
-
- Returns 1 if demangling is successful, 0 otherwise.
-
-*/
-
-static int
-demangle_class (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
-{
- int success = 0;
- string class_name;
-
- string_init (&class_name);
- if (demangle_class_name (work, mangled, &class_name))
- {
- if ((work->constructor & 1) || (work->destructor & 1))
- {
- string_prepends (declp, &class_name);
- if (work -> destructor & 1)
- {
- string_prepend (declp, "~");
- work -> destructor -= 1;
- }
- else
- {
- work -> constructor -= 1;
- }
- }
- string_prepend (declp, "::");
- string_prepends (declp, &class_name);
- success = 1;
- }
- string_delete (&class_name);
- return (success);
-}
-
-/*
-
-LOCAL FUNCTION
-
- demangle_prefix -- consume the mangled name prefix and find signature
-
-SYNOPSIS
-
- static int
- demangle_prefix (struct work_stuff *work, const char **mangled,
- string *declp);
-
-DESCRIPTION
-
- Consume and demangle the prefix of the mangled name.
-
- DECLP points to the string buffer into which demangled output is
- placed. On entry, the buffer is empty. On exit it contains
- the root function name, the demangled operator name, or in some
- special cases either nothing or the completely demangled result.
-
- MANGLED points to the current pointer into the mangled name. As each
- token of the mangled name is consumed, it is updated. Upon entry
- the current mangled name pointer points to the first character of
- the mangled name. Upon exit, it should point to the first character
- of the signature if demangling was successful, or to the first
- unconsumed character if demangling of the prefix was unsuccessful.
-
- Returns 1 on success, 0 otherwise.
- */
-
-static int
-demangle_prefix (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
-{
- int success = 1;
- const char *scan;
- int i;
-
- if (strlen(*mangled) >= 11 && strncmp(*mangled, "_GLOBAL_", 8) == 0)
- {
- char *marker = strchr (cplus_markers, (*mangled)[8]);
- if (marker != NULL && *marker == (*mangled)[10])
- {
- if ((*mangled)[9] == 'D')
- {
- /* it's a GNU global destructor to be executed at program exit */
- (*mangled) += 11;
- work->destructor = 2;
- if (gnu_special (work, mangled, declp))
- return success;
- }
- else if ((*mangled)[9] == 'I')
- {
- /* it's a GNU global constructor to be executed at program init */
- (*mangled) += 11;
- work->constructor = 2;
- if (gnu_special (work, mangled, declp))
- return success;
- }
- }
- }
- else if (ARM_DEMANGLING && strncmp(*mangled, "__std__", 7) == 0)
- {
- /* it's a ARM global destructor to be executed at program exit */
- (*mangled) += 7;
- work->destructor = 2;
- }
- else if (ARM_DEMANGLING && strncmp(*mangled, "__sti__", 7) == 0)
- {
- /* it's a ARM global constructor to be executed at program initial */
- (*mangled) += 7;
- work->constructor = 2;
- }
-
-/* This block of code is a reduction in strength time optimization
- of:
- scan = mystrstr (*mangled, "__"); */
-
- {
- scan = *mangled;
-
- do {
- scan = strchr (scan, '_');
- } while (scan != NULL && *++scan != '_');
-
- if (scan != NULL) --scan;
- }
-
- if (scan != NULL)
- {
- /* We found a sequence of two or more '_', ensure that we start at
- the last pair in the sequence. */
- i = strspn (scan, "_");
- if (i > 2)
- {
- scan += (i - 2);
- }
- }
-
- if (scan == NULL)
- {
- success = 0;
- }
- else if (work -> static_type)
- {
- if (!isdigit (scan[0]) && (scan[0] != 't'))
- {
- success = 0;
- }
- }
- else if ((scan == *mangled) &&
- (isdigit (scan[2]) || (scan[2] == 'Q') || (scan[2] == 't')))
- {
- /* The ARM says nothing about the mangling of local variables.
- But cfront mangles local variables by prepending __<nesting_level>
- to them. As an extension to ARM demangling we handle this case. */
- if ((LUCID_DEMANGLING || ARM_DEMANGLING) && isdigit (scan[2]))
- {
- *mangled = scan + 2;
- consume_count (mangled);
- string_append (declp, *mangled);
- *mangled += strlen (*mangled);
- success = 1;
- }
- else
- {
- /* A GNU style constructor starts with __[0-9Qt]. But cfront uses
- names like __Q2_3foo3bar for nested type names. So don't accept
- this style of constructor for cfront demangling. */
- if (!(LUCID_DEMANGLING || ARM_DEMANGLING))
- work -> constructor += 1;
- *mangled = scan + 2;
- }
- }
- else if ((scan == *mangled) && !isdigit (scan[2]) && (scan[2] != 't'))
- {
- /* Mangled name starts with "__". Skip over any leading '_' characters,
- then find the next "__" that separates the prefix from the signature.
- */
- if (!(ARM_DEMANGLING || LUCID_DEMANGLING)
- || (arm_special (work, mangled, declp) == 0))
- {
- while (*scan == '_')
- {
- scan++;
- }
- if ((scan = mystrstr (scan, "__")) == NULL || (*(scan + 2) == '\0'))
- {
- /* No separator (I.E. "__not_mangled"), or empty signature
- (I.E. "__not_mangled_either__") */
- success = 0;
- }
- else
- {
- demangle_function_name (work, mangled, declp, scan);
- }
- }
- }
- else if (ARM_DEMANGLING && scan[2] == 'p' && scan[3] == 't')
- {
- /* Cfront-style parameterized type. Handled later as a signature. */
- success = 1;
-
- /* ARM template? */
- demangle_arm_pt (work, mangled, strlen (*mangled), declp);
- }
- else if (*(scan + 2) != '\0')
- {
- /* Mangled name does not start with "__" but does have one somewhere
- in there with non empty stuff after it. Looks like a global
- function name. */
- demangle_function_name (work, mangled, declp, scan);
- }
- else
- {
- /* Doesn't look like a mangled name */
- success = 0;
- }
-
- if (!success && (work->constructor == 2 || work->destructor == 2))
- {
- string_append (declp, *mangled);
- *mangled += strlen (*mangled);
- success = 1;
- }
- return (success);
-}
-
-/*
-
-LOCAL FUNCTION
-
- gnu_special -- special handling of gnu mangled strings
-
-SYNOPSIS
-
- static int
- gnu_special (struct work_stuff *work, const char **mangled,
- string *declp);
-
-
-DESCRIPTION
-
- Process some special GNU style mangling forms that don't fit
- the normal pattern. For example:
-
- _$_3foo (destructor for class foo)
- _vt$foo (foo virtual table)
- _vt$foo$bar (foo::bar virtual table)
- __vt_foo (foo virtual table, new style with thunks)
- _3foo$varname (static data member)
- _Q22rs2tu$vw (static data member)
- __t6vector1Zii (constructor with template)
- __thunk_4__$_7ostream (virtual function thunk)
- */
-
-static int
-gnu_special (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
-{
- int n;
- int success = 1;
- const char *p;
-
- if ((*mangled)[0] == '_'
- && strchr (cplus_markers, (*mangled)[1]) != NULL
- && (*mangled)[2] == '_')
- {
- /* Found a GNU style destructor, get past "_<CPLUS_MARKER>_" */
- (*mangled) += 3;
- work -> destructor += 1;
- }
- else if ((*mangled)[0] == '_'
- && (((*mangled)[1] == '_'
- && (*mangled)[2] == 'v'
- && (*mangled)[3] == 't'
- && (*mangled)[4] == '_')
- || ((*mangled)[1] == 'v'
- && (*mangled)[2] == 't'
- && strchr (cplus_markers, (*mangled)[3]) != NULL)))
- {
- /* Found a GNU style virtual table, get past "_vt<CPLUS_MARKER>"
- and create the decl. Note that we consume the entire mangled
- input string, which means that demangle_signature has no work
- to do. */
- if ((*mangled)[2] == 'v')
- (*mangled) += 5; /* New style, with thunks: "__vt_" */
- else
- (*mangled) += 4; /* Old style, no thunks: "_vt<CPLUS_MARKER>" */
- while (**mangled != '\0')
- {
- p = strpbrk (*mangled, cplus_markers);
- switch (**mangled)
- {
- case 'Q':
- success = demangle_qualified (work, mangled, declp, 0, 1);
- break;
- case 't':
- success = demangle_template (work, mangled, declp, 0);
- break;
- default:
- if (isdigit(*mangled[0]))
- {
- n = consume_count(mangled);
- }
- else
- {
- n = strcspn (*mangled, cplus_markers);
- }
- string_appendn (declp, *mangled, n);
- (*mangled) += n;
- }
-
- if (success && ((p == NULL) || (p == *mangled)))
- {
- if (p != NULL)
- {
- string_append (declp, "::");
- (*mangled)++;
- }
- }
- else
- {
- success = 0;
- break;
- }
- }
- if (success)
- string_append (declp, " virtual table");
- }
- else if ((*mangled)[0] == '_'
- && (strchr("0123456789Qt", (*mangled)[1]) != NULL)
- && (p = strpbrk (*mangled, cplus_markers)) != NULL)
- {
- /* static data member, "_3foo$varname" for example */
- (*mangled)++;
- switch (**mangled)
- {
- case 'Q':
- success = demangle_qualified (work, mangled, declp, 0, 1);
- break;
- case 't':
- success = demangle_template (work, mangled, declp, 0);
- break;
- default:
- n = consume_count (mangled);
- string_appendn (declp, *mangled, n);
- (*mangled) += n;
- }
- if (success && (p == *mangled))
- {
- /* Consumed everything up to the cplus_marker, append the
- variable name. */
- (*mangled)++;
- string_append (declp, "::");
- n = strlen (*mangled);
- string_appendn (declp, *mangled, n);
- (*mangled) += n;
- }
- else
- {
- success = 0;
- }
- }
- else if (strncmp (*mangled, "__thunk_", 8) == 0)
- {
- int delta = ((*mangled) += 8, consume_count (mangled));
- char *method = cplus_demangle (++*mangled, work->options);
- if (method)
- {
- char buf[50];
- sprintf (buf, "virtual function thunk (delta:%d) for ", -delta);
- string_append (declp, buf);
- string_append (declp, method);
- free (method);
- n = strlen (*mangled);
- (*mangled) += n;
- }
- else
- {
- success = 0;
- }
- }
- else
- {
- success = 0;
- }
- return (success);
-}
-
-/*
-
-LOCAL FUNCTION
-
- arm_special -- special handling of ARM/lucid mangled strings
-
-SYNOPSIS
-
- static int
- arm_special (struct work_stuff *work, const char **mangled,
- string *declp);
-
-
-DESCRIPTION
-
- Process some special ARM style mangling forms that don't fit
- the normal pattern. For example:
-
- __vtbl__3foo (foo virtual table)
- __vtbl__3foo__3bar (bar::foo virtual table)
-
- */
-
-static int
-arm_special (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
-{
- int n;
- int success = 1;
- const char *scan;
-
- if (strncmp (*mangled, ARM_VTABLE_STRING, ARM_VTABLE_STRLEN) == 0)
- {
- /* Found a ARM style virtual table, get past ARM_VTABLE_STRING
- and create the decl. Note that we consume the entire mangled
- input string, which means that demangle_signature has no work
- to do. */
- scan = *mangled + ARM_VTABLE_STRLEN;
- while (*scan != '\0') /* first check it can be demangled */
- {
- n = consume_count (&scan);
- if (n==0)
- {
- return (0); /* no good */
- }
- scan += n;
- if (scan[0] == '_' && scan[1] == '_')
- {
- scan += 2;
- }
- }
- (*mangled) += ARM_VTABLE_STRLEN;
- while (**mangled != '\0')
- {
- n = consume_count (mangled);
- string_prependn (declp, *mangled, n);
- (*mangled) += n;
- if ((*mangled)[0] == '_' && (*mangled)[1] == '_')
- {
- string_prepend (declp, "::");
- (*mangled) += 2;
- }
- }
- string_append (declp, " virtual table");
- }
- else
- {
- success = 0;
- }
- return (success);
-}
-
-/*
-
-LOCAL FUNCTION
-
- demangle_qualified -- demangle 'Q' qualified name strings
-
-SYNOPSIS
-
- static int
- demangle_qualified (struct work_stuff *, const char *mangled,
- string *result, int isfuncname, int append);
-
-DESCRIPTION
-
- Demangle a qualified name, such as "Q25Outer5Inner" which is
- the mangled form of "Outer::Inner". The demangled output is
- prepended or appended to the result string according to the
- state of the append flag.
-
- If isfuncname is nonzero, then the qualified name we are building
- is going to be used as a member function name, so if it is a
- constructor or destructor function, append an appropriate
- constructor or destructor name. I.E. for the above example,
- the result for use as a constructor is "Outer::Inner::Inner"
- and the result for use as a destructor is "Outer::Inner::~Inner".
-
-BUGS
-
- Numeric conversion is ASCII dependent (FIXME).
-
- */
-
-static int
-demangle_qualified (work, mangled, result, isfuncname, append)
- struct work_stuff *work;
- const char **mangled;
- string *result;
- int isfuncname;
- int append;
-{
- int qualifiers;
- int namelength;
- int success = 1;
- const char *p;
- char num[2];
- string temp;
-
- string_init (&temp);
- switch ((*mangled)[1])
- {
- case '_':
- /* GNU mangled name with more than 9 classes. The count is preceded
- by an underscore (to distinguish it from the <= 9 case) and followed
- by an underscore. */
- p = *mangled + 2;
- qualifiers = atoi (p);
- if (!isdigit (*p) || *p == '0')
- success = 0;
-
- /* Skip the digits. */
- while (isdigit (*p))
- ++p;
-
- if (*p != '_')
- success = 0;
-
- *mangled = p + 1;
- break;
-
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- /* The count is in a single digit. */
- num[0] = (*mangled)[1];
- num[1] = '\0';
- qualifiers = atoi (num);
-
- /* If there is an underscore after the digit, skip it. This is
- said to be for ARM-qualified names, but the ARM makes no
- mention of such an underscore. Perhaps cfront uses one. */
- if ((*mangled)[2] == '_')
- {
- (*mangled)++;
- }
- (*mangled) += 2;
- break;
-
- case '0':
- default:
- success = 0;
- }
-
- if (!success)
- return success;
-
- /* Pick off the names and collect them in the temp buffer in the order
- in which they are found, separated by '::'. */
-
- while (qualifiers-- > 0)
- {
- if (*mangled[0] == '_')
- *mangled = *mangled + 1;
- if (*mangled[0] == 't')
- {
- success = demangle_template(work, mangled, &temp, 0);
- if (!success) break;
- }
- else
- {
- namelength = consume_count (mangled);
- if (strlen (*mangled) < namelength)
- {
- /* Simple sanity check failed */
- success = 0;
- break;
- }
- string_appendn (&temp, *mangled, namelength);
- *mangled += namelength;
- }
- if (qualifiers > 0)
- {
- string_appendn (&temp, "::", 2);
- }
- }
-
- /* If we are using the result as a function name, we need to append
- the appropriate '::' separated constructor or destructor name.
- We do this here because this is the most convenient place, where
- we already have a pointer to the name and the length of the name. */
-
- if (isfuncname && (work->constructor & 1 || work->destructor & 1))
- {
- string_appendn (&temp, "::", 2);
- if (work -> destructor & 1)
- {
- string_append (&temp, "~");
- }
- string_appendn (&temp, (*mangled) - namelength, namelength);
- }
-
- /* Now either prepend the temp buffer to the result, or append it,
- depending upon the state of the append flag. */
-
- if (append)
- {
- string_appends (result, &temp);
- }
- else
- {
- if (!STRING_EMPTY (result))
- {
- string_appendn (&temp, "::", 2);
- }
- string_prepends (result, &temp);
- }
-
- string_delete (&temp);
- return (success);
-}
-
-/*
-
-LOCAL FUNCTION
-
- get_count -- convert an ascii count to integer, consuming tokens
-
-SYNOPSIS
-
- static int
- get_count (const char **type, int *count)
-
-DESCRIPTION
-
- Return 0 if no conversion is performed, 1 if a string is converted.
-*/
-
-static int
-get_count (type, count)
- const char **type;
- int *count;
-{
- const char *p;
- int n;
-
- if (!isdigit (**type))
- {
- return (0);
- }
- else
- {
- *count = **type - '0';
- (*type)++;
- if (isdigit (**type))
- {
- p = *type;
- n = *count;
- do
- {
- n *= 10;
- n += *p - '0';
- p++;
- }
- while (isdigit (*p));
- if (*p == '_')
- {
- *type = p + 1;
- *count = n;
- }
- }
- }
- return (1);
-}
-
-/* result will be initialised here; it will be freed on failure */
-
-static int
-do_type (work, mangled, result)
- struct work_stuff *work;
- const char **mangled;
- string *result;
-{
- int n;
- int done;
- int success;
- string decl;
- const char *remembered_type;
- int constp;
- int volatilep;
-
- string_init (&decl);
- string_init (result);
-
- done = 0;
- success = 1;
- while (success && !done)
- {
- int member;
- switch (**mangled)
- {
-
- /* A pointer type */
- case 'P':
- case 'p':
- (*mangled)++;
- string_prepend (&decl, "*");
- break;
-
- /* A reference type */
- case 'R':
- (*mangled)++;
- string_prepend (&decl, "&");
- break;
-
- /* An array */
- case 'A':
- {
- const char *p = ++(*mangled);
-
- string_prepend (&decl, "(");
- string_append (&decl, ")[");
- /* Copy anything up until the next underscore (the size of the
- array). */
- while (**mangled && **mangled != '_')
- ++(*mangled);
- if (**mangled == '_')
- {
- string_appendn (&decl, p, *mangled - p);
- string_append (&decl, "]");
- *mangled += 1;
- }
- else
- success = 0;
- break;
- }
-
- /* A back reference to a previously seen type */
- case 'T':
- (*mangled)++;
- if (!get_count (mangled, &n) || n >= work -> ntypes)
- {
- success = 0;
- }
- else
- {
- remembered_type = work -> typevec[n];
- mangled = &remembered_type;
- }
- break;
-
- /* A function */
- case 'F':
- (*mangled)++;
- if (!STRING_EMPTY (&decl) && decl.b[0] == '*')
- {
- string_prepend (&decl, "(");
- string_append (&decl, ")");
- }
- /* After picking off the function args, we expect to either find the
- function return type (preceded by an '_') or the end of the
- string. */
- if (!demangle_args (work, mangled, &decl)
- || (**mangled != '_' && **mangled != '\0'))
- {
- success = 0;
- }
- if (success && (**mangled == '_'))
- {
- (*mangled)++;
- }
- break;
-
- case 'M':
- case 'O':
- {
- constp = 0;
- volatilep = 0;
-
- member = **mangled == 'M';
- (*mangled)++;
- if (!isdigit (**mangled))
- {
- success = 0;
- break;
- }
- n = consume_count (mangled);
- if (strlen (*mangled) < n)
- {
- success = 0;
- break;
- }
- string_append (&decl, ")");
- string_prepend (&decl, "::");
- string_prependn (&decl, *mangled, n);
- string_prepend (&decl, "(");
- *mangled += n;
- if (member)
- {
- if (**mangled == 'C')
- {
- (*mangled)++;
- constp = 1;
- }
- if (**mangled == 'V')
- {
- (*mangled)++;
- volatilep = 1;
- }
- if (*(*mangled)++ != 'F')
- {
- success = 0;
- break;
- }
- }
- if ((member && !demangle_args (work, mangled, &decl))
- || **mangled != '_')
- {
- success = 0;
- break;
- }
- (*mangled)++;
- if (! PRINT_ANSI_QUALIFIERS)
- {
- break;
- }
- if (constp)
- {
- APPEND_BLANK (&decl);
- string_append (&decl, "const");
- }
- if (volatilep)
- {
- APPEND_BLANK (&decl);
- string_append (&decl, "volatile");
- }
- break;
- }
- case 'G':
- (*mangled)++;
- break;
-
- case 'C':
- (*mangled)++;
-/*
- if ((*mangled)[1] == 'P')
- {
-*/
- if (PRINT_ANSI_QUALIFIERS)
- {
- if (!STRING_EMPTY (&decl))
- {
- string_prepend (&decl, " ");
- }
- string_prepend (&decl, "const");
- }
- break;
-/*
- }
-*/
-
- /* fall through */
- default:
- done = 1;
- break;
- }
- }
-
- switch (**mangled)
- {
- /* A qualified name, such as "Outer::Inner". */
- case 'Q':
- success = demangle_qualified (work, mangled, result, 0, 1);
- break;
-
- default:
- success = demangle_fund_type (work, mangled, result);
- break;
- }
-
- if (success)
- {
- if (!STRING_EMPTY (&decl))
- {
- string_append (result, " ");
- string_appends (result, &decl);
- }
- }
- else
- {
- string_delete (result);
- }
- string_delete (&decl);
- return (success);
-}
-
-/* Given a pointer to a type string that represents a fundamental type
- argument (int, long, unsigned int, etc) in TYPE, a pointer to the
- string in which the demangled output is being built in RESULT, and
- the WORK structure, decode the types and add them to the result.
-
- For example:
-
- "Ci" => "const int"
- "Sl" => "signed long"
- "CUs" => "const unsigned short"
-
- */
-
-static int
-demangle_fund_type (work, mangled, result)
- struct work_stuff *work;
- const char **mangled;
- string *result;
-{
- int done = 0;
- int success = 1;
-
- /* First pick off any type qualifiers. There can be more than one. */
-
- while (!done)
- {
- switch (**mangled)
- {
- case 'C':
- (*mangled)++;
- if (PRINT_ANSI_QUALIFIERS)
- {
- APPEND_BLANK (result);
- string_append (result, "const");
- }
- break;
- case 'U':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "unsigned");
- break;
- case 'S': /* signed char only */
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "signed");
- break;
- case 'V':
- (*mangled)++;
- if (PRINT_ANSI_QUALIFIERS)
- {
- APPEND_BLANK (result);
- string_append (result, "volatile");
- }
- break;
- default:
- done = 1;
- break;
- }
- }
-
- /* Now pick off the fundamental type. There can be only one. */
-
- switch (**mangled)
- {
- case '\0':
- case '_':
- break;
- case 'v':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "void");
- break;
- case 'x':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "long long");
- break;
- case 'l':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "long");
- break;
- case 'i':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "int");
- break;
- case 's':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "short");
- break;
- case 'b':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "bool");
- break;
- case 'c':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "char");
- break;
- case 'w':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "wchar_t");
- break;
- case 'r':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "long double");
- break;
- case 'd':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "double");
- break;
- case 'f':
- (*mangled)++;
- APPEND_BLANK (result);
- string_append (result, "float");
- break;
- case 'G':
- (*mangled)++;
- if (!isdigit (**mangled))
- {
- success = 0;
- break;
- }
- /* fall through */
- /* An explicit type, such as "6mytype" or "7integer" */
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- APPEND_BLANK (result);
- if (!demangle_class_name (work, mangled, result)) {
- --result->p;
- success = 0;
- }
- break;
- case 't':
- success = demangle_template(work,mangled, result, 0);
- break;
- default:
- success = 0;
- break;
- }
-
- return (success);
-}
-
-/* `result' will be initialized in do_type; it will be freed on failure */
-
-static int
-do_arg (work, mangled, result)
- struct work_stuff *work;
- const char **mangled;
- string *result;
-{
- const char *start = *mangled;
-
- if (!do_type (work, mangled, result))
- {
- return (0);
- }
- else
- {
- remember_type (work, start, *mangled - start);
- return (1);
- }
-}
-
-static void
-remember_type (work, start, len)
- struct work_stuff *work;
- const char *start;
- int len;
-{
- char *tem;
-
- if (work -> ntypes >= work -> typevec_size)
- {
- if (work -> typevec_size == 0)
- {
- work -> typevec_size = 3;
- work -> typevec =
- (char **) xmalloc (sizeof (char *) * work -> typevec_size);
- }
- else
- {
- work -> typevec_size *= 2;
- work -> typevec =
- (char **) xrealloc ((char *)work -> typevec,
- sizeof (char *) * work -> typevec_size);
- }
- }
- tem = xmalloc (len + 1);
- memcpy (tem, start, len);
- tem[len] = '\0';
- work -> typevec[work -> ntypes++] = tem;
-}
-
-/* Forget the remembered types, but not the type vector itself. */
-
-static void
-forget_types (work)
- struct work_stuff *work;
-{
- int i;
-
- while (work -> ntypes > 0)
- {
- i = --(work -> ntypes);
- if (work -> typevec[i] != NULL)
- {
- free (work -> typevec[i]);
- work -> typevec[i] = NULL;
- }
- }
-}
-
-/* Process the argument list part of the signature, after any class spec
- has been consumed, as well as the first 'F' character (if any). For
- example:
-
- "__als__3fooRT0" => process "RT0"
- "complexfunc5__FPFPc_PFl_i" => process "PFPc_PFl_i"
-
- DECLP must be already initialised, usually non-empty. It won't be freed
- on failure.
-
- Note that g++ differs significantly from ARM and lucid style mangling
- with regards to references to previously seen types. For example, given
- the source fragment:
-
- class foo {
- public:
- foo::foo (int, foo &ia, int, foo &ib, int, foo &ic);
- };
-
- foo::foo (int, foo &ia, int, foo &ib, int, foo &ic) { ia = ib = ic; }
- void foo (int, foo &ia, int, foo &ib, int, foo &ic) { ia = ib = ic; }
-
- g++ produces the names:
-
- __3fooiRT0iT2iT2
- foo__FiR3fooiT1iT1
-
- while lcc (and presumably other ARM style compilers as well) produces:
-
- foo__FiR3fooT1T2T1T2
- __ct__3fooFiR3fooT1T2T1T2
-
- Note that g++ bases it's type numbers starting at zero and counts all
- previously seen types, while lucid/ARM bases it's type numbers starting
- at one and only considers types after it has seen the 'F' character
- indicating the start of the function args. For lucid/ARM style, we
- account for this difference by discarding any previously seen types when
- we see the 'F' character, and subtracting one from the type number
- reference.
-
- */
-
-static int
-demangle_args (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
-{
- string arg;
- int need_comma = 0;
- int r;
- int t;
- const char *tem;
- char temptype;
-
- if (PRINT_ARG_TYPES)
- {
- string_append (declp, "(");
- if (**mangled == '\0')
- {
- string_append (declp, "void");
- }
- }
-
- while (**mangled != '_' && **mangled != '\0' && **mangled != 'e')
- {
- if ((**mangled == 'N') || (**mangled == 'T'))
- {
- temptype = *(*mangled)++;
-
- if (temptype == 'N')
- {
- if (!get_count (mangled, &r))
- {
- return (0);
- }
- }
- else
- {
- r = 1;
- }
- if (ARM_DEMANGLING && work -> ntypes >= 10)
- {
- /* If we have 10 or more types we might have more than a 1 digit
- index so we'll have to consume the whole count here. This
- will lose if the next thing is a type name preceded by a
- count but it's impossible to demangle that case properly
- anyway. Eg if we already have 12 types is T12Pc "(..., type1,
- Pc, ...)" or "(..., type12, char *, ...)" */
- if ((t = consume_count(mangled)) == 0)
- {
- return (0);
- }
- }
- else
- {
- if (!get_count (mangled, &t))
- {
- return (0);
- }
- }
- if (LUCID_DEMANGLING || ARM_DEMANGLING)
- {
- t--;
- }
- /* Validate the type index. Protect against illegal indices from
- malformed type strings. */
- if ((t < 0) || (t >= work -> ntypes))
- {
- return (0);
- }
- while (--r >= 0)
- {
- tem = work -> typevec[t];
- if (need_comma && PRINT_ARG_TYPES)
- {
- string_append (declp, ", ");
- }
- if (!do_arg (work, &tem, &arg))
- {
- return (0);
- }
- if (PRINT_ARG_TYPES)
- {
- string_appends (declp, &arg);
- }
- string_delete (&arg);
- need_comma = 1;
- }
- }
- else
- {
- if (need_comma & PRINT_ARG_TYPES)
- {
- string_append (declp, ", ");
- }
- if (!do_arg (work, mangled, &arg))
- {
- return (0);
- }
- if (PRINT_ARG_TYPES)
- {
- string_appends (declp, &arg);
- }
- string_delete (&arg);
- need_comma = 1;
- }
- }
-
- if (**mangled == 'e')
- {
- (*mangled)++;
- if (PRINT_ARG_TYPES)
- {
- if (need_comma)
- {
- string_append (declp, ",");
- }
- string_append (declp, "...");
- }
- }
-
- if (PRINT_ARG_TYPES)
- {
- string_append (declp, ")");
- }
- return (1);
-}
-
-static void
-demangle_function_name (work, mangled, declp, scan)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
- const char *scan;
-{
- int i;
- int len;
- string type;
- const char *tem;
-
- string_appendn (declp, (*mangled), scan - (*mangled));
- string_need (declp, 1);
- *(declp -> p) = '\0';
-
- /* Consume the function name, including the "__" separating the name
- from the signature. We are guaranteed that SCAN points to the
- separator. */
-
- (*mangled) = scan + 2;
-
- if (LUCID_DEMANGLING || ARM_DEMANGLING)
- {
-
- /* See if we have an ARM style constructor or destructor operator.
- If so, then just record it, clear the decl, and return.
- We can't build the actual constructor/destructor decl until later,
- when we recover the class name from the signature. */
-
- if (strcmp (declp -> b, "__ct") == 0)
- {
- work -> constructor += 1;
- string_clear (declp);
- return;
- }
- else if (strcmp (declp -> b, "__dt") == 0)
- {
- work -> destructor += 1;
- string_clear (declp);
- return;
- }
- }
-
- if (declp->p - declp->b >= 3
- && declp->b[0] == 'o'
- && declp->b[1] == 'p'
- && strchr (cplus_markers, declp->b[2]) != NULL)
- {
- /* see if it's an assignment expression */
- if (declp->p - declp->b >= 10 /* op$assign_ */
- && memcmp (declp->b + 3, "assign_", 7) == 0)
- {
- for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
- {
- len = declp->p - declp->b - 10;
- if (strlen (optable[i].in) == len
- && memcmp (optable[i].in, declp->b + 10, len) == 0)
- {
- string_clear (declp);
- string_append (declp, "operator");
- string_append (declp, optable[i].out);
- string_append (declp, "=");
- break;
- }
- }
- }
- else
- {
- for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
- {
- int len = declp->p - declp->b - 3;
- if (strlen (optable[i].in) == len
- && memcmp (optable[i].in, declp->b + 3, len) == 0)
- {
- string_clear (declp);
- string_append (declp, "operator");
- string_append (declp, optable[i].out);
- break;
- }
- }
- }
- }
- else if (declp->p - declp->b >= 5 && memcmp (declp->b, "type", 4) == 0
- && strchr (cplus_markers, declp->b[4]) != NULL)
- {
- /* type conversion operator */
- tem = declp->b + 5;
- if (do_type (work, &tem, &type))
- {
- string_clear (declp);
- string_append (declp, "operator ");
- string_appends (declp, &type);
- string_delete (&type);
- }
- }
- else if (declp->b[0] == '_' && declp->b[1] == '_'
- && declp->b[2] == 'o' && declp->b[3] == 'p')
- {
- /* ANSI. */
- /* type conversion operator. */
- tem = declp->b + 4;
- if (do_type (work, &tem, &type))
- {
- string_clear (declp);
- string_append (declp, "operator ");
- string_appends (declp, &type);
- string_delete (&type);
- }
- }
- else if (declp->b[0] == '_' && declp->b[1] == '_'
- && declp->b[2] >= 'a' && declp->b[2] <= 'z'
- && declp->b[3] >= 'a' && declp->b[3] <= 'z')
- {
- if (declp->b[4] == '\0')
- {
- /* Operator. */
- for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
- {
- if (strlen (optable[i].in) == 2
- && memcmp (optable[i].in, declp->b + 2, 2) == 0)
- {
- string_clear (declp);
- string_append (declp, "operator");
- string_append (declp, optable[i].out);
- break;
- }
- }
- }
- else
- {
- if (declp->b[2] == 'a' && declp->b[5] == '\0')
- {
- /* Assignment. */
- for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
- {
- if (strlen (optable[i].in) == 3
- && memcmp (optable[i].in, declp->b + 2, 3) == 0)
- {
- string_clear (declp);
- string_append (declp, "operator");
- string_append (declp, optable[i].out);
- break;
- }
- }
- }
- }
- }
-}
-
-/* a mini string-handling package */
-
-static void
-string_need (s, n)
- string *s;
- int n;
-{
- int tem;
-
- if (s->b == NULL)
- {
- if (n < 32)
- {
- n = 32;
- }
- s->p = s->b = xmalloc (n);
- s->e = s->b + n;
- }
- else if (s->e - s->p < n)
- {
- tem = s->p - s->b;
- n += tem;
- n *= 2;
- s->b = xrealloc (s->b, n);
- s->p = s->b + tem;
- s->e = s->b + n;
- }
-}
-
-static void
-string_delete (s)
- string *s;
-{
- if (s->b != NULL)
- {
- free (s->b);
- s->b = s->e = s->p = NULL;
- }
-}
-
-static void
-string_init (s)
- string *s;
-{
- s->b = s->p = s->e = NULL;
-}
-
-static void
-string_clear (s)
- string *s;
-{
- s->p = s->b;
-}
-
-#if 0
-
-static int
-string_empty (s)
- string *s;
-{
- return (s->b == s->p);
-}
-
-#endif
-
-static void
-string_append (p, s)
- string *p;
- const char *s;
-{
- int n;
- if (s == NULL || *s == '\0')
- return;
- n = strlen (s);
- string_need (p, n);
- memcpy (p->p, s, n);
- p->p += n;
-}
-
-static void
-string_appends (p, s)
- string *p, *s;
-{
- int n;
-
- if (s->b != s->p)
- {
- n = s->p - s->b;
- string_need (p, n);
- memcpy (p->p, s->b, n);
- p->p += n;
- }
-}
-
-static void
-string_appendn (p, s, n)
- string *p;
- const char *s;
- int n;
-{
- if (n != 0)
- {
- string_need (p, n);
- memcpy (p->p, s, n);
- p->p += n;
- }
-}
-
-static void
-string_prepend (p, s)
- string *p;
- const char *s;
-{
- if (s != NULL && *s != '\0')
- {
- string_prependn (p, s, strlen (s));
- }
-}
-
-static void
-string_prepends (p, s)
- string *p, *s;
-{
- if (s->b != s->p)
- {
- string_prependn (p, s->b, s->p - s->b);
- }
-}
-
-static void
-string_prependn (p, s, n)
- string *p;
- const char *s;
- int n;
-{
- char *q;
-
- if (n != 0)
- {
- string_need (p, n);
- for (q = p->p - 1; q >= p->b; q--)
- {
- q[n] = q[0];
- }
- memcpy (p->b, s, n);
- p->p += n;
- }
-}
-
-/* To generate a standalone demangler program for testing purposes,
- just compile and link this file with -DMAIN and libiberty.a. When
- run, it demangles each command line arg, or each stdin string, and
- prints the result on stdout. */
-
-#ifdef MAIN
-
-static void
-demangle_it (mangled_name)
- char *mangled_name;
-{
- char *result;
-
- result = cplus_demangle (mangled_name, DMGL_PARAMS | DMGL_ANSI);
- if (result == NULL)
- {
- printf ("%s\n", mangled_name);
- }
- else
- {
- printf ("%s\n", result);
- free (result);
- }
-}
-
-#include "getopt.h"
-
-static char *program_name;
-static char *program_version = VERSION;
-
-static void
-usage (stream, status)
- FILE *stream;
- int status;
-{
- fprintf (stream, "\
-Usage: %s [-_] [-n] [-s {gnu,lucid,arm}] [--strip-underscores]\n\
- [--no-strip-underscores] [--format={gnu,lucid,arm}]\n\
- [--help] [--version] [arg...]\n",
- program_name);
- exit (status);
-}
-
-#define MBUF_SIZE 512
-char mbuffer[MBUF_SIZE];
-
-/* Defined in the automatically-generated underscore.c. */
-extern int prepends_underscore;
-
-int strip_underscore = 0;
-
-static struct option long_options[] = {
- {"strip-underscores", no_argument, 0, '_'},
- {"format", required_argument, 0, 's'},
- {"help", no_argument, 0, 'h'},
- {"no-strip-underscores", no_argument, 0, 'n'},
- {"version", no_argument, 0, 'v'},
- {0, no_argument, 0, 0}
-};
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- char *result;
- int c;
-
- program_name = argv[0];
-
- strip_underscore = prepends_underscore;
-
- while ((c = getopt_long (argc, argv, "_ns:", long_options, (int *) 0)) != EOF)
- {
- switch (c)
- {
- case '?':
- usage (stderr, 1);
- break;
- case 'h':
- usage (stdout, 0);
- case 'n':
- strip_underscore = 0;
- break;
- case 'v':
- printf ("GNU %s version %s\n", program_name, program_version);
- exit (0);
- case '_':
- strip_underscore = 1;
- break;
- case 's':
- if (strcmp (optarg, "gnu") == 0)
- {
- current_demangling_style = gnu_demangling;
- }
- else if (strcmp (optarg, "lucid") == 0)
- {
- current_demangling_style = lucid_demangling;
- }
- else if (strcmp (optarg, "arm") == 0)
- {
- current_demangling_style = arm_demangling;
- }
- else
- {
- fprintf (stderr, "%s: unknown demangling style `%s'\n",
- program_name, optarg);
- exit (1);
- }
- break;
- }
- }
-
- if (optind < argc)
- {
- for ( ; optind < argc; optind++)
- {
- demangle_it (argv[optind]);
- }
- }
- else
- {
- for (;;)
- {
- int i = 0;
- c = getchar ();
- /* Try to read a label. */
- while (c != EOF && (isalnum(c) || c == '_' || c == '$' || c == '.'))
- {
- if (i >= MBUF_SIZE-1)
- break;
- mbuffer[i++] = c;
- c = getchar ();
- }
- if (i > 0)
- {
- int skip_first = 0;
-
- if (mbuffer[0] == '.')
- ++skip_first;
- if (strip_underscore && mbuffer[skip_first] == '_')
- ++skip_first;
-
- if (skip_first > i)
- skip_first = i;
-
- mbuffer[i] = 0;
-
- result = cplus_demangle (mbuffer + skip_first,
- DMGL_PARAMS | DMGL_ANSI);
- if (result)
- {
- if (mbuffer[0] == '.')
- putc ('.', stdout);
- fputs (result, stdout);
- free (result);
- }
- else
- fputs (mbuffer, stdout);
-
- fflush (stdout);
- }
- if (c == EOF)
- break;
- putchar (c);
- }
- }
-
- exit (0);
-}
-
-static void
-fatal (str)
- char *str;
-{
- fprintf (stderr, "%s: %s\n", program_name, str);
- exit (1);
-}
-
-char * malloc ();
-char * realloc ();
-
-char *
-xmalloc (size)
- unsigned size;
-{
- register char *value = (char *) malloc (size);
- if (value == 0)
- fatal ("virtual memory exhausted");
- return value;
-}
-
-char *
-xrealloc (ptr, size)
- char *ptr;
- unsigned size;
-{
- register char *value = (char *) realloc (ptr, size);
- if (value == 0)
- fatal ("virtual memory exhausted");
- return value;
-}
-#endif /* main */
diff --git a/contrib/gdb/libiberty/dummy.c b/contrib/gdb/libiberty/dummy.c
deleted file mode 100644
index 08da647e30eb..000000000000
--- a/contrib/gdb/libiberty/dummy.c
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <ansidecl.h>
-
-#ifdef __STDC__
-#include <stddef.h>
-#define clock_t unsigned long
-#define DEF(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME (ARGS);
-#define DEFFUNC(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME (ARGS);
-#else
-#define void int
-#define size_t unsigned long
-#define clock_t unsigned long
-#define DEF(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME ();
-#define DEFFUNC(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME ();
-#endif
-
-#define DEFVAR(NAME,DECL,USE) extern DECL;
-
-#define NOTHING /*nothing*/
-
-#include "alloca-conf.h"
-#include "functions.def"
-
-/* Always use our: getopt.o getopt1.o obstack.o spaces.o */
-
-int
-main (argc, argv)
- int argc; char **argv;
-{
-
-/* Create a dummy function call for each DEF-defined function. */
-
-#undef DEF
-#undef DEFVAR
-#undef DEFFUNC
-#undef AND
-#define AND = 0;
-/* ARGS expands into a set of declaration. NAME ARG_LIST expands
- info a function call that uses those variables as actual parameters.
- If the function has been DEF'ed correctly, we can pass the right
- number and types of parameters, which is nice. (E.g. gcc may
- otherwise complain about the wrong number of parameters to certain
- builtins.) */
-#define DEF(NAME, RETURN_TYPE, ARG_LIST, ARGS) { ARGS; NAME ARG_LIST; }
-#define DEFVAR(NAME, DECL, USE) { USE; }
-#define DEFFUNC(NAME, RETURN_TYPE, ARG_LIST, ARGS) { ARGS; NAME ARG_LIST; }
-#include "functions.def"
-
- return (0);
-}
diff --git a/contrib/gdb/libiberty/fdmatch.c b/contrib/gdb/libiberty/fdmatch.c
deleted file mode 100644
index 7af039f5a2b8..000000000000
--- a/contrib/gdb/libiberty/fdmatch.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Compare two open file descriptors to see if they refer to the same file.
- Copyright (C) 1991 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. */
-
-
-/*
-
-NAME
-
- fdmatch -- see if two file descriptors refer to same file
-
-SYNOPSIS
-
- int fdmatch (int fd1, int fd2)
-
-DESCRIPTION
-
- Check to see if two open file descriptors refer to the same file.
- This is useful, for example, when we have an open file descriptor
- for an unnamed file, and the name of a file that we believe to
- correspond to that fd. This can happen when we are exec'd with
- an already open file (stdout for example) or from the SVR4 /proc
- calls that return open file descriptors for mapped address spaces.
- All we have to do is open the file by name and check the two file
- descriptors for a match, which is done by comparing major&minor
- device numbers and inode numbers.
-
-BUGS
-
- (FIXME: does this work for networks?)
- It works for NFS, which assigns a device number to each mount.
-
-*/
-
-#include "ansidecl.h"
-#include "libiberty.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int fdmatch (fd1, fd2)
- int fd1;
- int fd2;
-{
- struct stat sbuf1;
- struct stat sbuf2;
-
- if ((fstat (fd1, &sbuf1) == 0) &&
- (fstat (fd2, &sbuf2) == 0) &&
- (sbuf1.st_dev == sbuf2.st_dev) &&
- (sbuf1.st_ino == sbuf2.st_ino))
- {
- return (1);
- }
- else
- {
- return (0);
- }
-}
diff --git a/contrib/gdb/libiberty/floatformat.c b/contrib/gdb/libiberty/floatformat.c
deleted file mode 100644
index 655f4ea9264b..000000000000
--- a/contrib/gdb/libiberty/floatformat.c
+++ /dev/null
@@ -1,385 +0,0 @@
-/* IEEE floating point support routines, for GDB, the GNU Debugger.
- Copyright (C) 1991, 1994 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "floatformat.h"
-#include <math.h> /* ldexp */
-#ifdef __STDC__
-#include <stddef.h>
-extern void *memcpy (void *s1, const void *s2, size_t n);
-extern void *memset (void *s, int c, size_t n);
-#else
-extern char *memcpy ();
-extern char *memset ();
-#endif
-
-/* The odds that CHAR_BIT will be anything but 8 are low enough that I'm not
- going to bother with trying to muck around with whether it is defined in
- a system header, what we do if not, etc. */
-#define FLOATFORMAT_CHAR_BIT 8
-
-/* floatformats for IEEE single and double, big and little endian. */
-const struct floatformat floatformat_ieee_single_big =
-{
- floatformat_big, 32, 0, 1, 8, 127, 255, 9, 23, floatformat_intbit_no
-};
-const struct floatformat floatformat_ieee_single_little =
-{
- floatformat_little, 32, 0, 1, 8, 127, 255, 9, 23, floatformat_intbit_no
-};
-const struct floatformat floatformat_ieee_double_big =
-{
- floatformat_big, 64, 0, 1, 11, 1023, 2047, 12, 52, floatformat_intbit_no
-};
-const struct floatformat floatformat_ieee_double_little =
-{
- floatformat_little, 64, 0, 1, 11, 1023, 2047, 12, 52, floatformat_intbit_no
-};
-
-const struct floatformat floatformat_i387_ext =
-{
- floatformat_little, 80, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
- floatformat_intbit_yes
-};
-const struct floatformat floatformat_m68881_ext =
-{
- /* Note that the bits from 16 to 31 are unused. */
- floatformat_big, 96, 0, 1, 15, 0x3fff, 0x7fff, 32, 64, floatformat_intbit_yes
-};
-const struct floatformat floatformat_i960_ext =
-{
- /* Note that the bits from 0 to 15 are unused. */
- floatformat_little, 96, 16, 17, 15, 0x3fff, 0x7fff, 32, 64,
- floatformat_intbit_yes
-};
-const struct floatformat floatformat_m88110_ext =
-{
-#ifdef HARRIS_FLOAT_FORMAT
- /* Harris uses raw format 128 bytes long, but the number is just an ieee
- double, and the last 64 bits are wasted. */
- floatformat_big,128, 0, 1, 11, 0x3ff, 0x7ff, 12, 52,
- floatformat_intbit_no
-#else
- floatformat_big, 80, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
- floatformat_intbit_yes
-#endif /* HARRIS_FLOAT_FORMAT */
-};
-const struct floatformat floatformat_arm_ext =
-{
- /* Bits 1 to 16 are unused. */
- floatformat_big, 96, 0, 17, 15, 0x3fff, 0x7fff, 32, 64,
- floatformat_intbit_yes
-};
-
-static unsigned long get_field PARAMS ((unsigned char *,
- enum floatformat_byteorders,
- unsigned int,
- unsigned int,
- unsigned int));
-
-/* Extract a field which starts at START and is LEN bytes long. DATA and
- TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
-static unsigned long
-get_field (data, order, total_len, start, len)
- unsigned char *data;
- enum floatformat_byteorders order;
- unsigned int total_len;
- unsigned int start;
- unsigned int len;
-{
- unsigned long result;
- unsigned int cur_byte;
- int cur_bitshift;
-
- /* Start at the least significant part of the field. */
- cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;
- if (order == floatformat_little)
- cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1;
- cur_bitshift =
- ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;
- result = *(data + cur_byte) >> (-cur_bitshift);
- cur_bitshift += FLOATFORMAT_CHAR_BIT;
- if (order == floatformat_little)
- ++cur_byte;
- else
- --cur_byte;
-
- /* Move towards the most significant part of the field. */
- while (cur_bitshift < len)
- {
- if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)
- /* This is the last byte; zero out the bits which are not part of
- this field. */
- result |=
- (*(data + cur_byte) & ((1 << (len - cur_bitshift)) - 1))
- << cur_bitshift;
- else
- result |= *(data + cur_byte) << cur_bitshift;
- cur_bitshift += FLOATFORMAT_CHAR_BIT;
- if (order == floatformat_little)
- ++cur_byte;
- else
- --cur_byte;
- }
- return result;
-}
-
-/* Convert from FMT to a double.
- FROM is the address of the extended float.
- Store the double in *TO. */
-
-void
-floatformat_to_double (fmt, from, to)
- const struct floatformat *fmt;
- char *from;
- double *to;
-{
- unsigned char *ufrom = (unsigned char *)from;
- double dto;
- long exponent;
- unsigned long mant;
- unsigned int mant_bits, mant_off;
- int mant_bits_left;
-
- exponent = get_field (ufrom, fmt->byteorder, fmt->totalsize,
- fmt->exp_start, fmt->exp_len);
- /* Note that if exponent indicates a NaN, we can't really do anything useful
- (not knowing if the host has NaN's, or how to build one). So it will
- end up as an infinity or something close; that is OK. */
-
- mant_bits_left = fmt->man_len;
- mant_off = fmt->man_start;
- dto = 0.0;
- exponent -= fmt->exp_bias;
-
- /* Build the result algebraically. Might go infinite, underflow, etc;
- who cares. */
- while (mant_bits_left > 0)
- {
- int exp_bits;
- exp_bits = mant_bits_left < 32 ? mant_bits_left : 32;
- if (mant_bits_left == fmt->man_len
- && exp_bits == 32
- && fmt->intbit == floatformat_intbit_no)
- {
- /* If there is no integer bit, we need to get only 31 bits
- so we have room for an integer bit that we create. */
- mant_bits = 31;
- }
- else
- mant_bits = exp_bits;
-
- mant = get_field (ufrom, fmt->byteorder, fmt->totalsize,
- mant_off, mant_bits);
- if (mant_bits_left == fmt->man_len)
- mant |= 0x80000000;
- dto += ldexp ((double)mant, exponent - (exp_bits - 1));
- exponent -= exp_bits;
- mant_off += mant_bits;
- mant_bits_left -= mant_bits;
- }
-
- /* Negate it if negative. */
- if (get_field (ufrom, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1))
- dto = -dto;
- memcpy (to, &dto, sizeof (dto));
-}
-
-static void put_field PARAMS ((unsigned char *, enum floatformat_byteorders,
- unsigned int,
- unsigned int,
- unsigned int,
- unsigned long));
-
-/* Set a field which starts at START and is LEN bytes long. DATA and
- TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
-static void
-put_field (data, order, total_len, start, len, stuff_to_put)
- unsigned char *data;
- enum floatformat_byteorders order;
- unsigned int total_len;
- unsigned int start;
- unsigned int len;
- unsigned long stuff_to_put;
-{
- unsigned int cur_byte;
- int cur_bitshift;
-
- /* Start at the least significant part of the field. */
- cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;
- if (order == floatformat_little)
- cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1;
- cur_bitshift =
- ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;
- *(data + cur_byte) &=
- ~(((1 << ((start + len) % FLOATFORMAT_CHAR_BIT)) - 1) << (-cur_bitshift));
- *(data + cur_byte) |=
- (stuff_to_put & ((1 << FLOATFORMAT_CHAR_BIT) - 1)) << (-cur_bitshift);
- cur_bitshift += FLOATFORMAT_CHAR_BIT;
- if (order == floatformat_little)
- ++cur_byte;
- else
- --cur_byte;
-
- /* Move towards the most significant part of the field. */
- while (cur_bitshift < len)
- {
- if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)
- {
- /* This is the last byte. */
- *(data + cur_byte) &=
- ~((1 << (len - cur_bitshift)) - 1);
- *(data + cur_byte) |= (stuff_to_put >> cur_bitshift);
- }
- else
- *(data + cur_byte) = ((stuff_to_put >> cur_bitshift)
- & ((1 << FLOATFORMAT_CHAR_BIT) - 1));
- cur_bitshift += FLOATFORMAT_CHAR_BIT;
- if (order == floatformat_little)
- ++cur_byte;
- else
- --cur_byte;
- }
-}
-
-/* The converse: convert the double *FROM to an extended float
- and store where TO points. Neither FROM nor TO have any alignment
- restrictions. */
-
-void
-floatformat_from_double (fmt, from, to)
- CONST struct floatformat *fmt;
- double *from;
- char *to;
-{
- double dfrom;
- int exponent;
- double mant;
- unsigned int mant_bits, mant_off;
- int mant_bits_left;
- unsigned char *uto = (unsigned char *)to;
-
- memcpy (&dfrom, from, sizeof (dfrom));
- memset (uto, 0, fmt->totalsize / FLOATFORMAT_CHAR_BIT);
- if (dfrom == 0)
- return; /* Result is zero */
- if (dfrom != dfrom)
- {
- /* From is NaN */
- put_field (uto, fmt->byteorder, fmt->totalsize, fmt->exp_start,
- fmt->exp_len, fmt->exp_nan);
- /* Be sure it's not infinity, but NaN value is irrel */
- put_field (uto, fmt->byteorder, fmt->totalsize, fmt->man_start,
- 32, 1);
- return;
- }
-
- /* If negative, set the sign bit. */
- if (dfrom < 0)
- {
- put_field (uto, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1, 1);
- dfrom = -dfrom;
- }
-
- /* How to tell an infinity from an ordinary number? FIXME-someday */
-
- mant = frexp (dfrom, &exponent);
- put_field (uto, fmt->byteorder, fmt->totalsize, fmt->exp_start, fmt->exp_len,
- exponent + fmt->exp_bias - 1);
-
- mant_bits_left = fmt->man_len;
- mant_off = fmt->man_start;
- while (mant_bits_left > 0)
- {
- unsigned long mant_long;
- mant_bits = mant_bits_left < 32 ? mant_bits_left : 32;
-
- mant *= 4294967296.0;
- mant_long = (unsigned long)mant;
- mant -= mant_long;
-
- /* If the integer bit is implicit, then we need to discard it.
- If we are discarding a zero, we should be (but are not) creating
- a denormalized number which means adjusting the exponent
- (I think). */
- if (mant_bits_left == fmt->man_len
- && fmt->intbit == floatformat_intbit_no)
- {
- mant_long &= 0x7fffffff;
- mant_bits -= 1;
- }
- else if (mant_bits < 32)
- {
- /* The bits we want are in the most significant MANT_BITS bits of
- mant_long. Move them to the least significant. */
- mant_long >>= 32 - mant_bits;
- }
-
- put_field (uto, fmt->byteorder, fmt->totalsize,
- mant_off, mant_bits, mant_long);
- mant_off += mant_bits;
- mant_bits_left -= mant_bits;
- }
-}
-
-
-#ifdef IEEE_DEBUG
-
-/* This is to be run on a host which uses IEEE floating point. */
-
-void
-ieee_test (n)
- double n;
-{
- double result;
- char exten[16];
-
- floatformat_to_double (&floatformat_ieee_double_big, &n, &result);
- if (n != result)
- printf ("Differ(to): %.20g -> %.20g\n", n, result);
- floatformat_from_double (&floatformat_ieee_double_big, &n, &result);
- if (n != result)
- printf ("Differ(from): %.20g -> %.20g\n", n, result);
-
- floatformat_from_double (&floatformat_m68881_ext, &n, exten);
- floatformat_to_double (&floatformat_m68881_ext, exten, &result);
- if (n != result)
- printf ("Differ(to+from): %.20g -> %.20g\n", n, result);
-
-#if IEEE_DEBUG > 1
- /* This is to be run on a host which uses 68881 format. */
- {
- long double ex = *(long double *)exten;
- if (ex != n)
- printf ("Differ(from vs. extended): %.20g\n", n);
- }
-#endif
-}
-
-int
-main ()
-{
- ieee_test (0.5);
- ieee_test (256.0);
- ieee_test (0.12345);
- ieee_test (234235.78907234);
- ieee_test (-512.0);
- ieee_test (-0.004321);
- return 0;
-}
-#endif
diff --git a/contrib/gdb/libiberty/functions.def b/contrib/gdb/libiberty/functions.def
deleted file mode 100644
index 8becc89fc64b..000000000000
--- a/contrib/gdb/libiberty/functions.def
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * List of function definitions that may *optionally* be included
- * in libiberty.a. The function names must match the filenames,
- * e.g. bzero() is defined in bzero.c. (While each file can contain
- * extra functions, do not list them.)
- *
- * In the default libiberty configuration, these object files
- * (e.g bzero.o) are included if and only if cc fails to find
- * the corresponding function in libc.
- */
-
-DEF(atexit, int, (f), void (*f)())
-DEF(bcmp, int, (s1, s2, length), char *s1 AND char *s2 AND int length )
-DEF(bcopy, void, (s1, s2, length), char *s1 AND char *s2 AND int length )
-DEF(bzero, void, (s, length), char *s AND int length)
-DEF(clock, clock_t, (), NOTHING)
-DEF(getopt, int, (argc, argv, optstring),
- int argc AND char **argv AND CONST char *optstring)
-DEF(getpagesize, int , (), NOTHING)
-DEF(getcwd, char*, (buf, len), char *buf AND int len)
-DEF(index, char*, (s, c), char *s AND int c)
-DEF(insque, void, (), NOTHING)
-DEF(memchr, PTR, (s, c, length), CONST PTR s AND int c AND size_t length)
-DEF(memcmp, int, (s1, s2, length),
- CONST PTR s1 AND CONST PTR s2 AND size_t length)
-DEF(memcpy, PTR, (s1, s2, length), PTR s1 AND CONST PTR s2 AND size_t length)
-DEF(memmove, PTR, (s1, s2, length), PTR s1 AND CONST PTR s2 AND size_t length)
-DEF(memset, PTR, (s, val, length), PTR s AND int val AND size_t length )
-DEF(random, long int, (), NOTHING)
-DEF(rename, int, (f, t), char *f AND char *t)
-DEF(rindex, char*, (s, c), char *s AND int c)
-DEF(strcasecmp, int, (s1, s2), char *s1 AND char *s2)
-DEF(strncasecmp, int, (s1, s2, n), char *s1 AND char *s2 AND int n)
-DEF(strchr, char*, (s, c), CONST char *s AND int c)
-DEF(strdup, char*, (s1), char * s1)
-DEF(strrchr, char*, (s, c), CONST char *s AND int c)
-DEF(strstr, char*, (), NOTHING)
-DEF(strtod, double, (), NOTHING)
-DEF(strtol, long, (), NOTHING)
-DEF(strtoul, unsigned long, (), NOTHING)
-DEF(tmpnam, char *, (s), char * s)
-DEF(vfork, int, (), NOTHING)
-DEF(vfprintf, int, (), NOTHING)
-DEF(vprintf, int, (), NOTHING)
-DEF(vsprintf, int, (), NOTHING)
-DEF(sigsetmask, int, (), NOTHING)
-DEF(alloca, PTR, (size), size_t size)
-DEF(waitpid, int, (pid, statp, opts), int pid AND int* statp AND int opts )
-
-/* List of global variables that we want to look for in the host
- environment, and to generate an entry NEED_<variable> in config.h
- if they are not found. The first arg is the variable name, the
- second arg is how to declare the variable, and the third is how to
- use it. */
-
-DEFVAR(sys_nerr, int sys_nerr, sys_nerr = 0)
-DEFVAR(sys_errlist, char *sys_errlist[], sys_errlist[0] = 0)
-DEFVAR(sys_siglist, char *sys_siglist[], sys_siglist[0] = 0)
-
-/* List of global functions that we want to look for in the host
- environment, and to generate an entry NEED_<funcname> in config.h
- if they are not found. */
-
-DEFFUNC(strerror, char*, (), NOTHING)
-DEFFUNC(psignal, void, (signo, message), unsigned signo AND char *message)
-DEFFUNC(basename, char *, (name), CONST char *name)
-DEFFUNC(on_exit, void, (f, arg), void (*f)() AND char *arg)
diff --git a/contrib/gdb/libiberty/getcwd.c b/contrib/gdb/libiberty/getcwd.c
deleted file mode 100644
index 60c1dd84eed9..000000000000
--- a/contrib/gdb/libiberty/getcwd.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Emulate getcwd using getwd.
- This function is in the public domain. */
-
-/*
-NAME
- getcwd -- get absolute pathname for current working directory
-
-SYNOPSIS
- char *getcwd (char pathname[len], len)
-
-DESCRIPTION
- Copy the absolute pathname for the current working directory into
- the supplied buffer and return a pointer to the buffer. If the
- current directory's path doesn't fit in LEN characters, the result
- is NULL and errno is set.
-
-BUGS
- Emulated via the getwd() call, which is reasonable for most
- systems that do not have getcwd().
-
-*/
-
-#ifndef NO_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <errno.h>
-
-extern char *getwd ();
-extern int errno;
-
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024
-#endif
-
-char *
-getcwd (buf, len)
- char *buf;
- int len;
-{
- char ourbuf[MAXPATHLEN];
- char *result;
-
- result = getwd (ourbuf);
- if (result) {
- if (strlen (ourbuf) >= len) {
- errno = ERANGE;
- return 0;
- }
- strcpy (buf, ourbuf);
- }
- return buf;
-}
diff --git a/contrib/gdb/libiberty/getopt.c b/contrib/gdb/libiberty/getopt.c
deleted file mode 100644
index 458dca22b448..000000000000
--- a/contrib/gdb/libiberty/getopt.c
+++ /dev/null
@@ -1,757 +0,0 @@
-/* Getopt for GNU.
- NOTE: getopt is now part of the C library, so if you don't know what
- "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
- before changing it!
-
- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95
- Free Software Foundation, Inc.
-
-This file is part of the libiberty library. This library is free
-software; you can redistribute 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 library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-As a special exception, if you link this library with files
-compiled with a GNU compiler to produce an executable, this does not cause
-the resulting executable to be covered by the GNU General Public License.
-This exception does not however invalidate any other reasons why
-the executable file might be covered by the GNU General Public License. */
-
-/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
- Ditto for AIX 3.2 and <stdlib.h>. */
-#ifndef _NO_PROTO
-#define _NO_PROTO
-#endif
-
-#ifdef HAVE_CONFIG_H
-#if defined (emacs) || defined (CONFIG_BROKETS)
-/* We use <config.h> instead of "config.h" so that a compilation
- using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
- (which it would do because it found this file in $srcdir). */
-#include <config.h>
-#else
-#include "config.h"
-#endif
-#endif
-
-#ifndef __STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-#ifndef const
-#define const
-#endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-/* Many versions of the Linux C library include older, broken versions
- of these routines, which will break the linker's command-line
- parsing. */
-
-#if defined (_LIBC) || !defined (__GNU_LIBRARY__) || defined (__linux__)
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-/* Don't include stdlib.h for non-GNU C libraries because some of them
- contain conflicting prototypes for getopt. */
-#include <stdlib.h>
-#endif /* GNU C library. */
-
-/* This version of `getopt' appears to the caller like standard Unix `getopt'
- but it behaves differently for the user, since it allows the user
- to intersperse the options with the other arguments.
-
- As `getopt' works, it permutes the elements of ARGV so that,
- when it is done, all the options precede everything else. Thus
- all application programs are extended to handle flexible argument order.
-
- Setting the environment variable POSIXLY_CORRECT disables permutation.
- Then the behavior is completely standard.
-
- GNU application programs can use a third alternative mode in which
- they can distinguish the relative order of options and other arguments. */
-
-#include "getopt.h"
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-char *optarg = NULL;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns EOF, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-/* XXX 1003.2 says this must be 1 before any call. */
-int optind = 0;
-
-/* The next char to be scanned in the option-element
- in which the last option character we returned was found.
- This allows us to pick up the scan where we left off.
-
- If this is zero, or a null string, it means resume the scan
- by advancing to the next ARGV-element. */
-
-static char *nextchar;
-
-/* Callers store zero here to inhibit the error message
- for unrecognized options. */
-
-int opterr = 1;
-
-/* Set to an option character which was unrecognized.
- This must be initialized on some systems to avoid linking in the
- system's own getopt implementation. */
-
-int optopt = '?';
-
-/* Describe how to deal with options that follow non-option ARGV-elements.
-
- If the caller did not specify anything,
- the default is REQUIRE_ORDER if the environment variable
- POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
- REQUIRE_ORDER means don't recognize them as options;
- stop option processing when the first non-option is seen.
- This is what Unix does.
- This mode of operation is selected by either setting the environment
- variable POSIXLY_CORRECT, or using `+' as the first character
- of the list of option characters.
-
- PERMUTE is the default. We permute the contents of ARGV as we scan,
- so that eventually all the non-options are at the end. This allows options
- to be given in any order, even with programs that were not written to
- expect this.
-
- RETURN_IN_ORDER is an option available to programs that were written
- to expect options and other ARGV-elements in any order and that care about
- the ordering of the two. We describe each non-option ARGV-element
- as if it were the argument of an option with character code 1.
- Using `-' as the first character of the list of option characters
- selects this mode of operation.
-
- The special argument `--' forces an end of option-scanning regardless
- of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- `--' can cause `getopt' to return EOF with `optind' != ARGC. */
-
-static enum
-{
- REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
-} ordering;
-
-#ifdef __GNU_LIBRARY__
-/* We want to avoid inclusion of string.h with non-GNU libraries
- because there are many ways it can cause trouble.
- On some systems, it contains special magic macros that don't work
- in GCC. */
-#include <string.h>
-#define my_index strchr
-#else
-
-/* Avoid depending on library functions or files
- whose names are inconsistent. */
-
-char *getenv ();
-
-static char *
-my_index (str, chr)
- const char *str;
- int chr;
-{
- while (*str)
- {
- if (*str == chr)
- return (char *) str;
- str++;
- }
- return 0;
-}
-
-/* If using GCC, we can safely declare strlen this way.
- If not using GCC, it is ok not to declare it. */
-#ifdef __GNUC__
-/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
- That was relevant to code that was here before. */
-#ifndef __STDC__
-/* gcc with -traditional declares the built-in strlen to return int,
- and has done so at least since version 2.4.5. -- rms. */
-extern int strlen (const char *);
-#endif /* not __STDC__ */
-#endif /* __GNUC__ */
-
-#endif /* not __GNU_LIBRARY__ */
-
-/* Handle permutation of arguments. */
-
-/* Describe the part of ARGV that contains non-options that have
- been skipped. `first_nonopt' is the index in ARGV of the first of them;
- `last_nonopt' is the index after the last of them. */
-
-static int first_nonopt;
-static int last_nonopt;
-
-/* Exchange two adjacent subsequences of ARGV.
- One subsequence is elements [first_nonopt,last_nonopt)
- which contains all the non-options that have been skipped so far.
- The other is elements [last_nonopt,optind), which contains all
- the options processed since those non-options were skipped.
-
- `first_nonopt' and `last_nonopt' are relocated so that they describe
- the new indices of the non-options in ARGV after they are moved. */
-
-static void
-exchange (argv)
- char **argv;
-{
- int bottom = first_nonopt;
- int middle = last_nonopt;
- int top = optind;
- char *tem;
-
- /* Exchange the shorter segment with the far end of the longer segment.
- That puts the shorter segment into the right place.
- It leaves the longer segment in the right place overall,
- but it consists of two parts that need to be swapped next. */
-
- while (top > middle && middle > bottom)
- {
- if (top - middle > middle - bottom)
- {
- /* Bottom segment is the short one. */
- int len = middle - bottom;
- register int i;
-
- /* Swap it with the top part of the top segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[top - (middle - bottom) + i];
- argv[top - (middle - bottom) + i] = tem;
- }
- /* Exclude the moved bottom segment from further swapping. */
- top -= len;
- }
- else
- {
- /* Top segment is the short one. */
- int len = top - middle;
- register int i;
-
- /* Swap it with the bottom part of the bottom segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[middle + i];
- argv[middle + i] = tem;
- }
- /* Exclude the moved top segment from further swapping. */
- bottom += len;
- }
- }
-
- /* Update records for the slots the non-options now occupy. */
-
- first_nonopt += (optind - last_nonopt);
- last_nonopt = optind;
-}
-
-/* Initialize the internal data when the first call is made. */
-
-static const char *
-_getopt_initialize (optstring)
- const char *optstring;
-{
- /* Start processing options with ARGV-element 1 (since ARGV-element 0
- is the program name); the sequence of previously skipped
- non-option ARGV-elements is empty. */
-
- first_nonopt = last_nonopt = optind = 1;
-
- nextchar = NULL;
-
- /* Determine how to handle the ordering of options and nonoptions. */
-
- if (optstring[0] == '-')
- {
- ordering = RETURN_IN_ORDER;
- ++optstring;
- }
- else if (optstring[0] == '+')
- {
- ordering = REQUIRE_ORDER;
- ++optstring;
- }
- else if (getenv ("POSIXLY_CORRECT") != NULL)
- ordering = REQUIRE_ORDER;
- else
- ordering = PERMUTE;
-
- return optstring;
-}
-
-/* Scan elements of ARGV (whose length is ARGC) for option characters
- given in OPTSTRING.
-
- If an element of ARGV starts with '-', and is not exactly "-" or "--",
- then it is an option element. The characters of this element
- (aside from the initial '-') are option characters. If `getopt'
- is called repeatedly, it returns successively each of the option characters
- from each of the option elements.
-
- If `getopt' finds another option character, it returns that character,
- updating `optind' and `nextchar' so that the next call to `getopt' can
- resume the scan with the following option character or ARGV-element.
-
- If there are no more option characters, `getopt' returns `EOF'.
- Then `optind' is the index in ARGV of the first ARGV-element
- that is not an option. (The ARGV-elements have been permuted
- so that those that are not options now come last.)
-
- OPTSTRING is a string containing the legitimate option characters.
- If an option character is seen that is not listed in OPTSTRING,
- return '?' after printing an error message. If you set `opterr' to
- zero, the error message is suppressed but we still return '?'.
-
- If a char in OPTSTRING is followed by a colon, that means it wants an arg,
- so the following text in the same ARGV-element, or the text of the following
- ARGV-element, is returned in `optarg'. Two colons mean an option that
- wants an optional arg; if there is text in the current ARGV-element,
- it is returned in `optarg', otherwise `optarg' is set to zero.
-
- If OPTSTRING starts with `-' or `+', it requests different methods of
- handling the non-option ARGV-elements.
- See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
-
- Long-named options begin with `--' instead of `-'.
- Their names may be abbreviated as long as the abbreviation is unique
- or is an exact match for some defined option. If they have an
- argument, it follows the option name in the same ARGV-element, separated
- from the option name by a `=', or else the in next ARGV-element.
- When `getopt' finds a long-named option, it returns 0 if that option's
- `flag' field is nonzero, the value of the option's `val' field
- if the `flag' field is zero.
-
- The elements of ARGV aren't really const, because we permute them.
- But we pretend they're const in the prototype to be compatible
- with other systems.
-
- LONGOPTS is a vector of `struct option' terminated by an
- element containing a name which is zero.
-
- LONGIND returns the index in LONGOPT of the long-named option found.
- It is only valid when a long-named option has been found by the most
- recent call.
-
- If LONG_ONLY is nonzero, '-' as well as '--' can introduce
- long-named options. */
-
-int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
- int argc;
- char *const *argv;
- const char *optstring;
- const struct option *longopts;
- int *longind;
- int long_only;
-{
- optarg = NULL;
-
- if (optind == 0)
- optstring = _getopt_initialize (optstring);
-
- if (nextchar == NULL || *nextchar == '\0')
- {
- /* Advance to the next ARGV-element. */
-
- if (ordering == PERMUTE)
- {
- /* If we have just processed some options following some non-options,
- exchange them so that the options come first. */
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (last_nonopt != optind)
- first_nonopt = optind;
-
- /* Skip any additional non-options
- and extend the range of non-options previously skipped. */
-
- while (optind < argc
- && (argv[optind][0] != '-' || argv[optind][1] == '\0'))
- optind++;
- last_nonopt = optind;
- }
-
- /* The special ARGV-element `--' means premature end of options.
- Skip it like a null option,
- then exchange with previous non-options as if it were an option,
- then skip everything else like a non-option. */
-
- if (optind != argc && !strcmp (argv[optind], "--"))
- {
- optind++;
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (first_nonopt == last_nonopt)
- first_nonopt = optind;
- last_nonopt = argc;
-
- optind = argc;
- }
-
- /* If we have done all the ARGV-elements, stop the scan
- and back over any non-options that we skipped and permuted. */
-
- if (optind == argc)
- {
- /* Set the next-arg-index to point at the non-options
- that we previously skipped, so the caller will digest them. */
- if (first_nonopt != last_nonopt)
- optind = first_nonopt;
- return EOF;
- }
-
- /* If we have come to a non-option and did not permute it,
- either stop the scan or describe it to the caller and pass it by. */
-
- if ((argv[optind][0] != '-' || argv[optind][1] == '\0'))
- {
- if (ordering == REQUIRE_ORDER)
- return EOF;
- optarg = argv[optind++];
- return 1;
- }
-
- /* We have found another option-ARGV-element.
- Skip the initial punctuation. */
-
- nextchar = (argv[optind] + 1
- + (longopts != NULL && argv[optind][1] == '-'));
- }
-
- /* Decode the current option-ARGV-element. */
-
- /* Check whether the ARGV-element is a long option.
-
- If long_only and the ARGV-element has the form "-f", where f is
- a valid short option, don't consider it an abbreviated form of
- a long option that starts with f. Otherwise there would be no
- way to give the -f short option.
-
- On the other hand, if there's a long option "fubar" and
- the ARGV-element is "-fu", do consider that an abbreviation of
- the long option, just like "--fu", and not "-f" with arg "u".
-
- This distinction seems to be the most useful approach. */
-
- if (longopts != NULL
- && (argv[optind][1] == '-'
- || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound;
- int option_index;
-
- for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
- {
- if (nameend - nextchar == strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else
- /* Second or later nonexact match found. */
- ambig = 1;
- }
-
- if (ambig && !exact)
- {
- if (opterr)
- fprintf (stderr, "%s: option `%s' is ambiguous\n",
- argv[0], argv[optind]);
- nextchar += strlen (nextchar);
- optind++;
- return '?';
- }
-
- if (pfound != NULL)
- {
- option_index = indfound;
- optind++;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- optarg = nameend + 1;
- else
- {
- if (opterr)
- {
- if (argv[optind - 1][1] == '-')
- /* --option */
- fprintf (stderr,
- "%s: option `--%s' doesn't allow an argument\n",
- argv[0], pfound->name);
- else
- /* +option or -option */
- fprintf (stderr,
- "%s: option `%c%s' doesn't allow an argument\n",
- argv[0], argv[optind - 1][0], pfound->name);
- }
- nextchar += strlen (nextchar);
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (optind < argc)
- optarg = argv[optind++];
- else
- {
- if (opterr)
- fprintf (stderr, "%s: option `%s' requires an argument\n",
- argv[0], argv[optind - 1]);
- nextchar += strlen (nextchar);
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- nextchar += strlen (nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
-
- /* Can't find it as a long option. If this is not getopt_long_only,
- or the option starts with '--' or is not a valid short
- option, then it's an error.
- Otherwise interpret it as a short option. */
- if (!long_only || argv[optind][1] == '-'
- || my_index (optstring, *nextchar) == NULL)
- {
- if (opterr)
- {
- if (argv[optind][1] == '-')
- /* --option */
- fprintf (stderr, "%s: unrecognized option `--%s'\n",
- argv[0], nextchar);
- else
- /* +option or -option */
- fprintf (stderr, "%s: unrecognized option `%c%s'\n",
- argv[0], argv[optind][0], nextchar);
- }
- nextchar = (char *) "";
- optind++;
- return '?';
- }
- }
-
- /* Look at and handle the next short option-character. */
-
- {
- char c = *nextchar++;
- char *temp = my_index (optstring, c);
-
- /* Increment `optind' when we start to process its last character. */
- if (*nextchar == '\0')
- ++optind;
-
- if (temp == NULL || c == ':')
- {
- if (opterr)
- {
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c);
- }
- optopt = c;
- return '?';
- }
- if (temp[1] == ':')
- {
- if (temp[2] == ':')
- {
- /* This is an option that accepts an argument optionally. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- optind++;
- }
- else
- optarg = NULL;
- nextchar = NULL;
- }
- else
- {
- /* This is an option that requires an argument. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- optind++;
- }
- else if (optind == argc)
- {
- if (opterr)
- {
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr, "%s: option requires an argument -- %c\n",
- argv[0], c);
- }
- optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
- nextchar = NULL;
- }
- }
- return c;
- }
-}
-
-int
-getopt (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
-{
- return _getopt_internal (argc, argv, optstring,
- (const struct option *) 0,
- (int *) 0,
- 0);
-}
-
-#endif /* _LIBC or not __GNU_LIBRARY__. */
-
-#ifdef TEST
-
-/* Compile with -DTEST to make an executable for use in testing
- the above definition of `getopt'. */
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
-
- c = getopt (argc, argv, "abc:d:0123456789");
- if (c == EOF)
- break;
-
- switch (c)
- {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/contrib/gdb/libiberty/getopt1.c b/contrib/gdb/libiberty/getopt1.c
deleted file mode 100644
index c3400e5b6436..000000000000
--- a/contrib/gdb/libiberty/getopt1.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987, 88, 89, 90, 91, 92, 1993
- Free Software Foundation, Inc.
-
- This program 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, or
- (at your option) any later version.
-
- This program is distributed in the hope that 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 this program; if not, write to the Free Software
- Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifdef HAVE_CONFIG_H
-#if defined (emacs) || defined (CONFIG_BROKETS)
-/* We use <config.h> instead of "config.h" so that a compilation
- using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
- (which it would do because it found this file in $srcdir). */
-#include <config.h>
-#else
-#include "config.h"
-#endif
-#endif
-
-#include "getopt.h"
-
-#ifndef __STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-#ifndef const
-#define const
-#endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-/* Many versions of the Linux C library include older, broken versions
- of these routines, which will break the linker's command-line
- parsing. */
-
-#if defined (_LIBC) || !defined (__GNU_LIBRARY__) || defined (__linux__)
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-#include <stdlib.h>
-#else
-char *getenv ();
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-int
-getopt_long (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
-}
-
-/* Like getopt_long, but '-' as well as '--' can indicate a long option.
- If an option that starts with '-' (not '--') doesn't match a long option,
- but does match a short option, it is parsed as a short option
- instead. */
-
-int
-getopt_long_only (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
-}
-
-
-#endif /* _LIBC or not __GNU_LIBRARY__. */
-
-#ifdef TEST
-
-#include <stdio.h>
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
- int option_index = 0;
- static struct option long_options[] =
- {
- {"add", 1, 0, 0},
- {"append", 0, 0, 0},
- {"delete", 1, 0, 0},
- {"verbose", 0, 0, 0},
- {"create", 0, 0, 0},
- {"file", 1, 0, 0},
- {0, 0, 0, 0}
- };
-
- c = getopt_long (argc, argv, "abc:d:0123456789",
- long_options, &option_index);
- if (c == EOF)
- break;
-
- switch (c)
- {
- case 0:
- printf ("option %s", long_options[option_index].name);
- if (optarg)
- printf (" with arg %s", optarg);
- printf ("\n");
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case 'd':
- printf ("option d with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/contrib/gdb/libiberty/getpagesize.c b/contrib/gdb/libiberty/getpagesize.c
deleted file mode 100644
index e9784b8520b8..000000000000
--- a/contrib/gdb/libiberty/getpagesize.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Emulation of getpagesize() for systems that need it. */
-
-/*
-
-NAME
-
- getpagesize -- return the number of bytes in page of memory
-
-SYNOPSIS
-
- int getpagesize (void)
-
-DESCRIPTION
-
- Returns the number of bytes in a page of memory. This is the
- granularity of many of the system memory management routines.
- No guarantee is made as to whether or not it is the same as the
- basic memory management hardware page size.
-
-BUGS
-
- Is intended as a reasonable replacement for systems where this
- is not provided as a system call. The value of 4096 may or may
- not be correct for the systems where it is returned as the default
- value.
-
-*/
-
-#ifndef VMS
-
-#include <sys/types.h>
-#ifndef NO_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#ifdef HAVE_SYSCONF
-#include <unistd.h>
-#define GNU_OUR_PAGESIZE sysconf(_SC_PAGESIZE)
-#else
-#ifdef PAGESIZE
-#define GNU_OUR_PAGESIZE PAGESIZE
-#else /* no PAGESIZE */
-#ifdef EXEC_PAGESIZE
-#define GNU_OUR_PAGESIZE EXEC_PAGESIZE
-#else /* no EXEC_PAGESIZE */
-#ifdef NBPG
-#define GNU_OUR_PAGESIZE (NBPG * CLSIZE)
-#ifndef CLSIZE
-#define CLSIZE 1
-#endif /* CLSIZE */
-#else /* no NBPG */
-#ifdef NBPC
-#define GNU_OUR_PAGESIZE NBPC
-#else /* no NBPC */
-#define GNU_OUR_PAGESIZE 4096 /* Just punt and use reasonable value */
-#endif /* NBPC */
-#endif /* NBPG */
-#endif /* EXEC_PAGESIZE */
-#endif /* PAGESIZE */
-#endif /* HAVE_SYSCONF */
-
-int
-getpagesize ()
-{
- return (GNU_OUR_PAGESIZE);
-}
-
-#else /* VMS */
-
-#if 0 /* older distributions of gcc-vms are missing <syidef.h> */
-#include <syidef.h>
-#endif
-#ifndef SYI$_PAGE_SIZE /* VMS V5.4 and earlier didn't have this yet */
-#define SYI$_PAGE_SIZE 4452
-#endif
-extern unsigned long lib$getsyi(const unsigned short *,...);
-
-int getpagesize ()
-{
- long pagsiz = 0L;
- unsigned short itmcod = SYI$_PAGE_SIZE;
-
- (void) lib$getsyi (&itmcod, (void *) &pagsiz);
- if (pagsiz == 0L)
- pagsiz = 512L; /* VAX default */
- return (int) pagsiz;
-}
-
-#endif /* VMS */
diff --git a/contrib/gdb/libiberty/getruntime.c b/contrib/gdb/libiberty/getruntime.c
deleted file mode 100644
index 1be3b4c4a2a0..000000000000
--- a/contrib/gdb/libiberty/getruntime.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Return time used so far, in microseconds.
- Copyright (C) 1994 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 "ansidecl.h"
-#include "libiberty.h"
-
-/* There are several ways to get elapsed execution time; unfortunately no
- single way is available for all host systems, nor are there reliable
- ways to find out which way is correct for a given host. */
-
-#include <time.h>
-
-/* These should go away when libiberty uses autoconf. */
-
-#if defined(__sun__) && !defined(__svr4__)
-#define HAVE_GETRUSAGE
-#endif
-
-#ifdef HAVE_SYSCONF
-#define HAVE_TIMES
-#endif
-
-#ifdef HAVE_GETRUSAGE
-#include <sys/time.h>
-#include <sys/resource.h>
-#endif
-
-#ifdef HAVE_TIMES
-#ifndef NO_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <sys/times.h>
-#endif
-
-/* This is a fallback; if wrong, it will likely make obviously wrong
- results. */
-
-#ifndef CLOCKS_PER_SEC
-#define CLOCKS_PER_SEC 1
-#endif
-
-long
-get_run_time ()
-{
-#ifdef HAVE_GETRUSAGE
- struct rusage rusage;
-
- getrusage (0, &rusage);
- return (rusage.ru_utime.tv_sec * 1000000 + rusage.ru_utime.tv_usec
- + rusage.ru_stime.tv_sec * 1000000 + rusage.ru_stime.tv_usec);
-#else /* ! HAVE_GETRUSAGE */
-#ifdef HAVE_TIMES
- struct tms tms;
-
- times (&tms);
- return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
-#else /* ! HAVE_TIMES */
- /* Fall back on clock and hope it's correctly implemented. */
- const long clocks_per_sec = CLOCKS_PER_SEC;
- if (clocks_per_sec <= 1000000)
- return clock () * (1000000 / clocks_per_sec);
- else
- return clock () / clocks_per_sec;
-#endif /* HAVE_TIMES */
-#endif /* HAVE_GETRUSAGE */
-}
diff --git a/contrib/gdb/libiberty/hex.c b/contrib/gdb/libiberty/hex.c
deleted file mode 100644
index 3a2eef03d4c0..000000000000
--- a/contrib/gdb/libiberty/hex.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Hex character manipulation support.
- Copyright (C) 1995 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 "libiberty.h"
-
-char _hex_value[_hex_array_size];
-
-void hex_init ()
-{
- int i;
- for (i = 0; i < _hex_array_size; i++)
- _hex_value[i] = _hex_bad;
- for (i = 0; i < 10; i++)
- _hex_value['0' + i] = i;
- for (i = 0; i < 6; i++)
- _hex_value['a' + i] = _hex_value['A' + i] = 10 + i;
-}
diff --git a/contrib/gdb/libiberty/index.c b/contrib/gdb/libiberty/index.c
deleted file mode 100644
index e5a00f54d946..000000000000
--- a/contrib/gdb/libiberty/index.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Stub implementation of (obsolete) index(). */
-
-extern char * strchr();
-
-char *
-index (s, c)
- char *s;
- int c;
-{
- return strchr (s, c);
-}
diff --git a/contrib/gdb/libiberty/insque.c b/contrib/gdb/libiberty/insque.c
deleted file mode 100644
index 775019f8fffc..000000000000
--- a/contrib/gdb/libiberty/insque.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* insque(3C) routines
- This file is in the public domain. */
-
-/*
-NAME
- insque, remque -- insert, remove an element from a queue
-
-SYNOPSIS
- struct qelem {
- struct qelem *q_forw;
- struct qelem *q_back;
- char q_data[];
- };
-
- void insque (struct qelem *elem, struct qelem *pred)
-
- void remque (struct qelem *elem)
-
-DESCRIPTION
- Routines to manipulate queues built from doubly linked lists.
- The insque routine inserts ELEM in the queue immediately after
- PRED. The remque routine removes ELEM from its containing queue.
-*/
-
-
-struct qelem {
- struct qelem *q_forw;
- struct qelem *q_back;
-};
-
-
-void
-insque (elem, pred)
- struct qelem *elem;
- struct qelem *pred;
-{
- elem -> q_forw = pred -> q_forw;
- pred -> q_forw -> q_back = elem;
- elem -> q_back = pred;
- pred -> q_forw = elem;
-}
-
-
-void
-remque (elem)
- struct qelem *elem;
-{
- elem -> q_forw -> q_back = elem -> q_back;
- elem -> q_back -> q_forw = elem -> q_forw;
-}
diff --git a/contrib/gdb/libiberty/makefile.dos b/contrib/gdb/libiberty/makefile.dos
deleted file mode 100644
index 7eba62c33953..000000000000
--- a/contrib/gdb/libiberty/makefile.dos
+++ /dev/null
@@ -1,29 +0,0 @@
-CFLAGS=-O2
-
-OBJS = \
- argv.o \
- basename.o \
- concat.o \
- cplus-dem.o \
- fdmatch.o \
- floatformat.o \
- getopt.o \
- getopt1.o \
- getruntime.o \
- hex.o \
- msdos.o \
- obstack.o \
- spaces.o \
- strerror.o \
- strsignal.o \
- xatexit.o \
- xexit.o \
- xmalloc.o \
- $E
-
-.c.o:
- gcc -I../include $(CFLAGS) -c $<
-
-libiberty.a : $(OBJS)
- -rm libiberty.a
- ar rvs libiberty.a $(OBJS)
diff --git a/contrib/gdb/libiberty/memchr.c b/contrib/gdb/libiberty/memchr.c
deleted file mode 100644
index 93ef43d3f88d..000000000000
--- a/contrib/gdb/libiberty/memchr.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-FUNCTION
- <<memchr>>---find character in memory
-
-INDEX
- memchr
-
-ANSI_SYNOPSIS
- #include <string.h>
- void *memchr(const void *<[src]>, int <[c]>, size_t <[length]>);
-
-TRAD_SYNOPSIS
- #include <string.h>
- void *memchr(<[src]>, <[c]>, <[length]>)
- void *<[src]>;
- void *<[c]>;
- size_t <[length]>;
-
-DESCRIPTION
- This function searches memory starting at <<*<[src]>>> for the
- character <[c]>. The search only ends with the first
- occurrence of <[c]>, or after <[length]> characters; in
- particular, <<NULL>> does not terminate the search.
-
-RETURNS
- If the character <[c]> is found within <[length]> characters
- of <<*<[src]>>>, a pointer to the character is returned. If
- <[c]> is not found, then <<NULL>> is returned.
-
-PORTABILITY
-<<memchr>> requires no supporting OS subroutines.
-
-QUICKREF
- memchr ansi pure
-
-*/
-
-#include <ansidecl.h>
-#ifdef __STDC__
-#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-
-PTR
-memchr (src_void, c, length)
- register CONST PTR src_void;
- int c;
- size_t length;
-{
- CONST unsigned char *src = (CONST unsigned char *)src_void;
-
- while (--length >= 0)
- {
- if (*src == c)
- return (PTR)src;
- src++;
- }
- return NULL;
-}
diff --git a/contrib/gdb/libiberty/memcmp.c b/contrib/gdb/libiberty/memcmp.c
deleted file mode 100644
index 127ae0c8019d..000000000000
--- a/contrib/gdb/libiberty/memcmp.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* memcmp -- compare two memory regions.
- This function is in the public domain. */
-
-/*
-NAME
- memcmp -- compare two memory regions
-
-SYNOPSIS
- int memcmp (const void *from, const void *to, size_t count)
-
-DESCRIPTION
- Compare two memory regions and return less than,
- equal to, or greater than zero, according to lexicographical
- ordering of the compared regions.
-*/
-
-#include <ansidecl.h>
-#ifdef __STDC__
-#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-
-int
-DEFUN(memcmp, (str1, str2, count),
- const PTR str1 AND const PTR str2 AND size_t count)
-{
- register unsigned char *s1 = (unsigned char*)str1;
- register unsigned char *s2 = (unsigned char*)str2;
-
- while (count-- > 0)
- {
- if (*s1++ != *s2++)
- return s1[-1] < s2[-1] ? -1 : 1;
- }
- return 0;
-}
-
diff --git a/contrib/gdb/libiberty/memcpy.c b/contrib/gdb/libiberty/memcpy.c
deleted file mode 100644
index c28208a0f7e8..000000000000
--- a/contrib/gdb/libiberty/memcpy.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* memcpy (the standard C function)
- This function is in the public domain. */
-
-/*
-NAME
- memcpy -- copy memory regions of arbitary length
-
-SYNOPSIS
- void* memcpy (void *out, const void *in, size_t n);
-
-DESCRIPTION
- Copy LENGTH bytes from memory region pointed to by IN to memory
- region pointed to by OUT.
-*/
-
-#include <ansidecl.h>
-#ifdef __STDC__
-#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-
-PTR
-DEFUN(memcpy, (out, in, length), PTR out AND CONST PTR in AND size_t length)
-{
- bcopy(in, out, length);
- return out;
-}
diff --git a/contrib/gdb/libiberty/memmove.c b/contrib/gdb/libiberty/memmove.c
deleted file mode 100644
index 818fc2496622..000000000000
--- a/contrib/gdb/libiberty/memmove.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Wrapper to implement ANSI C's memmove using BSD's bcopy. */
-/* This function is in the public domain. --Per Bothner. */
-#include <ansidecl.h>
-#ifdef __STDC__
-#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-
-PTR
-memmove (s1, s2, n)
- PTR s1;
- CONST PTR s2;
- size_t n;
-{
- bcopy (s2, s1, n);
- return s1;
-}
diff --git a/contrib/gdb/libiberty/memset.c b/contrib/gdb/libiberty/memset.c
deleted file mode 100644
index 5f54831e83c4..000000000000
--- a/contrib/gdb/libiberty/memset.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* memset
- This implementation is in the public domain. */
-
-#include <ansidecl.h>
-#ifdef __STDC__
-#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-
-PTR
-DEFUN(memset, (dest, val, len),
- PTR dest AND register int val AND register size_t len)
-{
- register unsigned char *ptr = (unsigned char*)dest;
- while (len-- > 0)
- *ptr++ = val;
- return dest;
-}
diff --git a/contrib/gdb/libiberty/mpw-config.in b/contrib/gdb/libiberty/mpw-config.in
deleted file mode 100644
index 829d8e730d46..000000000000
--- a/contrib/gdb/libiberty/mpw-config.in
+++ /dev/null
@@ -1,9 +0,0 @@
-# MPW configuration fragment for libiberty.
-
-forward-include "{srcdir}"alloca-norm.h alloca-conf.h
-
-Echo '/* config.h. Generated by mpw-configure. */' > "{o}"config.new
-
-MoveIfChange "{o}"config.new "{o}"config.h
-
-
diff --git a/contrib/gdb/libiberty/mpw-make.sed b/contrib/gdb/libiberty/mpw-make.sed
deleted file mode 100644
index f99eb1a44074..000000000000
--- a/contrib/gdb/libiberty/mpw-make.sed
+++ /dev/null
@@ -1,49 +0,0 @@
-# Sed commands to finish translating libiberty's Unix makefile to MPW syntax.
-
-# Comment out a useless thing.
-/^\.always\./s/^/#/
-
-# Replace the auto-generated list with the list of what we know we need.
-s/`cat needed-list`/"{o}"alloca.c.o "{o}"bcopy.c.o "{o}"getpagesize.c.o "{o}"insque.c.o "{o}"mpw.c.o "{o}"strcasecmp.c.o "{o}"strdup.c.o "{o}"strncasecmp.c.o/
-
-# Paste in some desirable definitions.
-/^###$/a\
-\
-HDEFINES = -d NEED_sys_siglist -d NEED_sys_errlist -d NEED_basename -d NEED_strcasecmp -d NEED_strncasecmp\
-INCLUDES = -i : -i {INCDIR}: -i {INCDIR}:mpw: -i ::extra-include: -i "{s}"\
-\
-.c.o \\Option-f .c\
- {CC} {DepDir}{Default}.c {LIBCFLAGS} {INCLUDES} {HDEFINES} @SEGMENT_FLAG@ -o {TargDir}{Default}.c.o\
-
-# Remove dependency on needed-list, which we don't use.
-/DO_ALSO =/s/needed-list//
-
-/INCDIR=/s/"{srcdir}"{MULTISRCTOP}::/"{topsrcdir}"/
-
-# Whack out the COMPILE.c trickiness.
-/^COMPILE.c /,/^$/d
-
-# Remove the multido trickiness from the "all" target.
-/^all \\Option-f/,/^$/c\
-all \\Option-f {TARGETLIB}\
-
-
-# Remove the RULE1/RULE2 crud.
-/if \[/,/fi/d
-/^RULE1 =/,/RULE2 =/d
-/RULE2/s/RULE2/TARGETLIB/
-
-# Don't want fdmatch ever.
-s/ "{o}"fdmatch.c.o//
-
-# Fix paths to generated files.
-/config.h/s/"{s}"config.h/"{o}"config.h/
-
-# Whack out config rebuild rules.
-/^"{o}"config.h \\Option-f/,/^$/d
-
-
-
-
-
-
diff --git a/contrib/gdb/libiberty/mpw.c b/contrib/gdb/libiberty/mpw.c
deleted file mode 100644
index b93e1008697b..000000000000
--- a/contrib/gdb/libiberty/mpw.c
+++ /dev/null
@@ -1,1010 +0,0 @@
-/* MPW-Unix compatibility library.
- Copyright (C) 1993, 1994, 1995, 1996 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 should only be compiled and linked under MPW. */
-
-#include "mpw.h"
-
-#include <stdlib.h>
-
-#ifndef USE_MW_HEADERS
-#include <sys/time.h>
-#include <sys/resource.h>
-#endif
-
-#include <Types.h>
-#include <Files.h>
-
-#include <Timer.h>
-
-/* Initialize to 0 at first, then set to errno_max() later. */
-
-int sys_nerr = 0;
-
-/* Debug flag for pathname hacking. Set this to one and rebuild. */
-
-int DebugPI = 0;
-
-void
-mpwify_filename(char *unixname, char *macname)
-{
- int i, j, in_middle, terminate = 0;
-
- /* (should truncate 255 chars from end of name, not beginning) */
- if (strlen (unixname) > 255)
- {
- fprintf (stderr, "Pathname \"%s\" is too long for Macs, truncating\n",
- unixname);
- terminate = 1;
- }
- /* Abs Unix path to abs Mac path. */
- if (*unixname == '/')
- {
- if (strncmp (unixname, "/tmp/", 5) == 0)
- {
- /* A temporary name, make a more Mac-flavored tmpname. */
- /* A better choice would be {Boot}Trash:foo, but that would
- require being able to identify the boot disk's and trashcan's
- name. Another option would be to have an env var, so user
- can point it at a ramdisk. */
- strncpy (macname, unixname, 255);
- if (terminate)
- macname[255] = '\0';
- macname[0] = ':';
- macname[4] = '_';
- }
- else
- {
- /* Assume that the leading component is a valid disk name. */
- strncpy (macname, unixname + 1, 255);
- }
- }
- else
- {
- /* If this is a "Unix-only" pathname, assume relative. */
- if (strchr (unixname, '/') && ! strchr (unixname, ':'))
- {
- macname[0] = ':';
- strncpy (macname + 1, unixname, 255);
- }
- else
- {
- /* Otherwise copy it verbatim. */
- /* ... but if of the form ":/foo", lose the extra colon;
- the slash will be made into a colon shortly. */
- if (unixname[0] == ':' && unixname[1] == '/')
- ++unixname;
- strncpy (macname, unixname, 255);
- }
- }
- if (terminate)
- macname[255] = '\0';
- for (i = 0; macname[i] != '\0'; ++i)
- {
- if (macname[i] == '/')
- macname[i] = ':';
- }
- in_middle = 0;
- j = 0;
- for (i = 0; macname[i] != '\0'; ++i)
- {
- /* We're in the middle of the name when a char is not a colon. */
- if (macname[i] != ':')
- in_middle = 1;
- /* Copy chars verbatim, *unless* the char is the first of a pair
- of colons in the middle of a pathname. */
- if (!(in_middle && macname[i] == ':' && macname[i+1] == ':'))
- macname[j++] = macname[i];
- }
- macname[j] = '\0';
- /* If we have a trailing ":.", make it into a ":". */
- if (j >= 2 && macname[j-2] == ':' && macname[j-1] == '.')
- macname[j-1] = '\0';
- if (DebugPI)
- {
- fprintf (stderr, "# Made \"%s\"\n", unixname);
- fprintf (stderr, "# into \"%s\"\n", macname);
- }
-}
-
-/* MPW-flavored basename finder. */
-
-char *
-mpw_basename (name)
- char *name;
-{
- char *base = name;
-
- while (*name)
- {
- if (*name++ == ':')
- {
- base = name;
- }
- }
- return base;
-}
-
-/* Mixed MPW/Unix basename finder. This can be led astray by
- filenames with slashes in them and come up with a basename that
- either corresponds to no file or (worse) to some other file, so
- should only be tried if other methods of finding a file via a
- basename have failed. */
-
-char *
-mpw_mixed_basename (name)
- char *name;
-{
- char *base = name;
-
- while (*name)
- {
- if (*name == '/' || *name == ':')
- {
- base = name + 1;
- }
- ++name;
- }
- return base;
-}
-
-/* This function is fopen() modified to create files that are type TEXT
- or 'BIN ', and always of type 'MPS '. */
-
-FILE *
-mpw_fopen (char *name, char *mode)
-{
-#undef fopen
- int errnum;
- FILE *fp;
- char tmpname[256];
-
- mpwify_filename (name, tmpname);
- PROGRESS (1);
- fp = fopen (tmpname, mode);
- errnum = errno;
-
- /* If writing, need to set type and creator usefully. */
- if (strchr (mode, 'w'))
- {
- char *pname = (char *) malloc (strlen (tmpname) + 2);
- OSErr e;
- struct FInfo fi;
-
- pname[0] = strlen (tmpname);
- strcpy (pname+1, tmpname);
-
- e = GetFInfo ((ConstStr255Param) pname, 0, &fi);
- /* should do spiffier error handling */
- if (e != 0)
- fprintf(stderr, "GetFInfo returns %d\n", e);
- if (strchr (mode, 'b'))
- {
- fi.fdType = (OSType) 'BIN ';
- }
- else
- {
- fi.fdType = (OSType) 'TEXT';
- }
- fi.fdCreator = (OSType) 'MPS ';
- e = SetFInfo ((ConstStr255Param) pname, 0, &fi);
- if (e != 0)
- fprintf(stderr, "SetFInfo returns %d\n", e);
- free (pname);
- }
- if (fp == NULL)
- errno = errnum;
- return fp;
-}
-
-/* This is a version of fseek() modified to fill the file with zeros
- if seeking past the end of it. */
-
-#define ZEROBLKSIZE 4096
-
-char zeros[ZEROBLKSIZE];
-
-int
-mpw_fseek (FILE *fp, int offset, int whence)
-{
-#undef fseek
- int cursize, numleft;
-
- PROGRESS (1);
- if (whence == SEEK_SET)
- {
- fseek (fp, 0, SEEK_END);
- cursize = ftell (fp);
- if (offset > cursize)
- {
- numleft = offset - cursize;
- while (numleft > ZEROBLKSIZE)
- {
- /* This might fail, should check for that. */
- PROGRESS (1);
- fwrite (zeros, 1, ZEROBLKSIZE, fp);
- numleft -= ZEROBLKSIZE;
- }
- PROGRESS (1);
- fwrite (zeros, 1, numleft, fp);
- fflush (fp);
- }
- }
- return fseek (fp, offset, whence);
-}
-
-int
-mpw_fread (char *ptr, int size, int nitems, FILE *stream)
-{
-#undef fread
- int rslt;
-
- PROGRESS (1);
- rslt = fread (ptr, size, nitems, stream);
- PROGRESS (1);
- return rslt;
-}
-
-int
-mpw_fwrite (char *ptr, int size, int nitems, FILE *stream)
-{
-#undef fwrite
- int rslt;
-
- PROGRESS (1);
- rslt = fwrite (ptr, size, nitems, stream);
- PROGRESS (1);
- return rslt;
-}
-
-int
-link ()
-{
- fprintf (stderr, "link not available!\n");
- mpw_abort ();
-}
-
-int
-fork ()
-{
- fprintf (stderr, "fork not available!\n");
- mpw_abort ();
-}
-
-int
-vfork ()
-{
- fprintf (stderr, "vfork not available!\n");
- mpw_abort ();
- return (-1);
-}
-
-int
-pipe (int *fd)
-{
- fprintf (stderr, "pipe not available!\n");
- mpw_abort ();
- return (-1);
-}
-
-#ifndef USE_MW_HEADERS
-int
-execvp (char *file, char **argv)
-{
- fprintf (stderr, "execvp not available!\n");
- mpw_abort ();
- return (-1);
-}
-
-int
-execv (char *path, char **argv)
-{
- fprintf (stderr, "execv not available!\n");
- mpw_abort ();
- return (-1);
-}
-#endif
-
-int
-kill (int pid, int sig)
-{
- fprintf (stderr, "kill not available!\n");
- mpw_abort ();
- return (-1);
-}
-
-int
-wait (int *status)
-{
- *status = 0;
- return 0;
-}
-
-#ifndef USE_MW_HEADERS
-int
-sleep (int seconds)
-{
- unsigned long start_time, now;
-
- time (&start_time);
-
- while (1)
- {
- PROGRESS (1);
- time (&now);
- if (now > start_time + seconds)
- return 0;
- }
-}
-#endif
-
-void
-putenv (char *str)
-{
- /* The GCC driver calls this to do things for collect2, but we
- don't care about collect2. */
-}
-
-int
-chmod (char *path, int mode)
-{
- /* Pretend it was all OK. */
- return 0;
-}
-
-#ifndef USE_MW_HEADERS
-int
-getuid ()
-{
- /* One value is as good as another... */
- return 0;
-}
-
-int
-getgid ()
-{
- /* One value is as good as another... */
- return 0;
-}
-#endif
-
-/* Instead of coredumping, which is not a normal Mac facility, we
- drop into Macsbug. If we then "g" from Macsbug, the program will
- exit cleanly. */
-
-void
-mpw_abort ()
-{
- /* Make sure no output still buffered up, then zap into MacsBug. */
- fflush(stdout);
- fflush(stderr);
- printf("## Abort! ##\n");
-#ifdef MPW_SADE
- SysError(8005);
-#else
- Debugger();
-#endif
- /* "g" in MacsBug will then cause a regular error exit. */
- exit (1);
-}
-
-/* Imitation getrusage based on the ANSI clock() function. */
-
-int
-getrusage (int who, struct rusage *rusage)
-{
- int clk = clock ();
-
-#if 0
- rusage->ru_utime.tv_sec = clk / CLOCKS_PER_SEC;
- rusage->ru_utime.tv_usec = ((clk * 1000) / CLOCKS_PER_SEC) * 1000;
- rusage->ru_stime.tv_sec = 0;
- rusage->ru_stime.tv_usec = 0;
-#endif
-}
-
-int
-sbrk ()
-{
- return 0;
-}
-
-#ifndef USE_MW_HEADERS
-int
-isatty (int fd)
-{
- return 0;
-}
-
-/* This is inherited from Timothy Murray's Posix library. */
-
-#include "utime.h"
-
-int
-utime (char *filename, struct utimbuf *times)
-{
- CInfoPBRec cipbr;
- HFileInfo *fpb = (HFileInfo *) &cipbr;
- DirInfo *dpb = (DirInfo *) &cipbr;
- unsigned char pname[256];
- short err;
-
- strcpy ((char *) pname, filename);
- c2pstr (pname);
-
- dpb->ioDrDirID = 0L;
- fpb->ioNamePtr = pname;
- fpb->ioVRefNum = 0;
- fpb->ioFDirIndex = 0;
- fpb->ioFVersNum = 0;
- err = PBGetCatInfo (&cipbr, 0);
- if (err != noErr) {
- errno = ENOENT;
- return -1;
- }
- dpb->ioDrDirID = 0L;
- fpb->ioFlMdDat = times->modtime;
- fpb->ioFlCrDat = times->actime;
- err = PBSetCatInfo (&cipbr, 0);
- if (err != noErr) {
- errno = EACCES;
- return -1;
- }
- return 0;
-}
-
-int
-mkdir (char *path, int mode)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-rmdir ()
-{
- errno = ENOSYS;
- return -1;
-}
-#endif
-
-chown ()
-{
- errno = ENOSYS;
- return -1;
-}
-
-char *myenviron[] = {NULL};
-
-char **environ = myenviron;
-
-#ifndef USE_MW_HEADERS
-
-/* Minimal 'stat' emulation: tells directories from files and
- gives length and mtime.
-
- Derived from code written by Guido van Rossum, CWI, Amsterdam
- and placed by him in the public domain. */
-
-extern int __uid, __gid;
-
-int __uid = 0;
-int __gid = 0;
-
-/* Bits in ioFlAttrib: */
-#define LOCKBIT (1<<0) /* File locked */
-#define DIRBIT (1<<4) /* It's a directory */
-
-/* Macified "stat" in which filename is given relative to a directory,
- specified by long DirID. */
-
-static int
-_stat (char *name, long dirid, struct stat *buf)
-{
- CInfoPBRec cipbr;
- HFileInfo *fpb = (HFileInfo*) &cipbr;
- DirInfo *dpb = (DirInfo*) &cipbr;
- Str255 pname;
- short err;
-
- /* Make a temp copy of the name and pascalize. */
- strcpy ((char *) pname, name);
- c2pstr (pname);
-
- cipbr.dirInfo.ioDrDirID = dirid;
- cipbr.hFileInfo.ioNamePtr = pname;
- cipbr.hFileInfo.ioVRefNum = 0;
- cipbr.hFileInfo.ioFDirIndex = 0;
- cipbr.hFileInfo.ioFVersNum = 0;
- err = PBGetCatInfo (&cipbr, 0);
- if (err != noErr)
- {
- errno = ENOENT;
- return -1;
- }
- /* Mac files are readable if they can be accessed at all. */
- buf->st_mode = 0444;
- /* Mark unlocked files as writeable. */
- if (!(fpb->ioFlAttrib & LOCKBIT))
- buf->st_mode |= 0222;
- if (fpb->ioFlAttrib & DIRBIT)
- {
- /* Mark directories as "executable". */
- buf->st_mode |= 0111 | S_IFDIR;
- buf->st_size = dpb->ioDrNmFls;
- buf->st_rsize = 0;
- }
- else
- {
- buf->st_mode |= S_IFREG;
- /* Mark apps as "executable". */
- if (fpb->ioFlFndrInfo.fdType == 'APPL')
- buf->st_mode |= 0111;
- /* Fill in the sizes of data and resource forks. */
- buf->st_size = fpb->ioFlLgLen;
- buf->st_rsize = fpb->ioFlRLgLen;
- }
- /* Fill in various times. */
- buf->st_atime = fpb->ioFlCrDat;
- buf->st_mtime = fpb->ioFlMdDat;
- buf->st_ctime = fpb->ioFlCrDat;
- /* Set up an imitation inode number. */
- buf->st_ino = (unsigned short) fpb->ioDirID;
- /* Set up an imitation device. */
- GetVRefNum (buf->st_ino, &buf->st_dev);
- buf->st_uid = __uid;
- buf->st_gid = __gid;
-/* buf->st_FlFndrInfo = fpb->ioFlFndrInfo; */
- return 0;
-}
-
-/* stat() sets up an empty dirid. */
-
-int
-stat (char *path, struct stat *buf)
-{
- long rslt, errnum;
- char tmpname[256];
-
- mpwify_filename (path, tmpname);
- if (DebugPI)
- fprintf (stderr, "# stat (%s, %x)", tmpname, buf);
- PROGRESS (1);
- rslt = _stat (tmpname, 0L, buf);
- errnum = errno;
- if (DebugPI)
- {
- fprintf (stderr, " -> %d", rslt);
- if (rslt != 0)
- fprintf (stderr, " (errno is %d)", errnum);
- fprintf (stderr, "\n");
- fflush (stderr);
- }
- if (rslt != 0)
- errno = errnum;
- return rslt;
-}
-
-int
-fstat (int fd, struct stat *buf)
-{
- FCBPBRec fcb;
- FILE *fp;
- Str255 pathname;
- long dirid = 0L, temp;
- long rslt, errnum;
- short err;
-
- if (DebugPI)
- fprintf (stderr, "# fstat (%d, %x)", fd, buf);
- PROGRESS (1);
- pathname[0] = 0;
-#ifdef FIOFNAME
- /* Use an MPW-specific ioctl to get the pathname associated with
- the file descriptor. */
- ioctl (fd, FIOFNAME, (long *) pathname);
-#else
- you lose
-#endif
- if (DebugPI)
- fprintf (stderr, " (name is %s)", pathname);
- dirid = 0L /* fcb.ioFCBParID */ ;
- rslt = _stat ((char *) pathname, dirid, buf);
- errnum = errno;
- if (DebugPI)
- {
- fprintf (stderr, " -> %d", rslt);
- if (rslt != 0)
- fprintf (stderr, " (errno is %d)", errnum);
- fprintf (stderr, "\n");
- fflush (stderr);
- }
- if (rslt != 0)
- errno = errnum;
- return rslt;
-}
-
-#endif /* n USE_MW_HEADERS */
-
-chdir ()
-{
- errno = ENOSYS;
- return (-1);
-}
-
-char *
-getcwd (char *buf, int size)
-{
- if (buf == NULL)
- buf = (char *) malloc (size);
- strcpy(buf, ":");
- return buf;
-}
-
-/* This should probably be more elaborate for MPW. */
-
-char *
-getpwd ()
-{
- return ":";
-}
-
-int
-mpw_open (char *filename, int arg2, int arg3)
-{
-#undef open
- int fd, errnum = 0;
- char tmpname[256];
-
- mpwify_filename (filename, tmpname);
- fd = open (tmpname, arg2);
- errnum = errno;
-
- if (DebugPI)
- {
- fprintf (stderr, "# open (%s, %d, %d)", tmpname, arg2, arg3);
- fprintf (stderr, " -> %d", fd);
- if (fd == -1)
- fprintf (stderr, " (errno is %d)", errnum);
- fprintf (stderr, "\n");
- }
- if (fd == -1)
- errno = errnum;
- return fd;
-}
-
-int
-mpw_access (char *filename, unsigned int cmd)
-{
-#undef access
-
- int rslt, errnum = 0;
- struct stat st;
- char tmpname[256];
-
- mpwify_filename (filename, tmpname);
- if (cmd & R_OK || cmd & X_OK)
- {
- rslt = stat (tmpname, &st);
- errnum = errno;
- if (rslt >= 0)
- {
- if (((st.st_mode & 004 == 0) && (cmd & R_OK))
- || ((st.st_mode & 002 == 0) && (cmd & W_OK))
- || ((st.st_mode & 001 == 0) && (cmd & X_OK)))
- {
- rslt = -1;
- errnum = EACCES;
- }
- }
- }
- if (DebugPI)
- {
- fprintf (stderr, "# mpw_access (%s, %d)", tmpname, cmd);
- fprintf (stderr, " -> %d", rslt);
- if (rslt != 0)
- fprintf (stderr, " (errno is %d)", errnum);
- fprintf (stderr, "\n");
- }
- if (rslt != 0)
- errno = errnum;
- return rslt;
-}
-
-/* The MPW library creat() has no mode argument. */
-
-int
-mpw_creat (char *path, /* mode_t */ int mode)
-{
-#undef creat
-
-#ifdef USE_MW_HEADERS
- return creat (path, mode);
-#else
- return creat (path);
-#endif
-}
-
-/* This is a hack to get control in an MPW tool before it crashes the
- machine. */
-
-mpw_special_init (name)
- char *name;
-{
- if (strstr (name, "DEBUG"))
- DebugStr("\pat beginning of program");
-}
-
-static int current_umask;
-
-int
-umask(int mask)
-{
- int oldmask = current_umask;
-
- current_umask = mask;
- return oldmask;
-}
-
-/* Cursor-spinning stuff that includes metering of spin rate and delays. */
-
-/* Nonzero when cursor spinning has been set up properly. */
-
-int cursor_inited;
-
-/* Nonzero if spin should be measured and excessive delays reported. */
-
-int measure_spin;
-
-/* Nonzero if spin histogram and rate data should be written out. */
-
-int dump_spin_data;
-
-long warning_threshold = 400000;
-
-long bucket_size = 1024;
-
-long bucket_power = 10;
-
-long numbuckets = 300;
-
-int *delay_counts;
-
-int overflow_count;
-
-char *current_progress;
-
-static UnsignedWide last_microseconds;
-
-static char *last_spin_file = "";
-
-static int last_spin_line;
-
-void
-warn_if_spin_delay (char *file, int line)
-{
- long diff, ix;
- UnsignedWide now;
-
- Microseconds(&now);
-
- diff = now.lo - last_microseconds.lo;
-
- if (diff > warning_threshold)
- fprintf (stderr, "# %s: %ld.%06ld sec delay getting from %s:%d to %s:%d\n",
- (current_progress ? current_progress : ""),
- diff / 1000000, diff % 1000000,
- last_spin_file, last_spin_line, file, line);
- if (dump_spin_data)
- {
- if (diff >= 0)
- {
- ix = diff >> bucket_power;
- if (ix >= 0 && ix < numbuckets && delay_counts != NULL)
- ++delay_counts[ix];
- else
- ++overflow_count;
- }
- else
- fprintf (stderr, "raw diff is %ld (?)\n", diff);
- }
-}
-
-void
-record_for_spin_delay (char *file, int line)
-{
- Microseconds (&last_microseconds);
- last_spin_file = file;
- last_spin_line = line;
-}
-
-void
-mpw_start_progress (char *str, int n, char *file, int line)
-{
- int i;
- char *measure, *threshold;
-
- if (!cursor_inited)
- {
- InitCursorCtl (nil);
- cursor_inited = 1;
- record_for_spin_delay (file, line);
- measure = getenv ("MEASURE_SPIN");
- if (measure != NULL && measure[0] != '\0')
- {
- measure_spin = 1;
- if (strcmp (measure, "all") == 0)
- dump_spin_data = 1;
- }
- threshold = getenv ((const char *) "SPIN_WARN_THRESHOLD");
- if (threshold != NULL && threshold[0] != '\0')
- warning_threshold = atol (threshold);
- if (dump_spin_data)
- {
- if (delay_counts == NULL)
- delay_counts = (int *) malloc (numbuckets * sizeof (int));
- for (i = 0; i < numbuckets; ++i)
- delay_counts[i] = 0;
- overflow_count = 0;
- }
- }
- current_progress = str;
-
- sys_nerr = errno_max ();
-
- mpw_special_init (str);
-}
-
-void
-mpw_progress (int n)
-{
- SpinCursor (32);
-}
-
-void
-mpw_progress_measured (int n, char *file, int line)
-{
- if (measure_spin)
- warn_if_spin_delay (file, line);
- SpinCursor (32);
- if (measure_spin)
- record_for_spin_delay (file, line);
-}
-
-void
-mpw_end_progress (char *str, char *file, int line)
-{
- long i, delay, count = 0, sum = 0, avgdelay, spinrate;
- long curpower = 0, curgroup = 0;
-
- /* Warn if it's been a while since the last spin. */
- if (measure_spin)
- warn_if_spin_delay (file, line);
-
- /* Dump all the nonzero delay counts and an approximation of the delay. */
- if (dump_spin_data && delay_counts != NULL)
- {
- for (i = 0; i < numbuckets; ++i)
- {
- delay = (i + 1) * bucket_size;
- sum += delay_counts[i] * (i + 1);
- count += delay_counts[i];
- if (delay <= (1 << curpower))
- {
- curgroup += delay_counts[i];
- }
- else
- {
- if (curgroup > 0)
- fprintf (stderr,
- "# %s: %d delays between %ld.%06ld and %ld.%06ld sec\n",
- (str ? str : ""),
- curgroup,
- (1 << curpower) / 1000000,
- (1 << curpower) % 1000000,
- (1 << (curpower + 1)) / 1000000,
- (1 << (curpower + 1)) % 1000000);
- ++curpower;
- curgroup = 0;
- }
- }
- if (count > 0)
- {
- avgdelay = (sum * bucket_size) / count;
- spinrate = 1000000 / avgdelay;
- fprintf (stderr, "# %s: Average spin rate is %d times/sec\n",
- (str ? str : ""), spinrate);
- }
- }
-}
-
-#ifdef PROGRESS_TEST
-
-/* Test program. */
-
-main ()
-{
- int i, j;
- double x = 1.0, y = 2.4;
- long start = Microseconds (), tm; FIXME
-
- START_PROGRESS ("hi", 0);
-
- for (i = 0; i < 1000; ++i)
- {
- PROGRESS (1);
-
- for (j = 0; j < (i * 100); ++j)
- {
- x += (x * y) / j;
- }
- }
-
- END_PROGRESS ("hi");
-
- tm = Microseconds () - start;
-
- printf ("Total time is %d.%d secs\n", tm / 1000000, tm % 1000000);
-}
-
-#endif
-
-#ifdef USE_MW_HEADERS
-/* Empty definitions for Metrowerks' SIOUX console library. */
-
-#ifndef __CONSOLE__
-#include <console.h>
-#endif
-
-short
-InstallConsole(short fd)
-{
-#pragma unused (fd)
- return 0;
-}
-
-void
-RemoveConsole(void)
-{
-}
-
-long
-WriteCharsToConsole(char *buf, long n)
-{
-#pragma unused (buf, n)
- return 0;
-}
-
-long ReadCharsFromConsole(char *buf, long n)
-{
-#pragma unused (buf, n)
- return 0;
-}
-
-extern char *
-__ttyname(long fd)
-{
- static char *__devicename = "null device";
-
- if (fd >= 0 && fd <= 2)
- return (__devicename);
- return NULL;
-}
-
-#endif
diff --git a/contrib/gdb/libiberty/msdos.c b/contrib/gdb/libiberty/msdos.c
deleted file mode 100644
index 923e64d4ede6..000000000000
--- a/contrib/gdb/libiberty/msdos.c
+++ /dev/null
@@ -1,15 +0,0 @@
-char msg[] = "No vfork available - aborting\n";
-vfork()
-{
- write(1, msg, sizeof(msg));
-}
-
-sigsetmask()
-{
- /* no signals support in go32 (yet) */
-}
-
-waitpid()
-{
- return -1;
-}
diff --git a/contrib/gdb/libiberty/obstack.c b/contrib/gdb/libiberty/obstack.c
deleted file mode 100644
index 2d380940efce..000000000000
--- a/contrib/gdb/libiberty/obstack.c
+++ /dev/null
@@ -1,507 +0,0 @@
-/* obstack.c - subroutines used implicitly by object stack macros
- Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
-
-This program 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, or (at your option) any
-later version.
-
-This program is distributed in the hope that 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 this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "obstack.h"
-
-/* This is just to get __GNU_LIBRARY__ defined. */
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-/* CYGNUS LOCAL. No, don't comment the code out. We will be using
- ../include/obstack.h, which was changed relatively recently in a
- way that is not binary compatible. Until we feel confident that
- nobody is using the old obstack.c code, force the use of this code.
- This issue will arise anytime a change is made which is not binary
- compatible.
-#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
-*/
-#if 1
-
-
-#ifdef __STDC__
-#define POINTER void *
-#else
-#define POINTER char *
-#endif
-
-/* Determine default alignment. */
-struct fooalign {char x; double d;};
-#define DEFAULT_ALIGNMENT \
- ((PTR_INT_TYPE) ((char *)&((struct fooalign *) 0)->d - (char *)0))
-/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
- But in fact it might be less smart and round addresses to as much as
- DEFAULT_ROUNDING. So we prepare for it to do that. */
-union fooround {long x; double d;};
-#define DEFAULT_ROUNDING (sizeof (union fooround))
-
-/* When we copy a long block of data, this is the unit to do it with.
- On some machines, copying successive ints does not work;
- in such a case, redefine COPYING_UNIT to `long' (if that works)
- or `char' as a last resort. */
-#ifndef COPYING_UNIT
-#define COPYING_UNIT int
-#endif
-
-/* The non-GNU-C macros copy the obstack into this global variable
- to avoid multiple evaluation. */
-
-struct obstack *_obstack;
-
-/* Define a macro that either calls functions with the traditional malloc/free
- calling interface, or calls functions with the mmalloc/mfree interface
- (that adds an extra first argument), based on the state of use_extra_arg.
- For free, do not use ?:, since some compilers, like the MIPS compilers,
- do not allow (expr) ? void : void. */
-
-#define CALL_CHUNKFUN(h, size) \
- (((h) -> use_extra_arg) \
- ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
- : (*(h)->chunkfun) ((size)))
-
-#define CALL_FREEFUN(h, old_chunk) \
- do { \
- if ((h) -> use_extra_arg) \
- (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
- else \
- (*(h)->freefun) ((old_chunk)); \
- } while (0)
-
-
-/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
- Objects start on multiples of ALIGNMENT (0 means use default).
- CHUNKFUN is the function to use to allocate chunks,
- and FREEFUN the function to free them.
-
- Return nonzero if successful, zero if out of memory.
- To recover from an out of memory error,
- free up some memory, then call this again. */
-
-int
-_obstack_begin (h, size, alignment, chunkfun, freefun)
- struct obstack *h;
- int size;
- int alignment;
- POINTER (*chunkfun) ();
- void (*freefun) ();
-{
- register struct _obstack_chunk* chunk; /* points to new chunk */
-
- if (alignment == 0)
- alignment = DEFAULT_ALIGNMENT;
- if (size == 0)
- /* Default size is what GNU malloc can fit in a 4096-byte block. */
- {
- /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
- Use the values for range checking, because if range checking is off,
- the extra bytes won't be missed terribly, but if range checking is on
- and we used a larger request, a whole extra 4096 bytes would be
- allocated.
-
- These number are irrelevant to the new GNU malloc. I suspect it is
- less sensitive to the size of the request. */
- int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
- + 4 + DEFAULT_ROUNDING - 1)
- & ~(DEFAULT_ROUNDING - 1));
- size = 4096 - extra;
- }
-
- h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
- h->freefun = freefun;
- h->chunk_size = size;
- h->alignment_mask = alignment - 1;
- h->use_extra_arg = 0;
-
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
- if (!chunk)
- {
- h->alloc_failed = 1;
- return 0;
- }
- h->alloc_failed = 0;
- h->next_free = h->object_base = chunk->contents;
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
- chunk->prev = 0;
- /* The initial chunk now contains no empty object. */
- h->maybe_empty_object = 0;
- return 1;
-}
-
-int
-_obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
- struct obstack *h;
- int size;
- int alignment;
- POINTER (*chunkfun) ();
- void (*freefun) ();
- POINTER arg;
-{
- register struct _obstack_chunk* chunk; /* points to new chunk */
-
- if (alignment == 0)
- alignment = DEFAULT_ALIGNMENT;
- if (size == 0)
- /* Default size is what GNU malloc can fit in a 4096-byte block. */
- {
- /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
- Use the values for range checking, because if range checking is off,
- the extra bytes won't be missed terribly, but if range checking is on
- and we used a larger request, a whole extra 4096 bytes would be
- allocated.
-
- These number are irrelevant to the new GNU malloc. I suspect it is
- less sensitive to the size of the request. */
- int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
- + 4 + DEFAULT_ROUNDING - 1)
- & ~(DEFAULT_ROUNDING - 1));
- size = 4096 - extra;
- }
-
- h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
- h->freefun = freefun;
- h->chunk_size = size;
- h->alignment_mask = alignment - 1;
- h->extra_arg = arg;
- h->use_extra_arg = 1;
-
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
- if (!chunk)
- {
- h->alloc_failed = 1;
- return 0;
- }
- h->alloc_failed = 0;
- h->next_free = h->object_base = chunk->contents;
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
- chunk->prev = 0;
- /* The initial chunk now contains no empty object. */
- h->maybe_empty_object = 0;
- return 1;
-}
-
-/* Allocate a new current chunk for the obstack *H
- on the assumption that LENGTH bytes need to be added
- to the current object, or a new object of length LENGTH allocated.
- Copies any partial object from the end of the old chunk
- to the beginning of the new one. */
-
-void
-_obstack_newchunk (h, length)
- struct obstack *h;
- int length;
-{
- register struct _obstack_chunk* old_chunk = h->chunk;
- register struct _obstack_chunk* new_chunk;
- register long new_size;
- register int obj_size = h->next_free - h->object_base;
- register int i;
- int already;
-
- /* Compute size for new chunk. */
- new_size = (obj_size + length) + (obj_size >> 3) + 100;
- if (new_size < h->chunk_size)
- new_size = h->chunk_size;
-
- /* Allocate and initialize the new chunk. */
- new_chunk = CALL_CHUNKFUN (h, new_size);
- if (!new_chunk)
- {
- h->alloc_failed = 1;
- return;
- }
- h->alloc_failed = 0;
- h->chunk = new_chunk;
- new_chunk->prev = old_chunk;
- new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
-
- /* Move the existing object to the new chunk.
- Word at a time is fast and is safe if the object
- is sufficiently aligned. */
- if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT)
- {
- for (i = obj_size / sizeof (COPYING_UNIT) - 1;
- i >= 0; i--)
- ((COPYING_UNIT *)new_chunk->contents)[i]
- = ((COPYING_UNIT *)h->object_base)[i];
- /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT,
- but that can cross a page boundary on a machine
- which does not do strict alignment for COPYING_UNITS. */
- already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT);
- }
- else
- already = 0;
- /* Copy remaining bytes one by one. */
- for (i = already; i < obj_size; i++)
- new_chunk->contents[i] = h->object_base[i];
-
- /* If the object just copied was the only data in OLD_CHUNK,
- free that chunk and remove it from the chain.
- But not if that chunk might contain an empty object. */
- if (h->object_base == old_chunk->contents && ! h->maybe_empty_object)
- {
- new_chunk->prev = old_chunk->prev;
- CALL_FREEFUN (h, old_chunk);
- }
-
- h->object_base = new_chunk->contents;
- h->next_free = h->object_base + obj_size;
- /* The new chunk certainly contains no empty object yet. */
- h->maybe_empty_object = 0;
-}
-
-/* Return nonzero if object OBJ has been allocated from obstack H.
- This is here for debugging.
- If you use it in a program, you are probably losing. */
-
-#ifdef __STDC__
-/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
- obstack.h because it is just for debugging. */
-int _obstack_allocated_p (struct obstack *h, POINTER obj);
-#endif
-
-int
-_obstack_allocated_p (h, obj)
- struct obstack *h;
- POINTER obj;
-{
- register struct _obstack_chunk* lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk* plp; /* point to previous chunk if any */
-
- lp = (h)->chunk;
- /* We use >= rather than > since the object cannot be exactly at
- the beginning of the chunk but might be an empty object exactly
- at the end of an adjacent chunk. */
- while (lp != 0 && ((POINTER)lp >= obj || (POINTER)(lp)->limit < obj))
- {
- plp = lp->prev;
- lp = plp;
- }
- return lp != 0;
-}
-
-/* Free objects in obstack H, including OBJ and everything allocate
- more recently than OBJ. If OBJ is zero, free everything in H. */
-
-#undef obstack_free
-
-/* This function has two names with identical definitions.
- This is the first one, called from non-ANSI code. */
-
-void
-_obstack_free (h, obj)
- struct obstack *h;
- POINTER obj;
-{
- register struct _obstack_chunk* lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk* plp; /* point to previous chunk if any */
-
- lp = h->chunk;
- /* We use >= because there cannot be an object at the beginning of a chunk.
- But there can be an empty object at that address
- at the end of another chunk. */
- while (lp != 0 && ((POINTER)lp >= obj || (POINTER)(lp)->limit < obj))
- {
- plp = lp->prev;
- CALL_FREEFUN (h, lp);
- lp = plp;
- /* If we switch chunks, we can't tell whether the new current
- chunk contains an empty object, so assume that it may. */
- h->maybe_empty_object = 1;
- }
- if (lp)
- {
- h->object_base = h->next_free = (char *)(obj);
- h->chunk_limit = lp->limit;
- h->chunk = lp;
- }
- else if (obj != 0)
- /* obj is not in any of the chunks! */
- abort ();
-}
-
-/* This function is used from ANSI code. */
-
-void
-obstack_free (h, obj)
- struct obstack *h;
- POINTER obj;
-{
- register struct _obstack_chunk* lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk* plp; /* point to previous chunk if any */
-
- lp = h->chunk;
- /* We use >= because there cannot be an object at the beginning of a chunk.
- But there can be an empty object at that address
- at the end of another chunk. */
- while (lp != 0 && ((POINTER)lp >= obj || (POINTER)(lp)->limit < obj))
- {
- plp = lp->prev;
- CALL_FREEFUN (h, lp);
- lp = plp;
- /* If we switch chunks, we can't tell whether the new current
- chunk contains an empty object, so assume that it may. */
- h->maybe_empty_object = 1;
- }
- if (lp)
- {
- h->object_base = h->next_free = (char *)(obj);
- h->chunk_limit = lp->limit;
- h->chunk = lp;
- }
- else if (obj != 0)
- /* obj is not in any of the chunks! */
- abort ();
-}
-
-int
-_obstack_memory_used (h)
- struct obstack *h;
-{
- register struct _obstack_chunk* lp;
- register int nbytes = 0;
-
- for (lp = h->chunk; lp != 0; lp = lp->prev)
- {
- nbytes += lp->limit - (char *) lp;
- }
- return nbytes;
-}
-
-#if 0
-/* These are now turned off because the applications do not use it
- and it uses bcopy via obstack_grow, which causes trouble on sysV. */
-
-/* Now define the functional versions of the obstack macros.
- Define them to simply use the corresponding macros to do the job. */
-
-#ifdef __STDC__
-/* These function definitions do not work with non-ANSI preprocessors;
- they won't pass through the macro names in parentheses. */
-
-/* The function names appear in parentheses in order to prevent
- the macro-definitions of the names from being expanded there. */
-
-POINTER (obstack_base) (obstack)
- struct obstack *obstack;
-{
- return obstack_base (obstack);
-}
-
-POINTER (obstack_next_free) (obstack)
- struct obstack *obstack;
-{
- return obstack_next_free (obstack);
-}
-
-int (obstack_object_size) (obstack)
- struct obstack *obstack;
-{
- return obstack_object_size (obstack);
-}
-
-int (obstack_room) (obstack)
- struct obstack *obstack;
-{
- return obstack_room (obstack);
-}
-
-void (obstack_grow) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
-{
- obstack_grow (obstack, pointer, length);
-}
-
-void (obstack_grow0) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
-{
- obstack_grow0 (obstack, pointer, length);
-}
-
-void (obstack_1grow) (obstack, character)
- struct obstack *obstack;
- int character;
-{
- obstack_1grow (obstack, character);
-}
-
-void (obstack_blank) (obstack, length)
- struct obstack *obstack;
- int length;
-{
- obstack_blank (obstack, length);
-}
-
-void (obstack_1grow_fast) (obstack, character)
- struct obstack *obstack;
- int character;
-{
- obstack_1grow_fast (obstack, character);
-}
-
-void (obstack_blank_fast) (obstack, length)
- struct obstack *obstack;
- int length;
-{
- obstack_blank_fast (obstack, length);
-}
-
-POINTER (obstack_finish) (obstack)
- struct obstack *obstack;
-{
- return obstack_finish (obstack);
-}
-
-POINTER (obstack_alloc) (obstack, length)
- struct obstack *obstack;
- int length;
-{
- return obstack_alloc (obstack, length);
-}
-
-POINTER (obstack_copy) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
-{
- return obstack_copy (obstack, pointer, length);
-}
-
-POINTER (obstack_copy0) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
-{
- return obstack_copy0 (obstack, pointer, length);
-}
-
-#endif /* __STDC__ */
-
-#endif /* 0 */
-
-#endif /* _LIBC or not __GNU_LIBRARY__. */
diff --git a/contrib/gdb/libiberty/random.c b/contrib/gdb/libiberty/random.c
deleted file mode 100644
index e205719832b9..000000000000
--- a/contrib/gdb/libiberty/random.c
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/*
- * This is derived from the Berkeley source:
- * @(#)random.c 5.5 (Berkeley) 7/6/88
- * It was reworked for the GNU C Library by Roland McGrath.
- */
-
-#include <errno.h>
-
-#if 0
-
-#include <ansidecl.h>
-#include <limits.h>
-#include <stddef.h>
-#include <stdlib.h>
-
-#else
-
-#define ULONG_MAX ((unsigned long)(~0L)) /* 0xFFFFFFFF for 32-bits */
-#define LONG_MAX ((long)(ULONG_MAX >> 1)) /* 0x7FFFFFFF for 32-bits*/
-
-#ifdef __STDC__
-# define PTR void *
-# define NULL (void *) 0
-#else
-# define PTR char *
-# define NULL 0
-#endif
-
-#endif
-
-long int random ();
-
-/* An improved random number generation package. In addition to the standard
- rand()/srand() like interface, this package also has a special state info
- interface. The initstate() routine is called with a seed, an array of
- bytes, and a count of how many bytes are being passed in; this array is
- then initialized to contain information for random number generation with
- that much state information. Good sizes for the amount of state
- information are 32, 64, 128, and 256 bytes. The state can be switched by
- calling the setstate() function with the same array as was initiallized
- with initstate(). By default, the package runs with 128 bytes of state
- information and generates far better random numbers than a linear
- congruential generator. If the amount of state information is less than
- 32 bytes, a simple linear congruential R.N.G. is used. Internally, the
- state information is treated as an array of longs; the zeroeth element of
- the array is the type of R.N.G. being used (small integer); the remainder
- of the array is the state information for the R.N.G. Thus, 32 bytes of
- state information will give 7 longs worth of state information, which will
- allow a degree seven polynomial. (Note: The zeroeth word of state
- information also has some other information stored in it; see setstate
- for details). The random number generation technique is a linear feedback
- shift register approach, employing trinomials (since there are fewer terms
- to sum up that way). In this approach, the least significant bit of all
- the numbers in the state table will act as a linear feedback shift register,
- and will have period 2^deg - 1 (where deg is the degree of the polynomial
- being used, assuming that the polynomial is irreducible and primitive).
- The higher order bits will have longer periods, since their values are
- also influenced by pseudo-random carries out of the lower bits. The
- total period of the generator is approximately deg*(2**deg - 1); thus
- doubling the amount of state information has a vast influence on the
- period of the generator. Note: The deg*(2**deg - 1) is an approximation
- only good for large deg, when the period of the shift register is the
- dominant factor. With deg equal to seven, the period is actually much
- longer than the 7*(2**7 - 1) predicted by this formula. */
-
-
-
-/* For each of the currently supported random number generators, we have a
- break value on the amount of state information (you need at least thi
- bytes of state info to support this random number generator), a degree for
- the polynomial (actually a trinomial) that the R.N.G. is based on, and
- separation between the two lower order coefficients of the trinomial. */
-
-/* Linear congruential. */
-#define TYPE_0 0
-#define BREAK_0 8
-#define DEG_0 0
-#define SEP_0 0
-
-/* x**7 + x**3 + 1. */
-#define TYPE_1 1
-#define BREAK_1 32
-#define DEG_1 7
-#define SEP_1 3
-
-/* x**15 + x + 1. */
-#define TYPE_2 2
-#define BREAK_2 64
-#define DEG_2 15
-#define SEP_2 1
-
-/* x**31 + x**3 + 1. */
-#define TYPE_3 3
-#define BREAK_3 128
-#define DEG_3 31
-#define SEP_3 3
-
-/* x**63 + x + 1. */
-#define TYPE_4 4
-#define BREAK_4 256
-#define DEG_4 63
-#define SEP_4 1
-
-
-/* Array versions of the above information to make code run faster.
- Relies on fact that TYPE_i == i. */
-
-#define MAX_TYPES 5 /* Max number of types above. */
-
-static int degrees[MAX_TYPES] = { DEG_0, DEG_1, DEG_2, DEG_3, DEG_4 };
-static int seps[MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
-
-
-
-/* Initially, everything is set up as if from:
- initstate(1, randtbl, 128);
- Note that this initialization takes advantage of the fact that srandom
- advances the front and rear pointers 10*rand_deg times, and hence the
- rear pointer which starts at 0 will also end up at zero; thus the zeroeth
- element of the state information, which contains info about the current
- position of the rear pointer is just
- (MAX_TYPES * (rptr - state)) + TYPE_3 == TYPE_3. */
-
-static long int randtbl[DEG_3 + 1] =
- { TYPE_3,
- 0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342,
- 0xde3b81e0, 0xdf0a6fb5, 0xf103bc02, 0x48f340fb,
- 0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd,
- 0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86,
- 0xda672e2a, 0x1588ca88, 0xe369735d, 0x904f35f7,
- 0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc,
- 0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b,
- 0xf5ad9d0e, 0x8999220b, 0x27fb47b9
- };
-
-/* FPTR and RPTR are two pointers into the state info, a front and a rear
- pointer. These two pointers are always rand_sep places aparts, as they
- cycle through the state information. (Yes, this does mean we could get
- away with just one pointer, but the code for random is more efficient
- this way). The pointers are left positioned as they would be from the call:
- initstate(1, randtbl, 128);
- (The position of the rear pointer, rptr, is really 0 (as explained above
- in the initialization of randtbl) because the state table pointer is set
- to point to randtbl[1] (as explained below).) */
-
-static long int *fptr = &randtbl[SEP_3 + 1];
-static long int *rptr = &randtbl[1];
-
-
-
-/* The following things are the pointer to the state information table,
- the type of the current generator, the degree of the current polynomial
- being used, and the separation between the two pointers.
- Note that for efficiency of random, we remember the first location of
- the state information, not the zeroeth. Hence it is valid to access
- state[-1], which is used to store the type of the R.N.G.
- Also, we remember the last location, since this is more efficient than
- indexing every time to find the address of the last element to see if
- the front and rear pointers have wrapped. */
-
-static long int *state = &randtbl[1];
-
-static int rand_type = TYPE_3;
-static int rand_deg = DEG_3;
-static int rand_sep = SEP_3;
-
-static long int *end_ptr = &randtbl[sizeof(randtbl) / sizeof(randtbl[0])];
-
-/* Initialize the random number generator based on the given seed. If the
- type is the trivial no-state-information type, just remember the seed.
- Otherwise, initializes state[] based on the given "seed" via a linear
- congruential generator. Then, the pointers are set to known locations
- that are exactly rand_sep places apart. Lastly, it cycles the state
- information a given number of times to get rid of any initial dependencies
- introduced by the L.C.R.N.G. Note that the initialization of randtbl[]
- for default usage relies on values produced by this routine. */
-void
-srandom (x)
- unsigned int x;
-{
- state[0] = x;
- if (rand_type != TYPE_0)
- {
- register long int i;
- for (i = 1; i < rand_deg; ++i)
- state[i] = (1103515145 * state[i - 1]) + 12345;
- fptr = &state[rand_sep];
- rptr = &state[0];
- for (i = 0; i < 10 * rand_deg; ++i)
- random();
- }
-}
-
-/* Initialize the state information in the given array of N bytes for
- future random number generation. Based on the number of bytes we
- are given, and the break values for the different R.N.G.'s, we choose
- the best (largest) one we can and set things up for it. srandom is
- then called to initialize the state information. Note that on return
- from srandom, we set state[-1] to be the type multiplexed with the current
- value of the rear pointer; this is so successive calls to initstate won't
- lose this information and will be able to restart with setstate.
- Note: The first thing we do is save the current state, if any, just like
- setstate so that it doesn't matter when initstate is called.
- Returns a pointer to the old state. */
-PTR
-initstate (seed, arg_state, n)
- unsigned int seed;
- PTR arg_state;
- unsigned long n;
-{
- PTR ostate = (PTR) &state[-1];
-
- if (rand_type == TYPE_0)
- state[-1] = rand_type;
- else
- state[-1] = (MAX_TYPES * (rptr - state)) + rand_type;
- if (n < BREAK_1)
- {
- if (n < BREAK_0)
- {
- errno = EINVAL;
- return NULL;
- }
- rand_type = TYPE_0;
- rand_deg = DEG_0;
- rand_sep = SEP_0;
- }
- else if (n < BREAK_2)
- {
- rand_type = TYPE_1;
- rand_deg = DEG_1;
- rand_sep = SEP_1;
- }
- else if (n < BREAK_3)
- {
- rand_type = TYPE_2;
- rand_deg = DEG_2;
- rand_sep = SEP_2;
- }
- else if (n < BREAK_4)
- {
- rand_type = TYPE_3;
- rand_deg = DEG_3;
- rand_sep = SEP_3;
- }
- else
- {
- rand_type = TYPE_4;
- rand_deg = DEG_4;
- rand_sep = SEP_4;
- }
-
- state = &((long int *) arg_state)[1]; /* First location. */
- /* Must set END_PTR before srandom. */
- end_ptr = &state[rand_deg];
- srandom(seed);
- if (rand_type == TYPE_0)
- state[-1] = rand_type;
- else
- state[-1] = (MAX_TYPES * (rptr - state)) + rand_type;
-
- return ostate;
-}
-
-/* Restore the state from the given state array.
- Note: It is important that we also remember the locations of the pointers
- in the current state information, and restore the locations of the pointers
- from the old state information. This is done by multiplexing the pointer
- location into the zeroeth word of the state information. Note that due
- to the order in which things are done, it is OK to call setstate with the
- same state as the current state
- Returns a pointer to the old state information. */
-
-PTR
-setstate (arg_state)
- PTR arg_state;
-{
- register long int *new_state = (long int *) arg_state;
- register int type = new_state[0] % MAX_TYPES;
- register int rear = new_state[0] / MAX_TYPES;
- PTR ostate = (PTR) &state[-1];
-
- if (rand_type == TYPE_0)
- state[-1] = rand_type;
- else
- state[-1] = (MAX_TYPES * (rptr - state)) + rand_type;
-
- switch (type)
- {
- case TYPE_0:
- case TYPE_1:
- case TYPE_2:
- case TYPE_3:
- case TYPE_4:
- rand_type = type;
- rand_deg = degrees[type];
- rand_sep = seps[type];
- break;
- default:
- /* State info munged. */
- errno = EINVAL;
- return NULL;
- }
-
- state = &new_state[1];
- if (rand_type != TYPE_0)
- {
- rptr = &state[rear];
- fptr = &state[(rear + rand_sep) % rand_deg];
- }
- /* Set end_ptr too. */
- end_ptr = &state[rand_deg];
-
- return ostate;
-}
-
-/* If we are using the trivial TYPE_0 R.N.G., just do the old linear
- congruential bit. Otherwise, we do our fancy trinomial stuff, which is the
- same in all ther other cases due to all the global variables that have been
- set up. The basic operation is to add the number at the rear pointer into
- the one at the front pointer. Then both pointers are advanced to the next
- location cyclically in the table. The value returned is the sum generated,
- reduced to 31 bits by throwing away the "least random" low bit.
- Note: The code takes advantage of the fact that both the front and
- rear pointers can't wrap on the same call by not testing the rear
- pointer if the front one has wrapped. Returns a 31-bit random number. */
-
-long int
-random ()
-{
- if (rand_type == TYPE_0)
- {
- state[0] = ((state[0] * 1103515245) + 12345) & LONG_MAX;
- return state[0];
- }
- else
- {
- long int i;
- *fptr += *rptr;
- /* Chucking least random bit. */
- i = (*fptr >> 1) & LONG_MAX;
- ++fptr;
- if (fptr >= end_ptr)
- {
- fptr = state;
- ++rptr;
- }
- else
- {
- ++rptr;
- if (rptr >= end_ptr)
- rptr = state;
- }
- return i;
- }
-}
diff --git a/contrib/gdb/libiberty/rename.c b/contrib/gdb/libiberty/rename.c
deleted file mode 100644
index ae26e2d00407..000000000000
--- a/contrib/gdb/libiberty/rename.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* rename -- rename a file
- This function is in the public domain. */
-
-/* Rename a file. */
-
-#include <errno.h>
-
-int
-rename (zfrom, zto)
- char *zfrom;
- char *zto;
-{
- if (link (zfrom, zto) < 0)
- {
- if (errno != EEXIST)
- return -1;
- if (unlink (zto) < 0
- || link (zfrom, zto) < 0)
- return -1;
- }
- return unlink (zfrom);
-}
diff --git a/contrib/gdb/libiberty/rindex.c b/contrib/gdb/libiberty/rindex.c
deleted file mode 100644
index 061d1269f178..000000000000
--- a/contrib/gdb/libiberty/rindex.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Stub implementation of (obsolete) rindex(). */
-
-extern char *strrchr ();
-
-char *
-rindex (s, c)
- char *s;
- int c;
-{
- return strrchr (s, c);
-}
diff --git a/contrib/gdb/libiberty/sigsetmask.c b/contrib/gdb/libiberty/sigsetmask.c
deleted file mode 100644
index 2a09e6a6c5ac..000000000000
--- a/contrib/gdb/libiberty/sigsetmask.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Version of sigsetmask.c
- Written by Steve Chamberlain (sac@cygnus.com).
- Contributed by Cygnus Support.
- This file is in the public doamin. */
-
-/* Set the current signal mask to the set provided, and return the
- previous value */
-
-#define _POSIX_SOURCE
-#include <ansidecl.h>
-/* Including <sys/types.h> seems to be needed by ISC. */
-#include <sys/types.h>
-#include <signal.h>
-
-#ifdef SIG_SETMASK
-int
-DEFUN(sigsetmask,(set),
- int set)
-{
- sigset_t new;
- sigset_t old;
-
- sigemptyset (&new);
- if (set != 0) {
- abort(); /* FIXME, we don't know how to translate old mask to new */
- }
- sigprocmask(SIG_SETMASK, &new, &old);
- return 1; /* FIXME, we always return 1 as old value. */
-}
-#endif
diff --git a/contrib/gdb/libiberty/spaces.c b/contrib/gdb/libiberty/spaces.c
deleted file mode 100644
index 7ea8532d7f6f..000000000000
--- a/contrib/gdb/libiberty/spaces.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Allocate memory region filled with spaces.
- Copyright (C) 1991 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. */
-
-/*
-
-NAME
-
- spaces -- return a pointer to a buffer full of spaces
-
-SYNOPSIS
-
- char *spaces (int count)
-
-DESCRIPTION
-
- Returns a pointer to a memory region filled with the specified
- number of spaces and null terminated. The returned pointer is
- valid until at least the next call.
-
-BUGS
-
-*/
-
-#include "ansidecl.h"
-#include "libiberty.h"
-
-const char *
-spaces (count)
- int count;
-{
- register char *t;
- static char *buf;
- static int maxsize;
- extern char *malloc ();
- extern void free ();
-
- if (count > maxsize)
- {
- if (buf)
- {
- free (buf);
- }
- buf = malloc (count + 1);
- if (buf == (char *) 0)
- return 0;
- for (t = buf + count ; t != buf ; )
- {
- *--t = ' ';
- }
- maxsize = count;
- buf[count] = '\0';
- }
- return (const char *) (buf + maxsize - count);
-}
-
diff --git a/contrib/gdb/libiberty/strcasecmp.c b/contrib/gdb/libiberty/strcasecmp.c
deleted file mode 100644
index 53387ca1b3ee..000000000000
--- a/contrib/gdb/libiberty/strcasecmp.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1987 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of California at Berkeley. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific written prior permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
-#endif /* LIBC_SCCS and not lint */
-
-#include <ansidecl.h>
-#ifdef __STDC__
-#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-
-/*
- * This array is designed for mapping upper and lower case letter
- * together for a case independent comparison. The mappings are
- * based upon ascii character sequences.
- */
-static unsigned char charmap[] = {
- '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
- '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
- '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
- '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
- '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
- '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
- '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
- '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
- '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
- '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
- '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
- '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
- '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
- '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
- '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
- '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
- '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
- '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
- '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
- '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
- '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
- '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
- '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
- '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
- '\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
- '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
- '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
- '\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337',
- '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
- '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
- '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
- '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
-};
-
-int
-strcasecmp(s1, s2)
- const char *s1, *s2;
-{
- register unsigned char u1, u2;
-
- for (;;) {
- u1 = (unsigned char) *s1++;
- u2 = (unsigned char) *s2++;
- if (charmap[u1] != charmap[u2]) {
- return charmap[u1] - charmap[u2];
- }
- if (u1 == '\0') {
- return 0;
- }
- }
-}
-
diff --git a/contrib/gdb/libiberty/strchr.c b/contrib/gdb/libiberty/strchr.c
deleted file mode 100644
index 22976ce248af..000000000000
--- a/contrib/gdb/libiberty/strchr.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Portable version of strchr()
- This function is in the public domain. */
-
-/*
-NAME
- strchr -- return pointer to first occurance of a character
-
-SYNOPSIS
- char *strchr (const char *s, int c)
-
-DESCRIPTION
- Returns a pointer to the first occurance of character C in
- string S, or a NULL pointer if no occurance is found.
-
-BUGS
- Behavior when character is the null character is implementation
- dependent.
-*/
-
-#include <ansidecl.h>
-
-char *
-strchr (s, c)
- register CONST char *s;
- int c;
-{
- do {
- if (*s == c)
- {
- return (char*)s;
- }
- } while (*s++);
- return (0);
-}
diff --git a/contrib/gdb/libiberty/strdup.c b/contrib/gdb/libiberty/strdup.c
deleted file mode 100644
index 1785b34f2745..000000000000
--- a/contrib/gdb/libiberty/strdup.c
+++ /dev/null
@@ -1,10 +0,0 @@
-char *
-strdup(s)
- char *s;
-{
- char *result = (char*)malloc(strlen(s) + 1);
- if (result == (char*)0)
- return (char*)0;
- strcpy(result, s);
- return result;
-}
diff --git a/contrib/gdb/libiberty/strerror.c b/contrib/gdb/libiberty/strerror.c
deleted file mode 100644
index 9f3f92b3d1a7..000000000000
--- a/contrib/gdb/libiberty/strerror.c
+++ /dev/null
@@ -1,829 +0,0 @@
-/* Extended support for using errno values.
- Written by Fred Fish. fnf@cygnus.com
- This file is in the public domain. --Per Bothner. */
-
-#include "ansidecl.h"
-#include "libiberty.h"
-
-#include "config.h"
-
-#ifndef NEED_sys_errlist
-/* Note that errno.h (not sure what OS) or stdio.h (BSD 4.4, at least)
- might declare sys_errlist in a way that the compiler might consider
- incompatible with our later declaration, perhaps by using const
- attributes. So we hide the declaration in errno.h (if any) using a
- macro. */
-#define sys_errlist sys_errlist__
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-
-#ifndef NEED_sys_errlist
-#undef sys_errlist
-#endif
-
-/* Routines imported from standard C runtime libraries. */
-
-#ifdef __STDC__
-#include <stddef.h>
-extern void *malloc (size_t size); /* 4.10.3.3 */
-extern void *memset (void *s, int c, size_t n); /* 4.11.6.1 */
-#else /* !__STDC__ */
-extern char *malloc (); /* Standard memory allocater */
-extern char *memset ();
-#endif /* __STDC__ */
-
-#ifndef MAX
-# define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
-/* Translation table for errno values. See intro(2) in most UNIX systems
- Programmers Reference Manuals.
-
- Note that this table is generally only accessed when it is used at runtime
- to initialize errno name and message tables that are indexed by errno
- value.
-
- Not all of these errnos will exist on all systems. This table is the only
- thing that should have to be updated as new error numbers are introduced.
- It's sort of ugly, but at least its portable. */
-
-struct error_info
-{
- int value; /* The numeric value from <errno.h> */
- const char *name; /* The equivalent symbolic value */
-#ifdef NEED_sys_errlist
- const char *msg; /* Short message about this value */
-#endif
-};
-
-#ifdef NEED_sys_errlist
-# define ENTRY(value, name, msg) {value, name, msg}
-#else
-# define ENTRY(value, name, msg) {value, name}
-#endif
-
-static const struct error_info error_table[] =
-{
-#if defined (EPERM)
- ENTRY(EPERM, "EPERM", "Not owner"),
-#endif
-#if defined (ENOENT)
- ENTRY(ENOENT, "ENOENT", "No such file or directory"),
-#endif
-#if defined (ESRCH)
- ENTRY(ESRCH, "ESRCH", "No such process"),
-#endif
-#if defined (EINTR)
- ENTRY(EINTR, "EINTR", "Interrupted system call"),
-#endif
-#if defined (EIO)
- ENTRY(EIO, "EIO", "I/O error"),
-#endif
-#if defined (ENXIO)
- ENTRY(ENXIO, "ENXIO", "No such device or address"),
-#endif
-#if defined (E2BIG)
- ENTRY(E2BIG, "E2BIG", "Arg list too long"),
-#endif
-#if defined (ENOEXEC)
- ENTRY(ENOEXEC, "ENOEXEC", "Exec format error"),
-#endif
-#if defined (EBADF)
- ENTRY(EBADF, "EBADF", "Bad file number"),
-#endif
-#if defined (ECHILD)
- ENTRY(ECHILD, "ECHILD", "No child processes"),
-#endif
-#if defined (EWOULDBLOCK) /* Put before EAGAIN, sometimes aliased */
- ENTRY(EWOULDBLOCK, "EWOULDBLOCK", "Operation would block"),
-#endif
-#if defined (EAGAIN)
- ENTRY(EAGAIN, "EAGAIN", "No more processes"),
-#endif
-#if defined (ENOMEM)
- ENTRY(ENOMEM, "ENOMEM", "Not enough space"),
-#endif
-#if defined (EACCES)
- ENTRY(EACCES, "EACCES", "Permission denied"),
-#endif
-#if defined (EFAULT)
- ENTRY(EFAULT, "EFAULT", "Bad address"),
-#endif
-#if defined (ENOTBLK)
- ENTRY(ENOTBLK, "ENOTBLK", "Block device required"),
-#endif
-#if defined (EBUSY)
- ENTRY(EBUSY, "EBUSY", "Device busy"),
-#endif
-#if defined (EEXIST)
- ENTRY(EEXIST, "EEXIST", "File exists"),
-#endif
-#if defined (EXDEV)
- ENTRY(EXDEV, "EXDEV", "Cross-device link"),
-#endif
-#if defined (ENODEV)
- ENTRY(ENODEV, "ENODEV", "No such device"),
-#endif
-#if defined (ENOTDIR)
- ENTRY(ENOTDIR, "ENOTDIR", "Not a directory"),
-#endif
-#if defined (EISDIR)
- ENTRY(EISDIR, "EISDIR", "Is a directory"),
-#endif
-#if defined (EINVAL)
- ENTRY(EINVAL, "EINVAL", "Invalid argument"),
-#endif
-#if defined (ENFILE)
- ENTRY(ENFILE, "ENFILE", "File table overflow"),
-#endif
-#if defined (EMFILE)
- ENTRY(EMFILE, "EMFILE", "Too many open files"),
-#endif
-#if defined (ENOTTY)
- ENTRY(ENOTTY, "ENOTTY", "Not a typewriter"),
-#endif
-#if defined (ETXTBSY)
- ENTRY(ETXTBSY, "ETXTBSY", "Text file busy"),
-#endif
-#if defined (EFBIG)
- ENTRY(EFBIG, "EFBIG", "File too large"),
-#endif
-#if defined (ENOSPC)
- ENTRY(ENOSPC, "ENOSPC", "No space left on device"),
-#endif
-#if defined (ESPIPE)
- ENTRY(ESPIPE, "ESPIPE", "Illegal seek"),
-#endif
-#if defined (EROFS)
- ENTRY(EROFS, "EROFS", "Read-only file system"),
-#endif
-#if defined (EMLINK)
- ENTRY(EMLINK, "EMLINK", "Too many links"),
-#endif
-#if defined (EPIPE)
- ENTRY(EPIPE, "EPIPE", "Broken pipe"),
-#endif
-#if defined (EDOM)
- ENTRY(EDOM, "EDOM", "Math argument out of domain of func"),
-#endif
-#if defined (ERANGE)
- ENTRY(ERANGE, "ERANGE", "Math result not representable"),
-#endif
-#if defined (ENOMSG)
- ENTRY(ENOMSG, "ENOMSG", "No message of desired type"),
-#endif
-#if defined (EIDRM)
- ENTRY(EIDRM, "EIDRM", "Identifier removed"),
-#endif
-#if defined (ECHRNG)
- ENTRY(ECHRNG, "ECHRNG", "Channel number out of range"),
-#endif
-#if defined (EL2NSYNC)
- ENTRY(EL2NSYNC, "EL2NSYNC", "Level 2 not synchronized"),
-#endif
-#if defined (EL3HLT)
- ENTRY(EL3HLT, "EL3HLT", "Level 3 halted"),
-#endif
-#if defined (EL3RST)
- ENTRY(EL3RST, "EL3RST", "Level 3 reset"),
-#endif
-#if defined (ELNRNG)
- ENTRY(ELNRNG, "ELNRNG", "Link number out of range"),
-#endif
-#if defined (EUNATCH)
- ENTRY(EUNATCH, "EUNATCH", "Protocol driver not attached"),
-#endif
-#if defined (ENOCSI)
- ENTRY(ENOCSI, "ENOCSI", "No CSI structure available"),
-#endif
-#if defined (EL2HLT)
- ENTRY(EL2HLT, "EL2HLT", "Level 2 halted"),
-#endif
-#if defined (EDEADLK)
- ENTRY(EDEADLK, "EDEADLK", "Deadlock condition"),
-#endif
-#if defined (ENOLCK)
- ENTRY(ENOLCK, "ENOLCK", "No record locks available"),
-#endif
-#if defined (EBADE)
- ENTRY(EBADE, "EBADE", "Invalid exchange"),
-#endif
-#if defined (EBADR)
- ENTRY(EBADR, "EBADR", "Invalid request descriptor"),
-#endif
-#if defined (EXFULL)
- ENTRY(EXFULL, "EXFULL", "Exchange full"),
-#endif
-#if defined (ENOANO)
- ENTRY(ENOANO, "ENOANO", "No anode"),
-#endif
-#if defined (EBADRQC)
- ENTRY(EBADRQC, "EBADRQC", "Invalid request code"),
-#endif
-#if defined (EBADSLT)
- ENTRY(EBADSLT, "EBADSLT", "Invalid slot"),
-#endif
-#if defined (EDEADLOCK)
- ENTRY(EDEADLOCK, "EDEADLOCK", "File locking deadlock error"),
-#endif
-#if defined (EBFONT)
- ENTRY(EBFONT, "EBFONT", "Bad font file format"),
-#endif
-#if defined (ENOSTR)
- ENTRY(ENOSTR, "ENOSTR", "Device not a stream"),
-#endif
-#if defined (ENODATA)
- ENTRY(ENODATA, "ENODATA", "No data available"),
-#endif
-#if defined (ETIME)
- ENTRY(ETIME, "ETIME", "Timer expired"),
-#endif
-#if defined (ENOSR)
- ENTRY(ENOSR, "ENOSR", "Out of streams resources"),
-#endif
-#if defined (ENONET)
- ENTRY(ENONET, "ENONET", "Machine is not on the network"),
-#endif
-#if defined (ENOPKG)
- ENTRY(ENOPKG, "ENOPKG", "Package not installed"),
-#endif
-#if defined (EREMOTE)
- ENTRY(EREMOTE, "EREMOTE", "Object is remote"),
-#endif
-#if defined (ENOLINK)
- ENTRY(ENOLINK, "ENOLINK", "Link has been severed"),
-#endif
-#if defined (EADV)
- ENTRY(EADV, "EADV", "Advertise error"),
-#endif
-#if defined (ESRMNT)
- ENTRY(ESRMNT, "ESRMNT", "Srmount error"),
-#endif
-#if defined (ECOMM)
- ENTRY(ECOMM, "ECOMM", "Communication error on send"),
-#endif
-#if defined (EPROTO)
- ENTRY(EPROTO, "EPROTO", "Protocol error"),
-#endif
-#if defined (EMULTIHOP)
- ENTRY(EMULTIHOP, "EMULTIHOP", "Multihop attempted"),
-#endif
-#if defined (EDOTDOT)
- ENTRY(EDOTDOT, "EDOTDOT", "RFS specific error"),
-#endif
-#if defined (EBADMSG)
- ENTRY(EBADMSG, "EBADMSG", "Not a data message"),
-#endif
-#if defined (ENAMETOOLONG)
- ENTRY(ENAMETOOLONG, "ENAMETOOLONG", "File name too long"),
-#endif
-#if defined (EOVERFLOW)
- ENTRY(EOVERFLOW, "EOVERFLOW", "Value too large for defined data type"),
-#endif
-#if defined (ENOTUNIQ)
- ENTRY(ENOTUNIQ, "ENOTUNIQ", "Name not unique on network"),
-#endif
-#if defined (EBADFD)
- ENTRY(EBADFD, "EBADFD", "File descriptor in bad state"),
-#endif
-#if defined (EREMCHG)
- ENTRY(EREMCHG, "EREMCHG", "Remote address changed"),
-#endif
-#if defined (ELIBACC)
- ENTRY(ELIBACC, "ELIBACC", "Can not access a needed shared library"),
-#endif
-#if defined (ELIBBAD)
- ENTRY(ELIBBAD, "ELIBBAD", "Accessing a corrupted shared library"),
-#endif
-#if defined (ELIBSCN)
- ENTRY(ELIBSCN, "ELIBSCN", ".lib section in a.out corrupted"),
-#endif
-#if defined (ELIBMAX)
- ENTRY(ELIBMAX, "ELIBMAX", "Attempting to link in too many shared libraries"),
-#endif
-#if defined (ELIBEXEC)
- ENTRY(ELIBEXEC, "ELIBEXEC", "Cannot exec a shared library directly"),
-#endif
-#if defined (EILSEQ)
- ENTRY(EILSEQ, "EILSEQ", "Illegal byte sequence"),
-#endif
-#if defined (ENOSYS)
- ENTRY(ENOSYS, "ENOSYS", "Operation not applicable"),
-#endif
-#if defined (ELOOP)
- ENTRY(ELOOP, "ELOOP", "Too many symbolic links encountered"),
-#endif
-#if defined (ERESTART)
- ENTRY(ERESTART, "ERESTART", "Interrupted system call should be restarted"),
-#endif
-#if defined (ESTRPIPE)
- ENTRY(ESTRPIPE, "ESTRPIPE", "Streams pipe error"),
-#endif
-#if defined (ENOTEMPTY)
- ENTRY(ENOTEMPTY, "ENOTEMPTY", "Directory not empty"),
-#endif
-#if defined (EUSERS)
- ENTRY(EUSERS, "EUSERS", "Too many users"),
-#endif
-#if defined (ENOTSOCK)
- ENTRY(ENOTSOCK, "ENOTSOCK", "Socket operation on non-socket"),
-#endif
-#if defined (EDESTADDRREQ)
- ENTRY(EDESTADDRREQ, "EDESTADDRREQ", "Destination address required"),
-#endif
-#if defined (EMSGSIZE)
- ENTRY(EMSGSIZE, "EMSGSIZE", "Message too long"),
-#endif
-#if defined (EPROTOTYPE)
- ENTRY(EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket"),
-#endif
-#if defined (ENOPROTOOPT)
- ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol not available"),
-#endif
-#if defined (EPROTONOSUPPORT)
- ENTRY(EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported"),
-#endif
-#if defined (ESOCKTNOSUPPORT)
- ENTRY(ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT", "Socket type not supported"),
-#endif
-#if defined (EOPNOTSUPP)
- ENTRY(EOPNOTSUPP, "EOPNOTSUPP", "Operation not supported on transport endpoint"),
-#endif
-#if defined (EPFNOSUPPORT)
- ENTRY(EPFNOSUPPORT, "EPFNOSUPPORT", "Protocol family not supported"),
-#endif
-#if defined (EAFNOSUPPORT)
- ENTRY(EAFNOSUPPORT, "EAFNOSUPPORT", "Address family not supported by protocol"),
-#endif
-#if defined (EADDRINUSE)
- ENTRY(EADDRINUSE, "EADDRINUSE", "Address already in use"),
-#endif
-#if defined (EADDRNOTAVAIL)
- ENTRY(EADDRNOTAVAIL, "EADDRNOTAVAIL","Cannot assign requested address"),
-#endif
-#if defined (ENETDOWN)
- ENTRY(ENETDOWN, "ENETDOWN", "Network is down"),
-#endif
-#if defined (ENETUNREACH)
- ENTRY(ENETUNREACH, "ENETUNREACH", "Network is unreachable"),
-#endif
-#if defined (ENETRESET)
- ENTRY(ENETRESET, "ENETRESET", "Network dropped connection because of reset"),
-#endif
-#if defined (ECONNABORTED)
- ENTRY(ECONNABORTED, "ECONNABORTED", "Software caused connection abort"),
-#endif
-#if defined (ECONNRESET)
- ENTRY(ECONNRESET, "ECONNRESET", "Connection reset by peer"),
-#endif
-#if defined (ENOBUFS)
- ENTRY(ENOBUFS, "ENOBUFS", "No buffer space available"),
-#endif
-#if defined (EISCONN)
- ENTRY(EISCONN, "EISCONN", "Transport endpoint is already connected"),
-#endif
-#if defined (ENOTCONN)
- ENTRY(ENOTCONN, "ENOTCONN", "Transport endpoint is not connected"),
-#endif
-#if defined (ESHUTDOWN)
- ENTRY(ESHUTDOWN, "ESHUTDOWN", "Cannot send after transport endpoint shutdown"),
-#endif
-#if defined (ETOOMANYREFS)
- ENTRY(ETOOMANYREFS, "ETOOMANYREFS", "Too many references: cannot splice"),
-#endif
-#if defined (ETIMEDOUT)
- ENTRY(ETIMEDOUT, "ETIMEDOUT", "Connection timed out"),
-#endif
-#if defined (ECONNREFUSED)
- ENTRY(ECONNREFUSED, "ECONNREFUSED", "Connection refused"),
-#endif
-#if defined (EHOSTDOWN)
- ENTRY(EHOSTDOWN, "EHOSTDOWN", "Host is down"),
-#endif
-#if defined (EHOSTUNREACH)
- ENTRY(EHOSTUNREACH, "EHOSTUNREACH", "No route to host"),
-#endif
-#if defined (EALREADY)
- ENTRY(EALREADY, "EALREADY", "Operation already in progress"),
-#endif
-#if defined (EINPROGRESS)
- ENTRY(EINPROGRESS, "EINPROGRESS", "Operation now in progress"),
-#endif
-#if defined (ESTALE)
- ENTRY(ESTALE, "ESTALE", "Stale NFS file handle"),
-#endif
-#if defined (EUCLEAN)
- ENTRY(EUCLEAN, "EUCLEAN", "Structure needs cleaning"),
-#endif
-#if defined (ENOTNAM)
- ENTRY(ENOTNAM, "ENOTNAM", "Not a XENIX named type file"),
-#endif
-#if defined (ENAVAIL)
- ENTRY(ENAVAIL, "ENAVAIL", "No XENIX semaphores available"),
-#endif
-#if defined (EISNAM)
- ENTRY(EISNAM, "EISNAM", "Is a named type file"),
-#endif
-#if defined (EREMOTEIO)
- ENTRY(EREMOTEIO, "EREMOTEIO", "Remote I/O error"),
-#endif
- ENTRY(0, NULL, NULL)
-};
-
-#ifdef EVMSERR
-/* This is not in the table, because the numeric value of EVMSERR (32767)
- lies outside the range of sys_errlist[]. */
-static struct { int value; const char *name, *msg; }
- evmserr = { EVMSERR, "EVMSERR", "VMS-specific error" };
-#endif
-
-/* Translation table allocated and initialized at runtime. Indexed by the
- errno value to find the equivalent symbolic value. */
-
-static const char **error_names;
-static int num_error_names = 0;
-
-/* Translation table allocated and initialized at runtime, if it does not
- already exist in the host environment. Indexed by the errno value to find
- the descriptive string.
-
- We don't export it for use in other modules because even though it has the
- same name, it differs from other implementations in that it is dynamically
- initialized rather than statically initialized. */
-
-#ifdef NEED_sys_errlist
-
-static int sys_nerr;
-static const char **sys_errlist;
-
-#else
-
-extern int sys_nerr;
-extern char *sys_errlist[];
-
-#endif
-
-
-/*
-
-NAME
-
- init_error_tables -- initialize the name and message tables
-
-SYNOPSIS
-
- static void init_error_tables ();
-
-DESCRIPTION
-
- Using the error_table, which is initialized at compile time, generate
- the error_names and the sys_errlist (if needed) tables, which are
- indexed at runtime by a specific errno value.
-
-BUGS
-
- The initialization of the tables may fail under low memory conditions,
- in which case we don't do anything particularly useful, but we don't
- bomb either. Who knows, it might succeed at a later point if we free
- some memory in the meantime. In any case, the other routines know
- how to deal with lack of a table after trying to initialize it. This
- may or may not be considered to be a bug, that we don't specifically
- warn about this particular failure mode.
-
-*/
-
-static void
-init_error_tables ()
-{
- const struct error_info *eip;
- int nbytes;
-
- /* If we haven't already scanned the error_table once to find the maximum
- errno value, then go find it now. */
-
- if (num_error_names == 0)
- {
- for (eip = error_table; eip -> name != NULL; eip++)
- {
- if (eip -> value >= num_error_names)
- {
- num_error_names = eip -> value + 1;
- }
- }
- }
-
- /* Now attempt to allocate the error_names table, zero it out, and then
- initialize it from the statically initialized error_table. */
-
- if (error_names == NULL)
- {
- nbytes = num_error_names * sizeof (char *);
- if ((error_names = (const char **) malloc (nbytes)) != NULL)
- {
- memset (error_names, 0, nbytes);
- for (eip = error_table; eip -> name != NULL; eip++)
- {
- error_names[eip -> value] = eip -> name;
- }
- }
- }
-
-#ifdef NEED_sys_errlist
-
- /* Now attempt to allocate the sys_errlist table, zero it out, and then
- initialize it from the statically initialized error_table. */
-
- if (sys_errlist == NULL)
- {
- nbytes = num_error_names * sizeof (char *);
- if ((sys_errlist = (const char **) malloc (nbytes)) != NULL)
- {
- memset (sys_errlist, 0, nbytes);
- sys_nerr = num_error_names;
- for (eip = error_table; eip -> name != NULL; eip++)
- {
- sys_errlist[eip -> value] = eip -> msg;
- }
- }
- }
-
-#endif
-
-}
-
-/*
-
-NAME
-
- errno_max -- return the max errno value
-
-SYNOPSIS
-
- int errno_max ();
-
-DESCRIPTION
-
- Returns the maximum errno value for which a corresponding symbolic
- name or message is available. Note that in the case where
- we use the sys_errlist supplied by the system, it is possible for
- there to be more symbolic names than messages, or vice versa.
- In fact, the manual page for perror(3C) explicitly warns that one
- should check the size of the table (sys_nerr) before indexing it,
- since new error codes may be added to the system before they are
- added to the table. Thus sys_nerr might be smaller than value
- implied by the largest errno value defined in <errno.h>.
-
- We return the maximum value that can be used to obtain a meaningful
- symbolic name or message.
-
-*/
-
-int
-errno_max ()
-{
- int maxsize;
-
- if (error_names == NULL)
- {
- init_error_tables ();
- }
- maxsize = MAX (sys_nerr, num_error_names);
- return (maxsize - 1);
-}
-
-#ifdef NEED_strerror
-
-/*
-
-NAME
-
- strerror -- map an error number to an error message string
-
-SYNOPSIS
-
- char *strerror (int errnoval)
-
-DESCRIPTION
-
- Maps an errno number to an error message string, the contents of
- which are implementation defined. On systems which have the external
- variables sys_nerr and sys_errlist, these strings will be the same
- as the ones used by perror().
-
- If the supplied error number is within the valid range of indices
- for the sys_errlist, but no message is available for the particular
- error number, then returns the string "Error NUM", where NUM is the
- error number.
-
- If the supplied error number is not a valid index into sys_errlist,
- returns NULL.
-
- The returned string is only guaranteed to be valid only until the
- next call to strerror.
-
-*/
-
-char *
-strerror (errnoval)
- int errnoval;
-{
- char *msg;
- static char buf[32];
-
-#ifdef NEED_sys_errlist
-
- if (error_names == NULL)
- {
- init_error_tables ();
- }
-
-#endif
-
- if ((errnoval < 0) || (errnoval >= sys_nerr))
- {
-#ifdef EVMSERR
- if (errnoval == evmserr.value)
- msg = evmserr.msg;
- else
-#endif
- /* Out of range, just return NULL */
- msg = NULL;
- }
- else if ((sys_errlist == NULL) || (sys_errlist[errnoval] == NULL))
- {
- /* In range, but no sys_errlist or no entry at this index. */
- sprintf (buf, "Error %d", errnoval);
- msg = buf;
- }
- else
- {
- /* In range, and a valid message. Just return the message. */
- msg = (char *) sys_errlist[errnoval];
- }
-
- return (msg);
-}
-
-#endif /* NEED_strerror */
-
-
-/*
-
-NAME
-
- strerrno -- map an error number to a symbolic name string
-
-SYNOPSIS
-
- const char *strerrno (int errnoval)
-
-DESCRIPTION
-
- Given an error number returned from a system call (typically
- returned in errno), returns a pointer to a string containing the
- symbolic name of that error number, as found in <errno.h>.
-
- If the supplied error number is within the valid range of indices
- for symbolic names, but no name is available for the particular
- error number, then returns the string "Error NUM", where NUM is
- the error number.
-
- If the supplied error number is not within the range of valid
- indices, then returns NULL.
-
-BUGS
-
- The contents of the location pointed to are only guaranteed to be
- valid until the next call to strerrno.
-
-*/
-
-const char *
-strerrno (errnoval)
- int errnoval;
-{
- const char *name;
- static char buf[32];
-
- if (error_names == NULL)
- {
- init_error_tables ();
- }
-
- if ((errnoval < 0) || (errnoval >= num_error_names))
- {
-#ifdef EVMSERR
- if (errnoval == evmserr.value)
- name = evmserr.name;
- else
-#endif
- /* Out of range, just return NULL */
- name = NULL;
- }
- else if ((error_names == NULL) || (error_names[errnoval] == NULL))
- {
- /* In range, but no error_names or no entry at this index. */
- sprintf (buf, "Error %d", errnoval);
- name = (const char *) buf;
- }
- else
- {
- /* In range, and a valid name. Just return the name. */
- name = error_names[errnoval];
- }
-
- return (name);
-}
-
-/*
-
-NAME
-
- strtoerrno -- map a symbolic errno name to a numeric value
-
-SYNOPSIS
-
- int strtoerrno (char *name)
-
-DESCRIPTION
-
- Given the symbolic name of a error number, map it to an errno value.
- If no translation is found, returns 0.
-
-*/
-
-int
-strtoerrno (name)
- const char *name;
-{
- int errnoval = 0;
-
- if (name != NULL)
- {
- if (error_names == NULL)
- {
- init_error_tables ();
- }
- for (errnoval = 0; errnoval < num_error_names; errnoval++)
- {
- if ((error_names[errnoval] != NULL) &&
- (strcmp (name, error_names[errnoval]) == 0))
- {
- break;
- }
- }
- if (errnoval == num_error_names)
- {
-#ifdef EVMSERR
- if (strcmp (name, evmserr.name) == 0)
- errnoval = evmserr.value;
- else
-#endif
- errnoval = 0;
- }
- }
- return (errnoval);
-}
-
-
-/* A simple little main that does nothing but print all the errno translations
- if MAIN is defined and this file is compiled and linked. */
-
-#ifdef MAIN
-
-#include <stdio.h>
-
-int
-main ()
-{
- int errn;
- int errnmax;
- const char *name;
- char *msg;
- char *strerror ();
-
- errnmax = errno_max ();
- printf ("%d entries in names table.\n", num_error_names);
- printf ("%d entries in messages table.\n", sys_nerr);
- printf ("%d is max useful index.\n", errnmax);
-
- /* Keep printing values until we get to the end of *both* tables, not
- *either* table. Note that knowing the maximum useful index does *not*
- relieve us of the responsibility of testing the return pointer for
- NULL. */
-
- for (errn = 0; errn <= errnmax; errn++)
- {
- name = strerrno (errn);
- name = (name == NULL) ? "<NULL>" : name;
- msg = strerror (errn);
- msg = (msg == NULL) ? "<NULL>" : msg;
- printf ("%-4d%-18s%s\n", errn, name, msg);
- }
-
- return 0;
-}
-
-#endif
diff --git a/contrib/gdb/libiberty/strncasecmp.c b/contrib/gdb/libiberty/strncasecmp.c
deleted file mode 100644
index 4485cac7a6a2..000000000000
--- a/contrib/gdb/libiberty/strncasecmp.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1987 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of California at Berkeley. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific written prior permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
-#endif /* LIBC_SCCS and not lint */
-
-#include <ansidecl.h>
-#ifdef __STDC__
-#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-
-/*
- * This array is designed for mapping upper and lower case letter
- * together for a case independent comparison. The mappings are
- * based upon ascii character sequences.
- */
-static unsigned char charmap[] = {
- '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
- '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
- '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
- '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
- '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
- '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
- '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
- '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
- '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
- '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
- '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
- '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
- '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
- '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
- '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
- '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
- '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
- '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
- '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
- '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
- '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
- '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
- '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
- '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
- '\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
- '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
- '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
- '\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337',
- '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
- '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
- '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
- '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
-};
-
-int
-strncasecmp(s1, s2, n)
- const char *s1, *s2;
- register size_t n;
-{
- register unsigned char u1, u2;
-
- for (; n != 0; --n) {
- u1 = (unsigned char) *s1++;
- u2 = (unsigned char) *s2++;
- if (charmap[u1] != charmap[u2]) {
- return charmap[u1] - charmap[u2];
- }
- if (u1 == '\0') {
- return 0;
- }
- }
- return 0;
-}
diff --git a/contrib/gdb/libiberty/strrchr.c b/contrib/gdb/libiberty/strrchr.c
deleted file mode 100644
index 30f9e8a3658a..000000000000
--- a/contrib/gdb/libiberty/strrchr.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Portable version of strrchr().
- This function is in the public domain. */
-
-/*
-NAME
- strrchr -- return pointer to last occurance of a character
-
-SYNOPSIS
- char *strrchr (const char *s, int c)
-
-DESCRIPTION
- Returns a pointer to the last occurance of character C in
- string S, or a NULL pointer if no occurance is found.
-
-BUGS
- Behavior when character is the null character is implementation
- dependent.
-*/
-
-#include <ansidecl.h>
-
-char *
-strrchr (s, c)
- register CONST char *s;
- int c;
-{
- char *rtnval = 0;
-
- do {
- if (*s == c)
- rtnval = (char*) s;
- } while (*s++);
- return (rtnval);
-}
diff --git a/contrib/gdb/libiberty/strsignal.c b/contrib/gdb/libiberty/strsignal.c
deleted file mode 100644
index c4dd63c80981..000000000000
--- a/contrib/gdb/libiberty/strsignal.c
+++ /dev/null
@@ -1,627 +0,0 @@
-/* Extended support for using signal values.
- Written by Fred Fish. fnf@cygnus.com
- This file is in the public domain. */
-
-#include "ansidecl.h"
-#include "libiberty.h"
-
-#include "config.h"
-
-#ifdef LOSING_SYS_SIGLIST
-#define sys_siglist no_such_symbol
-#endif
-
-#include <stdio.h>
-#include <signal.h>
-
-/* Routines imported from standard C runtime libraries. */
-
-#ifdef __STDC__
-#include <stddef.h>
-extern void *malloc (size_t size); /* 4.10.3.3 */
-extern void *memset (void *s, int c, size_t n); /* 4.11.6.1 */
-#else /* !__STDC__ */
-extern char *malloc (); /* Standard memory allocater */
-extern char *memset ();
-#endif /* __STDC__ */
-
-#ifdef LOSING_SYS_SIGLIST
-#undef sys_siglist
-#endif
-
-
-#ifndef NULL
-# ifdef __STDC__
-# define NULL (void *) 0
-# else
-# define NULL 0
-# endif
-#endif
-
-#ifndef MAX
-# define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
-/* Translation table for signal values.
-
- Note that this table is generally only accessed when it is used at runtime
- to initialize signal name and message tables that are indexed by signal
- value.
-
- Not all of these signals will exist on all systems. This table is the only
- thing that should have to be updated as new signal numbers are introduced.
- It's sort of ugly, but at least its portable. */
-
-struct signal_info
-{
- int value; /* The numeric value from <signal.h> */
- const char *name; /* The equivalent symbolic value */
-#ifdef NEED_sys_siglist
- const char *msg; /* Short message about this value */
-#endif
-};
-
-#ifdef NEED_sys_siglist
-# define ENTRY(value, name, msg) {value, name, msg}
-#else
-# define ENTRY(value, name, msg) {value, name}
-#endif
-
-static const struct signal_info signal_table[] =
-{
-#if defined (SIGHUP)
- ENTRY(SIGHUP, "SIGHUP", "Hangup"),
-#endif
-#if defined (SIGINT)
- ENTRY(SIGINT, "SIGINT", "Interrupt"),
-#endif
-#if defined (SIGQUIT)
- ENTRY(SIGQUIT, "SIGQUIT", "Quit"),
-#endif
-#if defined (SIGILL)
- ENTRY(SIGILL, "SIGILL", "Illegal instruction"),
-#endif
-#if defined (SIGTRAP)
- ENTRY(SIGTRAP, "SIGTRAP", "Trace/breakpoint trap"),
-#endif
-/* Put SIGIOT before SIGABRT, so that if SIGIOT==SIGABRT then SIGABRT
- overrides SIGIOT. SIGABRT is in ANSI and POSIX.1, and SIGIOT isn't. */
-#if defined (SIGIOT)
- ENTRY(SIGIOT, "SIGIOT", "IOT trap"),
-#endif
-#if defined (SIGABRT)
- ENTRY(SIGABRT, "SIGABRT", "Aborted"),
-#endif
-#if defined (SIGEMT)
- ENTRY(SIGEMT, "SIGEMT", "Emulation trap"),
-#endif
-#if defined (SIGFPE)
- ENTRY(SIGFPE, "SIGFPE", "Arithmetic exception"),
-#endif
-#if defined (SIGKILL)
- ENTRY(SIGKILL, "SIGKILL", "Killed"),
-#endif
-#if defined (SIGBUS)
- ENTRY(SIGBUS, "SIGBUS", "Bus error"),
-#endif
-#if defined (SIGSEGV)
- ENTRY(SIGSEGV, "SIGSEGV", "Segmentation fault"),
-#endif
-#if defined (SIGSYS)
- ENTRY(SIGSYS, "SIGSYS", "Bad system call"),
-#endif
-#if defined (SIGPIPE)
- ENTRY(SIGPIPE, "SIGPIPE", "Broken pipe"),
-#endif
-#if defined (SIGALRM)
- ENTRY(SIGALRM, "SIGALRM", "Alarm clock"),
-#endif
-#if defined (SIGTERM)
- ENTRY(SIGTERM, "SIGTERM", "Terminated"),
-#endif
-#if defined (SIGUSR1)
- ENTRY(SIGUSR1, "SIGUSR1", "User defined signal 1"),
-#endif
-#if defined (SIGUSR2)
- ENTRY(SIGUSR2, "SIGUSR2", "User defined signal 2"),
-#endif
-/* Put SIGCLD before SIGCHLD, so that if SIGCLD==SIGCHLD then SIGCHLD
- overrides SIGCLD. SIGCHLD is in POXIX.1 */
-#if defined (SIGCLD)
- ENTRY(SIGCLD, "SIGCLD", "Child status changed"),
-#endif
-#if defined (SIGCHLD)
- ENTRY(SIGCHLD, "SIGCHLD", "Child status changed"),
-#endif
-#if defined (SIGPWR)
- ENTRY(SIGPWR, "SIGPWR", "Power fail/restart"),
-#endif
-#if defined (SIGWINCH)
- ENTRY(SIGWINCH, "SIGWINCH", "Window size changed"),
-#endif
-#if defined (SIGURG)
- ENTRY(SIGURG, "SIGURG", "Urgent I/O condition"),
-#endif
-#if defined (SIGIO)
- /* "I/O pending" has also been suggested, but is misleading since the
- signal only happens when the process has asked for it, not everytime
- I/O is pending. */
- ENTRY(SIGIO, "SIGIO", "I/O possible"),
-#endif
-#if defined (SIGPOLL)
- ENTRY(SIGPOLL, "SIGPOLL", "Pollable event occurred"),
-#endif
-#if defined (SIGSTOP)
- ENTRY(SIGSTOP, "SIGSTOP", "Stopped (signal)"),
-#endif
-#if defined (SIGTSTP)
- ENTRY(SIGTSTP, "SIGTSTP", "Stopped (user)"),
-#endif
-#if defined (SIGCONT)
- ENTRY(SIGCONT, "SIGCONT", "Continued"),
-#endif
-#if defined (SIGTTIN)
- ENTRY(SIGTTIN, "SIGTTIN", "Stopped (tty input)"),
-#endif
-#if defined (SIGTTOU)
- ENTRY(SIGTTOU, "SIGTTOU", "Stopped (tty output)"),
-#endif
-#if defined (SIGVTALRM)
- ENTRY(SIGVTALRM, "SIGVTALRM", "Virtual timer expired"),
-#endif
-#if defined (SIGPROF)
- ENTRY(SIGPROF, "SIGPROF", "Profiling timer expired"),
-#endif
-#if defined (SIGXCPU)
- ENTRY(SIGXCPU, "SIGXCPU", "CPU time limit exceeded"),
-#endif
-#if defined (SIGXFSZ)
- ENTRY(SIGXFSZ, "SIGXFSZ", "File size limit exceeded"),
-#endif
-#if defined (SIGWIND)
- ENTRY(SIGWIND, "SIGWIND", "SIGWIND"),
-#endif
-#if defined (SIGPHONE)
- ENTRY(SIGPHONE, "SIGPHONE", "SIGPHONE"),
-#endif
-#if defined (SIGLOST)
- ENTRY(SIGLOST, "SIGLOST", "Resource lost"),
-#endif
-#if defined (SIGWAITING)
- ENTRY(SIGWAITING, "SIGWAITING", "Process's LWPs are blocked"),
-#endif
-#if defined (SIGLWP)
- ENTRY(SIGLWP, "SIGLWP", "Signal LWP"),
-#endif
-#if defined (SIGDANGER)
- ENTRY(SIGDANGER, "SIGDANGER", "Swap space dangerously low"),
-#endif
-#if defined (SIGGRANT)
- ENTRY(SIGGRANT, "SIGGRANT", "Monitor mode granted"),
-#endif
-#if defined (SIGRETRACT)
- ENTRY(SIGRETRACT, "SIGRETRACT", "Need to relinguish monitor mode"),
-#endif
-#if defined (SIGMSG)
- ENTRY(SIGMSG, "SIGMSG", "Monitor mode data available"),
-#endif
-#if defined (SIGSOUND)
- ENTRY(SIGSOUND, "SIGSOUND", "Sound completed"),
-#endif
-#if defined (SIGSAK)
- ENTRY(SIGSAK, "SIGSAK", "Secure attention"),
-#endif
- ENTRY(0, NULL, NULL)
-};
-
-/* Translation table allocated and initialized at runtime. Indexed by the
- signal value to find the equivalent symbolic value. */
-
-static const char **signal_names;
-static int num_signal_names = 0;
-
-/* Translation table allocated and initialized at runtime, if it does not
- already exist in the host environment. Indexed by the signal value to find
- the descriptive string.
-
- We don't export it for use in other modules because even though it has the
- same name, it differs from other implementations in that it is dynamically
- initialized rather than statically initialized. */
-
-#ifdef NEED_sys_siglist
-
-static int sys_nsig;
-static const char **sys_siglist;
-
-#else
-
-static int sys_nsig = NSIG;
-extern const char * const sys_siglist[];
-
-#endif
-
-
-/*
-
-NAME
-
- init_signal_tables -- initialize the name and message tables
-
-SYNOPSIS
-
- static void init_signal_tables ();
-
-DESCRIPTION
-
- Using the signal_table, which is initialized at compile time, generate
- the signal_names and the sys_siglist (if needed) tables, which are
- indexed at runtime by a specific signal value.
-
-BUGS
-
- The initialization of the tables may fail under low memory conditions,
- in which case we don't do anything particularly useful, but we don't
- bomb either. Who knows, it might succeed at a later point if we free
- some memory in the meantime. In any case, the other routines know
- how to deal with lack of a table after trying to initialize it. This
- may or may not be considered to be a bug, that we don't specifically
- warn about this particular failure mode.
-
-*/
-
-static void
-init_signal_tables ()
-{
- const struct signal_info *eip;
- int nbytes;
-
- /* If we haven't already scanned the signal_table once to find the maximum
- signal value, then go find it now. */
-
- if (num_signal_names == 0)
- {
- for (eip = signal_table; eip -> name != NULL; eip++)
- {
- if (eip -> value >= num_signal_names)
- {
- num_signal_names = eip -> value + 1;
- }
- }
- }
-
- /* Now attempt to allocate the signal_names table, zero it out, and then
- initialize it from the statically initialized signal_table. */
-
- if (signal_names == NULL)
- {
- nbytes = num_signal_names * sizeof (char *);
- if ((signal_names = (const char **) malloc (nbytes)) != NULL)
- {
- memset (signal_names, 0, nbytes);
- for (eip = signal_table; eip -> name != NULL; eip++)
- {
- signal_names[eip -> value] = eip -> name;
- }
- }
- }
-
-#ifdef NEED_sys_siglist
-
- /* Now attempt to allocate the sys_siglist table, zero it out, and then
- initialize it from the statically initialized signal_table. */
-
- if (sys_siglist == NULL)
- {
- nbytes = num_signal_names * sizeof (char *);
- if ((sys_siglist = (const char **) malloc (nbytes)) != NULL)
- {
- memset (sys_siglist, 0, nbytes);
- sys_nsig = num_signal_names;
- for (eip = signal_table; eip -> name != NULL; eip++)
- {
- sys_siglist[eip -> value] = eip -> msg;
- }
- }
- }
-
-#endif
-
-}
-
-
-/*
-
-NAME
-
- signo_max -- return the max signo value
-
-SYNOPSIS
-
- int signo_max ();
-
-DESCRIPTION
-
- Returns the maximum signo value for which a corresponding symbolic
- name or message is available. Note that in the case where
- we use the sys_siglist supplied by the system, it is possible for
- there to be more symbolic names than messages, or vice versa.
- In fact, the manual page for psignal(3b) explicitly warns that one
- should check the size of the table (NSIG) before indexing it,
- since new signal codes may be added to the system before they are
- added to the table. Thus NSIG might be smaller than value
- implied by the largest signo value defined in <signal.h>.
-
- We return the maximum value that can be used to obtain a meaningful
- symbolic name or message.
-
-*/
-
-int
-signo_max ()
-{
- int maxsize;
-
- if (signal_names == NULL)
- {
- init_signal_tables ();
- }
- maxsize = MAX (sys_nsig, num_signal_names);
- return (maxsize - 1);
-}
-
-
-/*
-
-NAME
-
- strsignal -- map a signal number to a signal message string
-
-SYNOPSIS
-
- const char *strsignal (int signo)
-
-DESCRIPTION
-
- Maps an signal number to an signal message string, the contents of
- which are implementation defined. On systems which have the external
- variable sys_siglist, these strings will be the same as the ones used
- by psignal().
-
- If the supplied signal number is within the valid range of indices
- for the sys_siglist, but no message is available for the particular
- signal number, then returns the string "Signal NUM", where NUM is the
- signal number.
-
- If the supplied signal number is not a valid index into sys_siglist,
- returns NULL.
-
- The returned string is only guaranteed to be valid only until the
- next call to strsignal.
-
-*/
-
-const char *
-strsignal (signo)
- int signo;
-{
- const char *msg;
- static char buf[32];
-
-#ifdef NEED_sys_siglist
-
- if (signal_names == NULL)
- {
- init_signal_tables ();
- }
-
-#endif
-
- if ((signo < 0) || (signo >= sys_nsig))
- {
- /* Out of range, just return NULL */
- msg = NULL;
- }
- else if ((sys_siglist == NULL) || (sys_siglist[signo] == NULL))
- {
- /* In range, but no sys_siglist or no entry at this index. */
- sprintf (buf, "Signal %d", signo);
- msg = (const char *) buf;
- }
- else
- {
- /* In range, and a valid message. Just return the message. */
- msg = (const char *) sys_siglist[signo];
- }
-
- return (msg);
-}
-
-
-/*
-
-NAME
-
- strsigno -- map an signal number to a symbolic name string
-
-SYNOPSIS
-
- const char *strsigno (int signo)
-
-DESCRIPTION
-
- Given an signal number, returns a pointer to a string containing
- the symbolic name of that signal number, as found in <signal.h>.
-
- If the supplied signal number is within the valid range of indices
- for symbolic names, but no name is available for the particular
- signal number, then returns the string "Signal NUM", where NUM is
- the signal number.
-
- If the supplied signal number is not within the range of valid
- indices, then returns NULL.
-
-BUGS
-
- The contents of the location pointed to are only guaranteed to be
- valid until the next call to strsigno.
-
-*/
-
-const char *
-strsigno (signo)
- int signo;
-{
- const char *name;
- static char buf[32];
-
- if (signal_names == NULL)
- {
- init_signal_tables ();
- }
-
- if ((signo < 0) || (signo >= num_signal_names))
- {
- /* Out of range, just return NULL */
- name = NULL;
- }
- else if ((signal_names == NULL) || (signal_names[signo] == NULL))
- {
- /* In range, but no signal_names or no entry at this index. */
- sprintf (buf, "Signal %d", signo);
- name = (const char *) buf;
- }
- else
- {
- /* In range, and a valid name. Just return the name. */
- name = signal_names[signo];
- }
-
- return (name);
-}
-
-
-/*
-
-NAME
-
- strtosigno -- map a symbolic signal name to a numeric value
-
-SYNOPSIS
-
- int strtosigno (char *name)
-
-DESCRIPTION
-
- Given the symbolic name of a signal, map it to a signal number.
- If no translation is found, returns 0.
-
-*/
-
-int
-strtosigno (name)
- const char *name;
-{
- int signo = 0;
-
- if (name != NULL)
- {
- if (signal_names == NULL)
- {
- init_signal_tables ();
- }
- for (signo = 0; signo < num_signal_names; signo++)
- {
- if ((signal_names[signo] != NULL) &&
- (strcmp (name, signal_names[signo]) == 0))
- {
- break;
- }
- }
- if (signo == num_signal_names)
- {
- signo = 0;
- }
- }
- return (signo);
-}
-
-
-/*
-
-NAME
-
- psignal -- print message about signal to stderr
-
-SYNOPSIS
-
- void psignal (unsigned signo, char *message);
-
-DESCRIPTION
-
- Print to the standard error the message, followed by a colon,
- followed by the description of the signal specified by signo,
- followed by a newline.
-*/
-
-#ifdef NEED_psignal
-
-void
-psignal (signo, message)
- unsigned signo;
- char *message;
-{
- if (signal_names == NULL)
- {
- init_signal_tables ();
- }
- if ((signo <= 0) || (signo >= sys_nsig))
- {
- fprintf (stderr, "%s: unknown signal\n", message);
- }
- else
- {
- fprintf (stderr, "%s: %s\n", message, sys_siglist[signo]);
- }
-}
-
-#endif /* NEED_psignal */
-
-
-/* A simple little main that does nothing but print all the signal translations
- if MAIN is defined and this file is compiled and linked. */
-
-#ifdef MAIN
-
-#include <stdio.h>
-
-int
-main ()
-{
- int signo;
- int maxsigno;
- const char *name;
- const char *msg;
-
- maxsigno = signo_max ();
- printf ("%d entries in names table.\n", num_signal_names);
- printf ("%d entries in messages table.\n", sys_nsig);
- printf ("%d is max useful index.\n", maxsigno);
-
- /* Keep printing values until we get to the end of *both* tables, not
- *either* table. Note that knowing the maximum useful index does *not*
- relieve us of the responsibility of testing the return pointer for
- NULL. */
-
- for (signo = 0; signo <= maxsigno; signo++)
- {
- name = strsigno (signo);
- name = (name == NULL) ? "<NULL>" : name;
- msg = strsignal (signo);
- msg = (msg == NULL) ? "<NULL>" : msg;
- printf ("%-4d%-18s%s\n", signo, name, msg);
- }
-
- return 0;
-}
-
-#endif
diff --git a/contrib/gdb/libiberty/strstr.c b/contrib/gdb/libiberty/strstr.c
deleted file mode 100644
index fab36e3fb3d4..000000000000
--- a/contrib/gdb/libiberty/strstr.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Simple implementation of strstr for systems without it.
- This function is in the public domain. */
-
-/*
-
-NAME
-
- strstr -- locate first occurance of a substring
-
-SYNOPSIS
-
- #include <string.h>
-
- char *strstr (char *s1, char *s2)
-
-DESCRIPTION
-
- Locates the first occurance in the string pointed to by S1 of
- the string pointed to by S2. Returns a pointer to the substring
- found, or a NULL pointer if not found. If S2 points to a string
- with zero length, the function returns S1.
-
-BUGS
-
-*/
-
-
-/* FIXME: The above description is ANSI compiliant. This routine has not
- been validated to comply with it. -fnf */
-
-char *
-strstr (s1, s2)
- char *s1, *s2;
-{
- register char *p = s1;
- extern char *strchr ();
- extern int strncmp ();
-#if __GNUC__==2
- extern __SIZE_TYPE__ strlen ();
-#endif
- register int len = strlen (s2);
-
- for (; (p = strchr (p, *s2)) != 0; p++)
- {
- if (strncmp (p, s2, len) == 0)
- {
- return (p);
- }
- }
- return (0);
-}
diff --git a/contrib/gdb/libiberty/strtod.c b/contrib/gdb/libiberty/strtod.c
deleted file mode 100644
index c86c73de9b38..000000000000
--- a/contrib/gdb/libiberty/strtod.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Implementation of strtod for systems with atof.
- Copyright (C) 1991, 1995 Free Software Foundation, Inc.
-
-This file is part of the libiberty library. This library is free
-software; you can redistribute 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 library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-As a special exception, if you link this library with files
-compiled with a GNU compiler to produce an executable, this does not cause
-the resulting executable to be covered by the GNU General Public License.
-This exception does not however invalidate any other reasons why
-the executable file might be covered by the GNU General Public License. */
-
-#include <ctype.h>
-
-extern double atof ();
-
-/* Disclaimer: this is currently just used by CHILL in GDB and therefore
- has not been tested well. It may have been tested for nothing except
- that it compiles. */
-
-double
-strtod (str, ptr)
- char *str;
- char **ptr;
-{
- char *p;
-
- if (ptr == (char **)0)
- return atof (str);
-
- p = str;
-
- while (isspace (*p))
- ++p;
-
- if (*p == '+' || *p == '-')
- ++p;
-
- /* INF or INFINITY. */
- if ((p[0] == 'i' || p[0] == 'I')
- && (p[1] == 'n' || p[1] == 'N')
- && (p[2] == 'f' || p[2] == 'F'))
- {
- if ((p[3] == 'i' || p[3] == 'I')
- && (p[4] == 'n' || p[4] == 'N')
- && (p[5] == 'i' || p[5] == 'I')
- && (p[6] == 't' || p[6] == 'T')
- && (p[7] == 'y' || p[7] == 'Y'))
- {
- *ptr = p + 7;
- return atof (str);
- }
- else
- {
- *ptr = p + 3;
- return atof (str);
- }
- }
-
- /* NAN or NAN(foo). */
- if ((p[0] == 'n' || p[0] == 'N')
- && (p[1] == 'a' || p[1] == 'A')
- && (p[2] == 'n' || p[2] == 'N'))
- {
- p += 3;
- if (*p == '(')
- {
- ++p;
- while (*p != '\0' && *p != ')')
- ++p;
- if (*p == ')')
- ++p;
- }
- *ptr = p;
- return atof (str);
- }
-
- /* digits, with 0 or 1 periods in it. */
- if (isdigit (*p) || *p == '.')
- {
- int got_dot = 0;
- while (isdigit (*p) || (!got_dot && *p == '.'))
- {
- if (*p == '.')
- got_dot = 1;
- ++p;
- }
-
- /* Exponent. */
- if (*p == 'e' || *p == 'E')
- {
- int i;
- i = 1;
- if (p[i] == '+' || p[i] == '-')
- ++i;
- if (isdigit (p[i]))
- {
- while (isdigit (p[i]))
- ++i;
- *ptr = p + i;
- return atof (str);
- }
- }
- *ptr = p;
- return atof (str);
- }
- /* Didn't find any digits. Doesn't look like a number. */
- *ptr = str;
- return 0.0;
-}
diff --git a/contrib/gdb/libiberty/strtol.c b/contrib/gdb/libiberty/strtol.c
deleted file mode 100644
index db27ee0a8759..000000000000
--- a/contrib/gdb/libiberty/strtol.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <limits.h>
-#include <ctype.h>
-#include <errno.h>
-#if 0
-#include <stdlib.h>
-#endif
-#include "ansidecl.h"
-
-/* FIXME: It'd be nice to configure around these, but the include files are too
- painful. These macros should at least be more portable than hardwired hex
- constants. */
-
-#ifndef ULONG_MAX
-#define ULONG_MAX ((unsigned long)(~0L)) /* 0xFFFFFFFF */
-#endif
-
-#ifndef LONG_MAX
-#define LONG_MAX ((long)(ULONG_MAX >> 1)) /* 0x7FFFFFFF */
-#endif
-
-#ifndef LONG_MIN
-#define LONG_MIN ((long)(~LONG_MAX)) /* 0x80000000 */
-#endif
-
-/*
- * Convert a string to a long integer.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-long
-strtol(nptr, endptr, base)
- CONST char *nptr;
- char **endptr;
- register int base;
-{
- register CONST char *s = nptr;
- register unsigned long acc;
- register int c;
- register unsigned long cutoff;
- register int neg = 0, any, cutlim;
-
- /*
- * Skip white space and pick up leading +/- sign if any.
- * If base is 0, allow 0x for hex and 0 for octal, else
- * assume decimal; if base is already 16, allow 0x.
- */
- do {
- c = *s++;
- } while (isspace(c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else if (c == '+')
- c = *s++;
- if ((base == 0 || base == 16) &&
- c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0)
- base = c == '0' ? 8 : 10;
-
- /*
- * Compute the cutoff value between legal numbers and illegal
- * numbers. That is the largest legal value, divided by the
- * base. An input number that is greater than this value, if
- * followed by a legal input character, is too big. One that
- * is equal to this value may be valid or not; the limit
- * between valid and invalid numbers is then based on the last
- * digit. For instance, if the range for longs is
- * [-2147483648..2147483647] and the input base is 10,
- * cutoff will be set to 214748364 and cutlim to either
- * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated
- * a value > 214748364, or equal but the next digit is > 7 (or 8),
- * the number is too big, and we will return a range error.
- *
- * Set any if any `digits' consumed; make it negative to indicate
- * overflow.
- */
- cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX;
- cutlim = cutoff % (unsigned long)base;
- cutoff /= (unsigned long)base;
- for (acc = 0, any = 0;; c = *s++) {
- if (isdigit(c))
- c -= '0';
- else if (isalpha(c))
- c -= isupper(c) ? 'A' - 10 : 'a' - 10;
- else
- break;
- if (c >= base)
- break;
- if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
- any = -1;
- else {
- any = 1;
- acc *= base;
- acc += c;
- }
- }
- if (any < 0) {
- acc = neg ? LONG_MIN : LONG_MAX;
- errno = ERANGE;
- } else if (neg)
- acc = -acc;
- if (endptr != 0)
- *endptr = (char *) (any ? s - 1 : nptr);
- return (acc);
-}
diff --git a/contrib/gdb/libiberty/strtoul.c b/contrib/gdb/libiberty/strtoul.c
deleted file mode 100644
index 40902452fed3..000000000000
--- a/contrib/gdb/libiberty/strtoul.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 1990 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <limits.h>
-#include <ctype.h>
-#include <errno.h>
-#if 0
-#include <stdlib.h>
-#endif
-#include "ansidecl.h"
-
-#ifndef ULONG_MAX
-#define ULONG_MAX ((unsigned long)(~0L)) /* 0xFFFFFFFF */
-#endif
-
-/*
- * Convert a string to an unsigned long integer.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-unsigned long
-strtoul(nptr, endptr, base)
- CONST char *nptr;
- char **endptr;
- register int base;
-{
- register CONST char *s = nptr;
- register unsigned long acc;
- register int c;
- register unsigned long cutoff;
- register int neg = 0, any, cutlim;
-
- /*
- * See strtol for comments as to the logic used.
- */
- do {
- c = *s++;
- } while (isspace(c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else if (c == '+')
- c = *s++;
- if ((base == 0 || base == 16) &&
- c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0)
- base = c == '0' ? 8 : 10;
- cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
- cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
- for (acc = 0, any = 0;; c = *s++) {
- if (isdigit(c))
- c -= '0';
- else if (isalpha(c))
- c -= isupper(c) ? 'A' - 10 : 'a' - 10;
- else
- break;
- if (c >= base)
- break;
- if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
- any = -1;
- else {
- any = 1;
- acc *= base;
- acc += c;
- }
- }
- if (any < 0) {
- acc = ULONG_MAX;
- errno = ERANGE;
- } else if (neg)
- acc = -acc;
- if (endptr != 0)
- *endptr = (char *) (any ? s - 1 : nptr);
- return (acc);
-}
diff --git a/contrib/gdb/libiberty/tmpnam.c b/contrib/gdb/libiberty/tmpnam.c
deleted file mode 100644
index c06146774252..000000000000
--- a/contrib/gdb/libiberty/tmpnam.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <stdio.h>
-
-#ifndef L_tmpnam
-#define L_tmpname 100
-#endif
-#ifndef P_tmpdir
-#define P_tmpdir "/usr/tmp"
-#endif
-
-static char tmpnam_buffer[L_tmpnam];
-static int tmpnam_counter;
-
-extern int getpid ();
-
-char *
-tmpnam (s)
- char *s;
-{
- int pid = getpid ();
-
- if (s == NULL)
- s = tmpnam_buffer;
-
- /* Generate the filename and make sure that there isn't one called
- it already. */
-
- while (1)
- {
- FILE *f;
- sprintf (s, "%s/%s%x.%x", P_tmpdir, "t", pid, tmpnam_counter);
- f = fopen (s, "r");
- if (f == NULL)
- break;
- tmpnam_counter++;
- fclose (f);
- }
-
- return s;
-}
diff --git a/contrib/gdb/libiberty/vasprintf.c b/contrib/gdb/libiberty/vasprintf.c
deleted file mode 100644
index 3794cbd2c4fb..000000000000
--- a/contrib/gdb/libiberty/vasprintf.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/* Like vsprintf but provides a pointer to malloc'd storage, which must
- be freed by the caller.
- Copyright (C) 1994 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 <stdio.h>
-#include <string.h>
-#include <ansidecl.h>
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#ifdef TEST
-int global_total_width;
-#endif
-
-unsigned long strtoul ();
-char *malloc ();
-
-static int
-int_vasprintf (result, format, args)
- char **result;
- const char *format;
- va_list *args;
-{
- const char *p = format;
- /* Add one to make sure that it is never zero, which might cause malloc
- to return NULL. */
- int total_width = strlen (format) + 1;
- va_list ap;
-
- memcpy ((PTR) &ap, (PTR) args, sizeof (va_list));
-
- while (*p != '\0')
- {
- if (*p++ == '%')
- {
- while (strchr ("-+ #0", *p))
- ++p;
- if (*p == '*')
- {
- ++p;
- total_width += abs (va_arg (ap, int));
- }
- else
- total_width += strtoul (p, &p, 10);
- if (*p == '.')
- {
- ++p;
- if (*p == '*')
- {
- ++p;
- total_width += abs (va_arg (ap, int));
- }
- else
- total_width += strtoul (p, &p, 10);
- }
- while (strchr ("hlL", *p))
- ++p;
- /* Should be big enough for any format specifier except %s. */
- total_width += 30;
- switch (*p)
- {
- case 'd':
- case 'i':
- case 'o':
- case 'u':
- case 'x':
- case 'X':
- case 'c':
- (void) va_arg (ap, int);
- break;
- case 'f':
- case 'e':
- case 'E':
- case 'g':
- case 'G':
- (void) va_arg (ap, double);
- break;
- case 's':
- total_width += strlen (va_arg (ap, char *));
- break;
- case 'p':
- case 'n':
- (void) va_arg (ap, char *);
- break;
- }
- }
- }
-#ifdef TEST
- global_total_width = total_width;
-#endif
- *result = malloc (total_width);
- if (*result != NULL)
- return vsprintf (*result, format, *args);
- else
- return 0;
-}
-
-int
-vasprintf (result, format, args)
- char **result;
- const char *format;
- va_list args;
-{
- return int_vasprintf (result, format, &args);
-}
-
-#ifdef TEST
-void
-checkit
-#ifdef __STDC__
- (const char* format, ...)
-#else
- (va_alist)
- va_dcl
-#endif
-{
- va_list args;
- char *result;
-
-#ifdef __STDC__
- va_start (args, format);
-#else
- char *format;
- va_start (args);
- format = va_arg (args, char *);
-#endif
- vasprintf (&result, format, args);
- if (strlen (result) < global_total_width)
- printf ("PASS: ");
- else
- printf ("FAIL: ");
- printf ("%d %s\n", global_total_width, result);
-}
-
-int
-main ()
-{
- checkit ("%d", 0x12345678);
- checkit ("%200d", 5);
- checkit ("%.300d", 6);
- checkit ("%100.150d", 7);
- checkit ("%s", "jjjjjjjjjiiiiiiiiiiiiiiioooooooooooooooooppppppppppppaa\n\
-777777777777777777333333333333366666666666622222222222777777777777733333");
- checkit ("%f%s%d%s", 1.0, "foo", 77, "asdjffffffffffffffiiiiiiiiiiixxxxx");
-}
-#endif /* TEST */
diff --git a/contrib/gdb/libiberty/vfork.c b/contrib/gdb/libiberty/vfork.c
deleted file mode 100644
index 86c45919f660..000000000000
--- a/contrib/gdb/libiberty/vfork.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Emulate vfork using just plain fork, for systems without a real vfork.
- This function is in the public domain. */
-
-int
-vfork ()
-{
- return (fork ());
-}
diff --git a/contrib/gdb/libiberty/vfprintf.c b/contrib/gdb/libiberty/vfprintf.c
deleted file mode 100644
index ce3fdf9c4745..000000000000
--- a/contrib/gdb/libiberty/vfprintf.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-#include <varargs.h>
-#include <ansidecl.h>
-#undef vfprintf
-
-int
-vfprintf (file, format, ap)
- FILE *file;
- const char *format;
- va_list ap;
-{
- return _doprnt (format, ap, file);
-}
diff --git a/contrib/gdb/libiberty/vmsbuild.com b/contrib/gdb/libiberty/vmsbuild.com
deleted file mode 100644
index e1c203f9f472..000000000000
--- a/contrib/gdb/libiberty/vmsbuild.com
+++ /dev/null
@@ -1,142 +0,0 @@
-$! libiberty/vmsbuild.com -- build liberty.olb for VMS host, VMS target
-$!
-$ CC = "gcc /noVerbose/Debug/Incl=([],[-.include])"
-$ LIBR = "library /Obj"
-$ LINK = "link"
-$ DELETE= "delete /noConfirm"
-$ SEARCH= "search /Exact"
-$ ECHO = "write sys$output"
-$ ABORT = "exit %x002C"
-$!
-$ LIB_NAME = "liberty.olb" !this is what we're going to construct
-$ WORK_LIB = "new-lib.olb" !used to guard against an incomplete build
-$
-$! manually copied from Makefile.in
-$ REQUIRED_OFILES = "argv.o basename.o concat.o cplus-dem.o fdmatch.o "-
- + "getopt.o getopt1.o getruntime.o hex.o "-
- + "floatformat.o obstack.o spaces.o strerror.o strsignal.o "-
- + "vasprintf.o xatexit.o xexit.o xmalloc.o xstrerror.o"
-$! anything not caught by link+search of dummy.* should be added here
-$ EXTRA_OFILES = ""
-$!
-$! move to the directory which contains this command procedure
-$ old_dir = f$environ("DEFAULT")
-$ new_dir = f$parse("_._;",f$environ("PROCEDURE")) - "_._;"
-$ set default 'new_dir'
-$
-$ ECHO "Starting libiberty build..."
-$ create config.h
-/* libiberty config.h for VMS */
-#define NEED_sys_siglist
-#define NEED_psignal
-#define NEED_basename
-$ if f$search("alloca-conf.h").eqs."" then -
- copy alloca-norm.h alloca-conf.h
-$ LIBR 'WORK_LIB' /Create
-$
-$! first pass: compile "required" modules
-$ ofiles = REQUIRED_OFILES + " " + EXTRA_OFILES
-$ gosub do_ofiles
-$
-$! second pass: process dummy.c, using the first pass' results
-$ ECHO " now checking run-time library for missing functionality"
-$ if f$search("dummy.obj").nes."" then DELETE dummy.obj;*
-$ define/noLog sys$error _NL: !can't use /User_Mode here due to gcc
-$ define/noLog sys$output _NL: ! driver's use of multiple image activation
-$ on error then continue
-$ 'CC' dummy.c
-$ deassign sys$error !restore, more or less
-$ deassign sys$output
-$ if f$search("dummy.obj").eqs."" then goto pass2_failure1
-$! link dummy.obj, capturing full linker feedback in dummy.map
-$ oldmsg = f$environ("MESSAGE")
-$ set message /Facility/Severity/Identification/Text
-$ define/User sys$output _NL:
-$ define/User sys$error _NL:
-$ LINK/Map=dummy.map/noExe dummy.obj,'WORK_LIB'/Libr,-
- gnu_cc:[000000]gcclib.olb/Libr,sys$library:vaxcrtl.olb/Libr
-$ set message 'oldmsg'
-$ if f$search("dummy.map").eqs."" then goto pass2_failure2
-$ DELETE dummy.obj;*
-$ SEARCH dummy.map "%LINK-I-UDFSYM" /Output=dummy.list
-$ DELETE dummy.map;*
-$ ECHO " check completed"
-$! we now have a file with one entry per line of unresolvable symbols
-$ ofiles = ""
-$ if f$trnlnm("IFILE$").nes."" then close/noLog ifile$
-$ open/Read ifile$ dummy.list
-$iloop: read/End=idone ifile$ iline
-$ iline = f$edit(iline,"COMPRESS,TRIM,LOWERCASE")
-$ ofiles = ofiles + " " + f$element(1," ",iline) + ".o"
-$ goto iloop
-$idone: close ifile$
-$ DELETE dummy.list;*
-$
-$! third pass: compile "missing" modules collected in pass 2
-$ gosub do_ofiles
-$
-$! finish up
-$ LIBR 'WORK_LIB' /Compress /Output='LIB_NAME' !new-lib.olb -> liberty.olb
-$ DELETE 'WORK_LIB';*
-$
-$! all done
-$ ECHO "Completed libiberty build."
-$ type sys$input:
-
- You many wish to do
- $ COPY LIBERTY.OLB GNU_CC:[000000]
- so that this run-time library resides in the same location as gcc's
- support library. When building gas, be sure to leave the original
- copy of liberty.olb here so that gas's build procedure can find it.
-
-$ set default 'old_dir'
-$ exit
-$
-$!
-$! compile each element of the space-delimited list 'ofiles'
-$!
-$do_ofiles:
-$ ofiles = f$edit(ofiles,"COMPRESS,TRIM")
-$ i = 0
-$oloop:
-$ f = f$element(i," ",ofiles)
-$ if f.eqs." " then goto odone
-$ f = f - ".o" !strip dummy suffix
-$ ECHO " ''f'"
-$ 'CC' 'f'.c
-$ LIBR 'WORK_LIB' 'f'.obj /Insert
-$ DELETE 'f'.obj;*
-$ i = i + 1
-$ goto oloop
-$odone:
-$ return
-$
-$!
-$pass2_failure1:
-$! if we reach here, dummy.c failed to compile and we're really stuck
-$ type sys$input:
-
- Cannot compile the library contents checker (dummy.c + functions.def),
- so cannot continue!
-
-$! attempt the compile again, without suppressing diagnostic messages this time
-$ on error then ABORT +0*f$verify(v)
-$ v = f$verify(1)
-$ 'CC' dummy.c
-$ ABORT +0*f$verify(v) !'f$verify(0)'
-$!
-$pass2_failure2:
-$! should never reach here..
-$ type sys$input:
-
- Cannot link the library contents checker (dummy.obj), so cannot continue!
-
-$! attempt the link again, without suppressing diagnostic messages this time
-$ on error then ABORT +0*f$verify(v)
-$ v = f$verify(1)
-$ LINK/Map=dummy.map/noExe dummy.obj,'WORK_LIB'/Libr,-
- gnu_cc:[000000]gcclib.olb/Libr,sys$library:vaxcrtl.olb/Libr
-$ ABORT +0*f$verify(v) !'f$verify(0)'
-$
-$! not reached
-$ exit
diff --git a/contrib/gdb/libiberty/vprintf.c b/contrib/gdb/libiberty/vprintf.c
deleted file mode 100644
index 63ac53c965ad..000000000000
--- a/contrib/gdb/libiberty/vprintf.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdio.h>
-#include <varargs.h>
-#include <ansidecl.h>
-#undef vprintf
-int
-vprintf (format, ap)
- const char *format;
- va_list ap;
-{
- return vfprintf (stdout, format, ap);
-}
diff --git a/contrib/gdb/libiberty/vsprintf.c b/contrib/gdb/libiberty/vsprintf.c
deleted file mode 100644
index bf0760cf6d38..000000000000
--- a/contrib/gdb/libiberty/vsprintf.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Simple implementation of vsprintf for systems without it.
- Highly system-dependent, but should work on most "traditional"
- implementations of stdio; newer ones should already have vsprintf.
- Written by Per Bothner of Cygnus Support.
- Based on libg++'s "form" (written by Doug Lea; dl@rocky.oswego.edu).
- Copyright (C) 1991, 1995 Free Software Foundation, Inc.
-
-This file is part of the libiberty library. This library is free
-software; you can redistribute 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 library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-As a special exception, if you link this library with files
-compiled with a GNU compiler to produce an executable, this does not cause
-the resulting executable to be covered by the GNU General Public License.
-This exception does not however invalidate any other reasons why
-the executable file might be covered by the GNU General Public License. */
-
-#include <varargs.h>
-#include <stdio.h>
-#include <ansidecl.h>
-#undef vsprintf
-
-int
-vsprintf (buf, format, ap)
- char *buf;
- const char *format;
- va_list ap;
-{
- FILE b;
- int ret;
-#ifdef VMS
- b->_flag = _IOWRT|_IOSTRG;
- b->_ptr = buf;
- b->_cnt = 12000;
-#else
- b._flag = _IOWRT|_IOSTRG;
- b._ptr = buf;
- b._cnt = 12000;
-#endif
- ret = _doprnt(format, ap, &b);
- putc('\0', &b);
- return ret;
-
-}
diff --git a/contrib/gdb/libiberty/waitpid.c b/contrib/gdb/libiberty/waitpid.c
deleted file mode 100644
index 23db0b932d2e..000000000000
--- a/contrib/gdb/libiberty/waitpid.c
+++ /dev/null
@@ -1,11 +0,0 @@
-int
-waitpid (pid, stat_loc, options)
- int pid, *stat_loc, options;
-{
- for (;;)
- {
- int wpid = wait(stat_loc);
- if (wpid == pid || wpid == -1)
- return wpid;
- }
-}
diff --git a/contrib/gdb/libiberty/xatexit.c b/contrib/gdb/libiberty/xatexit.c
deleted file mode 100644
index 7dd27e143f81..000000000000
--- a/contrib/gdb/libiberty/xatexit.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1990 Regents of the University of California.
- * All rights reserved.
- *
- * %sccs.include.redist.c%
- */
-
-/* Adapted from newlib/libc/stdlib/{,at}exit.[ch].
- If you use xatexit, you must call xexit instead of exit. */
-
-#include "ansidecl.h"
-#include "libiberty.h"
-
-#include <stdio.h>
-
-#ifdef __STDC__
-#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-
-/* For systems with larger pointers than ints, this must be declared. */
-PTR malloc PARAMS ((size_t));
-
-static void xatexit_cleanup PARAMS ((void));
-
-/* Pointer to function run by xexit. */
-extern void (*_xexit_cleanup) ();
-
-#define XATEXIT_SIZE 32
-
-struct xatexit {
- struct xatexit *next; /* next in list */
- int ind; /* next index in this table */
- void (*fns[XATEXIT_SIZE]) PARAMS ((void)); /* the table itself */
-};
-
-/* Allocate one struct statically to guarantee that we can register
- at least a few handlers. */
-static struct xatexit xatexit_first;
-
-/* Points to head of LIFO stack. */
-static struct xatexit *xatexit_head = &xatexit_first;
-
-/* Register function FN to be run by xexit.
- Return 0 if successful, -1 if not. */
-
-int
-xatexit (fn)
- void (*fn) PARAMS ((void));
-{
- register struct xatexit *p;
-
- /* Tell xexit to call xatexit_cleanup. */
- if (!_xexit_cleanup)
- _xexit_cleanup = xatexit_cleanup;
-
- p = xatexit_head;
- if (p->ind >= XATEXIT_SIZE)
- {
- if ((p = (struct xatexit *) malloc (sizeof *p)) == NULL)
- return -1;
- p->ind = 0;
- p->next = xatexit_head;
- xatexit_head = p;
- }
- p->fns[p->ind++] = fn;
- return 0;
-}
-
-/* Call any cleanup functions. */
-
-static void
-xatexit_cleanup ()
-{
- register struct xatexit *p;
- register int n;
-
- for (p = xatexit_head; p; p = p->next)
- for (n = p->ind; --n >= 0;)
- (*p->fns[n]) ();
-}
diff --git a/contrib/gdb/libiberty/xexit.c b/contrib/gdb/libiberty/xexit.c
deleted file mode 100644
index 98baeca475d9..000000000000
--- a/contrib/gdb/libiberty/xexit.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* xexit.c -- Run any exit handlers, then exit.
- Copyright (C) 1994 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 "ansidecl.h"
-#include "libiberty.h"
-
-#include <stdio.h>
-
-/* This variable is set by xatexit if it is called. This way, xmalloc
- doesn't drag xatexit into the link. */
-void (*_xexit_cleanup) ();
-
-void
-xexit (code)
- int code;
-{
- if (_xexit_cleanup != NULL)
- (*_xexit_cleanup) ();
- exit (code);
-}
diff --git a/contrib/gdb/libiberty/xmalloc.c b/contrib/gdb/libiberty/xmalloc.c
deleted file mode 100644
index 95967abe3004..000000000000
--- a/contrib/gdb/libiberty/xmalloc.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/* memory allocation routines with error checking.
- Copyright 1989, 90, 91, 92, 93, 94 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 "ansidecl.h"
-#include "libiberty.h"
-
-#include <stdio.h>
-
-#ifdef __STDC__
-#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-
-/* For systems with larger pointers than ints, these must be declared. */
-PTR malloc PARAMS ((size_t));
-PTR realloc PARAMS ((PTR, size_t));
-
-/* The program name if set. */
-static const char *name = "";
-
-/* The initial sbrk, set when the program name is set. */
-static char *first_break = NULL;
-
-void
-xmalloc_set_program_name (s)
- const char *s;
-{
- name = s;
- if (first_break == NULL)
- first_break = (char *) sbrk (0);
-}
-
-PTR
-xmalloc (size)
- size_t size;
-{
- PTR newmem;
-
- if (size == 0)
- size = 1;
- newmem = malloc (size);
- if (!newmem)
- {
- extern char **environ;
- size_t allocated;
-
- if (first_break != NULL)
- allocated = (char *) sbrk (0) - first_break;
- else
- allocated = (char *) sbrk (0) - (char *) &environ;
- fprintf (stderr,
- "\n%s%sCan not allocate %lu bytes after allocating %lu bytes\n",
- name, *name ? ": " : "",
- (unsigned long) size, (unsigned long) allocated);
- xexit (1);
- }
- return (newmem);
-}
-
-PTR
-xrealloc (oldmem, size)
- PTR oldmem;
- size_t size;
-{
- PTR newmem;
-
- if (size == 0)
- size = 1;
- if (!oldmem)
- newmem = malloc (size);
- else
- newmem = realloc (oldmem, size);
- if (!newmem)
- {
- extern char **environ;
- size_t allocated;
-
- if (first_break != NULL)
- allocated = (char *) sbrk (0) - first_break;
- else
- allocated = (char *) sbrk (0) - (char *) &environ;
- fprintf (stderr,
- "\n%s%sCan not reallocate %lu bytes after allocating %lu bytes\n",
- name, *name ? ": " : "",
- (unsigned long) size, (unsigned long) allocated);
- xexit (1);
- }
- return (newmem);
-}
diff --git a/contrib/gdb/libiberty/xstrdup.c b/contrib/gdb/libiberty/xstrdup.c
deleted file mode 100644
index 9d08bc704055..000000000000
--- a/contrib/gdb/libiberty/xstrdup.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* xstrdup.c -- Duplicate a string in memory, using xmalloc.
- This trivial function is in the public domain.
- Ian Lance Taylor, Cygnus Support, December 1995. */
-
-#include "ansidecl.h"
-#include "libiberty.h"
-
-char *
-xstrdup (s)
- const char *s;
-{
- char *ret;
-
- ret = xmalloc (strlen (s) + 1);
- strcpy (ret, s);
- return ret;
-}
diff --git a/contrib/gdb/libiberty/xstrerror.c b/contrib/gdb/libiberty/xstrerror.c
deleted file mode 100644
index d05369ac9725..000000000000
--- a/contrib/gdb/libiberty/xstrerror.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* xstrerror.c -- jacket routine for more robust strerror() usage.
- Fri Jun 16 18:30:00 1995 Pat Rankin <rankin@eql.caltech.edu>
- This code is in the public domain. */
-
-#include "libiberty.h"
-#include "config.h"
-
-#ifdef VMS
-#include <errno.h>
-#if !defined (__STRICT_ANSI__) && !defined (__HIDE_FORBIDDEN_NAMES)
-extern char *strerror PARAMS ((int,...));
-#define DONT_DECLARE_STRERROR
-#endif
-#endif /* VMS */
-
-#ifndef DONT_DECLARE_STRERROR
-extern char *strerror PARAMS ((int));
-#endif
-
-/* If strerror returns NULL, we'll format the number into a static buffer. */
-
-#define ERRSTR_FMT "undocumented error #%d"
-static char xstrerror_buf[sizeof ERRSTR_FMT + 20];
-
-/* Like strerror, but result is never a null pointer. */
-
-char *
-xstrerror (errnum)
- int errnum;
-{
- char *errstr;
-#ifdef VMS
- char *(*vmslib_strerror) PARAMS ((int,...));
-
- /* Override any possibly-conflicting declaration from system header. */
- vmslib_strerror = (char *(*) PARAMS ((int,...))) strerror;
- /* Second argument matters iff first is EVMSERR, but it's simpler to
- pass it unconditionally. `vaxc$errno' is declared in <errno.h>
- and maintained by the run-time library in parallel to `errno'.
- We assume that `errnum' corresponds to the last value assigned to
- errno by the run-time library, hence vaxc$errno will be relevant. */
- errstr = (*vmslib_strerror) (errnum, vaxc$errno);
-#else
- errstr = strerror (errnum);
-#endif
-
- /* If `errnum' is out of range, result might be NULL. We'll fix that. */
- if (!errstr)
- {
- sprintf (xstrerror_buf, ERRSTR_FMT, errnum);
- errstr = xstrerror_buf;
- }
- return errstr;
-}