summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2004-03-23 20:41:49 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2004-03-23 20:41:49 +0000
commitb8a9d586e0e0dd6f0ef493a9f4b5d1ea4899629c (patch)
treeaef40174f05f6a8687b8346eb2b72689a784b93a
parent68fbf4c956dd44db14d1155048e25d2874736f9f (diff)
downloadgdb-cvs/ezannoni_pie-20030916-branch.tar.gz
-rw-r--r--gdb/cli/cli-cmds.c73
-rw-r--r--gdb/cli/cli-decode.c26
-rw-r--r--gdb/cli/cli-dump.c32
-rw-r--r--gdb/cli/cli-script.c49
-rw-r--r--gdb/cli/cli-script.h2
-rw-r--r--gdb/cli/cli-setshow.c2
-rw-r--r--gdb/config/alpha/alpha-linux.mh3
-rw-r--r--gdb/config/alpha/fbsd.mt4
-rw-r--r--gdb/config/alpha/nm-fbsd.h13
-rw-r--r--gdb/config/alpha/nm-osf.h9
-rw-r--r--gdb/config/alpha/nm-osf2.h3
-rw-r--r--gdb/config/alpha/tm-alpha.h7
-rw-r--r--gdb/config/alpha/tm-alphalinux.h10
-rw-r--r--gdb/config/alpha/tm-nbsd.h9
-rw-r--r--gdb/config/arm/linux.mt2
-rw-r--r--gdb/config/arm/nbsd.mt1
-rw-r--r--gdb/config/arm/tm-embed.h4
-rw-r--r--gdb/config/arm/tm-linux.h13
-rw-r--r--gdb/config/arm/tm-nbsd.h (renamed from gdb/config/mips/xm-linux.h)13
-rw-r--r--gdb/config/d10v/d10v.mt2
-rw-r--r--gdb/config/djgpp/config.sed19
-rw-r--r--gdb/config/djgpp/djconfig.sh17
-rw-r--r--gdb/config/djgpp/fnchange.lst269
-rw-r--r--gdb/config/frv/frv.mt2
-rw-r--r--gdb/config/frv/tm-frv.h2
-rw-r--r--gdb/config/h8300/tm-h8300.h14
-rw-r--r--gdb/config/h8500/h8500.mt6
-rw-r--r--gdb/config/h8500/tm-h8500.h295
-rw-r--r--gdb/config/i386/fbsd.mh10
-rw-r--r--gdb/config/i386/fbsd.mt5
-rw-r--r--gdb/config/i386/fbsd64.mh8
-rw-r--r--gdb/config/i386/fbsd64.mt5
-rw-r--r--gdb/config/i386/go32.mh5
-rw-r--r--gdb/config/i386/i386bsd.mh6
-rw-r--r--gdb/config/i386/i386bsd.mt3
-rw-r--r--gdb/config/i386/i386sol2.mh5
-rw-r--r--gdb/config/i386/i386sol2.mt2
-rw-r--r--gdb/config/i386/interix.mh3
-rw-r--r--gdb/config/i386/linux.mt2
-rw-r--r--gdb/config/i386/linux64.mh (renamed from gdb/config/i386/x86-64linux.mh)11
-rw-r--r--gdb/config/i386/linux64.mt5
-rw-r--r--gdb/config/i386/nbsd.mt6
-rw-r--r--gdb/config/i386/nbsd64.mh5
-rw-r--r--gdb/config/i386/nbsd64.mt4
-rw-r--r--gdb/config/i386/nbsdaout.mh8
-rw-r--r--gdb/config/i386/nbsdelf.mh4
-rw-r--r--gdb/config/i386/nm-fbsd.h33
-rw-r--r--gdb/config/i386/nm-fbsd64.h19
-rw-r--r--gdb/config/i386/nm-i386.h4
-rw-r--r--gdb/config/i386/nm-i386bsd.h38
-rw-r--r--gdb/config/i386/nm-linux64.h (renamed from gdb/config/i386/nm-x86-64linux.h)24
-rw-r--r--gdb/config/i386/nm-nbsd.h9
-rw-r--r--gdb/config/i386/nm-nbsdaout.h9
-rw-r--r--gdb/config/i386/nm-obsd.h19
-rw-r--r--gdb/config/i386/nm-ptx4.h66
-rw-r--r--gdb/config/i386/nm-symmetry.h50
-rw-r--r--gdb/config/i386/obsd.mh13
-rw-r--r--gdb/config/i386/obsd.mt7
-rw-r--r--gdb/config/i386/obsd64.mh5
-rw-r--r--gdb/config/i386/obsd64.mt5
-rw-r--r--gdb/config/i386/obsdaout.mh5
-rw-r--r--gdb/config/i386/ptx.mh7
-rw-r--r--gdb/config/i386/ptx.mt3
-rw-r--r--gdb/config/i386/ptx4.mh8
-rw-r--r--gdb/config/i386/ptx4.mt3
-rw-r--r--gdb/config/i386/symmetry.mh4
-rw-r--r--gdb/config/i386/symmetry.mt3
-rw-r--r--gdb/config/i386/tm-cygwin.h2
-rw-r--r--gdb/config/i386/tm-fbsd.h7
-rw-r--r--gdb/config/i386/tm-i386bsd.h45
-rw-r--r--gdb/config/i386/tm-i386sol2.h2
-rw-r--r--gdb/config/i386/tm-linux.h8
-rw-r--r--gdb/config/i386/tm-linux64.h (renamed from gdb/config/i386/tm-x86-64linux.h)10
-rw-r--r--gdb/config/i386/tm-nbsd.h8
-rw-r--r--gdb/config/i386/tm-ptx.h194
-rw-r--r--gdb/config/i386/tm-ptx4.h26
-rw-r--r--gdb/config/i386/tm-symmetry.h291
-rw-r--r--gdb/config/i386/x86-64linux.mt6
-rw-r--r--gdb/config/i386/xm-i386.h7
-rw-r--r--gdb/config/i386/xm-nbsd.h11
-rw-r--r--gdb/config/i386/xm-ptx.h38
-rw-r--r--gdb/config/i386/xm-ptx4.h27
-rw-r--r--gdb/config/i386/xm-symmetry.h28
-rw-r--r--gdb/config/ia64/nm-linux.h13
-rw-r--r--gdb/config/ia64/tm-aix.h2
-rw-r--r--gdb/config/ia64/tm-linux.h2
-rw-r--r--gdb/config/m32r/m32r.mt2
-rw-r--r--gdb/config/m68k/3b1.mh24
-rw-r--r--gdb/config/m68k/3b1.mt6
-rw-r--r--gdb/config/m68k/delta68.mh10
-rw-r--r--gdb/config/m68k/delta68.mt6
-rw-r--r--gdb/config/m68k/dpx2.mh12
-rw-r--r--gdb/config/m68k/dpx2.mt6
-rw-r--r--gdb/config/m68k/m68klynx.mh12
-rw-r--r--gdb/config/m68k/m68klynx.mt8
-rw-r--r--gdb/config/m68k/m68kv4.mh14
-rw-r--r--gdb/config/m68k/m68kv4.mt6
-rw-r--r--gdb/config/m68k/nm-delta68.h44
-rw-r--r--gdb/config/m68k/nm-dpx2.h58
-rw-r--r--gdb/config/m68k/nm-m68klynx.h52
-rw-r--r--gdb/config/m68k/nm-sun2.h68
-rw-r--r--gdb/config/m68k/nm-sun3.h68
-rw-r--r--gdb/config/m68k/nm-sysv4.h46
-rw-r--r--gdb/config/m68k/sun2os3.mh8
-rw-r--r--gdb/config/m68k/sun2os3.mt14
-rw-r--r--gdb/config/m68k/sun2os4.mh8
-rw-r--r--gdb/config/m68k/sun2os4.mt6
-rw-r--r--gdb/config/m68k/sun3os3.mh8
-rw-r--r--gdb/config/m68k/sun3os3.mt16
-rw-r--r--gdb/config/m68k/sun3os4.mh8
-rw-r--r--gdb/config/m68k/sun3os4.mt6
-rw-r--r--gdb/config/m68k/tm-3b1.h66
-rw-r--r--gdb/config/m68k/tm-cisco.h2
-rw-r--r--gdb/config/m68k/tm-delta68.h218
-rw-r--r--gdb/config/m68k/tm-dpx2.h70
-rw-r--r--gdb/config/m68k/tm-m68klynx.h78
-rw-r--r--gdb/config/m68k/tm-m68kv4.h134
-rw-r--r--gdb/config/m68k/tm-sun2.h48
-rw-r--r--gdb/config/m68k/tm-sun2os4.h42
-rw-r--r--gdb/config/m68k/tm-sun3.h198
-rw-r--r--gdb/config/m68k/tm-sun3os4.h44
-rw-r--r--gdb/config/m68k/tm-vx68.h6
-rw-r--r--gdb/config/m68k/xm-3b1.h164
-rw-r--r--gdb/config/m68k/xm-delta68.h70
-rw-r--r--gdb/config/m68k/xm-dpx2.h44
-rw-r--r--gdb/config/m68k/xm-m68kv4.h58
-rw-r--r--gdb/config/m68k/xm-sun2.h154
-rw-r--r--gdb/config/m68k/xm-sun3.h142
-rw-r--r--gdb/config/m68k/xm-sun3os4.h44
-rw-r--r--gdb/config/m88k/xm-delta88v4.h22
-rw-r--r--gdb/config/mips/decstation.mh8
-rw-r--r--gdb/config/mips/embed64.mt4
-rw-r--r--gdb/config/mips/irix6.mh4
-rw-r--r--gdb/config/mips/linux.mh1
-rw-r--r--gdb/config/mips/linux64.mt7
-rw-r--r--gdb/config/mips/littlemips.mh6
-rw-r--r--gdb/config/mips/mipsm3.mh6
-rw-r--r--gdb/config/mips/mipsm3.mt4
-rw-r--r--gdb/config/mips/mipsv4.mt6
-rw-r--r--gdb/config/mips/news-mips.mh6
-rw-r--r--gdb/config/mips/nm-linux.h4
-rw-r--r--gdb/config/mips/nm-mips.h68
-rw-r--r--gdb/config/mips/nm-news-mips.h86
-rw-r--r--gdb/config/mips/nm-riscos.h120
-rw-r--r--gdb/config/mips/riscos.mh32
-rw-r--r--gdb/config/mips/tm-irix5.h76
-rw-r--r--gdb/config/mips/tm-irix6.h64
-rw-r--r--gdb/config/mips/tm-linux.h17
-rw-r--r--gdb/config/mips/tm-mips.h57
-rw-r--r--gdb/config/mips/tm-mips64.h37
-rw-r--r--gdb/config/mips/tm-mipsm3.h67
-rw-r--r--gdb/config/mips/tm-mipsv4.h74
-rw-r--r--gdb/config/mips/tm-nbsd.h5
-rw-r--r--gdb/config/mips/tm-tx39.h32
-rw-r--r--gdb/config/mips/tm-vxmips.h6
-rw-r--r--gdb/config/mips/tx39.mt5
-rw-r--r--gdb/config/mips/tx39l.mt5
-rw-r--r--gdb/config/mips/xm-mips.h118
-rw-r--r--gdb/config/mips/xm-mipsm3.h29
-rw-r--r--gdb/config/mips/xm-mipsv4.h44
-rw-r--r--gdb/config/mips/xm-riscos.h50
-rw-r--r--gdb/config/mn10200/mn10200.mt6
-rw-r--r--gdb/config/mn10200/tm-mn10200.h214
-rw-r--r--gdb/config/nm-bsd.h (renamed from gdb/config/sparc/nm-sparclynx.h)15
-rw-r--r--gdb/config/nm-linux.h3
-rw-r--r--gdb/config/nm-m3.h126
-rw-r--r--gdb/config/none/nm-none.h19
-rw-r--r--gdb/config/none/none.mh5
-rw-r--r--gdb/config/none/none.mt4
-rw-r--r--gdb/config/none/tm-none.h24
-rw-r--r--gdb/config/none/xm-none.h19
-rw-r--r--gdb/config/ns32k/nbsdaout.mt2
-rw-r--r--gdb/config/ns32k/tm-nbsd.h37
-rw-r--r--gdb/config/ns32k/tm-ns32k.h2
-rw-r--r--gdb/config/pa/hppabsd.mh4
-rw-r--r--gdb/config/pa/hppabsd.mt3
-rw-r--r--gdb/config/pa/hppaosf.mh5
-rw-r--r--gdb/config/pa/hppaosf.mt3
-rw-r--r--gdb/config/pa/hppapro.mt3
-rw-r--r--gdb/config/pa/nm-hppab.h123
-rw-r--r--gdb/config/pa/nm-hppah.h11
-rw-r--r--gdb/config/pa/nm-hppao.h43
-rw-r--r--gdb/config/pa/tm-hppa.h139
-rw-r--r--gdb/config/pa/tm-hppa64.h46
-rw-r--r--gdb/config/pa/tm-hppab.h47
-rw-r--r--gdb/config/pa/tm-hppah.h9
-rw-r--r--gdb/config/pa/tm-hppao.h98
-rw-r--r--gdb/config/pa/tm-pro.h14
-rw-r--r--gdb/config/pa/xm-hppab.h24
-rw-r--r--gdb/config/pa/xm-pa.h5
-rw-r--r--gdb/config/powerpc/tm-linux.h21
-rw-r--r--gdb/config/powerpc/tm-ppc-eabi.h3
-rw-r--r--gdb/config/powerpc/xm-linux.h10
-rw-r--r--gdb/config/rs6000/tm-rs6000.h30
-rw-r--r--gdb/config/s390/nm-linux.h59
-rw-r--r--gdb/config/s390/s390.mh10
-rw-r--r--gdb/config/s390/s390x.mt8
-rw-r--r--gdb/config/s390/tm-linux.h14
-rw-r--r--gdb/config/s390/tm-s390.h78
-rw-r--r--gdb/config/s390/xm-linux.h30
-rw-r--r--gdb/config/sh/embed.mt2
-rw-r--r--gdb/config/sh/linux.mt2
-rw-r--r--gdb/config/sh/tm-linux.h2
-rw-r--r--gdb/config/sh/tm-sh.h2
-rw-r--r--gdb/config/sh/wince.mt2
-rw-r--r--gdb/config/sparc/fbsd.mh4
-rw-r--r--gdb/config/sparc/fbsd.mt2
-rw-r--r--gdb/config/sparc/linux.mh13
-rw-r--r--gdb/config/sparc/linux.mt5
-rw-r--r--gdb/config/sparc/linux64.mh11
-rw-r--r--gdb/config/sparc/linux64.mt5
-rw-r--r--gdb/config/sparc/nbsd.mt6
-rw-r--r--gdb/config/sparc/nbsd64.mh5
-rw-r--r--gdb/config/sparc/nbsd64.mt9
-rw-r--r--gdb/config/sparc/nbsdaout.mh6
-rw-r--r--gdb/config/sparc/nbsdelf.mh6
-rw-r--r--gdb/config/sparc/nm-fbsd.h13
-rw-r--r--gdb/config/sparc/nm-linux.h23
-rw-r--r--gdb/config/sparc/nm-nbsd.h27
-rw-r--r--gdb/config/sparc/nm-nbsdaout.h10
-rw-r--r--gdb/config/sparc/nm-sol2.h (renamed from gdb/config/sparc/nm-sun4sol2.h)52
-rw-r--r--gdb/config/sparc/nm-sun4os4.h42
-rw-r--r--gdb/config/sparc/obsd.mt4
-rw-r--r--gdb/config/sparc/obsd64.mt5
-rw-r--r--gdb/config/sparc/sol2-64.mt3
-rw-r--r--gdb/config/sparc/sol2.mh6
-rw-r--r--gdb/config/sparc/sol2.mt3
-rw-r--r--gdb/config/sparc/sp64.mt6
-rw-r--r--gdb/config/sparc/sp64linux.mt3
-rw-r--r--gdb/config/sparc/sp64sol2.mt3
-rw-r--r--gdb/config/sparc/sparc-em.mt3
-rw-r--r--gdb/config/sparc/sparc.mt2
-rw-r--r--gdb/config/sparc/sparc64.mt2
-rw-r--r--gdb/config/sparc/sparclet.mt3
-rw-r--r--gdb/config/sparc/sparclite.mt5
-rw-r--r--gdb/config/sparc/sparclynx.mh6
-rw-r--r--gdb/config/sparc/sparclynx.mt3
-rw-r--r--gdb/config/sparc/sun4os4.mh9
-rw-r--r--gdb/config/sparc/sun4os4.mt3
-rw-r--r--gdb/config/sparc/sun4sol2.mh22
-rw-r--r--gdb/config/sparc/sun4sol2.mt3
-rw-r--r--gdb/config/sparc/tm-linux.h21
-rw-r--r--gdb/config/sparc/tm-nbsd.h11
-rw-r--r--gdb/config/sparc/tm-sol2.h40
-rw-r--r--gdb/config/sparc/tm-sp64.h107
-rw-r--r--gdb/config/sparc/tm-sp64linux.h36
-rw-r--r--gdb/config/sparc/tm-sparc.h361
-rw-r--r--gdb/config/sparc/tm-sparclet.h158
-rw-r--r--gdb/config/sparc/tm-sparclite.h123
-rw-r--r--gdb/config/sparc/tm-sparclynx.h37
-rw-r--r--gdb/config/sparc/tm-spc-em.h46
-rw-r--r--gdb/config/sparc/tm-sun4os4.h59
-rw-r--r--gdb/config/sparc/tm-sun4sol2.h80
-rw-r--r--gdb/config/sparc/tm-vxsparc.h33
-rw-r--r--gdb/config/sparc/tm-vxworks.h (renamed from gdb/config/mips/tm-linux64.h)17
-rw-r--r--gdb/config/sparc/vxsparc.mt3
-rw-r--r--gdb/config/sparc/vxworks.mt4
-rw-r--r--gdb/config/sparc/xm-linux.h42
-rw-r--r--gdb/config/sparc/xm-sun4sol2.h37
-rw-r--r--gdb/config/tm-lynx.h3
-rw-r--r--gdb/config/vax/tm-vaxbsd.h6
-rw-r--r--gdb/config/z8k/tm-z8k.h292
-rw-r--r--gdb/config/z8k/z8k.mt6
-rw-r--r--gdb/doc/ChangeLog330
-rw-r--r--gdb/doc/Makefile.in4
-rw-r--r--gdb/doc/annotate.texinfo12
-rw-r--r--gdb/doc/fdl.texi372
-rw-r--r--gdb/doc/gdb.texinfo971
-rw-r--r--gdb/doc/gdbint.texinfo470
-rw-r--r--gdb/doc/stabs.texinfo101
-rw-r--r--gdb/mi/ChangeLog-1999-2003 (renamed from gdb/mi/ChangeLog)23
-rw-r--r--gdb/mi/mi-cmd-env.c3
-rw-r--r--gdb/mi/mi-cmd-stack.c61
-rw-r--r--gdb/mi/mi-cmd-var.c34
-rw-r--r--gdb/mi/mi-cmds.h8
-rw-r--r--gdb/mi/mi-interp.c23
-rw-r--r--gdb/mi/mi-main.c30
-rw-r--r--gdb/mi/mi-out.c30
-rw-r--r--gdb/regformats/reg-s390.dat16
-rw-r--r--gdb/regformats/reg-s390x.dat16
-rw-r--r--gdb/regformats/reg-x86-64.dat2
-rw-r--r--gdb/testsuite/ChangeLog1510
-rw-r--r--gdb/testsuite/config/gdbserver.exp146
-rw-r--r--gdb/testsuite/config/hmsirom.exp2
-rw-r--r--gdb/testsuite/config/sim.exp6
-rwxr-xr-xgdb/testsuite/configure4
-rw-r--r--gdb/testsuite/configure.in2
-rw-r--r--gdb/testsuite/gdb.arch/Makefile.in3
-rw-r--r--gdb/testsuite/gdb.arch/gdb1291.exp92
-rw-r--r--gdb/testsuite/gdb.arch/gdb1291.s129
-rw-r--r--gdb/testsuite/gdb.arch/gdb1431.exp63
-rw-r--r--gdb/testsuite/gdb.arch/gdb1431.s129
-rw-r--r--gdb/testsuite/gdb.arch/gdb1558.c (renamed from gdb/config/i386/xm-i386bsd.h)36
-rw-r--r--gdb/testsuite/gdb.arch/gdb1558.exp72
-rw-r--r--gdb/testsuite/gdb.arch/i386-unwind.c (renamed from gdb/config/alpha/tm-fbsd.h)42
-rw-r--r--gdb/testsuite/gdb.arch/i386-unwind.exp68
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp48
-rw-r--r--gdb/testsuite/gdb.asm/asmsrc1.s2
-rw-r--r--gdb/testsuite/gdb.asm/empty.inc1
-rw-r--r--gdb/testsuite/gdb.asm/frv.inc54
-rw-r--r--gdb/testsuite/gdb.asm/ia64.inc1
-rw-r--r--gdb/testsuite/gdb.asm/mips.inc2
-rw-r--r--gdb/testsuite/gdb.asm/netbsd.inc12
-rw-r--r--gdb/testsuite/gdb.asm/openbsd.inc12
-rw-r--r--gdb/testsuite/gdb.base/Makefile.in2
-rw-r--r--gdb/testsuite/gdb.base/annota1.exp2
-rw-r--r--gdb/testsuite/gdb.base/auxv.c58
-rw-r--r--gdb/testsuite/gdb.base/auxv.exp187
-rw-r--r--gdb/testsuite/gdb.base/bang.exp14
-rw-r--r--gdb/testsuite/gdb.base/bigcore.c203
-rw-r--r--gdb/testsuite/gdb.base/bigcore.exp192
-rw-r--r--gdb/testsuite/gdb.base/break.c71
-rw-r--r--gdb/testsuite/gdb.base/break.exp195
-rw-r--r--gdb/testsuite/gdb.base/break1.c44
-rw-r--r--gdb/testsuite/gdb.base/call-ar-st.exp19
-rw-r--r--gdb/testsuite/gdb.base/call-rt-st.c160
-rw-r--r--gdb/testsuite/gdb.base/call-rt-st.exp30
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.c24
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp54
-rw-r--r--gdb/testsuite/gdb.base/charset.c113
-rw-r--r--gdb/testsuite/gdb.base/charset.exp22
-rw-r--r--gdb/testsuite/gdb.base/chng-syms.c22
-rw-r--r--gdb/testsuite/gdb.base/chng-syms.exp126
-rw-r--r--gdb/testsuite/gdb.base/commands.exp12
-rw-r--r--gdb/testsuite/gdb.base/completion.exp84
-rw-r--r--gdb/testsuite/gdb.base/complex.exp2
-rw-r--r--gdb/testsuite/gdb.base/condbreak.exp57
-rw-r--r--gdb/testsuite/gdb.base/constvars.exp32
-rw-r--r--gdb/testsuite/gdb.base/corefile.exp17
-rw-r--r--gdb/testsuite/gdb.base/cvexpr.c36
-rw-r--r--gdb/testsuite/gdb.base/define.exp24
-rw-r--r--gdb/testsuite/gdb.base/dump.c2
-rw-r--r--gdb/testsuite/gdb.base/dump.exp8
-rw-r--r--gdb/testsuite/gdb.base/ena-dis-br.exp51
-rw-r--r--gdb/testsuite/gdb.base/ending-run.exp5
-rw-r--r--gdb/testsuite/gdb.base/environ.exp15
-rw-r--r--gdb/testsuite/gdb.base/fileio.c7
-rw-r--r--gdb/testsuite/gdb.base/fileio.exp27
-rw-r--r--gdb/testsuite/gdb.base/finish.exp4
-rw-r--r--gdb/testsuite/gdb.base/float.exp2
-rw-r--r--gdb/testsuite/gdb.base/freebpcmd.c35
-rw-r--r--gdb/testsuite/gdb.base/freebpcmd.exp121
-rw-r--r--gdb/testsuite/gdb.base/funcargs.exp35
-rw-r--r--gdb/testsuite/gdb.base/gcore.exp26
-rw-r--r--gdb/testsuite/gdb.base/gdb1056.exp48
-rw-r--r--gdb/testsuite/gdb.base/gdb1476.c12
-rw-r--r--gdb/testsuite/gdb.base/gdb1476.exp72
-rw-r--r--gdb/testsuite/gdb.base/gdb1555-main.c (renamed from gdb/config/mips/nm-irix6.h)13
-rw-r--r--gdb/testsuite/gdb.base/gdb1555.c (renamed from gdb/config/mips/xm-irix6.h)12
-rw-r--r--gdb/testsuite/gdb.base/gdb1555.exp119
-rw-r--r--gdb/testsuite/gdb.base/huge.c2
-rw-r--r--gdb/testsuite/gdb.base/huge.exp4
-rw-r--r--gdb/testsuite/gdb.base/info-proc.exp22
-rw-r--r--gdb/testsuite/gdb.base/langs.exp11
-rw-r--r--gdb/testsuite/gdb.base/list.exp1
-rw-r--r--gdb/testsuite/gdb.base/maint.exp63
-rw-r--r--gdb/testsuite/gdb.base/mips_pro.exp4
-rw-r--r--gdb/testsuite/gdb.base/nodebug.exp6
-rw-r--r--gdb/testsuite/gdb.base/pc-fp.exp4
-rw-r--r--gdb/testsuite/gdb.base/pending.c35
-rw-r--r--gdb/testsuite/gdb.base/pending.exp266
-rw-r--r--gdb/testsuite/gdb.base/pendshr.c33
-rw-r--r--gdb/testsuite/gdb.base/printcmds.exp12
-rw-r--r--gdb/testsuite/gdb.base/relocate.c2
-rw-r--r--gdb/testsuite/gdb.base/return2.exp4
-rw-r--r--gdb/testsuite/gdb.base/scope.exp59
-rw-r--r--gdb/testsuite/gdb.base/sect-cmd.exp16
-rw-r--r--gdb/testsuite/gdb.base/selftest.exp8
-rw-r--r--gdb/testsuite/gdb.base/sepdebug.c150
-rw-r--r--gdb/testsuite/gdb.base/sepdebug.exp987
-rw-r--r--gdb/testsuite/gdb.base/setvar.exp35
-rw-r--r--gdb/testsuite/gdb.base/shlib-call.exp4
-rw-r--r--gdb/testsuite/gdb.base/shreloc.exp5
-rw-r--r--gdb/testsuite/gdb.base/so-impl-ld.exp8
-rw-r--r--gdb/testsuite/gdb.base/structs.c296
-rw-r--r--gdb/testsuite/gdb.base/structs.exp745
-rw-r--r--gdb/testsuite/gdb.base/until.exp31
-rw-r--r--gdb/testsuite/gdb.base/volatile.exp28
-rw-r--r--gdb/testsuite/gdb.base/watchpoint.exp26
-rw-r--r--gdb/testsuite/gdb.cp/ambiguous.exp7
-rw-r--r--gdb/testsuite/gdb.cp/annota2.exp7
-rw-r--r--gdb/testsuite/gdb.cp/annota3.exp7
-rw-r--r--gdb/testsuite/gdb.cp/anon-union.exp5
-rw-r--r--gdb/testsuite/gdb.cp/breakpoint.cc41
-rw-r--r--gdb/testsuite/gdb.cp/breakpoint.exp (renamed from gdb/testsuite/gdb.mi/mi1-symbol.exp)68
-rw-r--r--gdb/testsuite/gdb.cp/bs15503.cc (renamed from gdb/testsuite/gdb.hp/gdb.defects/bs15503.cc)22
-rw-r--r--gdb/testsuite/gdb.cp/bs15503.exp100
-rw-r--r--gdb/testsuite/gdb.cp/casts.exp5
-rw-r--r--gdb/testsuite/gdb.cp/class2.cc74
-rw-r--r--gdb/testsuite/gdb.cp/class2.exp119
-rw-r--r--gdb/testsuite/gdb.cp/classes.cc608
-rw-r--r--gdb/testsuite/gdb.cp/classes.exp1066
-rw-r--r--gdb/testsuite/gdb.cp/cplusfuncs.exp6
-rw-r--r--gdb/testsuite/gdb.cp/ctti.exp358
-rw-r--r--gdb/testsuite/gdb.cp/cttiadd.cc22
-rw-r--r--gdb/testsuite/gdb.cp/cttiadd1.cc21
-rw-r--r--gdb/testsuite/gdb.cp/cttiadd2.cc21
-rw-r--r--gdb/testsuite/gdb.cp/cttiadd3.cc21
-rw-r--r--gdb/testsuite/gdb.cp/demangle.exp5
-rw-r--r--gdb/testsuite/gdb.cp/derivation.exp397
-rw-r--r--gdb/testsuite/gdb.cp/exception.cc69
-rw-r--r--gdb/testsuite/gdb.cp/exception.exp219
-rw-r--r--gdb/testsuite/gdb.cp/hang.exp5
-rw-r--r--gdb/testsuite/gdb.cp/inherit.exp1488
-rw-r--r--gdb/testsuite/gdb.cp/local.exp202
-rw-r--r--gdb/testsuite/gdb.cp/m-static.exp20
-rw-r--r--gdb/testsuite/gdb.cp/maint.exp5
-rw-r--r--gdb/testsuite/gdb.cp/member-ptr.cc21
-rw-r--r--gdb/testsuite/gdb.cp/member-ptr.exp799
-rw-r--r--gdb/testsuite/gdb.cp/method.exp10
-rw-r--r--gdb/testsuite/gdb.cp/misc.cc20
-rw-r--r--gdb/testsuite/gdb.cp/misc.exp3
-rw-r--r--gdb/testsuite/gdb.cp/namespace.cc35
-rw-r--r--gdb/testsuite/gdb.cp/namespace.exp88
-rw-r--r--gdb/testsuite/gdb.cp/namespace1.cc17
-rw-r--r--gdb/testsuite/gdb.cp/overload.cc28
-rw-r--r--gdb/testsuite/gdb.cp/overload.exp522
-rw-r--r--gdb/testsuite/gdb.cp/ovldbreak.exp5
-rw-r--r--gdb/testsuite/gdb.cp/pr-1553.cc53
-rw-r--r--gdb/testsuite/gdb.cp/pr-1553.exp62
-rw-r--r--gdb/testsuite/gdb.cp/psmang.exp5
-rw-r--r--gdb/testsuite/gdb.cp/ref-types.exp7
-rw-r--r--gdb/testsuite/gdb.cp/rtti.exp54
-rw-r--r--gdb/testsuite/gdb.cp/rtti.h10
-rw-r--r--gdb/testsuite/gdb.cp/rtti1.cc44
-rw-r--r--gdb/testsuite/gdb.cp/rtti2.cc6
-rw-r--r--gdb/testsuite/gdb.cp/templates.exp86
-rw-r--r--gdb/testsuite/gdb.cp/userdef.exp5
-rw-r--r--gdb/testsuite/gdb.cp/virtfunc.exp1332
-rw-r--r--gdb/testsuite/gdb.disasm/mn10200.exp478
-rw-r--r--gdb/testsuite/gdb.disasm/sh3.s2
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/exception.cc48
-rw-r--r--gdb/testsuite/gdb.hp/gdb.aCC/exception.exp426
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp88
-rw-r--r--gdb/testsuite/gdb.java/jmisc.exp4
-rw-r--r--gdb/testsuite/gdb.mi/ChangeLog-1999-2003 (renamed from gdb/testsuite/gdb.mi/ChangeLog)0
-rw-r--r--gdb/testsuite/gdb.mi/gdb669.exp4
-rw-r--r--gdb/testsuite/gdb.mi/mi-pthreads.exp4
-rw-r--r--gdb/testsuite/gdb.mi/mi-stack.exp7
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-child.exp5
-rw-r--r--gdb/testsuite/gdb.mi/mi1-basics.exp174
-rw-r--r--gdb/testsuite/gdb.mi/mi1-break.exp138
-rw-r--r--gdb/testsuite/gdb.mi/mi1-console.exp97
-rw-r--r--gdb/testsuite/gdb.mi/mi1-disassemble.exp178
-rw-r--r--gdb/testsuite/gdb.mi/mi1-eval.exp62
-rw-r--r--gdb/testsuite/gdb.mi/mi1-hack-cli.exp40
-rw-r--r--gdb/testsuite/gdb.mi/mi1-pthreads.exp221
-rw-r--r--gdb/testsuite/gdb.mi/mi1-read-memory.exp89
-rw-r--r--gdb/testsuite/gdb.mi/mi1-regs.exp129
-rw-r--r--gdb/testsuite/gdb.mi/mi1-return.exp72
-rw-r--r--gdb/testsuite/gdb.mi/mi1-simplerun.exp199
-rw-r--r--gdb/testsuite/gdb.mi/mi1-stack.exp203
-rw-r--r--gdb/testsuite/gdb.mi/mi1-stepi.exp86
-rw-r--r--gdb/testsuite/gdb.mi/mi1-until.exp127
-rw-r--r--gdb/testsuite/gdb.mi/mi1-var-block.exp173
-rw-r--r--gdb/testsuite/gdb.mi/mi1-var-child.exp1203
-rw-r--r--gdb/testsuite/gdb.mi/mi1-var-cmd.exp560
-rw-r--r--gdb/testsuite/gdb.mi/mi1-var-display.exp627
-rw-r--r--gdb/testsuite/gdb.mi/mi1-watch.exp166
-rw-r--r--gdb/testsuite/gdb.mi/mi2-basics.exp24
-rw-r--r--gdb/testsuite/gdb.mi/mi2-pthreads.exp4
-rw-r--r--gdb/testsuite/gdb.mi/pthreads.c36
-rw-r--r--gdb/testsuite/gdb.objc/basicclass.exp12
-rw-r--r--gdb/testsuite/gdb.objc/nondebug.exp77
-rw-r--r--gdb/testsuite/gdb.objc/nondebug.m38
-rw-r--r--gdb/testsuite/gdb.objc/objcdecode.exp86
-rw-r--r--gdb/testsuite/gdb.objc/objcdecode.m49
-rw-r--r--gdb/testsuite/gdb.stabs/weird.exp31
-rw-r--r--gdb/testsuite/gdb.threads/gcore-thread.exp28
-rw-r--r--gdb/testsuite/gdb.threads/killed.exp10
-rw-r--r--gdb/testsuite/gdb.threads/pthreads.c24
-rw-r--r--gdb/testsuite/gdb.threads/switch-threads.c (renamed from gdb/config/vax/tm-vax.h)32
-rw-r--r--gdb/testsuite/gdb.threads/switch-threads.exp52
-rw-r--r--gdb/testsuite/gdb.threads/thread-specific.c66
-rw-r--r--gdb/testsuite/gdb.threads/thread-specific.exp115
-rwxr-xr-xgdb/testsuite/gdb.trace/configure899
-rw-r--r--gdb/testsuite/lib/compiler.c74
-rw-r--r--gdb/testsuite/lib/compiler.cc69
-rw-r--r--gdb/testsuite/lib/gdb.exp414
-rw-r--r--gdb/testsuite/lib/java.exp1
-rw-r--r--gdb/testsuite/lib/mi-support.exp125
481 files changed, 16179 insertions, 18530 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 45794f7599f..9378ac87064 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1,6 +1,6 @@
/* GDB CLI commands.
- Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -20,7 +20,8 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include <readline/tilde.h>
+#include "readline/readline.h"
+#include "readline/tilde.h"
#include "completer.h"
#include "target.h" /* For baud_rate, remote_debug and remote_timeout */
#include "gdb_wait.h" /* For shell escape implementation */
@@ -45,6 +46,10 @@
#include "cli/cli-setshow.h"
#include "cli/cli-cmds.h"
+#ifdef TUI
+#include "tui/tui.h" /* For tui_active et.al. */
+#endif
+
#ifndef GDBINIT_FILENAME
#define GDBINIT_FILENAME ".gdbinit"
#endif
@@ -59,8 +64,6 @@ static void pwd_command (char *, int);
static void show_version (char *, int);
-static void validate_comname (char *);
-
static void help_command (char *, int);
static void show_command (char *, int);
@@ -184,7 +187,6 @@ error_no_arg (char *why)
/* The "info" command is defined as a prefix, with allow_unknown = 0.
Therefore, its own definition is called only for "info" with no args. */
-/* ARGSUSED */
static void
info_command (char *arg, int from_tty)
{
@@ -194,7 +196,6 @@ info_command (char *arg, int from_tty)
/* The "show" command with no arguments shows all the settings. */
-/* ARGSUSED */
static void
show_command (char *arg, int from_tty)
{
@@ -204,7 +205,6 @@ show_command (char *arg, int from_tty)
/* Provide documentation on command or list given by COMMAND. FROM_TTY
is ignored. */
-/* ARGSUSED */
static void
help_command (char *command, int from_tty)
{
@@ -222,13 +222,12 @@ compare_strings (const void *arg1, const void *arg2)
/* The "complete" command is used by Emacs to implement completion. */
-/* ARGSUSED */
static void
complete_command (char *arg, int from_tty)
{
int i;
int argpoint;
- char **completions;
+ char **completions, *point, *arg_prefix;
dont_repeat ();
@@ -236,7 +235,23 @@ complete_command (char *arg, int from_tty)
arg = "";
argpoint = strlen (arg);
- completions = complete_line (arg, arg, argpoint);
+ /* complete_line assumes that its first argument is somewhere within,
+ and except for filenames at the beginning of, the word to be completed.
+ The following crude imitation of readline's word-breaking tries to
+ accomodate this. */
+ point = arg + argpoint;
+ while (point > arg)
+ {
+ if (strchr (rl_completer_word_break_characters, point[-1]) != 0)
+ break;
+ point--;
+ }
+
+ arg_prefix = alloca (point - arg + 1);
+ memcpy (arg_prefix, arg, point - arg);
+ arg_prefix[point - arg] = 0;
+
+ completions = complete_line (point, arg, argpoint);
if (completions)
{
@@ -252,7 +267,7 @@ complete_command (char *arg, int from_tty)
while (item < size)
{
int next_item;
- printf_unfiltered ("%s\n", completions[item]);
+ printf_unfiltered ("%s%s\n", arg_prefix, completions[item]);
next_item = item + 1;
while (next_item < size
&& ! strcmp (completions[item], completions[next_item]))
@@ -275,7 +290,6 @@ is_complete_command (struct cmd_list_element *c)
return cmd_cfunc_eq (c, complete_command);
}
-/* ARGSUSED */
static void
show_version (char *args, int from_tty)
{
@@ -295,7 +309,6 @@ quit_command (char *args, int from_tty)
quit_force (args, from_tty);
}
-/* ARGSUSED */
static void
pwd_command (char *args, int from_tty)
{
@@ -303,7 +316,7 @@ pwd_command (char *args, int from_tty)
error ("The \"pwd\" command does not take an argument: %s", args);
getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
- if (!STREQ (gdb_dirbuf, current_directory))
+ if (strcmp (gdb_dirbuf, current_directory) != 0)
printf_unfiltered ("Working directory %s\n (canonically %s).\n",
current_directory, gdb_dirbuf);
else
@@ -439,12 +452,11 @@ source_command (char *args, int from_tty)
do_cleanups (old_cleanups);
}
-/* ARGSUSED */
static void
echo_command (char *text, int from_tty)
{
char *p = text;
- register int c;
+ int c;
if (text)
while ((c = *p++) != '\0')
@@ -469,7 +481,6 @@ echo_command (char *text, int from_tty)
gdb_flush (gdb_stdout);
}
-/* ARGSUSED */
static void
shell_escape (char *arg, int from_tty)
{
@@ -514,9 +525,9 @@ shell_escape (char *arg, int from_tty)
p++; /* Get past '/' */
if (!arg)
- execl (user_shell, p, 0);
+ execl (user_shell, p, (char *) 0);
else
- execl (user_shell, p, "-c", arg, 0);
+ execl (user_shell, p, "-c", arg, (char *) 0);
fprintf_unfiltered (gdb_stderr, "Cannot execute %s: %s\n", user_shell,
safe_strerror (errno));
@@ -565,7 +576,7 @@ edit_command (char *arg, int from_tty)
/* Now should only be one argument -- decode it in SAL */
arg1 = arg;
- sals = decode_line_1 (&arg1, 0, 0, 0, 0);
+ sals = decode_line_1 (&arg1, 0, 0, 0, 0, 0);
if (! sals.nelts) return; /* C++ */
if (sals.nelts > 1) {
@@ -659,7 +670,7 @@ list_command (char *arg, int from_tty)
/* "l" or "l +" lists next ten lines. */
- if (arg == 0 || STREQ (arg, "+"))
+ if (arg == 0 || strcmp (arg, "+") == 0)
{
print_source_lines (cursal.symtab, cursal.line,
cursal.line + get_lines_to_list (), 0);
@@ -667,7 +678,7 @@ list_command (char *arg, int from_tty)
}
/* "l -" lists previous ten lines, the ones before the ten just listed. */
- if (STREQ (arg, "-"))
+ if (strcmp (arg, "-") == 0)
{
print_source_lines (cursal.symtab,
max (get_first_line_listed () - get_lines_to_list (), 1),
@@ -689,7 +700,7 @@ list_command (char *arg, int from_tty)
dummy_beg = 1;
else
{
- sals = decode_line_1 (&arg1, 0, 0, 0, 0);
+ sals = decode_line_1 (&arg1, 0, 0, 0, 0, 0);
if (!sals.nelts)
return; /* C++ */
@@ -722,9 +733,9 @@ list_command (char *arg, int from_tty)
else
{
if (dummy_beg)
- sals_end = decode_line_1 (&arg1, 0, 0, 0, 0);
+ sals_end = decode_line_1 (&arg1, 0, 0, 0, 0, 0);
else
- sals_end = decode_line_1 (&arg1, 0, sal.symtab, sal.line, 0);
+ sals_end = decode_line_1 (&arg1, 0, sal.symtab, sal.line, 0, 0);
if (sals_end.nelts == 0)
return;
if (sals_end.nelts > 1)
@@ -820,7 +831,6 @@ list_command (char *arg, int from_tty)
Two arguments are interpeted as bounds within which to dump
assembly. */
-/* ARGSUSED */
static void
disassemble_command (char *arg, int from_tty)
{
@@ -844,8 +854,9 @@ disassemble_command (char *arg, int from_tty)
#if defined(TUI)
/* NOTE: cagney/2003-02-13 The `tui_active' was previously
`tui_version'. */
- else if (tui_active)
- low = tuiGetLowDisassemblyAddress (low, pc);
+ if (tui_active)
+ /* FIXME: cagney/2004-02-07: This should be an observer. */
+ low = tui_get_low_disassembly_address (low, pc);
#endif
low += FUNCTION_START_OFFSET;
}
@@ -858,8 +869,9 @@ disassemble_command (char *arg, int from_tty)
#if defined(TUI)
/* NOTE: cagney/2003-02-13 The `tui_active' was previously
`tui_version'. */
- else if (tui_active)
- low = tuiGetLowDisassemblyAddress (low, pc);
+ if (tui_active)
+ /* FIXME: cagney/2004-02-07: This should be an observer. */
+ low = tui_get_low_disassembly_address (low, pc);
#endif
low += FUNCTION_START_OFFSET;
}
@@ -920,7 +932,6 @@ make_command (char *arg, int from_tty)
shell_escape (p, from_tty);
}
-/* ARGSUSED */
static void
show_user (char *args, int from_tty)
{
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 8a0d057257f..43f2f257304 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -29,6 +29,10 @@
#include "cli/cli-cmds.h"
#include "cli/cli-decode.h"
+#ifdef TUI
+#include "tui/tui.h" /* For tui_active et.al. */
+#endif
+
#include "gdb_assert.h"
/* Prototypes for local functions */
@@ -133,7 +137,7 @@ struct cmd_list_element *
add_cmd (char *name, enum command_class class, void (*fun) (char *, int),
char *doc, struct cmd_list_element **list)
{
- register struct cmd_list_element *c
+ struct cmd_list_element *c
= (struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
struct cmd_list_element *p;
@@ -212,8 +216,8 @@ add_alias_cmd (char *name, char *oldname, enum command_class class,
{
/* Must do this since lookup_cmd tries to side-effect its first arg */
char *copied_name;
- register struct cmd_list_element *old;
- register struct cmd_list_element *c;
+ struct cmd_list_element *old;
+ struct cmd_list_element *c;
copied_name = (char *) alloca (strlen (oldname) + 1);
strcpy (copied_name, oldname);
old = lookup_cmd (&copied_name, *list, "", 1, 1);
@@ -247,7 +251,7 @@ add_prefix_cmd (char *name, enum command_class class, void (*fun) (char *, int),
char *prefixname, int allow_unknown,
struct cmd_list_element **list)
{
- register struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+ struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
c->allow_unknown = allow_unknown;
@@ -262,7 +266,7 @@ add_abbrev_prefix_cmd (char *name, enum command_class class,
struct cmd_list_element **prefixlist, char *prefixname,
int allow_unknown, struct cmd_list_element **list)
{
- register struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+ struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
c->allow_unknown = allow_unknown;
@@ -500,10 +504,10 @@ add_show_from_set (struct cmd_list_element *setcmd,
void
delete_cmd (char *name, struct cmd_list_element **list)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
struct cmd_list_element *p;
- while (*list && STREQ ((*list)->name, name))
+ while (*list && strcmp ((*list)->name, name) == 0)
{
if ((*list)->hookee_pre)
(*list)->hookee_pre->hook_pre = 0; /* Hook slips out of its mouth */
@@ -517,7 +521,7 @@ delete_cmd (char *name, struct cmd_list_element **list)
if (*list)
for (c = *list; c->next;)
{
- if (STREQ (c->next->name, name))
+ if (strcmp (c->next->name, name) == 0)
{
if (c->next->hookee_pre)
c->next->hookee_pre->hook_pre = 0; /* hooked cmd gets away. */
@@ -577,7 +581,7 @@ void
apropos_cmd (struct ui_file *stream, struct cmd_list_element *commandlist,
struct re_pattern_buffer *regex, char *prefix)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
int returnvalue=1; /*Needed to avoid double printing*/
/* Walk through the commands */
for (c=commandlist;c;c=c->next)
@@ -786,7 +790,7 @@ print_doc_line (struct ui_file *stream, char *str)
{
static char *line_buffer = 0;
static int line_size;
- register char *p;
+ char *p;
if (!line_buffer)
{
@@ -830,7 +834,7 @@ void
help_cmd_list (struct cmd_list_element *list, enum command_class class,
char *prefix, int recurse, struct ui_file *stream)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
for (c = list; c; c = c->next)
{
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 7b88975c6d4..ac54aa675b9 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -31,7 +31,7 @@
#include "gdb_assert.h"
#include <ctype.h>
#include "target.h"
-#include <readline/readline.h>
+#include "readline/readline.h"
#define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
@@ -331,36 +331,6 @@ dump_value_command (char *cmd, char *mode)
}
static void
-dump_filetype (char *cmd, char *mode, char *filetype)
-{
- char *suffix = cmd;
-
- if (cmd == NULL || *cmd == '\0')
- error ("Missing subcommand: try 'help %s %s'.",
- mode[0] == 'a' ? "append" : "dump",
- filetype);
-
- suffix += strcspn (cmd, " \t");
-
- if (suffix != cmd)
- {
- if (strncmp ("memory", cmd, suffix - cmd) == 0)
- {
- dump_memory_to_file (suffix, mode, filetype);
- return;
- }
- else if (strncmp ("value", cmd, suffix - cmd) == 0)
- {
- dump_value_to_file (suffix, mode, filetype);
- return;
- }
- }
-
- error ("dump %s: unknown subcommand '%s' -- try 'value' or 'memory'.",
- filetype, cmd);
-}
-
-static void
dump_srec_memory (char *args, int from_tty)
{
dump_memory_to_file (args, FOPEN_WB, "srec");
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index ab69ca49980..ca0c14f043b 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -36,9 +36,6 @@
/* Prototypes for local functions */
-static struct cleanup *
- make_cleanup_free_command_lines (struct command_line **arg);
-
static enum command_control_type
recurse_read_control_structure (struct command_line *current_cmd);
@@ -255,7 +252,7 @@ do_restore_user_call_depth (void * call_depth)
void
execute_user_command (struct cmd_list_element *c, char *args)
{
- register struct command_line *cmdlines;
+ struct command_line *cmdlines;
struct cleanup *old_chain;
enum command_control_type ret;
static int user_call_depth = 0;
@@ -297,21 +294,25 @@ execute_control_command (struct command_line *cmd)
{
struct expression *expr;
struct command_line *current;
- struct cleanup *old_chain = 0;
+ struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
struct value *val;
struct value *val_mark;
int loop;
enum command_control_type ret;
char *new_line;
+ /* Start by assuming failure, if a problem is detected, the code
+ below will simply "break" out of the switch. */
+ ret = invalid_control;
+
switch (cmd->control_type)
{
case simple_control:
/* A simple command, execute it and return. */
new_line = insert_args (cmd->line);
if (!new_line)
- return invalid_control;
- old_chain = make_cleanup (free_current_contents, &new_line);
+ break;
+ make_cleanup (free_current_contents, &new_line);
execute_command (new_line, 0);
ret = cmd->control_type;
break;
@@ -328,8 +329,8 @@ execute_control_command (struct command_line *cmd)
/* Parse the loop control expression for the while statement. */
new_line = insert_args (cmd->line);
if (!new_line)
- return invalid_control;
- old_chain = make_cleanup (free_current_contents, &new_line);
+ break;
+ make_cleanup (free_current_contents, &new_line);
expr = parse_expression (new_line);
make_cleanup (free_current_contents, &expr);
@@ -388,8 +389,8 @@ execute_control_command (struct command_line *cmd)
{
new_line = insert_args (cmd->line);
if (!new_line)
- return invalid_control;
- old_chain = make_cleanup (free_current_contents, &new_line);
+ break;
+ make_cleanup (free_current_contents, &new_line);
/* Parse the conditional for the if statement. */
expr = parse_expression (new_line);
make_cleanup (free_current_contents, &expr);
@@ -427,11 +428,10 @@ execute_control_command (struct command_line *cmd)
default:
warning ("Invalid control type in command structure.");
- return invalid_control;
+ break;
}
- if (old_chain)
- do_cleanups (old_chain);
+ do_cleanups (old_chain);
return ret;
}
@@ -974,8 +974,8 @@ read_command_lines (char *prompt_arg, int from_tty)
void
free_command_lines (struct command_line **lptr)
{
- register struct command_line *l = *lptr;
- register struct command_line *next;
+ struct command_line *l = *lptr;
+ struct command_line *next;
struct command_line **blist;
int i;
@@ -1001,7 +1001,7 @@ do_free_command_lines_cleanup (void *arg)
free_command_lines (arg);
}
-static struct cleanup *
+struct cleanup *
make_cleanup_free_command_lines (struct command_line **arg)
{
return make_cleanup (do_free_command_lines_cleanup, arg);
@@ -1040,7 +1040,7 @@ copy_command_lines (struct command_line *cmds)
static void
validate_comname (char *comname)
{
- register char *p;
+ char *p;
if (comname == 0)
error_no_arg ("name of command to define");
@@ -1070,8 +1070,8 @@ define_command (char *comname, int from_tty)
CMD_PRE_HOOK,
CMD_POST_HOOK
};
- register struct command_line *cmds;
- register struct cmd_list_element *c, *newc, *oldc, *hookc = 0;
+ struct command_line *cmds;
+ struct cmd_list_element *c, *newc, *oldc, *hookc = 0;
char *tem = comname;
char *tem2;
char tmpbuf[MAX_TMPBUF];
@@ -1176,7 +1176,7 @@ void
document_command (char *comname, int from_tty)
{
struct command_line *doclines;
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
char *tem = comname;
char tmpbuf[128];
@@ -1194,8 +1194,8 @@ document_command (char *comname, int from_tty)
xfree (c->doc);
{
- register struct command_line *cl1;
- register int len = 0;
+ struct command_line *cl1;
+ int len = 0;
for (cl1 = doclines; cl1; cl1 = cl1->next)
len += strlen (cl1->line) + 1;
@@ -1233,7 +1233,6 @@ source_cleanup_lines (void *args)
error_pre_print = p->old_error_pre_print;
}
-/* ARGSUSED */
static void
do_fclose_cleanup (void *stream)
{
@@ -1290,7 +1289,7 @@ script_from_file (FILE *stream, char *file)
void
show_user_1 (struct cmd_list_element *c, struct ui_file *stream)
{
- register struct command_line *cmdlines;
+ struct command_line *cmdlines;
cmdlines = c->user_commands;
if (!cmdlines)
diff --git a/gdb/cli/cli-script.h b/gdb/cli/cli-script.h
index 03cb84137e5..fc5c20301e8 100644
--- a/gdb/cli/cli-script.h
+++ b/gdb/cli/cli-script.h
@@ -47,6 +47,8 @@ extern void print_command_lines (struct ui_out *,
extern struct command_line * copy_command_lines (struct command_line *cmds);
+struct cleanup *make_cleanup_free_command_lines (struct command_line **arg);
+
/* Exported to gdb/infrun.c */
extern void execute_user_command (struct cmd_list_element *c, char *args);
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 64a0d7353a2..62fe36f360b 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -18,7 +18,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include <readline/tilde.h>
+#include "readline/tilde.h"
#include "value.h"
#include <ctype.h>
#include "gdb_string.h"
diff --git a/gdb/config/alpha/alpha-linux.mh b/gdb/config/alpha/alpha-linux.mh
index d3731795020..418bc419f8a 100644
--- a/gdb/config/alpha/alpha-linux.mh
+++ b/gdb/config/alpha/alpha-linux.mh
@@ -7,9 +7,6 @@ NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o linux-proc.o \
LOADLIBES = -ldl -rdynamic
-MMALLOC =
-MMALLOC_CFLAGS = -DNO_MMALLOC
-
# doublest.c currently assumes some properties of FP arithmetic
# on the host which require this.
MH_CFLAGS = -mieee
diff --git a/gdb/config/alpha/fbsd.mt b/gdb/config/alpha/fbsd.mt
index 24d2fd80b84..b126c682292 100644
--- a/gdb/config/alpha/fbsd.mt
+++ b/gdb/config/alpha/fbsd.mt
@@ -1,3 +1,3 @@
-# Target: FreeBSD/Alpha
+# Target: FreeBSD/alpha
TDEPFILES= alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o alphafbsd-tdep.o
-TM_FILE= tm-fbsd.h
+TM_FILE= tm-alpha.h
diff --git a/gdb/config/alpha/nm-fbsd.h b/gdb/config/alpha/nm-fbsd.h
index 2b3975a76f8..5eec1853f33 100644
--- a/gdb/config/alpha/nm-fbsd.h
+++ b/gdb/config/alpha/nm-fbsd.h
@@ -1,5 +1,6 @@
/* Native-dependent definitions for FreeBSD/Alpha.
- Copyright 1986, 1987, 1989, 1992, 1996, 2000
+
+ Copyright 1986, 1987, 1989, 1992, 1996, 2000, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,14 +23,8 @@
#ifndef NM_FBSD_H
#define NM_FBSD_H
-/* Type of the third argument to the `ptrace' system call. */
-#define PTRACE_ARG3_TYPE caddr_t
-
-/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
-#define FETCH_INFERIOR_REGISTERS
-
-/* We can attach and detach. */
-#define ATTACH_DETACH
+/* Get generic BSD native definitions. */
+#include "config/nm-bsd.h"
/* The Alpha does not step over a breakpoint. */
#define CANNOT_STEP_BREAKPOINT 1
diff --git a/gdb/config/alpha/nm-osf.h b/gdb/config/alpha/nm-osf.h
index 73006fe5bdd..326bb3005ca 100644
--- a/gdb/config/alpha/nm-osf.h
+++ b/gdb/config/alpha/nm-osf.h
@@ -1,5 +1,7 @@
/* Native definitions for alpha running OSF/1.
- Copyright 1993, 1994, 1995, 1998, 2000 Free Software Foundation, Inc.
+
+ Copyright 1993, 1994, 1995, 1998, 2000, 2004 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -18,6 +20,11 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/* Number of traps that happen between exec'ing the shell
+ to run an inferior, and when we finally get to
+ the inferior code. This is 2 on most implementations. */
+#define START_INFERIOR_TRAPS_EXPECTED 3
+
/* ptrace register ``addresses'' are absolute. */
#define U_REGS_OFFSET 0
diff --git a/gdb/config/alpha/nm-osf2.h b/gdb/config/alpha/nm-osf2.h
index 4b225af237f..1f3932df59b 100644
--- a/gdb/config/alpha/nm-osf2.h
+++ b/gdb/config/alpha/nm-osf2.h
@@ -25,9 +25,6 @@
#define USE_PROC_FS
#define HAVE_OPTIONAL_PROC_FS
-/* OSF/1 doesn't provide the standard fault definitions, so don't use them. */
-#define FAULTED_USE_SIGINFO
-
/* Don't trace faults under OSF/1, rely on the posting of the appropriate
signal if fault tracing is disabled.
Tracing T_IFAULT under Alpha OSF/1 causes a `floating point enable'
diff --git a/gdb/config/alpha/tm-alpha.h b/gdb/config/alpha/tm-alpha.h
index 1b93e76b799..0b7878c58a0 100644
--- a/gdb/config/alpha/tm-alpha.h
+++ b/gdb/config/alpha/tm-alpha.h
@@ -1,7 +1,7 @@
/* Definitions to make GDB run on an Alpha box under OSF1. This is
also used by the Alpha/Netware and Alpha GNU/Linux targets.
- Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002 Free
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2004 Free
Software Foundation, Inc.
This file is part of GDB.
@@ -31,11 +31,6 @@
struct frame_info;
struct symbol;
-/* Number of traps that happen between exec'ing the shell
- to run an inferior, and when we finally get to
- the inferior code. This is 2 on most implementations. */
-#define START_INFERIOR_TRAPS_EXPECTED 3
-
/* Special symbol found in blocks associated with routines. We can hang
alpha_extra_func_info_t's off of this. */
diff --git a/gdb/config/alpha/tm-alphalinux.h b/gdb/config/alpha/tm-alphalinux.h
index 30ae4f756f3..ca1c0f889a8 100644
--- a/gdb/config/alpha/tm-alphalinux.h
+++ b/gdb/config/alpha/tm-alphalinux.h
@@ -2,8 +2,8 @@
definitions here are used when the _target_ system is running
GNU/Linux.
- Copyright 1996, 1998, 1999, 2000, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1996, 1998, 1999, 2000, 2002, 2003, 2004 Free Software
+ Foundation, Inc.
This file is part of GDB.
@@ -27,12 +27,6 @@
#include "alpha/tm-alpha.h"
-/* Number of traps that happen between exec'ing the shell to run an
- inferior, and when we finally get to the inferior code. This is 2
- on GNU/Linux and most implementations. */
-#undef START_INFERIOR_TRAPS_EXPECTED
-#define START_INFERIOR_TRAPS_EXPECTED 2
-
#include "config/tm-linux.h"
#endif /* TM_LINUXALPHA_H */
diff --git a/gdb/config/alpha/tm-nbsd.h b/gdb/config/alpha/tm-nbsd.h
index 90a75a78fd6..aaad48ce508 100644
--- a/gdb/config/alpha/tm-nbsd.h
+++ b/gdb/config/alpha/tm-nbsd.h
@@ -1,5 +1,6 @@
/* Target-dependent definitions for NetBSD/Alpha.
- Copyright 2002 Free Software Foundation, Inc.
+
+ Copyright 2002, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -24,10 +25,4 @@
#include "alpha/tm-alpha.h"
#include "solib.h"
-/* Number of traps that happen between exec'ing the shell to run an
- inferior, and when we finally get to the inferior code. The
- default is right for NetBSD. */
-
-#undef START_INFERIOR_TRAPS_EXPECTED
-
#endif /* TM_NBSD_H */
diff --git a/gdb/config/arm/linux.mt b/gdb/config/arm/linux.mt
index c17b2e5ec53..cd6f01059fb 100644
--- a/gdb/config/arm/linux.mt
+++ b/gdb/config/arm/linux.mt
@@ -1,3 +1,3 @@
# Target: ARM based machine running GNU/Linux
TM_FILE= tm-linux.h
-TDEPFILES= arm-tdep.o arm-linux-tdep.o solib.o solib-svr4.o solib-legacy.o
+TDEPFILES= arm-tdep.o arm-linux-tdep.o glibc-tdep.o solib.o solib-svr4.o solib-legacy.o
diff --git a/gdb/config/arm/nbsd.mt b/gdb/config/arm/nbsd.mt
index 94971369506..1e7d4fa3e61 100644
--- a/gdb/config/arm/nbsd.mt
+++ b/gdb/config/arm/nbsd.mt
@@ -1,2 +1,3 @@
# Target: ARM running NetBSD
TDEPFILES= arm-tdep.o armnbsd-tdep.o solib.o solib-svr4.o nbsd-tdep.o
+TM_FILE=tm-nbsd.h
diff --git a/gdb/config/arm/tm-embed.h b/gdb/config/arm/tm-embed.h
index 5990311e4a6..7ad6b688e0b 100644
--- a/gdb/config/arm/tm-embed.h
+++ b/gdb/config/arm/tm-embed.h
@@ -46,7 +46,7 @@
extern int arm_in_call_stub (CORE_ADDR pc, char *name);
extern CORE_ADDR arm_skip_stub (CORE_ADDR pc);
-#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) 0
+#undef DEPRECATED_IN_SIGTRAMP
+#define DEPRECATED_IN_SIGTRAMP(pc, name) 0
#endif /* TM_ARMEMBED_H */
diff --git a/gdb/config/arm/tm-linux.h b/gdb/config/arm/tm-linux.h
index 995ba7312fb..9ae6e9f8e99 100644
--- a/gdb/config/arm/tm-linux.h
+++ b/gdb/config/arm/tm-linux.h
@@ -26,9 +26,6 @@
#include "config/tm-linux.h"
-/* Offset to saved PC in sigcontext structure, from <asm/sigcontext.h> */
-#define SIGCONTEXT_PC_OFFSET (sizeof(unsigned long) * 18)
-
/* We've multi-arched this. */
#undef IN_SOLIB_CALL_TRAMPOLINE
@@ -44,14 +41,6 @@
need to skip over the dynamic linker call. This function decides
when to skip, and where to skip to. See the comments for
SKIP_SOLIB_RESOLVER at the top of infrun.c. */
-extern CORE_ADDR arm_linux_skip_solib_resolver (CORE_ADDR pc);
-#define SKIP_SOLIB_RESOLVER arm_linux_skip_solib_resolver
-
-/* When we call a function in a shared library, and the PLT sends us
- into the dynamic linker to find the function's real address, we
- need to skip over the dynamic linker call. This function decides
- when to skip, and where to skip to. See the comments for
- SKIP_SOLIB_RESOLVER at the top of infrun.c. */
#if 0
#undef IN_SOLIB_DYNSYM_RESOLVE_CODE
extern CORE_ADDR arm_in_solib_dynsym_resolve_code (CORE_ADDR pc, char *name);
@@ -68,7 +57,7 @@ extern CORE_ADDR in_svr4_dynsym_resolve_code (CORE_ADDR pc, char *name);
through calls to signal handlers. */
int arm_linux_in_sigtramp (CORE_ADDR pc, char *name);
-#define IN_SIGTRAMP(pc, name) arm_linux_in_sigtramp (pc, name)
+#define DEPRECATED_IN_SIGTRAMP(pc, name) arm_linux_in_sigtramp (pc, name)
/* Each OS has different mechanisms for accessing the various
registers stored in the sigcontext structure. These definitions
diff --git a/gdb/config/mips/xm-linux.h b/gdb/config/arm/tm-nbsd.h
index 4db6201bc7d..97bca68bc18 100644
--- a/gdb/config/mips/xm-linux.h
+++ b/gdb/config/arm/tm-nbsd.h
@@ -1,6 +1,5 @@
-/* Host definitions for GNU/Linux on MIPS.
-
- Copyright 2001, 2002 Free Software Foundation, Inc.
+/* Macro definitions for ARM running under NetBSD.
+ Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,7 +18,9 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef XM_MIPSLINUX_H
-#define XM_MIPSLINUX_H
+#ifndef TM_NBSD_H
+#define TM_NBSD_H
+
+#include "solib.h"
-#endif /* XM_MIPSLINUX_H */
+#endif /* TM_NBSD_H */
diff --git a/gdb/config/d10v/d10v.mt b/gdb/config/d10v/d10v.mt
index 72680e22dfb..805ce7658a6 100644
--- a/gdb/config/d10v/d10v.mt
+++ b/gdb/config/d10v/d10v.mt
@@ -1,4 +1,4 @@
-# Target: Mitsubishi D10V processor
+# Target: Renesas D10V processor
TDEPFILES= d10v-tdep.o
SIM_OBS= remote-sim.o
SIM= ../sim/d10v/libsim.a
diff --git a/gdb/config/djgpp/config.sed b/gdb/config/djgpp/config.sed
index 7cc9d3f3e48..4313bfb0c0c 100644
--- a/gdb/config/djgpp/config.sed
+++ b/gdb/config/djgpp/config.sed
@@ -3,7 +3,7 @@ s|gdb\.c++|gdb.cxx|g
/ac_rel_source/s|ln -s|cp -p|
s|\.gdbinit|gdb.ini|g
-/ac_given_INSTALL=/,/^CEOF/ {
+/^ac_given_INSTALL=/,/^CEOF/ {
/^s%@prefix@%/a\
s,\\([yp*]\\)\\.tab,\\1_tab,g\
/^ @rm -f/s,\\$@-\\[0-9\\]\\[0-9\\],& *.i[1-9] *.i[1-9][0-9],\
@@ -12,19 +12,27 @@ s|\.gdbinit|gdb.ini|g
s,\\.info\\*,.inf* *.i[1-9] *.i[1-9][0-9],\
s,\\.gdbinit,gdb.ini,g\
/TEXINPUTS=/s,:,';',g\
- /VPATH *=/s,\\([^A-z]\\):,\1;,g\
+ /VPATH *=/s,\\([^A-z]\\):,\\1;,g\
/\\$\\$file-\\[0-9\\]/s,echo,& *.i[1-9] *.i[1-9][0-9],\
/\\$\\$file-\\[0-9\\]/s,rm -f \\$\\$file,& \\${PACKAGE}.i[1-9] \\${PACKAGE}.i[1-9][0-9],\
s,config\\.h\\.in,config.h-in,g\
s,po2tbl\\.sed\\.in,po2tblsed.in,g
+
+}
+
+/^ac_given_srcdir=/,/^CEOF/ {
+ /^s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%/a\
+ /@test ! -f /s,\\(.\\)\$, export am_cv_exeext=.exe; export lt_cv_sys_max_cmd_len=12288; \\1,
+
}
/^CONFIG_FILES=/,/^EOF/ {
- s|po/Makefile.in\([^-:]\)|po/Makefile.in:po/Makefile.in-in\1|
+ s|po/Makefile.in\([^-:a-z]\)|po/Makefile.in:po/Makefile.in-in\1|
}
-/^ *CONFIG_HEADERS=/,/^EOF/ {
- s|config.h\([^-:]\)|config.h:config.h-in\1|
+/^ *# *Handling of arguments/,/^done/ {
+ s| config.h"| config.h:config.h-in"|
+ s|config.h\([^-:"a-z]\)|config.h:config.h-in\1|
}
/^[ ]*\/\*)/s,/\*,/*|[A-z]:/*,
@@ -32,3 +40,4 @@ s|\.gdbinit|gdb.ini|g
/\$]\*) ac_rel_source=/s,\[/\$\]\*,&|[A-z]:/*,
/ac_file_inputs=/s,\( -e "s%\^%\$ac_given_srcdir/%"\)\( -e "s%:% $ac_given_srcdir/%g"\),\2\1,
/^[ ]*if test "x`echo /s,sed 's@/,sed -e 's@^[A-z]:@@' -e 's@/,
+/^ *ac_config_headers=/s, config.h", config.h:config.h-in",
diff --git a/gdb/config/djgpp/djconfig.sh b/gdb/config/djgpp/djconfig.sh
index 23be0d5fdad..c79dbfb4e13 100644
--- a/gdb/config/djgpp/djconfig.sh
+++ b/gdb/config/djgpp/djconfig.sh
@@ -5,7 +5,7 @@
# configuring other GNU programs for DJGPP.
#
#=====================================================================
-# Copyright 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1997,1999,2000,2001,2002,2003 Free Software Foundation, Inc.
#
# Originally written by Robert Hoehne, revised by Eli Zaretskii.
# This file is part of GDB.
@@ -52,9 +52,21 @@ fi
# Make sure they don't have some file names mangled by untarring.
echo -n "Checking the unpacked distribution..."
if ( ! test -f ${srcdir}/intl/po2tblsed.in || \
- ! test -d ${srcdir}/gdb/testsuite/gdb.cxx || \
+ ! test -f ${srcdir}/gdb/ChangeLog.002 || \
! test -f ${srcdir}/readline/config.h-in ) ; then
+ if ( ! test -f ${srcdir}/intl/po2tblsed.in ) ; then
+ notfound=${srcdir}/intl/po2tblsed.in
+ else
+ if ( ! test -d ${srcdir}/gdb/testsuite/cxx) ; then
+ notfound=${srcdir}/gdb/ChangeLog.002
+ else
+ if ( ! test -f ${srcdir}/readline/config.h-in ) ; then
+ notfound=${srcdir}/readline/config.h-in
+ fi
+ fi
+ fi
echo " FAILED."
+ echo "(File $notfound was not found.)"
echo ""
echo "You MUST unpack the sources with the DJTAR command, like this:"
echo ""
@@ -62,6 +74,7 @@ if ( ! test -f ${srcdir}/intl/po2tblsed.in || \
echo ""
echo "where X.YZ is the GDB version, and fnchange.lst can be found"
echo "in the gdb/config/djgpp/ directory in the GDB distribution."
+ echo ""
echo "configure FAILED!"
exit 1
else
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index 9c2fac78cc5..1d9e3936eee 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -1,8 +1,11 @@
-@V@/bfd/ChangeLog-0001 @V@/bfd/ChangeLog.0001
+@V@/COPYING.LIBGLOSS @V@/COPYING.GLOSS
@V@/bfd/ChangeLog-9193 @V@/bfd/ChangeLog.9193
@V@/bfd/ChangeLog-9495 @V@/bfd/ChangeLog.9495
@V@/bfd/ChangeLog-9697 @V@/bfd/ChangeLog.9697
@V@/bfd/ChangeLog-9899 @V@/bfd/ChangeLog.9899
+@V@/bfd/ChangeLog-0001 @V@/bfd/ChangeLog.0001
+@V@/bfd/ChangeLog-0203 @V@/bfd/ChangeLog.0203
+@V@/bfd/doc/ChangeLog-9103 @V@/bfd/ChangeLog.9103
@V@/bfd/coff-tic30.c @V@/bfd/cofftic30.c
@V@/bfd/coff-tic4x.c @V@/bfd/cofftic40.c
@V@/bfd/coff-tic54x.c @V@/bfd/cofftic54x.c
@@ -16,23 +19,15 @@
@V@/bfd/elf32-frv.c @V@/bfd/elf32fv.c
@V@/bfd/elf32-i370.c @V@/bfd/e32i370.c
@V@/bfd/elf32-i386.c @V@/bfd/e32i86.c
-@V@/bfd/elf32-i386qnx.c @V@/bfd/e32i86q.c
@V@/bfd/elf32-m68hc11.c @V@/bfd/em68hc11.c
@V@/bfd/elf32-m68hc12.c @V@/bfd/em68hc12.c
+@V@/bfd/elf32-m68hc1x.c @V@/bfd/em68hc1x.c
@V@/bfd/elf32-m68k.c @V@/bfd/em68k.c
@V@/bfd/elf32-ppc.c @V@/bfd/e32ppc.c
-@V@/bfd/elf32-ppcqnx.c @V@/bfd/e32ppcq.c
@V@/bfd/elf32-sh.c @V@/bfd/e32sh.c
-@V@/bfd/elf32-shqnx.c @V@/bfd/e32shq.c
-@V@/bfd/elf32-sh-lin.c @V@/bfd/e32shlin.c
-@V@/bfd/elf32-sh-nbsd.c @V@/bfd/e32shn.c
@V@/bfd/elf32-sh64.c @V@/bfd/e32sh64.c
-@V@/bfd/elf32-sh64-nbsd.c @V@/bfd/e32sh64n.c
@V@/bfd/elf64-alpha.c @V@/bfd/e64alphf.c
-@V@/bfd/elf64-alpha-fbsd.c @V@/bfd/e64alph.c
@V@/bfd/elf64-sh64.c @V@/bfd/e64sh64.c
-@V@/bfd/elf64-sh64-nbsd.c @V@/bfd/e64sh64n.c
-@V@/bfd/po/.cvsignore @V@/bfd/po/_cvsignore
@V@/dejagnu/baseboards/mn10200-cygmon.exp @V@/dejagnu/baseboards/mn10200cygmon.exp
@V@/dejagnu/baseboards/mn10200-sim.exp @V@/dejagnu/baseboards/mn10200sim.exp
@V@/dejagnu/baseboards/mn10300-cygmon.exp @V@/dejagnu/baseboards/mn10300cygmon.exp
@@ -44,7 +39,6 @@
@V@/dejagnu/baseboards/sparclite-sim-le.exp @V@/dejagnu/baseboards/sl-sim-le.exp
@V@/dejagnu/baseboards/sparclite-sim.exp @V@/dejagnu/baseboards/sl-sim.exp
@V@/dejagnu/contrib/test-g++ @V@/dejagnu/contrib/test-gxx
-@V@/dejagnu/doc/.cvsignore @V@/dejagnu/doc/_cvsignore
@V@/dejagnu/example/calc/calc.h.in @V@/dejagnu/example/calc/calc.h-in
@V@/expect/Dbg_cf.h.in @V@/expect/Dbg_cf.h-in
@V@/expect/example/beer.exp.out @V@/expect/example/beer_exp.out
@@ -68,13 +62,17 @@
@V@/gdb/ChangeLog-2000 @V@/gdb/ChangeLog.000
@V@/gdb/ChangeLog-2001 @V@/gdb/ChangeLog.001
@V@/gdb/ChangeLog-2002 @V@/gdb/ChangeLog.002
+@V@/gdb/ChangeLog-2003 @V@/gdb/ChangeLog.003
@V@/gdb/ChangeLog-3.x @V@/gdb/ChangeLog.3-x
@V@/gdb/ada-exp.tab.c @V@/gdb/ada-exp_tab.c
-@V@/gdb/amd64fbsd-tdep.c @V@/gdb/a64fb-tdep.c
@V@/gdb/amd64fbsd-nat.c @V@/gdb/a64fb-nat.c
+@V@/gdb/amd64fbsd-tdep.c @V@/gdb/a64fb-tdep.c
+@V@/gdb/amd64nbsd-nat.c @V@/gdb/a64nb-nat.c
+@V@/gdb/amd64nbsd-tdep.c @V@/gdb/a64nb-tdep.c
+@V@/gdb/amd64obsd-nat.c @V@/gdb/a64ob-nat.c
+@V@/gdb/amd64obsd-tdep.c @V@/gdb/a64ob-tdep.c
@V@/gdb/alphabsd-nat.c @V@/gdb/alphb-nat.c
@V@/gdb/alphabsd-tdep.c @V@/gdb/alphb-tdep.c
-@V@/gdb/alphanbsd-nat.c @V@/gdb/alphnb-nat.c
@V@/gdb/alphanbsd-tdep.c @V@/gdb/alphnb-tdep.c
@V@/gdb/arm-linux-nat.c @V@/gdb/armlin-nat.c
@V@/gdb/arm-linux-tdep.c @V@/gdb/armlin-tdep.c
@@ -86,66 +84,59 @@
@V@/gdb/config/alpha/alpha-osf3.mh @V@/gdb/config/alpha/alphosf3.mh
@V@/gdb/config/alpha/tm-alphalinux.h @V@/gdb/config/alpha/tm-alplinux.h
@V@/gdb/config/alpha/xm-alphalinux.h @V@/gdb/config/alpha/xm-alplinux.h
+@V@/gdb/config/alpha/xm-alphaosf.h @V@/gdb/config/alpha/xm-alposf.h
+@V@/gdb/config/i386/nm-linux64.h @V@/gdb/config/i386/nm-lx64.h
+@V@/gdb/config/i386/tm-linux64.h @V@/gdb/config/i386/tm-lx64.h
@V@/gdb/config/i386/nm-i386sco4.h @V@/gdb/config/i386/nm-sco4.h
@V@/gdb/config/i386/nm-i386sco5.h @V@/gdb/config/i386/nm-sco5.h
@V@/gdb/config/i386/nm-i386sol2.h @V@/gdb/config/i386/nm-sol2.h
@V@/gdb/config/i386/nm-i386v4.h @V@/gdb/config/i386/nm-v4.h
@V@/gdb/config/i386/nm-i386v42mp.h @V@/gdb/config/i386/nm-v42mp.h
-@V@/gdb/config/i386/tm-i386mk.h @V@/gdb/config/i386/tm-mk.h
@V@/gdb/config/i386/tm-i386sol2.h @V@/gdb/config/i386/tm-sol2.h
-@V@/gdb/config/i386/tm-i386v42mp.h @V@/gdb/config/i386/tm-v42mp.h
-@V@/gdb/config/i386/xm-i386mach.h @V@/gdb/config/i386/xm-mach.h
-@V@/gdb/config/i386/xm-i386mk.h @V@/gdb/config/i386/xm-mk.h
-@V@/gdb/config/i386/xm-i386v32.h @V@/gdb/config/i386/xm-v32.h
@V@/gdb/config/i386/xm-i386v4.h @V@/gdb/config/i386/xm-v4.h
-@V@/gdb/config/m68k/apollo68v.mh @V@/gdb/config/m68k/apollo-v.mh
-@V@/gdb/config/m68k/nm-apollo68v.h @V@/gdb/config/m68k/nm-apolv.h
-@V@/gdb/config/m68k/xm-apollo68v.h @V@/gdb/config/m68k/xm-apolv.h
-@V@/gdb/config/m88k/tm-delta88v4.h @V@/gdb/config/m88k/tm-d88v4.h
@V@/gdb/config/m88k/xm-delta88v4.h @V@/gdb/config/m88k/xm-d88v4.h
-@V@/gdb/config/mips/tm-bigmips64.h @V@/gdb/config/mips/tm-bigm64.h
-@V@/gdb/config/mips/tm-embed64.h @V@/gdb/config/mips/tm-emb64.h
-@V@/gdb/config/mips/tm-embedl.h @V@/gdb/config/mips/tm-embdl.h
-@V@/gdb/config/mips/tm-embedl64.h @V@/gdb/config/mips/tm-embl64.h
@V@/gdb/config/mips/tm-linux.h @V@/gdb/config/mips/tm-lx.h
-@V@/gdb/config/mips/tm-linux64.h @V@/gdb/config/mips/tm-lx64.h
-@V@/gdb/config/mips/tm-vr4300el.h @V@/gdb/config/mips/tm-v43el.h
-@V@/gdb/config/mips/tm-vr4xxxel.h @V@/gdb/config/mips/tm-v4xel.h
-@V@/gdb/config/mips/tm-vr5000el.h @V@/gdb/config/mips/tm-vr5kel.h
@V@/gdb/config/pa/nm-hppah11.h @V@/gdb/config/pa/nm-hppa11.h
-@V@/gdb/config/powerpc/tm-ppcle-sim.h @V@/gdb/config/powerpc/tm-ppcl-sim.h
+@V@/gdb/config/powerpc/tm-ppcle-sim.h @V@/gdb/config/powerpc/tm-ppclsim.h
+@V@/gdb/config/powerpc/tm-ppcle-eabi.h @V@/gdb/config/powerpc/tm-ppcleabi.h
@V@/gdb/config/rs6000/nm-rs6000ly.h @V@/gdb/config/rs6000/nm-rs6kly.h
@V@/gdb/config/rs6000/tm-rs6000.h @V@/gdb/config/rs6000/tm-rs6k.h
@V@/gdb/config/rs6000/tm-rs6000ly.h @V@/gdb/config/rs6000/tm-rs6kly.h
-@V@/gdb/config/sparc/tm-sparclet.h @V@/gdb/config/sparc/tm-splet.h
-@V@/gdb/config/sparc/tm-sparclite.h @V@/gdb/config/sparc/tm-splite.h
+@V@/gdb/config/rs6000/tm-rs6000-aix4.h @V@/gdb/config/rs6000/tm-rs6kaix4.h
@V@/gdb/config/sparc/tm-sparclynx.h @V@/gdb/config/sparc/tm-splynx.h
@V@/gdb/config/vax/xm-vaxult2.h @V@/gdb/config/vax/xm-vaxut2.h
@V@/gdb/f-exp.tab.c @V@/gdb/f-exp_tab.c
+@V@/gdb/gdbtk/ChangeLog-2001 @V@/gdb/gdbtk/ChangeLog.001
+@V@/gdb/gdbtk/ChangeLog-2002 @V@/gdb/gdbtk/ChangeLog.002
+@V@/gdb/gdbtk/ChangeLog-2003 @V@/gdb/gdbtk/ChangeLog.003
@V@/gdb/gdbtk/generic/ChangeLog-1997 @V@/gdb/gdbtk/generic/ChangeLog.97
@V@/gdb/gdbtk/generic/ChangeLog-1998 @V@/gdb/gdbtk/generic/ChangeLog.98
@V@/gdb/gdbtk/generic/ChangeLog-1999 @V@/gdb/gdbtk/generic/ChangeLog.99
@V@/gdb/gdbtk/generic/ChangeLog-2000 @V@/gdb/gdbtk/generic/ChangeLog.000
-@V@/gdb/gdbtk/generic/ChangeLog-2001 @V@/gdb/gdbtk/generic/ChangeLog.001
@V@/gdb/gdbtk/generic/gdbtk-varobj.c @V@/gdb/gdbtk/generic/gdbtk-vobj.c
@V@/gdb/gdbtk/library/ChangeLog-1997 @V@/gdb/gdbtk/library/ChangeLog.97
@V@/gdb/gdbtk/library/ChangeLog-1998 @V@/gdb/gdbtk/library/ChangeLog.98
@V@/gdb/gdbtk/library/ChangeLog-1999 @V@/gdb/gdbtk/library/ChangeLog.99
@V@/gdb/gdbtk/library/ChangeLog-2000 @V@/gdb/gdbtk/library/ChangeLog.000
-@V@/gdb/gdbtk/library/ChangeLog-2001 @V@/gdb/gdbtk/library/ChangeLog.001
+@V@/gdb/gdbtk/plugins/intel-pentium/intel-pentium.tcl.in @V@/gdb/gdbtk/plugins/intel-pentium/intel-pentium.t-in
+@V@/gdb/gdbtk/plugins/rhabout/rhabout.tcl.in @V@/gdb/gdbtk/plugins/rhabout/rhabout.t-in
@V@/gdb/i386-interix-nat.c @V@/gdb/i386ix-nat.c
@V@/gdb/i386-interix-tdep.c @V@/gdb/i386ix-tdep.c
-@V@/gdb/i386-linux-tdep.c @V@/gdb/i386linux-tdep.c
+@V@/gdb/i386-linux-tdep.c @V@/gdb/i386lx-tdep.c
+@V@/gdb/i386-linux-nat.c @V@/gdb/i386lx-nat.c
@V@/gdb/i386bsd-nat.c @V@/gdb/i3bsd-nat.c
@V@/gdb/i386bsd-tdep.c @V@/gdb/i3bsd-tdep.c
+@V@/gdb/i386fbsd-nat.c @V@/gdb/i3fbsd-nat.c
+@V@/gdb/i386fbsd-tdep.c @V@/gdb/i3fbsd-tdep.c
@V@/gdb/i386gnu-nat.c @V@/gdb/i3gnu-nat.c
@V@/gdb/i386gnu-tdep.c @V@/gdb/i3gnu-tdep.c
-@V@/gdb/i386nbsd-nat.c @V@/gdb/i3nbsd-nat.c
@V@/gdb/i386nbsd-tdep.c @V@/gdb/i3nbsd-tdep.c
@V@/gdb/i386obsd-nat.c @V@/gdb/i3obsd-nat.c
@V@/gdb/i386obsd-tdep.c @V@/gdb/i3obsd-tdep.c
-@V@/gdb/ia64-aix-nat.c @V@/gdb/ia64aix-nat.c
-@V@/gdb/ia64-linux-nat.c @V@/gdb/ia64linux-nat.c
+@V@/gdb/ia64-aix-nat.c @V@/gdb/ia64ax-nat.c
+@V@/gdb/ia64-aix-tdep.c @V@/gdb/ia64ax-tdep.c
+@V@/gdb/ia64-linux-nat.c @V@/gdb/ia64lx-nat.c
+@V@/gdb/ia64-linux-nat.c @V@/gdb/ia64lx-tdep.c
@V@/gdb/jv-exp.tab.c @V@/gdb/jv-exp_tab.c
@V@/gdb/m2-exp.tab.c @V@/gdb/m2-exp_tab.c
@V@/gdb/m68klinux-nat.c @V@/gdb/m68kl-nat.c
@@ -161,34 +152,37 @@
@V@/gdb/objc-exp.tab.c @V@/gdb/objc-exp_tab.c
@V@/gdb/osf-share/cma_stack_int.h @V@/gdb/osf-share/cma_stkint.h
@V@/gdb/p-exp.tab.c @V@/gdb/p-exp_tab.c
-@V@/gdb/ppc-linux-tdep.c @V@/gdb/ppc-linx-tdep.c
+@V@/gdb/ppc-linux-tdep.c @V@/gdb/ppc-lx-tdep.c
+@V@/gdb/ppc-linux-nat.c @V@/gdb/ppc-lx-nat.c
@V@/gdb/ppcnbsd-nat.c @V@/gdb/ppcnb-nat.c
@V@/gdb/ppcnbsd-tdep.c @V@/gdb/ppcnb-tdep.c
@V@/gdb/regformats/reg-i386-linux.dat @V@/gdb/regformats/r-i386-lnx.dat
@V@/gdb/regformats/reg-s390x.dat @V@/gdb/regformats/r-s390x.dat
-@V@/gdb/remote-adapt.c @V@/gdb/rmt-adapt.c
@V@/gdb/remote-e7000.c @V@/gdb/rmt-e7000.c
-@V@/gdb/remote-eb.c @V@/gdb/rmt-eb.c
@V@/gdb/remote-est.c @V@/gdb/rmt-est.c
@V@/gdb/remote-mips.c @V@/gdb/emt-mips.c
-@V@/gdb/remote-mm.c @V@/gdb/emt-mm.c
-@V@/gdb/remote-nrom.c @V@/gdb/rmt-nrom.c
@V@/gdb/remote-rdi.c @V@/gdb/rmt-rdi.c
@V@/gdb/remote-rdp.c @V@/gdb/rmt-rdp.c
@V@/gdb/remote-sds.c @V@/gdb/rmt-sds.c
@V@/gdb/remote-sim.c @V@/gdb/rmt-sim.c
@V@/gdb/remote-st.c @V@/gdb/rmt-st.c
-@V@/gdb/remote-udi.c @V@/gdb/rmt-udi.c
@V@/gdb/remote-vx.c @V@/gdb/rmt-vx.c
-@V@/gdb/remote-vx29k.c @V@/gdb/rmt-vx29k.c
@V@/gdb/remote-vx68.c @V@/gdb/rmt-vx68.c
-@V@/gdb/remote-vx960.c @V@/gdb/rmt-vx960.c
@V@/gdb/remote-vxmips.c @V@/gdb/rmt-vxmips.c
@V@/gdb/remote-vxsparc.c @V@/gdb/rmt-vxsparc.c
-@V@/gdb/sparclet-rom.c @V@/gdb/splet-rom.c
-@V@/gdb/sparclet-stub.c @V@/gdb/splet-stub.c
+@V@/gdb/sparc64fbsd-nat.c @V@/gdb/sp64fb-nat.c
+@V@/gdb/sparc64fbsd-tdep.c @V@/gdb/sp64fb-tdep.c
+@V@/gdb/sparc64nbsd-nat.c @V@/gdb/sp64nb-nat.c
+@V@/gdb/sparc64nbsd-tdep.c @V@/gdb/sp64nb-tdep.c
+@V@/gdb/sparc64-linux-nat.c @V@/gdb/sp64lx-nat.c
+@V@/gdb/sparc64-linux-tdep.c @V@/gdb/sp64lx-tdep.c
+@V@/gdb/sparc64-nat.c @V@/gdb/sp64-nat.c
+@V@/gdb/sparc64-tdep.c @V@/gdb/sp64-tdep.c
+@V@/gdb/sparc64-sol2-tdep.c @V@/gdb/sp64s2-tdep.c
@V@/gdb/sparcnbsd-nat.c @V@/gdb/spnb-nat.c
@V@/gdb/sparcnbsd-tdep.c @V@/gdb/spnb-tdep.c
+@V@/gdb/sparc-sol2-nat.c @V@/gdb/spsol2-nat.c
+@V@/gdb/sparc-sol2-tdep.c @V@/gdb/spsol2-tdep.c
@V@/gdb/testsuite/.gdbinit @V@/gdb/testsuite/gdb.ini
@V@/gdb/testsuite/gdb.arch/altivec-abi.c @V@/gdb/testsuite/gdb.arch/av-abi.c
@V@/gdb/testsuite/gdb.arch/altivec-abi.exp @V@/gdb/testsuite/gdb.arch/av-abi.exp
@@ -197,11 +191,37 @@
@V@/gdb/testsuite/gdb.base/coremaker2.c @V@/gdb/testsuite/gdb.base/core2maker.c
@V@/gdb/testsuite/gdb.cp/m-static1.cc @V@/gdb/testsuite/gdb.cp/m-stat1.cc
@V@/gdb/testsuite/gdb.cp/namespace1.cc @V@/gdb/testsuite/gdb.cp/namesp1.cc
+@V@/gdb/testsuite/gdb.gdbtk/ChangeLog @V@/gdb/testsuite/gdb.tk/ChangeLog
+@V@/gdb/testsuite/gdb.gdbtk/Makefile.in @V@/gdb/testsuite/gdb.tk/Makefile.in
+@V@/gdb/testsuite/gdb.gdbtk/browser.exp @V@/gdb/testsuite/gdb.tk/browser.exp
+@V@/gdb/testsuite/gdb.gdbtk/browser.test @V@/gdb/testsuite/gdb.tk/browser.test
+@V@/gdb/testsuite/gdb.gdbtk/c_variable.c @V@/gdb/testsuite/gdb.tk/c_variable.c
+@V@/gdb/testsuite/gdb.gdbtk/c_variable.exp @V@/gdb/testsuite/gdb.tk/c_variable.exp
+@V@/gdb/testsuite/gdb.gdbtk/c_variable.test @V@/gdb/testsuite/gdb.tk/c_variable.test
+@V@/gdb/testsuite/gdb.gdbtk/configure @V@/gdb/testsuite/gdb.tk/configure
+@V@/gdb/testsuite/gdb.gdbtk/configure.in @V@/gdb/testsuite/gdb.tk/configure.in
+@V@/gdb/testsuite/gdb.gdbtk/console.exp @V@/gdb/testsuite/gdb.tk/console.exp
+@V@/gdb/testsuite/gdb.gdbtk/console.test @V@/gdb/testsuite/gdb.tk/console.test
+@V@/gdb/testsuite/gdb.gdbtk/cpp_variable.cc @V@/gdb/testsuite/gdb.tk/cpp_variable.cc
+@V@/gdb/testsuite/gdb.gdbtk/cpp_variable.exp @V@/gdb/testsuite/gdb.tk/cpp_variable.exp
+@V@/gdb/testsuite/gdb.gdbtk/cpp_variable.h @V@/gdb/testsuite/gdb.tk/cpp_variable.h
+@V@/gdb/testsuite/gdb.gdbtk/cpp_variable.test @V@/gdb/testsuite/gdb.tk/cpp_variable.test
+@V@/gdb/testsuite/gdb.gdbtk/defs @V@/gdb/testsuite/gdb.tk/defs
+@V@/gdb/testsuite/gdb.gdbtk/list0.c @V@/gdb/testsuite/gdb.tk/list0.c
+@V@/gdb/testsuite/gdb.gdbtk/list0.h @V@/gdb/testsuite/gdb.tk/list0.h
+@V@/gdb/testsuite/gdb.gdbtk/list1.c @V@/gdb/testsuite/gdb.tk/list1.c
+@V@/gdb/testsuite/gdb.gdbtk/README @V@/gdb/testsuite/gdb.tk/README
+@V@/gdb/testsuite/gdb.gdbtk/simple.c @V@/gdb/testsuite/gdb.tk/simple.c
+@V@/gdb/testsuite/gdb.gdbtk/srcwin.exp @V@/gdb/testsuite/gdb.tk/srcwin.exp
+@V@/gdb/testsuite/gdb.gdbtk/srcwin.test @V@/gdb/testsuite/gdb.tk/srcwin.test
+@V@/gdb/testsuite/gdb.gdbtk/srcwin2.test @V@/gdb/testsuite/gdb.tk/srcwin2.test
+@V@/gdb/testsuite/gdb.gdbtk/srcwin3.test @V@/gdb/testsuite/gdb.tk/srcwin3.test
+@V@/gdb/testsuite/gdb.gdbtk/stack1.c @V@/gdb/testsuite/gdb.tk/stack1.c
+@V@/gdb/testsuite/gdb.gdbtk/stack2.c @V@/gdb/testsuite/gdb.tk/stack2.c
+@V@/gdb/testsuite/gdb.gdbtk/windows.exp @V@/gdb/testsuite/gdb.tk/windows.exp
+@V@/gdb/testsuite/gdb.gdbtk/windows.test @V@/gdb/testsuite/gdb.tk/windows.test
@V@/gdb/testsuite/gdb.mi/mi-var-cmd.exp @V@/gdb/testsuite/gdb.mi/mi-varcmd.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-block.exp @V@/gdb/testsuite/gdb.mi/mi0varblock.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-child.exp @V@/gdb/testsuite/gdb.mi/mi0varchild.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-cmd.exp @V@/gdb/testsuite/gdb.mi/mi0varcmd.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-display.exp @V@/gdb/testsuite/gdb.mi/mi0vardisplay.exp
+@V@/gdb/testsuite/gdb.mi/mi-var-child.exp @V@/gdb/testsuite/gdb.mi/mi-varchild.exp
@V@/gdb/testsuite/gdb.mi/mi1-var-block.exp @V@/gdb/testsuite/gdb.mi/mi1varblock.exp
@V@/gdb/testsuite/gdb.mi/mi1-var-child.exp @V@/gdb/testsuite/gdb.mi/mi1varchild.exp
@V@/gdb/testsuite/gdb.mi/mi1-var-cmd.exp @V@/gdb/testsuite/gdb.mi/mi1varcmd.exp
@@ -210,10 +230,12 @@
@V@/gdb/testsuite/gdb.mi/mi2-var-child.exp @V@/gdb/testsuite/gdb.mi/mi2varchild.exp
@V@/gdb/testsuite/gdb.mi/mi2-var-cmd.exp @V@/gdb/testsuite/gdb.mi/mi2varcmd.exp
@V@/gdb/testsuite/gdb.mi/mi2-var-display.exp @V@/gdb/testsuite/gdb.mi/mi2vardisplay.exp
-@V@/gdb/tui/tuiSourceWin.c @V@/gdb/tui/tuiWinSource.c
-@V@/gdb/tui/tuiSourceWin.h @V@/gdb/tui/tuiWinSource.h
-@V@/gdb/x86-64-linux-tdep.c @V@/gdb/x8664-ltdep.c
-@V@/gdb/x86-64-linux-nat.c @V@/gdb/x8664-lnat.c
+@V@/gdb/amd64-linux-tdep.c @V@/gdb/amd64-ltdep.c
+@V@/gdb/amd64-linux-nat.c @V@/gdb/amd64-lnat.c
+@V@/include/ChangeLog-9103 @V@/include/ChangeLog.9103
+@V@/include/coff/ChangeLog-9103 @V@/include/coff/ChangeLog.9103
+@V@/include/elf/ChangeLog-9103 @V@/include/elf/ChangeLog.9103
+@V@/include/opcode/ChangeLog-9103 @V@/include/opcode/ChangeLog.9103
@V@/include/xtensa-isa-internal.h @V@/include/xt-internal.h
@V@/include/xtensa-isa.h @V@/include/xt-isa.h
@V@/intl/intlh.inst.in @V@/intl/intlh_inst.in
@@ -223,96 +245,6 @@
@V@/itcl/itk/itkConfig.sh.in @V@/itcl/itk/itkConfig.sh-in
@V@/itcl/itk/unix/pkgIndex.tcl.in @V@/itcl/itk/unix/pkgIndex.t-in
@V@/itcl/iwidgets3.0.0 @V@/itcl/iwidgets3.0-0
-@V@/itcl/iwidgets3.0.0/demos/extfileselectionbox @V@/itcl/iwidgets3.0-0/demos/efselbox
-@V@/itcl/iwidgets3.0.0/demos/extfileselectiondialog @V@/itcl/iwidgets3.0-0/demos/efseldialog
-@V@/itcl/iwidgets3.0.0/demos/fileselectionbox @V@/itcl/iwidgets3.0-0/demos/fselectbox
-@V@/itcl/iwidgets3.0.0/demos/fileselectiondialog @V@/itcl/iwidgets3.0-0/demos/fselectdialog
-@V@/itcl/iwidgets3.0.0/demos/html/buttonbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/buttonbox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/canvasprintbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/cprintbox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/canvasprintdialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/cprintdialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/combobox.n.html @V@/itcl/iwidgets3.0-0/demos/html/combobox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/dialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/dialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/dialogshell.n.html @V@/itcl/iwidgets3.0-0/demos/html/dialogshell.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/entryfield.n.html @V@/itcl/iwidgets3.0-0/demos/html/entryfield.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/feedback.n.html @V@/itcl/iwidgets3.0-0/demos/html/feedback.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/fileselectionbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/fselectbox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/fileselectiondialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/fselectdialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/hyperhelp.n.html @V@/itcl/iwidgets3.0-0/demos/html/hyperhelp.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/iwidgets2.2.0UserCmds.html @V@/itcl/iwidgets3.0-0/demos/html/iw220UserCmds.html
-@V@/itcl/iwidgets3.0.0/demos/html/labeledwidget.n.html @V@/itcl/iwidgets3.0-0/demos/html/labeledwidget.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/menubar.n.html @V@/itcl/iwidgets3.0-0/demos/html/menubar.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/messagedialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/messagedialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/notebook.n.html @V@/itcl/iwidgets3.0-0/demos/html/notebook.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/optionmenu.n.html @V@/itcl/iwidgets3.0-0/demos/html/optionmenu.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/panedwindow.n.html @V@/itcl/iwidgets3.0-0/demos/html/panedwindow.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/promptdialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/promptdialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/pushbutton.n.html @V@/itcl/iwidgets3.0-0/demos/html/pushbutton.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/radiobox.n.html @V@/itcl/iwidgets3.0-0/demos/html/radiobox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/scrolledcanvas.n.html @V@/itcl/iwidgets3.0-0/demos/html/scrolcanvas.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/scrolledframe.n.html @V@/itcl/iwidgets3.0-0/demos/html/scrolframe.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/scrolledhtml.n.html @V@/itcl/iwidgets3.0-0/demos/html/scrolhtml.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/scrolledlistbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/scrollistbox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/scrolledtext.n.html @V@/itcl/iwidgets3.0-0/demos/html/scroltext.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/selectionbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/selectbox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/selectiondialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/selectdialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/shell.n.html @V@/itcl/iwidgets3.0-0/demos/html/shell.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/spindate.n.html @V@/itcl/iwidgets3.0-0/demos/html/spindate.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/spinint.n.html @V@/itcl/iwidgets3.0-0/demos/html/spinint.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/spinner.n.html @V@/itcl/iwidgets3.0-0/demos/html/spinner.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/spintime.n.html @V@/itcl/iwidgets3.0-0/demos/html/spintime.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/tabnotebook.n.html @V@/itcl/iwidgets3.0-0/demos/html/tabnotebook.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/tabset.n.html @V@/itcl/iwidgets3.0-0/demos/html/tabset.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/toolbar.n.html @V@/itcl/iwidgets3.0-0/demos/html/toolbar.n-html
-@V@/itcl/iwidgets3.0.0/demos/scrolledcanvas @V@/itcl/iwidgets3.0-0/demos/scrolcanvas
-@V@/itcl/iwidgets3.0.0/demos/scrolledframe @V@/itcl/iwidgets3.0-0/demos/scrolframe
-@V@/itcl/iwidgets3.0.0/demos/scrolledhtml @V@/itcl/iwidgets3.0-0/demos/scrolhtml
-@V@/itcl/iwidgets3.0.0/demos/scrolledlistbox @V@/itcl/iwidgets3.0-0/demos/scroldlistbox
-@V@/itcl/iwidgets3.0.0/demos/scrolledtext @V@/itcl/iwidgets3.0-0/demos/scroltext
-@V@/itcl/iwidgets3.0.0/demos/selectionbox @V@/itcl/iwidgets3.0-0/demos/selectbox
-@V@/itcl/iwidgets3.0.0/demos/selectiondialog @V@/itcl/iwidgets3.0-0/demos/selectdialog
-@V@/itcl/iwidgets3.0.0/doc/canvasprintbox.n @V@/itcl/iwidgets3.0-0/doc/cprintbox.n
-@V@/itcl/iwidgets3.0.0/doc/canvasprintdialog.n @V@/itcl/iwidgets3.0-0/doc/cprintdialog.n
-@V@/itcl/iwidgets3.0.0/doc/extfileselectionbox.n @V@/itcl/iwidgets3.0-0/doc/efselbox.n
-@V@/itcl/iwidgets3.0.0/doc/extfileselectiondialog.n @V@/itcl/iwidgets3.0-0/doc/efseldialog.n
-@V@/itcl/iwidgets3.0.0/doc/fileselectionbox.n @V@/itcl/iwidgets3.0-0/doc/fselectbox.n
-@V@/itcl/iwidgets3.0.0/doc/fileselectiondialog.n @V@/itcl/iwidgets3.0-0/doc/fselectdialog.n
-@V@/itcl/iwidgets3.0.0/doc/scopedobject.n.backup @V@/itcl/iwidgets3.0-0/doc/scopedobject.n-backup
-@V@/itcl/iwidgets3.0.0/doc/scrolledcanvas.n @V@/itcl/iwidgets3.0-0/doc/scrolcanvas.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledframe.n @V@/itcl/iwidgets3.0-0/doc/scrolframe.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledhtml.n @V@/itcl/iwidgets3.0-0/doc/scrolhtml.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledlistbox.n @V@/itcl/iwidgets3.0-0/doc/scrollistbox.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledtext.n @V@/itcl/iwidgets3.0-0/doc/scroltext.n
-@V@/itcl/iwidgets3.0.0/doc/selectionbox.n @V@/itcl/iwidgets3.0-0/doc/selectbox.n
-@V@/itcl/iwidgets3.0.0/doc/selectiondialog.n @V@/itcl/iwidgets3.0-0/doc/selectdialog.n
-@V@/itcl/iwidgets3.0.0/generic/canvasprintbox.itk @V@/itcl/iwidgets3.0-0/generic/cprintbox.itk
-@V@/itcl/iwidgets3.0.0/generic/canvasprintdialog.itk @V@/itcl/iwidgets3.0-0/generic/cprintdialog.itk
-@V@/itcl/iwidgets3.0.0/generic/extfileselectionbox.itk @V@/itcl/iwidgets3.0-0/generic/efselbox.itk
-@V@/itcl/iwidgets3.0.0/generic/extfileselectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/efseldialog.itk
-@V@/itcl/iwidgets3.0.0/generic/fileselectionbox.itk @V@/itcl/iwidgets3.0-0/generic/fselectbox.itk
-@V@/itcl/iwidgets3.0.0/generic/fileselectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/fselectdialog.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledcanvas.itk @V@/itcl/iwidgets3.0-0/generic/scrolcanvas.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledframe.itk @V@/itcl/iwidgets3.0-0/generic/scrolframe.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledhtml.itk @V@/itcl/iwidgets3.0-0/generic/scrolhtml.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledlistbox.itk @V@/itcl/iwidgets3.0-0/generic/scrollistbox.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledtext.itk @V@/itcl/iwidgets3.0-0/generic/scroltext.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledwidget.itk @V@/itcl/iwidgets3.0-0/generic/scrolwidget.itk
-@V@/itcl/iwidgets3.0.0/generic/selectionbox.itk @V@/itcl/iwidgets3.0-0/generic/selectbox.itk
-@V@/itcl/iwidgets3.0.0/generic/selectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/selectdialog.itk
-@V@/itcl/iwidgets3.0.0/tests/canvasprintbox.test @V@/itcl/iwidgets3.0-0/tests/cprintbox.test
-@V@/itcl/iwidgets3.0.0/tests/canvasprintdialog.test @V@/itcl/iwidgets3.0-0/tests/cprintdialog.test
-@V@/itcl/iwidgets3.0.0/tests/extfileselectionbox.test @V@/itcl/iwidgets3.0-0/tests/efselbox.test
-@V@/itcl/iwidgets3.0.0/tests/extfileselectiondialog.test @V@/itcl/iwidgets3.0-0/tests/efseldialog.test
-@V@/itcl/iwidgets3.0.0/tests/fileselectionbox.test @V@/itcl/iwidgets3.0-0/tests/fselectbox.test
-@V@/itcl/iwidgets3.0.0/tests/fileselectiondialog.test @V@/itcl/iwidgets3.0-0/tests/fselectdialog.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledcanvas.test @V@/itcl/iwidgets3.0-0/tests/scrolcanvas.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledframe.test @V@/itcl/iwidgets3.0-0/tests/scrolframe.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledhtml.test @V@/itcl/iwidgets3.0-0/tests/scrolhtml.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledlistbox.test @V@/itcl/iwidgets3.0-0/tests/scrollistbox.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledtext.test @V@/itcl/iwidgets3.0-0/tests/scroltext.test
-@V@/itcl/iwidgets3.0.0/tests/selectionbox.test @V@/itcl/iwidgets3.0-0/tests/selectbox.test
-@V@/itcl/iwidgets3.0.0/tests/selectiondialog.test @V@/itcl/iwidgets3.0-0/tests/selectdialog.test
-@V@/itcl/iwidgets3.0.0/unix/iwidgets.tcl.in @V@/itcl/iwidgets3.0-0/unix/iwidgets.t-in
-@V@/itcl/iwidgets3.0.0/unix/pkgIndex.tcl.in @V@/itcl/iwidgets3.0-0/unix/pkgIndex.t-in
@V@/libgui/config.h.in @V@/libgui/config.h-in
@V@/libgui/src/tkTableCell.c @V@/libgui/src/tkTabCell.c
@V@/libgui/src/tkTableCmd.c @V@/libgui/src/tkTabCmd.c
@@ -320,6 +252,8 @@
@V@/libgui/src/tkWinPrintText.c @V@/libgui/src/tkWPrtText.c
@V@/opcodes/ChangeLog-9297 @V@/opcodes/ChangeLog.9297
@V@/opcodes/ChangeLog-9899 @V@/opcodes/ChangeLog.9899
+@V@/opcodes/ChangeLog-0001 @V@/opcodes/ChangeLog.0001
+@V@/opcodes/ChangeLog-0203 @V@/opcodes/ChangeLog.0203
@V@/opcodes/ia64-opc-a.c @V@/opcodes/ia64opca.c
@V@/opcodes/ia64-opc-b.c @V@/opcodes/ia64opcb.c
@V@/opcodes/ia64-opc-d.c @V@/opcodes/ia64opcd.c
@@ -332,19 +266,21 @@
@V@/opcodes/iq2000-dis.c @V@/opcodes/iq2000dis.c
@V@/opcodes/m68hc11-dis.c @V@/opcodes/m68hc11dis.c
@V@/opcodes/m68hc11-opc.c @V@/opcodes/m68hc11opc.c
-@V@/opcodes/openris-dis.c @V@/opcodes/orisc-dis.c
@V@/opcodes/openrisc-asm.c @V@/opcodes/orisc-asm.c
@V@/opcodes/openrisc-desc.c @V@/opcodes/orisc-desc.c
+@V@/opcodes/openrisc-dis.c @V@/opcodes/orisc-dis.c
@V@/opcodes/openrisc-ibld.c @V@/opcodes/orisc-ibld.c
@V@/opcodes/openrisc-opc.c @V@/opcodes/orisc-opc.c
@V@/opcodes/openrisc-opc.h @V@/opcodes/orisc-opc.h
-@V@/opcodes/po/.cvsignore @V@/opcodes/po/_cvsignore
+@V@/opcodes/openrisc-desc.h @V@/opcodes/orisc-desc.h
@V@/readline/config.h.bot @V@/readline/config.h-bot
@V@/readline/config.h.in @V@/readline/config.h-in
@V@/sim/frv/profile-fr400.c @V@/sim/frv/fr400-profile.c
@V@/sim/frv/profile-fr400.h @V@/sim/frv/fr400-profile.h
@V@/sim/frv/profile-fr500.c @V@/sim/frv/fr500-profile.c
@V@/sim/frv/profile-fr500.h @V@/sim/frv/fr500-profile.h
+@V@/sim/frv/profile-fr550.c @V@/sim/frv/fr550-profile.c
+@V@/sim/frv/profile-fr550.h @V@/sim/frv/fr550-profile.h
@V@/sim/m68hc11/dv-m68hc11eepr.c @V@/sim/m68hc11/dv-eepr.c
@V@/sim/m68hc11/dv-m68hc11sio.c @V@/sim/m68hc11/dv-sio.c
@V@/sim/m68hc11/dv-m68hc11spi.c @V@/sim/m68hc11/dv-spi.c
@@ -364,6 +300,8 @@
@V@/sim/ppc/idecode_expression.h @V@/sim/ppc/idec_expression.h
@V@/sim/ppc/idecode_fields.h @V@/sim/ppc/idec_fields.h
@V@/sim/ppc/sim-endian-n.h @V@/sim/ppc/sim-endn.h
+@V@/sim/sh64/sem-compact-switch.c @V@/sim/sh64/sem-cswitch.c
+@V@/sim/sh64/sem-media-switch.c @V@/sim/sh64/sem-mswitch.c
@V@/sim/testsuite/d10v-elf/t-ae-ld-d.s @V@/sim/testsuite/d10v-elf/t-ld-d.s
@V@/sim/testsuite/d10v-elf/t-ae-ld-i.s @V@/sim/testsuite/d10v-elf/t-ld-i.s
@V@/sim/testsuite/d10v-elf/t-ae-ld-id.s @V@/sim/testsuite/d10v-elf/t-ld-id.s
@@ -390,6 +328,17 @@
@V@/sim/testsuite/sim/arm/misaligned1.ms @V@/sim/testsuite/sim/arm/mis1.ms
@V@/sim/testsuite/sim/arm/misaligned2.ms @V@/sim/testsuite/sim/arm/mis2.ms
@V@/sim/testsuite/sim/arm/misaligned3.ms @V@/sim/testsuite/sim/arm/mis3.ms
+@V@/sim/testsuite/sim/frv/interrupts/Ipipe-fr400.cgs @V@/sim/testsuite/sim/frv/interrupts/Ip-fr400.cgs
+@V@/sim/testsuite/sim/frv/interrupts/Ipipe-fr500.cgs @V@/sim/testsuite/sim/frv/interrupts/Ip-fr500.cgs
+@V@/sim/testsuite/sim/frv/interrupts/badalign-fr550.cgs @V@/sim/testsuite/sim/frv/interrupts/fr550-badalign.cgs
+@V@/sim/testsuite/sim/frv/interrupts/compound-fr550.cgs @V@/sim/testsuite/sim/frv/interrupts/fr550-compound.cgs
+@V@/sim/testsuite/sim/frv/interrupts/data_store_error-fr550.cgs @V@/sim/testsuite/sim/frv/interrupts/fr550-data_store_error.cgs
+@V@/sim/testsuite/sim/frv/interrupts/fp_exception-fr550.cgs @V@/sim/testsuite/sim/frv/interrupts/fr550-fp_exception.cgs
+@V@/sim/testsuite/sim/frv/interrupts/insn_access_error-fr550.cgs @V@/sim/testsuite/sim/frv/interrupts/fr550-insn_access_error.cgs
+@V@/sim/testsuite/sim/sh64/compact/ldsl-mach.cgs @V@/sim/testsuite/sim/sh64/compact/mach-ldsl.cgs
+@V@/sim/testsuite/sim/sh64/compact/ldsl-macl.cgs @V@/sim/testsuite/sim/sh64/compact/macl-ldsl.cgs
+@V@/sim/testsuite/sim/sh64/compact/stsl-mach.cgs @V@/sim/testsuite/sim/sh64/compact/mach-stsl.cgs
+@V@/sim/testsuite/sim/sh64/compact/stsl-macl.cgs @V@/sim/testsuite/sim/sh64/compact/macl-stsl.cgs
@V@/tcl/cygwin/tclConfig.sh.in @V@/tcl/cygwin/tclConfig.sh-in
@V@/tcl/doc/ExprLongObj.3 @V@/tcl/doc/ExprLObj.3
@V@/tcl/mac/tclMacBOAAppInit.c @V@/tcl/mac/tclBOAAppInit.c
@@ -407,29 +356,8 @@
@V@/tcl/unix/tclUnixFile.c @V@/tcl/unix/tclFile.c
@V@/tcl/unix/tclUnixTest.c @V@/tcl/unix/tclTest.c
@V@/tcl/unix/tclUnixTime.c @V@/tcl/unix/tclTime.c
-@V@/tix/docs/Release-4.1.0.html @V@/tix/docs/Rel4_10.html
-@V@/tix/docs/Release-4.1.0.txt @V@/tix/docs/Rel4_10.txt
-@V@/tix/docs/Release-4.1a2.html @V@/tix/docs/Rel4_1a2.html
-@V@/tix/docs/Release-4.1a2.txt @V@/tix/docs/Rel4_1a2.txt
-@V@/tix/docs/Release-4.1a3.html @V@/tix/docs/Rel4_1a3.html
-@V@/tix/docs/Release-4.1a3.txt @V@/tix/docs/Rel4_1a3.txt
-@V@/tix/docs/Release-4.1b1.html @V@/tix/docs/Rel4_1b1.html
-@V@/tix/docs/Release-4.1b1.txt @V@/tix/docs/Rel4_1b1.txt
-@V@/tix/docs/Release-4.1b2.html @V@/tix/docs/Rel4_1b2.html
-@V@/tix/docs/Release-4.1b2.txt @V@/tix/docs/Rel4_1b2.txt
-@V@/tix/tixConfig.sh.in @V@/tix/tixConfig.sh-in
-@V@/tix/unix/tk4.2/pkgIndex.tcl.in @V@/tix/unix/tk4.2/pkgIndex.t-in
-@V@/tix/unix/tk8.0/pkgIndex.tcl.in @V@/tix/unix/tk8.0/pkgIndex.t-in
-@V@/tix/unix/tk8.0/pkgIndex.tcl.in @V@/tix/unix/tk8.0/pkgIndex.t-in
-@V@/tix/unix/tk8.1/pkgIndex.tcl.in @V@/tix/unix/tk8.1/pkgIndex.t-in
-@V@/tix/win/tkConsole41.c @V@/tix/win/tkCon41.c
-@V@/tix/win/tkConsole42.c @V@/tix/win/tkCon42.c
-@V@/tix/win/tkConsole80a1.c @V@/tix/win/tkCon80a1.c
-@V@/tix/win/tkConsole80b1.c @V@/tix/win/tkCon80b1.c
-@V@/tix/win/tkConsole81.c @V@/tix/win/tkCon81.c
@V@/tk/doc/ConfigWidg.3 @V@/tk/doc/CfgWidg.3
@V@/tk/doc/ConfigWind.3 @V@/tk/doc/CfgWind.3
-@V@/tk/doc/tk4.0.ps @V@/tk/doc/tk4-0.ps
@V@/tk/library/images/pwrdLogo100.gif @V@/tk/library/images/pwLogo100.gif
@V@/tk/library/images/pwrdLogo150.gif @V@/tk/library/images/pwLogo150.gif
@V@/tk/library/images/pwrdLogo175.gif @V@/tk/library/images/pwLogo175.gif
@@ -438,7 +366,6 @@
@V@/tk/mac/tkMacMenu.c @V@/tk/mac/tkMenu.c
@V@/tk/mac/tkMacMenubutton.c @V@/tk/mac/tkMenubutton.c
@V@/tk/mac/tkMacMenus.c @V@/tk/mac/tkMenus.c
-@V@/tk/mac/tkMacProjects.sit.hqx @V@/tk/mac/tkMacProjects.shqx
@V@/tk/tests/option.file1 @V@/tk/tests/option1.file
@V@/tk/tests/option.file2 @V@/tk/tests/option2.file
@V@/tk/unix/tkConfig.sh.in @V@/tk/unix/tkConfig.sh-in
diff --git a/gdb/config/frv/frv.mt b/gdb/config/frv/frv.mt
index ae5521eb409..5849f0413c3 100644
--- a/gdb/config/frv/frv.mt
+++ b/gdb/config/frv/frv.mt
@@ -1,5 +1,5 @@
# Target: Fujitsu FRV processor
-TDEPFILES= frv-tdep.o
+TDEPFILES= frv-tdep.o frv-linux-tdep.o solib.o solib-frv.o
TM_FILE= tm-frv.h
SIM_OBS = remote-sim.o
SIM = ../sim/frv/libsim.a
diff --git a/gdb/config/frv/tm-frv.h b/gdb/config/frv/tm-frv.h
index a08f2d3d4bc..1215c582b74 100644
--- a/gdb/config/frv/tm-frv.h
+++ b/gdb/config/frv/tm-frv.h
@@ -43,3 +43,5 @@ extern CORE_ADDR frv_stopped_data_address(void);
/* Use these macros for watchpoint insertion/deletion. */
#define target_stopped_data_address() frv_stopped_data_address()
+
+#include "solib.h" /* Include support for shared libraries. */
diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h
index 5d1aaa723b9..a1c337eac4b 100644
--- a/gdb/config/h8300/tm-h8300.h
+++ b/gdb/config/h8300/tm-h8300.h
@@ -20,19 +20,13 @@
Boston, MA 02111-1307, USA. */
/* Contributed by Steve Chamberlain sac@cygnus.com */
-/* NOTE: ezannoni 2000-07-18: these variables are part of sim, defined
- in sim/h8300/compile.c. They really should not be used this
- way. Because of this we cannot get rid of the macro
- GDB_TARGET_IS_H8300 in remote-e7000.c */
-extern int h8300hmode;
-extern int h8300smode;
-extern int h8300sxmode;
-#define GDB_TARGET_IS_H8300
-
/* Needed for remote.c */
#define DEPRECATED_REMOTE_BREAKPOINT { 0x57, 0x30} /* trapa #3 */
/* Needed for remote-hms.c */
#define CCR_REGNUM 8
/* Needed for remote-e7000.c */
-#define NUM_REALREGS (h8300smode?11:10)
+#define NUM_REALREGS ((TARGET_ARCHITECTURE->mach == bfd_mach_h8300s || \
+ TARGET_ARCHITECTURE->mach == bfd_mach_h8300sn || \
+ TARGET_ARCHITECTURE->mach == bfd_mach_h8300sx || \
+ TARGET_ARCHITECTURE->mach == bfd_mach_h8300sxn) ? 11 : 10)
diff --git a/gdb/config/h8500/h8500.mt b/gdb/config/h8500/h8500.mt
deleted file mode 100644
index 64608a08957..00000000000
--- a/gdb/config/h8500/h8500.mt
+++ /dev/null
@@ -1,6 +0,0 @@
-# OBSOLETE # Target: H8500 with HMS monitor and H8 simulator
-# OBSOLETE TDEPFILES= h8500-tdep.o monitor.o remote-hms.o dsrec.o
-# OBSOLETE TM_FILE= tm-h8500.h
-# OBSOLETE
-# OBSOLETE SIM_OBS = remote-sim.o
-# OBSOLETE SIM = ../sim/h8500/libsim.a
diff --git a/gdb/config/h8500/tm-h8500.h b/gdb/config/h8500/tm-h8500.h
deleted file mode 100644
index 4d0f6407fa5..00000000000
--- a/gdb/config/h8500/tm-h8500.h
+++ /dev/null
@@ -1,295 +0,0 @@
-// OBSOLETE /* Parameters for execution on a H8/500 series machine.
-// OBSOLETE
-// OBSOLETE Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003 Free
-// OBSOLETE Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE /* NOTE: cagney/2002-11-24: This is a guess. */
-// OBSOLETE #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 0
-// OBSOLETE #define CALL_DUMMY_LOCATION ON_STACK
-// OBSOLETE #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
-// OBSOLETE
-// OBSOLETE /* Contributed by Steve Chamberlain sac@cygnus.com */
-// OBSOLETE
-// OBSOLETE #define GDB_TARGET_IS_H8500
-// OBSOLETE
-// OBSOLETE /* Define the sizes of integers and pointers. */
-// OBSOLETE
-// OBSOLETE #define TARGET_INT_BIT 16
-// OBSOLETE
-// OBSOLETE #define TARGET_LONG_BIT 32
-// OBSOLETE
-// OBSOLETE #define TARGET_PTR_BIT (minimum_mode ? 16 : 32)
-// OBSOLETE
-// OBSOLETE /* Offset from address of function to start of its code.
-// OBSOLETE Zero on most machines. */
-// OBSOLETE
-// OBSOLETE #define FUNCTION_START_OFFSET 0
-// OBSOLETE
-// OBSOLETE /* Advance PC across any function entry prologue instructions
-// OBSOLETE to reach some "real" code. */
-// OBSOLETE
-// OBSOLETE #define SKIP_PROLOGUE(ip) (h8500_skip_prologue (ip))
-// OBSOLETE extern CORE_ADDR h8500_skip_prologue (CORE_ADDR);
-// OBSOLETE
-// OBSOLETE /* Immediately after a function call, return the saved pc.
-// OBSOLETE Can't always go through the frames for this because on some machines
-// OBSOLETE the new frame is not set up until the new function executes
-// OBSOLETE some instructions. */
-// OBSOLETE
-// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) saved_pc_after_call()
-// OBSOLETE extern CORE_ADDR saved_pc_after_call (void);
-// OBSOLETE
-// OBSOLETE /* Stack grows downward. */
-// OBSOLETE
-// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-// OBSOLETE
-// OBSOLETE /* Illegal instruction - used by the simulator for breakpoint
-// OBSOLETE detection */
-// OBSOLETE
-// OBSOLETE #define BREAKPOINT {0x0b}
-// OBSOLETE
-// OBSOLETE /* If your kernel resets the pc after the trap happens you may need to
-// OBSOLETE define this before including this file. */
-// OBSOLETE
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE
-// OBSOLETE /* Say how long registers are. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_TYPE unsigned long
-// OBSOLETE
-// OBSOLETE /* Say how much memory is needed to store a copy of the register set */
-// OBSOLETE
-// OBSOLETE #define REGISTER_BYTES (NUM_REGS * 4)
-// OBSOLETE
-// OBSOLETE /* Index within `registers' of the first byte of the space for
-// OBSOLETE register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_BYTE(N) ((N)*4)
-// OBSOLETE
-// OBSOLETE /* Number of bytes of storage in the actual machine representation
-// OBSOLETE for register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_RAW_SIZE(N) h8500_register_size(N)
-// OBSOLETE extern int h8500_register_size (int regno);
-// OBSOLETE
-// OBSOLETE #define REGISTER_SIZE 4
-// OBSOLETE
-// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) h8500_register_size(N)
-// OBSOLETE
-// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_RAW_SIZE 4
-// OBSOLETE
-// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. */
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4
-// OBSOLETE
-// OBSOLETE /* Return the GDB type object for the "standard" data type
-// OBSOLETE of data in register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) h8500_register_virtual_type(N)
-// OBSOLETE extern struct type *h8500_register_virtual_type (int regno);
-// OBSOLETE
-// OBSOLETE /* Initializer for an array of names of registers.
-// OBSOLETE Entries beyond the first NUM_REGS are ignored. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_NAMES \
-// OBSOLETE { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
-// OBSOLETE "pr0","pr1","pr2","pr3","pr4","pr5","pr6","pr7", \
-// OBSOLETE "cp", "dp", "ep", "tp", "sr", "pc"}
-// OBSOLETE
-// OBSOLETE /* Register numbers of various important registers. Note that some of
-// OBSOLETE these values are "real" register numbers, and correspond to the
-// OBSOLETE general registers of the machine, and some are "phony" register
-// OBSOLETE numbers which are too large to be actual register numbers as far as
-// OBSOLETE the user is concerned but do serve to get the desired values when
-// OBSOLETE passed to read_register. */
-// OBSOLETE
-// OBSOLETE #define R0_REGNUM 0
-// OBSOLETE #define R1_REGNUM 1
-// OBSOLETE #define R2_REGNUM 2
-// OBSOLETE #define R3_REGNUM 3
-// OBSOLETE #define R4_REGNUM 4
-// OBSOLETE #define R5_REGNUM 5
-// OBSOLETE #define R6_REGNUM 6
-// OBSOLETE #define R7_REGNUM 7
-// OBSOLETE
-// OBSOLETE #define PR0_REGNUM 8
-// OBSOLETE #define PR1_REGNUM 9
-// OBSOLETE #define PR2_REGNUM 10
-// OBSOLETE #define PR3_REGNUM 11
-// OBSOLETE #define PR4_REGNUM 12
-// OBSOLETE #define PR5_REGNUM 13
-// OBSOLETE #define PR6_REGNUM 14
-// OBSOLETE #define PR7_REGNUM 15
-// OBSOLETE
-// OBSOLETE #define SEG_C_REGNUM 16 /* Segment registers */
-// OBSOLETE #define SEG_D_REGNUM 17
-// OBSOLETE #define SEG_E_REGNUM 18
-// OBSOLETE #define SEG_T_REGNUM 19
-// OBSOLETE
-// OBSOLETE #define CCR_REGNUM 20 /* Contains processor status */
-// OBSOLETE #define PC_REGNUM 21 /* Contains program counter */
-// OBSOLETE
-// OBSOLETE #define NUM_REGS 22
-// OBSOLETE
-// OBSOLETE #define SP_REGNUM PR7_REGNUM /* Contains address of top of stack */
-// OBSOLETE #define FP_REGNUM PR6_REGNUM /* Contains address of executing stack frame */
-// OBSOLETE
-// OBSOLETE #define PTR_SIZE (minimum_mode ? 2 : 4)
-// OBSOLETE #define PTR_MASK (minimum_mode ? 0x0000ffff : 0x00ffffff)
-// OBSOLETE
-// OBSOLETE /* Store the address of the place in which to copy the structure the
-// OBSOLETE subroutine will return. This is called from call_function. */
-// OBSOLETE
-// OBSOLETE /*#define STORE_STRUCT_RETURN(ADDR, SP) \
-// OBSOLETE { write_register (0, (ADDR)); internal_error (__FILE__, __LINE__, "failed internal consistency check"); } */
-// OBSOLETE
-// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
-// OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
-// OBSOLETE into VALBUF. */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-// OBSOLETE memcpy (VALBUF, (char *)(REGBUF), TYPE_LENGTH(TYPE))
-// OBSOLETE
-// OBSOLETE /* Write into appropriate registers a function return value
-// OBSOLETE of type TYPE, given in virtual format. */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
-// OBSOLETE deprecated_write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
-// OBSOLETE
-// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
-// OBSOLETE the address in which a function should return its structure value,
-// OBSOLETE as a CORE_ADDR (or an expression that can be used as one). */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Define other aspects of the stack frame. */
-// OBSOLETE
-// OBSOLETE /* A macro that tells us whether the function invocation represented
-// OBSOLETE by FI does not have a frame on the stack associated with it. If it
-// OBSOLETE does not, FRAMELESS is set to 1, else 0. */
-// OBSOLETE
-// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \
-// OBSOLETE (frameless_look_for_prologue (FI))
-// OBSOLETE
-// OBSOLETE /* Any function with a frame looks like this
-// OBSOLETE SECOND ARG
-// OBSOLETE FIRST ARG
-// OBSOLETE RET PC
-// OBSOLETE SAVED R2
-// OBSOLETE SAVED R3
-// OBSOLETE SAVED FP <-FP POINTS HERE
-// OBSOLETE LOCALS0
-// OBSOLETE LOCALS1 <-SP POINTS HERE
-// OBSOLETE
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fci) ;
-// OBSOLETE /* (fci)->frame |= read_register(SEG_T_REGNUM) << 16; */
-// OBSOLETE
-// OBSOLETE #define FRAME_CHAIN(FRAME) h8500_frame_chain(FRAME)
-// OBSOLETE struct frame_info;
-// OBSOLETE extern CORE_ADDR h8500_frame_chain (struct frame_info *);
-// OBSOLETE
-// OBSOLETE #define FRAME_SAVED_PC(FRAME) frame_saved_pc(FRAME)
-// OBSOLETE extern CORE_ADDR frame_saved_pc (struct frame_info *frame);
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
-// OBSOLETE
-// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
-// OBSOLETE
-// OBSOLETE /* Set VAL to the number of args passed to frame described by FI.
-// OBSOLETE Can set VAL to -1, meaning no way to tell. */
-// OBSOLETE
-// OBSOLETE /* We can't tell how many args there are
-// OBSOLETE now that the C compiler delays popping them. */
-// OBSOLETE
-// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
-// OBSOLETE
-// OBSOLETE /* Return number of bytes at start of arglist that are not really args. */
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_SKIP 0
-// OBSOLETE
-// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
-// OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO.
-// OBSOLETE This includes special registers such as pc and fp saved in special
-// OBSOLETE ways in the stack frame. sp is even more special:
-// OBSOLETE the address we return for it IS the sp for the next frame. */
-// OBSOLETE
-// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
-// OBSOLETE frame_find_saved_regs(frame_info, &(frame_saved_regs))
-// OBSOLETE struct frame_saved_regs;
-// OBSOLETE extern void frame_find_saved_regs (struct frame_info *frame_info,
-// OBSOLETE struct frame_saved_regs *frame_saved_regs);
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. */
-// OBSOLETE
-// OBSOLETE #define POP_FRAME { h8500_pop_frame (); }
-// OBSOLETE extern void h8500_pop_frame (void);
-// OBSOLETE
-// OBSOLETE #define SHORT_INT_MAX 32767
-// OBSOLETE #define SHORT_INT_MIN -32768
-// OBSOLETE
-// OBSOLETE typedef unsigned short INSN_WORD;
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR h8500_addr_bits_remove (CORE_ADDR);
-// OBSOLETE #define ADDR_BITS_REMOVE(addr) h8500_addr_bits_remove (addr)
-// OBSOLETE
-// OBSOLETE #define read_memory_short(x) (read_memory_integer(x,2) & 0xffff)
-// OBSOLETE
-// OBSOLETE extern void h8500_do_registers_info (int regnum, int all);
-// OBSOLETE #define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) \
-// OBSOLETE h8500_do_registers_info (REGNUM, ALL)
-// OBSOLETE
-// OBSOLETE extern int minimum_mode;
-// OBSOLETE
-// OBSOLETE #define CALL_DUMMY_LENGTH 10
-// OBSOLETE
-// OBSOLETE /* Fake variables to make it easy to use 24 bit register pointers */
-// OBSOLETE
-// OBSOLETE #define IS_TRAPPED_INTERNALVAR h8500_is_trapped_internalvar
-// OBSOLETE extern int h8500_is_trapped_internalvar (char *name);
-// OBSOLETE
-// OBSOLETE #define VALUE_OF_TRAPPED_INTERNALVAR h8500_value_of_trapped_internalvar
-// OBSOLETE extern struct value *h8500_value_of_trapped_internalvar ( /* struct internalvar *var */ );
-// OBSOLETE
-// OBSOLETE #define SET_TRAPPED_INTERNALVAR h8500_set_trapped_internalvar
-// OBSOLETE extern void h8500_set_trapped_internalvar ( /* struct internalvar *var, value newval, int bitpos, int bitsize, int offset */ );
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR h8500_read_sp (void);
-// OBSOLETE extern void h8500_write_sp (CORE_ADDR);
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR h8500_read_fp (void);
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR h8500_read_pc (ptid_t);
-// OBSOLETE extern void h8500_write_pc (CORE_ADDR, ptid_t);
-// OBSOLETE
-// OBSOLETE #define TARGET_READ_SP() h8500_read_sp()
-// OBSOLETE #define TARGET_WRITE_SP(x) h8500_write_sp(x)
-// OBSOLETE
-// OBSOLETE #define TARGET_READ_PC(pid) h8500_read_pc(pid)
-// OBSOLETE #define TARGET_WRITE_PC(x,pid) h8500_write_pc(x,pid)
-// OBSOLETE
-// OBSOLETE #define TARGET_READ_FP() h8500_read_fp()
diff --git a/gdb/config/i386/fbsd.mh b/gdb/config/i386/fbsd.mh
index 08d9e7db0c8..2d0500e565d 100644
--- a/gdb/config/i386/fbsd.mh
+++ b/gdb/config/i386/fbsd.mh
@@ -1,7 +1,5 @@
-# Host: Intel 386 running FreeBSD
-
-XM_FILE= xm-i386.h
-
+# Host: FreeBSD/i386
+NATDEPFILES= fork-child.o infptrace.o inftarg.o \
+ i386-nat.o i386bsd-nat.o i386fbsd-nat.o gcore.o fbsd-proc.o
NAT_FILE= nm-fbsd.h
-# NOTE: Do not spread NATDEPFILES over several lines - it hurts BSD make.
-NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o solib-svr4.o solib-legacy.o corelow.o core-aout.o core-regset.o i386-nat.o i386bsd-nat.o i386fbsd-nat.o gcore.o fbsd-proc.o
+XM_FILE= xm-i386.h
diff --git a/gdb/config/i386/fbsd.mt b/gdb/config/i386/fbsd.mt
index 7a95e00d6b9..be095e987a8 100644
--- a/gdb/config/i386/fbsd.mt
+++ b/gdb/config/i386/fbsd.mt
@@ -1,3 +1,4 @@
-# Target: Intel 386 running FreeBSD
-TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o
+# Target: FreeBSD/i386
+TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \
+ corelow.o solib.o solib-svr4.o
TM_FILE= tm-fbsd.h
diff --git a/gdb/config/i386/fbsd64.mh b/gdb/config/i386/fbsd64.mh
index 7e42aaa2cd6..6c30e3072df 100644
--- a/gdb/config/i386/fbsd64.mh
+++ b/gdb/config/i386/fbsd64.mh
@@ -1,7 +1,5 @@
# Host: FreeBSD/amd64
-
-XM_FILE= xm-i386.h
-
+NATDEPFILES= fork-child.o infptrace.o inftarg.o \
+ amd64-nat.o amd64bsd-nat.o amd64fbsd-nat.o gcore.o fbsd-proc.o
NAT_FILE= nm-fbsd64.h
-# NOTE: Do not spread NATDEPFILES over several lines - it hurts BSD make.
-NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o solib-svr4.o solib-legacy.o corelow.o core-regset.o amd64-nat.o amd64fbsd-nat.o gcore.o fbsd-proc.o
+XM_FILE= xm-i386.h
diff --git a/gdb/config/i386/fbsd64.mt b/gdb/config/i386/fbsd64.mt
index ae4fe989f07..d4cb24b76b8 100644
--- a/gdb/config/i386/fbsd64.mt
+++ b/gdb/config/i386/fbsd64.mt
@@ -1,2 +1,5 @@
# Target: FreeBSD/amd64
-TDEPFILES= x86-64-tdep.o amd64fbsd-tdep.o i386-tdep.o i387-tdep.o i386bsd-tdep.o
+TDEPFILES= amd64-tdep.o amd64fbsd-tdep.o \
+ i386-tdep.o i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \
+ corelow.o solib.o solib-svr4.o
+TM_FILE= tm-fbsd.h
diff --git a/gdb/config/i386/go32.mh b/gdb/config/i386/go32.mh
index 846896bffc7..0de5a9fdef9 100644
--- a/gdb/config/i386/go32.mh
+++ b/gdb/config/i386/go32.mh
@@ -1,8 +1,5 @@
# Host: Intel x86 running DJGPP
-# we don't need mmalloc on DJGPP
-MH_CFLAGS= -DNO_MMALLOC
-MMALLOC=
-MMALLOC_CFLAGS=
+MH_CFLAGS=
XM_FILE= xm-go32.h
diff --git a/gdb/config/i386/i386bsd.mh b/gdb/config/i386/i386bsd.mh
deleted file mode 100644
index 01457d479b8..00000000000
--- a/gdb/config/i386/i386bsd.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-# Host: Intel 386 running 386BSD
-
-XM_FILE= xm-i386bsd.h
-
-NAT_FILE= nm-i386bsd.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o core-aout.o i386b-nat.o
diff --git a/gdb/config/i386/i386bsd.mt b/gdb/config/i386/i386bsd.mt
deleted file mode 100644
index ef617311115..00000000000
--- a/gdb/config/i386/i386bsd.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Intel 386 running BSD
-TM_FILE= tm-i386bsd.h
-TDEPFILES= i386-tdep.o
diff --git a/gdb/config/i386/i386sol2.mh b/gdb/config/i386/i386sol2.mh
index 931cc132bbb..1245ca7a4bd 100644
--- a/gdb/config/i386/i386sol2.mh
+++ b/gdb/config/i386/i386sol2.mh
@@ -1,9 +1,8 @@
# Host: Intel 386 running Solaris 2 (SVR4)
-XM_FILE= xm-i386v4.h
-XM_CLIBS= -lsocket -lnsl
+XM_FILE= xm-i386.h
NAT_FILE= nm-i386sol2.h
-NATDEPFILES= core-regset.o fork-child.o i386v4-nat.o corelow.o \
+NATDEPFILES= fork-child.o i386v4-nat.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o gcore.o \
solib.o solib-svr4.o solib-legacy.o
diff --git a/gdb/config/i386/i386sol2.mt b/gdb/config/i386/i386sol2.mt
index 93c2d783538..863f61500d7 100644
--- a/gdb/config/i386/i386sol2.mt
+++ b/gdb/config/i386/i386sol2.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running Solaris 2 (SVR4)
-TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o
+TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o corelow.o
TM_FILE= tm-i386sol2.h
diff --git a/gdb/config/i386/interix.mh b/gdb/config/i386/interix.mh
index 23311d615fa..c294dd5e808 100644
--- a/gdb/config/i386/interix.mh
+++ b/gdb/config/i386/interix.mh
@@ -4,6 +4,3 @@ NATDEPFILES= corelow.o core-regset.o fork-child.o i386-interix-nat.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
NAT_FILE= nm-interix.h
XM_FILE= xm-interix.h
-# The below may be temporary; mmalloc relies on sbrk() at the moment
-MMALLOC=
-MMALLOC_CFLAGS=-DNO_MMALLOC
diff --git a/gdb/config/i386/linux.mt b/gdb/config/i386/linux.mt
index 2d27a02638e..9e068a47055 100644
--- a/gdb/config/i386/linux.mt
+++ b/gdb/config/i386/linux.mt
@@ -1,4 +1,4 @@
# Target: Intel 386 running GNU/Linux
-TDEPFILES= i386-tdep.o i386-linux-tdep.o i387-tdep.o \
+TDEPFILES= i386-tdep.o i386-linux-tdep.o glibc-tdep.o i387-tdep.o \
solib.o solib-svr4.o solib-legacy.o
TM_FILE= tm-linux.h
diff --git a/gdb/config/i386/x86-64linux.mh b/gdb/config/i386/linux64.mh
index ed563cb0cf4..c02e864a347 100644
--- a/gdb/config/i386/x86-64linux.mh
+++ b/gdb/config/i386/linux64.mh
@@ -1,12 +1,9 @@
-# Host: AMD x86-64 running GNU/Linux
-
-XM_FILE= xm-i386.h
-
-NAT_FILE= nm-x86-64linux.h
+# Host: GNU/Linux x86-64
NATDEPFILES= infptrace.o inftarg.o fork-child.o \
- i386-nat.o amd64-nat.o x86-64-linux-nat.o \
- linux-nat.o \
+ i386-nat.o amd64-nat.o amd64-linux-nat.o linux-nat.o \
proc-service.o thread-db.o lin-lwp.o linux-proc.o gcore.o
+NAT_FILE= nm-linux64.h
+XM_FILE= xm-i386.h
# The dynamically loaded libthread_db needs access to symbols in the
# gdb executable.
diff --git a/gdb/config/i386/linux64.mt b/gdb/config/i386/linux64.mt
new file mode 100644
index 00000000000..f642e317a55
--- /dev/null
+++ b/gdb/config/i386/linux64.mt
@@ -0,0 +1,5 @@
+# Target: GNU/Linux x86-64
+TDEPFILES= amd64-tdep.o amd64-linux-tdep.o \
+ i386-tdep.o i387-tdep.o i386-linux-tdep.o glibc-tdep.o \
+ solib.o solib-svr4.o solib-legacy.o corelow.o
+TM_FILE=tm-linux64.h
diff --git a/gdb/config/i386/nbsd.mt b/gdb/config/i386/nbsd.mt
index f7f8cd6e70c..d6699b54ec2 100644
--- a/gdb/config/i386/nbsd.mt
+++ b/gdb/config/i386/nbsd.mt
@@ -1,4 +1,4 @@
-# Target: Intel 386 running NetBSD
-TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386nbsd-tdep.o corelow.o \
- nbsd-tdep.o solib.o solib-svr4.o
+# Target: NetBSD/i386
+TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386nbsd-tdep.o nbsd-tdep.o \
+ corelow.o solib.o solib-svr4.o
TM_FILE= tm-nbsd.h
diff --git a/gdb/config/i386/nbsd64.mh b/gdb/config/i386/nbsd64.mh
new file mode 100644
index 00000000000..e10ae7a2be4
--- /dev/null
+++ b/gdb/config/i386/nbsd64.mh
@@ -0,0 +1,5 @@
+# Host: NetBSD/amd64
+NATDEPFILES= fork-child.o infptrace.o inftarg.o \
+ amd64-nat.o amd64bsd-nat.o amd64nbsd-nat.o
+NAT_FILE= nm-nbsd.h
+XM_FILE= xm-i386.h
diff --git a/gdb/config/i386/nbsd64.mt b/gdb/config/i386/nbsd64.mt
new file mode 100644
index 00000000000..3c982116a4c
--- /dev/null
+++ b/gdb/config/i386/nbsd64.mt
@@ -0,0 +1,4 @@
+# Target: NetBSD/amd64
+TDEPFILES= amd64-tdep.o amd64nbsd-tdep.o i386-tdep.o i387-tdep.o nbsd-tdep.o \
+ corelow.o solib.o solib-svr4.o
+TM_FILE= tm-nbsd.h
diff --git a/gdb/config/i386/nbsdaout.mh b/gdb/config/i386/nbsdaout.mh
index 226c56cc445..98e69c4c97b 100644
--- a/gdb/config/i386/nbsdaout.mh
+++ b/gdb/config/i386/nbsdaout.mh
@@ -1,5 +1,5 @@
-# Host: Intel 386 running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o solib-sunos.o
-
-XM_FILE= xm-nbsd.h
+# Host: NetBSD/i386 a.out
+NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o \
+ solib.o solib-sunos.o
NAT_FILE= nm-nbsdaout.h
+XM_FILE= xm-nbsd.h
diff --git a/gdb/config/i386/nbsdelf.mh b/gdb/config/i386/nbsdelf.mh
index 7c27b02f3ac..0d313ddac82 100644
--- a/gdb/config/i386/nbsdelf.mh
+++ b/gdb/config/i386/nbsdelf.mh
@@ -1,4 +1,4 @@
-# Host: Intel 386 running NetBSD
+# Host: NetBSD/i386 ELF
NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o
-XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h
+XM_FILE= xm-nbsd.h
diff --git a/gdb/config/i386/nm-fbsd.h b/gdb/config/i386/nm-fbsd.h
index e47e9ef1a60..4c5683bcbd9 100644
--- a/gdb/config/i386/nm-fbsd.h
+++ b/gdb/config/i386/nm-fbsd.h
@@ -1,5 +1,6 @@
/* Native-dependent definitions for FreeBSD/i386.
- Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1997, 2000, 2001
+
+ Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1997, 2000, 2001, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -51,20 +52,14 @@ extern void i386bsd_dr_reset_addr (int regnum);
extern unsigned long i386bsd_dr_get_status (void);
-/* Type of the third argument to the `ptrace' system call. */
-#define PTRACE_ARG3_TYPE caddr_t
-
-/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
-#define FETCH_INFERIOR_REGISTERS
+/* Get generic BSD native definitions. */
+#include "config/nm-bsd.h"
/* Override child_resume in `infptrace.c' to work around a kernel bug. */
#define CHILD_RESUME
/* Override child_pid_to_exec_file in 'inftarg.c'. */
#define CHILD_PID_TO_EXEC_FILE
-
-/* We can attach and detach. */
-#define ATTACH_DETACH
/* Support for the user struct. */
@@ -87,20 +82,10 @@ extern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regno);
/* Shared library support. */
-/* The FreeBSD <link.h> uses the same condition to distinguish ELF
- from a.out. ELF implies SVR4 shared libraries. */
-#if (defined (FREEBSD_ELF) || defined (__ELF__)) && !defined (FREEBSD_AOUT)
-#define SVR4_SHARED_LIBS
-#endif
-
-#include "solib.h" /* Support for shared libraries. */
-#ifdef SVR4_SHARED_LIBS
-#include "elf/common.h" /* Additional ELF shared library info. */
-#endif
-
-#ifndef SVR4_SHARED_LIBS
+#include "solib.h"
-/* Make structure definitions match up with those expected in `solib.c'. */
+/* Make structure definitions match up with those expected in
+ `solib-sunos.c'. */
#define link_object sod
#define lo_name sod_name
@@ -154,6 +139,4 @@ extern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regno);
#define ld_un d_un
#define ld_2 d_sdt
-#endif /* !SVR4_SHARED_LIBS */
-
-#endif /* NM_FBSD_H */
+#endif /* nm-fbsd.h */
diff --git a/gdb/config/i386/nm-fbsd64.h b/gdb/config/i386/nm-fbsd64.h
index e5b66df15ed..061e77e1374 100644
--- a/gdb/config/i386/nm-fbsd64.h
+++ b/gdb/config/i386/nm-fbsd64.h
@@ -1,6 +1,6 @@
/* Native-dependent definitions for FreeBSD/amd64.
- Copyright 2003
- Free Software Foundation, Inc.
+
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,21 +22,10 @@
#ifndef NM_FBSD64_H
#define NM_FBSD64_H
-/* Type of the third argument to the `ptrace' system call. */
-#define PTRACE_ARG3_TYPE caddr_t
-
-/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
-#define FETCH_INFERIOR_REGISTERS
+/* Get generic BSD native definitions. */
+#include "config/nm-bsd.h"
/* Override child_pid_to_exec_file in 'inftarg.c'. */
#define CHILD_PID_TO_EXEC_FILE
-/* We can attach and detach. */
-#define ATTACH_DETACH
-
-
-/* Shared library support. */
-
-#include "solib.h"
-
#endif /* nm-fbsd64.h */
diff --git a/gdb/config/i386/nm-i386.h b/gdb/config/i386/nm-i386.h
index 97a70539b0f..88eacc8852b 100644
--- a/gdb/config/i386/nm-i386.h
+++ b/gdb/config/i386/nm-i386.h
@@ -1,5 +1,5 @@
/* Native macro definitions for GDB on an Intel i[3456]86.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -113,8 +113,6 @@ extern int i386_remove_hw_breakpoint (CORE_ADDR addr, void *shadow);
#define target_remove_hw_breakpoint(addr, shadow) \
i386_remove_hw_breakpoint (addr, shadow)
-#define DECR_PC_AFTER_HW_BREAK 0
-
/* child_post_startup_inferior used to
reset all debug registers by calling i386_cleanup_dregs (). */
#define CHILD_POST_STARTUP_INFERIOR
diff --git a/gdb/config/i386/nm-i386bsd.h b/gdb/config/i386/nm-i386bsd.h
deleted file mode 100644
index 628c648bf77..00000000000
--- a/gdb/config/i386/nm-i386bsd.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Native-dependent definitions for Intel 386 running BSD Unix, for GDB.
- Copyright 1986, 1987, 1989, 1992, 1993, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef NM_I386BSD_H
-#define NM_I386BSD_H
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-
-#include <machine/vmparam.h>
-#define KERNEL_U_ADDR USRSTACK
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- (addr) = i386_register_u_addr ((blockend),(regno));
-
-extern int i386_register_u_addr (int, int);
-
-#define PTRACE_ARG3_TYPE char*
-
-#endif /* NM_I386BSD_H */
diff --git a/gdb/config/i386/nm-x86-64linux.h b/gdb/config/i386/nm-linux64.h
index d1ac9104a15..1764758f3b9 100644
--- a/gdb/config/i386/nm-x86-64linux.h
+++ b/gdb/config/i386/nm-linux64.h
@@ -1,6 +1,6 @@
/* Native support for GNU/Linux x86-64.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Jiri Smid, SuSE Labs.
@@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef NM_X86_64_LINUX_H
-#define NM_X86_64_LINUX_H
+#ifndef NM_LINUX64_H
+#define NM_LINUX64_H
/* GNU/Linux supports the i386 hardware debugging registers. */
#define I386_USE_GENERIC_WATCHPOINTS
@@ -35,21 +35,21 @@
/* Provide access to the i386 hardware debugging registers. */
-extern void x86_64_linux_dr_set_control (unsigned long control);
+extern void amd64_linux_dr_set_control (unsigned long control);
#define I386_DR_LOW_SET_CONTROL(control) \
- x86_64_linux_dr_set_control (control)
+ amd64_linux_dr_set_control (control)
-extern void x86_64_linux_dr_set_addr (int regnum, CORE_ADDR addr);
+extern void amd64_linux_dr_set_addr (int regnum, CORE_ADDR addr);
#define I386_DR_LOW_SET_ADDR(regnum, addr) \
- x86_64_linux_dr_set_addr (regnum, addr)
+ amd64_linux_dr_set_addr (regnum, addr)
-extern void x86_64_linux_dr_reset_addr (int regnum);
+extern void amd64_linux_dr_reset_addr (int regnum);
#define I386_DR_LOW_RESET_ADDR(regnum) \
- x86_64_linux_dr_reset_addr (regnum)
+ amd64_linux_dr_reset_addr (regnum)
-extern unsigned long x86_64_linux_dr_get_status (void);
+extern unsigned long amd64_linux_dr_get_status (void);
#define I386_DR_LOW_GET_STATUS() \
- x86_64_linux_dr_get_status ()
+ amd64_linux_dr_get_status ()
/* Type of the third argument to the `ptrace' system call. */
@@ -66,4 +66,4 @@ extern unsigned long x86_64_linux_dr_get_status (void);
`x86-86-linux-nat.c' instead, which calls both. */
#define LINUX_CHILD_POST_STARTUP_INFERIOR
-#endif /* NM_X86_64_LINUX_H */
+#endif /* nm-linux64.h */
diff --git a/gdb/config/i386/nm-nbsd.h b/gdb/config/i386/nm-nbsd.h
index 2e5adb82b3d..fef50f37bf5 100644
--- a/gdb/config/i386/nm-nbsd.h
+++ b/gdb/config/i386/nm-nbsd.h
@@ -1,5 +1,6 @@
-/* Native-dependent definitions for Intel 386 running NetBSD, for GDB.
- Copyright 1986, 1987, 1989, 1992, 1994, 2000, 2002
+/* Native-dependent definitions for NetBSD/i386.
+
+ Copyright 1986, 1987, 1989, 1992, 1994, 2000, 2002, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,7 +23,7 @@
#ifndef NM_NBSD_H
#define NM_NBSD_H
-/* Get generic NetBSD native definitions. */
+/* Get generic NetBSD native definitions. */
#include "config/nm-nbsd.h"
-#endif /* NM_NBSD_H */
+#endif /* nm-nbsd.h */
diff --git a/gdb/config/i386/nm-nbsdaout.h b/gdb/config/i386/nm-nbsdaout.h
index dc8aac961c4..375a6a02d95 100644
--- a/gdb/config/i386/nm-nbsdaout.h
+++ b/gdb/config/i386/nm-nbsdaout.h
@@ -1,5 +1,6 @@
-/* Native-dependent definitions for Intel 386 running NetBSD, for GDB.
- Copyright 1986, 1987, 1989, 1992, 1994, 1996, 2000
+/* Native-dependent definitions for NetBSD/i386 a.out.
+
+ Copyright 1986, 1987, 1989, 1992, 1994, 1996, 2000, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -24,7 +25,7 @@
#include "i386/nm-nbsd.h"
-/* Get generic NetBSD a.out native definitions. */
+/* Get generic NetBSD a.out native definitions. */
#include "config/nm-nbsdaout.h"
-#endif /* NM_NBSDAOUT_H */
+#endif /* nm-nbsdaout.h */
diff --git a/gdb/config/i386/nm-obsd.h b/gdb/config/i386/nm-obsd.h
index 6113e140088..7fd32ca7c43 100644
--- a/gdb/config/i386/nm-obsd.h
+++ b/gdb/config/i386/nm-obsd.h
@@ -1,5 +1,6 @@
/* Native-dependent definitions for OpenBSD/i386.
- Copyright 2001 Free Software Foundation, Inc.
+
+ Copyright 2001, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,15 +22,8 @@
#ifndef NM_OBSD_H
#define NM_OBSD_H
-/* Type of the third argument to the `ptrace' system call. */
-#define PTRACE_ARG3_TYPE caddr_t
-
-/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
-#define FETCH_INFERIOR_REGISTERS
-
-/* We can attach and detach. */
-#define ATTACH_DETACH
-
+/* Get generic BSD native definitions. */
+#include "config/nm-bsd.h"
/* Support for the user struct. */
@@ -51,9 +45,10 @@ extern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regno);
/* Shared library support. */
-#include "solib.h" /* Support for shared libraries. */
+#include "solib.h"
-/* Make structure definitions match up with those expected in `solib.c'. */
+/* Make structure definitions match up with those expected in
+ `solib-sunos.c'. */
#define link_object sod
#define lo_name sod_name
diff --git a/gdb/config/i386/nm-ptx4.h b/gdb/config/i386/nm-ptx4.h
deleted file mode 100644
index 74db16546e7..00000000000
--- a/gdb/config/i386/nm-ptx4.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under ptx
-// OBSOLETE with Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1994, 1996, 2000
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE #include "config/nm-sysv4.h"
-// OBSOLETE
-// OBSOLETE #undef USE_PROC_FS
-// OBSOLETE
-// OBSOLETE #include "i386/nm-symmetry.h"
-// OBSOLETE
-// OBSOLETE #define PTRACE_READ_REGS(pid,regaddr) mptrace (XPT_RREGS, (pid), (regaddr), 0)
-// OBSOLETE #define PTRACE_WRITE_REGS(pid,regaddr) \
-// OBSOLETE mptrace (XPT_WREGS, (pid), (regaddr), 0)
-// OBSOLETE
-// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-// OBSOLETE
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
-// OBSOLETE
-// OBSOLETE /* We must fetch all the regs before storing, since we store all at once. */
-// OBSOLETE
-// OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
-// OBSOLETE
-// OBSOLETE #define CHILD_WAIT
-// OBSOLETE struct target_waitstatus;
-// OBSOLETE extern ptid_t child_wait (ptid_t, struct target_waitstatus *);
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * ptx does attach as of ptx version 2.1. Prior to that, the interface
-// OBSOLETE * exists but does not work.
-// OBSOLETE *
-// OBSOLETE * FIXME: Using attach/detach requires using the ptx MPDEBUGGER
-// OBSOLETE * interface. There are still problems with that, so for now don't
-// OBSOLETE * enable attach/detach. If you turn it on anyway, it will mostly
-// OBSOLETE * work, but has a number of bugs. -fubar, 2/94.
-// OBSOLETE */
-// OBSOLETE /*#define ATTACH_DETACH 1 */
-// OBSOLETE #undef ATTACH_DETACH
-// OBSOLETE #define PTRACE_ATTACH XPT_DEBUG
-// OBSOLETE #define PTRACE_DETACH XPT_UNDEBUG
-// OBSOLETE /*
-// OBSOLETE * The following drivel is needed because there are two ptrace-ish
-// OBSOLETE * calls on ptx: ptrace() and mptrace(), each of which does about half
-// OBSOLETE * of the ptrace functions.
-// OBSOLETE */
-// OBSOLETE #define PTRACE_ATTACH_CALL(pid) ptx_do_attach(pid)
-// OBSOLETE #define PTRACE_DETACH_CALL(pid, signo) ptx_do_detach(pid, signo)
diff --git a/gdb/config/i386/nm-symmetry.h b/gdb/config/i386/nm-symmetry.h
deleted file mode 100644
index 72b7d8dc0b5..00000000000
--- a/gdb/config/i386/nm-symmetry.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under dynix 3.0,
-// OBSOLETE with Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1998, 2000
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-// OBSOLETE
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
-// OBSOLETE
-// OBSOLETE /* We must fetch all the regs before storing, since we store all at once. */
-// OBSOLETE
-// OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
-// OBSOLETE
-// OBSOLETE #ifdef _SEQUENT_
-// OBSOLETE #define CHILD_WAIT
-// OBSOLETE extern ptid_t child_wait (ptid_t, struct target_waitstatus *);
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* This is the amount to subtract from u.u_ar0
-// OBSOLETE to get the offset in the core file of the register values. */
-// OBSOLETE
-// OBSOLETE #ifdef _SEQUENT_
-// OBSOLETE #include <sys/param.h>
-// OBSOLETE #include <sys/user.h>
-// OBSOLETE #include <sys/mc_vmparam.h>
-// OBSOLETE /* VA_UAREA is defined in <sys/mc_vmparam.h>, and is dependant upon
-// OBSOLETE sizeof(struct user) */
-// OBSOLETE #define KERNEL_U_ADDR (VA_UAREA) /* ptx */
-// OBSOLETE #else
-// OBSOLETE #define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG)) /* dynix */
-// OBSOLETE #endif
diff --git a/gdb/config/i386/obsd.mh b/gdb/config/i386/obsd.mh
index ec22fcb67a7..50a4fb71062 100644
--- a/gdb/config/i386/obsd.mh
+++ b/gdb/config/i386/obsd.mh
@@ -1,11 +1,4 @@
-# Host: Intel 386 running OpenBSD
-
-XM_FILE= xm-i386.h
-
+# Host: OpenBSD/i386 ELF
+NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o i386obsd-nat.o
NAT_FILE= nm-obsd.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o i386obsd-nat.o \
- solib.o solib-sunos.o
-
-# The OpenBSD yacc generates yyname and yyrule tables that conflict at
-# link time if we define YYDEBUG to a non-zero value.
-MH_CFLAGS= -DYYDEBUG=0
+XM_FILE= xm-i386.h
diff --git a/gdb/config/i386/obsd.mt b/gdb/config/i386/obsd.mt
index 72ec51311cc..58e0fc0ebc8 100644
--- a/gdb/config/i386/obsd.mt
+++ b/gdb/config/i386/obsd.mt
@@ -1,3 +1,4 @@
-# Target: Intel 386 running OpenBSD
-TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386obsd-tdep.o corelow.o
-TM_FILE= tm-i386.h
+# Target: OpenBSD/i386
+TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386obsd-tdep.o \
+ corelow.o solib.o solib-svr4.o
+TM_FILE= tm-nbsd.h
diff --git a/gdb/config/i386/obsd64.mh b/gdb/config/i386/obsd64.mh
new file mode 100644
index 00000000000..99ccfa2023f
--- /dev/null
+++ b/gdb/config/i386/obsd64.mh
@@ -0,0 +1,5 @@
+# Host: OpenBSD/amd64
+NATDEPFILES= fork-child.o infptrace.o inftarg.o \
+ amd64-nat.o amd64bsd-nat.o amd64obsd-nat.o
+NAT_FILE= nm-nbsd.h
+XM_FILE= xm-i386.h
diff --git a/gdb/config/i386/obsd64.mt b/gdb/config/i386/obsd64.mt
new file mode 100644
index 00000000000..16be0798e7f
--- /dev/null
+++ b/gdb/config/i386/obsd64.mt
@@ -0,0 +1,5 @@
+# Target: OpenBSD/amd64
+TDEPFILES= amd64-tdep.o amd64obsd-tdep.o \
+ i386-tdep.o i387-tdep.o i386bsd-tdep.o \
+ corelow.o solib.o solib-svr4.o
+TM_FILE= tm-nbsd.h
diff --git a/gdb/config/i386/obsdaout.mh b/gdb/config/i386/obsdaout.mh
new file mode 100644
index 00000000000..3577178946a
--- /dev/null
+++ b/gdb/config/i386/obsdaout.mh
@@ -0,0 +1,5 @@
+# Host: OpenBSD/i386 a.out
+NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o i386obsd-nat.o \
+ solib.o solib-sunos.o
+NAT_FILE= nm-obsd.h
+XM_FILE= xm-i386.h
diff --git a/gdb/config/i386/ptx.mh b/gdb/config/i386/ptx.mh
deleted file mode 100644
index 048f5e5130b..00000000000
--- a/gdb/config/i386/ptx.mh
+++ /dev/null
@@ -1,7 +0,0 @@
-# OBSOLETE # Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387
-# OBSOLETE
-# OBSOLETE XM_FILE= xm-ptx.h
-# OBSOLETE NATDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o
-# OBSOLETE XM_CLIBS= -lPW -lseq
-# OBSOLETE
-# OBSOLETE NAT_FILE= nm-symmetry.h
diff --git a/gdb/config/i386/ptx.mt b/gdb/config/i386/ptx.mt
deleted file mode 100644
index e9551e21c18..00000000000
--- a/gdb/config/i386/ptx.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: Sequent Symmetry running ptx 2.0, with Weitek 1167 or i387.
-# OBSOLETE TDEPFILES= symm-tdep.o i387-tdep.o i386-tdep.o
-# OBSOLETE TM_FILE= tm-ptx.h
diff --git a/gdb/config/i386/ptx4.mh b/gdb/config/i386/ptx4.mh
deleted file mode 100644
index 4d236359f47..00000000000
--- a/gdb/config/i386/ptx4.mh
+++ /dev/null
@@ -1,8 +0,0 @@
-# OBSOLETE # Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387
-# OBSOLETE
-# OBSOLETE XM_FILE= xm-ptx4.h
-# OBSOLETE NATDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o \
-# OBSOLETE core-regset.o solib.o solib-svr4.o solib-legacy.o
-# OBSOLETE XM_CLIBS= -lseq
-# OBSOLETE
-# OBSOLETE NAT_FILE= nm-ptx4.h
diff --git a/gdb/config/i386/ptx4.mt b/gdb/config/i386/ptx4.mt
deleted file mode 100644
index ad268f8c540..00000000000
--- a/gdb/config/i386/ptx4.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: Sequent Symmetry running ptx 4.0, with Weitek 1167 or i387.
-# OBSOLETE TDEPFILES= symm-tdep.o i387-tdep.o i386-tdep.o
-# OBSOLETE TM_FILE= tm-ptx4.h
diff --git a/gdb/config/i386/symmetry.mh b/gdb/config/i386/symmetry.mh
deleted file mode 100644
index 19c5264ff8a..00000000000
--- a/gdb/config/i386/symmetry.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Host: Sequent Symmetry running Dynix 3.0, with Weitek 1167 or i387.
-# OBSOLETE XM_FILE= xm-symmetry.h
-# OBSOLETE NAT_FILE= nm-symmetry.h
-# OBSOLETE NATDEPFILES= inftarg.o fork-child.o corelow.o core-aout.o symm-nat.o
diff --git a/gdb/config/i386/symmetry.mt b/gdb/config/i386/symmetry.mt
deleted file mode 100644
index 8fccbd26f05..00000000000
--- a/gdb/config/i386/symmetry.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: Sequent Symmetry running Dynix 3.0, with Weitek 1167 or i387.
-# OBSOLETE TDEPFILES= i386-tdep.o symm-tdep.o i387-tdep.o
-# OBSOLETE TM_FILE= tm-symmetry.h
diff --git a/gdb/config/i386/tm-cygwin.h b/gdb/config/i386/tm-cygwin.h
index 4b926f96cd4..e7b49de558d 100644
--- a/gdb/config/i386/tm-cygwin.h
+++ b/gdb/config/i386/tm-cygwin.h
@@ -35,5 +35,3 @@ char *solib_address (CORE_ADDR);
char *child_solib_loaded_library_pathname(int);
void child_clear_solibs (void);
void dll_symbol_command (char *, int);
-
-#define LINKER_SYMBOLS_HAVE_WIN32_STDCALL_ARG_SIZES (1)
diff --git a/gdb/config/i386/tm-fbsd.h b/gdb/config/i386/tm-fbsd.h
index 433ef849383..98a2702175c 100644
--- a/gdb/config/i386/tm-fbsd.h
+++ b/gdb/config/i386/tm-fbsd.h
@@ -1,5 +1,6 @@
/* Target-dependent definitions for FreeBSD/i386.
- Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,10 +22,10 @@
#ifndef TM_FBSD_H
#define TM_FBSD_H
-#include "i386/tm-i386.h"
+#include "solib.h"
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#endif /* TM_FBSD_H */
+#endif /* tm-fbsd.h */
diff --git a/gdb/config/i386/tm-i386bsd.h b/gdb/config/i386/tm-i386bsd.h
deleted file mode 100644
index e2b2229efa7..00000000000
--- a/gdb/config/i386/tm-i386bsd.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Macro definitions for i386 running under BSD Unix.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996
- Free Software Foundation, Inc.
-
- This 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_I386BSD_H
-#define TM_I386BSD_H 1
-
-#include "i386/tm-i386.h"
-
-/* 386BSD cannot handle the segment registers. */
-/* BSDI can't handle them either. */
-
-#undef NUM_REGS
-#define NUM_REGS 10
-
-/* On 386 bsd, sigtramp is above the user stack and immediately below
- the user area. Using constants here allows for cross debugging.
- These are tested for BSDI but should work on 386BSD. */
-
-#define SIGTRAMP_START(pc) 0xfdbfdfc0
-#define SIGTRAMP_END(pc) 0xfdbfe000
-
-/* Saved Pc. Get it from sigcontext if within sigtramp. */
-
-/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
-#define SIGCONTEXT_PC_OFFSET 20
-
-#endif /* ifndef TM_I386BSD_H */
diff --git a/gdb/config/i386/tm-i386sol2.h b/gdb/config/i386/tm-i386sol2.h
index 5a79f67dabc..921df26dc07 100644
--- a/gdb/config/i386/tm-i386sol2.h
+++ b/gdb/config/i386/tm-i386sol2.h
@@ -31,6 +31,4 @@ extern char *sunpro_static_transform_name (char *);
#define STATIC_TRANSFORM_NAME(x) sunpro_static_transform_name (x)
#define IS_STATIC_TRANSFORM_NAME(name) ((name)[0] == '.')
-#define FAULTED_USE_SIGINFO
-
#endif /* ifndef TM_I386SOL2_H */
diff --git a/gdb/config/i386/tm-linux.h b/gdb/config/i386/tm-linux.h
index 799678ed8f0..83440a8722f 100644
--- a/gdb/config/i386/tm-linux.h
+++ b/gdb/config/i386/tm-linux.h
@@ -29,14 +29,6 @@
/* The following works around a problem with /usr/include/sys/procfs.h */
#define sys_quotactl 1
-/* When we call a function in a shared library, and the PLT sends us
- into the dynamic linker to find the function's real address, we
- need to skip over the dynamic linker call. This function decides
- when to skip, and where to skip to. See the comments for
- SKIP_SOLIB_RESOLVER at the top of infrun.c. */
-#define SKIP_SOLIB_RESOLVER i386_linux_skip_solib_resolver
-extern CORE_ADDR i386_linux_skip_solib_resolver (CORE_ADDR pc);
-
/* N_FUN symbols in shared libaries have 0 for their values and need
to be relocated. */
#define SOFUN_ADDRESS_MAYBE_MISSING
diff --git a/gdb/config/i386/tm-x86-64linux.h b/gdb/config/i386/tm-linux64.h
index 4c16766f3a8..c3ff3521ea8 100644
--- a/gdb/config/i386/tm-x86-64linux.h
+++ b/gdb/config/i386/tm-linux64.h
@@ -1,6 +1,6 @@
-/* Definitions to target GDB to GNU/Linux on x86-64.
+/* Target-dependent definitions for GNU/Linux x86-64.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Michal Ludvig, SuSE Labs.
@@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef TM_X86_64LINUX_H
-#define TM_X86_64LINUX_H
+#ifndef TM_LINUX64_H
+#define TM_LINUX64_H
/* We define SVR4_SHARED_LIBS unconditionally, on the assumption that
link.h is available on all linux platforms. For I386 and SH3/4, we
@@ -33,4 +33,4 @@
#define SVR4_SHARED_LIBS
#include "solib.h" /* Support for shared libraries. */
-#endif /* #ifndef TM_X86_64LINUX_H */
+#endif /* tm-linux64.h */
diff --git a/gdb/config/i386/tm-nbsd.h b/gdb/config/i386/tm-nbsd.h
index 8e589281325..8fd41580765 100644
--- a/gdb/config/i386/tm-nbsd.h
+++ b/gdb/config/i386/tm-nbsd.h
@@ -1,5 +1,6 @@
-/* Macro definitions for i386 running under NetBSD.
- Copyright 1994, 1996, 2000, 2002 Free Software Foundation, Inc.
+/* Target-dependent definitions for NetBSD/i386.
+
+ Copyright 1994, 1996, 2000, 2002, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,7 +22,6 @@
#ifndef TM_NBSD_H
#define TM_NBSD_H
-#include "i386/tm-i386.h"
#include "solib.h"
-#endif /* TM_NBSD_H */
+#endif /* tm-nbsd.h */
diff --git a/gdb/config/i386/tm-ptx.h b/gdb/config/i386/tm-ptx.h
deleted file mode 100644
index 4d3ba83c30d..00000000000
--- a/gdb/config/i386/tm-ptx.h
+++ /dev/null
@@ -1,194 +0,0 @@
-// OBSOLETE /* Target machine definitions for GDB on a Sequent Symmetry under ptx
-// OBSOLETE with Weitek 1167 and i387 support.
-// OBSOLETE
-// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2000,
-// OBSOLETE 2003 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE Symmetry version by Jay Vosburgh (fubar@sequent.com).
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #ifndef TM_PTX_H
-// OBSOLETE #define TM_PTX_H 1
-// OBSOLETE
-// OBSOLETE /* I don't know if this will work for cross-debugging, even if you do get
-// OBSOLETE a copy of the right include file. */
-// OBSOLETE
-// OBSOLETE #include <sys/reg.h>
-// OBSOLETE
-// OBSOLETE #ifdef SEQUENT_PTX4
-// OBSOLETE #include "i386/tm-i386.h"
-// OBSOLETE #else /* !SEQUENT_PTX4 */
-// OBSOLETE #include "i386/tm-i386.h"
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* Amount PC must be decremented by after a breakpoint. This is often the
-// OBSOLETE number of bytes in BREAKPOINT but not always (such as now). */
-// OBSOLETE
-// OBSOLETE #undef DECR_PC_AFTER_BREAK
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE
-// OBSOLETE /* Number of machine registers */
-// OBSOLETE
-// OBSOLETE #undef NUM_REGS
-// OBSOLETE #define NUM_REGS 49
-// OBSOLETE
-// OBSOLETE /* Initializer for an array of names of registers. There should be at least
-// OBSOLETE NUM_REGS strings in this initializer. Any excess ones are simply ignored.
-// OBSOLETE The order of the first 8 registers must match the compiler's numbering
-// OBSOLETE scheme (which is the same as the 386 scheme) and also regmap in the various
-// OBSOLETE *-nat.c files. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_NAME
-// OBSOLETE #define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
-// OBSOLETE "esp", "ebp", "esi", "edi", \
-// OBSOLETE "eip", "eflags", "st0", "st1", \
-// OBSOLETE "st2", "st3", "st4", "st5", \
-// OBSOLETE "st6", "st7", "fp1", "fp2", \
-// OBSOLETE "fp3", "fp4", "fp5", "fp6", \
-// OBSOLETE "fp7", "fp8", "fp9", "fp10", \
-// OBSOLETE "fp11", "fp12", "fp13", "fp14", \
-// OBSOLETE "fp15", "fp16", "fp17", "fp18", \
-// OBSOLETE "fp19", "fp20", "fp21", "fp22", \
-// OBSOLETE "fp23", "fp24", "fp25", "fp26", \
-// OBSOLETE "fp27", "fp28", "fp29", "fp30", \
-// OBSOLETE "fp31" }
-// OBSOLETE
-// OBSOLETE /* Register numbers of various important registers.
-// OBSOLETE Note that some of these values are "real" register numbers,
-// OBSOLETE and correspond to the general registers of the machine,
-// OBSOLETE and some are "phony" register numbers which are too large
-// OBSOLETE to be actual register numbers as far as the user is concerned
-// OBSOLETE but do serve to get the desired values when passed to read_register. */
-// OBSOLETE
-// OBSOLETE #define EAX_REGNUM 0
-// OBSOLETE #define ECX_REGNUM 1
-// OBSOLETE #define EDX_REGNUM 2
-// OBSOLETE #define EBX_REGNUM 3
-// OBSOLETE
-// OBSOLETE #define ESP_REGNUM 4
-// OBSOLETE #define EBP_REGNUM 5
-// OBSOLETE
-// OBSOLETE #define ESI_REGNUM 6
-// OBSOLETE #define EDI_REGNUM 7
-// OBSOLETE
-// OBSOLETE #define EIP_REGNUM 8
-// OBSOLETE #define EFLAGS_REGNUM 9
-// OBSOLETE
-// OBSOLETE #define ST0_REGNUM 10
-// OBSOLETE #define ST1_REGNUM 11
-// OBSOLETE #define ST2_REGNUM 12
-// OBSOLETE #define ST3_REGNUM 13
-// OBSOLETE
-// OBSOLETE #define ST4_REGNUM 14
-// OBSOLETE #define ST5_REGNUM 15
-// OBSOLETE #define ST6_REGNUM 16
-// OBSOLETE #define ST7_REGNUM 17
-// OBSOLETE
-// OBSOLETE #define FP1_REGNUM 18 /* first 1167 register */
-// OBSOLETE /* Get %fp2 - %fp31 by addition, since they are contiguous */
-// OBSOLETE
-// OBSOLETE #undef SP_REGNUM
-// OBSOLETE #define SP_REGNUM ESP_REGNUM /* Contains address of top of stack */
-// OBSOLETE #undef FP_REGNUM
-// OBSOLETE #define FP_REGNUM EBP_REGNUM /* Contains address of executing stack frame */
-// OBSOLETE #undef PC_REGNUM
-// OBSOLETE #define PC_REGNUM EIP_REGNUM /* Contains program counter */
-// OBSOLETE #undef PS_REGNUM
-// OBSOLETE #define PS_REGNUM EFLAGS_REGNUM /* Contains processor status */
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * For ptx, this is a little bit bizarre, since the register block
-// OBSOLETE * is below the u area in memory. This means that blockend here ends
-// OBSOLETE * up being negative (for the call from coredep.c) since the value in
-// OBSOLETE * u.u_ar0 will be less than KERNEL_U_ADDR (and coredep.c passes us
-// OBSOLETE * u.u_ar0 - KERNEL_U_ADDR in blockend). Since we also define
-// OBSOLETE * FETCH_INFERIOR_REGISTERS (and supply our own functions for that),
-// OBSOLETE * the core file case will be the only use of this function.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE { (addr) = ptx_register_u_addr((blockend), (regno)); }
-// OBSOLETE
-// OBSOLETE extern int ptx_register_u_addr (int, int);
-// OBSOLETE
-// OBSOLETE /* Total amount of space needed to store our copies of the machine's
-// OBSOLETE register state, the array `registers'. 10 i*86 registers, 8 i387
-// OBSOLETE registers, and 31 Weitek 1167 registers */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_BYTES
-// OBSOLETE #define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
-// OBSOLETE
-// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
-// OBSOLETE
-// OBSOLETE #undef DEPRECATED_MAX_REGISTER_RAW_SIZE
-// OBSOLETE #define DEPRECATED_MAX_REGISTER_RAW_SIZE 10
-// OBSOLETE
-// OBSOLETE /* Nonzero if register N requires conversion
-// OBSOLETE from raw format to virtual format. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERTIBLE
-// OBSOLETE #define REGISTER_CONVERTIBLE(N) \
-// OBSOLETE ((N < ST0_REGNUM) ? 0 : \
-// OBSOLETE (N < FP1_REGNUM) ? 1 : \
-// OBSOLETE 0)
-// OBSOLETE
-// OBSOLETE /* Convert data from raw format for register REGNUM
-// OBSOLETE to virtual format for register REGNUM. */
-// OBSOLETE extern const struct floatformat floatformat_i387_ext; /* from floatformat.h */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERT_TO_VIRTUAL
-// OBSOLETE #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
-// OBSOLETE ((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \
-// OBSOLETE (REGNUM < FP1_REGNUM) ? (void)floatformat_to_double(&floatformat_i387_ext, \
-// OBSOLETE (FROM),(TO)) : \
-// OBSOLETE (void)memcpy ((TO), (FROM), 4))
-// OBSOLETE
-// OBSOLETE /* Convert data from virtual format for register REGNUM
-// OBSOLETE to raw format for register REGNUM. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERT_TO_RAW
-// OBSOLETE #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
-// OBSOLETE ((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \
-// OBSOLETE (REGNUM < FP1_REGNUM) ? (void)floatformat_from_double(&floatformat_i387_ext, \
-// OBSOLETE (FROM),(TO)) : \
-// OBSOLETE (void)memcpy ((TO), (FROM), 4))
-// OBSOLETE
-// OBSOLETE /* Return the GDB type object for the "standard" data type
-// OBSOLETE of data in register N. */
-// OBSOLETE /*
-// OBSOLETE * Note: the 1167 registers (the last line, builtin_type_float) are
-// OBSOLETE * generally used in pairs, with each pair being treated as a double.
-// OBSOLETE * It it also possible to use them singly as floats. I'm not sure how
-// OBSOLETE * in gdb to treat the register pair pseudo-doubles. -fubar
-// OBSOLETE */
-// OBSOLETE #undef REGISTER_VIRTUAL_TYPE
-// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \
-// OBSOLETE ((N < ST0_REGNUM) ? builtin_type_int : \
-// OBSOLETE (N < FP1_REGNUM) ? builtin_type_double : \
-// OBSOLETE builtin_type_float)
-// OBSOLETE
-// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
-// OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
-// OBSOLETE into VALBUF. */
-// OBSOLETE
-// OBSOLETE #undef DEPRECATED_EXTRACT_RETURN_VALUE
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-// OBSOLETE symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
-// OBSOLETE
-// OBSOLETE #endif /* ifndef TM_PTX_H */
diff --git a/gdb/config/i386/tm-ptx4.h b/gdb/config/i386/tm-ptx4.h
deleted file mode 100644
index 5f83db40c0a..00000000000
--- a/gdb/config/i386/tm-ptx4.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// OBSOLETE /* Target machine definitions for GDB on a Sequent Symmetry under ptx
-// OBSOLETE with Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE Symmetry version by Jay Vosburgh (fubar@sequent.com).
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #define SEQUENT_PTX4
-// OBSOLETE
-// OBSOLETE #include "i386/tm-ptx.h"
diff --git a/gdb/config/i386/tm-symmetry.h b/gdb/config/i386/tm-symmetry.h
deleted file mode 100644
index c8680a360a7..00000000000
--- a/gdb/config/i386/tm-symmetry.h
+++ /dev/null
@@ -1,291 +0,0 @@
-// OBSOLETE /* Target machine definitions for GDB on a Sequent Symmetry under dynix 3.0,
-// OBSOLETE with Weitek 1167 and i387 support.
-// OBSOLETE
-// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2003 Free
-// OBSOLETE Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE Symmetry version by Jay Vosburgh (fubar@sequent.com).
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #ifndef TM_SYMMETRY_H
-// OBSOLETE #define TM_SYMMETRY_H 1
-// OBSOLETE
-// OBSOLETE #include "regcache.h"
-// OBSOLETE #include "doublest.h"
-// OBSOLETE
-// OBSOLETE /* I don't know if this will work for cross-debugging, even if you do get
-// OBSOLETE a copy of the right include file. */
-// OBSOLETE #include <machine/reg.h>
-// OBSOLETE
-// OBSOLETE #include "i386/tm-i386.h"
-// OBSOLETE
-// OBSOLETE /* Amount PC must be decremented by after a breakpoint. This is often the
-// OBSOLETE number of bytes in BREAKPOINT but not always (such as now). */
-// OBSOLETE
-// OBSOLETE #undef DECR_PC_AFTER_BREAK
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE
-// OBSOLETE /* Number of machine registers */
-// OBSOLETE
-// OBSOLETE #undef NUM_REGS
-// OBSOLETE #define NUM_REGS 49
-// OBSOLETE
-// OBSOLETE /* Initializer for an array of names of registers.
-// OBSOLETE There should be NUM_REGS strings in this initializer. */
-// OBSOLETE
-// OBSOLETE /* Initializer for an array of names of registers. There should be at least
-// OBSOLETE NUM_REGS strings in this initializer. Any excess ones are simply ignored.
-// OBSOLETE Symmetry registers are in this weird order to match the register numbers
-// OBSOLETE in the symbol table entries. If you change the order, things will probably
-// OBSOLETE break mysteriously for no apparent reason. Also note that the st(0)...
-// OBSOLETE st(7) 387 registers are represented as st0...st7. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_NAME
-// OBSOLETE #define REGISTER_NAMES { "eax", "edx", "ecx", "st0", "st1", \
-// OBSOLETE "ebx", "esi", "edi", "st2", "st3", \
-// OBSOLETE "st4", "st5", "st6", "st7", "esp", \
-// OBSOLETE "ebp", "eip", "eflags","fp1", "fp2", \
-// OBSOLETE "fp3", "fp4", "fp5", "fp6", "fp7", \
-// OBSOLETE "fp8", "fp9", "fp10", "fp11", "fp12", \
-// OBSOLETE "fp13", "fp14", "fp15", "fp16", "fp17", \
-// OBSOLETE "fp18", "fp19", "fp20", "fp21", "fp22", \
-// OBSOLETE "fp23", "fp24", "fp25", "fp26", "fp27", \
-// OBSOLETE "fp28", "fp29", "fp30", "fp31" }
-// OBSOLETE
-// OBSOLETE /* Register numbers of various important registers.
-// OBSOLETE Note that some of these values are "real" register numbers,
-// OBSOLETE and correspond to the general registers of the machine,
-// OBSOLETE and some are "phony" register numbers which are too large
-// OBSOLETE to be actual register numbers as far as the user is concerned
-// OBSOLETE but do serve to get the desired values when passed to read_register. */
-// OBSOLETE
-// OBSOLETE #define EAX_REGNUM 0
-// OBSOLETE #define EDX_REGNUM 1
-// OBSOLETE #define ECX_REGNUM 2
-// OBSOLETE #define ST0_REGNUM 3
-// OBSOLETE #define ST1_REGNUM 4
-// OBSOLETE #define EBX_REGNUM 5
-// OBSOLETE #define ESI_REGNUM 6
-// OBSOLETE #define EDI_REGNUM 7
-// OBSOLETE #define ST2_REGNUM 8
-// OBSOLETE #define ST3_REGNUM 9
-// OBSOLETE
-// OBSOLETE #define ST4_REGNUM 10
-// OBSOLETE #define ST5_REGNUM 11
-// OBSOLETE #define ST6_REGNUM 12
-// OBSOLETE #define ST7_REGNUM 13
-// OBSOLETE
-// OBSOLETE #define FP1_REGNUM 18 /* first 1167 register */
-// OBSOLETE /* Get %fp2 - %fp31 by addition, since they are contiguous */
-// OBSOLETE
-// OBSOLETE #undef SP_REGNUM
-// OBSOLETE #define SP_REGNUM 14 /* (usp) Contains address of top of stack */
-// OBSOLETE #define ESP_REGNUM 14
-// OBSOLETE #undef FP_REGNUM
-// OBSOLETE #define FP_REGNUM 15 /* (ebp) Contains address of executing stack frame */
-// OBSOLETE #define EBP_REGNUM 15
-// OBSOLETE #undef PC_REGNUM
-// OBSOLETE #define PC_REGNUM 16 /* (eip) Contains program counter */
-// OBSOLETE #define EIP_REGNUM 16
-// OBSOLETE #undef PS_REGNUM
-// OBSOLETE #define PS_REGNUM 17 /* (ps) Contains processor status */
-// OBSOLETE #define EFLAGS_REGNUM 17
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Following macro translates i386 opcode register numbers to Symmetry
-// OBSOLETE * register numbers. This is used by i386_frame_find_saved_regs.
-// OBSOLETE *
-// OBSOLETE * %eax %ecx %edx %ebx %esp %ebp %esi %edi
-// OBSOLETE * i386 0 1 2 3 4 5 6 7
-// OBSOLETE * Symmetry 0 2 1 5 14 15 6 7
-// OBSOLETE *
-// OBSOLETE */
-// OBSOLETE #define I386_REGNO_TO_SYMMETRY(n) \
-// OBSOLETE ((n)==0?0 :(n)==1?2 :(n)==2?1 :(n)==3?5 :(n)==4?14 :(n)==5?15 :(n))
-// OBSOLETE
-// OBSOLETE /* The magic numbers below are offsets into u_ar0 in the user struct.
-// OBSOLETE * They live in <machine/reg.h>. Gdb calls this macro with blockend
-// OBSOLETE * holding u.u_ar0 - KERNEL_U_ADDR. Only the registers listed are
-// OBSOLETE * saved in the u area (along with a few others that aren't useful
-// OBSOLETE * here. See <machine/reg.h>).
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE { struct user foo; /* needed for finding fpu regs */ \
-// OBSOLETE switch (regno) { \
-// OBSOLETE case 0: \
-// OBSOLETE addr = blockend + EAX * sizeof(int); break; \
-// OBSOLETE case 1: \
-// OBSOLETE addr = blockend + EDX * sizeof(int); break; \
-// OBSOLETE case 2: \
-// OBSOLETE addr = blockend + ECX * sizeof(int); break; \
-// OBSOLETE case 3: /* st(0) */ \
-// OBSOLETE addr = ((int)&foo.u_fpusave.fpu_stack[0][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 4: /* st(1) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[1][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 5: \
-// OBSOLETE addr = blockend + EBX * sizeof(int); break; \
-// OBSOLETE case 6: \
-// OBSOLETE addr = blockend + ESI * sizeof(int); break; \
-// OBSOLETE case 7: \
-// OBSOLETE addr = blockend + EDI * sizeof(int); break; \
-// OBSOLETE case 8: /* st(2) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[2][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 9: /* st(3) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[3][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 10: /* st(4) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[4][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 11: /* st(5) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[5][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 12: /* st(6) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[6][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 13: /* st(7) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[7][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 14: \
-// OBSOLETE addr = blockend + ESP * sizeof(int); break; \
-// OBSOLETE case 15: \
-// OBSOLETE addr = blockend + EBP * sizeof(int); break; \
-// OBSOLETE case 16: \
-// OBSOLETE addr = blockend + EIP * sizeof(int); break; \
-// OBSOLETE case 17: \
-// OBSOLETE addr = blockend + FLAGS * sizeof(int); break; \
-// OBSOLETE case 18: /* fp1 */ \
-// OBSOLETE case 19: /* fp2 */ \
-// OBSOLETE case 20: /* fp3 */ \
-// OBSOLETE case 21: /* fp4 */ \
-// OBSOLETE case 22: /* fp5 */ \
-// OBSOLETE case 23: /* fp6 */ \
-// OBSOLETE case 24: /* fp7 */ \
-// OBSOLETE case 25: /* fp8 */ \
-// OBSOLETE case 26: /* fp9 */ \
-// OBSOLETE case 27: /* fp10 */ \
-// OBSOLETE case 28: /* fp11 */ \
-// OBSOLETE case 29: /* fp12 */ \
-// OBSOLETE case 30: /* fp13 */ \
-// OBSOLETE case 31: /* fp14 */ \
-// OBSOLETE case 32: /* fp15 */ \
-// OBSOLETE case 33: /* fp16 */ \
-// OBSOLETE case 34: /* fp17 */ \
-// OBSOLETE case 35: /* fp18 */ \
-// OBSOLETE case 36: /* fp19 */ \
-// OBSOLETE case 37: /* fp20 */ \
-// OBSOLETE case 38: /* fp21 */ \
-// OBSOLETE case 39: /* fp22 */ \
-// OBSOLETE case 40: /* fp23 */ \
-// OBSOLETE case 41: /* fp24 */ \
-// OBSOLETE case 42: /* fp25 */ \
-// OBSOLETE case 43: /* fp26 */ \
-// OBSOLETE case 44: /* fp27 */ \
-// OBSOLETE case 45: /* fp28 */ \
-// OBSOLETE case 46: /* fp29 */ \
-// OBSOLETE case 47: /* fp30 */ \
-// OBSOLETE case 48: /* fp31 */ \
-// OBSOLETE addr = ((int) &foo.u_fpasave.fpa_regs[(regno)-18] - (int)&foo); \
-// OBSOLETE } \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Total amount of space needed to store our copies of the machine's
-// OBSOLETE register state, the array `registers'. 10 i*86 registers, 8 i387
-// OBSOLETE registers, and 31 Weitek 1167 registers */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_BYTES
-// OBSOLETE #define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
-// OBSOLETE
-// OBSOLETE /* Nonzero if register N requires conversion
-// OBSOLETE from raw format to virtual format. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERTIBLE
-// OBSOLETE #define REGISTER_CONVERTIBLE(N) \
-// OBSOLETE (((N) < 3) ? 0 : \
-// OBSOLETE ((N) < 5) ? 1 : \
-// OBSOLETE ((N) < 8) ? 0 : \
-// OBSOLETE ((N) < 14) ? 1 : \
-// OBSOLETE 0)
-// OBSOLETE
-// OBSOLETE #include "floatformat.h"
-// OBSOLETE
-// OBSOLETE /* Convert data from raw format for register REGNUM in buffer FROM
-// OBSOLETE to virtual format with type TYPE in buffer TO. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERT_TO_VIRTUAL
-// OBSOLETE #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
-// OBSOLETE { \
-// OBSOLETE DOUBLEST val; \
-// OBSOLETE floatformat_to_doublest (&floatformat_i387_ext, (FROM), &val); \
-// OBSOLETE deprecated_store_floating ((TO), TYPE_LENGTH (TYPE), val); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Convert data from virtual format with type TYPE in buffer FROM
-// OBSOLETE to raw format for register REGNUM in buffer TO. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERT_TO_RAW
-// OBSOLETE #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
-// OBSOLETE { \
-// OBSOLETE DOUBLEST val = deprecated_extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
-// OBSOLETE floatformat_from_doublest (&floatformat_i387_ext, &val, (TO)); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Return the GDB type object for the "standard" data type
-// OBSOLETE of data in register N. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_VIRTUAL_TYPE
-// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \
-// OBSOLETE ((N < 3) ? builtin_type_int : \
-// OBSOLETE (N < 5) ? builtin_type_double : \
-// OBSOLETE (N < 8) ? builtin_type_int : \
-// OBSOLETE (N < 14) ? builtin_type_double : \
-// OBSOLETE builtin_type_int)
-// OBSOLETE
-// OBSOLETE /* Store the address of the place in which to copy the structure the
-// OBSOLETE subroutine will return. This is called from call_function.
-// OBSOLETE Native cc passes the address in eax, gcc (up to version 2.5.8)
-// OBSOLETE passes it on the stack. gcc should be fixed in future versions to
-// OBSOLETE adopt native cc conventions. */
-// OBSOLETE
-// OBSOLETE #undef DEPRECATED_PUSH_ARGUMENTS
-// OBSOLETE #undef STORE_STRUCT_RETURN
-// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) write_register(0, (ADDR))
-// OBSOLETE
-// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
-// OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
-// OBSOLETE into VALBUF. */
-// OBSOLETE
-// OBSOLETE #undef DEPRECATED_EXTRACT_RETURN_VALUE
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-// OBSOLETE symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
-// OBSOLETE
-// OBSOLETE /* The following redefines make backtracing through sigtramp work.
-// OBSOLETE They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp
-// OBSOLETE from the sigcontext structure which is pushed by the kernel on the
-// OBSOLETE user stack, along with a pointer to it. */
-// OBSOLETE
-// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", name))
-// OBSOLETE
-// OBSOLETE /* Offset to saved PC in sigcontext, from <signal.h>. */
-// OBSOLETE #define SIGCONTEXT_PC_OFFSET 16
-// OBSOLETE
-// OBSOLETE #endif /* ifndef TM_SYMMETRY_H */
diff --git a/gdb/config/i386/x86-64linux.mt b/gdb/config/i386/x86-64linux.mt
deleted file mode 100644
index 9ef593844e2..00000000000
--- a/gdb/config/i386/x86-64linux.mt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Target: AMD x86-64 running GNU/Linux
-TDEPFILES= x86-64-tdep.o x86-64-linux-tdep.o \
- i386-tdep.o i387-tdep.o i386-linux-tdep.o \
- solib.o solib-svr4.o solib-legacy.o corelow.o
-
-TM_FILE=tm-x86-64linux.h
diff --git a/gdb/config/i386/xm-i386.h b/gdb/config/i386/xm-i386.h
index 151e7a6b556..de29b265998 100644
--- a/gdb/config/i386/xm-i386.h
+++ b/gdb/config/i386/xm-i386.h
@@ -1,5 +1,6 @@
-/* Host-dependent definitions for i386.
- Copyright 2001 Free Software Foundation, Inc.
+/* Host-dependent definitions for the i386.
+
+ Copyright 2001, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -27,4 +28,4 @@
#define HOST_DOUBLE_FORMAT &floatformat_ieee_double_little
#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
-#endif /* XM_386_H */
+#endif /* xm-i386.h */
diff --git a/gdb/config/i386/xm-nbsd.h b/gdb/config/i386/xm-nbsd.h
index 4a998cde4ee..703c261ebe8 100644
--- a/gdb/config/i386/xm-nbsd.h
+++ b/gdb/config/i386/xm-nbsd.h
@@ -1,5 +1,6 @@
-/* Parameters for execution on a i386 running NetBSD, for GDB.
- Copyright 1994, 2000 Free Software Foundation, Inc.
+/* Host-dependent definitions for NetBSD/i386.
+
+ Copyright 1994, 2000, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,7 +19,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* Get generic NetBSD host definitions. */
-#include "config/xm-nbsd.h"
+#include "i386/xm-i386.h"
-#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
+/* Get generic NetBSD host definitions. */
+#include "config/xm-nbsd.h"
diff --git a/gdb/config/i386/xm-ptx.h b/gdb/config/i386/xm-ptx.h
deleted file mode 100644
index 1ecae0cd9d7..00000000000
--- a/gdb/config/i386/xm-ptx.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under ptx, with
-// OBSOLETE Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
-// OBSOLETE
-// OBSOLETE #ifdef _SEQUENT_PTX4_
-// OBSOLETE #include "config/xm-sysv4.h"
-// OBSOLETE #endif /* _SEQUENT_PTX4_ */
-// OBSOLETE
-// OBSOLETE /* This machine doesn't have the siginterrupt call. */
-// OBSOLETE #define NO_SIGINTERRUPT
-// OBSOLETE
-// OBSOLETE #define HAVE_WAIT_STRUCT
-// OBSOLETE
-// OBSOLETE #undef HAVE_TERMIO
-// OBSOLETE #define HAVE_TERMIOS
-// OBSOLETE #define USG
-// OBSOLETE
-// OBSOLETE #define USE_O_NOCTTY
diff --git a/gdb/config/i386/xm-ptx4.h b/gdb/config/i386/xm-ptx4.h
deleted file mode 100644
index 7f0605d3e6a..00000000000
--- a/gdb/config/i386/xm-ptx4.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under ptx, with
-// OBSOLETE Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993, 1994
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
-// OBSOLETE
-// OBSOLETE #include "config/xm-sysv4.h"
-// OBSOLETE
-// OBSOLETE #include "i386/xm-ptx.h"
diff --git a/gdb/config/i386/xm-symmetry.h b/gdb/config/i386/xm-symmetry.h
deleted file mode 100644
index 27711f257d4..00000000000
--- a/gdb/config/i386/xm-symmetry.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under
-// OBSOLETE dynix 3.1, with Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993, 1994
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
-// OBSOLETE
-// OBSOLETE /* This machine doesn't have the siginterrupt call. */
-// OBSOLETE #define NO_SIGINTERRUPT
-// OBSOLETE
-// OBSOLETE #define HAVE_WAIT_STRUCT
diff --git a/gdb/config/ia64/nm-linux.h b/gdb/config/ia64/nm-linux.h
index 0418495c111..5e9df60021c 100644
--- a/gdb/config/ia64/nm-linux.h
+++ b/gdb/config/ia64/nm-linux.h
@@ -22,6 +22,8 @@
#ifndef NM_LINUX_H
#define NM_LINUX_H
+struct target_ops;
+
#include "config/nm-linux.h"
/* Note: It seems likely that we'll have to eventually define
@@ -69,4 +71,15 @@ extern int ia64_linux_insert_watchpoint (ptid_t ptid, CORE_ADDR addr,
extern int ia64_linux_remove_watchpoint (ptid_t ptid, CORE_ADDR addr,
int len);
+#include "target.h"
+
+#define NATIVE_XFER_UNWIND_TABLE ia64_linux_xfer_unwind_table
+extern LONGEST ia64_linux_xfer_unwind_table (struct target_ops *ops,
+ enum target_object object,
+ const char *annex,
+ void *readbuf,
+ const void *writebuf,
+ ULONGEST offset,
+ LONGEST len);
+
#endif /* #ifndef NM_LINUX_H */
diff --git a/gdb/config/ia64/tm-aix.h b/gdb/config/ia64/tm-aix.h
index b59d6dd11cd..186cd93ae75 100644
--- a/gdb/config/ia64/tm-aix.h
+++ b/gdb/config/ia64/tm-aix.h
@@ -27,6 +27,6 @@
#define TARGET_ELF64
extern int ia64_aix_in_sigtramp (CORE_ADDR pc, char *func_name);
-#define IN_SIGTRAMP(pc,func_name) ia64_aix_in_sigtramp (pc, func_name)
+#define DEPRECATED_IN_SIGTRAMP(pc,func_name) ia64_aix_in_sigtramp (pc, func_name)
#endif /* #ifndef TM_AIX_H */
diff --git a/gdb/config/ia64/tm-linux.h b/gdb/config/ia64/tm-linux.h
index 60517525467..4aa6d8598c3 100644
--- a/gdb/config/ia64/tm-linux.h
+++ b/gdb/config/ia64/tm-linux.h
@@ -29,6 +29,6 @@
#define TARGET_ELF64
extern int ia64_linux_in_sigtramp (CORE_ADDR pc, char *func_name);
-#define IN_SIGTRAMP(pc,func_name) ia64_linux_in_sigtramp (pc, func_name)
+#define DEPRECATED_IN_SIGTRAMP(pc,func_name) ia64_linux_in_sigtramp (pc, func_name)
#endif /* #ifndef TM_LINUX_H */
diff --git a/gdb/config/m32r/m32r.mt b/gdb/config/m32r/m32r.mt
index 6d578c880fa..ff6def0cdb4 100644
--- a/gdb/config/m32r/m32r.mt
+++ b/gdb/config/m32r/m32r.mt
@@ -1,4 +1,4 @@
# Target: Renesas m32r processor
-TDEPFILES= m32r-tdep.o monitor.o m32r-rom.o dsrec.o
+TDEPFILES= m32r-tdep.o monitor.o m32r-rom.o dsrec.o remote-m32r-sdi.o
SIM_OBS = remote-sim.o
SIM = ../sim/m32r/libsim.a
diff --git a/gdb/config/m68k/3b1.mh b/gdb/config/m68k/3b1.mh
index e305e672d6c..1ebba273f7f 100644
--- a/gdb/config/m68k/3b1.mh
+++ b/gdb/config/m68k/3b1.mh
@@ -1,12 +1,12 @@
-# Host: AT&T 3b1/Unix pc
-# I don't think cc has been tried. -traditional for <sys/ioctl.h>
-# (not sure whether necessary).
-CC= gcc -traditional
-# GCC runs out of virtual memory.
-# A separate CC for pinsn routines is no longer supported, though.
-# FIXME -- someone unlucky enough to have a 3B1, let bug-gcc@prep.ai.mit.edu
-# know what works and what fails on the 3B1.
-#PINSN_CC= cc
-
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
-XM_FILE= xm-3b1.h
+# OBSOLETE # Host: AT&T 3b1/Unix pc
+# OBSOLETE # I don't think cc has been tried. -traditional for <sys/ioctl.h>
+# OBSOLETE # (not sure whether necessary).
+# OBSOLETE CC= gcc -traditional
+# OBSOLETE # GCC runs out of virtual memory.
+# OBSOLETE # A separate CC for pinsn routines is no longer supported, though.
+# OBSOLETE # FIXME -- someone unlucky enough to have a 3B1, let bug-gcc@prep.ai.mit.edu
+# OBSOLETE # know what works and what fails on the 3B1.
+# OBSOLETE #PINSN_CC= cc
+# OBSOLETE
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
+# OBSOLETE XM_FILE= xm-3b1.h
diff --git a/gdb/config/m68k/3b1.mt b/gdb/config/m68k/3b1.mt
index 4c5d9d4bb07..745918758b2 100644
--- a/gdb/config/m68k/3b1.mt
+++ b/gdb/config/m68k/3b1.mt
@@ -1,3 +1,3 @@
-# Target: AT&T 3b1/Unix pc
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-3b1.h
+# OBSOLETE # Target: AT&T 3b1/Unix pc
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-3b1.h
diff --git a/gdb/config/m68k/delta68.mh b/gdb/config/m68k/delta68.mh
index 5492af08d73..cfa14baca26 100644
--- a/gdb/config/m68k/delta68.mh
+++ b/gdb/config/m68k/delta68.mh
@@ -1,5 +1,5 @@
-# Host: Motorola Delta Series sysV68 R3V7.1
-
-XM_FILE= xm-delta68.h
-NAT_FILE= nm-delta68.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o delta68-nat.o
+# OBSOLETE # Host: Motorola Delta Series sysV68 R3V7.1
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-delta68.h
+# OBSOLETE NAT_FILE= nm-delta68.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o delta68-nat.o
diff --git a/gdb/config/m68k/delta68.mt b/gdb/config/m68k/delta68.mt
index 2761329f2c8..743a92a3ae6 100644
--- a/gdb/config/m68k/delta68.mt
+++ b/gdb/config/m68k/delta68.mt
@@ -1,3 +1,3 @@
-# Motorola Delta Series sysV68 R3V7.1
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-delta68.h
+# OBSOLETE # Motorola Delta Series sysV68 R3V7.1
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-delta68.h
diff --git a/gdb/config/m68k/dpx2.mh b/gdb/config/m68k/dpx2.mh
index 25ed85ee6fd..e9c5b68c58e 100644
--- a/gdb/config/m68k/dpx2.mh
+++ b/gdb/config/m68k/dpx2.mh
@@ -1,6 +1,6 @@
-# Host: Bull DPX2 (68k, System V release 3)
-
-XM_FILE= xm-dpx2.h
-
-NAT_FILE= nm-dpx2.h
-NATDEPFILES= infptrace.o corelow.o core-aout.o inftarg.o dpx2-nat.o fork-child.o
+# OBSOLETE # Host: Bull DPX2 (68k, System V release 3)
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-dpx2.h
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-dpx2.h
+# OBSOLETE NATDEPFILES= infptrace.o corelow.o core-aout.o inftarg.o dpx2-nat.o fork-child.o
diff --git a/gdb/config/m68k/dpx2.mt b/gdb/config/m68k/dpx2.mt
index 5bbbbe6fd8d..7cecda6af3d 100644
--- a/gdb/config/m68k/dpx2.mt
+++ b/gdb/config/m68k/dpx2.mt
@@ -1,3 +1,3 @@
-# Target: Bull DPX2 (68k, System V release 3)
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-dpx2.h
+# OBSOLETE # Target: Bull DPX2 (68k, System V release 3)
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-dpx2.h
diff --git a/gdb/config/m68k/m68klynx.mh b/gdb/config/m68k/m68klynx.mh
index 3838012a801..c76dccecfb1 100644
--- a/gdb/config/m68k/m68klynx.mh
+++ b/gdb/config/m68k/m68klynx.mh
@@ -1,6 +1,6 @@
-# Host: Motorola 680x0 running LynxOS
-
-XM_CLIBS= -lbsd
-
-NAT_FILE= nm-m68klynx.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o lynx-nat.o
+# OBSOLETE # Host: Motorola 680x0 running LynxOS
+# OBSOLETE
+# OBSOLETE XM_CLIBS= -lbsd
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-m68klynx.h
+# OBSOLETE NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o lynx-nat.o
diff --git a/gdb/config/m68k/m68klynx.mt b/gdb/config/m68k/m68klynx.mt
index 4aeac96d881..e3a3c797ece 100644
--- a/gdb/config/m68k/m68klynx.mt
+++ b/gdb/config/m68k/m68klynx.mt
@@ -1,4 +1,4 @@
-# Target: Motorola 680x0 running LynxOS
-TDEPFILES= coff-solib.o m68k-tdep.o
-# m68kly-tdep.o
-TM_FILE= tm-m68klynx.h
+# OBSOLETE # Target: Motorola 680x0 running LynxOS
+# OBSOLETE TDEPFILES= coff-solib.o m68k-tdep.o
+# OBSOLETE # m68kly-tdep.o
+# OBSOLETE TM_FILE= tm-m68klynx.h
diff --git a/gdb/config/m68k/m68kv4.mh b/gdb/config/m68k/m68kv4.mh
index 7deb1309c08..23c64fab82d 100644
--- a/gdb/config/m68k/m68kv4.mh
+++ b/gdb/config/m68k/m68kv4.mh
@@ -1,7 +1,7 @@
-# Host: Motorola 680x0 running SVR4 (Commodore Amiga amix or Atari TT ASV)
-
-XM_FILE= xm-m68kv4.h
-
-NAT_FILE= nm-sysv4.h
-NATDEPFILES= corelow.o core-regset.o solib.o solib-svr4.o solib-legacy.o \
- fork-child.o procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
+# OBSOLETE # Host: Motorola 680x0 running SVR4 (Commodore Amiga amix or Atari TT ASV)
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-m68kv4.h
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-sysv4.h
+# OBSOLETE NATDEPFILES= corelow.o core-regset.o solib.o solib-svr4.o solib-legacy.o \
+# OBSOLETE fork-child.o procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
diff --git a/gdb/config/m68k/m68kv4.mt b/gdb/config/m68k/m68kv4.mt
index fcabb172d50..0a9ad08d795 100644
--- a/gdb/config/m68k/m68kv4.mt
+++ b/gdb/config/m68k/m68kv4.mt
@@ -1,3 +1,3 @@
-# Target: Motorola 680x0 running SVR4 (Commodore Amiga amix or Atari TT ASV)
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-m68kv4.h
+# OBSOLETE # Target: Motorola 680x0 running SVR4 (Commodore Amiga amix or Atari TT ASV)
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-m68kv4.h
diff --git a/gdb/config/m68k/nm-delta68.h b/gdb/config/m68k/nm-delta68.h
index 78871a06a97..e27bb69a449 100644
--- a/gdb/config/m68k/nm-delta68.h
+++ b/gdb/config/m68k/nm-delta68.h
@@ -1,22 +1,22 @@
-/* Macro definitions for a Motorola Delta Series sysV68 R3V7.1.
- Copyright 1993, 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. */
-
-
-#define KERNEL_U_SIZE kernel_u_size()
+// OBSOLETE /* Macro definitions for a Motorola Delta Series sysV68 R3V7.1.
+// OBSOLETE Copyright 1993, 1998 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE #define KERNEL_U_SIZE kernel_u_size()
diff --git a/gdb/config/m68k/nm-dpx2.h b/gdb/config/m68k/nm-dpx2.h
index 4c88a6c8a1e..f6cce8a0412 100644
--- a/gdb/config/m68k/nm-dpx2.h
+++ b/gdb/config/m68k/nm-dpx2.h
@@ -1,29 +1,29 @@
-/* Native support for a Bull DPX2.
- Copyright 1986, 1987, 1989, 1993, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* KERNEL_U_ADDR is determined upon startup in dpx2-xdep.c. */
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- (addr) = dpx2_register_u_addr ((blockend),(regno));
-
-extern int dpx2_register_u_addr (int, int);
-
-/* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
-#define ONE_PROCESS_WRITETEXT
+// OBSOLETE /* Native support for a Bull DPX2.
+// OBSOLETE Copyright 1986, 1987, 1989, 1993, 2000 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* KERNEL_U_ADDR is determined upon startup in dpx2-xdep.c. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE (addr) = dpx2_register_u_addr ((blockend),(regno));
+// OBSOLETE
+// OBSOLETE extern int dpx2_register_u_addr (int, int);
+// OBSOLETE
+// OBSOLETE /* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
+// OBSOLETE #define ONE_PROCESS_WRITETEXT
diff --git a/gdb/config/m68k/nm-m68klynx.h b/gdb/config/m68k/nm-m68klynx.h
index 9d95d3728dd..88b1260522b 100644
--- a/gdb/config/m68k/nm-m68klynx.h
+++ b/gdb/config/m68k/nm-m68klynx.h
@@ -1,26 +1,26 @@
-/* Native-dependent definitions for Motorola 680x0 running LynxOS.
- Copyright 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef NM_M68KLYNX_H
-#define NM_M68KLYNX_H
-
-#include "config/nm-lynx.h"
-
-#endif /* NM_M68KLYNX_H */
+// OBSOLETE /* Native-dependent definitions for Motorola 680x0 running LynxOS.
+// OBSOLETE Copyright 1993 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #ifndef NM_M68KLYNX_H
+// OBSOLETE #define NM_M68KLYNX_H
+// OBSOLETE
+// OBSOLETE #include "config/nm-lynx.h"
+// OBSOLETE
+// OBSOLETE #endif /* NM_M68KLYNX_H */
diff --git a/gdb/config/m68k/nm-sun2.h b/gdb/config/m68k/nm-sun2.h
index 5d55caf2165..cce4a3e8ee0 100644
--- a/gdb/config/m68k/nm-sun2.h
+++ b/gdb/config/m68k/nm-sun2.h
@@ -1,34 +1,34 @@
-/* Parameters for execution on a Sun2, 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
-
-/* This is a piece of magic that is given a register number REGNO
- and as BLOCKEND the address in the system of the end of the user structure
- and stores in ADDR the address in the kernel or core dump
- of that register. */
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
-{ addr = blockend + regno * 4; }
+// OBSOLETE /* Parameters for execution on a Sun2, for GDB, the GNU debugger.
+// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Do implement the attach and detach commands. */
+// OBSOLETE
+// OBSOLETE #define ATTACH_DETACH
+// OBSOLETE
+// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
+// OBSOLETE
+// OBSOLETE /* This is a piece of magic that is given a register number REGNO
+// OBSOLETE and as BLOCKEND the address in the system of the end of the user structure
+// OBSOLETE and stores in ADDR the address in the kernel or core dump
+// OBSOLETE of that register. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE { addr = blockend + regno * 4; }
diff --git a/gdb/config/m68k/nm-sun3.h b/gdb/config/m68k/nm-sun3.h
index 3c5d47ebb82..9e50707b9dc 100644
--- a/gdb/config/m68k/nm-sun3.h
+++ b/gdb/config/m68k/nm-sun3.h
@@ -1,34 +1,34 @@
-/* Native-only definitions for Sun-3 for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 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. */
-
-#include "regcache.h"
-
-/* Do implement the attach and detach commands. */
-
-#define ATTACH_DETACH
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-
-#define FETCH_INFERIOR_REGISTERS
-
-/* We have to grab the regs since we store all regs at once. */
-
-#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
+// OBSOLETE /* Native-only definitions for Sun-3 for GDB, the GNU debugger.
+// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1996
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "regcache.h"
+// OBSOLETE
+// OBSOLETE /* Do implement the attach and detach commands. */
+// OBSOLETE
+// OBSOLETE #define ATTACH_DETACH
+// OBSOLETE
+// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
+// OBSOLETE
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
+// OBSOLETE
+// OBSOLETE /* We have to grab the regs since we store all regs at once. */
+// OBSOLETE
+// OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
diff --git a/gdb/config/m68k/nm-sysv4.h b/gdb/config/m68k/nm-sysv4.h
index b9cb591f389..6e3a45205c7 100644
--- a/gdb/config/m68k/nm-sysv4.h
+++ b/gdb/config/m68k/nm-sysv4.h
@@ -1,23 +1,23 @@
-/* Native-dependent definitions for Motorola 680x0 running SVR4.
- Copyright 1994 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Include the generic SVR4 definitions. */
-
-#include "config/nm-sysv4.h"
+// OBSOLETE /* Native-dependent definitions for Motorola 680x0 running SVR4.
+// OBSOLETE Copyright 1994 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Include the generic SVR4 definitions. */
+// OBSOLETE
+// OBSOLETE #include "config/nm-sysv4.h"
diff --git a/gdb/config/m68k/sun2os3.mh b/gdb/config/m68k/sun2os3.mh
index 3d868daa4d6..2243a280e34 100644
--- a/gdb/config/m68k/sun2os3.mh
+++ b/gdb/config/m68k/sun2os3.mh
@@ -1,4 +1,4 @@
-# Host: Sun 2, running SunOS 3
-XM_FILE= xm-sun2.h
-NAT_FILE= nm-sun2.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o sun3-nat.o
+# OBSOLETE # Host: Sun 2, running SunOS 3
+# OBSOLETE XM_FILE= xm-sun2.h
+# OBSOLETE NAT_FILE= nm-sun2.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun2os3.mt b/gdb/config/m68k/sun2os3.mt
index 12b7c7fec8a..343bccd16f0 100644
--- a/gdb/config/m68k/sun2os3.mt
+++ b/gdb/config/m68k/sun2os3.mt
@@ -1,7 +1,7 @@
-# Target: Sun 2, running SunOS 3
-# The system-supplied assembler re-orders the symbols so that gdb
-# can't find "gcc_compiled.".
-#msg If you compile your program with GCC, use the GNU assembler.
-#msg
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-sun2.h
+# OBSOLETE # Target: Sun 2, running SunOS 3
+# OBSOLETE # The system-supplied assembler re-orders the symbols so that gdb
+# OBSOLETE # can't find "gcc_compiled.".
+# OBSOLETE #msg If you compile your program with GCC, use the GNU assembler.
+# OBSOLETE #msg
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-sun2.h
diff --git a/gdb/config/m68k/sun2os4.mh b/gdb/config/m68k/sun2os4.mh
index 29fe1e89c82..ab9c7204938 100644
--- a/gdb/config/m68k/sun2os4.mh
+++ b/gdb/config/m68k/sun2os4.mh
@@ -1,4 +1,4 @@
-# Host: Sun 2, running SunOS 4
-XM_FILE= xm-sun2.h
-NAT_FILE= nm-sun2.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o sun3-nat.o
+# OBSOLETE # Host: Sun 2, running SunOS 4
+# OBSOLETE XM_FILE= xm-sun2.h
+# OBSOLETE NAT_FILE= nm-sun2.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun2os4.mt b/gdb/config/m68k/sun2os4.mt
index 4d8e6decebe..30ff4e3971a 100644
--- a/gdb/config/m68k/sun2os4.mt
+++ b/gdb/config/m68k/sun2os4.mt
@@ -1,3 +1,3 @@
-# Target: Sun 2, running SunOS 4
-TDEPFILES= solib.o solib-sunos.o m68k-tdep.o
-TM_FILE= tm-sun2os4.h
+# OBSOLETE # Target: Sun 2, running SunOS 4
+# OBSOLETE TDEPFILES= solib.o solib-sunos.o m68k-tdep.o
+# OBSOLETE TM_FILE= tm-sun2os4.h
diff --git a/gdb/config/m68k/sun3os3.mh b/gdb/config/m68k/sun3os3.mh
index bf036229216..e7c820f43a0 100644
--- a/gdb/config/m68k/sun3os3.mh
+++ b/gdb/config/m68k/sun3os3.mh
@@ -1,4 +1,4 @@
-# Host: Sun 3, running SunOS 3
-XM_FILE= xm-sun3.h
-NAT_FILE= nm-sun3.h
-NATDEPFILES= fork-child.o inftarg.o infptrace.o corelow.o sun3-nat.o
+# OBSOLETE # Host: Sun 3, running SunOS 3
+# OBSOLETE XM_FILE= xm-sun3.h
+# OBSOLETE NAT_FILE= nm-sun3.h
+# OBSOLETE NATDEPFILES= fork-child.o inftarg.o infptrace.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun3os3.mt b/gdb/config/m68k/sun3os3.mt
index 8f9dac85e0e..4ea0d2741ae 100644
--- a/gdb/config/m68k/sun3os3.mt
+++ b/gdb/config/m68k/sun3os3.mt
@@ -1,8 +1,8 @@
-# Target: Sun 3, running SunOS 3
-# The system-supplied assembler re-orders the symbols so that gdb
-# can't find "gcc_compiled.".
-#msg If you compile your program with GCC, use the GNU assembler.
-#msg
-
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-sun3.h
+# OBSOLETE # Target: Sun 3, running SunOS 3
+# OBSOLETE # The system-supplied assembler re-orders the symbols so that gdb
+# OBSOLETE # can't find "gcc_compiled.".
+# OBSOLETE #msg If you compile your program with GCC, use the GNU assembler.
+# OBSOLETE #msg
+# OBSOLETE
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-sun3.h
diff --git a/gdb/config/m68k/sun3os4.mh b/gdb/config/m68k/sun3os4.mh
index 18b1f081258..dc3f9afde76 100644
--- a/gdb/config/m68k/sun3os4.mh
+++ b/gdb/config/m68k/sun3os4.mh
@@ -1,4 +1,4 @@
-# Host: Sun 3, running SunOS 4
-XM_FILE= xm-sun3os4.h
-NAT_FILE= nm-sun3.h
-NATDEPFILES= fork-child.o inftarg.o infptrace.o corelow.o sun3-nat.o
+# OBSOLETE # Host: Sun 3, running SunOS 4
+# OBSOLETE XM_FILE= xm-sun3os4.h
+# OBSOLETE NAT_FILE= nm-sun3.h
+# OBSOLETE NATDEPFILES= fork-child.o inftarg.o infptrace.o corelow.o sun3-nat.o
diff --git a/gdb/config/m68k/sun3os4.mt b/gdb/config/m68k/sun3os4.mt
index 64f1a300dbc..decf0b30d4d 100644
--- a/gdb/config/m68k/sun3os4.mt
+++ b/gdb/config/m68k/sun3os4.mt
@@ -1,3 +1,3 @@
-# Target: Sun 3, running SunOS 4, as a target system
-TDEPFILES= solib.o solib-sunos.o m68k-tdep.o
-TM_FILE= tm-sun3os4.h
+# OBSOLETE # Target: Sun 3, running SunOS 4, as a target system
+# OBSOLETE TDEPFILES= solib.o solib-sunos.o m68k-tdep.o
+# OBSOLETE TM_FILE= tm-sun3os4.h
diff --git a/gdb/config/m68k/tm-3b1.h b/gdb/config/m68k/tm-3b1.h
index 90888c66655..df845bd30ac 100644
--- a/gdb/config/m68k/tm-3b1.h
+++ b/gdb/config/m68k/tm-3b1.h
@@ -1,33 +1,33 @@
-/* Parameters for targeting GDB to a 3b1.
- Copyright 1986, 1987, 1989, 1991, 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* The child target can't deal with floating registers. */
-#define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
-
-/* Define BPT_VECTOR if it is different than the default.
- This is the vector number used by traps to indicate a breakpoint. */
-
-#define BPT_VECTOR 0x1
-
-/* Address of end of stack space. */
-
-#define STACK_END_ADDR 0x300000
-
-#include "m68k/tm-m68k.h"
+// OBSOLETE /* Parameters for targeting GDB to a 3b1.
+// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1993 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* The child target can't deal with floating registers. */
+// OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
+// OBSOLETE
+// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
+// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
+// OBSOLETE
+// OBSOLETE #define BPT_VECTOR 0x1
+// OBSOLETE
+// OBSOLETE /* Address of end of stack space. */
+// OBSOLETE
+// OBSOLETE #define STACK_END_ADDR 0x300000
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-cisco.h b/gdb/config/m68k/tm-cisco.h
index 24db025bccf..51e2cdc39a2 100644
--- a/gdb/config/m68k/tm-cisco.h
+++ b/gdb/config/m68k/tm-cisco.h
@@ -51,5 +51,5 @@
/* BFD handles finding the registers in the core file, so they are at
the start of the BFD .reg section. */
-#define REGISTER_U_ADDR(addr,blockend,regno) (addr = REGISTER_BYTE (regno))
+#define REGISTER_U_ADDR(addr,blockend,regno) (addr = DEPRECATED_REGISTER_BYTE (regno))
#define KERNEL_U_ADDR 0
diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h
index 25b747ec8eb..c041060a8a6 100644
--- a/gdb/config/m68k/tm-delta68.h
+++ b/gdb/config/m68k/tm-delta68.h
@@ -1,109 +1,109 @@
-/* Target definitions for delta68.
- Copyright 1993, 1994, 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. */
-
-struct frame_info;
-
-#include "regcache.h"
-
-/* Define BPT_VECTOR if it is different than the default.
- This is the vector number used by traps to indicate a breakpoint. */
-
-#define BPT_VECTOR 0x1
-
-#define GCC_COMPILED_FLAG_SYMBOL "gcc_compiled%"
-#define GCC2_COMPILED_FLAG_SYMBOL "gcc2_compiled%"
-
-/* Amount PC must be decremented by after a breakpoint.
- On the Delta, the kernel decrements it for us. */
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* Not sure what happens if we try to store this register, but
- phdm@info.ucl.ac.be says we need this define. */
-
-#define CANNOT_STORE_REGISTER(regno) (regno == FPI_REGNUM)
-
-/* 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. */
-
-/* When it returns a float/double value, use fp0 in sysV68. */
-/* When it returns a pointer value, use a0 in sysV68. */
-
-#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
- DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
- &REGBUF[REGISTER_BYTE (FP0_REGNUM)], \
- VALBUF); \
- else \
- memcpy ((VALBUF), \
- (char *) ((REGBUF) + \
- (TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : \
- (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)))), \
- TYPE_LENGTH(TYPE))
-
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. */
-
-/* When it returns a float/double value, use fp0 in sysV68. */
-/* When it returns a pointer value, use a0 in sysV68. */
-
-#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
- if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
- { \
- char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
- DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
- deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
- raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
- } \
- else \
- deprecated_write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
- VALBUF, TYPE_LENGTH (TYPE))
-
-/* Return number of args passed to a frame.
- Can return -1, meaning no way to tell. */
-
-extern int delta68_frame_num_args (struct frame_info *fi);
-#define FRAME_NUM_ARGS(fi) (delta68_frame_num_args ((fi)))
-
-/* On M68040 versions of sysV68 R3V7.1, ptrace(PT_WRITE_I) does not clear
- the processor's instruction cache as it should. */
-#define CLEAR_INSN_CACHE() clear_insn_cache()
-
-#include "m68k/tm-m68k.h"
-
-/* Extract from an array REGBUF containing the (raw) register state
- the address in which a function should return its structure value,
- as a CORE_ADDR (or an expression that can be used as one). */
-
-#undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\
- (*(CORE_ADDR *)((char*)(REGBUF) + 8 * 4))
-
-extern int delta68_in_sigtramp (CORE_ADDR pc, char *name);
-#define IN_SIGTRAMP(pc,name) delta68_in_sigtramp (pc, name)
-
-extern CORE_ADDR delta68_frame_saved_pc (struct frame_info *fi);
-#undef DEPRECATED_FRAME_SAVED_PC
-#define DEPRECATED_FRAME_SAVED_PC(fi) delta68_frame_saved_pc (fi)
-
-extern CORE_ADDR delta68_frame_args_address (struct frame_info *fi);
-#undef DEPRECATED_FRAME_ARGS_ADDRESS
-#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
+// OBSOLETE /* Target definitions for delta68.
+// OBSOLETE Copyright 1993, 1994, 1998, 1999, 2000 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE struct frame_info;
+// OBSOLETE
+// OBSOLETE #include "regcache.h"
+// OBSOLETE
+// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
+// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
+// OBSOLETE
+// OBSOLETE #define BPT_VECTOR 0x1
+// OBSOLETE
+// OBSOLETE #define GCC_COMPILED_FLAG_SYMBOL "gcc_compiled%"
+// OBSOLETE #define GCC2_COMPILED_FLAG_SYMBOL "gcc2_compiled%"
+// OBSOLETE
+// OBSOLETE /* Amount PC must be decremented by after a breakpoint.
+// OBSOLETE On the Delta, the kernel decrements it for us. */
+// OBSOLETE
+// OBSOLETE #define DECR_PC_AFTER_BREAK 0
+// OBSOLETE
+// OBSOLETE /* Not sure what happens if we try to store this register, but
+// OBSOLETE phdm@info.ucl.ac.be says we need this define. */
+// OBSOLETE
+// OBSOLETE #define CANNOT_STORE_REGISTER(regno) (regno == FPI_REGNUM)
+// OBSOLETE
+// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
+// OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
+// OBSOLETE into VALBUF. */
+// OBSOLETE
+// OBSOLETE /* When it returns a float/double value, use fp0 in sysV68. */
+// OBSOLETE /* When it returns a pointer value, use a0 in sysV68. */
+// OBSOLETE
+// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+// OBSOLETE if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
+// OBSOLETE DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
+// OBSOLETE &REGBUF[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], \
+// OBSOLETE VALBUF); \
+// OBSOLETE else \
+// OBSOLETE memcpy ((VALBUF), \
+// OBSOLETE (char *) ((REGBUF) + \
+// OBSOLETE (TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : \
+// OBSOLETE (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)))), \
+// OBSOLETE TYPE_LENGTH(TYPE))
+// OBSOLETE
+// OBSOLETE /* Write into appropriate registers a function return value
+// OBSOLETE of type TYPE, given in virtual format. */
+// OBSOLETE
+// OBSOLETE /* When it returns a float/double value, use fp0 in sysV68. */
+// OBSOLETE /* When it returns a pointer value, use a0 in sysV68. */
+// OBSOLETE
+// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
+// OBSOLETE if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
+// OBSOLETE { \
+// OBSOLETE char raw_buf[DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM)]; \
+// OBSOLETE DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
+// OBSOLETE deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (FP0_REGNUM), \
+// OBSOLETE raw_buf, DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM)); \
+// OBSOLETE } \
+// OBSOLETE else \
+// OBSOLETE deprecated_write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
+// OBSOLETE VALBUF, TYPE_LENGTH (TYPE))
+// OBSOLETE
+// OBSOLETE /* Return number of args passed to a frame.
+// OBSOLETE Can return -1, meaning no way to tell. */
+// OBSOLETE
+// OBSOLETE extern int delta68_frame_num_args (struct frame_info *fi);
+// OBSOLETE #define FRAME_NUM_ARGS(fi) (delta68_frame_num_args ((fi)))
+// OBSOLETE
+// OBSOLETE /* On M68040 versions of sysV68 R3V7.1, ptrace(PT_WRITE_I) does not clear
+// OBSOLETE the processor's instruction cache as it should. */
+// OBSOLETE #define CLEAR_INSN_CACHE() clear_insn_cache()
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-m68k.h"
+// OBSOLETE
+// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
+// OBSOLETE the address in which a function should return its structure value,
+// OBSOLETE as a CORE_ADDR (or an expression that can be used as one). */
+// OBSOLETE
+// OBSOLETE #undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
+// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\
+// OBSOLETE (*(CORE_ADDR *)((char*)(REGBUF) + 8 * 4))
+// OBSOLETE
+// OBSOLETE extern int delta68_in_sigtramp (CORE_ADDR pc, char *name);
+// OBSOLETE #define IN_SIGTRAMP(pc,name) delta68_in_sigtramp (pc, name)
+// OBSOLETE
+// OBSOLETE extern CORE_ADDR delta68_frame_saved_pc (struct frame_info *fi);
+// OBSOLETE #undef DEPRECATED_FRAME_SAVED_PC
+// OBSOLETE #define DEPRECATED_FRAME_SAVED_PC(fi) delta68_frame_saved_pc (fi)
+// OBSOLETE
+// OBSOLETE extern CORE_ADDR delta68_frame_args_address (struct frame_info *fi);
+// OBSOLETE #undef DEPRECATED_FRAME_ARGS_ADDRESS
+// OBSOLETE #define DEPRECATED_FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
diff --git a/gdb/config/m68k/tm-dpx2.h b/gdb/config/m68k/tm-dpx2.h
index 96b1c324d5a..f641ad3cad1 100644
--- a/gdb/config/m68k/tm-dpx2.h
+++ b/gdb/config/m68k/tm-dpx2.h
@@ -1,35 +1,35 @@
-/* Parameters for targeting to a Bull DPX2.
- Copyright 1986, 1987, 1989, 1991, 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. */
-
-/* Define BPT_VECTOR if it is different than the default.
- This is the vector number used by traps to indicate a breakpoint. */
-
-#define BPT_VECTOR 0xe
-
-/* Need to get function ends by adding this to epilogue address from .bf
- record, not using x_fsize field. */
-#define FUNCTION_EPILOGUE_SIZE 4
-
-/* The child target can't deal with writing floating registers. */
-#define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
-
-#include <sys/types.h>
-#include "m68k/tm-m68k.h"
+// OBSOLETE /* Parameters for targeting to a Bull DPX2.
+// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1993, 1994
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
+// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
+// OBSOLETE
+// OBSOLETE #define BPT_VECTOR 0xe
+// OBSOLETE
+// OBSOLETE /* Need to get function ends by adding this to epilogue address from .bf
+// OBSOLETE record, not using x_fsize field. */
+// OBSOLETE #define FUNCTION_EPILOGUE_SIZE 4
+// OBSOLETE
+// OBSOLETE /* The child target can't deal with writing floating registers. */
+// OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
+// OBSOLETE
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-m68klynx.h b/gdb/config/m68k/tm-m68klynx.h
index 71ed690545c..e82fbee9e93 100644
--- a/gdb/config/m68k/tm-m68klynx.h
+++ b/gdb/config/m68k/tm-m68klynx.h
@@ -1,39 +1,39 @@
-/* Macro definitions for Motorola 680x0 running under LynxOS.
- Copyright 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef TM_M68KLYNX_H
-#define TM_M68KLYNX_H
-
-#include "config/tm-lynx.h"
-
-/* If PC-2 contains this instruction, then we know what we are in a system
- call stub, and the return PC is is at SP+4, instead of SP. */
-
-#define SYSCALL_TRAP 0x4e4a /* trap #10 */
-#define SYSCALL_TRAP_OFFSET 2 /* PC is after trap instruction */
-
-/* Use the generic 68k definitions. */
-
-#include "m68k/tm-m68k.h"
-
-/* Disable dumbshit alternate breakpoint mechanism needed by 68k stub. */
-#undef DEPRECATED_REMOTE_BREAKPOINT
-
-#endif /* TM_M68KLYNX_H */
+// OBSOLETE /* Macro definitions for Motorola 680x0 running under LynxOS.
+// OBSOLETE Copyright 1993 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #ifndef TM_M68KLYNX_H
+// OBSOLETE #define TM_M68KLYNX_H
+// OBSOLETE
+// OBSOLETE #include "config/tm-lynx.h"
+// OBSOLETE
+// OBSOLETE /* If PC-2 contains this instruction, then we know what we are in a system
+// OBSOLETE call stub, and the return PC is is at SP+4, instead of SP. */
+// OBSOLETE
+// OBSOLETE #define SYSCALL_TRAP 0x4e4a /* trap #10 */
+// OBSOLETE #define SYSCALL_TRAP_OFFSET 2 /* PC is after trap instruction */
+// OBSOLETE
+// OBSOLETE /* Use the generic 68k definitions. */
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-m68k.h"
+// OBSOLETE
+// OBSOLETE /* Disable dumbshit alternate breakpoint mechanism needed by 68k stub. */
+// OBSOLETE #undef DEPRECATED_REMOTE_BREAKPOINT
+// OBSOLETE
+// OBSOLETE #endif /* TM_M68KLYNX_H */
diff --git a/gdb/config/m68k/tm-m68kv4.h b/gdb/config/m68k/tm-m68kv4.h
index 11bb122dfa4..95696b60b49 100644
--- a/gdb/config/m68k/tm-m68kv4.h
+++ b/gdb/config/m68k/tm-m68kv4.h
@@ -1,67 +1,67 @@
-/* Target definitions for GDB on a Motorola 680x0 running SVR4.
- (Commodore Amiga with amix or Atari TT with ASV)
- Copyright 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2003
- Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygint)
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Define BPT_VECTOR if it is different than the default.
- This is the vector number used by traps to indicate a breakpoint. */
-
-#define BPT_VECTOR 0x1
-
-/* How much to decrement the PC after a trap. Depends on kernel. */
-
-#define DECR_PC_AFTER_BREAK 0 /* No decrement required */
-
-#include "config/tm-sysv4.h"
-#include "m68k/tm-m68k.h"
-
-/* Offsets (in target ints) into jmp_buf. Not defined in any system header
- file, so we have to step through setjmp/longjmp with a debugger and figure
- them out. As a double check, note that <setjmp> defines _JBLEN as 13,
- which matches the number of elements we see saved by setjmp(). */
-
-#define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
-
-#define JB_D2 0
-#define JB_D3 1
-#define JB_D4 2
-#define JB_D5 3
-#define JB_D6 4
-#define JB_D7 5
-#define JB_A1 6
-#define JB_A2 7
-#define JB_A3 8
-#define JB_A4 9
-#define JB_A5 10
-#define JB_A6 11
-#define JB_A7 12
-
-#define JB_PC JB_A1 /* Setjmp()'s return PC saved in A1 */
-
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-
-/* Convert a DWARF register number to a gdb REGNUM. */
-#define DWARF_REG_TO_REGNUM(num) ((num) < 16 ? (num) : (num)+FP0_REGNUM-16)
+// OBSOLETE /* Target definitions for GDB on a Motorola 680x0 running SVR4.
+// OBSOLETE (Commodore Amiga with amix or Atari TT with ASV)
+// OBSOLETE Copyright 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2003
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE Written by Fred Fish at Cygnus Support (fnf@cygint)
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Define BPT_VECTOR if it is different than the default.
+// OBSOLETE This is the vector number used by traps to indicate a breakpoint. */
+// OBSOLETE
+// OBSOLETE #define BPT_VECTOR 0x1
+// OBSOLETE
+// OBSOLETE /* How much to decrement the PC after a trap. Depends on kernel. */
+// OBSOLETE
+// OBSOLETE #define DECR_PC_AFTER_BREAK 0 /* No decrement required */
+// OBSOLETE
+// OBSOLETE #include "config/tm-sysv4.h"
+// OBSOLETE #include "m68k/tm-m68k.h"
+// OBSOLETE
+// OBSOLETE /* Offsets (in target ints) into jmp_buf. Not defined in any system header
+// OBSOLETE file, so we have to step through setjmp/longjmp with a debugger and figure
+// OBSOLETE them out. As a double check, note that <setjmp> defines _JBLEN as 13,
+// OBSOLETE which matches the number of elements we see saved by setjmp(). */
+// OBSOLETE
+// OBSOLETE #define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
+// OBSOLETE
+// OBSOLETE #define JB_D2 0
+// OBSOLETE #define JB_D3 1
+// OBSOLETE #define JB_D4 2
+// OBSOLETE #define JB_D5 3
+// OBSOLETE #define JB_D6 4
+// OBSOLETE #define JB_D7 5
+// OBSOLETE #define JB_A1 6
+// OBSOLETE #define JB_A2 7
+// OBSOLETE #define JB_A3 8
+// OBSOLETE #define JB_A4 9
+// OBSOLETE #define JB_A5 10
+// OBSOLETE #define JB_A6 11
+// OBSOLETE #define JB_A7 12
+// OBSOLETE
+// OBSOLETE #define JB_PC JB_A1 /* Setjmp()'s return PC saved in A1 */
+// OBSOLETE
+// OBSOLETE /* Figure out where the longjmp will land. Slurp the args out of the stack.
+// OBSOLETE We expect the first arg to be a pointer to the jmp_buf structure from which
+// OBSOLETE we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
+// OBSOLETE This routine returns true on success */
+// OBSOLETE
+// OBSOLETE #define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
+// OBSOLETE
+// OBSOLETE /* Convert a DWARF register number to a gdb REGNUM. */
+// OBSOLETE #define DWARF_REG_TO_REGNUM(num) ((num) < 16 ? (num) : (num)+FP0_REGNUM-16)
diff --git a/gdb/config/m68k/tm-sun2.h b/gdb/config/m68k/tm-sun2.h
index e839bea7f5a..199530abe20 100644
--- a/gdb/config/m68k/tm-sun2.h
+++ b/gdb/config/m68k/tm-sun2.h
@@ -1,24 +1,24 @@
-/* Parameters for execution on a Sun, 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. */
-
-/* The child target can't deal with floating registers. */
-#define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
-
-#include "m68k/tm-m68k.h"
+// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
+// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* The child target can't deal with floating registers. */
+// OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) >= FP0_REGNUM)
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/tm-sun2os4.h b/gdb/config/m68k/tm-sun2os4.h
index d5fe5315267..83beb6cf665 100644
--- a/gdb/config/m68k/tm-sun2os4.h
+++ b/gdb/config/m68k/tm-sun2os4.h
@@ -1,21 +1,21 @@
-/* Copyright (C) 1990, Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "m68k/tm-sun2.h"
-#include "config/tm-sunos.h"
+// OBSOLETE /* Copyright (C) 1990, Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-sun2.h"
+// OBSOLETE #include "config/tm-sunos.h"
diff --git a/gdb/config/m68k/tm-sun3.h b/gdb/config/m68k/tm-sun3.h
index f721dcf6fdb..f51666dc044 100644
--- a/gdb/config/m68k/tm-sun3.h
+++ b/gdb/config/m68k/tm-sun3.h
@@ -1,109 +1,89 @@
-/* Parameters for execution on a Sun, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1996, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef TM_SUN3_H
-#define TM_SUN3_H
-
-/* Sun3 status includes fpflags, which shows whether the FPU has been used
- by the process, and whether the FPU was done with an instruction or
- was interrupted in the middle of a long instruction. See
- <machine/reg.h>. */
-/* a&d, pc,sr, fp, fpstat, fpflags */
-
-#define DEPRECATED_REGISTER_BYTES (16*4 + 8 + 8*12 + 3*4 + 4)
-
-#define NUM_REGS 31
-
-#define REGISTER_BYTES_OK(b) \
- ((b) == DEPRECATED_REGISTER_BYTES \
- || (b) == REGISTER_BYTES_FP \
- || (b) == REGISTER_BYTES_NOFP)
-
-/* If PC contains this instruction, then we know what we are in a system
- call stub, and the return PC is is at SP+4, instead of SP. */
-
-#define SYSCALL_TRAP 0x4e40 /* trap #0 */
-#define SYSCALL_TRAP_OFFSET 0 /* PC points at trap instruction */
-
-#include "m68k/tm-m68k.h"
-
-/* Disable alternate breakpoint mechanism needed by 68k stub. */
-#undef DEPRECATED_REMOTE_BREAKPOINT
-
-/* Offsets (in target ints) into jmp_buf. Not defined by Sun, but at least
- documented in a comment in <machine/setjmp.h>! */
-
-#define JB_ELEMENT_SIZE 4
-
-#define JB_ONSSTACK 0
-#define JB_SIGMASK 1
-#define JB_SP 2
-#define JB_PC 3
-#define JB_PSL 4
-#define JB_D2 5
-#define JB_D3 6
-#define JB_D4 7
-#define JB_D5 8
-#define JB_D6 9
-#define JB_D7 10
-#define JB_A2 11
-#define JB_A3 12
-#define JB_A4 13
-#define JB_A5 14
-#define JB_A6 15
-
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-
-/* If sun3 pcc says that a parameter is a short, it's a short. */
-#define BELIEVE_PCC_PROMOTION_TYPE 1
-
-/* Can't define BELIEVE_PCC_PROMOTION for SunOS /bin/cc of SunOS 4.1.1.
- Apparently Sun fixed this for the sparc but not the sun3. */
-
-/* The code which tries to deal with this bug is never harmful on a sun3. */
-#define SUN_FIXED_LBRAC_BUG (0)
-
-/* On the sun3 the kernel pushes a sigcontext on the user stack and
- then `calls' _sigtramp in user code. _sigtramp saves the floating
- point status on the stack and calls the signal handler
- function. The stack does not contain enough information to allow a
- normal backtrace, but sigcontext contains the saved user
- pc/sp. DEPRECATED_FRAME_CHAIN and friends in tm-m68k.h and
- m68k_find_saved_regs deal with this situation by manufacturing a
- fake frame for _sigtramp. SIG_PC_FP_OFFSET is the offset from the
- signal handler frame to the saved pc in sigcontext.
- SIG_SP_FP_OFFSET is the offset from the signal handler frame to the
- end of sigcontext which is identical to the saved sp at
- SIG_PC_FP_OFFSET - 4.
-
- Please note that it is impossible to correctly backtrace from a breakpoint
- in _sigtramp as _sigtramp modifies the stack pointer a few times. */
-
-#undef SIG_PC_FP_OFFSET
-#define SIG_PC_FP_OFFSET 324
-#define SIG_SP_FP_OFFSET 332
-
-#endif /* TM_SUN3_H */
+// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
+// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1996, 2000
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #ifndef TM_SUN3_H
+// OBSOLETE #define TM_SUN3_H
+// OBSOLETE
+// OBSOLETE /* Sun3 status includes fpflags, which shows whether the FPU has been used
+// OBSOLETE by the process, and whether the FPU was done with an instruction or
+// OBSOLETE was interrupted in the middle of a long instruction. See
+// OBSOLETE <machine/reg.h>. */
+// OBSOLETE /* a&d, pc,sr, fp, fpstat, fpflags */
+// OBSOLETE
+// OBSOLETE #define DEPRECATED_REGISTER_BYTES (16*4 + 8 + 8*12 + 3*4 + 4)
+// OBSOLETE
+// OBSOLETE #define NUM_REGS 31
+// OBSOLETE
+// OBSOLETE #define REGISTER_BYTES_OK(b) \
+// OBSOLETE ((b) == DEPRECATED_REGISTER_BYTES \
+// OBSOLETE || (b) == REGISTER_BYTES_FP \
+// OBSOLETE || (b) == REGISTER_BYTES_NOFP)
+// OBSOLETE
+// OBSOLETE /* If PC contains this instruction, then we know what we are in a system
+// OBSOLETE call stub, and the return PC is is at SP+4, instead of SP. */
+// OBSOLETE
+// OBSOLETE #define SYSCALL_TRAP 0x4e40 /* trap #0 */
+// OBSOLETE #define SYSCALL_TRAP_OFFSET 0 /* PC points at trap instruction */
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-m68k.h"
+// OBSOLETE
+// OBSOLETE /* Disable alternate breakpoint mechanism needed by 68k stub. */
+// OBSOLETE #undef DEPRECATED_REMOTE_BREAKPOINT
+// OBSOLETE
+// OBSOLETE /* Offsets (in target ints) into jmp_buf. Not defined by Sun, but at least
+// OBSOLETE documented in a comment in <machine/setjmp.h>! */
+// OBSOLETE
+// OBSOLETE #define JB_ELEMENT_SIZE 4
+// OBSOLETE
+// OBSOLETE #define JB_ONSSTACK 0
+// OBSOLETE #define JB_SIGMASK 1
+// OBSOLETE #define JB_SP 2
+// OBSOLETE #define JB_PC 3
+// OBSOLETE #define JB_PSL 4
+// OBSOLETE #define JB_D2 5
+// OBSOLETE #define JB_D3 6
+// OBSOLETE #define JB_D4 7
+// OBSOLETE #define JB_D5 8
+// OBSOLETE #define JB_D6 9
+// OBSOLETE #define JB_D7 10
+// OBSOLETE #define JB_A2 11
+// OBSOLETE #define JB_A3 12
+// OBSOLETE #define JB_A4 13
+// OBSOLETE #define JB_A5 14
+// OBSOLETE #define JB_A6 15
+// OBSOLETE
+// OBSOLETE /* Figure out where the longjmp will land. Slurp the args out of the stack.
+// OBSOLETE We expect the first arg to be a pointer to the jmp_buf structure from which
+// OBSOLETE we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
+// OBSOLETE This routine returns true on success */
+// OBSOLETE
+// OBSOLETE #define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
+// OBSOLETE
+// OBSOLETE /* If sun3 pcc says that a parameter is a short, it's a short. */
+// OBSOLETE #define BELIEVE_PCC_PROMOTION_TYPE 1
+// OBSOLETE
+// OBSOLETE /* Can't define BELIEVE_PCC_PROMOTION for SunOS /bin/cc of SunOS 4.1.1.
+// OBSOLETE Apparently Sun fixed this for the sparc but not the sun3. */
+// OBSOLETE
+// OBSOLETE /* The code which tries to deal with this bug is never harmful on a sun3. */
+// OBSOLETE #define SUN_FIXED_LBRAC_BUG (0)
+// OBSOLETE
+// OBSOLETE #endif /* TM_SUN3_H */
diff --git a/gdb/config/m68k/tm-sun3os4.h b/gdb/config/m68k/tm-sun3os4.h
index ced43761b38..7e1ffb21fe2 100644
--- a/gdb/config/m68k/tm-sun3os4.h
+++ b/gdb/config/m68k/tm-sun3os4.h
@@ -1,22 +1,22 @@
-/* Target machine parameters for Sun-3 under SunOS 4.x, for GDB.
- 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. */
-
-#include "m68k/tm-sun3.h"
-#include "config/tm-sunos.h"
+// OBSOLETE /* Target machine parameters for Sun-3 under SunOS 4.x, for GDB.
+// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "m68k/tm-sun3.h"
+// OBSOLETE #include "config/tm-sunos.h"
diff --git a/gdb/config/m68k/tm-vx68.h b/gdb/config/m68k/tm-vx68.h
index 271eb7ef70e..6eaf4189435 100644
--- a/gdb/config/m68k/tm-vx68.h
+++ b/gdb/config/m68k/tm-vx68.h
@@ -72,11 +72,7 @@
#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-/* Number of registers in a ptrace_getregs call. */
-
-#define VX_NUM_REGS (18)
-
/* Number of registers in a ptrace_getfpregs call. */
-#define VX_SIZE_FPREGS (8 * REGISTER_RAW_SIZE (FP0_REGNUM) \
+#define VX_SIZE_FPREGS (8 * DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) \
+ (3 * DEPRECATED_REGISTER_SIZE))
diff --git a/gdb/config/m68k/xm-3b1.h b/gdb/config/m68k/xm-3b1.h
index acf72e98201..7257b69dc9a 100644
--- a/gdb/config/m68k/xm-3b1.h
+++ b/gdb/config/m68k/xm-3b1.h
@@ -1,82 +1,82 @@
-/* Parameters for execution on a 3b1.
- Copyright 1986, 1987, 1989, 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 HAVE_TERMIO
-#define USG
-
-/* 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 0x70000
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
-{ addr = blockend + regno * 4; }
-
-/* Interface definitions for kernel debugger KDB. */
-
-/* Map machine fault codes into signal numbers.
- First subtract 0, divide by 4, then index in a table.
- Faults for which the entry in this table is 0
- are not handled by KDB; the program's own trap handler
- gets to handle then. */
-
-#define FAULT_CODE_ORIGIN 0
-#define FAULT_CODE_UNITS 4
-#define FAULT_TABLE \
-{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
- 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- SIGILL }
-
-/* Start running with a stack stretching from BEG to END.
- BEG and END should be symbols meaningful to the assembler.
- This is used only for kdb. */
-
-#define INIT_STACK(beg, end) \
-{ asm (".globl end"); \
- asm ("movel $ end, sp"); \
- asm ("clrl fp"); }
-
-/* Push the frame pointer register on the stack. */
-#define PUSH_FRAME_PTR \
- asm ("movel fp, -(sp)");
-
-/* Copy the top-of-stack to the frame pointer register. */
-#define POP_FRAME_PTR \
- asm ("movl (sp), fp");
-
-/* After KDB is entered by a fault, push all registers
- that GDB thinks about (all NUM_REGS of them),
- so that they appear in order of ascending GDB register number.
- The fault code will be on the stack beyond the last register. */
-
-#define PUSH_REGISTERS \
-{ asm ("clrw -(sp)"); \
- asm ("pea 10(sp)"); \
- asm ("movem $ 0xfffe,-(sp)"); }
-
-/* Assuming the registers (including processor status) have been
- pushed on the stack in order of ascending GDB register number,
- restore them and return to the address in the saved PC register. */
-
-#define POP_REGISTERS \
-{ asm ("subil $8,28(sp)"); \
- asm ("movem (sp),$ 0xffff"); \
- asm ("rte"); }
+// OBSOLETE /* Parameters for execution on a 3b1.
+// OBSOLETE Copyright 1986, 1987, 1989, 1999 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #define HAVE_TERMIO
+// OBSOLETE #define USG
+// OBSOLETE
+// OBSOLETE /* This is the amount to subtract from u.u_ar0
+// OBSOLETE to get the offset in the core file of the register values. */
+// OBSOLETE
+// OBSOLETE #define KERNEL_U_ADDR 0x70000
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE { addr = blockend + regno * 4; }
+// OBSOLETE
+// OBSOLETE /* Interface definitions for kernel debugger KDB. */
+// OBSOLETE
+// OBSOLETE /* Map machine fault codes into signal numbers.
+// OBSOLETE First subtract 0, divide by 4, then index in a table.
+// OBSOLETE Faults for which the entry in this table is 0
+// OBSOLETE are not handled by KDB; the program's own trap handler
+// OBSOLETE gets to handle then. */
+// OBSOLETE
+// OBSOLETE #define FAULT_CODE_ORIGIN 0
+// OBSOLETE #define FAULT_CODE_UNITS 4
+// OBSOLETE #define FAULT_TABLE \
+// OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
+// OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
+// OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \
+// OBSOLETE SIGILL }
+// OBSOLETE
+// OBSOLETE /* Start running with a stack stretching from BEG to END.
+// OBSOLETE BEG and END should be symbols meaningful to the assembler.
+// OBSOLETE This is used only for kdb. */
+// OBSOLETE
+// OBSOLETE #define INIT_STACK(beg, end) \
+// OBSOLETE { asm (".globl end"); \
+// OBSOLETE asm ("movel $ end, sp"); \
+// OBSOLETE asm ("clrl fp"); }
+// OBSOLETE
+// OBSOLETE /* Push the frame pointer register on the stack. */
+// OBSOLETE #define PUSH_FRAME_PTR \
+// OBSOLETE asm ("movel fp, -(sp)");
+// OBSOLETE
+// OBSOLETE /* Copy the top-of-stack to the frame pointer register. */
+// OBSOLETE #define POP_FRAME_PTR \
+// OBSOLETE asm ("movl (sp), fp");
+// OBSOLETE
+// OBSOLETE /* After KDB is entered by a fault, push all registers
+// OBSOLETE that GDB thinks about (all NUM_REGS of them),
+// OBSOLETE so that they appear in order of ascending GDB register number.
+// OBSOLETE The fault code will be on the stack beyond the last register. */
+// OBSOLETE
+// OBSOLETE #define PUSH_REGISTERS \
+// OBSOLETE { asm ("clrw -(sp)"); \
+// OBSOLETE asm ("pea 10(sp)"); \
+// OBSOLETE asm ("movem $ 0xfffe,-(sp)"); }
+// OBSOLETE
+// OBSOLETE /* Assuming the registers (including processor status) have been
+// OBSOLETE pushed on the stack in order of ascending GDB register number,
+// OBSOLETE restore them and return to the address in the saved PC register. */
+// OBSOLETE
+// OBSOLETE #define POP_REGISTERS \
+// OBSOLETE { asm ("subil $8,28(sp)"); \
+// OBSOLETE asm ("movem (sp),$ 0xffff"); \
+// OBSOLETE asm ("rte"); }
diff --git a/gdb/config/m68k/xm-delta68.h b/gdb/config/m68k/xm-delta68.h
index f691c387db2..9b8f0af39ce 100644
--- a/gdb/config/m68k/xm-delta68.h
+++ b/gdb/config/m68k/xm-delta68.h
@@ -1,35 +1,35 @@
-/* Macro definitions for a Delta.
- 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. */
-
-/* I'm running gdb 4.9 under sysV68 R3V7.1.
-
- On some machines, gdb crashes when it's starting up while calling the
- vendor's termio tgetent() routine. It always works when run under
- itself (actually, under 3.2, it's not an infinitely recursive bug.)
- After some poking around, it appears that depending on the environment
- size, or whether you're running YP, or the phase of the moon or something,
- the stack is not always long-aligned when main() is called, and tgetent()
- takes strong offense at that. On some machines this bug never appears, but
- on those where it does, it occurs quite reliably. */
-#define ALIGN_STACK_ON_STARTUP
-
-#define USG
-
-#define HAVE_TERMIO
+// OBSOLETE /* Macro definitions for a Delta.
+// OBSOLETE Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* I'm running gdb 4.9 under sysV68 R3V7.1.
+// OBSOLETE
+// OBSOLETE On some machines, gdb crashes when it's starting up while calling the
+// OBSOLETE vendor's termio tgetent() routine. It always works when run under
+// OBSOLETE itself (actually, under 3.2, it's not an infinitely recursive bug.)
+// OBSOLETE After some poking around, it appears that depending on the environment
+// OBSOLETE size, or whether you're running YP, or the phase of the moon or something,
+// OBSOLETE the stack is not always long-aligned when main() is called, and tgetent()
+// OBSOLETE takes strong offense at that. On some machines this bug never appears, but
+// OBSOLETE on those where it does, it occurs quite reliably. */
+// OBSOLETE #define ALIGN_STACK_ON_STARTUP
+// OBSOLETE
+// OBSOLETE #define USG
+// OBSOLETE
+// OBSOLETE #define HAVE_TERMIO
diff --git a/gdb/config/m68k/xm-dpx2.h b/gdb/config/m68k/xm-dpx2.h
index 4083c9dbc19..0a42203ef67 100644
--- a/gdb/config/m68k/xm-dpx2.h
+++ b/gdb/config/m68k/xm-dpx2.h
@@ -1,22 +1,22 @@
-/* Parameters for execution on a Bull DPX2.
- Copyright 1986, 1987, 1989, 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 HAVE_TERMIOS
-#define USG
+// OBSOLETE /* Parameters for execution on a Bull DPX2.
+// OBSOLETE Copyright 1986, 1987, 1989, 1993 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #define HAVE_TERMIOS
+// OBSOLETE #define USG
diff --git a/gdb/config/m68k/xm-m68kv4.h b/gdb/config/m68k/xm-m68kv4.h
index 542cd106814..044371cfa79 100644
--- a/gdb/config/m68k/xm-m68kv4.h
+++ b/gdb/config/m68k/xm-m68kv4.h
@@ -1,29 +1,29 @@
-/* Host definitions for GDB on a Motorola 680x0 running SVR4.
- (Commodore Amiga with amix or Atari TT with ASV)
- Copyright 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygnus.com)
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Pick up most of what we need from the generic m68k host include file. */
-
-#include "m68k/xm-m68k.h"
-
-/* Pick up more stuff from the generic SVR4 host include file. */
-
-#include "config/xm-sysv4.h"
+// OBSOLETE /* Host definitions for GDB on a Motorola 680x0 running SVR4.
+// OBSOLETE (Commodore Amiga with amix or Atari TT with ASV)
+// OBSOLETE Copyright 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
+// OBSOLETE Written by Fred Fish at Cygnus Support (fnf@cygnus.com)
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Pick up most of what we need from the generic m68k host include file. */
+// OBSOLETE
+// OBSOLETE #include "m68k/xm-m68k.h"
+// OBSOLETE
+// OBSOLETE /* Pick up more stuff from the generic SVR4 host include file. */
+// OBSOLETE
+// OBSOLETE #include "config/xm-sysv4.h"
diff --git a/gdb/config/m68k/xm-sun2.h b/gdb/config/m68k/xm-sun2.h
index cf846192491..f17ad3cb6a1 100644
--- a/gdb/config/m68k/xm-sun2.h
+++ b/gdb/config/m68k/xm-sun2.h
@@ -1,77 +1,77 @@
-/* Parameters for execution on a Sun, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 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. */
-
-/* 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 0x2800
-
-
-/* Interface definitions for kernel debugger KDB. */
-
-/* Map machine fault codes into signal numbers.
- First subtract 0, divide by 4, then index in a table.
- Faults for which the entry in this table is 0
- are not handled by KDB; the program's own trap handler
- gets to handle then. */
-
-#define FAULT_CODE_ORIGIN 0
-#define FAULT_CODE_UNITS 4
-#define FAULT_TABLE \
-{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
- 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- SIGILL }
-
-/* Start running with a stack stretching from BEG to END.
- BEG and END should be symbols meaningful to the assembler.
- This is used only for kdb. */
-
-#define INIT_STACK(beg, end) \
-{ asm (".globl end"); \
- asm ("movel $ end, sp"); \
- asm ("clrl fp"); }
-
-/* Push the frame pointer register on the stack. */
-#define PUSH_FRAME_PTR \
- asm ("movel fp, -(sp)");
-
-/* Copy the top-of-stack to the frame pointer register. */
-#define POP_FRAME_PTR \
- asm ("movl (sp), fp");
-
-/* After KDB is entered by a fault, push all registers
- that GDB thinks about (all NUM_REGS of them),
- so that they appear in order of ascending GDB register number.
- The fault code will be on the stack beyond the last register. */
-
-#define PUSH_REGISTERS \
-{ asm ("clrw -(sp)"); \
- asm ("pea 10(sp)"); \
- asm ("movem $ 0xfffe,-(sp)"); }
-
-/* Assuming the registers (including processor status) have been
- pushed on the stack in order of ascending GDB register number,
- restore them and return to the address in the saved PC register. */
-
-#define POP_REGISTERS \
-{ asm ("subil $8,28(sp)"); \
- asm ("movem (sp),$ 0xffff"); \
- asm ("rte"); }
+// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
+// OBSOLETE Copyright 1986, 1987, 1989, 1996 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* This is the amount to subtract from u.u_ar0
+// OBSOLETE to get the offset in the core file of the register values. */
+// OBSOLETE
+// OBSOLETE #define KERNEL_U_ADDR 0x2800
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Interface definitions for kernel debugger KDB. */
+// OBSOLETE
+// OBSOLETE /* Map machine fault codes into signal numbers.
+// OBSOLETE First subtract 0, divide by 4, then index in a table.
+// OBSOLETE Faults for which the entry in this table is 0
+// OBSOLETE are not handled by KDB; the program's own trap handler
+// OBSOLETE gets to handle then. */
+// OBSOLETE
+// OBSOLETE #define FAULT_CODE_ORIGIN 0
+// OBSOLETE #define FAULT_CODE_UNITS 4
+// OBSOLETE #define FAULT_TABLE \
+// OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
+// OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
+// OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \
+// OBSOLETE SIGILL }
+// OBSOLETE
+// OBSOLETE /* Start running with a stack stretching from BEG to END.
+// OBSOLETE BEG and END should be symbols meaningful to the assembler.
+// OBSOLETE This is used only for kdb. */
+// OBSOLETE
+// OBSOLETE #define INIT_STACK(beg, end) \
+// OBSOLETE { asm (".globl end"); \
+// OBSOLETE asm ("movel $ end, sp"); \
+// OBSOLETE asm ("clrl fp"); }
+// OBSOLETE
+// OBSOLETE /* Push the frame pointer register on the stack. */
+// OBSOLETE #define PUSH_FRAME_PTR \
+// OBSOLETE asm ("movel fp, -(sp)");
+// OBSOLETE
+// OBSOLETE /* Copy the top-of-stack to the frame pointer register. */
+// OBSOLETE #define POP_FRAME_PTR \
+// OBSOLETE asm ("movl (sp), fp");
+// OBSOLETE
+// OBSOLETE /* After KDB is entered by a fault, push all registers
+// OBSOLETE that GDB thinks about (all NUM_REGS of them),
+// OBSOLETE so that they appear in order of ascending GDB register number.
+// OBSOLETE The fault code will be on the stack beyond the last register. */
+// OBSOLETE
+// OBSOLETE #define PUSH_REGISTERS \
+// OBSOLETE { asm ("clrw -(sp)"); \
+// OBSOLETE asm ("pea 10(sp)"); \
+// OBSOLETE asm ("movem $ 0xfffe,-(sp)"); }
+// OBSOLETE
+// OBSOLETE /* Assuming the registers (including processor status) have been
+// OBSOLETE pushed on the stack in order of ascending GDB register number,
+// OBSOLETE restore them and return to the address in the saved PC register. */
+// OBSOLETE
+// OBSOLETE #define POP_REGISTERS \
+// OBSOLETE { asm ("subil $8,28(sp)"); \
+// OBSOLETE asm ("movem (sp),$ 0xffff"); \
+// OBSOLETE asm ("rte"); }
diff --git a/gdb/config/m68k/xm-sun3.h b/gdb/config/m68k/xm-sun3.h
index 6a5a560e1c3..5f04e024b07 100644
--- a/gdb/config/m68k/xm-sun3.h
+++ b/gdb/config/m68k/xm-sun3.h
@@ -1,71 +1,71 @@
-/* Parameters for execution on a Sun, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 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. */
-
-/* Interface definitions for kernel debugger KDB. */
-
-/* Map machine fault codes into signal numbers.
- First subtract 0, divide by 4, then index in a table.
- Faults for which the entry in this table is 0
- are not handled by KDB; the program's own trap handler
- gets to handle then. */
-
-#define FAULT_CODE_ORIGIN 0
-#define FAULT_CODE_UNITS 4
-#define FAULT_TABLE \
-{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
- 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- SIGILL }
-
-/* Start running with a stack stretching from BEG to END.
- BEG and END should be symbols meaningful to the assembler.
- This is used only for kdb. */
-
-#define INIT_STACK(beg, end) \
-{ asm (".globl end"); \
- asm ("movel #end, sp"); \
- asm ("movel #0,a6"); }
-
-/* Push the frame pointer register on the stack. */
-#define PUSH_FRAME_PTR \
- asm ("movel a6,sp@-");
-
-/* Copy the top-of-stack to the frame pointer register. */
-#define POP_FRAME_PTR \
- asm ("movl sp@,a6");
-
-/* After KDB is entered by a fault, push all registers
- that GDB thinks about (all NUM_REGS of them),
- so that they appear in order of ascending GDB register number.
- The fault code will be on the stack beyond the last register. */
-
-#define PUSH_REGISTERS \
-{ asm ("clrw -(sp)"); \
- asm ("pea sp@(10)"); \
- asm ("movem #0xfffe,sp@-"); }
-
-/* Assuming the registers (including processor status) have been
- pushed on the stack in order of ascending GDB register number,
- restore them and return to the address in the saved PC register. */
-
-#define POP_REGISTERS \
-{ asm ("subil #8,sp@(28)"); \
- asm ("movem sp@,#0xffff"); \
- asm ("rte"); }
+// OBSOLETE /* Parameters for execution on a Sun, for GDB, the GNU debugger.
+// OBSOLETE Copyright 1986, 1987, 1989, 1996 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Interface definitions for kernel debugger KDB. */
+// OBSOLETE
+// OBSOLETE /* Map machine fault codes into signal numbers.
+// OBSOLETE First subtract 0, divide by 4, then index in a table.
+// OBSOLETE Faults for which the entry in this table is 0
+// OBSOLETE are not handled by KDB; the program's own trap handler
+// OBSOLETE gets to handle then. */
+// OBSOLETE
+// OBSOLETE #define FAULT_CODE_ORIGIN 0
+// OBSOLETE #define FAULT_CODE_UNITS 4
+// OBSOLETE #define FAULT_TABLE \
+// OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
+// OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
+// OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \
+// OBSOLETE SIGILL }
+// OBSOLETE
+// OBSOLETE /* Start running with a stack stretching from BEG to END.
+// OBSOLETE BEG and END should be symbols meaningful to the assembler.
+// OBSOLETE This is used only for kdb. */
+// OBSOLETE
+// OBSOLETE #define INIT_STACK(beg, end) \
+// OBSOLETE { asm (".globl end"); \
+// OBSOLETE asm ("movel #end, sp"); \
+// OBSOLETE asm ("movel #0,a6"); }
+// OBSOLETE
+// OBSOLETE /* Push the frame pointer register on the stack. */
+// OBSOLETE #define PUSH_FRAME_PTR \
+// OBSOLETE asm ("movel a6,sp@-");
+// OBSOLETE
+// OBSOLETE /* Copy the top-of-stack to the frame pointer register. */
+// OBSOLETE #define POP_FRAME_PTR \
+// OBSOLETE asm ("movl sp@,a6");
+// OBSOLETE
+// OBSOLETE /* After KDB is entered by a fault, push all registers
+// OBSOLETE that GDB thinks about (all NUM_REGS of them),
+// OBSOLETE so that they appear in order of ascending GDB register number.
+// OBSOLETE The fault code will be on the stack beyond the last register. */
+// OBSOLETE
+// OBSOLETE #define PUSH_REGISTERS \
+// OBSOLETE { asm ("clrw -(sp)"); \
+// OBSOLETE asm ("pea sp@(10)"); \
+// OBSOLETE asm ("movem #0xfffe,sp@-"); }
+// OBSOLETE
+// OBSOLETE /* Assuming the registers (including processor status) have been
+// OBSOLETE pushed on the stack in order of ascending GDB register number,
+// OBSOLETE restore them and return to the address in the saved PC register. */
+// OBSOLETE
+// OBSOLETE #define POP_REGISTERS \
+// OBSOLETE { asm ("subil #8,sp@(28)"); \
+// OBSOLETE asm ("movem sp@,#0xffff"); \
+// OBSOLETE asm ("rte"); }
diff --git a/gdb/config/m68k/xm-sun3os4.h b/gdb/config/m68k/xm-sun3os4.h
index 1a819c32a9a..5062071999a 100644
--- a/gdb/config/m68k/xm-sun3os4.h
+++ b/gdb/config/m68k/xm-sun3os4.h
@@ -1,22 +1,22 @@
-/* Macro definitions for a sun 3 running os 4.
- Copyright 1989, 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 "m68k/xm-sun3.h"
-#define FPU
+// OBSOLETE /* Macro definitions for a sun 3 running os 4.
+// OBSOLETE Copyright 1989, 1996, 1998 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "m68k/xm-sun3.h"
+// OBSOLETE #define FPU
diff --git a/gdb/config/m88k/xm-delta88v4.h b/gdb/config/m88k/xm-delta88v4.h
deleted file mode 100644
index 932b9022a89..00000000000
--- a/gdb/config/m88k/xm-delta88v4.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Host machine description for Motorola Delta 88 box, for GDB.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "config/xm-sysv4.h"
diff --git a/gdb/config/mips/decstation.mh b/gdb/config/mips/decstation.mh
index 89ce310b6fa..63de3da10b5 100644
--- a/gdb/config/mips/decstation.mh
+++ b/gdb/config/mips/decstation.mh
@@ -1,4 +1,4 @@
-# Host: Little-endian MIPS machine such as DECstation.
-XM_FILE= xm-mips.h
-NAT_FILE= nm-mips.h
-NATDEPFILES= infptrace.o inftarg.o corelow.o mips-nat.o fork-child.o
+# OBSOLETE # Host: Little-endian MIPS machine such as DECstation.
+# OBSOLETE XM_FILE= xm-mips.h
+# OBSOLETE NAT_FILE= nm-mips.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o corelow.o mips-nat.o fork-child.o
diff --git a/gdb/config/mips/embed64.mt b/gdb/config/mips/embed64.mt
deleted file mode 100644
index 2944be10e45..00000000000
--- a/gdb/config/mips/embed64.mt
+++ /dev/null
@@ -1,4 +0,0 @@
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-mips64.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/irix6.mh b/gdb/config/mips/irix6.mh
index 8075f0d78cb..141bff6a887 100644
--- a/gdb/config/mips/irix6.mh
+++ b/gdb/config/mips/irix6.mh
@@ -1,6 +1,6 @@
# Host: SGI Iris running irix 6.x
-XM_FILE= xm-irix6.h
-NAT_FILE= nm-irix6.h
+XM_FILE= xm-irix5.h
+NAT_FILE= nm-irix5.h
NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \
proc-api.o proc-events.o proc-flags.o proc-why.o
diff --git a/gdb/config/mips/linux.mh b/gdb/config/mips/linux.mh
index 38f87256689..3fbc3e9dc74 100644
--- a/gdb/config/mips/linux.mh
+++ b/gdb/config/mips/linux.mh
@@ -1,5 +1,4 @@
# Host: Linux/MIPS
-XM_FILE= xm-linux.h
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o mips-linux-nat.o \
thread-db.o lin-lwp.o proc-service.o linux-proc.o gcore.o \
diff --git a/gdb/config/mips/linux64.mt b/gdb/config/mips/linux64.mt
deleted file mode 100644
index 985d8f57c15..00000000000
--- a/gdb/config/mips/linux64.mt
+++ /dev/null
@@ -1,7 +0,0 @@
-# Target: Linux/MIPS w/ support for 64-bit ABIs
-TDEPFILES= mips-tdep.o mips-linux-tdep.o corelow.o \
- solib.o solib-svr4.o
-TM_FILE= tm-linux64.h
-
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/littlemips.mh b/gdb/config/mips/littlemips.mh
index 581a9084e3f..30c40ad847c 100644
--- a/gdb/config/mips/littlemips.mh
+++ b/gdb/config/mips/littlemips.mh
@@ -1,3 +1,3 @@
-# Host: Little-endian MIPS machine such as DECstation.
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
-XM_FILE= xm-mips.h
+# OBSOLETE # Host: Little-endian MIPS machine such as DECstation.
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
+# OBSOLETE XM_FILE= xm-mips.h
diff --git a/gdb/config/mips/mipsm3.mh b/gdb/config/mips/mipsm3.mh
deleted file mode 100644
index fc9f37c3f4a..00000000000
--- a/gdb/config/mips/mipsm3.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-# OBSOLETE # Host: Little endian MIPS machine such as pmax
-# OBSOLETE # running Mach 3.0 operating system
-# OBSOLETE
-# OBSOLETE NATDEPFILES= mipsm3-nat.o m3-nat.o core-aout.o
-# OBSOLETE XM_FILE= xm-mipsm3.h
-# OBSOLETE NAT_FILE= ../nm-m3.h
diff --git a/gdb/config/mips/mipsm3.mt b/gdb/config/mips/mipsm3.mt
deleted file mode 100644
index 837b27ee65e..00000000000
--- a/gdb/config/mips/mipsm3.mt
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Target: Little-endian MIPS machine such as pmax
-# OBSOLETE # running Mach 3.0 operating system
-# OBSOLETE TDEPFILES= mips-tdep.o
-# OBSOLETE TM_FILE= tm-mipsm3.h
diff --git a/gdb/config/mips/mipsv4.mt b/gdb/config/mips/mipsv4.mt
index 6d3b47d024a..13320c20ae6 100644
--- a/gdb/config/mips/mipsv4.mt
+++ b/gdb/config/mips/mipsv4.mt
@@ -1,3 +1,3 @@
-# Target: MIPS running SVR4
-TDEPFILES= mips-tdep.o
-TM_FILE= tm-mipsv4.h
+# OBSOLETE # Target: MIPS running SVR4
+# OBSOLETE TDEPFILES= mips-tdep.o
+# OBSOLETE TM_FILE= tm-mipsv4.h
diff --git a/gdb/config/mips/news-mips.mh b/gdb/config/mips/news-mips.mh
index 5cc138f38e4..f2c7f89b3ed 100644
--- a/gdb/config/mips/news-mips.mh
+++ b/gdb/config/mips/news-mips.mh
@@ -1,3 +1,3 @@
-# Host: Big-endian MIPS machine such as Sony News
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o mips-nat.o
-NAT_FILE= nm-news-mips.h
+# OBSOLETE # Host: Big-endian MIPS machine such as Sony News
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o mips-nat.o
+# OBSOLETE NAT_FILE= nm-news-mips.h
diff --git a/gdb/config/mips/nm-linux.h b/gdb/config/mips/nm-linux.h
index 426dd5523b6..8fd21930a45 100644
--- a/gdb/config/mips/nm-linux.h
+++ b/gdb/config/mips/nm-linux.h
@@ -1,6 +1,6 @@
/* Native-dependent definitions for GNU/Linux on MIPS.
- Copyright 1996, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,8 +22,6 @@
#ifndef NM_MIPSLINUX_H
#define NM_MIPSLINUX_H
-#define MIPS_GNULINUX_TARGET
-
#include "config/nm-linux.h"
/* Return sizeof user struct to callers in less machine dependent
diff --git a/gdb/config/mips/nm-mips.h b/gdb/config/mips/nm-mips.h
index 7b61d83e6b9..f20ddf1d466 100644
--- a/gdb/config/mips/nm-mips.h
+++ b/gdb/config/mips/nm-mips.h
@@ -1,34 +1,34 @@
-/* Native definitions for GDB on DECstations, Sony News. and MIPS Riscos systems
- Copyright 1986, 1987, 1989, 1992, 1995, 1996, 2000
- Free Software Foundation, Inc.
- Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
- and by Alessandro Forin(af@cs.cmu.edu) at CMU
-
- 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. */
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-#define FETCH_INFERIOR_REGISTERS
-
-/* Figure out where the longjmp will land. We expect that we have just entered
- longjmp and haven't yet setup the stack frame, so the args are still in the
- argument regs. a0 (CALL_ARG0) points at the jmp_buf structure from which we
- extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-extern int get_longjmp_target (CORE_ADDR *);
+// OBSOLETE /* Native definitions for GDB on DECstations, Sony News. and MIPS Riscos systems
+// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1995, 1996, 2000
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
+// OBSOLETE and by Alessandro Forin(af@cs.cmu.edu) at CMU
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
+// OBSOLETE
+// OBSOLETE /* Figure out where the longjmp will land. We expect that we have just entered
+// OBSOLETE longjmp and haven't yet setup the stack frame, so the args are still in the
+// OBSOLETE argument regs. a0 (CALL_ARG0) points at the jmp_buf structure from which we
+// OBSOLETE extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
+// OBSOLETE This routine returns true on success */
+// OBSOLETE
+// OBSOLETE #define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
+// OBSOLETE extern int get_longjmp_target (CORE_ADDR *);
diff --git a/gdb/config/mips/nm-news-mips.h b/gdb/config/mips/nm-news-mips.h
index 9f80eb55709..15d9b7b2c36 100644
--- a/gdb/config/mips/nm-news-mips.h
+++ b/gdb/config/mips/nm-news-mips.h
@@ -1,43 +1,43 @@
-/* Definitions to make GDB run on a mips box under 4.3bsd.
- Copyright 1986, 1987, 1989, 1993, 1996 Free Software Foundation, Inc.
- Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
- and by Alessandro Forin(af@cs.cmu.edu) at CMU
-
- 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_NEWS_MIPS_H
-#define NM_NEWS_MIPS_H 1
-
-/* Needed for RISC NEWS core files. */
-#include <machine/machparam.h>
-#include <sys/types.h>
-#define KERNEL_U_ADDR UADDR
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- if (regno < 38) addr = (NBPG*UPAGES) + (regno - 38)*sizeof(int);\
- else addr = 0; /* ..somewhere in the pcb */
-
-/* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
-#define ONE_PROCESS_WRITETEXT
-
-#include "mips/nm-mips.h"
-
-/* Apparently not in <sys/types.h> */
-typedef int pid_t;
-
-#endif /* NM_NEWS_MIPS_H */
+// OBSOLETE /* Definitions to make GDB run on a mips box under 4.3bsd.
+// OBSOLETE Copyright 1986, 1987, 1989, 1993, 1996 Free Software Foundation, Inc.
+// OBSOLETE Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
+// OBSOLETE and by Alessandro Forin(af@cs.cmu.edu) at CMU
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #ifndef NM_NEWS_MIPS_H
+// OBSOLETE #define NM_NEWS_MIPS_H 1
+// OBSOLETE
+// OBSOLETE /* Needed for RISC NEWS core files. */
+// OBSOLETE #include <machine/machparam.h>
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #define KERNEL_U_ADDR UADDR
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE if (regno < 38) addr = (NBPG*UPAGES) + (regno - 38)*sizeof(int);\
+// OBSOLETE else addr = 0; /* ..somewhere in the pcb */
+// OBSOLETE
+// OBSOLETE /* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
+// OBSOLETE #define ONE_PROCESS_WRITETEXT
+// OBSOLETE
+// OBSOLETE #include "mips/nm-mips.h"
+// OBSOLETE
+// OBSOLETE /* Apparently not in <sys/types.h> */
+// OBSOLETE typedef int pid_t;
+// OBSOLETE
+// OBSOLETE #endif /* NM_NEWS_MIPS_H */
diff --git a/gdb/config/mips/nm-riscos.h b/gdb/config/mips/nm-riscos.h
index 7f68b677092..dba51b2775c 100644
--- a/gdb/config/mips/nm-riscos.h
+++ b/gdb/config/mips/nm-riscos.h
@@ -1,60 +1,60 @@
-/* This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* MIPS running RISC/os 4.52C. */
-
-#define PCB_OFFSET(FIELD) ((int)&((struct user*)0)->u_pcb.FIELD)
-
-/* RISC/os 5.0 defines this in machparam.h. */
-#include <bsd43/machine/machparam.h>
-#define NBPG BSD43_NBPG
-#define UPAGES BSD43_UPAGES
-
-/* Where is this used? I don't see any uses in mips-nat.c, and I don't think
- the uses in infptrace.c are used if FETCH_INFERIOR_REGISTERS is defined.
- Does the compiler react badly to "extern CORE_ADDR kernel_u_addr" (even
- if never referenced)? */
-#define KERNEL_U_ADDR BSD43_UADDR
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- if (regno < FP0_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*((regno)+EF_AT-1); \
- else if (regno < PC_REGNUM) \
- addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
- else if (regno == PS_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_SR; \
- else if (regno == BADVADDR_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_BADVADDR; \
- else if (regno == LO_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_MDLO; \
- else if (regno == HI_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_MDHI; \
- else if (regno == CAUSE_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_CAUSE; \
- else if (regno == PC_REGNUM) \
- addr = UPAGES*NBPG-EF_SIZE+4*EF_EPC; \
- else if (regno < FCRCS_REGNUM) \
- addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
- else if (regno == FCRCS_REGNUM) \
- addr = PCB_OFFSET(pcb_fpc_csr); \
- else if (regno == FCRIR_REGNUM) \
- addr = PCB_OFFSET(pcb_fpc_eir); \
- else \
- addr = 0;
-
-#include "mips/nm-mips.h"
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-#define FETCH_INFERIOR_REGISTERS
+// OBSOLETE /* This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* MIPS running RISC/os 4.52C. */
+// OBSOLETE
+// OBSOLETE #define PCB_OFFSET(FIELD) ((int)&((struct user*)0)->u_pcb.FIELD)
+// OBSOLETE
+// OBSOLETE /* RISC/os 5.0 defines this in machparam.h. */
+// OBSOLETE #include <bsd43/machine/machparam.h>
+// OBSOLETE #define NBPG BSD43_NBPG
+// OBSOLETE #define UPAGES BSD43_UPAGES
+// OBSOLETE
+// OBSOLETE /* Where is this used? I don't see any uses in mips-nat.c, and I don't think
+// OBSOLETE the uses in infptrace.c are used if FETCH_INFERIOR_REGISTERS is defined.
+// OBSOLETE Does the compiler react badly to "extern CORE_ADDR kernel_u_addr" (even
+// OBSOLETE if never referenced)? */
+// OBSOLETE #define KERNEL_U_ADDR BSD43_UADDR
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE if (regno < FP0_REGNUM) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*((regno)+EF_AT-1); \
+// OBSOLETE else if (regno < PC_REGNUM) \
+// OBSOLETE addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
+// OBSOLETE else if (regno == PS_REGNUM) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_SR; \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->badvaddr) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_BADVADDR; \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->lo) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_MDLO; \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->hi) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_MDHI; \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->cause) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_CAUSE; \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->pc) \
+// OBSOLETE addr = UPAGES*NBPG-EF_SIZE+4*EF_EPC; \
+// OBSOLETE else if (regno < mips_regnum (current_gdbarch)->fp_control_status) \
+// OBSOLETE addr = PCB_OFFSET(pcb_fpregs[0]) + 4*(regno-FP0_REGNUM); \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->fp_control_status) \
+// OBSOLETE addr = PCB_OFFSET(pcb_fpc_csr); \
+// OBSOLETE else if (regno == mips_regnum (current_gdbarch)->fp_implementation_revision) \
+// OBSOLETE addr = PCB_OFFSET(pcb_fpc_eir); \
+// OBSOLETE else \
+// OBSOLETE addr = 0;
+// OBSOLETE
+// OBSOLETE #include "mips/nm-mips.h"
+// OBSOLETE
+// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
diff --git a/gdb/config/mips/riscos.mh b/gdb/config/mips/riscos.mh
index 6a3192f382b..0a1c31c65f1 100644
--- a/gdb/config/mips/riscos.mh
+++ b/gdb/config/mips/riscos.mh
@@ -1,16 +1,16 @@
-# Host: MIPS running RISC/os
-
-XM_FILE= xm-riscos.h
-
-NAT_FILE= nm-riscos.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o mips-nat.o
-
-MH_CFLAGS=-Wf,-XNh10000
-
-# ptrace(2) apparently has problems in the BSD environment. No workaround is
-# known except to select the sysv environment. Could we use /proc instead?
-# These "sysv environments" and "bsd environments" often end up being a pain.
-#
-# This is not part of CFLAGS because perhaps not all C compilers have this
-# option.
-CC= cc -systype sysv
+# OBSOLETE # Host: MIPS running RISC/os
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-riscos.h
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-riscos.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o mips-nat.o
+# OBSOLETE
+# OBSOLETE MH_CFLAGS=-Wf,-XNh10000
+# OBSOLETE
+# OBSOLETE # ptrace(2) apparently has problems in the BSD environment. No workaround is
+# OBSOLETE # known except to select the sysv environment. Could we use /proc instead?
+# OBSOLETE # These "sysv environments" and "bsd environments" often end up being a pain.
+# OBSOLETE #
+# OBSOLETE # This is not part of CFLAGS because perhaps not all C compilers have this
+# OBSOLETE # option.
+# OBSOLETE CC= cc -systype sysv
diff --git a/gdb/config/mips/tm-irix5.h b/gdb/config/mips/tm-irix5.h
index 61e809debd1..ff40d66e735 100644
--- a/gdb/config/mips/tm-irix5.h
+++ b/gdb/config/mips/tm-irix5.h
@@ -1,6 +1,7 @@
/* Target machine description for SGI Iris under Irix 5, for GDB.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000
- Free Software Foundation, Inc.
+
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2003 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -21,45 +22,6 @@
#include "mips/tm-mips.h"
-/* Redefine register numbers for SGI. */
-
-#undef MIPS_REGISTER_NAMES
-#undef FP0_REGNUM
-#undef PC_REGNUM
-#undef HI_REGNUM
-#undef LO_REGNUM
-#undef CAUSE_REGNUM
-#undef BADVADDR_REGNUM
-#undef FCRCS_REGNUM
-#undef FCRIR_REGNUM
-
-/* Initializer for an array of names for registers 32 and above.
- There should be NUM_REGS-32 strings in this initializer. */
-
-#define MIPS_REGISTER_NAMES \
- { "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
- "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
- "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",\
- "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",\
- "pc", "cause", "bad", "hi", "lo", "fsr", "fir" \
- }
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define FP0_REGNUM 32 /* Floating point register 0 (single float) */
-#define PC_REGNUM 64 /* Contains program counter */
-#define CAUSE_REGNUM 65 /* describes last exception */
-#define BADVADDR_REGNUM 66 /* bad vaddr for addressing exception */
-#define HI_REGNUM 67 /* Multiple/divide temp */
-#define LO_REGNUM 68 /* ... */
-#define FCRCS_REGNUM 69 /* FP control/status */
-#define FCRIR_REGNUM 70 /* FP implementation/revision */
-
/* Offsets for register values in _sigtramp frame.
sigcontext is immediately above the _sigtramp frame on Irix. */
#define SIGFRAME_BASE 0x0
@@ -67,36 +29,9 @@
#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 3 * 4)
#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 3 * 4 + 32 * 4 + 4)
-/* FIXME: cagney/2000-04-04: Testing the _MIPS_SIM_NABI32 and
- _MIPS_SIM in a tm-*.h file is simply wrong! Those are
- host-dependant macros (provided by /usr/include) and stop any
- chance of the target being cross compiled */
-#if defined (_MIPS_SIM_NABI32) && _MIPS_SIM == _MIPS_SIM_NABI32
-/*
- * Irix 6 (n32 ABI) has 32-bit GP regs and 64-bit FP regs
- */
-
-#undef MIPS_REGISTER_BYTE
-#define MIPS_REGISTER_BYTE(N) \
- (((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
- ((N) < FP0_REGNUM + 32) ? \
- FP0_REGNUM * MIPS_REGSIZE + \
- ((N) - FP0_REGNUM) * sizeof(double) : \
- 32 * sizeof(double) + ((N) - 32) * MIPS_REGSIZE)
-
-#undef MIPS_REGISTER_TYPE
-#define MIPS_REGISTER_TYPE(N) \
- (((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_double \
- : ((N) == 32 /*SR*/) ? builtin_type_uint32 \
- : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
- : builtin_type_int)
-
-#endif /* N32 */
-
-
/* The signal handler trampoline is called _sigtramp. */
-#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
+#undef DEPRECATED_IN_SIGTRAMP
+#define DEPRECATED_IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name))
/* Irix 5 saves a full 64 bits for each register. We skip 2 * 4 to
get to the saved PC (the register mask and status register are both
@@ -110,4 +45,3 @@
#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 4)
#undef SIGFRAME_FPREGSAVE_OFF
#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 32 * 8 + 4)
-#define SIGFRAME_REG_SIZE 8
diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h
index 0d4fc0c2a35..88abf806c4d 100644
--- a/gdb/config/mips/tm-irix6.h
+++ b/gdb/config/mips/tm-irix6.h
@@ -1,6 +1,6 @@
/* Target machine description for SGI Iris under Irix 6.x, for GDB.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,60 +19,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-mips64.h"
+#include "mips/tm-mips.h"
#include "solib.h"
-/* Redefine register numbers for SGI. */
-
-#undef MIPS_REGISTER_NAMES
-#undef FP0_REGNUM
-#undef PC_REGNUM
-#undef HI_REGNUM
-#undef LO_REGNUM
-#undef CAUSE_REGNUM
-#undef BADVADDR_REGNUM
-#undef FCRCS_REGNUM
-#undef FCRIR_REGNUM
-
-/* Initializer for an array of names for registers 32 and above.
- There should be NUM_REGS-32 strings in this initializer. */
-
-#define MIPS_REGISTER_NAMES \
- { "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
- "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
- "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",\
- "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",\
- "pc", "cause", "bad", "hi", "lo", "fsr", "fir" \
- }
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define FP0_REGNUM 32 /* Floating point register 0 (single float) */
-#define PC_REGNUM 64 /* Contains program counter */
-#define CAUSE_REGNUM 65 /* describes last exception */
-#define BADVADDR_REGNUM 66 /* bad vaddr for addressing exception */
-#define HI_REGNUM 67 /* Multiple/divide temp */
-#define LO_REGNUM 68 /* ... */
-#define FCRCS_REGNUM 69 /* FP control/status */
-#define FCRIR_REGNUM 70 /* FP implementation/revision */
-
-
-#undef MIPS_REGISTER_BYTE
-#define MIPS_REGISTER_BYTE(N) \
- (((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
- ((N) < FP0_REGNUM + 32) ? \
- FP0_REGNUM * MIPS_REGSIZE + \
- ((N) - FP0_REGNUM) * sizeof(double) : \
- 32 * sizeof(double) + ((N) - 32) * MIPS_REGSIZE)
-
/* The signal handler trampoline is called _sigtramp. */
-#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
+#undef DEPRECATED_IN_SIGTRAMP
+#define DEPRECATED_IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name))
/* Offsets for register values in _sigtramp frame.
sigcontext is immediately above the _sigtramp frame on Irix. */
@@ -91,11 +43,3 @@
#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 4)
#undef SIGFRAME_FPREGSAVE_OFF
#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 32 * 8 + 4)
-#define SIGFRAME_REG_SIZE 8
-
-/* Undefine those methods which have been multiarched. */
-
-/* Undefine MIPS_REGISTER_TYPE, so that GDB uses real C code in
- mips_register_type() to return the register type, instead of
- relying on this macro. */
-#undef MIPS_REGISTER_TYPE
diff --git a/gdb/config/mips/tm-linux.h b/gdb/config/mips/tm-linux.h
index c049c29aa72..4227cd3e426 100644
--- a/gdb/config/mips/tm-linux.h
+++ b/gdb/config/mips/tm-linux.h
@@ -1,6 +1,6 @@
/* Target-dependent definitions for GNU/Linux MIPS.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -26,7 +26,6 @@
/* We don't want to inherit tm-mips.h's shared library trampoline code. */
-#undef IN_SOLIB_CALL_TRAMPOLINE
#undef IN_SOLIB_RETURN_TRAMPOLINE
#undef SKIP_TRAMPOLINE_CODE
#undef IGNORE_HELPER_CALL
@@ -47,7 +46,17 @@
/* FIXME: This still needs to be implemented. */
-#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) (0)
+#undef DEPRECATED_IN_SIGTRAMP
+#define DEPRECATED_IN_SIGTRAMP(pc, name) (0)
+
+#undef IN_SOLIB_DYNSYM_RESOLVE_CODE
+#define IN_SOLIB_DYNSYM_RESOLVE_CODE(PC) mips_linux_in_dynsym_resolve_code (PC)
+int mips_linux_in_dynsym_resolve_code (CORE_ADDR pc);
+
+/* We don't want all of tm-sysv4.h's shared library trampoline code either.
+ Note that by undefining IN_SOLIB_CALL_TRAMPOLINE here we will use the
+ gdbarch vector's version instead. */
+
+#undef IN_SOLIB_CALL_TRAMPOLINE
#endif /* TM_MIPSLINUX_H */
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 51a6a7dbaeb..be0d6b75eb1 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -45,28 +45,6 @@ extern int mips_step_skips_delay (CORE_ADDR);
#define STEP_SKIPS_DELAY_P (1)
#define STEP_SKIPS_DELAY(pc) (mips_step_skips_delay (pc))
-/* The size of a register. This is predefined in tm-mips64.h. */
-
-#ifndef MIPS_REGSIZE
-#define MIPS_REGSIZE 4
-#endif
-
-/* Initializer for an array of names for registers 32 and above.
- There should be NUM_REGS-32 strings in this initializer. */
-
-#ifndef MIPS_REGISTER_NAMES
-#define MIPS_REGISTER_NAMES \
- { "sr", "lo", "hi", "bad", "cause","pc", \
- "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
- "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
- "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",\
- "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",\
- "fsr", "fir", ""/*"fp"*/, "", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- }
-#endif
-
/* 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,
@@ -81,36 +59,11 @@ extern int mips_step_skips_delay (CORE_ADDR);
#define SP_REGNUM 29 /* Contains address of top of stack */
#define RA_REGNUM 31 /* Contains return address value */
#define PS_REGNUM 32 /* Contains processor status */
-#define HI_REGNUM 34 /* Multiple/divide temp */
-#define LO_REGNUM 33 /* ... */
-#define BADVADDR_REGNUM 35 /* bad vaddr for addressing exception */
-#define CAUSE_REGNUM 36 /* describes last exception */
-#define PC_REGNUM 37 /* Contains program counter */
-#define FP0_REGNUM 38 /* Floating point register 0 (single float) */
-#define FPA0_REGNUM (FP0_REGNUM+12) /* First float argument register */
-#define FCRCS_REGNUM 70 /* FP control/status */
-#define FCRIR_REGNUM 71 /* FP implementation/revision */
#define UNUSED_REGNUM 73 /* Never used, FIXME */
#define FIRST_EMBED_REGNUM 74 /* First CP0 register for embedded use */
#define PRID_REGNUM 89 /* Processor ID */
#define LAST_EMBED_REGNUM 89 /* Last one */
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#define MIPS_REGISTER_BYTE(N) ((N) * MIPS_REGSIZE)
-
-/* Return the GDB type object for the "standard" data type of data in
- register N. */
-
-#ifndef MIPS_REGISTER_TYPE
-#define MIPS_REGISTER_TYPE(N) \
- (((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_float \
- : ((N) == 32 /*SR*/) ? builtin_type_uint32 \
- : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
- : builtin_type_int)
-#endif
-
/* Special symbol found in blocks associated with routines. We can hang
mips_extra_func_info_t's off of this. */
@@ -130,10 +83,6 @@ typedef struct mips_extra_func_info
}
*mips_extra_func_info_t;
-extern void mips_print_extra_frame_info (struct frame_info *frame);
-#define PRINT_EXTRA_FRAME_INFO(fi) \
- mips_print_extra_frame_info (fi)
-
/* It takes two values to specify a frame on the MIPS.
In fact, the *PC* is the primary value that sets up a frame. The
@@ -154,9 +103,6 @@ extern struct frame_info *setup_arbitrary_frame (int, CORE_ADDR *);
extern CORE_ADDR sigtramp_address, sigtramp_end;
extern void fixup_sigtramp (void);
-/* Defined in mips-tdep.c and used in remote-mips.c */
-extern char *mips_read_processor_type (void);
-
/* Functions for dealing with MIPS16 call and return stubs. */
#define IGNORE_HELPER_CALL(pc) mips_ignore_helper (pc)
extern int mips_ignore_helper (CORE_ADDR pc);
@@ -169,8 +115,5 @@ typedef unsigned long t_inst; /* Integer big enough to hold an instruction */
#endif /* TM_MIPS_H */
-/* Command to set the processor type. */
-extern void mips_set_processor_type_command (char *, int);
-
/* Single step based on where the current instruction will take us. */
extern void mips_software_single_step (enum target_signal, int);
diff --git a/gdb/config/mips/tm-mips64.h b/gdb/config/mips/tm-mips64.h
deleted file mode 100644
index 2547e86f482..00000000000
--- a/gdb/config/mips/tm-mips64.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Target machine parameters for MIPS r4000
- Copyright 1994, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
- Contributed by Ian Lance Taylor (ian@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 eight byte registers. */
-#define MIPS_REGSIZE 8
-
-/* define 8 byte register type */
-#define MIPS_REGISTER_TYPE(N) \
- (((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_double \
- : ((N) == 32 /*SR*/) ? builtin_type_uint32 \
- : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
- : builtin_type_long_long)
-
-/* Load double words in CALL_DUMMY. */
-#define OP_LDFPR 065 /* ldc1 */
-#define OP_LDGPR 067 /* ld */
-
-/* Get the basic MIPS definitions. */
-#include "mips/tm-mips.h"
diff --git a/gdb/config/mips/tm-mipsm3.h b/gdb/config/mips/tm-mipsm3.h
deleted file mode 100644
index dbc10d7117b..00000000000
--- a/gdb/config/mips/tm-mipsm3.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a mips box under Mach 3.0
-// OBSOLETE Copyright 1992, 1993, 1998 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* Mach specific definitions for little endian mips (e.g. pmax)
-// OBSOLETE * running Mach 3.0
-// OBSOLETE *
-// OBSOLETE * Author: Jukka Virtanen <jtv@hut.fi>
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Include common definitions for Mach3 systems */
-// OBSOLETE #include "config/nm-m3.h"
-// OBSOLETE
-// OBSOLETE /* Define offsets to access CPROC stack when it does not have
-// OBSOLETE * a kernel thread.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* From mk/user/threads/mips/csw.s */
-// OBSOLETE #define SAVED_FP (12*4)
-// OBSOLETE #define SAVED_PC (13*4)
-// OBSOLETE #define SAVED_BYTES (14*4)
-// OBSOLETE
-// OBSOLETE /* Using these, define our offsets to items strored in
-// OBSOLETE * cproc_switch in csw.s
-// OBSOLETE */
-// OBSOLETE #define MACHINE_CPROC_SP_OFFSET SAVED_BYTES
-// OBSOLETE #define MACHINE_CPROC_PC_OFFSET SAVED_PC
-// OBSOLETE #define MACHINE_CPROC_FP_OFFSET SAVED_FP
-// OBSOLETE
-// OBSOLETE /* Thread flavors used in setting the Trace state.
-// OBSOLETE
-// OBSOLETE * In <mach/machine/thread_status.h>
-// OBSOLETE */
-// OBSOLETE #define TRACE_FLAVOR MIPS_EXC_STATE
-// OBSOLETE #define TRACE_FLAVOR_SIZE MIPS_EXC_STATE_COUNT
-// OBSOLETE #define TRACE_SET(x,state) ((struct mips_exc_state *)state)->cause = EXC_SST;
-// OBSOLETE #define TRACE_CLEAR(x,state) 0
-// OBSOLETE
-// OBSOLETE /* Mach supports attach/detach */
-// OBSOLETE #define ATTACH_DETACH 1
-// OBSOLETE
-// OBSOLETE #include "mips/tm-mips.h"
-// OBSOLETE
-// OBSOLETE /* Address of end of user stack space.
-// OBSOLETE * for MACH, see <machine/vmparam.h>
-// OBSOLETE */
-// OBSOLETE #undef STACK_END_ADDR
-// OBSOLETE #define STACK_END_ADDR USRSTACK
-// OBSOLETE
-// OBSOLETE /* Output registers in tabular format */
-// OBSOLETE #define TABULAR_REGISTER_OUTPUT
diff --git a/gdb/config/mips/tm-mipsv4.h b/gdb/config/mips/tm-mipsv4.h
index 37f9e464790..94607414f3b 100644
--- a/gdb/config/mips/tm-mipsv4.h
+++ b/gdb/config/mips/tm-mipsv4.h
@@ -1,37 +1,37 @@
-/* Target machine description for MIPS running SVR4, for GDB.
- Copyright 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. */
-
-#include "mips/tm-mips.h"
-#include "config/tm-sysv4.h"
-
-/* The signal handler trampoline is called _sigtramp. */
-#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
-
-/* On entry to the signal handler trampoline, an ucontext is already
- pushed on the stack. We can get at the saved registers via the
- mcontext which is contained within the ucontext. */
-#define SIGFRAME_BASE 0
-#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 40)
-#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 40 + 35 * 4)
-#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 40 + 36 * 4)
-
-/* Convert a DWARF register number to a gdb REGNUM. */
-#define DWARF_REG_TO_REGNUM(num) ((num) < 32 ? (num) : (num)+FP0_REGNUM-32)
+// OBSOLETE /* Target machine description for MIPS running SVR4, for GDB.
+// OBSOLETE Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "mips/tm-mips.h"
+// OBSOLETE #include "config/tm-sysv4.h"
+// OBSOLETE
+// OBSOLETE /* The signal handler trampoline is called _sigtramp. */
+// OBSOLETE #undef IN_SIGTRAMP
+// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name))
+// OBSOLETE
+// OBSOLETE /* On entry to the signal handler trampoline, an ucontext is already
+// OBSOLETE pushed on the stack. We can get at the saved registers via the
+// OBSOLETE mcontext which is contained within the ucontext. */
+// OBSOLETE #define SIGFRAME_BASE 0
+// OBSOLETE #define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 40)
+// OBSOLETE #define SIGFRAME_PC_OFF (SIGFRAME_BASE + 40 + 35 * 4)
+// OBSOLETE #define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 40 + 36 * 4)
+// OBSOLETE
+// OBSOLETE /* Convert a DWARF register number to a gdb REGNUM. */
+// OBSOLETE #define DWARF_REG_TO_REGNUM(num) ((num) < 32 ? (num) : (num)+FP0_REGNUM-32)
diff --git a/gdb/config/mips/tm-nbsd.h b/gdb/config/mips/tm-nbsd.h
index 143f3a43114..eb8e292e2dc 100644
--- a/gdb/config/mips/tm-nbsd.h
+++ b/gdb/config/mips/tm-nbsd.h
@@ -22,9 +22,6 @@
#ifndef TM_NBSD_H
#define TM_NBSD_H
-/* Saved Pc. Get it from sigcontext if within sigtramp. */
-#define SIGCONTEXT_PC_OFFSET 8
-
#include "mips/tm-mips.h"
#include "solib.h"
@@ -35,6 +32,6 @@
#undef IGNORE_HELPER_CALL
/* XXX undef a bunch of stuff we want to use multi-arch */
-#undef IN_SIGTRAMP
+#undef DEPRECATED_IN_SIGTRAMP
#endif /* TM_NBSD_H */
diff --git a/gdb/config/mips/tm-tx39.h b/gdb/config/mips/tm-tx39.h
deleted file mode 100644
index 81f3b6ddc41..00000000000
--- a/gdb/config/mips/tm-tx39.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright 1993, 1997, 1999, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-mips.h"
-
-#undef MIPS_REGISTER_NAMES
-#define MIPS_REGISTER_NAMES \
- { "sr", "lo", "hi", "bad", "cause","pc", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "config", "cache", "debug", "depc", "epc", "" \
- }
diff --git a/gdb/config/mips/tm-vxmips.h b/gdb/config/mips/tm-vxmips.h
index 5475fb57259..5eb10438303 100644
--- a/gdb/config/mips/tm-vxmips.h
+++ b/gdb/config/mips/tm-vxmips.h
@@ -21,9 +21,3 @@
#include "mips/tm-mips.h"
#include "config/tm-vxworks.h"
-
-/* FIXME: These are almost certainly wrong. */
-
-/* Number of registers in a ptrace_getregs call. */
-
-#define VX_NUM_REGS (NUM_REGS)
diff --git a/gdb/config/mips/tx39.mt b/gdb/config/mips/tx39.mt
deleted file mode 100644
index 8b4c1a92c24..00000000000
--- a/gdb/config/mips/tx39.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Target: Big-endian mips board, typically an IDT.
-TDEPFILES= mips-tdep.o remote-mips.o dve3900-rom.o monitor.o dsrec.o
-TM_FILE= tm-tx39.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/tx39l.mt b/gdb/config/mips/tx39l.mt
deleted file mode 100644
index 8b4c1a92c24..00000000000
--- a/gdb/config/mips/tx39l.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Target: Big-endian mips board, typically an IDT.
-TDEPFILES= mips-tdep.o remote-mips.o dve3900-rom.o monitor.o dsrec.o
-TM_FILE= tm-tx39.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/xm-mips.h b/gdb/config/mips/xm-mips.h
index c1f53b53ed9..bc3aa6e40c4 100644
--- a/gdb/config/mips/xm-mips.h
+++ b/gdb/config/mips/xm-mips.h
@@ -1,59 +1,59 @@
-/* Definitions to make GDB run on a mips box under 4.3bsd.
- Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998
- Free Software Foundation, Inc.
- Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
- and by Alessandro Forin(af@cs.cmu.edu) at CMU
-
- 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 ultrix
-/* Needed for DECstation core files. */
-#include <machine/param.h>
-#define KERNEL_U_ADDR UADDR
-
-/* Native Ultrix cc has broken long long support. */
-#ifndef __GNUC__
-#undef CC_HAS_LONG_LONG
-#endif
-#endif
-
-#if ! defined (__GNUC__) && ! defined (offsetof)
-#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-#endif
-
-/* Only used for core files on DECstations.
- First four registers at u.u_ar0 are saved arguments, and
- there is no r0 saved. Float registers are saved
- in u_pcb.pcb_fpregs, not relative to u.u_ar0. */
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- { \
- if (regno < FP0_REGNUM) \
- addr = blockend + sizeof(int) * (4 + regno - 1); \
- else \
- addr = offsetof (struct user, u_pcb.pcb_fpregs[0]) + \
- sizeof (int) * (regno - FP0_REGNUM); \
- }
-
-/* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
-#define ONE_PROCESS_WRITETEXT
-
-/* HAVE_SGTTY also works, last we tried.
-
- But we have termios, at least as of Ultrix 4.2A, so use it. */
-#define HAVE_TERMIOS
+// OBSOLETE /* Definitions to make GDB run on a mips box under 4.3bsd.
+// OBSOLETE Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
+// OBSOLETE and by Alessandro Forin(af@cs.cmu.edu) at CMU
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #ifdef ultrix
+// OBSOLETE /* Needed for DECstation core files. */
+// OBSOLETE #include <machine/param.h>
+// OBSOLETE #define KERNEL_U_ADDR UADDR
+// OBSOLETE
+// OBSOLETE /* Native Ultrix cc has broken long long support. */
+// OBSOLETE #ifndef __GNUC__
+// OBSOLETE #undef CC_HAS_LONG_LONG
+// OBSOLETE #endif
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE #if ! defined (__GNUC__) && ! defined (offsetof)
+// OBSOLETE #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE /* Only used for core files on DECstations.
+// OBSOLETE First four registers at u.u_ar0 are saved arguments, and
+// OBSOLETE there is no r0 saved. Float registers are saved
+// OBSOLETE in u_pcb.pcb_fpregs, not relative to u.u_ar0. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE { \
+// OBSOLETE if (regno < FP0_REGNUM) \
+// OBSOLETE addr = blockend + sizeof(int) * (4 + regno - 1); \
+// OBSOLETE else \
+// OBSOLETE addr = offsetof (struct user, u_pcb.pcb_fpregs[0]) + \
+// OBSOLETE sizeof (int) * (regno - FP0_REGNUM); \
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
+// OBSOLETE #define ONE_PROCESS_WRITETEXT
+// OBSOLETE
+// OBSOLETE /* HAVE_SGTTY also works, last we tried.
+// OBSOLETE
+// OBSOLETE But we have termios, at least as of Ultrix 4.2A, so use it. */
+// OBSOLETE #define HAVE_TERMIOS
diff --git a/gdb/config/mips/xm-mipsm3.h b/gdb/config/mips/xm-mipsm3.h
deleted file mode 100644
index 2207d3ab896..00000000000
--- a/gdb/config/mips/xm-mipsm3.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a mips box under 4.3bsd.
-// OBSOLETE Copyright 1986, 1987, 1989, 1993 Free Software Foundation, Inc.
-// OBSOLETE Contributed by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin
-// OBSOLETE and by Alessandro Forin(af@cs.cmu.edu) at CMU
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #define KERNEL_U_ADDR 0 /* Not needed. */
-// OBSOLETE
-// OBSOLETE /* Only used for core files on DECstations. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE if (regno < 38) addr = (NBPG*UPAGES) + (regno - 38)*sizeof(int);\
-// OBSOLETE else addr = 0; /* ..somewhere in the pcb */
diff --git a/gdb/config/mips/xm-mipsv4.h b/gdb/config/mips/xm-mipsv4.h
index eccb2964d05..1f39e31ae1d 100644
--- a/gdb/config/mips/xm-mipsv4.h
+++ b/gdb/config/mips/xm-mipsv4.h
@@ -1,22 +1,22 @@
-/* Definitions for MIPS running SVR4 hosting support.
-
- Copyright 1994 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "config/xm-sysv4.h"
+// OBSOLETE /* Definitions for MIPS running SVR4 hosting support.
+// OBSOLETE
+// OBSOLETE Copyright 1994 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "config/xm-sysv4.h"
diff --git a/gdb/config/mips/xm-riscos.h b/gdb/config/mips/xm-riscos.h
index 1f03c5a00a8..d8a65334a66 100644
--- a/gdb/config/mips/xm-riscos.h
+++ b/gdb/config/mips/xm-riscos.h
@@ -1,25 +1,25 @@
-/* Copyright 1993, 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. */
-
-#define HAVE_TERMIO
-
-#define USG 1
-
-/* setjmp.h requires uid_t. */
-#include <sys/types.h>
+// OBSOLETE /* Copyright 1993, 1994, 1995 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #define HAVE_TERMIO
+// OBSOLETE
+// OBSOLETE #define USG 1
+// OBSOLETE
+// OBSOLETE /* setjmp.h requires uid_t. */
+// OBSOLETE #include <sys/types.h>
diff --git a/gdb/config/mn10200/mn10200.mt b/gdb/config/mn10200/mn10200.mt
deleted file mode 100644
index be374ec4619..00000000000
--- a/gdb/config/mn10200/mn10200.mt
+++ /dev/null
@@ -1,6 +0,0 @@
-# OBSOLETE # Target: Matsushita mn10200
-# OBSOLETE TDEPFILES= mn10200-tdep.o
-# OBSOLETE TM_FILE= tm-mn10200.h
-# OBSOLETE
-# OBSOLETE SIM_OBS = remote-sim.o
-# OBSOLETE SIM = ../sim/mn10200/libsim.a
diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h
deleted file mode 100644
index 511c1365939..00000000000
--- a/gdb/config/mn10200/tm-mn10200.h
+++ /dev/null
@@ -1,214 +0,0 @@
-// OBSOLETE /* Parameters for execution on a Matsushita mn10200 processor.
-// OBSOLETE
-// OBSOLETE Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
-// OBSOLETE Foundation, Inc.
-// OBSOLETE
-// OBSOLETE Contributed by Geoffrey Noer <noer@cygnus.com>
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* FIXME: cagney/2001-03-01: The below macros refer to functions
-// OBSOLETE declared in "regcache.h". The ``correct fix'' is to convert those
-// OBSOLETE macros into functions. */
-// OBSOLETE #include "regcache.h"
-// OBSOLETE #include "symtab.h" /* For namespace_enum. */
-// OBSOLETE #include "symfile.h" /* For entry_point_address(). */
-// OBSOLETE
-// OBSOLETE /* ints are only 16bits on the mn10200. */
-// OBSOLETE #undef TARGET_INT_BIT
-// OBSOLETE #define TARGET_INT_BIT 16
-// OBSOLETE
-// OBSOLETE /* The mn10200 doesn't support long long types. */
-// OBSOLETE #undef TARGET_LONG_LONG_BIT
-// OBSOLETE #define TARGET_LONG_LONG_BIT 32
-// OBSOLETE
-// OBSOLETE /* The mn10200 doesn't support double or long double either. */
-// OBSOLETE #undef TARGET_DOUBLE_BIT
-// OBSOLETE #undef TARGET_LONG_DOUBLE_BIT
-// OBSOLETE #define TARGET_DOUBLE_BIT 32
-// OBSOLETE #define TARGET_LONG_DOUBLE_BIT 32
-// OBSOLETE
-// OBSOLETE /* Not strictly correct, but the machine independent code is not
-// OBSOLETE ready to handle any of the basic sizes not being a power of two. */
-// OBSOLETE #undef TARGET_PTR_BIT
-// OBSOLETE #define TARGET_PTR_BIT 32
-// OBSOLETE
-// OBSOLETE /* The mn10200 really has 24 bit registers but the simulator reads/writes
-// OBSOLETE them as 32bit values, so we claim they're 32bits each. This may have
-// OBSOLETE to be tweaked if the Matsushita emulator/board really deals with them
-// OBSOLETE as 24bits each. */
-// OBSOLETE #define REGISTER_SIZE 4
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_RAW_SIZE REGISTER_SIZE
-// OBSOLETE #define NUM_REGS 11
-// OBSOLETE
-// OBSOLETE #define REGISTER_BYTES (NUM_REGS * REGISTER_SIZE)
-// OBSOLETE
-// OBSOLETE #define REGISTER_NAMES \
-// OBSOLETE { "d0", "d1", "d2", "d3", "a0", "a1", "a2", "sp", \
-// OBSOLETE "pc", "mdr", "psw"}
-// OBSOLETE
-// OBSOLETE #define FP_REGNUM 6
-// OBSOLETE #define SP_REGNUM 7
-// OBSOLETE #define PC_REGNUM 8
-// OBSOLETE #define MDR_REGNUM 9
-// OBSOLETE #define PSW_REGNUM 10
-// OBSOLETE
-// OBSOLETE /* Treat the registers as 32bit values. */
-// OBSOLETE #define REGISTER_VIRTUAL_TYPE(REG) builtin_type_long
-// OBSOLETE
-// OBSOLETE #define REGISTER_BYTE(REG) ((REG) * REGISTER_SIZE)
-// OBSOLETE #define REGISTER_VIRTUAL_SIZE(REG) REGISTER_SIZE
-// OBSOLETE #define REGISTER_RAW_SIZE(REG) REGISTER_SIZE
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE REGISTER_SIZE
-// OBSOLETE
-// OBSOLETE /* The breakpoint instruction must be the same size as te smallest
-// OBSOLETE instruction in the instruction set.
-// OBSOLETE
-// OBSOLETE The Matsushita mn10x00 processors have single byte instructions
-// OBSOLETE so we need a single byte breakpoint. Matsushita hasn't defined
-// OBSOLETE one, so we defined it ourselves.
-// OBSOLETE
-// OBSOLETE 0xff is the only available single byte insn left on the mn10200. */
-// OBSOLETE #define BREAKPOINT {0xff}
-// OBSOLETE
-// OBSOLETE #define FUNCTION_START_OFFSET 0
-// OBSOLETE
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE
-// OBSOLETE /* Stacks grow the normal way. */
-// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-// OBSOLETE
-// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \
-// OBSOLETE (read_memory_integer (read_register (SP_REGNUM), REGISTER_SIZE) & 0xffffff)
-// OBSOLETE
-// OBSOLETE struct frame_info;
-// OBSOLETE struct frame_saved_regs;
-// OBSOLETE struct type;
-// OBSOLETE struct value;
-// OBSOLETE
-// OBSOLETE #define EXTRA_FRAME_INFO struct frame_saved_regs fsr; int status; int stack_size;
-// OBSOLETE
-// OBSOLETE extern void mn10200_init_extra_frame_info (struct frame_info *);
-// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) mn10200_init_extra_frame_info (fi)
-// OBSOLETE #define DEPRECATED_INIT_FRAME_PC(x,y) (init_frame_pc_noop (x, y))
-// OBSOLETE #define INIT_FRAME_PC_FIRST(x,y) (init_frame_pc_noop (x, y))
-// OBSOLETE
-// OBSOLETE extern void mn10200_frame_find_saved_regs (struct frame_info *,
-// OBSOLETE struct frame_saved_regs *);
-// OBSOLETE #define FRAME_FIND_SAVED_REGS(fi, regaddr) regaddr = fi->fsr
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_frame_chain (struct frame_info *);
-// OBSOLETE #define FRAME_CHAIN(fi) mn10200_frame_chain (fi)
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_find_callers_reg (struct frame_info *, int);
-// OBSOLETE extern CORE_ADDR mn10200_frame_saved_pc (struct frame_info *);
-// OBSOLETE #define FRAME_SAVED_PC(FI) (mn10200_frame_saved_pc (FI))
-// OBSOLETE
-// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
-// OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
-// OBSOLETE into VALBUF. */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
-// OBSOLETE { \
-// OBSOLETE if (TYPE_LENGTH (TYPE) > 8) \
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check"); \
-// OBSOLETE else if (TYPE_LENGTH (TYPE) > 2 && TYPE_CODE (TYPE) != TYPE_CODE_PTR) \
-// OBSOLETE { \
-// OBSOLETE memcpy (VALBUF, REGBUF + REGISTER_BYTE (0), 2); \
-// OBSOLETE memcpy (VALBUF + 2, REGBUF + REGISTER_BYTE (1), 2); \
-// OBSOLETE } \
-// OBSOLETE else if (TYPE_CODE (TYPE) == TYPE_CODE_PTR)\
-// OBSOLETE { \
-// OBSOLETE memcpy (VALBUF, REGBUF + REGISTER_BYTE (4), TYPE_LENGTH (TYPE)); \
-// OBSOLETE } \
-// OBSOLETE else \
-// OBSOLETE { \
-// OBSOLETE memcpy (VALBUF, REGBUF + REGISTER_BYTE (0), TYPE_LENGTH (TYPE)); \
-// OBSOLETE } \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
-// OBSOLETE extract_address (REGBUF + REGISTER_BYTE (4), \
-// OBSOLETE REGISTER_RAW_SIZE (4))
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
-// OBSOLETE { \
-// OBSOLETE if (TYPE_LENGTH (TYPE) > 8) \
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check"); \
-// OBSOLETE else if (TYPE_LENGTH (TYPE) > 2 && TYPE_CODE (TYPE) != TYPE_CODE_PTR) \
-// OBSOLETE { \
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (0), VALBUF, 2); \
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (1), VALBUF + 2, 2); \
-// OBSOLETE } \
-// OBSOLETE else if (TYPE_CODE (TYPE) == TYPE_CODE_PTR)\
-// OBSOLETE { \
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (4), VALBUF, TYPE_LENGTH (TYPE)); \
-// OBSOLETE } \
-// OBSOLETE else \
-// OBSOLETE { \
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE)); \
-// OBSOLETE } \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
-// OBSOLETE #define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \
-// OBSOLETE (SP) = mn10200_store_struct_return (STRUCT_ADDR, SP)
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_skip_prologue (CORE_ADDR);
-// OBSOLETE #define SKIP_PROLOGUE(pc) (mn10200_skip_prologue (pc))
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_SKIP 0
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
-// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
-// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
-// OBSOLETE
-// OBSOLETE extern void mn10200_pop_frame (struct frame_info *);
-// OBSOLETE #define POP_FRAME mn10200_pop_frame (get_current_frame ())
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 1
-// OBSOLETE #define CALL_DUMMY {0}
-// OBSOLETE #define CALL_DUMMY_START_OFFSET (0)
-// OBSOLETE #define CALL_DUMMY_BREAKPOINT_OFFSET (0)
-// OBSOLETE #define CALL_DUMMY_LOCATION AT_ENTRY_POINT
-// OBSOLETE #define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
-// OBSOLETE #define CALL_DUMMY_ADDRESS() entry_point_address ()
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_push_return_address (CORE_ADDR, CORE_ADDR);
-// OBSOLETE #define PUSH_RETURN_ADDRESS(PC, SP) mn10200_push_return_address (PC, SP)
-// OBSOLETE
-// OBSOLETE #define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_push_arguments (int, struct value **, CORE_ADDR,
-// OBSOLETE unsigned char, CORE_ADDR);
-// OBSOLETE #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-// OBSOLETE (mn10200_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
-// OBSOLETE
-// OBSOLETE #define REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \
-// OBSOLETE (TYPE_LENGTH (TYPE) > 8)
-// OBSOLETE
-// OBSOLETE extern use_struct_convention_fn mn10200_use_struct_convention;
-// OBSOLETE #define USE_STRUCT_CONVENTION(GCC_P, TYPE) mn10200_use_struct_convention (GCC_P, TYPE)
-// OBSOLETE
-// OBSOLETE /* Define this for Wingdb */
-// OBSOLETE #define TARGET_MN10200
diff --git a/gdb/config/sparc/nm-sparclynx.h b/gdb/config/nm-bsd.h
index a231ba4cce1..b44dd5eff1d 100644
--- a/gdb/config/sparc/nm-sparclynx.h
+++ b/gdb/config/nm-bsd.h
@@ -1,5 +1,6 @@
-/* Native-dependent definitions for Sparc running LynxOS.
- Copyright 1993, 1994 Free Software Foundation, Inc.
+/* Native-dependent definitions for *BSD.
+
+ Copyright 2001, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,9 +19,11 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef NM_SPARCLYNX_H
-#define NM_SPARCLYNX_H
+/* Type of the third argument to the `ptrace' system call. */
+#define PTRACE_ARG3_TYPE caddr_t
-#include "config/nm-lynx.h"
+/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
+#define FETCH_INFERIOR_REGISTERS
-#endif /* NM_SPARCLYNX_H */
+/* We can attach and detach. */
+#define ATTACH_DETACH
diff --git a/gdb/config/nm-linux.h b/gdb/config/nm-linux.h
index 5d4175cfd8f..950e5afb8a9 100644
--- a/gdb/config/nm-linux.h
+++ b/gdb/config/nm-linux.h
@@ -77,3 +77,6 @@ extern void lin_thread_get_thread_signals (sigset_t *mask);
#define CHILD_POST_ATTACH
#define CHILD_FOLLOW_FORK
#define KILL_INFERIOR
+
+#define NATIVE_XFER_AUXV procfs_xfer_auxv
+#include "auxv.h" /* Declares it. */
diff --git a/gdb/config/nm-m3.h b/gdb/config/nm-m3.h
deleted file mode 100644
index 0cc84e34daf..00000000000
--- a/gdb/config/nm-m3.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// OBSOLETE /* Mach 3.0 common definitions and global vars.
-// OBSOLETE
-// OBSOLETE Copyright 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #ifndef NM_M3_H
-// OBSOLETE #define NM_M3_H
-// OBSOLETE
-// OBSOLETE #include <mach.h>
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE /* Mach3 doesn't declare errno in <errno.h>. */
-// OBSOLETE extern int errno;
-// OBSOLETE
-// OBSOLETE /* Task port of our debugged inferior. */
-// OBSOLETE
-// OBSOLETE extern task_t inferior_task;
-// OBSOLETE
-// OBSOLETE /* Thread port of the current thread in the inferior. */
-// OBSOLETE
-// OBSOLETE extern thread_t current_thread;
-// OBSOLETE
-// OBSOLETE /* If nonzero, we must suspend/abort && resume threads
-// OBSOLETE * when setting or getting the state.
-// OBSOLETE */
-// OBSOLETE extern int must_suspend_thread;
-// OBSOLETE
-// OBSOLETE #define PREPARE_TO_PROCEED(select_it) mach3_prepare_to_proceed(select_it)
-// OBSOLETE
-// OBSOLETE /* Try to get the privileged host port for authentication to machid
-// OBSOLETE
-// OBSOLETE * If you can get this, you may debug anything on this host.
-// OBSOLETE *
-// OBSOLETE * If you can't, gdb gives it's own task port as the
-// OBSOLETE * authentication port
-// OBSOLETE */
-// OBSOLETE #define mach_privileged_host_port() task_by_pid(-1)
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * This is the MIG ID number of the emulator/server bsd_execve() RPC call.
-// OBSOLETE *
-// OBSOLETE * It SHOULD never change, but if it does, gdb `run'
-// OBSOLETE * command won't work until you fix this define.
-// OBSOLETE *
-// OBSOLETE */
-// OBSOLETE #define MIG_EXEC_SYSCALL_ID 101000
-// OBSOLETE
-// OBSOLETE /* If our_message_port gets a msg with this ID,
-// OBSOLETE * GDB suspends it's inferior and enters command level.
-// OBSOLETE * (Useful at least if ^C does not work)
-// OBSOLETE */
-// OBSOLETE #define GDB_MESSAGE_ID_STOP 0x41151
-// OBSOLETE
-// OBSOLETE /* wait3 WNOHANG is defined in <sys/wait.h> but
-// OBSOLETE * for some reason gdb does not want to include
-// OBSOLETE * that file.
-// OBSOLETE *
-// OBSOLETE * If your system defines WNOHANG differently, this has to be changed.
-// OBSOLETE */
-// OBSOLETE #define WNOHANG 1
-// OBSOLETE
-// OBSOLETE /* Before storing, we need to read all the registers. */
-// OBSOLETE
-// OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
-// OBSOLETE
-// OBSOLETE /* Check if the inferior exists */
-// OBSOLETE #define MACH_ERROR_NO_INFERIOR \
-// OBSOLETE do if (!MACH_PORT_VALID (inferior_task)) \
-// OBSOLETE error ("Inferior task does not exist."); while(0)
-// OBSOLETE
-// OBSOLETE /* Error handler for mach calls */
-// OBSOLETE #define CHK(str,ret) \
-// OBSOLETE do if (ret != KERN_SUCCESS) \
-// OBSOLETE error ("Gdb %s [%d] %s : %s\n",__FILE__,__LINE__,str, \
-// OBSOLETE mach_error_string(ret)); while(0)
-// OBSOLETE
-// OBSOLETE /* This is from POE9 emulator/emul_stack.h
-// OBSOLETE */
-// OBSOLETE /*
-// OBSOLETE * Top of emulator stack holds link and reply port.
-// OBSOLETE */
-// OBSOLETE struct emul_stack_top
-// OBSOLETE {
-// OBSOLETE struct emul_stack_top *link;
-// OBSOLETE mach_port_t reply_port;
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE #define EMULATOR_STACK_SIZE (4096*4)
-// OBSOLETE
-// OBSOLETE #define THREAD_ALLOWED_TO_BREAK(mid) mach_thread_for_breakpoint (mid)
-// OBSOLETE
-// OBSOLETE #define THREAD_PARSE_ID(arg) mach_thread_parse_id (arg)
-// OBSOLETE
-// OBSOLETE #define THREAD_OUTPUT_ID(mid) mach_thread_output_id (mid)
-// OBSOLETE
-// OBSOLETE #define ATTACH_TO_THREAD attach_to_thread
-// OBSOLETE
-// OBSOLETE /* Don't do wait_for_inferior on attach. */
-// OBSOLETE #define ATTACH_NO_WAIT
-// OBSOLETE
-// OBSOLETE /* Do Mach 3 dependent operations when ^C or a STOP is requested */
-// OBSOLETE #define DO_QUIT() mach3_quit ()
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE /* This is bogus. It is NOT OK to quit out of target_wait. */
-// OBSOLETE /* If in mach_msg() and ^C is typed set immediate_quit */
-// OBSOLETE #define REQUEST_QUIT() mach3_request_quit ()
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE #endif /* NM_M3_H */
diff --git a/gdb/config/none/nm-none.h b/gdb/config/none/nm-none.h
deleted file mode 100644
index 7647bdb1d6d..00000000000
--- a/gdb/config/none/nm-none.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Defines needed when configuring for "none".
- 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. */
diff --git a/gdb/config/none/none.mh b/gdb/config/none/none.mh
deleted file mode 100644
index 33d5e4a3768..00000000000
--- a/gdb/config/none/none.mh
+++ /dev/null
@@ -1,5 +0,0 @@
-# Host: "no target". This can be used to build you
-# a Makefile that only runs administrative commands like 'clean',
-# 'gdb.tar.Z', etc.
-NAT_FILE= nm-none.h
-XM_FILE= xm-none.h
diff --git a/gdb/config/none/none.mt b/gdb/config/none/none.mt
deleted file mode 100644
index 300e2dcd05f..00000000000
--- a/gdb/config/none/none.mt
+++ /dev/null
@@ -1,4 +0,0 @@
-# Target: "no target".
-# This can be used to build you a Makefile that only runs administrative
-# commands like 'clean', 'gdb.tar.Z', etc.
-TM_FILE= tm-none.h
diff --git a/gdb/config/none/tm-none.h b/gdb/config/none/tm-none.h
deleted file mode 100644
index 3db049a2cd4..00000000000
--- a/gdb/config/none/tm-none.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Defines needed when configuring for "none".
- Copyright 1993, 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. */
-
-/* This define is needed so that "gcc -MM" doesn't get errors and fail on
- source files that use the value of INNER_THAN in preprocessor lines. */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
diff --git a/gdb/config/none/xm-none.h b/gdb/config/none/xm-none.h
deleted file mode 100644
index 7647bdb1d6d..00000000000
--- a/gdb/config/none/xm-none.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Defines needed when configuring for "none".
- 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. */
diff --git a/gdb/config/ns32k/nbsdaout.mt b/gdb/config/ns32k/nbsdaout.mt
index 24418f4e8dc..e2d68d01091 100644
--- a/gdb/config/ns32k/nbsdaout.mt
+++ b/gdb/config/ns32k/nbsdaout.mt
@@ -1,3 +1,3 @@
# Target: PC532 running NetBSD
TDEPFILES= ns32k-tdep.o ns32knbsd-tdep.o
-TM_FILE= tm-nbsd.h
+TM_FILE= tm-ns32k.h
diff --git a/gdb/config/ns32k/tm-nbsd.h b/gdb/config/ns32k/tm-nbsd.h
deleted file mode 100644
index 88b4e226942..00000000000
--- a/gdb/config/ns32k/tm-nbsd.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Macro definitions for ns32k running under NetBSD.
- Copyright 1986, 1987, 1989, 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. */
-
-#ifndef TM_NBSD_H
-#define TM_NBSD_H
-
-/* Override number of expected traps from sysv. */
-#define START_INFERIOR_TRAPS_EXPECTED 2
-
-/* Most definitions from umax could be used. */
-
-#include "ns32k/tm-ns32k.h"
-
-/* Saved Pc. Get it from sigcontext if within sigtramp. */
-
-/* Offset to saved PC in sigcontext, from <machine/signal.h>. */
-#define SIGCONTEXT_PC_OFFSET 20
-
-#endif /* TM_NBSD_H */
diff --git a/gdb/config/ns32k/tm-ns32k.h b/gdb/config/ns32k/tm-ns32k.h
index 96dd2cb26bf..a603fc8a4d8 100644
--- a/gdb/config/ns32k/tm-ns32k.h
+++ b/gdb/config/ns32k/tm-ns32k.h
@@ -32,6 +32,4 @@
#define STACK_END_ADDR (0xfffff000)
#endif
-#define NUM_GENERAL_REGS 8
-
#endif /* TM_NS32K_H */
diff --git a/gdb/config/pa/hppabsd.mh b/gdb/config/pa/hppabsd.mh
deleted file mode 100644
index e4d0215cdc3..00000000000
--- a/gdb/config/pa/hppabsd.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Host: Hewlett-Packard PA-RISC machine, running BSD
-# OBSOLETE XM_FILE= xm-hppab.h
-# OBSOLETE NAT_FILE= nm-hppab.h
-# OBSOLETE NATDEPFILES= hppab-nat.o corelow.o core-aout.o inftarg.o fork-child.o somread.o infptrace.o hpread.o somsolib.o
diff --git a/gdb/config/pa/hppabsd.mt b/gdb/config/pa/hppabsd.mt
deleted file mode 100644
index e63f9b8074b..00000000000
--- a/gdb/config/pa/hppabsd.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: HP PA-RISC running bsd
-# OBSOLETE TDEPFILES= hppa-tdep.o
-# OBSOLETE TM_FILE= tm-hppab.h
diff --git a/gdb/config/pa/hppaosf.mh b/gdb/config/pa/hppaosf.mh
deleted file mode 100644
index 0e82dc10d7c..00000000000
--- a/gdb/config/pa/hppaosf.mh
+++ /dev/null
@@ -1,5 +0,0 @@
-# OBSOLETE # Host: Hewlett-Packard PA-RISC machine, running BSD
-# OBSOLETE XM_FILE= xm-hppab.h
-# OBSOLETE NAT_FILE= nm-hppao.h
-# OBSOLETE NATDEPFILES= fork-child.o m3-nat.o hppam3-nat.o somread.o hpread.o somsolib.o
-# OBSOLETE NAT_CLIBS= -lmachid -lnetname -lmach
diff --git a/gdb/config/pa/hppaosf.mt b/gdb/config/pa/hppaosf.mt
deleted file mode 100644
index 4a54c79cfa2..00000000000
--- a/gdb/config/pa/hppaosf.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: HP PA-RISC running OSF1
-# OBSOLETE TDEPFILES= hppa-tdep.o
-# OBSOLETE TM_FILE= tm-hppao.h
diff --git a/gdb/config/pa/hppapro.mt b/gdb/config/pa/hppapro.mt
deleted file mode 100644
index cfd99699528..00000000000
--- a/gdb/config/pa/hppapro.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: PA based debug monitor
-# OBSOLETE TDEPFILES= hppa-tdep.o op50-rom.o w89k-rom.o monitor.o xmodem.o dsrec.o
-# OBSOLETE TM_FILE= tm-pro.h
diff --git a/gdb/config/pa/nm-hppab.h b/gdb/config/pa/nm-hppab.h
deleted file mode 100644
index 96dea6e68dd..00000000000
--- a/gdb/config/pa/nm-hppab.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// OBSOLETE /* HPPA PA-RISC machine native support for BSD, for GDB.
-// OBSOLETE Copyright 1991, 1992, 1993, 1994, 1995, 2002 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "somsolib.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE #define U_REGS_OFFSET 0
-// OBSOLETE
-// OBSOLETE #define KERNEL_U_ADDR 0
-// OBSOLETE
-// OBSOLETE /* What a coincidence! */
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE { addr = (int)(blockend) + REGISTER_BYTE (regno);}
-// OBSOLETE
-// OBSOLETE /* 3rd argument to ptrace is supposed to be a caddr_t. */
-// OBSOLETE
-// OBSOLETE #define PTRACE_ARG3_TYPE caddr_t
-// OBSOLETE
-// OBSOLETE /* HPUX 8.0, in its infinite wisdom, has chosen to prototype ptrace
-// OBSOLETE with five arguments, so programs written for normal ptrace lose. */
-// OBSOLETE #define FIVE_ARG_PTRACE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* fetch_inferior_registers is in hppab-nat.c. */
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
-// OBSOLETE
-// OBSOLETE /* attach/detach works to some extent under BSD and HPUX. So long
-// OBSOLETE as the process you're attaching to isn't blocked waiting on io,
-// OBSOLETE blocked waiting on a signal, or in a system call things work
-// OBSOLETE fine. (The problems in those cases are related to the fact that
-// OBSOLETE the kernel can't provide complete register information for the
-// OBSOLETE target process... Which really pisses off GDB.) */
-// OBSOLETE
-// OBSOLETE #define ATTACH_DETACH
-// OBSOLETE
-// OBSOLETE /* The PA-BSD kernel has support for using the data memory break bit
-// OBSOLETE to implement fast watchpoints.
-// OBSOLETE
-// OBSOLETE Watchpoints on the PA act much like traditional page protection
-// OBSOLETE schemes, but with some notable differences.
-// OBSOLETE
-// OBSOLETE First, a special bit in the page table entry is used to cause
-// OBSOLETE a trap when a specific page is written to. This avoids having
-// OBSOLETE to overload watchpoints on the page protection bits. This makes
-// OBSOLETE it possible for the kernel to easily decide if a trap was caused
-// OBSOLETE by a watchpoint or by the user writing to protected memory and can
-// OBSOLETE signal the user program differently in each case.
-// OBSOLETE
-// OBSOLETE Second, the PA has a bit in the processor status word which causes
-// OBSOLETE data memory breakpoints (aka watchpoints) to be disabled for a single
-// OBSOLETE instruction. This bit can be used to avoid the overhead of unprotecting
-// OBSOLETE and reprotecting pages when it becomes necessary to step over a watchpoint.
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE When the kernel receives a trap indicating a write to a page which
-// OBSOLETE is being watched, the kernel performs a couple of simple actions. First
-// OBSOLETE is sets the magic "disable memory breakpoint" bit in the processor
-// OBSOLETE status word, it then sends a SIGTRAP to the process which caused the
-// OBSOLETE trap.
-// OBSOLETE
-// OBSOLETE GDB will take control and catch the signal for the inferior. GDB then
-// OBSOLETE examines the PSW-X bit to determine if the SIGTRAP was caused by a
-// OBSOLETE watchpoint firing. If so GDB single steps the inferior over the
-// OBSOLETE instruction which caused the watchpoint to trigger (note because the
-// OBSOLETE kernel disabled the data memory break bit for one instruction no trap
-// OBSOLETE will be taken!). GDB will then determines the appropriate action to
-// OBSOLETE take. (this may include restarting the inferior if the watchpoint
-// OBSOLETE fired because of a write to an address on the same page as a watchpoint,
-// OBSOLETE but no write to the watched address occured). */
-// OBSOLETE
-// OBSOLETE #define TARGET_HAS_HARDWARE_WATCHPOINTS /* Enable the code in procfs.c */
-// OBSOLETE
-// OBSOLETE /* The PA can watch any number of locations, there's no need for it to reject
-// OBSOLETE anything (generic routines already check that all intermediates are
-// OBSOLETE in memory). */
-// OBSOLETE #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
-// OBSOLETE ((type) == bp_hardware_watchpoint)
-// OBSOLETE
-// OBSOLETE /* When a hardware watchpoint fires off the PC will be left at the
-// OBSOLETE instruction which caused the watchpoint. It will be necessary for
-// OBSOLETE GDB to step over the watchpoint.
-// OBSOLETE
-// OBSOLETE On a PA running BSD, it is trivial to identify when it will be
-// OBSOLETE necessary to step over a hardware watchpoint as we can examine
-// OBSOLETE the PSW-X bit. If the bit is on, then we trapped because of a
-// OBSOLETE watchpoint, else we trapped for some other reason. */
-// OBSOLETE #define STOPPED_BY_WATCHPOINT(W) \
-// OBSOLETE ((W).kind == TARGET_WAITKIND_STOPPED \
-// OBSOLETE && (W).value.sig == TARGET_SIGNAL_TRAP \
-// OBSOLETE && ((int) read_register (IPSW_REGNUM) & 0x00100000))
-// OBSOLETE
-// OBSOLETE /* The PA can single step over a watchpoint if the kernel has set the
-// OBSOLETE "X" bit in the processor status word (disable data memory breakpoint
-// OBSOLETE for one instruction).
-// OBSOLETE
-// OBSOLETE The kernel will always set this bit before notifying the inferior
-// OBSOLETE that it hit a watchpoint. Thus, the inferior can single step over
-// OBSOLETE the instruction which caused the watchpoint to fire. This avoids
-// OBSOLETE the traditional need to disable the watchpoint, step the inferior,
-// OBSOLETE then enable the watchpoint again. */
-// OBSOLETE #define HAVE_STEPPABLE_WATCHPOINT
-// OBSOLETE
-// OBSOLETE /* Use these macros for watchpoint insertion/deletion. */
-// OBSOLETE /* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
-// OBSOLETE #define target_insert_watchpoint(addr, len, type) hppa_set_watchpoint (addr, len, 1)
-// OBSOLETE #define target_remove_watchpoint(addr, len, type) hppa_set_watchpoint (addr, len, 0)
diff --git a/gdb/config/pa/nm-hppah.h b/gdb/config/pa/nm-hppah.h
index 25cb1ac1649..bf4fd3c475f 100644
--- a/gdb/config/pa/nm-hppah.h
+++ b/gdb/config/pa/nm-hppah.h
@@ -19,13 +19,15 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+struct target_ops;
+
#define U_REGS_OFFSET 0
#define KERNEL_U_ADDR 0
/* What a coincidence! */
#define REGISTER_U_ADDR(addr, blockend, regno) \
-{ addr = (int)(blockend) + REGISTER_BYTE (regno);}
+{ addr = (int)(blockend) + DEPRECATED_REGISTER_BYTE (regno);}
/* This isn't really correct, because ptrace is actually a 32-bit
interface. However, the modern HP-UX targets all really use
@@ -44,9 +46,10 @@
#define FIVE_ARG_PTRACE
/* We need to figure out where the text region is so that we use the
- appropriate ptrace operator to manipulate text. Simply reading/writing
- user space will crap out HPUX. */
-#define NEED_TEXT_START_END 1
+ appropriate ptrace operator to manipulate text. Simply
+ reading/writing user space will crap out HPUX. */
+#define DEPRECATED_HPUX_TEXT_END deprecated_hpux_text_end
+extern void deprecated_hpux_text_end (struct target_ops *exec_ops);
/* In hppah-nat.c: */
#define FETCH_INFERIOR_REGISTERS
diff --git a/gdb/config/pa/nm-hppao.h b/gdb/config/pa/nm-hppao.h
deleted file mode 100644
index 0a6b810a16e..00000000000
--- a/gdb/config/pa/nm-hppao.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// OBSOLETE /* HPPA PA-RISC machine native support for Lites, for GDB.
-// OBSOLETE Copyright 1995, 2002 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "config/nm-m3.h"
-// OBSOLETE #define U_REGS_OFFSET 0
-// OBSOLETE
-// OBSOLETE #define KERNEL_U_ADDR 0
-// OBSOLETE
-// OBSOLETE /* What a coincidence! */
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE { addr = (int)(blockend) + REGISTER_BYTE (regno);}
-// OBSOLETE
-// OBSOLETE /* fetch_inferior_registers is in hppab-nat.c. */
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
-// OBSOLETE
-// OBSOLETE /* attach/detach works to some extent under BSD and HPUX. So long
-// OBSOLETE as the process you're attaching to isn't blocked waiting on io,
-// OBSOLETE blocked waiting on a signal, or in a system call things work
-// OBSOLETE fine. (The problems in those cases are related to the fact that
-// OBSOLETE the kernel can't provide complete register information for the
-// OBSOLETE target process... Which really pisses off GDB.) */
-// OBSOLETE
-// OBSOLETE #define ATTACH_DETACH
-// OBSOLETE
-// OBSOLETE #define EMULATOR_BASE 0x90100000
-// OBSOLETE #define EMULATOR_END 0x90200000
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index d1b35551546..1a78c6ceb6f 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -1,6 +1,8 @@
/* Parameters for execution on any Hewlett-Packard PA-RISC machine.
- Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+ 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+ Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -24,19 +26,10 @@
#include "regcache.h"
-/* Wonder if this is correct? Should be using push_dummy_call(). */
-#define DEPRECATED_DUMMY_WRITE_SP(SP) deprecated_write_sp (SP)
-
#define GDB_MULTI_ARCH 1
-/* NOTE: cagney/2002-11-24: This is a guess. */
-#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 0
-#define CALL_DUMMY_LOCATION ON_STACK
-#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
/* Hack, get around problem with including "arch-utils.h". */
struct frame_info;
-extern CORE_ADDR init_frame_pc_default (int fromleaf, struct frame_info *prev);
-#define DEPRECATED_INIT_FRAME_PC(l,f) (init_frame_pc_default (l, f))
/* Forward declarations of some types we use in prototypes */
@@ -66,6 +59,8 @@ extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
other r registers. */
#define FLAGS_REGNUM 0 /* Various status flags */
#define RP_REGNUM 2 /* return pointer */
+#define HPPA_FP_REGNUM 3 /* The ABI's frame pointer, when used */
+#define HPPA_SP_REGNUM 30 /* Stack pointer. */
#define SAR_REGNUM 32 /* Shift Amount Register */
#define IPSW_REGNUM 41 /* Interrupt Processor Status Word */
#define PCOQ_HEAD_REGNUM 33 /* instruction offset queue head */
@@ -80,6 +75,7 @@ extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
#define CCR_REGNUM 54 /* Coprocessor Configuration Register */
#define TR0_REGNUM 57 /* Temporary Registers (cr24 -> cr31) */
#define CR27_REGNUM 60 /* Base register for thread-local storage, cr27 */
+#define HPPA_FP0_REGNUM 64 /* First floating-point. */
#define FP4_REGNUM 72
#define ARG0_REGNUM 26 /* The first argument of a callee. */
@@ -97,137 +93,16 @@ extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
(buf)[sizeof(CORE_ADDR) -1] &= ~0x3; \
} while (0)
-/* Define DEPRECATED_DO_REGISTERS_INFO() to do machine-specific
- formatting of register dumps. */
-
-#define DEPRECATED_DO_REGISTERS_INFO(_regnum, fp) pa_do_registers_info (_regnum, fp)
-extern void pa_do_registers_info (int, int);
-
/* PA specific macro to see if the current instruction is nullified. */
#ifndef INSTRUCTION_NULLIFIED
extern int hppa_instruction_nullified (void);
#define INSTRUCTION_NULLIFIED hppa_instruction_nullified ()
#endif
-/* elz: Return a large value, which is stored on the stack at addr.
- This is defined only for the hppa, at this moment. The above macro
- DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS is not called anymore,
- because it assumes that on exit from a called function which
- returns a large structure on the stack, the address of the ret
- structure is still in register 28. Unfortunately this register is
- usually overwritten by the called function itself, on hppa. This is
- specified in the calling convention doc. As far as I know, the only
- way to get the return value is to have the caller tell us where it
- told the callee to put it, rather than have the callee tell us. */
-struct value *hppa_value_returned_from_stack (register struct type *valtype,
- CORE_ADDR addr);
-#define VALUE_RETURNED_FROM_STACK(valtype,addr) \
- hppa_value_returned_from_stack (valtype, addr)
-
-extern void hppa_frame_init_saved_regs (struct frame_info *);
-#define DEPRECATED_FRAME_INIT_SAVED_REGS(FI) \
- hppa_frame_init_saved_regs (FI)
-
#define INSTRUCTION_SIZE 4
-/* This sequence of words is the instructions
-
- ; Call stack frame has already been built by gdb. Since we could be calling
- ; a varargs function, and we do not have the benefit of a stub to put things in
- ; the right place, we load the first 4 word of arguments into both the general
- ; and fp registers.
- call_dummy
- ldw -36(sp), arg0
- ldw -40(sp), arg1
- ldw -44(sp), arg2
- ldw -48(sp), arg3
- ldo -36(sp), r1
- fldws 0(0, r1), fr4
- fldds -4(0, r1), fr5
- fldws -8(0, r1), fr6
- fldds -12(0, r1), fr7
- ldil 0, r22 ; FUNC_LDIL_OFFSET must point here
- ldo 0(r22), r22 ; FUNC_LDO_OFFSET must point here
- ldsid (0,r22), r4
- ldil 0, r1 ; SR4EXPORT_LDIL_OFFSET must point here
- ldo 0(r1), r1 ; SR4EXPORT_LDO_OFFSET must point here
- ldsid (0,r1), r20
- combt,=,n r4, r20, text_space ; If target is in data space, do a
- ble 0(sr5, r22) ; "normal" procedure call
- copy r31, r2
- break 4, 8
- mtsp r21, sr0
- ble,n 0(sr0, r22)
- text_space ; Otherwise, go through _sr4export,
- ble (sr4, r1) ; which will return back here.
- stw r31,-24(r30)
- break 4, 8
- mtsp r21, sr0
- ble,n 0(sr0, r22)
- nop ; To avoid kernel bugs
- nop ; and keep the dummy 8 byte aligned
-
- The dummy decides if the target is in text space or data space. If
- it's in data space, there's no problem because the target can
- return back to the dummy. However, if the target is in text space,
- the dummy calls the secret, undocumented routine _sr4export, which
- calls a function in text space and can return to any space. Instead
- of including fake instructions to represent saved registers, we
- know that the frame is associated with the call dummy and treat it
- specially.
-
- The trailing NOPs are needed to avoid a bug in HPUX, BSD and OSF1
- kernels. If the memory at the location pointed to by the PC is
- 0xffffffff then a ptrace step call will fail (even if the instruction
- is nullified).
-
- The code to pop a dummy frame single steps three instructions
- starting with the last mtsp. This includes the nullified "instruction"
- following the ble (which is uninitialized junk). If the
- "instruction" following the last BLE is 0xffffffff, then the ptrace
- will fail and the dummy frame is not correctly popped.
-
- By placing a NOP in the delay slot of the BLE instruction we can be
- sure that we never try to execute a 0xffffffff instruction and
- avoid the kernel bug. The second NOP is needed to keep the call
- dummy 8 byte aligned. */
-
-#define CALL_DUMMY {0x4BDA3FB9, 0x4BD93FB1, 0x4BD83FA9, 0x4BD73FA1,\
- 0x37C13FB9, 0x24201004, 0x2C391005, 0x24311006,\
- 0x2C291007, 0x22C00000, 0x36D60000, 0x02C010A4,\
- 0x20200000, 0x34210000, 0x002010b4, 0x82842022,\
- 0xe6c06000, 0x081f0242, 0x00010004, 0x00151820,\
- 0xe6c00002, 0xe4202000, 0x6bdf3fd1, 0x00010004,\
- 0x00151820, 0xe6c00002, 0x08000240, 0x08000240}
-
#define REG_PARM_STACK_SPACE 16
-/* If we've reached a trap instruction within the call dummy, then
- we'll consider that to mean that we've reached the call dummy's
- end after its successful completion. */
-#define CALL_DUMMY_HAS_COMPLETED(pc, sp, frame_address) \
- (DEPRECATED_PC_IN_CALL_DUMMY((pc), (sp), (frame_address)) && \
- (read_memory_integer((pc), 4) == BREAKPOINT32))
-
-/* Insert the specified number of args and function address into a
- call sequence of the above form stored at DUMMYNAME.
-
- On the hppa we need to call the stack dummy through $$dyncall.
- Therefore our version of DEPRECATED_FIX_CALL_DUMMY takes an extra
- argument, real_pc, which is the location where gdb should start up
- the inferior to do the function call. */
-
-/* FIXME: brobecker 2002-12-26. This macro is going to cause us some
- problems before we can go to multiarch partial as it has been
- diverted on HPUX to return the value of the PC! */
-/* NOTE: cagney/2003-05-03: This has been replaced by push_dummy_code.
- Hopefully that has all the parameters HP/UX needs. */
-#define DEPRECATED_FIX_CALL_DUMMY hppa_fix_call_dummy
-extern CORE_ADDR hppa_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR, int,
- struct value **, struct type *, int);
-
-#define GDB_TARGET_IS_HPPA
-
/*
* Unwind table and descriptor.
*/
diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h
index 62bcebc7423..79fd15cea1c 100644
--- a/gdb/config/pa/tm-hppa64.h
+++ b/gdb/config/pa/tm-hppa64.h
@@ -57,52 +57,6 @@ extern int hpread_adjust_stack_address (CORE_ADDR);
/* jimb: omitted dynamic linking stuff here */
-/* This sequence of words is the instructions
-
-; Call stack frame has already been built by gdb. Since we could be calling
-; a varargs function, and we do not have the benefit of a stub to put things in
-; the right place, we load the first 8 word of arguments into both the general
-; and fp registers.
-call_dummy
- nop
- copy %r4,%r29
- copy %r5,%r22
- copy %r6,%r27
- fldd -64(0,%r29),%fr4
- fldd -56(0,%r29),%fr5
- fldd -48(0,%r29),%fr6
- fldd -40(0,%r29),%fr7
- fldd -32(0,%r29),%fr8
- fldd -24(0,%r29),%fr9
- fldd -16(0,%r29),%fr10
- fldd -8(0,%r29),%fr11
- copy %r22,%r1
- ldd -64(%r29), %r26
- ldd -56(%r29), %r25
- ldd -48(%r29), %r24
- ldd -40(%r29), %r23
- ldd -32(%r29), %r22
- ldd -24(%r29), %r21
- ldd -16(%r29), %r20
- bve,l (%r1),%r2
- ldd -8(%r29), %r19
- break 4, 8
- mtsp %r21, %sr0
- ble 0(%sr0, %r22)
- nop
-*/
-
-/* Call dummys are sized and written out in word sized hunks. So we have
- to pack the instructions into words. Ugh. */
-#undef CALL_DUMMY
-#define CALL_DUMMY {0x08000240349d0000LL, 0x34b6000034db0000LL, \
- 0x53a43f8353a53f93LL, 0x53a63fa353a73fb3LL,\
- 0x53a83fc353a93fd3LL, 0x2fa1100a2fb1100bLL,\
- 0x36c1000053ba3f81LL, 0x53b93f9153b83fa1LL,\
- 0x53b73fb153b63fc1LL, 0x53b53fd10fa110d4LL,\
- 0xe820f0000fb110d3LL, 0x0001000400151820LL,\
- 0xe6c0000008000240LL}
-
/* The PA64 ABI reserves 64 bytes of stack space for outgoing register
parameters. */
#undef REG_PARM_STACK_SPACE
diff --git a/gdb/config/pa/tm-hppab.h b/gdb/config/pa/tm-hppab.h
deleted file mode 100644
index edacdbfe9b6..00000000000
--- a/gdb/config/pa/tm-hppab.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// OBSOLETE /* Parameters for execution on an HP PA-RISC machine running BSD, for GDB.
-// OBSOLETE Contributed by the Center for Software Science at the
-// OBSOLETE University of Utah (pa-gdb-bugs@cs.utah.edu). */
-// OBSOLETE
-// OBSOLETE /* For BSD:
-// OBSOLETE
-// OBSOLETE The signal context structure pointer is always saved at the base
-// OBSOLETE of the frame + 0x4.
-// OBSOLETE
-// OBSOLETE We get the PC & SP directly from the sigcontext structure itself.
-// OBSOLETE For other registers we have to dive in a little deeper:
-// OBSOLETE
-// OBSOLETE The hardware save state pointer is at offset 0x10 within the
-// OBSOLETE signal context structure.
-// OBSOLETE
-// OBSOLETE Within the hardware save state, registers are found in the same order
-// OBSOLETE as the register numbers in GDB. */
-// OBSOLETE
-// OBSOLETE #define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
-// OBSOLETE { \
-// OBSOLETE *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
-// OBSOLETE { \
-// OBSOLETE *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
-// OBSOLETE { \
-// OBSOLETE int i; \
-// OBSOLETE CORE_ADDR TMP; \
-// OBSOLETE TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE TMP = read_memory_integer (TMP + 0x10, 4); \
-// OBSOLETE for (i = 0; i < NUM_REGS; i++) \
-// OBSOLETE { \
-// OBSOLETE if (i == SP_REGNUM) \
-// OBSOLETE (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
-// OBSOLETE else \
-// OBSOLETE (FSR)->regs[i] = TMP + i * 4; \
-// OBSOLETE } \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* It's mostly just the common stuff. */
-// OBSOLETE #include "pa/tm-hppa.h"
diff --git a/gdb/config/pa/tm-hppah.h b/gdb/config/pa/tm-hppah.h
index 325af819536..0d0dde3b703 100644
--- a/gdb/config/pa/tm-hppah.h
+++ b/gdb/config/pa/tm-hppah.h
@@ -1,5 +1,6 @@
/* Parameters for execution on an HP PA-RISC machine, running HPUX, for GDB.
- Copyright 1991, 1992, 1995, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1995, 1998, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -35,17 +36,17 @@ struct frame_info;
#include "somsolib.h"
#endif
-extern void hppa_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
+extern void hppa32_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
CORE_ADDR *tmp);
#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
hppa32_hpux_frame_saved_pc_in_sigtramp (FRAME, TMP)
-extern void hppa_hpux_frame_base_before_sigtramp (struct frame_info *fi,
+extern void hppa32_hpux_frame_base_before_sigtramp (struct frame_info *fi,
CORE_ADDR *tmp);
#define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
hppa32_hpux_frame_base_before_sigtramp (FRAME, TMP)
-extern void hppa_hpux_frame_find_saved_regs_in_sigtramp
+extern void hppa32_hpux_frame_find_saved_regs_in_sigtramp
(struct frame_info *fi, CORE_ADDR *fsr);
#define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
hppa32_hpux_frame_find_saved_regs_in_sigtramp (FRAME, FSR)
diff --git a/gdb/config/pa/tm-hppao.h b/gdb/config/pa/tm-hppao.h
deleted file mode 100644
index a466287ede5..00000000000
--- a/gdb/config/pa/tm-hppao.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// OBSOLETE /* Parameters for execution on an HP PA-RISC machine running OSF1, for GDB.
-// OBSOLETE Contributed by the Center for Software Science at the
-// OBSOLETE University of Utah (pa-gdb-bugs@cs.utah.edu). */
-// OBSOLETE
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE /* Define offsets to access CPROC stack when it does not have
-// OBSOLETE * a kernel thread.
-// OBSOLETE */
-// OBSOLETE #define MACHINE_CPROC_SP_OFFSET 20
-// OBSOLETE #define MACHINE_CPROC_PC_OFFSET 16
-// OBSOLETE #define MACHINE_CPROC_FP_OFFSET 12
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Software defined PSW masks.
-// OBSOLETE */
-// OBSOLETE #define PSW_SS 0x10000000 /* Kernel managed single step */
-// OBSOLETE
-// OBSOLETE /* Thread flavors used in re-setting the T bit.
-// OBSOLETE * @@ this is also bad for cross debugging.
-// OBSOLETE */
-// OBSOLETE #define TRACE_FLAVOR HP800_THREAD_STATE
-// OBSOLETE #define TRACE_FLAVOR_SIZE HP800_THREAD_STATE_COUNT
-// OBSOLETE #define TRACE_SET(x,state) \
-// OBSOLETE ((struct hp800_thread_state *)state)->cr22 |= PSW_SS
-// OBSOLETE #define TRACE_CLEAR(x,state) \
-// OBSOLETE ((((struct hp800_thread_state *)state)->cr22 &= ~PSW_SS), 1)
-// OBSOLETE
-// OBSOLETE /* For OSF1 (Should be close if not identical to BSD, but I haven't
-// OBSOLETE tested it yet):
-// OBSOLETE
-// OBSOLETE The signal context structure pointer is always saved at the base
-// OBSOLETE of the frame + 0x4.
-// OBSOLETE
-// OBSOLETE We get the PC & SP directly from the sigcontext structure itself.
-// OBSOLETE For other registers we have to dive in a little deeper:
-// OBSOLETE
-// OBSOLETE The hardware save state pointer is at offset 0x10 within the
-// OBSOLETE signal context structure.
-// OBSOLETE
-// OBSOLETE Within the hardware save state, registers are found in the same order
-// OBSOLETE as the register numbers in GDB. */
-// OBSOLETE
-// OBSOLETE #define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
-// OBSOLETE { \
-// OBSOLETE *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
-// OBSOLETE { \
-// OBSOLETE *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
-// OBSOLETE { \
-// OBSOLETE int i; \
-// OBSOLETE CORE_ADDR TMP; \
-// OBSOLETE TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE TMP = read_memory_integer (TMP + 0x10, 4); \
-// OBSOLETE for (i = 0; i < NUM_REGS; i++) \
-// OBSOLETE { \
-// OBSOLETE if (i == SP_REGNUM) \
-// OBSOLETE (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
-// OBSOLETE else \
-// OBSOLETE (FSR)->regs[i] = TMP + i * 4; \
-// OBSOLETE } \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* OSF1 does not need the pc space queue restored. */
-// OBSOLETE #define NO_PC_SPACE_QUEUE_RESTORE
-// OBSOLETE
-// OBSOLETE /* The mach kernel uses the recovery counter to implement single
-// OBSOLETE stepping. While this greatly simplifies the kernel support
-// OBSOLETE necessary for single stepping, it unfortunately does the wrong
-// OBSOLETE thing in the presense of a nullified instruction (gives control
-// OBSOLETE back two insns after the nullifed insn). This is an artifact
-// OBSOLETE of the HP architecture (recovery counter doesn't tick for
-// OBSOLETE nullified insns).
-// OBSOLETE
-// OBSOLETE Do our best to avoid losing in such situations. */
-// OBSOLETE #define INSTRUCTION_NULLIFIED \
-// OBSOLETE (({ \
-// OBSOLETE int ipsw = (int)read_register(IPSW_REGNUM); \
-// OBSOLETE if (ipsw & PSW_N) \
-// OBSOLETE { \
-// OBSOLETE int pcoqt = (int)read_register(PCOQ_TAIL_REGNUM); \
-// OBSOLETE write_register(PCOQ_HEAD_REGNUM, pcoqt); \
-// OBSOLETE write_register(PCOQ_TAIL_REGNUM, pcoqt + 0x4); \
-// OBSOLETE write_register(IPSW_REGNUM, ipsw & ~(PSW_N | PSW_B | PSW_X)); \
-// OBSOLETE stop_pc = pcoqt; \
-// OBSOLETE } \
-// OBSOLETE }), 0)
-// OBSOLETE
-// OBSOLETE /* It's mostly just the common stuff. */
-// OBSOLETE
-// OBSOLETE #include "pa/tm-hppa.h"
diff --git a/gdb/config/pa/tm-pro.h b/gdb/config/pa/tm-pro.h
deleted file mode 100644
index c4f2b775329..00000000000
--- a/gdb/config/pa/tm-pro.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// OBSOLETE /* Parameters for execution on an HP PA-RISC level 0 embedded system.
-// OBSOLETE This is based on tm-hppab.h.
-// OBSOLETE Contributed by the Center for Software Science at the
-// OBSOLETE University of Utah (pa-gdb-bugs@cs.utah.edu). */
-// OBSOLETE
-// OBSOLETE #define PA_LEVEL_0 /* Disables touching space regs and fp */
-// OBSOLETE
-// OBSOLETE /* All the PRO targets use software floating point at the moment. */
-// OBSOLETE #define SOFT_FLOAT 1
-// OBSOLETE
-// OBSOLETE /* It's mostly just the common stuff. */
-// OBSOLETE #include "pa/tm-hppa.h"
-// OBSOLETE
-// OBSOLETE #define GDB_TARGET_IS_PA_ELF
diff --git a/gdb/config/pa/xm-hppab.h b/gdb/config/pa/xm-hppab.h
deleted file mode 100644
index d46e5adc868..00000000000
--- a/gdb/config/pa/xm-hppab.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// OBSOLETE /* Parameters for hosting on an HPPA PA-RISC machine, running BSD, for GDB.
-// OBSOLETE Copyright 1991, 1992, 1993, 1996, 1998 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE Contributed by the Center for Software Science at the
-// OBSOLETE University of Utah (pa-gdb-bugs@cs.utah.edu).
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "pa/xm-pa.h"
diff --git a/gdb/config/pa/xm-pa.h b/gdb/config/pa/xm-pa.h
deleted file mode 100644
index 0095003da1e..00000000000
--- a/gdb/config/pa/xm-pa.h
+++ /dev/null
@@ -1,5 +0,0 @@
-// OBSOLETE /* Definitions for all PA machines. */
-// OBSOLETE
-// OBSOLETE /* This was created for "makeva", which is obsolete. This file can
-// OBSOLETE probably go away (unless someone can think of some other host thing
-// OBSOLETE which is common to various pa machines). */
diff --git a/gdb/config/powerpc/tm-linux.h b/gdb/config/powerpc/tm-linux.h
index e5383900ad6..e34363194ff 100644
--- a/gdb/config/powerpc/tm-linux.h
+++ b/gdb/config/powerpc/tm-linux.h
@@ -31,35 +31,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef IN_SOLIB_CALL_TRAMPOLINE
#undef SKIP_TRAMPOLINE_CODE
-/* We can single step on linux */
-#undef SOFTWARE_SINGLE_STEP
-#define SOFTWARE_SINGLE_STEP(p,q) internal_error (__FILE__, __LINE__, "Will never execute!")
-#undef SOFTWARE_SINGLE_STEP_P
-#define SOFTWARE_SINGLE_STEP_P() 0
-
/* Make sure nexti gets the help it needs for debugging assembly code
without symbols */
-#define AT_SUBROUTINE_CALL_INSTRUCTION_TARGET(prevpc,stoppc) \
- at_subroutine_call_instruction_target(prevpc,stoppc)
-extern int at_subroutine_call_instruction_target();
-
extern int ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name);
-#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc,func_name) ppc_linux_in_sigtramp (pc,func_name)
+#undef DEPRECATED_IN_SIGTRAMP
+#define DEPRECATED_IN_SIGTRAMP(pc,func_name) ppc_linux_in_sigtramp (pc,func_name)
#if 0
#define CANNOT_FETCH_REGISTER(regno) ((regno) >= MQ_REGNUM)
#define CANNOT_STORE_REGISTER(regno) ((regno) >= MQ_REGNUM)
#endif
-#if 0 /* If skip_prologue() isn't too greedy, we don't need this */
-/* There is some problem with the debugging symbols generated by the
- compiler such that the debugging symbol for the first line of a
- function overlap with the function prologue. */
-#define PROLOGUE_FIRSTLINE_OVERLAP
-#endif
-
/* N_FUN symbols in shared libaries have 0 for their values and need
to be relocated. */
#define SOFUN_ADDRESS_MAYBE_MISSING
diff --git a/gdb/config/powerpc/tm-ppc-eabi.h b/gdb/config/powerpc/tm-ppc-eabi.h
index e49b2bd0c97..d29b05ddcd0 100644
--- a/gdb/config/powerpc/tm-ppc-eabi.h
+++ b/gdb/config/powerpc/tm-ppc-eabi.h
@@ -24,9 +24,6 @@
/* Use generic RS6000 definitions. */
#include "rs6000/tm-rs6000.h"
-/* except we want to allow single stepping */
-#undef SOFTWARE_SINGLE_STEP_P
-#define SOFTWARE_SINGLE_STEP_P() 0
#undef PROCESS_LINENUMBER_HOOK
diff --git a/gdb/config/powerpc/xm-linux.h b/gdb/config/powerpc/xm-linux.h
index c8a029d1010..73e7c406445 100644
--- a/gdb/config/powerpc/xm-linux.h
+++ b/gdb/config/powerpc/xm-linux.h
@@ -25,14 +25,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
to get the offset in the core file of the register values. */
#define KERNEL_U_ADDR 0x0
-/* If you expect to use the mmalloc package to obtain mapped symbol files,
- for now you have to specify some parameters that determine how gdb places
- the mappings in it's address space. See the comments in map_to_address()
- for details. This is expected to only be a short term solution. Yes it
- is a kludge.
- FIXME: Make this more automatic. */
-
-#define MMAP_BASE_ADDRESS 0x20000000 /* First mapping here */
-#define MMAP_INCREMENT 0x01000000 /* Increment to next mapping */
-
#endif /* #ifndef XM_LINUX_H */
diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h
index 66b2f28d4e1..4422fcbf3c8 100644
--- a/gdb/config/rs6000/tm-rs6000.h
+++ b/gdb/config/rs6000/tm-rs6000.h
@@ -1,7 +1,8 @@
/* Parameters for target execution on an RS6000, for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1997, 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
+
Contributed by IBM Corporation.
This file is part of GDB.
@@ -42,11 +43,6 @@ extern int rs6000_in_solib_return_trampoline (CORE_ADDR, char *);
#define SKIP_TRAMPOLINE_CODE(pc) rs6000_skip_trampoline_code (pc)
extern CORE_ADDR rs6000_skip_trampoline_code (CORE_ADDR);
-/* Number of trap signals we need to skip over, once the inferior process
- starts running. */
-
-#define START_INFERIOR_TRAPS_EXPECTED 2
-
/* AIX has a couple of strange returns from wait(). */
#define CHILD_SPECIAL_WAITSTATUS(ourstatus, hoststatus) ( \
@@ -78,24 +74,6 @@ extern void aix_process_linenos (void);
#define FP0_REGNUM 32 /* Floating point register 0 */
#define FPLAST_REGNUM 63 /* Last floating point register */
-/* Define other aspects of the stack frame. */
-
-#define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) \
- (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next) : \
- prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ())
-/* NOTE: cagney/2002-12-08: Add local declaration of
- init_frame_pc_noop() because it isn't possible to include
- "arch-utils.h" here. Not too bad as this entire file is going away
- anyway. */
-extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
-#define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev))
-
-/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
-
-#define SOFTWARE_SINGLE_STEP_P() 1
-extern void rs6000_software_single_step (enum target_signal, int);
-#define SOFTWARE_SINGLE_STEP(sig,bp_p) rs6000_software_single_step (sig, bp_p)
-
/* Notice when a new child process is started. */
#define TARGET_CREATE_INFERIOR_HOOK rs6000_create_inferior
diff --git a/gdb/config/s390/nm-linux.h b/gdb/config/s390/nm-linux.h
index 727a66ebeaf..955110c5074 100644
--- a/gdb/config/s390/nm-linux.h
+++ b/gdb/config/s390/nm-linux.h
@@ -1,6 +1,6 @@
/* Native support for GNU/Linux on S390.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Ported by D.J. Barrow for IBM Deutschland Entwicklung GmbH, IBM
Corporation. derived from i390-nmlinux.h
@@ -27,58 +27,37 @@
#include "config/nm-linux.h"
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- (addr) = s390_register_u_addr((blockend),(regno));
-extern int s390_register_u_addr (int, int);
-/* Return sizeof user struct to callers in less machine dependent routines */
+/* ptrace access. */
-#define KERNEL_U_SIZE kernel_u_size()
-extern int kernel_u_size (void);
-
-#define U_REGS_OFFSET 0
+#define PTRACE_ARG3_TYPE long
+#define PTRACE_XFER_TYPE long
+#define FETCH_INFERIOR_REGISTERS
-/* We define this if link.h is available, because with ELF we use SVR4 style
- shared libraries. */
+#define KERNEL_U_SIZE kernel_u_size()
+extern int kernel_u_size (void);
-#ifdef HAVE_LINK_H
-#define SVR4_SHARED_LIBS
-#include "solib.h" /* Support for shared libraries. */
-#endif
+/* Hardware watchpoints. */
-/* WATCHPOINT SPECIFIC STUFF */
+extern int s390_stopped_by_watchpoint (void);
+extern int s390_insert_watchpoint (CORE_ADDR addr, int len);
+extern int s390_remove_watchpoint (CORE_ADDR addr, int len);
#define TARGET_HAS_HARDWARE_WATCHPOINTS
+#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
+#define TARGET_REGION_OK_FOR_HW_WATCHPOINT(addr, len) 1
#define HAVE_CONTINUABLE_WATCHPOINT 1
-#define target_insert_watchpoint(addr, len, type) \
- s390_insert_watchpoint (PIDGET (inferior_ptid), addr, len, type)
-
-#define target_remove_watchpoint(addr, len, type) \
- s390_remove_watchpoint (PIDGET (inferior_ptid), addr, len)
-extern int watch_area_cnt;
-/* gdb if really stupid & calls this all the time without a
- watchpoint even being set */
-#define STOPPED_BY_WATCHPOINT(W) \
- (watch_area_cnt&&s390_stopped_by_watchpoint (PIDGET(inferior_ptid)))
+#define STOPPED_BY_WATCHPOINT(w) \
+ s390_stopped_by_watchpoint ()
-extern CORE_ADDR s390_stopped_by_watchpoint (int);
+#define target_insert_watchpoint(addr, len, type) \
+ s390_insert_watchpoint (addr, len)
-/*
- Type can be 1 for a read_watchpoint or 2 for an access watchpoint.
- */
-extern int s390_insert_watchpoint (int pid, CORE_ADDR addr, int len, int rw);
-extern int s390_remove_watchpoint (int pid, CORE_ADDR addr, int len);
-#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
- (((type) == bp_hardware_watchpoint)|| \
- ((type) == bp_watchpoint)|| \
- ((type) == bp_read_watchpoint) || \
- ((type) == bp_access_watchpoint))
+#define target_remove_watchpoint(addr, len, type) \
+ s390_remove_watchpoint (addr, len)
-/* Needed for s390x */
-#define PTRACE_ARG3_TYPE long
-#define PTRACE_XFER_TYPE long
#endif /* nm_linux.h */
diff --git a/gdb/config/s390/s390.mh b/gdb/config/s390/s390.mh
index ab3350fdb47..3db7bd91f99 100644
--- a/gdb/config/s390/s390.mh
+++ b/gdb/config/s390/s390.mh
@@ -1,13 +1,5 @@
# Host: S390, running Linux
-
-XM_FILE= xm-linux.h
-XM_CLIBS=
-
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o s390-nat.o \
- core-aout.o core-regset.o linux-proc.o gcore.o thread-db.o lin-lwp.o \
- proc-service.o linux-nat.o
+ linux-proc.o gcore.o thread-db.o lin-lwp.o proc-service.o linux-nat.o
LOADLIBES = -ldl -rdynamic
-
-
-
diff --git a/gdb/config/s390/s390x.mt b/gdb/config/s390/s390x.mt
deleted file mode 100644
index d0c8262f72d..00000000000
--- a/gdb/config/s390/s390x.mt
+++ /dev/null
@@ -1,8 +0,0 @@
-# Target: S390 running Linux
-TM_FILE= tm-linux.h
-TDEPFILES=s390-tdep.o solib.o
-# Post 5.0 tdep-files
-TDEPFILES+=solib-svr4.o solib-legacy.o
-
-# needed for gdbserver.
-MT_CFLAGS= -DCONFIG_ARCH_S390X
diff --git a/gdb/config/s390/tm-linux.h b/gdb/config/s390/tm-linux.h
index 7b406e0dc0a..d13d06dc139 100644
--- a/gdb/config/s390/tm-linux.h
+++ b/gdb/config/s390/tm-linux.h
@@ -1,6 +1,6 @@
/* Target definitions for GDB for a s390 running GNU/Linux.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
for IBM Deutschland Entwicklung GmbH, IBM Corporation.
@@ -25,18 +25,6 @@
#ifndef TM_LINUX_H
#define TM_LINUX_H
-#undef TARGET_ELF64
-#define TARGET_ELF64 (gdbarch_tdep (current_gdbarch)->intreg_size==8)
-
#include "config/tm-linux.h"
-/* Zap several macros defined in the above header so that multi-arch
- can safely re-define them. The ``correct fix'' involves
- eliminating either the above include or even this file. */
-#undef SKIP_TRAMPOLINE_CODE
-
-#include "s390/tm-s390.h"
-
-
-
#endif /* TM_LINUX_H */
diff --git a/gdb/config/s390/tm-s390.h b/gdb/config/s390/tm-s390.h
deleted file mode 100644
index d36c2798f4f..00000000000
--- a/gdb/config/s390/tm-s390.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Macro definitions for GDB on an S390.
- Copyright 2001 Free Software Foundation, Inc.
- Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
- for IBM Deutschland Entwicklung GmbH, IBM Corporation.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#if !defined(TM_S390_H)
-#define TM_S390_H 1
-
-#define S390_NUM_GPRS (16)
-#define S390_GPR_SIZE DEPRECATED_REGISTER_SIZE
-#define S390_PSW_MASK_SIZE DEPRECATED_REGISTER_SIZE
-#define S390_PSW_ADDR_SIZE DEPRECATED_REGISTER_SIZE
-#define S390_NUM_FPRS (16)
-#define S390_FPR_SIZE (8)
-#define S390_FPC_SIZE (4)
-#define S390_FPC_PAD_SIZE (4) /* gcc insists on aligning the fpregs */
-#define S390_NUM_CRS (16)
-#define S390_CR_SIZE DEPRECATED_REGISTER_SIZE
-#define S390_NUM_ACRS (16)
-#define S390_ACR_SIZE (4)
-
-#define S390_NUM_REGS (2+S390_NUM_GPRS+S390_NUM_ACRS+S390_NUM_CRS+1+S390_NUM_FPRS)
-#define S390_FIRST_ACR (2+S390_NUM_GPRS)
-#define S390_LAST_ACR (S390_FIRST_ACR+S390_NUM_ACRS-1)
-#define S390_FIRST_CR (S390_FIRST_ACR+S390_NUM_ACRS)
-#define S390_LAST_CR (S390_FIRST_CR+S390_NUM_CRS-1)
-
-#define S390_PSWM_REGNUM 0
-#define S390_PC_REGNUM 1
-#define S390_GP0_REGNUM 2 /* GPR register 0 */
-#define S390_GP_LAST_REGNUM (S390_GP0_REGNUM+S390_NUM_GPRS-1)
-/* Usually return address */
-#define S390_RETADDR_REGNUM (S390_GP0_REGNUM+14)
-/* Contains address of top of stack */
-#define S390_SP_REGNUM (S390_GP0_REGNUM+15)
-/* needed in findvar.c still */
-#define S390_FP_REGNUM S390_SP_REGNUM
-#define S390_FRAME_REGNUM (S390_GP0_REGNUM+11)
-#define S390_FPC_REGNUM (S390_GP0_REGNUM+S390_NUM_GPRS+S390_NUM_ACRS+S390_NUM_CRS)
-/* FPR (Floating point) register 0 */
-#define S390_FP0_REGNUM (S390_FPC_REGNUM+1)
-/* Last floating point register */
-#define S390_FPLAST_REGNUM (S390_FP0_REGNUM+S390_NUM_FPRS-1)
-#define S390_LAST_REGNUM S390_FPLAST_REGNUM
-
-
-#define S390_ACR0_OFFSET ((S390_PSW_MASK_SIZE+S390_PSW_ADDR_SIZE)+(S390_GPR_SIZE*S390_NUM_GPRS))
-#define S390_CR0_OFFSET (S390_ACR0_OFFSET+(S390_ACR_SIZE*S390_NUM_ACRS))
-#define S390_FPC_OFFSET (S390_CR0_OFFSET+(S390_CR_SIZE*S390_NUM_CRS))
-#define S390_FP0_OFFSET (S390_FPC_OFFSET+(S390_FPC_SIZE+S390_FPC_PAD_SIZE))
-#define S390_GPR6_STACK_OFFSET (GDB_TARGET_IS_ESAME ? 48:24)
-
-#define S390_REGISTER_BYTES ((4+4)+(4*S390_NUM_GPRS)+(4*S390_NUM_ACRS)+ \
-(4*S390_NUM_CRS)+(S390_FPC_SIZE+S390_FPC_PAD_SIZE)+(S390_FPR_SIZE*S390_NUM_FPRS))
-
-#define S390X_REGISTER_BYTES ((8+8)+(8*S390_NUM_GPRS)+(4*S390_NUM_ACRS)+ \
-(8*S390_NUM_CRS)+(S390_FPC_SIZE+S390_FPC_PAD_SIZE)+(S390_FPR_SIZE*S390_NUM_FPRS))
-
-#define GDB_TARGET_IS_ESAME (TARGET_ARCHITECTURE->mach == bfd_mach_s390_64)
-
-#endif /* ifndef TM_S390_H */
diff --git a/gdb/config/s390/xm-linux.h b/gdb/config/s390/xm-linux.h
deleted file mode 100644
index d059d4097f4..00000000000
--- a/gdb/config/s390/xm-linux.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Native support for GNU/Linux, for GDB, the GNU debugger.
- Copyright 2001 Free Software Foundation, Inc.
- Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
- for IBM Deutschland Entwicklung GmbH, IBM Corporation.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#ifndef XM_LINUX_H
-#define XM_LINUX_H
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-#define KERNEL_U_ADDR 0x0
-
-#endif /* #ifndef XM_LINUX_H */
diff --git a/gdb/config/sh/embed.mt b/gdb/config/sh/embed.mt
index 4c821347188..807aa110e99 100644
--- a/gdb/config/sh/embed.mt
+++ b/gdb/config/sh/embed.mt
@@ -1,4 +1,4 @@
-# Target: Embedded Hitachi Super-H with ICE and simulator
+# Target: Embedded Renesas Super-H with ICE and simulator
TDEPFILES= sh-tdep.o sh64-tdep.o monitor.o sh3-rom.o remote-e7000.o ser-e7kpc.o dsrec.o
TM_FILE= tm-sh.h
diff --git a/gdb/config/sh/linux.mt b/gdb/config/sh/linux.mt
index 92ab4c4daf1..83ada467161 100644
--- a/gdb/config/sh/linux.mt
+++ b/gdb/config/sh/linux.mt
@@ -1,4 +1,4 @@
-# Target: Hitachi Super-H running GNU/Linux
+# Target: Renesas Super-H running GNU/Linux
TDEPFILES= sh-tdep.o sh64-tdep.o monitor.o sh3-rom.o remote-e7000.o ser-e7kpc.o dsrec.o solib.o solib-svr4.o solib-legacy.o
TM_FILE= tm-linux.h
diff --git a/gdb/config/sh/tm-linux.h b/gdb/config/sh/tm-linux.h
index e8272d02e37..0117d813da8 100644
--- a/gdb/config/sh/tm-linux.h
+++ b/gdb/config/sh/tm-linux.h
@@ -1,4 +1,4 @@
-/* Target-specific definitions for GNU/Linux running on a Hitachi
+/* Target-specific definitions for GNU/Linux running on a Renesas
Super-H.
Copyright 2000, 2002 Free Software Foundation, Inc.
diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h
index 966c8cd95c6..228e0bcc5f3 100644
--- a/gdb/config/sh/tm-sh.h
+++ b/gdb/config/sh/tm-sh.h
@@ -1,4 +1,4 @@
-/* Target-specific definition for a Hitachi Super-H.
+/* Target-specific definition for a Renesas Super-H.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
diff --git a/gdb/config/sh/wince.mt b/gdb/config/sh/wince.mt
index 342c2d6b4d2..89a5a89ce69 100644
--- a/gdb/config/sh/wince.mt
+++ b/gdb/config/sh/wince.mt
@@ -1,4 +1,4 @@
-# Target: Hitachi Super-H running on Windows CE
+# Target: Renesas Super-H running on Windows CE
TDEPFILES= sh-tdep.o sh64-tdep.o wince.o
TM_FILE= tm-wince.h
MT_CFLAGS=-DSHx -U_X86_ -U_M_IX86 -U__i386__ -U__i486__ -U__i586__ -U__i686__ -DUNICODE -D_WIN32_WCE -DWINCE_STUB='"${target_alias}-stub.exe"'
diff --git a/gdb/config/sparc/fbsd.mh b/gdb/config/sparc/fbsd.mh
index 27942f86e6a..fb491a55c47 100644
--- a/gdb/config/sparc/fbsd.mh
+++ b/gdb/config/sparc/fbsd.mh
@@ -1,5 +1,5 @@
# Host: FreeBSD/sparc64
-NATDEPFILES= sparc64fbsd-nat.o sparcbsd-nat.o \
- corelow.o fork-child.o infptrace.o inftarg.o \
+NATDEPFILES= sparc64fbsd-nat.o sparc64-nat.o sparc-nat.o \
+ fork-child.o infptrace.o inftarg.o \
solib.o solib-svr4.o solib-legacy.o
NAT_FILE= nm-fbsd.h
diff --git a/gdb/config/sparc/fbsd.mt b/gdb/config/sparc/fbsd.mt
index 20c7f1ce27a..8e4dead7add 100644
--- a/gdb/config/sparc/fbsd.mt
+++ b/gdb/config/sparc/fbsd.mt
@@ -1,3 +1,3 @@
# Target: FreeBSD/sparc64
-TDEPFILES= sparc64-tdep.o sparc64fbsd-tdep.o
+TDEPFILES= sparc-tdep.o sparc64-tdep.o sparc64fbsd-tdep.o corelow.o
TM_FILE= tm-fbsd.h
diff --git a/gdb/config/sparc/linux.mh b/gdb/config/sparc/linux.mh
index f36dbb1ae34..ed68cc78aea 100644
--- a/gdb/config/sparc/linux.mh
+++ b/gdb/config/sparc/linux.mh
@@ -1,14 +1,11 @@
-# Host: Sparcstation, running GNU/Linux.
-
-XM_FILE= xm-linux.h
-
+# Host: GNU/Linux SPARC
NAT_FILE= nm-linux.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o \
- proc-service.o thread-db.o lin-lwp.o sparc-linux-nat.o \
+NATDEPFILES= sparc-nat.o sparc-sol2-nat.o \
+ corelow.o core-regset.o fork-child.o \
+ infptrace.o inftarg.o \
+ proc-service.o thread-db.o lin-lwp.o \
linux-proc.o gcore.o linux-nat.o
# The dynamically loaded libthread_db needs access to symbols in the
# gdb executable.
LOADLIBES = -ldl -rdynamic
-
-HOST_IPC=-DBSD_IPC
diff --git a/gdb/config/sparc/linux.mt b/gdb/config/sparc/linux.mt
index d6cf773a8ee..e053f302c4f 100644
--- a/gdb/config/sparc/linux.mt
+++ b/gdb/config/sparc/linux.mt
@@ -1,3 +1,4 @@
-# Target: Sparcstation, running Linux
-TDEPFILES= sparc-tdep.o solib.o solib-svr4.o solib-legacy.o
+# Target: GNU/Linux SPARC
+TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o sparc-linux-tdep.o \
+ solib.o solib-svr4.o solib-legacy.o
TM_FILE= tm-linux.h
diff --git a/gdb/config/sparc/linux64.mh b/gdb/config/sparc/linux64.mh
new file mode 100644
index 00000000000..c1472de8de8
--- /dev/null
+++ b/gdb/config/sparc/linux64.mh
@@ -0,0 +1,11 @@
+# Host: GNU/Linux UltraSPARC
+NAT_FILE= nm-linux.h
+NATDEPFILES= sparc-nat.o sparc64-nat.o sparc-sol2-nat.o sparc64-linux-nat.o \
+ corelow.o core-regset.o \
+ fork-child.o infptrace.o inftarg.o \
+ proc-service.o thread-db.o lin-lwp.o \
+ linux-proc.o gcore.o linux-nat.o
+
+# The dynamically loaded libthread_db needs access to symbols in the
+# gdb executable.
+LOADLIBES = -ldl -rdynamic
diff --git a/gdb/config/sparc/linux64.mt b/gdb/config/sparc/linux64.mt
new file mode 100644
index 00000000000..4121314318b
--- /dev/null
+++ b/gdb/config/sparc/linux64.mt
@@ -0,0 +1,5 @@
+# Target: GNU/Linux UltraSPARC
+TDEPFILES= sparc64-tdep.o sparc64-sol2-tdep.o sparc64-linux-tdep.o \
+ sparc-tdep.o sparc-sol2-tdep.o sparc-linux-tdep.o \
+ solib.o solib-svr4.o solib-legacy.o
+TM_FILE= tm-linux.h
diff --git a/gdb/config/sparc/nbsd.mt b/gdb/config/sparc/nbsd.mt
index b04dd42fabb..25dbefff703 100644
--- a/gdb/config/sparc/nbsd.mt
+++ b/gdb/config/sparc/nbsd.mt
@@ -1,4 +1,4 @@
-# Target: SPARC running NetBSD
-TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o corelow.o solib.o \
- solib-svr4.o
+# Target: NetBSD/sparc
+TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o \
+ corelow.o solib.o solib-svr4.o
TM_FILE= tm-nbsd.h
diff --git a/gdb/config/sparc/nbsd64.mh b/gdb/config/sparc/nbsd64.mh
index eb54e489eb8..e8ac58bda2b 100644
--- a/gdb/config/sparc/nbsd64.mh
+++ b/gdb/config/sparc/nbsd64.mh
@@ -1,3 +1,4 @@
-# Host: UltraSPARC running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o sparc64nbsd-nat.o
+# Host: NetBSD/sparc64
+NATDEPFILES= sparc64nbsd-nat.o sparc-nat.o \
+ fork-child.o infptrace.o inftarg.o
NAT_FILE= nm-nbsd.h
diff --git a/gdb/config/sparc/nbsd64.mt b/gdb/config/sparc/nbsd64.mt
index 93b8f7841d4..4a1b13b9bb6 100644
--- a/gdb/config/sparc/nbsd64.mt
+++ b/gdb/config/sparc/nbsd64.mt
@@ -1,4 +1,5 @@
-# Target: UltraSPARC running NetBSD
-TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o corelow.o solib.o \
- solib-svr4.o
-TM_FILE= tm-nbsd64.h
+# Target: NetBSD/sparc64
+TDEPFILES= sparc64-tdep.o sparc64nbsd-tdep.o \
+ sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o \
+ corelow.o solib.o solib-svr4.o
+TM_FILE= tm-nbsd.h
diff --git a/gdb/config/sparc/nbsdaout.mh b/gdb/config/sparc/nbsdaout.mh
index 45208998124..8944e60e483 100644
--- a/gdb/config/sparc/nbsdaout.mh
+++ b/gdb/config/sparc/nbsdaout.mh
@@ -1,4 +1,4 @@
-# Host: Sun 4 or Sparcstation, running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o sparcnbsd-nat.o solib-sunos.o
-XM_FILE= xm-nbsd.h
+# Host: NetBSD/sparc a.out
+NATDEPFILES= sparc-nat.o sparcnbsd-nat.o \
+ fork-child.o infptrace.o inftarg.o solib-sunos.o
NAT_FILE= nm-nbsdaout.h
diff --git a/gdb/config/sparc/nbsdelf.mh b/gdb/config/sparc/nbsdelf.mh
index 1042d91b9dd..45309ecaec0 100644
--- a/gdb/config/sparc/nbsdelf.mh
+++ b/gdb/config/sparc/nbsdelf.mh
@@ -1,4 +1,4 @@
-# Host: Sun 4 or Sparcstation, running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o sparcnbsd-nat.o
-XM_FILE= xm-nbsd.h
+# Host: NetBSD/sparc ELF
+NATDEPFILES= sparc-nat.o sparcnbsd-nat.o \
+ fork-child.o infptrace.o inftarg.o
NAT_FILE= nm-nbsd.h
diff --git a/gdb/config/sparc/nm-fbsd.h b/gdb/config/sparc/nm-fbsd.h
index 917cc49bf07..459764f03ad 100644
--- a/gdb/config/sparc/nm-fbsd.h
+++ b/gdb/config/sparc/nm-fbsd.h
@@ -1,6 +1,6 @@
/* Native-dependent definitions for FreeBSD/sparc64.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by David E. O'Brien <obrien@FreeBSD.org>.
This file is part of GDB.
@@ -22,15 +22,8 @@
#ifndef NM_FBSD_H
#define NM_FBSD_H
-/* Type of the third argument to the `ptrace' system call. */
-#define PTRACE_ARG3_TYPE caddr_t
-
-/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
-#define FETCH_INFERIOR_REGISTERS
-
-/* We can attach and detach. */
-#define ATTACH_DETACH
-
+/* Get generic BSD native definitions. */
+#include "config/nm-bsd.h"
/* Shared library support. */
diff --git a/gdb/config/sparc/nm-linux.h b/gdb/config/sparc/nm-linux.h
index a156eba0707..cfab3893ca5 100644
--- a/gdb/config/sparc/nm-linux.h
+++ b/gdb/config/sparc/nm-linux.h
@@ -1,7 +1,7 @@
-/* Macro definitions for running gdb on a Sparc running GNU/Linux.
+/* Native-dependent definitions for GNU/Linux SPARC.
- Copyright 1989, 1992, 1996, 1998, 1999, 2000, 2002 Free Software
- Foundation, Inc.
+ Copyright 1989, 1992, 1996, 1998, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -20,13 +20,18 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "config/nm-sysv4.h"
+#ifndef NM_LINUX_H
+#define NM_LINUX_H
+
#include "config/nm-linux.h"
-#include "solib.h"
-#define FETCH_INFERIOR_REGISTERS
+/* Type of the third argument to the `ptrace' system call. */
+#define PTRACE_ARG3_TYPE long
-/* Return sizeof user struct to callers in less machine dependent routines */
+/* Type of the fourth argument to the `ptrace' system call. */
+#define PTRACE_XFER_TYPE long
+
+/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
+#define FETCH_INFERIOR_REGISTERS
-#define KERNEL_U_SIZE kernel_u_size()
-extern int kernel_u_size (void);
+#endif /* nm-linux.h */
diff --git a/gdb/config/sparc/nm-nbsd.h b/gdb/config/sparc/nm-nbsd.h
index 7ffd72e9101..c64f505c63d 100644
--- a/gdb/config/sparc/nm-nbsd.h
+++ b/gdb/config/sparc/nm-nbsd.h
@@ -1,6 +1,7 @@
-/* Native-dependent definitions for Sparc running NetBSD, for GDB.
- Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1999, 2000, 2002
- Free Software Foundation, Inc.
+/* Native-dependent definitions for NetBSD/sparc.
+
+ Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1999, 2000, 2002,
+ 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,14 +23,20 @@
#ifndef NM_NBSD_H
#define NM_NBSD_H
-#include "regcache.h"
-
-/* Get generic NetBSD native definitions. */
-
+/* Get generic NetBSD native definitions. */
#include "config/nm-nbsd.h"
+
+
+/* Support for StackGhost cookies. */
-/* Before storing, we need to read all the registers. */
+#include "target.h"
+struct target_ops; /* Fool ARI. */
-#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
+#define NATIVE_XFER_WCOOKIE sparc_xfer_wcookie
+extern LONGEST sparc_xfer_wcookie (struct target_ops *ops,
+ enum target_object object,
+ const char *annex,
+ void *readbuf, const void *writebuf,
+ ULONGEST offset, LONGEST len);
-#endif /* NM_NBSD_H */
+#endif /* nm-nbsd.h */
diff --git a/gdb/config/sparc/nm-nbsdaout.h b/gdb/config/sparc/nm-nbsdaout.h
index 730759153e0..9e463f9b503 100644
--- a/gdb/config/sparc/nm-nbsdaout.h
+++ b/gdb/config/sparc/nm-nbsdaout.h
@@ -1,5 +1,6 @@
-/* Native-dependent definitions for Sparc running NetBSD a.out, for GDB.
- Copyright 1999 Free Software Foundation, Inc.
+/* Native-dependent definitions for NetBSD/sparc a.out.
+
+ Copyright 1999, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -23,8 +24,7 @@
#include "sparc/nm-nbsd.h"
-/* Get generic NetBSD a.out native definitions. */
-
+/* Get generic NetBSD a.out native definitions. */
#include "config/nm-nbsdaout.h"
-#endif /* NM_NBSDAOUT_H */
+#endif /* nm-nbsdaout.h */
diff --git a/gdb/config/sparc/nm-sun4sol2.h b/gdb/config/sparc/nm-sol2.h
index 6f37162d7a8..bc9de3fdf80 100644
--- a/gdb/config/sparc/nm-sun4sol2.h
+++ b/gdb/config/sparc/nm-sol2.h
@@ -1,5 +1,6 @@
-/* Native-dependent definitions for Sparc running SVR4.
- Copyright 1994, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Native-dependent definitions for Solaris SPARC.
+
+ Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -15,50 +16,43 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "regcache.h"
-
-/* Include the generic SVR4 definitions. */
-
-#include "config/nm-sysv4.h"
-
-/* Before storing, we need to read all the registers. */
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
+#ifndef NM_SOL2_H
+#define NM_SOL2_H
-/* Solaris PSRVADDR support does not seem to include a place for nPC. */
+#define GDB_GREGSET_T prgregset_t
+#define GDB_FPREGSET_T prfpregset_t
-#define PRSVADDR_BROKEN
+/* Shared library support. */
-/* gdb wants to use the prgregset_t interface rather than
- the gregset_t interface, partly because that's what's
- used in core-sol2.c */
+#include "solib.h"
-#define GDB_GREGSET_T prgregset_t
-#define GDB_FPREGSET_T prfpregset_t
+/* Hardware wactchpoints. */
-#ifdef NEW_PROC_API /* Solaris 6 and above can do HW watchpoints */
+/* Solaris 2.6 and above can do HW watchpoints. */
+#ifdef NEW_PROC_API
#define TARGET_HAS_HARDWARE_WATCHPOINTS
-/* The man page for proc4 on solaris 6 and 7 says that the system
+/* The man page for proc(4) on Solaris 2.6 and up says that the system
can support "thousands" of hardware watchpoints, but gives no
- method for finding out how many. So just tell GDB 'yes'. */
-#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(TYPE, CNT, OT) 1
+ method for finding out how many; It doesn't say anything about the
+ allowed size for the watched area either. So we just tell GDB
+ 'yes'. */
+#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
/* When a hardware watchpoint fires off the PC will be left at the
- instruction following the one which caused the watchpoint.
- It will *NOT* be necessary for GDB to step over the watchpoint. */
+ instruction following the one which caused the watchpoint. It will
+ *NOT* be necessary for GDB to step over the watchpoint. */
#define HAVE_CONTINUABLE_WATCHPOINT 1
extern int procfs_stopped_by_watchpoint (ptid_t);
#define STOPPED_BY_WATCHPOINT(W) \
procfs_stopped_by_watchpoint(inferior_ptid)
-/* Use these macros for watchpoint insertion/deletion. */
-/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
+/* Use these macros for watchpoint insertion/deletion. TYPE can be 0
+ (write watch), 1 (read watch), 2 (access watch (read/write). */
extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int);
#define target_insert_watchpoint(ADDR, LEN, TYPE) \
@@ -67,3 +61,5 @@ extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int);
procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0)
#endif /* NEW_PROC_API */
+
+#endif /* nm-sol2.h */
diff --git a/gdb/config/sparc/nm-sun4os4.h b/gdb/config/sparc/nm-sun4os4.h
deleted file mode 100644
index e77330c51d4..00000000000
--- a/gdb/config/sparc/nm-sun4os4.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Macro definitions for running gdb on a Sun 4 running sunos 4.
- Copyright 1989, 1992, 1996, 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 "regcache.h"
-
-/* Do implement the attach and detach commands. */
-
-#define ATTACH_DETACH
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-
-#define FETCH_INFERIOR_REGISTERS
-
-/* Before storing, we need to read all the registers. */
-
-#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
-
-/* Return sizeof user struct to callers in less machine dependent routines */
-
-#define KERNEL_U_SIZE kernel_u_size()
-extern int kernel_u_size (void);
-
-/* SunOS 4.x uses nonstandard "char *" as type of third argument to ptrace() */
-
-#define PTRACE_ARG3_TYPE char*
diff --git a/gdb/config/sparc/obsd.mt b/gdb/config/sparc/obsd.mt
new file mode 100644
index 00000000000..800cb048eac
--- /dev/null
+++ b/gdb/config/sparc/obsd.mt
@@ -0,0 +1,4 @@
+# Target: OpenBSD/sparc
+TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o nbsd-tdep.o \
+ corelow.o solib.o solib-svr4.o
+TM_FILE= tm-nbsd.h
diff --git a/gdb/config/sparc/obsd64.mt b/gdb/config/sparc/obsd64.mt
new file mode 100644
index 00000000000..a69281754c4
--- /dev/null
+++ b/gdb/config/sparc/obsd64.mt
@@ -0,0 +1,5 @@
+# Target: OpenBSD/sparc64
+TDEPFILES= sparc64-tdep.o sparc64nbsd-tdep.o sparc64obsd-tdep.o \
+ sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o \
+ corelow.o solib.o solib-svr4.o
+TM_FILE= tm-nbsd.h
diff --git a/gdb/config/sparc/sol2-64.mt b/gdb/config/sparc/sol2-64.mt
new file mode 100644
index 00000000000..92f848929fe
--- /dev/null
+++ b/gdb/config/sparc/sol2-64.mt
@@ -0,0 +1,3 @@
+# Target: Solaris UltraSPARC
+TDEPFILES= sparc64-tdep.o sparc64-sol2-tdep.o sparc-tdep.o sparc-sol2-tdep.o
+TM_FILE= tm-sol2.h
diff --git a/gdb/config/sparc/sol2.mh b/gdb/config/sparc/sol2.mh
new file mode 100644
index 00000000000..735b9ee8096
--- /dev/null
+++ b/gdb/config/sparc/sol2.mh
@@ -0,0 +1,6 @@
+# Host: Solaris SPARC & UltraSPARC
+NAT_FILE= nm-sol2.h
+NATDEPFILES= sparc-sol2-nat.o \
+ corelow.o core-regset.o fork-child.o gcore.o \
+ procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o \
+ solib.o solib-svr4.o solib-legacy.o
diff --git a/gdb/config/sparc/sol2.mt b/gdb/config/sparc/sol2.mt
new file mode 100644
index 00000000000..4037956317c
--- /dev/null
+++ b/gdb/config/sparc/sol2.mt
@@ -0,0 +1,3 @@
+# Target: Solaris SPARC
+TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o
+TM_FILE= tm-sol2.h
diff --git a/gdb/config/sparc/sp64.mt b/gdb/config/sparc/sp64.mt
deleted file mode 100644
index 943abfc240e..00000000000
--- a/gdb/config/sparc/sp64.mt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Target: SPARC64
-# solib.o and procfs.o taken out for now. We don't have shared libraries yet,
-# and the elf version requires procfs.o but the a.out version doesn't.
-# Then again, having procfs.o in a target makefile fragment seems wrong.
-TDEPFILES = sparc-tdep.o
-TM_FILE= tm-sp64.h
diff --git a/gdb/config/sparc/sp64linux.mt b/gdb/config/sparc/sp64linux.mt
deleted file mode 100644
index d7d642ead71..00000000000
--- a/gdb/config/sparc/sp64linux.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: UltraSPARC, running Linux 64bit programs
-TDEPFILES= sparc-tdep.o solib.o solib-svr4.o solib-legacy.o
-TM_FILE= tm-sp64linux.h
diff --git a/gdb/config/sparc/sp64sol2.mt b/gdb/config/sparc/sp64sol2.mt
deleted file mode 100644
index ce2f0d82df0..00000000000
--- a/gdb/config/sparc/sp64sol2.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Ultrasparc, running Solaris 2
-TDEPFILES= sparc-tdep.o
-TM_FILE= tm-sun4sol2.h
diff --git a/gdb/config/sparc/sparc-em.mt b/gdb/config/sparc/sparc-em.mt
deleted file mode 100644
index 13b0c6a29e2..00000000000
--- a/gdb/config/sparc/sparc-em.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: SPARC embedded
-TDEPFILES= sparc-tdep.o
-TM_FILE= tm-spc-em.h
diff --git a/gdb/config/sparc/sparc.mt b/gdb/config/sparc/sparc.mt
new file mode 100644
index 00000000000..ea78c97af55
--- /dev/null
+++ b/gdb/config/sparc/sparc.mt
@@ -0,0 +1,2 @@
+# Target: SPARC
+TDEPFILES= sparc-tdep.o
diff --git a/gdb/config/sparc/sparc64.mt b/gdb/config/sparc/sparc64.mt
new file mode 100644
index 00000000000..b1082be4956
--- /dev/null
+++ b/gdb/config/sparc/sparc64.mt
@@ -0,0 +1,2 @@
+# Target: UltraSPARC
+TDEPFILES= sparc-tdep.o sparc64-tdep.o
diff --git a/gdb/config/sparc/sparclet.mt b/gdb/config/sparc/sparclet.mt
deleted file mode 100644
index 5dde41b654e..00000000000
--- a/gdb/config/sparc/sparclet.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: SPARC embedded Sparclet monitor
-# OBSOLETE TDEPFILES= sparc-tdep.o monitor.o sparclet-rom.o dsrec.o
-# OBSOLETE TM_FILE= tm-sparclet.h
diff --git a/gdb/config/sparc/sparclite.mt b/gdb/config/sparc/sparclite.mt
deleted file mode 100644
index 7ae1008af00..00000000000
--- a/gdb/config/sparc/sparclite.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# OBSOLETE # Target: Fujitsu SPARClite processor
-# OBSOLETE TDEPFILES= sparc-tdep.o sparcl-tdep.o
-# OBSOLETE TM_FILE= tm-sparclite.h
-# OBSOLETE SIM_OBS = remote-sim.o
-# OBSOLETE SIM = ../sim/erc32/libsim.a
diff --git a/gdb/config/sparc/sparclynx.mh b/gdb/config/sparc/sparclynx.mh
deleted file mode 100644
index c573604b66a..00000000000
--- a/gdb/config/sparc/sparclynx.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-# Host: Sparc running LynxOS
-
-XM_CLIBS= -lbsd
-
-NAT_FILE= nm-sparclynx.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o lynx-nat.o
diff --git a/gdb/config/sparc/sparclynx.mt b/gdb/config/sparc/sparclynx.mt
deleted file mode 100644
index 5e61645caaa..00000000000
--- a/gdb/config/sparc/sparclynx.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Sparc running LynxOS
-TDEPFILES= coff-solib.o sparc-tdep.o
-TM_FILE= tm-sparclynx.h
diff --git a/gdb/config/sparc/sun4os4.mh b/gdb/config/sparc/sun4os4.mh
deleted file mode 100644
index 4e664d71ccb..00000000000
--- a/gdb/config/sparc/sun4os4.mh
+++ /dev/null
@@ -1,9 +0,0 @@
-# Host: Sun 4 or Sparcstation, running SunOS 4
-NAT_FILE= nm-sun4os4.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o
-HOST_IPC=-DBSD_IPC
-
-# 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.
diff --git a/gdb/config/sparc/sun4os4.mt b/gdb/config/sparc/sun4os4.mt
deleted file mode 100644
index 342d6f73537..00000000000
--- a/gdb/config/sparc/sun4os4.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Sun 4 or Sparcstation, running SunOS 4
-TDEPFILES= sparc-tdep.o solib.o solib-sunos.o
-TM_FILE= tm-sun4os4.h
diff --git a/gdb/config/sparc/sun4sol2.mh b/gdb/config/sparc/sun4sol2.mh
deleted file mode 100644
index 4e77b9234cd..00000000000
--- a/gdb/config/sparc/sun4sol2.mh
+++ /dev/null
@@ -1,22 +0,0 @@
-# Host: Sun 4 or Sparcstation, running Solaris 2
-
-XM_FILE= xm-sun4sol2.h
-XM_CLIBS= -lsocket -lnsl
-
-NAT_FILE= nm-sun4sol2.h
-NATDEPFILES= corelow.o core-sol2.o solib.o solib-svr4.o solib-legacy.o \
- fork-child.o procfs.o gcore.o \
- proc-api.o proc-events.o proc-flags.o proc-why.o
-
-# /usr/include/v9 is needed only by core-sol2.c when including
-# v9/sys/privregs.h, or rather the headers it in turn includes.
-MH_CFLAGS=-I/usr/include/v9
-# If you are compiling with Sun's compiler, add the -xs option to CC
-# (e.g. `make CC="cc -xs"').
-# Sun's compilers require the -xs option to produce debug information
-# in the final linked executable. Otherwise they leave it in the .o
-# files only, with undocumented pointers to it in the linked executable.
-# This is commented out because we don't assume that the Sun compiler
-# is in use.
-#MH_CFLAGS=-xs -I/usr/include/v9
-HOST_IPC=-DBSD_IPC
diff --git a/gdb/config/sparc/sun4sol2.mt b/gdb/config/sparc/sun4sol2.mt
deleted file mode 100644
index af70e9f9f9f..00000000000
--- a/gdb/config/sparc/sun4sol2.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Sun 4 or Sparcstation, running Solaris 2
-TDEPFILES= sparc-tdep.o
-TM_FILE= tm-sun4sol2.h
diff --git a/gdb/config/sparc/tm-linux.h b/gdb/config/sparc/tm-linux.h
index 63be2b885a5..ae853ba0acb 100644
--- a/gdb/config/sparc/tm-linux.h
+++ b/gdb/config/sparc/tm-linux.h
@@ -1,7 +1,6 @@
-/* Macro definitions for GDB for a Sparc running GNU/Linux.
+/* Target-dependent definitions for GNU/Linux SPARC.
- Copyright 1989, 1992, 1994, 1995, 1998, 1999, 2002 Free Software
- Foundation, Inc.
+ Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -17,16 +16,14 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#ifndef TM_SPARCLINUX_H
-#define TM_SPARCLINUX_H
+#ifndef TM_LINUX_H
+#define TM_LINUX_H
-#include "sparc/tm-sparc.h"
+#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
-#define SIGCONTEXT_PC_OFFSET 12
+/* Shared library support. */
+#include "solib.h"
-#include "config/tm-linux.h"
-
-#endif /* TM_SPARCLINUX_H */
+#endif /* tm-linux.h */
diff --git a/gdb/config/sparc/tm-nbsd.h b/gdb/config/sparc/tm-nbsd.h
index c82c3154088..301136bbead 100644
--- a/gdb/config/sparc/tm-nbsd.h
+++ b/gdb/config/sparc/tm-nbsd.h
@@ -1,5 +1,6 @@
-/* Macro definitions for Sparc running under NetBSD.
- Copyright 1994, 2002 Free Software Foundation, Inc.
+/* Target-dependent definitions for NetBSD/sparc.
+
+ Copyright 1994, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,7 +22,9 @@
#ifndef TM_NBSD_H
#define TM_NBSD_H
-#include "sparc/tm-sparc.h"
+#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
+
+/* Shared library support. */
#include "solib.h"
-#endif /* TM_NBSD_H */
+#endif /* tm-nbsd.h */
diff --git a/gdb/config/sparc/tm-sol2.h b/gdb/config/sparc/tm-sol2.h
new file mode 100644
index 00000000000..d111c1a7768
--- /dev/null
+++ b/gdb/config/sparc/tm-sol2.h
@@ -0,0 +1,40 @@
+/* Target-dependent definitions for Solaris SPARC.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef TM_SOL2_H
+#define TM_SOL2_H
+
+#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
+
+/* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop,
+ SunPRO) compiler puts out 0 instead of the address in N_SO stabs.
+ Starting with SunPRO 3.0, the compiler does this for N_FUN stabs
+ too. */
+#define SOFUN_ADDRESS_MAYBE_MISSING
+
+/* The Sun compilers also do "globalization"; see the comment in
+ sparc-tdep.c for more information. */
+extern char *sparc_stabs_unglobalize_name (char *name);
+#define STATIC_TRANSFORM_NAME(name) \
+ sparc_stabs_unglobalize_name (name)
+#define IS_STATIC_TRANSFORM_NAME(name) \
+ ((name) != sparc_stabs_unglobalize_name (name))
+
+#endif /* tm-sol2.h */
diff --git a/gdb/config/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h
deleted file mode 100644
index 960cc0b9d97..00000000000
--- a/gdb/config/sparc/tm-sp64.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Target machine sub-parameters for SPARC64, for GDB, the GNU debugger.
- This is included by other tm-*.h files to define SPARC64 cpu-related info.
- Copyright 1994, 1995, 1996, 1998, 1999, 2000
- Free Software Foundation, Inc.
- This is (obviously) based on the SPARC Vn (n<9) port.
- Contributed by Doug Evans (dje@cygnus.com).
- Further modified by Bob Manson (manson@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. */
-
-struct type;
-
-#ifndef GDB_TARGET_IS_SPARC64
-#define GDB_TARGET_IS_SPARC64 1
-#endif
-
-#include "sparc/tm-sparc.h"
-
-/* Eeeew. Ok, we have to assume (for now) that the processor really is
- in sparc64 mode. While this is the same instruction sequence as
- on the Sparc, the stack frames are offset by +2047 (and the arguments
- are 8 bytes instead of 4). */
-/* Instructions are:
- std %f10, [ %fp + 0x7a7 ]
- std %f8, [ %fp + 0x79f ]
- std %f6, [ %fp + 0x797 ]
- std %f4, [ %fp + 0x78f ]
- std %f2, [ %fp + 0x787 ]
- std %f0, [ %fp + 0x77f ]
- std %g6, [ %fp + 0x777 ]
- std %g4, [ %fp + 0x76f ]
- std %g2, [ %fp + 0x767 ]
- std %g0, [ %fp + 0x75f ]
- std %fp, [ %fp + 0x757 ]
- std %i4, [ %fp + 0x74f ]
- std %i2, [ %fp + 0x747 ]
- std %i0, [ %fp + 0x73f ]
- nop
- nop
- nop
- nop
- rd %tbr, %o0
- st %o0, [ %fp + 0x72b ]
- rd %tpc, %o0
- st %o0, [ %fp + 0x727 ]
- rd %psr, %o0
- st %o0, [ %fp + 0x723 ]
- rd %y, %o0
- st %o0, [ %fp + 0x71f ]
- ldx [ %sp + 0x8a7 ], %o5
- ldx [ %sp + 0x89f ], %o4
- ldx [ %sp + 0x897 ], %o3
- ldx [ %sp + 0x88f ], %o2
- ldx [ %sp + 0x887 ], %o1
- call %g0
- ldx [ %sp + 0x87f ], %o0
- nop
- ta 1
- nop
- nop
- */
-
-/* Offsets into jmp_buf.
- FIXME: This was borrowed from the v8 stuff and will probably have to change
- for v9. */
-
-#define JB_ELEMENT_SIZE 8 /* Size of each element in jmp_buf */
-
-#define JB_ONSSTACK 0
-#define JB_SIGMASK 1
-#define JB_SP 2
-#define JB_PC 3
-#define JB_NPC 4
-#define JB_PSR 5
-#define JB_G1 6
-#define JB_O0 7
-#define JB_WBCNT 8
-
-/* Figure out where the longjmp will land. We expect that we have
- just entered longjmp and haven't yet setup the stack frame, so the
- args are still in the output regs. %o0 (O0_REGNUM) points at the
- jmp_buf structure from which we extract the pc (JB_PC) that we will
- land at. The pc is copied into ADDR. This routine returns true on
- success */
-
-extern int get_longjmp_target (CORE_ADDR *);
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-
-#undef TM_PRINT_INSN_MACH
-#define TM_PRINT_INSN_MACH bfd_mach_sparc_v9a
-
diff --git a/gdb/config/sparc/tm-sp64linux.h b/gdb/config/sparc/tm-sp64linux.h
deleted file mode 100644
index 17bdd8a002a..00000000000
--- a/gdb/config/sparc/tm-sp64linux.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Macro definitions for GDB for a UltraSparc running GNU/Linux.
-
- Copyright 2001, 2002 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef TM_SPARC_LIN64_H
-#define TM_SPARC_LIN64_H
-
-#include "sparc/tm-sp64.h"
-
-#define SIGCONTEXT_PC_OFFSET 16 /* See asm-sparc64/sigcontext.h */
-
-/* We always want full V9 + Ultra VIS stuff... */
-#undef TM_PRINT_INSN_MACH
-#define TM_PRINT_INSN_MACH bfd_mach_sparc_v9a
-
-#define GDB_PTRACE_REGS64
-
-#include "config/tm-sysv4.h"
-
-#endif /* TM_SPARC_LIN64_H */
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
deleted file mode 100644
index a18e20317d5..00000000000
--- a/gdb/config/sparc/tm-sparc.h
+++ /dev/null
@@ -1,361 +0,0 @@
-/* Target machine sub-parameters for SPARC, for GDB, the GNU debugger.
- This is included by other tm-*.h files to define SPARC cpu-related info.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
- Contributed by Michael Tiemann (tiemann@mcc.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 "regcache.h"
-
-struct type;
-struct value;
-struct frame_info;
-
-/*
- * The following enums are purely for the convenience of the GDB
- * developer, when debugging GDB.
- */
-
-enum { /* Sparc general registers, for all sparc versions. */
- G0_REGNUM, G1_REGNUM, G2_REGNUM, G3_REGNUM,
- G4_REGNUM, G5_REGNUM, G6_REGNUM, G7_REGNUM,
- O0_REGNUM, O1_REGNUM, O2_REGNUM, O3_REGNUM,
- O4_REGNUM, O5_REGNUM, O6_REGNUM, O7_REGNUM,
- L0_REGNUM, L1_REGNUM, L2_REGNUM, L3_REGNUM,
- L4_REGNUM, L5_REGNUM, L6_REGNUM, L7_REGNUM,
- I0_REGNUM, I1_REGNUM, I2_REGNUM, I3_REGNUM,
- I4_REGNUM, I5_REGNUM, I6_REGNUM, I7_REGNUM,
- FP0_REGNUM /* Floating point register 0 */
-};
-
-enum { /* Sparc general registers, alternate names. */
- R0_REGNUM, R1_REGNUM, R2_REGNUM, R3_REGNUM,
- R4_REGNUM, R5_REGNUM, R6_REGNUM, R7_REGNUM,
- R8_REGNUM, R9_REGNUM, R10_REGNUM, R11_REGNUM,
- R12_REGNUM, R13_REGNUM, R14_REGNUM, R15_REGNUM,
- R16_REGNUM, R17_REGNUM, R18_REGNUM, R19_REGNUM,
- R20_REGNUM, R21_REGNUM, R22_REGNUM, R23_REGNUM,
- R24_REGNUM, R25_REGNUM, R26_REGNUM, R27_REGNUM,
- R28_REGNUM, R29_REGNUM, R30_REGNUM, R31_REGNUM
-};
-
-enum { /* Sparc32 control registers. */
- PS_REGNUM = 65, /* PC, NPC, and Y are omitted because */
- WIM_REGNUM = 66, /* they have different values depending on */
- TBR_REGNUM = 67, /* 32-bit / 64-bit mode. */
- FPS_REGNUM = 70,
- CPS_REGNUM = 71
-};
-
-/* v9 misc. and priv. regs */
-
-/* Note: specifying values explicitly for documentation purposes. */
-enum { /* Sparc64 control registers, excluding Y, PC, and NPC. */
- CCR_REGNUM = 82, /* Condition Code Register (%xcc,%icc) */
- FSR_REGNUM = 83, /* Floating Point State */
- FPRS_REGNUM = 84, /* Floating Point Registers State */
- ASI_REGNUM = 86, /* Alternate Space Identifier */
- VER_REGNUM = 87, /* Version register */
- TICK_REGNUM = 88, /* Tick register */
- PIL_REGNUM = 89, /* Processor Interrupt Level */
- PSTATE_REGNUM = 90, /* Processor State */
- TSTATE_REGNUM = 91, /* Trap State */
- TBA_REGNUM = 92, /* Trap Base Address */
- TL_REGNUM = 93, /* Trap Level */
- TT_REGNUM = 94, /* Trap Type */
- TPC_REGNUM = 95, /* Trap pc */
- TNPC_REGNUM = 96, /* Trap npc */
- WSTATE_REGNUM = 97, /* Window State */
- CWP_REGNUM = 98, /* Current Window Pointer */
- CANSAVE_REGNUM = 99, /* Savable Windows */
- CANRESTORE_REGNUM = 100, /* Restorable Windows */
- CLEANWIN_REGNUM = 101, /* Clean Windows */
- OTHERWIN_REGNUM = 102, /* Other Windows */
- ASR16_REGNUM = 103, /* Ancillary State Registers */
- ASR17_REGNUM = 104,
- ASR18_REGNUM = 105,
- ASR19_REGNUM = 106,
- ASR20_REGNUM = 107,
- ASR21_REGNUM = 108,
- ASR22_REGNUM = 109,
- ASR23_REGNUM = 110,
- ASR24_REGNUM = 111,
- ASR25_REGNUM = 112,
- ASR26_REGNUM = 113,
- ASR27_REGNUM = 114,
- ASR28_REGNUM = 115,
- ASR29_REGNUM = 116,
- ASR30_REGNUM = 117,
- ASR31_REGNUM = 118,
- ICC_REGNUM = 119, /* 32 bit condition codes */
- XCC_REGNUM = 120, /* 64 bit condition codes */
- FCC0_REGNUM = 121, /* fp cc reg 0 */
- FCC1_REGNUM = 122, /* fp cc reg 1 */
- FCC2_REGNUM = 123, /* fp cc reg 2 */
- FCC3_REGNUM = 124 /* fp cc reg 3 */
-};
-
-/*
- * Make sparc target multi-archable: April 2000
- */
-
-/* Multi-arch definition of TARGET_IS_SPARC64, TARGET_ELF64 */
-#undef GDB_TARGET_IS_SPARC64
-#define GDB_TARGET_IS_SPARC64 \
- (sparc_intreg_size () == 8)
-#undef TARGET_ELF64
-#define TARGET_ELF64 \
- (sparc_intreg_size () == 8)
-extern int sparc_intreg_size (void);
-
-/*
- * The following defines should ONLY appear for MULTI_ARCH.
- */
-
-/* Multi-arch the nPC and Y registers. */
-#define Y_REGNUM (sparc_y_regnum ())
-
-/* On the Sun 4 under SunOS, the compile will leave a fake insn which
- encodes the structure size being returned. If we detect such
- a fake insn, step past it. */
-
-#define PC_ADJUST(PC) sparc_pc_adjust (PC)
-extern CORE_ADDR sparc_pc_adjust (CORE_ADDR);
-
-/* If an argument is declared "register", Sun cc will keep it in a register,
- never saving it onto the stack. So we better not believe the "p" symbol
- descriptor stab. */
-
-#define USE_REGISTER_NOT_ARG
-
-/* For acc, there's no need to correct LBRAC entries by guessing how
- they should work. In fact, this is harmful because the LBRAC
- entries now all appear at the end of the function, not intermixed
- with the SLINE entries. n_opt_found detects acc for Solaris binaries;
- function_stab_type detects acc for SunOS4 binaries.
-
- For binary from SunOS4 /bin/cc, need to correct LBRAC's.
-
- For gcc, like acc, don't correct. */
-
-#define SUN_FIXED_LBRAC_BUG \
- (n_opt_found \
- || function_stab_type == N_STSYM \
- || function_stab_type == N_GSYM \
- || processing_gcc_compilation)
-
-/* Do variables in the debug stabs occur after the N_LBRAC or before it?
- acc: after, gcc: before, SunOS4 /bin/cc: before. */
-
-#define VARIABLES_INSIDE_BLOCK(desc, gcc_p) \
- (!(gcc_p) \
- && (n_opt_found \
- || function_stab_type == N_STSYM \
- || function_stab_type == N_GSYM))
-
-/* Sequence of bytes for breakpoint instruction (ta 1). */
-
-extern const unsigned char *sparc_breakpoint_from_pc (CORE_ADDR *pc, int *len);
-#define BREAKPOINT_FROM_PC(PC,LEN) sparc_breakpoint_from_pc ((PC), (LEN))
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define G0_REGNUM 0 /* %g0 */
-#define G1_REGNUM 1 /* %g1 */
-#define O0_REGNUM 8 /* %o0 */
-#define RP_REGNUM 15 /* Contains return address value, *before* \
- any windows get switched. */
-#define O7_REGNUM 15 /* Last local reg not saved on stack frame */
-#define L0_REGNUM 16 /* First local reg that's saved on stack frame
- rather than in machine registers */
-#define I0_REGNUM 24 /* %i0 */
-#define I7_REGNUM 31 /* Last local reg saved on stack frame */
-#define PS_REGNUM 65 /* Contains processor status */
-#define PS_FLAG_CARRY 0x100000 /* Carry bit in PS */
-#define WIM_REGNUM 66 /* Window Invalid Mask (not really supported) */
-#define TBR_REGNUM 67 /* Trap Base Register (not really supported) */
-#define FPS_REGNUM 70 /* Floating point status register */
-#define CPS_REGNUM 71 /* Coprocessor status register */
-
-/* Writing to %g0 is a noop (not an error or exception or anything like
- that, however). */
-
-#define CANNOT_STORE_REGISTER(regno) ((regno) == G0_REGNUM)
-
-#define PRINT_EXTRA_FRAME_INFO(FI) \
- sparc_print_extra_frame_info (FI)
-extern void sparc_print_extra_frame_info (struct frame_info *);
-
-/* DEPRECATED_INIT_EXTRA_FRAME_INFO needs the PC to detect flat
- frames. */
-
-/* NOTE: cagney/2002-12-08: Add local declaration of
- init_frame_pc_noop() because it isn't possible to include
- "arch-utils.h" here. */
-extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
-#define DEPRECATED_INIT_FRAME_PC(FROMLEAF, PREV) (init_frame_pc_noop (FROMLEAF, PREV))
-#define DEPRECATED_INIT_FRAME_PC_FIRST(FROMLEAF, PREV) \
- ((FROMLEAF) ? DEPRECATED_SAVED_PC_AFTER_CALL ((PREV)->next) : \
- (PREV)->next ? DEPRECATED_FRAME_SAVED_PC ((PREV)->next) : read_pc ())
-
-/* Define other aspects of the stack frame. */
-
-/* The location of I0 w.r.t SP. This is actually dependent on how the
- system's window overflow/underflow routines are written. Most
- vendors save the L regs followed by the I regs (at the higher
- address). Some vendors get it wrong. */
-
-#define FRAME_SAVED_L0 0
-#define FRAME_SAVED_I0 (8 * REGISTER_RAW_SIZE (L0_REGNUM))
-
-#define FRAME_STRUCT_ARGS_ADDRESS(FI) (get_frame_base (FI))
-
-/* Things needed for making the inferior call functions. */
-/*
- * First of all, let me give my opinion of what the DUMMY_FRAME
- * actually looks like.
- *
- * | |
- * | |
- * + - - - - - - - - - - - - - - - - +<-- fp (level 0)
- * | |
- * | |
- * | |
- * | |
- * | Frame of innermost program |
- * | function |
- * | |
- * | |
- * | |
- * | |
- * | |
- * |---------------------------------|<-- sp (level 0), fp (c)
- * | |
- * DUMMY | fp0-31 |
- * | |
- * | ------ |<-- fp - 0x80
- * FRAME | g0-7 |<-- fp - 0xa0
- * | i0-7 |<-- fp - 0xc0
- * | other |<-- fp - 0xe0
- * | ? |
- * | ? |
- * |---------------------------------|<-- sp' = fp - 0x140
- * | |
- * xcution start | |
- * sp' + 0x94 -->| CALL_DUMMY (x code) |
- * | |
- * | |
- * |---------------------------------|<-- sp'' = fp - 0x200
- * | align sp to 8 byte boundary |
- * | ==> args to fn <== |
- * Room for | |
- * i & l's + agg | CALL_DUMMY_STACK_ADJUST = 0x0x44|
- * |---------------------------------|<-- final sp (variable)
- * | |
- * | Where function called will |
- * | build frame. |
- * | |
- * | |
- *
- * I understand everything in this picture except what the space
- * between fp - 0xe0 and fp - 0x140 is used for. Oh, and I don't
- * understand why there's a large chunk of CALL_DUMMY that never gets
- * executed (its function is superceeded by
- * DEPRECATED_PUSH_DUMMY_FRAME; they are designed to do the same
- * thing).
- *
- * DEPRECATED_PUSH_DUMMY_FRAME saves the registers above sp' and
- * pushes the * register file stack down one.
- *
- * call_function then writes CALL_DUMMY, pushes the args onto the
- * stack, and adjusts the stack pointer.
-
- call_function_by_hand then starts execution (in the middle of
- CALL_DUMMY, as directed by call_function). */
-
-#ifndef CALL_DUMMY
-/* This sequence of words is the instructions
-
- 00: bc 10 00 01 mov %g1, %fp
- 04: 9d e3 80 00 save %sp, %g0, %sp
- 08: bc 10 00 02 mov %g2, %fp
- 0c: be 10 00 03 mov %g3, %i7
- 10: da 03 a0 58 ld [ %sp + 0x58 ], %o5
- 14: d8 03 a0 54 ld [ %sp + 0x54 ], %o4
- 18: d6 03 a0 50 ld [ %sp + 0x50 ], %o3
- 1c: d4 03 a0 4c ld [ %sp + 0x4c ], %o2
- 20: d2 03 a0 48 ld [ %sp + 0x48 ], %o1
- 24: 40 00 00 00 call <fun>
- 28: d0 03 a0 44 ld [ %sp + 0x44 ], %o0
- 2c: 01 00 00 00 nop
- 30: 91 d0 20 01 ta 1
- 34: 01 00 00 00 nop
-
- NOTES:
- * the first four instructions are necessary only on the simulator.
- * this is a multiple of 8 (not only 4) bytes.
- * the `call' insn is a relative, not an absolute call.
- * the `nop' at the end is needed to keep the trap from
- clobbering things (if NPC pointed to garbage instead).
- */
-
-#endif /* CALL_DUMMY */
-
-/* Sparc has no reliable single step ptrace call */
-
-#define SOFTWARE_SINGLE_STEP_P() 1
-extern void sparc_software_single_step (enum target_signal, int);
-#define SOFTWARE_SINGLE_STEP(sig,bp_p) sparc_software_single_step (sig,bp_p)
-
-/* We need more arguments in a frame specification for the
- "frame" or "info frame" command. */
-
-#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
-extern struct frame_info *setup_arbitrary_frame (int, CORE_ADDR *);
-
-extern void sparc_do_registers_info (int regnum, int all);
-#undef DEPRECATED_DO_REGISTERS_INFO
-#define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) sparc_do_registers_info (REGNUM, ALL)
-
-/* Optimization for storing registers to the inferior. The hook
- DO_DEFERRED_STORES
- actually executes any deferred stores. It is called any time
- we are going to proceed the child, or read its registers.
- The hook CLEAR_DEFERRED_STORES is called when we want to throw
- away the inferior process, e.g. when it dies or we kill it.
- FIXME, this does not handle remote debugging cleanly. */
-
-extern int deferred_stores;
-#define DO_DEFERRED_STORES \
- if (deferred_stores) \
- target_store_registers (-2);
-#define CLEAR_DEFERRED_STORES \
- deferred_stores = 0;
-
-/* Select the sparc disassembler */
-
-#define TM_PRINT_INSN_MACH bfd_mach_sparc
-
-#define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED 1
diff --git a/gdb/config/sparc/tm-sparclet.h b/gdb/config/sparc/tm-sparclet.h
deleted file mode 100644
index 95bdeea6884..00000000000
--- a/gdb/config/sparc/tm-sparclet.h
+++ /dev/null
@@ -1,158 +0,0 @@
-// OBSOLETE /* Target machine definitions for GDB for an embedded SPARC.
-// OBSOLETE Copyright 1996, 1997, 2000 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE #define TARGET_SPARCLET 1 /* Still needed for non-multi-arch case */
-// OBSOLETE
-// OBSOLETE #include "sparc/tm-sparc.h"
-// OBSOLETE
-// OBSOLETE /* Note: we are not defining GDB_MULTI_ARCH for the sparclet target
-// OBSOLETE at this time, because we have not figured out how to detect the
-// OBSOLETE sparclet target from the bfd structure. */
-// OBSOLETE
-// OBSOLETE /* Sparclet regs, for debugging purposes. */
-// OBSOLETE
-// OBSOLETE enum {
-// OBSOLETE CCSR_REGNUM = 72,
-// OBSOLETE CCPR_REGNUM = 73,
-// OBSOLETE CCCRCR_REGNUM = 74,
-// OBSOLETE CCOR_REGNUM = 75,
-// OBSOLETE CCOBR_REGNUM = 76,
-// OBSOLETE CCIBR_REGNUM = 77,
-// OBSOLETE CCIR_REGNUM = 78
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* Select the sparclet disassembler. Slightly different instruction set from
-// OBSOLETE the V8 sparc. */
-// OBSOLETE
-// OBSOLETE #undef TM_PRINT_INSN_MACH
-// OBSOLETE #define TM_PRINT_INSN_MACH bfd_mach_sparc_sparclet
-// OBSOLETE
-// OBSOLETE /* overrides of tm-sparc.h */
-// OBSOLETE
-// OBSOLETE #undef TARGET_BYTE_ORDER
-// OBSOLETE
-// OBSOLETE /* Sequence of bytes for breakpoint instruction (ta 1). */
-// OBSOLETE #undef BREAKPOINT
-// OBSOLETE #define BIG_BREAKPOINT {0x91, 0xd0, 0x20, 0x01}
-// OBSOLETE #define LITTLE_BREAKPOINT {0x01, 0x20, 0xd0, 0x91}
-// OBSOLETE
-// OBSOLETE #if !defined (GDB_MULTI_ARCH) || (GDB_MULTI_ARCH == 0)
-// OBSOLETE /*
-// OBSOLETE * The following defines must go away for MULTI_ARCH.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #undef NUM_REGS /* formerly "72" */
-// OBSOLETE /* WIN FP CPU CCP ASR AWR APSR */
-// OBSOLETE #define NUM_REGS (32 + 32 + 8 + 8 + 8/*+ 32 + 1*/)
-// OBSOLETE
-// OBSOLETE #undef REGISTER_BYTES /* formerly "(32*4 + 32*4 + 8*4)" */
-// OBSOLETE #define REGISTER_BYTES (32*4 + 32*4 + 8*4 + 8*4 + 8*4/* + 32*4 + 1*4*/)
-// OBSOLETE
-// OBSOLETE /* Initializer for an array of names of registers.
-// OBSOLETE There should be NUM_REGS strings in this initializer. */
-// OBSOLETE /* Sparclet has no fp! */
-// OBSOLETE /* Compiler maps types for floats by number, so can't
-// OBSOLETE change the numbers here. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_NAMES
-// OBSOLETE #define REGISTER_NAMES \
-// OBSOLETE { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
-// OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7", \
-// OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \
-// OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", \
-// OBSOLETE \
-// OBSOLETE "", "", "", "", "", "", "", "", /* no FPU regs */ \
-// OBSOLETE "", "", "", "", "", "", "", "", \
-// OBSOLETE "", "", "", "", "", "", "", "", \
-// OBSOLETE "", "", "", "", "", "", "", "", \
-// OBSOLETE /* no CPSR, FPSR */ \
-// OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "", "", \
-// OBSOLETE \
-// OBSOLETE "ccsr", "ccpr", "cccrcr", "ccor", "ccobr", "ccibr", "ccir", "", \
-// OBSOLETE \
-// OBSOLETE /* ASR15 ASR19 (don't display them) */ \
-// OBSOLETE "asr1", "", "asr17", "asr18", "", "asr20", "asr21", "asr22", \
-// OBSOLETE /* \
-// OBSOLETE "awr0", "awr1", "awr2", "awr3", "awr4", "awr5", "awr6", "awr7", \
-// OBSOLETE "awr8", "awr9", "awr10", "awr11", "awr12", "awr13", "awr14", "awr15", \
-// OBSOLETE "awr16", "awr17", "awr18", "awr19", "awr20", "awr21", "awr22", "awr23", \
-// OBSOLETE "awr24", "awr25", "awr26", "awr27", "awr28", "awr29", "awr30", "awr31", \
-// OBSOLETE "apsr", \
-// OBSOLETE */ \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Remove FP dependant code which was defined in tm-sparc.h */
-// OBSOLETE #undef FP0_REGNUM /* Floating point register 0 */
-// OBSOLETE #undef FPS_REGNUM /* Floating point status register */
-// OBSOLETE #undef CPS_REGNUM /* Coprocessor status register */
-// OBSOLETE
-// OBSOLETE /* sparclet register numbers */
-// OBSOLETE #define CCSR_REGNUM 72
-// OBSOLETE
-// OBSOLETE #undef DEPRECATED_EXTRACT_RETURN_VALUE
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-// OBSOLETE { \
-// OBSOLETE memcpy ((VALBUF), \
-// OBSOLETE (char *)(REGBUF) + REGISTER_RAW_SIZE (O0_REGNUM) * 8 + \
-// OBSOLETE (TYPE_LENGTH(TYPE) >= REGISTER_RAW_SIZE (O0_REGNUM) \
-// OBSOLETE ? 0 : REGISTER_RAW_SIZE (O0_REGNUM) - TYPE_LENGTH(TYPE)), \
-// OBSOLETE TYPE_LENGTH(TYPE)); \
-// OBSOLETE }
-// OBSOLETE #undef DEPRECATED_STORE_RETURN_VALUE
-// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
-// OBSOLETE { \
-// OBSOLETE /* Other values are returned in register %o0. */ \
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), (VALBUF), \
-// OBSOLETE TYPE_LENGTH (TYPE)); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #endif /* GDB_MULTI_ARCH */
-// OBSOLETE
-// OBSOLETE extern void sparclet_do_registers_info (int regnum, int all);
-// OBSOLETE #undef DEPRECATED_DO_REGISTERS_INFO
-// OBSOLETE #define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) sparclet_do_registers_info (REGNUM, ALL)
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
-// OBSOLETE comment in <machine/setjmp.h>! */
-// OBSOLETE
-// OBSOLETE #define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */
-// OBSOLETE
-// OBSOLETE #define JB_ONSSTACK 0
-// OBSOLETE #define JB_SIGMASK 1
-// OBSOLETE #define JB_SP 2
-// OBSOLETE #define JB_PC 3
-// OBSOLETE #define JB_NPC 4
-// OBSOLETE #define JB_PSR 5
-// OBSOLETE #define JB_G1 6
-// OBSOLETE #define JB_O0 7
-// OBSOLETE #define JB_WBCNT 8
-// OBSOLETE
-// OBSOLETE /* Figure out where the longjmp will land. We expect that we have just entered
-// OBSOLETE longjmp and haven't yet setup the stack frame, so the args are still in the
-// OBSOLETE output regs. %o0 (O0_REGNUM) points at the jmp_buf structure from which we
-// OBSOLETE extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
-// OBSOLETE This routine returns true on success */
-// OBSOLETE
-// OBSOLETE extern int get_longjmp_target (CORE_ADDR *);
-// OBSOLETE
-// OBSOLETE #define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
diff --git a/gdb/config/sparc/tm-sparclite.h b/gdb/config/sparc/tm-sparclite.h
deleted file mode 100644
index bd8996b7373..00000000000
--- a/gdb/config/sparc/tm-sparclite.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// OBSOLETE /* Macro definitions for GDB for a Fujitsu SPARClite.
-// OBSOLETE Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE #define TARGET_SPARCLITE 1 /* Still needed for non-multi-arch case */
-// OBSOLETE
-// OBSOLETE #include "sparc/tm-sparc.h"
-// OBSOLETE
-// OBSOLETE /* Note: we are not defining GDB_MULTI_ARCH for the sparclet target
-// OBSOLETE at this time, because we have not figured out how to detect the
-// OBSOLETE sparclet target from the bfd structure. */
-// OBSOLETE
-// OBSOLETE /* Sparclite regs, for debugging purposes */
-// OBSOLETE
-// OBSOLETE enum {
-// OBSOLETE DIA1_REGNUM = 72, /* debug instr address register 1 */
-// OBSOLETE DIA2_REGNUM = 73, /* debug instr address register 2 */
-// OBSOLETE DDA1_REGNUM = 74, /* debug data address register 1 */
-// OBSOLETE DDA2_REGNUM = 75, /* debug data address register 2 */
-// OBSOLETE DDV1_REGNUM = 76, /* debug data value register 1 */
-// OBSOLETE DDV2_REGNUM = 77, /* debug data value register 2 */
-// OBSOLETE DCR_REGNUM = 78, /* debug control register */
-// OBSOLETE DSR_REGNUM = 79 /* debug status regsiter */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* overrides of tm-sparc.h */
-// OBSOLETE
-// OBSOLETE #undef TARGET_BYTE_ORDER
-// OBSOLETE
-// OBSOLETE /* Select the sparclite disassembler. Slightly different instruction set from
-// OBSOLETE the V8 sparc. */
-// OBSOLETE
-// OBSOLETE #undef TM_PRINT_INSN_MACH
-// OBSOLETE #define TM_PRINT_INSN_MACH bfd_mach_sparc_sparclite
-// OBSOLETE
-// OBSOLETE /* Amount PC must be decremented by after a hardware instruction breakpoint.
-// OBSOLETE This is often the number of bytes in BREAKPOINT
-// OBSOLETE but not always. */
-// OBSOLETE
-// OBSOLETE #define DECR_PC_AFTER_HW_BREAK 4
-// OBSOLETE
-// OBSOLETE #if !defined (GDB_MULTI_ARCH) || (GDB_MULTI_ARCH == 0)
-// OBSOLETE /*
-// OBSOLETE * The following defines must go away for MULTI_ARCH.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #undef NUM_REGS
-// OBSOLETE #define NUM_REGS 80
-// OBSOLETE
-// OBSOLETE #undef REGISTER_BYTES
-// OBSOLETE #define REGISTER_BYTES (32*4+32*4+8*4+8*4)
-// OBSOLETE
-// OBSOLETE #undef REGISTER_NAMES
-// OBSOLETE #define REGISTER_NAMES \
-// OBSOLETE { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
-// OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7", \
-// OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \
-// OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7", \
-// OBSOLETE \
-// OBSOLETE "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
-// OBSOLETE "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
-// OBSOLETE "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
-// OBSOLETE "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
-// OBSOLETE \
-// OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr", \
-// OBSOLETE "dia1", "dia2", "dda1", "dda2", "ddv1", "ddv2", "dcr", "dsr" }
-// OBSOLETE
-// OBSOLETE #define DIA1_REGNUM 72 /* debug instr address register 1 */
-// OBSOLETE #define DIA2_REGNUM 73 /* debug instr address register 2 */
-// OBSOLETE #define DDA1_REGNUM 74 /* debug data address register 1 */
-// OBSOLETE #define DDA2_REGNUM 75 /* debug data address register 2 */
-// OBSOLETE #define DDV1_REGNUM 76 /* debug data value register 1 */
-// OBSOLETE #define DDV2_REGNUM 77 /* debug data value register 2 */
-// OBSOLETE #define DCR_REGNUM 78 /* debug control register */
-// OBSOLETE #define DSR_REGNUM 79 /* debug status regsiter */
-// OBSOLETE
-// OBSOLETE #endif /* GDB_MULTI_ARCH */
-// OBSOLETE
-// OBSOLETE #define TARGET_HW_BREAK_LIMIT 2
-// OBSOLETE #define TARGET_HW_WATCH_LIMIT 2
-// OBSOLETE
-// OBSOLETE /* Enable watchpoint macro's */
-// OBSOLETE
-// OBSOLETE #define TARGET_HAS_HARDWARE_WATCHPOINTS
-// OBSOLETE
-// OBSOLETE #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
-// OBSOLETE sparclite_check_watch_resources (type, cnt, ot)
-// OBSOLETE
-// OBSOLETE /* When a hardware watchpoint fires off the PC will be left at the
-// OBSOLETE instruction which caused the watchpoint. It will be necessary for
-// OBSOLETE GDB to step over the watchpoint. ***
-// OBSOLETE
-// OBSOLETE #define STOPPED_BY_WATCHPOINT(W) \
-// OBSOLETE ((W).kind == TARGET_WAITKIND_STOPPED \
-// OBSOLETE && (W).value.sig == TARGET_SIGNAL_TRAP \
-// OBSOLETE && ((int) read_register (IPSW_REGNUM) & 0x00100000))
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Use these macros for watchpoint insertion/deletion. */
-// OBSOLETE #define target_insert_watchpoint(addr, len, type) sparclite_insert_watchpoint (addr, len, type)
-// OBSOLETE #define target_remove_watchpoint(addr, len, type) sparclite_remove_watchpoint (addr, len, type)
-// OBSOLETE #define target_insert_hw_breakpoint(addr, len) sparclite_insert_hw_breakpoint (addr, len)
-// OBSOLETE #define target_remove_hw_breakpoint(addr, len) sparclite_remove_hw_breakpoint (addr, len)
-// OBSOLETE #define target_stopped_data_address() sparclite_stopped_data_address()
diff --git a/gdb/config/sparc/tm-sparclynx.h b/gdb/config/sparc/tm-sparclynx.h
deleted file mode 100644
index 3d196539beb..00000000000
--- a/gdb/config/sparc/tm-sparclynx.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Macro definitions for Sparc running under LynxOS.
- 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 TM_SPARCLYNX_H
-#define TM_SPARCLYNX_H
-
-#include "config/tm-lynx.h"
-
-/* Use generic Sparc definitions. */
-#include "sparc/tm-sparc.h"
-
-/* Lynx does this backwards from everybody else */
-
-#undef FRAME_SAVED_I0
-#undef FRAME_SAVED_L0
-
-#define FRAME_SAVED_I0 0
-#define FRAME_SAVED_L0 (8 * REGISTER_RAW_SIZE (I0_REGNUM))
-
-#endif /* TM_SPARCLYNX_H */
diff --git a/gdb/config/sparc/tm-spc-em.h b/gdb/config/sparc/tm-spc-em.h
deleted file mode 100644
index 760e7a4258a..00000000000
--- a/gdb/config/sparc/tm-spc-em.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Target machine definitions for GDB for an embedded SPARC.
- Copyright 1989, 1992, 1993, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "sparc/tm-sparc.h"
-
-/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
- comment in <machine/setjmp.h>! */
-
-#define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */
-
-#define JB_ONSSTACK 0
-#define JB_SIGMASK 1
-#define JB_SP 2
-#define JB_PC 3
-#define JB_NPC 4
-#define JB_PSR 5
-#define JB_G1 6
-#define JB_O0 7
-#define JB_WBCNT 8
-
-/* Figure out where the longjmp will land. We expect that we have just entered
- longjmp and haven't yet setup the stack frame, so the args are still in the
- output regs. %o0 (O0_REGNUM) points at the jmp_buf structure from which we
- extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-extern int get_longjmp_target (CORE_ADDR *);
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
diff --git a/gdb/config/sparc/tm-sun4os4.h b/gdb/config/sparc/tm-sun4os4.h
deleted file mode 100644
index e080904d927..00000000000
--- a/gdb/config/sparc/tm-sun4os4.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Macro definitions for GDB for a Sun 4 running sunos 4.
- Copyright 1989, 1992, 1994, 1995, 1998, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "sparc/tm-sparc.h"
-#include "config/tm-sunos.h"
-
-/* Redefine SKIP_TRAMPOLINE_CODE to handle PIC compiled modules
- in main executables. */
-
-#undef SKIP_TRAMPOLINE_CODE
-#define SKIP_TRAMPOLINE_CODE(pc) sunos4_skip_trampoline_code (pc)
-extern CORE_ADDR sunos4_skip_trampoline_code (CORE_ADDR);
-
-/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
- comment in <machine/setjmp.h>! */
-
-#define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */
-
-#define JB_ONSSTACK 0
-#define JB_SIGMASK 1
-#define JB_SP 2
-#define JB_PC 3
-#define JB_NPC 4
-#define JB_PSR 5
-#define JB_G1 6
-#define JB_O0 7
-#define JB_WBCNT 8
-
-/* Figure out where the longjmp will land. We expect that we have just entered
- longjmp and haven't yet setup the stack frame, so the args are still in the
- output regs. %o0 (O0_REGNUM) points at the jmp_buf structure from which we
- extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-extern int get_longjmp_target (CORE_ADDR *);
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-
-extern char *sunpro_static_transform_name (char *);
-#define STATIC_TRANSFORM_NAME(x) sunpro_static_transform_name (x)
-#define IS_STATIC_TRANSFORM_NAME(name) ((name)[0] == '$')
diff --git a/gdb/config/sparc/tm-sun4sol2.h b/gdb/config/sparc/tm-sun4sol2.h
deleted file mode 100644
index 506e9370de6..00000000000
--- a/gdb/config/sparc/tm-sun4sol2.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Macro definitions for GDB for a Sun 4 running Solaris 2
- Copyright 1989, 1992, 1993, 1994, 1995, 1996, 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 "sparc/tm-sparc.h"
-#include "config/tm-sysv4.h"
-
-/* With Sol2 it is no longer necessary to enable software single-step,
- since the /proc interface can take care of it for us in hardware. */
-#undef SOFTWARE_SINGLE_STEP
-#undef SOFTWARE_SINGLE_STEP_P
-
-/* There are two different signal handler trampolines in Solaris2. */
-#define IN_SIGTRAMP(pc, name) \
- ((name) \
- && (STREQ ("sigacthandler", name) || STREQ ("ucbsigvechandler", name)))
-
-/* The signal handler gets a pointer to an ucontext as third argument
- if it is called from sigacthandler. This is the offset to the saved
- PC within it. sparc_frame_saved_pc knows how to deal with
- ucbsigvechandler. */
-#define SIGCONTEXT_PC_OFFSET 44
-
-#if 0 /* FIXME Setjmp/longjmp are not as well doc'd in SunOS 5.x yet */
-
-/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
- comment in <machine/setjmp.h>! */
-
-#define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */
-
-#define JB_ONSSTACK 0
-#define JB_SIGMASK 1
-#define JB_SP 2
-#define JB_PC 3
-#define JB_NPC 4
-#define JB_PSR 5
-#define JB_G1 6
-#define JB_O0 7
-#define JB_WBCNT 8
-
-/* Figure out where the longjmp will land. We expect that we have just entered
- longjmp and haven't yet setup the stack frame, so the args are still in the
- output regs. %o0 (O0_REGNUM) points at the jmp_buf structure from which we
- extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-extern int get_longjmp_target (CORE_ADDR *);
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-#endif /* 0 */
-
-/* The SunPRO compiler puts out 0 instead of the address in N_SO symbols,
- and for SunPRO 3.0, N_FUN symbols too. */
-#define SOFUN_ADDRESS_MAYBE_MISSING
-
-extern char *sunpro_static_transform_name (char *);
-#define STATIC_TRANSFORM_NAME(x) sunpro_static_transform_name (x)
-#define IS_STATIC_TRANSFORM_NAME(name) ((name)[0] == '$')
-
-#define FAULTED_USE_SIGINFO
-
-/* Enable handling of shared libraries for a.out executables. */
-#define HANDLE_SVR4_EXEC_EMULATORS
diff --git a/gdb/config/sparc/tm-vxsparc.h b/gdb/config/sparc/tm-vxsparc.h
deleted file mode 100644
index f32f70daf73..00000000000
--- a/gdb/config/sparc/tm-vxsparc.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Target machine description for VxWorks sparc's, for GDB, the GNU debugger.
- Copyright 1993, 1999 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. */
-
-#include "sparc/tm-spc-em.h"
-#include "config/tm-vxworks.h"
-
-/* FIXME: These are almost certainly wrong. */
-
-/* Number of registers in a ptrace_getregs call. */
-
-#define VX_NUM_REGS (NUM_REGS)
-
-/* Number of registers in a ptrace_getfpregs call. */
-
-/* #define VX_SIZE_FPREGS (don't know how many) */
diff --git a/gdb/config/mips/tm-linux64.h b/gdb/config/sparc/tm-vxworks.h
index 92226d7fe4a..7b0474847c6 100644
--- a/gdb/config/mips/tm-linux64.h
+++ b/gdb/config/sparc/tm-vxworks.h
@@ -1,6 +1,7 @@
-/* Target-dependent definitions for 64-bit GNU/Linux MIPS.
+/* Target-dependent defenitions for VxWorks SPARC.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 1993, 1999, 2004 Free Software Foundation, Inc.
+ Contributed by Cygnus Support.
This file is part of GDB.
@@ -19,10 +20,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef TM_MIPS64LINUX_H
-#define TM_MIPS64LINUX_H
+#ifndef TM_VXWORKS_H
+#define TM_VXWORKS_H
-#include "mips/tm-mips64.h"
-#include "mips/tm-linux.h"
+#define GDB_MULTI_ARCH GDB_MULTI_ARCH_TM
-#endif /* TM_MIPS64LINUX_H */
+/* Get generic VxWorks definitions. */
+#include "config/tm-vxworks.h"
+
+#endif /* tm-vxworks.h */
diff --git a/gdb/config/sparc/vxsparc.mt b/gdb/config/sparc/vxsparc.mt
deleted file mode 100644
index 9eadd17451d..00000000000
--- a/gdb/config/sparc/vxsparc.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: SPARC running VxWorks
-TDEPFILES= sparc-tdep.o remote-vx.o remote-vxsparc.o xdr_ld.o xdr_ptrace.o xdr_rdb.o
-TM_FILE= tm-vxsparc.h
diff --git a/gdb/config/sparc/vxworks.mt b/gdb/config/sparc/vxworks.mt
new file mode 100644
index 00000000000..175f92ed981
--- /dev/null
+++ b/gdb/config/sparc/vxworks.mt
@@ -0,0 +1,4 @@
+# Target: VxWorks SPARC
+TDEPFILES= sparc-tdep.o \
+ remote-vx.o remote-vxsparc.o xdr_ld.o xdr_ptrace.o xdr_rdb.o
+TM_FILE= tm-vxworks.h
diff --git a/gdb/config/sparc/xm-linux.h b/gdb/config/sparc/xm-linux.h
deleted file mode 100644
index b0518e650e9..00000000000
--- a/gdb/config/sparc/xm-linux.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Macro definitions for running gdb on a Sparc running GNU/Linux.
-
- Copyright 1989, 1993, 1994, 1995, 1996, 1998, 2001, 2002 Free
- Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef XM_SPARCLINUX_H
-#define XM_SPARCLINUX_H
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-#define KERNEL_U_ADDR 0x0
-
-#define U_REGS_OFFSET 0
-
-/* If you expect to use the mmalloc package to obtain mapped symbol files,
- for now you have to specify some parameters that determine how gdb places
- the mappings in it's address space. See the comments in map_to_address()
- for details. This is expected to only be a short term solution. Yes it
- is a kludge.
- FIXME: Make this more automatic. */
-
-#define MMAP_BASE_ADDRESS 0xE0000000 /* First mapping here */
-#define MMAP_INCREMENT 0x01000000 /* Increment to next mapping */
-
-#endif /* _XM_SPARCLINUX_H */
diff --git a/gdb/config/sparc/xm-sun4sol2.h b/gdb/config/sparc/xm-sun4sol2.h
deleted file mode 100644
index 490962d4495..00000000000
--- a/gdb/config/sparc/xm-sun4sol2.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Macro definitions for running gdb on a Sun 4 running Solaris 2.
- Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1998, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Pick up more stuff from the generic SVR4 host include file. */
-
-#include "config/xm-sysv4.h"
-
-/* These are not currently used in SVR4 (but should be, FIXME!). */
-#undef DO_DEFERRED_STORES
-#undef CLEAR_DEFERRED_STORES
-
-/* solaris doesn't have siginterrupt, though it has sigaction; however,
- in this case siginterrupt would just be setting the default. */
-#define NO_SIGINTERRUPT
-
-/* On sol2.7, <curses.h> emits a bunch of 'macro redefined'
- warnings, which makes autoconf think curses.h doesn't
- exist. Compensate for that here. */
-#define HAVE_CURSES_H 1
diff --git a/gdb/config/tm-lynx.h b/gdb/config/tm-lynx.h
index 13aeca1c3f7..7fbc06f01b3 100644
--- a/gdb/config/tm-lynx.h
+++ b/gdb/config/tm-lynx.h
@@ -21,9 +21,6 @@
#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
diff --git a/gdb/config/vax/tm-vaxbsd.h b/gdb/config/vax/tm-vaxbsd.h
index e24049a6ec6..aa34107e02d 100644
--- a/gdb/config/vax/tm-vaxbsd.h
+++ b/gdb/config/vax/tm-vaxbsd.h
@@ -22,8 +22,6 @@
#ifndef TM_VAXBSD_H
#define TM_VAXBSD_H
-#include "vax/tm-vax.h"
-
#define TARGET_UPAGES 14
#define TARGET_NBPG 512
#define STACK_END_ADDR (0x80000000 - (TARGET_UPAGES * TARGET_NBPG))
@@ -34,8 +32,4 @@
#define SIGTRAMP_START(pc) STACK_END_ADDR
#define SIGTRAMP_END(pc) 0x80000000
-/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
-/* XXXJRT should go away */
-#define SIGCONTEXT_PC_OFFSET 12
-
#endif /* TM_VAXBSD_H */
diff --git a/gdb/config/z8k/tm-z8k.h b/gdb/config/z8k/tm-z8k.h
deleted file mode 100644
index 59b6ecbad7b..00000000000
--- a/gdb/config/z8k/tm-z8k.h
+++ /dev/null
@@ -1,292 +0,0 @@
-// OBSOLETE /* Parameters for execution on a z8000 series machine.
-// OBSOLETE
-// OBSOLETE Copyright 1992, 1993, 1994, 1998, 1999, 2000, 2001, 2002 Free
-// OBSOLETE Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE This file is part of GDB.
-// OBSOLETE
-// OBSOLETE This program is free software; you can redistribute it and/or modify
-// OBSOLETE it under the terms of the GNU General Public License as published by
-// OBSOLETE the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE (at your option) any later version.
-// OBSOLETE
-// OBSOLETE This program is distributed in the hope that it will be useful,
-// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// OBSOLETE GNU General Public License for more details.
-// OBSOLETE
-// OBSOLETE You should have received a copy of the GNU General Public License
-// OBSOLETE along with this program; if not, write to the Free Software
-// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE Boston, MA 02111-1307, USA. */
-// OBSOLETE
-// OBSOLETE /* NOTE: cagney/2002-11-24: This is a guess. */
-// OBSOLETE #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 0
-// OBSOLETE #define CALL_DUMMY_LOCATION ON_STACK
-// OBSOLETE #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
-// OBSOLETE
-// OBSOLETE #undef TARGET_INT_BIT
-// OBSOLETE #undef TARGET_LONG_BIT
-// OBSOLETE #undef TARGET_SHORT_BIT
-// OBSOLETE #undef TARGET_PTR_BIT
-// OBSOLETE
-// OBSOLETE #define TARGET_SHORT_BIT 16
-// OBSOLETE #define TARGET_INT_BIT 16
-// OBSOLETE #define TARGET_LONG_BIT 32
-// OBSOLETE #define TARGET_PTR_BIT (BIG ? 32: 16)
-// OBSOLETE
-// OBSOLETE /* Offset from address of function to start of its code.
-// OBSOLETE Zero on most machines. */
-// OBSOLETE
-// OBSOLETE #define FUNCTION_START_OFFSET 0
-// OBSOLETE
-// OBSOLETE /* Advance PC across any function entry prologue instructions
-// OBSOLETE to reach some "real" code. */
-// OBSOLETE
-// OBSOLETE #define SKIP_PROLOGUE(ip) (z8k_skip_prologue (ip))
-// OBSOLETE extern CORE_ADDR z8k_skip_prologue (CORE_ADDR ip);
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Immediately after a function call, return the saved pc.
-// OBSOLETE Can't always go through the frames for this because on some machines
-// OBSOLETE the new frame is not set up until the new function executes
-// OBSOLETE some instructions. */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE extern int z8k_saved_pc_after_call (struct frame_info *frame);
-// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) z8k_saved_pc_after_call(frame)
-// OBSOLETE
-// OBSOLETE /* Stack grows downward. */
-// OBSOLETE
-// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-// OBSOLETE
-// OBSOLETE /* Sequence of bytes for breakpoint instruction. */
-// OBSOLETE
-// OBSOLETE #define BREAKPOINT {0x36,0x00}
-// OBSOLETE
-// OBSOLETE /* If your kernel resets the pc after the trap happens you may need to
-// OBSOLETE define this before including this file. */
-// OBSOLETE
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE
-// OBSOLETE /* Say how long registers are. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_TYPE unsigned int
-// OBSOLETE
-// OBSOLETE #define NUM_REGS 23 /* 16 registers + 1 ccr + 1 pc + 3 debug
-// OBSOLETE regs + fake fp + fake sp */
-// OBSOLETE #define REGISTER_BYTES (NUM_REGS *4)
-// OBSOLETE
-// OBSOLETE /* Index within `registers' of the first byte of the space for
-// OBSOLETE register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_BYTE(N) ((N)*4)
-// OBSOLETE
-// OBSOLETE /* Number of bytes of storage in the actual machine representation
-// OBSOLETE for register N. On the z8k, all but the pc are 2 bytes, but we
-// OBSOLETE keep them all as 4 bytes and trim them on I/O */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE #define REGISTER_RAW_SIZE(N) (((N) < 16)? 2:4)
-// OBSOLETE
-// OBSOLETE /* Number of bytes of storage in the program's representation
-// OBSOLETE for register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
-// OBSOLETE
-// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_RAW_SIZE 4
-// OBSOLETE
-// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. */
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4
-// OBSOLETE
-// OBSOLETE /* Return the GDB type object for the "standard" data type
-// OBSOLETE of data in register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \
-// OBSOLETE (REGISTER_VIRTUAL_SIZE(N) == 2? builtin_type_unsigned_int : builtin_type_long)
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_INIT_FRAME_PC(x,y) (init_frame_pc_noop (x, y))
-// OBSOLETE #define INIT_FRAME_PC_FIRST(x,y) (init_frame_pc_noop (x, y))
-// OBSOLETE
-// OBSOLETE #define REGISTER_NAMES \
-// OBSOLETE {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
-// OBSOLETE "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
-// OBSOLETE "ccr", "pc", "cycles","insts","time","fp","sp"}
-// OBSOLETE
-// OBSOLETE /* Register numbers of various important registers.
-// OBSOLETE Note that some of these values are "real" register numbers,
-// OBSOLETE and correspond to the general registers of the machine,
-// OBSOLETE and some are "phony" register numbers which are too large
-// OBSOLETE to be actual register numbers as far as the user is concerned
-// OBSOLETE but do serve to get the desired values when passed to read_register. */
-// OBSOLETE
-// OBSOLETE #define CCR_REGNUM 16 /* Contains processor status */
-// OBSOLETE #define PC_REGNUM 17 /* Contains program counter */
-// OBSOLETE #define CYCLES_REGNUM 18
-// OBSOLETE #define INSTS_REGNUM 19
-// OBSOLETE #define TIME_REGNUM 20
-// OBSOLETE #define FP_REGNUM 21 /* Contains fp, whatever memory model */
-// OBSOLETE #define SP_REGNUM 22 /* Conatins sp, whatever memory model */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE #define PTR_SIZE (BIG ? 4: 2)
-// OBSOLETE #define PTR_MASK (BIG ? 0xff00ffff : 0x0000ffff)
-// OBSOLETE
-// OBSOLETE /* Store the address of the place in which to copy the structure the
-// OBSOLETE subroutine will return. This is called from call_function. */
-// OBSOLETE
-// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// OBSOLETE
-// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
-// OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
-// OBSOLETE into VALBUF. This is assuming that floating point values are returned
-// OBSOLETE as doubles in d0/d1. */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-// OBSOLETE memcpy(VALBUF, REGBUF + REGISTER_BYTE(2), TYPE_LENGTH(TYPE));
-// OBSOLETE
-// OBSOLETE /* Write into appropriate registers a function return value
-// OBSOLETE of type TYPE, given in virtual format. */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// OBSOLETE
-// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
-// OBSOLETE the address in which a function should return its structure value,
-// OBSOLETE as a CORE_ADDR (or an expression that can be used as one). */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
-// OBSOLETE
-// OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame
-// OBSOLETE (its caller). */
-// OBSOLETE
-// OBSOLETE /* FRAME_CHAIN takes a frame's nominal address and produces the frame's
-// OBSOLETE chain-pointer.
-// OBSOLETE In the case of the Z8000, the frame's nominal address
-// OBSOLETE is the address of a ptr sized byte word containing the calling
-// OBSOLETE frame's address. */
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR z8k_frame_chain (struct frame_info *thisframe);
-// OBSOLETE #define FRAME_CHAIN(thisframe) z8k_frame_chain(thisframe);
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Define other aspects of the stack frame. */
-// OBSOLETE
-// OBSOLETE /* A macro that tells us whether the function invocation represented
-// OBSOLETE by FI does not have a frame on the stack associated with it. If it
-// OBSOLETE does not, FRAMELESS is set to 1, else 0. */
-// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \
-// OBSOLETE (frameless_look_for_prologue (FI))
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR z8k_frame_saved_pc (struct frame_info *frame);
-// OBSOLETE #define FRAME_SAVED_PC(FRAME) z8k_frame_saved_pc(FRAME)
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-// OBSOLETE
-// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-// OBSOLETE
-// OBSOLETE /* Set VAL to the number of args passed to frame described by FI.
-// OBSOLETE Can set VAL to -1, meaning no way to tell. */
-// OBSOLETE
-// OBSOLETE /* We can't tell how many args there are
-// OBSOLETE now that the C compiler delays popping them. */
-// OBSOLETE #if !defined (FRAME_NUM_ARGS)
-// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* Return number of bytes at start of arglist that are not really args. */
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_SKIP 8
-// OBSOLETE
-// OBSOLETE struct frame_info;
-// OBSOLETE extern void z8k_frame_init_saved_regs (struct frame_info *);
-// OBSOLETE #define FRAME_INIT_SAVED_REGS(fi) z8k_frame_init_saved_regs (fi)
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Things needed for making the inferior call functions.
-// OBSOLETE It seems like every m68k based machine has almost identical definitions
-// OBSOLETE in the individual machine's configuration files. Most other cpu types
-// OBSOLETE (mips, i386, etc) have routines in their *-tdep.c files to handle this
-// OBSOLETE for most configurations. The m68k family should be able to do this as
-// OBSOLETE well. These macros can still be overridden when necessary. */
-// OBSOLETE
-// OBSOLETE /* The CALL_DUMMY macro is the sequence of instructions, as disassembled
-// OBSOLETE by gdb itself:
-// OBSOLETE
-// OBSOLETE fmovemx fp0-fp7,sp@- 0xf227 0xe0ff
-// OBSOLETE moveml d0-a5,sp@- 0x48e7 0xfffc
-// OBSOLETE clrw sp@- 0x4267
-// OBSOLETE movew ccr,sp@- 0x42e7
-// OBSOLETE
-// OBSOLETE /..* The arguments are pushed at this point by GDB;
-// OBSOLETE no code is needed in the dummy for this.
-// OBSOLETE The CALL_DUMMY_START_OFFSET gives the position of
-// OBSOLETE the following jsr instruction. *../
-// OBSOLETE
-// OBSOLETE jsr @#0x32323232 0x4eb9 0x3232 0x3232
-// OBSOLETE addal #0x69696969,sp 0xdffc 0x6969 0x6969
-// OBSOLETE trap #<your BPT_VECTOR number here> 0x4e4?
-// OBSOLETE nop 0x4e71
-// OBSOLETE
-// OBSOLETE Note this is CALL_DUMMY_LENGTH bytes (28 for the above example).
-// OBSOLETE We actually start executing at the jsr, since the pushing of the
-// OBSOLETE registers is done by PUSH_DUMMY_FRAME. If this were real code,
-// OBSOLETE the arguments for the function called by the jsr would be pushed
-// OBSOLETE between the moveml and the jsr, and we could allow it to execute through.
-// OBSOLETE But the arguments have to be pushed by GDB after the PUSH_DUMMY_FRAME is
-// OBSOLETE done, and we cannot allow the moveml to push the registers again lest
-// OBSOLETE they be taken for the arguments. */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE #define CALL_DUMMY { 0 }
-// OBSOLETE #define CALL_DUMMY_LENGTH 24 /* Size of CALL_DUMMY */
-// OBSOLETE #define CALL_DUMMY_START_OFFSET 8 /* Offset to jsr instruction */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Insert the specified number of args and function address
-// OBSOLETE into a call sequence of the above form stored at DUMMYNAME.
-// OBSOLETE We use the BFD routines to store a big-endian value of known size. */
-// OBSOLETE
-// OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
-// OBSOLETE { bfd_putb32 (fun, (char *) dummyname + CALL_DUMMY_START_OFFSET + 2); \
-// OBSOLETE bfd_putb32 (nargs*4, (char *) dummyname + CALL_DUMMY_START_OFFSET + 8); }
-// OBSOLETE
-// OBSOLETE /* Push an empty stack frame, to record the current PC, etc. */
-// OBSOLETE
-// OBSOLETE #define PUSH_DUMMY_FRAME { z8k_push_dummy_frame (); }
-// OBSOLETE
-// OBSOLETE extern void z8k_push_dummy_frame (void);
-// OBSOLETE
-// OBSOLETE extern void z8k_pop_frame (void);
-// OBSOLETE
-// OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. */
-// OBSOLETE
-// OBSOLETE #define POP_FRAME { z8k_pop_frame (); }
-// OBSOLETE
-// OBSOLETE /* Offset from SP to first arg on stack at first instruction of a function */
-// OBSOLETE
-// OBSOLETE #define SP_ARG0 (1 * 4)
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR z8k_addr_bits_remove (CORE_ADDR);
-// OBSOLETE #define ADDR_BITS_REMOVE(addr) z8k_addr_bits_remove (addr)
-// OBSOLETE int sim_z8001_mode;
-// OBSOLETE #define BIG (sim_z8001_mode)
-// OBSOLETE
-// OBSOLETE #define read_memory_short(x) (read_memory_integer(x,2) & 0xffff)
-// OBSOLETE
-// OBSOLETE #define NO_STD_REGS
-// OBSOLETE
-// OBSOLETE extern void z8k_do_registers_info (int regnum, int all);
-// OBSOLETE #define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) \
-// OBSOLETE z8k_do_registers_info (REGNUM, ALL)
-// OBSOLETE
-// OBSOLETE extern void z8k_set_pointer_size (int newsize);
-// OBSOLETE #define INIT_EXTRA_SYMTAB_INFO \
-// OBSOLETE z8k_set_pointer_size(objfile->obfd->arch_info->bits_per_address);
-// OBSOLETE
-// OBSOLETE #define REGISTER_SIZE 4
diff --git a/gdb/config/z8k/z8k.mt b/gdb/config/z8k/z8k.mt
deleted file mode 100644
index 3eb6c7bf4ca..00000000000
--- a/gdb/config/z8k/z8k.mt
+++ /dev/null
@@ -1,6 +0,0 @@
-# OBSOLETE # Target: Z8000 with simulator
-# OBSOLETE TDEPFILES= z8k-tdep.o
-# OBSOLETE TM_FILE= tm-z8k.h
-# OBSOLETE
-# OBSOLETE SIM_OBS = remote-sim.o
-# OBSOLETE SIM = ../sim/z8k/libsim.a
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index ce378b425b7..6d70a7e4ddb 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,269 @@
+2004-03-19 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ reference to GDB_TARGET_IS_HPPA.
+
+2004-03-18 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Coding): Update section on gdbarch_data,
+ describe pre_init and post_init.
+
+2004-03-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Debugging Output): Document values for "set debug
+ target".
+
+2004-02-28 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.texinfo (Contributors): Mention GDB 6.1 release engineer.
+
+2004-02-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.texinfo (breakpoints): Add information about the
+ new "set breakpoint pending" and "show breakpoint pending"
+ commands.
+
+2004-02-26 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Coding): Document use of gdbarch_obstack_zalloc
+ in Per-architecture module data section.
+
+2004-02-25 Roland McGrath <roland@redhat.com>
+
+ * gdb.texinfo (General Query Packets): Document qPart:... packets.
+
+2004-02-24 Andrew Cagney <cagney@redhat.com>
+
+ * annotate.texinfo: Wrap fdl.texi include in raise/lower sections.
+ * gdb.texinfo, gdbint.texinfo, stabs.texinfo: Ditto.
+ * fdl.texi: Import Version 1.2, November 2002.
+
+2004-02-17 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.texinfo (Mode Options): Note that "mi1" is deprecated.
+
+2004-02-16 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Deprecate
+ FRAMELESS_FUNCTION_INVOCATION.
+
+2004-02-16 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Coding): Mention -Wunused-function.
+
+2004-02-14 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ description of DEPRECATED_CALL_DUMMY_STACK_ADJUST.
+
+2004-02-12 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.texinfo: Properly quote the name "C++".
+ * gdbint.texinfo: Ditto.
+ * stabs.texinfo: Ditto.
+
+2004-02-11 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdbint.texinfo (Support Libraries): Add doco about obstacks and
+ minimal information about libiberty.
+
+2004-02-06 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.texinfo (Auxiliary Vector): Fix thinko with @value{GDBN}.
+
+2004-02-04 Roland McGrath <roland@redhat.com>
+
+ * gdb.texinfo (Auxiliary Vector): New node (section).
+ (Data): Add it to the menu.
+
+2004-02-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.texinfo (Breakpoints): Add information about pending
+ breakpoint support.
+
+2004-01-26 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.texinfo (Overview): Delete references to the cisco protocol
+ including the "N" response.
+
+2004-01-26 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Rename
+ EXTRACT_STRUCT_VALUE_ADDRESS to
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
+
+2004-01-24 Eli Zaretskii <eliz@gnu.org>
+
+ * gdb.texinfo (KOD): Document "show os". Add index entries for
+ "set/show os" and "info cisco" commands.
+
+2004-01-21 Eli Zaretskii <eliz@gnu.org>
+
+ * Makefile.in (install-info): Prepend $(DESTDIR) to $(infodir).
+
+2004-01-19 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdbint.texinfo: Delete USE_MMALLOC, NO_MMCHECK, MMCHECK_FORCE,
+ MMAP_BASE_ADDRESS, MMAP_INCREMENT.
+
+2004-01-19 Nick Roberts <nick@nick.uklinux.net>
+
+ * gdb.texinfo (GDB/MI Stack Manipulation): Describe extension to
+ -stack-list-locals.
+ (GDB/MI Variable Objects): Describe extension to
+ -var-list-children.
+
+2004-01-17 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbint.texinfo (DECR_PC_AFTER_HW_BREAK): Don't document.
+
+2004-01-17 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ documentation on DEPRECATED_NPC_REGNUM.
+
+2004-01-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo: Update copyright year. Mention that set
+ follow-fork-mode is supported on GNU/Linux. Remove documentation of
+ "set follow-fork-mode ask".
+
+2004-01-13 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo: Update copyright year.
+ (Coding): Add -Wunused-label to list of -Werror warnings.
+
+2004-01-08 Jason Molenda <jmolenda@apple.com>
+ Eli Zaretskii <eliz@is.elta.co.il>
+
+ * gdb.texinfo: Update copyright.
+ (Objective-C): "methodName" typeo fixed. Add @code/@var markup
+ around names, as appropriate. Minor syntax cleanup of
+ _NSPrintForDebugger explanation. Two spaces after periods.
+ GDBN used instead of lit. "gdb". Index entries added for
+ print-object and _NSPrintForDebugger. @noindent added in one spot.
+
+2003-11-11 Elena Zannoni <ezannoni@redhat.com>
+
+ * stabs.texinfo: Add dircategory and direntry commands.
+ * annotate.texinfo: Ditto.
+
+2003-11-10 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Replace the
+ return_value method's "inval" and "outval" parameters with
+ "readbuf" and "writebuf".
+
+2003-10-28 Jim Blandy <jimb@redhat.com>
+
+ * gdb.texinfo (The F request packet, The F reply packet): Renamed
+ from "The `F' request packet" and "The `F' reply packet", to make
+ texi2dvi happy.
+ (File-I/O remote protocol extension): Update menu entries, too.
+
+2003-10-26 Michael Chastain <mec@shout.net>
+
+ * gdb.texinfo (Thread Stops): Document the issue with
+ premature return from system calls in multi-threaded programs.
+
+2003-10-24 Andrew Cagney <cagney@redhat.com>
+
+ * annotate.texinfo: Fix "fortunatly"[sic].
+
+2003-10-23 Kei Sakamoto <sakamoto.kei@renesas.com>
+
+ * gdb.texinfo (Contributors to GDB): Replace "Renesas"
+ with "Hitachi" and "Mitsubishi".
+
+2003-10-20 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Document
+ gdbarch_return_value. Add cross references from
+ USE_STRUCT_CONVENTION, EXTRACT_RETURN_VALUE, and
+ STORE_RETURN_VALUE, and from/to EXTRACT_STRUCT_VALUE_ADDRESS.
+
+2003-10-18 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Document
+ regset_from_core_section.
+
+2003-10-16 Kei Sakamot Sakamoto <sakamoto.kei@renesas.com>
+
+ * gdb.texinfo (M32R/D): Mention m32rsdi target.
+
+2003-10-15 Kevin Buettner <kevinb@redhat.com>
+
+ From Anthony Green <green@redhat.com>:
+ * gdb.texinfo (Breakpoints related warnings): Insert into menu.
+
+2003-10-14 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb.texinfo (Breakpoint related warnings): New node.
+ * gdbint.texinfo (ADJUST_BREAKPOINT_ADDRESS): Document.
+
+2003-10-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Remote Protocol): Document v and vCont.
+
+2003-10-10 Kei Sakamoto <sakamoto.kei@renesas.com>
+
+ * gdb.texinfo: Replace "Hitachi" and "Mitsubishi" with "Renesas".
+ * gdbint.texinfo: Ditto.
+
+2003-10-09 Andrew Cagney <cagney@redhat.com>
+
+ From 2003-09-18 David Anderson <davea@sgi.com>:
+ * gdb.texinfo (GDB/MI Symbol Query): Replace "comamnd" with
+ "command".
+
+2003-10-03 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Deprecate
+ IBM6000_TARGET. Mention that it implies an RS/6000 system and not
+ just target.
+
+2003-10-02 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Rename
+ REGISTER_RAW_SIZE to DEPRECATED_REGISTER_RAW_SIZE.
+ * gdb.texinfo (Packets, Stop Reply Packets): Ditto.
+ * gdbint.texinfo (Target Architecture Definition): Rename
+
+2003-09-30 Andrew Cagney <cagney@redhat.com>
+
+ REGISTER_VIRTUAL_SIZE to DEPRECATED_REGISTER_VIRTUAL_SIZE.
+ (Target Architecture Definition):
+
+ * gdbint.texinfo (Target Architecture Definition): Rename
+ REGISTER_VIRTUAL_TYPE to DEPRECATED_REGISTER_VIRTUAL_TYPE.
+
+2003-09-29 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ documentation for NEED_TEXT_START_END.
+
+ * gdbint.texinfo (Target Architecture Definition): Rename
+ NPC_REGNUM to DEPRECATED_NPC_REGNUM. Add cross reference to
+ TARGET_WRITE_PC.
+
+2003-09-22 Michael Chastain <mec@shout.net>
+
+ * gdbint.texinfo (Testsuite Organization): Change gdb.c++ to gdb.cp.
+
+2003-09-21 Anthony Green <green@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Fix typos.
+
+2003-09-21 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Document
+ stabs_argument_has_addr.
+
+2003-09-18 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ documentation on REGISTER_NAMES.
+
2003-09-13 Mark Kettenis <kettenis@gnu.org>
* gdbint.texinfo (Target Architecture Definition): Replace
@@ -253,7 +519,7 @@
2003-04-02 Bob Rossi <bob_rossi@cox.net>
- * gdb.texinfo (GDB/MI Program Control): Add
+ * gdb.texinfo (GDB/MI Program Control): Add
'-file-list-exec-source-file'
2003-03-31 Andrew Cagney <cagney@redhat.com>
@@ -265,7 +531,7 @@
* gdbint.texinfo (Target Architecture Definition): Remove
reference to TARGET_WRITE_SP.
-
+
2003-03-27 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Remove
@@ -326,7 +592,7 @@
* gdbint.texinfo (Target Architecture Definition): Rename
FRAME_SAVED_PC to DEPRECATED_FRAME_SAVED_PC.
-
+
2003-03-10 Corinna Vinschen <vinschen@redhat.com>
* gdb.texinfo: Add File-I/O documentation.
@@ -748,7 +1014,7 @@
2002-08-08 Grace Sainsbury <graces@redhat.com>
- From Mark Salter:
+ From Mark Salter:
* gdb.texinfo (Protocol): Document T packet extension to
allow watchpoint address reporting.
@@ -906,7 +1172,7 @@
From Eli Zaretskii <eliz@is.elta.co.il>
* gdb.texinfo (show max-user-call-depth): Correct formatting.
- Provide a better explaination of this feature.
+ Provide a better explaination of this feature.
2002-04-14 Andrew Cagney <ac131313@redhat.com>
@@ -947,7 +1213,7 @@
* gdb.texinfo: Change all examples to @smallexample.
* gdbint.texinfo: Ditto.
-
+
2002-03-18 Andrew Cagney <ac131313@redhat.com>
* gdbint.texinfo (Releasing GDB): Add section ``Versions and
@@ -1189,7 +1455,7 @@ Tue Jan 22 11:57:38 2002 Andrew Cagney <cagney@redhat.com>
* gdb.texinfo (maint info sections): Document.
- * gdb.texinfo (info proc): Comment out documentation for
+ * gdb.texinfo (info proc): Comment out documentation for
'info proc' sub-options that are currently not implemented.
2001-12-20 Jim Blandy <jimb@redhat.com>
@@ -1251,7 +1517,7 @@ Tue Jan 22 11:57:38 2002 Andrew Cagney <cagney@redhat.com>
2001-11-05 Michael Snyder <msnyder@redhat.com>
- * gdb.texinfo (info functions): Document use of backslash to
+ * gdb.texinfo (info functions): Document use of backslash to
quote regexp chars in function names such as "operator*()".
2001-11-01 Fred Fish <fnf@redhat.com>
@@ -1317,7 +1583,7 @@ Wed Aug 15 10:47:28 2001 Christopher Faylor <cgf@cygnus.com>
* gdbint.texinfo: Add a cautionary note about macro use.
2001-08-02 Corinna Vinschen <vinschen@redhat.com>
-
+
* gdb.texinfo: Explain omitting the hostname in the
`target remote' command.
@@ -1706,10 +1972,10 @@ Tue Mar 28 18:28:45 2000 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.texinfo (Protocol): Replace ``qfThreadExtraInfo'' with
qThreadExtraInfo.
-2000-03-28 J.T. Conklin <jtc@redback.com>
+2000-03-28 J.T. Conklin <jtc@redback.com>
- * gdb.texinfo: Clarify which remote debug protocol commands are
- required and which are optional.
+ * gdb.texinfo: Clarify which remote debug protocol commands are
+ required and which are optional.
Tue Mar 28 16:06:22 2000 Andrew Cagney <cagney@b1.cygnus.com>
@@ -1743,9 +2009,9 @@ Fri Mar 24 18:06:34 2000 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.texinfo: Check for @ifinfo instead of @ifnottex.
(rluser.texinfo, inc-hist.texinfo, annotate.texi): Add local
@chapter and @node entries.
-
+
* gdb.texinfo: Link all top-level nodes.
-
+
Fri Mar 24 17:56:48 2000 Andrew Cagney <cagney@b1.cygnus.com>
* Makefile.in (install-info): Create $(infodir) before installing
@@ -1766,7 +2032,7 @@ Fri Mar 24 17:56:48 2000 Andrew Cagney <cagney@b1.cygnus.com>
2000-03-20 Michael Snyder <msnyder@cleaver.cygnus.com>
- * gdb.texinfo: Add white space to prevent overprinting in
+ * gdb.texinfo: Add white space to prevent overprinting in
two places.
2000-03-17 Stan Shebs <shebs@apple.com>
@@ -1936,8 +2202,8 @@ Wed Aug 11 13:18:14 1999 Andrew Cagney <cagney@amy.cygnus.com>
1999-08-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
- * Makefile.in: Rename inc-hist.texi to inc-hist.texinfo.
- * gdb.texinfo: Ditto.
+ * Makefile.in: Rename inc-hist.texi to inc-hist.texinfo.
+ * gdb.texinfo: Ditto.
1999-08-06 Tom Tromey <tromey@cygnus.com>
@@ -2042,7 +2308,7 @@ Tue Apr 20 11:59:38 1999 Andrew Cagney <cagney@b1.cygnus.com>
LITTLE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT,
BIG_REMOTE_BREAKPOINT): Deprecate in favor of REGISTER_NAME and
BREAKPOINT_FROM_PC.
-
+
Mon Apr 12 16:00:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdbint.texinfo (CALL_DUMMY_STACK_ADJUST_P,
@@ -2098,14 +2364,14 @@ Thu Jan 14 17:10:12 1999 Stan Shebs <shebs@andros.cygnus.com>
Wed Jan 13 10:38:40 1999 Edith Epstein <eepstein@sophia.cygnus.com>
- * gdb.texinfo: Changes made as part of a project to merge in
- changes made by HP. Documentation makes extensive use of
+ * gdb.texinfo: Changes made as part of a project to merge in
+ changes made by HP. Documentation makes extensive use of
@ifclear HPPA and @ifset HPPA. The HP manual omits doumentation
on remote debugging. There are differences in documentation
(HP vs. non-HP) on C++ support (aCC vs. gnu gcc++). Also,
the HP manual discusses catchpoints, hardware watchpoints, and
some HPUX specific limitations for shared library support.
-
+
There are also a number of @node changes.
1999-01-12 Jason Molenda (jsm@bugshack.cygnus.com)
@@ -2118,7 +2384,7 @@ Wed Jan 6 11:55:34 1999 David Taylor <taylor@texas.cygnus.com>
The following changes were made by Edith Epstein
<eepstein@cygnus.com> as part of a project to merge in changes
made by HP.
-
+
* HPPA-cfg.texi: new file.
* all-cfg.texi: set HPPA for HP PA-RISC targets.
@@ -2167,7 +2433,7 @@ Tue Dec 1 17:45:43 1998 Stan Shebs <shebs@andros.cygnus.com>
Mon Nov 30 11:32:21 1998 Andrew Cagney <cagney@chook>
- * gdbint.texinfo (FRAME_CHAIN_VALID_ALTERNATE):
+ * gdbint.texinfo (FRAME_CHAIN_VALID_ALTERNATE):
Sat Nov 28 13:45:53 1998 Andrew Cagney <cagney@b1.cygnus.com>
@@ -2214,7 +2480,7 @@ Thu Apr 2 16:10:36 1998 Stan Shebs <shebs@andros.cygnus.com>
* gdb.texinfo: Add some credits, mention bug monitor.
* remote.texi: Mention mips monitor targets.
* gdbint.texinfo: Describe SP_REGNUM, STEP_SKIPS_DELAY.
-
+
Mon Feb 2 17:13:03 1998 Stan Shebs <shebs@andros.cygnus.com>
* gdbint.texinfo: Remove obsolete mentions of pinsn.c and opcode.h
@@ -2290,14 +2556,14 @@ Fri Jul 5 15:38:54 1996 Fred Fish <fnf@cygnus.com>
Also document that some systems can use mmalloc but must define
this if their C runtime allocates memory that is later freed.
(MMCHECK_FORCE): Document new macro.
-
+
Fri Jun 28 22:17:10 1996 Dawn Perchik <dawn@cygnus.com>
* remote.texi: Add documentation for target Sparclet.
Mon Jun 24 18:12:22 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
- * Makefile.in (srcdir, VPATH, prefix, infodir, INSTALL,
+ * Makefile.in (srcdir, VPATH, prefix, infodir, INSTALL,
INSTALL_PROGRAM, INSTALL_DATA): Use autoconf set values.
* configure.in: Rewritten for autoconf.
* configure: New.
@@ -2315,7 +2581,7 @@ Mon Jun 17 10:43:41 1996 Fred Fish <fnf@cygnus.com>
(maintainer-clean): Remove clean-info and clean-dvi
dependencies and put their actions in the rules.
(gdb.ps): New target
- (gdb.dvi, gdbgui.dvi, gdbint.dvi, stabs.dvi): Remove
+ (gdb.dvi, gdbgui.dvi, gdbint.dvi, stabs.dvi): Remove
intermediate TeX files, whether they have 2 or 3 character
extensions.
(gdbint.ps): Add target and rules.
@@ -2686,7 +2952,7 @@ Sun Nov 28 18:06:25 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
entries; (Server): explain use of gdbserver w/real-time systems,
add example of conflicting TCP port; (MIPS Remote) break up
running text into table, highlighting commands, and add example.
-
+
Wed Nov 24 14:15:56 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
* refcard.tex: avoid bad linebreaks even when REFEDITS=psrc.sed
@@ -3002,7 +3268,7 @@ Fri Jul 9 09:47:02 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
Tue Jul 6 12:41:28 1993 John Gilmore (gnu@cygnus.com)
* gdbint.texinfo (Target Conditionals): Remove NO_TYPEDEFS,
- removed from the code by Kingdon.
+ removed from the code by Kingdon.
Tue Jul 6 12:24:34 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
@@ -3431,7 +3697,7 @@ Mon Aug 24 01:17:55 1992 John Gilmore (gnu@cygnus.com)
Tue Aug 18 15:59:13 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
* gdbinv-s.m4.in: refrain from using @cartouche for just a few
- examples (not consistent w others).
+ examples (not consistent w others).
gdb.texinfo: issue disclaimer paragraph on cmdline options only
for generic vn of doc
@@ -3498,7 +3764,7 @@ Fri Apr 10 17:50:43 1992 John Gilmore (gnu at rtl.cygnus.com)
* gdb.texinfo: Update for GDB-4.5. Move `Formatting
Documentation' ahead of `Installing GDB' to match README.
Update shared library doc, -readnow and -mapped, and directory
- structure (add glob and mmalloc). Update configure doc.
+ structure (add glob and mmalloc). Update configure doc.
Tue Mar 24 23:28:38 1992 K. Richard Pixley (rich@cygnus.com)
@@ -3527,7 +3793,7 @@ Fri Dec 6 23:57:34 1991 K. Richard Pixley (rich at rtl.cygnus.com)
* Makefile.in: remove spaces following hyphens, bsd make can't
cope. install using INSTALL_DATA. added clean-info. added
- standards.text support.
+ standards.text support.
Thu Dec 5 22:46:12 1991 K. Richard Pixley (rich at rtl.cygnus.com)
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index a06cc4ac711..90043b7fa51 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -171,8 +171,8 @@ install-info: $(INFO_DEPS)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
- echo " install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$$file";\
- install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
done; \
else : ; fi
diff --git a/gdb/doc/annotate.texinfo b/gdb/doc/annotate.texinfo
index 401657d4a96..86b90cc74e7 100644
--- a/gdb/doc/annotate.texinfo
+++ b/gdb/doc/annotate.texinfo
@@ -1,6 +1,14 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename annotate.info
+
+@c This is a dir.info fragment to support semi-automated addition of
+@c manuals to an info tree.
+@dircategory Programming & development tools.
+@direntry
+* Annotate: (annotate). The obsolete annotation interface.
+@end direntry
+
@c
@include gdb-cfg.texi
@c
@@ -146,7 +154,7 @@ This chapter discusses the known problems.
@section Dependant on @sc{cli} output
The annotation interface works by interspersing markups with
-@value{GDBN} normal command-line interpreter output. Unfortunatly, this
+@value{GDBN} normal command-line interpreter output. Unfortunately, this
makes the annotation client dependant on not just the annotations, but
also the @sc{cli} output. This is because the client is forced to
assume that specific @value{GDBN} commands provide specific information.
@@ -812,7 +820,9 @@ source which is being displayed. @var{addr} is in the form @samp{0x}
followed by one or more lowercase hex digits (note that this does not
depend on the language).
+@raisesections
@include fdl.texi
+@lowersections
@ignore
@node Index
diff --git a/gdb/doc/fdl.texi b/gdb/doc/fdl.texi
index f4726b9b149..11737cc89bd 100644
--- a/gdb/doc/fdl.texi
+++ b/gdb/doc/fdl.texi
@@ -1,28 +1,29 @@
-@c -*-texinfo-*-
+
@node GNU Free Documentation License
+@appendixsec GNU Free Documentation License
-@appendix GNU Free Documentation License
-@center Version 1.1, March 2000
+@cindex FDL, GNU Free Documentation License
+@center Version 1.2, November 2002
@display
-Copyright (C) 2000 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@end display
-@sp 1
+
@enumerate 0
@item
PREAMBLE
The purpose of this License is to make a manual, textbook, or other
-written document ``free'' in the sense of freedom: to assure everyone
-the effective freedom to copy and redistribute it, with or without
-modifying it, either commercially or noncommercially. Secondarily,
-this License preserves for the author and publisher a way to get
-credit for their work, while not being considered responsible for
-modifications made by others.
+functional and useful document @dfn{free} in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
This License is a kind of ``copyleft'', which means that derivative
works of the document must themselves be free in the same sense. It
@@ -37,60 +38,72 @@ it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
-@sp 1
@item
APPLICABILITY AND DEFINITIONS
-This License applies to any manual or other work that contains a
-notice placed by the copyright holder saying it can be distributed
-under the terms of this License. The ``Document'', below, refers to any
-such manual or work. Any member of the public is a licensee, and is
-addressed as ``you.''
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The ``Document'', below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as ``you''. You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
A ``Modified Version'' of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
-A ``Secondary Section'' is a named appendix or a front-matter section of
-the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall subject
-(or to related matters) and contains nothing that could fall directly
-within that overall subject. (For example, if the Document is in part a
-textbook of mathematics, a Secondary Section may not explain any
-mathematics.) The relationship could be a matter of historical
+A ``Secondary Section'' is a named appendix or a front-matter section
+of the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The ``Invariant Sections'' are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License.
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
The ``Cover Texts'' are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License.
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
A ``Transparent'' copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
-general public, whose contents can be viewed and edited directly and
+general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
-format whose markup has been designed to thwart or discourage
-subsequent modification by readers is not Transparent. A copy that is
-not ``Transparent'' is called ``Opaque.''
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not ``Transparent'' is called ``Opaque''.
Examples of suitable formats for Transparent copies include plain
-ASCII without markup, Texinfo input format, LaTeX input format, SGML
-or XML using a publicly available DTD, and standard-conforming simple
-HTML designed for human modification. Opaque formats include
-PostScript, PDF, proprietary formats that can be read and edited only
-by proprietary word processors, SGML or XML for which the DTD and/or
-processing tools are not generally available, and the
-machine-generated HTML produced by some word processors for output
-purposes only.
+@sc{ascii} without markup, Texinfo input format, La@TeX{} input
+format, @acronym{SGML} or @acronym{XML} using a publicly available
+@acronym{DTD}, and standard-conforming simple @acronym{HTML},
+PostScript or @acronym{PDF} designed for human modification. Examples
+of transparent image formats include @acronym{PNG}, @acronym{XCF} and
+@acronym{JPG}. Opaque formats include proprietary formats that can be
+read and edited only by proprietary word processors, @acronym{SGML} or
+@acronym{XML} for which the @acronym{DTD} and/or processing tools are
+not generally available, and the machine-generated @acronym{HTML},
+PostScript or @acronym{PDF} produced by some word processors for
+output purposes only.
The ``Title Page'' means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
@@ -98,7 +111,22 @@ this License requires to appear in the title page. For works in
formats which do not have any title page as such, ``Title Page'' means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
-@sp 1
+
+A section ``Entitled XYZ'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as ``Acknowledgements'',
+``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
@item
VERBATIM COPYING
@@ -114,13 +142,14 @@ number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
-@sp 1
+
@item
COPYING IN QUANTITY
-If you publish printed copies of the Document numbering more than 100,
-and the Document's license notice requires Cover Texts, you must enclose
-the copies in covers that carry, clearly and legibly, all these Cover
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
@@ -138,21 +167,20 @@ pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
-a publicly-accessible computer-network location containing a complete
-Transparent copy of the Document, free of added material, which the
-general network-using public has access to download anonymously at no
-charge using public-standard network protocols. If you use the latter
-option, you must take reasonably prudent steps, when you begin
-distribution of Opaque copies in quantity, to ensure that this
-Transparent copy will remain thus accessible at the stated location
-until at least one year after the last time you distribute an Opaque
-copy (directly or through your agents or retailers) of that edition to
-the public.
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
-@sp 1
+
@item
MODIFICATIONS
@@ -163,52 +191,85 @@ Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
-A. Use in the Title Page (and on the covers, if any) a title distinct
- from that of the Document, and from those of previous versions
- (which should, if there were any, be listed in the History section
- of the Document). You may use the same title as a previous version
- if the original publisher of that version gives permission.@*
-B. List on the Title Page, as authors, one or more persons or entities
- responsible for authorship of the modifications in the Modified
- Version, together with at least five of the principal authors of the
- Document (all of its principal authors, if it has less than five).@*
-C. State on the Title page the name of the publisher of the
- Modified Version, as the publisher.@*
-D. Preserve all the copyright notices of the Document.@*
-E. Add an appropriate copyright notice for your modifications
- adjacent to the other copyright notices.@*
-F. Include, immediately after the copyright notices, a license notice
- giving the public permission to use the Modified Version under the
- terms of this License, in the form shown in the Addendum below.@*
-G. Preserve in that license notice the full lists of Invariant Sections
- and required Cover Texts given in the Document's license notice.@*
-H. Include an unaltered copy of this License.@*
-I. Preserve the section entitled ``History'', and its title, and add to
- it an item stating at least the title, year, new authors, and
- publisher of the Modified Version as given on the Title Page. If
- there is no section entitled ``History'' in the Document, create one
- stating the title, year, authors, and publisher of the Document as
- given on its Title Page, then add an item describing the Modified
- Version as stated in the previous sentence.@*
-J. Preserve the network location, if any, given in the Document for
- public access to a Transparent copy of the Document, and likewise
- the network locations given in the Document for previous versions
- it was based on. These may be placed in the ``History'' section.
- You may omit a network location for a work that was published at
- least four years before the Document itself, or if the original
- publisher of the version it refers to gives permission.@*
-K. In any section entitled ``Acknowledgements'' or ``Dedications'',
- preserve the section's title, and preserve in the section all the
- substance and tone of each of the contributor acknowledgements
- and/or dedications given therein.@*
-L. Preserve all the Invariant Sections of the Document,
- unaltered in their text and in their titles. Section numbers
- or the equivalent are not considered part of the section titles.@*
-M. Delete any section entitled ``Endorsements.'' Such a section
- may not be included in the Modified Version.@*
-N. Do not retitle any existing section as ``Endorsements''
- or to conflict in title with any Invariant Section.@*
-@sp 1
+@enumerate A
+@item
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+@item
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+
+@item
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+@item
+Preserve all the copyright notices of the Document.
+
+@item
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+@item
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+@item
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+@item
+Include an unaltered copy of this License.
+
+@item
+Preserve the section Entitled ``History'', Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section Entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+@item
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+@item
+For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
+the Title of the section, and preserve in the section all the
+substance and tone of each of the contributor acknowledgements and/or
+dedications given therein.
+
+@item
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+
+@item
+Delete any section Entitled ``Endorsements''. Such a section
+may not be included in the Modified Version.
+
+@item
+Do not retitle any existing section to be Entitled ``Endorsements'' or
+to conflict in title with any Invariant Section.
+
+@item
+Preserve any Warranty Disclaimers.
+@end enumerate
+
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
@@ -216,9 +277,9 @@ of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
-You may add a section entitled ``Endorsements'', provided it contains
+You may add a section Entitled ``Endorsements'', provided it contains
nothing but endorsements of your Modified Version by various
-parties--for example, statements of peer review or that the text has
+parties---for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
@@ -235,7 +296,7 @@ permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
-@sp 1
+
@item
COMBINING DOCUMENTS
@@ -244,7 +305,7 @@ License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
-license notice.
+license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
@@ -255,12 +316,12 @@ author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
-In the combination, you must combine any sections entitled ``History''
-in the various original documents, forming one section entitled
-``History''; likewise combine any sections entitled ``Acknowledgements'',
-and any sections entitled ``Dedications.'' You must delete all sections
-entitled ``Endorsements.''
-@sp 1
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''. You must delete all
+sections Entitled ``Endorsements.''
+
@item
COLLECTIONS OF DOCUMENTS
@@ -274,25 +335,27 @@ You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
-@sp 1
+
@item
AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
-distribution medium, does not as a whole count as a Modified Version
-of the Document, provided no compilation copyright is claimed for the
-compilation. Such a compilation is called an ``aggregate'', and this
-License does not apply to the other self-contained works thus compiled
-with the Document, on account of their being thus compiled, if they
-are not themselves derivative works of the Document.
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one quarter
-of the entire aggregate, the Document's Cover Texts may be placed on
-covers that surround only the Document within the aggregate.
-Otherwise they must appear on covers around the whole aggregate.
-@sp 1
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
@item
TRANSLATION
@@ -302,11 +365,18 @@ Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
-translation of this License provided that you also include the
-original English version of this License. In case of a disagreement
-between the translation and the original English version of this
-License, the original English version will prevail.
-@sp 1
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
@item
TERMINATION
@@ -317,7 +387,7 @@ 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.
-@sp 1
+
@item
FUTURE REVISIONS OF THIS LICENSE
@@ -325,7 +395,7 @@ The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation 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. See
-http://www.gnu.org/copyleft/.
+@uref{http://www.gnu.org/copyleft/}.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
@@ -335,10 +405,10 @@ of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
-
@end enumerate
-@unnumberedsec ADDENDUM: How to use this License for your documents
+@page
+@appendixsubsec ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
@@ -346,23 +416,37 @@ license notices just after the title page:
@smallexample
@group
-Copyright (C) @var{year} @var{your name}.
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with the Invariant Sections being @var{list their titles}, with the
-Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
-A copy of the license is included in the section entitled "GNU
-Free Documentation License."
+ Copyright (C) @var{year} @var{your name}.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.2
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
@end group
@end smallexample
-If you have no Invariant Sections, write ``with no Invariant Sections''
-instead of saying which ones are invariant. If you have no
-Front-Cover Texts, write ``no Front-Cover Texts'' instead of
-``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with...Texts.'' line with this:
+
+@smallexample
+@group
+ with the Invariant Sections being @var{list their titles}, with
+ the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
+ being @var{list}.
+@end group
+@end smallexample
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
+
+@c Local Variables:
+@c ispell-local-pdict: "ispell-dict"
+@c End:
+
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index cf69fd3e741..dac02de0ef2 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -1,6 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-@c 1999, 2000, 2001, 2002, 2003
+@c 1999, 2000, 2001, 2002, 2003, 2004
@c Free Software Foundation, Inc.
@c
@c %**start of header
@@ -52,7 +52,7 @@ This is the @value{EDITION} Edition, of @cite{Debugging with
Version @value{GDBVN}.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,@*
- 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -84,7 +84,7 @@ development.''
@vskip 0pt plus 1filll
Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
@sp 2
Published by the Free Software Foundation @*
59 Temple Place - Suite 330, @*
@@ -115,7 +115,7 @@ This file describes @value{GDBN}, the @sc{gnu} symbolic debugger.
This is the @value{EDITION} Edition, for @value{GDBN} Version
@value{GDBVN}.
-Copyright (C) 1988-2003 Free Software Foundation, Inc.
+Copyright (C) 1988-2004 Free Software Foundation, Inc.
@menu
* Summary:: Summary of @value{GDBN}
@@ -192,7 +192,7 @@ Change things in your program, so you can experiment with correcting the
effects of one bug and go on to learn about another.
@end itemize
-You can use @value{GDBN} to debug programs written in C and C++.
+You can use @value{GDBN} to debug programs written in C and C@t{++}.
For more information, see @ref{Support,,Supported languages}.
For more information, see @ref{C,,C and C++}.
@@ -347,7 +347,7 @@ omitted from this list, we would like to add your names!
So that they may not regard their many labors as thankless, we
particularly thank those who shepherded @value{GDBN} through major
releases:
-Andrew Cagney (releases 6.0, 5.3, 5.2, 5.1 and 5.0);
+Andrew Cagney (releases 6.1, 6.0, 5.3, 5.2, 5.1 and 5.0);
Jim Blandy (release 4.18);
Jason Molenda (release 4.17);
Stan Shebs (release 4.14);
@@ -418,12 +418,13 @@ Fred Fish wrote most of the support for Unix System Vr4.
He also enhanced the command-completion support to cover C@t{++} overloaded
symbols.
-Hitachi America, Ltd. sponsored the support for H8/300, H8/500, and
-Super-H processors.
+Hitachi America (now Renesas America), Ltd. sponsored the support for
+H8/300, H8/500, and Super-H processors.
NEC sponsored the support for the v850, Vr4xxx, and Vr5xxx processors.
-Mitsubishi sponsored the support for D10V, D30V, and M32R/D processors.
+Mitsubishi (now Renesas) sponsored the support for D10V, D30V, and M32R/D
+processors.
Toshiba sponsored the support for the TX39 Mips processor.
@@ -860,7 +861,7 @@ equivalent to the @samp{-c}/@samp{-p} option followed by that argument.)
If the second argument begins with a decimal digit, @value{GDBN} will
first attempt to attach to it as a process, and if that fails, attempt
to open it as a corefile. If you have a corefile whose name begins with
-a digit, you can prevent @value{GDBN} from treating it as a pid by
+a digit, you can prevent @value{GDBN} from treating it as a pid by
prefixing it with @file{./}, eg. @file{./12345}.
If @value{GDBN} has not been configured to included core file support,
@@ -900,7 +901,7 @@ file.
@itemx -c @var{file}
@cindex @code{--core}
@cindex @code{-c}
-Use file @var{file} as a core dump to examine.
+Use file @var{file} as a core dump to examine.
@item -c @var{number}
@item -pid @var{number}
@@ -1111,7 +1112,7 @@ Run using @var{device} for your program's standard input and output.
@c resolve the situation of these eventually
@item -tui
@cindex @code{--tui}
-Activate the Terminal User Interface when starting.
+Activate the Terminal User Interface when starting.
The Terminal User Interface manages several text windows on the terminal,
showing source, assembly, registers and @value{GDBN} command outputs
(@pxref{TUI, ,@value{GDBN} Text User Interface}).
@@ -1134,10 +1135,10 @@ communicate with @value{GDBN} using it as a back end.
@samp{--interpreter=mi} (or @samp{--interpreter=mi2}) causes
@value{GDBN} to use the @dfn{@sc{gdb/mi} interface} (@pxref{GDB/MI, ,
-The @sc{gdb/mi} Interface}) included in @var{GDBN} version 6.0. The
-previous @sc{gdb/mi} interface, included in @value{GDBN} version 5.3,
-can be selected with @samp{--interpreter=mi1}. Earlier @sc{gdb/mi}
-interfaces are not supported.
+The @sc{gdb/mi} Interface}) included since @var{GDBN} version 6.0. The
+previous @sc{gdb/mi} interface, included in @value{GDBN} version 5.3 and
+selected with @samp{--interpreter=mi1}, is deprecated. Earlier
+@sc{gdb/mi} interfaces are no longer supported.
@item -write
@cindex @code{--write}
@@ -2288,9 +2289,10 @@ get its process ID. Then tell @value{GDBN} (a new invocation of
the child process (@pxref{Attach}). From that point on you can debug
the child process just like any other process which you attached to.
-On HP-UX (11.x and later only?), @value{GDBN} provides support for
-debugging programs that create additional processes using the
-@code{fork} or @code{vfork} function.
+On some systems, @value{GDBN} provides support for debugging programs that
+create additional processes using the @code{fork} or @code{vfork} functions.
+Currently, the only platforms with this feature are HP-UX (11.x and later
+only?) and GNU/Linux (kernel version 2.5.60 and later).
By default, when a program forks, @value{GDBN} will continue to debug
the parent process and the child process will run unimpeded.
@@ -2314,8 +2316,6 @@ unimpeded. This is the default.
The new process is debugged after a fork. The parent process runs
unimpeded.
-@item ask
-The debugger will ask for one of the above choices.
@end table
@item show follow-fork-mode
@@ -2441,6 +2441,7 @@ all breakpoint in that range are operated on.
* Break Commands:: Breakpoint command lists
* Breakpoint Menus:: Breakpoint menus
* Error in Breakpoints:: ``Cannot insert breakpoints''
+* Breakpoint related warnings:: ``Breakpoint address adjusted...''
@end menu
@node Set Breaks
@@ -2598,16 +2599,23 @@ Whether the breakpoint is marked to be disabled or deleted when hit.
Enabled breakpoints are marked with @samp{y}. @samp{n} marks breakpoints
that are not enabled.
@item Address
-Where the breakpoint is in your program, as a memory address.
+Where the breakpoint is in your program, as a memory address. If the
+breakpoint is pending (see below for details) on a future load of a shared library, the address
+will be listed as @samp{<PENDING>}.
@item What
Where the breakpoint is in the source for your program, as a file and
-line number.
+line number. For a pending breakpoint, the original string passed to
+the breakpoint command will be listed as it cannot be resolved until
+the appropriate shared library is loaded in the future.
@end table
@noindent
If a breakpoint is conditional, @code{info break} shows the condition on
the line following the affected breakpoint; breakpoint commands, if any,
-are listed after that.
+are listed after that. A pending breakpoint is allowed to have a condition
+specified for it. The condition is not parsed for validity until a shared
+library is loaded that allows the pending breakpoint to resolve to a
+valid location.
@noindent
@code{info break} with a breakpoint
@@ -2630,6 +2638,58 @@ your program. There is nothing silly or meaningless about this. When
the breakpoints are conditional, this is even useful
(@pxref{Conditions, ,Break conditions}).
+@cindex pending breakpoints
+If a specified breakpoint location cannot be found, it may be due to the fact
+that the location is in a shared library that is yet to be loaded. In such
+a case, you may want @value{GDBN} to create a special breakpoint (known as
+a @dfn{pending breakpoint}) that
+attempts to resolve itself in the future when an appropriate shared library
+gets loaded.
+
+Pending breakpoints are useful to set at the start of your
+@value{GDBN} session for locations that you know will be dynamically loaded
+later by the program being debugged. When shared libraries are loaded,
+a check is made to see if the load resolves any pending breakpoint locations.
+If a pending breakpoint location gets resolved,
+a regular breakpoint is created and the original pending breakpoint is removed.
+
+@value{GDBN} provides some additional commands for controlling pending
+breakpoint support:
+
+@kindex set breakpoint pending
+@kindex show breakpoint pending
+@table @code
+@item set breakpoint pending auto
+This is the default behavior. When @value{GDBN} cannot find the breakpoint
+location, it queries you whether a pending breakpoint should be created.
+
+@item set breakpoint pending on
+This indicates that an unrecognized breakpoint location should automatically
+result in a pending breakpoint being created.
+
+@item set breakpoint pending off
+This indicates that pending breakpoints are not to be created. Any
+unrecognized breakpoint location results in an error. This setting does
+not affect any pending breakpoints previously created.
+
+@item show breakpoint pending
+Show the current behavior setting for creating pending breakpoints.
+@end table
+
+@cindex operations allowed on pending breakpoints
+Normal breakpoint operations apply to pending breakpoints as well. You may
+specify a condition for a pending breakpoint and/or commands to run when the
+breakpoint is reached. You can also enable or disable
+the pending breakpoint. When you specify a condition for a pending breakpoint,
+the parsing of the condition will be deferred until the point where the
+pending breakpoint location is resolved. Disabling a pending breakpoint
+tells @value{GDBN} to not attempt to resolve the breakpoint on any subsequent
+shared library load. When a pending breakpoint is re-enabled,
+@value{GDBN} checks to see if the location is already resolved.
+This is done because any number of shared library loads could have
+occurred since the time the breakpoint was disabled and one or more
+of these loads could resolve the location.
+
@cindex negative breakpoint numbers
@cindex internal @value{GDBN} breakpoints
@value{GDBN} itself sometimes sets breakpoints in your program for
@@ -3214,7 +3274,7 @@ end
@cindex overloading
@cindex symbol overloading
-Some programming languages (notably C@t{++} and Objective-C) permit a
+Some programming languages (notably C@t{++} and Objective-C) permit a
single function name
to be defined several times, for application in different contexts.
This is called @dfn{overloading}. When a function name is overloaded,
@@ -3309,6 +3369,58 @@ watchpoints it needs to insert.
When this message is printed, you need to disable or remove some of the
hardware-assisted breakpoints and watchpoints, and then continue.
+@node Breakpoint related warnings
+@subsection ``Breakpoint address adjusted...''
+@cindex breakpoint address adjusted
+
+Some processor architectures place constraints on the addresses at
+which breakpoints may be placed. For architectures thus constrained,
+@value{GDBN} will attempt to adjust the breakpoint's address to comply
+with the constraints dictated by the architecture.
+
+One example of such an architecture is the Fujitsu FR-V. The FR-V is
+a VLIW architecture in which a number of RISC-like instructions may be
+bundled together for parallel execution. The FR-V architecture
+constrains the location of a breakpoint instruction within such a
+bundle to the instruction with the lowest address. @value{GDBN}
+honors this constraint by adjusting a breakpoint's address to the
+first in the bundle.
+
+It is not uncommon for optimized code to have bundles which contain
+instructions from different source statements, thus it may happen that
+a breakpoint's address will be adjusted from one source statement to
+another. Since this adjustment may significantly alter @value{GDBN}'s
+breakpoint related behavior from what the user expects, a warning is
+printed when the breakpoint is first set and also when the breakpoint
+is hit.
+
+A warning like the one below is printed when setting a breakpoint
+that's been subject to address adjustment:
+
+@smallexample
+warning: Breakpoint address adjusted from 0x00010414 to 0x00010410.
+@end smallexample
+
+Such warnings are printed both for user settable and @value{GDBN}'s
+internal breakpoints. If you see one of these warnings, you should
+verify that a breakpoint set at the adjusted address will have the
+desired affect. If not, the breakpoint in question may be removed and
+other breakpoints may be set which will have the desired behavior.
+E.g., it may be sufficient to place the breakpoint at a later
+instruction. A conditional breakpoint may also be useful in some
+cases to prevent the breakpoint from triggering too often.
+
+@value{GDBN} will also issue a warning when stopping at one of these
+adjusted breakpoints:
+
+@smallexample
+warning: Breakpoint 1 address previously adjusted from 0x00010414
+to 0x00010410.
+@end smallexample
+
+When this warning is encountered, it may be too late to take remedial
+action except in cases where the breakpoint is hit earlier or more
+frequently than expected.
@node Continuing and Stepping
@section Continuing and stepping
@@ -3707,6 +3819,47 @@ allows you to examine the overall state of the program, including
switching between threads, without worrying that things may change
underfoot.
+@cindex thread breakpoints and system calls
+@cindex system calls and thread breakpoints
+@cindex premature return from system calls
+There is an unfortunate side effect. If one thread stops for a
+breakpoint, or for some other reason, and another thread is blocked in a
+system call, then the system call may return prematurely. This is a
+consequence of the interaction between multiple threads and the signals
+that @value{GDBN} uses to implement breakpoints and other events that
+stop execution.
+
+To handle this problem, your program should check the return value of
+each system call and react appropriately. This is good programming
+style anyways.
+
+For example, do not write code like this:
+
+@smallexample
+ sleep (10);
+@end smallexample
+
+The call to @code{sleep} will return early if a different thread stops
+at a breakpoint or for some other reason.
+
+Instead, write this:
+
+@smallexample
+ int unslept = 10;
+ while (unslept > 0)
+ unslept = sleep (unslept);
+@end smallexample
+
+A system call is allowed to return early, so the system is still
+conforming to its specification. But @value{GDBN} does cause your
+multi-threaded program to behave differently than it would without
+@value{GDBN}.
+
+Also, @value{GDBN} uses internal breakpoints in the thread library to
+monitor certain events such as thread creation and thread destruction.
+When such an event happens, a system call in another thread may return
+prematurely, even though your program does not appear to stop.
+
@cindex continuing threads
@cindex threads, continuing
Conversely, whenever you restart the program, @emph{all} threads start
@@ -4590,6 +4743,7 @@ Table}.
* Registers:: Registers
* Floating Point Hardware:: Floating point hardware
* Vector Unit:: Vector Unit
+* Auxiliary Vector:: Auxiliary data provided by operating system
* Memory Region Attributes:: Memory region attributes
* Dump/Restore Files:: Copy between memory and a file
* Character Sets:: Debugging programs that use a different
@@ -5770,12 +5924,38 @@ Display information about the vector unit. The exact contents and
layout vary depending on the hardware.
@end table
+@node Auxiliary Vector
+@section Operating system auxiliary vector
+@cindex auxiliary vector
+@cindex vector, auxiliary
+
+Some operating systems supply an @dfn{auxiliary vector} to programs at
+startup. This is akin to the arguments and environment that you
+specify for a program, but contains a system-dependent variety of
+binary values that tell system libraries important details about the
+hardware, operating system, and process. Each value's purpose is
+identified by an integer tag; the meanings are well-known but system-specific.
+Depending on the configuration and operating system facilities,
+@value{GDBN} may be able to show you this information.
+
+@table @code
+@kindex info auxv
+@item info auxv
+Display the auxiliary vector of the inferior, which can be either a
+live process or a core dump file. @value{GDBN} prints each tag value
+numerically, and also shows names and text descriptions for recognized
+tags. Some values in the vector are numbers, some bit masks, and some
+pointers to strings or other data. @value{GDBN} displays each value in the
+most appropriate form for a recognized tag, and in hexadecimal for
+an unrecognized tag.
+@end table
+
@node Memory Region Attributes
-@section Memory region attributes
+@section Memory region attributes
@cindex memory region attributes
-@dfn{Memory region attributes} allow you to describe special handling
-required by regions of your target's memory. @value{GDBN} uses attributes
+@dfn{Memory region attributes} allow you to describe special handling
+required by regions of your target's memory. @value{GDBN} uses attributes
to determine whether to allow certain types of memory accesses; whether to
use specific width accesses; and whether to cache target memory.
@@ -5785,7 +5965,7 @@ accessing memory in that region. Similarly, if no memory regions have
been defined, @value{GDBN} uses the default attributes when accessing
all memory.
-When a memory region is defined, it is given a number to identify it;
+When a memory region is defined, it is given a number to identify it;
to enable, disable, or remove a memory region, you specify that number.
@table @code
@@ -5803,7 +5983,7 @@ Remove memory regions @var{nums}@dots{}.
@kindex disable mem
@item disable mem @var{nums}@dots{}
Disable memory regions @var{nums}@dots{}.
-A disabled memory region is not forgotten.
+A disabled memory region is not forgotten.
It may be enabled again later.
@kindex enable mem
@@ -5818,7 +5998,7 @@ for each region.
@table @emph
@item Memory Region Number
@item Enabled or Disabled.
-Enabled memory regions are marked with @samp{y}.
+Enabled memory regions are marked with @samp{y}.
Disabled memory regions are marked with @samp{n}.
@item Lo Address
@@ -5835,7 +6015,7 @@ The list of attributes set for this memory region.
@subsection Attributes
-@subsubsection Memory Access Mode
+@subsubsection Memory Access Mode
The access mode attributes set whether @value{GDBN} may make read or
write accesses to a memory region.
@@ -5876,7 +6056,7 @@ Use 64 bit memory accesses.
@c
@c @table @code
@c @item hwbreak
-@c Always use hardware breakpoints
+@c Always use hardware breakpoints
@c @item swbreak (default)
@c @end table
@@ -5889,13 +6069,13 @@ registers.
@table @code
@item cache
-Enable @value{GDBN} to cache target memory.
+Enable @value{GDBN} to cache target memory.
@item nocache
Disable @value{GDBN} from caching target memory. This is the default.
@end table
@c @subsubsection Memory Write Verification
-@c The memory write verification attributes set whether @value{GDBN}
+@c The memory write verification attributes set whether @value{GDBN}
@c will re-reads data after each write to verify the write was successful.
@c
@c @table @code
@@ -5957,7 +6137,7 @@ Restore the contents of file @var{filename} into memory. The
file format, except for raw binary. To restore a raw binary file you
must specify the optional keyword @code{binary} after the filename.
-If @var{bias} is non-zero, its value will be added to the addresses
+If @var{bias} is non-zero, its value will be added to the addresses
contained in the file. Binary files always start at address zero, so
they will be restored at address @var{bias}. Other bfd files have
a built-in location; they will be restored at offset @var{bias}
@@ -5965,7 +6145,7 @@ from that location.
If @var{start} and/or @var{end} are non-zero, then only data between
file offset @var{start} and file offset @var{end} will be restored.
-These offsets are relative to the addresses in the file, before
+These offsets are relative to the addresses in the file, before
the @var{bias} argument is applied.
@end table
@@ -6036,15 +6216,15 @@ for both host and target.
@item show charset
@kindex show charset
-Show the names of the current host and target charsets.
+Show the names of the current host and target charsets.
@itemx show host-charset
@kindex show host-charset
-Show the name of the current host charset.
+Show the name of the current host charset.
@itemx show target-charset
@kindex show target-charset
-Show the name of the current target charset.
+Show the name of the current target charset.
@end table
@@ -6111,7 +6291,7 @@ $ gdb -nw charset-test
GNU gdb 2001-12-19-cvs
Copyright 2001 Free Software Foundation, Inc.
@dots{}
-(gdb)
+(gdb)
@end smallexample
We can use the @code{show charset} command to see what character sets
@@ -6121,7 +6301,7 @@ strings:
@smallexample
(gdb) show charset
The current host and target character set is `ISO-8859-1'.
-(gdb)
+(gdb)
@end smallexample
For the sake of printing this manual, let's use @sc{ascii} as our
@@ -6130,7 +6310,7 @@ initial character set:
(gdb) set charset ASCII
(gdb) show charset
The current host and target character set is `ASCII'.
-(gdb)
+(gdb)
@end smallexample
Let's assume that @sc{ascii} is indeed the correct character set for our
@@ -6144,7 +6324,7 @@ them properly. Since our current target character set is also
$1 = 0x401698 "Hello, world!\n"
(gdb) print ascii_hello[0]
$2 = 72 'H'
-(gdb)
+(gdb)
@end smallexample
@value{GDBN} uses the target character set for character and string
@@ -6153,7 +6333,7 @@ literals you use in expressions:
@smallexample
(gdb) print '+'
$3 = 43 '+'
-(gdb)
+(gdb)
@end smallexample
The @sc{ascii} character set uses the number 43 to encode the @samp{+}
@@ -6168,7 +6348,7 @@ character set is still @sc{ascii}, we get jibberish:
$4 = 0x4016a8 "\310\205\223\223\226k@@\246\226\231\223\204Z%"
(gdb) print ibm1047_hello[0]
$5 = 200 '\310'
-(gdb)
+(gdb)
@end smallexample
If we invoke the @code{set target-charset} followed by @key{TAB}@key{TAB},
@@ -6176,8 +6356,8 @@ If we invoke the @code{set target-charset} followed by @key{TAB}@key{TAB},
@smallexample
(gdb) set target-charset
-ASCII EBCDIC-US IBM1047 ISO-8859-1
-(gdb) set target-charset
+ASCII EBCDIC-US IBM1047 ISO-8859-1
+(gdb) set target-charset
@end smallexample
We can select @sc{ibm1047} as our target character set, and examine the
@@ -6208,7 +6388,7 @@ string literals you use in expressions:
@smallexample
(gdb) print '+'
$10 = 78 '+'
-(gdb)
+(gdb)
@end smallexample
The @sc{ibm1047} character set uses the number 78 to encode the @samp{+}
@@ -6218,7 +6398,7 @@ character.
@node Macros
@chapter C Preprocessor Macros
-Some languages, such as C and C++, provide a way to define and invoke
+Some languages, such as C and C@t{++}, provide a way to define and invoke
``preprocessor macros'' which expand into strings of tokens.
@value{GDBN} can evaluate expressions containing macro invocations, show
the result of macro expansion, and show a macro's definition, including
@@ -6379,7 +6559,7 @@ Defined at /home/jimb/gdb/macros/play/sample.h:1
expands to: (42 + 1)
(gdb) macro expand-once ADD(1)
expands to: once (M + 1)
-(gdb)
+(gdb)
@end smallexample
In the example above, note that @command{macro expand-once} expands only
@@ -6394,11 +6574,11 @@ the source line of the current stack frame:
(gdb) break main
Breakpoint 1 at 0x8048370: file sample.c, line 10.
(gdb) run
-Starting program: /home/jimb/gdb/macros/play/sample
+Starting program: /home/jimb/gdb/macros/play/sample
Breakpoint 1, main () at sample.c:10
10 printf ("Hello, world!\n");
-(gdb)
+(gdb)
@end smallexample
At line 10, the definition of the macro @code{N} at line 9 is in force:
@@ -6411,7 +6591,7 @@ Defined at /home/jimb/gdb/macros/play/sample.c:9
expands to: 28 < 42
(gdb) print N Q M
$1 = 1
-(gdb)
+(gdb)
@end smallexample
As we step over directives that remove @code{N}'s definition, and then
@@ -6435,7 +6615,7 @@ Defined at /home/jimb/gdb/macros/play/sample.c:13
expands to: 1729 < 42
(gdb) print N Q M
$2 = 0
-(gdb)
+(gdb)
@end smallexample
@@ -6474,9 +6654,9 @@ tracepoints as of this writing.
This chapter describes the tracepoint commands and features.
@menu
-* Set Tracepoints::
-* Analyze Collected Data::
-* Tracepoint Variables::
+* Set Tracepoints::
+* Analyze Collected Data::
+* Tracepoint Variables::
@end menu
@node Set Tracepoints
@@ -6501,12 +6681,12 @@ This section describes commands to set tracepoints and associated
conditions and actions.
@menu
-* Create and Delete Tracepoints::
-* Enable and Disable Tracepoints::
-* Tracepoint Passcounts::
-* Tracepoint Actions::
-* Listing Tracepoints::
-* Starting and Stopping Trace Experiment::
+* Create and Delete Tracepoints::
+* Enable and Disable Tracepoints::
+* Tracepoint Passcounts::
+* Tracepoint Actions::
+* Listing Tracepoints::
+* Starting and Stopping Trace Experiment::
@end menu
@node Create and Delete Tracepoints
@@ -6605,7 +6785,7 @@ user.
Examples:
@smallexample
-(@value{GDBP}) @b{passcount 5 2} // Stop on the 5th execution of
+(@value{GDBP}) @b{passcount 5 2} // Stop on the 5th execution of
@exdent @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @code{// tracepoint 2}
(@value{GDBP}) @b{passcount 12} // Stop on the 12th execution of the
@@ -7317,7 +7497,7 @@ name normally:
@smallexample
(gdb) overlay list
-Section .ov.foo.text, loaded at 0x100000 - 0x100034,
+Section .ov.foo.text, loaded at 0x100000 - 0x100034,
mapped at 0x1016 - 0x104a
(gdb) print foo
$6 = @{int (int)@} 0x1016 <foo>
@@ -7400,7 +7580,7 @@ will silently set a breakpoint there. If the overlay manager then
calls this function whenever it has changed the overlay table, this
will enable @value{GDBN} to accurately keep track of which overlays
are in program memory, and update any breakpoints that may be set
-in overlays. This will allow breakpoints to work even if the
+in overlays. This will allow breakpoints to work even if the
overlays are kept in ROM or other non-writable memory while they
are not being executed.
@@ -7832,7 +8012,7 @@ language reference or tutorial.
@menu
* C:: C and C@t{++}
-* Objective-C:: Objective-C
+* Objective-C:: Objective-C
* Modula-2:: Modula-2
@end menu
@@ -8358,8 +8538,8 @@ This section provides information about some commands and command
options that are useful for debugging Objective-C code.
@menu
-* Method Names in Commands::
-* The Print Command with Objective-C::
+* Method Names in Commands::
+* The Print Command with Objective-C::
@end menu
@node Method Names in Commands, The Print Command with Objective-C, Objective-C, Objective-C
@@ -8387,12 +8567,13 @@ A fully qualified Objective-C method name is specified as
-[@var{Class} @var{methodName}]
@end smallexample
-where the minus sign is used to indicate an instance method and a plus
-sign (not shown) is used to indicate a class method. The
-class name @var{Class} and method name @var{methoName} are enclosed in
-brackets, similar to the way messages are specified in Objective-C source
-code. For example, to set a breakpoint at the @code{create} instance method of
-class @code{Fruit} in the program currently being debugged, enter:
+where the minus sign is used to indicate an instance method and a
+plus sign (not shown) is used to indicate a class method. The class
+name @var{Class} and method name @var{methodName} are enclosed in
+brackets, similar to the way messages are specified in Objective-C
+source code. For example, to set a breakpoint at the @code{create}
+instance method of class @code{Fruit} in the program currently being
+debugged, enter:
@smallexample
break -[Fruit create]
@@ -8405,10 +8586,10 @@ enter:
list +[NSText initialize]
@end smallexample
-In the current version of GDB, the plus or minus sign is required. In
-future versions of GDB, the plus or minus sign will be optional, but you
-can use it to narrow the search. It is also possible to specify just a
-method name:
+In the current version of @value{GDBN}, the plus or minus sign is
+required. In future versions of @value{GDBN}, the plus or minus
+sign will be optional, but you can use it to narrow the search. It
+is also possible to specify just a method name:
@smallexample
break create
@@ -8429,20 +8610,24 @@ clear -[NSWindow makeKeyAndOrderFront:]
@node The Print Command with Objective-C
@subsubsection The Print Command With Objective-C
+@kindex print-object
+@kindex po @r{(@code{print-object})}
-The print command has also been extended to accept methods. For example:
+The print command has also been extended to accept methods. For example:
@smallexample
-print -[object hash]
+print -[@var{object} hash]
@end smallexample
@cindex print an Objective-C object description
-will tell gdb to send the -hash message to object and print the
-result. Also an additional command has been added, @code{print-object}
-or @code{po} for short, which is meant to print the description of an
-object. However, this command may only work with certain Objective-C
-libraries that have a particular hook function, called
-@code{_NSPrintForDebugger} defined.
+@cindex @code{_NSPrintForDebugger}, and printing Objective-C objects
+@noindent
+will tell @value{GDBN} to send the @code{hash} message to @var{object}
+and print the result. Also, an additional command has been added,
+@code{print-object} or @code{po} for short, which is meant to print
+the description of an object. However, this command may only work
+with certain Objective-C libraries that have a particular hook
+function, @code{_NSPrintForDebugger}, defined.
@node Modula-2, , Objective-C, Support
@subsection Modula-2
@@ -9086,8 +9271,8 @@ Print the names and data types of all defined functions
whose names contain a match for regular expression @var{regexp}.
Thus, @samp{info fun step} finds all functions whose names
include @code{step}; @samp{info fun ^step} finds those whose names
-start with @code{step}. If a function name contains characters
-that conflict with the regular expression language (eg.
+start with @code{step}. If a function name contains characters
+that conflict with the regular expression language (eg.
@samp{operator*()}), they may be quoted with a backslash.
@kindex info variables
@@ -9218,7 +9403,7 @@ structure in more detail. For example:
(@value{GDBP}) maint info psymtabs dwarf2read
@{ objfile /home/gnu/build/gdb/gdb
((struct objfile *) 0x82e69d0)
- @{ psymtab /home/gnu/src/gdb/dwarf2read.c
+ @{ psymtab /home/gnu/src/gdb/dwarf2read.c
((struct partial_symtab *) 0x8474b10)
readin no
fullname (null)
@@ -9243,9 +9428,9 @@ read the symtab for the compilation unit containing that function:
Breakpoint 1 at 0x814e5da: file /home/gnu/src/gdb/dwarf2read.c,
line 1574.
(@value{GDBP}) maint info symtabs
-@{ objfile /home/gnu/build/gdb/gdb
+@{ objfile /home/gnu/build/gdb/gdb
((struct objfile *) 0x82e69d0)
- @{ symtab /home/gnu/src/gdb/dwarf2read.c
+ @{ symtab /home/gnu/src/gdb/dwarf2read.c
((struct symtab *) 0x86c1f38)
dirname (null)
fullname (null)
@@ -9253,7 +9438,7 @@ line 1574.
debugformat DWARF 2
@}
@}
-(@value{GDBP})
+(@value{GDBP})
@end smallexample
@end table
@@ -9767,7 +9952,7 @@ Some embedded operating systems, like Sun Chorus and VxWorks, can load
relocatable files into an already running program; such systems
typically make the requirements above easy to meet. However, it's
important to recognize that many native systems use complex link
-procedures (@code{.linkonce} section factoring and C++ constructor table
+procedures (@code{.linkonce} section factoring and C@t{++} constructor table
assembly, for example) that make the requirements difficult to meet. In
general, one cannot assume that using @code{add-symbol-file} to read a
relocatable object file's symbolic information will have the same effect
@@ -10481,7 +10666,7 @@ specifies a fixed address.
@cindex choosing target byte order
@cindex target byte order
-Some types of processors, such as the MIPS, PowerPC, and Hitachi SH,
+Some types of processors, such as the MIPS, PowerPC, and Renesas SH,
offer the ability to run either big-endian or little-endian byte
orders. Usually the executable or symbol will include a bit to
designate the endian-ness, and you will not need to worry about
@@ -10533,9 +10718,7 @@ configuration of @value{GDBN}; use @code{help target} to list them.
@node KOD
@section Kernel Object Display
-
@cindex kernel object display
-@cindex kernel object
@cindex KOD
Some targets support kernel object display. Using this facility,
@@ -10544,6 +10727,7 @@ and can display information about operating system-level objects such as
mutexes and other synchronization objects. Exactly which objects can be
displayed is determined on a per-OS basis.
+@kindex set os
Use the @code{set os} command to set the operating system. This tells
@value{GDBN} which kernel object display module to initialize:
@@ -10551,11 +10735,17 @@ Use the @code{set os} command to set the operating system. This tells
(@value{GDBP}) set os cisco
@end smallexample
+@kindex show os
+The associated command @code{show os} displays the operating system
+set with the @code{set os} command; if no operating system has been
+set, @code{show os} will display an empty string @samp{""}.
+
If @code{set os} succeeds, @value{GDBN} will display some information
about the operating system, and will create a new @code{info} command
which can be used to query the target. The @code{info} command is named
after the operating system:
+@kindex info cisco
@smallexample
(@value{GDBP}) info cisco
List of Cisco Kernel Objects
@@ -10566,8 +10756,10 @@ any Any and all objects
Further subcommands can be used to query about particular objects known
by the kernel.
-There is currently no way to determine whether a given operating system
-is supported other than to try it.
+There is currently no way to determine whether a given operating
+system is supported other than to try setting it with @kbd{set os
+@var{name}}, where @var{name} is the name of the operating system you
+want to try.
@node Remote Debugging
@@ -10928,9 +11120,9 @@ For Motorola 680x0 architectures.
@item sh-stub.c
@cindex @file{sh-stub.c}
-@cindex Hitachi
+@cindex Renesas
@cindex SH
-For Hitachi SH architectures.
+For Renesas SH architectures.
@item sparc-stub.c
@cindex @file{sparc-stub.c}
@@ -11348,10 +11540,10 @@ accepts addresses which may belong to @emph{any} segment. For
example, here's how to display the Page Table entry for the page where
the variable @code{i} is stored:
-@smallexample
+@smallexample
@exdent @code{(@value{GDBP}) info dos address-pte __djgpp_base_address + (char *)&i}
@exdent @code{Page Table entry for address 0x11a00d30:}
-@exdent @code{Base=0x02698000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0xd30}
+@exdent @code{Base=0x02698000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0xd30}
@end smallexample
@noindent
@@ -11420,9 +11612,9 @@ This is a Cygwin specific alias of info shared.
This command loads symbols from a dll similarly to
add-sym command but without the need to specify a base address.
-@kindex set new-console
+@kindex set new-console
@item set new-console @var{mode}
-If @var{mode} is @code{on} the debuggee will
+If @var{mode} is @code{on} the debuggee will
be started in a new console on next start.
If @var{mode} is @code{off}i, the debuggee will
be started in the same console as the debugger.
@@ -11449,17 +11641,17 @@ This boolean value adds debug output concerning events seen by the debugger.
@kindex set debugexec
@item set debugexec
-This boolean value adds debug output concerning execute events
+This boolean value adds debug output concerning execute events
seen by the debugger.
@kindex set debugexceptions
@item set debugexceptions
-This boolean value adds debug ouptut concerning exception events
+This boolean value adds debug ouptut concerning exception events
seen by the debugger.
@kindex set debugmemory
@item set debugmemory
-This boolean value adds debug ouptut concerning memory events
+This boolean value adds debug ouptut concerning memory events
seen by the debugger.
@kindex set shell
@@ -11782,15 +11974,15 @@ configurations.
@menu
* ARM:: ARM
-* H8/300:: Hitachi H8/300
-* H8/500:: Hitachi H8/500
-* M32R/D:: Mitsubishi M32R/D
+* H8/300:: Renesas H8/300
+* H8/500:: Renesas H8/500
+* M32R/D:: Renesas M32R/D
* M68K:: Motorola M68K
* MIPS Embedded:: MIPS Embedded
* OpenRISC 1000:: OpenRisc 1000
* PA:: HP PA Embedded
* PowerPC: PowerPC
-* SH:: Hitachi SH
+* SH:: Renesas SH
* Sparclet:: Tsqware Sparclet
* Sparclite:: Fujitsu Sparclite
* ST2000:: Tandem ST2000
@@ -11815,50 +12007,50 @@ ARM Demon monitor.
@end table
@node H8/300
-@subsection Hitachi H8/300
+@subsection Renesas H8/300
@table @code
@kindex target hms@r{, with H8/300}
@item target hms @var{dev}
-A Hitachi SH, H8/300, or H8/500 board, attached via serial line to your host.
+A Renesas SH, H8/300, or H8/500 board, attached via serial line to your host.
Use special commands @code{device} and @code{speed} to control the serial
line and the communications speed used.
@kindex target e7000@r{, with H8/300}
@item target e7000 @var{dev}
-E7000 emulator for Hitachi H8 and SH.
+E7000 emulator for Renesas H8 and SH.
@kindex target sh3@r{, with H8/300}
@kindex target sh3e@r{, with H8/300}
@item target sh3 @var{dev}
@itemx target sh3e @var{dev}
-Hitachi SH-3 and SH-3E target systems.
+Renesas SH-3 and SH-3E target systems.
@end table
@cindex download to H8/300 or H8/500
@cindex H8/300 or H8/500 download
-@cindex download to Hitachi SH
-@cindex Hitachi SH download
-When you select remote debugging to a Hitachi SH, H8/300, or H8/500
-board, the @code{load} command downloads your program to the Hitachi
+@cindex download to Renesas SH
+@cindex Renesas SH download
+When you select remote debugging to a Renesas SH, H8/300, or H8/500
+board, the @code{load} command downloads your program to the Renesas
board and also opens it as the current executable target for
@value{GDBN} on your host (like the @code{file} command).
@value{GDBN} needs to know these things to talk to your
-Hitachi SH, H8/300, or H8/500:
+Renesas SH, H8/300, or H8/500:
@enumerate
@item
that you want to use @samp{target hms}, the remote debugging interface
-for Hitachi microprocessors, or @samp{target e7000}, the in-circuit
-emulator for the Hitachi SH and the Hitachi 300H. (@samp{target hms} is
-the default when @value{GDBN} is configured specifically for the Hitachi SH,
+for Renesas microprocessors, or @samp{target e7000}, the in-circuit
+emulator for the Renesas SH and the Renesas 300H. (@samp{target hms} is
+the default when @value{GDBN} is configured specifically for the Renesas SH,
H8/300, or H8/500.)
@item
-what serial device connects your host to your Hitachi board (the first
+what serial device connects your host to your Renesas board (the first
serial device available on your host is the default).
@item
@@ -11866,24 +12058,24 @@ what speed to use over the serial device.
@end enumerate
@menu
-* Hitachi Boards:: Connecting to Hitachi boards.
-* Hitachi ICE:: Using the E7000 In-Circuit Emulator.
-* Hitachi Special:: Special @value{GDBN} commands for Hitachi micros.
+* Renesas Boards:: Connecting to Renesas boards.
+* Renesas ICE:: Using the E7000 In-Circuit Emulator.
+* Renesas Special:: Special @value{GDBN} commands for Renesas micros.
@end menu
-@node Hitachi Boards
-@subsubsection Connecting to Hitachi boards
+@node Renesas Boards
+@subsubsection Connecting to Renesas boards
@c only for Unix hosts
@kindex device
-@cindex serial device, Hitachi micros
+@cindex serial device, Renesas micros
Use the special @code{@value{GDBN}} command @samp{device @var{port}} if you
need to explicitly set the serial device. The default @var{port} is the
first available port on your host. This is only necessary on Unix
hosts, where it is typically something like @file{/dev/ttya}.
@kindex speed
-@cindex serial line speed, Hitachi micros
+@cindex serial line speed, Renesas micros
@code{@value{GDBN}} has another special command to set the communications
speed: @samp{speed @var{bps}}. This command also is only used from Unix
hosts; on DOS hosts, set the line speed as usual from outside @value{GDBN} with
@@ -11891,7 +12083,7 @@ the DOS @code{mode} command (for instance,
@w{@kbd{mode com2:9600,n,8,1,p}} for a 9600@dmn{bps} connection).
The @samp{device} and @samp{speed} commands are available only when you
-use a Unix host to debug your Hitachi microprocessor programs. If you
+use a Unix host to debug your Renesas microprocessor programs. If you
use a DOS host,
@value{GDBN} depends on an auxiliary terminate-and-stay-resident program
called @code{asynctsr} to communicate with the development board
@@ -11901,7 +12093,7 @@ to set up the serial port on the DOS side.
The following sample session illustrates the steps needed to start a
program under @value{GDBN} control on an H8/300. The example uses a
sample H8/300 program called @file{t.x}. The procedure is the same for
-the Hitachi SH and the H8/500.
+the Renesas SH and the H8/500.
First hook up your development board. In this example, we use a
board attached to serial port @code{COM2}; if you use a different serial
@@ -11934,7 +12126,7 @@ connected, you can start up @value{GDBN}. Call @code{@value{GDBP}} with
the name of your program as the argument. @code{@value{GDBN}} prompts
you, as usual, with the prompt @samp{(@value{GDBP})}. Use two special
commands to begin your debugging session: @samp{target hms} to specify
-cross-debugging to the Hitachi board, and the @code{load} command to
+cross-debugging to the Renesas board, and the @code{load} command to
download your program to the board. @code{load} displays the names of
the program's sections, and a @samp{*} for each 2K of data downloaded.
(If you want to refresh @value{GDBN} data on symbols or on the
@@ -11984,12 +12176,12 @@ to detect program completion.
In either case, @value{GDBN} sees the effect of a @sc{reset} on the
development board as a ``normal exit'' of your program.
-@node Hitachi ICE
+@node Renesas ICE
@subsubsection Using the E7000 in-circuit emulator
-@kindex target e7000@r{, with Hitachi ICE}
+@kindex target e7000@r{, with Renesas ICE}
You can use the E7000 in-circuit emulator to develop code for either the
-Hitachi SH or the H8/300H. Use one of these forms of the @samp{target
+Renesas SH or the H8/300H. Use one of these forms of the @samp{target
e7000} command to connect @value{GDBN} to your E7000:
@table @code
@@ -12004,8 +12196,8 @@ If your E7000 is installed as a host on a TCP/IP network, you can just
specify its hostname; @value{GDBN} uses @code{telnet} to connect.
@end table
-@node Hitachi Special
-@subsubsection Special @value{GDBN} commands for Hitachi micros
+@node Renesas Special
+@subsubsection Special @value{GDBN} commands for Renesas micros
Some @value{GDBN} commands are available only for the H8/300:
@@ -12038,13 +12230,17 @@ memory}. The accepted values for @var{mod} are @code{small},
@end table
@node M32R/D
-@subsection Mitsubishi M32R/D
+@subsection Renesas M32R/D
@table @code
@kindex target m32r
@item target m32r @var{dev}
-Mitsubishi M32R/D ROM monitor.
+Renesas M32R/D ROM monitor.
+
+@kindex target m32rsdi
+@item target m32rsdi @var{dev}
+Renesas M32R SDI server, connected via parallel port to the board.
@end table
@@ -12391,25 +12587,25 @@ W89K monitor, running on a Winbond HPPA board.
@end table
@node SH
-@subsection Hitachi SH
+@subsection Renesas SH
@table @code
-@kindex target hms@r{, with Hitachi SH}
+@kindex target hms@r{, with Renesas SH}
@item target hms @var{dev}
-A Hitachi SH board attached via serial line to your host. Use special
+A Renesas SH board attached via serial line to your host. Use special
commands @code{device} and @code{speed} to control the serial line and
the communications speed used.
-@kindex target e7000@r{, with Hitachi SH}
+@kindex target e7000@r{, with Renesas SH}
@item target e7000 @var{dev}
-E7000 emulator for Hitachi SH.
+E7000 emulator for Renesas SH.
@kindex target sh3@r{, with SH}
@kindex target sh3e@r{, with SH}
@item target sh3 @var{dev}
@item target sh3e @var{dev}
-Hitachi SH-3 and SH-3E target systems.
+Renesas SH-3 and SH-3E target systems.
@end table
@@ -13028,7 +13224,7 @@ current ABI.
@kindex show osabi
One @value{GDBN} configuration can debug binaries for multiple operating
-system targets, either via remote debugging or native emulation.
+system targets, either via remote debugging or native emulation.
@value{GDBN} will autodetect the @dfn{OS ABI} (Operating System ABI) in use,
but you can override its conclusion using the @code{set osabi} command.
One example where this is useful is in debugging of binaries which use
@@ -13238,7 +13434,9 @@ info.
@item set debug target
Turns on or off display of @value{GDBN} target debugging info. This info
includes what is going on at the target level of GDB, as it happens. The
-default is off.
+default is 0. Set it to 1 to track events, and to 2 to also track the
+value of large memory transfers. Changes to this flag do not take effect
+until the next time you connect to a target or use the @code{run} command.
@kindex show debug target
@item show debug target
Displays the current state of displaying @value{GDBN} target debugging
@@ -13422,7 +13620,7 @@ end
@end smallexample
As a further example, to hook at the begining and end of the @code{echo}
-command, and to add extra text to the beginning and end of the message,
+command, and to add extra text to the beginning and end of the message,
you could define:
@smallexample
@@ -13933,7 +14131,7 @@ key bindings such as @key{C-p}, @key{C-n}, @key{C-b} and @key{C-f}.
The TUI provides a @emph{SingleKey} mode in which it installs a particular
key binding in the readline keymaps to connect single keys to
-some gdb commands.
+some gdb commands.
@table @kbd
@kindex c @r{(SingleKey TUI key)}
@@ -14239,7 +14437,7 @@ the files with these buffers if you wish; but keep in mind that @value{GDBN}
communicates with Emacs in terms of line numbers. If you add or
delete lines from the text, the line numbers that @value{GDBN} knows cease
to correspond properly with the code.
-
+
The description given here is for GNU Emacs version 21.3 and a more
detailed description of its interaction with @value{GDBN} is given in
the Emacs manual (@pxref{Debuggers,,, Emacs, The @sc{gnu} Emacs Manual}).
@@ -15879,17 +16077,17 @@ The corresponding @value{GDBN} command is @samp{cd}.
Add directories @var{pathdir} to beginning of search path for source files.
If the @samp{-r} option is used, the search path is reset to the default
-search path. If directories @var{pathdir} are supplied in addition to the
+search path. If directories @var{pathdir} are supplied in addition to the
@samp{-r} option, the search path is first reset and then addition
occurs as normal.
-Multiple directories may be specified, separated by blanks. Specifying
+Multiple directories may be specified, separated by blanks. Specifying
multiple directories in a single command
results in the directories added to the beginning of the
search path in the same order they were presented in the command.
If blanks are needed as
part of a directory name, double-quotes should be used around
the name. In the command output, the path will show up separated
-by the system directory-separator character. The directory-seperator
+by the system directory-separator character. The directory-seperator
character must not be used
in any directory name.
If no directories are specified, the current search path is displayed.
@@ -15928,18 +16126,18 @@ The corresponding @value{GDBN} command is @samp{dir}.
Add directories @var{pathdir} to beginning of search path for object files.
If the @samp{-r} option is used, the search path is reset to the original
-search path that existed at gdb start-up. If directories @var{pathdir} are
-supplied in addition to the
+search path that existed at gdb start-up. If directories @var{pathdir} are
+supplied in addition to the
@samp{-r} option, the search path is first reset and then addition
occurs as normal.
-Multiple directories may be specified, separated by blanks. Specifying
+Multiple directories may be specified, separated by blanks. Specifying
multiple directories in a single command
results in the directories added to the beginning of the
search path in the same order they were presented in the command.
If blanks are needed as
part of a directory name, double-quotes should be used around
the name. In the command output, the path will show up separated
-by the system directory-separator character. The directory-seperator
+by the system directory-separator character. The directory-seperator
character must not be used
in any directory name.
If no directories are specified, the current path is displayed.
@@ -15953,7 +16151,7 @@ The corresponding @value{GDBN} command is @samp{path}.
@smallexample
(@value{GDBP})
--environment-path
+-environment-path
^done,path="/usr/bin"
(@value{GDBP})
-environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb /bin
@@ -16559,7 +16757,7 @@ N.A.
-file-list-exec-source-file
@end smallexample
-List the line number, the current source file, and the absolute path
+List the line number, the current source file, and the absolute path
to the current source file for the current executable.
@subsubheading @value{GDBN} Command
@@ -16772,7 +16970,7 @@ information when you start an interactive session.
~Type "show copying" to see the conditions.
~There is absolutely no warranty for GDB. Type "show warranty" for
~ details.
-~This GDB was configured as
+~This GDB was configured as
"--host=sparc-sun-solaris2.5.1 --target=ppc-eabi".
^done
(@value{GDBP})
@@ -17103,8 +17301,14 @@ Show a single frame:
@end smallexample
Display the local variable names for the current frame. With an
-argument of 0 prints only the names of the variables, with argument of 1
-prints also their values.
+argument of 0 or @code{--no-values}, prints only the names of the variables.
+With argument of 1 or @code{--all-values}, prints also their values. With
+argument of 2 or @code{--simple-values}, prints the name, type and value for
+simple data types and the name and type for arrays, structures and
+unions. In this last case, the idea is that the user can see the
+value of simple data types immediately and he can create variable
+objects for other data types if he wishes to explore their values in
+more detail.
@subsubheading @value{GDBN} Command
@@ -17117,9 +17321,12 @@ prints also their values.
-stack-list-locals 0
^done,locals=[name="A",name="B",name="C"]
(@value{GDBP})
--stack-list-locals 1
+-stack-list-locals --all-values
^done,locals=[@{name="A",value="1"@},@{name="B",value="2"@},
- @{name="C",value="3"@}]
+ @{name="C",value="@{1, 2, 3@}"@}]
+-stack-list-locals --simple-values
+^done,locals=[@{name="A",type="int",value="1"@},
+ @{name="B",type="int",value="2"@},@{name="C",type="int [3]"@}]
(@value{GDBP})
@end smallexample
@@ -17226,7 +17433,7 @@ Show the core addresses of the code for a source line.
@subsubheading @value{GDBN} Command
-The corresponding @value{GDBN} comamnd is @samp{info line}.
+The corresponding @value{GDBN} command is @samp{info line}.
@code{gdbtk} has the @samp{gdb_get_line} and @samp{gdb_get_file} commands.
@subsubheading Example
@@ -18063,14 +18270,26 @@ Returns the number of children of a variable object @var{name}:
@subsubheading Synopsis
@smallexample
- -var-list-children @var{name}
+ -var-list-children [@var{print-values}] @var{name}
@end smallexample
-Returns a list of the children of the specified variable object:
+Returns a list of the children of the specified variable object. With
+just the variable object name as an argument or with an optional
+preceding argument of 0 or @code{--no-values}, prints only the names of the
+variables. With an optional preceding argument of 1 or @code{--all-values},
+also prints their values.
+
+@subsubheading Example
@smallexample
+(@value{GDBP})
+ -var-list-children n
numchild=@var{n},children=[@{name=@var{name},
numchild=@var{n},type=@var{type}@},@r{(repeats N times)}]
+(@value{GDBP})
+ -var-list-children --all-values n
+ numchild=@var{n},children=[@{name=@var{name},
+ numchild=@var{n},value=@var{value},type=@var{type}@},@r{(repeats N times)}]
@end smallexample
@@ -18159,7 +18378,7 @@ before the value of a child variable can be evaluated.
Assigns the value of @var{expression} to the variable object specified
by @var{name}. The object must be @samp{editable}. If the variable's
-value is altered by the assign, the variable will show up in any
+value is altered by the assign, the variable will show up in any
subsequent @code{-var-update} list.
@subsubheading Example
@@ -18259,12 +18478,12 @@ for details.
This GDB was configured as "i386-pc-linux-gnu"
^Z^Zpre-prompt
-(gdb)
+(gdb)
^Z^Zprompt
@kbd{quit}
^Z^Zpost-prompt
-$
+$
@end smallexample
Here @samp{quit} is input to @value{GDBN}; the rest is output from
@@ -18414,13 +18633,13 @@ deleted a breakpoint.
@findex starting
@findex stopping
When the program starts executing due to a @value{GDBN} command such as
-@code{step} or @code{continue},
+@code{step} or @code{continue},
@smallexample
^Z^Zstarting
@end smallexample
-is output. When the program stops,
+is output. When the program stops,
@smallexample
^Z^Zstopped
@@ -19177,7 +19396,7 @@ A problem internal to GDB has been detected. Further
debugging may prove unreliable.
Quit this debugging session? (y or n) @kbd{n}
Create a core file? (y or n) @kbd{n}
-(gdb)
+(gdb)
@end smallexample
Takes an optional parameter that is used as the text of the error or
@@ -19200,7 +19419,7 @@ The program being debugged stopped while in a function called from GDB.
0x1a57c80: pc=0x01014068 fp=0x0200bddc sp=0x0200bdd6
top=0x0200bdd4 id=@{stack=0x200bddc,code=0x101405c@}
call_lo=0x01014000 call_hi=0x01014001
-(gdb)
+(gdb)
@end smallexample
Takes an optional file parameter.
@@ -19232,14 +19451,14 @@ Takes an optional file parameter.
@smallexample
(gdb) @kbd{maint print reggroups}
- Group Type
- general user
- float user
- all user
- vector user
- system user
- save internal
- restore internal
+ Group Type
+ general user
+ float user
+ all user
+ vector user
+ system user
+ save internal
+ restore internal
@end smallexample
@kindex maint set profile
@@ -19258,7 +19477,7 @@ if you use profiling, @value{GDBN} will overwrite the profiling log file
data in a @file{gmon.out} file, be sure to move it to a safe location.
Configuring with @samp{--enable-profiling} arranges for @value{GDBN} to be
-compiled with the @samp{-pg} compiler option.
+compiled with the @samp{-pg} compiler option.
@end table
@@ -19357,10 +19576,6 @@ where @code{n >=3} (which is where rle starts to win). The printable
characters @samp{$}, @samp{#}, @samp{+} and @samp{-} or with a numeric
value greater than 126 should not be used.
-Some remote systems have used a different run-length encoding mechanism
-loosely refered to as the cisco encoding. Following the @samp{*}
-character are two hex digits that indicate the size of the packet.
-
So:
@smallexample
"@code{0* }"
@@ -19376,8 +19591,8 @@ For any @var{command} not supported by the stub, an empty response
protocol. A newer @value{GDBN} can tell if a packet is supported based
on that response.
-A stub is required to support the @samp{g}, @samp{G}, @samp{m}, @samp{M},
-@samp{c}, and @samp{s} @var{command}s. All other @var{command}s are
+A stub is required to support the @samp{g}, @samp{G}, @samp{m}, @samp{M},
+@samp{c}, and @samp{s} @var{command}s. All other @var{command}s are
optional.
@node Packets
@@ -19517,9 +19732,9 @@ Reply:
Each byte of register data is described by two hex digits. The bytes
with the register are transmitted in target byte order. The size of
each register and their position within the @samp{g} @var{packet} are
-determined by the @value{GDBN} internal macros @var{REGISTER_RAW_SIZE}
-and @var{REGISTER_NAME} macros. The specification of several standard
-@code{g} packets is specified below.
+determined by the @value{GDBN} internal macros
+@var{DEPRECATED_REGISTER_RAW_SIZE} and @var{REGISTER_NAME} macros. The
+specification of several standard @code{g} packets is specified below.
@item E@var{NN}
for an error.
@end table
@@ -19542,7 +19757,7 @@ for an error
Reserved for future use.
-@item @code{H}@var{c}@var{t@dots{}} --- set thread
+@item @code{H}@var{c}@var{t@dots{}} --- set thread
@cindex @code{H} packet
Set thread for subsequent operations (@samp{m}, @samp{M}, @samp{g},
@@ -19753,7 +19968,7 @@ Like @samp{C} but step not continue.
Reply:
@xref{Stop Reply Packets}, for the reply specifications.
-@item @code{t}@var{addr}@code{:}@var{PP}@code{,}@var{MM} --- search
+@item @code{t}@var{addr}@code{:}@var{PP}@code{,}@var{MM} --- search
@cindex @code{t} packet
Search backwards starting at address @var{addr} for a match with pattern
@@ -19781,9 +19996,51 @@ Reserved for future use.
Reserved for future use.
-@item @code{v} --- reserved
+@item @code{v} --- verbose packet prefix
-Reserved for future use.
+Packets starting with @code{v} are identified by a multi-letter name,
+up to the first @code{;} or @code{?} (or the end of the packet).
+
+@item @code{vCont}[;@var{action}[@code{:}@var{tid}]]... --- extended resume
+@cindex @code{vCont} packet
+
+Resume the inferior. Different actions may be specified for each thread.
+If an action is specified with no @var{tid}, then it is applied to any
+threads that don't have a specific action specified; if no default action is
+specified then other threads should remain stopped. Specifying multiple
+default actions is an error; specifying no actions is also an error.
+Thread IDs are specified in hexadecimal. Currently supported actions are:
+
+@table @code
+@item c
+Continue.
+@item C@var{sig}
+Continue with signal @var{sig}. @var{sig} should be two hex digits.
+@item s
+Step.
+@item S@var{sig}
+Step with signal @var{sig}. @var{sig} should be two hex digits.
+@end table
+
+The optional @var{addr} argument normally associated with these packets is
+not supported in @code{vCont}.
+
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
+
+@item @code{vCont?} --- extended resume query
+@cindex @code{vCont?} packet
+
+Query support for the @code{vCont} packet.
+
+Reply:
+@table @samp
+@item @code{vCont}[;@var{action}]...
+The @code{vCont} packet is supported. Each @var{action} is a supported
+command in the @code{vCont} packet.
+@item
+The @code{vCont} packet is not supported.
+@end table
@item @code{V} --- reserved
@@ -19971,12 +20228,13 @@ conventions is used.
@var{AA} = two hex digit signal number; @var{n...} = register number
(hex), @var{r...} = target byte ordered register contents, size defined
-by @code{REGISTER_RAW_SIZE}; @var{n...} = @samp{thread}, @var{r...} =
-thread process ID, this is a hex integer; @var{n...} = (@samp{watch} |
-@samp{rwatch} | @samp{awatch}, @var{r...} = data address, this is a hex
-integer; @var{n...} = other string not starting with valid hex digit.
-@value{GDBN} should ignore this @var{n...}, @var{r...} pair and go on
-to the next. This way we can extend the protocol.
+by @code{DEPRECATED_REGISTER_RAW_SIZE}; @var{n...} = @samp{thread},
+@var{r...} = thread process ID, this is a hex integer; @var{n...} =
+(@samp{watch} | @samp{rwatch} | @samp{awatch}, @var{r...} = data
+address, this is a hex integer; @var{n...} = other string not starting
+with valid hex digit. @value{GDBN} should ignore this @var{n...},
+@var{r...} pair and go on to the next. This way we can extend the
+protocol.
@item W@var{AA}
@@ -19987,15 +20245,6 @@ applicable to certain targets.
The process terminated with signal @var{AA}.
-@item N@var{AA};@var{t@dots{}};@var{d@dots{}};@var{b@dots{}} @strong{(obsolete)}
-
-@var{AA} = signal number; @var{t@dots{}} = address of symbol
-@code{_start}; @var{d@dots{}} = base of data section; @var{b@dots{}} =
-base of bss section. @emph{Note: only used by Cisco Systems targets.
-The difference between this reply and the @samp{qOffsets} query is that
-the @samp{N} packet may arrive spontaneously whereas the @samp{qOffsets}
-is a query initiated by the host debugger.}
-
@item O@var{XX@dots{}}
@var{XX@dots{}} is hex encoding of @sc{ascii} data. This can happen at
@@ -20202,6 +20451,82 @@ encoded). @value{GDBN} will continue to supply the values of symbols
(if available), until the target ceases to request them.
@end table
+@item @code{qPart}:@var{object}:@code{read}:@var{annex}:@var{offset},@var{length} --- read special data
+
+Read uninterpreted bytes from the target's special data area
+identified by the keyword @code{object}.
+Request @var{length} bytes starting at @var{offset} bytes into the data.
+The content and encoding of @var{annex} is specific to the object;
+it can supply additional details about what data to access.
+
+Here are the specific requests of this form defined so far.
+All @samp{@code{qPart}:@var{object}:@code{read}:@dots{}}
+requests use the same reply formats, listed below.
+
+@table @asis
+@item @code{qPart}:@code{auxv}:@code{read}::@var{offset},@var{length}
+Access the target's @dfn{auxiliary vector}. @xref{Auxiliary Vector}.
+Note @var{annex} must be empty.
+@end table
+
+Reply:
+@table @asis
+@item @code{OK}
+The @var{offset} in the request is at the end of the data.
+There is no more data to be read.
+
+@item @var{XX@dots{}}
+Hex encoded data bytes read.
+This may be fewer bytes than the @var{length} in the request.
+
+@item @code{E00}
+The request was malformed, or @var{annex} was invalid.
+
+@item @code{E}@var{nn}
+The offset was invalid, or there was an error encountered reading the data.
+@var{nn} is a hex-encoded @code{errno} value.
+
+@item @code{""} (empty)
+An empty reply indicates the @var{object} or @var{annex} string was not
+recognized by the stub.
+@end table
+
+@item @code{qPart}:@var{object}:@code{write}:@var{annex}:@var{offset}:@var{data@dots{}}
+
+Write uninterpreted bytes into the target's special data area
+identified by the keyword @code{object},
+starting at @var{offset} bytes into the data.
+@var{data@dots{}} is the hex-encoded data to be written.
+The content and encoding of @var{annex} is specific to the object;
+it can supply additional details about what data to access.
+
+No requests of this form are presently in use. This specification
+serves as a placeholder to document the common format that new
+specific request specifications ought to use.
+
+Reply:
+@table @asis
+@item @var{nn}
+@var{nn} (hex encoded) is the number of bytes written.
+This may be fewer bytes than supplied in the request.
+
+@item @code{E00}
+The request was malformed, or @var{annex} was invalid.
+
+@item @code{E}@var{nn}
+The offset was invalid, or there was an error encountered writing the data.
+@var{nn} is a hex-encoded @code{errno} value.
+
+@item @code{""} (empty)
+An empty reply indicates the @var{object} or @var{annex} string was not
+recognized by the stub, or that the object does not support writing.
+@end table
+
+@item @code{qPart}:@var{object}:@var{operation}:@dots{}
+Requests of this form may be added in the future. When a stub does
+not recognize the @var{object} keyword, or its support for
+@var{object} does not recognize the @var{operation} keyword,
+the stub must respond with an empty packet.
@end table
@node Register Packet Format
@@ -20269,8 +20594,8 @@ Example sequence of a target being stepped by a single instruction:
@menu
* File-I/O Overview::
* Protocol basics::
-* The `F' request packet::
-* The `F' reply packet::
+* The F request packet::
+* The F reply packet::
* Memory transfer::
* The Ctrl-C message::
* Console I/O::
@@ -20332,20 +20657,20 @@ system are not supported by this protocol.
The File-I/O protocol uses the @code{F} packet, as request as well
as as reply packet. Since a File-I/O system call can only occur when
-@value{GDBN} is waiting for the continuing or stepping target, the
+@value{GDBN} is waiting for the continuing or stepping target, the
File-I/O request is a reply that @value{GDBN} has to expect as a result
of a former @samp{C}, @samp{c}, @samp{S} or @samp{s} packet.
This @code{F} packet contains all information needed to allow @value{GDBN}
to call the appropriate host system call:
@itemize @bullet
-@item
+@item
A unique identifier for the requested system call.
@item
All parameters to the system call. Pointers are given as addresses
in the target memory address space. Pointers to strings are given as
-pointer/length pair. Numerical values are given as they are.
+pointer/length pair. Numerical values are given as they are.
Numerical control values are given in a protocol specific representation.
@end itemize
@@ -20353,7 +20678,7 @@ Numerical control values are given in a protocol specific representation.
At that point @value{GDBN} has to perform the following actions.
@itemize @bullet
-@item
+@item
If parameter pointer values are given, which point to data needed as input
to a system call, @value{GDBN} requests this data from the target with a
standard @code{m} packet request. This additional communication has to be
@@ -20397,7 +20722,7 @@ Return value.
After having done the needed type and value coercion, the target continues
the latest continue or step action.
-@node The `F' request packet
+@node The F request packet
@subsection The @code{F} request packet
@cindex file-i/o request packet
@cindex @code{F} request packet
@@ -20415,7 +20740,7 @@ This is just the name of the function.
@var{parameter@dots{}} are the parameters to the system call.
-@end table
+@end table
Parameters are hexadecimal integer values, either the real values in case
of scalar datatypes, as pointers to target buffer space in case of compound
@@ -20424,7 +20749,7 @@ of string parameters. These are appended to the call-id, each separated
from its predecessor by a comma. All values are transmitted in ASCII
string representation, pointer/length pairs separated by a slash.
-@node The `F' reply packet
+@node The F reply packet
@subsection The @code{F} reply packet
@cindex file-i/o reply packet
@cindex @code{F} reply packet
@@ -20482,7 +20807,7 @@ reply packet. In this case the target should behave, as if it had
gotten a break message. The meaning for the target is ``system call
interupted by @code{SIGINT}''. Consequentially, the target should actually stop
(as with a break message) and return to @value{GDBN} with a @code{T02}
-packet. In this case, it's important for the target to know, in which
+packet. In this case, it's important for the target to know, in which
state the system call was interrupted. Since this action is by design
not an atomic operation, we have to differ between two cases:
@@ -20567,7 +20892,7 @@ in case the user pressed @kbd{Ctrl-C}. Otherwise the return value consists
entirely of the exit status of the called command.
Due to security concerns, the @code{system} call is refused to be called
-by @value{GDBN} by default. The user has to allow this call explicitly by
+by @value{GDBN} by default. The user has to allow this call explicitly by
entering
@table @samp
@@ -20616,7 +20941,7 @@ The current setting is shown by typing
int open(const char *pathname, int flags);
int open(const char *pathname, int flags, mode_t mode);
-@exdent Request:
+@exdent Request:
Fopen,pathptr/len,flags,mode
@end smallexample
@@ -20624,30 +20949,30 @@ Fopen,pathptr/len,flags,mode
@code{flags} is the bitwise or of the following values:
@table @code
-@item O_CREAT
+@item O_CREAT
If the file does not exist it will be created. The host
rules apply as far as file ownership and time stamps
are concerned.
-@item O_EXCL
+@item O_EXCL
When used with O_CREAT, if the file already exists it is
an error and open() fails.
-@item O_TRUNC
+@item O_TRUNC
If the file already exists and the open mode allows
writing (O_RDWR or O_WRONLY is given) it will be
truncated to length 0.
-@item O_APPEND
+@item O_APPEND
The file is opened in append mode.
-@item O_RDONLY
+@item O_RDONLY
The file is opened for reading only.
-@item O_WRONLY
+@item O_WRONLY
The file is opened for writing only.
-@item O_RDWR
+@item O_RDWR
The file is opened for reading and writing.
@noindent
@@ -20659,22 +20984,22 @@ Each other bit is silently ignored.
@code{mode} is the bitwise or of the following values:
@table @code
-@item S_IRUSR
+@item S_IRUSR
User has read permission.
-@item S_IWUSR
+@item S_IWUSR
User has write permission.
-@item S_IRGRP
+@item S_IRGRP
Group has read permission.
-@item S_IWGRP
+@item S_IWGRP
Group has write permission.
-@item S_IROTH
+@item S_IROTH
Others have read permission.
-@item S_IWOTH
+@item S_IWOTH
Others have write permission.
@noindent
@@ -20691,42 +21016,42 @@ occured.
@end smallexample
@table @code
-@item EEXIST
+@item EEXIST
pathname already exists and O_CREAT and O_EXCL were used.
-@item EISDIR
+@item EISDIR
pathname refers to a directory.
-@item EACCES
+@item EACCES
The requested access is not allowed.
@item ENAMETOOLONG
pathname was too long.
-@item ENOENT
+@item ENOENT
A directory component in pathname does not exist.
-@item ENODEV
+@item ENODEV
pathname refers to a device, pipe, named pipe or socket.
-@item EROFS
+@item EROFS
pathname refers to a file on a read-only filesystem and
write access was requested.
-@item EFAULT
+@item EFAULT
pathname is an invalid pointer value.
-@item ENOSPC
+@item ENOSPC
No space on device to create the file.
-@item EMFILE
+@item EMFILE
The process already has the maximum number of files open.
-@item ENFILE
+@item ENFILE
The limit on the total number of files open on the system
has been reached.
-@item EINTR
+@item EINTR
The call was interrupted by the user.
@end table
@@ -20735,10 +21060,10 @@ The call was interrupted by the user.
@cindex close, file-i/o system call
@smallexample
-@exdent Synopsis:
+@exdent Synopsis:
int close(int fd);
-@exdent Request:
+@exdent Request:
Fclose,fd
@exdent Return value:
@@ -20748,10 +21073,10 @@ close returns zero on success, or -1 if an error occurred.
@end smallexample
@table @code
-@item EBADF
+@item EBADF
fd isn't a valid open file descriptor.
-@item EINTR
+@item EINTR
The call was interrupted by the user.
@end table
@@ -20760,29 +21085,29 @@ The call was interrupted by the user.
@cindex read, file-i/o system call
@smallexample
-@exdent Synopsis:
+@exdent Synopsis:
int read(int fd, void *buf, unsigned int count);
-@exdent Request:
+@exdent Request:
Fread,fd,bufptr,count
@exdent Return value:
On success, the number of bytes read is returned.
Zero indicates end of file. If count is zero, read
-returns zero as well. On error, -1 is returned.
+returns zero as well. On error, -1 is returned.
@exdent Errors:
@end smallexample
@table @code
-@item EBADF
+@item EBADF
fd is not a valid file descriptor or is not open for
reading.
-@item EFAULT
+@item EFAULT
buf is an invalid pointer value.
-@item EINTR
+@item EINTR
The call was interrupted by the user.
@end table
@@ -20791,10 +21116,10 @@ The call was interrupted by the user.
@cindex write, file-i/o system call
@smallexample
-@exdent Synopsis:
+@exdent Synopsis:
int write(int fd, const void *buf, unsigned int count);
-@exdent Request:
+@exdent Request:
Fwrite,fd,bufptr,count
@exdent Return value:
@@ -20806,21 +21131,21 @@ is returned.
@end smallexample
@table @code
-@item EBADF
+@item EBADF
fd is not a valid file descriptor or is not open for
writing.
-@item EFAULT
+@item EFAULT
buf is an invalid pointer value.
-@item EFBIG
+@item EFBIG
An attempt was made to write a file that exceeds the
host specific maximum file size allowed.
-@item ENOSPC
+@item ENOSPC
No space on device to write the data.
-@item EINTR
+@item EINTR
The call was interrupted by the user.
@end table
@@ -20829,24 +21154,24 @@ The call was interrupted by the user.
@cindex lseek, file-i/o system call
@smallexample
-@exdent Synopsis:
+@exdent Synopsis:
long lseek (int fd, long offset, int flag);
-@exdent Request:
+@exdent Request:
Flseek,fd,offset,flag
@end smallexample
@code{flag} is one of:
@table @code
-@item SEEK_SET
+@item SEEK_SET
The offset is set to offset bytes.
-@item SEEK_CUR
+@item SEEK_CUR
The offset is set to its current location plus offset
bytes.
-@item SEEK_END
+@item SEEK_END
The offset is set to the size of the file plus offset
bytes.
@end table
@@ -20861,16 +21186,16 @@ value of -1 is returned.
@end smallexample
@table @code
-@item EBADF
+@item EBADF
fd is not a valid open file descriptor.
-@item ESPIPE
+@item ESPIPE
fd is associated with the @value{GDBN} console.
-@item EINVAL
+@item EINVAL
flag is not a proper value.
-@item EINTR
+@item EINTR
The call was interrupted by the user.
@end table
@@ -20879,10 +21204,10 @@ The call was interrupted by the user.
@cindex rename, file-i/o system call
@smallexample
-@exdent Synopsis:
+@exdent Synopsis:
int rename(const char *oldpath, const char *newpath);
-@exdent Request:
+@exdent Request:
Frename,oldpathptr/len,newpathptr/len
@exdent Return value:
@@ -20892,47 +21217,47 @@ On success, zero is returned. On error, -1 is returned.
@end smallexample
@table @code
-@item EISDIR
+@item EISDIR
newpath is an existing directory, but oldpath is not a
directory.
-@item EEXIST
+@item EEXIST
newpath is a non-empty directory.
-@item EBUSY
+@item EBUSY
oldpath or newpath is a directory that is in use by some
process.
-@item EINVAL
+@item EINVAL
An attempt was made to make a directory a subdirectory
of itself.
-@item ENOTDIR
+@item ENOTDIR
A component used as a directory in oldpath or new
path is not a directory. Or oldpath is a directory
and newpath exists but is not a directory.
-@item EFAULT
+@item EFAULT
oldpathptr or newpathptr are invalid pointer values.
-@item EACCES
+@item EACCES
No access to the file or the path of the file.
@item ENAMETOOLONG
-
+
oldpath or newpath was too long.
-@item ENOENT
+@item ENOENT
A directory component in oldpath or newpath does not exist.
-@item EROFS
+@item EROFS
The file is on a read-only filesystem.
-@item ENOSPC
+@item ENOSPC
The device containing the file has no room for the new
directory entry.
-@item EINTR
+@item EINTR
The call was interrupted by the user.
@end table
@@ -20941,10 +21266,10 @@ The call was interrupted by the user.
@cindex unlink, file-i/o system call
@smallexample
-@exdent Synopsis:
+@exdent Synopsis:
int unlink(const char *pathname);
-@exdent Request:
+@exdent Request:
Funlink,pathnameptr/len
@exdent Return value:
@@ -20954,32 +21279,32 @@ On success, zero is returned. On error, -1 is returned.
@end smallexample
@table @code
-@item EACCES
+@item EACCES
No access to the file or the path of the file.
-@item EPERM
+@item EPERM
The system does not allow unlinking of directories.
-@item EBUSY
+@item EBUSY
The file pathname cannot be unlinked because it's
being used by another process.
-@item EFAULT
+@item EFAULT
pathnameptr is an invalid pointer value.
@item ENAMETOOLONG
pathname was too long.
-@item ENOENT
+@item ENOENT
A directory component in pathname does not exist.
-@item ENOTDIR
+@item ENOTDIR
A component of the path is not a directory.
-@item EROFS
+@item EROFS
The file is on a read-only filesystem.
-@item EINTR
+@item EINTR
The call was interrupted by the user.
@end table
@@ -20989,11 +21314,11 @@ The call was interrupted by the user.
@cindex stat, file-i/o system call
@smallexample
-@exdent Synopsis:
+@exdent Synopsis:
int stat(const char *pathname, struct stat *buf);
int fstat(int fd, struct stat *buf);
-@exdent Request:
+@exdent Request:
Fstat,pathnameptr/len,bufptr
Ffstat,fd,bufptr
@@ -21004,26 +21329,26 @@ On success, zero is returned. On error, -1 is returned.
@end smallexample
@table @code
-@item EBADF
+@item EBADF
fd is not a valid open file.
-@item ENOENT
+@item ENOENT
A directory component in pathname does not exist or the
path is an empty string.
-@item ENOTDIR
+@item ENOTDIR
A component of the path is not a directory.
-@item EFAULT
+@item EFAULT
pathnameptr is an invalid pointer value.
-@item EACCES
+@item EACCES
No access to the file or the path of the file.
@item ENAMETOOLONG
pathname was too long.
-@item EINTR
+@item EINTR
The call was interrupted by the user.
@end table
@@ -21032,10 +21357,10 @@ The call was interrupted by the user.
@cindex gettimeofday, file-i/o system call
@smallexample
-@exdent Synopsis:
+@exdent Synopsis:
int gettimeofday(struct timeval *tv, void *tz);
-@exdent Request:
+@exdent Request:
Fgettimeofday,tvptr,tzptr
@exdent Return value:
@@ -21045,10 +21370,10 @@ On success, 0 is returned, -1 otherwise.
@end smallexample
@table @code
-@item EINVAL
+@item EINVAL
tz is a non-NULL pointer.
-@item EFAULT
+@item EFAULT
tvptr and/or tzptr is an invalid pointer value.
@end table
@@ -21057,10 +21382,10 @@ tvptr and/or tzptr is an invalid pointer value.
@cindex isatty, file-i/o system call
@smallexample
-@exdent Synopsis:
+@exdent Synopsis:
int isatty(int fd);
-@exdent Request:
+@exdent Request:
Fisatty,fd
@exdent Return value:
@@ -21070,7 +21395,7 @@ Returns 1 if fd refers to the @value{GDBN} console, 0 otherwise.
@end smallexample
@table @code
-@item EINTR
+@item EINTR
The call was interrupted by the user.
@end table
@@ -21079,10 +21404,10 @@ The call was interrupted by the user.
@cindex system, file-i/o system call
@smallexample
-@exdent Synopsis:
+@exdent Synopsis:
int system(const char *command);
-@exdent Request:
+@exdent Request:
Fsystem,commandptr/len
@exdent Return value:
@@ -21096,7 +21421,7 @@ In case /bin/sh could not be executed, 127 is returned.
@end smallexample
@table @code
-@item EINTR
+@item EINTR
The call was interrupted by the user.
@end table
@@ -21124,8 +21449,8 @@ int@r{,} unsigned int@r{,} long@r{,} unsigned long@r{,} mode_t @r{and} time_t
@code{Int}, @code{unsigned int}, @code{mode_t} and @code{time_t} are
implemented as 32 bit values in this protocol.
-@code{Long} and @code{unsigned long} are implemented as 64 bit types.
-
+@code{Long} and @code{unsigned long} are implemented as 64 bit types.
+
@xref{Limits}, for corresponding MIN and MAX values (similar to those
in @file{limits.h}) to allow range checking on host and target.
@@ -21233,7 +21558,7 @@ The buffer of type struct timeval used by the target and @value{GDBN}
is defined as follows:
@smallexample
-struct timeval @{
+struct timeval @{
time_t tv_sec; /* second */
long tv_usec; /* microsecond */
@};
@@ -21409,7 +21734,9 @@ host is called:
@include gpl.texi
+@raisesections
@include fdl.texi
+@lowersections
@node Index
@unnumbered Index
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 3ed887b36df..a474015783b 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -8,7 +8,7 @@
@ifinfo
This file documents the internals of the GNU debugger @value{GDBN}.
-Copyright 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,2002,2003
+Copyright 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,2002,2003,2004
Free Software Foundation, Inc.
Contributed by Cygnus Solutions. Written by John Gilmore.
Second Edition by Stan Shebs.
@@ -38,7 +38,7 @@ Free Documentation License''.
@page
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.161 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.161.2.1 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Solutions\par
\hfill \manvers\par
@@ -48,7 +48,7 @@ Free Documentation License''.
@vskip 0pt plus 1filll
Copyright @copyright{} 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,
- 2002, 2003 Free Software Foundation, Inc.
+ 2002, 2003, 2004 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -480,13 +480,6 @@ two macros can use them for their internal purposes.
If the inferior has some watchpoint that triggered, return the address
associated with that watchpoint. Otherwise, return zero.
-@findex DECR_PC_AFTER_HW_BREAK
-@item DECR_PC_AFTER_HW_BREAK
-If defined, @value{GDBN} decrements the program counter by the value
-of @code{DECR_PC_AFTER_HW_BREAK} after a hardware break-point. This
-overrides the value of @code{DECR_PC_AFTER_BREAK} when a breakpoint
-that breaks is a hardware-assisted breakpoint.
-
@findex HAVE_STEPPABLE_WATCHPOINT
@item HAVE_STEPPABLE_WATCHPOINT
If defined to a non-zero value, it is not necessary to disable a
@@ -2245,12 +2238,6 @@ This macro is used as the argument to @code{lseek} (or, most commonly,
@code{bfd_seek}). FIXME, should be replaced by SEEK_SET instead,
which is the POSIX equivalent.
-@item MMAP_BASE_ADDRESS
-When using HAVE_MMAP, the first mapping should go at this address.
-
-@item MMAP_INCREMENT
-when using HAVE_MMAP, this is the increment between mappings.
-
@item NORETURN
If defined, this should be one or more tokens, such as @code{volatile},
that can be used in both the declaration and definition of functions to
@@ -2264,37 +2251,6 @@ of functions to indicate that they never return. The default is already
set correctly if compiling with GCC. This will almost never need to be
defined.
-@item USE_MMALLOC
-@findex mmalloc
-@value{GDBN} will use the @code{mmalloc} library for memory allocation
-for symbol reading if this symbol is defined. Be careful defining it
-since there are systems on which @code{mmalloc} does not work for some
-reason. One example is the DECstation, where its RPC library can't
-cope with our redefinition of @code{malloc} to call @code{mmalloc}.
-When defining @code{USE_MMALLOC}, you will also have to set
-@code{MMALLOC} in the Makefile, to point to the @code{mmalloc} library. This
-define is set when you configure with @samp{--with-mmalloc}.
-
-@item NO_MMCHECK
-@findex mmcheck
-Define this if you are using @code{mmalloc}, but don't want the overhead
-of checking the heap with @code{mmcheck}. Note that on some systems,
-the C runtime makes calls to @code{malloc} prior to calling @code{main}, and if
-@code{free} is ever called with these pointers after calling
-@code{mmcheck} to enable checking, a memory corruption abort is certain
-to occur. These systems can still use @code{mmalloc}, but must define
-@code{NO_MMCHECK}.
-
-@item MMCHECK_FORCE
-Define this to 1 if the C runtime allocates memory prior to
-@code{mmcheck} being called, but that memory is never freed so we don't
-have to worry about it triggering a memory corruption abort. The
-default is 0, which means that @code{mmcheck} will only install the heap
-checking functions if there has not yet been any memory allocation
-calls, and if it fails to install the functions, @value{GDBN} will issue a
-warning. This is currently defined if you configure using
-@samp{--with-mmalloc}.
-
@item NO_SIGINTERRUPT
@findex siginterrupt
Define this to indicate that @code{siginterrupt} is not available.
@@ -2505,7 +2461,7 @@ However, architectures with smaller word sizes are often cramped for
address space, so they may choose a pointer representation that breaks this
identity, and allows a larger code address space.
-For example, the Mitsubishi D10V is a 16-bit VLIW processor whose
+For example, the Renesas D10V is a 16-bit VLIW processor whose
instructions are 32 bits long@footnote{Some D10V instructions are
actually pairs of 16-bit sub-instructions. However, since you can't
jump into the middle of such a pair, code addresses can only refer to
@@ -2766,19 +2722,19 @@ You should not use @code{REGISTER_CONVERT_TO_VIRTUAL} for a register
unless this macro returns a non-zero value for that register.
@end deftypefn
-@deftypefn {Target Macro} int REGISTER_RAW_SIZE (int @var{reg})
+@deftypefn {Target Macro} int DEPRECATED_REGISTER_RAW_SIZE (int @var{reg})
The size of register number @var{reg}'s raw value. This is the number
of bytes the register will occupy in @code{registers}, or in a @value{GDBN}
remote protocol packet.
@end deftypefn
-@deftypefn {Target Macro} int REGISTER_VIRTUAL_SIZE (int @var{reg})
+@deftypefn {Target Macro} int DEPRECATED_REGISTER_VIRTUAL_SIZE (int @var{reg})
The size of register number @var{reg}'s value, in its virtual format.
This is the size a @code{struct value}'s buffer will have, holding that
register's value.
@end deftypefn
-@deftypefn {Target Macro} struct type *REGISTER_VIRTUAL_TYPE (int @var{reg})
+@deftypefn {Target Macro} struct type *DEPRECATED_REGISTER_VIRTUAL_TYPE (int @var{reg})
This is the type of the virtual representation of register number
@var{reg}. Note that there is no need for a macro giving a type for the
register's raw form; once the register's value has been obtained, @value{GDBN}
@@ -2787,7 +2743,7 @@ always uses the virtual form.
@deftypefn {Target Macro} void REGISTER_CONVERT_TO_VIRTUAL (int @var{reg}, struct type *@var{type}, char *@var{from}, char *@var{to})
Convert the value of register number @var{reg} to @var{type}, which
-should always be @code{REGISTER_VIRTUAL_TYPE (@var{reg})}. The buffer
+should always be @code{DEPRECATED_REGISTER_VIRTUAL_TYPE (@var{reg})}. The buffer
at @var{from} holds the register's value in raw format; the macro should
convert the value to virtual format, and place it at @var{to}.
@@ -2802,7 +2758,7 @@ value.
@deftypefn {Target Macro} void REGISTER_CONVERT_TO_RAW (struct type *@var{type}, int @var{reg}, char *@var{from}, char *@var{to})
Convert the value of register number @var{reg} to @var{type}, which
-should always be @code{REGISTER_VIRTUAL_TYPE (@var{reg})}. The buffer
+should always be @code{DEPRECATED_REGISTER_VIRTUAL_TYPE (@var{reg})}. The buffer
at @var{from} holds the register's value in raw format; the macro should
convert the value to virtual format, and place it at @var{to}.
@@ -3052,6 +3008,39 @@ custom breakpoint insertion and removal routines if
@code{BREAKPOINT_FROM_PC} needs to read the target's memory for some
reason.
+@item ADJUST_BREAKPOINT_ADDRESS (@var{address})
+@findex ADJUST_BREAKPOINT_ADDRESS
+@cindex breakpoint address adjusted
+Given an address at which a breakpoint is desired, return a breakpoint
+address adjusted to account for architectural constraints on
+breakpoint placement. This method is not needed by most targets.
+
+The FR-V target (see @file{frv-tdep.c}) requires this method.
+The FR-V is a VLIW architecture in which a number of RISC-like
+instructions are grouped (packed) together into an aggregate
+instruction or instruction bundle. When the processor executes
+one of these bundles, the component instructions are executed
+in parallel.
+
+In the course of optimization, the compiler may group instructions
+from distinct source statements into the same bundle. The line number
+information associated with one of the latter statements will likely
+refer to some instruction other than the first one in the bundle. So,
+if the user attempts to place a breakpoint on one of these latter
+statements, @value{GDBN} must be careful to @emph{not} place the break
+instruction on any instruction other than the first one in the bundle.
+(Remember though that the instructions within a bundle execute
+in parallel, so the @emph{first} instruction is the instruction
+at the lowest address and has nothing to do with execution order.)
+
+The FR-V's @code{ADJUST_BREAKPOINT_ADDRESS} method will adjust a
+breakpoint's address by scanning backwards for the beginning of
+the bundle, returning the address of the bundle.
+
+Since the adjustment of a breakpoint may significantly alter a user's
+expectation, @value{GDBN} prints a warning when an adjusted breakpoint
+is initially set and each time that that breakpoint is hit.
+
@item DEPRECATED_CALL_DUMMY_WORDS
@findex DEPRECATED_CALL_DUMMY_WORDS
Pointer to an array of @code{LONGEST} words of data containing
@@ -3088,12 +3077,6 @@ See the file @file{inferior.h}.
This method has been replaced by @code{push_dummy_code}
(@pxref{push_dummy_code}).
-@item DEPRECATED_CALL_DUMMY_STACK_ADJUST
-@findex DEPRECATED_CALL_DUMMY_STACK_ADJUST
-Stack adjustment needed when performing an inferior function call. This
-function is no longer needed. @xref{push_dummy_call}, which can handle
-all alignment directly.
-
@item CANNOT_FETCH_REGISTER (@var{regno})
@findex CANNOT_FETCH_REGISTER
A C expression that should be nonzero if @var{regno} cannot be fetched
@@ -3128,10 +3111,6 @@ Define this to be the amount by which to decrement the PC after the
program encounters a breakpoint. This is often the number of bytes in
@code{BREAKPOINT}, though not always. For most targets this value will be 0.
-@item DECR_PC_AFTER_HW_BREAK
-@findex DECR_PC_AFTER_HW_BREAK
-Similarly, for hardware breakpoints.
-
@item DISABLE_UNSETTABLE_BREAK (@var{addr})
@findex DISABLE_UNSETTABLE_BREAK
If defined, this should evaluate to 1 if @var{addr} is in a shared
@@ -3186,17 +3165,21 @@ Define this to extract a function's return value of type @var{type} from
the raw register state @var{regbuf} and copy that, in virtual format,
into @var{valbuf}.
-@item EXTRACT_STRUCT_VALUE_ADDRESS(@var{regbuf})
-@findex EXTRACT_STRUCT_VALUE_ADDRESS
+This method has been deprecated in favour of @code{gdbarch_return_value}
+(@pxref{gdbarch_return_value}).
+
+@item DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(@var{regbuf})
+@findex DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
+@anchor{DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS}
When defined, extract from the array @var{regbuf} (containing the raw
register state) the @code{CORE_ADDR} at which a function should return
its structure value.
-If not defined, @code{EXTRACT_RETURN_VALUE} is used.
+@xref{gdbarch_return_value}.
-@item EXTRACT_STRUCT_VALUE_ADDRESS_P()
-@findex EXTRACT_STRUCT_VALUE_ADDRESS_P
-Predicate for @code{EXTRACT_STRUCT_VALUE_ADDRESS}.
+@item DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()
+@findex DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
+Predicate for @code{DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS}.
@item DEPRECATED_FP_REGNUM
@findex DEPRECATED_FP_REGNUM
@@ -3206,8 +3189,8 @@ macro to be the number (greater than or equal to zero) of that register.
This should only need to be defined if @code{DEPRECATED_TARGET_READ_FP}
is not defined.
-@item FRAMELESS_FUNCTION_INVOCATION(@var{fi})
-@findex FRAMELESS_FUNCTION_INVOCATION
+@item DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(@var{fi})
+@findex DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
Define this to an expression that returns 1 if the function invocation
represented by @var{fi} does not have a stack frame associated with it.
Otherwise return 0.
@@ -3382,9 +3365,9 @@ pointer. It examines the current state of the machine as needed.
Define this if you need to supply your own definition for the function
@code{DEPRECATED_GET_SAVED_REGISTER}.
-@item IBM6000_TARGET
-@findex IBM6000_TARGET
-Shows that we are configured for an IBM RS/6000 target. This
+@item DEPRECATED_IBM6000_TARGET
+@findex DEPRECATED_IBM6000_TARGET
+Shows that we are configured for an IBM RS/6000 system. This
conditional should be eliminated (FIXME) and replaced by
feature-specific macros. It was introduced in a haste and we are
repenting at leisure.
@@ -3483,11 +3466,6 @@ method like @code{INTEGER_TO_ADDRESS} certainly makes it possible for
@xref{Target Architecture Definition, , Pointers Are Not Always
Addresses}.
-@item NEED_TEXT_START_END
-@findex NEED_TEXT_START_END
-Define this if @value{GDBN} should determine the start and end addresses of the
-text section. (Seems dubious.)
-
@item NO_HIF_SUPPORT
@findex NO_HIF_SUPPORT
(Specific to the a29k.)
@@ -3510,8 +3488,8 @@ Convert the raw contents of register @var{regnum} into a value of type
@var{type}.
@xref{Target Architecture Definition, , Using Different Register and Memory Data Representations}.
-@item REGISTER_RAW_SIZE (@var{reg})
-@findex REGISTER_RAW_SIZE
+@item DEPRECATED_REGISTER_RAW_SIZE (@var{reg})
+@findex DEPRECATED_REGISTER_RAW_SIZE
Return the raw size of @var{reg}; defaults to the size of the register's
virtual type.
@xref{Target Architecture Definition, , Raw and Virtual Register Representations}.
@@ -3538,14 +3516,14 @@ floating-point. @samp{float_reggroup}.
Any register with a valid name.
@end table
-@item REGISTER_VIRTUAL_SIZE (@var{reg})
-@findex REGISTER_VIRTUAL_SIZE
+@item DEPRECATED_REGISTER_VIRTUAL_SIZE (@var{reg})
+@findex DEPRECATED_REGISTER_VIRTUAL_SIZE
Return the virtual size of @var{reg}; defaults to the size of the
register's virtual type.
Return the virtual size of @var{reg}.
@xref{Target Architecture Definition, , Raw and Virtual Register Representations}.
-@item REGISTER_VIRTUAL_TYPE (@var{reg})
+@item DEPRECATED_REGISTER_VIRTUAL_TYPE (@var{reg})
@findex REGISTER_VIRTUAL_TYPE
Return the virtual type of @var{reg}.
@xref{Target Architecture Definition, , Raw and Virtual Register Representations}.
@@ -3553,7 +3531,7 @@ Return the virtual type of @var{reg}.
@item struct type *register_type (@var{gdbarch}, @var{reg})
@findex register_type
If defined, return the type of register @var{reg}. This function
-superseeds @code{REGISTER_VIRTUAL_TYPE}. @xref{Target Architecture
+superseeds @code{DEPRECATED_REGISTER_VIRTUAL_TYPE}. @xref{Target Architecture
Definition, , Raw and Virtual Register Representations}.
@item REGISTER_CONVERT_TO_VIRTUAL(@var{reg}, @var{type}, @var{from}, @var{to})
@@ -3568,6 +3546,12 @@ Convert the value of register @var{reg} from its virtual form to its raw
form.
@xref{Target Architecture Definition, , Raw and Virtual Register Representations}.
+@item const struct regset *regset_from_core_section (struct gdbarch * @var{gdbarch}, const char * @var{sect_name}, size_t @var{sect_size})
+@findex regset_from_core_section
+Return the appropriate register set for a core file section with name
+@var{sect_name} and size @var{sect_size}.
+
+
@item RETURN_VALUE_ON_STACK(@var{type})
@findex RETURN_VALUE_ON_STACK
@cindex returning structures by value
@@ -3677,15 +3661,21 @@ be the number (greater than or equal to zero) of that register.
This should only need to be defined if @code{TARGET_READ_PC} and
@code{TARGET_WRITE_PC} are not defined.
-@item NPC_REGNUM
-@findex NPC_REGNUM
-The number of the ``next program counter'' register, if defined.
-
@item PARM_BOUNDARY
@findex PARM_BOUNDARY
If non-zero, round arguments to a boundary of this many bits before
pushing them on the stack.
+@item stabs_argument_has_addr (@var{gdbarch}, @var{type})
+@findex stabs_argument_has_addr
+@findex DEPRECATED_REG_STRUCT_HAS_ADDR
+@anchor{stabs_argument_has_addr} Define this to return nonzero if a
+function argument of type @var{type} is passed by reference instead of
+value.
+
+This method replaces @code{DEPRECATED_REG_STRUCT_HAS_ADDR}
+(@pxref{DEPRECATED_REG_STRUCT_HAS_ADDR}).
+
@item PROCESS_LINENUMBER_HOOK
@findex PROCESS_LINENUMBER_HOOK
A hook defined for XCOFF reading.
@@ -3735,7 +3725,6 @@ reserved for that breakpoint, and @var{real_pc} set to @var{funaddr}.
This method replaces @code{DEPRECATED_CALL_DUMMY_WORDS},
@code{DEPRECATED_SIZEOF_CALL_DUMMY_WORDS}, @code{CALL_DUMMY},
@code{CALL_DUMMY_LOCATION}, @code{DEPRECATED_REGISTER_SIZE},
-@code{GDB_TARGET_IS_HPPA},
@code{DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET}, and
@code{DEPRECATED_FIX_CALL_DUMMY}.
@@ -3756,14 +3745,13 @@ register buffer at run-time.
Return the name of register @var{i} as a string. May return @code{NULL}
or @code{NUL} to indicate that register @var{i} is not valid.
-@item REGISTER_NAMES
-@findex REGISTER_NAMES
-Deprecated in favor of @code{REGISTER_NAME}.
-
@item DEPRECATED_REG_STRUCT_HAS_ADDR (@var{gcc_p}, @var{type})
@findex DEPRECATED_REG_STRUCT_HAS_ADDR
-Define this to return 1 if the given type will be passed by pointer
-rather than directly.
+@anchor{DEPRECATED_REG_STRUCT_HAS_ADDR}Define this to return 1 if the
+given type will be passed by pointer rather than directly.
+
+This method has been replaced by @code{stabs_argument_has_addr}
+(@pxref{stabs_argument_has_addr}).
@item SAVE_DUMMY_FRAME_TOS (@var{sp})
@findex SAVE_DUMMY_FRAME_TOS
@@ -3778,6 +3766,48 @@ allocated on the stack. @xref{unwind_dummy_id}.
Define this to convert sdb register numbers into @value{GDBN} regnums. If not
defined, no conversion will be done.
+@item enum return_value_convention gdbarch_return_value (struct gdbarch *@var{gdbarch}, struct type *@var{valtype}, struct regcache *@var{regcache}, void *@var{readbuf}, const void *@var{writebuf})
+@findex gdbarch_return_value
+@anchor{gdbarch_return_value} Given a function with a return-value of
+type @var{rettype}, return which return-value convention that function
+would use.
+
+@value{GDBN} currently recognizes two function return-value conventions:
+@code{RETURN_VALUE_REGISTER_CONVENTION} where the return value is found
+in registers; and @code{RETURN_VALUE_STRUCT_CONVENTION} where the return
+value is found in memory and the address of that memory location is
+passed in as the function's first parameter.
+
+If the register convention is being used, and @var{writebuf} is
+non-@code{NULL}, also copy the return-value in @var{writebuf} into
+@var{regcache}.
+
+If the register convention is being used, and @var{readbuf} is
+non-@code{NULL}, also copy the return value from @var{regcache} into
+@var{readbuf} (@var{regcache} contains a copy of the registers from the
+just returned function).
+
+@xref{DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS}, for a description of how
+return-values that use the struct convention are handled.
+
+@emph{Maintainer note: This method replaces separate predicate, extract,
+store methods. By having only one method, the logic needed to determine
+the return-value convention need only be implemented in one place. If
+@value{GDBN} were written in an @sc{oo} language, this method would
+instead return an object that knew how to perform the register
+return-value extract and store.}
+
+@emph{Maintainer note: This method does not take a @var{gcc_p}
+parameter, and such a parameter should not be added. If an architecture
+that requires per-compiler or per-function information be identified,
+then the replacement of @var{rettype} with @code{struct value}
+@var{function} should be persued.}
+
+@emph{Maintainer note: The @var{regcache} parameter limits this methods
+to the inner most frame. While replacing @var{regcache} with a
+@code{struct frame_info} @var{frame} parameter would remove that
+limitation there has yet to be a demonstrated need for such a change.}
+
@item SKIP_PERMANENT_BREAKPOINT
@findex SKIP_PERMANENT_BREAKPOINT
Advance the inferior's PC past a permanent breakpoint. @value{GDBN} normally
@@ -3836,6 +3866,9 @@ A C expression that writes the function return value, found in
@var{valbuf}, into the @var{regcache}. @var{type} is the type of the
value that is to be returned.
+This method has been deprecated in favour of @code{gdbarch_return_value}
+(@pxref{gdbarch_return_value}).
+
@item SUN_FIXED_LBRAC_BUG
@findex SUN_FIXED_LBRAC_BUG
(Used only for Sun-3 and Sun-4 targets.)
@@ -3909,6 +3942,7 @@ Number of bits in a short integer; defaults to @code{2 * TARGET_CHAR_BIT}.
@findex TARGET_READ_PC
@itemx TARGET_WRITE_PC (@var{val}, @var{pid})
@findex TARGET_WRITE_PC
+@anchor{TARGET_WRITE_PC}
@itemx TARGET_READ_SP
@findex TARGET_READ_SP
@itemx TARGET_READ_FP
@@ -3970,6 +4004,9 @@ being considered is known to have been compiled by GCC; this is helpful
for systems where GCC is known to use different calling convention than
other compilers.
+This method has been deprecated in favour of @code{gdbarch_return_value}
+(@pxref{gdbarch_return_value}).
+
@item VALUE_TO_REGISTER(@var{type}, @var{regnum}, @var{from}, @var{to})
@findex VALUE_TO_REGISTER
Convert a value of type @var{type} into the raw contents of register
@@ -4634,6 +4671,66 @@ library because it's also used in binutils, for @file{objdump}).
@section mmalloc
@section libiberty
+@cindex @code{libiberty} library
+
+The @code{libiberty} library provides a set of functions and features
+that integrate and improve on functionality found in modern operating
+systems. Broadly speaking, such features can be divided into three
+groups: supplemental functions (functions that may be missing in some
+environments and operating systems), replacement functions (providing
+a uniform and easier to use interface for commonly used standard
+functions), and extensions (which provide additional functionality
+beyond standard functions).
+
+@value{GDBN} uses various features provided by the @code{libiberty}
+library, for instance the C@t{++} demangler, the @acronym{IEEE}
+floating format support functions, the input options parser
+@samp{getopt}, the @samp{obstack} extension, and other functions.
+
+@subsection @code{obstacks} in @value{GDBN}
+@cindex @code{obstacks}
+
+The obstack mechanism provides a convenient way to allocate and free
+chunks of memory. Each obstack is a pool of memory that is managed
+like a stack. Objects (of any nature, size and alignment) are
+allocated and freed in a @acronym{LIFO} fashion on an obstack (see
+@code{libiberty}'s documenatation for a more detailed explanation of
+@code{obstacks}).
+
+The most noticeable use of the @code{obstacks} in @value{GDBN} is in
+object files. There is an obstack associated with each internal
+representation of an object file. Lots of things get allocated on
+these @code{obstacks}: dictionary entries, blocks, blockvectors,
+symbols, minimal symbols, types, vectors of fundamental types, class
+fields of types, object files section lists, object files section
+offets lists, line tables, symbol tables, partial symbol tables,
+string tables, symbol table private data, macros tables, debug
+information sections and entries, import and export lists (som),
+unwind information (hppa), dwarf2 location expressions data. Plus
+various strings such as directory names strings, debug format strings,
+names of types.
+
+An essential and convenient property of all data on @code{obstacks} is
+that memory for it gets allocated (with @code{obstack_alloc}) at
+various times during a debugging sesssion, but it is released all at
+once using the @code{obstack_free} function. The @code{obstack_free}
+function takes a pointer to where in the stack it must start the
+deletion from (much like the cleanup chains have a pointer to where to
+start the cleanups). Because of the stack like structure of the
+@code{obstacks}, this allows to free only a top portion of the
+obstack. There are a few instances in @value{GDBN} where such thing
+happens. Calls to @code{obstack_free} are done after some local data
+is allocated to the obstack. Only the local data is deleted from the
+obstack. Of course this assumes that nothing between the
+@code{obstack_alloc} and the @code{obstack_free} allocates anything
+else on the same obstack. For this reason it is best and safest to
+use temporary @code{obstacks}.
+
+Releasing the whole obstack is also not safe per se. It is safe only
+under the condition that we know the @code{obstacks} memory is no
+longer needed. In @value{GDBN} we get rid of the @code{obstacks} only
+when we get rid of the whole objfile(s), for instance upon reading a
+new symbol file.
@section gnu-regex
@cindex regular expressions library
@@ -4774,138 +4871,104 @@ functions, since they might never return to your code (they
@cindex multi-arch data
@cindex data-pointer, per-architecture/per-module
-The multi-arch framework includes a mechanism for adding module specific
-per-architecture data-pointers to the @code{struct gdbarch} architecture
-object.
+The multi-arch framework includes a mechanism for adding module
+specific per-architecture data-pointers to the @code{struct gdbarch}
+architecture object.
-A module registers one or more per-architecture data-pointers using the
-function @code{register_gdbarch_data}:
+A module registers one or more per-architecture data-pointers using:
-@deftypefun struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *@var{init}, gdbarch_data_free_ftype *@var{free})
+@deftypefun struct gdbarch_data *gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *@var{pre_init})
+@var{pre_init} is used to, on-demand, allocate an initial value for a
+per-architecture data-pointer using the architecture's obstack (passed
+in as a parameter). Since @var{pre_init} can be called during
+architecture creation, it is not parameterized with the architecture.
+and must not call modules that use per-architecture data.
+@end deftypefun
-The @var{init} function is used to obtain an initial value for a
-per-architecture data-pointer. The function is called, after the
-architecture has been created, when the data-pointer is still
-uninitialized (@code{NULL}) and its value has been requested via a call
-to @code{gdbarch_data}. A data-pointer can also be initialize
-explicitly using @code{set_gdbarch_data}.
+@deftypefun struct gdbarch_data *gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *@var{post_init})
+@var{post_init} is used to obtain an initial value for a
+per-architecture data-pointer @emph{after}. Since @var{post_init} is
+always called after architecture creation, it both receives the fully
+initialized architecture and is free to call modules that use
+per-architecture data (care needs to be taken to ensure that those
+other modules do not try to call back to this module as that will
+create in cycles in the initialization call graph).
+@end deftypefun
-The @var{free} function is called when a data-pointer needs to be
-destroyed. This occurs when either the corresponding @code{struct
-gdbarch} object is being destroyed or when @code{set_gdbarch_data} is
-overriding a non-@code{NULL} data-pointer value.
+These functions return a @code{struct gdbarch_data} that is used to
+identify the per-architecture data-pointer added for that module.
-The function @code{register_gdbarch_data} returns a @code{struct
-gdbarch_data} that is used to identify the data-pointer that was added
-to the module.
+The per-architecture data-pointer is accessed using the function:
+@deftypefun void *gdbarch_data (struct gdbarch *@var{gdbarch}, struct gdbarch_data *@var{data_handle})
+Given the architecture @var{arch} and module data handle
+@var{data_handle} (returned by @code{gdbarch_data_register_pre_init}
+or @code{gdbarch_data_register_post_init}), this function returns the
+current value of the per-architecture data-pointer. If the data
+pointer is @code{NULL}, it is first initialized by calling the
+corresponding @var{pre_init} or @var{post_init} method.
@end deftypefun
-A typical module has @code{init} and @code{free} functions of the form:
+The examples below assume the following definitions:
@smallexample
+struct nozel @{ int total; @};
static struct gdbarch_data *nozel_handle;
-static void *
-nozel_init (struct gdbarch *gdbarch)
-@{
- struct nozel *data = XMALLOC (struct nozel);
- @dots{}
- return data;
-@}
-@dots{}
-static void
-nozel_free (struct gdbarch *gdbarch, void *data)
-@{
- xfree (data);
-@}
@end smallexample
-Since uninitialized (@code{NULL}) data-pointers are initialized
-on-demand, an @code{init} function is free to call other modules that
-use data-pointers. Those modules data-pointers will be initialized as
-needed. Care should be taken to ensure that the @code{init} call graph
-does not contain cycles.
+A module can extend the architecture vector, adding additional
+per-architecture data, using the @var{pre_init} method. The module's
+per-architecture data is then initialized during architecture
+creation.
-The data-pointer is registered with the call:
+In the below, the module's per-architecture @emph{nozel} is added. An
+architecture can specify its nozel by calling @code{set_gdbarch_nozel}
+from @code{gdbarch_init}.
@smallexample
-void
-_initialize_nozel (void)
+static void *
+nozel_pre_init (struct obstack *obstack)
@{
- nozel_handle = register_gdbarch_data (nozel_init, nozel_free);
-@dots{}
+ struct nozel *data = OBSTACK_ZALLOC (obstack, struct nozel);
+ return data;
+@}
@end smallexample
-The per-architecture data-pointer is accessed using the function:
-
-@deftypefun void *gdbarch_data (struct gdbarch *@var{gdbarch}, struct gdbarch_data *@var{data_handle})
-Given the architecture @var{arch} and module data handle
-@var{data_handle} (returned by @code{register_gdbarch_data}, this
-function returns the current value of the per-architecture data-pointer.
-@end deftypefun
-
-The non-@code{NULL} data-pointer returned by @code{gdbarch_data} should
-be saved in a local variable and then used directly:
-
@smallexample
-int
-nozel_total (struct gdbarch *gdbarch)
+extern void
+set_gdbarch_nozel (struct gdbarch *gdbarch, int total)
@{
- int total;
struct nozel *data = gdbarch_data (gdbarch, nozel_handle);
- @dots{}
- return total;
+ data->total = nozel;
@}
@end smallexample
-It is also possible to directly initialize the data-pointer using:
+A module can on-demand create architecture dependant data structures
+using @code{post_init}.
-@deftypefun void set_gdbarch_data (struct gdbarch *@var{gdbarch}, struct gdbarch_data *handle, void *@var{pointer})
-Update the data-pointer corresponding to @var{handle} with the value of
-@var{pointer}. If the previous data-pointer value is non-NULL, then it
-is freed using data-pointers @var{free} function.
-@end deftypefun
-
-This function is used by modules that require a mechanism for explicitly
-setting the per-architecture data-pointer during architecture creation:
+In the below, the nozel's total is computed on-demand by
+@code{nozel_post_init} using information obtained from the
+architecture.
@smallexample
-/* Called during architecture creation. */
-extern void
-set_gdbarch_nozel (struct gdbarch *gdbarch,
- int total)
-@{
- struct nozel *data = XMALLOC (struct nozel);
- @dots{}
- set_gdbarch_data (gdbarch, nozel_handle, nozel);
-@}
-@end smallexample
-
-@smallexample
-/* Default, called when nozel not set by set_gdbarch_nozel(). */
static void *
-nozel_init (struct gdbarch *gdbarch)
+nozel_post_init (struct gdbarch *gdbarch)
@{
- struct nozel *default_nozel = XMALLOC (struc nozel);
- @dots{}
- return default_nozel;
+ struct nozel *data = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct nozel);
+ nozel->total = gdbarch@dots{} (gdbarch);
+ return data;
@}
@end smallexample
@smallexample
-void
-_initialize_nozel (void)
+extern int
+nozel_total (struct gdbarch *gdbarch)
@{
- nozel_handle = register_gdbarch_data (nozel_init, NULL);
- @dots{}
+ struct nozel *data = gdbarch_data (gdbarch, nozel_handle);
+ return data->total;
+@}
@end smallexample
-@noindent
-Note that an @code{init} function still needs to be registered. It is
-used to initialize the data-pointer when the architecture creation phase
-fail to set an initial value.
-
-
@section Wrapping Output Lines
@cindex line wrap in output
@@ -5033,6 +5096,25 @@ This warning includes uses of the assignment operator within an
@item -Wpointer-arith
@item -Wuninitialized
+
+@item -Wunused-label
+This warning has the additional benefit of detecting the absence of the
+@code{case} reserved word in a switch statement:
+@smallexample
+enum @{ FD_SCHEDULED, NOTHING_SCHEDULED @} sched;
+@dots{}
+switch (sched)
+ @{
+ case FD_SCHEDULED:
+ @dots{};
+ break;
+ NOTHING_SCHEDULED:
+ @dots{};
+ break;
+ @}
+@end smallexample
+
+@item -Wunused-function
@end table
@emph{Pragmatics: Due to the way that @value{GDBN} is implemented most
@@ -6376,12 +6458,12 @@ intelligibility.
This is the base testsuite. The tests in it should apply to all
configurations of @value{GDBN} (but generic native-only tests may live here).
The test programs should be in the subset of C that is valid K&R,
-ANSI/ISO, and C++ (@code{#ifdef}s are allowed if necessary, for instance
+ANSI/ISO, and C@t{++} (@code{#ifdef}s are allowed if necessary, for instance
for prototypes).
@item gdb.@var{lang}
Language-specific tests for any language @var{lang} besides C. Examples are
-@file{gdb.c++} and @file{gdb.java}.
+@file{gdb.cp} and @file{gdb.java}.
@item gdb.@var{platform}
Non-portable tests. The tests are specific to a specific configuration
@@ -6632,7 +6714,9 @@ is so old that it has never been converted to use BFD. Now that's old!
@end table
@include observer.texi
+@raisesections
@include fdl.texi
+@lowersections
@node Index
@unnumbered Index
diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo
index 3fcfc0a079a..b61acadb256 100644
--- a/gdb/doc/stabs.texinfo
+++ b/gdb/doc/stabs.texinfo
@@ -3,13 +3,12 @@
@c @finalout
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* Stabs: (stabs). The "stabs" debugging information format.
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
+@c This is a dir.info fragment to support semi-automated addition of
+@c manuals to an info tree.
+@dircategory Programming & development tools.
+@direntry
+* Stabs: (stabs). The "stabs" debugging information format.
+@end direntry
@ifinfo
This document describes the stabs debugging symbol tables.
@@ -36,7 +35,7 @@ Free Documentation License''.
@page
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.11 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.11.4.1 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Support\par
\hfill \manvers\par
@@ -253,10 +252,10 @@ There is an AIX extension for type attributes. Following the @samp{=}
are any number of type attributes. Each one starts with @samp{@@} and
ends with @samp{;}. Debuggers, including AIX's dbx and GDB 4.10, skip
any type attributes they do not recognize. GDB 4.9 and other versions
-of dbx may not do this. Because of a conflict with C++
+of dbx may not do this. Because of a conflict with C@t{++}
(@pxref{Cplusplus}), new attributes should not be defined which begin
with a digit, @samp{(}, or @samp{-}; GDB may be unable to distinguish
-those from the C++ type descriptor @samp{@@}. The attributes are:
+those from the C@t{++} type descriptor @samp{@@}. The attributes are:
@table @code
@item a@var{boundary}
@@ -431,7 +430,7 @@ Some compilers (for example, GCC2 and SunOS4 @file{/bin/cc}) also
include the directory in which the source was compiled, in a second
@code{N_SO} symbol preceding the one containing the file name. This
symbol can be distinguished by the fact that it ends in a slash. Code
-from the @code{cfront} C++ compiler can have additional @code{N_SO} symbols for
+from the @code{cfront} C@t{++} compiler can have additional @code{N_SO} symbols for
nonexistent source files after the @code{N_SO} for the real source file;
these are believed to contain no useful information.
@@ -1766,7 +1765,7 @@ Another way is with the @samp{x} type descriptor, which is followed by
@samp{s} for a structure tag, @samp{u} for a union tag, or @samp{e} for
a enumerator tag, followed by the name of the tag, followed by @samp{:}.
If the name contains @samp{::} between a @samp{<} and @samp{>} pair (for
-C++ templates), such a @samp{::} does not end the name---only a single
+C@t{++} templates), such a @samp{::} does not end the name---only a single
@samp{:} ends the name; see @ref{Nested Symbols}.
For example, the following C declarations:
@@ -2063,13 +2062,13 @@ The @code{s_next} field is a pointer to the same kind of structure that
the field is an element of. So the definition of structure type 16
contains a type definition for an element which is a pointer to type 16.
-If a field is a static member (this is a C++ feature in which a single
+If a field is a static member (this is a C@t{++} feature in which a single
variable appears to be a field of every structure of a given type) it
still starts out with the field name, a colon, and the type, but then
instead of a comma, bit position, comma, and bit size, there is a colon
followed by the name of the variable which each such field refers to.
-If the structure has methods (a C++ feature), they follow the non-method
+If the structure has methods (a C@t{++} feature), they follow the non-method
fields; see @ref{Cplusplus}.
@node Typedefs
@@ -2390,7 +2389,7 @@ Symnum n_type n_othr n_desc n_value n_strx String
@end example
@node Cplusplus
-@chapter GNU C++ Stabs
+@chapter GNU C@t{++} Stabs
@menu
* Class Names:: C++ class names are both tags and typedefs.
@@ -2410,9 +2409,9 @@ Symnum n_type n_othr n_desc n_value n_strx String
@end menu
@node Class Names
-@section C++ Class Names
+@section C@t{++} Class Names
-In C++, a class name which is declared with @code{class}, @code{struct},
+In C@t{++}, a class name which is declared with @code{class}, @code{struct},
or @code{union}, is not only a tag, as in C, but also a type name. Thus
there should be stabs with both @samp{t} and @samp{T} symbol descriptors
(@pxref{Typedefs}).
@@ -2421,7 +2420,7 @@ To save space, there is a special abbreviation for this case. If the
@samp{T} symbol descriptor is followed by @samp{t}, then the stab
defines both a type name and a tag.
-For example, the C++ code
+For example, the C@t{++} code
@example
struct foo @{int x;@};
@@ -2443,7 +2442,7 @@ or
@node Nested Symbols
@section Defining a Symbol Within Another Type
-In C++, a symbol (such as a type name) can be defined within another type.
+In C@t{++}, a symbol (such as a type name) can be defined within another type.
@c FIXME: Needs example.
In stabs, this is sometimes represented by making the name of a symbol
@@ -2458,12 +2457,12 @@ then @code{foo::bar::baz} is the name of the symbol, @samp{t} is the
symbol descriptor, and @samp{5=*6} is the type information.
@node Basic Cplusplus Types
-@section Basic Types For C++
+@section Basic Types For C@t{++}
<< the examples that follow are based on a01.C >>
-C++ adds two more builtin types to the set defined for C. These are
+C@t{++} adds two more builtin types to the set defined for C. These are
the unknown type and the vtable record type. The unknown type, type
16, is defined in terms of itself like the void type.
@@ -2474,7 +2473,7 @@ pfn, and delta2. pfn is the function pointer.
<< In boilerplate $vtbl_ptr_type, what are the fields delta,
index, and delta2 used for? >>
-This basic type is present in all C++ programs even if there are no
+This basic type is present in all C@t{++} programs even if there are no
virtual methods defined.
@display
@@ -2504,8 +2503,8 @@ virtual methods defined.
@node Simple Classes
@section Simple Class Definition
-The stabs describing C++ language features are an extension of the
-stabs describing C. Stabs representing C++ class types elaborate
+The stabs describing C@t{++} language features are an extension of the
+stabs describing C. Stabs representing C@t{++} class types elaborate
extensively on the stab format used to describe structure types in C.
Stabs representing class type variables look just like stabs
representing C language variables.
@@ -2527,20 +2526,20 @@ stab is not located between an @code{N_FUN} and an @code{N_LBRAC} stab this indi
that the class is defined at file scope. If it were, then the @code{N_LSYM}
would signify a local variable.
-A stab describing a C++ class type is similar in format to a stab
+A stab describing a C@t{++} class type is similar in format to a stab
describing a C struct, with each class member shown as a field in the
structure. The part of the struct format describing fields is
-expanded to include extra information relevant to C++ class members.
+expanded to include extra information relevant to C@t{++} class members.
In addition, if the class has multiple base classes or virtual
functions the struct format outside of the field parts is also
augmented.
-In this simple example the field part of the C++ class stab
+In this simple example the field part of the C@t{++} class stab
representing member data looks just like the field part of a C struct
stab. The section on protections describes how its format is
sometimes extended for member data.
-The field part of a C++ class stab representing a member function
+The field part of a C@t{++} class stab representing a member function
differs substantially from the field part of a C struct stab. It
still begins with @samp{name:} but then goes on to define a new type number
for the member function, describe its return type, its argument types,
@@ -2567,7 +2566,7 @@ occur in the @var{operator-name} string.
The next part of the method description represents the arguments to the
method, preceded by a colon and ending with a semi-colon. The types of
the arguments are expressed in the same way argument types are expressed
-in C++ name mangling. In this example an @code{int} and a @code{char}
+in C@t{++} name mangling. In this example an @code{int} and a @code{char}
map to @samp{ic}.
This is followed by a number, a letter, and an asterisk or period,
@@ -2601,7 +2600,7 @@ information present for virtual methods.
@node Class Instance
@section Class Instance
-As shown above, describing even a simple C++ class definition is
+As shown above, describing even a simple C@t{++} class definition is
accomplished by massively extending the stab format used in C to
describe structure types. However, once the class is defined, C stabs
with no modifications can be used to describe class instances. The
@@ -2628,7 +2627,7 @@ different from a standard C stab describing a local variable.
@node Methods
@section Method Definition
-The class definition shown above declares Ameth. The C++ source below
+The class definition shown above declares Ameth. The C@t{++} source below
defines Ameth:
@example
@@ -2724,7 +2723,7 @@ descriptor for a pointer-to-non-static-member-data type. It is followed
by type information for the class (or union), a comma, and type
information for the member data.
-The following C++ source:
+The following C@t{++} source:
@smallexample
typedef int A::*int_in_a;
@@ -2738,7 +2737,7 @@ generates the following stab:
Note that there is a conflict between this and type attributes
(@pxref{String Field}); both use type descriptor @samp{@@}.
-Fortunately, the @samp{@@} type descriptor used in this C++ sense always
+Fortunately, the @samp{@@} type descriptor used in this C@t{++} sense always
will be followed by a digit, @samp{(}, or @samp{-}, and type attributes
never start with those things.
@@ -2748,7 +2747,7 @@ never start with those things.
In the simple class definition shown above all member data and
functions were publicly accessible. The example that follows
contrasts public, protected and privately accessible fields and shows
-how these protections are encoded in C++ stabs.
+how these protections are encoded in C@t{++} stabs.
If the character following the @samp{@var{field-name}:} part of the
string is @samp{/}, then the next character is the visibility. @samp{0}
@@ -2762,7 +2761,7 @@ an optimized out field with a private or protected visibility).
Visibility @samp{9} is not supported by GDB 4.11; this should be fixed
in the next GDB release.
-The following C++ source:
+The following C@t{++} source:
@example
class vis @{
@@ -2792,7 +2791,7 @@ type float (@samp{12}), and offset and size @samp{,64,32;}.
Protections for member functions are signified by one digit embedded in
the field part of the stab describing the method. The digit is 0 if
-private, 1 if protected and 2 if public. Consider the C++ class
+private, 1 if protected and 2 if public. Consider the C@t{++} class
definition below:
@example
@@ -2890,7 +2889,7 @@ struct is @samp{Adat}, an integer, starting at structure offset 0 and
occupying 32 bits.
The second field in the class struct is not explicitly defined by the
-C++ class definition but is implied by the fact that the class
+C@t{++} class definition but is implied by the fact that the class
contains a virtual method. This field is the vtable pointer. The
name of the vtable pointer field starts with @samp{$vf} and continues with a
type reference to the class it is part of. In this example the type
@@ -2902,7 +2901,7 @@ This is in turn defined as a pointer to another new type (22).
Type 22 is the vtable itself, which is defined as an array, indexed by
a range of integers between 0 and 1, and whose elements are of type
-17. Type 17 was the vtable record type defined by the boilerplate C++
+17. Type 17 was the vtable record type defined by the boilerplate C@t{++}
type definitions, as shown earlier.
The bit offset of the vtable pointer field is 32. The number of bits
@@ -2956,7 +2955,7 @@ class. This is preceded by @samp{~%} and followed by a final semi-colon.
@node Inheritance
@section Inheritance
-Stabs describing C++ derived classes include additional sections that
+Stabs describing C@t{++} derived classes include additional sections that
describe the inheritance hierarchy of the class. A derived class stab
also encodes the number of base classes. For each base class it tells
if the base class is virtual or not, and if the inheritance is private
@@ -3287,13 +3286,13 @@ GNU Modula2 definition module dependency; see @ref{N_DEFD}.
Function start/body/end line numbers (Solaris2).
@item 0x50 N_EHDECL
-GNU C++ exception variable; see @ref{N_EHDECL}.
+GNU C@t{++} exception variable; see @ref{N_EHDECL}.
@item 0x50 N_MOD2
Modula2 info "for imc" (according to Ultrix V4.0); see @ref{N_MOD2}.
@item 0x54 N_CATCH
-GNU C++ @code{catch} clause; see @ref{N_CATCH}.
+GNU C@t{++} @code{catch} clause; see @ref{N_CATCH}.
@item 0x60 N_SSYM
Structure of union element; see @ref{N_SSYM}.
@@ -3387,7 +3386,7 @@ for more information about their use.
Variable on the stack; see @ref{Stack Variables}.
@item :
-C++ nested symbol; see @xref{Nested Symbols}.
+C@t{++} nested symbol; see @xref{Nested Symbols}.
@item a
Parameter passed by reference in register; see @ref{Reference Parameters}.
@@ -3400,7 +3399,7 @@ Constant; see @ref{Constants}.
@item C
Conformant array bound (Pascal, maybe other languages); @ref{Conformant
-Arrays}. Name of a caught exception (GNU C++). These can be
+Arrays}. Name of a caught exception (GNU C@t{++}). These can be
distinguished because the latter uses @code{N_CATCH} and the former uses
another symbol type.
@@ -3501,17 +3500,17 @@ Type reference; see @ref{String Field}.
Reference to builtin type; see @ref{Negative Type Numbers}.
@item #
-Method (C++); see @ref{Method Type Descriptor}.
+Method (C@t{++}); see @ref{Method Type Descriptor}.
@item *
Pointer; see @ref{Miscellaneous Types}.
@item &
-Reference (C++).
+Reference (C@t{++}).
@item @@
Type Attributes (AIX); see @ref{String Field}. Member (class and variable)
-type (GNU C++); see @ref{Member Type Descriptor}.
+type (GNU C@t{++}); see @ref{Member Type Descriptor}.
@item a
Array; see @ref{Arrays}.
@@ -3616,7 +3615,7 @@ Wide character; see @ref{Builtin Type Descriptors}.
Cross-reference; see @ref{Cross-References}.
@item Y
-Used by IBM's xlC C++ compiler (for structures, I think).
+Used by IBM's xlC C@t{++} compiler (for structures, I think).
@item z
gstring; see @ref{Strings}.
@@ -3758,7 +3757,7 @@ if it is imported with the GNU M2 keyword @code{%INITIALIZE}. Perhaps
@deffn @code{.stabs} N_EHDECL
@findex N_EHDECL
-GNU C++ exception variable <<?>>.
+GNU C@t{++} exception variable <<?>>.
"@var{string} is variable name"
@@ -3780,9 +3779,9 @@ Note: conflicts with @code{N_EHDECL} <<?>>
@deffn @code{.stabn} N_CATCH
@findex N_CATCH
-GNU C++ @code{catch} clause
+GNU C@t{++} @code{catch} clause
-GNU C++ @code{catch} clause. The value is its address. The desc field
+GNU C@t{++} @code{catch} clause. The value is its address. The desc field
is nonzero if this entry is immediately followed by a @code{CAUGHT} stab
saying what exception was caught. Multiple @code{CAUGHT} stabs means
that multiple exceptions can be caught here. If desc is 0, it means all
@@ -4027,7 +4026,9 @@ is no more work than having the linker relocate ELF symbols, and it
solves the problem of having to associate the ELF and stab symbols.
However, no one has yet designed or implemented such a scheme.
+@raisesections
@include fdl.texi
+@lowersections
@node Symbol Types Index
@unnumbered Symbol Types Index
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog-1999-2003
index d0ec77316b0..4821597f8d6 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog-1999-2003
@@ -1,3 +1,26 @@
+2003-11-06 Andrew Cagney <cagney@redhat.com>
+
+ * mi-cmd-var.c (mi_cmd_var_set_format): Replace STREQN with
+ strncmp.
+
+2003-10-24 Andrew Cagney <cagney@redhat.com>
+
+ * tui-out.c: Fix "fortunatly"[sic].
+
+2003-10-02 Andrew Cagney <cagney@redhat.com>
+
+ * mi-main.c: Rename REGISTER_RAW_SIZE to
+ DEPRECATED_REGISTER_RAW_SIZE.
+
+2003-09-30 Andrew Cagney <cagney@redhat.com>
+
+ * mi-main.c: Rename REGISTER_VIRTUAL_SIZE to
+ DEPRECATED_REGISTER_VIRTUAL_SIZE.
+
+2003-09-17 Andrew Cagney <cagney@redhat.com>
+
+ * mi-main.c: Rename REGISTER_BYTE to DEPRECATED_REGISTER_BYTE.
+
2003-09-10 Elena Zannoni <ezannoni@redhat.com>
* mi-main.c (mi_setup_architecture_data): Don't use
diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
index ec0fa350c84..439c71912bd 100644
--- a/gdb/mi/mi-cmd-env.c
+++ b/gdb/mi/mi-cmd-env.c
@@ -1,6 +1,6 @@
/* MI Command Set - environment commands.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Red Hat Inc.
@@ -37,7 +37,6 @@
#include "gdb_string.h"
#include "gdb_stat.h"
-static void env_cli_command (const char *cli, const char *args);
static void env_mod_path (char *dirname, char **which_path);
extern void _initialize_mi_cmd_env (void);
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 6330cda473c..7db9ffbea63 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -1,5 +1,5 @@
/* MI Command Set - stack commands.
- Copyright 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
@@ -29,6 +29,7 @@
#include "block.h"
#include "stack.h"
#include "dictionary.h"
+#include "gdb_string.h"
static void list_args_or_locals (int locals, int values, struct frame_info *fi);
@@ -137,10 +138,26 @@ mi_cmd_stack_info_depth (char *command, char **argv, int argc)
enum mi_cmd_result
mi_cmd_stack_list_locals (char *command, char **argv, int argc)
{
+ struct frame_info *frame;
+ enum print_values print_values;
+
if (argc != 1)
error ("mi_cmd_stack_list_locals: Usage: PRINT_VALUES");
- list_args_or_locals (1, atoi (argv[0]), deprecated_selected_frame);
+ frame = get_selected_frame ();
+
+ if (strcmp (argv[0], "0") == 0
+ || strcmp (argv[0], "--no-values") == 0)
+ print_values = PRINT_NO_VALUES;
+ else if (strcmp (argv[0], "1") == 0
+ || strcmp (argv[0], "--all-values") == 0)
+ print_values = PRINT_ALL_VALUES;
+ else if (strcmp (argv[0], "2") == 0
+ || strcmp (argv[0], "--simple-values") == 0)
+ print_values = PRINT_SIMPLE_VALUES;
+ else
+ error ("Unknown value for PRINT_VALUES: must be: 0 or \"--no-values\", 1 or \"--all-values\", 2 or \"--simple-values\"");
+ list_args_or_locals (1, print_values, frame);
return MI_CMD_DONE;
}
@@ -218,6 +235,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
int nsyms;
struct cleanup *cleanup_list;
static struct ui_stream *stb = NULL;
+ struct type *type;
stb = ui_out_stream_new (uiout);
@@ -268,24 +286,39 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
if (print_me)
{
struct cleanup *cleanup_tuple = NULL;
- if (values)
- cleanup_tuple =
+ struct symbol *sym2;
+ if (values != PRINT_NO_VALUES)
+ cleanup_tuple =
make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- ui_out_field_string (uiout, "name", DEPRECATED_SYMBOL_NAME (sym));
+ ui_out_field_string (uiout, "name", SYMBOL_PRINT_NAME (sym));
- if (values)
- {
- struct symbol *sym2;
- if (!locals)
- sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
- block, VAR_DOMAIN,
- (int *) NULL,
- (struct symtab **) NULL);
- else
+ if (!locals)
+ sym2 = lookup_symbol (SYMBOL_NATURAL_NAME (sym),
+ block, VAR_DOMAIN,
+ (int *) NULL,
+ (struct symtab **) NULL);
+ else
sym2 = sym;
+ switch (values)
+ {
+ case PRINT_SIMPLE_VALUES:
+ type = check_typedef (sym2->type);
+ type_print (sym2->type, "", stb->stream, -1);
+ ui_out_field_stream (uiout, "type", stb);
+ if (TYPE_CODE (type) != TYPE_CODE_ARRAY
+ && TYPE_CODE (type) != TYPE_CODE_STRUCT
+ && TYPE_CODE (type) != TYPE_CODE_UNION)
+ {
+ print_variable_value (sym2, fi, stb->stream);
+ ui_out_field_stream (uiout, "value", stb);
+ }
+ do_cleanups (cleanup_tuple);
+ break;
+ case PRINT_ALL_VALUES:
print_variable_value (sym2, fi, stb->stream);
ui_out_field_stream (uiout, "value", stb);
do_cleanups (cleanup_tuple);
+ break;
}
}
}
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 0da61066809..709ed301052 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -1,6 +1,6 @@
/* MI Command Set - varobj commands.
- Copyright 2000, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2002, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Solutions (a Red Hat company).
@@ -189,15 +189,15 @@ mi_cmd_var_set_format (char *command, char **argv, int argc)
len = strlen (formspec);
- if (STREQN (formspec, "natural", len))
+ if (strncmp (formspec, "natural", len) == 0)
format = FORMAT_NATURAL;
- else if (STREQN (formspec, "binary", len))
+ else if (strncmp (formspec, "binary", len) == 0)
format = FORMAT_BINARY;
- else if (STREQN (formspec, "decimal", len))
+ else if (strncmp (formspec, "decimal", len) == 0)
format = FORMAT_DECIMAL;
- else if (STREQN (formspec, "hexadecimal", len))
+ else if (strncmp (formspec, "hexadecimal", len) == 0)
format = FORMAT_HEXADECIMAL;
- else if (STREQN (formspec, "octal", len))
+ else if (strncmp (formspec, "octal", len) == 0)
format = FORMAT_OCTAL;
else
error ("mi_cmd_var_set_format: Unknown display format: must be: \"natural\", \"binary\", \"decimal\", \"hexadecimal\", or \"octal\"");
@@ -257,17 +257,29 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
struct cleanup *cleanup_children;
int numchild;
char *type;
+ enum print_values print_values;
- if (argc != 1)
- error ("mi_cmd_var_list_children: Usage: NAME.");
+ if (argc != 1 && argc != 2)
+ error ("mi_cmd_var_list_children: Usage: [PRINT_VALUES] NAME");
/* Get varobj handle, if a valid var obj name was specified */
- var = varobj_get_handle (argv[0]);
+ if (argc == 1) var = varobj_get_handle (argv[0]);
+ else var = varobj_get_handle (argv[1]);
if (var == NULL)
- error ("mi_cmd_var_list_children: Variable object not found");
+ error ("Variable object not found");
numchild = varobj_list_children (var, &childlist);
ui_out_field_int (uiout, "numchild", numchild);
+ if (argc == 2)
+ if (strcmp (argv[0], "0") == 0
+ || strcmp (argv[0], "--no-values") == 0)
+ print_values = PRINT_NO_VALUES;
+ else if (strcmp (argv[0], "1") == 0
+ || strcmp (argv[0], "--all-values") == 0)
+ print_values = PRINT_ALL_VALUES;
+ else
+ error ("Unknown value for PRINT_VALUES: must be: 0 or \"--no-values\", 1 or \"--all-values\"");
+ else print_values = PRINT_NO_VALUES;
if (numchild <= 0)
return MI_CMD_DONE;
@@ -284,6 +296,8 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
ui_out_field_string (uiout, "name", varobj_get_objname (*cc));
ui_out_field_string (uiout, "exp", varobj_get_expression (*cc));
ui_out_field_int (uiout, "numchild", varobj_get_num_children (*cc));
+ if (print_values)
+ ui_out_field_string (uiout, "value", varobj_get_value (*cc));
type = varobj_get_type (*cc);
/* C++ pseudo-variables (public, private, protected) do not have a type */
if (type)
diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h
index efcf0b5ca0a..545305986c6 100644
--- a/gdb/mi/mi-cmds.h
+++ b/gdb/mi/mi-cmds.h
@@ -1,6 +1,6 @@
/* MI Command Set for GDB, the GNU debugger.
- Copyright 2000, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2003, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Solutions (a Red Hat company).
@@ -48,6 +48,12 @@ enum mi_cmd_result
MI_CMD_QUIET
};
+enum print_values {
+ PRINT_NO_VALUES,
+ PRINT_ALL_VALUES,
+ PRINT_SIMPLE_VALUES
+};
+
typedef enum mi_cmd_result (mi_cmd_argv_ftype) (char *command, char **argv, int argc);
/* Older MI commands have this interface. Retained until all old
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index b72d7ef0bc2..08201ca5bb2 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -1,6 +1,6 @@
/* MI Interpreter Definitions and Commands for GDB, the GNU debugger.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -57,8 +57,6 @@ static char *mi_input (char *);
so we can report interesting things that happened "behind the mi's
back" in this command */
static int mi_interp_query_hook (const char *ctlstr, va_list ap);
-static char *mi_interp_read_one_line_hook (char *prompt, int repeat,
- char *anno);
static void mi3_command_loop (void);
static void mi2_command_loop (void);
@@ -299,25 +297,6 @@ mi_interp_query_hook (const char *ctlstr, va_list ap)
return 1;
}
-static char *
-mi_interp_read_one_line_hook (char *prompt, int repeat, char *anno)
-{
- static char buff[256];
- printf_unfiltered ("=read-one-line,prompt=\"%s\"\n", prompt);
- gdb_flush (gdb_stdout);
- (void) fgets (buff, sizeof (buff), stdin);
- buff[(strlen (buff) - 1)] = 0;
- return buff;
-}
-
-static void
-output_control_change_notification (char *notification)
-{
- printf_unfiltered ("^");
- printf_unfiltered ("%s\n", notification);
- gdb_flush (gdb_stdout);
-}
-
static void
mi_execute_command_wrapper (char *cmd)
{
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index f6fc36e259c..c46bf636597 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1,5 +1,8 @@
/* MI Command Set.
- Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation,
+ Inc.
+
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
@@ -405,14 +408,14 @@ register_changed_p (int regnum)
if (! frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
return -1;
- if (memcmp (&old_regs[REGISTER_BYTE (regnum)], raw_buffer,
- REGISTER_RAW_SIZE (regnum)) == 0)
+ if (memcmp (&old_regs[DEPRECATED_REGISTER_BYTE (regnum)], raw_buffer,
+ DEPRECATED_REGISTER_RAW_SIZE (regnum)) == 0)
return 0;
/* Found a changed register. Return 1. */
- memcpy (&old_regs[REGISTER_BYTE (regnum)], raw_buffer,
- REGISTER_RAW_SIZE (regnum));
+ memcpy (&old_regs[DEPRECATED_REGISTER_BYTE (regnum)], raw_buffer,
+ DEPRECATED_REGISTER_RAW_SIZE (regnum));
return 1;
}
@@ -537,14 +540,15 @@ get_register (int regnum, int format)
/* Convert raw data to virtual format if necessary. */
- if (DEPRECATED_REGISTER_CONVERTIBLE (regnum))
+ if (DEPRECATED_REGISTER_CONVERTIBLE_P ()
+ && DEPRECATED_REGISTER_CONVERTIBLE (regnum))
{
DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum,
register_type (current_gdbarch, regnum),
raw_buffer, virtual_buffer);
}
else
- memcpy (virtual_buffer, raw_buffer, REGISTER_VIRTUAL_SIZE (regnum));
+ memcpy (virtual_buffer, raw_buffer, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
if (format == 'r')
{
@@ -553,10 +557,10 @@ get_register (int regnum, int format)
strcpy (buf, "0x");
ptr = buf + 2;
- for (j = 0; j < REGISTER_RAW_SIZE (regnum); j++)
+ for (j = 0; j < DEPRECATED_REGISTER_RAW_SIZE (regnum); j++)
{
- register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
- : REGISTER_RAW_SIZE (regnum) - 1 - j;
+ int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
+ : DEPRECATED_REGISTER_RAW_SIZE (regnum) - 1 - j;
sprintf (ptr, "%02x", (unsigned char) raw_buffer[idx]);
ptr += 2;
}
@@ -642,7 +646,7 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
old_chain = make_cleanup (xfree, buffer);
store_signed_integer (buffer, DEPRECATED_REGISTER_SIZE, value);
/* Write it down */
- deprecated_write_register_bytes (REGISTER_BYTE (regnum), buffer, REGISTER_RAW_SIZE (regnum));
+ deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (regnum), buffer, DEPRECATED_REGISTER_RAW_SIZE (regnum));
/* Free the buffer. */
do_cleanups (old_chain);
}
@@ -1485,6 +1489,6 @@ mi_setup_architecture_data (void)
void
_initialize_mi_main (void)
{
- register_gdbarch_swap (&old_regs, sizeof (old_regs), NULL);
- register_gdbarch_swap (NULL, 0, mi_setup_architecture_data);
+ DEPRECATED_REGISTER_GDBARCH_SWAP (old_regs);
+ deprecated_register_gdbarch_swap (NULL, 0, mi_setup_architecture_data);
}
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index 637ceb42ca1..2be9d17b357 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -1,6 +1,6 @@
/* MI Command Set - output generating routines.
- Copyright 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Solutions (a Red Hat company).
@@ -98,9 +98,6 @@ static void mi_open (struct ui_out *uiout, const char *name,
enum ui_out_type type);
static void mi_close (struct ui_out *uiout, enum ui_out_type type);
-static void out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
- char *format,...);
-
/* Mark beginning of a table */
void
@@ -290,31 +287,6 @@ mi_flush (struct ui_out *uiout)
/* local functions */
-/* Like mi_field_fmt, but takes a variable number of args
- and makes a va_list and does not insert a separator */
-
-/* VARARGS */
-static void
-out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
- char *format,...)
-{
- mi_out_data *data = ui_out_data (uiout);
- va_list args;
-
- field_separator (uiout);
- if (fldname)
- fprintf_unfiltered (data->buffer, "%s=\"", fldname);
- else
- fputs_unfiltered ("\"", data->buffer);
-
- va_start (args, format);
- vfprintf_unfiltered (data->buffer, format, args);
-
- fputs_unfiltered ("\"", data->buffer);
-
- va_end (args);
-}
-
/* access to ui_out format private members */
static void
diff --git a/gdb/regformats/reg-s390.dat b/gdb/regformats/reg-s390.dat
index c533a489459..79e07b969d4 100644
--- a/gdb/regformats/reg-s390.dat
+++ b/gdb/regformats/reg-s390.dat
@@ -34,22 +34,6 @@ expedite:r14,r15,pswa
32:acr13
32:acr14
32:acr15
-32:cr0
-32:cr1
-32:cr2
-32:cr3
-32:cr4
-32:cr5
-32:cr6
-32:cr7
-32:cr8
-32:cr9
-32:cr10
-32:cr11
-32:cr12
-32:cr13
-32:cr14
-32:cr15
32:fpc
64:f0
64:f1
diff --git a/gdb/regformats/reg-s390x.dat b/gdb/regformats/reg-s390x.dat
index 25bef05645a..2e24f53d0d5 100644
--- a/gdb/regformats/reg-s390x.dat
+++ b/gdb/regformats/reg-s390x.dat
@@ -34,22 +34,6 @@ expedite:r14,r15,pswa
32:acr13
32:acr14
32:acr15
-64:cr0
-64:cr1
-64:cr2
-64:cr3
-64:cr4
-64:cr5
-64:cr6
-64:cr7
-64:cr8
-64:cr9
-64:cr10
-64:cr11
-64:cr12
-64:cr13
-64:cr14
-64:cr15
32:fpc
64:f0
64:f1
diff --git a/gdb/regformats/reg-x86-64.dat b/gdb/regformats/reg-x86-64.dat
index 59ebbf5267e..dd1f78fa71b 100644
--- a/gdb/regformats/reg-x86-64.dat
+++ b/gdb/regformats/reg-x86-64.dat
@@ -18,6 +18,8 @@ expedite:rbp,rsp,rip
64:r15
64:rip
32:eflags
+32:cs
+32:ss
32:ds
32:es
32:fs
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index a81f45215e5..6c85be82dcc 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,1191 @@
+2004-03-22 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/watchpoint.exp (test_stepping): Delete bogus XFAILs
+ hiding problems with DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET.
+ Problem identified by Ulrich Weigand.
+
+2004-03-17 David Carlton <carlton@kealia.com>
+
+ * gdb.cp/classes.exp (test_enums): Refer to PR c++/1588 instead of
+ PR c++/826.
+
+2004-03-16 Roland McGrath <roland@redhat.com>
+
+ * gdb.base/auxv.exp: New file.
+ * gdb.base/auxv.c: New file, copied verbatim from coremaker2.c.
+
+2004-03-12 David Carlton <carlton@kealia.com>
+
+ * gdb.cp/pr-1553.exp: New. Tests for PR c++/1553.
+ * gdb.cp/pr-1553.cc: Ditto.
+ * gdb.cp/local.exp (ptype NestedInnerLocal): Add comment, third
+ pass branch.
+
+2004-03-12 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/templates.exp: Accept more template types.
+
+2004-03-09 Michael Chastain <mec.gnu@mindspring.com>
+
+ From Corinna Vinschen with modifications.
+ * gdb.cp/classes.cc (enums1): Add a line to extend scope of
+ local variable obj_with_enum.
+ * gdb.cp/classes.exp (test_enums): Remove TODO note about FAIL
+ results with obj_with_enum.
+
+2004-03-09 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/classes.cc: New file, copied from misc.cc.
+ * gdb.cp/classes.exp: Use classes.cc rather than misc.cc.
+
+2004-03-09 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/misc.cc: Add copyright notice.
+
+2004-03-05 David Carlton <carlton@kealia.com>
+
+ * gdb.cp/rtti.exp: Add 'print *obj3' test.
+ * gdb.cp/rtti.h: Update copyright.
+ (namespace n2::n3): New.
+ * gdb.cp/rtti1.cc: (refer_to (n2::n3::C3 *)): New.
+ (n2::n3::func3): New.
+ (main): Call n2::n3::func3.
+ * gdb.cp/rtti2.cc: Update copyright.
+ (n2::create3): New.
+
+2004-03-04 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.asm/openbsd.inc: Fix typo.
+
+2004-03-03 Fred Fish <fnf@redhat.com>
+
+ * gdb.base/pc-fp.exp (get_valueofx): Fix apparent typo to now set
+ "val" instead of unused "size". Update copyright year.
+
+2004-02-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.cp/ctti.exp: Handle unsigned char type. Expect templates
+ to use unsigned char.
+ * gdb.cp/cttiadd.c, gdb.cp/cttiadd1.c, gdb.cp/cttiadd2.c,
+ gdb.cp/cttiadd3.c: Change type of variable to unsigned char.
+
+2004-02-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/gdbserver.exp (gdbserver_gdb_load): Wait for a complete
+ line of output.
+
+2004-02-28 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/relocate.c (dummy): Initialize.
+
+2004-02-28 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/chng-syms.exp: Anchor exit pattern. Allow
+ a breakpoint at exit.
+
+2004-02-27 Fred Fish <fnf@redhat.com>
+
+ * gdb.base/chng-syms.exp: Add expect condition to match failing
+ case that isn't a timeout.
+
+2004-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/bigcore.exp: Disable on HP/UX, no sparse corefile
+ support.
+
+2004-02-26 Fred Fish <fnf@redhat.com>
+
+ * gdb.arch/gdb1431.c: Remove.
+ * gdb.arch/gdb1431.s: New file, copy of gdb1291.s
+ * gdb.arch/gdb1431.exp: Use "advance" correctly instead
+ of "until" incorrectly.
+
+2004-02-26 J. Brobecker <brobecker@gnat.com>
+
+ * gdb.cp/class2.cc (empty): New class.
+ (refer): New function.
+ (main): Declare an object of type empty and use it.
+ * gdb.cp/class2.exp: Print the value of an object of type empty.
+
+2004-02-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.base/langs.exp: Update query string to match the
+ new nquery format used for pending breakpoints.
+
+2004-02-26 Andrew Cagney <cagney@redhat.com>
+
+ Fix PR i18n/1570.
+ * gdb.base/charset.c: Update copyright notice.
+ (main, init_string): Remove the escape character '\e' tests.
+ * gdb.base/printcmds.exp (test_print_all_chars): Ditto.
+ * gdb.base/charset.exp (valid_host_charset): Ditto.
+ * gdb.base/setvar.exp: Ditto.
+
+2004-02-24 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/corefile.exp: Use gdb_test_multiple, make "accessing
+ mmapped data in core file" PASS and FAIL messages consistent.
+
+ * gdb.java/jmisc.exp: Use the fully quallified name of "main" when
+ setting a breakpoint. Work around PR java/1565.
+
+2004-02-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * lib/gdb.exp (gdb_breakpoint): Update query string to match
+ new nquery format.
+ * gdb.base/pending.exp: Ditto.
+
+2004-02-22 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in: Run stabs tests on *BSD.
+ * configure: Regenerated.
+
+2004-02-21 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/bigcore.exp: Bail out on *BSD instead of only NetBSD.
+
+2004-02-20 Fred Fish <fnf@redhat.com>
+
+ * gdb.base/callfuncs.exp (do_function_calls): Remove extraneous
+ blank in test for "returns short", for consistency with other
+ "returns xxx" tests. Update copyright year.
+
+2004-02-19 Fred Fish <fnf@redhat.com>
+
+ New testcase for PR breakpoint/1558.
+ * gdb.arch/gdb1558.exp: New file.
+ * gdb.arch/gdb1558.c: New file.
+
+2004-02-19 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/nodebug.exp: Fix typo.
+
+2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ Committed by Jim Blandy <jimb@redhat.com>.
+
+ * gdb.objc/basicclass.exp: Adapt to fixed return type of printHi.
+
+ * gdb.base/dump.exp: Handle negative offsets in decimal, not hex.
+
+ * gdb.base/float.exp: Support s390*-*-* targets.
+
+2004-02-17 Adam Fedor <fedor@gnu.org>
+
+ * gdb.base/gdb1555.exp: New file.
+ * gdb.base/gdb1555-main.c, gdb.base/gdb1555.c: New files.
+
+2004-02-17 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/selftest.exp (do_steps_and_nexts): Add comment.
+
+2004-02-16 Fred Fish <fnf@redhat.com>
+
+ * gdb.arch/gdb1291.c: Remove
+ * gdb.arch/gdb1291.s: New test input file.
+ * gdb.arch/gdb1291.exp: Expand test to check case that should not
+ fail. Test for correct result, known incorrect result, other
+ failures and timeouts.
+
+2004-02-16 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/bigcore.exp: New file.
+ * gdb.base/bigcore.c: New file.
+
+2004-02-13 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.mi/mi1-basics.exp, gdb.mi/mi1-break.exp: Delete file.
+ * gdb.mi/mi1-console.exp, gdb.mi/mi1-disassemble.exp: Delete file.
+ * gdb.mi/mi1-eval.exp, gdb.mi/mi1-hack-cli.exp: Delete file.
+ * gdb.mi/mi1-pthreads.exp, gdb.mi/mi1-read-memory.exp: Delete file.
+ * gdb.mi/mi1-regs.exp, gdb.mi/mi1-return.exp: Delete file.
+ * gdb.mi/mi1-simplerun.exp, gdb.mi/mi1-stack.exp: Delete file.
+ * gdb.mi/mi1-stepi.exp, gdb.mi/mi1-symbol.exp: Delete file.
+ * gdb.mi/mi1-until.exp, gdb.mi/mi1-var-block.exp: Delete file.
+ * gdb.mi/mi1-var-child.exp, gdb.mi/mi1-var-cmd.exp: Delete file.
+ * gdb.mi/mi1-var-display.exp, gdb.mi/mi1-watch.exp: Delete file.
+
+2004-02-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.asm/ia64.inc (gdbasm_startup): Make sure first instruction
+ executed is an alloc instruction.
+
+2004-02-11 David Carlton <carlton@kealia.com>
+
+ * gdb.cp/breakpoint.exp: New.
+ * gdb.cp/breakpoint.cc: New.
+
+2004-02-11 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR gdb/1543.
+ * gdb.cp/ambiguous.exp, gdb.cp/annota2.exp, gdb.cp/annota3.exp,
+ gdb.cp/anon-union.exp, gdb.cp/casts.exp, gdb.cp/classes.exp,
+ gdb.cp/cplusfuncs.exp, gdb.cp/ctti.exp, gdb.exp/demangle.exp,
+ gdb.cp/derivation.exp, gdb.cp/exception.exp, gdb.cp/hang.exp,
+ gdb.cp/inherit.exp, gdb.cp/local.exp, gdb.cp/maint.exp,
+ gdb.cp/member-ptr.exp, gdb.cp/method.exp, gdb.cp/misc.exp,
+ gdb.cp/namespace.exp, gdb.cp/overload.exp, gdb.cp/ovldbreak.exp,
+ gdb.cp/psmang.exp, gdb.cp/ref-types.exp, gdb.cp/templates.exp,
+ gdb.cp/userdef.exp, gdb.cp/virtfunc.exp: Remove reference
+ to bug-gdb@prep.ai.mit.edu .
+ * gdb.cp/bs15503.cc, gdb.cp/class2.cc, gdb.cp/cttiadd.cc,
+ gdb.cp/cttiadd1.cc, gdb.cp/cttiadd2.cc, gdb.cp/cttiadd3.cc,
+ gdb.cp/exception.cc, gdb.cp/member-ptr.cc, gdb.cp/namespace1.cc:
+ Likewise.
+
+2004-02-10 Andrew Cagney <cagney@redhat.com>
+
+ * lib/gdb.exp (gdb_expect_list): Recover from internal-errors
+ using gdb_internal_error_resync.
+
+2004-02-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/thread-specific.exp: Stop early if no threads are
+ found.
+
+2004-02-09 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/pending.exp: Remove extra \n from gdb_test calls.
+
+2004-02-08 Daniel Jacobowitz <drow@mvista.com>
+
+ * lib/gdb.exp (gdb_breakpoint): Fail on unexpected pending
+ breakpoints.
+
+2004-02-07 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/sim.exp (gdb_load): Handle $arg == "".
+ * lib/gdb.exp (gdb_run_cmd): Honor gdb,do_reload_on_run.
+ * gdb.objc/basicclass.exp: Use gdb_run_cmd.
+
+2004-02-07 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/maint.exp: Update test to reflect
+ obstack changes.
+
+2004-02-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.base/pendshr.c (pendfunc): New function that calls
+ pendfunc1.
+ * gdb.base/pending.c: Call pendfunc instead of pendfunc1.
+
+2004-02-04 Fred Fish <fnf@redhat.com>
+
+ * gdb.arch/gdb1431.c: Add underbar prefixed version of global
+ function symbols and update copyright years.
+ * gdb.arch/gdb1291.c: Ditto.
+
+2004-02-03 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/virtfunc.exp: Accept both "ctor()" and "ctor(void)".
+
+2004-02-03 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/inherit.exp: Accept both "ctor()" and "ctor(void)".
+
+2004-02-03 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/inherit.exp: Accept output with gcc 3.2-7-rh.
+
+2004-02-02 Fred Fish <fnf@redhat.com>
+
+ * gdb.base/bang.exp: Use gdb_run_cmd so this tests works with
+ remote targets. Update copyright years.
+
+2004-02-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * lib/gdb.exp (gdb_breakpoint): Add pending breakpoint
+ support.
+ * gdb.base/langs.exp: Fix test which attempts to create
+ breakpoint on non-existent function to handle new pending
+ support.
+ * gdb.base/shlib-call.exp: Use gdb_breakpoint to set
+ a breakpoint.
+ * gdb.base/pending.exp: New test.
+ * gdb.base/pending.c: New file.
+ * gdb.base/pendshr.c: Ditto.
+
+2004-02-02 David Carlton <carlton@kealia.com>
+
+ * gdb.cp/overload.exp: Add overloadNamespace tests.
+ * gdb.cp/overload.cc (dummyClass, dummyInstance): New.
+ (overloadNamespace, XXX): New.
+ (main): Call XXX::marker2.
+
+2004-02-01 Fred Fish <fnf@redhat.com>
+
+ * gdb.base/dump.exp: Use runto_main instead of "runto main".
+ * gdb.base/finish.exp: Ditto.
+ * gdb.base/gcore.exp: Ditto.
+ * gdb.base/huge.exp: Ditto.
+ * gdb.base/info-proc.exp: Ditto.
+ * gdb.base/return2.exp: Ditto.
+ * gdb.threads/gcore-thread.exp: Ditto.
+
+2004-02-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/thread-specific.exp: Add missing anchor to regexp.
+
+2004-02-01 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/fileio.c (test_open): Replace O_RDONLY with O_RDWR such
+ that opening the file succeeds on OpenBSD.
+
+2004-02-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/thread-specific.c: New file.
+ * gdb.threads/threads-specific.exp: New test script.
+ * lib/gdb.exp (gdb_test_multiple): Allow user patterns access
+ to expect_out.
+
+2004-02-01 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/call-ar-st.exp: Call get_debug_format. Remove xfail on
+ sparc*-*-solaris* into a kfail PR gdb/1539 on sparc-*-* for stabs
+ only on the "print_small_structs from print_long_arg_list" test.
+
+2004-02-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/completion.exp: Kill a stray backslash.
+
+ From Jim Ingham <jingham@apple.com>:
+ * gdb.base/completion.exp: Test that "complete file ./gdb.base/compl"
+ agrees with the result from sending a tab.
+
+2004-01-31 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/chng-syms.exp: Remove stray newline.
+
+2004-01-31 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.asm/asm-source.exp: Set asm-note to "openbsd" for
+ *-*-openbsd*.
+ * gdb.asm/openbsd.inc: New file.
+
+2004-01-30 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.asm/asm-source.exp: Strip -Wl, from link-flags. Don't
+ append -static to link-flags for *-*-freebsd*, *-*netbsd* and
+ *-*solaris2*. Remove commented out default settings for
+ asm-flags. Replace gdb_compile with target_link.
+
+2004-01-29 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/inherit.exp: Rewrite. Use gdb_test_multiple and gdb
+ for all tests. Remove old hp-ux and cygnus xfail cases.
+
+2004-01-29 Paul N. Hilfinger <Hilfinger@gnat.com>
+
+ * gdb.base/chng-syms.exp: New file.
+ * gdb.base/chng-syms.c: New file.
+
+2004-01-24 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/local.exp: Rewrite "ptype Local". Add "ptype l".
+ Provide arms for current output in all my configurations.
+
+2004-01-24 Michael Chastain <mec.gnu@mindspring.com>
+
+ * lib/compiler.c: Add hp_cc_compiler and hp_aCC_compiler.
+ * lib/compiler.cc: Likewise.
+ * lib/gdb.exp (get_compiler_info): Always call gdb_compile to
+ get the right preprocessor. Eval the output directly. Remove
+ special tests for hp_cc_compiler and hp_aCC_compiler. Remove
+ hp_f77_compiler and hp_f90_compiler completely.
+ (gdb_preprocess): Delete.
+ (get_compiler): Delete.
+
+2004-01-24 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/charset.c, gdb.base/dump.c, gdb.base/huge.c: Include
+ <string.h>.
+
+2004-01-24 Nick Roberts <nick@nick.uklinux.net>
+
+ * gdb.mi/mi-stack.exp: Update copyright.
+
+2004-01-23 David Carlton <carlton@kealia.com>
+
+ * gdb.cp/rtti.exp: Don't include full path in ${srcfile}. Add
+ test for cp_lookup_transparent_type.
+ * gdb.cp/rtti1.cc: Update copyright. Add n2::func and refer_to;
+ call them.
+
+2004-01-23 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.mi/mi-var-child.exp: Update copyright year. Move new test
+ after -var-update.
+
+2004-01-23 David Carlton <carlton@kealia.com>
+
+ * gdb.cp/namespace.cc (C::ensureRefs): New.
+ * gdb.cp/namespace1.cc (C::ensureOtherRefs): New.
+
+2004-01-20 Nick Roberts <nick@nick.uklinux.net>
+
+ * gdb.mi/mi-stack.exp (test_stack_locals_listing): Test for
+ case "-stack-list-locals 2".
+ * gdb.mi/mi-var-child.exp: Test for case
+ "-var-list-children --all-values NAME".
+
+2004-01-18 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/local.exp: Accept correct output for gcc v3 -gstabs+.
+
+2004-01-18 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/fileio.exp: Add "$gdb_prompt $" anchors to patterns
+ used with gdb_test_multiple.
+
+ * gdb.base/gdb1476.exp: Accept alternat pattern for failed memory
+ read at address 0. This fixes PR testsuite/1504.
+
+2004-01-18 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/gdbserver.exp (gdbserver_gdb_load): Rename from gdb_load.
+ Remove downloading, guessing the host executable, the calls to
+ gdb_file_cmd and gdb_target_cmd, and "load" support.
+ (infer_host_exec): New function broken out from gdb_load.
+ (gdb_load): New wrapper for gdbserver_gdb_load.
+ * lib/mi-support.exp (mi_gdb_target_cmd): New function, based on
+ gdb_target_cmd. Use -target-select.
+ (mi_gdb_file_cmd): New function, broken out from mi_gdb_load.
+ Download binaries to the host. Clear last_mi_remote_file when
+ we load a new binary.
+ (mi_gdb_load): Call mi_gdb_file_cmd. If gdbserver.exp is loaded,
+ call gdbserver_gdb_load and mi_gdb_target_cmd.
+
+2004-01-17 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/templates.exp: Accept more spaces with "<foo, ?bar>"
+ type patterns.
+
+2004-01-17 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/templates.exp: Fix typo in test name of
+ "print Foo<volatile char*>::foo".
+
+2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/setvar.exp: Remove setup_xfail for hppa*-*-*11*.
+
+2004-01-16 Ben Elliston <bje@wasabisystems.com>
+
+ * gdb.arch/Makefile.in (MISCELLANEOUS): Remove.
+ (clean mostlyclean): Remove empty rm.
+
+2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/setvar.exp: Add copyright years.
+
+2004-01-14 David Carlton <carlton@bactrian.org>
+
+ * gdb.cp/rtti.exp: Update copyright. KFAIL test with repect to
+ PR c++/1511 and update coment.
+ * gdb.cp/templates.exp: Update patterns to match current output.
+ If changes involve something other than whitespace, KFAIL
+ w.r.t. PR c++/1512 or PR c++/931 as appropriate.
+
+2004-01-14 David Carlton <carlton@kealia.com>
+
+ * gdb.cp/namespace.exp: Add tests involving classes defined within
+ namespaces.
+ * gdb.cp/namespace.cc (C::CClass): New.
+ * gdb.cp/namespace1.cc (C::OtherFileClass): New.
+
+2004-01-14 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/sepdebug.exp: Bail out of the test if we don't know
+ what debug info we have. Print a better message if something goes
+ wrong while producing the separate debug info file.
+
+2004-01-14 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/callfuncs.c: Remove explicit declaration of malloc.
+
+2004-01-14 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/callfuncs.c: Add copyright notice.
+
+2004-01-13 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/derivation.exp: Add XFAIL for bug with protected
+ inheritance. PR gdb/1498, PR gcc/13539.
+
+2004-01-13 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.threads/gcore-thread.exp: Prefix name of binary with
+ test specific name.
+ * gdb.mi/gdb669.exp: Ditto.
+ * gdb.mi/mi-pthreads.exp: Ditto.
+ * gdb.mi/mi1-pthreads.exp: Ditto.
+ * gdb.mi/mi2-pthreads.exp: Ditto.
+
+2004-01-12 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/member-ptr.cc: Add copyright notice.
+
+2004-01-12 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/member-ptr.exp: Use gdb_test, gdb_test_multiple. Add
+ some patterns for recent versions of gcc and hpacc. Delete
+ calls to setup_xfail for hppa*-*-*. Delete redundant tests.
+ Delete tests that access a NULL pointer-to-member-data. This
+ script is still disabled for gcc.
+
+2004-01-12 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.mi/mi2-basics.exp: Make sure that full pathnames are
+ escaped correctly.
+
+2004-01-12 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/sepdebug.exp: New file.
+ * gdb.base/sepdebug.c: New file.
+ * lib/gdb.exp (separate_debug_filename): New procedure.
+ (gdb_gnu_strip_debug): New procedure.
+
+2004-01-12 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.mi/ChangeLog: Delete file. Renamed to ...
+ * gdb.mi/ChangeLog-1999-2003: New file.
+
+2004-01-12 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/fileio.exp: Update copyright year. On GNU/Linux, for
+ "Renaming a directory to a non-empty directory returns ENOTEMPTY
+ or EEXIST", treat EBUSY as an XFAIL.
+
+2004-01-11 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/scope.exp: Remove obsolete setup_xfail for
+ hp_cc_compiler.
+
+2004-01-10 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/classes.exp: Remove old "(obsolescent gcc or gdb)"
+ decorations.
+
+2004-01-10 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/virtfunc.exp: Remove old "(obsolescent gcc or gdb)"
+ and "(aCC)" decorations. Remove obsolete doco about old
+ test results.
+
+2004-01-09 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/exception.exp: Fix typo in doco.
+
+2004-01-09 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/gdb1476.exp: Fix typo.
+
+2004-01-09 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.hp/gdb.aCC/exception.exp: Re-create as a nearly empty
+ file.
+
+2004-01-09 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/exception.cc: Change <iostream.h> to <iostream>.
+ * gdb.cp/exception.exp: Use gdb test, gdb_test_multiple.
+ Use gdb_compile. Remove restriction on gcc. Add some patterns
+ for recent version of gdb. Delete second half, which was a copy
+ of the first half with different build flags. This test is
+ still disabled because it is still not ready for production.
+
+2004-01-08 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/exception.cc: Add copyright notice.
+ * gdb.cp/exception.exp: Add a notice that this file is broken
+ because of line number changes caused by addition of copyright
+ notice.
+
+2004-01-08 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/exception.cc: Renamed from gdb.hp/gdb.aCC/exception.cc.
+ * gdb.cp/exception.exp: Renamed from gdb.hp/gdb.aCC/exception.exp.
+
+2004-01-08 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/classes.exp: Accept gnu abi 2.
+ * gdb.cp/derivation.exp: Likewise.
+ * gdb.cp/overload.exp: Likewise.
+ * gdb.cp/virtfunc.exp: Likewise.
+
+2004-01-08 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.mi/pthreads.c (done_making_threads): Remove extraneous
+ semicolon after end of function.
+
+2004-01-07 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/bs15503.cc: Include <iostream>, not <iostream.h>.
+ * gdb.cp/bs15503.exp: Remove hp-only restriction. Use modern
+ boilerplate code for compiling and running the program under
+ test. Add some string method tests.
+
+2004-01-07 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/bs15503.cc: Add copyright notice.
+ * gdb.cp/bs15503.exp: Adjust line number.
+
+2004-01-07 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.hp/gdb.defects/bs15503.exp: Renamed to gdb.cp/bs15503.exp.
+ * gdb.hp/gdb.defects/bs15503.cc: Renamed to gdb.cp/bs15503.cc.
+
+2004-01-07 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/funcargs.exp: Remove obsolete setup_xfail for
+ hp_cc_compiler.
+
+2004-01-07 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/cttiadd.c: Add a marker for gdb_get_line_number.
+ * gdb.cp/ctti.exp: Use the marker instead of "next".
+ With gcc, run further before bailing.
+
+2004-01-07 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/cttiadd.cc: Add copyright notice.
+ * gdb.cp/cttiadd1.cc: Likewise.
+ * gdb.cp/cttiadd2.cc: Likewise.
+ * gdb.cp/cttiadd3.cc: Likewise.
+
+2004-01-07 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/ctti.exp: Partial rewrite. Call gdb_compile properly.
+ Use gdb_test, gdb_test_multiple. Use floating-point values that
+ have exact representations in IEEE-ish formats.
+
+2004-01-07 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/constvars.exp: Do not force lang=c++ if using HP
+ compilers. Delete duplicate call to get_compiler_info.
+ (local_compiler_xfail_check): setup_xfail if $hp_cc_compiler.
+ * gdb.base/volatile.exp: Likewise.
+
+2004-01-07 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/gdb1476.exp: Only run the tests if we can't read the
+ memory at address 0.
+
+2004-01-07 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.stabs/weird.exp: Use hp_cc_compiler and hp_aCC_compiler
+ to test for hp-ux assembler. Fix copyright years.
+
+2004-01-07 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/fileio.c (strerrno): Add "EBUSY".
+
+2004-01-07 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/fileio.c (test_open): Do not pass S_IWUSR to "open"
+ when creating the read-only file. From analysis by Roland McGrath
+ and Elena Zannoni.
+
+2004-01-06 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/namespace.exp: Call get_compiler_info with "c++".
+
+2004-01-06 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/cvexpr.c: Be type-safe with function pointers and
+ data pointers.
+
+2004-01-06 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/m-static.exp: Compile one source file at a time.
+ Delete unused call to get_compiler_info.
+
+2004-01-06 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/call-ar-st.exp: Delete explicit reference to ${binfile}.ci.
+ * gdb.base/call-rt-st.exp: Likewise.
+ * gdb.base/nodebug.exp: Likewise.
+ * gdb.base/volatile.exp: Likewise.
+ * gdb.cp/ref-types.exp: Likewise.
+ * gdb.cp/templates.exp: Likewise.
+
+2004-01-05 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/gdb1476.exp, gdb.base/gdb1476.c: New files.
+
+2004-01-05 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/funcargs.exp: Delete special timeout of 240 seconds for
+ hppa*-hp-hpux*.
+
+2004-01-04 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/structs.exp: Add patterns to kfail PR gdb/1447 for
+ x86_64-*-*.
+
+ * gdb.base/structs.exp: Add patterns to kfail PR gdb/1447 for
+ sparc64-*-* and sparc*-solaris2*.
+
+2004-01-04 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/structs.exp: Remove ${testfile} from "zed L<n> for
+ return ${tests}" test. The ${tests} already mentions the
+ filename.
+
+2004-01-02 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/local.exp: Accept gcc abi 2.
+
+2004-01-02 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/templates.exp: Accept gcc abi 2.
+
+2004-01-02 Michael Chastain <mec.gnu@mindspring.com>
+
+ * lib/compiler.cc: Remove supports_template_debugging.
+ * gdb.cp/templates.exp: Do not test supports_template_debugging.
+
+2004-01-01 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/namespace.exp: Accept gcc abi 2.
+
+2004-01-01 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/method.exp: Accept gcc abi 2.
+
+2004-01-01 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/classes.exp: Generate identical results as old version.
+ * gdb.cp/derivation.exp: Likewise.
+ * gdb.cp/overload.exp: Likewise.
+ * gdb.cp/virtfunc.exp: Likewise.
+
+2004-01-01 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/virtfunc.exp: Modify some patterns to avoid a
+ mysterious bug with sourceware version of expect.
+
+2004-01-01 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/overload.exp: Rewrite. Clean up patterns to match
+ current versions of gcc, including gcc abi 2. Remove gratuitous
+ restart of test program. Use gdb_test_multiple and gdb_test for
+ all tests. Add patterns to xfail missing "const" in "const char *"
+ and kfail PR gdb/1155.
+
+2004-01-01 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/derivation.exp: Rewrite. Clean up patterns to match
+ current versions of gcc, including gcc abi 2. Remove gratuitous
+ restart of test program. Use gdb_test_multiple and gdb_test for
+ all tests. Add patterns to kfail PR gdb/1498.
+
+2003-12-31 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/virtfunc.exp: Rewrite. Clean up patterns to match
+ current versions of gcc, including gcc abi 2. Use "breakpoint"
+ and "continue" instead of restarting the target program. Use
+ gdb_test_multiple and gdb_test for all tests.
+
+2004-01-01 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.asm/asm-source.exp: Update copyright year. Link statically
+ for *-*-solaris2*.
+
+2003-12-31 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/classes.exp: Rewrite. Clean up patterns to match
+ current versions of gcc, including gcc abi 2. Use "breakpoint"
+ and "continue" instead of restarting the target program several
+ times. Use gdb_test_multiple and gdb_test for all tests.
+
+2003-12-18 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/sect-cmd.exp: Handle compiling test case from multiple
+ source files.
+
+2003-12-16 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/environ.exp: Handle compiling test case from multiple
+ source files.
+
+2003-12-16 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/structs.exp: Call gdb_exit as well as gdb_start.
+
+2003-12-17 Jim Blandy <jimb@redhat.com>
+
+ * gdb.base/freebpcmd.c: Add copyright notice.
+
+ * gdb.base/freebpcmd.exp: Mark the interesting failure as known.
+
+2003-12-16 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/maint.exp: Add generic FAIL patterns to prevent timeouts.
+
+2003-12-13 Jim Blandy <jimb@redhat.com>
+
+ * gdb.base/freebpcmd.exp, gdb.base/freebpcmd.c: New test.
+
+2003-12-12 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb.asm/frv.inc: New file.
+ * gdb.asm/asm-source.exp: Add frv-*-* as a supported target.
+
+2003-12-09 Fred Fish <fnf@redhat.com>
+
+ * gdb.base/break.c (marker1, marker2, marker3, marker4): Move
+ functions to break1.c and leave prototypes behind. Add more
+ "set breakpoint NN here" comments.
+ * gdb.base/break1.c: New file.
+
+ * gdb.base/break.exp: Handle compiling test case from multiple
+ source files and change source file references as needed.
+ * gdb.base/completion.exp: Ditto.
+ * gdb.base/condbreak.exp: Ditto.
+ * gdb.base/define.exp: Ditto.
+ * gdb.base/ena-dis-br.exp: Ditto.
+ * gdb.base/info-proc.exp: Ditto.
+ * gdb.base/maint.exp: Ditto.
+ * gdb.base/until.exp: Ditto.
+
+ * gdb.base/condbreak.exp: Use bp_locationNN variables instead of
+ hardcoded line numbers.
+ * gdb.base/define.exp: Ditto.
+ * gdb.base/ena-dis-br.exp: Ditto.
+ * gdb.base/maint.exp: Ditto.
+ * gdb.base/until.exp: Ditto.
+
+ * gdb.base/completion.exp: Use "break1" for completion tests since
+ "break" is no longer a unique prefix.
+
+2003-12-06 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/structs.exp (test_struct_returns): When applicable, set
+ "return_value_unimplemented". When an unimplemented struct return
+ architecture, report incorrect values as a KFAIL
+
+2003-12-05 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/rtti.exp: Accept new wording of warning from
+ cp_lookup_rtti_type.
+
+2003-12-05 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/scope.exp (test_at_main): Replace references to
+ gcc_compiled with calls to test_compiler_info.
+ (test_at_foo): Likewise.
+ (test_at_bar): Likewise.
+
+2003-12-04 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/so-impl-ld.exp: Replace reference to gcc_compiled with call
+ to test_compiler_info.
+
+2003-12-03 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.base/so-impl-ld.exp: Update copyright notice.
+
+2003-12-02 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/mips_pro.exp: Replace references to gcc_compiled with calls
+ to test_compiler_info.
+
+2003-11-28 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.objc/objcdecode.exp: Match and KFAIL the output that comes
+ from current versions of gdb. Clean up regular expressions.
+ Delete redundant timeout case.
+
+2003-11-28 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.objc/nondebug.exp: Match and KFAIL the output that comes
+ from current versions of gdb. Clean up regular expressions.
+ Delete redundant timeout case.
+
+2003-12-01 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/callfuncs.exp (do_function_calls): Replace reference to
+ gcc_compiled with call to test_compiler_info.
+
+2003-11-30 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/list.exp (test_list_function): Delete unused declaration
+ of gcc_compiled.
+
+2003-11-29 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/complex.exp: Replace reference to gcc_compiled with
+ call to test_compiler_info.
+
+2003-11-29 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.asm/asm-source.exp: Initialize asm-note to "empty". Set
+ asm-note to "netbsd" for *-*-netbsdelf* and x86_64-*-netbsd*. Use
+ it to create the appropriate note.inc.
+ * gdb.asm/asmsrc1.s: Include "note.inc".
+ * gdb.asm/netbsd.inc: New file.
+ * gdb.asm/empty.inc: New file.
+
+2003-11-28 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/constvars.exp: Replace references to gcc_compiled with
+ calls to test_compiler_info.
+
+2003-11-27 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.base/volatile.exp: Replace references to gcc_compiled with
+ calls to test_compiler_info.
+
+2003-11-27 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/structs.exp: Use i*86-*-* instead of i686-*-* as a
+ pattern for the KFAILs.
+
+2003-11-25 Adam Fedor <fedor@gnu.org>
+
+ * gdb.objc/objcdecode.exp: Test for PR objc/1238.
+ * gdb.objc/objcdecode.m: New file.
+
+2003-11-25 Adam Fedor <fedor@gnu.org>
+
+ * gdb.objc/nondebug.exp: Test for PR objc/1236.
+ * gdb.objc/nondebug.m: New file.
+
+2003-11-26 Ben Elliston <bje@wasabisystems.com>
+
+ * gdb.asm/asm-source.exp: Make sure the final link succeeds on
+ NetBSD as it does on FreeBSD. Modelled on a similar change by
+ Mark Kettenis on 2003-05-30.
+ (link-flags): Set to "--entry _start" regardless of target.
+ Special linker flags are to be appended to $link-flags.
+ * gdb.asm/mips.inc (gdbasm_startup): Remove __start label.
+
+2003-11-25 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/method.exp: Accept output of new demangler.
+
+2003-11-25 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb/class2.exp: New file.
+ * gdb/class2.cc: New file.
+
+2003-11-25 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.cp/templates.exp (test_ptype_of_templates): Accept output
+ of new demangler.
+
+2003-11-23 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.arch/i386-unwind.exp: Use gdb_run_cmd and gdb_expect instead
+ of gdb_test "run".
+
+2003-11-23 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.arch/i386-unwind.exp: Don't use runto_main. Change
+ "continue" into "run".
+
+2003-11-23 Michael Chastain <mec.gnu@mindspring.com>
+
+ Partial fix for PR testsuite/1456.
+ * gdb.cp/ambiguous.exp: Replace reference to gcc_compiled with
+ call to test_compiler_info.
+ * gdb.cp/ctti.exp: Likewise.
+ * gdb.cp/derivation.exp: Likewise.
+ * gdb.cp/member-ptr.exp: Likewise.
+ * gdb.cp/virtfunc.exp (test_virtual_calls): Remove unused
+ reference to gcc_compiled.
+
+2003-11-23 Michael Chastain <mec.gnu@mindspring.com>
+
+ Fix PR testsuite/1463.
+ * gdb.base/structs.exp (start_structs_test): Call
+ get_debug_format before using the debug format.
+
+2003-11-22 Andrew Cagney <cagney@redhat.com>
+
+ * lib/gdb.exp (gdb_test_multiple): Add simple example.
+ * gdb.base/structs.exp: Use gdb_test_multiple.
+
+2003-11-20 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/structs.exp: Handle and recover from internal errors.
+ Replace "foo${n}" with "foo<n>" in test messages.
+
+ * gdb.base/structs.exp: Update copyright. Rewrite.
+ * gdb.base/structs.c: Update copyright. Rewrite.
+
+ * lib/gdb.exp (gdb_internal_error_resync): Issue a perror when the
+ resync count exceeded.
+
+ * gdb.base/maint.exp: Use gdb_internal_error_resync to recover
+ from the internal error.
+ * lib/gdb.exp (gdb_internal_error_resync): New procedure.
+ Original from Jim Blandy.
+ (gdb_test_multiple): Use gdb_internal_error_resync.
+
+2003-11-19 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/callfuncs.exp: Change the XFAILed descriptor test to a
+ KFAIL.
+
+2003-11-17 Mark Kettenis <kettenis@gnu.org>
+
+ New testcase for PR backtrace/1435.
+ * gdb.arch/i386-unwind.exp: New file.
+ * gdb.arch/i386-unwind.c: New file.
+
+2003-11-17 Andrew Cagney <cagney@redhat.com>
+
+ * lib/gdb.exp (compiler_info): New global.
+ (test_compiler_info): New function.
+ (get_compiler_info): Set compiler_info.
+ * lib/compiler.c, lib/compiler.cc: Add copyright. When GNUC, set
+ "compiler_info" to gcc-<major>-<minor>.
+
+2003-11-15 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.trace/configure: Remove.
+
+2003-11-13 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/break.c: Add comments to aid finding line numbers for
+ breakpoints.
+ * gdb.base/break.exp: Remove all references to explicit line
+ numbers.
+
+2003-11-11 Nick Clifton <nickc@redhat.com>
+
+ * gdb.base/shreloc.exp: Do not run for targets which do not
+ support shared objects.
+
+2003-11-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/fileio.exp: Drop tests for nointerrupts and noinferiorio.
+ Don't run tests if nofileio flag is given.
+
+2003-11-07 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.cp/annota3.exp: Make sure we can match 'Hardware watchpoint'
+ as well as 'Watchpoint'.
+
+2003-11-06 Elena Zannoni <ezannoni@redhat.com>
+
+ Reported by Jim Ingham <jingham@apple.com>:
+ * gdb.base/annota1.exp: Match at least one occurrence of the
+ signal handler annotation.
+
+2003-11-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.cp/annota2.exp: Make sure we can match 'Hardware watchpoint'
+ as well as 'Watchpoint'.
+
+2003-11-05 Michael Chastain <mec@shout.net>
+
+ * gdb.mi/pthreads.c (routine): Handle early return from sleep.
+
+2003-11-03 Kris Warkentin <kewarken@qnx.com>
+
+ * gdb.arch/gdb1291.c: New test file.
+ * gdb.arch/gdb1291.exp: New test script.
+ * gdb.arch/gdb1431.c: New test file.
+ * gdb.arch/gdb1431.exp: New test script.
+
+2003-10-22 Michael Chastain <mec@shout.net>
+
+ * gdb.mi/pthreads.c: Add copyright notice.
+
+2003-10-22 Michael Chastain <mec@shout.net>
+
+ * gdb.threads/pthreads.c: Add copyright notice.
+
+2003-10-20 Michael Chastain <mec@shout.net>
+
+ * gdb.base/gdb1056.exp: New test script.
+
+2003-10-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/killed.exp: Use gdb_run_cmd.
+
+2003-10-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/gcore.exp: Issue an UNSUPPORTED and exit if we can't
+ create a core file.
+ * gdb.threads/gcore-thread.exp: Likewise.
+
+2003-10-13 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/call-rt-st.c (struct bit_flags_char_t): New bitfield
+ type, based on char type.
+ (struct bit_flags_short_t): New bitfield type, based on short type.
+ (init_bit_flags_char): New fuction.
+ (init_bit_flags_short): Ditto.
+ (print_bit_flags_char): Ditto.
+ (print_bit_flags_short): Ditto.
+ (main): Add handling for bit_flags_char_t and bit_flags_short_t.
+
+2003-10-11 Michael Chastain <mec@shout.net>
+
+ * gdb.base/call-rt-st.exp: Update copyright year.
+
+2003-10-10 Kei Sakamoto <sakamoto.kei@renesas.com>
+
+ * config/hmsirom.exp: Replace "Hitachi" with "Renesas".
+ * gdb.disasm/sh3.s: Ditto.
+
+2003-10-07 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/switch-threads.exp: New test.
+ * gdb.threads/switch-threads.c: New source file.
+
+2003-10-07 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/ending-run.exp: Add sh specific case.
+
+2003-10-06 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/watchpoint.exp: Delete obsolete clear_xfail.
+ * gdb.disasm/mn10200.exp: Delete obsolete file.
+
+2003-09-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * ChangeLog: Correct an entry command.exp -> commands.exp.
+ * gdb.base/commands.exp (bp_deleted_in_command_test)
+ (temporary_breakpoint_commands): Check noargs.
+
+2003-09-25 David Carlton <carlton@kealia.com>
+
+ * gdb.cp/namespace.exp: Tweak comments. Add non-quoted versions
+ of some print tests, where appropriate. Add tests for C::D::cd,
+ E::ce, F::cXfX, G::XgX.
+ * gdb.cp/namespace.cc: Add XgX, cXfX, ce.
+
+2003-09-25 Richard Earnshaw <rearnsha@arm.com>
+
+ * lib/java.exp (java_init): Import target_alias before using it.
+
+2003-09-25 David Carlton <carlton@kealia.com>
+
+ * gdb.base/corefile.exp: Delete obsolete setup_xfail.
+
+2003-09-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/selftest.exp: Accomodate more instruction reordering
+ weirdness.
+
+2003-09-17 Michael Chastain <mec@shout.net>
+
+ * gdb.cp/gdb1355.exp: New file.
+ * gdb.cp/gdb1355.c: New file.
+
2003-09-15 Corinna Vinschen <vinschen@redhat.com>
* gdb.asm/asm-source.exp: Add sh*-*-* as supported target.
@@ -5,8 +1193,8 @@
2003-09-11 David Carlton <carlton@kealia.com>
- * gdb.c++/namespace.exp: Add tests for namespace types.
- * gdb.c++/maint.exp (test_help): Test 'help maint cp namespace'.
+ * gdb.cp/namespace.exp: Add tests for namespace types.
+ * gdb.cp/maint.exp (test_help): Test 'help maint cp namespace'.
(test_namespace): New.
2003-09-11 Elena Zannoni <ezannoni@redhat.com>
@@ -97,7 +1285,7 @@
escaped correctly.
2003-08-07 Elena Zannoni <ezannoni@redhat.com>
-
+
* configure.in: Don't generate config.h from config.hin.
* configure: Regenerate.
* config.hin: Remove file.
@@ -145,12 +1333,12 @@
2003-07-22 Michael Snyder <msnyder@redhat.com>
- * gdb.disasm/8300s.s: Fix syntax of bsr insn.
+ * gdb.disasm/8300s.s: Fix syntax of bsr insn.
* gdb.disasm/h8300s.exp : Minor changes in disassembler output require
patterns to be more general, accepting old and new output.
Some output chars (such as '+') also must be quoted.
- Some addresses are displayed numerically instead of
+ Some addresses are displayed numerically instead of
symbolically.
2003-07-23 Michael Snyder <msnyder@redhat.com>
@@ -231,7 +1419,7 @@
* gdb.base/annota1.exp: Make sure that we properly escape the
full path of the source file. Xfail more permissive patterns,
- due to a compiler debug info problem.
+ due to a compiler debug info problem.
2003-07-07 Andreas Schwab <schwab@suse.de>
@@ -338,7 +1526,7 @@
* gdb.base/fileio.exp: Disable target when nointerrupts and
noinferiorio, instead of limiting it to remote. Use remote_exec
instead of system.
-
+
2003-06-12 Jeff Johnston <jjohnstn@redhat.com>
* gdb.base/float.exp: Add ia64 support.
@@ -426,7 +1614,7 @@
* gdb.base/corefile.exp: Tolerate stuff after argument parens in
backtrace.
-
+
2003-05-20 David Carlton <carlton@math.stanford.edu>
* gdb.c++/namespace1.cc: Actually do 'cvs add' before committing
@@ -449,13 +1637,13 @@
2003-05-14 Jeff Johnston <jjohnstn@redhat.com>
Roland McGrath <roland@redhat.com>
- * gdb.threads/linux-dp.exp: Account for fact that in nptl model
+ * gdb.threads/linux-dp.exp: Account for fact that in nptl model
there is no manager thread.
2003-05-08 Jeff Johnston <jjohnstn@redhat.com>
- * gdb.threads/schedlock.exp: Remove assumption that all threads
- will run in a particular small time slice. Also ensure we break
+ * gdb.threads/schedlock.exp: Remove assumption that all threads
+ will run in a particular small time slice. Also ensure we break
in one of the child threads rather than the main thread.
2003-05-07 Jim Blandy <jimb@redhat.com>
@@ -527,7 +1715,7 @@
* gdb.base/attach.exp: Add new message from ptrace in case of
attaching to nonexistent process.
-
+
2003-04-11 Jim Blandy <jimb@redhat.com>
* gdb.c++/derivation.exp, gdb.c++/overload.exp,
@@ -544,7 +1732,7 @@
2003-04-10 Elena Zannoni <ezannoni@redhat.com>
- * gdb.base/completion.exp: Use string_to_regexp to match the
+ * gdb.base/completion.exp: Use string_to_regexp to match the
working directory name.
2003-04-09 Jim Blandy <jimb@redhat.com>
@@ -580,9 +1768,9 @@
* lib/gdb.exp: Put "the program is no longer running", and "the
program exited" in parenthesis.
* lib/mi-support.exp: Ditto.
-
+
2003-04-02 Bob Rossi <bob_rossi@cox.net>
-
+
* gdb.mi/mi-file.exp: New file for -file-list-exec-source-file.
2003-03-29 Andrew Cagney <cagney@redhat.com>
@@ -711,7 +1899,7 @@
2003-02-27 Michael Snyder <msnyder@redhat.com>
- * gdb.base/restore.c (main): Return zero, so exit code
+ * gdb.base/restore.c (main): Return zero, so exit code
will be consistant.
2003-02-26 David Carlton <carlton@math.stanford.edu>
@@ -783,7 +1971,7 @@
Andrew Cagney <ac131313@redhat.com>
* gdb.mi/mi-cli.exp: New file.
-
+
2003-02-04 Michael Chastain <mec@shout.net>
* gdb.c++/anon-union.exp: Do not call gdb_suppress_entire_file.
@@ -889,7 +2077,7 @@
* gdb.asm/asm-source.exp: Ditto.
* gdb.base/advance.exp: Ditto.
* gdb.base/display.exp: Ditto.
- * gdb.base/long_long.exp: Ditto.
+ * gdb.base/long_long.exp: Ditto.
* gdb.base/mips_pro.exp: Ditto.
* gdb.base/overlays.exp: Ditto.
* gdb.base/relocate.exp: Ditto.
@@ -1223,8 +2411,8 @@
2002-11-08 Jeff Johnston <jjohnstn@redhat.com>
- * lib/mi-support.exp (mi_gdb_start): Verify the startup message
- for mi1 and current mi is in correct format. New mi startup message
+ * lib/mi-support.exp (mi_gdb_start): Verify the startup message
+ for mi1 and current mi is in correct format. New mi startup message
should be in mi console format. This is part of fix for PR gdb/604.
2002-09-18 Fernando Nasser <fnasser@redhat.com>
@@ -1279,7 +2467,7 @@
* mi0-stack.exp, mi0-stepi.exp, mi0-until.exp: Delete.
* mi0-var-block.exp, mi0-var-child.exp: Delete.
* mi0-var-cmd.exp, mi0-var-display.exp, mi0-watch.exp: Delete.
-
+
2002-09-27 Kevin Buettner <kevinb@redhat.com>
* gdb.base/annota1.exp (info break): Make directory components of
@@ -1306,7 +2494,7 @@
(test_empty_complaint): New function.
(test_empty_complaints): New function. Check no output when no
complaints.
-
+
2002-09-19 Jim Blandy <jimb@redhat.com>
* gdb.base/charset.exp, gdb.base/charset.c: New files.
@@ -1364,7 +2552,7 @@
2002-09-14 Corinna Vinschen <vinschen@redhat.com>
- * gdb.base/command.exp: Don't expect a "Program exited normally"
+ * gdb.base/commands.exp: Don't expect a "Program exited normally"
string after running the commands execution on breakpoint tests.
2002-09-13 Corinna Vinschen <vinschen@redhat.com>
@@ -1549,7 +2737,7 @@
to avoid having GDB convert them to pointers (with loss
of information).
- * gdb.base/d10v.ld: Merge in several years worth of
+ * gdb.base/d10v.ld: Merge in several years worth of
default linker script changes.
* gdb.base/long_long.exp: Add check for sizeof (long double).
@@ -1557,7 +2745,7 @@
* gdb.asm/asm-source.exp: Add x86-64 target.
* gdb.asm/x86_64.inc: New.
-
+
2002-05-30 Michael Chastain <mec@shout.net>
From Benjamin Kosnik <bkoz@redhat.com>:
@@ -1579,7 +2767,7 @@
From Benjamin Kosnik <bkoz@redhat.com>:
* gdb.c++/try_catch.cc: New file.
- * gdb.c++/try_catch.exp: New file.
+ * gdb.c++/try_catch.exp: New file.
2002-05-27 Michael Chastain <mec@shout.net>
@@ -1599,7 +2787,7 @@
2002-05-23 Michael Snyder <msnyder@redhat.com>
- * gdb.base/all-bin.exp: Revise previous patch by just reducing
+ * gdb.base/all-bin.exp: Revise previous patch by just reducing
the precision of the floating point test results.
* gdb.base/call-rt-st.exp: Ditto.
@@ -1631,7 +2819,7 @@
* gdb.base/maint.exp (maint print type): Update for new type
structure.
-
+
2002-05-14 Elena Zannoni <ezannoni@redhat.com>
* gdb.arch: New directory.
@@ -1677,7 +2865,7 @@
* gdb.base/default.exp: Merge clauses for arm, strongarm, xscale.
* gdb.base/long_long.exp: Merge clauses for arm and xscale.
Add iftarget clause for strongarm.
-
+
2002-05-06 Michael Snyder <msnyder@redhat.com>
* lib/gdb.exp (gdb_test): Add case to allow for status wrapper.
@@ -1907,7 +3095,7 @@ From Jim Blandy <jimb@redhat.com>
2002-03-27 Michael Snyder <msnyder@redhat.com>
- * gdb.base/help.exp: Modify expect strings to reflect
+ * gdb.base/help.exp: Modify expect strings to reflect
clean-ups in help messages.
2002-03-26 Fred Fish <fnf@redhat.com>
@@ -2193,7 +3381,7 @@ From Jim Blandy <jimb@redhat.com>
print foo_instance1.overload1arg((unsigned int)arg8)
print foo_instance1.overload1arg((float)arg11)
print foo_instance1.overload1arg((double)arg12)
-
+
2002-01-07 Michael Snyder <msnyder@redhat.com>
* gdb.base/huge.exp: New test. Print a very large target data object.
@@ -2315,7 +3503,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com)
* gdb.base/break.exp: Fix HP specific search string when testing
backtracing in a called function.
- * gdb.base/constvars.exp: Only set lang to C++ if we're
+ * gdb.base/constvars.exp: Only set lang to C++ if we're
compiling the test with HP's compilers.
* gdb.base/volatile.exp: Similarly.
@@ -2398,7 +3586,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com)
2001-12-06 Michael Snyder <msnyder@redhat.com>
- * gdb.asm/asm-source.exp: Add tests for info target, info symbol,
+ * gdb.asm/asm-source.exp: Add tests for info target, info symbol,
and detect whether the start symbol has a leading underscore.
2001-12-04 Jim Blandy <jimb@redhat.com>
@@ -2450,7 +3638,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com)
* gdb.asm/asm-source.exp: Recognize sparc target.
* gdb.asm/configure.in: Recognize sparc target.
* gdb.asm/configure: Regenerate.
-
+
2001-11-21 Michael Snyder <msnyder@redhat.com>
* gdb.asm/m32r.inc: New file.
@@ -2497,7 +3685,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com)
* gdb.mi/mi0-simplerun.exp: Likewise.
* gdb.mi/mi-var-cmd.exp: Likewise.
* gdb.mi/mi0-var-cmd.exp: Likewise.
-
+
2001-11-10 Andrew Cagney <ac131313@redhat.com>
* gdb.asm/asmsrc1.s: Add ``gdbasm_'' prefix to all macros.
@@ -2520,21 +3708,21 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com)
2001-11-07 Michael Snyder <msnyder@redhat.com>
- * gdb.c++/templates.exp (test_template_breakpoints):
- If we get an overload menu, but it does not match what
+ * gdb.c++/templates.exp (test_template_breakpoints):
+ If we get an overload menu, but it does not match what
we expect, we still need to issue the "cancel" command.
* gdb.c++/templates.exp: Replace "void \\*" with "void ?\\*",
making the whitespace optional. Argument for "new" may be
"unsigned" as well as "unsigned int/long".
- * gdb.c++/templates.exp: Replace "const &" with "const ?&",
+ * gdb.c++/templates.exp: Replace "const &" with "const ?&",
making the whitespace optional. Also replace "(void) with
"((void|)), making the keyword "void" optional.
- * gdb.c++/virtfunc.exp: Replace "const &" with "const ?&",
+ * gdb.c++/virtfunc.exp: Replace "const &" with "const ?&",
making the whitespace optional. Also replace "(void) with
"((void|)), making the keyword "void" optional.
* gdb.base/callfuncs.c (t_float_values): This function must
_not_ be prototyped, and the following function (t_float_values2)
- must be prototyped (if the compiler supports it), so that GDB
+ must be prototyped (if the compiler supports it), so that GDB
can be tested against both cases. Usually one case involves
promotion of float to double, while the other does not.
* gdb.base/callfwmall.c: Ditto.
@@ -2589,7 +3777,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com)
* gdb.base/ending-run.exp: Create identical output when passing
`step to end of run' case. Add regular expression branch satisfying
- Stormy16 target.
+ Stormy16 target.
2001-10-28 Mark Kettenis <kettenis@gnu.org>
@@ -2797,7 +3985,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com)
2001-07-17 Stephane Carrez <Stephane.Carrez@worldnet.fr>
- * gdb.base/remote.c (RANDOM_DATA_SIZE): New define, defaults to 48K
+ * gdb.base/remote.c (RANDOM_DATA_SIZE): New define, defaults to 48K
and defined to 1K for m68hc11.
(random_data): Reduce table to 1K for embedded platforms (68hc11).
* gdb.base/remote.exp (get_sizeof): New function from sizeof.exp.
@@ -2883,13 +4071,13 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com)
2001-06-04 Michael Snyder <msnyder@redhat.com>
* gdb.threads/pthreads.exp (check_control_c): Return 0 for success,
- non-zero if control_c fails. Terminate the test on failure,
+ non-zero if control_c fails. Terminate the test on failure,
rather than wait for 12 more tests to time out.
2001-06-06 Jim Blandy <jimb@redhat.com>
* gdb.base/exprs.exp ("sizeof (long long) > sizeof (long) (true)"):
- Don't forget to match the GDB prompt.
+ Don't forget to match the GDB prompt.
* gdb.trace/gdb_c_test.c, actions.c: Fix misspellings.
@@ -2930,7 +4118,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com)
Don't assume that short is shorter than int.
* gdb.base/exprs.exp ("print unsigned short == (~0)"): Don't
assume that shorts are smaller than ints. On a 16-bit machine,
- this isn't true.
+ this isn't true.
("print unsigned char == (~0)"): Add test that verifies that ~0,
an int, is not equal to ~0 stored in an unsigned char. This tests
the same thing that the previous test meant to, but works on
@@ -2940,7 +4128,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com)
2001-05-24 Michael Snyder <msnyder@redhat.com>
* gdb.threads/pthreads.exp (all_threads_running): Add an explicit
- test for (full_coverage == 0). This makes the test run faster,
+ test for (full_coverage == 0). This makes the test run faster,
and prevents dejagnu getting out of step.
2001-05-23 Kevin Buettner <kevinb@redhat.com>
@@ -3008,7 +4196,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com)
* config/sid.exp (gdb_target_sid): Check for error messages.
On error or timeout, don't make expect exit (which will terminate
all subsequent tests); instead just make gdb exit.
- (gdb_load): Check for error messages. On error or timeout,
+ (gdb_load): Check for error messages. On error or timeout,
return a negative value.
2001-04-24 Jim Blandy <jimb@redhat.com>
@@ -3254,7 +4442,7 @@ Sun Feb 4 17:32:21 2001 Andrew Cagney <cagney@redhat.com>
2001-01-25 matthew green <mrg@redhat.com>
* config/sid.exp (sid_start): Use `remote_spawn' instead of `spawn.'
- Deprecate $sid_spawn_id.
+ Deprecate $sid_spawn_id.
(sid_exit): Remove code necessary only for `spawn.'
2001-01-25 matthew green <mrg@redhat.com>
@@ -3302,7 +4490,7 @@ Fri Jan 12 18:29:01 2001 Andrew Cagney <cagney@b1.cygnus.com>
2000-12-18 Michael Snyder <msnyder@cygnus.com>
- * gdb.base/setvar.exp: Use double '\\' to quote curly braces
+ * gdb.base/setvar.exp: Use double '\\' to quote curly braces
in regexp. One '\' does not suffice on Linux.
2000-12-09 Michael Chastain <chastain@redhat.com>
@@ -3381,7 +4569,7 @@ Fri Jan 12 18:29:01 2001 Andrew Cagney <cagney@b1.cygnus.com>
* config/monitor.exp (gdb_target_cmd): Abstracts some of the
code from gdb_target_monitor, so it can be used independantly
for gdbserver. Also comment out an unnecessary PUTS.
-
+
2000-11-03 Michael Snyder <msnyder@cygnus.com>
* gdb.base/a2-run.exp: Use gdb_skip_stdio_test.
@@ -3461,7 +4649,7 @@ Fri Jan 12 18:29:01 2001 Andrew Cagney <cagney@b1.cygnus.com>
gnu-oldld case on ARM.
* gdb.base/watchpoint.exp (test_stepping): Clear xfail
for ARM targets.
-
+
Mon Jul 24 07:46:02 CDT 2000 Clinton Popetz <cpopetz@cygnus.com>
* gdb.java/configure.in (AC_INIT): Use jmisc.exp.
@@ -3517,7 +4705,7 @@ Tue Jul 4 03:43:49 2000 Andrew Cagney <cagney@b1.cygnus.com>
compile/link program. Update line numbers.
* gdb.asm/d10v.inc: Define ``startup''.
* gdb.asm/asmsrc1.s: Add definition of _start.
-
+
Fri Jun 23 17:45:52 2000 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.base/call-ar-st.exp: More rewrites of multi-line patterns.
@@ -3541,12 +4729,12 @@ Wed Jun 7 13:02:40 2000 Andrew Cagney <cagney@b1.cygnus.com>
2000-06-03 Daniel Berlin <dan@cgsoftware.com>
* gdb.c++/templates.exp (do_tests): Make all of these work under
- g++, and stop skipping them.
+ g++, and stop skipping them.
* gdb.c++/namespace.exp: Move from gdb.hp/gdb.aCC to here, make it
work under g++.
- * gdb.c++/misc.cc: Fix ambiguous initialization with correct
+ * gdb.c++/misc.cc: Fix ambiguous initialization with correct
initialization.
2000-06-02 Michael Snyder <msnyder@cygnus.com>
@@ -3568,7 +4756,7 @@ Wed Jun 7 13:02:40 2000 Andrew Cagney <cagney@b1.cygnus.com>
2000-05-12 Kevin Buettner <kevinb@redhat.com>
* gdb.base/step-test.exp: On IA-64 targets, when stepping out of
- a call, do not require that gdb stop on the line after the call.
+ a call, do not require that gdb stop on the line after the call.
Instead, it is permissible for gdb to stop on the line of the
call itself.
@@ -3585,7 +4773,7 @@ Wed Jun 7 13:02:40 2000 Andrew Cagney <cagney@b1.cygnus.com>
2000-05-08 Michael Snyder <msnyder@cygnus.com>
- * gdb.base/interrupt.exp: Make "pass" message say "send"
+ * gdb.base/interrupt.exp: Make "pass" message say "send"
rather than "send_gdb" (for consistancy).
Mon May 1 15:37:58 2000 Andrew Cagney <cagney@b1.cygnus.com>
@@ -3596,7 +4784,7 @@ Mon May 1 15:37:58 2000 Andrew Cagney <cagney@b1.cygnus.com>
2000-04-28 Michael Snyder <msnyder@cygnus.com>
- * gdb.base/break.exp: When compiled with -O2 optimization,
+ * gdb.base/break.exp: When compiled with -O2 optimization,
gdb may not stop at the first line of main, due to code motion.
2000-04-26 Michael Snyder <msnyder@cygnus.com>
@@ -3690,7 +4878,7 @@ Mon Mar 27 14:46:37 2000 Andrew Cagney <cagney@b1.cygnus.com>
2000-03-13 James Ingham <jingham@leda.cygnus.com>
* lib/gdb.exp: Fix the gdbtk_start routine to correctly find all
- the library directories.
+ the library directories.
Mon Feb 21 13:05:36 2000 Andrew Cagney <cagney@b1.cygnus.com>
@@ -3698,7 +4886,7 @@ Mon Feb 21 13:05:36 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Re-generate.
* gdb.mi: New directory.
-
+
2000-02-25 Scott Bambrough <scottb@netwinder.org>
* gdb.base/long_long.exp: Correct test suite failure when printing
@@ -3759,7 +4947,7 @@ Mon Feb 21 13:05:36 2000 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.base/so-indr-cl.exp: Don't execute the test if not on HPUX.
Don't use xfail's because that affects only the following test.
-
+
* gdb.base/so-impl-ld.exp: Don't execute the tests if not on hpux,
solaris or linux.
@@ -3767,7 +4955,7 @@ Mon Feb 21 13:05:36 2000 Andrew Cagney <cagney@b1.cygnus.com>
2000-01-07 Michael Snyder <msnyder@cygnus.com>
- * gdb.base/display.exp: Some yacc parsers like to say
+ * gdb.base/display.exp: Some yacc parsers like to say
"A syntax error" rather than "A parse error". Accept both.
2000-01-06 Fernando Nasser <fnasser@totem.to.cygnus.com>
@@ -3894,13 +5082,13 @@ Sat Dec 4 15:21:18 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.c++/derivation.exp: remove redundant get compiler info code.
- * gdb.base/commands.exp: add '$gdb_prompt $' anchor to
+ * gdb.base/commands.exp: add '$gdb_prompt $' anchor to
'continue with watch' test point.
1999-11-08 Jim Blandy <jimb@zenia.red-bean.com>
Merged from p2linux-990323-branch:
-
+
* lib/gdb.exp (gdb_continue_to_breakpoint): New function.
Mon Nov 8 23:07:09 1999 Andrew Cagney <cagney@amy.cygnus.com>
@@ -3966,7 +5154,7 @@ Mon Oct 11 13:57:21 1999 Andrew Cagney <cagney@amy.cygnus.com>
containing exp_continue into a while within an expect. Don't
attempt a start more than three times. Check return value from
gdb_load.
-
+
Wed Oct 6 12:05:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.base/watchpoint.exp: Match fail ``finish from marker1'' with
@@ -3981,7 +5169,7 @@ Wed Oct 6 12:05:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
1999-10-01 Fred Fish <fnf@cygnus.com>
- * gdb.base/help.exp (help add-symbol-file): Update to match current
+ * gdb.base/help.exp (help add-symbol-file): Update to match current
gdb output.
1999-09-18 Jim Blandy <jimb@cris.red-bean.com>
@@ -4212,7 +5400,7 @@ Tue Aug 10 15:25:16 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.c++/virtfunc.cc: Add return type and value for main.
* gdb.c++/virtfunc.exp: Run if HP compiler used, add some
match alternatives.
-
+
1999-07-30 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdb.base/display.exp: Fix output of 'p/a &&j' test.
@@ -4266,8 +5454,8 @@ Tue Aug 10 15:25:16 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.c++/annota2.exp: Fix delete breakpoint query testcase.
Fix run to main failures. Watchpoint can be hardware watchpoint.
-
- * gdb.base/annota1.exp: Clean up some more, in case printf has
+
+ * gdb.base/annota1.exp: Clean up some more, in case printf has
debug info. Deal with lack of signal hanlder info in stack.
From Jim Kingdon <kingdon@redhat.com>:
@@ -4409,7 +5597,7 @@ Fri Jun 25 19:27:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
print_double_array(double_array)", "continuing to breakpoint
1018", "print print_double_array(array_d)" and "continuing to
1034" tests.
-
+
1999-06-24 Jason Molenda (jsm@bugshack.cygnus.com)
* Makefile.in: Add empty html and install-html targets.
@@ -4482,9 +5670,9 @@ Wed Jun 2 17:37:05 1999 Andrew Cagney <cagney@b1.cygnus.com>
1999-05-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
- * gdb.base/annota1.exp: Allow any number of "frames-invalid" and
+ * gdb.base/annota1.exp: Allow any number of "frames-invalid" and
"breakpoint-invalid" to be printed.
- * gdb.base/annota2.exp: Revise line number for main breakpoint. Allow any
+ * gdb.base/annota2.exp: Revise line number for main breakpoint. Allow any
number of "frames-invalid" and "breakpoint-invalid" to be printed.
* gdb.base/annota2.cc: Initialize a.x to 0.
@@ -4501,7 +5689,7 @@ Wed Jun 2 17:37:05 1999 Andrew Cagney <cagney@b1.cygnus.com>
"skip_float_tests" is set.
* gdb.base/varargs.exp: Skip "print find_max_double(5,1.0,17.0,2.0,3.0,4.0)"
when "skip_float_tests" set.
-
+
1999-05-06 Keith Seitz <keiths@cygnus.com>
* gdb.base/annota2.cc: Include stdio.h.
@@ -4583,7 +5771,7 @@ Wed May 5 17:44:31 1999 Stan Shebs <shebs@andros.cygnus.com>
change, to mollify finicky HP compiler.
* gdb.hp/reg-test.exp (testfile): Fix file name.
* gdb.stabs/weird.exp: Don't try to run if HP compiler in use.
-
+
* gdb.c++/misc.cc (main): Initialize obj_with_enum.
* gdb.c++/classes.exp: Fix test of obj_with_enum values, allow
alternate form of enum ptype.
@@ -4602,7 +5790,7 @@ Wed May 5 17:44:31 1999 Stan Shebs <shebs@andros.cygnus.com>
Tue Mar 23 14:56:36 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdb.base/commands.exp: Add test for correct position of '>'
- when issuing the 'commands' command after a 'while' or 'if'
+ when issuing the 'commands' command after a 'while' or 'if'
command.
1999-03-18 James Ingham <jingham@cygnus.com>
@@ -4615,7 +5803,7 @@ Tue Mar 23 14:56:36 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdb.base/watchpoint.exp: Use gdb_continue_to_end.
* gdb.base/step-test.exp: Catch a case where finish is broken and
- keep it from killing the rest of the tests.
+ keep it from killing the rest of the tests.
Use gdb_continue_to_end.
* gdb.base/sigall.exp: use gdb_continue_to_end.
@@ -4624,11 +5812,11 @@ Tue Mar 23 14:56:36 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdb.base/display.exp: use runto_main, not run.
- * gdb.base/default.exp: Check for the current error message in the
- r abbreviation test.
+ * gdb.base/default.exp: Check for the current error message in the
+ r abbreviation test.
Add strongarm to the targets that know info float.
- * gdb.base/condbreak.exp: Use the gdb_run command rather than just
+ * gdb.base/condbreak.exp: Use the gdb_run command rather than just
run which doesn't work with monitors.
* gdb.base/call-ar-st.exp: fixed bogus regexp in continuing to 1034 test.
@@ -4636,8 +5824,8 @@ Tue Mar 23 14:56:36 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* gdb.base/break.exp: use the gdb_continue_to_end proc.
* lib/gdb.exp: I had added gdb_continue_to_end used to run to the end of a
- program. Traps the case (in Cygmon) when the program never really
- exits. Same as Mark's continue_to_exit, but I had put it in a lot
+ program. Traps the case (in Cygmon) when the program never really
+ exits. Same as Mark's continue_to_exit, but I had put it in a lot
more places, so I used my name. Sorry Mark...
* config/monitor.exp (gdb_target_monitor): added another
@@ -4675,7 +5863,7 @@ Fri Mar 12 18:06:21 1999 Stan Shebs <shebs@andros.cygnus.com>
* gdb.base/call-ar-st.c (main): Terminate char_array with a null
character, so GDB won't print garbage after its end.
-
+
* gdb.base/call-ar-st.exp: Don't step into sum_array_print; set a
breakpoint there instead. Sometimes GCC emits memcpy to handle
the large structures being passed by value, so we step into that
@@ -4699,7 +5887,7 @@ Fri Mar 12 18:06:21 1999 Stan Shebs <shebs@andros.cygnus.com>
1999-03-05 Nick Clifton <nickc@cygnus.com>
- * gdb.base/a2-run.exp: Add expected fails for strongarm-coff.
+ * gdb.base/a2-run.exp: Add expected fails for strongarm-coff.
1999-03-04 Jim Blandy <jimb@zwingli.cygnus.com>
@@ -4763,12 +5951,12 @@ Fri Feb 5 12:42:56 1999 Stan Shebs <shebs@andros.cygnus.com>
* gdb.base/long_long.c (known_types): Initialize values to zero.
* gdb.base/long_long.exp: Step one more line
so 'dec' is initialized in "get to known place". GDB removes
- leading zeros. Explicitly ask for hex formatting. Use
+ leading zeros. Explicitly ask for hex formatting. Use
unique test case names.
Tue Feb 2 10:16:08 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
- * lib/gdb.exp (gdb_preprocess): Remove 'puts' statement.
+ * lib/gdb.exp (gdb_preprocess): Remove 'puts' statement.
* gdb.c++/method.exp: Add missing close brace.
@@ -4818,8 +6006,8 @@ Tue Jan 19 17:20:09 1999 David Taylor <taylor@texas.cygnus.com>
Fri Jan 15 14:04:57 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
- * gdb.hp/xdb3.exp: do not execute unless on hppa-hpux platform
- and compiled w/o GCC.
+ * gdb.hp/xdb3.exp: do not execute unless on hppa-hpux platform
+ and compiled w/o GCC.
* gdb.hp/watch-cmd.exp: ditto.
@@ -4959,7 +6147,7 @@ Wed Jan 6 18:41:15 1999 David Taylor <taylor@texas.cygnus.com>
* gdb.c++/ref-types.exp: new file.
* gdb.c++/ref-types2.exp: new file.
* gdb.c++/userdef.exp: new file.
-
+
Wed Jan 6 13:50:57 1999 Stan Shebs <shebs@andros.cygnus.com>
* gdb.base/default.exp: Reflect wording change in remote.c.
@@ -4997,22 +6185,22 @@ Tue Jan 5 13:05:32 1999 David Taylor <taylor@texas.cygnus.com>
* gdb.c++/ref-types.cc: new file.
* gdb.c++/ref-types2.cc: new file.
* gdb.c++/userdef.cc: new file.
-
+
* gdb.base/scope.exp: compile one file at a time, then link.
* gdb.base/langs.exp: ditto.
* gdb.base/list.exp: ditto.
-
+
Mon Jan 4 10:06:43 1999 David Taylor <taylor@texas.cygnus.com>
The following changes were made by David Taylor
<taylor@cygnus.com>, Elena Zannoni <ezannoni@cygnus.com>, and
Edith Epstein <eepstein@cygnus.com> as part of a project to merge
in changes by HP.
-
+
* gdb.c++/inherit.exp: if on hppa*-*-hpux* and not using gcc,
skip tests. When compiling pass c++ flag to gdb_compile.
* gdb.c++/
-
+
* lib/gdb.exp (get_compiler_info): new, optional argument -- args;
test for on hppa*-*-hpux*; use args to see if c++ was specified.
(skip_hp_tests): new function.
@@ -5041,7 +6229,7 @@ Mon Jan 4 10:06:43 1999 David Taylor <taylor@texas.cygnus.com>
run the tests. tell gdb_compile that it's a c++ compilation.
* gdb.threads/pthreads.exp: fix typo in message.
-
+
* gdb.base/all-bin.exp: new file.
* gdb.base/arithmet.exp: new file.
* gdb.base/assign.exp: new file.
@@ -5125,7 +6313,7 @@ Mon Dec 21 14:08:38 1998 David Taylor <taylor@texas.cygnus.com>
T1<char>::~T1(void)
(test_hp_style_demangling): new hp specific demangling test cases.
-
+
Mon Dec 14 15:07:03 1998 Jeffrey A Law (law@cygnus.com)
* gdb.trace/actions.exp: Ignore compiler warnings compiling actions.c
@@ -5214,7 +6402,7 @@ Mon Sep 14 20:00:04 1998 Michael Snyder <msnyder@cygnus.com>
* gdb.trace/{packetlen.exp passc-dyn.exp passcount.exp}: New files.
* gdb.trace/{report.exp save-trace.exp tracecmd.exp}: New files.
* gdb.trace/{while-dyn.exp while-stepping.exp}: New files.
-
+
Fri Sep 11 13:58:02 1998 Michael Snyder <msnyder@cygnus.com>
* gdb.c++/classes.exp: Change all regular expressions to match
@@ -5245,7 +6433,7 @@ Thu Jul 16 18:20:46 1998 Jeffrey A Law (law@cygnus.com)
Thurs Jul 9 11:08:31 1998 Dawn Perchik <dawn@cygnus.com>
- * gdb.base/commands.exp: Break up infrun_breakpoint_command_test
+ * gdb.base/commands.exp: Break up infrun_breakpoint_command_test
into two parts to get around a synchronization problem in expect.
Fri Jun 26 14:27:13 1998 Keith Seitz <keiths@cygnus.com>
@@ -5368,15 +6556,15 @@ Mon Apr 13 22:32:51 1998 Frank Ch. Eigler <fche@cygnus.com>
Fri Apr 10 22:38:12 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* gdb.base/help.exp: Clean up `help set args' and `help show args'
- tests.
+ tests.
* gdb.base/interrupt.exp: Add "i*86-*-solaris2*" xfail for calling
- function when asleep.
+ function when asleep.
* gdb.base/signals.exp: Add "i*86-*-solaris2*" xfails. Add comment
- for i*86 Linux and SVR4 signal handling problems.
- Remove linux xfail for `next to handler in signals_tests_1', fixed
- by recent infrun.c change.
+ for i*86 Linux and SVR4 signal handling problems.
+ Remove linux xfail for `next to handler in signals_tests_1', fixed
+ by recent infrun.c change.
Limit backtrace to 10 frames to avoid timeout problems with infinite
- stack backtraces.
+ stack backtraces.
Adjust expect pattern in `handle all print' test to match Apr 28 1997
target.[ch] change.
@@ -5413,7 +6601,7 @@ Mon Feb 23 08:22:44 1998 Mark Alexander <marka@cygnus.com>
* config/mn10300-eval.exp: New file to support MN10300 eval board.
Wed Feb 18 16:43:46 1998 Michael Snyder (msnyder@cygnus.com)
-
+
* gdb.base/overlays (several files): Merge the two overlay
managers into one. Change variables (foox, barx, bazx, grbxx)
back into ints but force them to load in their proper sections.
@@ -5436,7 +6624,7 @@ Tue Feb 10 17:23:22 1998 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.base/d10vovly.c (D10VTranslate): New function, handle
updated d10v memory VMA/LMA map.
(D10VCopy): Call D10VTranslate.
-
+
Fri Feb 6 14:13:12 1998 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.base/m32rovly.c: Force variable _novlys into .data section.
@@ -5450,12 +6638,12 @@ Fri Feb 6 14:13:12 1998 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.base/overlays.exp: Expect variables barx, bazx, foox, grbxx
to be arrays.
-
+
Thu Jan 29 14:48:19 1998 Michael Snyder (msnyder@cygnus.com)
-
+
* gdb.base/overlays.exp: fix up and get working again.
Add tests for backtraces from an overlay function.
-
+
Fri Jan 23 07:52:45 1998 Fred Fish <fnf@cygnus.com>
* gdb.base/watchpoint.exp: Set "d10v*-*-*" clear_xfail for
@@ -5498,7 +6686,7 @@ Tue Nov 25 12:46:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
target_sizeof_long and target_bigendian_p.
(structs_by_value, structs_by_reference): Check values according
to targets word size and endianess.
-
+
Mon Nov 24 16:37:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.base/langs.exp: For "continue to exit" ignore any trailing
@@ -5558,7 +6746,7 @@ Fri Sep 12 16:56:38 1997 Bob Manson <manson@charmed.cygnus.com>
exists, reload the executable and do a "continue" instead of
doing a jump.
(runto_main): Use gdb_step_for_stub.
-
+
* gdb.base/break.exp: Use gdb_step_for_stub. Also, rename certain
tests to have unique names.
* gdb.base/callfuncs.exp: Ditto.
@@ -5569,7 +6757,7 @@ Fri Sep 12 16:56:38 1997 Bob Manson <manson@charmed.cygnus.com>
* gdb.base/opaque.exp: Ditto.
* gdb.base/printcmds.exp: Ditto. Use a loop to emit multiple
similar tests.
-
+
* gdb.base/setshow.c: Add set_debug_traps/breakpoint calls.
* gdb.c++/cplusfuncs.cc: Ditto.
* gdb.c++/virtfunc.cc: Ditto.
@@ -5640,7 +6828,7 @@ Fri Jun 27 07:44:25 1997 Fred Fish <fnf@cygnus.com>
* gdb.c++/inherit.exp: Ditto.
* gdb.c++/templates.exp: Ditto.
* gdb.c++/virtfunc.exp: Ditto.
-
+
Wed Jun 25 09:08:51 1997 Bob Manson <manson@charmed.cygnus.com>
* lib/gdb.exp(default_gdb_exit): Don't give an error if the remote
@@ -5771,7 +6959,7 @@ Thu May 1 18:01:50 1997 Bob Manson <manson@charmed.cygnus.com>
Mon Apr 28 17:27:40 1997 Michael Snyder <msnyder@cygnus.com>
- * gdb.base/printcmds.exp: add a couple more tests a la
+ * gdb.base/printcmds.exp: add a couple more tests a la
"p 123DEADBEEF", to check parse_number.
* top.c: change "to enable to enable" to "to enable" in a couple
of help strings.
@@ -5780,7 +6968,7 @@ Thu Apr 24 14:38:18 1997 Jeffrey A Law (law@cygnus.com)
* gdb.base/callfuncs.exp: Mark some tests as expected to fail
on the mn10300.
-
+
Mon Apr 21 15:05:42 1997 Fred Fish <fnf@cygnus.com>
* gdb.base/a2-run.exp: Add arm-*-coff setup_xfails for cases
@@ -5825,7 +7013,7 @@ Thu Apr 3 15:21:26 1997 Michael Snyder <msnyder@cygnus.com>
d10v.ld m32r.ld d10vovly.c m32rovly.c: add test case for overlays.
* gdb.base/sigall.c: add usestubs code frag
* gdb.base/watchpoint.exp: turn on complex watchpoint test for M32R.
-
+
Thu Apr 3 09:38:53 1997 Bob Manson <manson@charmed.cygnus.com>
* lib/gdb.exp(gdb_suppress_tests): Add explanation for subsequent
@@ -5980,7 +7168,7 @@ Sun Feb 23 19:56:02 1997 Bob Manson <manson@charmed.cygnus.com>
* config/vr4300.exp: New file.
* gdb.*/*.exp: Call gdb_expect instead of expect.
-
+
* lib/gdb.exp(gdb_expect): New function.
Thu Feb 20 13:57:01 1997 Bob Manson <manson@charmed.cygnus.com>
@@ -6155,7 +7343,7 @@ Sun Feb 2 00:55:14 1997 Bob Manson <manson@charmed.cygnus.com>
Sat Feb 1 23:51:01 1997 Bob Manson <manson@charmed.cygnus.com>
* gdb.*/*.exp: Replace $prompt with $gdb_prompt.
-
+
* gdb.base/scope.exp: Use gdb_test.
* gdb.c++/classes.exp: Ditto.
* gdb.c++/inherit.exp: Ditto.
@@ -6185,7 +7373,7 @@ Thu Jan 30 16:49:25 1997 Bob Manson <manson@charmed.cygnus.com>
Tue Jan 28 14:42:31 1997 Bob Manson <manson@charmed.cygnus.com>
Major rewrite for testsuite revision.
-
+
* lib/gdb.exp: Remove references to global CC, CXX, B_OPTIONS,
TARGET_INCLUDES, LDFLAGS and target_alias. Use gdb_spawn_id
instead of relying on spawn_id to always contain a valid
@@ -6193,7 +7381,7 @@ Tue Jan 28 14:42:31 1997 Bob Manson <manson@charmed.cygnus.com>
(get_compiler_info): New procedure to build the ${binfile}.ci
file, instead of replicating this in N different places.
(gdb_compile): New procedure.
-
+
gdb.*/*.exp: Use gdb_compile and get_compiler_info (with
appropriate arguments) instead of compile. Use gdb_test in a lot
more places. Use send_gdb instead of send. Always run gdb_start
@@ -6257,7 +7445,7 @@ Sat Nov 23 13:32:15 1996 Fred Fish <fnf@cygnus.com>
* gdb.base/signals.exp (signal_tests_1): Remove setup_xfail
"i*86-*-linux" for "signal SIGUSR1". Now works, at least with
RedHat 4.0.
-
+
* gdb.threads/pthreads.c (_MIT_POSIX_THREADS): Define if target is
linux. This allows the test case to at least compile on latest
linux, but still not run due to missing the threads runtime library.
@@ -6286,7 +7474,7 @@ Thu Nov 21 09:17:19 1996 Fred Fish <fnf@cygnus.com>
(xgcc): Set variable to full path of gcc in build tree. Use findfile
to verify that gcc exists in build tree, and if so set CC to that
gcc and to use B_OPTIONS and TARGET_INCLUDES.
-
+
Tue Nov 12 16:20:13 1996 Fred Fish <fnf@cygnus.com>
* gdb.c++/inherit.exp (test_print_anon_union): Reenable
@@ -6330,7 +7518,7 @@ Tue Nov 5 10:44:23 1996 Michael Snyder <msnyder@cygnus.com>
* gdb.base/[bitfields.exp crossload.exp funcargs.exp interrupt.exp
list.exp scope.exp watchpoint.exp]
Make all timeout error msgs explicitly say "(timeout)".
-
+
Mon Nov 4 12:03:06 1996 Michael Snyder <msnyder@cygnus.com>
* config/monitor.exp: Increase download timeout to 1000 seconds.
@@ -6399,7 +7587,7 @@ Fri Oct 11 17:05:22 1996 Fred Fish <fnf@cygnus.com>
(distclean maintainer-clean realclean): No need to remove files
twice. Nuke the duplicates.
* gdb.base/Makefile.in (EXECUTABLES): Add "structs".
- * gdb.threads/Makefile.in (distclean maintainer-clean realclean):
+ * gdb.threads/Makefile.in (distclean maintainer-clean realclean):
Remove config.h along with other config files.
Mon Sep 30 20:16:22 1996 Fred Fish <fnf@cygnus.com>
@@ -6424,7 +7612,7 @@ Mon Sep 30 20:16:22 1996 Fred Fish <fnf@cygnus.com>
* lib/gdb.exp (gdb_test): When a gdb aborts, print a more
meaningful error message and return -1 so the caller can
suppress further tests and avoid a cascade of errors.
-
+
Fri Sep 27 10:34:51 1996 Fred Fish <fnf@cygnus.com>
* gdb.base/a1-selftest.exp: Tweak tests to account for new
@@ -6432,7 +7620,7 @@ Fri Sep 27 10:34:51 1996 Fred Fish <fnf@cygnus.com>
* gdb.base/default.exp: Ditto.
* gdb.base/interrupt.exp: Fix problem with cascade of
errors if child process dies while calling a function.
-
+
Fri Sep 13 21:43:48 1996 Fred Fish <fnf@cygnus.com>
* Makefile.in (VPATH): Add
@@ -6464,7 +7652,7 @@ Mon Sep 2 06:36:02 1996 Fred Fish <fnf@cygnus.com>
executable, give more meaningful message.
* gdb.threads/pthreads.c: Hpux also uses old definition of second
arg for pthread_create.
-
+
Mon Aug 19 09:58:59 1996 Fred Fish <fnf@cygnus.com>
* gdb.threads/pthreads.c (PTHREAD_CREATE_ARG2,
@@ -6483,7 +7671,7 @@ Mon Aug 19 09:58:59 1996 Fred Fish <fnf@cygnus.com>
for not compiled with gcc.
* gdb.base/mips_pro.exp: Only do setup_xfail hppa*-*-* for
backtrace when compiled with gcc.
- * lib/gdb.exp (runto_main): Return result of "runto main" rather
+ * lib/gdb.exp (runto_main): Return result of "runto main" rather
than always return success.
Sat Aug 17 13:28:00 1996 Fred Fish <fnf@cygnus.com>
@@ -6507,7 +7695,7 @@ Mon Aug 12 15:29:08 1996 Fred Fish <fnf@cygnus.com>
tests.
gdb.c++/virtfunc.exp (do_tests): Add "mips-*-irix5*" setup_xfail
for "runto test_calls(void)" test.
-
+
Sun Aug 11 13:11:24 1996 Fred Fish <fnf@cygnus.com>
* gdb.base/term.exp: Set 7-bit strings, address off, width to 0,
@@ -6546,7 +7734,7 @@ Wed Aug 7 11:05:47 1996 Fred Fish <fnf@cygnus.com>
* gdb.threads/{config.in, pthreads.c, pthreads.exp}: New.
* gdb.threads/{Makefile.in, configure.in}: Complete rewrites.
* gdb.threads/configure: New, generated with autoconf.
-
+
Tue Aug 6 10:23:04 1996 Tom Tromey <tromey@rtl.cygnus.com>
* lib/gdb.exp (gdb_test_exact): Turn \n in pattern into \r\n.
@@ -6616,9 +7804,9 @@ Tue Jun 25 23:16:58 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
Tue Jun 25 17:02:39 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
* configure.in (AC_PREREQ): autoconf 2.5 or higher.
- * gdb.{base,c++,chill,disasm,stabs}/Makefile.in (VPATH): set to
+ * gdb.{base,c++,chill,disasm,stabs}/Makefile.in (VPATH): set to
@srcdir@.
- * gdb.{base,c++,chill,disasm,stabs}/configure.in (AC_PREREQ):
+ * gdb.{base,c++,chill,disasm,stabs}/configure.in (AC_PREREQ):
autoconf 2.5 or higher.
* gdb.{base,c++,chill,disasm,stabs}/configure: Rebuilt.
@@ -6682,7 +7870,7 @@ Wed May 15 08:47:42 1996 Jeffrey A Law (law@cygnus.com)
* gdb.base/ptype.exp: Likewise.
* gdb.base/setvar.exp: Handle sizeof (int) != 4 for h8300. Add
h8300 xfails.
- * gdb.base/return.exp: Handle float/double precision problems
+ * gdb.base/return.exp: Handle float/double precision problems
on the h8300.
* gdb.base/funcargs.c: Explicitly make last constant argument to
call_after_alloca_subr an unsigned long type.
@@ -6719,13 +7907,13 @@ Wed Mar 20 08:48:03 1996 Fred Fish <fnf@cygnus.com>
gdb.stabs/weird.exp: Remove use of compiler options "-c -o ..."
since some compilers don't allow both options to be given
on the same command line. Create object file and move it.
-
+
Tue Mar 19 23:49:31 1996 Fred Fish <fnf@cygnus.com>
* gdb.base/corefile.exp: Always regenerate the core file, since
we always regenerate the coremaker program. Detect special case
where registers cannot be read from core file.
-
+
Tue Mar 19 16:52:49 1996 Fred Fish <fnf@cygnus.com>
From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
@@ -6738,7 +7926,7 @@ Tue Mar 19 16:52:49 1996 Fred Fish <fnf@cygnus.com>
* configure: Regenerate.
* gdb.base/Makefile.in (clean): Remove generated file twice-tmp.c
here, rather than in distclean.
-
+
Sun Mar 17 13:35:31 1996 Fred Fish <fnf@cygnus.com>
* gdb.base/mips_pro.exp: Create mips_pro.ci to get gcc_compiled
@@ -6776,10 +7964,10 @@ Fri Mar 15 17:49:57 1996 Fred Fish (fnf@cygnus.com)
* gdb.base/ptype.exp: Change "i*86-*-sysv4*" setup_xfail for
"whatis unnamed typedef'd enum (compiler bug in IBM's xlc)"
and "ptype t_char_array" to be for native cc only.
-
+
Fri Mar 15 16:17:22 1996 Fred Fish <fnf@cygnus.com>
- * gdb.base/corefile.exp: Remove "alpha-dec-osf2*" native compiled
+ * gdb.base/corefile.exp: Remove "alpha-dec-osf2*" native compiled
setup_xfail for "print coremaker_bss", "print coremaker_ro",
"print func2::coremaker_local", and "backtrace in corefile.exp".
@@ -6822,7 +8010,7 @@ Sun Feb 18 11:39:12 1996 Fred Fish <fnf@cygnus.com>
Change "alpha-dec-osf2*" setup_xfail for "bt in signals.exp"
to be for gcc only.
* lib/gdb.exp: Move verbose statements outside conditionals.
-
+
Sat Feb 17 02:22:14 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* gdb.base/sigall.exp: Remove setup_xfail for irix4. Fixed by
@@ -6900,7 +8088,7 @@ Mon Jan 15 09:33:00 1996 Fred Fish <fnf@cygnus.com>
* gdb.stabs/configure.in (alpha-*-*,mips-*-*): Replace
[] tests with "test" and enclose string in quotes.
* gdb.stabs/configure: Rebuild
-
+
Thu Jan 11 09:43:14 1996 Tom Tromey <tromey@creche.cygnus.com>
Changes in sync with expect:
@@ -6924,7 +8112,7 @@ Wed Jan 3 01:30:41 1996 Jeffrey A Law (law@cygnus.com)
* gdb.stabs/weird.exp: Use ${target_triplet} to determine
which sed script to run. Expect failure for v_comb test
on PA targets too.
-
+
Sat Dec 30 16:09:04 1995 Fred Fish <fnf@rtl.cygnus.com>
* gdb.base/corefile.exp: Remove "i*86-*-linux" xfail for
@@ -7006,7 +8194,7 @@ Sat Nov 25 11:03:42 1995 Fred Fish <fnf@cygnus.com>
to returns as necessary, arrange for test to compile own testcase
executable.
* lib/gdb.exp: Changes for testsuite to compile own test cases.
-
+
Tue Nov 21 16:15:45 1995 Fred Fish <fnf@cygnus.com>
* gdb.c++/classes.exp (test_pointers_to_class_members): Add
@@ -7071,13 +8259,13 @@ Wed Oct 18 11:27:47 1995 Jeffrey A Law (law@cygnus.com)
Tue Oct 17 23:02:12 1995 Jeffrey A Law (law@cygnus.com)
- * Many files: When warning about suppressed tests due to a
+ * Many files: When warning about suppressed tests due to a
nonexistant test binary, avoid incrementing the warning count.
Tue Oct 10 11:00:41 1995 Fred Fish <fnf@cygnus.com>
* Makefile.in (TARGET_FLAGS_TO_PASS): Remove BISON.
-
+
Sun Oct 8 04:23:14 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* gdb.base/return.exp: Change xfail from "sparc-*-solaris2.*" to
@@ -7183,7 +8371,7 @@ Sat Sep 2 06:41:26 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
Sat Sep 2 00:17:31 1995 Fred Fish <fnf@cygnus.com>
- * gdb.base/callfuncs.exp (do_function_calls): Remove
+ * gdb.base/callfuncs.exp (do_function_calls): Remove
mips-sgi-irix* xfail for
"call inferior func with struct - returns char *"
and fix test so that an optional (unsigned char *) cast is
@@ -7199,7 +8387,7 @@ Fri Sep 1 13:42:01 1995 Fred Fish <fnf@cygnus.com>
Sun Aug 27 23:35:35 1995 Fred Fish <fnf@cygnus.com>
- * gdb.base/callfuncs.exp (do_function_calls): Add alpha-dec-osf2*
+ * gdb.base/callfuncs.exp (do_function_calls): Add alpha-dec-osf2*
clear_xfail for "p t_float_values2(3.14159,float_val2)" for gcc
compiled test.
* gdb.base/opaque.exp (setup_xfail_on_opaque_pointer):
@@ -7239,11 +8427,11 @@ Sun Aug 27 23:35:35 1995 Fred Fish <fnf@cygnus.com>
* gdb.base/callfuncs.exp (do_function_calls):
Add mips-sgi-irix* xfail, when compiled with native compiler, for
"call inferior func with struct - returns char *".
- * gdb.base/return.exp (return_tests): Change xfail for
+ * gdb.base/return.exp (return_tests): Change xfail for
"correct value returned double test" to include Solaris 2.4.
* gdb.base/funcargs.exp (float_and_integral_args):
Add sparc-sun-solaris2* xfail for "print f1 after run to call2a".
-
+
Sat Aug 26 00:26:11 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* gdb.base/setvar.c, gdb.base/setvar.exp: Add new tests for
@@ -7312,14 +8500,14 @@ Tue Aug 15 09:42:44 1995 Fred Fish <fnf@cygnus.com>
"print 'scope1.c'::bar::funclocal" and
"print 'scope1.c'::bar::funclocal_bss"
to only be xfail'd when not compiled with gcc.
- Add rs6000-*-* xfail for
+ Add rs6000-*-* xfail for
"print 'scope0.c'::filelocal_bss before run"
when compiled with gcc.
(test_at_main): Add rs6000-*-* xfail for
"print filelocal_ro in test_at_main"
when compiled with gcc.
* gdb.base/ptype.exp: Source gdb.base/ptype.ci.
- Add rs6000-*-aix* xfail for
+ Add rs6000-*-aix* xfail for
"whatis unnamed typedef'd enum (compiler bug in IBM's xlc)" and
"ptype t_char_array", not compiled with gcc.
* gdb.base/list.exp (test_list_function): Add rs6000-*-*
@@ -7362,7 +8550,7 @@ Tue Aug 15 09:42:44 1995 Fred Fish <fnf@cygnus.com>
* gdb.base/opaque.exp: Source gdb.base/opaque0.ci rather
than opaque-info.exp.
Setup rs6000-*-* xfail for
- "ptype on opaque struct pointer (statically)" and
+ "ptype on opaque struct pointer (statically)" and
"ptype on opaque struct pointer (dynamically)" when
not compiled with gcc.
* gdb.base/callfuncs.exp: Source gdb.base/callfuncs.ci
@@ -7389,7 +8577,7 @@ Tue Aug 15 09:42:44 1995 Fred Fish <fnf@cygnus.com>
Add rs6000-*-* xfail for "up to foo in langs.exp"
"up to cppsub_ in langs.exp" and "up to fsub in langs.exp"
when not gcc compiled.
-
+
Sat Aug 12 15:05:36 1995 Jeffrey A. Law <law@rtl.cygnus.com>
* gdb.base/callfuncs.exp: Add xfails for the powerpc.
@@ -7420,7 +8608,7 @@ Mon Aug 14 09:01:59 1995 Fred Fish <fnf@cygnus.com>
"print 'scope0.c'::filelocal_bss in test_at_foo",
"print 'scope0.c'::filelocal at bar",
"print 'scope0.c'::filelocal_bss in test_at_bar"
-
+
* gdb.base/list.exp: Remove rs6000-*-* xfail for "list function
in source file 1". This bug seems to have been fixed with both
gcc and native cc (was native assembler bug?).
@@ -7445,7 +8633,7 @@ Wed Aug 9 08:04:12 1995 Fred Fish (fnf@cygnus.com)
* gdb.base/callfuncs.exp: Change xfail to "i*86-*-*" for
"call inferior function with struct - returns float" and
"call inferior function with struct - returns double".
-
+
Mon Aug 7 02:43:28 1995 Jeff Law (law@snake.cs.utah.edu)
* gdb.disasm/sh3.s: Source for sh3 disassembler tests.
@@ -8550,7 +9738,7 @@ Fri Nov 25 13:37:10 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
and 'value' method to T5 class for template tests.
* gdb.c++/templates.exp: Add testcases for printing of template
types, setting breakpoints on template methods and calling a
- template method.
+ template method.
Sat Nov 5 00:20:17 1994 Jeff Law (law@snake.cs.utah.edu)
@@ -8993,7 +10181,7 @@ Thu Apr 21 12:48:07 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
Thu Apr 21 11:54:04 1994 Kung Hsu (kung@mexican.cygnus.com)
- * gdb.t24/demangle.exp: change expect pattern of
+ * gdb.t24/demangle.exp: change expect pattern of
__t10ListS_link1ZUiRCUiPT0
Wed Apr 13 15:05:00 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
@@ -9060,7 +10248,7 @@ Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
Tue Mar 29 23:55:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
- * gdb.t07/watchpoint.exp (test_watchpoint_triggered_in_syscall):
+ * gdb.t07/watchpoint.exp (test_watchpoint_triggered_in_syscall):
Fix typo(s).
Sun Mar 27 16:53:14 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
@@ -9132,7 +10320,7 @@ Thu Feb 24 19:49:25 1994 Rob Savoye (rob@poseidon.cygnus.com)
one from the path.
* Makefile.in: Use a fresh expect if there is one, use runtest
from the src tree if there is one.
-
+
Thu Feb 24 18:49:37 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
* gdb.t06/break.exp (test_next_with_recursion): Remove xfail for
@@ -9319,7 +10507,7 @@ Thu Jan 13 17:16:09 1994 Stan Shebs (shebs@andros.cygnus.com)
* Makefile.in: Pass LDFLAGS and LIBS to sub-makes.
* gdb.t06/configure.in: Don't try to compile signals test program
- if doing mips-idt-ecoff.
+ if doing mips-idt-ecoff.
Thu Jan 13 08:25:55 1994 Rob Savoye (rob@darkstar.cygnus.com)
@@ -9467,7 +10655,7 @@ Tue Oct 19 14:57:38 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* gdb.t15/funcargs.exp: Don't put comments on same line as
setup_xfail (@#$*%& tcl braindamage!).
-
+
Mon Oct 18 21:50:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* gdb.disasm/hppa.exp: Use $objdir/$subdir/$binfile not just $binfile.
@@ -9758,7 +10946,7 @@ Thu Aug 12 15:24:28 1993 Fred Fish (fnf@deneb.cygnus.com)
* Makefile.in (distclean): Remove *.log *.plog *.sum *.psum site.*.
* gdb.t17/interrupt.exp: Fix 'missing Continuing' case so pattern
- to match does not match the passing case but still matches the
+ to match does not match the passing case but still matches the
failing case.
Thu Aug 12 16:58:59 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
@@ -10420,7 +11608,7 @@ Thu Mar 25 21:05:16 1993 Fred Fish (fnf@cygnus.com)
* gdb.t10/crossload.exp: Disable the i860-elf test until such
time as i860 support works.
- * gdb.t15/funcargs.exp: Fix expected outputs to include
+ * gdb.t15/funcargs.exp: Fix expected outputs to include
"backtrace 100\r" rather than just "backtrace\r", to match last
change.
@@ -10599,7 +11787,7 @@ Wed Feb 24 08:03:38 1993 Fred Fish (fnf@cygnus.com)
* gdb.t31/chillvars.exp (test_strings): Expect "CHAR" now, rather
than "char".
* gdb.t31/in-gdbme.ch (simple_struct, nested_struct, struct1,
- struct2): New struct definitions and initializations to test
+ struct2): New struct definitions and initializations to test
simple Chill STRUCT types.
Tue Feb 23 11:55:06 1993 Fred Fish (fnf@cygnus.com)
@@ -10640,6 +11828,8 @@ Sun Feb 21 10:55:55 1993 Mike Werner (mtw@poseidon.cygnus.com)
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.
+
+For additional changes see gdb.mi/ChangeLog-1999-2003.
Local Variables:
mode: change-log
diff --git a/gdb/testsuite/config/gdbserver.exp b/gdb/testsuite/config/gdbserver.exp
index 475acd42073..ed812f81aa4 100644
--- a/gdb/testsuite/config/gdbserver.exp
+++ b/gdb/testsuite/config/gdbserver.exp
@@ -2,7 +2,7 @@
# ie. a debug agent running as a native process on the same or
# a different host.
-# Copyright 2000, 2002 Free Software Foundation, Inc.
+# Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -89,12 +89,8 @@ global server_exec;
global portnum;
set portnum "2345";
-proc gdb_load { arg } {
- global host_exec;
- global server_exec;
- global portnum;
- global verbose;
- global gdb_prompt;
+proc gdbserver_gdb_load { server_exec } {
+ global portnum
# Port id -- either specified in baseboard file, or managed here.
if [target_info exists gdb,socketport] {
@@ -134,35 +130,6 @@ proc gdb_load { arg } {
# Export the host:port pair.
set gdbport $debughost$portnum;
- # Remember new exec file.
- if { $arg == "" } {
- if { ! [info exists host_exec] } {
- send_gdb "info files\n";
- gdb_expect 30 {
- -re "Symbols from \"(\[^\"\]+)\"" {
- set host_exec $expect_out(1,string);
- exp_continue;
- }
- -re "Local exec file:\[\r\n\]+\[ \t\]*`(\[^'\]+)'," {
- set host_exec $expect_out(1,string);
- exp_continue;
- }
- -re "$gdb_prompt $" { }
- }
- }
- } else {
- set host_exec $arg
- if [info exists server_exec] { unset server_exec }
- }
-
- if { ! [info exists server_exec] } {
- if [is_remote target] {
- set server_exec [remote_download target $host_exec]
- } else {
- set server_exec $host_exec
- }
- }
-
# Fire off the debug agent
if [target_info exists gdb_server_args] {
# This flavour of gdbserver takes as arguments those specified
@@ -175,52 +142,79 @@ proc gdb_load { arg } {
# and the name of the executable file to be debugged.
set server_spawn_id [remote_spawn target \
"$gdbserver $sockethost$portnum $server_exec"]
- }
+ }
- # We can't call close, because if gdbserver is local then that means
- # that it will get a SIGHUP.
- ## close -i $server_spawn_id
- wait -nowait -i $server_spawn_id
+ # Wait for the server to produce at least one line and an additional
+ # character of output. This will wait until any TCP socket has been
+ # created, so that GDB can connect.
+ expect {
+ -i $server_spawn_id
+ -notransfer
+ -re ".*\n." { }
+ }
- # Give it a little time to establish
- sleep 1
+ # We can't just call close, because if gdbserver is local then that means
+ # that it will get a SIGHUP. Doing it this way could also allow us to
+ # get at the inferior's input or output if necessary, and means that we
+ # don't need to redirect output.
+ expect_background {
+ -i $server_spawn_id
+ -re "." { }
+ eof {
+ # The spawn ID is already closed now (but not yet waited for).
+ wait -i $expect_out(spawn_id)
+ }
+ }
- # tell gdb what file we are debugging
- if { $arg != "" } {
- if [gdb_file_cmd $arg] {
- return -1;
+ return [list $protocol $gdbport];
+}
+
+proc infer_host_exec { } {
+ set host_exec ""
+
+ send_gdb "info files\n";
+ gdb_expect 30 {
+ -re "Symbols from \"(\[^\"\]+)\"" {
+ set host_exec $expect_out(1,string);
+ exp_continue;
+ }
+ -re "Local exec file:\[\r\n\]+\[ \t\]*`(\[^'\]+)'," {
+ set host_exec $expect_out(1,string);
+ exp_continue;
}
+ -re "$gdb_prompt $" { }
+ }
+
+ return $host_exec
+}
+
+proc gdb_load { arg } {
+ global host_exec
+ global server_exec
+
+ if { $arg == "" && $host_exec == "" } {
+ set host_exec [infer_host_exec]
+ } elseif { $arg != "" } {
+ set host_exec $arg
+ if [info exists server_exec] { unset server_exec }
}
- # attach to the "serial port"
- gdb_target_cmd $protocol $gdbport;
-
- # do the real load if needed
- if [target_info exists gdb_server_do_load] {
- send_gdb "load\n"
- set timeout 2400
- verbose "Timeout is now $timeout seconds" 2
- gdb_expect {
- -re ".*$gdb_prompt $" {
- if $verbose>1 then {
- send_user "Loaded $arg into $GDB\n"
- }
- set timeout 30
- verbose "Timeout is now $timeout seconds" 2
- return 1
- }
- -re "$gdb_prompt $" {
- if $verbose>1 then {
- perror "GDB couldn't load."
- }
- }
- timeout {
- if $verbose>1 then {
- perror "Timed out trying to load $arg."
- }
- }
- }
+ if { ! [info exists server_exec] } {
+ if [is_remote target] {
+ set server_exec [remote_download target $host_exec]
+ } else {
+ set server_exec $host_exec
+ }
}
- return 0;
+ set res [gdbserver_gdb_load $host_exec]
+ set protocol [lindex $res 0]
+ set gdbport [lindex $res 1]
+
+ if { $arg != "" } {
+ if [gdb_file_cmd $arg] {
+ return -1
+ }
+ }
+ gdb_target_cmd $protocol $gdbport
}
diff --git a/gdb/testsuite/config/hmsirom.exp b/gdb/testsuite/config/hmsirom.exp
index 8c6e7dad560..0c531096601 100644
--- a/gdb/testsuite/config/hmsirom.exp
+++ b/gdb/testsuite/config/hmsirom.exp
@@ -17,6 +17,6 @@
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
-# Support for testing against a Hitachi SH3 target rom
+# Support for testing against a Renesas SH3 target rom
load_lib ../config/monitor.exp
diff --git a/gdb/testsuite/config/sim.exp b/gdb/testsuite/config/sim.exp
index 5d8a93d5311..6ecdc522bf2 100644
--- a/gdb/testsuite/config/sim.exp
+++ b/gdb/testsuite/config/sim.exp
@@ -1,5 +1,5 @@
# Test Framework Driver for GDB driving a builtin simulator
-# Copyright 1994, 1997, 1998 Free Software Foundation, Inc.
+# Copyright 1994, 1997, 1998, 2004 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -55,7 +55,9 @@ proc gdb_load { arg } {
global GDB
global gdb_prompt
- if [gdb_file_cmd $arg] then { return -1 }
+ if { $arg != "" } {
+ if [gdb_file_cmd $arg] then { return -1 }
+ }
gdb_target_sim
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index f5cb0895a2b..1419ba1f59c 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -641,7 +641,7 @@ else
case $target in
powerpc-*-aix* \
| rs6000-*-aix* \
- | *-*-bsd* \
+ | *-*-*bsd* \
| *-*-go32* \
| *-*-linux* \
| *-*-lynxos* \
@@ -917,7 +917,7 @@ else
if { (eval echo configure:918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
diff --git a/gdb/testsuite/configure.in b/gdb/testsuite/configure.in
index c60cf576a4d..49b0444ad88 100644
--- a/gdb/testsuite/configure.in
+++ b/gdb/testsuite/configure.in
@@ -42,7 +42,7 @@ AC_ARG_WITH(stabs,
case $target in
powerpc-*-aix* \
| rs6000-*-aix* \
- | *-*-bsd* \
+ | *-*-*bsd* \
| *-*-go32* \
| *-*-linux* \
| *-*-lynxos* \
diff --git a/gdb/testsuite/gdb.arch/Makefile.in b/gdb/testsuite/gdb.arch/Makefile.in
index 2b6f494158c..4c472724f1f 100644
--- a/gdb/testsuite/gdb.arch/Makefile.in
+++ b/gdb/testsuite/gdb.arch/Makefile.in
@@ -3,15 +3,12 @@ srcdir = @srcdir@
EXECUTABLES = altivec-abi altivec-regs
-MISCELLANEOUS =
-
all info install-info dvi install uninstall installcheck check:
@echo "Nothing to be done for $@..."
clean mostlyclean:
-rm -f *~ *.o a.out *.x *.ci *.tmp
-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
- -rm -f $(MISCELLANEOUS)
distclean maintainer-clean realclean: clean
-rm -f *~ core
diff --git a/gdb/testsuite/gdb.arch/gdb1291.exp b/gdb/testsuite/gdb.arch/gdb1291.exp
new file mode 100644
index 00000000000..4264d6c01b8
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/gdb1291.exp
@@ -0,0 +1,92 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@gnu.org
+
+# This file is part of the gdb testsuite.
+
+# Tests for PR:1291. Ensure that backtrace works properly for stack
+# frames greater than 256 bytes.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Test SH backtraces with >256 byte frame stack. (PR:1291)
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "sh-*-*"] then {
+ verbose "Skipping SH backtrace tests."
+ return
+}
+
+set testfile "gdb1291"
+set srcfile ${testfile}.s
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+gdb_test "b sub1" "Breakpoint 2.*" "set breakpoint"
+gdb_test "c" "Breakpoint 2.* sub1 .*" "get to sub1"
+
+send_gdb "bt\n"
+gdb_expect {
+ -re "#0.* sub1 .*\r\n#1\[ \t\]*$hex in main \\(\\).*\r\n$gdb_prompt $" {
+ pass "backtrace with local variable less than or equal to 256 bytes"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "backtrace with local variable less than or equal to 256 bytes"
+ }
+ timeout {
+ fail "backtrace with local variable less than or equal to 256 bytes (timeout)"
+ }
+}
+
+gdb_test "b sub2" "Breakpoint 3.*" "set breakpoint"
+gdb_test "c" "Breakpoint 3.* sub2 .*" "get to sub2"
+
+send_gdb "bt\n"
+gdb_expect {
+ -re "#0.* sub2 .*\r\n#1\[ \t\]*$hex in main \\(\\).*\r\n$gdb_prompt $" {
+ pass "backtrace with local variable larger than 256 bytes"
+ }
+ -re "#0.* sub2 .*\r\n#1 0x00000000 in \\?\\? \\(\\).*\r\n$gdb_prompt $" {
+ kfail "gdb/1291" "backtrace with local variable larger than 256 bytes"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "backtrace with local variable larger than 256 bytes"
+ }
+ timeout {
+ fail "backtrace with local variable larger than 256 bytes (timeout)"
+ }
+}
diff --git a/gdb/testsuite/gdb.arch/gdb1291.s b/gdb/testsuite/gdb.arch/gdb1291.s
new file mode 100644
index 00000000000..0f40b8f81cd
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/gdb1291.s
@@ -0,0 +1,129 @@
+! Copyright 2004 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program; if not, write to the Free Software
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+!
+! Please email any bugs, comments, and/or additions to this file to:
+! bug-gdb@gnu.org
+!
+! This file is part of the gdb testsuite.
+!
+! It was generated using "sh-elf-gcc -S gdb1291.c", using the following
+! source file:
+!
+! #include <stdio.h>
+!
+! main()
+! {
+! printf("hello world\n");
+! sub1();
+! sub2();
+! }
+! sub1()
+! {
+! int buf[64];
+!
+! }
+!
+! sub2()
+! {
+! int buf[65];
+!
+! }
+!
+! We use a pregenerated assembly file as the test input to avoid possible
+! problems with future versions of gcc generating different code.
+
+ .file "gdb1291.c"
+ .text
+ .section .rodata
+ .align 2
+.LC0:
+ .string "hello world\n"
+ .text
+ .align 1
+ .global _main
+ .type _main, @function
+_main:
+ mov.l r14,@-r15
+ sts.l pr,@-r15
+ mov r15,r14
+ mov.l .L2,r1
+ mov r1,r4
+ mov.l .L3,r1
+ jsr @r1
+ nop
+ mov.l .L4,r1
+ jsr @r1
+ nop
+ mov.l .L5,r1
+ jsr @r1
+ nop
+ mov r14,r15
+ lds.l @r15+,pr
+ mov.l @r15+,r14
+ rts
+ nop
+.L6:
+ .align 2
+.L2:
+ .long .LC0
+.L3:
+ .long _printf
+.L4:
+ .long _sub1
+.L5:
+ .long _sub2
+ .size _main, .-_main
+ .align 1
+ .global _sub1
+ .type _sub1, @function
+_sub1:
+ mov.l r14,@-r15
+ sts.l pr,@-r15
+ add #-128,r15
+ add #-128,r15
+ mov r15,r14
+ mov.w .L8,r7
+ add r7,r14
+ mov r14,r15
+ lds.l @r15+,pr
+ mov.l @r15+,r14
+ rts
+ nop
+ .align 1
+.L8:
+ .short 256
+ .size _sub1, .-_sub1
+ .align 1
+ .global _sub2
+ .type _sub2, @function
+_sub2:
+ mov.l r14,@-r15
+ sts.l pr,@-r15
+ mov.w .L11,r1
+ sub r1,r15
+ mov r15,r14
+ mov.w .L11,r7
+ add r7,r14
+ mov r14,r15
+ lds.l @r15+,pr
+ mov.l @r15+,r14
+ rts
+ nop
+ .align 1
+.L11:
+ .short 260
+ .size _sub2, .-_sub2
+ .ident "GCC: (GNU) 3.5.0 20040204 (experimental)"
diff --git a/gdb/testsuite/gdb.arch/gdb1431.exp b/gdb/testsuite/gdb.arch/gdb1431.exp
new file mode 100644
index 00000000000..697c9f89b2d
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/gdb1431.exp
@@ -0,0 +1,63 @@
+# Copyright 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@gnu.org
+
+# This file is part of the gdb testsuite.
+
+# Tests for PR:1431. Catch gdb not continuing to second function properly.
+# Note that originally this bug was reported as a problem with the "until"
+# command, which actually is behaving as currently defined. What apparently
+# was expected was the behavior of the newer "advance" command.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Observe that the until command doesn't go all the way to sub2.
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "sh-*-*"] then {
+ verbose "Skipping SH backtrace tests."
+ return
+}
+
+set testfile "gdb1431"
+set srcfile ${testfile}.s
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+gdb_test "advance sub1" "hello world\r\n$hex in sub1 \\(\\)" "get to sub1"
+gdb_test "advance sub2" "$hex in main \\(\\)" "advance returns from sub1 frame"
+gdb_test "advance sub2" "$hex in sub2 \\(\\)" "get to sub2"
diff --git a/gdb/testsuite/gdb.arch/gdb1431.s b/gdb/testsuite/gdb.arch/gdb1431.s
new file mode 100644
index 00000000000..36b43d260f2
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/gdb1431.s
@@ -0,0 +1,129 @@
+! Copyright 2004 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program; if not, write to the Free Software
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+!
+! Please email any bugs, comments, and/or additions to this file to:
+! bug-gdb@gnu.org
+!
+! This file is part of the gdb testsuite.
+!
+! It was generated using "sh-elf-gcc -S gdb1431.c", using the following
+! source file:
+!
+! #include <stdio.h>
+!
+! main()
+! {
+! printf("hello world\n");
+! sub1();
+! sub2();
+! }
+! sub1()
+! {
+! int buf[64];
+!
+! }
+!
+! sub2()
+! {
+! int buf[65];
+!
+! }
+!
+! We use a pregenerated assembly file as the test input to avoid possible
+! problems with future versions of gcc generating different code.
+
+ .file "gdb1431.c"
+ .text
+ .section .rodata
+ .align 2
+.LC0:
+ .string "hello world\n"
+ .text
+ .align 1
+ .global _main
+ .type _main, @function
+_main:
+ mov.l r14,@-r15
+ sts.l pr,@-r15
+ mov r15,r14
+ mov.l .L2,r1
+ mov r1,r4
+ mov.l .L3,r1
+ jsr @r1
+ nop
+ mov.l .L4,r1
+ jsr @r1
+ nop
+ mov.l .L5,r1
+ jsr @r1
+ nop
+ mov r14,r15
+ lds.l @r15+,pr
+ mov.l @r15+,r14
+ rts
+ nop
+.L6:
+ .align 2
+.L2:
+ .long .LC0
+.L3:
+ .long _printf
+.L4:
+ .long _sub1
+.L5:
+ .long _sub2
+ .size _main, .-_main
+ .align 1
+ .global _sub1
+ .type _sub1, @function
+_sub1:
+ mov.l r14,@-r15
+ sts.l pr,@-r15
+ add #-128,r15
+ add #-128,r15
+ mov r15,r14
+ mov.w .L8,r7
+ add r7,r14
+ mov r14,r15
+ lds.l @r15+,pr
+ mov.l @r15+,r14
+ rts
+ nop
+ .align 1
+.L8:
+ .short 256
+ .size _sub1, .-_sub1
+ .align 1
+ .global _sub2
+ .type _sub2, @function
+_sub2:
+ mov.l r14,@-r15
+ sts.l pr,@-r15
+ mov.w .L11,r1
+ sub r1,r15
+ mov r15,r14
+ mov.w .L11,r7
+ add r7,r14
+ mov r14,r15
+ lds.l @r15+,pr
+ mov.l @r15+,r14
+ rts
+ nop
+ .align 1
+.L11:
+ .short 260
+ .size _sub2, .-_sub2
+ .ident "GCC: (GNU) 3.5.0 20040204 (experimental)"
diff --git a/gdb/config/i386/xm-i386bsd.h b/gdb/testsuite/gdb.arch/gdb1558.c
index ca0ffb2ab8f..d1051cf79a7 100644
--- a/gdb/config/i386/xm-i386bsd.h
+++ b/gdb/testsuite/gdb.arch/gdb1558.c
@@ -1,22 +1,36 @@
-/* Host-dependent definitions for Intel 386 running BSD Unix, for GDB.
- Copyright 1986, 1987, 1989, 1992, 1995, 1996
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
+/* Copyright 2004 Free Software Foundation, Inc.
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org
+
+ This file is part of the gdb testsuite. */
-#include <machine/limits.h> /* for INT_MIN */
+sub1 ()
+{
+ printf ("In sub1\n");
+}
+
+sub2 ()
+{
+ printf ("In sub2\n");
+}
+
+main ()
+{
+ sub1 ();
+ sub2 ();
+}
diff --git a/gdb/testsuite/gdb.arch/gdb1558.exp b/gdb/testsuite/gdb.arch/gdb1558.exp
new file mode 100644
index 00000000000..1ad21694854
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/gdb1558.exp
@@ -0,0 +1,72 @@
+# Copyright 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@gnu.org
+
+# This file is part of the gdb testsuite.
+
+# Tests for PR:1558. Hits breakpoint at main after function called
+# from main.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "sh-*-*"] then {
+ verbose "Skipping SH breakpoint test."
+ return
+}
+
+set testfile "gdb1558"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+# Note we have to compile WITH optimization and WITHOUT debugging information to expose the bug.
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"additional_flags=-O2"}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "b main" "Breakpoint 1.*" "set breakpoint at main"
+gdb_test "b sub1" "Breakpoint 2.*" "set breakpoint at sub1"
+gdb_test "b sub2" "Breakpoint 3.*" "set breakpoint at sub2"
+
+# We can't use "runto_main" because that is exactly the problem
+# we are trying to detect, stopping somewhere before main.
+
+gdb_run_cmd
+
+gdb_expect 30 {
+ -re "Breakpoint 1.*main .*$gdb_prompt $" {
+ pass "Hits breakpoint at main after function called from main"
+ }
+ -re "Breakpoint 2.*sub1 .*$gdb_prompt $" {
+ kfail "gdb/1558" "Hits breakpoint at main after function called from main"
+ }
+ -re "$gdb_prompt $" {
+ fail "Hits breakpoint at main after function called from main"
+ }
+ timeout {
+ fail "Hits breakpoint at main after function called from main (timeout)"
+ }
+}
diff --git a/gdb/config/alpha/tm-fbsd.h b/gdb/testsuite/gdb.arch/i386-unwind.c
index d1d525466ec..6d10ecb84b2 100644
--- a/gdb/config/alpha/tm-fbsd.h
+++ b/gdb/testsuite/gdb.arch/i386-unwind.c
@@ -1,5 +1,6 @@
-/* Target-dependent definitions for FreeBSD/Alpha.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Unwinder test program.
+
+ Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -7,26 +8,35 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public 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_FBSD_H
-#define TM_FBSD_H
-
-#include "alpha/tm-alpha.h"
-
-/* Number of traps that happen between exec'ing the shell to run an
- inferior, and when we finally get to the inferior code. The
- default is right for FreeBSD. */
-
-#undef START_INFERIOR_TRAPS_EXPECTED
-
-#endif /* TM_FBSD_H */
+void
+trap (void)
+{
+ asm ("int $0x03");
+}
+
+/* Make sure that main directly follows a function without an
+ epilogue. */
+
+asm(".text\n"
+ " .align 8\n"
+ " .globl gdb1435\n"
+ "gdb1435:\n"
+ " pushl %ebp\n"
+ " mov %esp, %ebp\n"
+ " call trap\n"
+ " .globl main\n"
+ "main:\n"
+ " pushl %ebp\n"
+ " mov %esp, %ebp\n"
+ " call gdb1435\n");
diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp
new file mode 100644
index 00000000000..9c3130fc8c3
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/i386-unwind.exp
@@ -0,0 +1,68 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@gnu.org
+
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Test i386 unwinder.
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "i?86-*-*"] then {
+ verbose "Skipping i386 unwinder tests."
+ return
+}
+
+set testfile "i386-unwind"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Testcase for backtrace/1435.
+
+# We use gdb_run_cmd so this stands a chance to work for remote
+# targets too.
+gdb_run_cmd
+
+gdb_expect {
+ -re "Program received signal SIGTRAP.*$gdb_prompt $" {
+ pass "run past gdb1435"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "run past gdb1435"
+ }
+ timeout {
+ fail "run past gdb1435 (timeout)"
+ }
+}
+
+gdb_test "backtrace 10" \
+ "#1\[ \t]*$hex in gdb1435.*\r\n#2\[ \t\]*$hex in main.*" \
+ "backtrace past gdb1435"
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 8b0df38f3f1..75e64b484ea 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1998, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,8 +32,9 @@ set prms_id 0
set bug_id 0
set asm-arch ""
+set asm-note "empty"
set asm-flags ""
-set link-flags ""
+set link-flags "--entry _start"
switch -glob -- [istarget] {
"alpha*-*-*" {
@@ -51,6 +52,9 @@ switch -glob -- [istarget] {
"d10v-*-*" {
set asm-arch d10v
}
+ "frv-*-*" {
+ set asm-arch frv
+ }
"s390-*-*" {
set asm-arch s390
}
@@ -63,13 +67,10 @@ switch -glob -- [istarget] {
}
"i\[3456\]86-*-*" {
set asm-arch i386
- if [istarget "*-*-cygwin*"] then {
- set link-flags "--entry _start"
- }
}
"m32r*-*" {
set asm-arch m32r
- set link-flags "-Wl,--whole-archive -lgloss -Wl,--no-whole-archive"
+ append link-flags "--whole-archive -lgloss --no-whole-archive"
}
"m6811-*-*" {
set asm-arch m68hc11
@@ -88,7 +89,6 @@ switch -glob -- [istarget] {
"sh*-*-*" {
set asm-arch sh
set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
- set link-flags "--entry _start"
}
"sparc-*-*" {
set asm-arch sparc
@@ -118,13 +118,17 @@ if { "${asm-arch}" == "" } {
gdb_suppress_entire_file "Assembly source test -- not implemented for this target."
}
-# On FreeBSD, crt1.o the final link will fail because of unresolved
-# symbols. It turns out that libc.so references symbols that are
-# normally provided by crt1.o, which isn't linked in since we specify
-# -nostartfiles. Using -nostdlib doesn't help since target_compile
-# automatically adds -lm. Linking statically avoids this mess.
-if [istarget "*-*-freebsd*"] then {
- set link-flags "-static"
+# On NetBSD/ELF we need a special NetBSD-identifying note section.
+if { [istarget "*-*-netbsdelf*"]
+ || [istarget "x86_64-*-netbsd*"] } then {
+ set asm-note "netbsd"
+}
+
+# On OpenBSD/ELF we need a similar note section. We make no attempt
+# of handing a.out here since most OpenBSD/a.out systems use a rather
+# outdated assembler that doesn't assemble this test's code anyway.
+if { [istarget "*-*-openbsd*"] } then {
+ set asm-note "openbsd"
}
# Watch out, we are invoking the assembler, but the testsuite sets multilib
@@ -149,9 +153,10 @@ set srcfile2 asmsrc2.s
remote_exec build "rm -f ${subdir}/arch.inc"
remote_download host ${srcdir}/${subdir}/${asm-arch}.inc ${subdir}/arch.inc
+remote_exec build "rm -f ${subdir}/note.inc"
+remote_download host ${srcdir}/${subdir}/${asm-note}.inc ${subdir}/note.inc
if { "${asm-flags}" == "" } {
- #set asm-flags "-Wa,-gstabs,-I${srcdir}/${subdir},-I${objdir}/${subdir}"
set asm-flags "-gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}"
}
@@ -162,11 +167,13 @@ if {[target_assemble ${srcdir}/${subdir}/${srcfile2} asmsrc2.o "${asm-flags}"] !
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-set opts "debug ldflags=-nostartfiles"
-foreach i ${link-flags} {
- append opts " ldflags=$i"
-}
-if { [gdb_compile "asmsrc1.o asmsrc2.o" "${binfile}" executable $opts] != "" } {
+# We deliberately don't use gdb_compile here to link together the
+# assembled object files. Using gdb_compile, and therefore the C
+# compiler, is conceptually wrong, since we're testing raw assembler
+# code here that provides its own startup code. Using target_link
+# also avoids a lot of problems on many systems, most notably on
+# *-*-*bsd* and *-*-solaris2*.
+if {[target_link "asmsrc1.o asmsrc2.o" "${binfile}" ${link-flags}] != "" } then {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -362,3 +369,4 @@ gdb_test "disassem foostatic" ".*<foostatic\\+0>:.*End of assembler dump." \
"look at static function"
remote_exec build "rm -f ${subdir}/arch.inc"
+remote_exec build "rm -f ${subdir}/note.inc"
diff --git a/gdb/testsuite/gdb.asm/asmsrc1.s b/gdb/testsuite/gdb.asm/asmsrc1.s
index cba0e90ec2a..48bfb86d419 100644
--- a/gdb/testsuite/gdb.asm/asmsrc1.s
+++ b/gdb/testsuite/gdb.asm/asmsrc1.s
@@ -65,3 +65,5 @@ gdbasm_datavar globalvar 11
comment "A static variable"
gdbasm_datavar staticvar 5
+
+ .include "note.inc"
diff --git a/gdb/testsuite/gdb.asm/empty.inc b/gdb/testsuite/gdb.asm/empty.inc
new file mode 100644
index 00000000000..e786488d9f2
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/empty.inc
@@ -0,0 +1 @@
+ comment "empty"
diff --git a/gdb/testsuite/gdb.asm/frv.inc b/gdb/testsuite/gdb.asm/frv.inc
new file mode 100644
index 00000000000..e8f3b8ff1f3
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/frv.inc
@@ -0,0 +1,54 @@
+ comment "subroutine prologue"
+ .macro gdbasm_enter
+ addi sp,#-16,sp
+ sti fp, @(sp,0)
+ mov sp, fp
+ movsg lr, gr5
+ sti gr5, @(fp,8)
+ .endm
+
+ comment "subroutine epilogue"
+ .macro gdbasm_leave
+ ldi @(fp,8), gr5
+ ld @(fp,gr0), fp
+ addi sp,#16,sp
+ jmpl @(gr5,gr0)
+ .endm
+
+ .macro gdbasm_call subr
+ call \subr
+ .endm
+
+ .macro gdbasm_several_nops
+ nop
+ nop
+ nop
+ nop
+ .endm
+
+ comment "exit (0)"
+ .macro gdbasm_exit0
+ comment "Don't know how to exit, but this will certainly halt..."
+ ldi @(gr0,0), gr5
+ .endm
+
+ comment "crt0 startup"
+ .macro gdbasm_startup
+ call .Lcall
+.Lcall: movsg lr, gr4
+ sethi #gprelhi(.Lcall), gr5
+ setlo #gprello(.Lcall), gr5
+ sub gr4, gr5, gr16
+
+ sethi #gprelhi(_stack), sp
+ setlo #gprello(_stack), sp
+ setlos #0, fp
+ add sp, gr16, sp
+ .endm
+
+ comment "Declare a data variable"
+ .macro gdbasm_datavar name value
+ .data
+\name:
+ .long \value
+ .endm
diff --git a/gdb/testsuite/gdb.asm/ia64.inc b/gdb/testsuite/gdb.asm/ia64.inc
index d55cd221972..31f37c1a65a 100644
--- a/gdb/testsuite/gdb.asm/ia64.inc
+++ b/gdb/testsuite/gdb.asm/ia64.inc
@@ -36,6 +36,7 @@
comment "crt0 startup"
.macro gdbasm_startup
+ gdbasm_enter
mov r32=r0
nop.i 0
nop.i 0
diff --git a/gdb/testsuite/gdb.asm/mips.inc b/gdb/testsuite/gdb.asm/mips.inc
index 751f73f859b..a0992bb530f 100644
--- a/gdb/testsuite/gdb.asm/mips.inc
+++ b/gdb/testsuite/gdb.asm/mips.inc
@@ -58,7 +58,5 @@
comment "crt0 startup"
.macro gdbasm_startup
- .global __start
-__start:
move $fp, $sp
.endm
diff --git a/gdb/testsuite/gdb.asm/netbsd.inc b/gdb/testsuite/gdb.asm/netbsd.inc
new file mode 100644
index 00000000000..9446966c334
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/netbsd.inc
@@ -0,0 +1,12 @@
+ comment "netbsd .note"
+
+.section ".note.netbsd.ident", "a"
+ .p2align 2
+
+ .long 7
+ .long 4
+ .long 1
+ .ascii "NetBSD\0\0"
+ .long 105010000
+
+ .p2align 2
diff --git a/gdb/testsuite/gdb.asm/openbsd.inc b/gdb/testsuite/gdb.asm/openbsd.inc
new file mode 100644
index 00000000000..5f5f5187cc7
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/openbsd.inc
@@ -0,0 +1,12 @@
+ comment "openbsd .note"
+
+.section ".note.openbsd.ident", "a"
+ .p2align 2
+
+ .long 8
+ .long 4
+ .long 1
+ .ascii "OpenBSD\0\0"
+ .long 200311
+
+ .p2align 2
diff --git a/gdb/testsuite/gdb.base/Makefile.in b/gdb/testsuite/gdb.base/Makefile.in
index e59f57b6639..9f382db8b5a 100644
--- a/gdb/testsuite/gdb.base/Makefile.in
+++ b/gdb/testsuite/gdb.base/Makefile.in
@@ -3,7 +3,7 @@ srcdir = @srcdir@
EXECUTABLES = all-types annota1 bitfields break \
call-ar-st call-rt-st call-strs callfuncs callfwmall \
- commands compiler condbreak constvars coremaker \
+ chng-syms commands compiler condbreak constvars coremaker \
dbx-test display ending-run execd-prog exprs \
foll-exec foll-fork foll-vfork funcargs int-type interrupt jump \
langs list long_long mips_pro miscexprs nodebug opaque overlays \
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index c3ceac34cd6..dc8ba29ca4d 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -296,7 +296,7 @@ match_max 3000
verbose "match_max now is: [match_max]"
send_gdb "backtrace\n"
gdb_expect {
- -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)*\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
+ -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
pass "backtrace @ signal handler"
}
-re ".*$gdb_prompt$" { fail "backtrace @ signal handler" }
diff --git a/gdb/testsuite/gdb.base/auxv.c b/gdb/testsuite/gdb.base/auxv.c
new file mode 100644
index 00000000000..94f9d000f48
--- /dev/null
+++ b/gdb/testsuite/gdb.base/auxv.c
@@ -0,0 +1,58 @@
+/* Simple little program that just generates a core dump from inside some
+ nested function calls. Keep this as self contained as possible, I.E.
+ use no environment resources other than possibly abort(). */
+
+#ifndef __STDC__
+#define const /**/
+#endif
+
+#ifndef HAVE_ABORT
+#define HAVE_ABORT 1
+#endif
+
+#if HAVE_ABORT
+#define ABORT abort()
+#else
+#define ABORT {char *invalid = 0; *invalid = 0xFF;}
+#endif
+
+/* Don't make these automatic vars or we will have to walk back up the
+ stack to access them. */
+
+char *buf1;
+char *buf2;
+
+int coremaker_data = 1; /* In Data section */
+int coremaker_bss; /* In BSS section */
+
+const int coremaker_ro = 201; /* In Read-Only Data section */
+
+void
+func2 (int x)
+{
+ int coremaker_local[5];
+ int i;
+ static int y;
+
+ /* Make sure that coremaker_local doesn't get optimized away. */
+ for (i = 0; i < 5; i++)
+ coremaker_local[i] = i;
+ coremaker_bss = 0;
+ for (i = 0; i < 5; i++)
+ coremaker_bss += coremaker_local[i];
+ coremaker_data = coremaker_ro + 1;
+ y = 10 * x;
+ ABORT;
+}
+
+void
+func1 (int x)
+{
+ func2 (x * 2);
+}
+
+int main ()
+{
+ func1 (10);
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp
new file mode 100644
index 00000000000..3a509b98242
--- /dev/null
+++ b/gdb/testsuite/gdb.base/auxv.exp
@@ -0,0 +1,187 @@
+# Test `info auxv' and related functionality.
+
+# Copyright 1992,1993,1994,1995,1996,1997,1998,1999,2000,2004
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file is based on corefile.exp which was written by Fred
+# Fish. (fnf@cygnus.com)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "auxv"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set corefile ${objdir}/${subdir}/${testfile}.corefile
+set gcorefile ${objdir}/${subdir}/${testfile}.gcore
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Use a fresh directory to confine the native core dumps.
+# Make it the working directory for gdb and its child.
+set coredir "${objdir}/${subdir}/coredir.[getpid]"
+file mkdir $coredir
+set core_works [isnative]
+
+# Run GDB on the test program up to where it will dump core.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+gdb_test "set print sevenbit-strings" "" \
+ "set print sevenbit-strings; ${testfile}"
+gdb_test "set width 0" "" \
+ "set width 0; ${testfile}"
+
+if {$core_works} {
+ if {[gdb_test "cd $coredir" ".*Working directory .*" \
+ "cd to temporary directory for core dumps"]} {
+ set core_works 0
+ }
+}
+
+if { ![runto_main] } then {
+ gdb_suppress_tests;
+}
+set print_core_line [gdb_get_line_number "ABORT;"]
+gdb_test "tbreak $print_core_line"
+gdb_test continue ".*ABORT;.*"
+
+proc fetch_auxv {test} {
+ global gdb_prompt
+
+ set auxv_lines {}
+ set bad -1
+ if {[gdb_test_multiple "info auxv" $test {
+ -re "info auxv\[\r\n\]+" {
+ exp_continue
+ }
+ -ex "The program has no auxiliary information now" {
+ set bad 1
+ }
+ -ex "Auxiliary vector is empty" {
+ set bad 1
+ }
+ -ex "No auxiliary vector found" {
+ set bad 1
+ }
+ -re "^\[0-9\]+\[ \t\]+(AT_\[^ \t\]+)\[^\r\n\]+\[\r\n\]+" {
+ lappend auxv_lines $expect_out(0,string)
+ exp_continue
+ }
+ -re "^\[0-9\]+\[ \t\]+\\?\\?\\?\[^\r\n\]+\[\r\n\]+" {
+ warning "Unrecognized tag value: $expect_out(0,string)"
+ set bad 1
+ lappend auxv_lines $expect_out(0,string)
+ exp_continue
+ }
+ -re ".*$gdb_prompt $" {
+ incr bad
+ }
+ -re "^\[^\r\n\]+\[\r\n\]+" {
+ warning "Unrecognized output: $expect_out(0,string)"
+ set bad 1
+ }
+ }] != 0} {
+ return {}
+ }
+
+ if {$bad} {
+ fail $test
+ return {}
+ }
+
+ pass $test
+ return $auxv_lines
+}
+
+set live_data [fetch_auxv "info auxv on live process"]
+
+# Now try gcore.
+set gcore_works 0
+set escapedfilename [string_to_regexp $gcorefile]
+gdb_test_multiple "gcore $gcorefile" "gcore" {
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
+ pass "gcore"
+ set gcore_works 1
+ }
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
+ unsupported "gcore"
+ }
+}
+
+# Let the program continue and die.
+gdb_test continue ".*Program received signal.*"
+gdb_test continue ".*Program terminated with signal.*"
+
+# Now collect the core dump it left.
+set test "generate native core dump"
+if {$core_works} {
+ # Find the
+ set names [glob -nocomplain -directory $coredir *core*]
+ if {[llength $names] == 1} {
+ set file [file join $coredir [lindex $names 0]]
+ remote_exec build "mv $file $corefile"
+ pass $test
+ } else {
+ set core_works 0
+ warning "can't generate a core file - core tests suppressed - check ulimit -c"
+ fail $test
+ }
+} else {
+ unsupported $test
+}
+remote_exec build "rm -rf $coredir"
+
+# Now we can examine the core files and check that their data matches what
+# we saw in the process. Note that the exact data can vary between runs,
+# so it's important that the native core dump file and the gcore-created dump
+# both be from the same run of the program as we examined live.
+
+proc do_core_test {works corefile test1 test2} {
+ if {! $works} {
+ unsupported $test1
+ unsupported $test2
+ } else {
+ gdb_test "core $corefile" "Core was generated by.*" \
+ "load core file for $test1" \
+ "A program is being debugged already.*" "y"
+ set core_data [fetch_auxv $test1]
+ global live_data
+ if {$core_data == $live_data} {
+ pass $test2
+ } else {
+ fail $test2
+ }
+ }
+}
+
+do_core_test $core_works $corefile \
+ "info auxv on native core dump" "matching auxv data from live and core"
+
+do_core_test $gcore_works $gcorefile \
+ "info auxv on gcore-created dump" "matching auxv data from live and gcore"
diff --git a/gdb/testsuite/gdb.base/bang.exp b/gdb/testsuite/gdb.base/bang.exp
index f5840741f6b..1e18328613a 100644
--- a/gdb/testsuite/gdb.base/bang.exp
+++ b/gdb/testsuite/gdb.base/bang.exp
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -35,7 +35,13 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
# Verify that we can run the program and that it terminates normally.
-gdb_test "run" \
- ".*Program exited normally\." \
- "run program"
+gdb_run_cmd
+gdb_expect {
+ -re ".*Program exited normally\.\r\n$gdb_prompt $" {
+ pass "run program"
+ }
+ timeout {
+ fail "run program (timeout)"
+ }
+}
diff --git a/gdb/testsuite/gdb.base/bigcore.c b/gdb/testsuite/gdb.base/bigcore.c
new file mode 100644
index 00000000000..8cd1b5f98d2
--- /dev/null
+++ b/gdb/testsuite/gdb.base/bigcore.c
@@ -0,0 +1,203 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/resource.h>
+
+/* Print routines:
+
+ The following are so that printf et.al. can be avoided. Those
+ might try to use malloc() and that, for this code, would be a
+ disaster. */
+
+#define printf do not use
+
+const char digit[] = "0123456789abcdefghijklmnopqrstuvwxyz";
+
+static void
+print_char (char c)
+{
+ write (1, &c, sizeof (c));
+}
+
+static void
+print_unsigned (unsigned long u)
+{
+ if (u >= 10)
+ print_unsigned (u / 10);
+ print_char (digit[u % 10]);
+}
+
+static void
+print_hex (unsigned long u)
+{
+ if (u >= 16)
+ print_hex (u / 16);
+ print_char (digit[u % 16]);
+}
+
+static void
+print_string (const char *s)
+{
+ for (; (*s) != '\0'; s++)
+ print_char ((*s));
+}
+
+static void
+print_address (const void *a)
+{
+ print_string ("0x");
+ print_hex ((unsigned long) a);
+}
+
+/* Print the current values of RESOURCE. */
+
+static void
+print_rlimit (int resource)
+{
+ struct rlimit rl;
+ getrlimit (resource, &rl);
+ print_string ("cur=0x");
+ print_hex (rl.rlim_cur);
+ print_string (" max=0x");
+ print_hex (rl.rlim_max);
+}
+
+static void
+maximize_rlimit (int resource, const char *prefix)
+{
+ struct rlimit rl;
+ print_string (" ");
+ print_string (prefix);
+ print_string (": ");
+ print_rlimit (resource);
+ getrlimit (resource, &rl);
+ rl.rlim_cur = rl.rlim_max;
+ setrlimit (resource, &rl);
+ print_string (" -> ");
+ print_rlimit (resource);
+ print_string ("\n");
+}
+
+/* Maintain a doublely linked list. */
+struct list
+{
+ struct list *next;
+ struct list *prev;
+ size_t size;
+};
+
+/* Put the "heap" in the DATA section. That way it is more likely
+ that the variable will occur early in the core file (an address
+ before the heap) and hence more likely that GDB will at least get
+ its value right.
+
+ To simplify the list append logic, start the heap out with one
+ entry (that lives in the BSS section). */
+
+static struct list dummy;
+static struct list heap = { &dummy, &dummy };
+
+int
+main ()
+{
+ size_t max_chunk_size;
+
+ /* Try to expand all the resource limits beyond the point of sanity
+ - we're after the biggest possible core file. */
+
+ print_string ("Maximize resource limits ...\n");
+#ifdef RLIMIT_CORE
+ maximize_rlimit (RLIMIT_CORE, "core");
+#endif
+#ifdef RLIMIT_DATA
+ maximize_rlimit (RLIMIT_DATA, "data");
+#endif
+#ifdef RLIMIT_STACK
+ maximize_rlimit (RLIMIT_STACK, "stack");
+#endif
+#ifdef RLIMIT_AS
+ maximize_rlimit (RLIMIT_AS, "stack");
+#endif
+
+ /* Compute an initial chunk size. The math is dodgy but it works
+ for the moment. Perhaphs there's a constant around somewhere. */
+ {
+ size_t tmp;
+ for (tmp = 1; tmp > 0; tmp <<= 1)
+ max_chunk_size = tmp;
+ }
+
+ /* Allocate as much memory as possible creating a linked list of
+ each section. The linking ensures that some, but not all, the
+ memory is allocated. NB: Some kernels handle this efficiently -
+ only allocating and writing out referenced pages leaving holes in
+ the file for unreferend pages - while others handle this poorly -
+ writing out all pages including those that wern't referenced. */
+
+ print_string ("Alocating the entire heap ...\n");
+ {
+ size_t chunk_size;
+ long bytes_allocated = 0;
+ long chunks_allocated = 0;
+ /* Create a linked list of memory chunks. Start with
+ MAX_CHUNK_SIZE blocks of memory and then try allocating smaller
+ and smaller amounts until all (well at least most) memory has
+ been allocated. */
+ for (chunk_size = max_chunk_size;
+ chunk_size >= sizeof (struct list);
+ chunk_size >>= 1)
+ {
+ unsigned long count = 0;
+ print_string (" ");
+ print_unsigned (chunk_size);
+ print_string (" bytes ... ");
+ while (1)
+ {
+ struct list *chunk = malloc (chunk_size);
+ if (chunk == NULL)
+ break;
+ chunk->size = chunk_size;
+ /* Link it in. */
+ chunk->next = NULL;
+ chunk->prev = heap.prev;
+ heap.prev->next = chunk;
+ heap.prev = chunk;
+ count++;
+ }
+ print_unsigned (count);
+ print_string (" chunks\n");
+ chunks_allocated += count;
+ bytes_allocated += chunk_size * count;
+ }
+ print_string ("Total of ");
+ print_unsigned (bytes_allocated);
+ print_string (" bytes ");
+ print_unsigned (chunks_allocated);
+ print_string (" chunks\n");
+ }
+
+ /* Push everything out to disk. */
+
+ print_string ("Dump core ....\n");
+ *(char*)0 = 0;
+}
diff --git a/gdb/testsuite/gdb.base/bigcore.exp b/gdb/testsuite/gdb.base/bigcore.exp
new file mode 100644
index 00000000000..58cbfa1cc66
--- /dev/null
+++ b/gdb/testsuite/gdb.base/bigcore.exp
@@ -0,0 +1,192 @@
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2004
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file is based on corefile.exp which was written by Fred
+# Fish. (fnf@cygnus.com)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# Are we on a target board? As of 2004-02-12, GDB didn't have a
+# mechanism that would let it efficiently access a remote corefile.
+
+if ![isnative] then {
+ untested "Remote system"
+ return
+}
+
+# Can the system run this test (in particular support sparse
+# corefiles)? On systems that lack sparse corefile support this test
+# consumes too many resources - gigabytes worth of disk space and and
+# I/O bandwith.
+
+if { [istarget "*-*-*bsd*"] || [istarget "*-*-hpux*"] } {
+ untested "Kernel lacks sparse corefile support (PR gdb/1551)"
+ return
+}
+
+set testfile "bigcore"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set corefile ${objdir}/${subdir}/${testfile}.corefile
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Create a core file named "TESTFILE.corefile" rather than just
+# "core", to avoid problems with sys admin types that like to
+# regularly prune all files named "core" from the system.
+
+# Some systems append "core" to the name of the program; others append
+# the name of the program to "core"; still others (like Linux, as of
+# May 2003) create cores named "core.PID". In the latter case, we
+# could have many core files lying around, and it may be difficult to
+# tell which one is ours, so let's run the program in a subdirectory.
+
+set found 0
+set coredir "${objdir}/${subdir}/coredir.[getpid]"
+file mkdir $coredir
+catch "system \"(cd ${coredir}; ${binfile}; true) >/dev/null 2>&1\""
+set names [glob -nocomplain -directory $coredir *core*]
+if {[llength $names] == 1} {
+ set file [file join $coredir [lindex $names 0]]
+ remote_exec build "mv $file $corefile"
+ set found 1
+}
+
+# Try to clean up after ourselves.
+remote_file build delete [file join $coredir coremmap.data]
+remote_exec build "rmdir $coredir"
+
+if { $found == 0 } {
+ warning "can't generate a core file - core tests suppressed - check ulimit -c"
+ return 0
+}
+
+# Run GDB on the bigcore program up-to where it will dump core.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+gdb_test "set print sevenbit-strings" "" \
+ "set print sevenbit-strings; ${testfile}"
+gdb_test "set width 0" "" \
+ "set width 0; ${testfile}"
+if { ![runto_main] } then {
+ gdb_suppress_tests;
+}
+set print_core_line [gdb_get_line_number "Dump core"]
+gdb_test "tbreak $print_core_line"
+gdb_test continue ".*print_string.*"
+gdb_test next ".*0 = 0.*"
+
+# Traverse part of bigcore's linked list of memory chunks (forward or
+# backward), saving each chunk's address. I don't know why but
+# expect_out didn't work with gdb_test_multiple.
+
+proc extract_heap { dir } {
+ global gdb_prompt
+ global expect_out
+ set heap ""
+ set test "extract ${dir} heap"
+ set lim 0
+ send_gdb "print heap.${dir}\n"
+ gdb_expect {
+ -re " = \\(struct list \\*\\) 0x0.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re " = \\(struct list \\*\\) (0x\[0-9a-f\]*).*$gdb_prompt $" {
+ set heap [concat $heap $expect_out(1,string)]
+ if { $lim >= 50 } {
+ pass "$test (stop at $lim)"
+ } else {
+ incr lim
+ send_gdb "print \$.${dir}\n"
+ exp_continue
+ }
+ }
+ -re ".*$gdb_prompt $" {
+ fail "$test (entry $lim)"
+ }
+ timeout {
+ fail "$test (timeout)"
+ }
+ }
+ return $heap;
+}
+set next_heap [extract_heap next]
+set prev_heap [extract_heap prev]
+
+# Now load up that core file
+
+set test "load corefile"
+gdb_test_multiple "core $corefile" "$test" {
+ -re "A program is being debugged already. Kill it. .y or n. " {
+ send_gdb "y\n"
+ exp_continue
+ }
+ -re "Core was generated by.*$gdb_prompt $" {
+ pass "$test"
+ }
+}
+
+# Finally, re-traverse bigcore's linked list, checking each chunk's
+# address against the executable. Don't use gdb_test_multiple as want
+# only one pass/fail. Don't use exp_continue as the regular
+# expression involving $heap needs to be re-evaluated for each new
+# response.
+
+proc check_heap { dir heap } {
+ global gdb_prompt
+ set test "check ${dir} heap"
+ set ok 1
+ set lim 0
+ send_gdb "print heap.${dir}\n"
+ while { $ok } {
+ gdb_expect {
+ -re " = \\(struct list \\*\\) [lindex $heap $lim].*$gdb_prompt $" {
+ if { $lim >= [llength $heap] } {
+ pass "$test"
+ set ok 0
+ } else {
+ incr lim
+ send_gdb "print \$.${dir}\n"
+ }
+ }
+ -re ".*$gdb_prompt $" {
+ fail "$test (address [lindex $heap $lim])"
+ set ok 0
+ }
+ timeout {
+ fail "$test (timeout)"
+ set ok 0
+ }
+ }
+ }
+}
+
+check_heap next $next_heap
+check_heap prev $prev_heap
diff --git a/gdb/testsuite/gdb.base/break.c b/gdb/testsuite/gdb.base/break.c
index 9e458b316bb..bf398fcca91 100644
--- a/gdb/testsuite/gdb.base/break.c
+++ b/gdb/testsuite/gdb.base/break.c
@@ -1,3 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
#ifdef vxworks
# include <stdio.h>
@@ -32,23 +54,16 @@ char *arg;
# include <stdlib.h>
#endif /* ! vxworks */
-/*
- * The following functions do nothing useful. They are included simply
- * as places to try setting breakpoints at. They are explicitly
- * "one-line functions" to verify that this case works (some versions
- * of gcc have or have had problems with this).
- */
-
#ifdef PROTOTYPES
-int marker1 (void) { return (0); }
-int marker2 (int a) { return (1); }
-void marker3 (char *a, char *b) {}
-void marker4 (long d) {}
+extern int marker1 (void);
+extern int marker2 (int a);
+extern void marker3 (char *a, char *b);
+extern void marker4 (long d);
#else
-int marker1 () { return (0); }
-int marker2 (a) int a; { return (1); }
-void marker3 (a, b) char *a, *b; {}
-void marker4 (d) long d; {}
+extern int marker1 ();
+extern int marker2 ();
+extern void marker3 ();
+extern void marker4 ();
#endif
/*
@@ -69,21 +84,21 @@ char *argv[], **envp;
#endif
{
#ifdef usestubs
- set_debug_traps();
+ set_debug_traps(); /* set breakpoint 5 here */
breakpoint();
#endif
- if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */
+ if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
fprintf (stderr, "usage: factorial <number>\n");
return 1;
}
- printf ("%d\n", factorial (atoi ("6")));
-
- marker1 ();
- marker2 (43);
- marker3 ("stack", "trace");
+ printf ("%d\n", factorial (atoi ("6"))); /* set breakpoint 1 here */
+ /* set breakpoint 12 here */
+ marker1 (); /* set breakpoint 11 here */
+ marker2 (43); /* set breakpoint 20 here */
+ marker3 ("stack", "trace"); /* set breakpoint 21 here */
marker4 (177601976L);
- argc = (argc == 12345); /* This is silly, but we can step off of it */
- return argc;
+ argc = (argc == 12345); /* This is silly, but we can step off of it */ /* set breakpoint 2 here */
+ return argc; /* set breakpoint 10 here */
}
#ifdef PROTOTYPES
@@ -93,10 +108,10 @@ int factorial (value)
int value;
#endif
{
- if (value > 1) {
+ if (value > 1) { /* set breakpoint 7 here */
value *= factorial (value - 1);
}
- return (value);
+ return (value); /* set breakpoint 19 here */
}
#ifdef PROTOTYPES
@@ -106,7 +121,7 @@ int multi_line_if_conditional (a, b, c)
int a, b, c;
#endif
{
- if (a
+ if (a /* set breakpoint 3 here */
&& b
&& c)
return 0;
@@ -121,7 +136,7 @@ int multi_line_while_conditional (a, b, c)
int a, b, c;
#endif
{
- while (a
+ while (a /* set breakpoint 4 here */
&& b
&& c)
{
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index 38820ec9fc9..c425d1439cf 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -34,10 +34,19 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [get_compiler_info ${binfile}] {
@@ -87,7 +96,7 @@ gdb_test "break main" \
# test break at quoted function
#
gdb_test "break \"marker2\"" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "Breakpoint.*at.* file .*$srcfile1, line.*" \
"breakpoint quoted function"
#
@@ -97,6 +106,8 @@ gdb_test "break $srcfile:factorial" \
"Breakpoint.*at.* file .*$srcfile, line.*" \
"breakpoint function in file"
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+
#
# test break at line number
#
@@ -109,44 +120,51 @@ gdb_test "break $srcfile:factorial" \
gdb_test "list main" \
".*main \\(argc, argv, envp\\).*" \
"use `list' to establish default source file"
-gdb_test "break 79" \
- "Breakpoint.*at.* file .*$srcfile, line 79\\." \
+gdb_test "break $bp_location1" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location1\\." \
"breakpoint line number"
#
# test duplicate breakpoint
#
-gdb_test "break 79" \
- "Note: breakpoint \[0-9\]+ also set at pc.*Breakpoint \[0-9\]+ at.* file .*$srcfile, line 79\\." \
+gdb_test "break $bp_location1" \
+ "Note: breakpoint \[0-9\]+ also set at pc.*Breakpoint \[0-9\]+ at.* file .*$srcfile, line $bp_location1\\." \
"breakpoint duplicate"
+set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
+
#
# test break at line number in file
#
-gdb_test "break $srcfile:85" \
- "Breakpoint.*at.* file .*$srcfile, line 85\\." \
+gdb_test "break $srcfile:$bp_location2" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location2\\." \
"breakpoint line number in file"
+set bp_location3 [gdb_get_line_number "set breakpoint 3 here"]
+set bp_location4 [gdb_get_line_number "set breakpoint 4 here"]
#
# Test putting a break at the start of a multi-line if conditional.
# Verify the breakpoint was put at the start of the conditional.
#
gdb_test "break multi_line_if_conditional" \
- "Breakpoint.*at.* file .*$srcfile, line 109\\." \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location3\\." \
"breakpoint at start of multi line if conditional"
gdb_test "break multi_line_while_conditional" \
- "Breakpoint.*at.* file .*$srcfile, line 124\\." \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location4\\." \
"breakpoint at start of multi line while conditional"
+set bp_location5 [gdb_get_line_number "set breakpoint 5 here"]
+set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
+
#
# check to see what breakpoints are set
#
if [target_info exists gdb_stub] {
- set main_line 72
+ set main_line $bp_location5
} else {
- set main_line 75
+ set main_line $bp_location6
}
if {$hp_aCC_compiler} {
@@ -155,16 +173,20 @@ if {$hp_aCC_compiler} {
set proto ""
}
+set bp_location7 [gdb_get_line_number "set breakpoint 7 here"]
+set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
+set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
+
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in marker2 at .*$srcfile:4\[49\].*
-\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:96.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:85.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_if_conditional at .*$srcfile:109.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:124" \
+\[0-9\]+\[\t \]+breakpoint keep y.* in marker2 at .*$srcfile1:($bp_location8|$bp_location9).*
+\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:$bp_location7.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location2.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_if_conditional at .*$srcfile:$bp_location3.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:$bp_location4" \
"breakpoint info"
# FIXME: The rest of this test doesn't work with anything that can't
@@ -191,52 +213,53 @@ if ![target_info exists use_gdb_stub] {
send_gdb "y\n"
exp_continue
}
- -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:75.*75\[\t \]+if .argc.* \{.*$gdb_prompt $"\
+ -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $"\
{ pass "run until function breakpoint" }
-re ".*$gdb_prompt $" { fail "run until function breakpoint" }
timeout { fail "run until function breakpoint (timeout)" }
}
} else {
if ![target_info exists gdb_stub] {
- gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:75.*75\[\t \]+if .argc.*\{.*" "stub continue"
+ gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.*\{.*" "stub continue"
}
}
#
# run until the breakpoint at a line number
#
-gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:79.*79\[\t \]+printf.*factorial.*" \
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location1.*$bp_location1\[\t \]+printf.*factorial.*" \
"run until breakpoint set at a line number"
#
# Run until the breakpoint set in a function in a file
#
for {set i 6} {$i >= 1} {incr i -1} {
- gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:96.*96\[\t \]+.*if .value > 1. \{.*" \
+ gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:$bp_location7.*$bp_location7\[\t \]+.*if .value > 1. \{.*" \
"run until file:function($i) breakpoint"
}
#
# Run until the breakpoint set at a quoted function
#
-gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, (0x\[0-9a-f\]+ in )?marker2 \\(a=43\\) at .*$srcfile:4\[49\].*" \
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, (0x\[0-9a-f\]+ in )?marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*" \
"run until quoted breakpoint"
#
# run until the file:function breakpoint at a line number in a file
#
-gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:85.*85\[\t \]+argc = \\(argc == 12345\\);.*" \
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location2.*$bp_location2\[\t \]+argc = \\(argc == 12345\\);.*" \
"run until file:linenum breakpoint"
# Test break at offset +1
+set bp_location10 [gdb_get_line_number "set breakpoint 10 here"]
gdb_test "break +1" \
- "Breakpoint.*at.* file .*$srcfile, line 86\\." \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location10\\." \
"breakpoint offset +1"
# Check to see if breakpoint is hit when stepped onto
gdb_test "step" \
- ".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:86.*86\[\t \]+return argc;" \
+ ".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location10.*$bp_location10\[\t \]+return argc;.*breakpoint 10 here.*" \
"step onto breakpoint"
#
@@ -260,37 +283,38 @@ gdb_test "tbreak $srcfile:factorial" "Breakpoint.*at.* file .*$srcfile, line.*"
#
# test break at line number
#
-send_gdb "tbreak 79\n"
+send_gdb "tbreak $bp_location1\n"
gdb_expect {
- -re "Breakpoint.*at.* file .*$srcfile, line 79.*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
+ -re "Breakpoint.*at.* file .*$srcfile, line $bp_location1.*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
-re ".*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
timeout { fail "breakpoint line number #1 (timeout)" }
}
-gdb_test "tbreak 75" "Breakpoint.*at.* file .*$srcfile, line 75.*" "Temporary breakpoint line number #2"
+gdb_test "tbreak $bp_location6" "Breakpoint.*at.* file .*$srcfile, line $bp_location6.*" "Temporary breakpoint line number #2"
#
# test break at line number in file
#
-send_gdb "tbreak $srcfile:85\n"
+send_gdb "tbreak $srcfile:$bp_location2\n"
gdb_expect {
- -re "Breakpoint.*at.* file .*$srcfile, line 85.*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
+ -re "Breakpoint.*at.* file .*$srcfile, line $bp_location2.*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
-re ".*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
timeout { fail "Temporary breakpoint line number in file #1 (timeout)" }
}
-gdb_test "tbreak $srcfile:81" "Breakpoint.*at.* file .*$srcfile, line 81.*" "Temporary breakpoint line number in file #2"
+set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
+gdb_test "tbreak $srcfile:$bp_location11" "Breakpoint.*at.* file .*$srcfile, line $bp_location11.*" "Temporary breakpoint line number in file #2"
#
# check to see what breakpoints are set (temporary this time)
#
gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:96.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:79.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:75.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:85.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:81.*" \
+\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:$bp_location7.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location1.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location6.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location2.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location11.*" \
"Temporary breakpoint info"
@@ -378,7 +402,7 @@ gdb_expect {
# Run to the desired default location. If not positioned here, the
# tests below don't work.
#
-gdb_test "until 79" "main .* at .*:79.*" "until 79"
+gdb_test "until $bp_location1" "main .* at .*:$bp_location1.*" "until bp_location1"
# Verify that GDB allows one to just say "break", which is treated
@@ -427,13 +451,13 @@ gdb_expect {
#
if ![runto_main] then { fail "break tests suppressed" }
-send_gdb "break 79\n"
+send_gdb "break $bp_location1\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 79.*$gdb_prompt $"\
- {pass "set to-be-silent break 79"}
+ -re "Breakpoint (\[0-9\]*) at .*, line $bp_location1.*$gdb_prompt $"\
+ {pass "set to-be-silent break bp_location1"}
-re "$gdb_prompt $"\
- {fail "set to-be-silent break 79"}
- timeout {fail "(timeout) set to-be-silent break 79"}
+ {fail "set to-be-silent break bp_location1"}
+ timeout {fail "(timeout) set to-be-silent break bp_location1"}
}
send_gdb "commands $expect_out(1,string)\n"
@@ -441,33 +465,33 @@ send_gdb "silent\n"
send_gdb "end\n"
gdb_expect {
-re ".*$gdb_prompt $"\
- {pass "set silent break 79"}
- timeout {fail "(timeout) set silent break 79"}
+ {pass "set silent break bp_location1"}
+ timeout {fail "(timeout) set silent break bp_location1"}
}
send_gdb "info break $expect_out(1,string)\n"
gdb_expect {
- -re "\[0-9\]*\[ \t\]*breakpoint.*:79\r\n\[ \t\]*silent.*$gdb_prompt $"\
- {pass "info silent break 79"}
+ -re "\[0-9\]*\[ \t\]*breakpoint.*:$bp_location1\r\n\[ \t\]*silent.*$gdb_prompt $"\
+ {pass "info silent break bp_location1"}
-re "$gdb_prompt $"\
- {fail "info silent break 79"}
- timeout {fail "(timeout) info silent break 79"}
+ {fail "info silent break bp_location1"}
+ timeout {fail "(timeout) info silent break bp_location1"}
}
send_gdb "continue\n"
gdb_expect {
-re "Continuing.\r\n$gdb_prompt $"\
- {pass "hit silent break 79"}
+ {pass "hit silent break bp_location1"}
-re "$gdb_prompt $"\
- {fail "hit silent break 79"}
- timeout {fail "(timeout) hit silent break 79"}
+ {fail "hit silent break bp_location1"}
+ timeout {fail "(timeout) hit silent break bp_location1"}
}
send_gdb "bt\n"
gdb_expect {
- -re "#0 main .* at .*:79.*$gdb_prompt $"\
- {pass "stopped for silent break 79"}
+ -re "#0 main .* at .*:$bp_location1.*$gdb_prompt $"\
+ {pass "stopped for silent break bp_location1"}
-re "$gdb_prompt $"\
- {fail "stopped for silent break 79"}
- timeout {fail "(timeout) stopped for silent break 79"}
+ {fail "stopped for silent break bp_location1"}
+ timeout {fail "(timeout) stopped for silent break bp_location1"}
}
# Verify that GDB can at least parse a breakpoint with the
@@ -475,7 +499,8 @@ gdb_expect {
# thread-specific breakpoint really triggers appropriately.
# The gdb.threads subdirectory contains tests for that.)
#
-send_gdb "break 80 thread 999\n"
+set bp_location12 [gdb_get_line_number "set breakpoint 12 here"]
+send_gdb "break $bp_location12 thread 999\n"
gdb_expect {
-re "Unknown thread 999.*$gdb_prompt $"\
{pass "thread-specific breakpoint on non-existent thread disallowed"}
@@ -483,7 +508,7 @@ gdb_expect {
{fail "thread-specific breakpoint on non-existent thread disallowed"}
timeout {fail "(timeout) thread-specific breakpoint on non-existent thread disallowed"}
}
-send_gdb "break 80 thread foo\n"
+send_gdb "break $bp_location12 thread foo\n"
gdb_expect {
-re "Junk after thread keyword..*$gdb_prompt $"\
{pass "thread-specific breakpoint on bogus thread ID disallowed"}
@@ -495,7 +520,7 @@ gdb_expect {
# Verify that GDB responds gracefully to a breakpoint command with
# trailing garbage.
#
-send_gdb "break 80 foo\n"
+send_gdb "break $bp_location12 foo\n"
gdb_expect {
-re "Junk at end of arguments..*$gdb_prompt $"\
{pass "breakpoint with trailing garbage disallowed"}
@@ -542,15 +567,15 @@ gdb_test "clear marker3" {Deleted breakpoints [0-9]+ [0-9]+.*}
# Verify that a breakpoint can be set via a convenience variable.
#
-send_gdb "set \$foo=81\n"
+send_gdb "set \$foo=$bp_location11\n"
gdb_expect {
-re "$gdb_prompt $"\
- {pass "set convenience variable \$foo to 81"}
- timeout {fail "(timeout) set convenience variable \$foo to 81"}
+ {pass "set convenience variable \$foo to bp_location11"}
+ timeout {fail "(timeout) set convenience variable \$foo to bp_location11"}
}
send_gdb "break \$foo\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 81.*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line $bp_location11.*$gdb_prompt $"\
{pass "set breakpoint via convenience variable"}
-re "$gdb_prompt $"\
{fail "set breakpoint via convenience variable"}
@@ -579,7 +604,7 @@ gdb_expect {
#
send_gdb "break marker2\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[49\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location8|$bp_location9).*$gdb_prompt $"\
{pass "set breakpoint on to-be-called function"}
-re "$gdb_prompt $"\
{fail "set breakpoint on to-be-called function"}
@@ -602,9 +627,9 @@ gdb_expect {
#
send_gdb "bt\n"
gdb_expect {
- -re "#0\[ \t\]*($hex in )?marker2.*:4\[49\]\r\n#1.*_sr4export.*$gdb_prompt $"\
+ -re "#0\[ \t\]*($hex in )?marker2.*:($bp_location8|$bp_location9)\r\n#1.*_sr4export.*$gdb_prompt $"\
{pass "backtrace while in called function"}
- -re "#0\[ \t\]*($hex in )?marker2.*:4\[49\]\r\n#1.*function called from gdb.*$gdb_prompt $"\
+ -re "#0\[ \t\]*($hex in )?marker2.*:($bp_location8|$bp_location9)\r\n#1.*function called from gdb.*$gdb_prompt $"\
{pass "backtrace while in called function"}
-re "$gdb_prompt $"\
{fail "backtrace while in called function"}
@@ -617,11 +642,11 @@ gdb_expect {
#
send_gdb "finish\n"
gdb_expect {
- -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.* in _sr4export.*$gdb_prompt $"\
+ -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.* in _sr4export.*$gdb_prompt $"\
{pass "finish from called function"}
- -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.*function called from gdb.*$gdb_prompt $"\
+ -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.*function called from gdb.*$gdb_prompt $"\
{pass "finish from called function"}
- -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.*Value returned.*$gdb_prompt $"\
+ -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.*Value returned.*$gdb_prompt $"\
{pass "finish from called function"}
-re "$gdb_prompt $"\
{fail "finish from called function"}
@@ -833,8 +858,16 @@ test_next_with_recursion
set binfileo2 ${objdir}/${subdir}/${testfile}o2
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfileo2}" executable {debug additional_flags="-O2" }] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}O0.o" object {debug "additional_flags=-w -O2"}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}O1.o" object {debug "additional_flags=-w -O2"}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}O0.o ${binfile}O1.o" "${binfileo2}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [get_compiler_info ${binfileo2}] {
@@ -861,7 +894,7 @@ gdb_test "break main" \
# test break at function
#
gdb_test "break marker4" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "Breakpoint.*at.* file .*$srcfile1, line.*" \
"breakpoint small function, optimized file"
#
@@ -880,7 +913,7 @@ if ![target_info exists use_gdb_stub] {
send_gdb "y\n"
exp_continue
}
- -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:75.*75\[\t \]+if .argc.* \{.*$gdb_prompt $"\
+ -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $"\
{ pass "run until function breakpoint, optimized file" }
-re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$gdb_prompt $"\
{ pass "run until function breakpoint, optimized file (code motion)" }
@@ -889,7 +922,7 @@ if ![target_info exists use_gdb_stub] {
}
} else {
if ![target_info exists gdb_stub] {
- gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:75.*75\[\t \]+if .argc.*\{.*" "stub continue, optimized file"
+ gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.*\{.*" "stub continue, optimized file"
}
}
@@ -906,17 +939,19 @@ if ![target_info exists use_gdb_stub] {
# has no exactly matching line symbol, and GDB reports the breakpoint
# as if it were in the middle of a line rather than at the beginning.
+set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
+set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
send_gdb "continue\n"
gdb_expect {
- -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:51\[\r\n\]+51\[\t \]+void marker4.*" {
+ -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile1:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*" {
pass "run until breakpoint set at small function, optimized file"
}
- -re "Breakpoint $decimal, $hex in marker4 \\(d=177601976\\) at .*$srcfile:51\[\r\n\]+51\[\t \]+void marker4.*" {
+ -re "Breakpoint $decimal, $hex in marker4 \\(d=177601976\\) at .*$srcfile1:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*" {
pass "run until breakpoint set at small function, optimized file"
}
- -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:46\[\r\n\]+46\[\t \]+void marker4.*" {
+ -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile1:$bp_location14\[\r\n\]+$bp_location14\[\t \]+void marker4.*" {
# marker4() is defined at line 46 when compiled with -DPROTOTYPES
- pass "run until breakpoint set at small function, optimized file (line 46)"
+ pass "run until breakpoint set at small function, optimized file (line bp_location14)"
}
-re ".*$gdb_prompt " {
fail "run until breakpoint set at small function, optimized file"
diff --git a/gdb/testsuite/gdb.base/break1.c b/gdb/testsuite/gdb.base/break1.c
new file mode 100644
index 00000000000..2ed8b2a4a02
--- /dev/null
+++ b/gdb/testsuite/gdb.base/break1.c
@@ -0,0 +1,44 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+/* The code for this file was extracted from the gdb testsuite
+ testcase "break.c". */
+
+/* The following functions do nothing useful. They are included
+ simply as places to try setting breakpoints at. They are
+ explicitly "one-line functions" to verify that this case works
+ (some versions of gcc have or have had problems with this).
+
+ These functions are in a separate source file to prevent an
+ optimizing compiler from inlining them and optimizing them away. */
+
+#ifdef PROTOTYPES
+int marker1 (void) { return (0); } /* set breakpoint 15 here */
+int marker2 (int a) { return (1); } /* set breakpoint 8 here */
+void marker3 (char *a, char *b) {} /* set breakpoint 17 here */
+void marker4 (long d) {} /* set breakpoint 14 here */
+#else
+int marker1 () { return (0); } /* set breakpoint 16 here */
+int marker2 (a) int a; { return (1); } /* set breakpoint 9 here */
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
+void marker4 (d) long d; {} /* set breakpoint 13 here */
+#endif
diff --git a/gdb/testsuite/gdb.base/call-ar-st.exp b/gdb/testsuite/gdb.base/call-ar-st.exp
index a7ea5cf56aa..9b0e5398a2f 100644
--- a/gdb/testsuite/gdb.base/call-ar-st.exp
+++ b/gdb/testsuite/gdb.base/call-ar-st.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2000, 2001
+# Copyright 1998, 1999, 2000, 2001, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -89,8 +89,6 @@ proc set_lang_c {} {
}
}
-source ${binfile}.ci
-
# Start with a fresh gdb.
gdb_exit
@@ -107,6 +105,8 @@ if ![runto_main] then {
continue
}
+get_debug_format
+
#go -until 1209
gdb_test "tbreak 1209" \
"Breakpoint \[0-9\]+.*file.*$srcfile, line 1209.*" \
@@ -502,11 +502,14 @@ set ws "\[\n\r\t \]+"
if {![gdb_skip_float_test "print_small_structs from print_long_arg_list"] && \
![gdb_skip_stdio_test "print_small_structs from print_long_arg_list"] } {
- # On Solaris, some of the args are passed by ref, others by value,
- # and GDB gets confused and says "Invalid cast" because it thinks
- # it has to cast the structure into a pointer to structure. A real
- # GDB bug, probably for all Sparc configs, but obscure. -sts 1999-08-17.
- setup_xfail "sparc*-*-solaris*"
+
+ # On 32-bit SPARC, some of the args are passed by ref, others by
+ # value, and GDB gets confused and says "Invalid cast" because it
+ # thinks it has to cast the structure into a pointer to structure.
+ if { [test_debug_format "stabs"] } then {
+ setup_kfail "gdb/1539" "sparc-*-*"
+ }
+
send_gdb "print print_small_structs(struct1, struct2, struct3, struct4, flags, flags_combo, three_char, five_char, int_char_combo, d1, d2, d3, f1, f2, f3)\n"
gdb_expect_list "print print_small_structs from print_long_arg_list" ".*$gdb_prompt $" {
"\[\t\r\n \]+alpha"
diff --git a/gdb/testsuite/gdb.base/call-rt-st.c b/gdb/testsuite/gdb.base/call-rt-st.c
index 712f70ecbb5..09dd5bb52a9 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.c
+++ b/gdb/testsuite/gdb.base/call-rt-st.c
@@ -31,6 +31,28 @@ struct small_rep_info_t {
int head;
};
+/* 6 bits : really fits in 8 bits and is promoted to 8 bits
+ */
+struct bit_flags_char_t {
+ unsigned char alpha :1;
+ unsigned char beta :1;
+ unsigned char gamma :1;
+ unsigned char delta :1;
+ unsigned char epsilon :1;
+ unsigned char omega :1;
+};
+
+/* 6 bits : really fits in 8 bits and is promoted to 16 bits
+ */
+struct bit_flags_short_t {
+ unsigned short alpha :1;
+ unsigned short beta :1;
+ unsigned short gamma :1;
+ unsigned short delta :1;
+ unsigned short epsilon :1;
+ unsigned short omega :1;
+};
+
/* 6 bits : really fits in 8 bits and is promoted to 32 bits
*/
struct bit_flags_t {
@@ -107,6 +129,90 @@ void loop_count () {
}
/*****************************************************************
+ * INIT_BIT_FLAGS_CHAR :
+ * Initializes a bit_flags_char_t structure. Can call this function see
+ * the call command behavior when integer arguments do not fit into
+ * registers and must be placed on the stack.
+ * OUT struct bit_flags_char_t *bit_flags -- structure to be filled
+ * IN unsigned a -- 0 or 1
+ * IN unsigned b -- 0 or 1
+ * IN unsigned g -- 0 or 1
+ * IN unsigned d -- 0 or 1
+ * IN unsigned e -- 0 or 1
+ * IN unsigned o -- 0 or 1
+ *****************************************************************/
+#ifdef PROTOTYPES
+void init_bit_flags_char (
+struct bit_flags_char_t *bit_flags,
+unsigned a,
+unsigned b,
+unsigned g,
+unsigned d,
+unsigned e,
+unsigned o)
+#else
+void init_bit_flags_char (bit_flags,a,b,g,d,e,o)
+struct bit_flags_char_t *bit_flags;
+unsigned a;
+unsigned b;
+unsigned g;
+unsigned d;
+unsigned e;
+unsigned o;
+#endif
+{
+
+ bit_flags->alpha = a;
+ bit_flags->beta = b;
+ bit_flags->gamma = g;
+ bit_flags->delta = d;
+ bit_flags->epsilon = e;
+ bit_flags->omega = o;
+}
+
+/*****************************************************************
+ * INIT_BIT_FLAGS_SHORT :
+ * Initializes a bit_flags_short_t structure. Can call this function see
+ * the call command behavior when integer arguments do not fit into
+ * registers and must be placed on the stack.
+ * OUT struct bit_flags_short_t *bit_flags -- structure to be filled
+ * IN unsigned a -- 0 or 1
+ * IN unsigned b -- 0 or 1
+ * IN unsigned g -- 0 or 1
+ * IN unsigned d -- 0 or 1
+ * IN unsigned e -- 0 or 1
+ * IN unsigned o -- 0 or 1
+ *****************************************************************/
+#ifdef PROTOTYPES
+void init_bit_flags_short (
+struct bit_flags_short_t *bit_flags,
+unsigned a,
+unsigned b,
+unsigned g,
+unsigned d,
+unsigned e,
+unsigned o)
+#else
+void init_bit_flags_short (bit_flags,a,b,g,d,e,o)
+struct bit_flags_short_t *bit_flags;
+unsigned a;
+unsigned b;
+unsigned g;
+unsigned d;
+unsigned e;
+unsigned o;
+#endif
+{
+
+ bit_flags->alpha = a;
+ bit_flags->beta = b;
+ bit_flags->gamma = g;
+ bit_flags->delta = d;
+ bit_flags->epsilon = e;
+ bit_flags->omega = o;
+}
+
+/*****************************************************************
* INIT_BIT_FLAGS :
* Initializes a bit_flags_t structure. Can call this function see
* the call command behavior when integer arguments do not fit into
@@ -345,6 +451,50 @@ int seed;
}
/*****************************************************************
+ * PRINT_BIT_FLAGS_CHAR :
+ * IN struct bit_flags_char_t bit_flags
+ ****************************************************************/
+#ifdef PROTOTYPES
+struct bit_flags_char_t print_bit_flags_char (struct bit_flags_char_t bit_flags)
+#else
+struct bit_flags_char_t print_bit_flags_char ( bit_flags)
+struct bit_flags_char_t bit_flags;
+#endif
+{
+
+ if (bit_flags.alpha) printf("alpha\n");
+ if (bit_flags.beta) printf("beta\n");
+ if (bit_flags.gamma) printf("gamma\n");
+ if (bit_flags.delta) printf("delta\n");
+ if (bit_flags.epsilon) printf("epsilon\n");
+ if (bit_flags.omega) printf("omega\n");
+ return bit_flags;
+
+}
+
+/*****************************************************************
+ * PRINT_BIT_FLAGS_SHORT :
+ * IN struct bit_flags_short_t bit_flags
+ ****************************************************************/
+#ifdef PROTOTYPES
+struct bit_flags_short_t print_bit_flags_short (struct bit_flags_short_t bit_flags)
+#else
+struct bit_flags_short_t print_bit_flags_short ( bit_flags)
+struct bit_flags_short_t bit_flags;
+#endif
+{
+
+ if (bit_flags.alpha) printf("alpha\n");
+ if (bit_flags.beta) printf("beta\n");
+ if (bit_flags.gamma) printf("gamma\n");
+ if (bit_flags.delta) printf("delta\n");
+ if (bit_flags.epsilon) printf("epsilon\n");
+ if (bit_flags.omega) printf("omega\n");
+ return bit_flags;
+
+}
+
+/*****************************************************************
* PRINT_BIT_FLAGS :
* IN struct bit_flags_t bit_flags
****************************************************************/
@@ -553,6 +703,8 @@ int main () {
/* variables for testing a small structures and a very long argument list
*/
struct small_rep_info_t *struct1;
+ struct bit_flags_char_t *cflags;
+ struct bit_flags_short_t *sflags;
struct bit_flags_t *flags;
struct bit_flags_combo_t *flags_combo;
struct three_char_t *three_char;
@@ -577,6 +729,8 @@ int main () {
/* Allocate space for small structures
*/
struct1 = (struct small_rep_info_t *)malloc(sizeof(struct small_rep_info_t));
+ cflags = (struct bit_flags_char_t *)malloc(sizeof(struct bit_flags_char_t));
+ sflags = (struct bit_flags_short_t *)malloc(sizeof(struct bit_flags_short_t));
flags = (struct bit_flags_t *)malloc(sizeof(struct bit_flags_t));
flags_combo = (struct bit_flags_combo_t *)malloc(sizeof(struct bit_flags_combo_t));
three_char = (struct three_char_t *)malloc(sizeof(struct three_char_t));
@@ -590,6 +744,10 @@ int main () {
*/
init_one_double ( d1, 1.11111);
init_two_floats ( f3, -2.345, 1.0);
+ init_bit_flags_char(cflags, (unsigned)1, (unsigned)0, (unsigned)1,
+ (unsigned)0, (unsigned)1, (unsigned)0 );
+ init_bit_flags_short(sflags, (unsigned)1, (unsigned)0, (unsigned)1,
+ (unsigned)0, (unsigned)1, (unsigned)0 );
init_bit_flags(flags, (unsigned)1, (unsigned)0, (unsigned)1,
(unsigned)0, (unsigned)1, (unsigned)0 );
init_bit_flags_combo(flags_combo, (unsigned)1, (unsigned)0, 'y',
@@ -605,6 +763,8 @@ int main () {
*/
print_one_double(*d1);
print_two_floats(*f3);
+ print_bit_flags_char(*cflags);
+ print_bit_flags_short(*sflags);
print_bit_flags(*flags);
print_bit_flags_combo(*flags_combo);
print_three_chars(*three_char);
diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp
index 0acd1393a7a..4a912fcdc29 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.exp
+++ b/gdb/testsuite/gdb.base/call-rt-st.exp
@@ -1,4 +1,5 @@
-# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -91,11 +92,6 @@ proc set_lang_c {} {
}
}
-
-
-source ${binfile}.ci
-
-
# Start with a fresh gdb.
gdb_exit
@@ -114,13 +110,13 @@ if ![runto_main] then {
gdb_test "break loop_count" \
- "Breakpoint.* file .*call-rt-st.c, line 106\\." \
+ "Breakpoint.* file .*call-rt-st.c, line 128\\." \
"breakpoint loop_count"
send_gdb "continue\n"
gdb_expect {
- -re "Continuing\\..*Breakpoint.*loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+106\[\t \]+for \\(index=0; index.4; index..\\);\[\r\n \]+$gdb_prompt $" {
+ -re "Continuing\\..*Breakpoint.*loop_count \\(\\) at.*call-rt-st.c:128\[ \t\r\n\]+128\[\t \]+for \\(index=0; index.4; index..\\);\[\r\n \]+$gdb_prompt $" {
pass "continue to loop_count"}
-re ".*$gdb_prompt $" { fail "continue to loop_count"}
timeout { fail "(timeout) continue to loop_count"}
@@ -128,11 +124,11 @@ gdb_expect {
send_gdb "finish\n"
gdb_expect {
- -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:617\[ \t\r\n\]+617\[\t \]+return 0;.*$gdb_prompt $" {
- pass "finish out from loop_count (line 617)"
+ -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:128\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:777\[ \t\r\n\]+777\[\t \]+return 0;.*$gdb_prompt $" {
+ pass "finish out from loop_count (line 777)"
}
- -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:615\[ \t\r\n\]+615\[\t \]+loop_count.*$gdb_prompt $" {
- pass "finish out from loop_count (line 615)"
+ -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:128\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:775\[ \t\r\n\]+775\[\t \]+loop_count.*$gdb_prompt $" {
+ pass "finish out from loop_count (line 775)"
}
-re ".*$gdb_prompt $" {
fail "finish out from loop_count"
@@ -191,6 +187,16 @@ if {![gdb_skip_float_test "print print_two_floats(*f3)"] && \
".*Contents of two_floats_t:\[ \r\n\]+-2\\.345000\[ \t]+1\\.000000\[ \r\n\]+.\[0-9\]+ = \\{float1 = -2\\.34500003, float2 = 1\\}"
}
+if ![gdb_skip_stdio_test "print print_bit_flags_char(*flags)"] {
+ print_struct_call "print_bit_flags_char(*flags)" \
+ ".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+.\[0-9\]+ = \\{alpha = 1 '\\\\001', beta = 0 '\\\\0', gamma = 1 '\\\\001', delta = 0 '\\\\0', epsilon = 1 '\\\\001', omega = 0 '\\\\0'\\}"
+}
+
+if ![gdb_skip_stdio_test "print print_bit_flags_short(*flags)"] {
+ print_struct_call "print_bit_flags_short(*flags)" \
+ ".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+.\[0-9\]+ = \\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\\}"
+}
+
if ![gdb_skip_stdio_test "print print_bit_flags(*flags)"] {
print_struct_call "print_bit_flags(*flags)" \
".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+.\[0-9\]+ = \\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\\}"
diff --git a/gdb/testsuite/gdb.base/callfuncs.c b/gdb/testsuite/gdb.base/callfuncs.c
index 9917e788d0a..a52b2b138f9 100644
--- a/gdb/testsuite/gdb.base/callfuncs.c
+++ b/gdb/testsuite/gdb.base/callfuncs.c
@@ -1,3 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2004
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
/* Support program for testing gdb's ability to call functions
in the inferior, pass appropriate arguments to those functions,
and get the returned result. */
@@ -357,7 +379,7 @@ int a, b;
/* Gotta have a main to be able to generate a linked, runnable
executable, and also provide a useful place to set a breakpoint. */
-extern void * malloc() ;
+
int main ()
{
#ifdef usestubs
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 7a5f14302d7..feccd6f7ea5 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -1,5 +1,5 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -95,7 +95,6 @@ proc set_lang_c {} {
proc do_function_calls {} {
global prototypes
- global gcc_compiled
global gdb_prompt
# We need to up this because this can be really slow on some boards.
@@ -149,7 +148,7 @@ proc do_function_calls {} {
# to be a generic problem on quite a few platforms.
if $prototypes then {
setup_xfail "sparc-*-*" "mips*-*-*" 5318
- if {!$gcc_compiled} then {
+ if { ! [test_compiler_info gcc-*-*] } then {
setup_xfail "alpha-dec-osf2*" "i*86-*-sysv4*" 5318
}
}
@@ -182,30 +181,27 @@ proc do_function_calls {} {
gdb_test "p t_func_values(func_val2,func_val1)" " = 0"
gdb_test "p t_func_values(func_val1,func_val2)" " = 1"
- # On the rs6000, we need to pass the address of the trampoline routine,
- # not the address of add itself. I don't know how to go from add to
- # the address of the trampoline. Similar problems exist on the HPPA,
- # and in fact can present an unsolvable problem as the stubs may not
- # even exist in the user's program. We've slightly recoded t_func_values
- # to avoid such problems in the common case. This may or may not help
- # the RS6000.
- setup_xfail "rs6000*-*-*"
- setup_xfail "powerpc*-*-*"
- if {![istarget hppa*-*-hpux*]} then {
- gdb_test "p t_func_values(add,func_val2)" " = 1"
- }
-
- setup_xfail "rs6000*-*-*"
- setup_xfail "powerpc*-*-*"
- if {![istarget hppa*-*-hpux*]} then {
- gdb_test "p t_func_values(func_val1,doubleit)" " = 1"
- }
-
- setup_xfail "rs6000*-*-*"
- setup_xfail "powerpc*-*-*"
- if {![istarget hppa*-*-hpux*]} then {
- gdb_test "p t_call_add(add,3,4)" " = 7"
- }
+ # GDB currently screws up the passing of function parameters for
+ # ABIs that use function descriptors. Instead of passing the
+ # address of te function descriptor, GDB passes the address of the
+ # function body. This results in the called function treating the
+ # first few instructions of the function proper as a descriptor
+ # and attempting a jump through that (a totally random address).
+ setup_kfail "rs6000*-*-aix*" gdb/1457
+ setup_kfail "powerpc*-*-aix*" gdb/1457
+ setup_kfail "powerpc64*-*-*" gdb/1457
+ setup_kfail hppa*-*-hpux* gdb/1457
+ gdb_test "p t_func_values(add,func_val2)" " = 1"
+ setup_kfail "rs6000*-*-aix*" gdb/1457
+ setup_kfail "powerpc*-*-aix*" gdb/1457
+ setup_kfail "powerpc64*-*-*" gdb/1457
+ setup_kfail hppa*-*-hpux* gdb/1457
+ gdb_test "p t_func_values(func_val1,doubleit)" " = 1"
+ setup_kfail "rs6000*-*-aix*" gdb/1457
+ setup_kfail "powerpc*-*-aix*" gdb/1457
+ setup_kfail "powerpc64*-*-*" gdb/1457
+ setup_kfail hppa*-*-hpux* gdb/1457
+ gdb_test "p t_call_add(add,3,4)" " = 7"
gdb_test "p t_call_add(func_val1,3,4)" " = 7"
gdb_test "p t_enum_value1(enumval1)" " = 1"
@@ -228,7 +224,7 @@ proc do_function_calls {} {
gdb_test "p t_structs_c(struct_val1)" "= 120 'x'" \
"call inferior func with struct - returns char"
gdb_test "p t_structs_s(struct_val1)" "= 87" \
- "call inferior func with struct - returns short"
+ "call inferior func with struct - returns short"
gdb_test "p t_structs_i(struct_val1)" "= 76" \
"call inferior func with struct - returns int"
gdb_test "p t_structs_l(struct_val1)" "= 51" \
diff --git a/gdb/testsuite/gdb.base/charset.c b/gdb/testsuite/gdb.base/charset.c
index ece684a1ef9..4361ffc7bc2 100644
--- a/gdb/testsuite/gdb.base/charset.c
+++ b/gdb/testsuite/gdb.base/charset.c
@@ -1,7 +1,28 @@
-/* Test GDB's character set support
- Jim Blandy <jimb@cygnus.com> --- December 2001 */
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2001, 2004 Free Software Foundation, Inc.
+
+ Contributed by Red Hat, originally written by Jim Blandy.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
#include <stdio.h>
+#include <string.h>
/* X_string is a null-terminated string in the X charset whose
@@ -13,21 +34,20 @@
[0] --- the `alert' character, '\a'
[1] --- the `backspace' character, '\b'
- [2] --- the `escape' character, '\e'
- [3] --- the `form feed' character, '\f'
- [4] --- the `line feed' character, '\n'
- [5] --- the `carriage return' character, '\r'
- [6] --- the `horizontal tab' character, '\t'
- [7] --- the `vertical tab' character, '\v'
- [8 .. 33] --- the uppercase letters A-Z
- [34 .. 59] --- the lowercase letters a-z
- [60 .. 69] --- the digits 0-9
- [70] --- the `cent' character
- [71] --- a control character with no defined backslash escape
+ [2] --- the `form feed' character, '\f'
+ [3] --- the `line feed' character, '\n'
+ [4] --- the `carriage return' character, '\r'
+ [5] --- the `horizontal tab' character, '\t'
+ [6] --- the `vertical tab' character, '\v'
+ [7 .. 32] --- the uppercase letters A-Z
+ [33 .. 58] --- the lowercase letters a-z
+ [59 .. 68] --- the digits 0-9
+ [69] --- the `cent' character
+ [70] --- a control character with no defined backslash escape
Feel free to extend these as you like. */
-#define NUM_CHARS (72)
+#define NUM_CHARS (71)
char ascii_string[NUM_CHARS];
char iso_8859_1_string[NUM_CHARS];
@@ -38,21 +58,20 @@ char ibm1047_string[NUM_CHARS];
void
init_string (char string[],
char x,
- char alert, char backspace, char escape, char form_feed,
+ char alert, char backspace, char form_feed,
char line_feed, char carriage_return, char horizontal_tab,
char vertical_tab, char cent, char misc_ctrl)
{
memset (string, x, NUM_CHARS);
string[0] = alert;
string[1] = backspace;
- string[2] = escape;
- string[3] = form_feed;
- string[4] = line_feed;
- string[5] = carriage_return;
- string[6] = horizontal_tab;
- string[7] = vertical_tab;
- string[70] = cent;
- string[71] = misc_ctrl;
+ string[2] = form_feed;
+ string[3] = line_feed;
+ string[4] = carriage_return;
+ string[5] = horizontal_tab;
+ string[6] = vertical_tab;
+ string[69] = cent;
+ string[70] = misc_ctrl;
}
@@ -76,56 +95,56 @@ int main ()
/* Initialize ascii_string. */
init_string (ascii_string,
120,
- 7, 8, 27, 12,
+ 7, 8, 12,
10, 13, 9,
11, 120, 17);
- fill_run (ascii_string, 8, 26, 65);
- fill_run (ascii_string, 34, 26, 97);
- fill_run (ascii_string, 60, 10, 48);
+ fill_run (ascii_string, 7, 26, 65);
+ fill_run (ascii_string, 33, 26, 97);
+ fill_run (ascii_string, 59, 10, 48);
/* Initialize iso_8859_1_string. */
init_string (iso_8859_1_string,
120,
- 7, 8, 27, 12,
+ 7, 8, 12,
10, 13, 9,
11, 162, 17);
- fill_run (iso_8859_1_string, 8, 26, 65);
- fill_run (iso_8859_1_string, 34, 26, 97);
- fill_run (iso_8859_1_string, 60, 10, 48);
+ fill_run (iso_8859_1_string, 7, 26, 65);
+ fill_run (iso_8859_1_string, 33, 26, 97);
+ fill_run (iso_8859_1_string, 59, 10, 48);
/* Initialize ebcdic_us_string. */
init_string (ebcdic_us_string,
167,
- 47, 22, 39, 12,
+ 47, 22, 12,
37, 13, 5,
11, 74, 17);
/* In EBCDIC, the upper-case letters are broken into three separate runs. */
- fill_run (ebcdic_us_string, 8, 9, 193);
- fill_run (ebcdic_us_string, 17, 9, 209);
- fill_run (ebcdic_us_string, 26, 8, 226);
+ fill_run (ebcdic_us_string, 7, 9, 193);
+ fill_run (ebcdic_us_string, 16, 9, 209);
+ fill_run (ebcdic_us_string, 25, 8, 226);
/* The lower-case letters are, too. */
- fill_run (ebcdic_us_string, 34, 9, 129);
- fill_run (ebcdic_us_string, 43, 9, 145);
- fill_run (ebcdic_us_string, 52, 8, 162);
+ fill_run (ebcdic_us_string, 33, 9, 129);
+ fill_run (ebcdic_us_string, 42, 9, 145);
+ fill_run (ebcdic_us_string, 51, 8, 162);
/* The digits, at least, are contiguous. */
- fill_run (ebcdic_us_string, 60, 10, 240);
+ fill_run (ebcdic_us_string, 59, 10, 240);
/* Initialize ibm1047_string. */
init_string (ibm1047_string,
167,
- 47, 22, 39, 12,
+ 47, 22, 12,
37, 13, 5,
11, 74, 17);
/* In EBCDIC, the upper-case letters are broken into three separate runs. */
- fill_run (ibm1047_string, 8, 9, 193);
- fill_run (ibm1047_string, 17, 9, 209);
- fill_run (ibm1047_string, 26, 8, 226);
+ fill_run (ibm1047_string, 7, 9, 193);
+ fill_run (ibm1047_string, 16, 9, 209);
+ fill_run (ibm1047_string, 25, 8, 226);
/* The lower-case letters are, too. */
- fill_run (ibm1047_string, 34, 9, 129);
- fill_run (ibm1047_string, 43, 9, 145);
- fill_run (ibm1047_string, 52, 8, 162);
+ fill_run (ibm1047_string, 33, 9, 129);
+ fill_run (ibm1047_string, 42, 9, 145);
+ fill_run (ibm1047_string, 51, 8, 162);
/* The digits, at least, are contiguous. */
- fill_run (ibm1047_string, 60, 10, 240);
+ fill_run (ibm1047_string, 59, 10, 240);
puts ("All set!"); /* all strings initialized */
}
diff --git a/gdb/testsuite/gdb.base/charset.exp b/gdb/testsuite/gdb.base/charset.exp
index e17bb14bbce..780e909dbca 100644
--- a/gdb/testsuite/gdb.base/charset.exp
+++ b/gdb/testsuite/gdb.base/charset.exp
@@ -1,4 +1,6 @@
-# Copyright 2001 Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2001, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,7 +17,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
+# bug-gdb@gnu.org
# Test GDB's character set support.
@@ -439,7 +441,7 @@ foreach target_charset [all_charset_names] {
# Compute a regexp matching the results we expect. This is static,
# but it's easier than writing it out.
- regsub -all "." "abefnrtv" "(\\\\&|x)" escapes
+ regsub -all "." "abfnrtv" "(\\\\&|x)" escapes
set uppercase "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
set lowercase "abcdefghijklmnopqrstuvwxyz"
set digits "0123456789"
@@ -448,7 +450,7 @@ foreach target_charset [all_charset_names] {
send_gdb "print $var_name\n"
# ${escapes}${uppercase}${lowercase}${digits}${octal}${octal}
gdb_expect {
- -re ".* = \"(\\\\a|x)(\\\\b|x)(\\\\e|x)(\\\\f|x)(\\\\n|x)(\\\\r|x)(\\\\t|x)(\\\\v|x)${uppercase}${lowercase}${digits}(\\\\\[0-9\]\[0-9\]\[0-9\]|x)(\\\\\[0-9\]\[0-9\]\[0-9\]|x).*\"\[\r\n\]+$gdb_prompt $" {
+ -re ".* = \"(\\\\a|x)(\\\\b|x)(\\\\f|x)(\\\\n|x)(\\\\r|x)(\\\\t|x)(\\\\v|x)${uppercase}${lowercase}${digits}(\\\\\[0-9\]\[0-9\]\[0-9\]|x)(\\\\\[0-9\]\[0-9\]\[0-9\]|x).*\"\[\r\n\]+$gdb_prompt $" {
pass "print string in $target_charset"
}
-re "$gdb_prompt $" {
@@ -465,7 +467,7 @@ foreach target_charset [all_charset_names] {
"parse character literal in ${target_charset}"
# Check that the character literal was encoded correctly.
- gdb_test "print 'A' == $var_name\[8\]" \
+ gdb_test "print 'A' == $var_name\[7\]" \
" = 1" \
"check value of parsed character literal in ${target_charset}"
@@ -475,14 +477,14 @@ foreach target_charset [all_charset_names] {
"parse string literal in ${target_charset}"
# Check that the string literal was encoded correctly.
- gdb_test "print \"q\"\[0\] == $var_name\[50\]" \
+ gdb_test "print \"q\"\[0\] == $var_name\[49\]" \
" = 1" \
"check value of parsed string literal in ${target_charset}"
# Test handling of characters in the target charset which
# can't be translated into the host charset.
if {! [string compare $target_charset iso-8859-1]} {
- gdb_test "print iso_8859_1_string\[70\]" \
+ gdb_test "print iso_8859_1_string\[69\]" \
" = \[0-9-\]+ '\\\\242'" \
"print character with no equivalent in host character set"
gdb_test "print iso_8859_1_string + 70" \
@@ -493,7 +495,7 @@ foreach target_charset [all_charset_names] {
# Make sure that we don't apply the ISO-8859-1 `print_literally'
# function to ASCII.
if {! [string compare $target_charset ascii]} {
- gdb_test "print iso_8859_1_string\[70\]" \
+ gdb_test "print iso_8859_1_string\[69\]" \
" = \[0-9-\]+ '\\\\242'" \
"print ASCII unprintable character"
gdb_test "print iso_8859_1_string + 70" \
@@ -502,7 +504,7 @@ foreach target_charset [all_charset_names] {
}
# Try printing characters with backslash escape equivalents.
- set escapees {a b e f n r t v}
+ set escapees {a b f n r t v}
for {set i 0} {$i < [llength $escapees]} {incr i} {
set escape [lindex $escapees $i]
send_gdb "print $var_name\[$i\]\n"
@@ -541,7 +543,7 @@ foreach target_charset [all_charset_names] {
# get the unescaped character, in the target character set.
gdb_test "print '\\q'" " = \[0-9-\]+ 'q'" \
"print escape that doesn't exist in $target_charset"
- gdb_test "print '\\q' == $var_name\[50\]" " = 1" \
+ gdb_test "print '\\q' == $var_name\[49\]" " = 1" \
"check value of escape that doesn't exist in $target_charset"
}
diff --git a/gdb/testsuite/gdb.base/chng-syms.c b/gdb/testsuite/gdb.base/chng-syms.c
new file mode 100644
index 00000000000..3394f5c3897
--- /dev/null
+++ b/gdb/testsuite/gdb.base/chng-syms.c
@@ -0,0 +1,22 @@
+/*
+ * Test that GDB cleans up properly after errors that result when a
+ * breakpoint is reset.
+ */
+
+/* VARIABLE is a macro defined on the compiler command line. */
+
+#include <stdlib.h>
+
+int VARIABLE = 42;
+
+void stop_here ()
+{
+ VARIABLE *= 2;
+}
+
+int main ()
+{
+ stop_here ();
+ exit (0);
+}
+
diff --git a/gdb/testsuite/gdb.base/chng-syms.exp b/gdb/testsuite/gdb.base/chng-syms.exp
new file mode 100644
index 00000000000..b967d21614b
--- /dev/null
+++ b/gdb/testsuite/gdb.base/chng-syms.exp
@@ -0,0 +1,126 @@
+# Copyright 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# Author: Paul N. Hilfinger (Hilfinger@gnat.com)
+
+# Test that GDB cleans up properly after errors that result when a
+# breakpoint is reset.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# IDT/SIM apparently doesn't have enough file descriptors to allow the
+# problem checked by this test to occur.
+if [istarget "mips-idt-*"] {
+ return 0;
+}
+
+set testfile "chng-syms"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DVARIABLE=var1}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+set oldtimeout $timeout
+set timeout 10
+verbose "Timeout is now 10 seconds" 2
+
+proc expect_to_stop_here { ident } {
+ global gdb_prompt
+ global decimal
+
+ # the "at foo.c:36" output we get with -g.
+ # the "in func" output we get without -g.
+ gdb_expect {
+ -re "Breakpoint \[0-9\]*, stop_here .*$gdb_prompt $" {
+ return 1
+ }
+ -re "$gdb_prompt $" {
+ fail "running to stop_here $ident"
+ return 0
+ }
+ timeout {
+ fail "running to stop_here $ident (timeout)"
+ return 0
+ }
+ }
+ return 1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "break stop_here if (var1 == 42)" \
+ "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "setting conditional breakpoint on function"
+gdb_run_cmd
+
+expect_to_stop_here "first time"
+
+gdb_continue_to_end "breakpoint first time through"
+
+# Now we recompile the executable, but without a variable named "var1", first
+# waiting to insure that even on fast machines, the file modification times
+# are distinct. This will force GDB to reload the file on the
+# next "run" command, causing an error when GDB tries to tries to reset
+# the breakpoint.
+
+sleep 2
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DVARIABLE=var2}] != "" } {
+
+# Complication: Since GDB generally holds an open file descriptor on the
+# executable at this point, there are some systems in which the
+# re-compilation will fail. In such cases, we'll consider the test
+# (vacuously) passed providing that re-running it succeeds as before.
+
+ gdb_run_cmd
+ expect_to_stop_here "after re-compile fails"
+ gdb_continue_to_end "after re-compile fails"
+
+} else {
+
+ gdb_run_cmd
+ gdb_expect {
+ -re "Error in re-setting .*No symbol .var1..*Program exited normally.*$gdb_prompt $" {
+ pass "running with invalidated bpt condition after executable changes"
+ }
+ -re "Error in re-setting .*No symbol .var1..*Breakpoint .*,( 0x.* in)? exit .*$gdb_prompt $" {
+ pass "running with invalidated bpt condition after executable changes"
+ }
+ -re "$gdb_prompt $" {
+ fail "running with invalidated bpt condition after executable changes"
+ }
+ timeout {
+ fail "(timeout) running with invalidated bpt condition after executable changes"
+ }
+ }
+
+}
+
+set timeout $oldtimeout
+verbose "Timeout is now $timeout seconds" 2
+return 0
diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp
index d35353d6469..93ddd7ed9cb 100644
--- a/gdb/testsuite/gdb.base/commands.exp
+++ b/gdb/testsuite/gdb.base/commands.exp
@@ -1,5 +1,5 @@
# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1997, 1998, 1999, 2000,
-# 2001 Free Software Foundation, Inc.
+# 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -443,6 +443,11 @@ proc deprecated_command_test {} {
proc bp_deleted_in_command_test {} {
global gdb_prompt
+ if [target_info exists noargs] {
+ verbose "Skipping bp_deleted_in_command_test because of noargs."
+ return
+ }
+
gdb_test "set args 1" "" "set args in bp_deleted_in_command_test"
delete_breakpoints
@@ -504,6 +509,11 @@ proc bp_deleted_in_command_test {} {
proc temporary_breakpoint_commands {} {
global gdb_prompt
+ if [target_info exists noargs] {
+ verbose "Skipping temporary_breakpoint_commands because of noargs."
+ return
+ }
+
gdb_test "set args 1" "" "set args in temporary_breakpoint_commands"
delete_breakpoints
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index a1ff58a2554..1698a3056d3 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -38,8 +38,8 @@
# "info ajksdlfk " no completions
# "info" " "
# "info " ambiguous (all info commands)
-# "p \"break" unambiguous (completes to filename "break.c")
-# "p \"break." unambiguous (should complete to "break.c" but does not,
+# "p \"break1" unambiguous (completes to filename "break1.c")
+# "p \"break1." unambiguous (should complete to "break1.c" but does not,
# due to readline limitations)
# "p 'a" ambiguous (all symbols starting with a)
# "p b-a" ambiguous (all symbols starting with a)
@@ -64,9 +64,19 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [get_compiler_info ${binfile}] {
@@ -351,61 +361,61 @@ gdb_expect {
}
-send_gdb "p \"break\t"
+send_gdb "p \"break1\t"
sleep 1
gdb_expect {
- -re "^p \"break\\\x07$"\
+ -re "^p \"break1\\\x07$"\
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { fail "complete 'p \"break'"}
- timeout {fail "(timeout) complete 'p \"break'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1'"}
+ timeout {fail "(timeout) complete 'p \"break1'"}
}
}
- -re "^p \"break\\.c\"$"\
+ -re "^p \"break1\\.c\"$"\
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { pass "complete 'p \"break'"}
- timeout {fail "(timeout) complete 'p \"break'"}
+ -re ".*$gdb_prompt $" { pass "complete 'p \"break1'"}
+ timeout {fail "(timeout) complete 'p \"break1'"}
}
}
- -re "^p \"break.*$"
+ -re "^p \"break1.*$"
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { fail "complete 'p \"break'"}
- timeout {fail "(timeout) complete 'p \"break'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1'"}
+ timeout {fail "(timeout) complete 'p \"break1'"}
}
}
- -re ".*$gdb_prompt $" { fail "complete 'p \"break'" }
- timeout { fail "(timeout) complete 'p \"break'" }
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1'" }
+ timeout { fail "(timeout) complete 'p \"break1'" }
}
setup_xfail "*-*-*"
-send_gdb "p \"break.\t"
+send_gdb "p \"break1.\t"
sleep 1
gdb_expect {
- -re "^p \"break\\.\\\x07$"\
+ -re "^p \"break1\\.\\\x07$"\
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { fail "complete 'p \"break.'"}
- timeout {fail "(timeout) complete 'p \"break.'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1.'"}
+ timeout {fail "(timeout) complete 'p \"break1.'"}
}
}
- -re "^p \"break\\.c\"$"\
+ -re "^p \"break1\\.c\"$"\
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { pass "complete 'p \"break.'"}
- timeout {fail "(timeout) complete 'p \"break.'"}
+ -re ".*$gdb_prompt $" { pass "complete 'p \"break1.'"}
+ timeout {fail "(timeout) complete 'p \"break1.'"}
}
}
- -re "^p \"break\\..*$"
+ -re "^p \"break1\\..*$"
{ send_gdb "\n"
gdb_expect {
- -re ".*$gdb_prompt $" { fail "complete 'p \"break.'"}
- timeout {fail "(timeout) complete 'p \"break.'"}
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1.'"}
+ timeout {fail "(timeout) complete 'p \"break1.'"}
}
}
- -re ".*$gdb_prompt $" { fail "complete 'p \"break.'" }
- timeout { fail "(timeout) complete 'p \"break.'" }
+ -re ".*$gdb_prompt $" { fail "complete 'p \"break1.'" }
+ timeout { fail "(timeout) complete 'p \"break1.'" }
}
send_gdb "p 'a\t"
@@ -647,6 +657,15 @@ gdb_test "cd ${fullsrcdir}" \
"Working directory [string_to_regexp ${fullsrcdir}].*" \
"cd to \${srcdir}"
+send_gdb "complete file ./gdb.base/compl\n"
+sleep 1
+gdb_expect {
+ -re "file ./gdb.base/completion\\.exp.*$gdb_prompt $"
+ { pass "complete-command 'file ./gdb.base/compl'"}
+ -re ".*$gdb_prompt $" { fail "complete-command 'file ./gdb.base/compl'" }
+ timeout { fail "(timeout) complete-command 'file ./gdb.base/compl'" }
+}
+
send_gdb "file ./gdb.base/complet\t"
sleep 1
gdb_expect {
@@ -654,7 +673,6 @@ gdb_expect {
{ send_gdb "\n"
gdb_expect {
-re "\r\nA program is being debugged already\\. Kill it\\? \\(y or n\\) $"
-\
{ send_gdb "n\n"
gdb_expect {
-re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
@@ -682,7 +700,7 @@ gdb_expect {
-re "marker1.*$gdb_prompt info func marker$"\
{ send_gdb "\n"
gdb_expect {
- -re "All functions matching regular expression \"marker\":.*File.*break.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\
+ -re "All functions matching regular expression \"marker\":.*File.*break1.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\
{ pass "complete 'info func marke'"}
-re ".*$gdb_prompt $" { fail "complete 'info func marke'"}
timeout {fail "(timeout) complete 'info func marke'"}
@@ -700,10 +718,10 @@ gdb_expect {
send_gdb "set follow-fork-mode \t\t"
sleep 1
gdb_expect {
- -re "ask.*child.*parent.*$gdb_prompt set follow-fork-mode $"\
+ -re "child.*parent.*$gdb_prompt set follow-fork-mode $"\
{ send_gdb "\n"
gdb_expect {
- -re "Requires an argument.*ask.*child.*parent.*$gdb_prompt $"\
+ -re "Requires an argument.*child.*parent.*$gdb_prompt $"\
{ pass "complete 'set follow-fork-mode'"}
-re "Ambiguous item \"\"\\..*$gdb_prompt $"\
{ pass "complete 'set follow-fork-mode'"}
diff --git a/gdb/testsuite/gdb.base/complex.exp b/gdb/testsuite/gdb.base/complex.exp
index f3f25e561b7..fac7f4f45c8 100644
--- a/gdb/testsuite/gdb.base/complex.exp
+++ b/gdb/testsuite/gdb.base/complex.exp
@@ -48,7 +48,7 @@ gdb_load $binfile
if [runto f2] then {
get_debug_format
- if {$gcc_compiled == 2 && [test_debug_format "DWARF 2"]} then {
+ if { [test_compiler_info gcc-2-*] && [test_debug_format "DWARF 2"] } then {
setup_xfail "*-*-*"
}
gdb_test "p *y" "\\\$\[0-9\]* = \{c = 42 '\\*', f = 1 \\+ 0 \\* I\}" \
diff --git a/gdb/testsuite/gdb.base/condbreak.exp b/gdb/testsuite/gdb.base/condbreak.exp
index c234431f15f..dc4df21fc0c 100644
--- a/gdb/testsuite/gdb.base/condbreak.exp
+++ b/gdb/testsuite/gdb.base/condbreak.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
@@ -35,10 +35,19 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
if [get_compiler_info ${binfile}] {
@@ -55,6 +64,13 @@ if [target_info exists gdb_stub] {
gdb_step_for_stub;
}
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
+set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
+set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
+set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1]
+set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1]
+
#
# test break at function
#
@@ -66,15 +82,15 @@ gdb_test "break main" \
# test conditional break at function
#
gdb_test "break marker1 if 1==1" \
- "Breakpoint.*at.* file .*$srcfile, line.*"
+ "Breakpoint.*at.* file .*$srcfile1, line.*"
gdb_test "delete 2" ""
#
# test conditional break at line number
#
-gdb_test "break 79 if 1==1" \
- "Breakpoint.*at.* file .*$srcfile, line 79\\."
+gdb_test "break $srcfile:$bp_location1 if 1==1" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location1\\."
gdb_test "delete 3" ""
@@ -82,16 +98,16 @@ gdb_test "delete 3" ""
# test conditional break at function
#
gdb_test "break marker1 if (1==1)" \
- "Breakpoint.*at.* file .*$srcfile, line.*"
+ "Breakpoint.*at.* file .*$srcfile1, line.*"
#
# test conditional break at line number
#
-gdb_test "break 79 if (1==1)" \
- "Breakpoint.*at.* file .*$srcfile, line 79\\."
+gdb_test "break $srcfile:$bp_location1 if (1==1)" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location1\\."
gdb_test "break marker2 if (a==43)" \
- "Breakpoint.*at.* file .*$srcfile, line.*"
+ "Breakpoint.*at.* file .*$srcfile1, line.*"
#
# check to see what breakpoints are set
@@ -105,15 +121,14 @@ if {$hp_aCC_compiler} {
set marker2_proto ""
}
-set main_line 75
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile:4\[38\].*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location6.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile1:($bp_location15|$bp_location16).*
\[\t \]+stop only if 1 == 1.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
\[\t \]+stop only if 1 == 1.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile:4\[49\].*
+\[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile1:($bp_location8|$bp_location9).*
\[\t \]+stop only if a == 43.*" \
"breakpoint info"
@@ -128,7 +143,7 @@ rerun_to_main
#
# run until the breakpoint at a line number
#
-gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:79.*79\[\t \]+printf.*factorial.*" \
+gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location1.*$bp_location1\[\t \]+printf.*factorial.*" \
"run until breakpoint set at a line number"
#
@@ -173,10 +188,10 @@ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.
# Until the Dwarf2 writer gets fixed, I'm going to XFAIL its behavior.
send_gdb "continue\n"
gdb_expect {
- -re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*$gdb_prompt $" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile1:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" {
pass "run until breakpoint at marker1"
}
- -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*$gdb_prompt $" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile1:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" {
xfail "run until breakpoint at marker1"
}
-re "$gdb_prompt $" {
@@ -192,10 +207,10 @@ gdb_expect {
setup_xfail hppa2.0w-*-* 11512CLLbs
send_gdb "continue\n"
gdb_expect {
- -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile:4\[49\].*4\[49\]\[\t \]+.*" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*" {
pass "run until breakpoint at marker2"
}
- -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile:4\[49\].*4\[49\]\[\t \]+.*" {
+ -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*" {
xfail "run until breakpoint at marker2"
}
-re "$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp
index 8a6b60b3ed5..68732867d50 100644
--- a/gdb/testsuite/gdb.base/constvars.exp
+++ b/gdb/testsuite/gdb.base/constvars.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -48,23 +48,10 @@ if [get_compiler_info ${binfile}] {
return -1;
}
-if {$hp_aCC_compiler || $hp_cc_compiler} {
- set lang "c++"
-} else {
- set lang ""
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug $lang]] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug ] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info ${binfile}] {
- return -1;
-}
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
@@ -82,14 +69,17 @@ if ![runto_main] then {
get_debug_format
proc local_compiler_xfail_check { } {
- global gcc_compiled;
-
- if {$gcc_compiled == 2} then {
+ if { [test_compiler_info gcc-2-*] } then {
if { ![test_debug_format "HP"] \
&& ![test_debug_format "DWARF 2"] } then {
setup_xfail "*-*-*"
}
}
+
+ global hp_cc_compiler
+ if { $hp_cc_compiler } {
+ setup_xfail "hppa*-*-hpux*"
+ }
}
send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
@@ -128,7 +118,7 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
# test function parameters
local_compiler_xfail_check
-if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+if { [test_compiler_info gcc-3-*] && [test_debug_format "stabs"] } then {
# With stabs, even GCC 3 does not get the const char arguments correct.
setup_xfail "*-*-*"
}
@@ -144,8 +134,6 @@ gdb_expect {
# test vars and pointers
proc do_constvar_tests {} {
- global gcc_compiled
-
gdb_test "print lave" " = 66 'B'"
gdb_test "ptype lave" "type = char"
gdb_test "print lavish" " = 10 '\\\\n'"
@@ -285,7 +273,7 @@ proc do_constvar_tests {} {
gdb_test "ptype locust" "type = double \\* const"
local_compiler_xfail_check
- if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+ if { [test_compiler_info gcc-3-*] && [test_debug_format "stabs"] } then {
# With stabs, even GCC 3 does not get the constant structure member
# correct.
setup_xfail "*-*-*"
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index d059ef56b25..eb58ed259d3 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -222,29 +222,22 @@ gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp"
gdb_test "x/8bd buf1" ".*:.*0.*1.*2.*3.*4.*5.*6.*7" "accessing original mmap data in core file"
setup_xfail "*-*-sunos*" "*-*-ultrix*" "*-*-aix*"
-send_gdb "x/8bd buf2\n"
-gdb_expect {
+set test "accessing mmapped data in core file"
+gdb_test_multiple "x/8bd buf2" "$test" {
-re ".*:.*0.*1.*2.*3.*4.*5.*6.*7.*$gdb_prompt $" {
- pass "accessing mmapped data in core file"
+ pass "$test"
}
-re "0x\[f\]*:.*Cannot access memory at address 0x\[f\]*.*$gdb_prompt $" {
- fail "accessing mmapped data (mapping failed at runtime)"
+ fail "$test (mapping failed at runtime)"
}
-re "0x.*:.*Cannot access memory at address 0x.*$gdb_prompt $" {
- fail "accessing mmapped data (mapping address not found in core file)"
- }
- -re ".*$gdb_prompt $" {
- fail "accessing mmapped data (incorrect data found in core file)"
- }
- timeout {
- fail "accessing mmapped data (timeout)"
+ fail "$test (mapping address not found in core file)"
}
}
# test reinit_frame_cache
gdb_load ${binfile}
-setup_xfail "*-*-*" CLLbs17002
gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\).*" "up in corefile.exp (reinit)"
gdb_test "core" "No core file now."
diff --git a/gdb/testsuite/gdb.base/cvexpr.c b/gdb/testsuite/gdb.base/cvexpr.c
index 587120928e4..afbcd3172c3 100644
--- a/gdb/testsuite/gdb.base/cvexpr.c
+++ b/gdb/testsuite/gdb.base/cvexpr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -409,26 +409,26 @@ int main ()
use (&v_boolean2);
use (&v_misordered);
- use (v_char_func);
- use (v_signed_char_func);
- use (v_unsigned_char_func);
+ use (&v_char_func);
+ use (&v_signed_char_func);
+ use (&v_unsigned_char_func);
- use (v_short_func);
- use (v_signed_short_func);
- use (v_unsigned_short_func);
+ use (&v_short_func);
+ use (&v_signed_short_func);
+ use (&v_unsigned_short_func);
- use (v_int_func);
- use (v_signed_int_func);
- use (v_unsigned_int_func);
+ use (&v_int_func);
+ use (&v_signed_int_func);
+ use (&v_unsigned_int_func);
- use (v_long_func);
- use (v_signed_long_func);
- use (v_unsigned_long_func);
+ use (&v_long_func);
+ use (&v_signed_long_func);
+ use (&v_unsigned_long_func);
- use (v_long_long_func);
- use (v_signed_long_long_func);
- use (v_unsigned_long_long_func);
+ use (&v_long_long_func);
+ use (&v_signed_long_long_func);
+ use (&v_unsigned_long_long_func);
- use (v_float_func);
- use (v_double_func);
+ use (&v_float_func);
+ use (&v_double_func);
}
diff --git a/gdb/testsuite/gdb.base/define.exp b/gdb/testsuite/gdb.base/define.exp
index 06ea1c0f4f8..7e948f18e01 100644
--- a/gdb/testsuite/gdb.base/define.exp
+++ b/gdb/testsuite/gdb.base/define.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
@@ -34,10 +34,19 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit
@@ -45,6 +54,9 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
+
if ![runto_main] then { fail "define tests suppressed" }
# Verify that GDB allows a user to define their very own commands.
@@ -68,7 +80,7 @@ gdb_expect {
#
send_gdb "nextwhere\n"
gdb_expect {
- -re ".*79\[ \t\]*printf.*#0\[ \t\]*main.*:79.*$gdb_prompt $"\
+ -re ".*$bp_location1\[ \t\]*printf.*#0\[ \t\]*main.*:$bp_location1.*$gdb_prompt $"\
{pass "use user command: nextwhere"}
-re "$gdb_prompt $"\
{fail "use user command: nextwhere"}
@@ -224,7 +236,7 @@ gdb_expect {
send_gdb "next\n"
gdb_expect {
- -re "#0\[ \t\]*main.*:81.*$gdb_prompt $"\
+ -re "#0\[ \t\]*main.*:$bp_location11.*$gdb_prompt $"\
{pass "use hook-stop command"}
-re "$gdb_prompt $"\
{fail "use hook-stop command"}
diff --git a/gdb/testsuite/gdb.base/dump.c b/gdb/testsuite/gdb.base/dump.c
index 784edf6ac8b..bc68778ee7a 100644
--- a/gdb/testsuite/gdb.base/dump.c
+++ b/gdb/testsuite/gdb.base/dump.c
@@ -1,3 +1,5 @@
+#include <string.h>
+
#define ARRSIZE 32
int intarray[ARRSIZE], intarray2[ARRSIZE];
diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
index 0bc4472b366..5e88693889b 100644
--- a/gdb/testsuite/gdb.base/dump.exp
+++ b/gdb/testsuite/gdb.base/dump.exp
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -264,7 +264,7 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
# Run to main.
-if { ! [ runto main ] } then {
+if { ! [ runto_main ] } then {
gdb_suppress_entire_file "Program failed to run, so remaining tests in this file will automatically fail."
}
@@ -353,9 +353,9 @@ test_restore_saved_value "intstr2.bin binary $struct_start" \
set array2_start [capture_value "/x &intarray2\[0\]"]
set struct2_start [capture_value "/x &intstruct2"]
set array2_offset \
- [capture_value "/x (char *) &intarray2 - (char *) &intarray"]
+ [capture_value "(char *) &intarray2 - (char *) &intarray"]
set struct2_offset \
- [capture_value "/x (char *) &intstruct2 - (char *) &intstruct"]
+ [capture_value "(char *) &intstruct2 - (char *) &intstruct"]
gdb_test "print zero_all ()" ""
diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp
index 93f6707097c..b0e3c1de623 100644
--- a/gdb/testsuite/gdb.base/ena-dis-br.exp
+++ b/gdb/testsuite/gdb.base/ena-dis-br.exp
@@ -1,5 +1,4 @@
-# Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
-
+# Copyright 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
@@ -32,9 +31,18 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -43,6 +51,17 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
+set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
+set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
+set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
+set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
+set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1]
+set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1]
+set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile1]
+set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile1]
+
if ![runto_main] then { fail "enable/disable break tests suppressed" }
# Verify that we can set a breakpoint (the location is irrelevant),
@@ -50,7 +69,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" }
#
send_gdb "break marker1\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[38\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
{pass "break marker1"}
-re "$gdb_prompt $"\
{fail "break marker1"}
@@ -98,7 +117,7 @@ gdb_expect {
#
send_gdb "break marker2\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[49\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location8|$bp_location9).*$gdb_prompt $"\
{pass "break marker2"}
-re "$gdb_prompt $"\
{fail "break marker2"}
@@ -156,7 +175,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" }
send_gdb "break marker3\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line (45|50).*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location17|$bp_location18).*$gdb_prompt $"\
{pass "break marker3"}
-re "$gdb_prompt $"\
{fail "break marker3"}
@@ -181,7 +200,7 @@ gdb_expect {
send_gdb "continue\n"
gdb_expect {
- -re ".*marker3 .*:(45|50).*$gdb_prompt $"\
+ -re ".*marker3 .*:($bp_location17|$bp_location18).*$gdb_prompt $"\
{pass "continue to auto-deleted break marker3"}
-re "Breakpoint \[0-9\]*, marker3.*$gdb_prompt $"\
{fail "continue to auto-deleted break marker3"}
@@ -206,7 +225,7 @@ gdb_expect {
#
send_gdb "break marker4\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line (46|51).*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location14|$bp_location13).*$gdb_prompt $"\
{pass "break marker4"}
-re "$gdb_prompt $"\
{fail "break marker4"}
@@ -237,7 +256,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" }
send_gdb "break marker1\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[38\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
{pass "break marker1"}
-re "$gdb_prompt $"\
{fail "break marker1"}
@@ -328,7 +347,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" }
send_gdb "break marker1\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[38\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
{pass "break marker1"}
-re "$gdb_prompt $"\
{fail "break marker1"}
@@ -365,7 +384,7 @@ rerun_to_main
send_gdb "continue\n"
gdb_expect {
- -re ".*marker1 .*:4\[38\].*$gdb_prompt $"\
+ -re ".*marker1 .*:($bp_location15|$bp_location16).*$gdb_prompt $"\
{pass "continue to ignored & auto-deleted break marker1"}
-re "Breakpoint \[0-9\]*, marker1.*$gdb_prompt $"\
{fail "continue to ignored & auto-deleted break marker1"}
@@ -381,7 +400,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" }
send_gdb "break marker1\n"
gdb_expect {
- -re "Breakpoint (\[0-9\]*) at .*, line 4\[38\].*$gdb_prompt $"\
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location15|$bp_location16).*$gdb_prompt $"\
{pass "break marker1"}
-re "$gdb_prompt $"\
{fail "break marker1"}
@@ -423,9 +442,9 @@ gdb_expect {
#
if ![runto_main] then { fail "enable/disable break tests suppressed" }
-send_gdb "break 79\n"
+send_gdb "break $bp_location1\n"
gdb_expect {
- -re "Breakpoint \[0-9\]*.*, line 79.*$gdb_prompt $"\
+ -re "Breakpoint \[0-9\]*.*, line $bp_location1.*$gdb_prompt $"\
{pass "prepare to continue with ignore count"}
-re "$gdb_prompt $"\
{fail "prepare to continue with ignore count"}
@@ -442,7 +461,7 @@ gdb_expect {
send_gdb "next\n"
gdb_expect {
- -re ".*81\[ \t\]*marker1.*$gdb_prompt $"\
+ -re ".*$bp_location11\[ \t\]*marker1.*$gdb_prompt $"\
{pass "step after continue with ignore count"}
-re "$gdb_prompt $"\
{fail "step after continue with ignore count"}
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp
index 3960f0621d7..af32acd0673 100644
--- a/gdb/testsuite/gdb.base/ending-run.exp
+++ b/gdb/testsuite/gdb.base/ending-run.exp
@@ -202,6 +202,11 @@ gdb_expect {
-re ".*in __wrap__?main ().*$gdb_prompt $" {
pass "step out of main (status wrapper)"
}
+ -re "__setup_argv_for_main (.*).*$gdb_prompt $" {
+ # On sh, another wrapper function (start_l) exists, so
+ # another `next' is necessary.
+ gdb_test "next" ".*in start_l ().*" "step out of main (on sh)"
+ }
-re ".*$gdb_prompt $" { fail "step out of main (at end 2)" }
timeout {
fail "step out of main (hang or timeout on step at end 2)"
diff --git a/gdb/testsuite/gdb.base/environ.exp b/gdb/testsuite/gdb.base/environ.exp
index 55ff0a0b779..b00052ba00d 100644
--- a/gdb/testsuite/gdb.base/environ.exp
+++ b/gdb/testsuite/gdb.base/environ.exp
@@ -1,5 +1,4 @@
-# Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
-
+# Copyright 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -39,11 +38,19 @@ if ![istarget "hppa*-*-hpux*"] then {
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit
diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c
index 591b3b67588..c9ef71506a9 100644
--- a/gdb/testsuite/gdb.base/fileio.c
+++ b/gdb/testsuite/gdb.base/fileio.c
@@ -75,7 +75,7 @@ test_open ()
/* Test opening */
errno = 0;
- ret = open (FILENAME, O_CREAT | O_TRUNC | O_RDONLY, S_IWUSR | S_IRUSR);
+ ret = open (FILENAME, O_CREAT | O_TRUNC | O_RDWR, S_IWUSR | S_IRUSR);
printf ("open 1: ret = %d, errno = %d %s\n", ret, errno,
ret >= 0 ? "OK" : "");
if (ret >= 0)
@@ -103,7 +103,7 @@ test_open ()
close (ret);
/* Open for write but no write permission */
errno = 0;
- ret = open (NOWRITE, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR);
+ ret = open (NOWRITE, O_CREAT | O_RDONLY, S_IRUSR);
if (ret >= 0)
{
close (ret);
@@ -479,6 +479,9 @@ strerrno (int err)
#ifdef ENOTEMPTY
case ENOTEMPTY: return "ENOTEMPTY";
#endif
+#ifdef EBUSY
+ case EBUSY: return "EBUSY";
+#endif
default: return "E??";
}
}
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
index 98c64db8bca..2a717bff182 100644
--- a/gdb/testsuite/gdb.base/fileio.exp
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -1,4 +1,4 @@
-# Copyright 2002
+# Copyright 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -20,16 +20,11 @@
# This file was written by Corinna Vinschen <vinschen@redhat.com>
-if [target_info exists gdb,nointerrupts] {
- verbose "Skipping interrupt.exp because of nointerrupts."
+if [target_info exists gdb,nofileio] {
+ verbose "Skipping fileio.exp because of no fileio capabilities."
continue
}
-if [target_info exists gdb,noinferiorio] {
- verbose "Skipping interrupt.exp because of noinferiorio."
- return
-}
-
if $tracelevel then {
strace $tracelevel
}
@@ -221,9 +216,19 @@ gdb_test continue \
"Renaming a file to existing directory returns EISDIR"
send_gdb "tbreak 388\n" ; gdb_expect -re "$gdb_prompt $"
-gdb_test continue \
- "Continuing\\..*rename 3:.*(ENOTEMPTY|EEXIST).*test_rename \\(\\) at.*$srcfile:388.*" \
-"Renaming a directory to a non-empty directory returns ENOTEMPTY or EEXIST"
+set test "Renaming a directory to a non-empty directory returns ENOTEMPTY or EEXIST"
+gdb_test_multiple continue "${test}" {
+ -re "Continuing\\..*rename 3:.*(ENOTEMPTY|EEXIST).*test_rename \\(\\) at.*$srcfile:388.*$gdb_prompt $" {
+ pass "${test}"
+ }
+ -re "Continuing\\..*rename 3:.*EBUSY.*test_rename \\(\\) at.*$srcfile:388.*$gdb_prompt $" {
+ # At least version <= 2.6/2004-01-08 of the Linux Kernel gets
+ # this wrong (reporting EBUSY) when the file system is NFS
+ # mounted.
+ setup_xfail *-*-*linux* gdb/1502
+ fail "${test}"
+ }
+}
send_gdb "tbreak 393\n" ; gdb_expect -re "$gdb_prompt $"
gdb_test continue \
diff --git a/gdb/testsuite/gdb.base/finish.exp b/gdb/testsuite/gdb.base/finish.exp
index 064f26e39dc..88182333395 100644
--- a/gdb/testsuite/gdb.base/finish.exp
+++ b/gdb/testsuite/gdb.base/finish.exp
@@ -1,4 +1,4 @@
-# Copyright 2000 Free Software Foundation, Inc.
+# Copyright 2000, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -100,7 +100,7 @@ proc finish_void { } {
proc finish_tests { } {
global gdb_prompt
- if { ! [ runto main ] } then {
+ if { ! [ runto_main ] } then {
gdb_suppress_entire_file "Run to main failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index 6c80fbb07c3..01b0a998132 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -63,6 +63,8 @@ if { [istarget "alpha*-*-*"] } then {
gdb_test "info float" "f0.*f1.*f127.*" "info float"
} elseif [istarget "m68k-*-*"] then {
gdb_test "info float" "fp0.*fp1.*fp7.*" "info float"
+} elseif [istarget "s390*-*-*"] then {
+ gdb_test "info float" "fpc.*f0.*f1.*f15.*" "info float"
} elseif [istarget "sh*-*"] then {
# SH may or may not have an FPU
gdb_test_multiple "info float" "info float" {
diff --git a/gdb/testsuite/gdb.base/freebpcmd.c b/gdb/testsuite/gdb.base/freebpcmd.c
new file mode 100644
index 00000000000..765e12d2ca8
--- /dev/null
+++ b/gdb/testsuite/gdb.base/freebpcmd.c
@@ -0,0 +1,35 @@
+/* Test program for GDB crashes while doing bp commands that continue inferior.
+ Copyright 2003 Free Software Foundation, Inc.
+
+ This file is part of the gdb testsuite.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public 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
+main (int argc, char **argv)
+{
+ int i;
+
+#ifdef usestubs
+ set_debug_traps();
+ breakpoint();
+#endif
+
+ for (i = 0; i < 100; i++)
+ printf (">>> %d\n", i); /* euphonium */
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/freebpcmd.exp b/gdb/testsuite/gdb.base/freebpcmd.exp
new file mode 100644
index 00000000000..fed067f1d8d
--- /dev/null
+++ b/gdb/testsuite/gdb.base/freebpcmd.exp
@@ -0,0 +1,121 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+# This is a regression test for the following bug, as of 2003-12-12:
+#
+# Set a breakpoint which will be hit many times. Attach a complex set
+# of commands to it, including a "continue" command. Run the program,
+# so that the breakpoint is hit, its commands get executed, and the
+# program continues and hits the breakpoint again. You will see
+# messages like "warning: Invalid control type in command structure.",
+# or maybe GDB will crash.
+#
+# When the breakpoint is hit, bpstat_stop_status copies the
+# breakpoint's command tree to the bpstat. bpstat_do_actions then
+# calls execute_control_command to run the commands. The 'continue'
+# command invokes the following chain of calls:
+#
+# continue_command
+# -> clear_proceed_status
+# -> bpstat_clear
+# -> free_command_lines
+# -> frees the commands we are currently running.
+#
+# When control does eventually return to execute_control_command, GDB
+# continues to walk the tree of freed command nodes, resulting in the
+# error messages and / or crashes.
+#
+# Since this bug depends on storage being reused between the time that
+# we continue and the time that we fall back to bpstat_do_actions, the
+# reproduction recipe is more delicate than I would like. I welcome
+# suggestions for improving this.
+
+set prms_id 0
+set bug_id 0
+
+set testfile "freebpcmd"
+set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "break [gdb_get_line_number "euphonium"]" "" "set breakpoint"
+
+# The goal of all this is to make sure that there's plenty of memory
+# churn, and different amounts of it each time the inferior stops;
+# this seems to make GDB crash more reliably.
+set lines {{if (i%2) == 0}
+ {echo "even "}
+ {print i}
+ {else}
+ {echo "odd "}
+ {print i}
+ {end}
+ {set variable $foo = 0}
+ {set variable $j = 0}
+ {while $j < i}
+ {set variable $foo += $j}
+ {set variable $j++}
+ {end}
+ {print $foo}
+ {if i != 40}
+ {c}
+ {end}
+ {end}}
+
+send_gdb "commands\n"
+for {set i 0} {$i < [llength $lines]} {incr i} {
+ gdb_expect {
+ -re ".*>" {
+ send_gdb "[lindex $lines $i]\n"
+ }
+ -re "$gdb_prompt $" {
+ set reason "got top-level prompt early"
+ break
+ }
+ timeout {
+ set reason "timeout"
+ break
+ }
+ }
+}
+if {$i >= [llength $lines]} {
+ pass "send breakpoint commands"
+} else {
+ fail "send breakpoint commands ($reason)"
+}
+
+gdb_run_cmd
+gdb_test_multiple "" "run program with breakpoint commands" {
+ -re "warning: Invalid control type in command structure" {
+ kfail "gdb/1489" "run program with breakpoint commands"
+ }
+ -re "$gdb_prompt $" {
+ pass "run program with breakpoint commands"
+ }
+ eof {
+ kfail "gdb/1489" "run program with breakpoint commands (GDB died)"
+ }
+}
diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp
index 38949f1599c..f3284c01b95 100644
--- a/gdb/testsuite/gdb.base/funcargs.exp
+++ b/gdb/testsuite/gdb.base/funcargs.exp
@@ -1,5 +1,5 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003,
+# 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -162,7 +162,6 @@ proc float_and_integral_args {} {
global gdb_prompt
global det_file
global gcc_compiled
- global hp_cc_compiler
delete_breakpoints
@@ -178,8 +177,6 @@ proc float_and_integral_args {} {
# Run; should stop at call2a and print actual arguments.
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
- # The debug info. for "f" is not correct. It's a known bug.
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
gdb_run_cmd
gdb_expect {
-re ".* call2a \\(c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5\\) .*$gdb_prompt $" { pass "run to call2a" }
@@ -190,55 +187,46 @@ proc float_and_integral_args {} {
# Print each arg as a double check to see if we can print
gdb_test "print c" ".* = 97 'a'" "print c after run to call2a"
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
gdb_test "print f1" ".* = 4" "print f1 after run to call2a"
gdb_test "print s" ".* = 1" "print s after run to call2a"
gdb_test "print d1" ".* = 5" "print d1 after run to call2a"
gdb_test "print i" ".* = 2" "print i after run to call2a"
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
gdb_test "print f2" ".* = 4" "print f2 after run to call2a"
gdb_test "print l" ".* = 3" "print l after run to call2a"
gdb_test "print d2" ".* = 5" "print d2 after run to call2a"
setup_xfail "rs6000-*-*"
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix*" }
# Continue; should stop at call2b and print actual arguments.
if [gdb_test "cont" ".* call2b \\(f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a'\\) .*" "continue to call2b"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2c and print actual arguments.
if [gdb_test "cont" ".* call2c \\(s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4\\) .*" "continue to call2c"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2d and print actual arguments.
if [gdb_test "cont" ".* call2d \\(d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1\\) .*" "continue to call2d"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2e and print actual arguments.
if [gdb_test "cont" ".* call2e \\(i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5\\) .*" "continue to call2e"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2f and print actual arguments.
if [gdb_test "cont" ".* call2f \\(f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2\\) .*" "continue to call2f"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2g and print actual arguments.
if [gdb_test "cont" ".* call2g \\(l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4\\) .*" "continue to call2g"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2h and print actual arguments.
if [gdb_test "cont" ".* call2h \\(d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3\\) .*" "continue to call2h"] {
gdb_suppress_tests;
@@ -249,7 +237,6 @@ proc float_and_integral_args {} {
delete_breakpoints
gdb_breakpoint call2i
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2i and print actual arguments.
if [gdb_test "cont" ".* call2i \\(c1=97 'a', f1=4, c2=97 'a', c3=97 'a', d1=5, c4=97 'a', c5=97 'a', c6=97 'a', f2=4, s=1, c7=97 'a', d2=5\\) .*" "continue to call2i"] {
gdb_suppress_tests;
@@ -445,7 +432,6 @@ proc discard_and_shuffle {} {
global decimal
global det_file
global gcc_compiled
- global hp_cc_compiler
delete_breakpoints
@@ -474,8 +460,6 @@ proc discard_and_shuffle {} {
setup_xfail "mips-sgi-irix5*"
}
- # The debug info. for "f" is not correct. It's a known bug.
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
gdb_expect {
-re "backtrace 100\[\r\n\]+
@@ -505,7 +489,6 @@ $gdb_prompt $" {
gdb_continue call6b
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6b" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -520,7 +503,6 @@ $gdb_prompt $" {
gdb_continue call6c
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6c" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -535,7 +517,6 @@ $gdb_prompt $" {
gdb_continue call6d
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6d" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -552,7 +533,6 @@ $gdb_prompt $" {
gdb_continue call6e
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6e" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -570,7 +550,6 @@ $gdb_prompt $" {
gdb_continue call6f
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6f" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -589,7 +568,6 @@ $gdb_prompt $" {
gdb_continue call6g
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6g" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -609,7 +587,6 @@ $gdb_prompt $" {
gdb_continue call6h
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6h" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6h \\(us=6, ui=7, ul=8\\) "
@@ -637,7 +614,6 @@ $gdb_prompt $" {
gdb_continue call6i
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6i" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6i \\(ui=7, ul=8\\) "
@@ -659,7 +635,6 @@ $gdb_prompt $" {
gdb_continue call6j
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6j" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6j \\(ul=8\\) "
@@ -681,7 +656,6 @@ $gdb_prompt $" {
# Print backtrace.
gdb_continue call6k
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6k" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6k \\(\\) "
@@ -713,7 +687,6 @@ proc shuffle_round_robin {} {
global decimal
global det_file
global gcc_compiled
- global hp_cc_compiler
delete_breakpoints
@@ -739,8 +712,6 @@ proc shuffle_round_robin {} {
}
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
- # The debug info. for "f" is not correct. It's a known bug.
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
gdb_expect {
-re "backtrace 100\[\r\n\]+
@@ -1183,8 +1154,6 @@ gdb_load ${binfile}
if [istarget "mips*tx39-*"] {
set timeout 300
-} elseif [istarget "hppa*-hp-hpux*"] then {
- set timeout 240
} else {
set timeout 60
}
diff --git a/gdb/testsuite/gdb.base/gcore.exp b/gdb/testsuite/gdb.base/gcore.exp
index 8c0ae8eb5c4..33fcba4810e 100644
--- a/gdb/testsuite/gdb.base/gcore.exp
+++ b/gdb/testsuite/gdb.base/gcore.exp
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -61,7 +61,7 @@ gdb_expect {
}
}
-if { ! [ runto main ] } then {
+if { ! [ runto_main ] } then {
gdb_suppress_entire_file "Run to main failed, so all tests in this file will automatically fail."
}
@@ -106,9 +106,25 @@ set pre_corefile_extern_array \
set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
-gdb_test "gcore ${objdir}/${subdir}/gcore.test" \
- "Saved corefile ${escapedfilename}" \
- "save a corefile"
+gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
+ "save a corefile" \
+{
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
+ pass "save a corefile"
+ global core_supported
+ set core_supported 1
+ }
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
+ unsupported "save a corefile"
+ global core_supported
+ set core_supported 0
+ }
+}
+
+global core_supported
+if {!$core_supported} {
+ return -1
+}
# Now restart gdb and load the corefile.
gdb_exit
diff --git a/gdb/testsuite/gdb.base/gdb1056.exp b/gdb/testsuite/gdb.base/gdb1056.exp
new file mode 100644
index 00000000000..623f8370838
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb1056.exp
@@ -0,0 +1,48 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Test for PR gdb/1056.
+# 2003-10-18 Michael Chastain <mec@shout.net>
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+# test SIGFPE (such as division by 0) inside gdb itself
+
+set prms_id 0
+set bug_id 0
+
+gdb_start
+
+# When SIGFPE happens, the operating system may restart the
+# offending instruction after the signal handler returns,
+# rather than proceeding to the next instruction. This happens
+# on i686-pc-linux-gnu with a linux kernel. If gdb has a naive
+# signal handler that just returns, then it will restart the
+# broken instruction and gdb gets an endless stream of SIGFPE's
+# and makes no progress.
+#
+# On a broken gdb this test will just time out.
+
+gdb_test_multiple "print 1/0" "" {
+ -re ".*$gdb_prompt $" {
+ pass "print 1/0"
+ }
+ timeout {
+ kfail "gdb/1056" "print 1/0"
+ }
+}
diff --git a/gdb/testsuite/gdb.base/gdb1476.c b/gdb/testsuite/gdb.base/gdb1476.c
new file mode 100644
index 00000000000..c3f43760bf3
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb1476.c
@@ -0,0 +1,12 @@
+void x()
+{
+ void (*fp)() = 0;
+ fp();
+}
+
+int
+main()
+{
+ x();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/gdb1476.exp b/gdb/testsuite/gdb.base/gdb1476.exp
new file mode 100644
index 00000000000..b88b2de0652
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb1476.exp
@@ -0,0 +1,72 @@
+# Copyright 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@gnu.org
+
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Testcase for backtrace/gdb1476.
+
+set prms_id 0
+set bug_id 0
+
+set testfile "gdb1476"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+# If we can examine what's at memory address 0, it is possible that we
+# could also execute it. This could probably make us run away,
+# executing random code, which could have all sorts of ill effects,
+# especially on targets without an MMU. Don't run the tests in that
+# case.
+
+send_gdb "x 0\n"
+gdb_expect {
+ -re "0x0:.*Cannot access memory at address 0x0.*$gdb_prompt $" { }
+ -re "0x0:.*Error accessing memory address 0x0.*$gdb_prompt $" { }
+ -re ".*$gdb_prompt $" {
+ untested "Memory at address 0 is possibly executable"
+ return
+ }
+}
+
+gdb_test "continue" "Program received signal SIGSEGV.*" \
+ "continue to null pointer call"
+
+gdb_test "backtrace 10" \
+ "#0\[ \t\]*0x0* in .*\r\n#1\[ \t\]*$hex in x.*\r\n#2\[ \t\]*$hex in main.*" \
+ "backtrace from null pointer call"
diff --git a/gdb/config/mips/nm-irix6.h b/gdb/testsuite/gdb.base/gdb1555-main.c
index 301b62922db..de054f7c935 100644
--- a/gdb/config/mips/nm-irix6.h
+++ b/gdb/testsuite/gdb.base/gdb1555-main.c
@@ -1,6 +1,6 @@
-/* Definitions for native support of irix6.
+/* Test step/next in a shared library
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2004, Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,4 +19,11 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/nm-irix5.h"
+extern int hithere2 ();
+
+int
+main()
+{
+ hithere2();
+ return 0;
+}
diff --git a/gdb/config/mips/xm-irix6.h b/gdb/testsuite/gdb.base/gdb1555.c
index a8a4c68de54..62082615ceb 100644
--- a/gdb/config/mips/xm-irix6.h
+++ b/gdb/testsuite/gdb.base/gdb1555.c
@@ -1,6 +1,6 @@
-/* Definitions for irix6 hosting support.
+/* Test step/next in a shared library
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2004, Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,4 +19,10 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/xm-irix5.h"
+int hithere2()
+{
+ int a;
+ a = 21;
+ return a;
+}
+
diff --git a/gdb/testsuite/gdb.base/gdb1555.exp b/gdb/testsuite/gdb.base/gdb1555.exp
new file mode 100644
index 00000000000..8bea6329160
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb1555.exp
@@ -0,0 +1,119 @@
+# Copyright 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# Test stepping into and continuing on from a function in
+# a shared library (PR gdb/1555, was PR shlib/1280, shlib/1237).
+# Tested on ppc-yellowdog-linux (Yellow Dog Linux 3.0 3.2.2-2a)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile gdb1555-main
+set libfile gdb1555
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+remote_exec build "rm -f ${binfile}"
+
+# get the value of gcc_compiled
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object {debug}] != "" } {
+ return -1
+}
+
+# Build the shared libraries this test case needs.
+#
+
+if {$gcc_compiled == 0} {
+ if [istarget "hppa*-hp-hpux*"] then {
+ set additional_flags "additional_flags=+z"
+ } elseif { [istarget "mips-sgi-irix*"] } {
+ # Disable SGI compiler's implicit -Dsgi
+ set additional_flags "additional_flags=-Usgi"
+ } else {
+ # don't know what the compiler is...
+ set additional_flags ""
+ }
+} else {
+ if { ([istarget "powerpc*-*-aix*"]
+ || [istarget "rs6000*-*-aix*"]) } {
+ set additional_flags ""
+ } else {
+ set additional_flags "additional_flags=-fpic"
+ }
+}
+
+set additional_flags "$additional_flags -shared"
+if {[gdb_compile "${srcdir}/${subdir}/${libfile}.c" "${objdir}/${subdir}/${libfile}.so" executable [list debug $additional_flags "incdir=${objdir}"]] != ""} {
+ return -1
+}
+
+if { ($gcc_compiled
+&& ([istarget "powerpc*-*-aix*"]
+|| [istarget "rs6000*-*-aix*"] )) } {
+ set additional_flags "additional_flags=-L${objdir}/${subdir}"
+} elseif { [istarget "mips-sgi-irix*"] } {
+ set additional_flags "additional_flags=-rpath ${objdir}/${subdir}"
+} else {
+ set additional_flags ""
+}
+
+if {[gdb_compile "${objdir}/${subdir}/${testfile}.o ${objdir}/${subdir}/${libfile}.so" "${binfile}" executable [list debug $additional_flags]] != ""} {
+ return -1
+}
+
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ fail "Can't run to main"
+ return 0
+}
+
+# PR/1555 (was shlib 1280)
+set name "Step into shared lib function"
+gdb_test_multiple "s" $name \
+{
+ -re "hithere2 \\(\\) at.*${libfile}.c:25\r\n25.*a = 21;.*$gdb_prompt $" {
+ pass $name
+ }
+ -re "0x\[0-9a-f\]+ in .* \\(\\) from /lib/ld.so.1.*$gdb_prompt $" {
+ kfail "gdb/1555" $name
+ }
+}
+
+# PR/1555 (was shlib 1237)
+set name "Next while in a shared lib function"
+gdb_test_multiple "n" $name \
+{
+ -re "26.*return a;.*$gdb_prompt $" {
+ pass $name
+ }
+ -re "Single stepping until exit from function .*, \r\nwhich has no line number information.\r\n\r\nProgram exited normally.*$gdb_prompt $" {
+ kfail "gdb/1555" $name
+ }
+}
+
diff --git a/gdb/testsuite/gdb.base/huge.c b/gdb/testsuite/gdb.base/huge.c
index 419b92cc5b7..446bb180371 100644
--- a/gdb/testsuite/gdb.base/huge.c
+++ b/gdb/testsuite/gdb.base/huge.c
@@ -2,6 +2,8 @@
* Test GDB's ability to read a very large data object from target memory.
*/
+#include <string.h>
+
/* A value that will produce a target data object large enough to
crash GDB. 0x200000 is big enough on GNU/Linux, other systems may
need a larger number. */
diff --git a/gdb/testsuite/gdb.base/huge.exp b/gdb/testsuite/gdb.base/huge.exp
index fa50d0115ac..733ddeee7a3 100644
--- a/gdb/testsuite/gdb.base/huge.exp
+++ b/gdb/testsuite/gdb.base/huge.exp
@@ -1,4 +1,4 @@
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright 2001, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@ gdb_load ${binfile}
set timeout 30
-if { ! [ runto main ] } then {
+if { ! [ runto_main ] } then {
gdb_suppress_entire_file "Run to main failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/info-proc.exp b/gdb/testsuite/gdb.base/info-proc.exp
index 2a9a4b09a3d..fc68601621c 100644
--- a/gdb/testsuite/gdb.base/info-proc.exp
+++ b/gdb/testsuite/gdb.base/info-proc.exp
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,12 +27,22 @@ if $tracelevel then {
set prms_id 0
set bug_id 0
-set testfile "break"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
set ws "\[ \t\]+"
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+set testfile "break"
+set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -64,7 +74,7 @@ gdb_expect {
gdb_test "info proc" "No current process.*" "info proc without a process"
-if { ! [ runto main ] } then {
+if { ! [ runto_main ] } then {
gdb_suppress_entire_file "Run to main failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/langs.exp b/gdb/testsuite/gdb.base/langs.exp
index 8006bbfd788..49b9c5d5adf 100644
--- a/gdb/testsuite/gdb.base/langs.exp
+++ b/gdb/testsuite/gdb.base/langs.exp
@@ -65,8 +65,15 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $binfile
-gdb_test "b langs0" "Function \"langs0\" not defined\.|Breakpoint .* (deferred).*" \
- "break on nonexistent function in langs.exp"
+gdb_test_multiple "b langs0" "break on nonexistent function in langs.exp" {
+ -re "Function \"langs0\" not defined\..*Make breakpoint pending on future shared library load.*y or .n.. $" {
+
+ gdb_test "n" "" "break on nonexistent function in langs.exp"
+ }
+ -re "Breakpoint .* (deferred).*$gdb_prompt $" {
+ pass "break on nonexistent function in langs.exp"
+ }
+}
if {$hp_aCC_compiler} {
set isfixed 1
diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp
index 84a15cfacbe..b38995c94a0 100644
--- a/gdb/testsuite/gdb.base/list.exp
+++ b/gdb/testsuite/gdb.base/list.exp
@@ -222,7 +222,6 @@ proc test_list_filename_and_number {} {
proc test_list_function {} {
global gdb_prompt
- global gcc_compiled
# gcc appears to generate incorrect debugging information for code
# in include files, which breaks this test.
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index f82bf0202b0..53d58251883 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -65,10 +65,19 @@ set bug_id 0
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != ""
- } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -182,6 +191,11 @@ gdb_expect {
send_gdb "maint print statistics\n"
gdb_expect {
-re "Statistics for.*break.*Number of \"minimal\" symbols read.*Number of \"partial\" symbols read.*Number of \"types\" defined.*Number of psym tables \\(not yet expanded\\).*Number of symbol tables.*Number of symbol tables with line tables.*Number of symbol tables with blockvectors.*Total memory used for psymbol obstack.*Total memory used for psymbol cache.*Total memory used for symbol obstack.*Total memory used for type obstack.*$gdb_prompt $"\
+ {
+ # Old output for gdb 6.0 and earlier
+ pass "maint print statistics"
+ }
+ -re "Statistics for.*break.*Number of \"minimal\" symbols read.*Number of \"partial\" symbols read.*Number of \"types\" defined.*Number of psym tables \\(not yet expanded\\).*Number of symbol tables.*Number of symbol tables with line tables.*Number of symbol tables with blockvectors.*Total memory used for objfile obstack.*Total memory used for psymbol cache.*Total memory used for macro cache.*$gdb_prompt $"\
{ pass "maint print statistics" }
-re ".*$gdb_prompt $" { fail "maint print statistics" }
timeout { fail "(timeout) maint print statistics" }
@@ -391,6 +405,7 @@ gdb_expect {
-re ".*bss.*$gdb_prompt $" { fail "maint info sections .text" }
-re ".*data.*$gdb_prompt $" { fail "maint info sections .text" }
-re ".* .text .*$gdb_prompt $" { pass "maint info sections .text" }
+ -re ".*$gdb_prompt $" { fail "maint info sections .text" }
timeout { fail "(timeout) maint info sections .text" }
}
@@ -400,6 +415,7 @@ send_gdb "maint info sections CODE\n"
gdb_expect {
-re ".* .data .*$gdb_prompt $" { fail "maint info sections CODE" }
-re ".* .text .*$gdb_prompt $" { pass "maint info sections CODE" }
+ -re ".*$gdb_prompt $" { fail "maint info sections CODE" }
timeout { fail "(timeout) maint info sections CODE" }
}
@@ -409,14 +425,17 @@ send_gdb "maint info sections DATA\n"
gdb_expect {
-re ".* .text .*$gdb_prompt $" { fail "maint info sections DATA" }
-re ".* .data .*$gdb_prompt $" { pass "maint info sections DATA" }
+ -re ".*$gdb_prompt $" { fail "maint info sections DATA" }
timeout { fail "(timeout) maint info sections DATA" }
}
+set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
+
send_gdb "maint info breakpoints\n"
gdb_expect {
- -re "Num\[ \t\]+Type\[ \t\]+Disp\[ \t\]+Enb\[ \t\]+Address\[ \t\]+What\r\n1\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex\[ \t\]+in main at.*break.c:75\r\n\[ \t\]+breakpoint already hit 1 time\r\n.*$gdb_prompt $"\
+ -re "Num\[ \t\]+Type\[ \t\]+Disp\[ \t\]+Enb\[ \t\]+Address\[ \t\]+What\r\n1\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex\[ \t\]+in main at.*break.c:$bp_location6\r\n\[ \t\]+breakpoint already hit 1 time\r\n.*$gdb_prompt $"\
{ pass "maint info breakpoints" }
- -re "Num\[ \t\]+Type\[ \t\]+Disp\[ \t\]+Enb\[ \t\]+Address\[ \t\]+What\r\n1\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex in main at.*break.c:75\r\n\[ \t\]+breakpoint already hit 1 time\r\n-1\[ \t\]+shlib events\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex.*breakpoint already hit.*$gdb_prompt $"\
+ -re "Num\[ \t\]+Type\[ \t\]+Disp\[ \t\]+Enb\[ \t\]+Address\[ \t\]+What\r\n1\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex in main at.*break.c:$bp_location6\r\n\[ \t\]+breakpoint already hit 1 time\r\n-1\[ \t\]+shlib events\[ \t\]+keep\[ \t\]+y\[ \t\]+$hex.*breakpoint already hit.*$gdb_prompt $"\
{ pass "maint info breakpoints (with shlib events)" }
-re ".*$gdb_prompt $" { fail "maint info breakpoints" }
timeout { fail "(timeout) maint info breakpoints" }
@@ -650,34 +669,22 @@ gdb_expect {
}
send_gdb "maint internal-error\n"
-gdb_expect {
- -re "Quit this debugging session.*\\(y or n\\) $" {
- send_gdb "n\n"
- gdb_expect {
- -re "Create a core file.*\\(y or n\\) $" {
- send_gdb "n\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {
- pass "maint internal-error"
- }
- timeout {
- fail "(timeout) maint internal-error"
- }
- }
- }
- -re ".*$gdb_prompt $" {
- fail "maint internal-error"
- }
- timeout {
- fail "(timeout) maint internal-error"
- }
+gdb_expect {
+ -re "A problem internal to GDB has been detected" {
+ pass "maint internal-error"
+ if [gdb_internal_error_resync] {
+ pass "internal-error resync"
+ } else {
+ fail "internal-error resync"
}
}
-re ".*$gdb_prompt $" {
fail "maint internal-error"
+ untested "internal-error resync"
}
timeout {
- fail "(timeout) maint internal-error"
+ fail "maint internal-error (timeout)"
+ untested "internal-error resync"
}
}
diff --git a/gdb/testsuite/gdb.base/mips_pro.exp b/gdb/testsuite/gdb.base/mips_pro.exp
index a860e6335d0..53ea9fdee21 100644
--- a/gdb/testsuite/gdb.base/mips_pro.exp
+++ b/gdb/testsuite/gdb.base/mips_pro.exp
@@ -37,7 +37,7 @@ if [get_compiler_info ${binfile}] {
# This test must be compiled with -O2 if using gcc.
-if {$gcc_compiled} then {
+if { [test_compiler_info gcc-*-*] } then {
if { [gdb_compile "${srcdir}/$subdir/${srcfile}" "${binfile}" executable {debug additional_flags=-O2}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -56,7 +56,7 @@ if [runto middle] then {
# PR 3016
# warning: Hit heuristic-fence-post without finding
# warning: enclosing function for pc 0x1006ead0
- if {$gcc_compiled} then {
+ if { [test_compiler_info gcc-*-*] } then {
setup_xfail "mips*-sgi-irix4*" "mips64*-*-elf"
}
# The call chain is main -> top -> middle. But gcc can optimize a tail
diff --git a/gdb/testsuite/gdb.base/nodebug.exp b/gdb/testsuite/gdb.base/nodebug.exp
index 836ff8637e1..ba1fbe86ccf 100644
--- a/gdb/testsuite/gdb.base/nodebug.exp
+++ b/gdb/testsuite/gdb.base/nodebug.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1999 Free Software Foundation, Inc.
+# Copyright 1997, 1999, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -39,8 +39,6 @@ if [get_compiler_info ${binfile}] {
return -1;
}
-source ${binfile}.ci
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
@@ -67,7 +65,7 @@ if [runto inner] then {
# even without -g, which should be accepted.
# Irix5, even though it is ELF, counts as "ecoff" because it
# encapsulates ecoff debugging info in a .mdebug section.
- # Irix6 gcc omits no debug info at all for static functions and
+ # Irix6 gcc emits no debug info at all for static functions and
# variables, so all tests involving statics fail.
if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix5*" "mips-sgi-irix6*" }
diff --git a/gdb/testsuite/gdb.base/pc-fp.exp b/gdb/testsuite/gdb.base/pc-fp.exp
index f94e3314388..c7daf6f08a4 100644
--- a/gdb/testsuite/gdb.base/pc-fp.exp
+++ b/gdb/testsuite/gdb.base/pc-fp.exp
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -65,7 +65,7 @@ proc get_valueofx { fmt exp default } {
pass "get value of ${exp} ($val)"
}
timeout {
- set size ${default}
+ set val ${default}
fail "get value of ${exp} (timeout)"
}
}
diff --git a/gdb/testsuite/gdb.base/pending.c b/gdb/testsuite/gdb.base/pending.c
new file mode 100644
index 00000000000..a83a451b94e
--- /dev/null
+++ b/gdb/testsuite/gdb.base/pending.c
@@ -0,0 +1,35 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+#include <stdio.h>
+
+int k = 0;
+
+extern void pendfunc (int x);
+
+int main()
+{
+ pendfunc (3); /* break main here */
+ pendfunc (4);
+ k = 1;
+ pendfunc (3);
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/pending.exp b/gdb/testsuite/gdb.base/pending.exp
new file mode 100644
index 00000000000..315e544ee74
--- /dev/null
+++ b/gdb/testsuite/gdb.base/pending.exp
@@ -0,0 +1,266 @@
+# Copyright 2003, 2004
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was created by Jeff Johnston. (jjohnstn@redhat.com)
+# The shared library compilation portion was copied from shlib-call.exp which was
+# written by Elena Zannoni (ezannoni@redhat.com).
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+# are we on a target board?
+if ![isnative] then {
+ return 0
+}
+
+set testfile "pending"
+set libfile "pendshr"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Build the shared libraries this test case needs.
+#
+
+if {$gcc_compiled == 0} {
+ if [istarget "hppa*-hp-hpux*"] then {
+ set additional_flags "additional_flags=+z"
+ } elseif { [istarget "mips-sgi-irix*"] } {
+ # Disable SGI compiler's implicit -Dsgi
+ set additional_flags "additional_flags=-Usgi"
+ } else {
+ # don't know what the compiler is...
+ set additional_flags ""
+ }
+} else {
+ if { ([istarget "powerpc*-*-aix*"]
+ || [istarget "rs6000*-*-aix*"]) } {
+ set additional_flags ""
+ } else {
+ set additional_flags "additional_flags=-fpic"
+ }
+}
+
+if {[gdb_compile "${srcdir}/${subdir}/${libfile}.c" "${objdir}/${subdir}/${libfile}.o" object [list debug $additional_flags]] != ""} {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [istarget "hppa*-*-hpux*"] {
+ remote_exec build "ld -b ${objdir}/${subdir}/${libfile}.o -o ${objdir}/${subdir}/${libfile}.sl"
+} else {
+ set additional_flags "additional_flags=-shared"
+ if {[gdb_compile "${objdir}/${subdir}/${libfile}.o" "${objdir}/${subdir}/${libfile}.sl" executable [list debug $additional_flags]] != ""} {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+}
+
+if { ($gcc_compiled
+ && ([istarget "powerpc*-*-aix*"]
+ || [istarget "rs6000*-*-aix*"] )) } {
+ set additional_flags "additional_flags=-L${objdir}/${subdir}"
+} elseif { [istarget "mips-sgi-irix*"] } {
+ set additional_flags "additional_flags=-rpath ${objdir}/${subdir}"
+} else {
+ set additional_flags ""
+}
+if {[gdb_compile "${objdir}/${subdir}/${testfile}.o ${objdir}/${subdir}/${libfile}.sl" "${binfile}" executable [list debug $additional_flags]] != ""} {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if [target_info exists gdb_stub] {
+ gdb_step_for_stub;
+}
+#
+# Test setting, querying, and modifying pending breakpoints
+#
+
+gdb_test_multiple "break pendfunc1" "set pending breakpoint" {
+ -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
+ gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoint"
+ }
+}
+
+gdb_test "info break" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*" \
+"single pending breakpoint info"
+
+#
+# Test breaking at existing function
+#
+
+set mainline [gdb_get_line_number "break main here"]
+
+gdb_test "break main" \
+ "Breakpoint.*at.* file .*$srcfile, line $mainline.*" \
+ "breakpoint function"
+
+gdb_test "info break" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \
+"pending plus real breakpoint info"
+
+
+#
+# Test not setting a pending breakpoint
+#
+gdb_test_multiple "break pendfunc2" "Don't set pending breakpoint" {
+ -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
+ gdb_test "n" "" "Don't set pending breakpoint"
+ }
+}
+
+#
+# Add condition to pending breakpoint
+#
+
+gdb_test "condition 1 k == 1" ""
+
+gdb_test "info break" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*
+\[\t \]+stop only if k == 1.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \
+"pending plus condition"
+
+#
+# Disable pending breakpoint
+#
+
+gdb_test "disable 1" ""
+
+gdb_test "info break" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.*
+\[\t \]+stop only if k == 1.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \
+"pending disabled"
+
+#
+# Add commands to pending breakpoint
+#
+gdb_test "commands 1\nprint k\nend" "" \
+ "Set commands for pending breakpoint"
+
+gdb_test "info break" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.*
+\[\t \]+stop only if k == 1.*
+\[\t \]+print k.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \
+"pending disabled plus commands"
+
+#
+# Try a pending break for a line in a source file with a condition
+#
+
+gdb_test_multiple "break pendshr.c:26 if x > 3" "Set pending breakpoint 2" {
+ -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
+ gdb_test "y" "Breakpoint.*pendshr.c:26.*pending." \
+ "Set pending breakpoint 2"
+ }
+}
+
+gdb_test "info break" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.*
+\[\t \]+stop only if k == 1.*
+\[\t \]+print k.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:26 if x > 3.*" \
+"multiple pending breakpoints"
+
+#
+# Run to main which should resolve a pending breakpoint
+#
+
+gdb_test "run" \
+"Breakpoint.*at.*
+Pending breakpoint \"pendshr.c:26 if x > 3\" resolved.*
+Breakpoint.*, main.*$mainline.*" \
+"running to main"
+
+#
+# Re-enable the first pending breakpoint which should resolve
+#
+
+gdb_test "enable 1" \
+"Breakpoint.*at.*
+Pending breakpoint \"pendfunc1.* resolved.*" \
+"re-enabling pending breakpoint that can resolve instantly"
+
+#
+# Continue to verify conditionals and commands for breakpoints are honored
+#
+
+gdb_test "continue" \
+".*Breakpoint.*pendfunc1.*at.*pendshr.c:26.*4;" \
+"continue to resolved breakpoint 2"
+
+gdb_test "continue" \
+".*Breakpoint.*pendfunc1.*at.*pendshr.c:26.*
+\[$\]1 = 1." \
+"continue to resolved breakpoint 1"
+
+delete_breakpoints
+
+gdb_breakpoint "main"
+
+#
+# Set non-existent pending breakpoint
+#
+gdb_test_multiple "break imaginary" "set imaginary pending breakpoint" {
+ -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
+ gdb_test "y" "Breakpoint.*imaginary.*pending." \
+ "set imaginary pending breakpoint"
+ }
+}
+
+#
+# rerun program and make sure that any pending breakpoint remains and no
+# error messages are issued for the missing function
+#
+
+rerun_to_main
+gdb_test "info break" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*imaginary.*" \
+"verify pending breakpoint after restart"
diff --git a/gdb/testsuite/gdb.base/pendshr.c b/gdb/testsuite/gdb.base/pendshr.c
new file mode 100644
index 00000000000..672fe8ab7ee
--- /dev/null
+++ b/gdb/testsuite/gdb.base/pendshr.c
@@ -0,0 +1,33 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+#include <stdio.h>
+
+void pendfunc1 (int x)
+{
+ int y = x + 4;
+ printf ("in pendfunc1, x is %d\n", x);
+}
+
+void pendfunc (int x)
+{
+ pendfunc1 (x);
+}
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index 8f3ba89eb99..e532d71de09 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -1,5 +1,7 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2003 Free
-# Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +18,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
+# bug-gdb@gnu.org
# This file was written by Fred Fish. (fnf@cygnus.com)
@@ -161,7 +163,7 @@ proc test_print_all_chars {} {
gdb_test "p ctable1\[24\]" " = 24 '\\\\030'"
gdb_test "p ctable1\[25\]" " = 25 '\\\\031'"
gdb_test "p ctable1\[26\]" " = 26 '\\\\032'"
- gdb_test "p ctable1\[27\]" " = 27 '\\\\e'"
+ gdb_test "p ctable1\[27\]" " = 27 '\\\\033'"
gdb_test "p ctable1\[28\]" " = 28 '\\\\034'"
gdb_test "p ctable1\[29\]" " = 29 '\\\\035'"
gdb_test "p ctable1\[30\]" " = 30 '\\\\036'"
@@ -479,7 +481,7 @@ proc test_print_strings {} {
gdb_test "p &ctable1\[2*8\]" \
" = \\(unsigned char \\*\\) \"\\\\020\\\\021\\\\022\\\\023\\\\024\\\\025\\\\026\\\\027\"..."
gdb_test "p &ctable1\[3*8\]" \
- " = \\(unsigned char \\*\\) \"\\\\030\\\\031\\\\032\\\\e\\\\034\\\\035\\\\036\\\\037\"..."
+ " = \\(unsigned char \\*\\) \"\\\\030\\\\031\\\\032\\\\033\\\\034\\\\035\\\\036\\\\037\"..."
gdb_test "p &ctable1\[4*8\]" \
" = \\(unsigned char \\*\\) \" !\\\\\"#\\\$%&'\"..."
gdb_test "p &ctable1\[5*8\]" \
diff --git a/gdb/testsuite/gdb.base/relocate.c b/gdb/testsuite/gdb.base/relocate.c
index df8545dc62e..90e70ffe8b6 100644
--- a/gdb/testsuite/gdb.base/relocate.c
+++ b/gdb/testsuite/gdb.base/relocate.c
@@ -3,7 +3,7 @@ static int static_bar = 2;
/* This padding is just for the benefit of the test harness. It
causes the globals to have different addresses than the functions. */
-int dummy[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+int dummy[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
int global_foo = 3;
int global_bar = 4;
diff --git a/gdb/testsuite/gdb.base/return2.exp b/gdb/testsuite/gdb.base/return2.exp
index c87d9e46935..050ccf9fa77 100644
--- a/gdb/testsuite/gdb.base/return2.exp
+++ b/gdb/testsuite/gdb.base/return2.exp
@@ -1,4 +1,4 @@
-# Copyright 2000, 2001 Free Software Foundation, Inc.
+# Copyright 2000, 2001, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -100,7 +100,7 @@ proc return_void { } {
proc return2_tests { } {
global gdb_prompt
- if { ! [ runto main ] } then {
+ if { ! [ runto_main ] } then {
gdb_suppress_entire_file "Run to main failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp
index db2c7ea9f91..3749d2348b8 100644
--- a/gdb/testsuite/gdb.base/scope.exp
+++ b/gdb/testsuite/gdb.base/scope.exp
@@ -1,5 +1,5 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002 Free
-# Software Foundation, Inc.
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003,
+# 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -59,7 +59,6 @@ proc test_at_main {} {
global det_file
global srcdir
global subdir
- global gcc_compiled
global hp_cc_compiler
# skip past init. There may be a call to __main at the start of
@@ -97,13 +96,13 @@ proc test_at_main {} {
# No clue why the powerpc fails this test.
setup_xfail "powerpc-*-*"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print filelocal_ro" "\\\$$decimal = 201" "print filelocal_ro in test_at_main" ] {
gdb_suppress_tests ;
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
setup_xfail "powerpc-*-*"
if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
gdb_suppress_tests ;
@@ -112,8 +111,7 @@ proc test_at_main {} {
# Print scope1.c::filelocal, which is 2
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
- if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
gdb_suppress_tests ;
}
@@ -121,8 +119,7 @@ proc test_at_main {} {
# Print scope1.c::filelocal_bss, which is 102
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
- if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] {
gdb_suppress_tests ;
}
@@ -130,7 +127,7 @@ proc test_at_main {} {
# Print scope1.c::filelocal_ro, which is 202
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] {
gdb_suppress_tests ;
@@ -144,7 +141,7 @@ proc test_at_main {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] {
gdb_suppress_tests ;
}
@@ -157,7 +154,7 @@ proc test_at_main {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] {
gdb_suppress_tests ;
}
@@ -170,7 +167,7 @@ proc test_at_main {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] {
gdb_suppress_tests ;
}
@@ -184,7 +181,6 @@ proc test_at_foo {} {
global det_file
global srcdir
global subdir
- global gcc_compiled
if [gdb_test "next" ".*bar \\(\\);" "" ] {
gdb_suppress_tests ;
@@ -207,7 +203,7 @@ proc test_at_foo {} {
# Print scope0.c::filelocal_ro, which is 201
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
setup_xfail "powerpc-*-*"
if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
gdb_suppress_tests ;
@@ -218,7 +214,7 @@ proc test_at_foo {} {
# Print scope1.c::filelocal, which is 2
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
gdb_suppress_tests ;
}
@@ -227,14 +223,14 @@ proc test_at_foo {} {
gdb_test "print filelocal_bss" "\\\$$decimal = 102" \
"print filelocal_bss at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"
gdb_test "print filelocal_ro" "\\\$$decimal = 202" \
"print filelocal_ro at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"
@@ -245,7 +241,7 @@ proc test_at_foo {} {
gdb_test "print foo::funclocal" "\\\$$decimal = 3" \
"print foo::funclocal at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"
@@ -257,7 +253,7 @@ proc test_at_foo {} {
gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" \
"print foo::funclocal_bss at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss"
@@ -269,7 +265,7 @@ proc test_at_foo {} {
gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" \
"print foo::funclocal_ro at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"
@@ -278,7 +274,7 @@ proc test_at_foo {} {
gdb_test "print bar::funclocal" "\\\$$decimal = 4" \
"print bar::funclocal at foo"
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"
gdb_stop_suppressing_tests;
@@ -290,7 +286,6 @@ proc test_at_bar {} {
global det_file
global srcdir
global subdir
- global gcc_compiled
if [gdb_test "next" ".*" "" ] {
gdb_suppress_tests ;
@@ -313,7 +308,7 @@ proc test_at_bar {} {
# Print scope0.c::filelocal_ro, which is 201
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
setup_xfail "powerpc-*-*"
if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro at bar" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] {
gdb_suppress_tests ;
@@ -327,7 +322,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
gdb_suppress_tests ;
}
@@ -340,7 +335,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] {
gdb_suppress_tests ;
}
@@ -353,7 +348,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] {
gdb_suppress_tests ;
}
@@ -366,7 +361,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] {
gdb_suppress_tests ;
}
@@ -379,7 +374,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss"] {
gdb_suppress_tests ;
}
@@ -392,7 +387,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] {
gdb_suppress_tests ;
}
@@ -410,7 +405,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] {
gdb_suppress_tests ;
}
@@ -428,7 +423,7 @@ proc test_at_bar {} {
}
- if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
if [gdb_test "print 'scope1.c'::bar::funclocal_bss" "\\\$$decimal = 104" "print 'scope1.c'::bar::funclocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal_bss"] {
gdb_suppress_tests ;
}
diff --git a/gdb/testsuite/gdb.base/sect-cmd.exp b/gdb/testsuite/gdb.base/sect-cmd.exp
index 10c0e74959a..0b86b79a90d 100644
--- a/gdb/testsuite/gdb.base/sect-cmd.exp
+++ b/gdb/testsuite/gdb.base/sect-cmd.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -40,9 +40,19 @@ if ![istarget "hppa*-*-hpux*"] then {
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit
diff --git a/gdb/testsuite/gdb.base/selftest.exp b/gdb/testsuite/gdb.base/selftest.exp
index 9e1d4ddfb60..4196b74e786 100644
--- a/gdb/testsuite/gdb.base/selftest.exp
+++ b/gdb/testsuite/gdb.base/selftest.exp
@@ -95,6 +95,9 @@ proc do_steps_and_nexts {} {
set command "next"
}
-re ".*START_PROGRESS.*$gdb_prompt $" {
+ # Note: ezannoni/2004/02/17: This check should be
+ # removed, since as of today that source line is not
+ # in gdb anymore.
set description "next over START_PROGRESS and everything it calls"
set command "next"
}
@@ -342,6 +345,11 @@ proc test_with_self { executable } {
send_gdb "step\n"
exp_continue
}
+ -re ".*cmdarg = .* xmalloc.*$gdb_prompt $" {
+ set stepped_back 1
+ send_gdb "step\n"
+ exp_continue
+ }
-re "dirsize = 1;.*$gdb_prompt $" {
set stepped_back 1
send_gdb "step\n"
diff --git a/gdb/testsuite/gdb.base/sepdebug.c b/gdb/testsuite/gdb.base/sepdebug.c
new file mode 100644
index 00000000000..adb69210a88
--- /dev/null
+++ b/gdb/testsuite/gdb.base/sepdebug.c
@@ -0,0 +1,150 @@
+/* Copyright 1994, 1995, 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+#ifdef vxworks
+
+# include <stdio.h>
+
+/* VxWorks does not supply atoi. */
+static int
+atoi (z)
+ char *z;
+{
+ int i = 0;
+
+ while (*z >= '0' && *z <= '9')
+ i = i * 10 + (*z++ - '0');
+ return i;
+}
+
+/* I don't know of any way to pass an array to VxWorks. This function
+ can be called directly from gdb. */
+
+vxmain (arg)
+char *arg;
+{
+ char *argv[2];
+
+ argv[0] = "";
+ argv[1] = arg;
+ main (2, argv, (char **) 0);
+}
+
+#else /* ! vxworks */
+# include <stdio.h>
+# include <stdlib.h>
+#endif /* ! vxworks */
+
+/*
+ * The following functions do nothing useful. They are included simply
+ * as places to try setting breakpoints at. They are explicitly
+ * "one-line functions" to verify that this case works (some versions
+ * of gcc have or have had problems with this).
+ */
+
+#ifdef PROTOTYPES
+int marker1 (void) { return (0); }
+int marker2 (int a) { return (1); } /* set breakpoint 8 here */
+void marker3 (char *a, char *b) {}
+void marker4 (long d) {} /* set breakpoint 14 here */
+#else
+int marker1 () { return (0); }
+int marker2 (a) int a; { return (1); } /* set breakpoint 9 here */
+void marker3 (a, b) char *a, *b; {}
+void marker4 (d) long d; {} /* set breakpoint 13 here */
+#endif
+
+/*
+ * This simple classical example of recursion is useful for
+ * testing stack backtraces and such.
+ */
+
+#ifdef PROTOTYPES
+int factorial(int);
+
+int
+main (int argc, char **argv, char **envp)
+#else
+int
+main (argc, argv, envp)
+int argc;
+char *argv[], **envp;
+#endif
+{
+#ifdef usestubs
+ set_debug_traps(); /* set breakpoint 5 here */
+ breakpoint();
+#endif
+ if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
+ fprintf (stderr, "usage: factorial <number>\n");
+ return 1;
+ }
+ printf ("%d\n", factorial (atoi ("6"))); /* set breakpoint 1 here */
+ /* set breakpoint 12 here */
+ marker1 (); /* set breakpoint 11 here */
+ marker2 (43);
+ marker3 ("stack", "trace");
+ marker4 (177601976L);
+ argc = (argc == 12345); /* This is silly, but we can step off of it */ /* set breakpoint 2 here */
+ return argc; /* set breakpoint 10 here */
+}
+
+#ifdef PROTOTYPES
+int factorial (int value)
+#else
+int factorial (value)
+int value;
+#endif
+{
+ if (value > 1) { /* set breakpoint 7 here */
+ value *= factorial (value - 1);
+ }
+ return (value);
+}
+
+#ifdef PROTOTYPES
+int multi_line_if_conditional (int a, int b, int c)
+#else
+int multi_line_if_conditional (a, b, c)
+ int a, b, c;
+#endif
+{
+ if (a /* set breakpoint 3 here */
+ && b
+ && c)
+ return 0;
+ else
+ return 1;
+}
+
+#ifdef PROTOTYPES
+int multi_line_while_conditional (int a, int b, int c)
+#else
+int multi_line_while_conditional (a, b, c)
+ int a, b, c;
+#endif
+{
+ while (a /* set breakpoint 4 here */
+ && b
+ && c)
+ {
+ a--, b--, c--;
+ }
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp
new file mode 100644
index 00000000000..1028dab575b
--- /dev/null
+++ b/gdb/testsuite/gdb.base/sepdebug.exp
@@ -0,0 +1,987 @@
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2002, 2003, 2004
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# Based on break.exp, written by Rob Savoye. (rob@cygnus.com)
+# Modified to test gdb's handling of separate debug info files.
+
+# This file has two parts. The first is testing that gdb behaves
+# normally after reading in an executable and its corresponding
+# separate debug file. The second moves the .debug file to a different
+# location and tests the "set debug-file-directory" command.
+
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+set testfile "sepdebug"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# FIXME: this is nasty. We need to check for the stabs debug format.
+# To do this we must run gdb on the unstripped executable, list 'main'
+# (as to have a default source file), use get_debug_format (which does
+# 'info source') and then see if the debug info is stabs. If so, we
+# bail out. We cannot do this any other way because get_debug_format
+# finds out the debug format using gdb itself, and in case of stabs we
+# get an error loading the program if it is already stripped. An
+# alternative would be to find out the debug info from the flags
+# passed to dejagnu when the test is run.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+gdb_test "list main" "" ""
+get_debug_format
+if { [test_debug_format "stabs"] } then {
+ # the separate debug info feature doesn't work well in binutils with stabs.
+ # It produces a corrupted debug info only file, and gdb chokes on it.
+ # It is almost impossible to capture the failing message out of gdb,
+ # because it happens inside gdb_load. At that point any error message
+ # is intercepted by dejagnu itself, and, because of the error threshold,
+ # any faulty test result is changed into an UNRESOLVED.
+ # (see dejagnu/lib/framework.exp)
+ unsupported "no separate debug info handling with stabs"
+ return -1
+} elseif { [test_debug_format "unknown"] } then {
+ # gdb doesn't know what the debug format is. We are out of luck here.
+ unsupported "unknown debugging format"
+ return -1
+}
+gdb_exit
+
+# Note: the procedure gdb_gnu_strip_debug will produce an executable called
+# ${binfile}, which is just like the executable ($binfile) but without
+# the debuginfo. Instead $binfile has a .gnudebuglink section which contains
+# the name of a debuginfo only file. This file will be stored in the
+# gdb.base/.debug subdirectory.
+
+if [gdb_gnu_strip_debug $binfile] {
+ # check that you have a recent version of strip and objcopy installed
+ unsupported "cannot produce separate debug info files"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if [target_info exists gdb_stub] {
+ gdb_step_for_stub;
+}
+#
+# test simple breakpoint setting commands
+#
+
+# Test deleting all breakpoints when there are none installed,
+# GDB should not prompt for confirmation.
+# Note that gdb-init.exp provides a "delete_breakpoints" proc
+# for general use elsewhere.
+
+send_gdb "delete breakpoints\n"
+gdb_expect {
+ -re "Delete all breakpoints.*$" {
+ send_gdb "y\n"
+ gdb_expect {
+ -re "$gdb_prompt $" {
+ fail "Delete all breakpoints when none (unexpected prompt)"
+ }
+ timeout { fail "Delete all breakpoints when none (timeout after unexpected prompt)" }
+ }
+ }
+ -re ".*$gdb_prompt $" { pass "Delete all breakpoints when none" }
+ timeout { fail "Delete all breakpoints when none (timeout)" }
+}
+
+#
+# test break at function
+#
+gdb_test "break main" \
+ "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "breakpoint function"
+
+#
+# test break at quoted function
+#
+gdb_test "break \"marker2\"" \
+ "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "breakpoint quoted function"
+
+#
+# test break at function in file
+#
+gdb_test "break $srcfile:factorial" \
+ "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "breakpoint function in file"
+
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+
+#
+# test break at line number
+#
+# Note that the default source file is the last one whose source text
+# was printed. For native debugging, before we've executed the
+# program, this is the file containing main, but for remote debugging,
+# it's wherever the processor was stopped when we connected to the
+# board. So, to be sure, we do a list command.
+#
+gdb_test "list main" \
+ ".*main \\(argc, argv, envp\\).*" \
+ "use `list' to establish default source file"
+gdb_test "break $bp_location1" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location1\\." \
+ "breakpoint line number"
+
+#
+# test duplicate breakpoint
+#
+gdb_test "break $bp_location1" \
+ "Note: breakpoint \[0-9\]+ also set at pc.*Breakpoint \[0-9\]+ at.* file .*$srcfile, line $bp_location1\\." \
+ "breakpoint duplicate"
+
+set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
+
+#
+# test break at line number in file
+#
+gdb_test "break $srcfile:$bp_location2" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location2\\." \
+ "breakpoint line number in file"
+
+set bp_location3 [gdb_get_line_number "set breakpoint 3 here"]
+set bp_location4 [gdb_get_line_number "set breakpoint 4 here"]
+
+#
+# Test putting a break at the start of a multi-line if conditional.
+# Verify the breakpoint was put at the start of the conditional.
+#
+gdb_test "break multi_line_if_conditional" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location3\\." \
+ "breakpoint at start of multi line if conditional"
+
+gdb_test "break multi_line_while_conditional" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location4\\." \
+ "breakpoint at start of multi line while conditional"
+
+set bp_location5 [gdb_get_line_number "set breakpoint 5 here"]
+set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
+
+#
+# check to see what breakpoints are set
+#
+if [target_info exists gdb_stub] {
+ set main_line $bp_location5
+} else {
+ set main_line $bp_location6
+}
+
+set bp_location7 [gdb_get_line_number "set breakpoint 7 here"]
+set bp_location8 [gdb_get_line_number "set breakpoint 8 here"]
+set bp_location9 [gdb_get_line_number "set breakpoint 9 here"]
+
+gdb_test "info break" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in marker2 at .*$srcfile:($bp_location8|$bp_location9).*
+\[0-9\]+\[\t \]+breakpoint keep y.* in factorial at .*$srcfile:$bp_location7.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location2.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_if_conditional at .*$srcfile:$bp_location3.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:$bp_location4" \
+ "breakpoint info"
+
+# FIXME: The rest of this test doesn't work with anything that can't
+# handle arguments.
+# Huh? There doesn't *appear* to be anything that passes arguments
+# below.
+if [istarget "mips-idt-*"] then {
+ return
+}
+
+#
+# run until the breakpoint at main is hit. For non-stubs-using targets.
+#
+if ![target_info exists use_gdb_stub] {
+ if [istarget "*-*-vxworks*"] then {
+ send_gdb "run vxmain \"2\"\n"
+ set timeout 120
+ verbose "Timeout is now $timeout seconds" 2
+ } else {
+ send_gdb "run\n"
+ }
+ gdb_expect {
+ -re "The program .* has been started already.*y or n. $" {
+ send_gdb "y\n"
+ exp_continue
+ }
+ -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $"\
+ { pass "run until function breakpoint" }
+ -re ".*$gdb_prompt $" { fail "run until function breakpoint" }
+ timeout { fail "run until function breakpoint (timeout)" }
+ }
+} else {
+ if ![target_info exists gdb_stub] {
+ gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.*\{.*" "stub continue"
+ }
+}
+
+#
+# run until the breakpoint at a line number
+#
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location1.*$bp_location1\[\t \]+printf.*factorial.*" \
+ "run until breakpoint set at a line number"
+
+#
+# Run until the breakpoint set in a function in a file
+#
+for {set i 6} {$i >= 1} {incr i -1} {
+ gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:$bp_location7.*$bp_location7\[\t \]+.*if .value > 1. \{.*" \
+ "run until file:function($i) breakpoint"
+}
+
+#
+# Run until the breakpoint set at a quoted function
+#
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, (0x\[0-9a-f\]+ in )?marker2 \\(a=43\\) at .*$srcfile:($bp_location8|$bp_location9).*" \
+ "run until quoted breakpoint"
+#
+# run until the file:function breakpoint at a line number in a file
+#
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location2.*$bp_location2\[\t \]+argc = \\(argc == 12345\\);.*" \
+ "run until file:linenum breakpoint"
+
+# Test break at offset +1
+set bp_location10 [gdb_get_line_number "set breakpoint 10 here"]
+
+gdb_test "break +1" \
+ "Breakpoint.*at.* file .*$srcfile, line $bp_location10\\." \
+ "breakpoint offset +1"
+
+# Check to see if breakpoint is hit when stepped onto
+
+gdb_test "step" \
+ ".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location10.*$bp_location10\[\t \]+return argc;.*breakpoint 10 here.*" \
+ "step onto breakpoint"
+
+#
+# delete all breakpoints so we can start over, course this can be a test too
+#
+delete_breakpoints
+
+#
+# test temporary breakpoint at function
+#
+
+gdb_test "tbreak main" "Breakpoint.*at.* file .*$srcfile, line.*" "Temporary breakpoint function"
+
+#
+# test break at function in file
+#
+
+gdb_test "tbreak $srcfile:factorial" "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "Temporary breakpoint function in file"
+
+#
+# test break at line number
+#
+send_gdb "tbreak $bp_location1\n"
+gdb_expect {
+ -re "Breakpoint.*at.* file .*$srcfile, line $bp_location1.*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
+ -re ".*$gdb_prompt $" { pass "Temporary breakpoint line number #1" }
+ timeout { fail "breakpoint line number #1 (timeout)" }
+}
+
+gdb_test "tbreak $bp_location6" "Breakpoint.*at.* file .*$srcfile, line $bp_location6.*" "Temporary breakpoint line number #2"
+
+#
+# test break at line number in file
+#
+send_gdb "tbreak $srcfile:$bp_location2\n"
+gdb_expect {
+ -re "Breakpoint.*at.* file .*$srcfile, line $bp_location2.*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
+ -re ".*$gdb_prompt $" { pass "Temporary breakpoint line number in file #1" }
+ timeout { fail "Temporary breakpoint line number in file #1 (timeout)" }
+}
+
+set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
+gdb_test "tbreak $srcfile:$bp_location11" "Breakpoint.*at.* file .*$srcfile, line $bp_location11.*" "Temporary breakpoint line number in file #2"
+
+#
+# check to see what breakpoints are set (temporary this time)
+#
+gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial at .*$srcfile:$bp_location7.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location1.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location6.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location2.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location11.*" \
+ "Temporary breakpoint info"
+
+
+#***********
+
+# Verify that catchpoints for fork, vfork and exec don't trigger
+# inappropriately. (There are no calls to those system functions
+# in this test program.)
+#
+if ![runto_main] then { fail "break tests suppressed" }
+
+send_gdb "catch\n"
+gdb_expect {
+ -re "Catch requires an event name.*$gdb_prompt $"\
+ {pass "catch requires an event name"}
+ -re "$gdb_prompt $"\
+ {fail "catch requires an event name"}
+ timeout {fail "(timeout) catch requires an event name"}
+}
+
+
+set name "set catch fork, never expected to trigger"
+send_gdb "catch fork\n"
+gdb_expect {
+ -re "Catchpoint \[0-9\]* .fork..*$gdb_prompt $"
+ {pass $name}
+ -re "Catch of fork not yet implemented.*$gdb_prompt $"
+ {pass $name}
+ -re "$gdb_prompt $"
+ {fail $name}
+ timeout {fail "(timeout) $name"}
+}
+
+
+set name "set catch vfork, never expected to trigger"
+send_gdb "catch vfork\n"
+
+# If we are on HP-UX 10.20, we expect an error message to be
+# printed if we type "catch vfork" at the gdb gdb_prompt. This is
+# because on HP-UX 10.20, we cannot catch vfork events.
+
+if [istarget "hppa*-hp-hpux10.20"] then {
+ gdb_expect {
+ -re "Catch of vfork events not supported on HP-UX 10.20..*$gdb_prompt $"
+ {pass $name}
+ -re "$gdb_prompt $"
+ {fail $name}
+ timeout {fail "(timeout) $name"}
+ }
+} else {
+ gdb_expect {
+ -re "Catchpoint \[0-9\]* .vfork..*$gdb_prompt $"
+ {pass $name}
+ -re "Catch of vfork not yet implemented.*$gdb_prompt $"
+ {pass $name}
+ -re "$gdb_prompt $"
+ {fail $name}
+ timeout {fail "(timeout) $name"}
+ }
+}
+
+set name "set catch exec, never expected to trigger"
+send_gdb "catch exec\n"
+gdb_expect {
+ -re "Catchpoint \[0-9\]* .exec..*$gdb_prompt $"
+ {pass $name}
+ -re "Catch of exec not yet implemented.*$gdb_prompt $"
+ {pass $name}
+ -re "$gdb_prompt $" {fail $name}
+ timeout {fail "(timeout) $name"}
+}
+
+# Verify that GDB responds gracefully when asked to set a breakpoint
+# on a nonexistent source line.
+#
+send_gdb "break 999\n"
+gdb_expect {
+ -re "No line 999 in file .*$gdb_prompt $"\
+ {pass "break on non-existent source line"}
+ -re "$gdb_prompt $"\
+ {fail "break on non-existent source line"}
+ timeout {fail "(timeout) break on non-existent source line"}
+}
+
+# Run to the desired default location. If not positioned here, the
+# tests below don't work.
+#
+gdb_test "until $bp_location1" "main .* at .*:$bp_location1.*" "until bp_location1"
+
+
+# Verify that GDB allows one to just say "break", which is treated
+# as the "default" breakpoint. Note that GDB gets cute when printing
+# the informational message about other breakpoints at the same
+# location. We'll hit that bird with this stone too.
+#
+send_gdb "break\n"
+gdb_expect {
+ -re "Breakpoint \[0-9\]*.*$gdb_prompt $"\
+ {pass "break on default location, 1st time"}
+ -re "$gdb_prompt $"\
+ {fail "break on default location, 1st time"}
+ timeout {fail "(timeout) break on default location, 1st time"}
+}
+
+send_gdb "break\n"
+gdb_expect {
+ -re "Note: breakpoint \[0-9\]* also set at .*Breakpoint \[0-9\]*.*$gdb_prompt $"\
+ {pass "break on default location, 2nd time"}
+ -re "$gdb_prompt $"\
+ {fail "break on default location, 2nd time"}
+ timeout {fail "(timeout) break on default location, 2nd time"}
+}
+
+send_gdb "break\n"
+gdb_expect {
+ -re "Note: breakpoints \[0-9\]* and \[0-9\]* also set at .*Breakpoint \[0-9\]*.*$gdb_prompt $"\
+ {pass "break on default location, 3rd time"}
+ -re "$gdb_prompt $"\
+ {fail "break on default location, 3rd time"}
+ timeout {fail "(timeout) break on default location, 3rd time"}
+}
+
+send_gdb "break\n"
+gdb_expect {
+ -re "Note: breakpoints \[0-9\]*, \[0-9\]* and \[0-9\]* also set at .*Breakpoint \[0-9\]*.*$gdb_prompt $"\
+ {pass "break on default location, 4th time"}
+ -re "$gdb_prompt $"\
+ {fail "break on default location, 4th time"}
+ timeout {fail "(timeout) break on default location, 4th time"}
+}
+
+# Verify that a "silent" breakpoint can be set, and that GDB is indeed
+# "silent" about its triggering.
+#
+if ![runto_main] then { fail "break tests suppressed" }
+
+send_gdb "break $bp_location1\n"
+gdb_expect {
+ -re "Breakpoint (\[0-9\]*) at .*, line $bp_location1.*$gdb_prompt $"\
+ {pass "set to-be-silent break bp_location1"}
+ -re "$gdb_prompt $"\
+ {fail "set to-be-silent break bp_location1"}
+ timeout {fail "(timeout) set to-be-silent break bp_location1"}
+}
+
+send_gdb "commands $expect_out(1,string)\n"
+send_gdb "silent\n"
+send_gdb "end\n"
+gdb_expect {
+ -re ".*$gdb_prompt $"\
+ {pass "set silent break bp_location1"}
+ timeout {fail "(timeout) set silent break bp_location1"}
+}
+
+send_gdb "info break $expect_out(1,string)\n"
+gdb_expect {
+ -re "\[0-9\]*\[ \t\]*breakpoint.*:$bp_location1\r\n\[ \t\]*silent.*$gdb_prompt $"\
+ {pass "info silent break bp_location1"}
+ -re "$gdb_prompt $"\
+ {fail "info silent break bp_location1"}
+ timeout {fail "(timeout) info silent break bp_location1"}
+}
+send_gdb "continue\n"
+gdb_expect {
+ -re "Continuing.\r\n$gdb_prompt $"\
+ {pass "hit silent break bp_location1"}
+ -re "$gdb_prompt $"\
+ {fail "hit silent break bp_location1"}
+ timeout {fail "(timeout) hit silent break bp_location1"}
+}
+send_gdb "bt\n"
+gdb_expect {
+ -re "#0 main .* at .*:$bp_location1.*$gdb_prompt $"\
+ {pass "stopped for silent break bp_location1"}
+ -re "$gdb_prompt $"\
+ {fail "stopped for silent break bp_location1"}
+ timeout {fail "(timeout) stopped for silent break bp_location1"}
+}
+
+# Verify that GDB can at least parse a breakpoint with the
+# "thread" keyword. (We won't attempt to test here that a
+# thread-specific breakpoint really triggers appropriately.
+# The gdb.threads subdirectory contains tests for that.)
+#
+set bp_location12 [gdb_get_line_number "set breakpoint 12 here"]
+send_gdb "break $bp_location12 thread 999\n"
+gdb_expect {
+ -re "Unknown thread 999.*$gdb_prompt $"\
+ {pass "thread-specific breakpoint on non-existent thread disallowed"}
+ -re "$gdb_prompt $"\
+ {fail "thread-specific breakpoint on non-existent thread disallowed"}
+ timeout {fail "(timeout) thread-specific breakpoint on non-existent thread disallowed"}
+}
+send_gdb "break $bp_location12 thread foo\n"
+gdb_expect {
+ -re "Junk after thread keyword..*$gdb_prompt $"\
+ {pass "thread-specific breakpoint on bogus thread ID disallowed"}
+ -re "$gdb_prompt $"\
+ {fail "thread-specific breakpoint on bogus thread ID disallowed"}
+ timeout {fail "(timeout) thread-specific breakpoint on bogus thread ID disallowed"}
+}
+
+# Verify that GDB responds gracefully to a breakpoint command with
+# trailing garbage.
+#
+send_gdb "break $bp_location12 foo\n"
+gdb_expect {
+ -re "Junk at end of arguments..*$gdb_prompt $"\
+ {pass "breakpoint with trailing garbage disallowed"}
+ -re "$gdb_prompt $"\
+ {fail "breakpoint with trailing garbage disallowed"}
+ timeout {fail "(timeout) breakpoint with trailing garbage disallowed"}
+}
+
+# Verify that GDB responds gracefully to a "clear" command that has
+# no matching breakpoint. (First, get us off the current source line,
+# which we know has a breakpoint.)
+#
+send_gdb "next\n"
+gdb_expect {
+ -re ".*$gdb_prompt $"\
+ {pass "step over breakpoint"}
+ timeout {fail "(timeout) step over breakpoint"}
+}
+send_gdb "clear 81\n"
+gdb_expect {
+ -re "No breakpoint at 81..*$gdb_prompt $"\
+ {pass "clear line has no breakpoint disallowed"}
+ -re "$gdb_prompt $"\
+ {fail "clear line has no breakpoint disallowed"}
+ timeout {fail "(timeout) clear line has no breakpoint disallowed"}
+}
+send_gdb "clear\n"
+gdb_expect {
+ -re "No breakpoint at this line..*$gdb_prompt $"\
+ {pass "clear current line has no breakpoint disallowed"}
+ -re "$gdb_prompt $"\
+ {fail "clear current line has no breakpoint disallowed"}
+ timeout {fail "(timeout) clear current line has no breakpoint disallowed"}
+}
+
+# Verify that we can set and clear multiple breakpoints.
+#
+# We don't test that it deletes the correct breakpoints. We do at
+# least test that it deletes more than one breakpoint.
+#
+gdb_test "break marker3" "Breakpoint.*at.*" "break marker3 #1"
+gdb_test "break marker3" "Breakpoint.*at.*" "break marker3 #2"
+gdb_test "clear marker3" {Deleted breakpoints [0-9]+ [0-9]+.*}
+
+# Verify that a breakpoint can be set via a convenience variable.
+#
+send_gdb "set \$foo=$bp_location11\n"
+gdb_expect {
+ -re "$gdb_prompt $"\
+ {pass "set convenience variable \$foo to bp_location11"}
+ timeout {fail "(timeout) set convenience variable \$foo to bp_location11"}
+}
+send_gdb "break \$foo\n"
+gdb_expect {
+ -re "Breakpoint (\[0-9\]*) at .*, line $bp_location11.*$gdb_prompt $"\
+ {pass "set breakpoint via convenience variable"}
+ -re "$gdb_prompt $"\
+ {fail "set breakpoint via convenience variable"}
+ timeout {fail "(timeout) set breakpoint via convenience variable"}
+}
+
+# Verify that GDB responds gracefully to an attempt to set a
+# breakpoint via a convenience variable whose type is not integer.
+#
+send_gdb "set \$foo=81.5\n"
+gdb_expect {
+ -re "$gdb_prompt $"\
+ {pass "set convenience variable \$foo to 81.5"}
+ timeout {fail "(timeout) set convenience variable \$foo to 81.5"}
+}
+send_gdb "break \$foo\n"
+gdb_expect {
+ -re "Convenience variables used in line specs must have integer values..*$gdb_prompt $"\
+ {pass "set breakpoint via non-integer convenience variable disallowed"}
+ -re "$gdb_prompt $"\
+ {fail "set breakpoint via non-integer convenience variable disallowed"}
+ timeout {fail "(timeout) set breakpoint via non-integer convenience variable disallowed"}
+}
+
+# Verify that we can set and trigger a breakpoint in a user-called function.
+#
+send_gdb "break marker2\n"
+gdb_expect {
+ -re "Breakpoint (\[0-9\]*) at .*, line ($bp_location8|$bp_location9).*$gdb_prompt $"\
+ {pass "set breakpoint on to-be-called function"}
+ -re "$gdb_prompt $"\
+ {fail "set breakpoint on to-be-called function"}
+ timeout {fail "(timeout) set breakpoint on to-be-called function"}
+}
+send_gdb "print marker2(99)\n"
+gdb_expect {
+ -re "The program being debugged stopped while in a function called from GDB.\r\nWhen the function .marker2. is done executing, GDB will silently\r\nstop .instead of continuing to evaluate the expression containing\r\nthe function call...*$gdb_prompt $"\
+ {pass "hit breakpoint on called function"}
+ -re "$gdb_prompt $"\
+ {fail "hit breakpoint on called function"}
+ timeout {fail "(timeout) hit breakpoint on called function"}
+}
+
+# As long as we're stopped (breakpointed) in a called function,
+# verify that we can successfully backtrace & such from here.
+#
+# In this and the following test, the _sr4export check apparently is needed
+# for hppa*-*-hpux.
+#
+send_gdb "bt\n"
+gdb_expect {
+ -re "#0\[ \t\]*($hex in )?marker2.*:($bp_location8|$bp_location9)\r\n#1.*_sr4export.*$gdb_prompt $"\
+ {pass "backtrace while in called function"}
+ -re "#0\[ \t\]*($hex in )?marker2.*:($bp_location8|$bp_location9)\r\n#1.*function called from gdb.*$gdb_prompt $"\
+ {pass "backtrace while in called function"}
+ -re "$gdb_prompt $"\
+ {fail "backtrace while in called function"}
+ timeout {fail "(timeout) backtrace while in called function"}
+}
+
+# Return from the called function. For remote targets, it's important to do
+# this before runto_main, which otherwise may silently stop on the dummy
+# breakpoint inserted by GDB at the program's entry point.
+#
+send_gdb "finish\n"
+gdb_expect {
+ -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.* in _sr4export.*$gdb_prompt $"\
+ {pass "finish from called function"}
+ -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.*function called from gdb.*$gdb_prompt $"\
+ {pass "finish from called function"}
+ -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.*Value returned.*$gdb_prompt $"\
+ {pass "finish from called function"}
+ -re "$gdb_prompt $"\
+ {fail "finish from called function"}
+ timeout {fail "(timeout) finish from called function"}
+}
+
+# Verify that GDB responds gracefully to a "finish" command with
+# arguments.
+#
+if ![runto_main] then { fail "break tests suppressed" }
+
+send_gdb "finish 123\n"
+gdb_expect {
+ -re "The \"finish\" command does not take any arguments.\r\n$gdb_prompt $"\
+ {pass "finish with arguments disallowed"}
+ -re "$gdb_prompt $"\
+ {fail "finish with arguments disallowed"}
+ timeout {fail "(timeout) finish with arguments disallowed"}
+}
+
+# Verify that GDB responds gracefully to a request to "finish" from
+# the outermost frame. On a stub that never exits, this will just
+# run to the stubs routine, so we don't get this error... Thus the
+# second condition.
+#
+
+send_gdb "finish\n"
+gdb_expect {
+ -re "\"finish\" not meaningful in the outermost frame.\r\n$gdb_prompt $"\
+ {pass "finish from outermost frame disallowed"}
+ -re "Run till exit from.*\r\n$gdb_prompt $" {
+ pass "finish from outermost frame disallowed"
+ }
+ -re "$gdb_prompt $"\
+ {fail "finish from outermost frame disallowed"}
+ timeout {fail "(timeout) finish from outermost frame disallowed"}
+}
+
+# Verify that we can explicitly ask GDB to stop on all shared library
+# events, and that it does so.
+#
+if [istarget "hppa*-*-hpux*"] then {
+ if ![runto_main] then { fail "break tests suppressed" }
+
+ send_gdb "set stop-on-solib-events 1\n"
+ gdb_expect {
+ -re "$gdb_prompt $"\
+ {pass "set stop-on-solib-events"}
+ timeout {fail "(timeout) set stop-on-solib-events"}
+ }
+
+ send_gdb "run\n"
+ gdb_expect {
+ -re ".*Start it from the beginning.*y or n. $"\
+ {send_gdb "y\n"
+ gdb_expect {
+ -re ".*Stopped due to shared library event.*$gdb_prompt $"\
+ {pass "triggered stop-on-solib-events"}
+ -re "$gdb_prompt $"\
+ {fail "triggered stop-on-solib-events"}
+ timeout {fail "(timeout) triggered stop-on-solib-events"}
+ }
+ }
+ -re "$gdb_prompt $"\
+ {fail "rerun for stop-on-solib-events"}
+ timeout {fail "(timeout) rerun for stop-on-solib-events"}
+ }
+
+ send_gdb "set stop-on-solib-events 0\n"
+ gdb_expect {
+ -re "$gdb_prompt $"\
+ {pass "reset stop-on-solib-events"}
+ timeout {fail "(timeout) reset stop-on-solib-events"}
+ }
+}
+
+# Hardware breakpoints are unsupported on HP-UX. Verify that GDB
+# gracefully responds to requests to create them.
+#
+if [istarget "hppa*-*-hpux*"] then {
+ if ![runto_main] then { fail "break tests suppressed" }
+
+ send_gdb "hbreak\n"
+ gdb_expect {
+ -re "No hardware breakpoint support in the target.*$gdb_prompt $"\
+ {pass "hw breaks disallowed"}
+ -re "$gdb_prompt $"\
+ {fail "hw breaks disallowed"}
+ timeout {fail "(timeout) hw breaks disallowed"}
+ }
+
+ send_gdb "thbreak\n"
+ gdb_expect {
+ -re "No hardware breakpoint support in the target.*$gdb_prompt $"\
+ {pass "temporary hw breaks disallowed"}
+ -re "$gdb_prompt $"\
+ {fail "temporary hw breaks disallowed"}
+ timeout {fail "(timeout) temporary hw breaks disallowed"}
+ }
+}
+
+#********
+
+
+#
+# Test "next" over recursive function call.
+#
+
+proc test_next_with_recursion {} {
+ global gdb_prompt
+ global decimal
+ global binfile
+
+ if [target_info exists use_gdb_stub] {
+ # Reload the program.
+ delete_breakpoints
+ gdb_load ${binfile};
+ } else {
+ # FIXME: should be using runto
+ gdb_test "kill" "" "kill program" "Kill the program being debugged.*y or n. $" "y"
+
+ delete_breakpoints
+ }
+
+ gdb_test "break factorial" "Breakpoint $decimal at .*" "break at factorial"
+
+ # Run until we call factorial with 6
+
+ if [istarget "*-*-vxworks*"] then {
+ send_gdb "run vxmain \"6\"\n"
+ } else {
+ gdb_run_cmd
+ }
+ gdb_expect {
+ -re "Break.* factorial .value=6. .*$gdb_prompt $" {}
+ -re ".*$gdb_prompt $" {
+ fail "run to factorial(6)";
+ gdb_suppress_tests;
+ }
+ timeout { fail "run to factorial(6) (timeout)" ; gdb_suppress_tests }
+ }
+
+ # Continue until we call factorial recursively with 5.
+
+ if [gdb_test "continue" \
+ "Continuing.*Break.* factorial .value=5. .*" \
+ "continue to factorial(5)"] then { gdb_suppress_tests }
+
+ # Do a backtrace just to confirm how many levels deep we are.
+
+ if [gdb_test "backtrace" \
+ "#0\[ \t\]+ factorial .value=5..*" \
+ "backtrace from factorial(5)"] then { gdb_suppress_tests }
+
+ # Now a "next" should position us at the recursive call, which
+ # we will be performing with 4.
+
+ if [gdb_test "next" \
+ ".* factorial .value - 1.;.*" \
+ "next to recursive call"] then { gdb_suppress_tests }
+
+ # Disable the breakpoint at the entry to factorial by deleting them all.
+ # The "next" should run until we return to the next line from this
+ # recursive call to factorial with 4.
+ # Buggy versions of gdb will stop instead at the innermost frame on
+ # the line where we are trying to "next" to.
+
+ delete_breakpoints
+
+ if [istarget "mips*tx39-*"] {
+ set timeout 60
+ }
+ # We used to set timeout here for all other targets as well. This
+ # is almost certainly wrong. The proper timeout depends on the
+ # target system in use, and how we communicate with it, so there
+ # is no single value appropriate for all targets. The timeout
+ # should be established by the Dejagnu config file(s) for the
+ # board, and respected by the test suite.
+ #
+ # For example, if I'm running GDB over an SSH tunnel talking to a
+ # portmaster in California talking to an ancient 68k board running
+ # a crummy ROM monitor (a situation I can only wish were
+ # hypothetical), then I need a large timeout. But that's not the
+ # kind of knowledge that belongs in this file.
+
+ gdb_test next "\[0-9\]*\[\t \]+return \\(value\\);.*" \
+ "next over recursive call"
+
+ # OK, we should be back in the same stack frame we started from.
+ # Do a backtrace just to confirm.
+
+ set result [gdb_test "backtrace" \
+ "#0\[ \t\]+ factorial .value=120.*\r\n#1\[ \t\]+ \[0-9a-fx\]+ in factorial .value=6..*" \
+ "backtrace from factorial(5.1)"]
+ if { $result != 0 } { gdb_suppress_tests }
+
+ if [target_info exists gdb,noresults] { gdb_suppress_tests }
+ gdb_continue_to_end "recursive next test"
+ gdb_stop_suppressing_tests;
+}
+
+test_next_with_recursion
+
+
+#********
+
+# now move the .debug file to a different location so that we can test
+# the "set debug-file-directory" command.
+
+remote_exec build "mv ${objdir}/${subdir}/.debug/${testfile}.debug ${objdir}/${subdir}"
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_test "set debug-file-directory ${objdir}/${subdir}" ".*" "set separate debug location"
+gdb_load ${binfile}
+
+if [target_info exists gdb_stub] {
+ gdb_step_for_stub;
+}
+
+#
+# test break at function
+#
+gdb_test "break main" \
+ "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "breakpoint function, optimized file"
+
+#
+# test break at function
+#
+gdb_test "break marker4" \
+ "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "breakpoint small function, optimized file"
+
+#
+# run until the breakpoint at main is hit. For non-stubs-using targets.
+#
+if ![target_info exists use_gdb_stub] {
+ if [istarget "*-*-vxworks*"] then {
+ send_gdb "run vxmain \"2\"\n"
+ set timeout 120
+ verbose "Timeout is now $timeout seconds" 2
+ } else {
+ send_gdb "run\n"
+ }
+ gdb_expect {
+ -re "The program .* has been started already.*y or n. $" {
+ send_gdb "y\n"
+ exp_continue
+ }
+ -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $"\
+ { pass "run until function breakpoint, optimized file" }
+ -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$gdb_prompt $"\
+ { pass "run until function breakpoint, optimized file (code motion)" }
+ -re ".*$gdb_prompt $" { fail "run until function breakpoint, optimized file" }
+ timeout { fail "run until function breakpoint, optimized file (timeout)" }
+ }
+} else {
+ if ![target_info exists gdb_stub] {
+ gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.*\{.*" "stub continue, optimized file"
+ }
+}
+
+#
+# run until the breakpoint at a small function
+#
+
+#
+# Add a second pass pattern. The behavior differs here between stabs
+# and dwarf for one-line functions. Stabs preserves two line symbols
+# (one before the prologue and one after) with the same line number,
+# but dwarf regards these as duplicates and discards one of them.
+# Therefore the address after the prologue (where the breakpoint is)
+# has no exactly matching line symbol, and GDB reports the breakpoint
+# as if it were in the middle of a line rather than at the beginning.
+
+set bp_location13 [gdb_get_line_number "set breakpoint 13 here"]
+set bp_location14 [gdb_get_line_number "set breakpoint 14 here"]
+send_gdb "continue\n"
+gdb_expect {
+ -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*" {
+ pass "run until breakpoint set at small function, optimized file"
+ }
+ -re "Breakpoint $decimal, $hex in marker4 \\(d=177601976\\) at .*$srcfile:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*" {
+ pass "run until breakpoint set at small function, optimized file"
+ }
+ -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:$bp_location14\[\r\n\]+$bp_location14\[\t \]+void marker4.*" {
+ # marker4() is defined at line 46 when compiled with -DPROTOTYPES
+ pass "run until breakpoint set at small function, optimized file (line bp_location14)"
+ }
+ -re ".*$gdb_prompt " {
+ fail "run until breakpoint set at small function, optimized file"
+ }
+ timeout {
+ fail "run until breakpoint set at small function, optimized file (timeout)"
+ }
+}
+
+
+# Reset the default arguments for VxWorks
+if [istarget "*-*-vxworks*"] {
+ set timeout 10
+ verbose "Timeout is now $timeout seconds" 2
+ send_gdb "set args main\n"
+ gdb_expect -re ".*$gdb_prompt $" {}
+}
diff --git a/gdb/testsuite/gdb.base/setvar.exp b/gdb/testsuite/gdb.base/setvar.exp
index e14ed5d948e..c101f9c4ce2 100644
--- a/gdb/testsuite/gdb.base/setvar.exp
+++ b/gdb/testsuite/gdb.base/setvar.exp
@@ -1,24 +1,7 @@
-# Copyright 1997, 1999, 2000 Free Software Foundation, Inc.
+# This testcase is part of 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.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# Copyright (C) 1988, 1990, 1991, 1992, 1994, 1995
-# Free Software Foundation, Inc.
+# Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+# 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -35,7 +18,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
+# bug-gdb@gnu.org
# This file was written by Rob Savoye. (rob@cygnus.com)
@@ -139,7 +122,7 @@ proc test_set { args } {
test_set "set variable v_char=0" "print v_char" ".\[0-9\]* = 0 \'.0\'" "set variable char=0"
test_set "set variable v_char=1" "print v_char" ".\[0-9\]* = 1 \'.001\'" "set variable char=1"
-test_set "set variable v_char=27" "print v_char" ".\[0-9\]* = 27 \'.e\'" "set variable char=27 (Esc)"
+test_set "set variable v_char=7" "print v_char" ".\[0-9\]* = 7 \'.a\'" "set variable char=7 (Bel)"
test_set "set variable v_char=32" "print v_char" ".\[0-9\]* = 32 \' \'" "set variable char=32 (SPC)"
test_set "set variable v_char=65" "print v_char" ".\[0-9\]* = 65 \'A\'" "set variable char=65 ('A')"
test_set "set variable v_char=97" "print v_char" ".\[0-9\]* = 97 \'a\'" "set variable char=97 ('a')"
@@ -150,7 +133,7 @@ test_set "set variable v_char=127" "print v_char" ".\[0-9\]* = 127 \'.177\'"
#
test_set "set variable v_char=0" "print v_signed_char" ".\[0-9\]* = 0 \'.0\'" "set variable signed char=0"
test_set "set variable v_signed_char=1" "print v_signed_char" ".\[0-9\]* = 1 \'.001\'" "set variable signed char=1"
-test_set "set variable v_signed_char=27" "print v_signed_char" ".\[0-9\]* = 27 \'.e\'" "set variable signed char=27 (Esc)"
+test_set "set variable v_signed_char=7" "print v_signed_char" ".\[0-9\]* = 7 \'.a\'" "set variable signed char=7 (Bel)"
test_set "set variable v_signed_char=32" "print v_signed_char" ".\[0-9\]* = 32 \' \'" "set variable signed char=32 (SPC)"
test_set "set variable v_signed_char=65" "print v_signed_char" ".\[0-9\]* = 65 \'A\'" "set variable signed char=65 ('A')"
test_set "set variable v_signed_char=97" "print v_signed_char" ".\[0-9\]* = 97 \'a\'" "set variable signed char=97 ('a')"
@@ -169,7 +152,7 @@ gdb_test "print v_signed_char" ".\[0-9\]* = -1 \'.377\'" \
#
test_set "set variable v_unsigned_char=0" "print v_unsigned_char" ".\[0-9\]* = 0 \'.0\'" "set variable unsigned char=0"
test_set "set variable v_unsigned_char=1" "print v_unsigned_char" ".\[0-9\]* = 1 \'.001\'" "set variable unsigned char=1"
-test_set "set variable v_unsigned_char=27" "print v_unsigned_char" ".\[0-9\]* = 27 \'.e\'" "set variable unsigned char=27 (Esc)"
+test_set "set variable v_unsigned_char=7" "print v_unsigned_char" ".\[0-9\]* = 7 \'.a\'" "set variable unsigned char=7 (Bel)"
test_set "set variable v_unsigned_char=32" "print v_unsigned_char" ".\[0-9\]* = 32 \' \'" "set variable unsigned char=32 (SPC)"
test_set "set variable v_unsigned_char=65" "print v_unsigned_char" ".\[0-9\]* = 65 \'A\'" "set variable unsigned char=65 ('A')"
test_set "set variable v_unsigned_char=97" "print v_unsigned_char" ".\[0-9\]* = 97 \'a\'" "set variable unsigned char=97 ('a')"
@@ -329,12 +312,8 @@ gdb_test "print *(v_signed_short_pointer+1)" ".\[0-9\]*.*=.*-456"
gdb_test "set v_unsigned_short_pointer=v_unsigned_short_array" ""
gdb_test "set variable *(v_unsigned_short_pointer)=123" ""
gdb_test "set variable *(v_unsigned_short_pointer+1)=-456" ""
-# DTS 10060CLLbs - bad type info from cc
-if {$hp_cc_compiler} {setup_xfail hppa*-*-*11* 10060CLLbs}
gdb_test "print v_unsigned_short_array" ".\[0-9\]* =.*\\{123,.*65080\\}" \
"set variable unsigned short pointer"
-# DTS 10060CLLbs - bad type info from cc
-if {$hp_cc_compiler} {setup_xfail hppa*-*-*11* 10060CLLbs}
gdb_test "print *(v_unsigned_short_pointer+1)" ".\[0-9\]* = 65080"
#
# test "set variable" for type "int *"
diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp
index 8fe8b22da39..4205253e2f5 100644
--- a/gdb/testsuite/gdb.base/shlib-call.exp
+++ b/gdb/testsuite/gdb.base/shlib-call.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -291,7 +291,7 @@ send_gdb "set width 0\n" ; gdb_expect -re "$gdb_prompt $"
# PR's 16495, 18213
# test that we can re-set breakpoints in shared libraries
-gdb_test "break shr1" "Breakpoint 1.*" "set bp in shared library"
+gdb_breakpoint "shr1"
# FIXME: should not send "run" explicitly. Non-portable.
diff --git a/gdb/testsuite/gdb.base/shreloc.exp b/gdb/testsuite/gdb.base/shreloc.exp
index ac48774676f..55ec1e776bb 100644
--- a/gdb/testsuite/gdb.base/shreloc.exp
+++ b/gdb/testsuite/gdb.base/shreloc.exp
@@ -23,6 +23,11 @@
# them gets relocated at load-time. Check that gdb gets the right
# values for the debugging and minimal symbols.
+if {[istarget *-elf*] || [istarget *-coff] || [istarget *-aout]} then {
+ verbose "test skipped - shared object files not supported by this target."
+ return 0
+}
+
if $tracelevel then {
strace $tracelevel
}
diff --git a/gdb/testsuite/gdb.base/so-impl-ld.exp b/gdb/testsuite/gdb.base/so-impl-ld.exp
index 68a1bf41c00..bcc7120c66c 100644
--- a/gdb/testsuite/gdb.base/so-impl-ld.exp
+++ b/gdb/testsuite/gdb.base/so-impl-ld.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -55,15 +55,15 @@ if [get_compiler_info ${binfile}] {
#remote_exec build "$CC -g +z -c ${libfile}1.c -o ${libfile}1.o"
-if {$gcc_compiled == 0} {
+if { [test_compiler_info gcc-*-*] } then {
+ set additional_flags "additional_flags=-fpic"
+} else {
if [istarget "hppa*-hp-hpux*"] then {
set additional_flags "additional_flags=+z"
} else {
# don't know that the compiler is, hope for the best...
set additional_flags ""
}
-} else {
- set additional_flags "additional_flags=-fpic"
}
if {[gdb_compile "${srcdir}/${subdir}/${libfile}1.c" "${libfile}1.o" object [list debug $additional_flags]] != ""} {
diff --git a/gdb/testsuite/gdb.base/structs.c b/gdb/testsuite/gdb.base/structs.c
index 356f0729f1e..f7124dace9f 100644
--- a/gdb/testsuite/gdb.base/structs.c
+++ b/gdb/testsuite/gdb.base/structs.c
@@ -1,4 +1,6 @@
-/* Copyright 1996, 1999 Free Software Foundation, Inc.
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1996, 1999, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,37 +19,110 @@
Please email any bugs, comments, and/or additions to this file to:
bug-gdb@prep.ai.mit.edu */
-struct struct1 { char a;};
-struct struct2 { char a, b;};
-struct struct3 { char a, b, c; };
-struct struct4 { char a, b, c, d; };
-struct struct5 { char a, b, c, d, e; };
-struct struct6 { char a, b, c, d, e, f; };
-struct struct7 { char a, b, c, d, e, f, g; };
-struct struct8 { char a, b, c, d, e, f, g, h; };
-struct struct9 { char a, b, c, d, e, f, g, h, i; };
-struct struct10 { char a, b, c, d, e, f, g, h, i, j; };
-struct struct11 { char a, b, c, d, e, f, g, h, i, j, k; };
-struct struct12 { char a, b, c, d, e, f, g, h, i, j, k, l; };
-struct struct16 { char a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p; };
-
-struct struct1 foo1 = {'1'}, L1;
-struct struct2 foo2 = { 'a', 'b'}, L2;
-struct struct3 foo3 = { 'A', 'B', 'C'}, L3;
-struct struct4 foo4 = {'1', '2', '3', '4'}, L4;
-struct struct5 foo5 = {'a', 'b', 'c', 'd', 'e'}, L5;
-struct struct6 foo6 = {'A', 'B', 'C', 'D', 'E', 'F'}, L6;
-struct struct7 foo7 = {'1', '2', '3', '4', '5', '6', '7'}, L7;
-struct struct8 foo8 = {'1', '2', '3', '4', '5', '6', '7', '8'}, L8;
-struct struct9 foo9 = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'}, L9;
-struct struct10 foo10 = {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'}, L10;
-struct struct11 foo11 = {
- '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B'}, L11;
-struct struct12 foo12 = {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L'}, L12;
-struct struct16 foo16 = {
- 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p'}, L16;
+/* Useful abreviations. */
+typedef void t;
+typedef char tc;
+typedef short ts;
+typedef int ti;
+typedef long tl;
+typedef long long tll;
+typedef float tf;
+typedef double td;
+typedef long double tld;
+
+/* Force the type of each field. */
+#ifndef tA
+typedef t tA;
+#endif
+#ifndef tB
+typedef tA tB;
+#endif
+#ifndef tC
+typedef tB tC;
+#endif
+#ifndef tD
+typedef tC tD;
+#endif
+#ifndef tE
+typedef tD tE;
+#endif
+#ifndef tF
+typedef tE tF;
+#endif
+#ifndef tG
+typedef tF tG;
+#endif
+#ifndef tH
+typedef tG tH;
+#endif
+#ifndef tI
+typedef tH tI;
+#endif
+#ifndef tJ
+typedef tI tJ;
+#endif
+#ifndef tK
+typedef tJ tK;
+#endif
+#ifndef tL
+typedef tK tL;
+#endif
+#ifndef tM
+typedef tL tM;
+#endif
+#ifndef tN
+typedef tM tN;
+#endif
+#ifndef tO
+typedef tN tO;
+#endif
+#ifndef tP
+typedef tO tP;
+#endif
+#ifndef tQ
+typedef tP tQ;
+#endif
+#ifndef tR
+typedef tQ tR;
+#endif
+
+struct struct1 {tA a;};
+struct struct2 {tA a; tB b;};
+struct struct3 {tA a; tB b; tC c; };
+struct struct4 {tA a; tB b; tC c; tD d; };
+struct struct5 {tA a; tB b; tC c; tD d; tE e; };
+struct struct6 {tA a; tB b; tC c; tD d; tE e; tF f; };
+struct struct7 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; };
+struct struct8 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; };
+struct struct9 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; };
+struct struct10 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; };
+struct struct11 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; };
+struct struct12 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; };
+struct struct13 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; };
+struct struct14 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; tN n; };
+struct struct15 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; tN n; tO o; };
+struct struct16 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; tN n; tO o; tP p; };
+struct struct17 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; tN n; tO o; tP p; tQ q; };
+struct struct18 {tA a; tB b; tC c; tD d; tE e; tF f; tG g; tH h; tI i; tJ j; tK k; tL l; tM m; tN n; tO o; tP p; tQ q; tR r; };
+
+struct struct1 foo1 = {'1'}, L1;
+struct struct2 foo2 = {'a','2'}, L2;
+struct struct3 foo3 = {'1','b','3'}, L3;
+struct struct4 foo4 = {'a','2','c','4'}, L4;
+struct struct5 foo5 = {'1','b','3','d','5'}, L5;
+struct struct6 foo6 = {'a','2','c','4','e','6'}, L6;
+struct struct7 foo7 = {'1','b','3','d','5','f','7'}, L7;
+struct struct8 foo8 = {'a','2','c','4','e','6','g','8'}, L8;
+struct struct9 foo9 = {'1','b','3','d','5','f','7','h','9'}, L9;
+struct struct10 foo10 = {'a','2','c','4','e','6','g','8','i','A'}, L10;
+struct struct11 foo11 = {'1','b','3','d','5','f','7','h','9','j','B'}, L11;
+struct struct12 foo12 = {'a','2','c','4','e','6','g','8','i','A','k','C'}, L12;
+struct struct13 foo13 = {'1','b','3','d','5','f','7','h','9','j','B','l','D'}, L13;
+struct struct14 foo14 = {'a','2','c','4','e','6','g','8','i','A','k','C','m','E'}, L14;
+struct struct15 foo15 = {'1','b','3','d','5','f','7','h','9','j','B','l','D','n','F'}, L15;
+struct struct16 foo16 = {'a','2','c','4','e','6','g','8','i','A','k','C','m','E','o','G'}, L16;
+struct struct17 foo17 = {'1','b','3','d','5','f','7','h','9','j','B','l','D','n','F','p','H'}, L17;
+struct struct18 foo18 = {'a','2','c','4','e','6','g','8','i','A','k','C','m','E','o','G','q','I'}, L18;
struct struct1 fun1()
{
@@ -97,10 +172,30 @@ struct struct12 fun12()
{
return foo12;
}
+struct struct13 fun13()
+{
+ return foo13;
+}
+struct struct14 fun14()
+{
+ return foo14;
+}
+struct struct15 fun15()
+{
+ return foo15;
+}
struct struct16 fun16()
{
return foo16;
}
+struct struct17 fun17()
+{
+ return foo17;
+}
+struct struct18 fun18()
+{
+ return foo18;
+}
#ifdef PROTOTYPES
void Fun1(struct struct1 foo1)
@@ -211,6 +306,33 @@ void Fun12(foo12)
L12 = foo12;
}
#ifdef PROTOTYPES
+void Fun13(struct struct13 foo13)
+#else
+void Fun13(foo13)
+ struct struct13 foo13;
+#endif
+{
+ L13 = foo13;
+}
+#ifdef PROTOTYPES
+void Fun14(struct struct14 foo14)
+#else
+void Fun14(foo14)
+ struct struct14 foo14;
+#endif
+{
+ L14 = foo14;
+}
+#ifdef PROTOTYPES
+void Fun15(struct struct15 foo15)
+#else
+void Fun15(foo15)
+ struct struct15 foo15;
+#endif
+{
+ L15 = foo15;
+}
+#ifdef PROTOTYPES
void Fun16(struct struct16 foo16)
#else
void Fun16(foo16)
@@ -219,6 +341,64 @@ void Fun16(foo16)
{
L16 = foo16;
}
+#ifdef PROTOTYPES
+void Fun17(struct struct17 foo17)
+#else
+void Fun17(foo17)
+ struct struct17 foo17;
+#endif
+{
+ L17 = foo17;
+}
+#ifdef PROTOTYPES
+void Fun18(struct struct18 foo18)
+#else
+void Fun18(foo18)
+ struct struct18 foo18;
+#endif
+{
+ L18 = foo18;
+}
+
+zed ()
+{
+
+ L1.a = L2.a = L3.a = L4.a = L5.a = L6.a = L7.a = L8.a = L9.a = L10.a = L11.a = L12.a = L13.a = L14.a = L15.a = L16.a = L17.a = L18.a = 'Z';
+
+ L2.b = L3.b = L4.b = L5.b = L6.b = L7.b = L8.b = L9.b = L10.b = L11.b = L12.b = L13.b = L14.b = L15.b = L16.b = L17.b = L18.b = 'Z';
+
+ L3.c = L4.c = L5.c = L6.c = L7.c = L8.c = L9.c = L10.c = L11.c = L12.c = L13.c = L14.c = L15.c = L16.c = L17.c = L18.c = 'Z';
+
+ L4.d = L5.d = L6.d = L7.d = L8.d = L9.d = L10.d = L11.d = L12.d = L13.d = L14.d = L15.d = L16.d = L17.d = L18.d = 'Z';
+
+ L5.e = L6.e = L7.e = L8.e = L9.e = L10.e = L11.e = L12.e = L13.e = L14.e = L15.e = L16.e = L17.e = L18.e = 'Z';
+
+ L6.f = L7.f = L8.f = L9.f = L10.f = L11.f = L12.f = L13.f = L14.f = L15.f = L16.f = L17.f = L18.f = 'Z';
+
+ L7.g = L8.g = L9.g = L10.g = L11.g = L12.g = L13.g = L14.g = L15.g = L16.g = L17.g = L18.g = 'Z';
+
+ L8.h = L9.h = L10.h = L11.h = L12.h = L13.h = L14.h = L15.h = L16.h = L17.h = L18.h = 'Z';
+
+ L9.i = L10.i = L11.i = L12.i = L13.i = L14.i = L15.i = L16.i = L17.i = L18.i = 'Z';
+
+ L10.j = L11.j = L12.j = L13.j = L14.j = L15.j = L16.j = L17.j = L18.j = 'Z';
+
+ L11.k = L12.k = L13.k = L14.k = L15.k = L16.k = L17.k = L18.k = 'Z';
+
+ L12.l = L13.l = L14.l = L15.l = L16.l = L17.l = L18.l = 'Z';
+
+ L13.m = L14.m = L15.m = L16.m = L17.m = L18.m = 'Z';
+
+ L14.n = L15.n = L16.n = L17.n = L18.n = 'Z';
+
+ L15.o = L16.o = L17.o = L18.o = 'Z';
+
+ L16.p = L17.p = L18.p = 'Z';
+
+ L17.q = L18.q = 'Z';
+
+ L18.r = 'Z';
+}
int main()
{
@@ -226,24 +406,7 @@ int main()
set_debug_traps();
breakpoint();
#endif
-
- /* TEST C FUNCTIONS */
- L1 = fun1();
- L2 = fun2();
- L3 = fun3();
- L4 = fun4();
- L5 = fun5();
- L6 = fun6();
- L7 = fun7();
- L8 = fun8();
- L9 = fun9();
- L10 = fun10();
- L11 = fun11();
- L12 = fun12();
- L16 = fun16();
-
- foo1.a = foo2.a = foo3.a = foo4.a = foo5.a = foo6.a = foo7.a = foo8.a =
- foo9.a = foo10.a = foo11.a = foo12.a = foo16.a = '$';
+ int i;
Fun1(foo1);
Fun2(foo2);
@@ -257,7 +420,40 @@ int main()
Fun10(foo10);
Fun11(foo11);
Fun12(foo12);
+ Fun13(foo13);
+ Fun14(foo14);
+ Fun15(foo15);
Fun16(foo16);
+ Fun17(foo17);
+ Fun18(foo18);
+
+ /* An infinite loop that first clears all the variables and then
+ calls each function. This "hack" is to make testing random
+ functions easier - "advance funN" is guaranteed to have always
+ been preceeded by a global variable clearing zed call. */
+
+ while (1)
+ {
+ zed ();
+ L1 = fun1();
+ L2 = fun2();
+ L3 = fun3();
+ L4 = fun4();
+ L5 = fun5();
+ L6 = fun6();
+ L7 = fun7();
+ L8 = fun8();
+ L9 = fun9();
+ L10 = fun10();
+ L11 = fun11();
+ L12 = fun12();
+ L13 = fun13();
+ L14 = fun14();
+ L15 = fun15();
+ L16 = fun16();
+ L17 = fun17();
+ L18 = fun18();
+ }
return 0;
}
diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp
index ed91c86e482..4d282d2e58d 100644
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -1,4 +1,6 @@
-# Copyright 1996, 1997, 1999 Free Software Foundation, Inc.
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,8 +19,6 @@
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
-# This file was written by Jeff Law. (law@cygnus.com)
-
if $tracelevel then {
strace $tracelevel
}
@@ -26,142 +26,661 @@ if $tracelevel then {
set prms_id 0
set bug_id 0
-set prototypes 1
+# Some targets can't call functions, so don't even bother with this
+# test.
+
+if [target_info exists gdb,cannot_call_functions] {
+ setup_xfail "*-*-*"
+ fail "This target can not call functions"
+ continue
+}
+
set testfile "structs"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-# build the first test case
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- # built the second test case since we can't use prototypes
- warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DNO_PROTOTYPES}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
- }
- set prototypes 0
-}
+# Create and source the file that provides information about the
+# compiler used to compile the test case.
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
if [get_compiler_info ${binfile}] {
return -1;
}
+# Compile a variant of structs.c using TYPES to specify the type of
+# the first N struct elements (the remaining elements take the type of
+# the last TYPES field). Run the compmiled program up to "main".
+# Also updates the global "testfile" to reflect the most recent build.
-# Some targets can't call functions, so don't even bother with this
-# test.
-if [target_info exists gdb,cannot_call_functions] {
- setup_xfail "*-*-*" 2416
- fail "This target can not call functions"
- continue
+proc start_structs_test { types } {
+ global testfile
+ global srcfile
+ global binfile
+ global objdir
+ global subdir
+ global srcdir
+ global gdb_prompt
+
+ # Create the additional flags
+ set flags "debug"
+ set testfile "structs"
+ set n 0
+ for {set n 0} {$n<[llength ${types}]} {incr n} {
+ set m [I2A ${n}]
+ set t [lindex ${types} $n]
+ lappend flags "additional_flags=-Dt${m}=${t}"
+ append testfile "-" "$t"
+ }
+
+ set binfile ${objdir}/${subdir}/${testfile}
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags}"] != "" } {
+ # built the second test case since we can't use prototypes
+ warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags} additional_flags=-DNO_PROTOTYPES"] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ }
+
+ # Start with a fresh gdb.
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ # Make certain that the output is consistent
+ gdb_test "set print sevenbit-strings" "" \
+ "set print sevenbit-strings; ${testfile}"
+ gdb_test "set print address off" "" \
+ "set print address off; ${testfile}"
+ gdb_test "set width 0" "" \
+ "set width 0; ${testfile}"
+
+ # Advance to main
+ if { ![runto_main] } then {
+ gdb_suppress_tests;
+ }
+
+ # Get the debug format
+ get_debug_format
+
+ # check that at the struct containing all the relevant types is correct
+ set foo_t "type = struct struct[llength ${types}] \{"
+ for {set n 0} {$n<[llength ${types}]} {incr n} {
+ append foo_t "\[\r\n \]+[lindex ${types} $n] [i2a $n];"
+ }
+ append foo_t "\[\r\n \]+\}"
+ gdb_test "ptype foo[llength ${types}]" "${foo_t}" \
+ "ptype foo[llength ${types}]; ${testfile}"
}
+# The expected value for fun${n}, L${n} and foo${n}. First element is
+# empty to make indexing easier. "foo" returns the modified value,
+# "zed" returns the invalid value.
-# Call FUNC with no arguments, and expect to see the regexp RESULT in
-# the output. If we get back the error message "Function return value
-# unknown", call that an unsupported test; on some architectures, it's
-# impossible to find structs returned by value reliably.
-proc call_struct_func { func result } {
- global gdb_prompt
-
- set command "p ${func}()"
- send_gdb "${command}\n"
- gdb_expect {
- -re "$result\[\r\n\]+$gdb_prompt $" {
- pass "$command"
- }
- -re "Function return value unknown.\[\r\n\]+$gdb_prompt $" {
- unsupported "$command"
- }
- -re "$gdb_prompt $" {
- fail "$command"
- }
- timeout {
- fail "$command (timeout)"
- }
+proc foo { n } {
+ return [lindex {
+ "{}"
+ "{a = 49 '1'}"
+ "{a = 97 'a', b = 50 '2'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6', g = 103 'g', h = 56 '8'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7', h = 104 'h', i = 57 '9'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6', g = 103 'g', h = 56 '8', i = 105 'i', j = 65 'A'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7', h = 104 'h', i = 57 '9', j = 106 'j', k = 66 'B'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6', g = 103 'g', h = 56 '8', i = 105 'i', j = 65 'A', k = 107 'k', l = 67 'C'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7', h = 104 'h', i = 57 '9', j = 106 'j', k = 66 'B', l = 108 'l', m = 68 'D'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6', g = 103 'g', h = 56 '8', i = 105 'i', j = 65 'A', k = 107 'k', l = 67 'C', m = 109 'm', n = 69 'E'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7', h = 104 'h', i = 57 '9', j = 106 'j', k = 66 'B', l = 108 'l', m = 68 'D', n = 110 'n', o = 70 'F'}"
+ "{a = 97 'a', b = 50 '2', c = 99 'c', d = 52 '4', e = 101 'e', f = 54 '6', g = 103 'g', h = 56 '8', i = 105 'i', j = 65 'A', k = 107 'k', l = 67 'C', m = 109 'm', n = 69 'E', o = 111 'o', p = 71 'G'}"
+ "{a = 49 '1', b = 98 'b', c = 51 '3', d = 100 'd', e = 53 '5', f = 102 'f', g = 55 '7', h = 104 'h', i = 57 '9', j = 106 'j', k = 66 'B', l = 108 'l', m = 68 'D', n = 110 'n', o = 70 'F', p = 112 'p', q = 72 'H'}"
+ } $n]
+}
+
+proc zed { n } {
+ return [lindex {
+ "{}"
+ "{a = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z', m = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z', m = 90 'Z', n = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z', m = 90 'Z', n = 90 'Z', o = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z', m = 90 'Z', n = 90 'Z', o = 90 'Z', p = 90 'Z'}"
+ "{a = 90 'Z', b = 90 'Z', c = 90 'Z', d = 90 'Z', e = 90 'Z', f = 90 'Z', g = 90 'Z', h = 90 'Z', i = 90 'Z', j = 90 'Z', k = 90 'Z', l = 90 'Z', m = 90 'Z', n = 90 'Z', o = 90 'Z', p = 90 'Z', q = 90 'Z'}"
+ } $n]
+}
+
+# Given N (0..25), return the corresponding alphabetic letter in lower
+# or upper case. This is ment to be i18n proof.
+
+proc i2a { n } {
+ return [string range "abcdefghijklmnopqrstuvwxyz" $n $n]
+}
+
+proc I2A { n } {
+ return [string toupper [i2a $n]]
+}
+
+
+# Use the file name, compiler and tuples to set up any needed KFAILs.
+
+proc setup_kfails { file tuples bug } {
+ global testfile
+ if [string match $file $testfile] {
+ foreach f $tuples { setup_kfail $f $bug }
+ }
+}
+
+proc setup_compiler_kfails { file compiler format tuples bug } {
+ global testfile
+ if {[string match $file $testfile] && [test_compiler_info $compiler] && [test_debug_format $format]} {
+ foreach f $tuples { setup_kfail $f $bug }
}
}
-# FIXME: Before calling this proc, we should probably verify that
-# we can call inferior functions and get a valid integral value
-# returned.
-# Note that it is OK to check for 0 or 1 as the returned values, because C
-# specifies that the numeric value of a relational or logical expression
-# (computed in the inferior) is 1 for true and 0 for false.
+# Test GDB's ability to make inferior function calls to functions
+# returning (or passing in a single structs.
-proc do_function_calls {} {
- global prototypes
- global gcc_compiled
+# N identifies the number of elements in the struct that will be used
+# for the test case. FAILS is a list of target tuples that will fail
+# this test.
+
+# start_structs_test() will have previously built a program with a
+# specified combination of types for those elements. To ensure
+# robustness of the output, "p/c" is used.
+
+# This tests the code paths "which return-value convention?" and
+# "extract return-value from registers" called by "infcall.c".
+
+proc test_struct_calls { n } {
+ global testfile
global gdb_prompt
- # First, call the "fun" functions and examine the value they return.
- call_struct_func "fun1" " = {a = 49 '1'}"
- call_struct_func "fun2" " = {a = 97 'a', b = 98 'b'}"
- call_struct_func "fun3" " = {a = 65 'A', b = 66 'B', c = 67 'C'}"
- call_struct_func "fun4" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4'}"
- call_struct_func "fun5" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e'}"
- call_struct_func "fun6" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F'}"
- call_struct_func "fun7" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7'}"
- call_struct_func "fun8" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7', h = 56 '8'}"
- call_struct_func "fun9" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e', f = 102 'f', g = 103 'g', h = 104 'h', i = 105 'i'}"
- call_struct_func "fun10" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F', g = 71 'G', h = 72 'H', i = 73 'I', j = 74 'J'}"
- call_struct_func "fun11" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7', h = 56 '8', i = 57 '9', j = 65 'A', k = 66 'B'}"
- call_struct_func "fun12" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F', g = 71 'G', h = 72 'H', i = 73 'I', j = 74 'J', k = 75 'K', l = 76 'L'}"
- call_struct_func "fun16" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e', f = 102 'f', g = 103 'g', h = 104 'h', i = 105 'i', j = 106 'j', k = 107 'k', l = 108 'l', m = 109 'm', n = 110 'n', o = 111 'o', p = 112 'p'}"
-
- # Now call the Fun functions to set the L* variables. This
- # tests that gdb properly passes structures to functions.
- gdb_test "p Fun1(foo1)" " = (void|0)"
- gdb_test "p Fun2(foo2)" " = (void|0)"
- gdb_test "p Fun3(foo3)" " = (void|0)"
- gdb_test "p Fun4(foo4)" " = (void|0)"
- gdb_test "p Fun5(foo5)" " = (void|0)"
- gdb_test "p Fun6(foo6)" " = (void|0)"
- gdb_test "p Fun7(foo7)" " = (void|0)"
- gdb_test "p Fun8(foo8)" " = (void|0)"
- gdb_test "p Fun9(foo9)" " = (void|0)"
- gdb_test "p Fun10(foo10)" " = (void|0)"
- gdb_test "p Fun11(foo11)" " = (void|0)"
- gdb_test "p Fun12(foo12)" " = (void|0)"
- gdb_test "p Fun16(foo16)" " = (void|0)"
-
- # Now print the L* variables and examine their values.
- gdb_test "p L1" " = {a = 49 '1'}"
- gdb_test "p L2" " = {a = 97 'a', b = 98 'b'}"
- gdb_test "p L3" " = {a = 65 'A', b = 66 'B', c = 67 'C'}"
- gdb_test "p L4" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4'}"
- gdb_test "p L5" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e'}"
- gdb_test "p L6" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F'}"
- gdb_test "p L7" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7'}"
- gdb_test "p L8" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7', h = 56 '8'}"
- gdb_test "p L9" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e', f = 102 'f', g = 103 'g', h = 104 'h', i = 105 'i'}"
- gdb_test "p L10" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F', g = 71 'G', h = 72 'H', i = 73 'I', j = 74 'J'}"
- gdb_test "p L11" " = {a = 49 '1', b = 50 '2', c = 51 '3', d = 52 '4', e = 53 '5', f = 54 '6', g = 55 '7', h = 56 '8', i = 57 '9', j = 65 'A', k = 66 'B'}"
- gdb_test "p L12" " = {a = 65 'A', b = 66 'B', c = 67 'C', d = 68 'D', e = 69 'E', f = 70 'F', g = 71 'G', h = 72 'H', i = 73 'I', j = 74 'J', k = 75 'K', l = 76 'L'}"
- gdb_test "p L16" " = {a = 97 'a', b = 98 'b', c = 99 'c', d = 100 'd', e = 101 'e', f = 102 'f', g = 103 'g', h = 104 'h', i = 105 'i', j = 106 'j', k = 107 'k', l = 108 'l', m = 109 'm', n = 110 'n', o = 111 'o', p = 112 'p'}"
-}
-# Start with a fresh gdb.
+ # Check that GDB can always extract a struct-return value from an
+ # inferior function call. Since GDB always knows the location of an
+ # inferior function call's return value these should never fail
+
+ # Implemented by calling the parameterless function "fun$N" and then
+ # examining the return value printed by GDB.
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+ set tests "call $n ${testfile}"
-gdb_test "set print sevenbit-strings" ""
-gdb_test "set print address off" ""
-gdb_test "set width 0" ""
+ # Call fun${n}, checking the printed return-value.
+ setup_kfails structs-*tld* i*86-*-* gdb/1447
+ setup_kfails structs-*tld* sparc64-*-* gdb/1447
+ setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-*tld* x86_64-*-* gdb/1447
+ setup_compiler_kfails structs-tc-* gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
+ gdb_test "p/c fun${n}()" "[foo ${n}]" "p/c fun<n>(); ${tests}"
-if [target_info exists gdb,cannot_call_functions] {
- setup_xfail "*-*-*" 2416
- fail "This target can not call functions"
- return 0
+ # Check that GDB can always pass a structure to an inferior function.
+ # This test can never fail.
+
+ # Implemented by calling the one parameter function "Fun$N" which
+ # stores its parameter in the global variable "L$N". GDB then
+ # examining that global to confirm that the value is as expected.
+
+ gdb_test "call Fun${n}(foo${n})" "" "call Fun<n>(foo<n>); ${tests}"
+ setup_kfails structs-*tld* i*86-*-* gdb/1447
+ setup_kfails structs-*tld* sparc64-*-* gdb/1447
+ setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-*tld* x86_64-*-* gdb/1447
+ setup_compiler_kfails structs-tc-* gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
+ gdb_test "p/c L${n}" [foo ${n}] "p/c L<n>; ${tests}"
}
-if { ![runto_main] } then {
- gdb_suppress_tests;
+# Test GDB's ability to both return a function (with "return" or
+# "finish") and correctly extract/store any corresponding
+# return-value.
+
+# Check that GDB can consistently extract/store structure return
+# values. There are two cases - returned in registers and returned in
+# memory. For the latter case, the return value can't be found and a
+# failure is "expected". However GDB must still both return the
+# function and display the final source and line information.
+
+# N identifies the number of elements in the struct that will be used
+# for the test case. FAILS is a list of target tuples that will fail
+# this test.
+
+# This tests the code paths "which return-value convention?", "extract
+# return-value from registers", and "store return-value in registers".
+# Unlike "test struct calls", this test is expected to "fail" when the
+# return-value is in memory (GDB can't find the location). The test
+# is in three parts: test "return"; test "finish"; check that the two
+# are consistent. GDB can sometimes work for one command and not the
+# other.
+
+proc test_struct_returns { n } {
+ global gdb_prompt
+ global testfile
+
+ set tests "return $n ${testfile}"
+
+
+ # Check that "return" works.
+
+ # GDB must always force the return of a function that has
+ # a struct result. Dependant on the ABI, it may, or may not be
+ # possible to store the return value in a register.
+
+ # The relevant code looks like "L{n} = fun{n}()". The test forces
+ # "fun{n}" to "return" with an explicit value. Since that code
+ # snippet will store the the returned value in "L{n}" the return
+ # is tested by examining "L{n}". This assumes that the
+ # compiler implemented this as fun{n}(&L{n}) and hence that when
+ # the value isn't stored "L{n}" remains unchanged. Also check for
+ # consistency between this and the "finish" case.
+
+ # Get into a call of fun${n}
+ gdb_test "advance fun${n}" \
+ "fun${n} .*\[\r\n\]+\[0-9\].*return foo${n}.*" \
+ "advance to fun<n> for return; ${tests}"
+
+ # Check that the program invalidated the relevant global.
+ setup_kfails structs-tld i*86-*-* gdb/1447
+ setup_kfails structs-tld sparc64-*-* gdb/1447
+ setup_kfails structs-tld sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-tld x86_64-*-* gdb/1447
+ gdb_test "p/c L${n}" " = [zed $n]" "zed L<n> for return; ${tests}"
+
+ # Force the "return". This checks that the return is always
+ # performed, and that GDB correctly reported this to the user.
+ # GDB 6.0 and earlier, when the return-value's location wasn't
+ # known, both failed to print a final "source and line" and misplaced
+ # the frame ("No frame").
+
+ # The test is writen so that it only reports one FAIL/PASS for the
+ # entire operation. The value returned is checked further down.
+ # "return_value_unknown", if non-empty, records why GDB realised
+ # that it didn't know where the return value was.
+
+ set test "return foo<n>; ${tests}"
+ set return_value_unknown 0
+ set return_value_unimplemented 0
+ gdb_test_multiple "return foo${n}" "${test}" {
+ -re "The location" {
+ # Ulgh, a struct return, remember this (still need prompt).
+ set return_value_unknown 1
+ exp_continue
+ }
+ -re "A structure or union" {
+ # Ulgh, a struct return, remember this (still need prompt).
+ set return_value_unknown 1
+ # Double ulgh. Architecture doesn't use return_value and
+ # hence hasn't implemented small structure return.
+ set return_value_unimplemented 1
+ exp_continue
+ }
+ -re "Make fun${n} return now.*y or n. $" {
+ gdb_test_multiple "y" "${test}" {
+ -re "L${n} *= fun${n}.*${gdb_prompt} $" {
+ # Need to step off the function call
+ gdb_test "next" "L.* *= fun.*" "${test}"
+ }
+ -re "L[expr ${n} + 1] *= fun[expr ${n} + 1].*${gdb_prompt} $" {
+ pass "${test}"
+ }
+ }
+ }
+ }
+
+ # Check that the return-value is as expected. At this stage we're
+ # just checking that GDB has returned a value consistent with
+ # "return_value_unknown" set above.
+
+ set test "value foo<n> returned; ${tests}"
+ setup_kfails structs-*tld* i*86-*-* gdb/1447
+ setup_kfails structs-*tld* sparc64-*-* gdb/1447
+ setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-*tld* x86_64-*-* gdb/1447
+ gdb_test_multiple "p/c L${n}" "${test}" {
+ -re " = [foo ${n}].*${gdb_prompt} $" {
+ if $return_value_unknown {
+ # This contradicts the above claim that GDB didn't
+ # know the location of the return-value.
+ fail "${test}"
+ } else {
+ pass "${test}"
+ }
+ }
+ -re " = [zed ${n}].*${gdb_prompt} $" {
+ if $return_value_unknown {
+ # The struct return case. Since any modification
+ # would be by reference, and that can't happen, the
+ # value should be unmodified and hence Z is expected.
+ # Is this a reasonable assumption?
+ pass "${test}"
+ } else {
+ # This contradicts the above claim that GDB knew
+ # the location of the return-value.
+ fail "${test}"
+ }
+ }
+ -re ".*${gdb_prompt} $" {
+ if $return_value_unimplemented {
+ # What a suprize. The architecture hasn't implemented
+ # return_value, and hence has to fail.
+ kfail "$test" gdb/1444
+ } else {
+ fail "$test"
+ }
+ }
+ }
+
+ # Check that a "finish" works.
+
+ # This is almost but not quite the same as "call struct funcs".
+ # Architectures can have subtle differences in the two code paths.
+
+ # The relevant code snippet is "L{n} = fun{n}()". The program is
+ # advanced into a call to "fun{n}" and then that function is
+ # finished. The returned value that GDB prints, reformatted using
+ # "p/c", is checked.
+
+ # Get into "fun${n}()".
+ gdb_test "advance fun${n}" \
+ "fun${n} .*\[\r\n\]+\[0-9\].*return foo${n}.*" \
+ "advance to fun<n> for finish; ${tests}"
+
+ # Check that the program invalidated the relevant global.
+ setup_kfails structs-tld i*86-*-* gdb/1447
+ setup_kfails structs-tld sparc64-*-* gdb/1447
+ setup_kfails structs-tld sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-tld x86_64-*-* gdb/1447
+ gdb_test "p/c L${n}" " = [zed $n]" "zed L<n> for finish; ${tests}"
+
+ # Finish the function, set 'finish_value_unknown" to non-empty if the
+ # return-value was not found.
+ set test "finish foo<n>; ${tests}"
+ set finish_value_unknown 0
+ gdb_test_multiple "finish" "${test}" {
+ -re "Value returned is .*${gdb_prompt} $" {
+ pass "${test}"
+ }
+ -re "Cannot determine contents.*${gdb_prompt} $" {
+ # Expected bad value. For the moment this is ok.
+ set finish_value_unknown 1
+ pass "${test}"
+ }
+ }
+
+ # Re-print the last (return-value) using the more robust
+ # "p/c". If no return value was found, the 'Z' from the previous
+ # check that the variable was cleared, is printed.
+ set test "value foo<n> finished; ${tests}"
+ setup_kfails structs-*tld* i*86-*-* gdb/1447
+ setup_kfails structs-*tld* sparc64-*-* gdb/1447
+ setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-*tld* x86_64-*-* gdb/1447
+ gdb_test_multiple "p/c" "${test}" {
+ -re "[foo ${n}]\[\r\n\]+${gdb_prompt} $" {
+ if $finish_value_unknown {
+ # This contradicts the above claim that GDB didn't
+ # know the location of the return-value.
+ fail "${test}"
+ } else {
+ pass "${test}"
+ }
+ }
+ -re "[zed ${n}]\[\r\n\]+${gdb_prompt} $" {
+ # The value didn't get found. This is "expected".
+ if $finish_value_unknown {
+ pass "${test}"
+ } else {
+ # This contradicts the above claim that GDB did
+ # know the location of the return-value.
+ fail "${test}"
+ }
+ }
+ }
+
+ # Finally, check that "return" and finish" have consistent
+ # behavior.
+
+ # Since both "return" and "finish" use equivalent "which
+ # return-value convention" logic, both commands should have
+ # identical can/can-not find return-value messages.
+
+ # Note that since "call" and "finish" use common code paths, a
+ # failure here is a strong indicator of problems with "store
+ # return-value" code paths. Suggest looking at "return_value"
+ # when investigating a fix.
+
+ set test "return and finish use same convention; ${tests}"
+ if {$finish_value_unknown == $return_value_unknown} {
+ pass "${test}"
+ } else {
+ kfail gdb/1444 "${test}"
+ }
}
-do_function_calls;
+# ABIs pass anything >8 or >16 bytes in memory but below that things
+# randomly use register and/and structure conventions. Check all
+# possible sized char structs in that range. But only a restricted
+# range of the other types.
+
+# NetBSD/PPC returns "unnatural" (3, 5, 6, 7) sized structs in memory.
+
+# d10v is weird. 5/6 byte structs go in memory. 2 or more char
+# structs go in memory. Everything else is in a register!
+
+# Test every single char struct from 1..17 in size. This is what the
+# original "structs" test was doing.
+
+start_structs_test { tc }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_calls 7
+test_struct_calls 8
+test_struct_calls 9
+test_struct_calls 10
+test_struct_calls 11
+test_struct_calls 12
+test_struct_calls 13
+test_struct_calls 14
+test_struct_calls 15
+test_struct_calls 16
+test_struct_calls 17
+test_struct_returns 1
+test_struct_returns 2
+test_struct_returns 3
+test_struct_returns 4
+test_struct_returns 5
+test_struct_returns 6
+test_struct_returns 7
+test_struct_returns 8
+
+
+# Let the fun begin.
+
+# Assuming that any integer struct larger than 8 bytes goes in memory,
+# come up with many and varied combinations of a return struct. For
+# "struct calls" test just beyond that 8 byte boundary, for "struct
+# returns" test up to that boundary.
+
+# For floats, assumed that up to two struct elements can be stored in
+# floating point registers, regardless of their size.
+
+# The approx size of each structure it is computed assumed that tc=1,
+# ts=2, ti=4, tl=4, tll=8, tf=4, td=8, tld=16, and that all fields are
+# naturally aligned. Padding being added where needed. Note that
+# these numbers are just approx, the d10v has ti=2, a 64-bit has has
+# tl=8.
+
+# Approx size: 2, 4, ...
+start_structs_test { ts }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_returns 1
+test_struct_returns 2
+test_struct_returns 3
+test_struct_returns 4
+
+# Approx size: 4, 8, ...
+start_structs_test { ti }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_calls 3
+test_struct_returns 1
+test_struct_returns 2
+
+# Approx size: 4, 8, ...
+start_structs_test { tl }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_calls 3
+test_struct_returns 1
+test_struct_returns 2
+
+# Approx size: 8, 16, ...
+start_structs_test { tll }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_returns 1
+
+# Approx size: 4, 8, ...
+start_structs_test { tf }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_calls 3
+test_struct_returns 1
+test_struct_returns 2
+
+# Approx size: 8, 16, ...
+start_structs_test { td }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_returns 1
+
+# Approx size: 16, 32, ...
+start_structs_test { tld }
+test_struct_calls 1
+test_struct_calls 2
+test_struct_returns 1
+
+# Approx size: 2+1=3, 4, ...
+start_structs_test { ts tc }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_calls 7
+test_struct_calls 8
+test_struct_returns 2
+
+# Approx size: 4+1=5, 6, ...
+start_structs_test { ti tc }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_returns 2
+
+# Approx size: 4+1=5, 6, ...
+start_structs_test { tl tc }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_returns 2
+
+# Approx size: 8+1=9, 10, ...
+start_structs_test { tll tc }
+test_struct_calls 2
+
+# Approx size: 4+1=5, 6, ...
+start_structs_test { tf tc }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_returns 2
+
+# Approx size: 8+1=9, 10, ...
+start_structs_test { td tc }
+test_struct_calls 2
+
+# Approx size: 16+1=17, 18, ...
+start_structs_test { tld tc }
+test_struct_calls 2
+
+# Approx size: (1+1)+2=4, 6, ...
+start_structs_test { tc ts }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_calls 5
+test_struct_calls 6
+test_struct_returns 2
+
+# Approx size: (1+3)+4=8, 12, ...
+start_structs_test { tc ti }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_returns 2
+
+# Approx size: (1+3)+4=8, 12, ...
+start_structs_test { tc tl }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+test_struct_returns 2
+
+# Approx size: (1+7)+8=16, 24, ...
+start_structs_test { tc tll }
+test_struct_calls 2
+
+# Approx size: (1+3)+4=8, 12, ...
+start_structs_test { tc tf }
+test_struct_calls 2
+test_struct_calls 3
+test_struct_calls 4
+
+# Approx size: (1+7)+8=16, 24, ...
+start_structs_test { tc td }
+test_struct_calls 2
+
+# Approx size: (1+15)+16=32, 48, ...
+start_structs_test { tc tld }
+test_struct_calls 2
+
+# Some float combinations
+
+# Approx size: 8+4=12, 16, ...
+# d10v: 4+4=8, 12, ...
+start_structs_test { td tf }
+test_struct_calls 2
+test_struct_returns 2
-gdb_stop_suppressing_tests;
+# Approx size: (4+4)+8=16, 32, ...
+# d10v: 4+4=8, 12, ...
+start_structs_test { tf td }
+test_struct_calls 2
+test_struct_returns 2
return 0
diff --git a/gdb/testsuite/gdb.base/until.exp b/gdb/testsuite/gdb.base/until.exp
index f646c6d36ae..033005db0fd 100644
--- a/gdb/testsuite/gdb.base/until.exp
+++ b/gdb/testsuite/gdb.base/until.exp
@@ -23,13 +23,21 @@ if $tracelevel then {
strace $tracelevel
}
-set testfile break
+set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-remote_exec build "rm -f ${binfile}"
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit
@@ -37,6 +45,11 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
+set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+set bp_location19 [gdb_get_line_number "set breakpoint 19 here"]
+set bp_location20 [gdb_get_line_number "set breakpoint 20 here"]
+set bp_location21 [gdb_get_line_number "set breakpoint 21 here"]
+
if ![runto_main] then {
fail "Can't run to main"
return 0
@@ -45,8 +58,8 @@ if ![runto_main] then {
# Verify that "until <location>" works. (This is really just syntactic
# sugar for "tbreak <location>; continue".)
#
-gdb_test "until 79" \
- "main .* at .*:79.*" \
+gdb_test "until $bp_location1" \
+ "main .* at .*:$bp_location1.*" \
"until line number"
# Verify that a malformed "advance" is gracefully caught.
@@ -62,8 +75,8 @@ delete_breakpoints
# inner invocations of factorial() are completed and we are back at this
# frame.
#
-gdb_test "until 99" \
- "factorial.*value=720.*at.*${srcfile}:99.*return \\(value\\)." \
+gdb_test "until $bp_location19" \
+ "factorial.*value=720.*at.*${srcfile}:$bp_location19.*return \\(value\\).*" \
"until factorial, recursive function"
# Run to a function called by main
@@ -76,6 +89,6 @@ delete_breakpoints
# stop at main, the caller, where we put the 'guard' breakpoint.
#
gdb_test "until marker3" \
- "($hex in |)main.*argc.*argv.*envp.*at.*${srcfile}:(82.*marker2 \\(43\\)|83.*marker3 \\(.stack., .trace.\\))." \
+ "($hex in |)main.*argc.*argv.*envp.*at.*${srcfile}:($bp_location20.*marker2 \\(43\\)|$bp_location21.*marker3 \\(.stack., .trace.\\)).*" \
"until func, not called by current frame"
diff --git a/gdb/testsuite/gdb.base/volatile.exp b/gdb/testsuite/gdb.base/volatile.exp
index 704369605eb..c12e3d88eae 100644
--- a/gdb/testsuite/gdb.base/volatile.exp
+++ b/gdb/testsuite/gdb.base/volatile.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -55,28 +55,15 @@ if [get_compiler_info ${binfile}] {
return -1;
}
-if {$hp_aCC_compiler || $hp_cc_compiler} {
- set lang "c++"
-} else {
- set lang ""
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug $lang]] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug ] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-remote_exec build "rm -f ${binfile}.ci"
-if [get_compiler_info ${binfile}] {
- return -1
-}
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-source ${binfile}.ci
-
#
# set it up at a breakpoint so we can play with the variable values
#
@@ -88,14 +75,17 @@ if ![runto_main] then {
get_debug_format
proc local_compiler_xfail_check { } {
- global gcc_compiled;
-
- if {$gcc_compiled == 2} then {
+ if { [test_compiler_info gcc-2-*] } then {
if { ![test_debug_format "HP"] \
&& ![test_debug_format "DWARF 2"] } then {
setup_xfail "*-*-*"
}
}
+
+ global hp_cc_compiler
+ if { $hp_cc_compiler } {
+ setup_xfail "hppa*-*-hpux*"
+ }
}
send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
@@ -258,7 +248,7 @@ gdb_test "ptype vendor" "type = const volatile unsigned char \\* const volatile.
# test function parameters
local_compiler_xfail_check
-if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+if { [test_compiler_info gcc-3-*] && [test_debug_format "stabs"] } then {
# For reasons unknown, GCC 3 with stabs mangles several cv-qualified
# arguments to this function.
setup_xfail "*-*-*"
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index fd5d8f286b2..a69271b0aff 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -374,32 +374,8 @@ proc test_stepping {} {
gdb_test "break func2 if 0" "Breakpoint.*at.*"
gdb_test "p \$func2_breakpoint_number = \$bpnum" " = .*"
- # The problem is that GDB confuses stepping through the call
- # dummy with hitting the breakpoint at the end of the call dummy.
- # Will be fixed once all architectures define
- # DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET.
- setup_xfail "*-*-*"
- # This doesn't occur if the call dummy starts with a call,
- # because we are out of the dummy by the first time the inferior
- # stops.
- clear_xfail "arm*-*-*"
- clear_xfail "xscale*-*-*"
- clear_xfail "d10v*-*-*"
- clear_xfail "m68*-*-*"
- clear_xfail "i*86*-*-*"
- clear_xfail "vax-*-*"
- # The following architectures define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET.
- clear_xfail "alpha-*-*"
- clear_xfail "mips*-*-*"
- clear_xfail "sparc-*-*"
- clear_xfail "hppa*-*-*bsd*"
- # It works with the generic inferior function calling code too.
- # OBSOLETE clear_xfail "mn10200*-*-*"
- clear_xfail "mn10300*-*-*"
- # The following architectures define CALL_DUMMY_HAS_COMPLETED.
- clear_xfail "hppa*-*-*hpux*"
gdb_test "p func1 ()" "= 73" \
- "calling function with watchpoint enabled"
+ "calling function with watchpoint enabled"
#
# "finish" brings us back to main.
diff --git a/gdb/testsuite/gdb.cp/ambiguous.exp b/gdb/testsuite/gdb.cp/ambiguous.exp
index 4224b2d79fd..f54e96458d3 100644
--- a/gdb/testsuite/gdb.cp/ambiguous.exp
+++ b/gdb/testsuite/gdb.cp/ambiguous.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +14,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file is part of the gdb testsuite
# tests relating to ambiguous class members
@@ -45,7 +42,7 @@ if [get_compiler_info ${binfile} "c++"] {
return -1;
}
-if { $gcc_compiled } then { continue }
+if { [test_compiler_info gcc-*] } then { continue }
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp
index 0446eb3b63f..7710cc495f5 100644
--- a/gdb/testsuite/gdb.cp/annota2.exp
+++ b/gdb/testsuite/gdb.cp/annota2.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2001, 2002, 2003
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Elena Zannoni (ezannoni@cygnus.com)
if $tracelevel then {
@@ -193,7 +190,7 @@ gdb_expect {
#
send_gdb "next\n"
gdb_expect {
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\nWatchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+ -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
{ pass "watch triggered on a.x" }
-re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\n\.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" \
{ pass "watch triggered on a.x" }
diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp
index 431ed4f07bc..37be48d9b39 100644
--- a/gdb/testsuite/gdb.cp/annota3.exp
+++ b/gdb/testsuite/gdb.cp/annota3.exp
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +14,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Elena Zannoni (ezannoni@cygnus.com)
if $tracelevel then {
@@ -196,7 +193,7 @@ gdb_expect_list "set watch on a.x" "$gdb_prompt$" {
#
send_gdb "next\n"
gdb_expect {
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\(\r\n\032\032frames-invalid\r\n\)+\r\n\032\032watchpoint 3\r\nWatchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\nmain \\(\\) at .*$srcfile:$decimal\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" {
+ -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\(\r\n\032\032frames-invalid\r\n\)+\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\nmain \\(\\) at .*$srcfile:$decimal\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" {
pass "watch triggered on a.x"
}
-re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032stopped\r\n$gdb_prompt$" {
diff --git a/gdb/testsuite/gdb.cp/anon-union.exp b/gdb/testsuite/gdb.cp/anon-union.exp
index 0d5c7777319..4c34dcfcd90 100644
--- a/gdb/testsuite/gdb.cp/anon-union.exp
+++ b/gdb/testsuite/gdb.cp/anon-union.exp
@@ -1,5 +1,5 @@
# Tests for anonymous union support.
-# Copyright 1998, 1999, 2003 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,9 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# Written by Satish Pai <pai@apollo.hp.com> 1997-08-19
# This file is part of the gdb testsuite
diff --git a/gdb/testsuite/gdb.cp/breakpoint.cc b/gdb/testsuite/gdb.cp/breakpoint.cc
new file mode 100644
index 00000000000..266007cced0
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/breakpoint.cc
@@ -0,0 +1,41 @@
+/* Code to go along with tests in breakpoint.exp.
+
+ Copyright 2004 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+class C1 {
+public:
+ class Nested {
+ public:
+ int
+ foo ()
+ {
+ return 1;
+ }
+ };
+};
+
+int main ()
+{
+ C1::Nested c1;
+
+ c1.foo();
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.mi/mi1-symbol.exp b/gdb/testsuite/gdb.cp/breakpoint.exp
index f0da1975b0c..c85f80541e1 100644
--- a/gdb/testsuite/gdb.mi/mi1-symbol.exp
+++ b/gdb/testsuite/gdb.cp/breakpoint.exp
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,48 +14,52 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
+# This file is part of the gdb testsuite.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
+# This contains tests for breakpoints in C++.
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
+if $tracelevel then {
+ strace $tracelevel
+ }
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
+if { [skip_cplus_tests] } { continue }
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
-set testfile "basics"
-set srcfile ${testfile}.c
+set testfile "breakpoint"
+set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-mi_run_to_main
-
-proc test_list_lines {} {
- global mi_gdb_prompt
- global hex
- global decimal
- global srcfile
-
- # Test list-lines.
- # Tests:
- # -symbol-list-lines ${srcfile}
+if [get_compiler_info ${binfile} "c++"] {
+ return -1
+}
- mi_gdb_test "-symbol-list-lines ${srcfile}" \
- "\\^done,lines=\[\{pc=\"$hex\",line=\"$decimal\"\}.*\]" \
- "symbol-list-lines for source file ${srcfile}"
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+proc test_breakpoint {name} {
+ # Restart the program every time, so that a single failure doesn't
+ # lead to a cascade.
+ if ![runto_main] then {
+ perror "couldn't run to main when testing ${name}"
+ continue
+ } else {
+ gdb_breakpoint "${name}"
+ gdb_test "continue" "Continuing.\r\n\r\nBreakpoint \[0-9\]*, ${name}.*" "continue to ${name}"
+ }
}
-test_list_lines
+test_breakpoint "C1::Nested::foo"
-mi_gdb_exit
+gdb_exit
return 0
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/bs15503.cc b/gdb/testsuite/gdb.cp/bs15503.cc
index 759bc0f8943..5581ec5b1bf 100644
--- a/gdb/testsuite/gdb.hp/gdb.defects/bs15503.cc
+++ b/gdb/testsuite/gdb.cp/bs15503.cc
@@ -1,5 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1992, 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
#include <string>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
template <class T>
class StringTest {
diff --git a/gdb/testsuite/gdb.cp/bs15503.exp b/gdb/testsuite/gdb.cp/bs15503.exp
new file mode 100644
index 00000000000..9b6095bec1a
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/bs15503.exp
@@ -0,0 +1,100 @@
+# Copyright 1992, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Test case for CLLbs15503
+# This file was written by Sue Kimura (sue_kimura@hp.com)
+# Rewritten by Michael Chastain (mec.gnu@mindspring.com)
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set testfile "bs15503"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug c++"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+# Set breakpoint on template function
+
+gdb_test "break StringTest<wchar_t>::testFunction" \
+ "Breakpoint $decimal at $hex: file .*${srcfile}, line $decimal."
+
+gdb_test "continue" \
+ ".*Breakpoint $decimal, StringTest<wchar_t>::testFunction \\(this=$hex\\).*" \
+ "continue to StringTest<wchar_t>"
+
+# Run to some random point in the middle of the function.
+
+gdb_breakpoint [gdb_get_line_number "find position where blank needs to be inserted"]
+gdb_continue_to_breakpoint "find position where blank needs to be inserted"
+
+# Call some string methods.
+
+gdb_test "print s.length()" "\\$\[0-9\]+ = 42"
+gdb_test "print s\[0\]" "\\$\[0-9\]+ =.* 'I'"
+gdb_test "print s\[s.length()-1\]" "\\$\[0-9\]+ =.* 'g'"
+gdb_test "print (const char *) s" \
+ "\\$\[0-9\]+ = $hex \"I am a short stringand now a longer string\""
+
+# TODO: tests that do not work with gcc 2.95.3
+# -- chastain 2004-01-07
+#
+# gdb_test "print s.compare(s)" "\\$\[0-9\]+ = 0"
+# gdb_test "print s.compare(\"AAA\")" "\\$\[0-9\]+ = 1"
+# gdb_test "print s.compare(\"ZZZ\")" "\\$\[0-9\]+ = -1"
+
+# TODO: tests that do not work with gcc 2.95.3 and gcc 3.3.2.
+# cannot call overloaded non-member operator. -- chastain 2004-01-07
+#
+# gdb_test "print s == s" "\\$\[0-9\]+ = true"
+# gdb_test "print s > "AAA" "\\$\[0-9\]+ = true"
+# gdb_test "print s < "ZZZ" "\\$\[0-9\]+ = true"
+
+# TODO crash gdb! This is going to be a great test!
+# -- chastain 2004-01-07
+#
+# gdb_test "print s == \"I am a short stringand now a longer string\"" \
+# "\\$\[0-9\]+ = "true"
+
+gdb_test "print (const char *) s.substr(0,4)" "\\$\[0-9\]+ = $hex \"I am\""
+gdb_test "print (const char *) (s=s.substr(0,4))" \
+ "\\$\[0-9\]+ = $hex \"I am\""
+
+# TODO: cannot call overloaded non-member operator again.
+# -- chastain 2004-01-07
+#
+# gdb_test "print (const char *) (s + s)" \
+# "\\$\[0-9\]+ = $hex \"I amI am\""
+# gdb_test "print (const char *) (s + \" \" + s)" \
+# "\\$\[0-9\]+ = $hex \"I am I am\""
diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp
index 5b6cabe34fa..3aaf37cbff0 100644
--- a/gdb/testsuite/gdb.cp/casts.exp
+++ b/gdb/testsuite/gdb.cp/casts.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +14,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file is part of the gdb testsuite
# Test casting, especially between class types or pointer-to-class
diff --git a/gdb/testsuite/gdb.cp/class2.cc b/gdb/testsuite/gdb.cp/class2.cc
new file mode 100644
index 00000000000..b4aa20a0df1
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/class2.cc
@@ -0,0 +1,74 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2003, 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+struct A
+{
+ virtual ~A ();
+ int a1;
+};
+
+A::~A()
+{
+ a1 = 800;
+}
+
+struct B : public A
+{
+ virtual ~B ();
+ int b1;
+ int b2;
+};
+
+B::~B()
+{
+ a1 = 900;
+ b1 = 901;
+ b2 = 902;
+}
+
+// Stop the compiler from optimizing away data.
+void refer (A *)
+{
+ ;
+}
+
+struct empty {};
+
+// Stop the compiler from optimizing away data.
+void refer (empty *)
+{
+ ;
+}
+
+int main (void)
+{
+ A alpha, *aap, *abp;
+ B beta, *bbp;
+ empty e;
+
+ alpha.a1 = 100;
+ beta.a1 = 200; beta.b1 = 201; beta.b2 = 202;
+
+ aap = &alpha; refer (aap);
+ abp = &beta; refer (abp);
+ bbp = &beta; refer (bbp);
+ refer (&e);
+
+ return 0; // marker return 0
+} // marker close brace
diff --git a/gdb/testsuite/gdb.cp/class2.exp b/gdb/testsuite/gdb.cp/class2.exp
new file mode 100644
index 00000000000..e3f63b08eae
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/class2.exp
@@ -0,0 +1,119 @@
+# Copyright 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+ }
+
+if { [skip_cplus_tests] } { continue }
+
+set prms_id 0
+set bug_id 0
+
+set testfile "class2"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info ${binfile} "c++"] {
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Start with "set print object off".
+
+gdb_test "set print object off" ""
+
+if ![runto_main] then {
+ perror "couldn't run to main"
+ continue
+}
+
+get_debug_format
+
+gdb_test "break [gdb_get_line_number "marker return 0"]" \
+ "Breakpoint.*at.* file .*" ""
+
+gdb_test "continue" "Breakpoint .* at .*" ""
+
+# Access the "A" object.
+
+gdb_test "print alpha" \
+ "= {.*a1 = 100.*}" \
+ "print alpha at marker return 0"
+
+# Access the "B" object.
+
+gdb_test "print beta" \
+ "= {.*a1 = 200.*b1 = 201.*b2 = 202}" \
+ "print beta at marker return 0"
+
+# Access the "A" object through an "A *" pointer.
+
+gdb_test_multiple "print * aap" "print * aap at marker return 0" {
+ -re "= {.*a1 = 100.*}\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gdwarf-2
+ # gcc 3.3.2 -gstabs+
+ pass "print * aap at marker return 0"
+ }
+ -re "= {.*a1 = .*}\r\n$gdb_prompt $" {
+ if { [test_compiler_info gcc-2-*] && [test_debug_format "DWARF 2"] } {
+ # gcc 2.95.3 -gdwarf-2
+ setup_kfail "gdb/1465" "*-*-*"
+ }
+ fail "print * aap at marker return 0"
+ }
+}
+
+# Access the "B" object through a "B *" pointer.
+
+gdb_test "print * bbp" \
+ "= {.*a1 = 200.*b1 = 201.*b2 = 202}" \
+ "print * bbp at marker return 0"
+
+# Access the "B" object through an "A *" pointer.
+# This should print using the "A" type.
+
+gdb_test_multiple "print * abp" "print * abp at marker return 0, s-p-o off" {
+ -re "= {.*a1 = 200.*b1 = .*b2 = .*}\r\n$gdb_prompt $" {
+ # This would violate the documentation for "set print object off".
+ fail "print * abp at marker return 0, s-p-o off"
+ }
+ -re "= {.*a1 = 200.*}\r\n$gdb_prompt $" {
+ pass "print * abp at marker return 0, s-p-o off"
+ }
+}
+
+# Access the "B" object through a "B *" pointer expression.
+# This should print using the "B" type.
+
+gdb_test "print * (B *) abp" \
+ "= {.*a1 = 200.*b1 = 201.*b2 = 202}" \
+ "print * (B *) abp at marker return 0"
+
+# Printing the value of an object containing no data fields:
+
+gdb_test "p e" "= \{<No data fields>\}" "print object with no data fields"
diff --git a/gdb/testsuite/gdb.cp/classes.cc b/gdb/testsuite/gdb.cp/classes.cc
new file mode 100644
index 00000000000..d09f38fc36d
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/classes.cc
@@ -0,0 +1,608 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2004
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+// Test various -*- C++ -*- things.
+
+// ====================== basic C++ types =======================
+bool v_bool;
+bool v_bool_array[2];
+
+typedef struct fleep fleep;
+struct fleep { int a; } s;
+
+// ====================== simple class structures =======================
+
+struct default_public_struct {
+ // defaults to public:
+ int a;
+ int b;
+};
+
+struct explicit_public_struct {
+ public:
+ int a;
+ int b;
+};
+
+struct protected_struct {
+ protected:
+ int a;
+ int b;
+};
+
+struct private_struct {
+ private:
+ int a;
+ int b;
+};
+
+struct mixed_protection_struct {
+ public:
+ int a;
+ int b;
+ private:
+ int c;
+ int d;
+ protected:
+ int e;
+ int f;
+ public:
+ int g;
+ private:
+ int h;
+ protected:
+ int i;
+};
+
+class public_class {
+ public:
+ int a;
+ int b;
+};
+
+class protected_class {
+ protected:
+ int a;
+ int b;
+};
+
+class default_private_class {
+ // defaults to private:
+ int a;
+ int b;
+};
+
+class explicit_private_class {
+ private:
+ int a;
+ int b;
+};
+
+class mixed_protection_class {
+ public:
+ int a;
+ int b;
+ private:
+ int c;
+ int d;
+ protected:
+ int e;
+ int f;
+ public:
+ int g;
+ private:
+ int h;
+ protected:
+ int i;
+};
+
+class const_vol_method_class {
+public:
+ int a;
+ int b;
+ int foo (int &) const;
+ int bar (int &) volatile;
+ int baz (int &) const volatile;
+};
+
+int const_vol_method_class::foo (int & ir) const
+{
+ return ir + 3;
+}
+int const_vol_method_class::bar (int & ir) volatile
+{
+ return ir + 4;
+}
+int const_vol_method_class::baz (int & ir) const volatile
+{
+ return ir + 5;
+}
+
+// ========================= simple inheritance ==========================
+
+class A {
+ public:
+ int a;
+ int x;
+};
+
+A g_A;
+
+class B : public A {
+ public:
+ int b;
+ int x;
+};
+
+B g_B;
+
+class C : public A {
+ public:
+ int c;
+ int x;
+};
+
+C g_C;
+
+class D : public B, public C {
+ public:
+ int d;
+ int x;
+};
+
+D g_D;
+
+class E : public D {
+ public:
+ int e;
+ int x;
+};
+
+E g_E;
+
+class class_with_anon_union
+{
+ public:
+ int one;
+ union
+ {
+ int a;
+ long b;
+ };
+};
+
+class_with_anon_union g_anon_union;
+
+void inheritance2 (void)
+{
+}
+
+void inheritance1 (void)
+{
+ int ival;
+ int *intp;
+
+ // {A::a, A::x}
+
+ g_A.A::a = 1;
+ g_A.A::x = 2;
+
+ // {{A::a,A::x},B::b,B::x}
+
+ g_B.A::a = 3;
+ g_B.A::x = 4;
+ g_B.B::b = 5;
+ g_B.B::x = 6;
+
+ // {{A::a,A::x},C::c,C::x}
+
+ g_C.A::a = 7;
+ g_C.A::x = 8;
+ g_C.C::c = 9;
+ g_C.C::x = 10;
+
+ // {{{A::a,A::x},B::b,B::x},{{A::a,A::x},C::c,C::x},D::d,D::x}
+
+ // The following initialization code is non-portable, but allows us
+ // to initialize all members of g_D until we can fill in the missing
+ // initialization code with legal C++ code.
+
+ for (intp = (int *) &g_D, ival = 11;
+ intp < ((int *) &g_D + sizeof (g_D) / sizeof (int));
+ intp++, ival++)
+ {
+ *intp = ival;
+ }
+
+ // Overlay the nonportable initialization with legal initialization.
+
+ // ????? = 11; (g_D.A::a = 11; is ambiguous)
+ // ????? = 12; (g_D.A::x = 12; is ambiguous)
+/* djb 6-3-2000
+
+ This should take care of it. Rather than try to initialize using an ambiguous
+ construct, use 2 unambiguous ones for each. Since the ambiguous a/x member is
+ coming from C, and B, initialize D's C::a, and B::a, and D's C::x and B::x.
+ */
+ g_D.C::a = 15;
+ g_D.C::x = 12;
+ g_D.B::a = 11;
+ g_D.B::x = 12;
+ g_D.B::b = 13;
+ g_D.B::x = 14;
+ // ????? = 15;
+ // ????? = 16;
+ g_D.C::c = 17;
+ g_D.C::x = 18;
+ g_D.D::d = 19;
+ g_D.D::x = 20;
+
+
+ // {{{{A::a,A::x},B::b,B::x},{{A::a,A::x},C::c,C::x},D::d,D::x}},E::e,E::x}
+
+ // The following initialization code is non-portable, but allows us
+ // to initialize all members of g_D until we can fill in the missing
+ // initialization code with legal C++ code.
+
+ for (intp = (int *) &g_E, ival = 21;
+ intp < ((int *) &g_E + sizeof (g_E) / sizeof (int));
+ intp++, ival++)
+ {
+ *intp = ival;
+ }
+
+ // Overlay the nonportable initialization with legal initialization.
+
+ // ????? = 21; (g_E.A::a = 21; is ambiguous)
+ // ????? = 22; (g_E.A::x = 22; is ambiguous)
+ g_E.B::b = 23;
+ g_E.B::x = 24;
+ // ????? = 25;
+ // ????? = 26;
+ g_E.C::c = 27;
+ g_E.C::x = 28;
+ g_E.D::d = 29;
+ g_E.D::x = 30;
+ g_E.E::e = 31;
+ g_E.E::x = 32;
+
+ g_anon_union.one = 1;
+ g_anon_union.a = 2;
+
+ inheritance2 ();
+}
+
+// ======================== static member functions =====================
+
+class Static {
+public:
+ static void ii(int, int);
+};
+void Static::ii (int, int) { }
+
+// ======================== virtual base classes=========================
+
+class vA {
+ public:
+ int va;
+ int vx;
+};
+
+vA g_vA;
+
+class vB : public virtual vA {
+ public:
+ int vb;
+ int vx;
+};
+
+vB g_vB;
+
+class vC : public virtual vA {
+ public:
+ int vc;
+ int vx;
+};
+
+vC g_vC;
+
+class vD : public virtual vB, public virtual vC {
+ public:
+ int vd;
+ int vx;
+};
+
+vD g_vD;
+
+class vE : public virtual vD {
+ public:
+ int ve;
+ int vx;
+};
+
+vE g_vE;
+
+void inheritance4 (void)
+{
+}
+
+void inheritance3 (void)
+{
+ int ival;
+ int *intp;
+
+ // {vA::va, vA::vx}
+
+ g_vA.vA::va = 1;
+ g_vA.vA::vx = 2;
+
+ // {{vA::va, vA::vx}, vB::vb, vB::vx}
+
+ g_vB.vA::va = 3;
+ g_vB.vA::vx = 4;
+ g_vB.vB::vb = 5;
+ g_vB.vB::vx = 6;
+
+ // {{vA::va, vA::vx}, vC::vc, vC::vx}
+
+ g_vC.vA::va = 7;
+ g_vC.vA::vx = 8;
+ g_vC.vC::vc = 9;
+ g_vC.vC::vx = 10;
+
+ // {{{{vA::va, vA::vx}, vB::vb, vB::vx}, vC::vc, vC::vx}, vD::vd,vD::vx}
+
+ g_vD.vA::va = 11;
+ g_vD.vA::vx = 12;
+ g_vD.vB::vb = 13;
+ g_vD.vB::vx = 14;
+ g_vD.vC::vc = 15;
+ g_vD.vC::vx = 16;
+ g_vD.vD::vd = 17;
+ g_vD.vD::vx = 18;
+
+
+ // {{{{{vA::va,vA::vx},vB::vb,vB::vx},vC::vc,vC::vx},vD::vd,vD::vx},vE::ve,vE::vx}
+
+ g_vD.vA::va = 19;
+ g_vD.vA::vx = 20;
+ g_vD.vB::vb = 21;
+ g_vD.vB::vx = 22;
+ g_vD.vC::vc = 23;
+ g_vD.vC::vx = 24;
+ g_vD.vD::vd = 25;
+ g_vD.vD::vx = 26;
+ g_vE.vE::ve = 27;
+ g_vE.vE::vx = 28;
+
+ inheritance4 ();
+}
+
+// ======================================================================
+
+class Base1 {
+ public:
+ int x;
+ Base1(int i) { x = i; }
+};
+
+class Foo
+{
+ public:
+ int x;
+ int y;
+ static int st;
+ Foo (int i, int j) { x = i; y = j; }
+ int operator! ();
+ operator int ();
+ int times (int y);
+};
+
+class Bar : public Base1, public Foo {
+ public:
+ int z;
+ Bar (int i, int j, int k) : Base1 (10*k), Foo (i, j) { z = k; }
+};
+
+int Foo::operator! () { return !x; }
+
+int Foo::times (int y) { return x * y; }
+
+int Foo::st = 100;
+
+Foo::operator int() { return x; }
+
+Foo foo(10, 11);
+Bar bar(20, 21, 22);
+
+class ClassWithEnum {
+public:
+ enum PrivEnum { red, green, blue, yellow = 42 };
+ PrivEnum priv_enum;
+ int x;
+};
+
+void enums2 (void)
+{
+}
+
+/* classes.exp relies on statement order in this function for testing
+ enumeration fields. */
+
+void enums1 ()
+{
+ ClassWithEnum obj_with_enum;
+ obj_with_enum.priv_enum = ClassWithEnum::red;
+ obj_with_enum.x = 0;
+ enums2 ();
+ obj_with_enum.priv_enum = ClassWithEnum::green;
+ obj_with_enum.x = 1;
+}
+
+class ClassParam {
+public:
+ int Aptr_a (A *a) { return a->a; }
+ int Aptr_x (A *a) { return a->x; }
+ int Aref_a (A &a) { return a.a; }
+ int Aref_x (A &a) { return a.x; }
+ int Aval_a (A a) { return a.a; }
+ int Aval_x (A a) { return a.x; }
+};
+
+ClassParam class_param;
+
+class Contains_static_instance
+{
+ public:
+ int x;
+ int y;
+ Contains_static_instance (int i, int j) { x = i; y = j; }
+ static Contains_static_instance null;
+};
+
+Contains_static_instance Contains_static_instance::null(0,0);
+Contains_static_instance csi(10,20);
+
+class Contains_nested_static_instance
+{
+ public:
+ class Nested
+ {
+ public:
+ Nested(int i) : z(i) {}
+ int z;
+ static Contains_nested_static_instance xx;
+ };
+
+ Contains_nested_static_instance(int i, int j) : x(i), y(j) {}
+
+ int x;
+ int y;
+
+ static Contains_nested_static_instance null;
+ static Nested yy;
+};
+
+Contains_nested_static_instance Contains_nested_static_instance::null(0, 0);
+Contains_nested_static_instance::Nested Contains_nested_static_instance::yy(5);
+Contains_nested_static_instance
+ Contains_nested_static_instance::Nested::xx(1,2);
+Contains_nested_static_instance cnsi(30,40);
+
+typedef struct {
+ int one;
+ int two;
+} tagless_struct;
+tagless_struct v_tagless;
+
+/* Try to get the compiler to allocate a class in a register. */
+class small {
+ public:
+ int x;
+ int method ();
+};
+
+int
+small::method ()
+{
+ return x + 5;
+}
+
+void marker_reg1 () {}
+
+int
+register_class ()
+{
+ /* We don't call any methods for v, so gcc version cygnus-2.3.3-930220
+ might put this variable in a register. This is a lose, though, because
+ it means that GDB can't call any methods for that variable. */
+ register small v;
+
+ int i;
+
+ /* Perform a computation sufficiently complicated that optimizing compilers
+ won't optimized out the variable. If some compiler constant-folds this
+ whole loop, maybe using a parameter to this function here would help. */
+ v.x = 0;
+ for (i = 0; i < 13; ++i)
+ v.x += i;
+ --v.x; /* v.x is now 77 */
+ marker_reg1 ();
+ return v.x + 5;
+}
+
+void dummy()
+{
+ v_bool = true;
+ v_bool_array[0] = false;
+ v_bool_array[1] = v_bool;
+}
+
+void use_methods ()
+{
+ /* Refer to methods so that they don't get optimized away. */
+ int i;
+ i = class_param.Aptr_a (&g_A);
+ i = class_param.Aptr_x (&g_A);
+ i = class_param.Aref_a (g_A);
+ i = class_param.Aref_x (g_A);
+ i = class_param.Aval_a (g_A);
+ i = class_param.Aval_x (g_A);
+}
+
+
+int
+main()
+{
+#ifdef usestubs
+ set_debug_traps();
+ breakpoint();
+#endif
+ dummy();
+ inheritance1 ();
+ inheritance3 ();
+ enums1 ();
+ register_class ();
+
+ /* FIXME: pmi gets optimized out. Need to do some more computation with
+ it or something. (No one notices, because the test is xfail'd anyway,
+ but that probably won't always be true...). */
+ int Foo::* pmi = &Foo::y;
+
+ /* Make sure the AIX linker doesn't remove the variable. */
+ v_tagless.one = 5;
+
+ use_methods ();
+
+ return foo.*pmi;
+}
+
+/* Create an instance for some classes, otherwise they get optimized away. */
+
+default_public_struct default_public_s;
+explicit_public_struct explicit_public_s;
+protected_struct protected_s;
+private_struct private_s;
+mixed_protection_struct mixed_protection_s;
+public_class public_c;
+protected_class protected_c;
+default_private_class default_private_c;
+explicit_private_class explicit_private_c;
+mixed_protection_class mixed_protection_c;
diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp
index 60f5ab75dc4..d4e78c11927 100644
--- a/gdb/testsuite/gdb.cp/classes.exp
+++ b/gdb/testsuite/gdb.cp/classes.exp
@@ -1,5 +1,5 @@
# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003 Free Software Foundation, Inc.
+# 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,577 +15,587 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Fred Fish. (fnf@cygnus.com)
+# And rewritten by Michael Chastain <mec.gnu@mindspring.com>.
set ws "\[\r\n\t \]+"
set nl "\[\r\n\]+"
if $tracelevel then {
- strace $tracelevel
+ strace $tracelevel
}
if { [skip_cplus_tests] } { continue }
-set testfile "misc"
+set testfile "classes"
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-#
# Test ptype of class objects.
#
+# This code accepts the output of gcc v2 and v3, dwarf-2 and stabs+.
+# It could use some expansion with other compilers such as hp-ux ac++.
+#
+# There are lots of variations in the output:
+#
+# . gcc -stabs+ emits debug info for implicit member functions:
+# operator=, copy ctor, ctor. gcc -gdwarf-2 does not.
+#
+# . gcc with abi version 1 puts the implicit member functions
+# at the beginning of the member function list; with abi version 2,
+# the implicit member functions are at the end of the member function
+# list. This appears as an output difference with -gstabs+.
+# gcc 3.3.X defaults to abi version 1, and gcc 3.4 will default
+# to abi version 2.
+#
+# . gcc v2 shows data members for virtual base pointers.
+# gcc v3 does not.
+#
+# . gdb always prints "class" for both "class" and "struct".
+# In the future, I should accept "struct" in case gdb improves.
proc test_ptype_class_objects {} {
global gdb_prompt
global ws
global nl
- # Note that struct members are public by default, so we don't print
- # "public:" for the public members of structs.
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
+ # Simple type.
- send_gdb "ptype struct default_public_struct\n"
- gdb_expect {
- -re "type = struct default_public_struct \{${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ gdb_test_multiple "ptype struct default_public_struct" "ptype struct default_public_struct" {
+ -re "type = class default_public_struct \{${ws}public:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype struct default_public_struct"
}
- -re "type = class default_public_struct \{$nl.*int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
+ -re "type = class default_public_struct \{${ws}public:${ws}int a;${ws}int b;${ws}default_public_struct ?& ?operator ?=\\(default_public_struct const ?&\\);${ws}default_public_struct\\(default_public_struct const ?&\\);${ws}default_public_struct\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
pass "ptype struct default_public_struct"
}
- -re ".*$gdb_prompt $" { fail "ptype struct default_public_struct" }
- timeout { fail "ptype struct default_public_struct (timeout)" ; return }
}
- # Note that struct members are public by default, so we don't print
- # "public:" for the public members of structs.
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
+ # Same test, slightly different type.
- send_gdb "ptype struct explicit_public_struct\n"
- gdb_expect {
- -re "type = struct explicit_public_struct \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
+ gdb_test_multiple "ptype struct explicit_public_struct" "ptype struct explicit_public_struct" {
+ -re "type = class explicit_public_struct \{${ws}public:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype struct explicit_public_struct"
}
- -re "type = class explicit_public_struct \{$nl.*int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
+ -re "type = class explicit_public_struct \{${ws}public:${ws}int a;${ws}int b;${ws}explicit_public_struct ?& ?operator ?=\\(explicit_public_struct const ?&\\);${ws}explicit_public_struct\\(explicit_public_struct const ?&\\);${ws}explicit_public_struct\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
pass "ptype struct explicit_public_struct"
}
- -re ".*$gdb_prompt $" { fail "ptype struct explicit_public_struct" }
- timeout { fail "ptype struct explicit_public_struct (timeout)" ; return }
}
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
+ # Same test, slightly different type.
- send_gdb "ptype struct protected_struct\n"
- gdb_expect {
- -re "type = struct protected_struct \{${ws}protected:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ gdb_test_multiple "ptype struct protected_struct" "ptype struct protected_struct" {
+ -re "type = class protected_struct \{${ws}protected:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype struct protected_struct"
}
- -re "type = class protected_struct \{${ws}protected:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
+ -re "type = class protected_struct \{${ws}protected:${ws}int a;${ws}int b;${ws}public:${ws}protected_struct ?& ?operator ?=\\(protected_struct const ?&\\);${ws}protected_struct\\(protected_struct const ?&\\);${ws}protected_struct\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
pass "ptype struct protected_struct"
}
- -re ".*$gdb_prompt $" { fail "ptype struct protected_struct" }
- timeout { fail "ptype struct protected_struct (timeout)" ; return }
}
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
+ # Same test, slightly different type.
- send_gdb "ptype struct private_struct\n"
- gdb_expect {
- -re "type = struct private_struct \{${ws}private:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ gdb_test_multiple "ptype struct private_struct" "ptype struct private_struct" {
+ -re "type = class private_struct \{${ws}private:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype struct private_struct"
}
- -re "type = class private_struct \{${ws}private:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
+ -re "type = class private_struct \{${ws}private:${ws}int a;${ws}int b;${ws}public:${ws}private_struct ?& ?operator ?=\\(private_struct const ?&\\);${ws}private_struct\\(private_struct const ?&\\);${ws}private_struct\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
pass "ptype struct private_struct"
}
- -re ".*$gdb_prompt $" { fail "ptype struct private_struct" }
- timeout { fail "ptype struct private_struct (timeout)" ; return }
}
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
+ # Similar test, bigger type.
- send_gdb "ptype struct mixed_protection_struct\n"
- gdb_expect {
- -re "type = struct mixed_protection_struct \{${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl\}$nl$gdb_prompt $" {
+ gdb_test_multiple "ptype struct mixed_protection_struct" "ptype struct mixed_protection_struct" {
+ -re "type = class mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype struct mixed_protection_struct"
}
- -re "type = struct mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype struct mixed_protection_struct (extra public)"
- }
- -re "type = class mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl.*\}$nl$gdb_prompt $" {
+ -re "type = class mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;${ws}public:${ws}mixed_protection_struct ?& ?operator ?=\\(mixed_protection_struct const ?&\\);${ws}mixed_protection_struct\\(mixed_protection_struct const ?&\\);${ws}mixed_protection_struct\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
pass "ptype struct mixed_protection_struct"
}
- -re ".*$gdb_prompt $" { fail "ptype struct mixed_protection_struct" }
- timeout { fail "ptype struct mixed_protection_struct (timeout)" ; return }
}
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
+ # All that again with "class" instead of "struct".
+ # gdb does not care about the difference anyways.
- send_gdb "ptype class public_class\n"
- gdb_expect {
- -re "type = class public_class \{${ws}public:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
+ gdb_test_multiple "ptype class public_class" "ptype class public_class" {
+ -re "type = class public_class \{${ws}public:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class public_class"
}
- -re "type = struct public_class \{${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ -re "type = class public_class \{${ws}public:${ws}int a;${ws}int b;${ws}public_class ?& ?operator ?=\\(public_class const ?&\\);${ws}public_class\\(public_class const ?&\\);${ws}public_class\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
pass "ptype class public_class"
}
- -re ".*$gdb_prompt $" { fail "ptype class public_class" }
- timeout { fail "ptype class public_class (timeout)" ; return }
}
- send_gdb "ptype class protected_class\n"
- gdb_expect {
- -re "type = class protected_class \{${ws}protected:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
+ # Same test, slightly different type.
+
+ gdb_test_multiple "ptype class protected_class" "ptype class protected_class" {
+ -re "type = class protected_class \{${ws}protected:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class protected_class"
}
- -re "type = struct protected_class \{${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- fail "ptype class protected_class"
+ -re "type = class protected_class \{${ws}protected:${ws}int a;${ws}int b;${ws}public:${ws}protected_class ?& ?operator ?=\\(protected_class const ?&\\);${ws}protected_class\\(protected_class const ?&\\);${ws}protected_class\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class protected_class"
}
- -re ".*$gdb_prompt $" { fail "ptype class protected_class" }
- timeout { fail "ptype class protected_class (timeout)" ; return }
}
- # Accept it if gdb just emits a superflous "private:"
- # attribute, since classes default to private and for consistency with
- # structs (where we don't print the "public:" attribute) we don't print
- # the "private:" attribute.
+ # Same test, slightly different type.
+ # The 'private' is optional but gdb always prints it.
- send_gdb "ptype class default_private_class\n"
- gdb_expect {
- -re "type = class default_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
+ gdb_test_multiple "ptype class default_private_class" "ptype class default_private_class" {
+ -re "type = class default_private_class \{${ws}(private:${ws}|)int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class default_private_class"
}
- -re "type = class default_private_class \{${ws}private:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
+ -re "type = class default_private_class \{${ws}(private:${ws}|)int a;${ws}int b;${ws}public:${ws}default_private_class ?& ?operator ?=\\(default_private_class const ?&\\);${ws}default_private_class\\(default_private_class const ?&\\);${ws}default_private_class\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
pass "ptype class default_private_class"
}
- -re ".*$gdb_prompt $" { fail "ptype class default_private_class" }
- timeout { fail "ptype class default_private_class (timeout)" ; return }
}
- send_gdb "ptype class explicit_private_class\n"
- gdb_expect {
- -re "type = class explicit_private_class \{${ws}private:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
+ # Same test, slightly different type.
+
+ gdb_test_multiple "ptype class explicit_private_class" "ptype class explicit_private_class" {
+ -re "type = class explicit_private_class \{${ws}(private:${ws}|)int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class explicit_private_class"
}
- -re "type = class explicit_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class explicit_private_class"
- }
- -re "type = struct explicit_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- fail "ptype class explicit_private_class"
+ -re "type = class explicit_private_class \{${ws}(private:${ws}|)int a;${ws}int b;${ws}public:${ws}explicit_private_class ?& ?operator ?=\\(explicit_private_class const ?&\\);${ws}explicit_private_class\\(explicit_private_class const ?&\\);${ws}explicit_private_class\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class explicit_private_class"
}
- -re ".*$gdb_prompt $" { fail "ptype class explicit_private_class" }
- timeout { fail "ptype class explicit_private_class (timeout)" ; return }
}
- send_gdb "ptype class mixed_protection_class\n"
- gdb_expect {
- -re "type = class mixed_protection_class \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl.*\}$nl$gdb_prompt $" {
+ # Similar test, bigger type.
+
+ gdb_test_multiple "ptype class mixed_protection_class" "ptype struct mixed_protection_class" {
+ -re "type = class mixed_protection_class \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class mixed_protection_class"
}
- -re "type = struct mixed_protection_class \{${ws}int a;${ws}int b;${ws}int c;${ws}int d;${ws}int e;${ws}int f;${ws}int g;${ws}int h;${ws}int i;$nl.*\}$nl$gdb_prompt $" {
- fail "ptype class mixed_protection_class"
+ -re "type = class mixed_protection_class \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;${ws}public:${ws}mixed_protection_class ?& ?operator ?=\\(mixed_protection_class const ?&\\);${ws}mixed_protection_class\\(mixed_protection_class const ?&\\);${ws}mixed_protection_class\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class mixed_protection_class"
}
- -re ".*$gdb_prompt $" { fail "ptype class mixed_protection_class" }
- timeout { fail "ptype class mixed_protection_class (timeout)" ; return }
}
- # This class does not use any C++-specific features, so it's fine for
- # it to print as "struct".
- send_gdb "ptype class A\n"
- gdb_expect {
- -re "type = (class|struct) A \{(${ws}public:|)${ws}int a;${ws}int x;((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\((A const|const A) ?&\\);)|(${ws}A\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
+ # Here are some classes with inheritance.
+
+ # Base class.
+
+ gdb_test_multiple "ptype class A" "ptype class A" {
+ -re "type = class A \{${ws}public:${ws}int a;${ws}int x;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class A"
}
- -re ".*$gdb_prompt $" {
- fail "ptype class A"
- }
- timeout {
- fail "ptype class A (timeout)"
- return
+ -re "type = class A \{${ws}public:${ws}int a;${ws}int x;${ws}A ?& ?operator ?=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class A"
}
}
- send_gdb "ptype class B\n"
- gdb_expect {
- -re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;${ws}B & operator=\\(B const ?&\\);${ws}B\\((B const|const B) ?&\\);${ws}B\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+ # Derived class.
+
+ gdb_test_multiple "ptype class B" "ptype class B" {
+ -re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class B"
}
- -re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;((${ws}B & operator=\\(B const ?&\\);)|(${ws}B\\(B const ?&\\);)|(${ws}B\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class B (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class B"
- }
- timeout {
- fail "ptype class B (timeout)"
- return
+ -re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;${ws}B ?& ?operator ?=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class B"
}
}
- send_gdb "ptype class C\n"
- gdb_expect {
- -re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;${ws}C & operator=\\(C const ?&\\);${ws}C\\((C const|const C) ?&\\);${ws}C\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+ # Derived class.
+
+ gdb_test_multiple "ptype class C" "ptype class C" {
+ -re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class C"
}
- -re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;((${ws}C & operator=\\(C const ?&\\);)|(${ws}C\\(C const ?&\\);)|(${ws}C\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class C (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class C"
- }
- timeout {
- fail "ptype class C (timeout)"
- return
+ -re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;${ws}C ?& ?operator ?=\\(C const ?&\\);${ws}C\\(C const ?&\\);${ws}C\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class C"
}
}
- send_gdb "ptype class D\n"
- gdb_expect {
- -re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+ # Derived class, multiple inheritance.
+
+ gdb_test_multiple "ptype class D" "ptype class D" {
+ -re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class D"
}
- -re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(D const ?&\\);)|(${ws}D\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class D (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class D"
- }
- timeout {
- fail "ptype class D (timeout)"
- return
+ -re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;${ws}D ?& ?operator ?=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class D"
}
}
- send_gdb "ptype class E\n"
- gdb_expect {
- -re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;${ws}E & operator=\\(E const ?&\\);${ws}E\\((E const|const E) ?&\\);${ws}E\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+ # Derived class.
+
+ gdb_test_multiple "ptype class E" "ptype class E" {
+ -re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class E"
}
- -re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;((${ws}E & operator=\\(E const ?&\\);)|(${ws}E\\((E const|const E) ?&\\);)|(${ws}E\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
+ -re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;${ws}E ?& ?operator ?=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
pass "ptype class E"
}
- -re ".*$gdb_prompt $" {
- fail "ptype class E"
- }
- timeout {
- fail "ptype class E (timeout)"
- return
- }
}
- # With g++ 2.x and stabs debug info, we misinterpret static methods
- # whose name matches their argument mangling.
- send_gdb "ptype class Static\n"
- gdb_expect {
- -re "type = (class|struct) Static \{(${ws}public:|)${ws}Static & operator=\\(Static const ?&\\);${ws}Static\\((Static const|const Static) ?&\\);${ws}Static\\((void|)\\);${ws}static void ii\\(int, int\\);${ws}\}$nl$gdb_prompt $" {
+ # This is a break from inheritance tests.
+ #
+ # gcc 2.X with stabs (stabs or stabs+?) used to have a problem with
+ # static methods whose name is the same as their argument mangling.
+
+ gdb_test_multiple "ptype class Static" "ptype class Static" {
+ -re "type = class Static \{${ws}public:${ws}static void ii\\(int, int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class Static"
}
- -re "type = (class|struct) Static \{(${ws}public:|)${ws}static void ii\\(int, int\\);${ws}\}$nl$gdb_prompt $" {
+ -re "type = class Static \{${ws}public:${ws}Static ?& ?operator ?=\\(Static const ?&\\);${ws}Static\\(Static const ?&\\);${ws}Static\\((void|)\\);${ws}static void ii\\(int, int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
pass "ptype class Static"
}
- -re ".*$gdb_prompt $" {
- fail "ptype class Static"
- }
- timeout {
- fail "ptype class Static (timeout)"
- return
+ -re "type = class Static \{${ws}public:${ws}static void ii\\(int, int\\);${ws}Static ?& ?operator ?=\\(Static const ?&\\);${ws}Static\\(Static const ?&\\);${ws}Static\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class Static"
}
}
- send_gdb "ptype class vA\n"
- gdb_expect {
- -re "type = (class|struct) vA \{(${ws}public:|)${ws}int va;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
+ # Here are some virtual inheritance tests.
+
+ gdb_test_multiple "ptype class vA" "ptype class vA" {
+ -re "type = class vA \{${ws}public:${ws}int va;${ws}int vx;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class vA"
}
- -re "type = (class|struct) vA \{(${ws}public:|)${ws}int va;${ws}int vx;${ws}vA & operator=\\(vA const ?&\\);${ws}vA\\((vA const|const vA) ?&\\);${ws}vA\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+ -re "type = class vA \{${ws}public:${ws}int va;${ws}int vx;${ws}vA ?& ?operator ?=\\(vA const ?&\\);${ws}vA\\(vA const ?&\\);${ws}vA\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
pass "ptype class vA"
}
- -re "type = (class|struct) vA \{(${ws}public:|)${ws}int va;${ws}int vx;((${ws}vA & operator=\\(vA const ?&\\);)|(${ws}vA\\(vA const ?&\\);)|(${ws}vA\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vA (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class vA"
- }
- timeout {
- fail "ptype class vA (timeout)"
- return
- }
}
- # Accept the form with embedded GNU style mangled virtual table constructs
- # for now, but with a FIXME. At some future point, gdb should use a
- # portable representation for the virtual table constructs.
+ # With gcc 2, gdb prints the virtual base pointer.
+ # With gcc 3, gdb does not print the virtual base pointer.
+ # drow considers it a gdb bug if gdb prints the vbptr.
- # The format of a g++ virtual base pointer.
- set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
-
- send_gdb "ptype class vB\n"
- gdb_expect {
- -re "type = class vB : public virtual vA \{${ws}public:${ws}int vb;${ws}int vx;${ws}vB & operator=\\(vB const ?&\\);${ws}vB\\((vB const|const vB) ?&\\);${ws}vB\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+ gdb_test_multiple "ptype class vB" "ptype class vB" {
+ -re "type = class vB : public virtual vA \{${ws}private:${ws}vA ?\\* ?_vb.2vA;${ws}public:${ws}int vb;${ws}int vx;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # TODO: kfail this
+ fail "ptype class vB"
+ }
+ -re "type = class vB : public virtual vA \{${ws}public:${ws}int vb;${ws}int vx;$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class vB"
}
- -re "type = class vB : public virtual vA \{${ws}private:${ws}vA \\*${vbptr}vA;${ws}public:${ws}int vb;${ws}int vx;${ws}vB & operator=\\(vB const ?&\\);${ws}vB\\(int, vB const ?&\\);${ws}vB\\(int\\);${ws}\}$nl$gdb_prompt $" {
+ -re "type = class vB : public virtual vA \{${ws}private:${ws}vA ?\\* ?_vb.vA;${ws}public:${ws}int vb;${ws}int vx;${ws}vB ?& ?operator ?=\\(vB const ?&\\);${ws}vB\\(int, ?vB const ?&\\);${ws}vB\\(int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # See the hidden "in-charge" ctor parameter!
+ # TODO: kfail this
setup_xfail "*-*-*"
fail "ptype class vB (FIXME: non-portable virtual table constructs)"
}
- -re "type = class vB : public virtual vA \{${ws}public:${ws}int vb;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vB"
- }
- -re "type = class vB : public virtual vA \{${ws}private:${ws}vA \\*_vb.vA;${ws}public:${ws}int vb;${ws}int vx;((${ws}vB & operator=\\(vB const ?&\\);)|(${ws}vB\\(int, vB const ?&\\);)|(${ws}vB\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vB (FIXME) (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class vB"
- }
- timeout {
- fail "ptype class vB (timeout)"
- return
+ -re "type = class vB : public virtual vA \{${ws}public:${ws}int vb;${ws}int vx;${ws}vB ?& ?operator ?=\\(vB const ?&\\);${ws}vB\\(vB const ?&\\);${ws}vB\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class vB"
}
}
- # Accept the form with embedded GNU style mangled virtual table constructs
- # for now, but with a FIXME. At some future point, gdb should use a
- # portable representation for the virtual table constructs.
+ # Another class with a virtual base.
- send_gdb "ptype class vC\n"
- gdb_expect {
- -re "type = class vC : public virtual vA \{${ws}public:${ws}int vc;${ws}int vx;${ws}vC & operator=\\(vC const ?&\\);${ws}vC\\((vC const|const vC) ?&\\);${ws}vC\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+ gdb_test_multiple "ptype class vC" "ptype class vC" {
+ -re "type = class vC : public virtual vA \{${ws}private:${ws}vA ?\\* ?_vb.2vA;${ws}public:${ws}int vc;${ws}int vx;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # TODO: kfail
+ fail "ptype class vC"
+ }
+ -re "type = class vC : public virtual vA \{${ws}public:${ws}int vc;${ws}int vx;$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class vC"
}
- -re "type = class vC : public virtual vA \{${ws}private:${ws}vA \\*${vbptr}vA;${ws}public:${ws}int vc;${ws}int vx;${ws}vC & operator=\\(vC const ?&\\);${ws}vC\\(int, vC const ?&\\);${ws}vC\\(int\\);${ws}\}$nl$gdb_prompt $" {
+ -re "type = class vC : public virtual vA \{${ws}private:${ws}vA ?\\* ?_vb.vA;${ws}public:${ws}int vc;${ws}int vx;${ws}vC ?& ?operator ?=\\(vC const ?&\\);${ws}vC\\(int, ?vC const ?&\\);${ws}vC\\(int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # See the hidden "in-charge" ctor parameter!
+ # TODO: kfail
setup_xfail "*-*-*"
fail "ptype class vC (FIXME: non-portable virtual table constructs)"
}
- -re "type = class vC : public virtual vA \{${ws}public:${ws}int vc;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vC"
- }
- -re "type = class vC : public virtual vA \{${ws}private:${ws}vA \\*_vb.vA;${ws}public:${ws}int vc;${ws}int vx;((${ws}vC & operator=\\(vC const ?&\\);)|(${ws}vC\\(int, vC const ?&\\);)|(${ws}vC\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vC (FIXME) (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class vC"
- }
- timeout {
- fail "ptype class vC (timeout)"
- return
+ -re "type = class vC : public virtual vA \{${ws}public:${ws}int vc;${ws}int vx;${ws}vC ?& ?operator ?=\\(vC const ?&\\);${ws}vC\\(vC const ?&\\);${ws}vC\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class vC"
}
}
- # Accept the form with embedded GNU style mangled virtual table constructs
- # for now, but with a FIXME. At some future point, gdb should use a
- # portable representation for the virtual table constructs.
+ # The classic diamond inheritance.
- send_gdb "ptype class vD\n"
- gdb_expect {
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;${ws}vD & operator=\\(vD const ?&\\);${ws}vD\\((vD const|const vD) ?&\\);${ws}vD\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+ gdb_test_multiple "ptype class vD" "ptype class vD" {
+ -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC ?\\* ?_vb.2vC;${ws}vB ?\\* ?_vb.2vB;${ws}public:${ws}int vd;${ws}int vx;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # TODO: kfail
+ fail "ptype class vD"
+ }
+ -re "type = class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class vD"
}
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;${ws}vD & operator=\\(vD const ?&\\);${ws}vD\\(int, vD const ?&\\);${ws}vD\\(int\\);${ws}\}$nl$gdb_prompt $" {
+ -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC ?\\* ?_vb.vC;${ws}vB ?\\* ?_vb.vB;${ws}public:${ws}int vd;${ws}int vx;${ws}vD ?& ?operator ?=\\(vD const ?&\\);${ws}vD\\(int, ?vD const ?&\\);${ws}vD\\(int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # See the hidden "in-charge" ctor parameter!
+ # TODO: kfail
setup_xfail "*-*-*"
fail "ptype class vD (FIXME: non-portable virtual table constructs)"
}
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vD"
- }
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*_vb.vC;${ws}vB \\*_vb.vB;${ws}public:${ws}int vd;${ws}int vx;((${ws}vD & operator=\\(vD const ?&\\);)|(${ws}vD\\(int, vD const ?&\\);)|(${ws}vD\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vD (FIXME) (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class vD"
- }
- timeout {
- fail "ptype class vD (timeout)"
- return
+ -re "type = class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;${ws}vD ?& ?operator ?=\\(vD const ?&\\);${ws}vD\\(vD const ?&\\);${ws}vD\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class vD"
}
}
- # Accept the form with embedded GNU style mangled virtual table constructs
- # for now, but with a FIXME. At some future point, gdb should use a
- # portable representation for the virtual table constructs.
+ # One more case of virtual derivation.
- send_gdb "ptype class vE\n"
- gdb_expect {
- -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;${ws}vE & operator=\\(vE const ?&\\);${ws}vE\\((vE const|const vE) ?&\\);${ws}vE\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+ gdb_test_multiple "ptype class vE" "ptype class vE" {
+ -re "type = class vE : public virtual vD \{${ws}private:${ws}vD ?\\* ?_vb.2vD;${ws}public:${ws}int ve;${ws}int vx;$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # TODO: kfail
+ fail "ptype class vE"
+ }
+ -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class vE"
}
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;${ws}vE & operator=\\(vE const ?&\\);${ws}vE\\(int, vE const ?&\\);${ws}vE\\(int\\);${ws}\}$nl$gdb_prompt $" {
+ -re "type = class vE : public virtual vD \{${ws}private:${ws}vD ?\\* ?_vb.vD;${ws}public:${ws}int ve;${ws}int vx;${ws}vE ?& ?operator ?=\\(vE const ?&\\);${ws}vE\\(int, ?vE const ?&\\);${ws}vE\\(int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # See the hidden "in-charge" ctor parameter!
+ # TODO: kfail
setup_xfail "*-*-*"
fail "ptype class vE (FIXME: non-portable virtual table constructs)"
}
- -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vE"
- }
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*_vb.vD;${ws}public:${ws}int ve;${ws}int vx;((${ws}vE & operator=\\(vE const ?&\\);)|(${ws}vE\\(int, vE const ?&\\);)|(${ws}vE\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vE (FIXME) (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class vE"
- }
- timeout {
- fail "ptype class vE (timeout)"
- return
+ -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;${ws}vE ?& ?operator ?=\\(vE const ?&\\);${ws}vE\\(vE const ?&\\);${ws}vE\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class vE"
}
}
- send_gdb "ptype class Base1\n"
- gdb_expect {
- -re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1 & operator=\\(Base1 const ?&\\);${ws}Base1\\(((Base1 const)|(const Base1)) ?&\\);${ws}Base1\\(int\\);${ws}\}$nl$gdb_prompt $" {
+ # Another inheritance series.
+
+ gdb_test_multiple "ptype class Base1" "ptype class Base1" {
+ -re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1\\(int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class Base1"
}
- -re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1\\(int\\);${ws}\}$nl$gdb_prompt $" {
+ -re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1 ?& ?operator ?=\\(Base1 const ?&\\);${ws}Base1\\(Base1 const ?&\\);${ws}Base1\\(int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
pass "ptype class Base1"
}
- -re "type = class Base1 \{${ws}public:${ws}int x;((${ws}Base1 & operator=\\(Base1 const ?&\\);)|(${ws}Base1\\(Base1 const ?&\\);)|(${ws}Base1\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Base1 (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class Base1"
- }
- timeout {
- fail "ptype class Base1 (timeout)"
- return
+ -re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1\\(int\\);${ws}Base1 ?& ?operator ?=\\(Base1 const ?&\\);${ws}Base1\\(Base1 const ?&\\);$nl\}$nl$gdb_prompt $" {
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class Base1"
}
}
- send_gdb "ptype class Foo\n"
- gdb_expect {
- -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;\r\n${ws}Foo\\(int, int\\);${ws}int operator!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);$nl\}$nl$gdb_prompt $" {
- pass "ptype class Foo"
- }
- -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo & operator=\\(Foo const ?&\\);${ws}Foo\\((Foo const|const Foo) ?&\\);${ws}Foo\\(int, int\\);${ws}int operator!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);${ws}\}$nl$gdb_prompt $" {
+ # The second base class.
+
+ gdb_test_multiple "ptype class Foo" "ptype class Foo" {
+ -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo\\(int, int\\);${ws}int operator ?!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class Foo"
}
- -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;((${ws}Foo & operator=\\(Foo const ?&\\);)|(${ws}Foo\\(Foo const ?&\\);)|(${ws}Foo\\(int, int\\);)|(${ws}int operator!\\((void|)\\);)|(${ws}int operator int\\((void|)\\);)|(${ws}int times\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Foo (obsolescent gcc or gdb)"
+ -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo ?& ?operator ?=\\(Foo const ?&\\);${ws}Foo\\(Foo const ?&\\);${ws}Foo\\(int, int\\);${ws}int operator ?!\\((void|)\\);${ws}int operator int\\((void|)\\);${ws}int times\\(int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # TODO: "int operator int()" is a bug
+ # kfail "gdb/1497" "ptype class Foo"
+ pass "ptype class Foo"
}
- -re ".*$gdb_prompt $" {
- fail "ptype class Foo"
+ -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo ?& ?operator ?=\\(Foo const ?&\\);${ws}Foo\\(Foo const ?&\\);${ws}Foo\\(int, int\\);${ws}int operator ?!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ pass "ptype class Foo"
}
- timeout {
- fail "ptype class Foo (timeout)"
- return
+ -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo\\(int, int\\);${ws}int operator ?!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);${ws}Foo ?& ?operator ?=\\(Foo const ?&\\);${ws}Foo\\(Foo const ?&\\);$nl\}$nl$gdb_prompt $" {
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class Foo"
}
}
- send_gdb "ptype class Bar\n"
- gdb_expect {
- -re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;${ws}Bar & operator=\\(Bar const ?&\\);${ws}Bar\\((Bar const|const Bar) ?&\\);${ws}Bar\\(int, int, int\\);${ws}\}$nl$gdb_prompt $" {
+ # A multiple inheritance derived class.
+
+ gdb_test_multiple "ptype class Bar" "ptype class Bar" {
+ -re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;${ws}Bar\\(int, int, int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
pass "ptype class Bar"
}
- -re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;((${ws}Bar & operator=\\(Bar const ?&\\);)|(${ws}Bar\\(Bar const ?&\\);)|(${ws}Bar\\(int, int, int\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Bar (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class Bar"
+ -re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;${ws}Bar ?& ?operator ?=\\(Bar const ?&\\);${ws}Bar\\(Bar const ?&\\);${ws}Bar\\(int, int, int\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ pass "ptype class Bar"
}
- timeout {
- fail "ptype class Bar (timeout)"
- return
+ -re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;${ws}Bar\\(int, int, int\\);${ws}Bar ?& ?operator ?=\\(Bar const ?&\\);${ws}Bar\\(Bar const ?&\\);$nl\}$nl$gdb_prompt $" {
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype class Bar"
}
}
}
-#
# Test simple access to class members.
-#
+# TODO: these test names are gross!
+# Just let the test name default.
proc test_non_inherited_member_access {} {
global gdb_prompt
# Print non-inherited members of g_A.
-
gdb_test "print g_A.a" ".* = 1" "g_A.a incorrect"
-
gdb_test "print g_A.x" ".* = 2" "g_A.x incorrect"
# Print non-inherited members of g_B.
-
gdb_test "print g_B.b" ".* = 5" "g_B.b incorrect"
-
gdb_test "print g_B.x" ".* = 6" "g_B.x incorrect"
# Print non-inherited members of g_C.
-
gdb_test "print g_C.c" ".* = 9" "g_C.c incorrect"
-
gdb_test "print g_C.x" ".* = 10" "g_C.x incorrect"
# Print non-inherited members of g_D.
-
gdb_test "print g_D.d" ".* = 19" "g_D.d incorrect"
-
gdb_test "print g_D.x" ".* = 20" "g_D.x incorrect"
# Print non-inherited members of g_E.
-
gdb_test "print g_E.e" ".* = 31" "g_E.e incorrect"
-
gdb_test "print g_E.x" ".* = 32" "g_E.x incorrect"
}
-#
-# Try access to non-members that are members of another class.
-# Should give errors.
-#
+# Test access to members of other classes.
+# gdb should refuse to print them.
+# (I feel old -- I remember when this was legal in C -- chastain).
+# TODO: Again, change the silly test names.
proc test_wrong_class_members {} {
global gdb_prompt
gdb_test "print g_A.b" "There is no member( or method|) named b." "print g_A.b should be error"
-
gdb_test "print g_B.c" "There is no member( or method|) named c." "print g_B.c should be error"
-
gdb_test "print g_B.d" "There is no member( or method|) named d." "print g_B.d should be error"
-
gdb_test "print g_C.b" "There is no member( or method|) named b." "print g_C.b should be error"
-
gdb_test "print g_C.d" "There is no member( or method|) named d." "print g_C.d should be error"
-
gdb_test "print g_D.e" "There is no member( or method|) named e." "print g_D.e should be error"
}
-#
-# Try access to non-members that are not members of any class.
-# Should give errors.
-#
+# Test access to names that are not members of any class.
+# TODO: test names again.
proc test_nonexistent_members {} {
global gdb_prompt
gdb_test "print g_A.y" "There is no member( or method|) named y." "print g_A.y should be error"
-
gdb_test "print g_B.z" "There is no member( or method|) named z." "print g_B.z should be error"
-
gdb_test "print g_C.q" "There is no member( or method|) named q." "print g_C.q should be error"
-
gdb_test "print g_D.p" "There is no member( or method|) named p." "print g_D.p should be error"
}
-#
# Call a method that expects a base class parameter with base, inherited,
# and unrelated class arguments.
-#
proc test_method_param_class {} {
gdb_test "call class_param.Aptr_a (&g_A)" ".* = 1" "base class param->a"
@@ -606,62 +616,65 @@ proc test_method_param_class {} {
gdb_test "call class_param.Aval_a (foo)" "Cannot resolve .*" "unrelated class param"
}
-#
# Examine a class with an enum field.
-#
proc test_enums {} {
global gdb_prompt
- global hp_aCC_compiler
+ global nl
+ global ws
# print the object
- send_gdb "print obj_with_enum\n"
- gdb_expect {
- -re "\\$\[0-9\]* = \\{priv_enum = red, x = 0\\}.*$gdb_prompt $" { pass "print obj_with_enum (1)" }
- -re "$gdb_prompt $" { fail "print obj_with_enum (1)" }
- timeout { fail "(timeout) print obj_with_enum (1)" }
- }
- send_gdb "next\n"
- gdb_expect {
- -re "$gdb_prompt $" { pass "next" }
- timeout { fail "(timeout) next" }
- }
+ gdb_test "print obj_with_enum" \
+ "\\$\[0-9\]+ = \{priv_enum = red, x = 0\}" \
+ "print obj_with_enum (1)"
+
+ # advance one line
+
+ gdb_test "next" ""
# print the object again
- send_gdb "print obj_with_enum\n"
- gdb_expect {
- -re "\\$\[0-9\]* = \\{priv_enum = green, x = 0\\}.*$gdb_prompt $" { pass "print obj_with_enum (2)" }
- -re "$gdb_prompt $" { fail "print obj_with_enum (2)" }
- timeout { fail "(timeout) print obj_with_enum (2)" }
- }
- # print out the enum member
- send_gdb "print obj_with_enum.priv_enum\n"
- gdb_expect {
- -re "\\$\[0-9\]* = green.*$gdb_prompt $" { pass "print obj_with_enum.priv_enum" }
- -re "$gdb_prompt $" { fail "print obj_with_enum.priv_enum" }
- timeout { fail "(timeout) print obj_with_enum.priv_enum" }
- }
+ gdb_test "print obj_with_enum" \
+ "\\$\[0-9\]+ = \{priv_enum = green, x = 0\}" \
+ "print obj_with_enum (2)"
+
+ # print the enum member
+
+ gdb_test "print obj_with_enum.priv_enum" "\\$\[0-9\]+ = green"
# ptype on the enum member
- # The third success case is a little dubious, but it's not clear what
- # ought to be required of a ptype on a private enum... -sts 19990324
- send_gdb "ptype obj_with_enum.priv_enum\n"
- gdb_expect {
- -re "type = enum ClassWithEnum::PrivEnum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
- -re "type = enum PrivEnum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
- -re "type = enum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
- -re "$gdb_prompt $" { fail "ptype obj_with_enum.priv_enum" }
- timeout { fail "(timeout) ptype obj_with_enum.priv_enum" }
+
+ gdb_test_multiple "ptype obj_with_enum.priv_enum" "ptype obj_with_enum.priv_enum" {
+ -re "type = enum ClassWithEnum::PrivEnum \{ ?red, green, blue, yellow = 42 ?\}$nl$gdb_prompt $" {
+ pass "ptype obj_with_enum.priv_enum"
+ }
+ -re "type = enum PrivEnum \{ ?red, green, blue, yellow = 42 ?\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ pass "ptype obj_with_enum.priv_enum"
+ }
+ -re "type = enum \{ ?red, green, blue, yellow = 42 ?\}$nl$gdb_prompt $" {
+ # This case case is a little dubious, but it's not clear what
+ # ought to be required of a ptype on a private enum...
+ # -sts 19990324
+ #
+ # It bugs me that this happens with gcc 3.
+ # -- chastain 2003-12-30
+ #
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "ptype obj_with_enum.priv_enum"
+ }
}
# ptype on the object
- send_gdb "ptype obj_with_enum\n"
- gdb_expect {
- -re "type = class ClassWithEnum \\{\r\n\[ \t\]*public:\r\n\[ \t\]*(enum |)ClassWithEnum::PrivEnum priv_enum;\r\n\[ \t\]*int x;\r\n\\}\r\n$gdb_prompt $" { pass "ptype obj_with_enum" }
- -re "type = class ClassWithEnum \\{\r\n\[ \t\]*public:\r\n\[ \t\]*(enum |)PrivEnum priv_enum;\r\n\[ \t\]*int x;.*\\}\r\n$gdb_prompt $"
- {
+ gdb_test_multiple "ptype obj_with_enum" "ptype obj_with_enum" {
+ -re "type = class ClassWithEnum \{${ws}public:${ws}(enum |)ClassWithEnum::PrivEnum priv_enum;${ws}int x;$nl\}$nl$gdb_prompt $" {
+ pass "ptype obj_with_enum"
+ }
+ -re "type = class ClassWithEnum \{${ws}public:${ws}(enum |)PrivEnum priv_enum;${ws}int x;$nl\}$nl$gdb_prompt $" {
# NOTE: carlton/2003-02-28: One could certainly argue that
# this output is acceptable: PrivEnum is a member of
# ClassWithEnum, so there's no need to explicitly qualify
@@ -670,150 +683,85 @@ proc test_enums {} {
# of ClassWithEnum, so we do that output for a bad reason
# instead of a good reason. Under stabs, we probably
# can't get this right; under DWARF-2, we can.
+ #
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
kfail "gdb/57" "ptype obj_with_enum"
}
- -re "$gdb_prompt $" { fail "ptype obj_with_enum" }
- timeout { fail "(timeout) ptype obj_with_enum" }
+ -re "type = class ClassWithEnum \{${ws}public:${ws}(enum |)PrivEnum priv_enum;${ws}int x;${ws}ClassWithEnum ?& ?operator ?=\\(ClassWithEnum const ?&\\);${ws}ClassWithEnum\\(ClassWithEnum const ?&\\);${ws}ClassWithEnum\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ kfail "gdb/57" "ptype obj_with_enum"
+ }
+ -re "type = class ClassWithEnum \{${ws}public:${ws}(enum |)ClassWithEnum::PrivEnum priv_enum;${ws}int x;${ws}ClassWithEnum ?& ?operator ?=\\(ClassWithEnum const ?&\\);${ws}ClassWithEnum\\(ClassWithEnum const ?&\\);${ws}ClassWithEnum\\((void|)\\);$nl\}$nl$gdb_prompt $" {
+ # I think this is a PASS, but only carlton knows for sure.
+ # -- chastain 2003-12-30
+ #
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ fail "ptype obj_with_enum"
+ }
}
- # We'll do this test twice, because of a parser bug: see
- # PR gdb/826.
+ # I'll do this test two different ways, because of a parser bug.
+ # See PR gdb/1588.
- send_gdb "print (ClassWithEnum::PrivEnum) 42\n"
- gdb_expect {
- -re "\\$\[0-9\]* = yellow.*$gdb_prompt $" { pass "print (ClassWithEnum::PrivEnum) 42" }
- -re "A parse error in expression, near `42'.\r\n$gdb_prompt $" {
- # bison 1.35
- kfail "gdb/826" "print (ClassWithEnum::PrivEnum) 42"
+ gdb_test_multiple "print (ClassWithEnum::PrivEnum) 42" "print (ClassWithEnum::PrivEnum) 42" {
+ -re "\\$\[0-9\]+ = yellow$nl$gdb_prompt $" {
+ pass "print (ClassWithEnum::PrivEnum) 42"
}
- -re "A syntax error in expression, near `42'.\r\n$gdb_prompt $" {
- # bison 1.875
- kfail "gdb/826" "print (ClassWithEnum::PrivEnum) 42"
+ -re "A (parse|syntax) error in expression, near `42'.$nl$gdb_prompt $" {
+ # "parse error" is bison 1.35.
+ # "syntax error" is bison 1.875.
+ kfail "gdb/1588" "print (ClassWithEnum::PrivEnum) 42"
}
- -re "$gdb_prompt $" { fail "print (ClassWithEnum::PrivEnum) 42" }
- timeout { fail "(timeout) print (ClassWithEnum::PrivEnum) 42" }
}
- send_gdb "print ('ClassWithEnum::PrivEnum') 42\n"
- gdb_expect {
- -re "\\$\[0-9\]* = yellow.*$gdb_prompt $" { pass "print ('ClassWithEnum::PrivEnum') 42" }
- -re "No symbol \"ClassWithEnum::PrivEnum\" in current context.\r\n$gdb_prompt $"
- { kfail "gdb/57" "print ('ClassWithEnum::PrivEnum') 42" }
- -re "$gdb_prompt $" { fail "print ('ClassWithEnum::PrivEnum') 42" }
- timeout { fail "(timeout) print ('ClassWithEnum::PrivEnum') 42" }
+ gdb_test_multiple "print ('ClassWithEnum::PrivEnum') 42" "print ('ClassWithEnum::PrivEnum') 42" {
+ -re "\\$\[0-9\]+ = yellow$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "print ('ClassWithEnum::PrivEnum') 42"
+ }
+ -re "No symbol \"ClassWithEnum::PrivEnum\" in current context.$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ kfail "gdb/57" "print ('ClassWithEnum::PrivEnum') 42"
+ }
}
}
-#
# Pointers to class members
-#
proc test_pointers_to_class_members {} {
global gdb_prompt
- global decimal
- global nl
-
- gdb_test "print Bar::z" ".* = .int\[ \]*\[( \]*Bar::&\[)\]+\[ \]*Bar::z" "print Bar::z"
- gdb_test "print &Foo::x" ".* = .int\[ \]*\[( \]*Foo::\[*)\]+\[ \]*&Foo::x" "print &Foo::x"
-
- gdb_test "print (int)&Foo::x" ".* = 0" "print (int)&Foo::x"
-
- send_gdb "print (int)&Bar::y == 2*sizeof(int)\n"
- gdb_expect {
- -re ".* = true$nl$gdb_prompt $" {
- pass "print (int)&Bar::y == 2*sizeof(int)"
- }
- -re "There is no field named y.*$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "print (int)&Bar::y == 2*sizeof(int)"
- }
- -re ".*$gdb_prompt $" { fail "print (int)&Bar::y == 2*sizeof(int)" }
- timeout { fail "print (int)&Bar::y == 2*sizeof(int) (timeout)" ; return }
- }
-
- send_gdb "next 2\n"
- setup_xfail "*-*-*"
- gdb_expect {
- -re "$decimal\[ \t\]+inheritance3 \[)(\]+;$nl$gdb_prompt $" {}
- -re ".*$gdb_prompt $" { fail "next to inheritance3" ; return }
- }
- clear_xfail "*-*-*"
-
- gdb_test "print (int)pmi == sizeof(int)" ".* = false" "print (int)pmi == sizeof(int)"
+ gdb_test "print Bar::z" "\\$\[0-9\]+ = \\(int ?\\( ?Bar::& ?\\) ?\\) ?Bar::z"
+ gdb_test "print &Foo::x" "\\$\[0-9\]+ = \\(int ?\\( ?Foo::\\* ?\\) ?\\) ?&Foo::x"
+ gdb_test "print (int)&Foo::x" "\\$\[0-9\]+ = 0"
+ gdb_test "print (int)&Bar::y == 2*sizeof(int)" "\\$\[0-9\]+ = true"
+
+ # TODO: this is a bogus test. It's looking at a variable that
+ # has not even been declared yet, so it's accessing random junk
+ # on the stack and comparing that it's NOT equal to a specific
+ # value. It's been like this since gdb 4.10 in 1993!
+ # -- chastain 2004-01-01
+ gdb_test "print (int)pmi == sizeof(int)" ".* = false"
}
-#
# Test static members.
-#
proc test_static_members {} {
global gdb_prompt
global hex
- global nl
-
- send_gdb "print Foo::st\n"
- gdb_expect {
- -re ".* = 100$nl$gdb_prompt $" {
- pass "print Foo::st"
- }
- -re "There is no field named st.*$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "print Foo::st"
- }
- -re ".*$gdb_prompt $" { fail "print Foo::st" }
- timeout { fail "print Foo::st (timeout)" ; return }
- }
-
- send_gdb "set foo.st = 200\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- }
-
- send_gdb "print bar.st\n"
- gdb_expect {
- -re ".* = 200$nl$gdb_prompt $" {
- pass "print bar.st"
- }
- -re "There is no member( or method|) named st.*$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "print bar.st"
- }
- -re ".*$gdb_prompt $" { fail "print bar.st" }
- timeout { fail "print bar.st (timeout)" ; return }
- }
-
- send_gdb "print &foo.st\n"
- gdb_expect {
- -re ".* = .int \[*)\]+ $hex$nl$gdb_prompt $" {
- pass "print &foo.st"
- }
- -re "There is no member( or method|) named st.*$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "print &foo.st"
- }
- -re ".*$gdb_prompt $" { fail "print &foo.st" }
- timeout { fail "print &foo.st (timeout)" ; return }
- }
-
- set got_bar_st 0
- send_gdb "print &Bar::st\n"
- gdb_expect {
- -re ".* = .int \[*)\]+ $hex$nl$gdb_prompt $" {
- pass "print &Bar::st"
- set got_bar_st 1
- }
- -re "There is no field named st.*$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "print &Bar::st"
- }
- -re ".*$gdb_prompt $" { fail "print &Bar::st" }
- timeout { fail "print &Bar::st (timeout)" ; return }
- }
- if $got_bar_st then {
- gdb_test "print *\$" ".* = 200" "print *\$"
- }
+ gdb_test "print Foo::st" "\\$\[0-9\]+ = 100"
+ gdb_test "set foo.st = 200" "" ""
+ gdb_test "print bar.st" "\\$\[0-9\]+ = 200"
+ gdb_test "print &foo.st" "\\$\[0-9\]+ = \\(int ?\\*\\) $hex"
+ gdb_test "print &Bar::st" "\\$\[0-9\]+ = \\(int ?\\*\\) $hex"
+ gdb_test "print *\$" "\\$\[0-9\]+ = 200"
gdb_test "set print static-members off" ""
gdb_test "print csi" \
@@ -840,6 +788,7 @@ proc do_tests {} {
global srcdir
global binfile
global gdb_prompt
+ global nl
set prms_id 0
set bug_id 0
@@ -851,74 +800,71 @@ proc do_tests {} {
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $binfile
- send_gdb "set language c++\n"
- gdb_expect -re "$gdb_prompt $"
- send_gdb "set width 0\n"
- gdb_expect -re "$gdb_prompt $"
-
- runto_main
- test_ptype_class_objects
-
- if [ runto 'inheritance2' ] then {
- test_non_inherited_member_access
- test_wrong_class_members
- test_nonexistent_members
- test_method_param_class
- }
-
- gdb_breakpoint enums2
- if [ gdb_continue "enums2(\\(\\)|)" ]==0 then {
- gdb_test "finish" "" ""
- test_enums
- }
-
- if [istarget "mips-idt-*"] then {
- # Restart because IDT/SIM runs out of file descriptors.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
- }
-
- if [ runto_main ] then {
- test_pointers_to_class_members
- test_static_members
- }
+ gdb_test "set language c++" "" ""
+ gdb_test "set width 0" "" ""
- if [istarget "mips-idt-*"] then {
- # Restart because IDT/SIM runs out of file descriptors.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
+ if ![runto_main ] then {
+ perror "couldn't run to breakpoint"
+ return
}
- if [ runto marker_reg1 ] then {
-
- gdb_test "finish" "Run till exit from.*" "finish from marker_reg1"
+ gdb_breakpoint inheritance2
+ gdb_test "continue" ".*Breakpoint .* inheritance2.*" ""
- send_gdb "print v.method ()\n"
- gdb_expect {
- -re "= 82.*$gdb_prompt $" {
- pass "calling method for small class"
- }
- -re "Address requested for identifier .v. which is in register.*$gdb_prompt $" {
- setup_xfail "*-*-*" 2972
- fail "calling method for small class"
- }
- -re ".*$gdb_prompt $" { fail "calling method for small class" }
- timeout { fail "calling method for small class (timeout)" }
- eof { fail "calling method for small class (eof)" }
- }
- }
+ test_ptype_class_objects
+ test_non_inherited_member_access
+ test_wrong_class_members
+ test_nonexistent_members
+ test_method_param_class
+ gdb_breakpoint enums2
+ gdb_test "continue" ".*Breakpoint .* enums2.*" "continue to enums2(\\(\\)|)"
+ gdb_test "finish" "" ""
+ test_enums
+
+ gdb_test "finish" "" ""
+ test_pointers_to_class_members
+ test_static_members
+
+ # Now some random tests that were just thrown in here.
+
+ gdb_breakpoint marker_reg1
+ gdb_test "continue" ".*Breakpoint .* marker_reg1.*" ""
+ gdb_test "finish" "Run till exit from.*" "finish from marker_reg1"
+
+ # This class is so small that an instance of it can fit in a register.
+ # When gdb tries to call a method, it gets embarrassed about taking
+ # the address of a register.
+ #
+ # TODO: I think that message should be a PASS, not an XFAIL.
+ # gdb prints an informative message and declines to do something
+ # impossible.
+ #
+ # The method call actually succeeds if the compiler allocates very
+ # small classes in memory instead of registers. So this test does
+ # not tell us anything interesting if the call succeeds.
+ #
+ # -- chastain 2003-12-31
+ gdb_test_multiple "print v.method ()" "calling method for small class" {
+ -re "\\$\[0-9\]+ = 82$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
+ pass "calling method for small class"
+ }
+ -re "Address requested for identifier \"v\" which is in register .*$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ setup_xfail "*-*-*" 2972
+ fail "calling method for small class"
+ }
+ }
+
+ # This is a random v2 demangling test.
+ # This is redundant with existing tests in demangle.exp.
+ # TODO: Just remove this.
+ gdb_test "maint demangle inheritance1__Fv" "inheritance1\\(void\\)" "demangle"
}
do_tests
-
-send_gdb "maint demangle inheritance1__Fv\n"
-gdb_expect {
- -re "inheritance1\\(void\\).*$gdb_prompt $" { pass "demangle" }
- -re ".*$gdb_prompt $" { fail "demangle" }
- timeout { fail "(timeout) demangle" }
-}
diff --git a/gdb/testsuite/gdb.cp/cplusfuncs.exp b/gdb/testsuite/gdb.cp/cplusfuncs.exp
index 0a5e1b3f0a1..a509afb54e8 100644
--- a/gdb/testsuite/gdb.cp/cplusfuncs.exp
+++ b/gdb/testsuite/gdb.cp/cplusfuncs.exp
@@ -1,4 +1,5 @@
-# Copyright 1992, 1997, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1992, 1997, 1999, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Fred Fish. (fnf@cygnus.com)
# Adapted for g++ 3.0 ABI by Michael Chastain. (chastain@redhat.com)
diff --git a/gdb/testsuite/gdb.cp/ctti.exp b/gdb/testsuite/gdb.cp/ctti.exp
index 96e9fcff81a..a2a2e0a3245 100644
--- a/gdb/testsuite/gdb.cp/ctti.exp
+++ b/gdb/testsuite/gdb.cp/ctti.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2001, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,256 +14,194 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-
# This file is part of the gdb testsuite
# file written by Elena Zannoni (ezannoni@cygnus.com)
+# rewritten by Michael Chastain (mec.gnu@mindspring.com)
#
# source files cttiadd.cc, cttiadd1.cc, cttiadd2.cc, cttiadd3.cc
-#
+# Call to template instantiations.
if $tracelevel then {
- strace $tracelevel
+ strace $tracelevel
}
if { [skip_cplus_tests] } { continue }
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
set testfile "cttiadd"
-set srcfile ${testfile}.cc
-set srcfile1 ${testfile}1.cc
-set srcfile2 ${testfile}2.cc
-set srcfile3 ${testfile}3.cc
-set binfile ${objdir}/${subdir}/${testfile}
+set srcfile "${srcdir}/${subdir}/${testfile}.cc"
+set srcfile1 "${srcdir}/${subdir}/${testfile}1.cc"
+set srcfile2 "${srcdir}/${subdir}/${testfile}2.cc"
+set srcfile3 "${srcdir}/${subdir}/${testfile}3.cc"
+set objfile "${objdir}/${subdir}/${testfile}.o"
+set objfile1 "${objdir}/${subdir}/${testfile}1.o"
+set objfile2 "${objdir}/${subdir}/${testfile}2.o"
+set objfile3 "${objdir}/${subdir}/${testfile}3.o"
+set binfile "${objdir}/${subdir}/${testfile}"
+
+if { [gdb_compile "${srcfile}" "${objfile}" object {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
-if [get_compiler_info ${binfile} "c++"] {
- return -1;
+if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { $gcc_compiled } then { continue }
+if { [gdb_compile "${srcfile2}" "${objfile2}" object {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
-#if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3}" "${binfile}" executable {debug c++}] != "" } {
-# gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-#}
+if { [gdb_compile "${srcfile3}" "${objfile3}" object {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
-set cmdline "$CXX_FOR_TARGET ${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3} -g -o ${binfile}"
+if { [gdb_compile "${objfile} ${objfile1} ${objfile2} ${objfile3}" "${binfile}" executable {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
-remote_exec build $cmdline
+if [get_compiler_info ${binfile} "c++"] {
+ return -1;
+}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-
-
if ![runto_main] then {
perror "couldn't run to breakpoint"
continue
}
+gdb_breakpoint [gdb_get_line_number "marker add1"]
+gdb_continue_to_breakpoint "marker add1"
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*i = 2;.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
-
-
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*f = 4.5;.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
-
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*c = add\\(c, c\\);.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
-
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*i = add\\(i, i\\);.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
-
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*f = add\\(f, f\\);.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
-
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*add1\\(\\);.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
+gdb_test "print c" "\\$\[0-9\]+ = 194 .*"
+gdb_test "print f" "\\$\[0-9\]+ = 9"
+gdb_test "print i" "\\$\[0-9\]+ = 4"
-send_gdb "print c\n"
-gdb_expect {
- -re ".$decimal = -62.*\r\n$gdb_prompt $" {
- pass "print value of c"
- }
- -re ".*$gdb_prompt $" { fail "print value of c" }
- timeout { fail "(timeout) print value of c" }
- }
+# TODO: this needs more work before actually deploying it.
+# So bail out here.
+if { [ test_compiler_info gcc-*] } then { continue }
-send_gdb "print f\n"
-gdb_expect {
- -re ".$decimal = 9\r\n$gdb_prompt $" {
- pass "print value of f"
- }
- -re ".*$gdb_prompt $" { fail "print value of f" }
- timeout { fail "(timeout) print value of f" }
- }
-
-
-send_gdb "print i\n"
-gdb_expect {
- -re ".$decimal = 4\r\n$gdb_prompt $" {
- pass "print value of i"
- }
- -re ".*$gdb_prompt $" { fail "print value of i" }
- timeout { fail "(timeout) print value of i" }
- }
-
-
-
-send_gdb "print add<int>(2,2)\n"
-gdb_expect {
- -re ".$decimal = 4\r\n$gdb_prompt $" {
- pass "print value of add<int>(2,2)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add<int>(2,2)" }
- timeout { fail "(timeout) print value of add<int>(2,2)" }
- }
-
-send_gdb "print add<float>(2.3,2.3)\n"
-gdb_expect {
- -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
- pass "print value of add<float>(2.3,2.3)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add<float>(2.3,2.3)" }
- timeout { fail "(timeout) print value of add<float>(2.3,2.3)" }
- }
-
-send_gdb "print add<char>('A','A')\n"
-gdb_expect {
- -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
- pass "print value of add<char>('A','A')"
- }
- -re ".*$gdb_prompt $" { fail "print value of add<char>('A','A')" }
- timeout { fail "(timeout) print value of add<char>('A','A')" }
- }
-
+gdb_test_multiple "print add<int>(2,2)" "print add<int>(2,2)" {
+ -re "\\$\[0-9\]+ = 4\r\n$gdb_prompt $" {
+ pass "print add<int>(2,2)"
+ }
+ -re "No symbol \"add<int>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add<int>(2,2)"
+ }
+}
-send_gdb "print add2<int>(2,2)\n"
-gdb_expect {
- -re ".$decimal = 4\r\n$gdb_prompt $" {
- pass "print value of add2<int>(2,2)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add2<int>(2,2)" }
- timeout { fail "(timeout) print value of add2<int>(2,2)" }
- }
+# Note: 2.25 and 4.5 are exactly representable in IEEE-ish formats
+gdb_test_multiple "print add<float>(2.25,2.25)" "print add<float>(2.25,2.25)" {
+ -re "\\$\[0-9\]+ = 4\\.5\r\n$gdb_prompt $" {
+ pass "print add<float>(2.25,2.25)"
+ }
+ -re "No symbol \"add<float>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add<float>(2.25,2.25)"
+ }
+}
-send_gdb "print add2<float>(2.3,2.3)\n"
-gdb_expect {
- -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
- pass "print value of add2<float>(2.3,2.3)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add2<float>(2.3,2.3)" }
- timeout { fail "(timeout) print value of add2<float>(2.3,2.3)" }
- }
+gdb_test_multiple "print add<unsigned char>('A','A')" "print add<unsigned char>('A','A')" {
+ -re "\\$\[0-9\]+ = -126 .*\r\n$gdb_prompt $" {
+ pass "print add<unsigned char>('A','A')"
+ }
+ -re "No symbol \"add<unsigned char>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add<unsigned char>('A','A')"
+ }
+}
-send_gdb "print add2<char>('A','A')\n"
-gdb_expect {
- -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
- pass "print value of add2<char>('A','A')"
- }
- -re ".*$gdb_prompt $" { fail "print value of add2<char>('A','A')" }
- timeout { fail "(timeout) print value of add2<char>('A','A')" }
- }
+gdb_test_multiple "print add2<int>(2,2)" "print add2<int>(2,2)" {
+ -re "\\$\[0-9\]+ = 4\r\n$gdb_prompt $" {
+ pass "print add2<int>(2,2)"
+ }
+ -re "No symbol \"add2<int>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add2<int>(2,2)"
+ }
+}
-send_gdb "print add3<int>(2,2)\n"
-gdb_expect {
- -re ".$decimal = 4\r\n$gdb_prompt $" {
- pass "print value of add3<int>(2,2)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add3<int>(2,2)" }
- timeout { fail "(timeout) print value of add3<int>(2,2)" }
- }
+gdb_test_multiple "print add2<float>(2.25,2.25)" "print add2<float>(2.25,2.25)" {
+ -re "\\$\[0-9\]+ = 4\\.5\r\n$gdb_prompt $" {
+ pass "print add2<float>(2.25,2.25)"
+ }
+ -re "No symbol \"add2<float>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add2<float>(2.25,2.25)"
+ }
+}
-send_gdb "print add3<float>(2.3,2.3)\n"
-gdb_expect {
- -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
- pass "print value of add3<float>(2.3,2.3)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add3<float>(2.3,2.3)" }
- timeout { fail "(timeout) print value of add3<float>(2.3,2.3)" }
- }
+gdb_test_multiple "print add2<unsigned char>('A','A')" "print add2<unsigned char>('A','A')" {
+ -re "\\$\[0-9]+ = -126 .*$gdb_prompt $" {
+ pass "print add2<unsigned char>('A','A')"
+ }
+ -re "No symbol \"add2<unsigned char>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add2<unsigned char>('A','A')"
+ }
+}
-send_gdb "print add3<char>('A','A')\n"
-gdb_expect {
- -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
- pass "print value of add3<char>('A','A')"
- }
- -re ".*$gdb_prompt $" { fail "print value of add3<char>('A','A')" }
- timeout { fail "(timeout) print value of add3<char>('A','A')" }
- }
+gdb_test_multiple "print add3<int>(2,2)" "print add3<int>(2,2)" {
+ -re "\\$\[0-9\]+ = 4\r\n$gdb_prompt $" {
+ pass "print add3<int>(2,2)"
+ }
+ -re "No symbol \"add3<int>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add3<int>(2,2)"
+ }
+}
-send_gdb "print add4<int>(2,2)\n"
-gdb_expect {
- -re ".$decimal = 4\r\n$gdb_prompt $" {
- pass "print value of add4<int>(2,2)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add4<int>(2,2)" }
- timeout { fail "(timeout) print value of add4<int>(2,2)" }
- }
+gdb_test_multiple "print add3<float>(2.25,2.25)" "print add3<float>(2.25,2.25)" {
+ -re "\\$\[0-9\]+ = 4\\.5\r\n$gdb_prompt $" {
+ pass "print add3<float>(2.25,2.25)"
+ }
+ -re "No symbol \"add3<float>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add3<float>(2.25,2.25)"
+ }
+}
-send_gdb "print add4<float>(2.3,2.3)\n"
-gdb_expect {
- -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
- pass "print value of add4<float>(2.3,2.3)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add4<float>(2.3,2.3)" }
- timeout { fail "(timeout) print value of add4<float>(2.3,2.3)" }
- }
+gdb_test_multiple "print add3<unsigned char>('A','A')" "print add3<unsigned char>('A','A')" {
+ -re "\\$\[0-9]+ = -126 .*$gdb_prompt $" {
+ pass "print add3<unsigned char>('A','A')"
+ }
+ -re "No symbol \"add3<unsigned char>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add3<unsigned char>('A','A')"
+ }
+}
-send_gdb "print add4<char>('A','A')\n"
-gdb_expect {
- -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
- pass "print value of add4<char>('A','A')"
- }
- -re ".*$gdb_prompt $" { fail "print value of add4<char>('A','A')" }
- timeout { fail "(timeout) print value of add4<char>('A','A')" }
- }
+gdb_test_multiple "print add4<int>(2,2)" "print add4<int>(2,2)" {
+ -re "\\$\[0-9\]+ = 4\r\n$gdb_prompt $" {
+ pass "print add4<int>(2,2)"
+ }
+ -re "No symbol \"add4<int>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add4<int>(2,2)"
+ }
+}
+gdb_test_multiple "print add4<float>(2.25,2.25)" "print add4<float>(2.25,2.25)" {
+ -re "\\$\[0-9\]+ = 4\\.5\r\n$gdb_prompt $" {
+ pass "print add4<float>(2.25,2.25)"
+ }
+ -re "No symbol \"add4<float>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add4<float>(2.25,2.25)"
+ }
+}
-gdb_exit
-return 0
+gdb_test_multiple "print add4<unsigned char>('A','A')" "print add4<unsigned char>('A','A')" {
+ -re "\\$\[0-9]+ = -126 .*$gdb_prompt $" {
+ pass "print add4<unsigned char>('A','A')"
+ }
+ -re "No symbol \"add4<unsigned char>\" in current context.\r\n$gdb_prompt $" {
+ # TODO: kfail or xfail this
+ fail "print add4<unsigned char>('A','A')"
+ }
+}
diff --git a/gdb/testsuite/gdb.cp/cttiadd.cc b/gdb/testsuite/gdb.cp/cttiadd.cc
index 1f50fae24c1..14ac6d130e5 100644
--- a/gdb/testsuite/gdb.cp/cttiadd.cc
+++ b/gdb/testsuite/gdb.cp/cttiadd.cc
@@ -1,3 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1998, 1999, 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
template<class T> T add(T v1, T v2)
{
T v3;
@@ -8,7 +27,7 @@ template<class T> T add(T v1, T v2)
int main()
{
- char c;
+ unsigned char c;
int i;
float f;
extern void add1();
@@ -23,6 +42,7 @@ int main()
i = add(i, i);
f = add(f, f);
+ // marker add1
add1();
subr2();
subr3();
diff --git a/gdb/testsuite/gdb.cp/cttiadd1.cc b/gdb/testsuite/gdb.cp/cttiadd1.cc
index 7113ecea421..a67babe0a9c 100644
--- a/gdb/testsuite/gdb.cp/cttiadd1.cc
+++ b/gdb/testsuite/gdb.cp/cttiadd1.cc
@@ -1,8 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1998, 1999, 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
template<class T> T add(T v1, T v2);
void add1()
{
- char c;
+ unsigned char c;
int i;
float f;
diff --git a/gdb/testsuite/gdb.cp/cttiadd2.cc b/gdb/testsuite/gdb.cp/cttiadd2.cc
index d0d9891fb2f..0d388d7cfb8 100644
--- a/gdb/testsuite/gdb.cp/cttiadd2.cc
+++ b/gdb/testsuite/gdb.cp/cttiadd2.cc
@@ -1,3 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1998, 1999, 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
template<class T> T add2(T v1, T v2)
{
T v3;
@@ -8,7 +27,7 @@ template<class T> T add2(T v1, T v2)
void subr2()
{
- char c;
+ unsigned char c;
int i;
float f;
diff --git a/gdb/testsuite/gdb.cp/cttiadd3.cc b/gdb/testsuite/gdb.cp/cttiadd3.cc
index 7ba1b019f16..1d11dafccd6 100644
--- a/gdb/testsuite/gdb.cp/cttiadd3.cc
+++ b/gdb/testsuite/gdb.cp/cttiadd3.cc
@@ -1,3 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1998, 1999, 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
template<class T> T add3(T v1, T v2)
{
T v3;
@@ -16,7 +35,7 @@ template<class T> T add4(T v1, T v2)
void subr3()
{
- char c;
+ unsigned char c;
int i;
float f;
diff --git a/gdb/testsuite/gdb.cp/demangle.exp b/gdb/testsuite/gdb.cp/demangle.exp
index 7bd9fc54d00..848f66fc7e8 100644
--- a/gdb/testsuite/gdb.cp/demangle.exp
+++ b/gdb/testsuite/gdb.cp/demangle.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1997, 1999, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1997, 1999, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +14,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Fred Fish. (fnf@cygnus.com)
if $tracelevel then {
diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp
index 38a46a2beaa..d82ab1f6cf9 100644
--- a/gdb/testsuite/gdb.cp/derivation.exp
+++ b/gdb/testsuite/gdb.cp/derivation.exp
@@ -1,4 +1,5 @@
-# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,28 +15,24 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Elena Zannoni (ezannoni@cygnus.com)
+# And rewritten by Michael Chastain <mec.gnu@mindspring.com>
# This file is part of the gdb testsuite
-#
-#
-# tests for inheritance, with several derivations types combinations (private,
-# public, protected)
+# tests for inheritance, with several derivations types combinations
+# (private, public, protected)
# classes have simple members and member functions.
-#
+set ws "\[\r\n\t \]+"
+set nl "\[\r\n\]+"
if $tracelevel then {
- strace $tracelevel
- }
+ strace $tracelevel
+}
+
+# Start program.
-#
-# test running programs
-#
set prms_id 0
set bug_id 0
@@ -45,13 +42,6 @@ set testfile "derivation"
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -61,13 +51,7 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-#
-# set it up at a breakpoint so we can play with the variable values
-#
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
+# Set it up at a breakpoint so we can play with the variable values.
if ![runto 'marker1'] then {
perror "couldn't run to marker1"
@@ -76,236 +60,154 @@ if ![runto 'marker1'] then {
gdb_test "up" ".*main.*" "up from marker1"
+# Print class types and values.
+# See virtfunc.exp for a discussion of ptype.
+# class A
-send_gdb "print a_instance\n"
-gdb_expect {
- -re ".\[0-9\]* = \{a = 1, aa = 2\}\r\n$gdb_prompt $" {
- pass "print value of a_instance"
- }
- -re ".*$gdb_prompt $" { fail "print value of a_instance" }
- timeout { fail "(timeout) print value of a_instance" }
- }
+set re_class "((struct|class) A \{${ws}public:|struct A \{)"
+set re_fields "int a;${ws}int aa;"
+set re_methods "A\\((void|)\\);${ws}int afoo\\((void|)\\);${ws}int foo\\((void|)\\);"
+set re_synth_gcc_23 "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);"
+set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)"
+gdb_test "print a_instance" "\\$\[0-9\]+ = \{a = 1, aa = 2\}" "print value of a_instance"
-send_gdb "ptype a_instance\n"
-gdb_expect {
- -re "type = class A \{\r\n\[\t \]*public:\r\n\[\t \]*int a;\r\n\[\t \]*int aa;\[\r\n\t ]+A & operator=\\(A const ?&\\);\[\r\n\t ]+A\\((A const|const A) ?&\\);\[\r\n\t ]+A\\((void|)\\);\r\n\[\t \]*int afoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype a_instance (with synth ops)" }
- -re "type = class A \{\r\n\[\t \]*public:\r\n\[\t \]*int a;\r\n\[\t \]*int aa;\[\r\n\t \]+A\\(void\\);\r\n\[\t \]*int afoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype a_instance (no synth ops)" }
- -re ".*$gdb_prompt $" { fail "ptype a_instance" }
- timeout { fail "(timeout) ptype a_instance" }
+gdb_test_multiple "ptype a_instance" "ptype a_instance" {
+ -re "type = $re_class${ws}$re_fields${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ pass "ptype a_instance (no synth ops)"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23${ws}$re_methods${ws}$nl\}$nl$gdb_prompt $" {
+ pass "ptype a_instance (with synth ops)"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass "ptype a_instance (with synth ops)"
+ }
}
+# class D
+
+set re_class "class D : private A, public B, protected C \{${ws}public:"
+set XX_class "class D : private A, public B, private C \{${ws}public:"
+set re_fields "int d;${ws}int dd;"
+set re_methods "D\\((void|)\\);${ws}int dfoo\\((void|)\\);${ws}int foo\\((void|)\\);"
+set re_synth_gcc_23 "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);"
+set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)"
+
+gdb_test_multiple "print d_instance" "print value of d_instance" {
+ -re "\\$\[0-9\]+ = \{<(class A|A)> = \{a = 1, aa = 2\}, <(class B|B)> = \{b = 3, bb = 4\}, <(class C|C)> = \{c = 5, cc = 6\}, d = 7, dd = 8\}$nl$gdb_prompt $" {
+ pass "print value of d_instance"
+ }
+}
-send_gdb "print d_instance\n"
-gdb_expect {
- -re ".\[0-9\]* = \{<A> = \{a = 1, aa = 2\}, <B> = \{b = 3, bb = 4\}, <C> = \{c = 5, cc = 6\}, d = 7, dd = 8\}\r\n$gdb_prompt $" {
- pass "print value of d_instance"
- }
- -re ".\[0-9\]* = \{<class A> = \{a = 1, aa = 2\}, <class B> = \{b = 3, bb = 4\}, <class C> = \{c = 5, cc = 6\}, d = 7, dd = 8\}\r\n$gdb_prompt $" {
- pass "print value of d_instance"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance" }
- timeout { fail "(timeout) print value of d_instance" }
- }
-
- if {$gcc_compiled} then {
- send_gdb "ptype d_instance\n"
- gdb_expect {
- -re "type = class D : private A, public B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t ]+D & operator=\\(D const ?&\\);\[\r\n\t ]+D\\((D const|const D) ?&\\);\[\r\n\t \]+D\\((void|)\\);\r\n\[\t \]*int dfoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
- -re "type = class D : private A, public B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t ]+D & operator=\\(D const ?&\\);\[\r\n\t ]+D\\((D const|const D) ?&\\);\[\r\n\t \]+D\\((void|)\\);\r\n\[\t \]*int dfoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
- -re "type = class D : private A, public B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
- -re ".*$gdb_prompt $" { fail "ptype d_instance" }
- timeout { fail "(timeout) ptype d_instance" }
- }
- } else {
- send_gdb "ptype d_instance\n"
- gdb_expect {
- -re "type = class D : private A, public B, protected C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
- -re ".*$gdb_prompt $" { fail "ptype d_instance" }
- timeout { fail "(timeout) ptype d_instance" }
- }
- }
-
-
-send_gdb "print e_instance\n"
-gdb_expect {
- -re ".\[0-9\]* = \{<A> = \{a = 1, aa = 2\}, <B> = \{b = 3, bb = 4\}, <C> = \{c = 5, cc = 6\}, e = 9, ee = 10\}\r\n$gdb_prompt $" {
- pass "print value of e_instance"
- }
- -re ".\[0-9\]* = \{<class A> = \{a = 1, aa = 2\}, <class B> = \{b = 3, bb = 4\}, <class C> = \{c = 5, cc = 6\}, e = 9, ee = 10\}\r\n$gdb_prompt $" {
- pass "print value of e_instance"
- }
- -re ".*$gdb_prompt $" { fail "print value of e_instance" }
- timeout { fail "(timeout) print value of e_instance" }
- }
-
- if {$gcc_compiled} {
- send_gdb "ptype e_instance\n"
- gdb_expect {
- -re "type = class E : public A, private B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t ]+E & operator=\\(E const ?&\\);\[\r\n\t ]+E\\((E const|const E) ?&\\);\[\r\n\t \]+E\\((void|)\\);\r\n\[\t \]*int efoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
- -re "type = class E : public A, private B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t \]+E\\((void|)\\);\r\n\[\t \]*int efoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
- -re ".*$gdb_prompt $" { fail "ptype e_instance" }
- timeout { fail "(timeout) ptype e_instance" }
- }
- } else {
- send_gdb "ptype e_instance\n"
- gdb_expect {
- -re "type = class E : public A, private B, protected C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t \]+E\\((void|)\\);\r\n\[\t \]*int efoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
- -re ".*$gdb_prompt $" { fail "ptype e_instance" }
- timeout { fail "(timeout) ptype e_instance" }
- }
- }
-
-
-send_gdb "print f_instance\n"
-gdb_expect {
- -re ".\[0-9\]* = \{<A> = \{a = 1, aa = 2\}, <B> = \{b = 3, bb = 4\}, <C> = \{c = 5, cc = 6\}, f = 11, ff = 12\}\r\n$gdb_prompt $" {
- pass "print value of f_instance"
- }
- -re ".\[0-9\]* = \{<class A> = \{a = 1, aa = 2\}, <class B> = \{b = 3, bb = 4\}, <class C> = \{c = 5, cc = 6\}, f = 11, ff = 12\}\r\n$gdb_prompt $" {
- pass "print value of f_instance"
- }
- -re ".*$gdb_prompt $" { fail "print value of f_instance" }
- timeout { fail "(timeout) print value of f_instance" }
- }
-
-send_gdb "ptype f_instance\n"
-gdb_expect {
- -re "type = class F : private A, public B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int f;\r\n\[\t \]*int ff;\[\r\n\t ]+F & operator=\\(F const ?&\\);\[\r\n\t ]+F\\((F const|const F) ?&\\);\[\r\n\t \]+F\\((void|)\\);\r\n\[\t \]*int ffoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype f_instance" }
- -re "type = class F : private A, public B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int f;\r\n\[\t \]*int ff;\[\r\n\t \]+F\\((void|)\\);\r\n\[\t \]*int ffoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype f_instance" }
- -re ".*$gdb_prompt $" { fail "ptype f_instance" }
- timeout { fail "(timeout) ptype f_instance" }
+gdb_test_multiple "ptype d_instance" "ptype d_instance" {
+ -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass "ptype d_instance"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
+ pass "ptype d_instance"
+ }
+ -re "type = $XX_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ # This is a gcc bug, gcc/13539, gdb/1498.
+ # Fixed in gcc HEAD 2004-01-13
+ setup_xfail "*-*-*" "gcc/13539"
+ fail "ptype d_instance"
+ }
+ -re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
+ # This is a gcc bug, gcc/13539, gdb/1498.
+ # Fixed in gcc HEAD 2004-01-13
+ setup_xfail "*-*-*" "gcc/13539"
+ fail "ptype d_instance"
+ }
}
+# class E
+set re_class "class E : public A, private B, protected C \{${ws}public:"
+set XX_class "class E : public A, private B, private C \{${ws}public:"
+set re_fields "int e;${ws}int ee;"
+set re_methods "E\\((void|)\\);${ws}int efoo\\((void|)\\);${ws}int foo\\((void|)\\);"
+set re_synth_gcc_23 "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);"
+set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)"
-send_gdb "print d_instance.a\n"
-gdb_expect {
- -re ".\[0-9\]* = 1.*$gdb_prompt $" {
- pass "print value of d_instance.a"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.a" }
- timeout { fail "(timeout) print value of d_instance.a" }
- }
-
-send_gdb "print d_instance.aa\n"
-gdb_expect {
- -re ".\[0-9\]* = 2.*$gdb_prompt $" {
- pass "print value of d_instance.aa"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.aa" }
- timeout { fail "(timeout) print value of d_instance.aa" }
- }
-
-send_gdb "print d_instance.b\n"
-gdb_expect {
- -re ".\[0-9\]* = 3.*$gdb_prompt $" {
- pass "print value of d_instance.b"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.b" }
- timeout { fail "(timeout) print value of d_instance.b" }
- }
-
-send_gdb "print d_instance.bb\n"
-gdb_expect {
- -re ".\[0-9\]* = 4.*$gdb_prompt $" {
- pass "print value of d_instance.bb"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.bb" }
- timeout { fail "(timeout) print value of d_instance.bb" }
- }
-
-send_gdb "print d_instance.c\n"
-gdb_expect {
- -re ".\[0-9\]* = 5.*$gdb_prompt $" {
- pass "print value of d_instance.c"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.c" }
- timeout { fail "(timeout) print value of d_instance.c" }
- }
-
-send_gdb "print d_instance.cc\n"
-gdb_expect {
- -re ".\[0-9\]* = 6.*$gdb_prompt $" {
- pass "print value of d_instance.cc"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.cc" }
- timeout { fail "(timeout) print value of d_instance.cc" }
- }
-
-send_gdb "print d_instance.d\n"
-gdb_expect {
- -re ".\[0-9\]* = 7.*$gdb_prompt $" {
- pass "print value of d_instance.d"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.d" }
- timeout { fail "(timeout) print value of d_instance.d" }
- }
-
-send_gdb "print d_instance.dd\n"
-gdb_expect {
- -re ".\[0-9\]* = 8.*$gdb_prompt $" {
- pass "print value of d_instance.dd"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.dd" }
- timeout { fail "(timeout) print value of d_instance.dd" }
- }
-
-send_gdb "print g_instance.a\n"
-gdb_expect {
- -re "warning.*$gdb_prompt $" {
- # The compiler doesn't think this is ambiguous.
- fail "print value of g_instance.a"
+gdb_test_multiple "print e_instance" "print value of e_instance" {
+ -re "\\$\[0-9\]+ = \{<(class A|A)> = \{a = 1, aa = 2\}, <(class B|B)> = \{b = 3, bb = 4\}, <(class C|C)> = \{c = 5, cc = 6\}, e = 9, ee = 10\}$nl$gdb_prompt $" {
+ pass "print value of e_instance"
}
- -re ".\[0-9\]* = 15.*$gdb_prompt $" {
- pass "print value of g_instance.a"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.a" }
- timeout { fail "(timeout) print value of g_instance.a" }
- }
-
-send_gdb "print g_instance.b\n"
-gdb_expect {
- -re "warning.*$gdb_prompt $" {
- # The compiler doesn't think this is ambiguous.
- fail "print value of g_instance.b"
+}
+
+gdb_test_multiple "ptype e_instance" "ptype e_instance" {
+ -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass "ptype e_instance"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
+ pass "ptype e_instance"
+ }
+ -re "type = $XX_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ # This is a gcc bug, gcc/13539, gdb/1498.
+ # Fixed in gcc HEAD 2004-01-13
+ setup_xfail "*-*-*" "gcc/13539"
+ fail "ptype e_instance"
+ }
+ -re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
+ # This is a gcc bug, gcc/13539, gdb/1498.
+ # Fixed in gcc HEAD 2004-01-13
+ setup_xfail "*-*-*" "gcc/13539"
+ fail "ptype e_instance"
+ }
+}
+
+# class F
+
+set re_class "class F : private A, public B, private C \{${ws}public:"
+set re_fields "int f;${ws}int ff;"
+set re_methods "F\\((void|)\\);${ws}int ffoo\\((void|)\\);${ws}int foo\\((void|)\\);"
+set re_synth_gcc_23 "F & operator=\\(F const ?&\\);${ws}F\\(F const ?&\\);"
+set re_all_methods "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)"
+
+gdb_test_multiple "print f_instance" "print value of f_instance" {
+ -re "\\$\[0-9\]+ = \{<(class A|A)> = \{a = 1, aa = 2\}, <(class B|B)> = \{b = 3, bb = 4\}, <(class C|C)> = \{c = 5, cc = 6\}, f = 11, ff = 12\}$nl$gdb_prompt $" {
+ pass "print value of f_instance"
+ }
+}
+
+gdb_test_multiple "ptype f_instance" "ptype f_instance" {
+ -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass "ptype f_instance"
}
- -re ".\[0-9\]* = 16.*$gdb_prompt $" {
- pass "print value of g_instance.b"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.b" }
- timeout { fail "(timeout) print value of g_instance.b" }
- }
-
-send_gdb "print g_instance.c\n"
-gdb_expect {
- -re "warning.*$gdb_prompt $" {
- # The compiler doesn't think this is ambiguous.
- fail "print value of g_instance.c"
+ -re "type = $re_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
+ pass "ptype f_instance"
}
- -re ".\[0-9\]* = 17.*$gdb_prompt $" {
- pass "print value of g_instance.c"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.c" }
- timeout { fail "(timeout) print value of g_instance.c" }
- }
-
-send_gdb "print g_instance.afoo()\n"
-gdb_expect {
- -re ".\[0-9\]* = 1.*$gdb_prompt $" {
- pass "print value of g_instance.afoo()"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.afoo()" }
- timeout { fail "(timeout) print value of g_instance.afoo()" }
- }
+}
+
+# Print individual fields.
+
+gdb_test "print d_instance.a" "\\$\[0-9\]+ = 1" "print value of d_instance.a"
+gdb_test "print d_instance.aa" "\\$\[0-9\]+ = 2" "print value of d_instance.aa"
+gdb_test "print d_instance.b" "\\$\[0-9\]+ = 3" "print value of d_instance.b"
+gdb_test "print d_instance.bb" "\\$\[0-9\]+ = 4" "print value of d_instance.bb"
+gdb_test "print d_instance.c" "\\$\[0-9\]+ = 5" "print value of d_instance.c"
+gdb_test "print d_instance.cc" "\\$\[0-9\]+ = 6" "print value of d_instance.cc"
+gdb_test "print d_instance.d" "\\$\[0-9\]+ = 7" "print value of d_instance.d"
+gdb_test "print d_instance.dd" "\\$\[0-9\]+ = 8" "print value of d_instance.dd"
+# Print some fields which are defined in the top of class G
+# and in its base classes. This is not be ambiguous.
+
+gdb_test "print g_instance.a" "\\$\[0-9\]+ = 15" "print value of g_instance.a"
+gdb_test "print g_instance.b" "\\$\[0-9\]+ = 16" "print value of g_instance.b"
+gdb_test "print g_instance.c" "\\$\[0-9\]+ = 17" "print value of g_instance.c"
+
+# Print a function call.
+
+gdb_test "print g_instance.afoo()" "\\$\[0-9\]+ = 1" "print value of g_instance.afoo()"
# If GDB fails to restore the selected frame properly after the
# inferior function call above (see GDB PR 1155 for an explanation of
# why this might happen), all the subsequent tests will fail. We
# should detect report that failure, but let the marker call finish so
# that the rest of the tests can run undisturbed.
+
gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" {
-re "#0 marker1.*$gdb_prompt $" {
setup_kfail "gdb/1155" s390-*-linux-gnu
@@ -317,21 +219,6 @@ gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" {
pass "re-selected 'main' frame after inferior call"
}
}
-
-send_gdb "print g_instance.bfoo()\n"
-gdb_expect {
- -re ".\[0-9\]* = 2.*$gdb_prompt $" {
- pass "print value of g_instance.bfoo()"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.bfoo()" }
- timeout { fail "(timeout) print value of g_instance.bfoo()" }
- }
-
-send_gdb "print g_instance.cfoo()\n"
-gdb_expect {
- -re ".\[0-9\]* = 3.*$gdb_prompt $" {
- pass "print value of g_instance.cfoo()"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.cfoo()" }
- timeout { fail "(timeout) print value of g_instance.cfoo()" }
- }
+
+gdb_test "print g_instance.bfoo()" "\\$\[0-9\]+ = 2" "print value of g_instance.bfoo()"
+gdb_test "print g_instance.cfoo()" "\\$\[0-9\]+ = 3" "print value of g_instance.cfoo()"
diff --git a/gdb/testsuite/gdb.cp/exception.cc b/gdb/testsuite/gdb.cp/exception.cc
new file mode 100644
index 00000000000..cd124e59285
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/exception.cc
@@ -0,0 +1,69 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1997, 1998, 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+
+// Test file for exception handling support.
+
+#include <iostream>
+using namespace std;
+
+int foo (int i)
+{
+ if (i < 32)
+ throw (int) 13;
+ else
+ return i * 2;
+}
+
+extern "C" int bar (int k, unsigned long eharg, int flag);
+
+int bar (int k, unsigned long eharg, int flag)
+{
+ cout << "k is " << k << " eharg is " << eharg << " flag is " << flag << endl;
+ return 1;
+}
+
+int main()
+{
+ int j;
+
+ try {
+ j = foo (20);
+ }
+ catch (int x) {
+ cout << "Got an except " << x << endl;
+ }
+
+ try {
+ try {
+ j = foo (20);
+ }
+ catch (int x) {
+ cout << "Got an except " << x << endl;
+ throw;
+ }
+ }
+ catch (int y) {
+ cout << "Got an except (rethrown) " << y << endl;
+ }
+
+ // Not caught
+ foo (20);
+}
diff --git a/gdb/testsuite/gdb.cp/exception.exp b/gdb/testsuite/gdb.cp/exception.exp
new file mode 100644
index 00000000000..31930913a23
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/exception.exp
@@ -0,0 +1,219 @@
+# Copyright 1997, 1998, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This file is part of the gdb testsuite.
+# tests for exception-handling support
+# Written by Satish Pai <pai@apollo.hp.com> 1997-07-23
+# Rewritten by Michael Chastain <mec.gnu@mindspring.com> 2004-01-08
+
+# This file used to have two copies of the tests with different
+# compiler flags for hp-ux. Instead, the user should set CXXOPTS
+# or run runtest with --target_board unix/gdb:debug_flags="..."
+# to choose the compiler flags.
+#
+# The interesting compiler flags are: "aCC +A -Wl,-a,-archive" .
+# Static-linked executables use a different mechanism to get the
+# address of the notification hook in the C++ support library.
+
+# TODO: this file is not ready for production yet. If you are working
+# on C++ exception support for gdb, you can take out the "continue"
+# statement and try your luck. -- chastain 2004-01-09
+
+# TODO: this file has many absolute line numbers.
+# Replace them with gdb_get_line_number.
+
+set ws "\[\r\n\t \]+"
+set nl "\[\r\n\]+"
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile "exception"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Start with a fresh gdb
+
+set prms_id 0
+set bug_id 0
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+# As I said before, this test script is not ready yet!
+
+continue
+
+# Set a catch catchpoint
+
+gdb_test "catch catch" "Catchpoint \[0-9\]+ \\(catch\\)"
+
+# Set a throw catchpoint
+
+gdb_test "catch throw" "Catchpoint \[0-9\]+ \\(throw\\)" \
+ "catch throw (static executable)"
+
+# The catchpoints should be listed in the list of breakpoints.
+
+set re_head "Num${ws}Type${ws}Disp${ws}Enb${ws}Address${ws}What"
+set re_1_main "1${ws}breakpoint${ws}keep${ws}y${ws}$hex${ws}in main.*breakpoint already hit.*"
+set re_2_catch "2${ws}catch catch${ws}keep${ws}y${ws}$hex${ws}exception catch"
+set re_3_catch "3${ws}catch throw${ws}keep${ws}y${ws}$hex${ws}exception throw"
+set re_2_bp "2${ws}breakpoint${ws}keep${ws}y${ws}$hex${ws}exception catch"
+set re_3_bp "3${ws}breakpoint${ws}keep${ws}y${ws}$hex${ws}exception throw"
+
+set name "info breakpoints"
+gdb_test_multiple "info breakpoints" $name {
+ -re "$re_head${ws}$re_1_main${ws}$re_2_catch${ws}$re_3_catch\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$re_head${ws}$re_1_main${ws}$re_2_bp${ws}$re_3_bp\r\n$gdb_prompt $" {
+ # TODO: gdb HEAD 2004-01-08 does this. Is this okay?
+ unresolved $name
+ }
+}
+
+# Some targets support "info catch".
+# Some do not.
+
+set name "info catch"
+gdb_test_multiple "info catch" $name {
+ -re "Info catch not supported with this target/compiler combination.\r\n$gdb_prompt $" {
+ unsupported $name
+ }
+ -re "No catches.\r\n$gdb_prompt $" {
+ # TODO: gdb HEAD 2004-01-08 does this. Is this okay?
+ unresolved $name
+ }
+}
+
+# Get the first exception thrown
+
+set name "continue to first throw"
+gdb_test_multiple "continue" $name {
+ -re "Continuing.${ws}Catchpoint \[0-9\]+ \\(exception thrown\\), throw location.*${srcfile}:30, catch location .*${srcfile}:50\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "Continuing.${ws}Catchpoint \[0-9\]+ \\(exception thrown\\)\r\n.*\r\n$gdb_prompt $" {
+ # TODO: gdb HEAD 2004-01-08 does this. Is this okay?
+ unresolved $name
+ }
+}
+
+# Backtrace from the throw point.
+# This should get to user code.
+
+set name "backtrace after first throw"
+gdb_test_multiple "backtrace" $name {
+ -re ".*#\[0-9\]+${ws}$hex in foo \\(i=20\\) at .*${srcfile}:30\r\n#\[0-9\]+${ws}$hex in main \\((void|)\\) at .*${srcfile}:48\r\n$gdb_prompt $" {
+ pass $name
+ }
+}
+
+# Continue to the catch.
+
+set name "continue to first catch"
+gdb_test_multiple "continue" $name {
+ -re "Continuing.${ws}Catchpoint \[0-9\]+ \\(exception caught\\), throw location.*${srcfile}:30, catch location .*${srcfile}:50\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "Continuing.${ws}Catchpoint \[0-9\]+ \\(exception caught\\)\r\n.*\r\n$gdb_prompt $" {
+ # TODO: gdb HEAD 2004-01-08 does this. Is this okay?
+ unresolved $name
+ }
+}
+
+# Backtrace from the catch point.
+# This should get to user code.
+
+set name "backtrace after first catch"
+gdb_test_multiple "backtrace" $name {
+ -re ".*#\[0-9\]+${ws}$hex in main \\((void|)\\) at .*$srcfile:50\r\n$gdb_prompt $" {
+ pass $name
+ }
+}
+
+# Continue to second throw.
+
+set name "continue to second throw"
+gdb_test_multiple "continue" $name {
+ -re "Continuing.${ws}Got an except 13${ws}Catchpoint \[0-9\]+ \\(exception thrown\\), throw location.*${srcfile}:30, catch location .*${srcfile}:58\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "Continuing.${ws}Got an except 13${ws}Catchpoint \[0-9\]+ \\(exception thrown\\)\r\n.*\r\n$gdb_prompt $" {
+ # TODO: gdb HEAD 2004-01-08 does this. Is this okay?
+ unresolved $name
+ }
+}
+
+# Backtrace from the throw point.
+# This should get to user code.
+
+set name "backtrace after second throw"
+gdb_test_multiple "backtrace" $name {
+ -re ".*#\[0-9\]+${ws}$hex in foo \\(i=20\\) at .*${srcfile}:30\r\n#\[0-9\]+${ws}$hex in main \\((void|)\\) at .*${srcfile}:56\r\n$gdb_prompt $" {
+ pass $name
+ }
+}
+
+# Continue to second catch.
+
+set name "continue to second catch"
+gdb_test_multiple "continue" $name {
+ -re "Continuing.${ws}Catchpoint \[0-9\]+ \\(exception caught\\), throw location.*${srcfile}:30, catch location .*${srcfile}:58\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "Continuing.${ws}Catchpoint \[0-9\]+ \\(exception caught\\)\r\n.*\r\n$gdb_prompt $" {
+ # TODO: gdb HEAD 2004-01-08 does this. Is this okay?
+ unresolved $name
+ }
+}
+
+# Backtrace from the catch point.
+# This should get to user code.
+
+set name "backtrace after second catch"
+gdb_test_multiple "backtrace" $name {
+ -re ".*#\[0-9\]+${ws}$hex in main \\((void|)\\) at .*$srcfile:58\r\n$gdb_prompt $" {
+ pass $name
+ }
+}
+
+# That is all for now.
+#
+# The original code had:
+#
+# continue to re-throw ; backtrace
+# continue to catch ; backtrace
+# continue to throw out of main
+#
+# The problem is that "re-throw" does not show a throw; only a catch.
+# I do not know if this is because of a bug, or because the generated
+# code is optimized for a throw into the same function.
+#
+# -- chastain 2004-01-09
diff --git a/gdb/testsuite/gdb.cp/hang.exp b/gdb/testsuite/gdb.cp/hang.exp
index 4c117a10744..23088741fb4 100644
--- a/gdb/testsuite/gdb.cp/hang.exp
+++ b/gdb/testsuite/gdb.cp/hang.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +14,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
if $tracelevel then {
strace $tracelevel
}
diff --git a/gdb/testsuite/gdb.cp/inherit.exp b/gdb/testsuite/gdb.cp/inherit.exp
index 993bfb159cb..72de1ac33a7 100644
--- a/gdb/testsuite/gdb.cp/inherit.exp
+++ b/gdb/testsuite/gdb.cp/inherit.exp
@@ -1,5 +1,5 @@
-# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003,
+# 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,951 +15,1008 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Fred Fish. (fnf@cygnus.com)
+# And rewritten by Michael Chastain. (mec.gnu@mindspring.com)
-set ws "\[\r\n\t \]+"
-set nl "\[\r\n\]+"
-
-# The format of a g++ virtual base pointer.
-set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
+set ws "\[\r\n\t \]+"
+set nl "\[\r\n\]+"
+set vhn "\\$\[0-9\]+"
if $tracelevel then {
- strace $tracelevel
+ strace $tracelevel
}
if { [skip_cplus_tests] } { continue }
-# Note - create separate "inherit" executable from misc.cc
-
set testfile "inherit"
set srcfile misc.cc
set binfile ${objdir}/${subdir}/${testfile}
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-#
-# Single inheritance, print individual members.
-#
-
-proc test_print_si_members {} {
- # Print all members of g_A using fully qualified form.
-
- gdb_test "print g_A.A::a" ".* = 1" "print g_A.A::a"
-
- gdb_test "print g_A.A::x" ".* = 2" "print g_A.A::x"
-
- # Print members of g_A using nonambiguous compact form.
-
- gdb_test "print g_A.a" ".* = 1" "print g_A.a"
-
- gdb_test "print g_A.x" ".* = 2" "print g_A.x"
-
- # Print all members of g_B using fully qualified form.
-
- gdb_test "print g_B.A::a" ".* = 3" "print g_B.A::a"
-
- gdb_test "print g_B.A::x" ".* = 4" "print g_B.A::x"
-
- gdb_test "print g_B.B::b" ".* = 5" "print g_B.B::b"
-
- gdb_test "print g_B.B::x" ".* = 6" "print g_B.B::x"
-
- # Print members of g_B using nonambiguous compact form.
-
- gdb_test "print g_B.a" ".* = 3" "print g_B.a"
-
- gdb_test "print g_B.b" ".* = 5" "print g_B.b"
-
- gdb_test "print g_B.x" ".* = 6" "print g_B.x"
-
- # Print all members of g_C using fully qualified form.
-
- gdb_test "print g_C.A::a" ".* = 7" "print g_C.A::a"
-
- gdb_test "print g_C.A::x" ".* = 8" "print g_C.A::x"
-
- gdb_test "print g_C.C::c" ".* = 9" "print g_C.C::c"
-
- gdb_test "print g_C.C::x" ".* = 10" "print g_C.C::x"
-
- # Print members of g_C using nonambiguous compact form.
-
- gdb_test "print g_C.a" ".* = 7" "print g_C.a"
-
- gdb_test "print g_C.c" ".* = 9" "print g_C.c"
-
- gdb_test "print g_C.x" ".* = 10" "print g_C.x"
-}
-
-#
# Single inheritance, print type definitions.
-#
-proc test_ptype_si {} {
+proc test_ptype_si { } {
global gdb_prompt
global ws
global nl
- global hp_aCC_compiler
# Print class A as a type.
- send_gdb "ptype A\n"
- gdb_expect {
- -re "type = class A \{$nl.*\[ \]*int a;$nl\[ \]*int x;$nl.*\[ \]*\}$nl$gdb_prompt $" {
- pass "ptype A (FIXME)"
+ set re_class "class A \{${ws}public:"
+ set re_fields "int a;${ws}int x;"
+ set re_synth_gcc_23 "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);"
+
+ set name "ptype A (FIXME)"
+ gdb_test_multiple "ptype A" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re "type = struct A \{$nl\[ \]*int a;$nl\[ \]*int x;$nl\[ \]*\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype A (FIXME)"
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re ".*$gdb_prompt $" { fail "ptype A" }
- timeout { fail "ptype A (timeout)" ; return }
}
# Print class A as an explicit class.
- send_gdb "ptype class A\n"
- gdb_expect {
- -re "type = class A \{$nl.*\[ \]*int a;$nl\[ \]*int x;$nl.*\[ \]*\}$nl$gdb_prompt $" {
- pass "ptype class A (FIXME)"
+ set name "ptype class A (FIXME)"
+ gdb_test_multiple "ptype class A" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re "type = struct A \{$nl\[ \]*int a;$nl\[ \]*int x;$nl\[ \]*\}$nl$gdb_prompt $" {
- if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
- fail "ptype class A (FIXME)"
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re ".*$gdb_prompt $" { fail "ptype class A" }
- timeout { fail "ptype class A (timeout)" ; return }
}
# Print type of an object of type A.
- send_gdb "ptype g_A\n"
- gdb_expect {
- -re "type = class A \{$nl.*\[ \]*int a;$nl\[ \]*int x;$nl.*\[ \]*\}$nl$gdb_prompt $" {
- pass "ptype g_A (FIXME)"
+ set name "ptype g_A (FIXME)"
+ gdb_test_multiple "ptype g_A" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re "type = struct A \{$nl\[ \]*int a;$nl\[ \]*int x;$nl\[ \]*\}$nl$gdb_prompt $" {
- if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
- fail "ptype g_A (FIXME)"
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re ".*$gdb_prompt $" { fail "ptype g_A" }
- timeout { fail "ptype g_A (timeout)" ; return }
}
# Print class B as a type.
- gdb_test "ptype B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype B"
+ set re_class "class B : public A \{${ws}public:"
+ set re_fields "int b;${ws}int x;"
+ set re_synth_gcc_23 "B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\((void|)\\);"
+
+ set name "ptype B"
+ gdb_test_multiple "ptype B" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ }
# Print class B as an explicit class.
- gdb_test "ptype class B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype class B"
+ set name "ptype class B"
+ gdb_test_multiple "ptype class B" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ }
# Print type of an object of type B.
- gdb_test "ptype g_B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype g_B"
+ set name "ptype g_B"
+ gdb_test_multiple "ptype g_B" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ }
# Print class C as a type.
- gdb_test "ptype C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype C"
+ set re_class "class C : public A \{${ws}public:"
+ set re_fields "int c;${ws}int x;"
+ set re_synth_gcc_23 "C & operator=\\(C const ?&\\);${ws}C\\(C const ?&\\);${ws}C\\((void|)\\);"
+
+ set name "ptype C"
+ gdb_test_multiple "ptype C" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ }
# Print class C as an explicit class.
- gdb_test "ptype class C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype class C"
+ set name "ptype class C"
+ gdb_test_multiple "ptype class C" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ }
# Print type of an object of type g_C.
- gdb_test "ptype g_C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype g_C"
-
- # gcc cygnus-2.3.3 (Q1) has this bug, but it was fixed as of
- # cygnus-2.3.3-930417. PR 2819.
- send_gdb "ptype tagless_struct\n"
- gdb_expect {
- -re "type = class \{${ws}public:${ws}int one;${ws}int two;${ws}tagless_struct & operator=\\(tagless_struct (const ?)?&\\);${ws}tagless_struct\\(tagless_struct (const ?)?&\\);${ws}tagless_struct\\(\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype tagless struct"
+ set name "ptype g_C"
+ gdb_test_multiple "ptype g_C" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re "type = class \{${ws}public:${ws}int one;${ws}int two;;${ws}\}$nl$gdb_prompt $" {
- pass "ptype tagless struct"
+ }
+
+ # Print a structure with no tag.
+
+ set re_tag "tagless_struct"
+ set XX_tag "\\._1"
+ set re_class "(class $re_tag \{${ws}public:|class \{${ws}public:|struct $re_tag \{|struct \{)"
+ set XX_class "(class $XX_tag \{${ws}public:|struct $XX_tag \{)"
+ set re_fields "int one;${ws}int two;"
+ set re_synth_gcc_23 "$re_tag & operator=\\($re_tag const ?&\\);${ws}$re_tag\\($re_tag const ?&\\);${ws}$re_tag\\((void|)\\);"
+ set XX_synth_gcc_23 "($re_tag|$XX_tag) & operator=\\($XX_tag const ?&\\);${ws}$XX_tag\\($XX_tag const ?&\\);${ws}$XX_tag\\((void|)\\);"
+
+ set name "ptype tagless struct"
+ gdb_test_multiple "ptype tagless_struct" $name {
+ -re "type = $XX_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass "$name (obsolete gcc or gdb)"
}
- -re "type = (struct|class).*\{.*int one;.*int two;.*\}$nl$gdb_prompt $" {
- pass "ptype tagless struct (obsolete gcc or gdb)"
+ -re "type = $re_class${ws}$re_fields${ws}$XX_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass "$name (obsolete gcc or gdb)"
}
- -re ".*$gdb_prompt $" {
- fail "ptype tagless struct"
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name (obsolete gcc or gdb)"
}
- timeout {
- fail "ptype tagless struct (timeout)"
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name"
}
}
- send_gdb "ptype v_tagless\n"
- gdb_expect {
- -re "type = class \{${ws}public:${ws}int one;${ws}int two;${ws}tagless_struct & operator=\\(tagless_struct (const ?)?&\\);${ws}tagless_struct\\(tagless_struct (const ?)?&\\);${ws}tagless_struct\\(\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype variable of type tagless struct"
+ set name "ptype variable of type tagless struct"
+ gdb_test_multiple "ptype v_tagless" $name {
+ -re "type = $XX_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass "$name (obsolete gcc or gdb)"
}
- -re "type = class \{${ws}public:${ws}int one;${ws}int two;;${ws}\}$nl$gdb_prompt $" {
- pass "ptype tagless struct"
+ -re "type = $re_class${ws}$re_fields${ws}$XX_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass "$name (obsolete gcc or gdb)"
}
- -re "type = (struct|class).*\{.*int one;.*int two;.*\}$nl$gdb_prompt $" {
- pass "ptype variable of type tagless struct (obsolete gcc or gdb)"
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name (obsolete gcc or gdb)"
}
- -re ".*$gdb_prompt $" {
- fail "ptype variable of type tagless struct"
- }
- timeout {
- fail "ptype variable of type tagless struct (timeout)"
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name"
}
}
}
-#
-# Single inheritance, print complete classes.
-#
-
-proc test_print_si_classes {} {
- # Print all members of g_A.
-
- gdb_test "print g_A" ".* = \{a = 1, x = 2\}" "print g_A"
-
- # Print all members of g_B.
-
- gdb_test "print g_B" ".* = \{\<(class |)A\> = \{a = 3, x = 4\}, b = 5, x = 6\}" "print g_B"
-
- # Print all members of g_C.
-
- gdb_test "print g_C" ".* = \{\<(class |)A\> = \{a = 7, x = 8\}, c = 9, x = 10\}" "print g_C"
-}
-
-#
-# Single inheritance, print anonymous unions.
-# GDB versions prior to 4.14 entered an infinite loop when printing
-# the type of a class containing an anonymous union, and they were also
-# incapable of printing the member of an anonymous union.
-# We test the printing of the member first, and perform the other tests
-# only if the test succeeds, to avoid the infinite loop.
-#
+# Multiple inheritance, print type definitions.
-proc test_print_anon_union {} {
+proc test_ptype_mi { } {
global gdb_prompt
global ws
global nl
- gdb_test "print g_anon_union.a" ".* = 2" "print anonymous union member"
- send_gdb "print g_anon_union\n"
- gdb_expect {
- -re ".* = \{one = 1, ( = |)\{a = 2, b = 2\}\}$nl$gdb_prompt $" {
- pass "print variable of type anonymous union"
+ set re_class "class D : public B, public C \{${ws}public:"
+ set re_fields "int d;${ws}int x;"
+ set re_synth_gcc_23 "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);"
+
+ # ptype D: type, class, object.
+
+ set name "ptype D"
+ gdb_test_multiple "ptype D" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ }
+
+ set name "ptype class D"
+ gdb_test_multiple "ptype class D" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re ".* = .*\{one = 1, ( = |)\{a = 2, b = .*\}\}$nl$gdb_prompt $" {
- pass "print variable of type anonymous union (obsolete gcc or gdb)"
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re ".*$nl$gdb_prompt $" {
- fail "print variable of type anonymous union"
+ }
+
+ set name "ptype g_D"
+ gdb_test_multiple "ptype g_D" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- timeout {
- fail "print variableof type anonymous union (timeout)"
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
}
}
- send_gdb "ptype g_anon_union\n"
- gdb_expect {
- -re "type = class class_with_anon_union \{${ws}public:${ws}int one;${ws}union \{${ws}public:${ws}int a;${ws}long int b;${ws}union \{\.\.\.\} & operator=\\(union \{\.\.\.\} &\\);${ws}\\\$_0 \\(union \{\.\.\.\} &\\);${ws}\\\$_0 \\(\\);${ws}\};${ws}class_with_anon_union & operator=\\(class_with_anon_union const &\\);${ws}class_with_anon_union\\(class_with_anon_union const &\\);${ws}class_with_anon_union\\(void\\);${ws}\}$nl$gdb_prompt $" {
- pass "print type of anonymous union"
+
+ set re_class "class E : public D \{${ws}public:"
+ set re_fields "int e;${ws}int x;"
+ set re_synth_gcc_23 "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\((void|)\\);"
+
+ # ptype E: type, class, object.
+
+ set name "ptype E"
+ gdb_test_multiple "ptype E" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re "type = class class_with_anon_union \{${ws}public:${ws}int one;${ws}union \{${ws}int a;${ws}long int b;${ws}\};${ws}class_with_anon_union & operator=\\(class_with_anon_union const ?&\\);${ws}class_with_anon_union\\(class_with_anon_union const ?&\\);${ws}class_with_anon_union\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "print type of anonymous union"
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re "type = class class_with_anon_union \{${ws}public:${ws}int one;${ws}union \{${ws}int a;${ws}long int b;${ws}\};${ws}\}$nl$gdb_prompt $" {
- pass "print type of anonymous union"
+ }
+
+ set name "ptype class E"
+ gdb_test_multiple "ptype class E" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re "type = (struct|class).*\{.*int one;.*union \{.*int a;.*(long|long int|int) b;.*\};.*\}$nl$gdb_prompt $" {
- pass "print type of anonymous union (obsolete gcc or gdb)"
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re ".*$nl$gdb_prompt $" {
- fail "print type of anonymous union"
+ }
+
+ set name "ptype g_E"
+ gdb_test_multiple "ptype g_E" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- timeout {
- fail "print type of anonymous union (timeout)"
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
}
}
}
-#
-# Multiple inheritance, print individual members.
-#
+# Single virtual inheritance, print type definitions.
-proc test_print_mi_members {} {
+proc test_ptype_vi { } {
global gdb_prompt
+ global ws
global nl
- global hp_aCC_compiler
-
- # Print all members of g_A.
-
- gdb_test "print g_A.A::a" ".* = 1" "print g_A.A::a"
-
- gdb_test "print g_A.A::x" ".* = 2" "print g_A.A::x"
- # Print all members of g_B.
+ # ptype vA: type, class, object.
- gdb_test "print g_B.A::a" ".* = 3" "print g_B.A::a"
+ set re_class "class vA \{${ws}public:"
+ set re_fields "int va;${ws}int vx;"
+ set re_synth_gcc_23 "vA & operator=\\(vA const ?&\\);${ws}vA\\(vA const ?&\\);${ws}vA\\((void|)\\);"
- gdb_test "print g_B.A::x" ".* = 4" "print g_B.A::x"
+ set name "ptype vA"
+ gdb_test_multiple "ptype vA" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ }
- gdb_test "print g_B.B::b" ".* = 5" "print g_B.B::b"
+ set name "ptype class vA"
+ gdb_test_multiple "ptype class vA" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ }
- gdb_test "print g_B.B::x" ".* = 6" "print g_B.B::x"
+ set name "ptype g_vA"
+ gdb_test_multiple "ptype g_vA" $name {
+ -re "type = $re_class${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
+ }
+ }
- # Print all members of g_C.
+ # ptype vB: type, class, object.
- gdb_test "print g_C.A::a" ".* = 7" "print g_C.A::a"
+ set re_class "class vB : public virtual vA \{(${ws}private:|)"
+ set re_vbptr "vA \\*(_vb.2vA|_vb.vA);${ws}"
+ set re_access "public:"
+ set re_fields "int vb;${ws}int vx;"
+ set re_synth_gcc_2 "vB & operator=\\(vB const ?&\\);${ws}vB\\(int, vB const ?&\\);${ws}vB\\(int\\);"
+ set re_synth_gcc_3 "vB & operator=\\(vB const ?&\\);${ws}vB\\(vB const ?&\\);${ws}vB\\((void|)\\);"
- gdb_test "print g_C.A::x" ".* = 8" "print g_C.A::x"
+ set name "ptype vB"
+ gdb_test_multiple "ptype vB" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name (aCC)"
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name (aCC)"
+ }
+ }
- gdb_test "print g_C.C::c" ".* = 9" "print g_C.C::c"
+ set name "ptype class vB"
+ gdb_test_multiple "ptype class vB" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name (aCC)"
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name (aCC)"
+ }
+ }
- gdb_test "print g_C.C::x" ".* = 10" "print g_C.C::x"
+ set name "ptype g_vB"
+ gdb_test_multiple "ptype g_vB" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name (aCC)"
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name (aCC)"
+ }
+ }
- # Print all members of g_D.
+ # ptype vC: type, class, object.
- # The following is ambiguous, and gdb should detect this.
- # For now, accept gdb's behavior as an expected failure if it
- # simply prints either member correctly.
+ set re_class "class vC : public virtual vA \{(${ws}private:|)"
+ set re_vbptr "vA \\*(_vb.2vA|_vb.vA);${ws}"
+ set re_access "public:"
+ set re_fields "int vc;${ws}int vx;"
+ set re_synth_gcc_2 "vC & operator=\\(vC const ?&\\);${ws}vC\\(int, vC const ?&\\);${ws}vC\\(int\\);"
+ set re_synth_gcc_3 "vC & operator=\\(vC const ?&\\);${ws}vC\\(vC const ?&\\);${ws}vC\\((void|)\\);"
- send_gdb "print g_D.A::a\n"
- gdb_expect {
- -re "warning: A ambiguous; using D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 15$nl$gdb_prompt $" {
- pass "print g_D.A::a"
+ set name "ptype vC"
+ gdb_test_multiple "ptype vC" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
}
- -re "warning: A ambiguous; using D::B::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 11$nl$gdb_prompt $" {
- pass "print g_D.A::a (using B)"
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
}
- -re ".* = 15$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_D.A::a"
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name (aCC)"
}
- -re ".* = 11$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_D.A::a"
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name (aCC)"
}
- -re ".*$gdb_prompt $" { fail "print g_D.A::a" }
- timeout { fail "print g_D.A::a (timeout)" ; return }
}
- # The following is ambiguous, and gdb should detect this.
- # For now, accept gdb's behavior as an expected failure if it
- # simply prints either member correctly.
-
- send_gdb "print g_D.A::x\n"
- gdb_expect {
- -re "warning: A ambiguous; using D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 16$nl$gdb_prompt $" {
- pass "print g_D.A::x"
+ set name "ptype class vC"
+ gdb_test_multiple "ptype class vC" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
}
- -re "warning: A ambiguous; using D::B::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 12$nl$gdb_prompt $" {
- pass "print g_D.A::x (using B)"
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
}
- -re ".* = 16$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_D.A::x"
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name (aCC)"
}
- -re ".* = 12$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_D.A::x"
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name (aCC)"
}
- -re ".*$gdb_prompt $" { fail "print g_D.A::x" }
- timeout { fail "print g_D.A::x (timeout)" ; return }
}
- gdb_test "print g_D.B::b" ".* = 13" "print g_D.B::b"
-
- gdb_test "print g_D.B::x" ".* = 14" "print g_D.B::x"
-
- gdb_test "print g_D.C::c" ".* = 17" "print g_D.C::c"
-
- gdb_test "print g_D.C::x" ".* = 18" "print g_D.C::x"
+ set name "ptype g_vC"
+ gdb_test_multiple "ptype g_vC" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name (aCC)"
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name (aCC)"
+ }
+ }
+}
- gdb_test "print g_D.D::d" ".* = 19" "print g_D.D::d"
+# Multiple virtual inheritance, print type definitions.
- gdb_test "print g_D.D::x" ".* = 20" "print g_D.D::x"
+proc test_ptype_mvi { } {
+ global gdb_prompt
+ global ws
+ global nl
- # Print all members of g_E.
+ # ptype vD: type, class, object.
- # The following is ambiguous, and gdb should detect this.
- # For now, accept gdb's behavior as an expected failure if it
- # simply prints either member correctly.
+ set re_class "class vD : public virtual vB, public virtual vC \{(${ws}private:|)"
+ set re_vbptr "vC \\*(_vb.2vC|_vb.vC);${ws}vB \\*(_vb.2vB|_vb.vB);"
+ set re_access "public:"
+ set re_fields "int vd;${ws}int vx;"
+ set re_synth_gcc_2 "vD & operator=\\(vD const ?&\\);${ws}vD\\(int, vD const ?&\\);${ws}vD\\(int\\);"
+ set re_synth_gcc_3 "vD & operator=\\(vD const ?&\\);${ws}vD\\(vD const ?&\\);${ws}vD\\((void|)\\);"
- send_gdb "print g_E.A::a\n"
- gdb_expect {
- -re ".* = 21$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_E.A::a"
+ set name "ptype vD"
+ gdb_test_multiple "ptype vD" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
}
- -re ".* = 25$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_E.A::a"
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name"
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name"
}
- -re ".*$gdb_prompt $" { fail "print g_E.A::a" }
- timeout { fail "print g_E.A::a (timeout)" ; return }
}
- # The following is ambiguous, and gdb should detect this.
- # For now, accept gdb's behavior as an expected failure if it
- # simply prints either member correctly.
-
- send_gdb "print g_E.A::x\n"
- gdb_expect {
- -re "warning: A ambiguous; using E::D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 26$nl$gdb_prompt $" {
- pass "print g_E.A::x"
+ set name "ptype class vD"
+ gdb_test_multiple "ptype class vD" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
}
- -re "warning: A ambiguous; using E::D::B::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 22$nl$gdb_prompt $" {
- pass "print g_E.A::x (using B)"
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
}
- -re ".* = 26$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_E.A::x"
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name"
}
- -re ".* = 22$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_E.A::x"
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name"
}
- -re ".*$gdb_prompt $" { fail "print g_E.A::x" }
- timeout { fail "print g_E.A::x (timeout)" ; return }
}
- gdb_test "print g_E.B::b" ".* = 23" "print g_E.B::b"
-
- gdb_test "print g_E.B::x" ".* = 24" "print g_E.B::x"
-
- gdb_test "print g_E.C::c" ".* = 27" "print g_E.C::c"
+ set name "ptype g_vD"
+ gdb_test_multiple "ptype g_vD" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name"
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name"
+ }
+ }
- gdb_test "print g_E.C::x" ".* = 28" "print g_E.C::x"
+ # ptype vE: type, class, object.
- gdb_test "print g_E.D::d" ".* = 29" "print g_E.D::d"
+ set re_class "class vE : public virtual vD \{(${ws}private:|)"
+ set re_vbptr "vD \\*(_vb.2vD|_vb.vD);"
+ set re_access "public:"
+ set re_fields "int ve;${ws}int vx;"
+ set re_synth_gcc_2 "vE & operator=\\(vE const ?&\\);${ws}vE\\(int, vE const ?&\\);${ws}vE\\(int\\);"
+ set re_synth_gcc_3 "vE & operator=\\(vE const ?&\\);${ws}vE\\(vE const ?&\\);${ws}vE\\((void|)\\);"
- gdb_test "print g_E.D::x" ".* = 30" "print g_E.D::x"
+ set name "ptype vE"
+ gdb_test_multiple "ptype vE" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name"
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name"
+ }
+ }
- gdb_test "print g_E.E::e" ".* = 31" "print g_E.E::e"
+ set name "ptype class vE"
+ gdb_test_multiple "ptype class vE" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name"
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name"
+ }
+ }
- gdb_test "print g_E.E::x" ".* = 32" "print g_E.E::x"
+ set name "ptype g_vE"
+ gdb_test_multiple "ptype g_vE" $name {
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_vbptr${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_2$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ pass "$name"
+ }
+ -re "type = $re_class${ws}$re_access${ws}$re_fields${ws}$re_synth_gcc_3$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name"
+ }
+ }
}
-#
-# Multiple inheritance, print type definitions.
-#
+# Single inheritance, print individual members.
-proc test_ptype_mi {} {
- global nl
+proc test_print_si_members { } {
+ global vhn
- gdb_test "ptype D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype D"
+ # Print all members of g_A using fully qualified form.
+ gdb_test "print g_A.A::a" "$vhn = 1"
+ gdb_test "print g_A.A::x" "$vhn = 2"
- gdb_test "ptype class D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype class D"
+ # Print members of g_A using nonambiguous compact form.
+ gdb_test "print g_A.a" "$vhn = 1"
+ gdb_test "print g_A.x" "$vhn = 2"
- gdb_test "ptype g_D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype g_D"
+ # Print all members of g_B using fully qualified form.
+ gdb_test "print g_B.A::a" "$vhn = 3"
+ gdb_test "print g_B.A::x" "$vhn = 4"
+ gdb_test "print g_B.B::b" "$vhn = 5"
+ gdb_test "print g_B.B::x" "$vhn = 6"
- gdb_test "ptype E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype E"
+ # Print members of g_B using nonambiguous compact form.
+ gdb_test "print g_B.a" "$vhn = 3"
+ gdb_test "print g_B.b" "$vhn = 5"
+ gdb_test "print g_B.x" "$vhn = 6"
- gdb_test "ptype class E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype class E"
+ # Print all members of g_C using fully qualified form.
+ gdb_test "print g_C.A::a" "$vhn = 7"
+ gdb_test "print g_C.A::x" "$vhn = 8"
+ gdb_test "print g_C.C::c" "$vhn = 9"
+ gdb_test "print g_C.C::x" "$vhn = 10"
- gdb_test "ptype g_E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype g_E"
+ # Print members of g_C using nonambiguous compact form.
+ gdb_test "print g_C.a" "$vhn = 7"
+ gdb_test "print g_C.c" "$vhn = 9"
+ gdb_test "print g_C.x" "$vhn = 10"
}
-#
-# Multiple inheritance, print complete classes.
-#
-
-proc test_print_mi_classes {} {
- # Print all members of g_D.
-
- gdb_test "print g_D" ".* = \{\<(class |)B\> = \{\<(class |)A\> = \{a = 11, x = 12\}, b = 13, x = 14\}, \<(class |)C\> = \{\<(class |)A\> = \{a = 15, x = 16\}, c = 17, x = 18\}, d = 19, x = 20\}" "print g_D"
+# Single inheritance, print complete classes.
- # Print all members of g_E.
+proc test_print_si_classes { } {
+ global vhn
- gdb_test "print g_E" ".* = \{\<(class |)D\> = \{\<(class |)B\> = \{\<(class |)A\> = \{a = 21, x = 22\}, b = 23, x = 24\}, \<(class |)C\> = \{\<(class |)A\> = \{a = 25, x = 26\}, c = 27, x = 28\}, d = 29, x = 30\}, e = 31, x = 32\}" "print g_E"
+ # Print all members of g_A, g_B, g_C.
+ gdb_test "print g_A" "$vhn = \{a = 1, x = 2\}"
+ gdb_test "print g_B" "$vhn = \{<(class A|A)> = \{a = 3, x = 4\}, b = 5, x = 6\}"
+ gdb_test "print g_C" "$vhn = \{<(class A|A)> = \{a = 7, x = 8\}, c = 9, x = 10\}"
}
-#
-# Single virtual inheritance, print individual members.
-#
+# Multiple inheritance, print individual members.
-proc test_print_svi_members {} {
+proc test_print_mi_members {} {
global gdb_prompt
- global decimal
global nl
+ global vhn
- # Print all members of g_vA.
-
- gdb_test "print g_vA.vA::va" ".* = 1" "print g_vA.vA::va"
-
- gdb_test "print g_vA.vA::vx" ".* = 2" "print g_vA.vA::vx"
-
- # Print members of g_vA using compact form.
-
- gdb_test "print g_vA.va" ".* = 1" "print g_vA.va"
+ # Print all members of g_A.
+ gdb_test "print g_A.A::a" "$vhn = 1"
+ gdb_test "print g_A.A::x" "$vhn = 2"
- gdb_test "print g_vA.vx" ".* = 2" "print g_vA.vx"
+ # Print all members of g_B.
+ gdb_test "print g_B.A::a" "$vhn = 3"
+ gdb_test "print g_B.A::x" "$vhn = 4"
+ gdb_test "print g_B.B::b" "$vhn = 5"
+ gdb_test "print g_B.B::x" "$vhn = 6"
- # Print all members of g_vB.
+ # Print all members of g_C.
+ gdb_test "print g_C.A::a" "$vhn = 7"
+ gdb_test "print g_C.A::x" "$vhn = 8"
+ gdb_test "print g_C.C::c" "$vhn = 9"
+ gdb_test "print g_C.C::x" "$vhn = 10"
- send_gdb "print g_vB.vA::va\n"
- gdb_expect {
- -re ".* = 3$nl$gdb_prompt $" { pass "print g_vB.vA::va" }
- -re ".*virtual baseclass botch.*$gdb_prompt $" {
- # Does not happen with gcc cygnus-2.4.5-930828
- fail "print g_vB.vA::va (known bug with gcc cygnus-2.4.5-930417)"
- # Many of the rest of these tests have the same problem.
- return 0
+ # Print all members of g_D.
+ #
+ # g_D.A::a and g_D.A::x are ambiguous member accesses, and gdb
+ # should detect these. There are no ways to PASS these tests
+ # because I don't know what the gdb message will be. -- chastain
+ # 2004-01-27.
+
+ set name "print g_D.A::a"
+ gdb_test_multiple "print g_D.A::a" $name {
+ -re "$vhn = (15|11)$nl$gdb_prompt $" {
+ kfail "gdb/68" "print g_D.A::a"
}
- -re ".*$gdb_prompt $" { fail "print g_vB.vA::va" }
- timeout { fail "print g_vB.vA::va (timeout)" ; return }
}
- gdb_test "print g_vB.vA::vx" ".* = 4" "print g_vB.vA::vx"
-
- gdb_test "print g_vB.vB::vb" ".* = 5" "print g_vB.vB::vb"
-
- gdb_test "print g_vB.vB::vx" ".* = 6" "print g_vB.vB::vx"
-
- # Print members of g_vB using compact form.
-
- gdb_test "print g_vB.va" ".* = 3" "print g_vB.va"
-
- gdb_test "print g_vB.vb" ".* = 5" "print g_vB.vb"
-
- gdb_test "print g_vB.vx" ".* = 6" "print g_vB.vx"
+ set name "print g_D.A::x"
+ gdb_test_multiple "print g_D.A::x" $name {
+ -re "$vhn = (16|12)$nl$gdb_prompt $" {
+ kfail "gdb/68" "print g_D.A::x"
+ }
+ }
- # Print all members of g_vC.
+ gdb_test "print g_D.B::b" "$vhn = 13"
+ gdb_test "print g_D.B::x" "$vhn = 14"
+ gdb_test "print g_D.C::c" "$vhn = 17"
+ gdb_test "print g_D.C::x" "$vhn = 18"
+ gdb_test "print g_D.D::d" "$vhn = 19"
+ gdb_test "print g_D.D::x" "$vhn = 20"
- gdb_test "print g_vC.vA::va" ".* = 7" "print g_vC.vA::va"
+ # Print all members of g_E.
+ # g_E.A::a and g_E.A::x are ambiguous.
- gdb_test "print g_vC.vA::vx" ".* = 8" "print g_vC.vA::vx"
+ set name "print g_E.A::a"
+ gdb_test_multiple "print g_E.A::a" $name {
+ -re "$vhn = (21|25)$nl$gdb_prompt $" {
+ kfail "gdb/68" "print g_E.A::a"
+ }
+ }
- gdb_test "print g_vC.vC::vc" ".* = 9" "print g_vC.vC::vc"
+ set name "print g_E.A::x"
+ gdb_test_multiple "print g_E.A::x" $name {
+ -re "$vhn = (26|22)$nl$gdb_prompt $" {
+ kfail "gdb/68" "print g_E.A::x"
+ }
+ }
- gdb_test "print g_vC.vC::vx" ".* = 10" "print g_vC.vC::vx"
+ gdb_test "print g_E.B::b" "$vhn = 23"
+ gdb_test "print g_E.B::x" "$vhn = 24"
+ gdb_test "print g_E.C::c" "$vhn = 27"
+ gdb_test "print g_E.C::x" "$vhn = 28"
+ gdb_test "print g_E.D::d" "$vhn = 29"
+ gdb_test "print g_E.D::x" "$vhn = 30"
+ gdb_test "print g_E.E::e" "$vhn = 31"
+ gdb_test "print g_E.E::x" "$vhn = 32"
+}
- # Print members of g_vC using compact form.
+# Multiple inheritance, print complete classes.
- gdb_test "print g_vC.va" ".* = 7" "print g_vC.va"
+proc test_print_mi_classes { } {
+ global vhn
- gdb_test "print g_vC.vc" ".* = 9" "print g_vC.vc"
+ # Print all members of g_D.
+ gdb_test "print g_D" "$vhn = \{\<(class |)B\> = \{\<(class |)A\> = \{a = 11, x = 12\}, b = 13, x = 14\}, \<(class |)C\> = \{\<(class |)A\> = \{a = 15, x = 16\}, c = 17, x = 18\}, d = 19, x = 20\}"
- gdb_test "print g_vC.vx" ".* = 10" "print g_vC.vx"
+ # Print all members of g_E.
+ gdb_test "print g_E" "$vhn = \{\<(class |)D\> = \{\<(class |)B\> = \{\<(class |)A\> = \{a = 21, x = 22\}, b = 23, x = 24\}, \<(class |)C\> = \{\<(class |)A\> = \{a = 25, x = 26\}, c = 27, x = 28\}, d = 29, x = 30\}, e = 31, x = 32\}"
}
+# Single inheritance, print anonymous unions.
+# GDB versions prior to 4.14 entered an infinite loop when printing
+# the type of a class containing an anonymous union, and they were also
+# incapable of printing the member of an anonymous union.
+# We test the printing of the member first, and perform the other tests
+# only if the test succeeds, to avoid the infinite loop.
#
-# Single virtual inheritance, print type definitions.
-#
+# GDB HEAD 2004-01-27 with hp aCC A.03.45 crashes on the first test.
+# -- chastain 2004-01-27
-proc test_ptype_vi {} {
+proc test_print_anon_union {} {
global gdb_prompt
global ws
global nl
- global vbptr
+ global vhn
- # This class does not use any C++-specific features, so it's fine for
- # it to print as "struct".
- send_gdb "ptype vA\n"
- gdb_expect {
- -re "type = class vA \{$nl\[ \]*public:$nl\[ \]*int va;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype vA"
- }
- -re "type = struct vA \{$nl\[ \]*int va;$nl\[ \]*int vx;$nl\}$nl$gdb_prompt $" {
- pass "ptype vA"
- }
- -re ".*$gdb_prompt $" { fail "ptype vA" }
- timeout { fail "ptype vA (timeout)" ; return }
- }
+ gdb_test "print g_anon_union.a" "$vhn = 2" "print anonymous union member"
- # This class does not use any C++-specific features, so it's fine for
- # it to print as "struct".
- send_gdb "ptype class vA\n"
- gdb_expect {
- -re "type = class vA \{$nl\[ \]*public:$nl\[ \]*int va;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class vA"
- }
- -re "type = struct vA \{$nl\[ \]*int va;$nl\[ \]*int vx;$nl\}$nl$gdb_prompt $" {
- pass "ptype class vA"
+ set name "print variable of type anonymous union"
+ gdb_test_multiple "print g_anon_union" $name {
+ -re "$vhn = \{one = 1, \{a = 2, b = 2\}\}$nl$gdb_prompt $" {
+ pass $name
}
- -re ".*$gdb_prompt $" { fail "ptype class vA" }
- timeout { fail "ptype class vA (timeout)" ; return }
}
- # This class does not use any C++-specific features, so it's fine for
- # it to print as "struct".
- send_gdb "ptype g_vA\n"
- gdb_expect {
- -re "type = class vA \{$nl\[ \]*public:$nl\[ \]*int va;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype g_vA"
- }
- -re "type = struct vA \{$nl\[ \]*int va;$nl\[ \]*int vx;$nl\}$nl$gdb_prompt $" {
- pass "ptype g_vA"
- }
- -re ".*$gdb_prompt $" { fail "ptype g_vA" }
- timeout { fail "ptype g_vA (timeout)" ; return }
- }
+ set re_class "class class_with_anon_union \{${ws}public:"
+ set re_fields "int one;${ws}"
+ set re_anon_union "union \{${ws}int a;${ws}long int b;${ws}\};"
+ set re_synth_gcc_23 "class_with_anon_union & operator=\\(class_with_anon_union const ?&\\);${ws}class_with_anon_union\\(class_with_anon_union const ?&\\);${ws}class_with_anon_union\\((void|)\\);"
- send_gdb "ptype vB\n"
- gdb_expect {
- -re "ptype vB${nl}type = class vB : public virtual vA \{$nl private:${ws}vA \\*${vbptr}vA;$nl public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype vB"
+ set name "print type of anonymous union"
+ gdb_test_multiple "ptype g_anon_union" $name {
+ -re "type = $re_class${ws}$re_fields${ws}$re_anon_union$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re "ptype vB${nl}type = class vB : public virtual vA \{$nl public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype vB (aCC)"
+ -re "type = $re_class${ws}$re_fields${ws}$re_anon_union${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
+ pass $name
}
- -re ".*$gdb_prompt $" { fail "ptype vB" }
- timeout { fail "ptype vB (timeout)" }
}
+}
- send_gdb "ptype class vB\n"
- gdb_expect {
- -re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class vB"
- }
- -re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class vB (aCC)"
- }
- -re ".*$gdb_prompt $" { fail "ptype class vB" }
- timeout { fail "ptype class vB (timeout)" }
- }
- send_gdb "ptype g_vB\n"
- gdb_expect {
- -re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype g_vB"
- }
- -re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype g_vB (aCC)"
- }
- -re ".*$gdb_prompt $" { fail "ptype g_vB" }
- timeout { fail "ptype g_vB (timeout)" }
- }
+# Single virtual inheritance, print individual members.
- send_gdb "ptype vC\n"
- gdb_expect {
- -re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype vC"
- }
- -re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype vC (aCC)"
- }
- -re ".*$gdb_prompt $" { fail "ptype vC" }
- timeout { fail "ptype vC (timeout)" }
- }
+proc test_print_svi_members { } {
+ global vhn
- send_gdb "ptype class vC\n"
- gdb_expect {
- -re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class vC"
- }
- -re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class vC (aCC)"
- }
- -re ".*$gdb_prompt $" { fail "ptype class vC" }
- timeout { fail "ptype class vC (timeout)" }
- }
+ # Print all members of g_vA.
+ gdb_test "print g_vA.vA::va" "$vhn = 1"
+ gdb_test "print g_vA.vA::vx" "$vhn = 2"
- send_gdb "ptype g_vC\n"
- gdb_expect {
- -re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype g_vC"
- }
- -re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype g_vC (aCC)"
- }
- -re ".*$gdb_prompt $" { fail "ptype g_vC" }
- timeout { fail "ptype g_vC (timeout)" }
- }
+ # Print members of g_vA using compact form.
+ gdb_test "print g_vA.va" "$vhn = 1"
+ gdb_test "print g_vA.vx" "$vhn = 2"
+
+ # Print all members of g_vB.
+ gdb_test "print g_vB.vA::va" "$vhn = 3"
+ gdb_test "print g_vB.vA::vx" "$vhn = 4"
+ gdb_test "print g_vB.vB::vb" "$vhn = 5"
+ gdb_test "print g_vB.vB::vx" "$vhn = 6"
+
+ # Print members of g_vB using compact form.
+ gdb_test "print g_vB.va" "$vhn = 3"
+ gdb_test "print g_vB.vb" "$vhn = 5"
+ gdb_test "print g_vB.vx" "$vhn = 6"
+
+ # Print all members of g_vC.
+ gdb_test "print g_vC.vA::va" "$vhn = 7"
+ gdb_test "print g_vC.vA::vx" "$vhn = 8"
+ gdb_test "print g_vC.vC::vc" "$vhn = 9"
+ gdb_test "print g_vC.vC::vx" "$vhn = 10"
+
+ # Print members of g_vC using compact form.
+ gdb_test "print g_vC.va" "$vhn = 7" "print g_vC.va"
+ gdb_test "print g_vC.vc" "$vhn = 9" "print g_vC.vc"
+ gdb_test "print g_vC.vx" "$vhn = 10" "print g_vC.vx"
}
-#
# Single virtual inheritance, print complete classes.
-#
-proc test_print_svi_classes {} {
+proc test_print_svi_classes { } {
global gdb_prompt
global hex
- global decimal
global nl
- global vbptr
+ global vhn
# Print all members of g_vA.
-
- gdb_test "print g_vA" ".* = \{va = 1, vx = 2\}" "print g_vA"
+ gdb_test "print g_vA" "$vhn = \{va = 1, vx = 2\}"
# Print all members of g_vB.
-
- send_gdb "print g_vB\n"
- gdb_expect {
- -re ".* = \{\<class vA\> = \{va = 3, vx = 4\}, vb = 5, vx = 6, Virtual table at $hex\}$nl$gdb_prompt $" {
- pass "print g_vB (aCC)"
- }
- -re ".* = \{\<class vA\> = \{va = 3, vx = 4\}, vb = 5, vx = 6, __vfp = $hex\}$nl$gdb_prompt $" {
- pass "print g_vB (aCC)"
- }
- -re ".* = \{\<vA\> = \{va = 3, vx = 4\}, ${vbptr}vA = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
- pass "print g_vB"
+ set re_vbptr_2 "(_vb.2vA|_vb.vA)"
+ set re_vbptr_3 "_vptr.vB"
+
+ set name "print g_vB"
+ gdb_test_multiple "print g_vB" $name {
+ -re "$vhn = \{<vA> = \{va = 3, vx = 4\}, $re_vbptr_2 = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ pass $name
+ }
+ -re "$vhn = \{<vA> = \{va = 3, vx = 4\}, $re_vbptr_3 = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name (FIXME v3 vtbl ptr)"
+ }
+ -re "$vhn = \{<vA> = \{va = 3, vx = 4\}, $re_vbptr_3 = $hex <VTT for vB>, vb = 5, vx = 6\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ pass $name
}
- -re ".* = \{\<vA\> = \{va = 3, vx = 4\}, _vptr.vB = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
- pass "print g_vB (FIXME v3 vtbl ptr)"
- }
- -re ".* = \{\<vA\> = \{va = 3, vx = 4\}, _vptr.vB = $hex <VTT for vB>, vb = 5, vx = 6\}$nl$gdb_prompt $" {
- # Happens with gcc 3.3 -gstabs+
- # Does not happen with gcc 3.2.3 -gstabs+.
- # Does not happen gcc HEAD%20030624 (pre-3.4) -gstabs+.
- # -- chastain 2003-06-29
- pass "print g_vB"
- }
-
- -re ".*invalid address 0x0.*$gdb_prompt $" {
- # Does not happen with gcc cygnus-2.4.5-930828
- fail "print g_vB (known bug with gcc cygnus-2.4.5-930417)"
- # Many of the rest of these tests have the same problem.
- return 0
- }
- -re ".*$gdb_prompt $" { fail "print g_vB" }
- timeout { fail "print g_vB (timeout)" ; return }
}
# Print all members of g_vC.
-
- send_gdb "print g_vC\n"
- gdb_expect {
- -re ".* = \{\<class vA\> = \{va = 7, vx = 8\}, vc = 9, vx = 10, Virtual table at $hex\}$nl$gdb_prompt $" {
- pass "print g_vC (aCC)"
- }
- -re ".* = \{\<class vA\> = \{va = 7, vx = 8\}, vc = 9, vx = 10, __vfp = $hex\}$nl$gdb_prompt $" {
- pass "print g_vC (aCC)"
+ set re_vbptr_2 "(_vb.2vA|_vb.vA)"
+ set re_vbptr_3 "_vptr.vC"
+
+ set name "print g_vC"
+ gdb_test_multiple "print g_vC" $name {
+ -re "$vhn = \{<vA> = \{va = 7, vx = 8\}, $re_vbptr_2 = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ pass $name
+ }
+ -re "$vhn = \{<vA> = \{va = 7, vx = 8\}, $re_vbptr_3 = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name (FIXME v3 vtbl ptr)"
+ }
+ -re "$vhn = \{<vA> = \{va = 7, vx = 8\}, $re_vbptr_3 = $hex <VTT for vC>, vc = 9, vx = 10\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ pass $name
}
- -re ".* = \{\<vA\> = \{va = 7, vx = 8\}, ${vbptr}vA = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
- pass "print g_vC"
- }
- -re ".* = \{\<vA\> = \{va = 7, vx = 8\}, _vptr.vC = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
- pass "print g_vC (FIXME v3 vtbl ptr)"
- }
- -re ".* = \{\<vA\> = \{va = 7, vx = 8\}, _vptr.vC = $hex <VTT for vC>, vc = 9, vx = 10\}$nl$gdb_prompt $" {
- # Happens with gcc 3.3 -gstabs+
- # Does not happen with gcc 3.2.3 -gstabs+.
- # Does not happen gcc HEAD%20030624 (pre-3.4) -gstabs+.
- # -- chastain 2003-06-29
- pass "print g_vC"
- }
- -re ".*$gdb_prompt $" { fail "print g_vC" }
- timeout { fail "print g_vC (timeout)" }
}
}
-#
# Multiple virtual inheritance, print individual members.
-#
-proc test_print_mvi_members {} {
- global gdb_prompt
- global decimal
- global nl
+proc test_print_mvi_members { } {
+ global vhn
# Print all members of g_vD.
-
- send_gdb "print g_vD.vA::va\n"
- gdb_expect {
- -re ".* = 19$nl$gdb_prompt $" { pass "print g_vD.vA::va" }
- -re ".*virtual baseclass botch.*$gdb_prompt $" {
- # Does not happen with gcc cygnus-2.4.5-930828
- fail "print g_vD.vA::va (known bug with gcc cygnus-2.4.5-930417)"
- # Many of the rest of these tests have the same problem.
- return 0
- }
- -re ".*$gdb_prompt $" { fail "print g_vD.vA::va" }
- timeout { fail "print g_vD.vA::va (timeout)" ; return }
- }
-
- gdb_test "print g_vD.vA::vx" ".* = 20" "print g_vD.vA::vx"
-
- gdb_test "print g_vD.vB::vb" ".* = 21" "print g_vD.vB::vb"
-
- gdb_test "print g_vD.vB::vx" ".* = 22" "print g_vD.vB::vx"
-
- gdb_test "print g_vD.vC::vc" ".* = 23" "print g_vD.vC::vc"
-
- gdb_test "print g_vD.vC::vx" ".* = 24" "print g_vD.vC::vx"
-
- gdb_test "print g_vD.vD::vd" ".* = 25" "print g_vD.vD::vd"
-
- gdb_test "print g_vD.vD::vx" ".* = 26" "print g_vD.vD::vx"
+ gdb_test "print g_vD.vA::va" "$vhn = 19"
+ gdb_test "print g_vD.vA::vx" "$vhn = 20"
+ gdb_test "print g_vD.vB::vb" "$vhn = 21"
+ gdb_test "print g_vD.vB::vx" "$vhn = 22"
+ gdb_test "print g_vD.vC::vc" "$vhn = 23"
+ gdb_test "print g_vD.vC::vx" "$vhn = 24"
+ gdb_test "print g_vD.vD::vd" "$vhn = 25"
+ gdb_test "print g_vD.vD::vx" "$vhn = 26"
# Print all members of g_vE.
-
- gdb_test "print g_vE.vA::va" ".* = 0" "print g_vE.vA::va"
-
- gdb_test "print g_vE.vA::vx" ".* = 0" "print g_vE.vA::vx"
-
- gdb_test "print g_vE.vB::vb" ".* = 0" "print g_vE.vB::vb"
-
- gdb_test "print g_vE.vB::vx" ".* = 0" "print g_vE.vB::vx"
-
- gdb_test "print g_vE.vC::vc" ".* = 0" "print g_vE.vC::vc"
-
- gdb_test "print g_vE.vC::vx" ".* = 0" "print g_vE.vC::vx"
-
- gdb_test "print g_vE.vD::vd" ".* = 0" "print g_vE.vD::vd"
-
- gdb_test "print g_vE.vD::vx" ".* = 0" "print g_vE.vD::vx"
-
- gdb_test "print g_vE.vE::ve" ".* = 27" "print g_vE.vE::ve"
-
- gdb_test "print g_vE.vE::vx" ".* = 28" "print g_vE.vE::vx"
+ gdb_test "print g_vE.vA::va" "$vhn = 0"
+ gdb_test "print g_vE.vA::vx" "$vhn = 0"
+ gdb_test "print g_vE.vB::vb" "$vhn = 0"
+ gdb_test "print g_vE.vB::vx" "$vhn = 0"
+ gdb_test "print g_vE.vC::vc" "$vhn = 0"
+ gdb_test "print g_vE.vC::vx" "$vhn = 0"
+ gdb_test "print g_vE.vD::vd" "$vhn = 0"
+ gdb_test "print g_vE.vD::vx" "$vhn = 0"
+ gdb_test "print g_vE.vE::ve" "$vhn = 27"
+ gdb_test "print g_vE.vE::vx" "$vhn = 28"
}
-#
-# Multiple virtual inheritance, print type definitions.
-#
+# Multiple virtual inheritance, print complete classes.
-proc test_ptype_mvi {} {
+proc test_print_mvi_classes { } {
global gdb_prompt
+ global hex
global ws
global nl
- global vbptr
-
- send_gdb "ptype vD\n"
- gdb_expect {
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype vD"
- }
- -re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
- pass "ptype vD"
- }
- -re ".*$gdb_prompt $" { fail "ptype vD" }
- timeout { fail "(timeout) ptype vD" }
- }
-
- send_gdb "ptype class vD\n"
- gdb_expect {
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype class vD"
- }
- -re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
- pass "ptype class vD"
- }
- -re ".*$gdb_prompt $" { fail "ptype class vD" }
- timeout { fail "(timeout) ptype class vD" }
- }
-
- send_gdb "ptype g_vD\n"
- gdb_expect {
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype g_vD"
- }
- -re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
- pass "ptype g_vD"
- }
- -re ".*$gdb_prompt $" { fail "ptype g_vD" }
- timeout { fail "(timeout) ptype g_vD" }
- }
-
- send_gdb "ptype vE\n"
- gdb_expect {
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype vE"
- }
- -re ".*class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
- pass "ptype vE"
- }
- -re ".*$gdb_prompt $" { fail "ptype vE" }
- timeout { fail "(timeout) ptype vE" }
- }
+ global vhn
- send_gdb "ptype class vE\n"
- gdb_expect {
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype class vE"
- }
- -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
- pass "ptype class vE"
- }
- -re ".*$gdb_prompt $" { fail "ptype class vE" }
- timeout { fail "(timeout) ptype class vE" }
- }
+ # Virtual base pointers for everybody.
- send_gdb "ptype g_vE\n"
- gdb_expect {
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype g_vE"
- }
- -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
- pass "ptype g_vE"
- }
- -re ".*$gdb_prompt $" { fail "ptype g_vE" }
- timeout { fail "(timeout) ptype g_vE" }
- }
-}
-
-#
-# Multiple virtual inheritance, print complete classes.
-#
-
-proc test_print_mvi_classes {} {
- global gdb_prompt
- global hex
- global decimal
- global nl
- global vbptr
+ set re_vbptr_2_vA "(_vb.2vA|_vb.vA)"
+ set re_vbptr_2_vB "(_vb.2vB|_vb.vB)"
+ set re_vbptr_2_vC "(_vb.2vC|_vb.vC)"
+ set re_vbptr_2_vD "(_vb.2vD|_vb.vD)"
+ set re_vbptr_3_vA "_vptr.vA"
+ set re_vbptr_3_vB "_vptr.vB"
+ set re_vbptr_3_vC "_vptr.vC"
+ set re_vbptr_3_vD "_vptr.vD"
+ set re_vbptr_3_vE "_vptr.vE"
# Print all members of g_vD.
- send_gdb "print g_vD\n"
- gdb_expect {
- -re ".* = \{\<class vB\> = \{\<class vA\> = \{va = 19, vx = 20\}, vb = 21, vx = 22, Virtual table at $hex\}, \<class vC\> = \{vc = 23, vx = 24, Virtual table at $hex\}, vd = 25, vx = 26, Virtual table at $hex\}$nl$gdb_prompt $" {
- pass "print g_vD (aCC)"
- }
- -re ".* = \{\<class vB\> = \{\<class vA\> = \{va = 19, vx = 20\}, vb = 21, vx = 22, __vfp = $hex\}, \<class vC\> = \{vc = 23, vx = 24, __vfp = $hex\}, vd = 25, vx = 26, __vfp = $hex\}$nl$gdb_prompt $" {
- pass "print g_vD (aCC)"
+ set name "print g_vD"
+ gdb_test_multiple "print g_vD" $name {
+ -re "$vhn = \{<vB> = \{<vA> = \{va = 19, vx = 20\}, $re_vbptr_2_vA = $hex, vb = 21, vx = 22\}, <vC> = \{$re_vbptr_2_vA = $hex, vc = 23, vx = 24\}, $re_vbptr_2_vC = $hex, $re_vbptr_2_vB = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ pass $name
}
- -re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, ${vbptr}vA = $hex, vb = 21, vx = 22\}, \<vC\> = \{${vbptr}vA = $hex, vc = 23, vx = 24\}, ${vbptr}vC = $hex, ${vbptr}vB = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
- pass "print g_vD"
+ -re "$vhn = \{<vB> = \{<vA> = \{va = 19, vx = 20\}, $re_vbptr_3_vB = $hex, vb = 21, vx = 22\}, <vC> = \{$re_vbptr_3_vC = $hex, vc = 23, vx = 24\}, $re_vbptr_3_vD = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name (FIXME v3 vtbl ptr)"
}
- -re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, _vptr.vB = $hex, vb = 21, vx = 22\}, \<vC\> = \{_vptr.vC = $hex, vc = 23, vx = 24\}, _vptr.vD = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
- pass "print g_vD (FIXME v3 vtbl ptr)"
+ -re "$vhn = \{<vB> = \{<vA> = \{va = 19, vx = 20\}, $re_vbptr_3_vB = $hex, vb = 21, vx = 22\}, <vC> = \{$re_vbptr_3_vC = $hex <VTT for vD>, vc = 23, vx = 24\}, $re_vbptr_3_vD = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ pass "$name"
}
- -re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, _vptr.vB = $hex, vb = 21, vx = 22\}, \<vC\> = \{_vptr.vC = $hex <VTT for vD>, vc = 23, vx = 24\}, _vptr.vD = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
- # Happens with gcc 3.3 -gstabs+
- # Does not happen with gcc 3.2.3 -gstabs+.
- # Does not happen gcc HEAD%20030624 (pre-3.4) -gstabs+.
- # -- chastain 2003-06-29
- pass "print g_vD"
- }
- -re ".*invalid address 0x0.*$gdb_prompt $" {
- # Does not happen with gcc cygnus-2.4.5-930828
- fail "print g_vD (known bug with gcc cygnus-2.4.5-930417)"
- # Many of the rest of these tests have the same problem.
- return 0
- }
- -re ".*$gdb_prompt $" { fail "print g_vD" }
- timeout { fail "print g_vD (timeout)" ; return }
}
# Print all members of g_vE.
- send_gdb "print g_vE\n"
- gdb_expect {
- -re ".* = \{\<class vD\> = \{\<class vB\> = \{\<class vA\> = \{va = 0, vx = 0\}, vb = 0, vx = 0, Virtual table at $hex\}, \<class vC\> = \{vc = 0, vx = 0, Virtual table at $hex\}, vd = 0, vx = 0, Virtual table at $hex\}, ve = 27, vx = 28, Virtual table at $hex\}$nl$gdb_prompt $" {
- pass "print g_vE (aCC)"
- }
- -re ".* = \{\<class vD\> = \{\<class vB\> = \{\<class vA\> = \{va = 0, vx = 0\}, vb = 0, vx = 0, __vfp = $hex\}, \<class vC\> = \{vc = 0, vx = 0, __vfp = $hex\}, vd = 0, vx = 0, __vfp = $hex\}, ve = 27, vx = 28, __vfp = $hex\}$nl$gdb_prompt $" {
- pass "print g_vE (aCC)"
+ set name "print g_vE"
+ gdb_test_multiple "print g_vE" $name {
+ -re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_2_vA = $hex, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_2_vA = $hex, vc = 0, vx = 0\}, $re_vbptr_2_vC = $hex, $re_vbptr_2_vB = $hex, vd = 0, vx = 0\}, $re_vbptr_2_vD = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ pass $name
}
- -re ".* = \{\<vD\> = \{\<vB\> = \{\<vA\> = \{va = 0, vx = 0\}, ${vbptr}vA = $hex, vb = 0, vx = 0\}, \<vC\> = \{${vbptr}vA = $hex, vc = 0, vx = 0\}, ${vbptr}vC = $hex, ${vbptr}vB = $hex, vd = 0, vx = 0\}, ${vbptr}vD = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
- pass "print g_vE"
+ -re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_3_vB = $hex, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_3_vC = $hex, vc = 0, vx = 0\}, $re_vbptr_3_vD = $hex, vd = 0, vx = 0\}, $re_vbptr_3_vE = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-21 -gdwarf-2
+ # gcc HEAD 2004-01-21 -gstabs+
+ pass "$name (FIXME v3 vtbl ptr)"
}
- -re ".* = \{\<vD\> = \{\<vB\> = \{\<vA\> = \{va = 0, vx = 0\}, _vptr.vB = $hex *(\<VTT for vD\>)?, vb = 0, vx = 0\}, \<vC\> = \{_vptr.vC = $hex *(\<VTT for vD\>)?, vc = 0, vx = 0\}, _vptr.vD = $hex, vd = 0, vx = 0\}, _vptr.vE = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
- pass "print g_vE (FIXME v3 vtbl ptr)"
+ -re "$vhn = \{<vD> = \{<vB> = \{<vA> = \{va = 0, vx = 0\}, $re_vbptr_3_vB = $hex, vb = 0, vx = 0\}, <vC> = \{$re_vbptr_3_vC = $hex <VTT for vD>, vc = 0, vx = 0\}, $re_vbptr_3_vD = $hex, vd = 0, vx = 0\}, $re_vbptr_3_vE = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
+ # gcc 3.2.7-rh -gstabs+
+ pass "$name (FIXME v3 vtbl ptr)"
}
- -re ".*$gdb_prompt $" { fail "print g_vE" }
- timeout { fail "print g_vE (timeout)" }
}
}
-proc do_tests {} {
+proc do_tests { } {
global prms_id
global bug_id
global subdir
@@ -980,10 +1037,9 @@ proc do_tests {} {
gdb_test "set language c++" ""
gdb_test "set width 0" ""
- # Get the debug format for the compiled test case.
-
- if { ![ runto_main] } {
- gdb_suppress_tests;
+ if { ![runto_main] } then {
+ perror "couldn't run to main"
+ return
}
test_ptype_si
@@ -991,10 +1047,9 @@ proc do_tests {} {
test_ptype_vi
test_ptype_mvi
- gdb_stop_suppressing_tests;
-
- if { ![ runto 'inheritance2' ] } {
- gdb_suppress_tests;
+ if { ![runto 'inheritance2'] } then {
+ perror "couldn't run to inheritance2"
+ return
}
test_print_si_members
@@ -1003,10 +1058,9 @@ proc do_tests {} {
test_print_mi_classes
test_print_anon_union
- gdb_stop_suppressing_tests;
-
- if { ![ runto 'inheritance4' ] } {
- gdb_suppress_tests;
+ if { ![runto 'inheritance4'] } {
+ perror "couldn't run to inheritance4"
+ return
}
test_print_svi_members
diff --git a/gdb/testsuite/gdb.cp/local.exp b/gdb/testsuite/gdb.cp/local.exp
index 21ceb7ae3db..6bae99ff290 100644
--- a/gdb/testsuite/gdb.cp/local.exp
+++ b/gdb/testsuite/gdb.cp/local.exp
@@ -1,4 +1,5 @@
-# Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# tests for local variables
# Written by Satish Pai <pai@apollo.hp.com> 1997-07-08
# Cleaned by Michael Chastain <mec@shout.net> 2002-04-08
@@ -24,6 +22,9 @@
# This file is part of the gdb testsuite
+set ws "\[\r\n\t \]+"
+set nl "\[\r\n\]+"
+
if $tracelevel then {
strace $tracelevel
}
@@ -69,45 +70,104 @@ if ![runto 'marker1'] then {
gdb_test "up" ".*foobar.*" "up from marker1"
-# Local classes in g++ get names like "main.1::InnerLocal", just like local
-# static variables. Some targets use "___" instead of ".".
+set sep "(\[.\]|___)\[0-9\]"
-# ---
-# Pattern 1:
-# PASS
-# dwarf-2
-# gcc 2.95.3
+# ptype on a local variable.
#
-# Pattern 2:
-# FAIL
-# This has a duplicate "char loc_foo" line. This is a bug.
-# Historically this has been an XFAIL.
-# dwarf-2
-# gcc 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
+# This test has six arms. The first three arms accept normal output:
+# no synthetic methods; synthetic methods before user methods;
+# synthetic methods after user methods.
#
-# Pattern 3:
-# PASS
-# stabs+
-# gcc 2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
+# The next two arms accept "foobar__Fi.0::Local" instead of "Local".
+# This is a bug. It happens in various places with various versions of
+# gcc and gdb and various debugging types.
#
-# Pattern 4:
-# This an old pattern from the hppa aCC version of this file.
-# I left it alone.
+# The last arm accepts the user methods in duplicate. This bug happens
+# with gcc 3.3.2 -gdwarf-2, and has been fixed in gcc HEAD 2004-01-22.
#
-# chastain 2002-04-08
+# -- chastain 2004-01-24
-set sep "(\[.\]|___)\[0-9\]"
+set re_class "((struct|class) Local \{${ws}public:|struct Local \{)"
+set re_fields "int loc1;"
+set re_methods "char loc_foo\\(char\\);"
+set re_synth_gcc_23 "Local & operator=\\(Local const ?&\\);${ws}Local\\(Local const ?&\\);${ws}Local\\((void|)\\);"
-send_gdb "ptype Local\n"
-gdb_expect {
- -re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype Local" }
- -re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*\}.*$gdb_prompt $" {
- kfail "gdb/483" "ptype Local"
- }
- -re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*Local & operator *=\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((void|)\\);\[\r\n\t \]*char loc_foo\\(char\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype Local" }
- -re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*char loc_foo\\(char\\);\r\n\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\)\r\n\}.*$gdb_prompt $" { xpass "ptype Local (old aCC)" }
- -re ".*$gdb_prompt $" { fail "ptype Local" }
- timeout { fail "(timeout) ptype Local" }
+set XX_class "((struct|class) foobar__Fi.0::Local \{${ws}public:|struct foobar__Fi.0:Local \{)"
+set XX_synth_gcc_2 "Local & operator=\\(foobar__Fi.0::Local const ?&\\);${ws}Local\\(foobar__Fi.0::Local const ?&\\);${ws}Local\\((void|)\\);"
+set YY_methods "$re_methods${ws}$re_methods"
+
+set name "ptype l"
+gdb_test_multiple "ptype l" $name {
+ -re "type = $re_class${ws}$re_fields${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gdb 6.0, gcc 2.95.3, dwarf-2
+ # gdb 6.0, gcc HEAD 2004-01-22, dwarf-2
+ # gdb HEAD 2004-01-23, gcc HEAD 2004-01,22, dwarf-2
+ pass "$name"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gdb 6.0, gcc 3.3.2, stabs+
+ # gdb HEAD 2004-01-23, gcc 3.3.2, stabs+
+ pass "$name"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23${ws}$nl\}$nl$gdb_prompt $" {
+ # gdb 6.0, gcc HEAD 2004-01-22, stabs+
+ # gdb HEAD 2004-01-23, gcc HEAD 2004-01-22, stabs+
+ pass "$name"
+ }
+ -re "type = $XX_class${ws}$re_fields${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gdb HEAD 2004-01-23, gcc 2.95.3, dwarf-2
+ kfail "gdb/1516" "$name"
+ }
+ -re "type = ($re_class|$XX_class)${ws}$re_fields${ws}($re_synth_gcc_23|$XX_synth_gcc_2)${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gdb 6.0, gcc 2.95.3, stabs+
+ # gdb HEAD 2004-01-23, gcc 2.95.3, stabs+
+ kfail "gdb/1516" "$name"
+ }
+ -re "type = ($re_class|$XX_class)${ws}$re_fields${ws}$YY_methods$nl\}$nl$gdb_prompt $" {
+ # gdb 6.0, gcc 3.3.2, dwarf-2
+ # gdb HEAD 2004-01-23, gcc 3.2.2, dwarf-2
+ kfail "gdb/483" "$name"
+ }
+}
+
+# This is the same test with "ptype Local" (the type name)
+# instead of "ptype l" (the variable name).
+
+set name "ptype Local"
+gdb_test_multiple "ptype Local" $name {
+ -re "type = $re_class${ws}$re_fields${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gdb 6.0, gcc 2.95.3, dwarf-2
+ # gdb 6.0, gcc HEAD 2004-01-22, dwarf-2
+ # gdb HEAD 2004-01-23, gcc HEAD 2004-01-22, dwarf-2
+ pass "$name"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gdb 6.0, gcc 3.3.2, stabs+
+ # gdb HEAD 2004-01-23, gcc 3.3.2, stabs+
+ pass "$name"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23${ws}$nl\}$nl$gdb_prompt $" {
+ # gdb 6.0, gcc HEAD 2004-01-22, stabs+
+ # gdb HEAD 2004-01-23, gcc HEAD 2004-01-22, stabs+
+ pass "$name"
+ }
+ -re "type = $XX_class${ws}$re_fields${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ kfail "gdb/1516" "$name"
+ }
+ -re "type = ($re_class|$XX_class)${ws}$re_fields${ws}($re_synth_gcc_23|$XX_synth_gcc_2)${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gdb 6.0, gcc 2.95.3, stabs+
+ # gdb HEAD 2004-01-23, gcc 2.95.3, stabs+
+ kfail "gdb/1516" "$name"
+ }
+ -re "type = ($re_class|$XX_class)${ws}$re_fields${ws}$YY_methods$nl\}$nl$gdb_prompt $" {
+ # gdb 6.0, gcc 3.3.2, dwarf-2
+ # gdb HEAD 2004-01-23, gcc 3.2.2, dwarf-2
+ kfail "gdb/483" "$name"
+ }
+ -re "No symbol \"Local\" in current context.$nl$gdb_prompt $" {
+ # gdb HEAD 2004-01-23, gcc 2.95.3, dwarf-2
+ fail "$name"
+ }
}
gdb_test "break marker2"
@@ -131,6 +191,10 @@ gdb_expect {
# this right.
kfail gdb/825 "Local out of scope"
}
+ -re "ptype Local${eol}type = class Local {${eol} public:${eol} int loc1;${eol} char loc_foo\\(char\\);${eol}.*${eol}}${eol}${gdb_prompt} " {
+ # gcc 3.X abi-2 -gstabs+
+ kfail gdb/825 "Local out of scope"
+ }
-re ".*${gdb_prompt} $" {
fail "Local out of scope"
}
@@ -168,12 +232,20 @@ gdb_expect {
#
# chastain 2002-05-27
+# Pattern 5:
+# PASS
+# stabs+
+# HEAD
+#
+# chastain 2004-01-02
+
send_gdb "ptype InnerLocal\n"
gdb_expect {
-re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*int il_foo\\((unsigned char const|const unsigned char) *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 1)" }
-re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 2)" }
-re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" }
-re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal4::NestedInnerLocal nest1;\r\n\r\n\[\t \]*int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\\(Local at.*local\.cc:\[0-9\]+\\)\r\n\}.*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" }
+ -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]* int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 5)" }
-re ".*$gdb_prompt $" { fail "ptype InnerLocal" }
timeout { fail "(timeout) ptype InnerLocal" }
}
@@ -191,38 +263,46 @@ gdb_expect {
#
# chastain 2002-04-08
+# NOTE (2004-02-24, carlton): This test really is invalid -
+# 'NestedInnerLocal' shouldn't be visible, so only the third
+# expression should count as a pass. I'm leaving in the earlier
+# passes, however, given the current problematic state of our local
+# class support, but once we fix PR gdb/482, we should delete this
+# test.
+
send_gdb "ptype NestedInnerLocal\n"
gdb_expect {
-re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
-re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*NestedInnerLocal *& *operator *= *\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((void|)\\);\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
+ -re "No symbol \"NestedInnerLocal\" in current context\.\r\n$gdb_prompt $" {
+ pass "ptype NestedInnerLocal"
+ }
-re ".*$gdb_prompt $" { fail "ptype NestedInnerLocal" }
timeout { fail "(timeout) ptype NestedInnerLocal" }
}
-# gdb incorrectly interprets the NestedInnerLocal in
-# InnerLocal::NestedInnerLocal as field name instead of a type name;
-# See CLLbs14784.
+set re_class "((struct|class) InnerLocal::NestedInnerLocal \{${ws}public:|struct InnerLocal::NestedInnerLocal \{)"
+set re_fields "int nil;"
+set re_methods "int nil_foo\\(int\\);"
+set re_synth_gcc_23 "InnerLocal::NestedInnerLocal & operator=\\(InnerLocal::NestedInnerLocal const ?&\\);${ws}NestedInnerLocal\\(InnerLocal::NestedInnerLocal const ?&\\);${ws}NestedInnerLocal\\(\\);"
-#---
-# Pattern 3:
-# FAIL
-# The comment above, about CLLbs14784, is still correct.
-# dwarf-2
-# gcc 2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
-# stabs+
-# gcc 2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
-#
-# chastain 2002-04-08
-
-send_gdb "ptype InnerLocal::NestedInnerLocal\n"
-gdb_expect {
- -re "type = class InnerLocal::NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal::NestedInnerLocal" }
- -re "type = class InnerLocal::NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*NestedInnerLocal *& *operator *= *\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((void|)\\);\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal::NestedInnerLocal" }
- -re "There is no field named NestedInnerLocal.*$gdb_prompt $" {
- setup_kfail "gdb/482" *-*-*
- fail "ptype InnerLocal::NestedInnerLocal"
- }
- -re "No symbol .*NestedInnerLocal.* in current context.*$gdb_prompt $" { fail "ptype InnerLocal::NestedInnerLocal (bogus symbol lookup)" }
- -re ".*$gdb_prompt $" { fail "ptype InnerLocal::NestedInnerLocal" }
- timeout { fail "(timeout) ptype InnerLocal::NestedInnerLocal" }
+set name "ptype InnerLocal::NestedInnerLocal"
+gdb_test_multiple "ptype InnerLocal::NestedInnerLocal" $name {
+ -re "type = $re_class${ws}$re_fields${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gcc -gdwarf-2 should produce this but does not yet
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth_gcc_23${ws}$re_methods${ws}$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc v3 -gstabs+, abi 1
+ pass $name
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23${ws}$nl\}$nl$gdb_prompt $" {
+ # gcc v3 -gstabs+, abi 2
+ pass $name
+ }
+ -re "There is no field named NestedInnerLocal.*$gdb_prompt $" {
+ # gcc v3 -gdwarf-2
+ kfail "gdb/482" $name
+ }
}
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index d291135fb06..56cd7bc3bfc 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -33,16 +33,22 @@ set prms_id 0
set bug_id 0
set testfile "m-static"
-set srcfile ${testfile}.cc
-set srcfile1 ${testfile}1.cc
-set binfile ${objdir}/${subdir}/${testfile}
+set srcfile "${srcdir}/${subdir}/${testfile}.cc"
+set srcfile1 "${srcdir}/${subdir}/${testfile}1.cc"
+set objfile "${objdir}/${subdir}/${testfile}.o"
+set objfile1 "${objdir}/${subdir}/${testfile}1.o"
+set binfile "${objdir}/${subdir}/${testfile}"
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1}" "${binfile}" executable {debug c++}] != "" } {
+if { [gdb_compile "${srcfile}" "${objfile}" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if [get_compiler_info ${binfile} "c++"] {
- return -1
+if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${objfile} ${objfile1}" "${binfile}" executable {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit
diff --git a/gdb/testsuite/gdb.cp/maint.exp b/gdb/testsuite/gdb.cp/maint.exp
index 710e14ae648..fd93333b758 100644
--- a/gdb/testsuite/gdb.cp/maint.exp
+++ b/gdb/testsuite/gdb.cp/maint.exp
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation Inc.
+# Copyright 2003, 2004 Free Software Foundation Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +14,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file tests C++-specific maintenance commands and help on those.
diff --git a/gdb/testsuite/gdb.cp/member-ptr.cc b/gdb/testsuite/gdb.cp/member-ptr.cc
index 4beb92616d4..e668c4623c1 100644
--- a/gdb/testsuite/gdb.cp/member-ptr.cc
+++ b/gdb/testsuite/gdb.cp/member-ptr.cc
@@ -1,3 +1,24 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1998, 1999, 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+
extern "C" {
#include <stdio.h>
}
diff --git a/gdb/testsuite/gdb.cp/member-ptr.exp b/gdb/testsuite/gdb.cp/member-ptr.exp
index f21cd1506e7..f6a9d4039b0 100644
--- a/gdb/testsuite/gdb.cp/member-ptr.exp
+++ b/gdb/testsuite/gdb.cp/member-ptr.exp
@@ -1,4 +1,6 @@
-# Copyright 1998, 1999 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2003, 2004 Free Software Foundation, Inc.
+
+# This file is part of the gdb testsuite
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,29 +16,20 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
# Tests for pointer-to-member support
# Written by Satish Pai <pai@apollo.hp.com> 1997-08-19
+# Rewritten by Michael Chastain <mec.gnu@mindspring.com> 2004-01-11
-# This file is part of the gdb testsuite
+# TODO: copyright notice for member-ptr.cc
+set vhn "\\$\[0-9\]+"
if $tracelevel then {
- strace $tracelevel
- }
+ strace $tracelevel
+}
if { [skip_cplus_tests] } { continue }
-#
-# test running programs
-#
-
-# Start with a fresh gdb
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
set prms_id 0
set bug_id 0
@@ -44,506 +37,586 @@ set testfile "member-ptr"
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
if [get_compiler_info ${binfile} "c++"] {
return -1
}
-# Nearly all of these tests fail when compiled with G++, so just give up
-# until GDB gets enhanced. -sts 1999-06-22
-
-if {$gcc_compiled} {
- continue
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-
if ![runto_main] then {
perror "couldn't run to breakpoint"
continue
}
-send_gdb "break 83\n"
-gdb_expect {
- -re "Breakpoint \[0-9\]*.*line 83\\.\r\n$gdb_prompt $" {
- pass "set break at 83"
- }
- -re ".*$gdb_prompt $" { fail "set break at 83" }
- timeout { fail "(timeout) set break at 83" }
-}
+gdb_breakpoint [gdb_get_line_number "pmi = NULL"]
+gdb_continue_to_breakpoint "continue to pmi = NULL"
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing\\.\r\n\r\nBreakpoint.*at.*member-ptr\\.cc:83\r\n83\[ \t]*pmi = NULL;\r\n$gdb_prompt $" {
- pass "continue to 83"
- }
- -re ".*$gdb_prompt $" { fail "continue to 83" }
- timeout { fail "(timeout) continue to 83" }
+# gcc is not ready for production
+# -- chastain 2004-01-12
+
+if { [test_compiler_info "gcc-*"] } {
+ continue
}
+# ======================
+# pointer to member data
+# ======================
+
# ptype on pointer to data member
-send_gdb "ptype pmi\n"
-gdb_expect {
- -re "type = int \\( A::\\*\\)\r\n$gdb_prompt $" {
- pass "ptype pmi"
+set name "ptype pmi (A::j)"
+gdb_test_multiple "ptype pmi" $name {
+ -re "type = int *\\( ?A::\\*\\)\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = int *A::\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "ptype pmi" }
- timeout { fail "(timeout) ptype pmi" }
}
# print pointer to data member
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\) &A::j\r\n$gdb_prompt $" {
- pass "print pmi"
+set name "print pmi (A::j) "
+gdb_test_multiple "print pmi" $name {
+ -re "$vhn = &A::j\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = \\(int ?\\( ?A::\\*\\)\\) &A::j\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = \\(int ?\\( ?A::\\*\\)\\) ?&A::j ?\\+ ?1 bytes\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ kfail "gdb/NNNN" $name
+ }
+ -re "$vhn = &A::j ?\\+ ?1 bytes\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ kfail "gdb/NNNN" $name
+ }
+ -re "$vhn = not implemented: member type in c_val_print\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-11 05:33:21 -gdwarf-2
+ # gcc HEAD 2004-01-11 05:33:21 -gstabs+
+ kfail "gdb/NNNN" $name
+ }
+ -re "$vhn = \\(int ?\\( A::\\*\\)\\) 536870920\r\n$gdb_prompt $" {
+ # the value is 0x20000008 hex. 0x20000000 is an internal flag.
+ # Use '|' to add in more values as needed.
+ # hpacc A.03.45
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print pmi" }
- timeout { fail "(timeout) print pmi" }
}
-
# print dereferenced pointer to data member
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 121\r\n$gdb_prompt $" {
- pass "print a.*pmi"
+set name "print a.*pmi (A::j)"
+gdb_test_multiple "print a.*pmi" $name {
+ -re "$vhn = 121\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = 855638016\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ kfail "gdb/NNNN" $name
+ }
+ -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print a.*pmi" }
- timeout { fail "(timeout) print a.*pmi" }
}
# print dereferenced pointer to data member
# this time, dereferenced through a pointer
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a_p->*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 121\r\n$gdb_prompt $" {
- pass "print a->*pmi"
+set name "print a_p->*pmi (A::j)"
+gdb_test_multiple "print a_p->*pmi" $name {
+ -re "$vhn = 121\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = 855638016\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ kfail "gdb/NNNN" $name
+ }
+ -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print a->*pmi" }
- timeout { fail "(timeout) print a->*pmi" }
}
+# set the pointer to a different data member
-# set the pointer to data member
-
-send_gdb "set var pmi = &A::jj\n"
-gdb_expect {
- -re "$gdb_prompt $" {
- pass "set var (not really a pass)"
+set name "set var pmi = &A::jj"
+gdb_test_multiple "set var pmi = &A::jj" $name {
+ -re "Invalid cast.\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
+ }
+ -re "set var pmi = &A::jj\r\n$gdb_prompt $" {
+ # I have to match the echo'ed input explicitly here.
+ # If I leave it out, the pattern becomes too general
+ # and matches anything that ends in "$gdb_prompt $".
+ pass $name
}
- timeout { fail "(timeout) " }
}
-# Now print the pointer again
+# print the pointer again
-send_gdb "print pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\) &A::jj\r\n$gdb_prompt $" {
- pass "print pmi after setting"
+set name "print pmi (A::jj)"
+gdb_test_multiple "print pmi" $name {
+ -re "$vhn = &A::jj\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = \\(int ?\\( ?A::\\*\\)\\) &A::jj\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = not implemented: member type in c_val_print\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-11 05:33:21 -gdwarf-2
+ # gcc HEAD 2004-01-11 05:33:21 -gstabs+
+ kfail "gdb/NNNN" $name
+ }
+ -re "$vhn = \\(int ?\\( A::\\*\\)\\) 536870924\r\n$gdb_prompt $" {
+ # the value is 0x20000008 hex. 0x20000000 is an internal flag.
+ # Use '|' to add in more values as needed.
+ # hpacc A.03.45
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print pmi after setting" }
- timeout { fail "(timeout) print pmi after setting" }
}
# print dereferenced pointer to data member again
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 1331\r\n$gdb_prompt $" {
- pass "print a.*pmi after setting"
+set name "print a.*pmi (A::jj)"
+gdb_test_multiple "print a.*pmi" $name {
+ -re "$vhn = 1331\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print a.*pmi after setting" }
- timeout { fail "(timeout) print a.*pmi after setting" }
}
# set the pointer to data member back to A::j
-send_gdb "set var pmi = &A::j\n"
-gdb_expect {
- -re "$gdb_prompt $" {
- pass "set var back to A::j (not really a pass)"
+set name "set var pmi = &A::j"
+gdb_test_multiple "set var pmi = &A::j" $name {
+ -re "Invalid cast.\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
+ }
+ -re "set var pmi = &A::j\r\n$gdb_prompt $" {
+ # I have to match the echo'ed input explicitly here.
+ # If I leave it out, the pattern becomes too general
+ # and matches anything that ends in "$gdb_prompt $".
+ pass $name
}
- timeout { fail "(timeout) set var pmi" }
}
# print dereferenced pointer to data member yet again (extra check, why not)
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 121\r\n$gdb_prompt $" {
- pass "print a.*pmi after resetting"
+set name "print a.*pmi (A::j) (again)"
+gdb_test_multiple "print a.*pmi" $name {
+ -re "$vhn = 121\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print a.*pmi after resetting" }
- timeout { fail "(timeout) print a.*pmi after resetting" }
}
# Set the data member pointed to.
-send_gdb "print a.*pmi = 33\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 33\r\n$gdb_prompt $" {
- pass "print command to set"
+set name "print a.*pmi = 33"
+gdb_test_multiple "print a.*pmi = 33" $name {
+ -re "$vhn = 33\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print command to set" }
- timeout { fail "(timeout) print command to set" }
}
# Now check that the data really was changed
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 33\r\n$gdb_prompt $" {
- pass "print a.*pmi after setting member pointed to"
- }
- -re ".*$gdb_prompt $" { fail "print a.*pmi after setting member pointed to" }
- timeout { fail "(timeout) print a.*pmi after setting member pointed to" }
-}
-# Double-check by printing a.
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{c = 120 'x', j = 33, jj = 1331, static s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
- pass "print a after setting member pointed to by pmi"
+set name "print a.*pmi (A::j) (33)"
+gdb_test_multiple "print a.*pmi" $name {
+ -re "$vhn = 33\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print a after setting member pointed to by pmi" }
- timeout { fail "(timeout) print a after setting member pointed to by pmi" }
}
+# Double-check by printing a.
-# Set the data member pointed to, using ->*
-
-send_gdb "print a_p->*pmi = 44\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 44\r\n$gdb_prompt $" {
- pass "print command to set (->)"
+set name "print a (j = 33)"
+gdb_test_multiple "print a" $name {
+ -re "$vhn = \{c = 120 'x', j = 33, jj = 1331, (static|static int) s = 10, (_vptr.A|_vptr\\$) = ($hex|$hex <A virtual table>)\}\r\n$gdb_prompt $" {
+ pass $name
}
- -re ".*$gdb_prompt $" { fail "print command to set (->)" }
- timeout { fail "(timeout) print command to set (->)" }
-}
-
-# Now check that the data really was changed
-send_gdb "print a_p->*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 44\r\n$gdb_prompt $" {
- pass "print a_p->*pmi after setting member pointed to"
+ -re "$vhn = \{c = 120 'x', j = 33, jj = 1331, (static|static int) s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
+ pass $name
}
- -re ".*$gdb_prompt $" { fail "print a_p->*pmi after setting member pointed to" }
- timeout { fail "(timeout) print a_p->*pmi after setting member pointed to" }
-}
-
-# Double-check by printing a.
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{c = 120 'x', j = 44, jj = 1331, static s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
- pass "print a after setting member pointed to by pmi (->) "
+ -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 33, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 121, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print a after setting member pointed to by pmi (->) " }
- timeout { fail "(timeout) print a after setting member pointed to by pmi (->) " }
}
+# Set the data member pointed to, using ->*
-# Do a ptype on the dereferenced pointer to member
-# pai/1997-08-20 Doesn't work
-
-# send_gdb "ptype a.*pmi\n"
-# gdb_expect {
-# -re "type = int\r\n$gdb_prompt $" {
-# pass "ptype a.*pmi"
-# }
-# -re ".*$gdb_prompt $" { fail "ptype a.*pmi" }
-# timeout { fail "(timeout) ptype a.*pmi" }
-#}
-
-# Try to dereference the pointer to data member without any object
-
-send_gdb "print *pmi\n"
-gdb_expect {
- -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
- pass "attempt to print ptr to member without object"
+set name "print a_p->*pmi = 44"
+gdb_test_multiple "print a_p->*pmi = 44" $name {
+ -re "$vhn = 44\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "attempt to print ptr to member without object" }
- timeout { fail "(timeout) attempt to print ptr to member without object" }
}
-# Try to ptype a dereference of the pointer to data member without any object
+# Check that the data really was changed
-send_gdb "ptype *pmi\n"
-gdb_expect {
- -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
- pass "attempt to ptype ptr to member without object"
+set name "print a_p->*pmi (44)"
+gdb_test_multiple "print a_p->*pmi" $name {
+ -re "$vhn = 44\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "attempt to ptype ptr to member without object" }
- timeout { fail "(timeout) attempt to ptype ptr to member without object" }
}
-# Ptype a pointer to a method.
+# Double-check by printing a.
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "ptype pmf\n"
-gdb_expect {
- -re "type = int \\( A::\\*\\)\\(\\.\\.\\.\\)\r\n$gdb_prompt $" {
- pass "ptype pmf"
+set name "print a (j = 44)"
+gdb_test_multiple "print a" $name {
+ -re "$vhn = \{c = 120 'x', j = 44, jj = 1331, (static|static int) s = 10, (_vptr.A|_vptr\\$) = ($hex|$hex <A virtual table>)\}\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = \{c = 120 'x', j = 44, jj = 1331, (static|static int) s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 44, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 121, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "ptype pmf" }
- timeout { fail "(timeout) ptype pmf" }
}
-# print a pointer to a method
+# ptype the dereferenced pointer to member.
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print pmf\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\(\\.\\.\\.\\)\\) \\?\\? <not supported with HP aCC>\r\n$gdb_prompt $" {
- pass "print pmf"
+set name "ptype a.*pmi"
+gdb_test_multiple "ptype a.*pmi" $name {
+ -re "type = int\r\n$gdb_prompt" {
+ pass $name
+ }
+ -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print pmf" }
- timeout { fail "(timeout) print pmf" }
}
+# dereference the pointer to data member without any object
+# this is not allowed: a pmi must be bound to an object to dereference
-# Ptype a pointer to a pointer to a method
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "ptype pmf_p\n"
-gdb_expect {
- -re "type = int \\( A::\\*\\*\\)\\(\\.\\.\\.\\)\r\n$gdb_prompt $" {
- pass "ptype pmf_p"
+set name "print *pmi"
+gdb_test_multiple "print *pmi" $name {
+ -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "Cannot access memory at address 0x4\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ kfail "gdb/NNNN" $name
+ }
+ -re "Cannot access memory at address 0x8\r\n$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2
+ # gcc 3.3.2 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "ptype pmf_p" }
- timeout { fail "(timeout) ptype pmf_p" }
}
-# print a pointer to a pointer to a method
+# dereference the pointer to data member without any object
+# this is not allowed: a pmi must be bound to an object to dereference
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print pmf_p\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\(int \\( A::\\*\\*\\)\\(\\.\\.\\.\\)\\) $hex\r\n$gdb_prompt $" {
- pass "print pmf_p"
+set name "ptype *pmi"
+gdb_test_multiple "ptype *pmi" $name {
+ -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = int A::\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print pmf_p" }
- timeout { fail "(timeout) print pmf_p" }
}
-# print dereferenced pointer to method
+# Check cast of pointer to member to integer.
+# This is similar to "offset-of".
+# such as "A a; print (size_t) &A.j - (size_t) &A".
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a.*pmf\n"
-gdb_expect {
- -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
- pass "print a.*pmf (known aCC limitation)"
+set name "print (int) pmi"
+gdb_test_multiple "print (int) pmi" $name {
+ -re "$vhn = (4|8)\r\n$gdb_prompt" {
+ pass $name
}
- -re ".*$gdb_prompt $" { fail "print a.*pmf" }
- timeout { fail "(timeout) print a.*pmf" }
}
-# print dereferenced pointer to method, using ->*
+# Check "(int) pmi" explicitly for equality.
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a_p->*pmf\n"
-gdb_expect {
- -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
- pass "print a_p->*pmf (known aCC limitation)"
+set name "print ((int) pmi) == ((char *) &a.j - (char *) &a)"
+gdb_test_multiple "print ((int) pmi) == ((char *) &a.j - (char *) & a)" $name {
+ -re "$vhn = true\r\n$gdb_prompt" {
+ pass $name
}
- -re ".*$gdb_prompt $" { fail "print a_p->*pmf" }
- timeout { fail "(timeout) print a_p->*pmf" }
}
-# set the pointer to data member
+# ==========================
+# pointer to member function
+# ==========================
+
+# ptype a pointer to a method
-setup_xfail "hppa*-*-*"
-send_gdb "set var pmf = &A::foo\n"
-gdb_expect {
- -re "Assignment to pointers to methods not implemented with HP aCC\r\n$gdb_prompt $" {
- pass "set var pmf (known aCC limitation)"
+set name "ptype pmf"
+gdb_test_multiple "ptype pmf" $name {
+ -re "type = int \\( ?A::\\*\\)\\(int\\)\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "type = int \\( ?A::\\*\\)\\(void\\)\r\n$gdb_prompt $" {
+ # hpacc A.03.45
+ kfail "gdb/NNNN" $name
+ }
+ -re "type = struct \{.*\}\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.2.2 -gdwarf-2
+ # gcc 3.2.2 -gstabs+
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "set var pmf" }
- timeout { fail "(timeout) set var pmf" }
}
-# Try to dereference the pointer to method without any object
+# print a pointer to a method
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print *pmf\n"
-gdb_expect {
- -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
- pass "attempt to print ptr to method without object"
+set name "print pmf"
+gdb_test_multiple "print pmf" $name {
+ -re "$vhn = &A::bar\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = .*not supported with HP aCC.*\r\n$gdb_prompt $" {
+ # hpacc A.03.45
+ kfail "gdb/NNNN" $name
+ }
+ -re "$vhn = \{.*\}\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.2.2 -gdwarf-2
+ # gcc 3.2.2 -gstabs+
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "attempt to print ptr to method without object" }
- timeout { fail "(timeout) attempt to print ptr to method without object" }
}
-# Try to ptype a dereference of the pointer to method without any object
+# ptype a pointer to a pointer to a method
-send_gdb "ptype *pmi\n"
-gdb_expect {
- -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
- pass "attempt to ptype ptr to member without object"
+set name "ptype pmf_p"
+gdb_test_multiple "ptype pmf_p" $name {
+ -re "type = int \\( ?A::\\*\\*\\)\\(int\\)\r\n$gdb_prompt $" {
+ pass $name
}
- -re ".*$gdb_prompt $" { fail "attempt to ptype ptr to member without object" }
- timeout { fail "(timeout) attempt to ptype ptr to member without object" }
-}
-
-# Check cast of pointer to member to integer
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print (int) pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 8\r\n$gdb_prompt $" {
- pass "casting pmi to int"
+ -re "type = int \\( ?A::\\*\\*\\)\\(void\\)\r\n$gdb_prompt $" {
+ # hpacc A.03.45
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "casting pmi to int" }
- timeout { fail "(timeout) casting pmi to int" }
-}
-
-# Check cast of pointer to method to integer
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print (int) pmf\n"
-gdb_expect {
- -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
- pass "casting pmf to int (known aCC limitation)"
+ -re "type = struct \{.*\} \\*\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.2.2 -gdwarf-2
+ # gcc 3.2.2 -gstabs+
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "casting pmf to int" }
- timeout { fail "(timeout) casting pmf to int" }
}
-# Try to invoke a function through a pointer to data member
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print (a.*pmi)(3)\n"
-gdb_expect {
- -re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
- pass "print (a.*pmi)(3) -- error message should be different"
- }
- -re ".*$gdb_prompt $" { fail "print (a.*pmi)(3)" }
- timeout { fail "(timeout) print (a.*pmi)(3)" }
-}
+# print a pointer to a pointer to a method
-# Try to invoke a function through a pointer to a method
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print (a.*pmf)(3)\n"
-gdb_expect {
- -re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
- pass "print (a.*pmi)(3) -- known aCC limitation"
+set name "print pmf_p"
+gdb_test_multiple "print pmf_p" $name {
+ -re "$vhn = \\(int \\( ?A::\\*\\*\\)\\)\\(int\\)\\) $hex\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "$vhn = \\(PMF \\*\\) $hex\r\n$gdb_prompt $" {
+ pass "gdb/NNNN"
+ }
+ -re "$vhn = \\(int \\( ?A::\\*\\*\\)\\(void\\)\\) $hex\r\n$gdb_prompt $" {
+ # hpacc A.03.45
+ kfail "gdb/NNNN" $name
+ }
+ -re "$vhn = \\(struct \{.*\} \\*\\) $hex\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print (a.*pmf)(3)" }
- timeout { fail "(timeout) print (a.*pmf)(3)" }
}
+# print dereferenced pointer to method
-# Go past assignment of NULL to pmi
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "next\n"
-gdb_expect {
- -re "\r\n85\[ \t\]*k = \\(a.\\*pmf\\)\\(3\\);\r\n$gdb_prompt $" {
- pass "next past 83"
+set name "print a.*pmf"
+gdb_test_multiple "print a.*pmf" $name {
+ -re "$vhn = \\(int \\(\\*\\)\\(int\\)\\) $hex <A::bar\\(int\\)>\r\n$gdb_prompt$ " {
+ pass $name
+ }
+ -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
+ # hpacc A.03.45
+ kfail "gdb/NNNN" $name
+ }
+ -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.2.2 -gdwarf-2
+ # gcc 3.2.2 -gstabs+
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "next past 83" }
- timeout { fail "(timeout) next past 83" }
}
-#send_gdb "print pmi\n"
-#gdb_expect {
-# -re "Attempted dereference of null pointer-to-member\r\n$gdb_prompt $" {
-# pass ""
-# }
-# -re ".*$gdb_prompt $" { fail "" }
-# timeout { fail "(timeout) " }
-#}
+# print dereferenced pointer to method, using ->*
-# Dereference the null pointer to member
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "Attempted dereference of null pointer-to-member\r\n$gdb_prompt $" {
- pass "print a.*NULL"
+set name "print a_p->*pmf"
+gdb_test_multiple "print a_p->*pmf" $name {
+ -re "$vhn = \\(int \\(\\*\\)\\(int\\)\\) $hex <A::bar\\(int\\)>\r\n$gdb_prompt$ " {
+ pass $name
+ }
+ -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
+ # hpacc A.03.45
+ kfail "gdb/NNNN" $name
+ }
+ -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.2.2 -gdwarf-2
+ # gcc 3.2.2 -gstabs+
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print a.*NULL" }
- timeout { fail "(timeout) print a.*NULL" }
}
+# set the pointer to data member
-# Go to another part of the program
-send_gdb "break 91\n"
-gdb_expect {
- -re "Breakpoint \[0-9\]*.*line 91\\.\r\n$gdb_prompt $" {
- pass "set break at 91"
+set name "set var pmf = &A::foo"
+gdb_test_multiple "set var pmf = &A::foo" $name {
+ -re "set var pmf = &A::foo\r\n$gdb_prompt $" {
+ # I have to match the echo'ed input explicitly here.
+ # If I leave it out, the pattern becomes too general
+ # and matches anything that ends in "$gdb_prompt $".
+ pass $name
}
- -re ".*$gdb_prompt $" { fail "set break at 91" }
- timeout { fail "(timeout) set break at 91" }
-}
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing\\.\r\n\r\nBreakpoint.*at.*member-ptr\\.cc:91\r\n91\[ \t]*k = \\(a.\\*pmf\\)\\(4\\);\r\n$gdb_prompt $" {
- pass "continue to 91"
+ -re "Invalid cast.\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.2.2 -gdwarf-2
+ # gcc 3.2.2 -gstabs+
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
+ }
+ -re "Assignment to pointers to methods not implemented with HP aCC\r\n$gdb_prompt $" {
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "continue to 91" }
- timeout { fail "(timeout) continue to 91" }
}
+# dereference the pointer to data member without any object
+# this is not allowed: a pmf must be bound to an object to dereference
-# Now check again that pmi works even when not set to
-# something that's at the beginning of the object
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\) &A::jj\r\n$gdb_prompt $" {
- pass "print pmi (2)"
+set name "print *pmf"
+gdb_test_multiple "print *pmf" $name {
+ -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "Structure has no component named operator\\*.\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gdwarf-2
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print pmi (2)" }
- timeout { fail "(timeout) print pmi (2)" }
}
+# dereference the pointer to data member without any object
+# this is not allowed: a pmf must be bound to an object to dereference
-# print dereferenced pointer to data member
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 1331\r\n$gdb_prompt $" {
- pass "print a.*pmi (2)"
+set name "ptype *pmf"
+gdb_test_multiple "ptype *pmf" $name {
+ -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "Structure has no component named operator\\*.\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gdwarf-2
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print a.*pmi (2)" }
- timeout { fail "(timeout) print a.*pmi (2)" }
}
-# print dereferenced pointer to data member
-# this time, dereferenced through a pointer
+# Call a function through a pmf.
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a_p->*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 1331\r\n$gdb_prompt $" {
- pass "print a->*pmi"
+set name "print (a.*pmf)(3)"
+gdb_test_multiple "print (a.*pmf)(3)" $name {
+ -re "$vhn = 50\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
+ # hpacc A.03.45
+ kfail "gdb/NNNN" $name
+ }
+ -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ # gcc 3.3.2 -gdwarf-2
+ # gcc 3.3.2 -gstabs+
+ # gcc HEAD 2004-01-10 -gdwarf-2
+ # gcc HEAD 2004-01-10 -gstabs+
+ kfail "gdb/NNNN" $name
}
- -re ".*$gdb_prompt $" { fail "print a->*pmi (2)" }
- timeout { fail "(timeout) print a->*pmi (2)" }
}
-
-
-# p a.*pmf - fail
-
-# p pmi
-
-# p a.*pmi
-
diff --git a/gdb/testsuite/gdb.cp/method.exp b/gdb/testsuite/gdb.cp/method.exp
index a085b14cdcc..87666d833a8 100644
--- a/gdb/testsuite/gdb.cp/method.exp
+++ b/gdb/testsuite/gdb.cp/method.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +14,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# tests for misc. C++ method stuff
# Written by Satish Pai <pai@apollo.hp.com> 1997-07-08
@@ -96,7 +93,7 @@ gdb_test "break A::bar" \
"Breakpoint \[0-9\]* at $hex.*file .*method.cc, line 44\\."
gdb_test "continue" \
- "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, A::bar(\\(int\\) const|) \\(this=$hex, arg=15\\) at .*method\\.cc:44\r\n44\[\t \]*return arg \\+ 2 \\* x;" \
+ "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, A::bar(|\\(int\\) const| const) \\(this=$hex, arg=15\\) at .*method\\.cc:44\r\n44\[\t \]*return arg \\+ 2 \\* x;" \
"continue to A::bar"
# Check ability to access this-relative stuff.
@@ -170,6 +167,9 @@ gdb_expect {
-re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*A & operator=\\(A const ?&\\);\r\n\[ \]*A\\(A const ?&\\);\r\n\[ \]*A\\((void|)\\);\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\) volatile;\r\n\[ \]*int qux\\(int, float\\) (const volatile|volatile const);\r\n\}\r\n$gdb_prompt $" {
pass "ptype A"
}
+ -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\) volatile;\r\n\[ \]*int qux\\(int, float\\) (const volatile|volatile const);\r\n\[ \]*A & operator=\\(A const ?&\\);\r\n\[ \]*A\\(A const ?&\\);\r\n\[ \]*A\\((void|)\\);\r\n\}\r\n$gdb_prompt $" {
+ pass "ptype A"
+ }
-re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\);\r\n\[ \]*int qux\\(int, float\\) const;\r\n\}\r\n$gdb_prompt $" {
pass "ptype A (HP aCC bug -- volatile not indicated)"
}
diff --git a/gdb/testsuite/gdb.cp/misc.cc b/gdb/testsuite/gdb.cp/misc.cc
index 286c02bc6df..7d69ed225ae 100644
--- a/gdb/testsuite/gdb.cp/misc.cc
+++ b/gdb/testsuite/gdb.cp/misc.cc
@@ -1,3 +1,23 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
// Test various -*- C++ -*- things.
// ====================== basic C++ types =======================
diff --git a/gdb/testsuite/gdb.cp/misc.exp b/gdb/testsuite/gdb.cp/misc.exp
index a2d122fc69e..2758cd0ae64 100644
--- a/gdb/testsuite/gdb.cp/misc.exp
+++ b/gdb/testsuite/gdb.cp/misc.exp
@@ -15,9 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Fred Fish. (fnf@cygnus.com)
if $tracelevel then {
diff --git a/gdb/testsuite/gdb.cp/namespace.cc b/gdb/testsuite/gdb.cp/namespace.cc
index 7b9a173d819..ee55168528b 100644
--- a/gdb/testsuite/gdb.cp/namespace.cc
+++ b/gdb/testsuite/gdb.cp/namespace.cc
@@ -75,6 +75,11 @@ namespace
namespace G
{
int Xg = 10;
+
+ namespace
+ {
+ int XgX = 11;
+ }
}
}
@@ -83,6 +88,22 @@ namespace C
int c = 1;
int shadow = 12;
+ class CClass {
+ public:
+ int x;
+ class NestedClass {
+ public:
+ int y;
+ };
+ };
+
+ void ensureRefs () {
+ // NOTE (2004-04-23, carlton): This function is here only to make
+ // sure that GCC 3.4 outputs debug info for these classes.
+ static CClass *c = new CClass();
+ static CClass::NestedClass *n = new CClass::NestedClass();
+ }
+
namespace
{
int cX = 6;
@@ -90,6 +111,11 @@ namespace C
namespace F
{
int cXf = 7;
+
+ namespace
+ {
+ int cXfX = 8;
+ }
}
}
@@ -98,6 +124,11 @@ namespace C
int cc = 2;
}
+ namespace E
+ {
+ int ce = 4;
+ }
+
namespace D
{
int cd = 3;
@@ -118,14 +149,18 @@ namespace C
//cc;
C::cc;
cd;
+ //C::D::cd;
E::cde;
shadow;
+ //E::ce;
cX;
F::cXf;
+ F::cXfX;
X;
G::Xg;
//cXOtherFile;
//XOtherFile;
+ G::XgX;
return;
}
diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp
index 6952c8fb53c..4b3f1e255c7 100644
--- a/gdb/testsuite/gdb.cp/namespace.exp
+++ b/gdb/testsuite/gdb.cp/namespace.exp
@@ -1,4 +1,5 @@
-# Copyright 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,18 +15,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# tests for namespaces
-# Written by Satish Pai <pai@apollo.hp.com> 1997-07-23
+# Originally written by Satish Pai <pai@apollo.hp.com> 1997-07-23
# This file is part of the gdb testsuite
-# Note: These tests are geared to the HP aCC compiler,
+# Note: The original tests were geared to the HP aCC compiler,
# which has an idiosyncratic way of emitting debug info
# for namespaces.
-# Note: As of 2000-06-03, these pass under g++ - djb
+# Note: As of 2000-06-03, they passed under g++ - djb
if $tracelevel then {
@@ -44,7 +42,7 @@ set srcfile1 ${testfile}1.cc
set objfile1 ${objdir}/${subdir}/${testfile}1.o
set binfile ${objdir}/${subdir}/${testfile}
-if [get_compiler_info ${binfile}] {
+if [get_compiler_info ${binfile} c++] {
return -1;
}
@@ -82,7 +80,12 @@ if ![runto 'marker1'] then {
gdb_test "up" ".*main.*" "up from marker1"
# Access a data item inside a namespace using colons and
-# single quotes :-(
+# single quotes. :-(
+
+# NOTE: carlton/2003-09-24: the quotes are becoming less necessary (or
+# even desirable.) For tests where it should still work with quotes,
+# I'm including versions both with and without quotes; for tests that
+# shouldn't work with quotes, I'm only including one version.
send_gdb "print 'AAA::c'\n"
gdb_expect {
@@ -91,6 +94,13 @@ gdb_expect {
timeout { fail "(timeout) print 'AAA::c'" }
}
+send_gdb "print AAA::c\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 0 '\\\\(0|000)'\r\n$gdb_prompt $" { pass "print AAA::c" }
+ -re ".*$gdb_prompt $" { fail "print AAA::c" }
+ timeout { fail "(timeout) print AAA::c" }
+}
+
# An object declared using "using".
send_gdb "print ina\n"
@@ -107,6 +117,9 @@ gdb_expect {
-re "type = class (AAA::|)inA \{\r\n\[ \]*public:\r\n\[ \]*int xx;\r\n\[ \]*\r\n\[ \]*.*int fum\\(int\\);\r\n\}\r\n$gdb_prompt $" {
pass "ptype ina"
}
+ -re "type = class (AAA::|)inA \{\r\n\[ \]*public:\r\n\[ \]*int xx;\r\n\[ \]*\r\n\[ \]*int fum\\(int\\);\r\n.*\}\r\n$gdb_prompt $" {
+ pass "ptype ina"
+ }
-re ".*$gdb_prompt $" { fail "ptype ina" }
timeout { fail "(timeout) ptype ina" }
}
@@ -137,6 +150,15 @@ gdb_expect {
timeout { fail "(timeout) print 'AAA::xyzq'('x')" }
}
+send_gdb "print AAA::xyzq('x')\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 97 'a'\r\n$gdb_prompt $" {
+ pass "print AAA::xyzq('x')"
+ }
+ -re ".*$gdb_prompt $" { fail "print AAA::xyzq('x')" }
+ timeout { fail "(timeout) print AAA::xyzq('x')" }
+}
+
# Break on a function in a namespace
send_gdb "break AAA::xyzq\n"
@@ -159,6 +181,15 @@ gdb_expect {
timeout { fail "(timeout) print 'BBB::CCC::xyzq'('x')" }
}
+send_gdb "print BBB::CCC::xyzq('x')\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = 122 'z'\r\n$gdb_prompt $" {
+ pass "print BBB::CCC::xyzq('x')"
+ }
+ -re ".*$gdb_prompt $" { fail "print BBB::CCC::xyzq('x')" }
+ timeout { fail "(timeout) print BBB::CCC::xyzq('x')" }
+}
+
# Break on a function in a nested namespace
send_gdb "break BBB::CCC::xyzq\n"
@@ -181,6 +212,15 @@ gdb_expect {
timeout { fail "(timeout) print 'BBB::Class::xyzq'" }
}
+send_gdb "print BBB::Class::xyzq\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = \{char \\((BBB::|)Class \\*( const|), (char|int)\\)\} $hex <BBB::Class::xyzq\\(char\\)>\r\n$gdb_prompt $" {
+ pass "print BBB::Class::xyzq"
+ }
+ -re ".*$gdb_prompt $" { fail "print BBB::Class::xyzq" }
+ timeout { fail "(timeout) print BBB::Class::xyzq" }
+}
+
# Break on a function in a class in a namespace
send_gdb "break BBB::Class::xyzq\n"
@@ -204,18 +244,46 @@ if ![runto "C::D::marker2"] then {
gdb_test "print c" "\\$\[0-9\].* = 1"
gdb_test "print cc" "No symbol \"cc\" in current context."
gdb_test "print 'C::cc'" "\\$\[0-9\].* = 2"
+gdb_test "print C::cc" "\\$\[0-9\].* = 2"
gdb_test "print cd" "\\$\[0-9\].* = 3"
+gdb_test "print C::D::cd" "No type \"D\" within class or namespace \"C::C\"."
gdb_test "print 'E::cde'" "\\$\[0-9\].* = 5"
+gdb_test "print E::cde" "\\$\[0-9\].* = 5"
gdb_test "print shadow" "\\$\[0-9\].* = 13"
-gdb_test "print cOtherFile" "\\$\[0-9\].* = 316"
+gdb_test "print E::ce" "No symbol \"ce\" in namespace \"C::D::E\"."
gdb_test "ptype C" "type = namespace C::C"
gdb_test "ptype E" "type = namespace C::D::E"
+gdb_test "ptype CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}"
+gdb_test "ptype CClass::NestedClass" "type = class C::CClass::NestedClass \{\r\n public:\r\n int y;\r\n\}"
+gdb_test "ptype NestedClass" "No symbol \"NestedClass\" in current context."
+setup_kfail "gdb/1448" "*-*-*"
+gdb_test "ptype ::C::CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}"
+setup_kfail "gdb/1448" "*-*-*"
+gdb_test "ptype ::C::CClass::NestedClass" "type = class C::CClass::NestedClass \{\r\n public:\r\n int y;\r\n\}"
+setup_kfail "gdb/1448" "*-*-*"
+gdb_test "ptype ::C::NestedClass" "No symbol \"NestedClass\" in namespace \"C\"."
+gdb_test "ptype C::CClass" "No symbol \"CClass\" in namespace \"C::C\"."
+gdb_test "ptype C::CClass::NestedClass" "No type \"CClass\" within class or namespace \"C::C\"."
+gdb_test "ptype C::NestedClass" "No symbol \"NestedClass\" in namespace \"C::C\"."
+
+# Tests involving multiple files
+
+gdb_test "print cOtherFile" "\\$\[0-9\].* = 316"
+gdb_test "ptype OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}"
+setup_kfail "gdb/1448" "*-*-*"
+gdb_test "ptype ::C::OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}"
+gdb_test "ptype C::OtherFileClass" "No symbol \"OtherFileClass\" in namespace \"C::C\"."
+
# Some anonymous namespace tests.
gdb_test "print cX" "\\$\[0-9\].* = 6"
gdb_test "print 'F::cXf'" "\\$\[0-9\].* = 7"
+gdb_test "print F::cXf" "\\$\[0-9\].* = 7"
+gdb_test "print F::cXfX" "\\$\[0-9\].* = 8"
gdb_test "print X" "\\$\[0-9\].* = 9"
gdb_test "print 'G::Xg'" "\\$\[0-9\].* = 10"
+gdb_test "print G::Xg" "\\$\[0-9\].* = 10"
+gdb_test "print G::XgX" "\\$\[0-9\].* = 11"
gdb_test "print cXOtherFile" "No symbol \"cXOtherFile\" in current context."
gdb_test "print XOtherFile" "No symbol \"XOtherFile\" in current context."
diff --git a/gdb/testsuite/gdb.cp/namespace1.cc b/gdb/testsuite/gdb.cp/namespace1.cc
index 4a5900a8b3d..c3ad6921ba8 100644
--- a/gdb/testsuite/gdb.cp/namespace1.cc
+++ b/gdb/testsuite/gdb.cp/namespace1.cc
@@ -1,4 +1,4 @@
-/* Copyright 2003 Free Software Foundation, Inc.
+/* Copyright 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,12 +13,23 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
- Please email any bugs, comments, and/or additions to this file to:
- bug-gdb@prep.ai.mit.edu */
namespace C
{
+ class OtherFileClass {
+ public:
+ int z;
+ };
+
+ void ensureOtherRefs () {
+ // NOTE (2004-04-23, carlton): This function is here only to make
+ // sure that GCC 3.4 outputs debug info for this class.
+ static OtherFileClass *c = new OtherFileClass();
+ }
+
namespace {
int cXOtherFile = 29;
};
diff --git a/gdb/testsuite/gdb.cp/overload.cc b/gdb/testsuite/gdb.cp/overload.cc
index 56afc96884e..a41e14dc198 100644
--- a/gdb/testsuite/gdb.cp/overload.cc
+++ b/gdb/testsuite/gdb.cp/overload.cc
@@ -53,6 +53,31 @@ int intToChar (char c)
void marker1()
{}
+// Now test how overloading and namespaces interact.
+
+class dummyClass {};
+
+dummyClass dummyInstance;
+
+int overloadNamespace(int i)
+{
+ return 1;
+}
+
+int overloadNamespace(dummyClass d)
+{
+ return 2;
+}
+
+namespace XXX {
+ int overloadNamespace (char c)
+ {
+ return 3;
+ }
+
+ void marker2() {}
+}
+
int main ()
{
char arg2 = 2;
@@ -81,7 +106,8 @@ int main ()
intToChar(1);
marker1(); // marker1-returns-here
- return 0; // marker1-returns-here
+ XXX::marker2(); // marker1-returns-here
+ return 0;
}
foo::foo (int i) { ifoo = i; ccpfoo = NULL; }
diff --git a/gdb/testsuite/gdb.cp/overload.exp b/gdb/testsuite/gdb.cp/overload.exp
index 3e14678e4c2..b09c58e3859 100644
--- a/gdb/testsuite/gdb.cp/overload.exp
+++ b/gdb/testsuite/gdb.cp/overload.exp
@@ -1,4 +1,5 @@
-# Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,24 +15,20 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# written by Elena Zannoni (ezannoni@cygnus.com)
+# Rewritten by Michael Chastain <mec.gnu@mindspring.com>
# This file is part of the gdb testsuite
-#
-# tests for overloaded member functions. Command Line calls
-#
+# Tests for overloaded member functions.
if $tracelevel then {
- strace $tracelevel
- }
+ strace $tracelevel
+}
+
+set ws "\[\r\n\t \]+"
+set nl "\[\r\n\]+"
-#
-# test running programs
-#
set prms_id 0
set bug_id 0
@@ -45,21 +42,12 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-# set it up at a breakpoint so we can play with the variable values
-#
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
+# Set it up at a breakpoint so we can play with the variable values.
if ![runto 'marker1'] then {
perror "couldn't run to marker1"
@@ -68,63 +56,108 @@ if ![runto 'marker1'] then {
gdb_test "up" ".*main.*" "up from marker1"
-send_gdb "print foo_instance1\n"
-gdb_expect {
- -re ".\[0-9\]* = \{ifoo = 111, ccpfoo = 0x0\}\r\n$gdb_prompt $" {
- pass "print foo_instance1"
- }
- -re ".*$gdb_prompt $" { fail "print foo_instance1" }
- timeout { fail "(timeout) print foo_instance1" }
- }
-
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "ptype foo_instance1\n"
-gdb_expect {
- -re "type = class foo \{.*public:.*int ifoo;.*const char \\*ccpfoo;.*foo\\(int\\);.*foo\\(int, (const char|char const) \\*\\);.*foo\\(foo &\\);.*~foo\\(void\\);.*void foofunc\\(int\\);.*void foofunc\\(int, signed char \\*\\);.*int overload1arg\\(void\\);.*int overload1arg\\(char\\);.*int overload1arg\\(signed char\\);.*int overload1arg\\(unsigned char\\);.*int overload1arg\\(short\\);.*int overload1arg\\(unsigned short\\);.*int overload1arg\\(int\\);.*int overload1arg\\(unsigned int\\);.*int overload1arg\\(long\\);.*int overload1arg\\(unsigned long\\);.*int overload1arg\\(float\\);.*int overload1arg\\(double\\);.*int overloadargs\\(int\\);.*int overloadargs\\(int, int\\);.*int overloadargs\\(int, int, int\\);.*int overloadargs\\(int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int, int, int, int\\);\r\n\}\r\n$gdb_prompt $" {
- pass "ptype foo_instance1 (HP aCC -- known quirk with ~foo parameter list)"
- }
- -re "type = class foo .*int overloadargs\\(int, int, int, int, int, int, int, int, int, int, int\\);\r\n\}\r\n$gdb_prompt $" {
+# Print the monster class type.
+# See virtfunc.exp for a discussion of ptype.
+#
+# This is hairy to begin with. It is even more hairy because of the
+# XX_* alternate patterns to catch the KFAIL and XFAIL cases.
+
+set re_class "((struct|class) foo \{${ws}public:|struct foo \{)"
+set re_fields "int ifoo;${ws}const char ?\\* ?ccpfoo;"
+set XX_fields "int ifoo;${ws}char ?\\* ?ccpfoo;"
+set re_ctor "foo\\(int\\);${ws}foo\\(int, (char const|const char) ?\\*\\);${ws}foo\\(foo ?&\\);"
+set re_dtor "~foo\\((void|)\\);"
+set XX_dtor "~foo\\(int\\);"
+set re_methods "void foofunc\\(int\\);"
+set re_methods "${re_methods}${ws}void foofunc\\(int, signed char ?\\*\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\((void|)\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\(char\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\(signed char\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\(unsigned char\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\(short\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\(unsigned short\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\(int\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\(unsigned int\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\(long\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\(unsigned long\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\(float\\);"
+set re_methods "${re_methods}${ws}int overload1arg\\(double\\);"
+set re_methods "${re_methods}${ws}int overloadfnarg\\((void|)\\);"
+set re_methods "${re_methods}${ws}int overloadfnarg\\(int\\);"
+set re_methods "${re_methods}${ws}int overloadfnarg\\(int, int ?\\(\\*\\) ?\\(int\\)\\);"
+set re_methods "${re_methods}${ws}int overloadargs\\(int\\);"
+set re_methods "${re_methods}${ws}int overloadargs\\(int, int\\);"
+set re_methods "${re_methods}${ws}int overloadargs\\(int, int, int\\);"
+set re_methods "${re_methods}${ws}int overloadargs\\(int, int, int, int\\);"
+set re_methods "${re_methods}${ws}int overloadargs\\(int, int, int, int, int\\);"
+set re_methods "${re_methods}${ws}int overloadargs\\(int, int, int, int, int, int\\);"
+set re_methods "${re_methods}${ws}int overloadargs\\(int, int, int, int, int, int, int\\);"
+set re_methods "${re_methods}${ws}int overloadargs\\(int, int, int, int, int, int, int, int\\);"
+set re_methods "${re_methods}${ws}int overloadargs\\(int, int, int, int, int, int, int, int, int\\);"
+set re_methods "${re_methods}${ws}int overloadargs\\(int, int, int, int, int, int, int, int, int, int\\);"
+set re_methods "${re_methods}${ws}int overloadargs\\(int, int, int, int, int, int, int, int, int, int, int\\);"
+set re_synth "foo & operator=\\(foo const ?&\\);"
+
+gdb_test "print foo_instance1" "\\$\[0-9\]+ = \{ifoo = 111, ccpfoo = 0x0\}"
+
+gdb_test_multiple "ptype foo_instance1" "ptype foo_instance1" {
+ -re "type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$re_dtor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gdwarf-2
+ # TODO: this is not a quirk!
+ pass "ptype foo_instance1 (HP aCC -- known quirk with ~foo parameter list)"
+ }
+ -re "type = $re_class${ws}$XX_fields${ws}$re_synth${ws}$re_dtor${ws}$re_ctor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+, no "const" on "const char *"
+ # TODO: gdb.base/constvar.exp has XFAILed this kind of problem for a
+ # long time, but an XFAIL really needs an external bug report.
+ # -- chastain 2003-12-31
+ # setup_xfail "*-*-*"
+ # fail "ptype foo_instance1"
+ # TODO: this should be a KFAIL.
+ pass "ptype foo_instance1 (shorter match)"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth${ws}$re_dtor${ws}$re_ctor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gcc 2.95.3 -gstabs+ if "const char *" ever gets fixed
+ pass "ptype foo_instance1"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$XX_dtor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2, "~foo(int)"
+ # TODO: kfail this
+ # kfail "gdb/1113" "ptype foo_instance1"
+ pass "ptype foo_instance1 (shorter match)"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$re_dtor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gdwarf-2, if the dtor bug gets fixed
+ # gcc HEAD -gdwarf-2 (abi-2)
+ # TODO: just pass this
+ pass "ptype foo_instance1 (shorter match)"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_synth${ws}$re_ctor${ws}$re_dtor${ws}$re_methods$nl\}$nl$gdb_prompt $" {
+ # gcc 3.3.2 -gstabs+
+ # TODO: enough with the "shorter match"
+ pass "ptype foo_instance1 (shorter match)"
+ }
+ -re "type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$re_dtor${ws}$re_methods${ws}$re_synth$nl\}$nl$gdb_prompt $" {
+ # gcc HEAD -gstabs+ (abi-2)
pass "ptype foo_instance1 (shorter match)"
}
- -re ".*$gdb_prompt $" { fail "ptype foo_instance1" }
- timeout { fail "(timeout) ptype foo_instance1" }
- }
-
-send_gdb "print foo_instance2\n"
-gdb_expect {
- -re ".\[0-9\]* = \{ifoo = 222, ccpfoo = $hex \"A\"\}\r\n$gdb_prompt $" {
- pass "print foo_instance2"
- }
- -re ".*$gdb_prompt $" { fail "print foo_instance2" }
- timeout { fail "(timeout) print foo_instance2" }
- }
-
-send_gdb "print foo_instance3\n"
-gdb_expect {
- -re ".\[0-9\]* = \{ifoo = 222, ccpfoo = $hex \"A\"\}\r\n$gdb_prompt $" {
- pass "print foo_instance3"
- }
- -re ".*$gdb_prompt $" { fail "print foo_instance3" }
- timeout { fail "(timeout) print foo_instance3" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1)\n"
-gdb_expect {
- -re ".\[0-9\]* = 1\r\n$gdb_prompt $" {
- pass "print call overloaded func 1 arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 1 arg" }
- timeout { fail "(timeout) print call overloaded func 1 arg" }
- }
+}
+
+# Print variables and method calls.
+# This is a walk in the park.
+gdb_test "print foo_instance2" "\\$\[0-9\]+ = \{ifoo = 222, ccpfoo = $hex \"A\"\}"
+gdb_test "print foo_instance3" "\\$\[0-9\]+ = \{ifoo = 222, ccpfoo = $hex \"A\"\}"
+
+gdb_test "print foo_instance1.overloadargs(1)" "\\$\[0-9\]+ = 1" \
+ "print call overloaded func 1 arg"
# If GDB fails to restore the selected frame properly after the
# inferior function call above (see GDB PR 1155 for an explanation of
# why this might happen), all the subsequent tests will fail. We
# should detect and report that failure, but let the marker call
# finish so that the rest of the tests can run undisturbed.
+
gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" {
-re "#0 marker1.*$gdb_prompt $" {
setup_kfail "gdb/1155" s390-*-linux-gnu
@@ -137,254 +170,118 @@ gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" {
}
}
+gdb_test "print foo_instance1.overloadargs(1, 2)" \
+ "\\$\[0-9\]+ = 2" \
+ "print call overloaded func 2 args"
-send_gdb "print foo_instance1.overloadargs(1, 2)\n"
-gdb_expect {
- -re ".\[0-9\]* = 2\r\n$gdb_prompt $" {
- pass "print call overloaded func 2 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 2 args" }
- timeout { fail "(timeout) print call overloaded func 2 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3)\n"
-gdb_expect {
- -re ".\[0-9\]* = 3\r\n$gdb_prompt $" {
- pass "print call overloaded func 3 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 3 args" }
- timeout { fail "(timeout) print call overloaded func 3 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4)\n"
-gdb_expect {
- -re ".\[0-9\]* = 4\r\n$gdb_prompt $" {
- pass "print call overloaded func 4 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 4 args" }
- timeout { fail "(timeout) print call overloaded func 4 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5)\n"
-gdb_expect {
- -re ".\[0-9\]* = 5\r\n$gdb_prompt $" {
- pass "print call overloaded func 5 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 5 args" }
- timeout { fail "(timeout) print call overloaded func 5 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6)\n"
-gdb_expect {
- -re ".\[0-9\]* = 6\r\n$gdb_prompt $" {
- pass "print call overloaded func 6 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 6 args" }
- timeout { fail "(timeout) print call overloaded func 6 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7)\n"
-gdb_expect {
- -re ".\[0-9\]* = 7\r\n$gdb_prompt $" {
- pass "print call overloaded func 7 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 7 args" }
- timeout { fail "(timeout) print call overloaded func 7 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8)\n"
-gdb_expect {
- -re ".\[0-9\]* = 8\r\n$gdb_prompt $" {
- pass "print call overloaded func 8 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 8 args" }
- timeout { fail "(timeout) print call overloaded func 8 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9)\n"
-gdb_expect {
- -re ".\[0-9\]* = 9\r\n$gdb_prompt $" {
- pass "print call overloaded func 9 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 9 args" }
- timeout { fail "(timeout) print call overloaded func 9 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)\n"
-gdb_expect {
- -re ".\[0-9\]* = 10\r\n$gdb_prompt $" {
- pass "print call overloaded func 10 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 10 args" }
- timeout { fail "(timeout) print call overloaded func 10 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)\n"
-gdb_expect {
- -re ".\[0-9\]* = 11\r\n$gdb_prompt $" {
- pass "print call overloaded func 11 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 11 args" }
- timeout { fail "(timeout) print call overloaded func 11 args" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg()\n"
-gdb_expect {
- -re ".\[0-9\]* = 1\r\n$gdb_prompt $" {
- pass "print call overloaded func void arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func void arg" }
- timeout { fail "(timeout) print call overloaded func void arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((char)arg2)\n"
-gdb_expect {
- -re ".\[0-9\]* = 2\r\n$gdb_prompt $" {
- pass "print call overloaded func char arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func char arg" }
- timeout { fail "(timeout) print call overloaded func char arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((signed char)arg3)\n"
-gdb_expect {
- -re ".\[0-9\]* = 3\r\n$gdb_prompt $" {
- pass "print call overloaded func signed char arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func signed char arg" }
- timeout { fail "(timeout) print call overloaded func signed char arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((unsigned char)arg4)\n"
-gdb_expect {
- -re ".\[0-9\]* = 4\r\n$gdb_prompt $" {
- pass "print call overloaded func unsigned char arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func unsigned char arg" }
- timeout { fail "(timeout) print call overloaded func unsigned char arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((short)arg5)\n"
-gdb_expect {
- -re ".\[0-9\]* = 5\r\n$gdb_prompt $" {
- pass "print call overloaded func short arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func short arg" }
- timeout { fail "(timeout) print call overloaded func short arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((unsigned short)arg6)\n"
-gdb_expect {
- -re ".\[0-9\]* = 6\r\n$gdb_prompt $" {
- pass "print call overloaded func unsigned short arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func unsigned short arg" }
- timeout { fail "(timeout) print call overloaded func unsigned short arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((int)arg7)\n"
-gdb_expect {
- -re ".\[0-9\]* = 7\r\n$gdb_prompt $" {
- pass "print call overloaded func int arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func int arg" }
- timeout { fail "(timeout) print call overloaded func int arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((unsigned int)arg8)\n"
-gdb_expect {
- -re ".\[0-9\]* = 8\r\n$gdb_prompt $" {
- pass "print call overloaded func unsigned int arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func unsigned int arg" }
- timeout { fail "(timeout) print call overloaded func unsigned int arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((long)arg9)\n"
-gdb_expect {
- -re ".\[0-9\]* = 9\r\n$gdb_prompt $" {
- pass "print call overloaded func long arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func long arg" }
- timeout { fail "(timeout) print call overloaded func long arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((unsigned long)arg10)\n"
-gdb_expect {
- -re ".\[0-9\]* = 10\r\n$gdb_prompt $" {
- pass "print call overloaded func unsigned long arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func unsigned long arg" }
- timeout { fail "(timeout) print call overloaded func unsigned long arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((float)arg11)\n"
-gdb_expect {
- -re ".\[0-9\]* = 11\r\n$gdb_prompt $" {
- pass "print call overloaded func float arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func float arg" }
- timeout { fail "(timeout) print call overloaded func float arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((double)arg12)\n"
-gdb_expect {
- -re ".\[0-9\]* = 12\r\n$gdb_prompt $" {
- pass "print call overloaded func double arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func double arg" }
- timeout { fail "(timeout) print call overloaded func double arg" }
- }
-
-# Now some tests to see if we can list overloaded functions properly:
+gdb_test "print foo_instance1.overloadargs(1, 2, 3)" \
+ "\\$\[0-9\]+ = 3" \
+ "print call overloaded func 3 args"
-gdb_test "set listsize 1" "" ""
-# send_gdb "set listsize 1\n"
-# gdb_expect -re ".*$gdb_prompt $"
+gdb_test "print foo_instance1.overloadargs(1, 2, 3, 4)" \
+ "\\$\[0-9\]+ = 4" \
+ "print call overloaded func 4 args"
-#
-# Decide whether to use "()" or "(void)"
-#
+gdb_test "print foo_instance1.overloadargs(1, 2, 3, 4, 5)" \
+ "\\$\[0-9\]+ = 5" \
+ "print call overloaded func 5 args"
-send_gdb "info func overloadfnarg\n"
-gdb_expect {
+gdb_test "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6)" \
+ "\\$\[0-9\]+ = 6" \
+ "print call overloaded func 6 args"
+
+gdb_test "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7)" \
+ "\\$\[0-9\]+ = 7" \
+ "print call overloaded func 7 args"
+
+gdb_test "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8)" \
+ "\\$\[0-9\]+ = 8" \
+ "print call overloaded func 8 args"
+
+gdb_test "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9)" \
+ "\\$\[0-9\]+ = 9" \
+ "print call overloaded func 9 args"
+
+gdb_test "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)" \
+ "\\$\[0-9\]+ = 10" \
+ "print call overloaded func 10 args"
+
+gdb_test "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)" \
+ "\\$\[0-9\]+ = 11" \
+ "print call overloaded func 11 args"
+
+gdb_test "print foo_instance1.overload1arg()" \
+ "\\$\[0-9\]+ = 1" \
+ "print call overloaded func void arg"
+
+gdb_test "print foo_instance1.overload1arg((char)arg2)" \
+ "\\$\[0-9\]+ = 2" \
+ "print call overloaded func char arg"
+
+gdb_test "print foo_instance1.overload1arg((signed char)arg3)" \
+ "\\$\[0-9\]+ = 3" \
+ "print call overloaded func signed char arg"
+
+gdb_test "print foo_instance1.overload1arg((unsigned char)arg4)" \
+ "\\$\[0-9\]+ = 4" \
+ "print call overloaded func unsigned char arg"
+
+gdb_test "print foo_instance1.overload1arg((short)arg5)" \
+ "\\$\[0-9\]+ = 5" \
+ "print call overloaded func short arg"
+
+gdb_test "print foo_instance1.overload1arg((unsigned short)arg6)" \
+ "\\$\[0-9\]+ = 6" \
+ "print call overloaded func unsigned short arg"
+
+gdb_test "print foo_instance1.overload1arg((int)arg7)" \
+ "\\$\[0-9\]+ = 7" \
+ "print call overloaded func int arg"
+
+gdb_test "print foo_instance1.overload1arg((unsigned int)arg8)" \
+ "\\$\[0-9\]+ = 8" \
+ "print call overloaded func unsigned int arg"
+
+gdb_test "print foo_instance1.overload1arg((long)arg9)" \
+ "\\$\[0-9\]+ = 9" \
+ "print call overloaded func long arg"
+
+gdb_test "print foo_instance1.overload1arg((unsigned long)arg10)" \
+ "\\$\[0-9\]+ = 10" \
+ "print call overloaded func unsigned long arg"
+
+gdb_test "print foo_instance1.overload1arg((float)arg11)" \
+ "\\$\[0-9\]+ = 11" \
+ "print call overloaded func float arg"
+
+gdb_test "print foo_instance1.overload1arg((double)arg12)" \
+ "\\$\[0-9\]+ = 12" \
+ "print call overloaded func double arg"
+
+# ---
+
+# List overloaded functions.
+
+# The void case is tricky because some compilers say "(void)"
+# and some compilers say "()".
+
+gdb_test "set listsize 1" "" ""
+gdb_test_multiple "info func overloadfnarg" "list overloaded function with no args" {
-re ".*overloadfnarg\\(void\\).*$gdb_prompt $" {
+ # gcc 2
gdb_test "list foo::overloadfnarg(void)"\
".*int foo::overloadfnarg.*\\(void\\).*" \
"list overloaded function with no args"
}
-re ".*overloadfnarg\\(\\).*$gdb_prompt $" {
+ # gcc 3
gdb_test "list foo::overloadfnarg()"\
".*int foo::overloadfnarg.*\\(void\\).*" \
"list overloaded function with no args"
}
- -re ".*$gdb_prompt $" {
- fail "list overloaded function with no args (no matching symbol)"
- }
}
-gdb_test "list foo::overloadfnarg(int)"\
+gdb_test "list foo::overloadfnarg(int)" \
"int foo::overloadfnarg.*\\(int arg\\).*" \
"list overloaded function with int arg"
@@ -392,9 +289,26 @@ gdb_test "list foo::overloadfnarg(int, int (*)(int))" \
"int foo::overloadfnarg.*\\(int arg, int \\(\\*foo\\) \\(int\\)\\).*" \
"list overloaded function with function ptr args"
-# This one crashes GDB. Don't know why yet.
gdb_test "list \"foo::overloadfnarg(int, int (*)(int))\"" \
"int foo::overloadfnarg.*\\(int arg, int \\(\\*foo\\) \\(int\\)\\).*" \
"list overloaded function with function ptr args - quotes around argument"
-gdb_test "print intToChar(1)" ".\[0-9\]* = 297"
+# Now some tests to see how overloading and namespaces interact.
+
+gdb_test "print overloadNamespace(1)" ".\[0-9\]* = 1"
+gdb_test "print overloadNamespace('a')" ".\[0-9\]* = 1"
+gdb_test "print overloadNamespace(dummyInstance)" ".\[0-9\]* = 2"
+
+if ![runto 'XXX::marker2'] then {
+ perror "couldn't run to XXX::marker2"
+ continue
+}
+
+gdb_test "print overloadNamespace(1)" ".\[0-9\]* = 3" "print overloadNamespace(1) in XXX"
+gdb_test "print overloadNamespace('a')" ".\[0-9\]* = 3" "print overloadNamespace('a') in XXX"
+gdb_test "print overloadNamespace(dummyInstance)" ".\[0-9\]* = 2" "print overloadNamespace(dummyInstance) in XXX"
+
+# One last mysterious test.
+# I wonder what this is for?
+
+gdb_test "print intToChar(1)" "\\$\[0-9\]+ = 297"
diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp
index 043243d23ff..b6dfa5ceabb 100644
--- a/gdb/testsuite/gdb.cp/ovldbreak.exp
+++ b/gdb/testsuite/gdb.cp/ovldbreak.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +14,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# written by Elena Zannoni (ezannoni@cygnus.com)
# modified by Michael Chastain (chastain@redhat.com)
diff --git a/gdb/testsuite/gdb.cp/pr-1553.cc b/gdb/testsuite/gdb.cp/pr-1553.cc
new file mode 100644
index 00000000000..58441fdb80f
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr-1553.cc
@@ -0,0 +1,53 @@
+class A {
+public:
+ class B;
+ class C;
+};
+
+class A::B {
+ int a_b;
+
+public:
+ C* get_c(int i);
+};
+
+class A::C
+{
+ int a_c;
+};
+
+class E {
+public:
+ class F;
+};
+
+class E::F {
+public:
+ int e_f;
+
+ F& operator=(const F &other);
+};
+
+void refer_to (E::F *f) {
+ // Do nothing.
+}
+
+void refer_to (A::C **ref) {
+ // Do nothing. But, while we're at it, force out debug info for
+ // A::B and E::F.
+
+ A::B b;
+ E::F f;
+
+ refer_to (&f);
+}
+
+int main () {
+ A::C* c_var;
+ A::B* b_var;
+ E *e_var;
+
+ // Keep around a reference so that GCC 3.4 doesn't optimize the variable
+ // away.
+ refer_to (&c_var);
+}
diff --git a/gdb/testsuite/gdb.cp/pr-1553.exp b/gdb/testsuite/gdb.cp/pr-1553.exp
new file mode 100644
index 00000000000..fe9e2a26171
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr-1553.exp
@@ -0,0 +1,62 @@
+# Copyright 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Test for PR gdb/1553.
+
+# This file is part of the gdb testsuite.
+
+set ws "\[\r\n\t \]+"
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+if { [skip_cplus_tests] } { continue }
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+set testfile "pr-1553"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile} "c++"] {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+gdb_test "ptype c_var" "type = class A::C \{${ws}private:${ws}int a_c;${ws}\} \\*"
+
+gdb_test "ptype E::F" "type = class E::F \{${ws}public:${ws}int e_f;${ws}E::F & operator=\\(E::F const ?&\\);${ws}\}"
+
+gdb_exit
+return 0
diff --git a/gdb/testsuite/gdb.cp/psmang.exp b/gdb/testsuite/gdb.cp/psmang.exp
index 31dd34643f0..b13737956cc 100644
--- a/gdb/testsuite/gdb.cp/psmang.exp
+++ b/gdb/testsuite/gdb.cp/psmang.exp
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,9 +14,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file is part of the gdb testsuite
# Looking up methods by name, in programs with multiple compilation units.
diff --git a/gdb/testsuite/gdb.cp/ref-types.exp b/gdb/testsuite/gdb.cp/ref-types.exp
index dd06f027111..764ba8b6b76 100644
--- a/gdb/testsuite/gdb.cp/ref-types.exp
+++ b/gdb/testsuite/gdb.cp/ref-types.exp
@@ -1,5 +1,5 @@
# Tests for reference types with short type variables in GDB.
-# Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,9 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# written by Elena Zannoni (ezannoni@cygnus.com)
if $tracelevel then {
@@ -72,8 +69,6 @@ proc gdb_start_again {} {
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
- source ${binfile}.ci
-
#
# set it up at a breakpoint so we can play with the variable values
#
diff --git a/gdb/testsuite/gdb.cp/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp
index f99637a28a9..18f3cc295da 100644
--- a/gdb/testsuite/gdb.cp/rtti.exp
+++ b/gdb/testsuite/gdb.cp/rtti.exp
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,8 +46,9 @@ set srcfile2 "${srcdir}/${subdir}/${testfile}2.cc"
set objfile2 "${objdir}/${subdir}/${testfile}2.o"
set binfile ${objdir}/${subdir}/${testfile}
-# gdb_get_line_number needs this to be called srcfile.
-set srcfile "${srcfile1}"
+# gdb_get_line_number needs this to be called srcfile. Except that it
+# gets confused if the directories are included. :-(
+set srcfile "${testfile}1.cc"
if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
@@ -78,11 +79,16 @@ if ![runto_main] then {
# First, run to after we've constructed the object:
-gdb_breakpoint [gdb_get_line_number "constructs-done"]
-gdb_continue_to_breakpoint "end of constructors"
+gdb_breakpoint [gdb_get_line_number "main-constructs-done"]
+gdb_continue_to_breakpoint "end of constructors in main"
gdb_test_multiple "print *e1" "print *e1" {
+ -re "warning: RTTI symbol not found for class 'n1::D1'.*$gdb_prompt $" {
+ # gdb HEAD 2003-12-05
+ kfail "gdb/488" "print *e1"
+ }
-re "warning: can't find class named `n1::D1', as given by C\\+\\+ RTTI.*$gdb_prompt $" {
+ # gdb 6.0
kfail "gdb/488" "print *e1"
}
-re "\\$\[0-9\]* = {<n1::Base1> = .*}\r\n$gdb_prompt $" {
@@ -97,23 +103,26 @@ gdb_test_multiple "print *e1" "print *e1" {
}
}
-# NOTE: carlton/2003-05-16: This test fails on my branch with an
-# "<incomplete type>" message because, within rtt1.cc, GDB has no way
-# of knowing that the class is called 'n2::D2' instead of just 'D2'.
-# This is an artifical test case, though: if we were using these
-# classes in a more substantial way, G++ would emit more debug info.
-# As is, I don't think there's anything that GDB can do about this
-# case until G++ starts emitting DW_TAG_namespace info; when that part
-# of the branch gets merged in, then we'll probably want to convert
-# that fail branch to an xfail.
+# NOTE: carlton/2004-01-14: This test with an "<incomplete type>"
+# message because, within rtt1.cc, GDB has no way of knowing that the
+# class is called 'n2::D2' instead of just 'D2'. This is an artifical
+# test case, though: if we were using these classes in a more
+# substantial way, G++ would emit more debug info. As is, I don't
+# think there's anything that GDB can do about this case until G++
+# starts emitting DW_TAG_namespace info; this should arrive with GCC
+# 3.4.
gdb_test_multiple "print *e2" "print *e2" {
+ -re "warning: RTTI symbol not found for class 'n2::D2'.*$gdb_prompt $" {
+ # gdb HEAD 2003-12-05
+ kfail "gdb/488" "print *e2"
+ }
-re "warning: can't find class named `n2::D2', as given by C\\+\\+ RTTI.*$gdb_prompt $" {
+ # gdb 6.0
kfail "gdb/488" "print *e2"
}
-re "\\$\[0-9\]* = <incomplete type>\r\n$gdb_prompt $" {
- # See above NOTE.
- fail "print *e2"
+ kfail "gdb/1511" "print *e2"
}
-re "\\$\[0-9\]* = {<n2::Base2> = .*}\r\n$gdb_prompt $" {
pass "print *e2"
@@ -123,5 +132,18 @@ gdb_test_multiple "print *e2" "print *e2" {
}
}
+# Now we test the hack that's been implemented to get around some
+# instances of PR gdb/1511.
+
+gdb_breakpoint [gdb_get_line_number "func-constructs-done"]
+gdb_continue_to_breakpoint "end of constructors in func"
+
+gdb_test "print *obj" "\\$\[0-9\]* = {<n2::Base2> = .*}"
+
+gdb_breakpoint [gdb_get_line_number "func3-constructs-done"]
+gdb_continue_to_breakpoint "end of constructors in func3"
+
+gdb_test "print *obj3" "\\$\[0-9\]* = {<n2::C2> = .*}"
+
gdb_exit
return 0
diff --git a/gdb/testsuite/gdb.cp/rtti.h b/gdb/testsuite/gdb.cp/rtti.h
index 879896d0dc8..c3249252f09 100644
--- a/gdb/testsuite/gdb.cp/rtti.h
+++ b/gdb/testsuite/gdb.cp/rtti.h
@@ -1,6 +1,6 @@
/* Code to go along with tests in rtti.exp.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
Inc.
@@ -45,4 +45,12 @@ namespace n2 {
};
extern C2 *create2();
+
+ namespace n3 {
+ class C3 : public C2 {
+ public:
+ };
+ }
+
+ extern n3::C3 *create3();
}
diff --git a/gdb/testsuite/gdb.cp/rtti1.cc b/gdb/testsuite/gdb.cp/rtti1.cc
index 6e9d862bb13..d32ac047d44 100644
--- a/gdb/testsuite/gdb.cp/rtti1.cc
+++ b/gdb/testsuite/gdb.cp/rtti1.cc
@@ -1,6 +1,6 @@
/* Code to go along with tests in rtti.exp.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
Inc.
@@ -55,6 +55,43 @@ namespace n1 {
} // n1
+// NOTE: carlton/2004-01-23: This call exists only to convince GCC to
+// keep around a reference to 'obj' in n2::func - GCC 3.4 had been
+// optimizing it away.
+void refer_to (n2::C2 *obj)
+{
+ // Do nothing.
+}
+
+void refer_to (n2::n3::C3 *obj)
+{
+ // Do nothing.
+}
+
+namespace n2
+{
+ void func ()
+ {
+ C2 *obj = create2 ();
+
+ refer_to (obj); // func-constructs-done
+
+ return;
+ }
+
+ namespace n3
+ {
+ void func3 ()
+ {
+ C3 *obj3 = create3 ();
+
+ refer_to (obj3); // func3-constructs-done
+
+ return;
+ }
+ }
+}
+
int main()
{
using namespace n1;
@@ -63,5 +100,8 @@ int main()
C1 *e1 = create1();
C2 *e2 = create2();
- return 0; // constructs-done
+ n2::func(); // main-constructs-done
+ n2::n3::func3();
+
+ return 0;
}
diff --git a/gdb/testsuite/gdb.cp/rtti2.cc b/gdb/testsuite/gdb.cp/rtti2.cc
index 8bb1ed6c99f..353a1f8c7b8 100644
--- a/gdb/testsuite/gdb.cp/rtti2.cc
+++ b/gdb/testsuite/gdb.cp/rtti2.cc
@@ -1,6 +1,6 @@
/* Code to go along with tests in rtti.exp.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
Inc.
@@ -33,4 +33,8 @@ namespace n2 {
return new D2(0, 0);
}
+ n3::C3 *create3() {
+ return new n3::C3();
+ }
+
}
diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp
index 0ae878865fe..00a5598629c 100644
--- a/gdb/testsuite/gdb.cp/templates.exp
+++ b/gdb/testsuite/gdb.cp/templates.exp
@@ -1,4 +1,4 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2003
+# Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Fred Fish. (fnf@cygnus.com)
set ws "\[\r\n\t \]+"
@@ -37,7 +34,6 @@ set binfile ${objdir}/${subdir}/${testfile}
if [get_compiler_info ${binfile} "c++"] {
return -1
}
-source ${binfile}.ci
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
@@ -56,12 +52,15 @@ proc test_ptype_of_templates {} {
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}T5<int> & operator=\\(T5<int> const ?&\\);${ws}T5\\(int\\);${ws}T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\((void|)\\);${ws}static void \\* operator new\\(unsigned( int| long)?\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
pass "ptype T5<int>"
}
+ -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}T5\\(int\\);${ws}T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\((void|)\\);${ws}static void \\* operator new\\(unsigned( int| long)?\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}T5<int> & operator=\\(T5<int> const ?&\\);${ws}\}\r\n$gdb_prompt $" {
+ pass "ptype T5<int>"
+ }
-re "type = class T5<int> \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}${ws}T5 \\(int\\);${ws}T5 \\(const class T5<int> &\\);${ws}void ~T5 \\(int\\);${ws}static void \\* new \\(unsigned int\\);${ws}static void delete \\(void ?\\*\\);${ws}int value \\((void|)\\);${ws}\\}${ws}$gdb_prompt $" { pass "ptype T5<int> -- new with unsigned int" }
-re "type = class T5<int> \\{.*public:.*static int X;.*int x;.*int val;.*T5 \\(int\\);.*T5 \\(const class T5<int> &\\);.*void ~T5 \\(int\\);.*static void \\* new \\(unsigned long\\);.*static void delete \\(void ?\\*\\);.*int value \\((void|)\\);.*\\}\r\n$gdb_prompt $" { pass "ptype T5<int> -- new with unsigned long" }
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\((T5<int> const|const T5<int>) ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
pass "ptype T5<int> (obsolescent gcc or gdb)"
}
- -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned( long|)\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
+ -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned( int| long|)\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
# This also triggers gdb/1113...
kfail "gdb/1111" "ptype T5<int>"
}
@@ -84,10 +83,13 @@ proc test_ptype_of_templates {} {
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}T5<int> & operator=\\(T5<int> const ?&\\);${ws}T5\\(int\\);${ws}T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\((void|)\\);${ws}static void \\* operator new\\(unsigned( int| long)?\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
pass "ptype t5i"
}
+ -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}T5\\(int\\);${ws}T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\((void|)\\);${ws}static void \\* operator new\\(unsigned( int| long)?\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}T5<int> & operator=\\(T5<int> const ?&\\);${ws}\}\r\n$gdb_prompt $" {
+ pass "ptype t5i"
+ }
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\(T5<int> const ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
pass "ptype t5i (obsolescent gcc or gdb)"
}
- -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned( long|)\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
+ -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned( int| long|)\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
# This also triggers gdb/1113...
kfail "gdb/1111" "ptype T5<int>"
}
@@ -197,7 +199,6 @@ proc do_tests {} {
global srcdir
global binfile
global gdb_prompt
- global supports_template_debugging
set prms_id 0
set bug_id 0
@@ -209,11 +210,6 @@ proc do_tests {} {
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $binfile
- if { !$supports_template_debugging } {
- warning "compiler lacks debugging info for templates; tests suppressed." 0
- return
- }
-
runto_main
test_ptype_of_templates
@@ -294,6 +290,7 @@ gdb_expect {
send_gdb "ptype fint\n"
gdb_expect {
-re "type = (class |)Foo<int> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int foo\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fint" }
+ -re "type = (class |)Foo<int> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int foo\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype fint" }
-re "$gdb_prompt $" { fail "ptype fint" }
timeout { fail "(timeout) ptype fint" }
}
@@ -303,6 +300,7 @@ gdb_expect {
send_gdb "ptype fchar\n"
gdb_expect {
-re "type = (class |)Foo<char> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*.*char foo\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fchar" }
+ -re "type = (class |)Foo<char> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char foo\\(int, char\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype fchar" }
-re "$gdb_prompt $" { fail "ptype fchar" }
timeout { fail "(timeout) ptype fchar" }
}
@@ -312,6 +310,10 @@ gdb_expect {
send_gdb "ptype fvpchar\n"
gdb_expect {
-re "type = (class |)Foo<volatile char ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" }
+ -re "type = (class |)Foo<volatile char ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char \\* foo\\(int,.*char.*\\*\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" }
+ -re "type = (class |)Foo<char volatile ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" {
+ kfail "gdb/1512" "ptype fvpchar"
+ }
-re "$gdb_prompt $" { fail "ptype fvpchar" }
timeout { fail "(timeout) ptype fvpchar" }
}
@@ -326,8 +328,10 @@ gdb_expect {
-re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" }
-re "No symbol \"Foo<volatile char \\*>\" in current context.\r\n$gdb_prompt $"
{
- # This used to be a kfail gdb/33, but it shouldn't occur any more now.
- fail "print Foo<volatile char *>::foo"
+ # This used to be a kfail gdb/33. That problem has been
+ # fixed, but now gdb/931 and gdb/1512 are rearing their ugly
+ # heads.
+ kfail "gdb/931" "print Foo<volatile char *>::foo"
}
-re "$gdb_prompt $" { fail "print Foo<volatile char *>::foo" }
timeout { fail "(timeout) print Foo<volatile char *>::foo" }
@@ -338,8 +342,10 @@ gdb_expect {
-re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char*>::foo" }
-re "No symbol \"Foo<volatile char\\*>\" in current context.\r\n$gdb_prompt $"
{
- # This used to be a kfail gdb/33, but it shouldn't occur any more now.
- fail "print Foo<volatile char *>::foo"
+ # This used to be a kfail gdb/33. That problem has been
+ # fixed, but now gdb/931 and gdb/1512 are rearing their ugly
+ # heads.
+ kfail "gdb/931" "print Foo<volatile char*>::foo"
}
-re "$gdb_prompt $" { fail "print Foo<volatile char*>::foo" }
timeout { fail "(timeout) print Foo<volatile char*>::foo" }
@@ -352,7 +358,7 @@ send_gdb "ptype Bar\n"
gdb_expect {
-re "type = template <(class |)T, (class |)sz> (class |)Bar \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Bar<int,(\\(int\\)|)1>\r\n\[ \t\]*(class |)Bar<int,(\\(int\\)|)33>\r\n$gdb_prompt $" { pass "ptype Bar" }
-re "type = <(class |)T, (class |)sz> (class |)Bar \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Bar" }
- -re "ptype Bar\r\ntype = class Bar<int,33> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int bar\\(int, int\\);\r\n}\r\n$gdb_prompt $"
+ -re "ptype Bar\r\ntype = class Bar<int, ?33> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int bar\\(int, int\\);\r\n}\r\n$gdb_prompt $"
{ # GCC 3.1, DWARF-2 output.
kfail "gdb/57" "ptype Bar" }
-re "No symbol \"Bar\" in current context.\r\n$gdb_prompt $"
@@ -367,7 +373,8 @@ gdb_expect {
send_gdb "ptype bint\n"
gdb_expect {
- -re "type = (class |)Bar<int,(\\(int\\)|)33> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int bar\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint" }
+ -re "type = (class |)Bar<int, ?(\\(int\\)|)33> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int bar\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint" }
+ -re "type = (class |)Bar<int,(\\(int\\)|)33> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int bar\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint" }
-re "$gdb_prompt $" { fail "ptype bint" }
timeout { fail "(timeout) ptype bint" }
}
@@ -376,7 +383,8 @@ gdb_expect {
send_gdb "ptype bint2\n"
gdb_expect {
- -re "type = (class |)Bar<int,(\\(int\\)|)1> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int bar\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint2" }
+ -re "type = (class |)Bar<int, ?(\\(int\\)|)1> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int bar\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint2" }
+ -re "type = (class |)Bar<int,(\\(int\\)|)1> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int bar\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint2" }
-re "$gdb_prompt $" { fail "ptype bint2" }
timeout { fail "(timeout) ptype bint2" }
}
@@ -386,11 +394,14 @@ gdb_expect {
# Same as Foo, for g++
send_gdb "ptype Baz\n"
gdb_expect {
- -re "type = template <(class |)T, (class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Baz<char,(\\(char\\)|)97>\r\n\[ \t\]*(class |)Baz<int,(\\(char\\)|)115>\r\n$gdb_prompt $" { pass "ptype Baz" }
- -re "type = <(class |)T, (class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Baz" }
- -re "type = class Baz<int,'s'> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int baz\\(int, int\\);\r\n}\r\n$gdb_prompt $"
+ -re "type = template <(class |)T, ?(class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Baz<char,(\\(char\\)|)97>\r\n\[ \t\]*(class |)Baz<int,(\\(char\\)|)115>\r\n$gdb_prompt $" { pass "ptype Baz" }
+ -re "type = <(class |)T, ?(class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Baz" }
+ -re "type = class Baz<int, ?'s'> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int baz\\(int, int\\);\r\n}\r\n$gdb_prompt $"
{ # GCC 3.1, DWARF-2 output.
kfail "gdb/57" "ptype Baz" }
+ -re "type = class Baz<int, ?115> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int baz\\(int, int\\);\r\n}\r\n$gdb_prompt $"
+ { # GCC 3.x, DWARF-2 output, running into gdb/57 and gdb/1512.
+ kfail "gdb/57" "ptype Baz" }
-re "No symbol \"Baz\" in current context.\r\n$gdb_prompt $"
{ # GCC 2.95.3, stabs+ output.
pass "ptype Baz" }
@@ -403,7 +414,8 @@ gdb_expect {
send_gdb "ptype bazint\n"
gdb_expect {
- -re "type = (class |)Baz<int,(\\(char\\)|)(115|\\'s\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int baz\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint" }
+ -re "type = (class |)Baz<int, ?(\\(char\\)|)(115|\\'s\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int baz\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint" }
+ -re "type = (class |)Baz<int,(\\(char\\)|)(115|\\'s\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int baz\\(int, int\\).*;\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint" }
-re "$gdb_prompt $" { fail "ptype bazint" }
timeout { fail "(timeout) ptype bazint" }
}
@@ -412,7 +424,8 @@ gdb_expect {
send_gdb "ptype bazint2\n"
gdb_expect {
- -re "type = (class |)Baz<char,(\\(char\\)|)(97|\\'a\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*.*char baz\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint2" }
+ -re "type = (class |)Baz<char, ?(\\(char\\)|)(97|\\'a\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*.*char baz\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint2" }
+ -re "type = (class |)Baz<char,(\\(char\\)|)(97|\\'a\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char baz\\(int, char\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint2" }
-re "$gdb_prompt $" { fail "ptype bazint2" }
timeout { fail "(timeout) ptype bazint2" }
}
@@ -421,11 +434,14 @@ gdb_expect {
# Same as Foo for g++
send_gdb "ptype Qux\n"
gdb_expect {
- -re "type = template <(class |)T, (class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Qux<int,&string>\r\n\[ \t\]*(class |)Qux<char,&string>\r\n$gdb_prompt $" { pass "ptype Qux" }
- -re ".*type = template <(class |)T.*, (class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}.*$gdb_prompt $" { pass "ptype Qux" }
- -re "type = class Qux<char,&string> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char qux\\(int, char\\);\r\n}\r\n$gdb_prompt $"
+ -re "type = template <(class |)T, ?(class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Qux<int,&string>\r\n\[ \t\]*(class |)Qux<char,&string>\r\n$gdb_prompt $" { pass "ptype Qux" }
+ -re ".*type = template <(class |)T.*, ?(class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}.*$gdb_prompt $" { pass "ptype Qux" }
+ -re "type = class Qux<char, ?&string> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char qux\\(int, char\\);\r\n}\r\n$gdb_prompt $"
{ # GCC 3.1, DWARF-2 output.
kfail "gdb/57" "ptype Qux" }
+ -re "type = class Qux<char, ?&\\(string\\)> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char qux\\(int, char\\);\r\n}\r\n$gdb_prompt $"
+ { # GCC 3.x, DWARF-2 output; gdb/57 + gdb/1512.
+ kfail "gdb/57" "ptype Qux" }
-re "No symbol \"Qux\" in current context.\r\n$gdb_prompt $"
{ # GCC 2.95.3, stabs+ output.
pass "ptype Qux" }
@@ -437,7 +453,12 @@ gdb_expect {
send_gdb "ptype quxint\n"
gdb_expect {
- -re "type = class Qux<int,&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
+ -re "type = class Qux<int, ?&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
+ -re "type = class Qux<int, ?&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
+ -re "type = class Qux<int, ?\\(char ?\\*\\)\\(&string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
+ -re "type = class Qux<int, ?&\\(string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" {
+ kfail "gdb/1512" "ptype quxint"
+ }
-re "$gdb_prompt $" { fail "ptype quxint" }
timeout { fail "(timeout) ptype quxint" }
}
@@ -460,7 +481,7 @@ send_gdb "ptype Spec\n"
gdb_expect {
-re "type = template <(class |)T1, (class |)T2> (class |)Spec \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Spec<int,int \\*>\r\n\[ \t\]*(class |)Spec<int,char>\r\n$gdb_prompt $" { pass "ptype Spec" }
-re "type = <(class |)T1, (class |)T2> (class |)Spec \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Spec" }
- -re "type = class Spec<int,char> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*int spec\\(char\\);\r\n}\r\n$gdb_prompt $"
+ -re "type = class Spec<int, ?char> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*int spec\\(char\\);\r\n}\r\n$gdb_prompt $"
{ # GCC 3.1, DWARF-2 output.
kfail "gdb/57" "ptype Spec" }
-re "No symbol \"Spec\" in current context.\r\n$gdb_prompt $"
@@ -474,7 +495,8 @@ gdb_expect {
send_gdb "ptype siip\n"
gdb_expect {
- -re "type = class Spec<int,int ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*.*int spec\\(int ?\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype siip" }
+ -re "type = class Spec<int, ?int ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*.*int spec\\(int ?\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype siip" }
+ -re "type = class Spec<int,int ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*int spec\\(int ?\\*\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype siip" }
-re "$gdb_prompt $" { fail "ptype siip" }
timeout { fail "(timeout) ptype siip" }
}
@@ -484,6 +506,7 @@ gdb_expect {
send_gdb "ptype Garply<int>\n"
gdb_expect {
-re "type = class Garply<int> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int garply\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype Garply<int>" }
+ -re "type = class Garply<int> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int garply\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype Garply<int>" }
-re "$gdb_prompt $" { fail "ptype Garply<int>" }
timeout { fail "(timeout) ptype Garply<int>" }
}
@@ -493,6 +516,7 @@ gdb_expect {
send_gdb "ptype Garply<Garply<char> >\n"
gdb_expect {
-re "type = (class |)Garply<Garply<char> > \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*(class |)Garply<char> t;\r\n\r\n\[ \t\]*.*(class |)Garply<char> garply\\(int, (class |)Garply<char>\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype Garply<Garply<char> >" }
+ -re "type = (class |)Garply<Garply<char> > \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*(class |)Garply<char> t;\r\n\r\n\[ \t\]*(class |)Garply<char> garply\\(int, (class |)Garply<char>\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype Garply<Garply<char> >" }
-re "$gdb_prompt $" { fail "ptype Garply<Garply<char> >" }
timeout { fail "(timeout) ptype Garply<Garply<char> >" }
}
diff --git a/gdb/testsuite/gdb.cp/userdef.exp b/gdb/testsuite/gdb.cp/userdef.exp
index 4575249ce5a..5c9c9338a87 100644
--- a/gdb/testsuite/gdb.cp/userdef.exp
+++ b/gdb/testsuite/gdb.cp/userdef.exp
@@ -1,5 +1,5 @@
# Tests of overloaded operators resolution.
-# Copyright 1998, 1999, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,9 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# written by Elena Zannoni (ezannoni@cygnus.com)
#
# source file "userdef.cc"
diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp
index dbd575cfb32..bd931a629e3 100644
--- a/gdb/testsuite/gdb.cp/virtfunc.exp
+++ b/gdb/testsuite/gdb.cp/virtfunc.exp
@@ -1,4 +1,4 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -15,16 +15,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Fred Fish. (fnf@cygnus.com)
+# And rewritten by Michael Chastain <mec.gnu@mindspring.com>.
-set ws "\[\r\n\t \]+"
-set nl "\[\r\n\]+"
+set wsopt "\[\r\n\t \]*"
+set ws "\[\r\n\t \]+"
+set nl "\[\r\n\]+"
if $tracelevel then {
- strace $tracelevel
+ strace $tracelevel
}
if { [skip_cplus_tests] } { continue }
@@ -33,708 +32,455 @@ set testfile "virtfunc"
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-source ${binfile}.ci
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {c++ debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-proc gdb_virtfunc_init {} {
- global srcdir subdir binfile
- global gdb_prompt
-
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- send_gdb "set language c++\n"
- gdb_expect -re "$gdb_prompt $"
- send_gdb "set width 0\n"
- gdb_expect -re "$gdb_prompt $"
-}
-
-proc gdb_virtfunc_restart {} {
- gdb_exit;
- gdb_start;
- gdb_virtfunc_init;
- runto 'test_calls';
-}
-
+# Test ptype of a class.
+#
+# Different C++ compilers produce different output. I build up regular
+# expressions piece by piece to accommodate all the compilers that I
+# have seen: gcc 2.95.3, gcc 3.3.2 (ABI 1), gcc 3.4 prerelease (ABI 2);
+# and all the debug formats I have seen: dwarf-2 and stabs+.
+#
+# A complicated class declaration looks like this:
+#
+# class A : public virtual V { // re_class
+# private:
+# V * _vb$V; // re_vbptr
+# int a; // re_fields
+#
+# public: // re_access_methods
+# A & operator=(A const &); // re_synth_gcc_2
+# A(int, A const &); // ...
+# A(int); // ...
+# virtual int f(void); // re_methods
+# }
+#
+# RE_CLASS matches the class declaration. C++ allows multiple ways of
+# expressing this.
#
-# Test printing of the types of various classes.
+# struct ... { private: ... };
+# class ... { private: ... };
+# class ... { ... };
#
+# RE_VBPTR matches the virtual base declarations. gcc 2.95.3 sometimes
+# emits these, but gcc 3.X.Y never emits these. The name depends on the
+# debug format.
+#
+# RE_FIELDS matches the data fields of the class.
+# RE_METHODS matches the methods explicitly declared for the class.
+#
+# RE_SYNTH_GCC_2 and RE_SYNTH_GCC_3 match the optional synthetic methods
+# of the class. gcc -gstabs+ emits these methods, and gcc -gdwarf-2
+# does not.
+#
+# RE_ACCESS_METHODS is an access specifier after RE_FIELDS and before
+# the methods (explicit methods and/or synthetic methods).
+# There is also an RE_ACCESS_FIELDS.
+#
+# When I get HP-UX aCC, I hope that I can just add RE_SYNTH_ACC_NNN.
+#
+# Yet another twist: with gcc v2, ctor and dtor methods have a hidden
+# argument in front, the "in-charge" flag. With gcc v3, there is no
+# hidden argument; instead, there are multiple object functions for
+# each ctor and dtor.
+#
+# -- chastain 2004-01-01
-proc test_ptype_of_classes {} {
+proc test_one_ptype { command testname re_class re_vbptr re_access_fields re_fields re_access_methods re_methods re_synth_gcc_2 re_synth_gcc_3 re_star } {
global gdb_prompt
+ global wsopt
global ws
global nl
- # This used to be a fail if it printed "struct" not "class". But
- # since this struct doesn't use any special C++ features, it is
- # considered right for GDB to print it as "struct".
- send_gdb "ptype VA\n"
- gdb_expect {
- -re "type = (struct|class) VA \{(${ws}public:|)${ws}int va;${ws}VA & operator=\\(VA const ?&\\);${ws}VA\\((VA const|const VA) ?&\\);${ws}VA\\((void|)\\);${ws}\}.*$gdb_prompt $" {
- pass "ptype VA"
- }
- -re "type = (struct|class) VA \{(${ws}public:|)${ws}int va;((${ws}VA & operator=\\(VA const ?&\\);)|(${ws}VA\\(VA const ?&\\);)|(${ws}VA\\((void|)\\);))*${ws}\}.*$gdb_prompt $" {
- pass "ptype VA (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype VA"
- }
- timeout {
- fail "ptype VA (timeout)"
+ gdb_test_multiple "$command" "$testname" {
+ -re "type = $re_class${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_methods$nl\}$re_star$nl$gdb_prompt $" {
+ # gcc 2.95.3, dwarf-2, no vbptr
+ # gcc 3.X, abi 1, dwarf-2
+ # gcc 3.X, abi 2, dwarf-2
+ pass "$testname"
}
- }
-
- send_gdb "ptype VB\n"
- gdb_expect {
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const ?&\\);${ws}VB\\((VB const|const VB) ?&\\);${ws}VB\\((void|)\\);${ws}int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);${ws}\}.*$gdb_prompt $" {
- pass "ptype VB"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\((void|)\\);${ws}virtual int vvb \\((void|)\\);${ws}\}.*$gdb_prompt $" {
- pass "ptype VB (aCC)"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const ?&\\);)|(${ws}VB\\(VB const ?&\\);)|(${ws}VB\\((void|)\\);)|(${ws}int fvb\\((void|)\\);)|(${ws}virtual int vvb\\((void|)\\);))*${ws}\}.*$gdb_prompt $" {
- pass "ptype VB (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype VB"
- }
- timeout {
- fail "ptype VB (timeout)"
- }
- }
-
- send_gdb "ptype V\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype V"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype V (aCC)"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype V (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype V"
- }
- timeout {
- fail "ptype V (timeout)"
- }
- }
-
- # The format of a g++ virtual base pointer.
- set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
-
- send_gdb "ptype A\n"
- gdb_expect {
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype A"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\((A const|const A) ?&\\);${ws}A\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype A"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype A (aCC)"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype A (obsolescent gcc or gdb)"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}FOO;${ws}int a;${ws}public:${ws}virtual int f.void.;${ws}\}$nl$gdb_prompt $" {
- # This happens because the type is defined only after it is
- # too late.
- fail "ptype A (known failure with gcc cygnus-2.4.5-930417)"
- # Many of the rest of these tests have the same problem.
- return 0
- }
- -re ".*$gdb_prompt $" {
- fail "ptype A"
- }
- timeout {
- fail "ptype A (timeout)"
- }
- }
-
- send_gdb "ptype B\n"
- gdb_expect {
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype B"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\((B const|const B) ?&\\);${ws}B\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype B"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype B (aCC)"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const ?&\\);)|(${ws}B\\(int, B const ?&\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype B (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype B"
- }
- timeout {
- fail "ptype B (timeout)"
- }
- }
-
- send_gdb "ptype C\n"
- gdb_expect {
- -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\(int, C const ?&\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype C"
- }
- -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\((C const|const C) ?&\\);${ws}C\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype C"
- }
- -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
- pass "ptype C (aCC)"
- }
- -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const ?&\\);)|(${ws}C\\(int, C const ?&\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype C (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype C"
- }
- timeout {
- fail "ptype C (timeout)"
- }
- }
-
- send_gdb "ptype AD\n"
- gdb_expect {
- -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const ?&\\);${ws}AD\\((AD const|const AD) ?&\\);${ws}AD\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype AD"
- }
- -re "type = class AD \{${ws}public:${ws}virtual int vg \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype AD (aCC)"
- }
- -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const ?&\\);)|(${ws}AD\\(AD const ?&\\);)|(${ws}AD\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype AD (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype AD"
- }
- timeout {
- fail "ptype AD (timeout)"
- }
- }
-
- send_gdb "ptype D\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype D"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype D"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype D (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype D (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype D"
- }
- timeout {
- fail "ptype D (timeout)"
- }
- }
-
- send_gdb "ptype E\n"
- gdb_expect {
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype E"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\((E const|const E) ?&\\);${ws}E\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype E"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\((void|)\\);${ws}virtual int vg \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype E (aCC)"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const ?&\\);)|(${ws}E\\(int, E const ?&\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype E (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype E"
- }
- timeout {
- fail "ptype E (timeout)"
- }
- }
-
- send_gdb "ptype dd\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype dd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype dd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype dd (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype dd (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype dd"
- }
- timeout {
- fail "ptype dd (timeout)"
- }
- }
-
- send_gdb "ptype ppd\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype ppd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype ppd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype ppd (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype ppd (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype ppd"
- }
- timeout {
- fail "ptype ppd (timeout)"
- }
- }
-
- send_gdb "ptype pAd\n"
- gdb_expect {
- -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const ?&\\);${ws}AD\\((AD const|const AD) ?&\\);${ws}AD\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAd"
- }
- -re "type = class AD \{${ws}public:${ws}virtual int vg \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAd (aCC)"
- }
- -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const ?&\\);)|(${ws}AD\\(AD const ?&\\);)|(${ws}AD\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAd (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pAd"
- }
- timeout {
- fail "ptype pAd (timeout)"
- }
- }
-
- send_gdb "ptype a\n"
- gdb_expect {
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype a"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\((A const|const A) ?&\\);${ws}A\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype a"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype a (aCC)"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype a (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype a"
- }
- timeout {
- fail "ptype a (timeout)"
- }
- }
-
- send_gdb "ptype b\n"
- gdb_expect {
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype b"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\((B const|const B) ?&\\);${ws}B\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype b"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype b (aCC)"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const ?&\\);)|(${ws}B\\(int, B const ?&\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype b (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype b"
- }
- timeout {
- fail "ptype b (timeout)"
- }
- }
-
- send_gdb "ptype c\n"
- gdb_expect {
- -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\(int, C const ?&\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype c"
- }
- -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\((C const|const C) ?&\\);${ws}C\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype c"
- }
- -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
- pass "ptype c (aCC)"
- }
- -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const ?&\\);)|(${ws}C\\(int, C const ?&\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype c (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype c"
- }
- timeout {
- fail "ptype c (timeout)"
- }
- }
-
- send_gdb "ptype d\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype d"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype d"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype d (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype d (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype d"
- }
- timeout {
- fail "ptype d (timeout)"
- }
- }
-
- send_gdb "ptype e\n"
- gdb_expect {
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype e"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\((E const|const E) ?&\\);${ws}E\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype e"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\((void|)\\);${ws}virtual int vg \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype e (aCC)"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const ?&\\);)|(${ws}E\\(int, E const ?&\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype e (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype e"
- }
- timeout {
- fail "ptype e (timeout)"
- }
- }
-
- send_gdb "ptype v\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype v"
+ -re "type = $re_class${wsopt}$re_vbptr${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_methods$nl\}$re_star$nl$gdb_prompt $" {
+ # gcc 2.95.3, dwarf-2, vbptr
+ # TODO: drow says the vbptr is a bug
+ pass "$testname"
}
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype v (aCC)"
+ -re "type = $re_class${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_synth_gcc_2${wsopt}$re_methods$nl\}$re_star$nl$gdb_prompt $" {
+ # gcc 2.95.3, stabs+, no vbptr
+ pass "$testname"
}
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype v (obsolescent gcc or gdb)"
+ -re "type = $re_class${wsopt}$re_vbptr${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_synth_gcc_2${wsopt}$re_methods$nl\}$re_star$nl$gdb_prompt $" {
+ # gcc 2.95.3, stabs+, vbptr
+ # TODO: drow says the vbptr is a bug
+ pass "$testname"
}
- -re ".*$gdb_prompt $" {
- fail "ptype v"
+ -re "type = $re_class${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_synth_gcc_3${wsopt}$re_methods$nl\}$re_star$nl$gdb_prompt $" {
+ # gcc 3.X, abi 1, stabs+
+ pass "$testname"
}
- timeout {
- fail "ptype v (timeout)"
+ -re "type = $re_class${wsopt}$re_access_fields${wsopt}$re_fields${wsopt}$re_access_methods${wsopt}$re_methods${wsopt}$re_synth_gcc_3$nl\}$re_star$nl$gdb_prompt $" {
+ # gcc 3.X, abi 2, stabs+
+ pass "$testname"
}
}
- send_gdb "ptype vb\n"
- gdb_expect {
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const ?&\\);${ws}VB\\((VB const|const VB) ?&\\);${ws}VB\\((void|)\\);${ws}int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype vb"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\((void|)\\);${ws}virtual int vvb \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype vb (aCC)"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const ?&\\);)|(${ws}VB\\(VB const ?&\\);)|(${ws}VB\\((void|)\\);)|(${ws}int fvb\\((void|)\\);)|(${ws}virtual int vvb\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype vb (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype vb"
- }
- timeout {
- fail "ptype vb (timeout)"
- }
- }
-
- send_gdb "ptype pAa\n"
- gdb_expect {
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAa"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\((A const|const A) ?&\\);${ws}A\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAa"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAa (aCC)"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAa (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pAa"
- }
- timeout {
- fail "ptype pAa (timeout)"
- }
- }
-
- send_gdb "ptype pAe\n"
- gdb_expect {
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAe"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\((A const|const A) ?&\\);${ws}A\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAe"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAe (aCC)"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pAe"
- }
- timeout {
- fail "ptype pAe (timeout)"
- }
- }
-
- send_gdb "ptype pBe\n"
- gdb_expect {
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pBe"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\((B const|const B) ?&\\);${ws}B\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pBe"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pBe (aCC)"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const ?&\\);)|(${ws}B\\(int, B const ?&\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pBe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pBe"
- }
- timeout {
- fail "ptype pBe (timeout)"
- }
- }
-
- send_gdb "ptype pDd\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDd (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDd (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pDd"
- }
- timeout {
- fail "ptype pDd (timeout)"
- }
- }
-
- send_gdb "ptype pDe\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDe"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDe"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDe (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pDe"
- }
- timeout {
- fail "ptype pDe (timeout)"
- }
- }
-
- send_gdb "ptype pVa\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVa"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVa (aCC)"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVa (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pVa"
- }
- timeout {
- fail "ptype pVa (timeout)"
- }
- }
-
- send_gdb "ptype pVv\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVv"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVv (aCC)"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVv (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pVv"
- }
- timeout {
- fail "ptype pVv (timeout)"
- }
- }
-
- send_gdb "ptype pVe\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVe"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVe (aCC)"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pVe"
- }
- timeout {
- fail "ptype pVe (timeout)"
- }
- }
-
- send_gdb "ptype pVd\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVd"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVd (aCC)"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVd (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pVd"
- }
- timeout {
- fail "ptype pVd (timeout)"
- }
- }
-
- send_gdb "ptype pADe\n"
- gdb_expect {
- -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const ?&\\);${ws}AD\\((AD const|const AD) ?&\\);${ws}AD\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pADe"
- }
- -re "type = class AD \{${ws}public:${ws}virtual int vg \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pADe (aCC)"
- }
- -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const ?&\\);)|(${ws}AD\\(AD const ?&\\);)|(${ws}AD\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pADe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pADe"
- }
- timeout {
- fail "ptype pADe (timeout)"
- }
- }
+}
- send_gdb "ptype pEe\n"
- gdb_expect {
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pEe"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\((E const|const E) ?&\\);${ws}E\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pEe"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\((void|)\\);${ws}virtual int vg \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pEe (aCC)"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const ?&\\);)|(${ws}E\\(int, E const ?&\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pEe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pEe"
- }
- timeout {
- fail "ptype pEe (timeout)"
- }
- }
+proc test_ptype_of_classes {} {
+ global gdb_prompt
+ global ws
+ global nl
- send_gdb "ptype pVB\n"
- gdb_expect {
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const ?&\\);${ws}VB\\((VB const|const VB) ?&\\);${ws}VB\\((void|)\\);${ws}int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVB"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\((void|)\\);${ws}virtual int vvb \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVB (aCC)"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const ?&\\);)|(${ws}VB\\(VB const ?&\\);)|(${ws}VB\\((void|)\\);)|(${ws}int fvb\\((void|)\\);)|(${ws}virtual int vvb\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVB (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pVB"
- }
- timeout {
- fail "ptype pVB (timeout)"
- }
- }
+ # class VA
+
+ test_one_ptype "ptype VA" "ptype VA" \
+ "((struct|class) VA \{${ws}public:|struct VA \{)" \
+ "" \
+ "" "int va;" \
+ "" "" \
+ "VA & operator=\\(VA const ?&\\);${ws}VA\\(VA const ?&\\);${ws}VA\\((void|)\\);" \
+ "VA & operator=\\(VA const ?&\\);${ws}VA\\(VA const ?&\\);${ws}VA\\((void|)\\);" \
+ ""
+
+ # class VB
+
+ test_one_ptype "ptype VB" "ptype VB" \
+ "((struct|class) VB \{${ws}public:|struct VB \{)" \
+ "" \
+ "" "int vb;" \
+ "" "int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);" \
+ "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
+ "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
+ ""
+
+ # class V
+
+ test_one_ptype "ptype V" "ptype V" \
+ "class V : public VA, public VB \{${ws}public:" \
+ "" \
+ "" "int w;" \
+ "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ ""
+
+ # class A
+
+ test_one_ptype "ptype A" "ptype A" \
+ "class A : public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "" "int a;" \
+ "public:" "virtual int f\\((void|)\\);" \
+ "A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);" \
+ "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);" \
+ ""
+
+ # class B
+
+ test_one_ptype "ptype B" "ptype B" \
+ "class B : public A \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "" "int b;" \
+ "public:" "virtual int f\\((void|)\\);" \
+ "B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);" \
+ "B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\((void|)\\);" \
+ ""
+
+ # class C
+
+ test_one_ptype "ptype C" "ptype C" \
+ "class C : public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "public:" "int c;" \
+ "" "" \
+ "C & operator=\\(C const ?&\\);${ws}C\\(int, C const ?&\\);${ws}C\\(int\\);" \
+ "C & operator=\\(C const ?&\\);${ws}C\\(C const ?&\\);${ws}C\\((void|)\\);" \
+ ""
+
+ # class AD
+
+ test_one_ptype "ptype AD" "ptype AD" \
+ "((struct|class) AD \{${ws}public:|struct AD \{)" \
+ "" \
+ "" "" \
+ "" "virtual int vg\\((void|)\\);" \
+ "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
+ "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
+ ""
+
+ # class D
+
+ test_one_ptype "ptype D" "ptype D" \
+ "class D : public AD, public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "public:" "int d;" \
+ "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
+ ""
+
+ # class E
+ # TODO: E does not show a vbptr for V. That seems strange.
+
+ test_one_ptype "ptype E" "ptype E" \
+ "class E : public B, public virtual V, public D, public C \{(${ws}private:|)" \
+ "" \
+ "public:" "int e;" \
+ "" "virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
+ "E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);" \
+ "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\((void|)\\);" \
+ ""
+
+ # An instance of D
+
+ test_one_ptype "ptype dd" "ptype dd" \
+ "class D : public AD, public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "public:" "int d;" \
+ "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
+ ""
+
+ # An instance of D *
+
+ test_one_ptype "ptype ppd" "ptype ppd" \
+ "class D : public AD, public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "public:" "int d;" \
+ "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of AD *
+ # TODO: this should be named pADd, not pAd.
+
+ test_one_ptype "ptype pAd" "ptype pAd" \
+ "((struct|class) AD \{${ws}public:|struct AD \{)" \
+ "" \
+ "" "" \
+ "" "virtual int vg\\((void|)\\);" \
+ "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
+ "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of A
+
+ test_one_ptype "ptype a" "ptype a" \
+ "class A : public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "" "int a;" \
+ "public:" "virtual int f\\((void|)\\);" \
+ "A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);" \
+ "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);" \
+ ""
+
+ # An instance of B
+
+ test_one_ptype "ptype b" "ptype b" \
+ "class B : public A \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "" "int b;" \
+ "public:" "virtual int f\\((void|)\\);" \
+ "B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);" \
+ "B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\((void|)\\);" \
+ ""
+
+ # An instance of C
+
+ test_one_ptype "ptype c" "ptype c" \
+ "class C : public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "public:" "int c;" \
+ "" "" \
+ "C & operator=\\(C const ?&\\);${ws}C\\(int, C const ?&\\);${ws}C\\(int\\);" \
+ "C & operator=\\(C const ?&\\);${ws}C\\(C const ?&\\);${ws}C\\((void|)\\);" \
+ ""
+
+ # An instance of D
+
+ test_one_ptype "ptype d" "ptype d" \
+ "class D : public AD, public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "public:" "int d;" \
+ "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
+ ""
+
+ # An instance of E
+
+ test_one_ptype "ptype e" "ptype e" \
+ "class E : public B, public virtual V, public D, public C \{(${ws}private:|)" \
+ "" \
+ "public:" "int e;" \
+ "" "virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
+ "E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);" \
+ "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\((void|)\\);" \
+ ""
+
+ # An instance of V
+
+ test_one_ptype "ptype v" "ptype v" \
+ "class V : public VA, public VB \{${ws}public:" \
+ "" \
+ "" "int w;" \
+ "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ ""
+
+ # An instance of VB
+
+ test_one_ptype "ptype vb" "ptype vb" \
+ "((struct|class) VB \{${ws}public:|struct VB \{)" \
+ "" \
+ "" "int vb;" \
+ "" "int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);" \
+ "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
+ "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
+ ""
+
+ # An instance of A *
+
+ test_one_ptype "ptype pAa" "ptype pAa" \
+ "class A : public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "" "int a;" \
+ "public:" "virtual int f\\((void|)\\);" \
+ "A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);" \
+ "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of A *
+
+ test_one_ptype "ptype pAe" "ptype pAe" \
+ "class A : public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "" "int a;" \
+ "public:" "virtual int f\\((void|)\\);" \
+ "A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);" \
+ "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of B *
+
+ test_one_ptype "ptype pBe" "ptype pBe" \
+ "class B : public A \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "" "int b;" \
+ "public:" "virtual int f\\((void|)\\);" \
+ "B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);" \
+ "B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of D *
+
+ test_one_ptype "ptype pDd" "ptype pDd" \
+ "class D : public AD, public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "public:" "int d;" \
+ "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of D *
+
+ test_one_ptype "ptype pDe" "ptype pDe" \
+ "class D : public AD, public virtual V \{(${ws}private:|)" \
+ "V \\*(_vb.1V|_vb.V);" \
+ "public:" "int d;" \
+ "" "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);" \
+ "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of V *
+
+ test_one_ptype "ptype pVa" "ptype pVa" \
+ "class V : public VA, public VB \{${ws}public:" \
+ "" \
+ "" "int w;" \
+ "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of V *
+
+ test_one_ptype "ptype pVv" "ptype pVv" \
+ "class V : public VA, public VB \{${ws}public:" \
+ "" \
+ "" "int w;" \
+ "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of V *
+
+ test_one_ptype "ptype pVe" "ptype pVe" \
+ "class V : public VA, public VB \{${ws}public:" \
+ "" \
+ "" "int w;" \
+ "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of V *
+
+ test_one_ptype "ptype pVd" "ptype pVd" \
+ "class V : public VA, public VB \{${ws}public:" \
+ "" \
+ "" "int w;" \
+ "" "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of AD *
+
+ test_one_ptype "ptype pADe" "ptype pADe" \
+ "((struct|class) AD \{${ws}public:|struct AD \{)" \
+ "" \
+ "" "" \
+ "" "virtual int vg\\((void|)\\);" \
+ "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
+ "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of E *
+
+ test_one_ptype "ptype pEe" "ptype pEe" \
+ "class E : public B, public virtual V, public D, public C \{(${ws}private:|)" \
+ "" \
+ "public:" "int e;" \
+ "" "virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);" \
+ "E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);" \
+ "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\((void|)\\);" \
+ " ?\\*"
+
+ # An instance of VB *
+
+ test_one_ptype "ptype pVB" "ptype pVB" \
+ "((struct|class) VB \{${ws}public:|struct VB \{)" \
+ "" \
+ "" "int vb;" \
+ "" "int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);" \
+ "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
+ "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);" \
+ " ?\\*"
}
-#
-# Test calling of virtual functions.
-#
+# Call virtual functions.
proc test_virtual_calls {} {
global gdb_prompt
- global GDB
global nl
- global gcc_compiled
if [target_info exists gdb,cannot_call_functions] {
setup_xfail "*-*-*" 2416
@@ -742,207 +488,61 @@ proc test_virtual_calls {} {
return 0
}
- send_gdb "print pAe->f()\n"
- gdb_expect {
- -re ".* = 20$nl$gdb_prompt $" { pass "print pAe->f()" }
- -re "Cannot invoke functions on this machine.*$gdb_prompt $" {
- fail "print pAe->f() (cannot invoke functions, skipping virtual calls)"
- return 0
- }
- -re ".*Cannot access memory at address 0x8.*$gdb_prompt $" {
- fail "print pAe->f() \
-(known failure with gcc cygnus-2.4.5-930417, skipping virtual calls)"
- return 0
- }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pAe->f()"
- }
- -re ".*$gdb_prompt $" { fail "print pAe->f()" }
- timeout { fail "print pAe->f() (timeout)" }
- eof { fail "print pAe->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pAa->f()\n"
- gdb_expect {
- -re ".* = 1$nl$gdb_prompt $" { pass "print pAa->f()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pAa->f()"
- }
- -re ".*$gdb_prompt $" { fail "print pAa->f()" }
- timeout { fail "print pAa->f() (timeout)" }
- eof { fail "print pAa->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pDe->vg()\n"
- gdb_expect {
- -re ".* = 202$nl$gdb_prompt $" { pass "print pDe->vg()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pDe->vg()"
- }
- -re ".*$gdb_prompt $" { fail "print pDe->vg()" }
- timeout { fail "print pDe->vg() (timeout)" }
- eof { fail "print pDe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pADe->vg()\n"
- gdb_expect {
- -re ".* = 202$nl$gdb_prompt $" { pass "print pADe->vg()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pADe->vg()"
- }
- -re ".*$gdb_prompt $" { fail "print pADe->vg()" }
- timeout { fail "print pADe->vg() (timeout)" }
- eof { fail "print pADe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pDd->vg()\n"
- gdb_expect {
- -re ".* = 101$nl$gdb_prompt $" { pass "print pDd->vg()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pDd->vg()"
- }
- -re ".*$gdb_prompt $" { fail "print pDd->vg()" }
- timeout { fail "print pDd->vg() (timeout)" }
- eof { fail "print pDd->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pEe->vvb()\n"
- gdb_expect {
- -re ".* = 411$nl$gdb_prompt $" { pass "print pEe->vvb()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pEe->vvb()"
- }
- -re ".*$gdb_prompt $" { fail "print pEe->vvb()" }
- timeout { fail "print pEe->vvb() (timeout)" }
- eof { fail "print pEe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pVB->vvb()\n"
- gdb_expect {
- -re ".* = 407$nl$gdb_prompt $" { pass "print pVB->vvb()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pVB->vvb()"
- }
- -re ".*$gdb_prompt $" { fail "print pVB->vvb()" }
- timeout { fail "print pVB->vvb() (timeout)" }
- eof { fail "print pVB->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pBe->vvb()\n"
- gdb_expect {
- -re ".* = 411$nl$gdb_prompt $" { pass "print pBe->vvb()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pBe->vvb()"
- }
- -re ".*$gdb_prompt $" { fail "print pBe->vvb()" }
- timeout { fail "print pBe->vvb() (timeout)" }
- eof { fail "print pBe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pDe->vvb()\n"
- gdb_expect {
- -re ".* = 411$nl$gdb_prompt $" { pass "print pDe->vvb()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pDe->vvb()"
- }
- -re ".*$gdb_prompt $" { fail "print pDe->vvb()" }
- timeout { fail "print pDe->vvb() (timeout)" }
- eof { fail "print pDe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
+ gdb_test "print pAe->f()" "\\$\[0-9\]+ = 20"
+ gdb_test "print pAa->f()" "\\$\[0-9\]+ = 1"
+ gdb_test "print pDe->vg()" "\\$\[0-9\]+ = 202"
+ gdb_test "print pADe->vg()" "\\$\[0-9\]+ = 202"
+ gdb_test "print pDd->vg()" "\\$\[0-9\]+ = 101"
+ gdb_test "print pEe->vvb()" "\\$\[0-9\]+ = 411"
+ gdb_test "print pVB->vvb()" "\\$\[0-9\]+ = 407"
+ gdb_test "print pBe->vvb()" "\\$\[0-9\]+ = 411"
+ gdb_test "print pDe->vvb()" "\\$\[0-9\]+ = 411"
+ gdb_test "print pEe->vd()" "\\$\[0-9\]+ = 282"
+ gdb_test "print pEe->fvb()" "\\$\[0-9\]+ = 311"
+
+ # more recent results:
+ # wrong value "202"
+ # gcc 2.95.3 -gdwarf-2
+ # gcc 2.95.3 -gstabs+
+ # attempt to take addres of value not located in memory
+ # gcc 3.3.2 -gdwarf-2
+ # gcc 3.3.2 -gstabs+
+ #
+ # -- chastain 2003-12-31
- send_gdb "print pEe->vd()\n"
- gdb_expect {
- -re ".* = 282$nl$gdb_prompt $" { pass "print pEe->vd()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pEe->vd()"
+ gdb_test_multiple "print pEe->D::vg()" "print pEe->D::vg()" {
+ -re "\\$\[0-9]+ = 102$nl$gdb_prompt $" {
+ pass "print pEe->D::vg()"
}
- -re ".*$gdb_prompt $" { fail "print pEe->vd()" }
- timeout { fail "print pEe->vd() (timeout)" }
- eof { fail "print pEe->vd() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pEe->fvb()\n"
- gdb_expect {
- -re ".* = 311$nl$gdb_prompt $" { pass "print pEe->fvb()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pEe->fvb()"
+ -re "Attempt to take address of value not located in memory.$nl$gdb_prompt $" {
+ kfail "gdb/1064" "print pEe->D::vg()"
}
- -re ".*$gdb_prompt $" { fail "print pEe->fvb()" }
- timeout { fail "print pEe->fvb() (timeout)" }
- eof { fail "print pEe->fvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=2.95.3, goption=-gdwarf-2.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=2.95.3, goption=-gstabs+.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=3.0.3, goption=-gdwarf-2.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=3.0.3, goption=-gstabs+.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=3.0.4-20020215, goption=-gdwarf-2.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=3.0.4-20020215, goption=-gstabs+.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=gcc-3_0-branch%2002-02-16, goption=-gdwarf-2.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=gcc-3_0-branch%2002-02-16, goption=-gstabs+.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=HEAD%2002-02-16, goption=-gdwarf-2.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=HEAD%2002-02-16, goption=-gstabs+.
- #
- # -- chastain 2002-02-20
-
- send_gdb "print pEe->D::vg()\n"
- gdb_expect {
- -re ".* = 102$nl$gdb_prompt $" { pass "print pEe->D::vg()" }
- -re "Attempt to take address of value not located in memory.\r\n$gdb_prompt $"
- { kfail "gdb/1064" "print pEe->D::vg()" }
- -re ".*$gdb_prompt $" { fail "print pEe->D::vg()" }
- timeout { fail "print pEe->D::vg() (timeout)" }
- eof { fail "print pEe->D::vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
}
}
proc do_tests {} {
global prms_id
global bug_id
+ global srcdir subdir binfile
+ global gdb_prompt
set prms_id 0
set bug_id 0
- gdb_start;
- gdb_virtfunc_init;
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load $binfile
- runto_main
+ gdb_test "set language c++" "" ""
+ gdb_test "set width 0" "" ""
+ runto_main
test_ptype_of_classes
- if [ runto 'test_calls' ] then {
- test_virtual_calls
- }
+ gdb_breakpoint test_calls
+ gdb_test "continue" ".*Breakpoint .* test_calls.*" ""
+ test_virtual_calls
}
do_tests
diff --git a/gdb/testsuite/gdb.disasm/mn10200.exp b/gdb/testsuite/gdb.disasm/mn10200.exp
deleted file mode 100644
index a47b341545f..00000000000
--- a/gdb/testsuite/gdb.disasm/mn10200.exp
+++ /dev/null
@@ -1,478 +0,0 @@
-# OBSOLETE
-# OBSOLETE # Copyright 1997 Free Software Foundation, Inc.
-# OBSOLETE
-# OBSOLETE # This program is free software; you can redistribute it and/or modify
-# OBSOLETE # it under the terms of the GNU General Public License as published by
-# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
-# OBSOLETE # (at your option) any later version.
-# OBSOLETE #
-# OBSOLETE # This program is distributed in the hope that it will be useful,
-# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
-# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# OBSOLETE # GNU General Public License for more details.
-# OBSOLETE #
-# OBSOLETE # You should have received a copy of the GNU General Public License
-# OBSOLETE # along with this program; if not, write to the Free Software
-# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# OBSOLETE
-# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
-# OBSOLETE # bug-gdb@prep.ai.mit.edu
-# OBSOLETE
-# OBSOLETE # This file was written by Jeff Law. (law@cygnus.com)
-# OBSOLETE
-# OBSOLETE if $tracelevel then {
-# OBSOLETE strace $tracelevel
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE if ![istarget "mn10200*-*-*"] {
-# OBSOLETE verbose "Tests ignored for all but mn10200 based targets."
-# OBSOLETE return
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE global exec_output
-# OBSOLETE set prms_id 0
-# OBSOLETE set bug_id 0
-# OBSOLETE
-# OBSOLETE set testfile "mn10200"
-# OBSOLETE set srcfile ${srcdir}/${subdir}/${testfile}.s
-# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}
-# OBSOLETE if { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
-# OBSOLETE gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc add_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/12i add_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*add d1,d2.*
-# OBSOLETE .*add d2,a3.*
-# OBSOLETE .*add a2,d1.*
-# OBSOLETE .*add a3,a2.*
-# OBSOLETE .*add 16,d1.*
-# OBSOLETE .*add 256,d2.*
-# OBSOLETE .*add 131071,d3.*
-# OBSOLETE .*add 16,a1.*
-# OBSOLETE .*add 256,a2.*
-# OBSOLETE .*add 131071,a3.*
-# OBSOLETE .*addc d1,d2.*
-# OBSOLETE .*addnf 16,a2.*
-# OBSOLETE .*$gdb_prompt $" { pass "add tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "add tests" }
-# OBSOLETE timeout { fail "(timeout) add tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc bcc_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/15i bCC_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*beq 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bne 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bgt 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bge 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*ble 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*blt 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bhi 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bcc 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bls 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bcs 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bvc 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bvs 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bnc 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bns 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bra 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*$gdb_prompt $" { pass "bCC tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "bCC tests" }
-# OBSOLETE timeout { fail "(timeout) bCC tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc bccx_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/14i bCCx_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*beqx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bnex 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bgtx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bgex 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*blex 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bltx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bhix 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bccx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*blsx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bcsx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bvcx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bvsx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bncx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bnsx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*$gdb_prompt $" { pass "bCCx tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "bCCx tests" }
-# OBSOLETE timeout { fail "(timeout) bCCx tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc bit_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/4 bit_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*btst 64,d1.*
-# OBSOLETE .*btst 8192,d2.*
-# OBSOLETE .*bset d1,\\(a2\\).*
-# OBSOLETE .*bclr d1,\\(a2\\).*
-# OBSOLETE .*$gdb_prompt $" { pass "bit tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "bit tests" }
-# OBSOLETE timeout { fail "(timeout) bit tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc cmp_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/9i cmp_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*cmp d1,d2.*
-# OBSOLETE .*cmp d2,a3.*
-# OBSOLETE .*cmp a3,d3.*
-# OBSOLETE .*cmp a3,a2.*
-# OBSOLETE .*cmp 16,d3.*
-# OBSOLETE .*cmp 256,d2.*
-# OBSOLETE .*cmp 131071,d1.*
-# OBSOLETE .*cmp 256,a2.*
-# OBSOLETE .*cmp 131071,a1.*
-# OBSOLETE .*$gdb_prompt $" { pass "cmp tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "cmp tests" }
-# OBSOLETE timeout { fail "(timeout) cmp tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc extend_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/5i extend_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*ext d1.*
-# OBSOLETE .*extx d2.*
-# OBSOLETE .*extxu d3.*
-# OBSOLETE .*extxb d2.*
-# OBSOLETE .*extxbu d1.*
-# OBSOLETE .*$gdb_prompt $" { pass "extend tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "extend tests" }
-# OBSOLETE timeout { fail "(timeout) extend tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc logical_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/11i logical_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*and d1,d2.*
-# OBSOLETE .*and 127,d2.*
-# OBSOLETE .*and 32767,d3.*
-# OBSOLETE .*and 32767,psw.*
-# OBSOLETE .*or d1,d2.*
-# OBSOLETE .*or 127,d2.*
-# OBSOLETE .*or 32767,d3.*
-# OBSOLETE .*or 32767,psw.*
-# OBSOLETE .*xor d1,d2.*
-# OBSOLETE .*xor 32767,d3.*
-# OBSOLETE .*not d3.*
-# OBSOLETE .*$gdb_prompt $" { pass "logical tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "logical tests" }
-# OBSOLETE timeout { fail "(timeout) logical tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc mov_tests_1 { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/12i mov_tests_1\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*mov d1,a2.*
-# OBSOLETE .*mov a2,d1.*
-# OBSOLETE .*mov d1,d2.*
-# OBSOLETE .*mov a2,a1.*
-# OBSOLETE .*mov psw,d3.*
-# OBSOLETE .*mov d2,psw.*
-# OBSOLETE .*mov mdr,d1.*
-# OBSOLETE .*mov d2,mdr.*
-# OBSOLETE .*mov \\(a2\\),d1.*
-# OBSOLETE .*mov \\(8,a2\\),d1.*
-# OBSOLETE .*mov \\(256,a2\\),d1.*
-# OBSOLETE .*mov \\(131071,a2\\),d1.*
-# OBSOLETE .*$gdb_prompt $" { pass "mov1 tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "mov1 tests" }
-# OBSOLETE timeout { fail "(timeout) mov1 tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc mov_tests_2 { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/9 mov_tests_2\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*mov \\(d1,a1\\),d2.*
-# OBSOLETE .*mov \\(0x8000.*\\),d1.*
-# OBSOLETE .*mov \\(0x1ffff.*\\),d1.*
-# OBSOLETE .*mov \\(8,a2\\),a1.*
-# OBSOLETE .*mov \\(256,a2\\),a1.*
-# OBSOLETE .*mov \\(131071,a2\\),a1.*
-# OBSOLETE .*mov \\(d1,a1\\),a2.*
-# OBSOLETE .*mov \\(0x8000.*\\),a1.*
-# OBSOLETE .*mov \\(0x1ffff.*\\),a1.*
-# OBSOLETE .*$gdb_prompt $" { pass "mov2 tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "mov2 tests" }
-# OBSOLETE timeout { fail "(timeout) mov2 tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc mov_tests_3 { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/10 mov_tests_3\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*mov d1,\\(a2\\).*
-# OBSOLETE .*mov d1,\\(32,a2\\).*
-# OBSOLETE .*mov d1,\\(256,a2\\).*
-# OBSOLETE .*mov d1,\\(131071,a2\\).*
-# OBSOLETE .*mov d1,\\(d2,a2\\).*
-# OBSOLETE .*mov d1,\\(0x80.*\\).*
-# OBSOLETE .*mov d1,\\(0x1ffff.*\\).*
-# OBSOLETE .*mov a1,\\(32,a2\\).*
-# OBSOLETE .*mov a1,\\(256,a2\\).*
-# OBSOLETE .*mov a1,\\(131071,a2\\).*
-# OBSOLETE .*$gdb_prompt $" { pass "mov3 tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "mov3 tests" }
-# OBSOLETE timeout { fail "(timeout) mov3 tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc mov_tests_4 { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/8 mov_tests_4\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*mov a1,\\(d2,a2\\).*
-# OBSOLETE .*mov a1,\\(0x80.*\\).*
-# OBSOLETE .*mov a1,\\(0x1ffff.*\\).*
-# OBSOLETE .*mov 8,d1.*
-# OBSOLETE .*mov 256,d1.*
-# OBSOLETE .*mov 131071,d1.*
-# OBSOLETE .*mov 256,a1.*
-# OBSOLETE .*mov 131071,a1.*
-# OBSOLETE .*$gdb_prompt $" { pass "mov4 tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "mov4 tests" }
-# OBSOLETE timeout { fail "(timeout) mov4 tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc movb_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/12 movb_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*movb \\(8,a2\\),d1.*
-# OBSOLETE .*movb \\(256,a2\\),d1.*
-# OBSOLETE .*movb \\(131071,a2\\),d1.*
-# OBSOLETE .*movb \\(d2,a2\\),d3.*
-# OBSOLETE .*movb \\(0x1ffff.*\\),d2.*
-# OBSOLETE .*movb d1,\\(a2\\).*
-# OBSOLETE .*movb d1,\\(8,a2\\).*
-# OBSOLETE .*movb d1,\\(256,a2\\).*
-# OBSOLETE .*movb d1,\\(131071,a2\\).*
-# OBSOLETE .*movb d1,\\(d2,a2\\).*
-# OBSOLETE .*movb d1,\\(0x100.*\\).*
-# OBSOLETE .*movb d1,\\(0x1ffff.*\\).*
-# OBSOLETE .*$gdb_prompt $" { pass "movb tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "movb tests" }
-# OBSOLETE timeout { fail "(timeout) movb tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc movbu_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/7 movbu_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*movbu \\(a2\\),d1.*
-# OBSOLETE .*movbu \\(8,a2\\),d1.*
-# OBSOLETE .*movbu \\(256,a2\\),d1.*
-# OBSOLETE .*movbu \\(131071,a2\\),d1.*
-# OBSOLETE .*movbu \\(d1,a1\\),d2.*
-# OBSOLETE .*movbu \\(0x8000.*\\),d1.*
-# OBSOLETE .*movbu \\(0x1ffff.*\\),d1.*
-# OBSOLETE .*$gdb_prompt $" { pass "movbu tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "movbu tests" }
-# OBSOLETE timeout { fail "(timeout) movbu tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc movx_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/6 movx_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*movx \\(8,a2\\),d1.*
-# OBSOLETE .*movx \\(256,a2\\),d1.*
-# OBSOLETE .*movx \\(131071,a2\\),d1.*
-# OBSOLETE .*movx d1,\\(8,a2\\).*
-# OBSOLETE .*movx d1,\\(256,a2\\).*
-# OBSOLETE .*movx d1,\\(131071,a2\\).*
-# OBSOLETE .*$gdb_prompt $" { pass "movx tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "movx tests" }
-# OBSOLETE timeout { fail "(timeout) movx tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc muldiv_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/3 muldiv_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*mul d1,d2.*
-# OBSOLETE .*mulu d2,d3.*
-# OBSOLETE .*divu d3,d2.*
-# OBSOLETE .*$gdb_prompt $" { pass "muldiv tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "muldiv tests" }
-# OBSOLETE timeout { fail "(timeout) muldiv tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc misc_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/9 misc_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*jmp 0x\[0-9a-f]+ <main>.*
-# OBSOLETE .*jmp 0x\[0-9a-f]+ <start>.*
-# OBSOLETE .*jmp \\(a2\\).*
-# OBSOLETE .*jsr 0x\[0-9a-f]+ <main>.*
-# OBSOLETE .*jsr 0x\[0-9a-f]+ <start>.*
-# OBSOLETE .*jsr \\(a2\\).*
-# OBSOLETE .*rts.*
-# OBSOLETE .*rti.*
-# OBSOLETE .*nop.*
-# OBSOLETE .*$gdb_prompt $" { pass "misc tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "misc tests" }
-# OBSOLETE timeout { fail "(timeout) misc tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc shift_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/4i shift_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*asr d2.*
-# OBSOLETE .*lsr d3.*
-# OBSOLETE .*ror d1.*
-# OBSOLETE .*rol d2.*
-# OBSOLETE .*$gdb_prompt $" { pass "shift tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "shift tests" }
-# OBSOLETE timeout { fail "(timeout) shift tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc sub_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/9i sub_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*sub d1,d2.*
-# OBSOLETE .*sub d2,a3.*
-# OBSOLETE .*sub a3,d3.*
-# OBSOLETE .*sub a3,a2.*
-# OBSOLETE .*sub 32767,d2.*
-# OBSOLETE .*sub 131071,d2.*
-# OBSOLETE .*sub 32767,a2.*
-# OBSOLETE .*sub 131071,a2.*
-# OBSOLETE .*subc d1,d2.*
-# OBSOLETE .*$gdb_prompt $" { pass "sub tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "sub tests" }
-# OBSOLETE timeout { fail "(timeout) sub tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE # Start with a fresh gdb.
-# OBSOLETE
-# OBSOLETE gdb_exit
-# OBSOLETE gdb_start
-# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
-# OBSOLETE gdb_load $binfile
-# OBSOLETE
-# OBSOLETE add_tests
-# OBSOLETE bcc_tests
-# OBSOLETE bccx_tests
-# OBSOLETE bit_tests
-# OBSOLETE cmp_tests
-# OBSOLETE extend_tests
-# OBSOLETE logical_tests
-# OBSOLETE mov_tests_1
-# OBSOLETE mov_tests_2
-# OBSOLETE mov_tests_3
-# OBSOLETE mov_tests_4
-# OBSOLETE movb_tests
-# OBSOLETE movbu_tests
-# OBSOLETE movx_tests
-# OBSOLETE muldiv_tests
-# OBSOLETE misc_tests
-# OBSOLETE shift_tests
-# OBSOLETE sub_tests
diff --git a/gdb/testsuite/gdb.disasm/sh3.s b/gdb/testsuite/gdb.disasm/sh3.s
index 8bab256901c..e5969f5ea1a 100644
--- a/gdb/testsuite/gdb.disasm/sh3.s
+++ b/gdb/testsuite/gdb.disasm/sh3.s
@@ -1,7 +1,7 @@
.file "test.c"
.data
-! Hitachi SH cc1 (cygnus-2.7.1-950728) arguments: -O -fpeephole
+! Renesas SH cc1 (cygnus-2.7.1-950728) arguments: -O -fpeephole
! -ffunction-cse -freg-struct-return -fdelayed-branch -fcommon -fgnu-linker
gcc2_compiled.:
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/exception.cc b/gdb/testsuite/gdb.hp/gdb.aCC/exception.cc
deleted file mode 100644
index 27459329a8b..00000000000
--- a/gdb/testsuite/gdb.hp/gdb.aCC/exception.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Test file for exception handling support.
-
-#include <iostream.h>
-
-int foo (int i)
-{
- if (i < 32)
- throw (int) 13;
- else
- return i * 2;
-}
-
-extern "C" int bar (int k, unsigned long eharg, int flag);
-
-int bar (int k, unsigned long eharg, int flag)
-{
- cout << "k is " << k << " eharg is " << eharg << " flag is " << flag << endl;
- return 1;
-}
-
-int main()
-{
- int j;
-
- try {
- j = foo (20);
- }
- catch (int x) {
- cout << "Got an except " << x << endl;
- }
-
- try {
- try {
- j = foo (20);
- }
- catch (int x) {
- cout << "Got an except " << x << endl;
- throw;
- }
- }
- catch (int y) {
- cout << "Got an except (rethrown) " << y << endl;
- }
-
- // Not caught
- foo (20);
-
-}
diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/exception.exp b/gdb/testsuite/gdb.hp/gdb.aCC/exception.exp
index a0914ae5ba4..85b0136399e 100644
--- a/gdb/testsuite/gdb.hp/gdb.aCC/exception.exp
+++ b/gdb/testsuite/gdb.hp/gdb.aCC/exception.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+# Copyright 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,423 +17,9 @@
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
-#
-# tests for exception-handling support
-# Written by Satish Pai <pai@apollo.hp.com> 1997-07-23
-
-# This file is part of the gdb testsuite
-
-# Note: These tests are geared to the HP aCC compiler,
-# which has an idiosyncratic way of emitting debug info
-# for exceptions -- it uses a callback mechanism, which
-# is different from the way g++ records exception info
-# for debugging
-
-# The tests are in two parts; the first part deals with
-# statically linked (archive-bound) executables, and the
-# second part repeats those tests with dynamically linked
-# (shared bound) executables. (In the latter case we use
-# a different mechanism to get the address of the notification
-# hook in the C++ support library.) The tests themselves are
-# the same in both parts.
-#
-# IMPORTANT:
-# ---------
-# IF YOU CHANGE A TEST IN ONE PART MAKE SURE YOU CHANGE IT
-# --------------------------------------------------------
-# IN THE OTHER PART TOO!
-# ----------------------
-
-
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-if { [skip_hp_tests] } then { continue }
-
-#
-# test running programs
-#
-
-# Part I : Archive-bound executables
-# ----------------------------------
-
-set testfile "exception"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1;
-}
-
-
-if { $gcc_compiled } then { continue }
-
-set cmdline "$CXX_FOR_TARGET ${srcdir}/${subdir}/${srcfile} +A -Wl,-a,archive -g -o ${binfile}"
-
-remote_exec build $cmdline
-
-# Start with a fresh gdb
-
-set prms_id 0
-set bug_id 0
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-# Set a catch catchpoint
-
-send_gdb "catch catch\n"
-gdb_expect {
- -re "Catchpoint \[0-9\]* \\(catch\\)\r\n$gdb_prompt $" {
- pass "catch catch (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "catch catch (static executable)" }
- timeout { fail "(timeout) catch catch (static executable)" }
-}
-
-# Set a throw catchpoint
-
-send_gdb "catch throw\n"
-gdb_expect {
- -re "Catchpoint \[0-9\]* \\(throw\\)\r\n$gdb_prompt $" {
- pass "catch throw (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "catch throw (static executable)" }
- timeout { fail "(timeout) catch throw (static executable)" }
-}
-
-# The catchpoints should be listed in the list of breakpoints.
-
-send_gdb "info break\n"
-gdb_expect {
- -re ".*\[0-9\]*\[ \]*catch catch\[ \]*keep y\[ \]*exception catch\[ \]*\r\n\[0-9\]*\[ \]*catch throw\[ \]*keep y\[ \]*exception throw\[ \]*\r\n$gdb_prompt $" {
- pass "info break with catchpoints (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "info break (static executable)" }
- timeout { fail "(timeout) info break (static executable)" }
-}
-
-# Info catch currently does not work with HP aCC. No easy way to
-# list the active handlers on the stack.
-
-send_gdb "info catch\n"
-gdb_expect {
- -re "Info catch not supported with this target/compiler combination.\r\n$gdb_prompt $" {
- pass "info catch (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "info catch (static executable)" }
- timeout { fail "(timeout) info catch (static executable)" }
-}
-
-# Get the first exception thrown
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing.*Catchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:28\r\n.*$gdb_prompt $" {
- pass "caught a throw (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a throw (static executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a throw? (static executable)" }
-}
-
-send_gdb "backtrace\n"
-gdb_expect {
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_THROW.*\r\n#2\[ \]*$hex in __eh_notify_throw.*\r\n#3\[ \]*$hex in foo \\(i=20\\) at .*exception\\.cc:8\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:26\r\n$gdb_prompt $" {
- pass "backtrace after throw (static executable)"
- }
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n#2\[ \]*$hex in __eh_notify_throw.*\r\n#3\[ \]*$hex in foo \\(i=20\\) at .*exception\\.cc:8\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:26\r\n$gdb_prompt $" {
- pass "backtrace after throw (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "backtrace after throw (static executable)" }
- timeout { fail "(timeout) backtrace after throw (static executable)" }
-}
-
-# Now intercept it when it is caught.
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:28\r\n.*$gdb_prompt $" {
- pass "caught a catch (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a catch (static executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a catch? (static executable)" }
-}
-
-send_gdb "backtrace\n"
-gdb_expect {
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_CATCH.*\r\n.*\r\n#3\[ \]*$hex in __throw__.*\r\n#4\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#5\[ \]*$hex in main.* at .*exception.cc:26\r\n$gdb_prompt $" {
- pass "backtrace after catch (static executable)"
- }
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n.*\r\n#3\[ \]*$hex in __throw__.*\r\n#4\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#5\[ \]*$hex in main.* at .*exception.cc:26\r\n$gdb_prompt $" {
- pass "backtrace after catch (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "backtrace after catch (static executable)" }
- timeout { fail "(timeout) backtrace after catch (static executable)" }
-}
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:36\r\n.*$gdb_prompt $" {
- pass "caught a throw (2) (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a throw (2) (static executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a throw (2)? (static executable)" }
-}
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:36\r\n.*$gdb_prompt $" {
- pass "caught a catch (2) (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a catch (2) (static executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a catch (2)? (static executable)" }
-}
-
-# Now the exception will be rethrown.
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:38, catch location .*exception\\.cc:41\r\n.*$gdb_prompt $" {
- pass "caught a rethrow (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a rethrow (static executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a rethrow? (static executable)" }
-}
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:3\[68\], catch location .*exception\\.cc:41\r\n.*$gdb_prompt $" {
- # FIXME: guo: why XFAIL? need comment
- xfail "caught a catch (3) (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a catch (3) (static executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a catch (3)? (static executable)" }
-}
-
-send_gdb "backtrace\n"
-gdb_expect {
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_CATCH.*\r\n.*\r\n#3\[ \]*$hex in __rethrow.*\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:3\[68\]\r\n#5\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#6\[ \]*$hex in main.* at .*exception.cc:34\r\n$gdb_prompt $" {
- # FIXME: guo: why XFAIL? need comment
- xfail "backtrace after catch (3) (static executable)"
- }
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n.*\r\n#3\[ \]*$hex in __rethrow.*\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:3\[68\]\r\n#5\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#6\[ \]*$hex in main.* at .*exception.cc:34\r\n$gdb_prompt $" {
- # FIXME: guo: why XFAIL? need comment
- xfail "backtrace after catch (3) (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "backtrace after catch (3) (static executable)" }
- timeout { fail "(timeout) backtrace after catch (3) (static executable)" }
-}
-
-# Now the exception will be thrown, but not catch-able anywhere.
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location unknown\r\n.*$gdb_prompt $" {
- pass "caught an uncatchable throw (static executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch an uncatchable throw (static executable)" }
- timeout { fail "(timeout) after continue -- didn't catch an uncatchable throw? (static executable)" }
-}
-
-# Part II : Shared-bound executables
-# ----------------------------------
-
-# Start with a fresh gdb
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-set prms_id 0
-set bug_id 0
-
-set testfile "exception"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will a
-utomatically fail."
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-# Set a catch catchpoint
-
-send_gdb "catch catch\n"
-gdb_expect {
- -re "Catchpoint \[0-9\]* \\(catch\\)\r\n$gdb_prompt $" {
- pass "catch catch (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "catch catch (dynamic executable)" }
- timeout { fail "(timeout) catch catch (dynamic executable)" }
-}
-
-# Set a throw catchpoint
-
-send_gdb "catch throw\n"
-gdb_expect {
- -re "Catchpoint \[0-9\]* \\(throw\\)\r\n$gdb_prompt $" {
- pass "catch throw (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "catch throw (dynamic executable)" }
- timeout { fail "(timeout) catch throw (dynamic executable)" }
-}
-
-# The catchpoints should be listed in the list of breakpoints.
-
-send_gdb "info break\n"
-gdb_expect {
- -re ".*\[0-9\]*\[ \]*catch catch\[ \]*keep y\[ \]*exception catch\[ \]*\r\n\[0-9\]*\[ \]*catch throw\[ \]*keep y\[ \]*exception throw\[ \]*\r\n$gdb_prompt $" {
- pass "info break with catchpoints (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "info break (dynamic executable)" }
- timeout { fail "(timeout) info break (dynamic executable)" }
-}
-
-# Info catch currently does not work with HP aCC. No easy way to
-# list the active handlers on the stack.
-
-send_gdb "info catch\n"
-gdb_expect {
- -re "Info catch not supported with this target/compiler combination.\r\n$gdb_prompt $" {
- pass "info catch (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "info catch (dynamic executable)" }
- timeout { fail "(timeout) info catch (dynamic executable)" }
-}
-
-# Get the first exception thrown
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing.*Catchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:28\r\n.*$gdb_prompt $" {
- pass "caught a throw (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a throw (dynamic executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a throw? (dynamic executable)" }
-}
-
-send_gdb "backtrace\n"
-gdb_expect {
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_THROW.*\r\n#2\[ \]*$hex in __eh_notify_throw.*\r\n#3\[ \]*$hex in foo \\(i=20\\) at .*exception\\.cc:8\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:26\r\n$gdb_prompt $" {
- pass "backtrace after throw (dynamic executable)"
- }
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n#2\[ \]*$hex in __eh_notify_throw.*\r\n#3\[ \]*$hex in foo \\(i=20\\) at .*exception\\.cc:8\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:26\r\n$gdb_prompt $" {
- pass "backtrace after throw (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "backtrace after throw (dynamic executable)" }
- timeout { fail "(timeout) backtrace after throw (dynamic executable)" }
-}
-
-# Now intercept it when it is caught.
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:28\r\n.*$gdb_prompt $" {
- pass "caught a catch (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a catch (dynamic executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a catch? (dynamic executable)" }
-}
-
-send_gdb "backtrace\n"
-gdb_expect {
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_CATCH.*\r\n.*\r\n#3\[ \]*$hex in __throw__.*\r\n#4\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#5\[ \]*$hex in main.* at .*exception.cc:26\r\n$gdb_prompt $" {
- pass "backtrace after catch (dynamic executable)"
- }
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n.*\r\n#3\[ \]*$hex in __throw__.*\r\n#4\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#5\[ \]*$hex in main.* at .*exception.cc:26\r\n$gdb_prompt $" {
- pass "backtrace after catch (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "backtrace after catch (dynamic executable)" }
- timeout { fail "(timeout) backtrace after catch (dynamic executable)" }
-}
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:36\r\n.*$gdb_prompt $" {
- pass "caught a throw (2) (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a throw (2) (dynamic executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a throw (2)? (dynamic executable)" }
-}
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:8, catch location .*exception\\.cc:36\r\n.*$gdb_prompt $" {
- pass "caught a catch (2) (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a catch (2) (dynamic executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a catch (2)? (dynamic executable)" }
-}
-
-# Now the exception will be rethrown.
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:38, catch location .*exception\\.cc:41\r\n.*$gdb_prompt $" {
- pass "caught a rethrow (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a rethrow (dynamic executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a rethrow? (dynamic executable)" }
-}
-
-#DTS CLLbs14858
-#The throw location should be at line 38 instead of 36.
-setup_xfail hppa*-*-* CLLbs14858
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing.*Catchpoint \[0-9\]* \\(exception caught\\), throw location.*exception\\.cc:3\[68\], catch location .*exception\\.cc:41\r\n.*$gdb_prompt $" {
- # FIXME: guo: according to comment above the RE is wrong!
- pass "caught a catch (3) (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch a catch (3) (dynamic executable)" }
- timeout { fail "(timeout) after continue -- didn't catch a catch (3)? (dynamic executable)" }
-}
-
-#DTS CLLbs14858
-#The line number for main() should be at exception.cc:38 instead of exception.cc:36
-setup_xfail hppa*-*-* CLLbs14858
-send_gdb "backtrace\n"
-gdb_expect {
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=__EH_NOTIFY_CATCH.*\r\n.*\r\n#3\[ \]*$hex in __rethrow.*\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:3\[68\]\r\n#5\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#6\[ \]*$hex in main.* at .*exception.cc:34\r\n$gdb_prompt $" {
- # FIXME: guo: according to comment above the RE is wrong!
- pass "backtrace after catch (3) (dynamic executable)"
- }
- -re "#0\[ \]*__d_eh_break.*\r\n#1\[ \]*$hex in __d_eh_notify_callback \\(eh_type=\[0-9\].*\r\n.*\r\n#3\[ \]*$hex in __rethrow.*\r\n#4\[ \]*$hex in main.* at .*exception\\.cc:3\[68\]\r\n#5\[ \]*$hex in foo \\(i=20\\) at .*exception.cc:8\r\n#6\[ \]*$hex in main.* at .*exception.cc:34\r\n$gdb_prompt $" {
- # FIXME: guo: according to comment above the RE is wrong!
- pass "backtrace after catch (3) (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "backtrace after catch (3) (dynamic executable)" }
- timeout { fail "(timeout) backtrace after catch (3) (dynamic executable)" }
-}
-
-# Now the exception will be thrown, but not catch-able anywhere.
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing\\.\r\nGot.*\r\nCatchpoint \[0-9\]* \\(exception thrown\\), throw location.*exception\\.cc:8, catch location unknown\r\n.*$gdb_prompt $" {
- pass "caught an uncatchable throw (dynamic executable)"
- }
- -re ".*$gdb_prompt $" { fail "didn't catch an uncatchable throw (dynamic executable)" }
- timeout { fail "(timeout) after continue -- didn't catch an uncatchable throw? (dynamic executable)" }
-}
+# This file exists because the configure script requires it to exist.
+# It would be nice to regenerate the configure script. I can't do it
+# because I don't have autoconf 2.12.1, which is used to build it.
+# -- chastain 2004-01-09
+continue
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp b/gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp
deleted file mode 100644
index ef249516bd6..00000000000
--- a/gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright (C) 1992 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-# Test case for CLLbs15503
-# This file was written by Sue Kimura (sue_kimura@hp.com)
-
-if $tracelevel {
- strace $tracelevel
-}
-
-if { [skip_hp_tests] } { continue }
-
-set testfile "bs15503"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info ${binfile}] {
- return -1
-}
-
-# The testcode is non-conforming and rejected by GCC. So bypass this
-# test completely unless we're compiling with HP's compiler.
-if {!$hp_aCC_compiler && !$hp_cc_compiler} {
- return 0
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug c++"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-# Load $binfile -- there should be no warnings about "Procedure ... spans
-# file or module boundaries", "No symbols in psymtab for file ..." or
-# "File ... has ending address after starting address of next file..."
-
-if [istarget "hppa64-hp-hpux*" ] {
- gdb_test "file $binfile" \
- "Detected 64-bit executable..*Invoking .*gdb64..*Use \"run\" to continue execution." \
- "loading $binfile"
-} else {
- gdb_test "file $binfile" \
- "Reading symbols from $binfile...done." \
- "loading $binfile"
-}
-# Test setting breakpoint on template function
-#
-gdb_test "break StringTest<wchar_t>::testFunction" \
- "Breakpoint $decimal at $hex: file .*bs15503.cc, line 19." \
- "break point on function"
-
-gdb_test "run" \
- "Starting program:.*Breakpoint $decimal, StringTest<wchar_t>::testFunction \\(this=$hex\\).*cout << \"in StringTest\" << endl;.*" \
- "run to function breakpoint"
-
-#restart with fresh gdb
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
-
-gdb_test "break 32" \
- "Breakpoint $decimal at $hex: file .*bs15503.cc, line 32." \
- "break point on line in function"
-
-gdb_test "run" \
- ".*32.*string::size_type spos = s.find\\(\"and\"\\);.*" \
- "run to break point on line in function"
diff --git a/gdb/testsuite/gdb.java/jmisc.exp b/gdb/testsuite/gdb.java/jmisc.exp
index 8f6c6fbc2b7..9fd220ff307 100644
--- a/gdb/testsuite/gdb.java/jmisc.exp
+++ b/gdb/testsuite/gdb.java/jmisc.exp
@@ -66,7 +66,9 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_test "set print sevenbit-strings" ".*"
if ![set_lang_java] then {
- runto ${testfile}.main
+ # Ref PR gdb:java/1565. Don't use the simpler "break jmisc.main".
+ # As of 2004-02-24 it wasn't working and is being tested separatly.
+ runto "\'${testfile}.main(java.lang.String\[\])\'"
send_gdb "ptype jmisc\n"
gdb_expect {
diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog-1999-2003
index 6f263c33056..6f263c33056 100644
--- a/gdb/testsuite/gdb.mi/ChangeLog
+++ b/gdb/testsuite/gdb.mi/ChangeLog-1999-2003
diff --git a/gdb/testsuite/gdb.mi/gdb669.exp b/gdb/testsuite/gdb.mi/gdb669.exp
index d03ce35293c..4bdcdab7a88 100644
--- a/gdb/testsuite/gdb.mi/gdb669.exp
+++ b/gdb/testsuite/gdb.mi/gdb669.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -176,7 +176,7 @@ proc check_mi_and_console_threads {name} {
#
set testfile "pthreads"
set srcfile "$testfile.c"
-set binfile "$objdir/$subdir/$testfile"
+set binfile "$objdir/$subdir/gdb669-$testfile"
set options [list debug incdir=$objdir]
if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
diff --git a/gdb/testsuite/gdb.mi/mi-pthreads.exp b/gdb/testsuite/gdb.mi/mi-pthreads.exp
index 532134acc04..be1864798fc 100644
--- a/gdb/testsuite/gdb.mi/mi-pthreads.exp
+++ b/gdb/testsuite/gdb.mi/mi-pthreads.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -205,7 +205,7 @@ proc check_mi_thread_command_set {} {
#
set testfile "pthreads"
set srcfile "$testfile.c"
-set binfile "$objdir/$subdir/$testfile"
+set binfile "$objdir/$subdir/mi-$testfile"
set options [list debug incdir=$objdir]
if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp
index 92c651df89b..966a86dc7ff 100644
--- a/gdb/testsuite/gdb.mi/mi-stack.exp
+++ b/gdb/testsuite/gdb.mi/mi-stack.exp
@@ -1,4 +1,4 @@
-# Copyright 2000, 2002 Free Software Foundation, Inc.
+# Copyright 2000, 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -149,6 +149,7 @@ proc test_stack_locals_listing {} {
# Tests:
# -stack-list-locals 0
# -stack-list-locals 1
+ # -stack-list-locals 2
# -stack-list-arguments
mi_gdb_test "232-stack-list-locals 0" \
@@ -168,6 +169,10 @@ gdb_expect {
"232\\^done,locals=\\\[\{name=\"A\",value=\"1\"\},\{name=\"B\",value=\"2\"\},\{name=\"C\",value=\"3\"\}\\\]" \
"stack locals listing 1"
+ mi_gdb_test "232-stack-list-locals 2" \
+ "232\\^done,locals=\\\[\{name=\"A\",type=\"int\",value=\"1\"\},\{name=\"B\",type=\"int\",value=\"2\"\},\{name=\"C\",type=\"int\",value=\"3\"\}\\\]" \
+ "stack locals listing 2"
+
mi_gdb_test "234-stack-list-locals" \
"234\\^error,msg=\"mi_cmd_stack_list_locals: Usage.*PRINT_VALUES.*\"" \
"stack locals listing wrong"
diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp
index 15e3f795aa1..74a5894ce5d 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-child.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation
+# Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation
# This Program Is Free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -833,6 +833,9 @@ mi_gdb_test "-var-update *" \
"\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars struct_declarations.long_array.3-9 changed"
+mi_gdb_test "-var-list-children --all-values struct_declarations.long_array" \
+ "\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",value=\"1234\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",value=\"2345\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",value=\"3456\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",value=\"4567\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",value=\"5678\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",value=\"6789\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",value=\"7890\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",value=\"8901\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",value=\"9012\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",value=\"1234\",type=\"long int\"\}\\\]" \
+ "listing of names and values of children"
# Step over "weird->func_ptr = nothing;"
set line 211
diff --git a/gdb/testsuite/gdb.mi/mi1-basics.exp b/gdb/testsuite/gdb.mi/mi1-basics.exp
deleted file mode 100644
index 42d022d6861..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-basics.exp
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-#
-# test basic Machine interface (MI) operations
-#
-# Verify that, using the MI, we can load a program and do
-# other basic things that are used by all test files through mi_gdb_exit,
-# mi_gdb_start, mi_delete_breakpoints, mi_gdb_reinitialize_dir and
-# mi_gdb_load, so we can safely use those.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but the command syntax and correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-# In this file we want to test if the operations needed by the following
-# procedures work, so it makes no sense using them here.
-
-# mi_delete_breakpoints
-# mi_gdb_reinitialize_dir $srcdir/$subdir
-# mi_gdb_load ${binfile}
-
-# Test if the MI interpreter has been configured
-
-proc test_mi_interpreter_selection {} {
- global mi_gdb_prompt
- global gdb_prompt
-
- # All this test expects is to get the prompt back
- # with no syntax error message
- send_gdb "-gdb-version\n"
- gdb_expect {
- -re "GNU gdb .*\r\n$mi_gdb_prompt$" \
- { pass "acceptance of MI operations"
- return 1}
- -re ".*\r\n$mi_gdb_prompt$" \
- { fail "acceptance of MI operations"
- note "Skipping all other MI tests." }
- -re "Undefined command.*$gdb_prompt $" \
- { fail "acceptance of MI operations"
- note "Skipping all other MI tests." }
- -re ".*$gdb_prompt $" \
- { fail "acceptance of MI operations"
- note "Skipping all other MI tests." }
- timeout { fail "acceptance of MI operations (timeout)"
- note "Skipping all other MI tests." }
- }
- return 0
-}
-
-proc test_exec_and_symbol_mi_operatons {} {
- global mi_gdb_prompt
- global binfile
-
- # Load symbols and specify executable on a single operation
- # Tests:
- # -file-exec-and-symbols
-
- # Can't use mi_gdb_test as if this doesn't work,
- # we must give up on the whole test file
- send_gdb "-file-exec-and-symbols ${binfile}\n"
- gdb_expect {
- -re "\[\r\n\]*\\\^done\r\n$mi_gdb_prompt$" \
- { pass "file-exec-and-symbols operation" }
- timeout { fail "file-exec-and-symbols operation (timeout)"
- note "Skipping all other MI tests."
- return 0}
- }
-
- # The following is not used by mi-support.exp, but we test here so
- # we get done with loading a program basics.
-
- # Do it again, but now load symbols and specify executable with
- # two separate operations
- # Tests:
- # -file-clear
- # -file-exec-file
- # -file-symbol-file
-
- # FIXME: file-clear is not implemented yet.
-# mi_gdb_test "-file-clear" \
-# "\\\^done" \
-# "file-clear operation"
-
- mi_gdb_test "-file-exec-file ${binfile}" \
- "\\\^done" \
- "file-exec-file operation"
-
- mi_gdb_test "-file-symbol-file ${binfile}" \
- "\\\^done" \
- "file-symbol-file operation"
-
- # FIXME: if we cannot load we have to skip all other tests.
-}
-
-proc test_breakpoints_deletion {} {
- global mi_gdb_prompt
- global srcfile
-
- # Clear all breakpoints and list to confirm
- # Tests:
- # -break-delete (all)
- # -break-list
-
- # The all parameter is actually no parameter.
- mi_gdb_test "200-break-delete" \
- "\\\^done" \
- "break-delete (all) operation"
-
- mi_gdb_test "201-break-list" \
- ".*\\\^done,BreakpointTable=\\\{.*,body=\\\[\\\]\\\}" \
- "all breakpoints removed"
-}
-
-proc test_dir_specification {} {
- global mi_gdb_prompt
- global srcdir
- global subdir
-
- # Clear the search directories, then specify one to be searched
- # Tests:
- # -environment-directory
- # -environment-directory arg
-
-#exp_internal 1
- mi_gdb_test "202-environment-directory" \
- "\\\^done" \
- "environment-directory operation"
-
- mi_gdb_test "203-environment-directory ${srcdir}/${subdir}" \
- "\\\^done" \
- "environment-directory arg operation"
-#exp_internal 0
-}
-
-if [test_mi_interpreter_selection] {
- test_exec_and_symbol_mi_operatons
- test_breakpoints_deletion
- test_dir_specification
-}
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-break.exp b/gdb/testsuite/gdb.mi/mi1-break.exp
deleted file mode 100644
index 34a6ef7b141..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-break.exp
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 1999 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_tbreak_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- # Insert some breakpoints and list them
- # Also, disable some so they do not interfere with other tests
- # Tests:
- # -break-insert -t main
- # -break-insert -t basics.c:callee2
- # -break-insert -t basics.c:15
- # -break-insert -t srcfile:6
- # -break-list
-
- mi_gdb_test "222-break-insert -t main" \
- "222\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
- "break-insert -t operation"
-
- mi_gdb_test "333-break-insert -t basics.c:callee2" \
- "333\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \
- "insert temp breakpoint at basics.c:callee2"
-
- mi_gdb_test "444-break-insert -t basics.c:15" \
- "444\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \
- "insert temp breakpoint at basics.c:15 (callee3)"
-
- # Getting the quoting right is tricky. That is "\"<file>\":6"
- mi_gdb_test "555-break-insert -t \"\\\"${srcfile}\\\":6\"" \
- "555\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \
- "insert temp breakpoint at \"<fullfilename>\":6 (callee4)"
-
- mi_gdb_test "666-break-list" \
- "666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}.*\\\]\}" \
- "list of breakpoints"
-
- mi_gdb_test "777-break-delete" \
- "777\\^done" \
- "delete temp breakpoints"
-}
-
-proc test_rbreak_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- # Insert some breakpoints and list them
- # Also, disable some so they do not interfere with other tests
- # Tests:
- # -break-insert -r main
- # -break-insert -r callee2
- # -break-insert -r callee
- # -break-insert -r .*llee
- # -break-list
-
- setup_xfail "*-*-*"
- mi_gdb_test "122-break-insert -r main" \
- "122\\^done,bkpt=\{number=\"5\",addr=\"$hex\",file=\".*basics.c\",line=\"32\"\}" \
- "break-insert -r operation"
-
- setup_xfail "*-*-*"
- mi_gdb_test "133-break-insert -r callee2" \
- "133\\^done,bkpt=\{number=\"6\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\}" \
- "insert breakpoint with regexp callee2"
-
- setup_xfail "*-*-*"
- mi_gdb_test "144-break-insert -r callee" \
- "144\\^done,bkpt=\{number=\"7\",addr=\"$hex\",file=\".*basics.c\",line=\"27\"\},bkpt=\{number=\"8\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\},bkpt=\{number=\"9\",addr=\"$hex\",file=\".*basics.c\",line=\"17\"\},bkpt=\{number=\"10\",addr=\"$hex\",file=\".*basics.c\",line=\"8\"\}" \
- "insert breakpoint with regexp callee"
-
- setup_xfail "*-*-*"
- mi_gdb_test "155-break-insert -r \.\*llee" \
- "155\\^done,bkpt=\{number=\"11\",addr=\"$hex\",file=\".*basics.c\",line=\"27\"\},bkpt=\{number=\"12\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\},bkpt=\{number=\"13\",addr=\"$hex\",file=\".*basics.c\",line=\"17\"\},bkpt=\{number=\"14\",addr=\"$hex\",file=\".*basics.c\",line=\"8\"\}" \
- "insert breakpoint with regexp .*llee"
-
- setup_xfail "*-*-*"
- mi_gdb_test "166-break-list" \
- "1\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
- "list of breakpoints"
-
- mi_gdb_test "177-break-delete" \
- "177\\^done" \
- "delete temp breakpoints"
-}
-
-test_tbreak_creation_and_listing
-test_rbreak_creation_and_listing
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-console.exp b/gdb/testsuite/gdb.mi/mi1-console.exp
deleted file mode 100644
index ab7f5ac5d3f..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-console.exp
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-# This test only works when talking to a target that routes its output
-# through GDB. Check that we're either talking to a simulator or a
-# remote target.
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "mi-console"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-mi_run_to_main
-
-# Next over the hello() call which will produce lots of output
-send_gdb "47-exec-next\n"
-gdb_expect {
- -re "47\\^running\r\n$mi_gdb_prompt" {
- pass "Started step over hello"
- }
- timeout {
- fail "Started step over hello (timeout)"
- }
-}
-
-gdb_expect {
- -re "@\"H\"\r\n.*@\"e\"\r\n.*@\"l\"\r\n.*@\"l\"\r\n.*@\"o\"\r\n.*@\" \"\r\n.*@\"\\\\\\\\\"\r\n.*@\"\\\\\"\"\r\n.*@\"!\"\r\n.*@\"\\\\r\"\r\n.*@\"\\\\n\"\r\n" {
- pass "Hello message"
- }
- -re "Hello" {
-
- # Probably a native system where GDB doesn't have direct
- # control over the inferior console.
- # For this to work, GDB would need to run the inferior process
- # under a PTY and then use the even-loops ability to wait on
- # multiple event sources to channel the output back through the
- # MI.
-
- kfail "gdb/623" "Hello message"
- }
- timeout {
- fail "Hello message (timeout)"
- }
-}
-
-gdb_expect {
- -re "47\\*stopped.*$mi_gdb_prompt$" {
- pass "Finished step over hello"
- }
- timeout {
- fail "Finished step over hello (timeout)"
- }
-}
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-disassemble.exp b/gdb/testsuite/gdb.mi/mi1-disassemble.exp
deleted file mode 100644
index 7292a350b77..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-disassemble.exp
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-#
-# Test Machine interface (MI) operations for disassembly.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_disassembly_only {} {
- global mi_gdb_prompt
- global hex
- global decimal
-
- # Test disassembly more only for the current function.
- # Tests:
- # -data-disassemble -s $pc -e "$pc+8" -- 0
- # -data-disassembly -f basics.c -l 32 -- 0
-
- mi_gdb_test "print/x \$pc" "" ""
- mi_gdb_test "111-data-disassemble -s \$pc -e \"\$pc + 12\" -- 0" \
- "111\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\]" \
- "data-disassemble from pc to pc+12 assembly only"
-
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -- 0" \
- "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
- "data-disassemble file & line, assembly only"
-}
-
-proc test_disassembly_lines_limit {} {
- global mi_gdb_prompt
- global hex
- global decimal
-
- # Test disassembly more only for the current function.
- # Tests:
- # -data-disassembly -f basics.c -l 32 -n 20 -- 0
- # -data-disassembly -f basics.c -l 32 -n 0 -- 0
- # -data-disassembly -f basics.c -l 32 -n 50 -- 0
-
- mi_gdb_test "print/x \$pc" "" ""
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 0" \
- "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
- "data-disassemble file, line, number assembly only"
-
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 0 -- 0" \
- "222\\^done,asm_insns=\\\[\\\]" \
- "data-disassemble file, line, number (zero lines) assembly only"
-
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 50 -- 0" \
- "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
- "data-disassemble file, line, number (more than main lines) assembly only"
-}
-
-
-proc test_disassembly_mixed {} {
- global mi_gdb_prompt
- global hex
- global decimal
-
- # Test disassembly more only for the current function.
- # Tests:
- # -data-disassembly -f basics.c -l 21 -- 1
- # -data-disassembly -s $pc -e "$pc+8" -- 1
-
- mi_gdb_test "002-data-disassemble -f basics.c -l 21 -- 1" \
- "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"21\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
- "data-disassemble file, line assembly mixed"
-
- #
- # In mixed mode, the lowest level of granularity is the source line.
- # So we are going to get the disassembly for the source line at
- # which we are now, even if we have specified that the range is only 2 insns.
- #
- mi_gdb_test "003-data-disassemble -s \$pc -e \"\$pc+4\" -- 1" \
- "003\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
- "data-disassemble range assembly mixed"
-}
-
-proc test_disassembly_mixed_lines_limit {} {
- global mi_gdb_prompt
- global hex
- global decimal
-
- # Test disassembly more only for the current function.
- # Tests:
- # -data-disassembly -f basics.c -l 32 -n 20 -- 1
- # -data-disassembly -f basics.c -l 32 -n 0 -- 1
- # -data-disassembly -f basics.c -l 32 -n 50 -- 1
-
- mi_gdb_test "print/x \$pc" "" ""
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 1" \
- "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
- "data-disassemble file, line, number assembly mixed"
-
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 0 -- 1" \
- "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"31\",file=\".*basics.c\",line_asm_insn=\\\[\\\]\}\\\]" \
- "data-disassemble file, line, number (zero lines) assembly mixed"
-
- mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 50 -- 1" \
- "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\}.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
- "data-disassemble file, line, number (more than main lines) assembly mixed"
-}
-
-proc test_disassembly_bogus_args {} {
- global mi_gdb_prompt
- global hex
-
- # Test that bogus input to disassembly command is rejected.
- # Tests:
- # -data-disassembly -f foo -l abc -n 0 -- 0
- # -data-disassembly -s foo -e bar -- 0
- # -data-disassembly -s $pc -f basics.c -- 0
- # -data-disassembly -f basics.c -l 32 -- 9
-
- mi_gdb_test "123-data-disassemble -f foo -l abc -n 0 -- 0" \
- ".*123\\^error,msg=\"mi_cmd_disassemble: Invalid filename.\"" \
- "data-disassemble bogus filename"
-
- mi_gdb_test "321-data-disassemble -s foo -e bar -- 0" \
- "321\\^error,msg=\"No symbol \\\\\"foo\\\\\" in current context.\"" \
- "data-disassemble bogus address"
-
- mi_gdb_test "456-data-disassemble -s \$pc -f basics.c -- 0" \
- "456\\^error,msg=\"mi_cmd_disassemble: Usage: \\( .-f filename -l linenum .-n howmany.. | .-s startaddr -e endaddr.\\) .--. mixed_mode.\"" \
- "data-disassemble mix different args"
-
- mi_gdb_test "789-data-disassemble -f basics.c -l 32 -- 9" \
- "789\\^error,msg=\"mi_cmd_disassemble: Mixed_mode argument must be 0 or 1.\"" \
- "data-disassemble wrong mode arg"
-
-}
-
-mi_run_to_main
-test_disassembly_only
-test_disassembly_mixed
-test_disassembly_bogus_args
-test_disassembly_lines_limit
-test_disassembly_mixed_lines_limit
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-eval.exp b/gdb/testsuite/gdb.mi/mi1-eval.exp
deleted file mode 100644
index 330e00de528..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-eval.exp
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify -data-evaluate-expression. There are really minimal tests.
-
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-mi_runto callee4
-mi_next_to "callee4" "" "basics.c" "9" "next at callee4"
-
-mi_gdb_test "211-data-evaluate-expression A" "211\\^done,value=\"1\"" "eval A"
-
-mi_gdb_test "311-data-evaluate-expression &A" "311\\^done,value=\"$hex\"" "eval &A"
-
-mi_gdb_test "411-data-evaluate-expression A+3" "411\\^done,value=\"4\"" "eval A+3"
-
-mi_gdb_test "511-data-evaluate-expression \"A + 3\"" "511\\^done,value=\"4\"" "eval A + 3"
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-hack-cli.exp b/gdb/testsuite/gdb.mi/mi1-hack-cli.exp
deleted file mode 100644
index 951981a16b9..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-hack-cli.exp
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-
-# Some basic checks for the CLI.
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-mi_gdb_test "show architecture" \
- "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n\\^done" \
- "show architecture"
-
-mi_gdb_test "47show architecture" \
- "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n47\\^done" \
- "47show architecture"
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-pthreads.exp b/gdb/testsuite/gdb.mi/mi1-pthreads.exp
deleted file mode 100644
index f84f1fe1460..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-pthreads.exp
+++ /dev/null
@@ -1,221 +0,0 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests MI thread commands.
-# Specifically, we are testing the MI command set and the console (in MI)
-# command set ("interpreter-exec") and that the commands that are executed
-# via these command pathways are properly executed. Console commands
-# executed via MI should use MI output wrappers, MI event handlers, etc.
-
-# This only works with native configurations
-if {![isnative]} {
- return
-}
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if {[mi_gdb_start]} {
- continue
-}
-
-# The procs below dealing with parsing cli/mi output for the threadlist
-# is duplicated in gdb669.exp. Any changes here will probably need to
-# be made there as well.
-
-proc get_mi_thread_list {name} {
- global expect_out
-
- # MI will return a list of thread ids:
- #
- # -thread-list-ids
- # ^done,thread-ids=[thread-id="1",thread-id="2",...],number-of-threads="N"
- # (gdb)
- mi_gdb_test "-thread-list-ids" \
- {\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},number-of-threads="[0-9]+"} \
- "-thread_list_ids ($name)"
-
- set output {}
- if {[info exists expect_out(buffer)]} {
- set output $expect_out(buffer)
- }
-
- set thread_list {}
- if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} {
- fail "finding threads in MI output ($name)"
- } else {
- pass "finding threads in MI output ($name)"
-
- # Make list of console threads
- set start [expr {[string first \{ $threads] + 1}]
- set end [expr {[string first \} $threads] - 1}]
- set threads [string range $threads $start $end]
- foreach thread [split $threads ,] {
- if {[scan $thread {thread-id="%d"} num]} {
- lappend thread_list $num
- }
- }
- }
-
- return $thread_list
-}
-
-# Check that MI and the console know of the same threads.
-# Appends NAME to all test names.
-proc check_mi_and_console_threads {name} {
- global expect_out
-
- mi_gdb_test "-thread-list-ids" \
- {\^done,thread-ids={(thread-id="[0-9]+"(,)*)+},number-of-threads="[0-9]+"} \
- "-thread-list-ids ($name)"
- set mi_output {}
- if {[info exists expect_out(buffer)]} {
- set mi_output $expect_out(buffer)
- }
-
- # GDB will return a list of thread ids and some more info:
- #
- # (gdb)
- # -interpreter-exec console "info threads"
- # ~" 4 Thread 2051 (LWP 7734) 0x401166b1 in __libc_nanosleep () at __libc_nanosleep:-1"
- # ~" 3 Thread 1026 (LWP 7733) () at __libc_nanosleep:-1"
- # ~" 2 Thread 2049 (LWP 7732) 0x401411f8 in __poll (fds=0x804bb24, nfds=1, timeout=2000) at ../sysdeps/unix/sysv/linux/poll.c:63"
- # ~"* 1 Thread 1024 (LWP 7731) main (argc=1, argv=0xbfffdd94) at ../../../src/gdb/testsuite/gdb.mi/pthreads.c:160"
- # FIXME: kseitz/2002-09-05: Don't use the hack-cli method.
- mi_gdb_test "info threads" \
- {.*(~".*"[\r\n]*)+.*} \
- "info threads ($name)"
- set console_output {}
- if {[info exists $expect_out(buffer)]} {
- set console_output $expect_out(buffer)
- }
-
- # Make a list of all known threads to console (gdb's thread IDs)
- set console_thread_list {}
- foreach line [split $console_output \n] {
- if {[string index $line 0] == "~"} {
- # This is a line from the console; trim off "~", " ", "*", and "\""
- set line [string trim $line ~\ \"\*]
- if {[scan $line "%d" id] == 1} {
- lappend console_thread_list $id
- }
- }
- }
-
- # Now find the result string from MI
- set mi_result ""
- foreach line [split $mi_output \n] {
- if {[string range $line 0 4] == "^done"} {
- set mi_result $line
- }
- }
- if {$mi_result == ""} {
- fail "finding MI result string ($name)"
- } else {
- pass "finding MI result string ($name)"
- }
-
- # Finally, extract the thread ids and compare them to the console
- set num_mi_threads_str ""
- if {![regexp {number-of-threads="[0-9]+"} $mi_result num_mi_threads_str]} {
- fail "finding number of threads in MI output ($name)"
- } else {
- pass "finding number of threads in MI output ($name)"
-
- # Extract the number of threads from the MI result
- if {![scan $num_mi_threads_str {number-of-threads="%d"} num_mi_threads]} {
- fail "got number of threads from MI ($name)"
- } else {
- pass "got number of threads from MI ($name)"
-
- # Check if MI and console have same number of threads
- if {$num_mi_threads != [llength $console_thread_list]} {
- fail "console and MI have same number of threads ($name)"
- } else {
- pass "console and MI have same number of threads ($name)"
-
- # Get MI thread list
- set mi_thread_list [get_mi_thread_list $name]
-
- # Check if MI and console have the same threads
- set fails 0
- foreach ct [lsort $console_thread_list] mt [lsort $mi_thread_list] {
- if {$ct != $mt} {
- incr fails
- }
- }
- if {$fails > 0} {
- fail "MI and console have same threads ($name)"
-
- # Send a list of failures to the log
- send_log "Console has thread ids: $console_thread_list\n"
- send_log "MI has thread ids: $mi_thread_list\n"
- } else {
- pass "MI and console have same threads ($name)"
- }
- }
- }
- }
-}
-
-# This procedure tests the various thread commands in MI.
-proc check_mi_thread_command_set {} {
-
- mi_runto done_making_threads
-
- set thread_list [get_mi_thread_list "in check_mi_thread_command_set"]
-
- mi_gdb_test "-thread-select" \
- {\^error,msg="mi_cmd_thread_select: USAGE: threadnum."} \
- "check_mi_thread_command_set: -thread-select"
-
- mi_gdb_test "-thread-select 123456789" \
- {\^error,msg="Thread ID 123456789 not known\."} \
- "check_mi_thread_command_set: -thread-select 123456789"
-
- foreach thread $thread_list {
- # line and file are optional.
- # many of the threads are blocked in libc calls,
- # and many people have libc's with no symbols.
- mi_gdb_test "-thread-select $thread" \
- "\\^done,new-thread-id=\"$thread\",frame={.*}(,line=\"(-)?\[0-9\]+\",file=\".*\")?" \
- "check_mi_thread_command_set: -thread-select $thread"
- }
-}
-
-#
-# Start here
-#
-set testfile "pthreads"
-set srcfile "$testfile.c"
-set binfile "$objdir/$subdir/$testfile"
-
-set options [list debug incdir=$objdir]
-if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
- return -1
-}
-
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load $binfile
-
-check_mi_thread_command_set
-
-mi_gdb_exit
-
diff --git a/gdb/testsuite/gdb.mi/mi1-read-memory.exp b/gdb/testsuite/gdb.mi/mi1-read-memory.exp
deleted file mode 100644
index 9a0acf43825..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-read-memory.exp
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-#
-# test basic Machine interface (MI) operations
-#
-# Verify that, using the MI, we can load a program and do
-# other basic things that are used by all test files through mi_gdb_exit,
-# mi_gdb_start, mi_delete_breakpoints, mi_gdb_reinitialize_dir and
-# mi_gdb_load, so we can safely use those.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but the command syntax and correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "mi-read-memory"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-
-mi_run_to_main
-
-#mi_next "do initialization"
-
-mi_next_to "main" "" "mi-read-memory.c" "20" "next at main"
-
-mi_gdb_test "1-data-read-memory" \
- "1\\^error,msg=\".*\"" \
- "no arguments"
-
-
-mi_gdb_test "2-data-read-memory bytes x 1 3 2" \
- "2\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x00\",\"0x01\"\\\]},{addr=\"$hex\",data=\\\[\"0x02\",\"0x03\"\\\]},{addr=\"$hex\",data=\\\[\"0x04\",\"0x05\"\\\]}\\\]" \
- "3x2, one byte"
-
-
-mi_gdb_test "9-data-read-memory -o -6 -- -0+bytes+6 x 1 3 2" \
- "9\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x00\",\"0x01\"\\\]},{addr=\"$hex\",data=\\\[\"0x02\",\"0x03\"\\\]},{addr=\"$hex\",data=\\\[\"0x04\",\"0x05\"\\\]}\\\]" \
- "3x2, one byte offset by -6"
-
-
-mi_gdb_test "3-data-read-memory \"(shorts + 128)\" x 2 1 2" \
- "3\\^done,addr=\"$hex\",nr-bytes=\"4\",total-bytes=\"4\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x0100\",\"0x0102\"\\\]}\\\]" \
- "expression in quotes"
-
-
-mi_gdb_test "4-data-read-memory bytes+16 x 1 8 4 x" \
- "4\\^done,addr=\"$hex\",nr-bytes=\"32\",total-bytes=\"32\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x10\",\"0x11\",\"0x12\",\"0x13\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x14\",\"0x15\",\"0x16\",\"0x17\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x18\",\"0x19\",\"0x1a\",\"0x1b\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x1c\",\"0x1d\",\"0x1e\",\"0x1f\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x20\",\"0x21\",\"0x22\",\"0x23\"\\\],ascii=\" !\\\\\"#\"},{addr=\"$hex\",data=\\\[\"0x24\",\"0x25\",\"0x26\",\"0x27\"\\\],ascii=\"\\$%&'\"},{addr=\"$hex\",data=\\\[\"0x28\",\"0x29\",\"0x2a\",\"0x2b\"\\\],ascii=\"().+\"},{addr=\"$hex\",data=\\\[\"0x2c\",\"0x2d\",\"0x2e\",\"0x2f\"\\\],ascii=\",-\./\"}\\\]" \
- "ascii and data"
-
-
-mi_gdb_test "5-data-read-memory shorts+64 d 2 1 1" \
- "5\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"128\"\\\]}\\\]" \
- "decimal"
-
-mi_gdb_test "6-data-read-memory shorts+64 o 2 1 1" \
- "6\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0200\"\\\]}\\\]" \
- "octal"
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-regs.exp b/gdb/testsuite/gdb.mi/mi1-regs.exp
deleted file mode 100644
index bf59907780e..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-regs.exp
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and look at registers.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc sparc_register_tests_no_exec { } {
- # Test the generic IDT chip.
- mi_gdb_test "111-data-list-register-values" \
- ".*111\\^error,msg=\"mi_cmd_data_list_register_values: Usage: -data-list-register-values <format> \\\[<regnum1>...<regnumN>\\\]\"" \
- "wrong arguments"
-
- mi_gdb_test "111-data-list-register-values x" \
- ".*111\\^error,msg=\"mi_cmd_data_list_register_values: No registers\.\"" \
- "no executable"
-}
-
-# These tests exercise IDT-specific MIPS registers for several
-# different processor models.
-
-# This should detect the actual processor in use and change
-# the expected results appropriately. FIXME
-
-proc sparc_register_tests { } {
- global hex
- global decimal
- set octal "\[0-7\]+"
- set binary "\[0-1\]+"
- set float "\\-?((\[0-9\]+(\\.\[0-9\]+)?(e\[-+\]\[0-9\]+)?)|(nan\\($hex\\)))"
- set float2 "\\-?\[0-9\]+"
-
- mi_gdb_test "111-data-list-register-names" \
- "111\\^done,register-names=\\\[\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fpsr\",\"cpsr\"\\\]" \
- "list register names"
-
- mi_gdb_test "222-data-list-register-values x" \
- "222\\^done,register-values=\\\[\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\\\]" \
- "register values x"
-
- mi_gdb_test "333-data-list-register-values f" \
- "333\\^done,register-values=\\\[\{number=\"0\",value=\"$float\"\},\{number=\"1\",value=\"$float\"\},.*\{number=\"71\",value=\"$float\"\}\\\]" \
- "register values f"
-
- mi_gdb_test "444-data-list-register-values d" \
- "444\\^done,register-values=\\\[\{number=\"0\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\\\]" \
- "register values d"
-
- mi_gdb_test "555-data-list-register-values o" \
- "555\\^done,register-values=\\\[\{number=\"0\",value=\"$octal\"\}.*\{number=\"71\",value=\"$octal\"\}\\\]" \
- "register values o"
-
- mi_gdb_test "666-data-list-register-values t" \
- "666\\^done,register-values=\\\[\{number=\"0\",value=\"$binary\"\}.*\{number=\"71\",value=\"$binary\"\}\\\]" \
- "register values t"
-
- # On the sparc, registers 0-31 are int, 32-63 float, 64-71 int
-
- mi_gdb_test "777-data-list-register-values N" \
- "777\\^done,register-values=\\\[\{number=\"0\",value=\"$decimal\"\}.*\{number=\"31\",value=\"$decimal\"\},\{number=\"32\",value=\"$float\"\}.*\{number=\"63\",value=\"$float\"\},\{number=\"64\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\\\]" \
- "register values N"
-
- mi_gdb_test "888-data-list-register-values r" \
- "888\\^done,register-values=\\\[\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\\\]" \
- "register values r"
-
- mi_gdb_test "999-data-list-register-names 68 69 70 71" \
- "999\\^done,register-names=\\\[\"pc\",\"npc\",\"fpsr\",\"cpsr\"\\\]" \
- "list names of some regs"
-
- mi_gdb_test "001-data-list-register-values x 68 69 70 71" \
- "001\\^done,register-values=\\\[\{number=\"68\",value=\"$hex\"\},\{number=\"69\",value=\"$hex\"\},\{number=\"70\",value=\"$hex\"\},\{number=\"71\",value=\"$hex\"\}\\\]" \
- "list values of some regs"
-
- mi_gdb_test "002-data-list-changed-registers" \
- "002\\^done,changed-registers=\\\[(\"${decimal}\"(,\"${decimal}\")*)?\\\]" \
- "list changed registers"
-}
-
-if [istarget "sparc-*-*"] then {
- sparc_register_tests_no_exec
- mi_run_to_main
- sparc_register_tests
-} else {
- verbose "mi-regs.exp tests ignored for this target"
-}
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-return.exp b/gdb/testsuite/gdb.mi/mi1-return.exp
deleted file mode 100644
index 539a61cbf44..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-return.exp
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# Test Machine interface (MI) operations
-# Verify that, using the MI, we can run a simple program and perform
-# exec-return.
-
-# The goal is not to
-# test gdb functionality, which is done by other tests, but to verify
-# the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-
-proc test_return_simple {} {
- global mi_gdb_prompt
- global hex
-
- send_gdb "111-exec-return\n"
- gdb_expect {
- -re "111\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"}
- -re ".*\r\n$mi_gdb_prompt$" { fail "return from callee4 now" }
- timeout { fail "return from callee4 now (timeout)"
- }
- }
-}
-
-mi_runto callee4
-
-mi_gdb_test "205-break-delete" \
- "205\\^done.*" \
- "delete all breakpoints"
-
-test_return_simple
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-simplerun.exp b/gdb/testsuite/gdb.mi/mi1-simplerun.exp
deleted file mode 100644
index 839903a02cc..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-simplerun.exp
+++ /dev/null
@@ -1,199 +0,0 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_breakpoints_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- # Insert some breakpoints and list them
- # Also, disable some so they do not interfere with other tests
- # Tests:
- # -break-insert
- # -break-list
- # -break-disable
- # -break-info
-
- mi_gdb_test "200-break-insert main" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
- "break-insert operation"
-
- mi_gdb_test "201-break-insert basics.c:callee2" \
- "201\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \
- "insert breakpoint at basics.c:callee2"
-
- mi_gdb_test "202-break-insert basics.c:15" \
- "202\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \
- "insert breakpoint at basics.c:15 (callee3)"
-
- mi_gdb_test "203-break-insert \"\\\"${srcfile}\\\":6\"" \
- "203\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \
- "insert breakpoint at \"<fullfilename>\":6 (callee4)"
-
- mi_gdb_test "204-break-list" \
- "204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
- "list of breakpoints"
-
- mi_gdb_test "205-break-disable 2 3 4" \
- "205\\^done.*" \
- "disabling of breakpoints"
-
- mi_gdb_test "206-break-info 2" \
- "206\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"2\",.*,enabled=\"n\",.*\}\\\]\}" \
- "list of breakpoints, 16 disabled"
-}
-
-proc test_running_the_program {} {
- global mi_gdb_prompt
- global hex
-
- # Run the program without args, then specify srgs and rerun the program
- # Tests:
- # -exec-run
- # -gdb-set
-
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- # The following is equivalent to a send_gdb "000-exec-run\n"
- mi_run_cmd
- gdb_expect {
- -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
- pass "run to main"
- }
- -re ".*$mi_gdb_prompt$" {
- fail "run to main (2)"
- }
- timeout {
- fail "run to main (timeout)"
- }
- }
-}
-
-proc test_controlled_execution {} {
- global mi_gdb_prompt
- global hex
-
- # Continue execution until a breakpoint is reached, step into calls, verifying
- # if the arguments are correctly shown, continue to the end of a called
- # function, step over a call (next).
- # Tests:
- # -exec-continue
- # -exec-next
- # -exec-step
- # -exec-finish
-
- mi_next_to "main" "" "basics.c" "33" "next at main"
-
- # FIXME: A string argument is not printed right; should be fixed and
- # we should look for the right thing here.
- # NOTE: The ``\\\\\"'' is for \".
- mi_step_to "callee1" \
- "\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}" \
- "basics.c" "27" "step at main"
-
- # FIXME: A string argument is not printed right; should be fixed and
- # we should look for the right thing here.
- mi_execute_to "exec-step 3" "end-stepping-range" "callee4" "" \
- "basics.c" "8" "" "step to callee4"
-
- # FIXME: A string argument is not printed right; should be fixed and
- # we should look for the right thing here.
- # NOTE: The ``.'' is part of ``gdb-result-var="$1"''
- mi_finish_to "callee3" ".*" "basics.c" "18" ".1" "0" "exec-finish"
-}
-
-proc test_controlling_breakpoints {} {
- global mi_gdb_prompt
-
- # Enable, delete, set ignore counts in breakpoints
- # (disable was already tested above)
- # Tests:
- # -break-delete
- # -break-enable
- # -break-after
- # -break-condition
-
-}
-
-proc test_program_termination {} {
- global mi_gdb_prompt
-
- # Run to completion: normal and forced
- # Tests:
- # -exec-abort
- # (normal termination of inferior)
-
- # FIXME: "stopped" doesn't seem appropriate.
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- send_gdb "999-exec-continue\n"
- gdb_expect {
- -re "999\\^running\r\n$mi_gdb_prompt" {
- gdb_expect {
- -re "999\\*stopped,reason=\"exited-normally\"\r\n$mi_gdb_prompt$" {
- pass "continue to end"
- }
- -re ".*$mi_gdb_prompt$" {fail "continue to end (2)"}
- timeout {fail "continue to end (timeout 2)"}
- }
- }
- -re ".*$mi_gdb_prompt$" {fail "continue to end (1)"}
- timeout {fail "continue to end (timeout 1)"}
- }
-}
-
-test_breakpoints_creation_and_listing
-test_running_the_program
-test_controlled_execution
-test_controlling_breakpoints
-test_program_termination
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-stack.exp b/gdb/testsuite/gdb.mi/mi1-stack.exp
deleted file mode 100644
index b8c7cab5ce3..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-stack.exp
+++ /dev/null
@@ -1,203 +0,0 @@
-# Copyright 2000, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that stack commands work.
-
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_stack_frame_listing {} {
- global mi_gdb_prompt
- global hex
-
- # Obtain a stack trace
- # Tests:
- # -stack-list-frames
- # -stack-list-frames 1 1
- # -stack-list-frames 1 3
-
- mi_gdb_test "231-stack-list-frames" \
- "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \
- "stack frame listing"
- mi_gdb_test "232-stack-list-frames 1 1" \
- "232\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \
- "stack frame listing 1 1"
- mi_gdb_test "233-stack-list-frames 1 3" \
- "233\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \
- "stack frame listing 1 3"
-
- mi_gdb_test "234-stack-list-frames 1" \
- "234\\^error,msg=\"mi_cmd_stack_list_frames: Usage.*FRAME_LOW FRAME_HIGH.*\"" \
- "stack frame listing wrong"
-}
-
-proc test_stack_args_listing {} {
- global mi_gdb_prompt
- global hex
-
- # Obtain lists for args for the stack frames
- # Tests:
- # -stack-list-arguments 0
- # -stack-list-arguments 0 1 1
- # -stack-list-arguments 0 1 3
- # -stack-list-arguments 1
- # -stack-list-arguments 1 1 1
- # -stack-list-arguments 1 1 3
- # -stack-list-arguments
-
- mi_gdb_test "231-stack-list-arguments 0" \
- "231\\^done,stack-args=\\\[frame=\{level=\"0\",args=\\\[\\\]\},frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\},frame=\{level=\"2\",args=\\\[name=\"intarg\",name=\"strarg\"\\\]\},frame=\{level=\"3\",args=\\\[name=\"intarg\",name=\"strarg\",name=\"fltarg\"\\\]\},frame=\{level=\"4\",args=\\\[\\\]\}\\\]" \
- "stack args listing 0"
-
- mi_gdb_test "232-stack-list-arguments 0 1 1" \
- "232\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\}\\\]" \
- "stack args listing 0 1 1"
-
- mi_gdb_test "233-stack-list-arguments 0 1 3" \
- "233\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\},frame=\{level=\"2\",args=\\\[name=\"intarg\",name=\"strarg\"\\\]\},frame=\{level=\"3\",args=\\\[name=\"intarg\",name=\"strarg\",name=\"fltarg\"\\\]\}\\\]" \
- "stack args listing 0 1 3"
-
- mi_gdb_test "231-stack-list-arguments 1" \
- "231\\^done,stack-args=\\\[frame=\{level=\"0\",args=\\\[\\\]\},frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"2\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"3\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\]\},frame=\{level=\"4\",args=\\\[\\\]\}\\\]" \
- "stack args listing 1"
-
- mi_gdb_test "232-stack-list-arguments 1 1 1" \
- "232\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\}\\\]" \
- "stack args listing 1 1 1"
-
- mi_gdb_test "233-stack-list-arguments 1 1 3" \
- "233\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"2\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"3\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\]\}\\\]" \
- "stack args listing 1 1 3"
-
- mi_gdb_test "234-stack-list-arguments" \
- "234\\^error,msg=\"mi_cmd_stack_list_args: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \
- "stack args listing wrong"
-}
-
-proc test_stack_info_depth {} {
- global mi_gdb_prompt
- global hex
-
- # Obtain depth of stack
- # Tests:
- # -stack-info-depth
- # -stack-info-depth 3
- # -stack-info-depth 99
-
- mi_gdb_test "231-stack-info-depth" \
- "231\\^done,depth=\"5\"" \
- "stack info-depth"
-
- mi_gdb_test "231-stack-info-depth 3" \
- "231\\^done,depth=\"3\"" \
- "stack info-depth 3"
-
- mi_gdb_test "231-stack-info-depth 99" \
- "231\\^done,depth=\"5\"" \
- "stack info-depth 99"
-
- mi_gdb_test "231-stack-info-depth 99 99" \
- "231\\^error,msg=\"mi_cmd_stack_info_depth: Usage: .MAX_DEPTH.\"" \
- "stack info-depth wrong usage"
-}
-
-proc test_stack_locals_listing {} {
- global mi_gdb_prompt
- global hex
-
- # Obtain lists for locals for the stack frames
- # Tests:
- # -stack-list-locals 0
- # -stack-list-locals 1
- # -stack-list-arguments
-
- mi_gdb_test "232-stack-list-locals 0" \
- "232\\^done,locals=\\\[name=\"A\",name=\"B\",name=\"C\"\\\]" \
- "stack locals listing 0"
-
-# step until A, B, C, have some reasonable values.
-send_gdb "-exec-next 3\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
- pass "next's in callee4"
- }
- timeout { fail "next in callee4 (timeout)" }
-}
-
- mi_gdb_test "232-stack-list-locals 1" \
- "232\\^done,locals=\\\[\{name=\"A\",value=\"1\"\},\{name=\"B\",value=\"2\"\},\{name=\"C\",value=\"3\"\}\\\]" \
- "stack locals listing 1"
-
- mi_gdb_test "234-stack-list-locals" \
- "234\\^error,msg=\"mi_cmd_stack_list_locals: Usage.*PRINT_VALUES.*\"" \
- "stack locals listing wrong"
-
- mi_gdb_test "232-stack-select-frame 1" \
- "232\\^done" \
- "stack select frame 1"
-
- mi_gdb_test "232-stack-list-locals 1" \
- "232\\^done,locals=\\\[\\\]" \
- "stack locals listing for new frame"
-
-# this should be a no-op
-
- mi_gdb_test "232-stack-select-frame" \
- "232\\^done" \
- "stack select same frame"
-
- mi_gdb_test "232-stack-list-locals 1" \
- "232\\^done,locals=\\\[\\\]" \
- "stack locals for same frame (level 1)"
-
-}
-
-mi_runto callee4
-test_stack_frame_listing
-test_stack_args_listing
-test_stack_locals_listing
-test_stack_info_depth
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-stepi.exp b/gdb/testsuite/gdb.mi/mi1-stepi.exp
deleted file mode 100644
index a7066370f19..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-stepi.exp
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# Test Machine interface (MI) operations
-# Verify that, using the MI, we can run a simple program and perform
-# exec-step-instruction and exec-next-instruction.
-
-# The goal is not to
-# test gdb functionality, which is done by other tests, but to verify
-# the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_stepi_nexti {} {
- global mi_gdb_prompt
- global hex
-
- send_gdb "111-exec-step-instruction\n"
- gdb_expect {
- -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
- pass "step-instruction at main"
- }
- timeout {
- fail "step-instruction at main (timeout)"
- }
- }
- send_gdb "222-exec-next-instruction\n"
- gdb_expect {
- -re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
- pass "next-instruction at main"
- }
- timeout {
- fail "next-instruction at main (timeout)"
- }
- }
- send_gdb "333-exec-next-instruction\n"
- gdb_expect {
- -re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
- pass "next-instruction at main"
- }
- timeout {
- fail "next-instruction at main (timeout)"
- }
- }
-}
-
-mi_run_to_main
-test_stepi_nexti
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-until.exp b/gdb/testsuite/gdb.mi/mi1-until.exp
deleted file mode 100644
index a036b937c68..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-until.exp
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# Test Machine interface (MI) operations
-# Verify that, using the MI, we can run a simple program and perform
-# exec-until.
-
-# The goal is not to
-# test gdb functionality, which is done by other tests, but to verify
-# the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "until"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_running_to_foo {} {
- global mi_gdb_prompt
- global hex
-
- mi_gdb_test "200-break-insert 10" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*until.c\",line=\"10\",times=\"0\"\}" \
- "break-insert operation"
-
- mi_run_cmd
-
- gdb_expect {
- -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"10\"\}\r\n$mi_gdb_prompt$" {
- pass "run to main"
- }
- -re ".*$mi_gdb_prompt$" {
- fail "run to main (2)"
- }
- timeout {
- fail "run to main (timeout)"
- }
- }
-
- mi_gdb_test "100-break-delete 1" "100\\^done" "break-delete 1"
-
-}
-
-proc test_until {} {
- global mi_gdb_prompt
- global hex
-
- send_gdb "111-exec-until\n"
- gdb_expect {
- -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"12\"\}\r\n$mi_gdb_prompt$" {
- pass "until after while loop"
- }
- timeout {
- fail "until after while loop (timeout)"
- }
- }
-
- send_gdb "222-exec-until 15\n"
- gdb_expect {
- -re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"15\"\}\r\n$mi_gdb_prompt$" {
- pass "until line number"
- }
- timeout {
- fail "until line number (timeout)"
- }
- }
-
- send_gdb "333-exec-until until.c:17\n"
- gdb_expect {
- -re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"17\"\}\r\n$mi_gdb_prompt$" {
- pass "until line number:file"
- }
- timeout {
- fail "until line number:file (timeout)"
- }
- }
-
- # This is supposed to NOT stop at line 25. It stops right after foo is over.
-
- send_gdb "444-exec-until until.c:25\n"
- gdb_expect {
- -re "444\\^running\r\n${mi_gdb_prompt}444\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*until.c\",line=\"24\"\}\r\n$mi_gdb_prompt$" {
- pass "until after current function"
- }
- timeout {
- fail "until after current function (timeout)"
- }
- }
-
-}
-
-test_running_to_foo
-test_until
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-var-block.exp b/gdb/testsuite/gdb.mi/mi1-var-block.exp
deleted file mode 100644
index 0ff9356ccf2..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-var-block.exp
+++ /dev/null
@@ -1,173 +0,0 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
-#
-# This Program Is Free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can create, update, delete variables.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "var-cmd"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-mi_runto do_block_tests
-
-# Test: c_variable-3.2
-# Desc: create cb and foo
-mi_gdb_test "-var-create cb * cb" \
- "\\^done,name=\"cb\",numchild=\"0\",type=\"int\"" \
- "create local variable cb"
-
-mi_gdb_test "-var-create foo * foo" \
- "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
- "create local variable foo"
-
-# step to "foo = 123;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "158" "step at do_block_test"
-
-
-# Be paranoid and assume 3.2 created foo
-mi_gdb_test "-var-delete foo" \
- "&\"Variable object not found\\\\n\".*\\^error,msg=\"Variable object not found\"" \
- "delete var foo"
-
-
-# Test: c_variable-3.3
-# Desc: create foo
-mi_gdb_test "-var-create foo * foo" \
- "\\^done,name=\"foo\",numchild=\"0\",type=\"int\"" \
- "create local variable foo"
-
-# step to "foo2 = 123;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "161" "step at do_block_test"
-
-# Test: c_variable-3.4
-# Desc: check foo, cb changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"foo\",in_scope=\"true\",type_changed=\"false\",name=\"cb\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: cb foo changed"
-
-# step to "foo = 321;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "164" "step at do_block_test"
-
-# Test: c_variable-3.5
-# Desc: create inner block foo
-mi_gdb_test "-var-create inner_foo * foo" \
- "\\^done,name=\"inner_foo\",numchild=\"0\",type=\"int\"" \
- "create local variable inner_foo"
-
-# step to "foo2 = 0;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "166" "step at do_block_test"
-
-# Test: c_variable-3.6
-# Desc: create foo2
-mi_gdb_test "-var-create foo2 * foo2" \
- "\\^done,name=\"foo2\",numchild=\"0\",type=\"int\"" \
- "create local variable foo2"
-
-# Test: c_variable-3.7
-# Desc: check that outer foo in scope and inner foo out of scope
-# Note: also a known gdb problem
-setup_xfail *-*-*
-mi_gdb_test "-var-update inner_foo" \
- "\\^done,changelist=\{FIXME\}" \
- "update inner_foo: should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-
-setup_xfail *-*-*
-mi_gdb_test "-var-evaluate-expression inner_foo" \
- "\\^done,value=\{FIXME\}" \
- "evaluate inner_foo: should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-
-mi_gdb_test "-var-update foo" \
- "\\^done,changelist=\{\}" \
- "update foo: did not change"
-
-mi_gdb_test "-var-delete inner_foo" \
- "\\^done,ndeleted=\"1\"" \
- "delete var inner_foo"
-
-# step to "foo = 0;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "168" "step at do_block_test"
-
-# Test: c_variable-3.8
-# Desc: check that foo2 out of scope (known gdb problem)
-setup_xfail *-*-*
-mi_gdb_test "-var-update foo2" \
- "\\^done,changelist=\{FIXME\}" \
- "update foo2: should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-
-# step to "cb = 21;"
-mi_step_to "do_block_tests" "" "var-cmd.c" "171" "step at do_block_test"
-
-# Test: c_variable-3.9
-# Desc: check that only cb is in scope (known gdb problem)
-setup_xfail *-*-*
-mi_gdb_test "-var-update foo2" \
- "\\^done,changelist=\{FIXME\}" \
- "update foo2 should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-setup_xfail *-*-*
-mi_gdb_test "-var-update foo" \
- "\\^done,changelist=\{FIXME\}" \
- "update foo should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-mi_gdb_test "-var-update cb" \
- "\\^done,changelist=\{\}" \
- "update cb"
-
-# Test: c_variable-3.10
-# Desc: names of editable variables
-#gdbtk_test c_variable-3.10 {names of editable variables} {
-# editable_variables
-#} {{foo cb foo2} {}}
-
-# Done with block tests
-mi_gdb_test "-var-delete foo" \
- "\\^done,ndeleted=\"1\"" \
- "delete var foo"
-
-mi_gdb_test "-var-delete foo2" \
- "\\^done,ndeleted=\"1\"" \
- "delete var foo2"
-
-mi_gdb_test "-var-delete cb" \
- "\\^done,ndeleted=\"1\"" \
- "delete var cb"
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-var-child.exp b/gdb/testsuite/gdb.mi/mi1-var-child.exp
deleted file mode 100644
index 92ae3819277..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-var-child.exp
+++ /dev/null
@@ -1,1203 +0,0 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation
-
-# This Program Is Free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can create, update, delete variables.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "var-cmd"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-mi_runto do_children_tests
-
-##### #####
-# #
-# children tests #
-# #
-##### #####
-
-
-# Test: c_variable-4.2
-# Desc: create variable "struct_declarations"
-mi_gdb_test "-var-create struct_declarations * struct_declarations" \
- "\\^done,name=\"struct_declarations\",numchild=\"11\",type=\"struct _struct_decl\"" \
- "create local variable struct_declarations"
-
-# Test: c_variable-4.3
-# Desc: children of struct_declarations
-# STABS doesn't give us argument types for the func ptr structs, but
-# Dwarf 2 does.
-mi_gdb_test "-var-list-children struct_declarations" \
- "\\^done,numchild=\"11\",children=\{child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
- "get children of struct_declarations"
-
-#gdbtk_test c_variable-4.3 {children of struct_declarations} {
-# get_children struct_declarations
-#} {integer character char_ptr long_int int_ptr_ptr long_array func_ptr func_ptr_struct func_ptr_ptr u1 s2}
-
-# Test: c_variable-4.4
-# Desc: number of children of struct_declarations
-mi_gdb_test "-var-info-num-children struct_declarations" \
- "\\^done,numchild=\"11\"" \
- "get number of children of struct_declarations"
-
-# Test: c_variable-4.5
-# Desc: children of struct_declarations.integer
-mi_gdb_test "-var-list-children struct_declarations.integer" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.integer"
-
-# Test: c_variable-4.6
-# Desc: number of children of struct_declarations.integer
-mi_gdb_test "-var-info-num-children struct_declarations.integer" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.integer"
-
-# Test: c_variable-4.7
-# Desc: children of struct_declarations.character
-mi_gdb_test "-var-list-children struct_declarations.character" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.character"
-
-# Test: c_variable-4.8
-# Desc: number of children of struct_declarations.character
-mi_gdb_test "-var-info-num-children struct_declarations.character" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.character"
-
-# Test: c_variable-4.9
-# Desc: children of struct_declarations.char_ptr
-mi_gdb_test "-var-list-children struct_declarations.char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
- "get children of struct_declarations.char_ptr"
-
-# Test: c_variable-4.10
-# Desc: number of children of struct_declarations.char_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.char_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of struct_declarations.char_ptr"
-
-# Test: c_variable-4.11
-# Desc: children of struct_declarations.long_int
-mi_gdb_test "-var-list-children struct_declarations.long_int" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.long_int"
-
-# Test: c_variable-4.12
-# Desc: number of children of struct_declarations.long_int
-mi_gdb_test "-var-info-num-children struct_declarations.long_int" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.long_int"
-
-# Test: c_variable-4.13
-# Desc: children of int_ptr_ptr
-mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
- "get children of struct_declarations.int_ptr_ptr"
-
-#gdbtk_test c_variable-4.13 {children of int_ptr_ptr} {
-# get_children struct_declarations.int_ptr_ptr
-#} {*int_ptr_ptr}
-
-# Test: c_variable-4.14
-# Desc: number of children of int_ptr_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of struct_declarations.int_ptr_ptr"
-
-
-# Test: c_variable-4.15
-# Desc: children of struct_declarations.long_array
-mi_gdb_test "-var-list-children struct_declarations.long_array" \
- "\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
- "get children of struct_declarations.long_array"
-
-# Test: c_variable-4.16
-# Desc: number of children of struct_declarations.long_array
-mi_gdb_test "-var-info-num-children struct_declarations.long_array" \
- "\\^done,numchild=\"10\"" \
- "get number of children of struct_declarations.long_array"
-
-# Test: c_variable-4.17
-# Desc: children of struct_declarations.func_ptr
-mi_gdb_test "-var-list-children struct_declarations.func_ptr" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.func_ptr"
-
-
-# Test: c_variable-4.18
-# Desc: number of children of struct_declarations.func_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.func_ptr" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.func_ptr"
-
-
-# Test: c_variable-4.19
-# Desc: children of struct_declarations.func_ptr_struct
-mi_gdb_test "-var-list-children struct_declarations.func_ptr_struct" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.func_ptr_struct"
-
-# Test: c_variable-4.20
-# Desc: number of children of struct_declarations.func_ptr_struct
-mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_struct" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.func_ptr_struct"
-
-
-# Test: c_variable-4.21
-# Desc: children of struct_declarations.func_ptr_ptr
-mi_gdb_test "-var-list-children struct_declarations.func_ptr_ptr" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.func_ptr_ptr"
-
-# Test: c_variable-4.22
-# Desc: number of children of struct_declarations.func_ptr_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.func_ptr_ptr"
-
-
-# Test: c_variable-4.23
-# Desc: children of struct_declarations.u1
-mi_gdb_test "-var-list-children struct_declarations.u1" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\}" \
- "get children of struct_declarations.u1"
-
-# Test: c_variable-4.24
-# Desc: number of children of struct_declarations.u1
-mi_gdb_test "-var-info-num-children struct_declarations.u1" \
- "\\^done,numchild=\"4\"" \
- "get number of children of struct_declarations.u1"
-
-# Test: c_variable-4.25
-# Desc: children of struct_declarations.s2
-mi_gdb_test "-var-list-children struct_declarations.s2" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long int \\\[10\\\]\"\}\}" \
- "get children of struct_declarations.s2"
-#gdbtk_test c_variable-4.25 {children of struct_declarations.s2} {
-# get_children struct_declarations.s2
-#} {u2 g h i}
-
-# Test: c_variable-4.26
-# Desc: number of children of struct_declarations.s2
-mi_gdb_test "-var-info-num-children struct_declarations.s2" \
- "\\^done,numchild=\"4\"" \
- "get number of children of struct_declarations.s2"
-
-
-# Test: c_variable-4.27
-# Desc: children of struct_declarations.long_array.1
-mi_gdb_test "-var-list-children struct_declarations.long_array.1" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.long_array.1"
-
-# Test: c_variable-4.28
-# Desc: number of children of struct_declarations.long_array.1
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.1" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.long_array.1"
-
-# Test: c_variable-4.29
-# Desc: children of struct_declarations.long_array.2
-mi_gdb_test "-var-list-children struct_declarations.long_array.2" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.long_array.2"
-
-# Test: c_variable-4.30
-# Desc: number of children of struct_declarations.long_array.2
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.2" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.long_array.2"
-
-# Test: c_variable-4.31
-# Desc: children of struct_declarations.long_array.3
-mi_gdb_test "-var-list-children struct_declarations.long_array.3" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.long_array.3"
-
-# Test: c_variable-4.32
-# Desc: number of children of struct_declarations.long_array.3
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.3" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.long_array.3"
-
-# Test: c_variable-4.33
-# Desc: children of struct_declarations.long_array.4
-mi_gdb_test "-var-list-children struct_declarations.long_array.4" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.long_array.4"
-
-# Test: c_variable-4.34
-# Desc: number of children of struct_declarations.long_array.4
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.4" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.long_array.4"
-
-# Test: c_variable-4.35
-# Desc: children of struct_declarations.long_array.5
-mi_gdb_test "-var-list-children struct_declarations.long_array.5" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.long_array.5"
-
-# Test: c_variable-4.36
-# Desc: number of children of struct_declarations.long_array.5
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.5" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.long_array.5"
-
-# Test: c_variable-4.37
-# Desc: children of struct_declarations.long_array.6
-mi_gdb_test "-var-list-children struct_declarations.long_array.6" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.long_array.6"
-
-# Test: c_variable-4.38
-# Desc: number of children of struct_declarations.long_array.6
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.6" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.long_array.6"
-
-# Test: c_variable-4.39
-# Desc: children of struct_declarations.long_array.7
-mi_gdb_test "-var-list-children struct_declarations.long_array.7" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.long_array.7"
-
-# Test: c_variable-4.40
-# Desc: number of children of struct_declarations.long_array.7
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.7" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.long_array.7"
-
-# Test: c_variable-4.41
-# Desc: children of struct_declarations.long_array.8
-mi_gdb_test "-var-list-children struct_declarations.long_array.8" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.long_array.8"
-
-# Test: c_variable-4.42
-# Desc: number of children of struct_declarations.long_array.8
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.8" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.long_array.8"
-
-
-# Test: c_variable-4.43
-# Desc: children of struct_declarations.long_array.9
-mi_gdb_test "-var-list-children struct_declarations.long_array.9" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.long_array.9"
-
-# Test: c_variable-4.44
-# Desc: number of children of struct_declarations.long_array.9
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.9" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.long_array.9"
-
-# Test: c_variable-4.45
-# Desc: children of struct_declarations.u1.a
-mi_gdb_test "-var-list-children struct_declarations.u1.a" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.u1.a"
-
-# Test: c_variable-4.46
-# Desc: number of children of struct_declarations.u1.a
-mi_gdb_test "-var-info-num-children struct_declarations.u1.a" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.u1.a"
-
-# Test: c_variable-4.47
-# Desc: children of struct_declarations.u1.b
-mi_gdb_test "-var-list-children struct_declarations.u1.b" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.u1.b.\\*b\",exp=\"\\*b\",numchild=\"0\",type=\"char\"\}\}" \
- "get children of struct_declarations.u1.b"
-
-# Test: c_variable-4.48
-# Desc: number of children of struct_declarations.u1.b
-mi_gdb_test "-var-info-num-children struct_declarations.u1.b" \
- "\\^done,numchild=\"1\"" \
- "get number of children of struct_declarations.u1.b"
-
-# Test: c_variable-4.49
-# Desc: children of struct_declarations.u1.c
-mi_gdb_test "-var-list-children struct_declarations.u1.c" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.u1.c"
-
-# Test: c_variable-4.50
-# Desc: number of children of struct_declarations.u1.c
-mi_gdb_test "-var-info-num-children struct_declarations.u1.c" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.u1.c"
-
-# Test: c_variable-4.51
-# Desc: children of struct_declarations.u1.d
-mi_gdb_test "-var-list-children struct_declarations.u1.d" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.u1.d"
-
-
-# Test: c_variable-4.52
-# Desc: number of children of struct_declarations.u1.d
-mi_gdb_test "-var-info-num-children struct_declarations.u1.d" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.u1.d"
-
-
-# Test: c_variable-4.53
-# Desc: children of struct_declarations.s2.u2
-mi_gdb_test "-var-list-children struct_declarations.s2.u2" \
- "\\^done,numchild=\"3\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1\",exp=\"u1s1\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.u2.f\",exp=\"f\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.u2.u1s2\",exp=\"u1s2\",numchild=\"2\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
- "get children of struct_declarations.s2.u2"
-
-# Test: c_variable-4.54
-# Desc: number of children of struct_declarations.s2.u2
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2" \
- "\\^done,numchild=\"3\"" \
- "get number of children of struct_declarations.s2.u2"
-
-# Test: c_variable-4.55
-# Desc: children of struct_declarations.s2.g
-mi_gdb_test "-var-list-children struct_declarations.s2.g" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.s2.g"
-
-# Test: c_variable-4.56
-# Desc: number of children of struct_declarations.s2.g
-mi_gdb_test "-var-info-num-children struct_declarations.s2.g" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.s2.g"
-
-
-# Test: c_variable-4.57
-# Desc: children of struct_declarations.s2.h
-mi_gdb_test "-var-list-children struct_declarations.s2.h" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.s2.h"
-
-# Test: c_variable-4.58
-# Desc: number of children of struct_declarations.s2.h
-mi_gdb_test "-var-info-num-children struct_declarations.s2.h" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.s2.h"
-
-
-# Test: c_variable-4.59
-# Desc: children of struct_declarations.s2.i
-mi_gdb_test "-var-list-children struct_declarations.s2.i" \
- "\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.i.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
- "get children of struct_declarations.s2.i"
-
-# Test: c_variable-4.60
-# Desc: number of children of struct_declarations.s2.i
-mi_gdb_test "-var-info-num-children struct_declarations.s2.i" \
- "\\^done,numchild=\"10\"" \
- "get number of children of struct_declarations.s2.i"
-
-# Test: c_variable-4.61
-# Desc: children of struct_declarations.s2.u2.u1s1
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.d\",exp=\"d\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e\",exp=\"e\",numchild=\"10\",type=\"char \\\[10\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.func\",exp=\"func\",numchild=\"0\",type=\"int \\*\\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.foo\",exp=\"foo\",numchild=\"0\",type=\"efoo\"\}\}" \
- "get children of struct_declarations.s2.u2.u1s1"
-
-# Test: c_variable-4.62
-# Desc: number of children of struct_declarations.s2.u2.u1s1
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1" \
- "\\^done,numchild=\"4\"" \
- "get number of children of struct_declarations.s2.u2.u1s1"
-
-# Test: c_variable-4.63
-# Desc: children of struct_declarations.s2.u2.f
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.f" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.s2.u2.f"
-
-# Test: c_variable-4.64
-# Desc: number of children of struct_declarations.s2.u2.f
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.f" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.s2.u2.f"
-
-# Test: c_variable-4.65
-# Desc: children of struct_declarations.s2.u2.u1s2
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2" \
- "\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr\",exp=\"array_ptr\",numchild=\"2\",type=\"char \\\[2\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s2.func\",exp=\"func\",numchild=\"0\",type=\"int \\(\\*\\)\\((int, char \\*)?\\)\"\}\}" \
- "get children of struct_declarations.s2.u2.u1s2"
-
-# Test: c_variable-4.66
-# Desc: number of children of struct_declarations.s2.u2.u1s2
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2" \
- "\\^done,numchild=\"2\"" \
- "get number of children of struct_declarations.s2.u2.u1s2"
-
-# Test: c_variable-4.67
-# Desc: children of struct_declarations.s2.u2.u1s1.d
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.d" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.s2.u2.u1s1.d"
-
-# Test: c_variable-4.68
-# Desc: number of children of struct_declarations.s2.u2.u1s1.d
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.d" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.s2.u2.u1s1.d"
-
-# Test: c_variable-4.69
-# Desc: children of struct_declarations.s2.u2.u1s1.e
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.e" \
- "\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.e.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.1\",exp=\"1\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.2\",exp=\"2\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s1.e.3\",exp=\"3\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.4\",exp=\"4\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.5\",exp=\"5\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.6\",exp=\"6\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.7\",exp=\"7\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.8\",exp=\"8\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.9\",exp=\"9\",numchild=\"0\",type=\"char\"\}\}" \
- "get children of struct_declarations.s2.u2.u1s1.e"
-
-# Test: c_variable-4.70
-# Desc: number of children of struct_declarations.s2.u2.u1s1.e
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.e" \
- "\\^done,numchild=\"10\"" \
- "get number of children of struct_declarations.s2.u2.u1s1.e"
-
-
-# Test: c_variable-4.71
-# Desc: children of struct_declarations.s2.u2.u1s1.func
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.func" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.s2.u2.u1s1.func"
-
-# Test: c_variable-4.72
-# Desc: number of children of struct_declarations.s2.u2.u1s1.func
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.func" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.s2.u2.u1s1.func"
-
-
-# Test: c_variable-4.73
-# Desc: children of struct_declarations.s2.u2.u1s1.foo
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.foo" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.s2.u2.u1s1.foo"
-
-# Test: c_variable-4.74
-# Desc: number of children of struct_declarations.s2.u2.u1s1.foo
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.foo" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.s2.u2.u1s1.foo"
-
-
-# Test: c_variable-4.75
-# Desc: children of struct_declarations.s2.u2.u1s2.array_ptr
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.array_ptr" \
- "\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=\"1\",numchild=\"0\",type=\"char\"\}\}" \
- "get children of struct_declarations.s2.u2.u1s2.array_ptr"
-
-# Test: c_variable-4.76
-# Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.array_ptr" \
- "\\^done,numchild=\"2\"" \
- "get number of children of struct_declarations.s2.u2.u1s2.array_ptr"
-
-# Test: c_variable-4.77
-# Desc: children of struct_declarations.s2.u2.u1s2.func
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.func" \
- "\\^done,numchild=\"0\"" \
- "get children of struct_declarations.s2.u2.u1s2.func"
-
-# Test: c_variable-4.78
-# Desc: number of children of struct_declarations.s2.u2.u1s2.func
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \
- "\\^done,numchild=\"0\"" \
- "get number of children of struct_declarations.s2.u2.u1s2.func"
-
-# Test: c_variable-4.79
-# Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
-mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
- "get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
-#} {**int_ptr_ptr}
-
-# Test: c_variable-4.80
-# Desc: Number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
-
-
-# Step to "struct_declarations.integer = 123;"
-set line 192
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step to line $line"
-
-# Test: c_variable-4.81
-# Desc: create local variable "weird"
-mi_gdb_test "-var-create weird * weird" \
- "\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \
- "create local variable weird"
-
-# Test: c_variable-4.82
-# Desc: children of weird
-mi_gdb_test "-var-list-children weird" \
- "\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
- "get children of weird"
-
-# Test: c_variable-4.83
-# Desc: number of children of weird
-mi_gdb_test "-var-info-num-children weird" \
- "\\^done,numchild=\"11\"" \
- "get number of children of weird"
-
-
-# Test: c_variable-4.84
-# Desc: children of weird->long_array
-mi_gdb_test "-var-list-children weird.long_array" \
- "\\^done,numchild=\"10\",children=\{child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
- "get children of weird.long_array"
-#gdbtk_test c_variable-4.84 {children of weird->long_array} {
-# get_children weird.long_array
-#} {0 1 2 3 4 5 6 7 8 9}
-
-# Test: c_variable-4.85
-# Desc: number of children of weird.long_array
-mi_gdb_test "-var-info-num-children weird.long_array" \
- "\\^done,numchild=\"10\"" \
- "get number of children of weird.long_array"
-
-# Test: c_variable-4.86
-# Desc: children of weird.int_ptr_ptr
-mi_gdb_test "-var-list-children weird.int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
- "get children of weird.int_ptr_ptr"
-#gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} {
-# get_children weird.int_ptr_ptr
-#} {*int_ptr_ptr}
-
-# Test: c_variable-4.87
-# Desc: number of children of weird.int_ptr_ptr
-mi_gdb_test "-var-info-num-children weird.int_ptr_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of weird.int_ptr_ptr"
-
-# Test: c_variable-4.88
-# Desc: children of *weird->int_ptr_ptr
-mi_gdb_test "-var-list-children weird.int_ptr_ptr.*int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
- "get children of weird.int_ptr_ptr.*int_ptr_ptr"
-#gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} {
-# get_children weird.int_ptr_ptr.*int_ptr_ptr
-#} {**int_ptr_ptr}
-
-# Test: c_variable-4.89
-# Desc: number of children *weird->int_ptr_ptr
-mi_gdb_test "-var-info-num-children weird.int_ptr_ptr.*int_ptr_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of weird.int_ptr_ptr.*int_ptr_ptr"
-
-# Test: c_variable-4.90
-# Desc: create weird->int_ptr_ptr
-mi_gdb_test "-var-create weird->int_ptr_ptr * weird->int_ptr_ptr" \
- "\\^done,name=\"weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"" \
- "create local variable weird->int_ptr_ptr"
-
-# Test: c_variable-4.91
-# Desc: children of weird->int_ptr_ptr
-mi_gdb_test "-var-list-children weird->int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",exp=\"\\*weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
- "get children of weird->int_ptr_ptr"
-
-
-# Test: c_variable-4.92
-# Desc: number of children of (weird->int_ptr_ptr)
-mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of weird->int_ptr_ptr"
-
-# Test: c_variable-4.93
-# Desc: children of *(weird->int_ptr_ptr)
-mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=\"\\*\\*weird->int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
- "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
-
-# Test: c_variable-4.94
-# Desc: number of children of *(weird->int_ptr_ptr)
-mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
-
-# Test: c_variable-4.95
-# Desc: children of *(*(weird->int_ptr_ptr))
-mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \
- "\\^done,numchild=\"0\"" \
- "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"
-
-# Test: c_variable-4.96
-# Desc: number of children of *(*(weird->int_ptr_ptr))
-mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \
- "\\^done,numchild=\"0\"" \
- "get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"
-
-# Test: c_variable-4.97
-# Desc: is weird editable
-mi_gdb_test "-var-show-attributes weird" \
- "\\^done,attr=\"editable\"" \
- "is weird editable"
-
-# Test: c_variable-4.98
-# Desc: is weird->int_ptr_ptr editable
-mi_gdb_test "-var-show-attributes weird->int_ptr_ptr" \
- "\\^done,attr=\"editable\"" \
- "is weird->int_ptr_ptr editable"
-
-# Test: c_variable-4.99
-# Desc: is *(weird->int_ptr_ptr) editable
-mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr" \
- "\\^done,attr=\"editable\"" \
- "is weird.int_ptr_ptr.*int_ptr_ptr editable"
-
-# Test: c_variable-4.100
-# Desc: is *(*(weird->int_ptr_ptr)) editable
-mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr" \
- "\\^done,attr=\"editable\"" \
- "is weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr editable"
-
-# Test: c_variable-4.101
-# Desc: is weird->u1 editable
-mi_gdb_test "-var-show-attributes weird.u1" \
- "\\^done,attr=\"noneditable\"" \
- "is weird.u1 editable"
-
-# Test: c_variable-4.102
-# Desc: is weird->s2 editable
-mi_gdb_test "-var-show-attributes weird.s2" \
- "\\^done,attr=\"noneditable\"" \
- "is weird.s2 editable"
-
-# Test: c_variable-4.103
-# Desc: is struct_declarations.u1.a editable
-mi_gdb_test "-var-show-attributes struct_declarations.u1.a" \
- "\\^done,attr=\"editable\"" \
- "is struct_declarations.u1.a editable"
-
-# Test: c_variable-4.104
-# Desc: is struct_declarations.u1.b editable
-mi_gdb_test "-var-show-attributes struct_declarations.u1.b" \
- "\\^done,attr=\"editable\"" \
- "is struct_declarations.u1.b editable"
-
-# Test: c_variable-4.105
-# Desc: is struct_declarations.u1.c editable
-mi_gdb_test "-var-show-attributes struct_declarations.u1.c" \
- "\\^done,attr=\"editable\"" \
- "is struct_declarations.u1.c editable"
-
-# Test: c_variable-4.106
-# Desc: is struct_declarations.long_array editable
-mi_gdb_test "-var-show-attributes struct_declarations.long_array" \
- "\\^done,attr=\"noneditable\"" \
- "is struct_declarations.long_array editable"
-
-# Test: c_variable-4.107
-# Desc: is struct_declarations.long_array[0] editable
-mi_gdb_test "-var-show-attributes struct_declarations.long_array.0" \
- "\\^done,attr=\"editable\"" \
- "is struct_declarations.long_array.0 editable"
-
-# Test: c_variable-4.108
-# Desc: is struct_declarations editable
-mi_gdb_test "-var-show-attributes struct_declarations" \
- "\\^done,attr=\"noneditable\"" \
- "is struct_declarations editable"
-
-mi_gdb_test "-var-delete weird" \
- "\\^done,ndeleted=\"24\"" \
- "delete var weird"
-
-##### #####
-# #
-# children and update tests #
-# #
-##### #####
-
-# Test: c_variable-5.1
-# Desc: check that nothing changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{\}" \
- "update all vars. None changed"
-
-# Step over "struct_declarations.integer = 123;"
-set line 193
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.2
-# Desc: check that integer changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars struct_declarations.integer"
-
-# Step over:
-# weird->char_ptr = "hello";
-# bar = 2121;
-# foo = &bar;
-set line 196
-mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
-
-# Test: c_variable-5.3
-# Desc: check that char_ptr changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars struct_declarations.char_ptr"
-
-# Step over "struct_declarations.int_ptr_ptr = &foo;"
-set line 197
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.4
-# Desc: check that int_ptr_ptr and children changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars int_ptr_ptr and children changed"
-
-# Step over "weird->long_array[0] = 1234;"
-set line 198
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.5
-# Desc: check that long_array[0] changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars struct_declarations.long_array.0 changed"
-
-# Step over "struct_declarations.long_array[1] = 2345;"
-set line 199
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.6
-# Desc: check that long_array[1] changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars struct_declarations.long_array.1 changed"
-
-# Step over "weird->long_array[2] = 3456;"
-set line 200
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.7
-# Desc: check that long_array[2] changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars struct_declarations.long_array.2 changed"
-
-# Step over:
-# struct_declarations.long_array[3] = 4567;
-# weird->long_array[4] = 5678;
-# struct_declarations.long_array[5] = 6789;
-# weird->long_array[6] = 7890;
-# struct_declarations.long_array[7] = 8901;
-# weird->long_array[8] = 9012;
-# struct_declarations.long_array[9] = 1234;
-set line 208
-mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
-
-# Test: c_variable-5.8
-# Desc: check that long_array[3-9] changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars struct_declarations.long_array.3-9 changed"
-
-
-# Step over "weird->func_ptr = nothing;"
-set line 211
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.9
-# Desc: check that func_ptr changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars struct_declarations.func_ptr changed"
-
-# Delete all variables
-mi_gdb_test "-var-delete struct_declarations" \
- "\\^done,ndeleted=\"65\"" \
- "delete var struct_declarations"
-
-mi_gdb_test "-var-delete weird->int_ptr_ptr" \
- "\\^done,ndeleted=\"3\"" \
- "delete var weird->int_ptr_ptr"
-
-# Step over all lines:
-# ...
-# psnp = &snp0;
-set line 254
-mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
-
-# Test: c_variable-5.10
-# Desc: create psnp->char_ptr
-mi_gdb_test "-var-create psnp->char_ptr * psnp->char_ptr" \
- "\\^done,name=\"psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"" \
- "create local variable psnp->char_ptr"
-
-# Test: c_variable-5.11
-# Desc: children of psnp->char_ptr
-mi_gdb_test "-var-list-children psnp->char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",exp=\"\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \
- "get children of psnp->char_ptr"
-
-# Test: c_variable-5.12
-# Desc: number of children of psnp->char_ptr
-mi_gdb_test "-var-info-num-children psnp->char_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->char_ptr"
-
-# Test: c_variable-5.13
-# Desc: children of *(psnp->char_ptr)
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",exp=\"\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \
- "get children of psnp->char_ptr.*psnp->char_ptr"
-
-# Test: c_variable-5.14
-# Desc: number of children of *(psnp->char_ptr)
-mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->char_ptr.*psnp->char_ptr"
-
-# Test: c_variable-5.15
-# Desc: children of *(*(psnp->char_ptr))
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \
- "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
-
-# Test: c_variable-5.15B
-# Desc: children of *(*(*(psnp->char_ptr)))
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
- "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
-
-# Test: c_variable-5.16
-# Desc: number of children of *(*(psnp->char_ptr))
-mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
-
-# Test: c_variable-5.17
-# Desc: children of *(*(*(psnp->char_ptr)))
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
- "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
-
-# Test: c_variable-5.18
-# Desc: number of children of *(*(*(psnp->char_ptr)))
-mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
-
-# Test: c_variable-5.17B
-# Desc: children of *(*(*(*(psnp->char_ptr))))
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \
- "\\^done,numchild=\"0\"" \
- "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"
-
-# Test: c_variable-5.18B
-# Desc: number of children of *(*(*(*(psnp->char_ptr))))
-mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \
- "\\^done,numchild=\"0\"" \
- "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"
-
-
-# Test: c_variable-5.19
-# Desc: create psnp->long_ptr
-mi_gdb_test "-var-create psnp->long_ptr * psnp->long_ptr" \
- "\\^done,name=\"psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"" \
- "create local variable psnp->long_ptr"
-
-# Test: c_variable-5.20
-# Desc: children of psnp->long_ptr
-mi_gdb_test "-var-list-children psnp->long_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",exp=\"\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\"\}\}" \
- "get children of psnp->long_ptr"
-
-# Test: c_variable-5.21
-# Desc: number of children of psnp->long_ptr
-mi_gdb_test "-var-info-num-children psnp->long_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->long_ptr"
-
-# Test: c_variable-5.22
-# Desc: children of *(psnp->long_ptr)
-mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=\"\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\"\}\}" \
- "get children of psnp->long_ptr.*psnp->long_ptr"
-
-
-# Test: c_variable-5.23
-# Desc: number of children of *(psnp->long_ptr)
-mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->long_ptr.*psnp->long_ptr"
-
-# Test: c_variable-5.24
-# Desc: children of *(*(psnp->long_ptr))
-mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\"\}\}" \
- "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
-
-# Test: c_variable-5.25
-# Desc: number of children of *(*(psnp->long_ptr))
-mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
-
-# Test: c_variable-5.26
-# Desc: children of *(*(*(psnp->long_ptr)))
-mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*\\*psnp->long_ptr\",numchild=\"0\",type=\"long int\"\}\}" \
- "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
-
-# Test: c_variable-5.27
-# Desc: number of children of *(*(*(psnp->long_ptr)))
-mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
-
-# Test: c_variable-5.28
-# Desc: children of *(*(*(*(psnp->long_ptr))))
-mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \
- "\\^done,numchild=\"0\"" \
- "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr"
-
-# Test: c_variable-5.29
-# Desc: number of children of *(*(*(*(psnp->long_ptr))))
-mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \
- "\\^done,numchild=\"0\"" \
- "get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr"
-
-# Test: c_variable-5.30
-# Desc: create psnp->ptrs
-mi_gdb_test "-var-create psnp->ptrs * psnp->ptrs" \
- "\\^done,name=\"psnp->ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"" \
- "create local variable psnp->ptrs"
-
-# Test: c_variable-5.31
-# Desc: children of psnp->ptrs
-mi_gdb_test "-var-list-children psnp->ptrs" \
- "\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
- "get children of psnp->ptrs"
-
-# Test: c_variable-5.32
-# Desc: number of children of psnp->ptrs
-mi_gdb_test "-var-info-num-children psnp->ptrs" \
- "\\^done,numchild=\"3\"" \
- "get number of children of psnp->ptrs"
-
-# Test: c_variable-5.33
-# Desc: children of psnp->ptrs[0]
-mi_gdb_test "-var-list-children psnp->ptrs.0" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
- "get children of psnp->ptrs.0"
-
-# Test: c_variable-5.34
-# Desc: number of children of psnp->ptrs[0]
-mi_gdb_test "-var-info-num-children psnp->ptrs.0" \
- "\\^done,numchild=\"4\"" \
- "get number of children of psnp->ptrs.0"
-
-# Test: c_variable-5.35
-# Desc: children of psnp->ptrs[0]->next
-mi_gdb_test "-var-list-children psnp->ptrs.0.next" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
- "get children of psnp->ptrs.0.next"
-
-#} {char_ptr long_ptr ptrs next}
-
-# Test: c_variable-5.36
-# Desc: number of children of psnp->ptrs[0]->next
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next" \
- "\\^done,numchild=\"4\"" \
- "get number of children of psnp->ptrs.0.next"
-
-
-# Test: c_variable-5.37
-# Desc: children of psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \
- "get children of psnp->ptrs.0.next.char_ptr"
-
-#gdbtk_test c_variable-5.37 {children of psnp->ptrs[0]->next->char_ptr} {
-# get_children psnp->ptrs.0.next.char_ptr
-#} {*char_ptr}
-
-# Test: c_variable-5.38
-# Desc: number of children of psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->ptrs.0.next.char_ptr"
-
-# Test: c_variable-5.39
-# Desc: children of *psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",exp=\"\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \
- "get children of psnp->ptrs.0.next.char_ptr.*char_ptr"
-
-# Test: c_variable-5.40
-# Desc: number of children of *psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr"
-
-# Test: c_variable-5.41
-# Desc: children of **psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \
- "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
-
-# Test: c_variable-5.41B
-# Desc: children of ***psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
- "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
-
-# Test: c_variable-5.42
-# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
-
-# Test: c_variable-5.43
-# Desc: children of ***psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
- "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
- "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
-
-# Test: c_variable-5.44
-# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
- "\\^done,numchild=\"1\"" \
- "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
-
-# Test: c_variable-5.43B
-# Desc: children of ****psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
- "\\^done,numchild=\"0\"" \
- "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
-
-# Test: c_variable-5.44B
-# Desc: number of children of ****psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
- "\\^done,numchild=\"0\"" \
- "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
-
-# Test: c_variable-5.45
-# Desc: children of psnp->ptrs[0]->next->next
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.next" \
- "\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
- "get children of psnp->ptrs.0.next.next"
-
-# Test: c_variable-5.46
-# Desc: children of psnp->ptrs[0]->next->next->ptrs
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.next.ptrs" \
- "\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0.next.next.ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
- "get children of psnp->ptrs.0.next.next.ptrs"
-
-# Step over "snp0.char_ptr = &b3;"
-set line 255
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.47
-# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars psnp->char_ptr (and 0.char_ptr) changed"
-
-# Step over "snp1.char_ptr = &c3;"
-set line 256
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.48
-# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars psnp->next->char_ptr (and 1.char_ptr) changed"
-
-
-# Step over "snp2.char_ptr = &a3;"
-set line 257
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.49
-# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed"
-
-
-# Step over "snp0.long_ptr = &y3;"
-set line 258
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.50
-# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars psnp->long_ptr (and 0.long_ptr) changed"
-
-
-# Step over "snp1.long_ptr = &x3;"
-set line 259
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.51
-# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
-# Why does this have a FIXME?
-setup_xfail *-*-*
-mi_gdb_test "-var-update *" \
- "FIXME\\^done,changelist=\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars psnp->next->long_ptr (and 1.long_ptr) changed"
-clear_xfail *-*-*
-
-# This command produces this error message:
-# &"warning: varobj_list: assertion failed - mycount <> 0\n"
-#
-
-# Step over "snp2.long_ptr = &z3;"
-set line 260
-mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
-
-# Test: c_variable-5.52
-# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"
-
-
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp b/gdb/testsuite/gdb.mi/mi1-var-cmd.exp
deleted file mode 100644
index c6a88b6bd93..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp
+++ /dev/null
@@ -1,560 +0,0 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
-#
-# This Program Is Free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can create, update, delete variables.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "var-cmd"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-
-##### #####
-# #
-# Variable Creation tests #
-# #
-##### #####
-
-# Test: c_variable-1.1
-# Desc: Create global variable
-
-mi_gdb_test "111-var-create global_simple * global_simple" \
- "111\\^done,name=\"global_simple\",numchild=\"6\",type=\"simpleton\"" \
- "create global variable"
-
-# Test: c_variable-1.2
-# Desc: Create non-existent variable
-
-mi_gdb_test "112-var-create bogus_unknown_variable * bogus_unknown_variable" \
- "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*112\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
- "create non-existent variable"
-
-# Test: c_variable-1.3
-# Desc: Create out of scope variable
-
-mi_gdb_test "113-var-create argc * argc" \
- "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*113\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
- "create out of scope variable"
-
-mi_runto do_locals_tests
-
-# Test: c_variable-1.4
-# Desc: create local variables
-
-mi_gdb_test "-var-create linteger * linteger" \
- "\\^done,name=\"linteger\",numchild=\"0\",type=\"int\"" \
- "create local variable linteger"
-
-mi_gdb_test "-var-create lpinteger * lpinteger" \
- "\\^done,name=\"lpinteger\",numchild=\"1\",type=\"int \\*\"" \
- "create local variable lpinteger"
-
-mi_gdb_test "-var-create lcharacter * lcharacter" \
- "\\^done,name=\"lcharacter\",numchild=\"0\",type=\"char\"" \
- "create local variablelcharacter "
-
-mi_gdb_test "-var-create lpcharacter * lpcharacter" \
- "\\^done,name=\"lpcharacter\",numchild=\"1\",type=\"char \\*\"" \
- "create local variable lpcharacter"
-
-mi_gdb_test "-var-create llong * llong" \
- "\\^done,name=\"llong\",numchild=\"0\",type=\"long int\"" \
- "create local variable llong"
-
-mi_gdb_test "-var-create lplong * lplong" \
- "\\^done,name=\"lplong\",numchild=\"1\",type=\"long int \\*\"" \
- "create local variable lplong"
-
-mi_gdb_test "-var-create lfloat * lfloat" \
- "\\^done,name=\"lfloat\",numchild=\"0\",type=\"float\"" \
- "create local variable lfloat"
-
-mi_gdb_test "-var-create lpfloat * lpfloat" \
- "\\^done,name=\"lpfloat\",numchild=\"1\",type=\"float \\*\"" \
- "create local variable lpfloat"
-
-mi_gdb_test "-var-create ldouble * ldouble" \
- "\\^done,name=\"ldouble\",numchild=\"0\",type=\"double\"" \
- "create local variable ldouble"
-
-mi_gdb_test "-var-create lpdouble * lpdouble" \
- "\\^done,name=\"lpdouble\",numchild=\"1\",type=\"double \\*\"" \
- "create local variable lpdouble"
-
-mi_gdb_test "-var-create lsimple * lsimple" \
- "\\^done,name=\"lsimple\",numchild=\"6\",type=\"struct _simple_struct\"" \
- "create local variable lsimple"
-
-mi_gdb_test "-var-create lpsimple * lpsimple" \
- "\\^done,name=\"lpsimple\",numchild=\"6\",type=\"struct _simple_struct \\*\"" \
- "create local variable lpsimple"
-
-mi_gdb_test "-var-create func * func" \
- "\\^done,name=\"func\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"" \
- "create local variable func"
-
-# Test: c_variable-1.5
-# Desc: create lsimple.character
-mi_gdb_test "-var-create lsimple.character * lsimple.character" \
- "\\^done,name=\"lsimple.character\",numchild=\"0\",type=\"char\"" \
- "create lsimple.character"
-
-# Test: c_variable-1.6
-# Desc: create lpsimple->integer
-mi_gdb_test "-var-create lsimple->integer * lsimple->integer" \
- "\\^done,name=\"lsimple->integer\",numchild=\"0\",type=\"int\"" \
- "create lsimple->integer"
-
-# Test: c_variable-1.7
-# Desc: ceate lsimple.integer
-mi_gdb_test "-var-create lsimple.integer * lsimple.integer" \
- "\\^done,name=\"lsimple.integer\",numchild=\"0\",type=\"int\"" \
- "create lsimple->integer"
-
-
-# Test: c_variable-1.9
-# Desc: create type name
-# Type names (like int, long, etc..) are all proper expressions to gdb.
-# make sure variable code does not allow users to create variables, though.
-mi_gdb_test "-var-create int * int" \
- "&\"Attempt to use a type name as an expression.mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
- "create int"
-
-
-##### #####
-# #
-# Value changed tests #
-# #
-##### #####
-
-# Test: c_variable-2.1
-# Desc: check whether values changed at do_block_tests
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{\}" \
- "update all vars"
-
-# Step over "linteger = 1234;"
-mi_step_to "do_locals_tests" "" "var-cmd.c" "107" "step at do_locals_test"
-
-# Test: c_variable-2.2
-# Desc: check whether only linteger changed values
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: linteger changed"
-
-# Step over "lpinteger = &linteger;"
-mi_step_to "do_locals_tests" "" "var-cmd.c" 108 "step at do_locals_tests (2)"
-
-# Test: c_variable-2.3
-# Desc: check whether only lpinteger changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: lpinteger changed"
-
-# Step over "lcharacter = 'a';"
-mi_step_to "do_locals_tests" "" "var-cmd.c" "109" "step at do_locals_tests (3)"
-
-# Test: c_variable-2.4
-# Desc: check whether only lcharacter changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: lcharacter changed"
-
-# Step over "lpcharacter = &lcharacter;"
-mi_step_to "do_locals_tests" "" "var-cmd.c" "110" "step at do_locals_tests (4)"
-
-# Test: c_variable-2.5
-# Desc: check whether only lpcharacter changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: lpcharacter changed"
-
-
-# Step over:
-# llong = 2121L;
-# lplong = &llong;
-# lfloat = 2.1;
-# lpfloat = &lfloat;
-# ldouble = 2.718281828459045;
-# lpdouble = &ldouble;
-# lsimple.integer = 1234;
-# lsimple.unsigned_integer = 255;
-# lsimple.character = 'a';
-
-mi_execute_to "exec-step 9" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" "119" "" "step at do_locals_tests (5)"
-
-# Test: c_variable-2.6
-# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
-# lsimple.unsigned_character lsimple.integer lsimple.character changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",name=\"lpdouble\",in_scope=\"true\",type_changed=\"false\",name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",name=\"lpfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lplong\",in_scope=\"true\",type_changed=\"false\",name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: many changed"
-
-# Step over:
-# lsimple.signed_character = 21;
-# lsimple.char_ptr = &lcharacter;
-# lpsimple = &lsimple;
-# func = nothing;
-
-mi_execute_to "exec-step 4" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" "125" "" "step at do_locals_tests (6)"
-
-# Test: c_variable-2.7
-# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"func\",in_scope=\"true\",type_changed=\"false\",name=\"lpsimple\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: func and lpsimple changed"
-
-# Step over
-# linteger = 4321;
-# lcharacter = 'b';
-# llong = 1212L;
-# lfloat = 1.2;
-# ldouble = 5.498548281828172;
-# lsimple.integer = 255;
-# lsimple.unsigned_integer = 4321;
-# lsimple.character = 'b';
-
-mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \
- "var-cmd.c" "133" "" "step at do_locals_tests (7)"
-
-# Test: c_variable-2.8
-# Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer,
-# lpsimple.integer lsimple.character changed
-# Note: this test also checks that lpsimple->integer and lsimple.integer have
-# changed (they are the same)
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",name=\"llong\",in_scope=\"true\",type_changed=\"false\",name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\",name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: func and lpsimple changed"
-
-
-###
-#
-# Test assignment to variables. More tests on assignment are in other files.
-#
-###
-mi_gdb_test "-var-assign global_simple 0" \
- "&\"mi_cmd_var_assign: Variable object is not editable\\\\n\".*\\^error,msg=\"mi_cmd_var_assign: Variable object is not editable\"" \
- "assign to global_simple"
-
-mi_gdb_test "-var-assign linteger 3333" \
- "\\^done,value=\"3333\"" \
- "assign to linteger"
-
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: linteger changed after assign"
-
-mi_gdb_test "-var-assign linteger 3333" \
- "\\^done,value=\"3333\"" \
- "assign to linteger again, same value"
-
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{\}" \
- "update all vars: linteger not changed after same assign"
-
-mi_gdb_test "-var-evaluate-expression linteger" \
- "\\^done,value=\"3333\"" \
- "eval linteger"
-
-mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \
- "\\^done,value=\"$hex\"" \
- "assign to lpinteger"
-
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: lpinteger changed after assign"
-
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{\}" \
- "update all vars: no changes for second update"
-
-mi_gdb_test "-var-evaluate-expression lpinteger" \
- "\\^done,value=\"$hex\"" \
- "eval lpinteger"
-
-# reset the values to the original ones so that the rest of the file doesn't suffer.
-
-mi_gdb_test "-var-assign linteger 4321" \
- "\\^done,value=\"4321\"" \
- "assign to linteger"
-
-mi_gdb_test "-var-assign lpinteger &linteger" \
- "\\^done,value=\"$hex\"" \
- "assign to lpinteger"
-
-mi_gdb_test "-var-assign lcharacter 'z'" \
- "\\^done,value=\"122 'z'\"" \
- "assign to lcharacter"
-
-mi_gdb_test "-var-evaluate-expression lcharacter" \
- "\\^done,value=\"122 'z'\"" \
- "eval lcharacter"
-
-mi_gdb_test "-var-assign llong 1313L" \
- "\\^done,value=\"1313\"" \
- "assign to llong"
-mi_gdb_test "-var-evaluate-expression llong" \
- "\\^done,value=\"1313\"" \
- "eval llong"
-mi_gdb_test "-var-assign llong 1212L" \
- "\\^done,value=\"1212\"" \
- "assign to llong"
-
-mi_gdb_test "-var-assign lplong &llong+4" \
- "\\^done,value=\"$hex\"" \
- "assign to lplong"
-mi_gdb_test "-var-evaluate-expression lplong" \
- "\\^done,value=\"$hex\"" \
- "eval lplong"
-mi_gdb_test "-var-assign lplong &llong" \
- "\\^done,value=\"$hex\"" \
- "assign to lplong"
-
-mi_gdb_test "-var-assign lfloat 3.4567" \
- "\\^done,value=\"3.45.*\"" \
- "assign to lfloat"
-mi_gdb_test "-var-evaluate-expression lfloat" \
- "\\^done,value=\"3.45.*\"" \
- "eval lfloat"
-mi_gdb_test "-var-assign lfloat 1.2345" \
- "\\^done,value=\"1.23.*\"" \
- "assign to lfloat"
-
-mi_gdb_test "-var-assign lpfloat &lfloat+4" \
- "\\^done,value=\"$hex\"" \
- "assign to lpfloat"
-
-mi_gdb_test "-var-assign ldouble 5.333318284590435" \
- "\\^done,value=\"5.333318284590435\"" \
- "assign to ldouble"
-
-mi_gdb_test "-var-assign func do_block_tests" \
- "\\^done,value=\"$hex <do_block_tests>\"" \
- "assign to func"
-
-mi_gdb_test "-var-assign lsimple.character 'd'" \
- "\\^done,value=\"100 'd'\"" \
- "assign to lsimple.character"
-
-mi_gdb_test "-var-assign lsimple->integer 222" \
- "\\^done,value=\"222\"" \
- "assign to lsimple->integer"
-
-mi_gdb_test "-var-assign lsimple.integer 333" \
- "\\^done,value=\"333\"" \
- "assign to lsimple.integer"
-
-######
-# End of assign tests
-#####
-
-mi_gdb_test "-break-insert subroutine1" \
- "\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"146\",times=\"0\"\}" \
- "break-insert subroutine1"
-mi_continue_to "2" "subroutine1" \
- "\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}" \
- "var-cmd.c" "146" "continue to subroutine1"
-
-# Test: c_variable-2.10
-# Desc: create variable for locals i,l in subroutine1
-mi_gdb_test "-var-create i * i" \
- "\\^done,name=\"i\",numchild=\"0\",type=\"int\"" \
- "create i"
-
-mi_gdb_test "-var-create l * l" \
- "\\^done,name=\"l\",numchild=\"1\",type=\"long int \\*\"" \
- "create l"
-
-# Test: c_variable-2.11
-# Desc: create do_locals_tests local in subroutine1
-mi_gdb_test "-var-create linteger * linteger" \
- "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
- "create linteger"
-
-mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" "147" "step at subroutine1"
-
-# Test: c_variable-2.12
-# Desc: change global_simple.integer
-# Note: This also tests whether we are reporting changes in structs properly.
-# gdb normally would say that global_simple has changed, but we
-# special case that, since it is not what a human expects to
-# see.
-
-setup_xfail *-*-*
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{FIXME: WHAT IS CORRECT HERE\}" \
- "update all vars: changed FIXME"
-clear_xfail *-*-*
-
-mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" "148" "step at subroutine1 (2)"
-
-# Test: c_variable-2.13
-# Desc: change subroutine1 local i
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"i\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: i changed"
-
-mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
- "var-cmd.c" "149" "step at subroutine1 (3)"
-
-# Test: c_variable-2.14
-# Desc: change do_locals_tests local llong
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \
- "update all vars: llong changed"
-
-mi_next_to "do_locals_tests" "" "var-cmd.c" "136" "next out of subroutine1"
-
-# Test: c_variable-2.15
-# Desc: check for out of scope subroutine1 locals
-mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"l\",in_scope=\"false\",name=\"i\",in_scope=\"false\"\}" \
- "update all vars: all now out of scope"
-
-# Done with locals/globals tests. Erase all variables
-#delete_all_variables
-mi_gdb_test "-var-delete global_simple" \
- "\\^done,ndeleted=\"1\"" \
- "delete var"
-
-mi_gdb_test "-var-delete linteger" \
- "\\^done,ndeleted=\"1\"" \
- "delete var linteger"
-
-mi_gdb_test "-var-delete lpinteger" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lpinteger"
-
-mi_gdb_test "-var-delete lcharacter" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lcharacter"
-
-mi_gdb_test "-var-delete lpcharacter" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lpcharacter"
-
-mi_gdb_test "-var-delete llong" \
- "\\^done,ndeleted=\"1\"" \
- "delete var llong"
-
-mi_gdb_test "-var-delete lplong" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lplong"
-
-mi_gdb_test "-var-delete lfloat" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lfloat"
-
-mi_gdb_test "-var-delete lpfloat" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lpfloat"
-
-mi_gdb_test "-var-delete ldouble" \
- "\\^done,ndeleted=\"1\"" \
- "delete var ldouble"
-
-mi_gdb_test "-var-delete lpdouble" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lpdouble"
-
-mi_gdb_test "-var-delete lsimple" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lsimple"
-
-mi_gdb_test "-var-delete lpsimple" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lpsimple"
-
-mi_gdb_test "-var-delete func" \
- "\\^done,ndeleted=\"1\"" \
- "delete var func"
-
-mi_gdb_test "-var-delete lsimple.character" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lsimple.character"
-
-mi_gdb_test "-var-delete lsimple->integer" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lsimple->integer"
-
-mi_gdb_test "-var-delete lsimple.integer" \
- "\\^done,ndeleted=\"1\"" \
- "delete var lsimple.integer"
-
-mi_gdb_test "-var-delete i" \
- "\\^done,ndeleted=\"1\"" \
- "delete var i"
-
-mi_gdb_test "-var-delete l" \
- "\\^done,ndeleted=\"1\"" \
- "delete var l"
-
-# Test whether we can follow the name of a variable through multiple
-# stack frames.
-mi_gdb_test "-break-insert do_special_tests" \
- {\^done,bkpt=.*} \
- "set breakpoint at do_special_tests"
-
-mi_continue_to {.*} do_special_tests {.*} {.*var-cmd.c} {.*} {stop in do_special_tests}
-
-mi_gdb_test "-var-create selected_a @ a" \
- {\^done,name="selected_a",numchild="0",type="int"} \
- "create selected_a"
-
-mi_gdb_test "-break-insert incr_a" \
- {\^done,bkpt=.*} \
- "set breakpoint at incr_a"
-
-mi_continue_to {.*} incr_a {.*} {.*var-cmd.c} {.*} {stop in incr_a}
-
-mi_gdb_test "-var-update selected_a" \
- {\^done,changelist=\{name="selected_a",in_scope="true",new_type="char",new_num_children="0"\}} \
- "update selected_a in incr_a"
-
-mi_next "step a line in incr_a"
-mi_next "return from incr_a to do_special_tests"
-
-mi_gdb_test "-var-update selected_a" \
- {\^done,changelist=\{name="selected_a",in_scope="true",new_type="int",new_num_children="0"\}} \
- "update selected_a in do_special_tests"
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-var-display.exp b/gdb/testsuite/gdb.mi/mi1-var-display.exp
deleted file mode 100644
index 593a1c0e3e9..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-var-display.exp
+++ /dev/null
@@ -1,627 +0,0 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
-#
-# This Program Is Free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can create, update, delete variables.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "var-cmd"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-mi_gdb_test "200-break-insert 260" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"260\",times=\"0\"\}" \
- "break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" {
- pass "run to do_children_tests"
- }
- -re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
- timeout {fail "run to do_children_tests (timeout 2)"}
-}
-
-##### #####
-# #
-# Display tests #
-# #
-##### #####
-
-# Test: c_variable-6.1
-# Desc: create variable bar
-mi_gdb_test "-var-create bar * bar" \
- "\\^done,name=\"bar\",numchild=\"0\",type=\"int\"" \
- "create local variable bar"
-
-# Test: c_variable-6.2
-# Desc: type of variable bar
-mi_gdb_test "-var-info-type bar" \
- "\\^done,type=\"int\"" \
- "info type variable bar"
-
-# Test: c_variable-6.3
-# Desc: format of variable bar
-mi_gdb_test "-var-show-format bar" \
- "\\^done,format=\"natural\"" \
- "show format variable bar"
-
-# Test: c_variable-6.4
-# Desc: value of variable bar
-mi_gdb_test "-var-evaluate-expression bar" \
- "\\^done,value=\"2121\"" \
- "eval variable bar"
-
-# Test: c_variable-6.5
-# Desc: change format of bar to hex
-mi_gdb_test "-var-set-format bar hexadecimal" \
- "\\^done,format=\"hexadecimal\"" \
- "set format variable bar"
-
-# Test: c_variable-6.6
-# Desc: value of bar with new format
-mi_gdb_test "-var-evaluate-expression bar" \
- "\\^done,value=\"0x849\"" \
- "eval variable bar with new format"
-
-# Test: c_variable-6.7
-# Desc: change value of bar
-mi_gdb_test "-var-assign bar 3" \
- "\\^done,value=\"0x3\"" \
- "assing to variable bar"
-
-mi_gdb_test "-var-set-format bar decimal" \
- "\\^done,format=\"decimal\"" \
- "set format variable bar"
-
-mi_gdb_test "-var-evaluate-expression bar" \
- "\\^done,value=\"3\"" \
- "eval variable bar with new value"
-
-mi_gdb_test "-var-delete bar" \
- "\\^done,ndeleted=\"1\"" \
- "delete var bar"
-
-# Test: c_variable-6.11
-# Desc: create variable foo
-mi_gdb_test "-var-create foo * foo" \
- "\\^done,name=\"foo\",numchild=\"1\",type=\"int \\*\"" \
- "create local variable foo"
-
-# Test: c_variable-6.12
-# Desc: type of variable foo
-mi_gdb_test "-var-info-type foo" \
- "\\^done,type=\"int \\*\"" \
- "info type variable foo"
-
-# Test: c_variable-6.13
-# Desc: format of variable foo
-mi_gdb_test "-var-show-format foo" \
- "\\^done,format=\"natural\"" \
- "show format variable foo"
-
-# Test: c_variable-6.14
-# Desc: value of variable foo
-mi_gdb_test "-var-evaluate-expression foo" \
- "\\^done,value=\"$hex\"" \
- "eval variable foo"
-
-# Test: c_variable-6.15
-# Desc: change format of var to octal
-mi_gdb_test "-var-set-format foo octal" \
- "\\^done,format=\"octal\"" \
- "set format variable foo"
-
-mi_gdb_test "-var-show-format foo" \
- "\\^done,format=\"octal\"" \
- "show format variable foo"
-
-# Test: c_variable-6.16
-# Desc: value of foo with new format
-mi_gdb_test "-var-evaluate-expression foo" \
- "\\^done,value=\"\[0-7\]+\"" \
- "eval variable foo"
-
-# Test: c_variable-6.17
-# Desc: change value of foo
-mi_gdb_test "-var-assign foo 3" \
- "\\^done,value=\"03\"" \
- "assing to variable foo"
-
-mi_gdb_test "-var-set-format foo decimal" \
- "\\^done,format=\"decimal\"" \
- "set format variable foo"
-
-# Test: c_variable-6.18
-# Desc: check new value of foo
-mi_gdb_test "-var-evaluate-expression foo" \
- "\\^done,value=\"3\"" \
- "eval variable foo"
-
-mi_gdb_test "-var-delete foo" \
- "\\^done,ndeleted=\"1\"" \
- "delete var foo"
-
-# Test: c_variable-6.21
-# Desc: create variable weird and children
-mi_gdb_test "-var-create weird * weird" \
- "\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \
- "create local variable weird"
-
-mi_gdb_test "-var-list-children weird" \
- "\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
- "get children local variable weird"
-
-
-# Test: c_variable-6.23
-# Desc: change format of weird.func_ptr and weird.func_ptr_ptr
-mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \
- "\\^done,format=\"hexadecimal\"" \
- "set format variable weird.func_ptr"
-
-mi_gdb_test "-var-show-format weird.func_ptr" \
- "\\^done,format=\"hexadecimal\"" \
- "show format variable weird.func_ptr"
-
-mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \
- "\\^done,format=\"hexadecimal\"" \
- "set format variable weird.func_ptr_ptr"
-
-mi_gdb_test "-var-show-format weird.func_ptr_ptr" \
- "\\^done,format=\"hexadecimal\"" \
- "show format variable weird.func_ptr_ptr"
-
-# Test: c_variable-6.24
-# Desc: format of weird and children
-mi_gdb_test "-var-set-format weird natural" \
- "\\^done,format=\"natural\"" \
- "set format variable weird"
-
-mi_gdb_test "-var-set-format weird.integer natural" \
- "\\^done,format=\"natural\"" \
- "set format variable weird.integer"
-
-mi_gdb_test "-var-set-format weird.character natural" \
- "\\^done,format=\"natural\"" \
- "set format variable weird.character"
-
-mi_gdb_test "-var-set-format weird.char_ptr natural" \
- "\\^done,format=\"natural\"" \
- "set format variable weird.char_ptr"
-
-mi_gdb_test "-var-set-format weird.long_int natural" \
- "\\^done,format=\"natural\"" \
- "set format variable weird.long_int"
-
-mi_gdb_test "-var-set-format weird.int_ptr_ptr natural" \
- "\\^done,format=\"natural\"" \
- "set format variable weird.int_ptr_ptr"
-
-mi_gdb_test "-var-set-format weird.long_array natural" \
- "\\^done,format=\"natural\"" \
- "set format variable weird.long_array"
-
-mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \
- "\\^done,format=\"hexadecimal\"" \
- "set format variable weird.func_ptr"
-
-mi_gdb_test "-var-set-format weird.func_ptr_struct hexadecimal" \
- "\\^done,format=\"hexadecimal\"" \
- "set format variable weird.func_ptr_struct"
-
-mi_gdb_test "-var-set-format weird.func_ptr_ptr natural" \
- "\\^done,format=\"natural\"" \
- "set format variable weird.func_ptr_ptr"
-
-mi_gdb_test "-var-set-format weird.u1 natural" \
- "\\^done,format=\"natural\"" \
- "set format variable weird.u1"
-
-mi_gdb_test "-var-set-format weird.s2 natural" \
- "\\^done,format=\"natural\"" \
- "set format variable weird.s2"
-
-# Test: c_variable-6.25
-# Desc: value of weird and children
-#gdbtk_test c_variable-6.25 {value of weird and children} {
-# set values {}
-# foreach v [lsort [array names var]] f [list x "" "" x x x x d d d d d] {
-# lappend values [value $v $f]
-# }
-
-# set values
-#} {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1}
-
-# Test: c_variable-6.26
-# Desc: change format of weird and children to octal
-#gdbtk_test c_variable-6.26 {change format of weird and children to octal} {
-# set formats {}
-# foreach v [lsort [array names var]] {
-# $var($v) format octal
-# lappend formats [$var($v) format]
-# }
-
-# set formats
-#} {octal octal octal octal octal octal octal octal octal octal octal octal}
-
-# Test: c_variable-6.27
-# Desc: value of weird and children with new format
-#gdbtk_test c_variable-6.27 {value of foo with new format} {
-# set values {}
-# foreach v [lsort [array names var]] {
-# lappend values [value $v o]
-# }
-
-# set values
-#} {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1}
-
-# Test: c_variable-6.30
-# Desc: create more children of weird
-#gdbtk_test c_variable-6.30 {create more children of weird} {
-# foreach v [array names var] {
-# get_children $v
-# }
-
-# # Do it twice to get more children
-# foreach v [array names var] {
-# get_children $v
-# }
-
-# lsort [array names var]
-#} {weird weird.char_ptr weird.character weird.func_ptr weird.func_ptr_ptr weird.func_ptr_struct weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.integer weird.long_array weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.long_int weird.s2 weird.s2.g weird.s2.h weird.s2.i weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9 weird.s2.u2 weird.s2.u2.f weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.u1 weird.u1.a weird.u1.b weird.u1.c weird.u1.d}
-
-# Test: c_variable-6.31
-# Desc: check that all children of weird change
-# Ok, obviously things like weird.s2 and weird.u1 will not change!
-#gdbtk_test *c_variable-6.31 {check that all children of weird change (ops, we are now reporting array names as changed in this case - seems harmless though)} {
-# $var(weird) value 0x2121
-# check_update
-#} {{weird.integer weird.character weird.char_ptr weird.long_int weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.func_ptr weird.func_ptr_struct weird.func_ptr_ptr weird.u1.a weird.u1.b weird.u1.c weird.u1.d weird.s2.u2.f weird.s2.g weird.s2.h weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9} {weird.s2.i weird.s2.u2 weird weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.s2 weird.long_array weird.u1} {}}
-
-mi_gdb_test "-var-delete weird" \
- "\\^done,ndeleted=\"12\"" \
- "delete var weird"
-
-
-##### #####
-# #
-# Special Display Tests #
-# #
-##### #####
-
-# Stop in "do_special_tests"
-mi_gdb_test "200-break-insert do_special_tests" \
- "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"282\",times=\"0\"\}" \
- "break-insert operation"
-
-send_gdb "-exec-continue\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"282\"\}\r\n$mi_gdb_prompt$" {
- pass "continue to do_special_tests"
- }
- timeout {
- fail "continue to do_special_tests (timeout)"
- }
-}
-
-# Test: c_variable-7.10
-# Desc: create union u
-mi_gdb_test "-var-create u * u" \
- "\\^done,name=\"u\",numchild=\"2\",type=\"union named_union\"" \
- "create local variable u"
-
-# Test: c_variable-7.11
-# Desc: value of u
-mi_gdb_test "-var-evaluate-expression u" \
- "\\^done,value=\"\{\\.\\.\\.\}\"" \
- "eval variable u"
-
-# Test: c_variable-7.12
-# Desc: type of u
-mi_gdb_test "-var-info-type u" \
- "\\^done,type=\"union named_union\"" \
- "info type variable u"
-
-# Test: c_variable-7.13
-# Desc: is u editable
-mi_gdb_test "-var-show-attributes u" \
- "\\^done,attr=\"noneditable\"" \
- "is u editable"
-
-# Test: c_variable-7.14
-# Desc: number of children of u
-mi_gdb_test "-var-info-num-children u" \
- "\\^done,numchild=\"2\"" \
- "get number of children of u"
-
-# Test: c_variable-7.15
-# Desc: children of u
-mi_gdb_test "-var-list-children u" \
- "\\^done,numchild=\"2\",children=\{child=\{name=\"u.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"u.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \
- "get children of u"
-
-# Test: c_variable-7.20
-# Desc: create anonu
-mi_gdb_test "-var-create anonu * anonu" \
- "\\^done,name=\"anonu\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"" \
- "create local variable anonu"
-
-# Test: c_variable-7.21
-# Desc: value of anonu
-mi_gdb_test "-var-evaluate-expression anonu" \
- "\\^done,value=\"\{\\.\\.\\.\}\"" \
- "eval variable anonu"
-
-# Test: c_variable-7.22
-# Desc: type of anonu
-mi_gdb_test "-var-info-type anonu" \
- "\\^done,type=\"union \{\\.\\.\\.\}\"" \
- "info type variable anonu"
-
-# Test: c_variable-7.23
-# Desc: is anonu editable
-mi_gdb_test "-var-show-attributes anonu" \
- "\\^done,attr=\"noneditable\"" \
- "is anonu editable"
-
-# Test: c_variable-7.24
-# Desc: number of children of anonu
-mi_gdb_test "-var-info-num-children anonu" \
- "\\^done,numchild=\"3\"" \
- "get number of children of anonu"
-
-# Test: c_variable-7.25
-# Desc: children of anonu
-mi_gdb_test "-var-list-children anonu" \
- "\\^done,numchild=\"3\",children=\{child=\{name=\"anonu.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anonu.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anonu.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\}" \
- "get children of anonu"
-
-# Test: c_variable-7.30
-# Desc: create struct s
-mi_gdb_test "-var-create s * s" \
- "\\^done,name=\"s\",numchild=\"6\",type=\"struct _simple_struct\"" \
- "create local variable s"
-
-
-# Test: c_variable-7.31
-# Desc: value of s
-mi_gdb_test "-var-evaluate-expression s" \
- "\\^done,value=\"\{\\.\\.\\.\}\"" \
- "eval variable s"
-
-# Test: c_variable-7.32
-# Desc: type of s
-mi_gdb_test "-var-info-type s" \
- "\\^done,type=\"struct _simple_struct\"" \
- "info type variable s"
-
-# Test: c_variable-7.33
-# Desc: is s editable
-mi_gdb_test "-var-show-attributes s" \
- "\\^done,attr=\"noneditable\"" \
- "is s editable"
-
-# Test: c_variable-7.34
-# Desc: number of children of s
-mi_gdb_test "-var-info-num-children s" \
- "\\^done,numchild=\"6\"" \
- "get number of children of s"
-
-# Test: c_variable-7.35
-# Desc: children of s
-mi_gdb_test "-var-list-children s" \
- "\\^done,numchild=\"6\",children=\{child=\{name=\"s.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"s.unsigned_integer\",exp=\"unsigned_integer\",numchild=\"0\",type=\"unsigned int\"\},child=\{name=\"s.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"s.signed_character\",exp=\"signed_character\",numchild=\"0\",type=\"signed char\"\},child=\{name=\"s.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"s.array_of_10\",exp=\"array_of_10\",numchild=\"10\",type=\"int \\\[10\\\]\"\}\}" \
- "get children of s"
-#} {integer unsigned_integer character signed_character char_ptr array_of_10}
-
-# Test: c_variable-7.40
-# Desc: create anons
-mi_gdb_test "-var-create anons * anons" \
- "\\^done,name=\"anons\",numchild=\"3\",type=\"struct \{\\.\\.\\.\}\"" \
- "create local variable anons"
-
-# Test: c_variable-7.41
-# Desc: value of anons
-mi_gdb_test "-var-evaluate-expression anons" \
- "\\^done,value=\"\{\\.\\.\\.\}\"" \
- "eval variable anons"
-
-# Test: c_variable-7.42
-# Desc: type of anons
-mi_gdb_test "-var-info-type anons" \
- "\\^done,type=\"struct \{\\.\\.\\.\}\"" \
- "info type variable anons"
-
-# Test: c_variable-7.43
-# Desc: is anons editable
-mi_gdb_test "-var-show-attributes anons" \
- "\\^done,attr=\"noneditable\"" \
- "is anons editable"
-
-# Test: c_variable-7.44
-# Desc: number of children of anons
-mi_gdb_test "-var-info-num-children anons" \
- "\\^done,numchild=\"3\"" \
- "get number of children of anons"
-
-# Test: c_variable-7.45
-# Desc: children of anons
-mi_gdb_test "-var-list-children anons" \
- "\\^done,numchild=\"3\",children=\{child=\{name=\"anons.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anons.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anons.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\}" \
- "get children of anons"
-
-
-# Test: c_variable-7.50
-# Desc: create enum e
-mi_gdb_test "-var-create e * e" \
- "\\^done,name=\"e\",numchild=\"0\",type=\"enum foo\"" \
- "create local variable e"
-
-setup_xfail "*-*-*"
-# Test: c_variable-7.51
-# Desc: value of e
-mi_gdb_test "-var-evaluate-expression e" \
- "\\^done,value=\"FIXME\"" \
- "eval variable e"
-clear_xfail "*-*-*"
-
-# Test: c_variable-7.52
-# Desc: type of e
-mi_gdb_test "-var-info-type e" \
- "\\^done,type=\"enum foo\"" \
- "info type variable e"
-
-# Test: c_variable-7.53
-# Desc: is e editable
-mi_gdb_test "-var-show-attributes e" \
- "\\^done,attr=\"editable\"" \
- "is e editable"
-
-# Test: c_variable-7.54
-# Desc: number of children of e
-mi_gdb_test "-var-info-num-children e" \
- "\\^done,numchild=\"0\"" \
- "get number of children of e"
-
-# Test: c_variable-7.55
-# Desc: children of e
-mi_gdb_test "-var-list-children e" \
- "\\^done,numchild=\"0\"" \
- "get children of e"
-
-# Test: c_variable-7.60
-# Desc: create anone
-mi_gdb_test "-var-create anone * anone" \
- "\\^done,name=\"anone\",numchild=\"0\",type=\"enum \{\\.\\.\\.\}\"" \
- "create local variable anone"
-
-setup_xfail "*-*-*"
-# Test: c_variable-7.61
-# Desc: value of anone
-mi_gdb_test "-var-evaluate-expression anone" \
- "\\^done,value=\"A\"" \
- "eval variable anone"
-clear_xfail "*-*-*"
-
-
-# Test: c_variable-7.70
-# Desc: create anone
-mi_gdb_test "-var-create anone * anone" \
- "&\"Duplicate variable object name\\\\n\".*\\^error,msg=\"Duplicate variable object name\"" \
- "create duplicate local variable anone"
-
-
-# Test: c_variable-7.72
-# Desc: type of anone
-mi_gdb_test "-var-info-type anone" \
- "\\^done,type=\"enum \{\\.\\.\\.\}\"" \
- "info type variable anone"
-
-
-# Test: c_variable-7.73
-# Desc: is anone editable
-mi_gdb_test "-var-show-attributes anone" \
- "\\^done,attr=\"editable\"" \
- "is anone editable"
-
-# Test: c_variable-7.74
-# Desc: number of children of anone
-mi_gdb_test "-var-info-num-children anone" \
- "\\^done,numchild=\"0\"" \
- "get number of children of anone"
-
-# Test: c_variable-7.75
-# Desc: children of anone
-mi_gdb_test "-var-list-children anone" \
- "\\^done,numchild=\"0\"" \
- "get children of anone"
-
-
-# Record fp
-
-send_gdb "p/x \$fp\n"
-gdb_expect {
- -re ".*($hex).*\\^done\r\n$mi_gdb_prompt$" {
- pass "print FP register"
- set fp $expect_out(1,string)
- }
-# -re ".*" { fail "print FP register"}
- timeout { fail "print FP register (timeout)"}
-}
-
-mi_gdb_test "200-break-insert incr_a" \
- "200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"85\",times=\"0\"\}" \
- "break-insert operation"
-send_gdb "-exec-continue\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
- pass "continue to incr_a"
- }
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" {
- fail "continue to incr_a (compiler debug info incorrect)"
- }
- -re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" {
- fail "continue to incr_a (unknown output)"
- }
- timeout {
- fail "continue to incr_a (timeout)"
- }
-}
-
-# Test: c_variable-7.81
-# Desc: Create variables in different scopes
-mi_gdb_test "-var-create a1 * a" \
- "\\^done,name=\"a1\",numchild=\"0\",type=\"char\"" \
- "create local variable a1"
-
-mi_gdb_test "-var-create a2 $fp a" \
- "\\^done,name=\"a2\",numchild=\"0\",type=\"int\"" \
- "create variable a2 in different scope"
-
-#gdbtk_test c_variable-7.81 {create variables in different scopes} {
-# set a1 [gdb_variable create -expr a]
-# set a2 [gdb_variable create -expr a -frame $fp]
-
-# set vals {}
-# lappend vals [$a1 value]
-# lappend vals [$a2 value]
-# set vals
-#} {2 1}
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi1-watch.exp b/gdb/testsuite/gdb.mi/mi1-watch.exp
deleted file mode 100644
index dfb97ae59d0..00000000000
--- a/gdb/testsuite/gdb.mi/mi1-watch.exp
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-#
-# Test essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi1"
-
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_watchpoint_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- # Insert a watchpoint and list
- # Tests:
- # -break-watch C
- # -break-list
-
- mi_gdb_test "111-break-watch C" \
- "111\\^done,wpt=\{number=\"2\",exp=\"C\"\}" \
- "break-watch operation"
-
- mi_gdb_test "222-break-list" \
- "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\\\]\}" \
- "list of watchpoints"
-
-}
-
-# UNUSED at the time
-proc test_awatch_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- # Insert an access watchpoint and list it
- # Tests:
- # -break-watch -a A
- # -break-list
-
- mi_gdb_test "333-break-watch -a A" \
- "333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"32\"\}" \
- "break-watch -a operation"
-
- mi_gdb_test "444-break-list" \
- "444\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
- "list of watchpoints awatch"
-
- mi_gdb_test "777-break-delete 3" \
- "777\\^done" \
- "delete access watchpoint"
-}
-
-# UNUSED at the time
-proc test_rwatch_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- # Insert a read watchpoint and list it.
- # Tests:
- # -break-insert -r B
- # -break-list
-
- mi_gdb_test "200-break-watch -r C" \
- "200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
- "break-insert -r operation"
-
- mi_gdb_test "300-break-list" \
- "300\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\}\}" \
- "list of breakpoints"
-
- mi_gdb_test "177-break-delete 4" \
- "177\\^done" \
- "delete read watchpoint"
-}
-
-proc test_watchpoint_triggering {} {
- global mi_gdb_prompt
- global hex
-
- # Continue execution until the watchpoint is reached, continue again,
- # to see the watchpoint go out of scope.
- # Does:
- # -exec-continue (Here wp triggers)
- # -exec-continue (Here wp goes out of scope)
-
- send_gdb "222-exec-continue\n"
- gdb_expect {
- -re "222\\^running\r\n$mi_gdb_prompt" {
- gdb_expect {
- -re "222\\*stopped,reason=\"watchpoint-trigger\",wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\},thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
- pass "watchpoint trigger"
- }
- -re ".*$mi_gdb_prompt$" {fail "watchpoint trigger (2)"}
- timeout {fail "watchpoint trigger (timeout 2)"}
- }
- }
- -re ".*$mi_gdb_prompt$" {fail "watchpoint trigger (1)"}
- timeout {fail "watchpoint trigger (timeout 1)"}
- }
-
- send_gdb "223-exec-continue\n"
- gdb_expect {
- -re "223\\^running\r\n$mi_gdb_prompt" {
- gdb_expect {
- -re "\[\r\n\]*223\\*stopped,reason=\"watchpoint-scope\",wpnum=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {
- pass "wp out of scope"
- }
- -re ".*$mi_gdb_prompt$" {fail "wp out of scope (2)"}
- timeout {fail "wp out of scope (timeout 2)"}
- }
- }
- -re ".*$mi_gdb_prompt$" {fail "wp out of scope (1)"}
- timeout {fail "wp out of scope (timeout 1)"}
- }
-}
-
-mi_runto callee4
-test_watchpoint_creation_and_listing
-#test_rwatch_creation_and_listing
-#test_awatch_creation_and_listing
-test_watchpoint_triggering
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi2-basics.exp b/gdb/testsuite/gdb.mi/mi2-basics.exp
index 44d2e4b9dfa..a86ba3765b5 100644
--- a/gdb/testsuite/gdb.mi/mi2-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi2-basics.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -40,6 +40,9 @@ if [mi_gdb_start] {
set testfile "basics"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
+set escapedobjdir [string_to_regexp ${objdir}]
+set escapedsrcdir [string_to_regexp ${srcdir}]
+
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -154,13 +157,14 @@ proc test_dir_specification {} {
# -environment-directory
# -environment-directory -r
-#exp_internal 1
+ set envirodir [string_to_regexp ${srcdir}/${subdir}]
+
mi_gdb_test "202-environment-directory ${srcdir}/${subdir}" \
- "\\\^done,source-path=\"${srcdir}/${subdir}.\\\$cdir.\\\$cwd\"" \
+ "\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \
"environment-directory arg operation"
mi_gdb_test "203-environment-directory" \
- "\\\^done,source-path=\"${srcdir}/${subdir}.\\\$cdir.\\\$cwd\"" \
+ "\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \
"environment-directory empty-string operation"
mi_gdb_test "204-environment-directory -r" \
@@ -174,6 +178,7 @@ proc test_cwd_specification {} {
global mi_gdb_prompt
global objdir
global subdir
+ global escapedobjdir
# Change the working directory, then print the current working directory
# Tests:
@@ -185,7 +190,7 @@ proc test_cwd_specification {} {
"environment-cd arg operation"
mi_gdb_test "206-environment-pwd" \
- "\\\^done,cwd=\"${objdir}\"" \
+ "\\\^done,cwd=\"${escapedobjdir}\"" \
"environment-pwd operation"
}
@@ -194,6 +199,8 @@ proc test_path_specification {} {
global orig_path
global objdir
global srcdir
+ global escapedobjdir
+ global escapedsrcdir
# Add to the path, display, then reset
# Tests:
@@ -202,8 +209,6 @@ proc test_path_specification {} {
# -environment-path -r dir
# -environment-path -r
-#exp_internal 1
-
send_gdb "-environment-path\n"
gdb_expect 20 {
-re "\\\^done,path=\"\(.*\)\"\r\n$mi_gdb_prompt" {
@@ -220,18 +225,17 @@ proc test_path_specification {} {
"environment-path no-args operation"
mi_gdb_test "208-environment-path $srcdir $objdir" \
- "\\\^done,path=\"$srcdir.$objdir.$orig_path\"" \
+ "\\\^done,path=\"$escapedsrcdir.$escapedobjdir.$orig_path\"" \
"environment-path dir1 dir2 operation"
mi_gdb_test "209-environment-path -r $objdir" \
- "\\\^done,path=\"$objdir.$orig_path\"" \
+ "\\\^done,path=\"$escapedobjdir.$orig_path\"" \
"environment-path -r dir operation"
mi_gdb_test "210-environment-path -r" \
"\\\^done,path=\"$orig_path\"" \
"environment-path -r operation"
-#exp_internal 0
}
if [test_mi_interpreter_selection] {
diff --git a/gdb/testsuite/gdb.mi/mi2-pthreads.exp b/gdb/testsuite/gdb.mi/mi2-pthreads.exp
index fe007e55334..4067883b34f 100644
--- a/gdb/testsuite/gdb.mi/mi2-pthreads.exp
+++ b/gdb/testsuite/gdb.mi/mi2-pthreads.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -205,7 +205,7 @@ proc check_mi_thread_command_set {} {
#
set testfile "pthreads"
set srcfile "$testfile.c"
-set binfile "$objdir/$subdir/$testfile"
+set binfile "$objdir/$subdir/mi2-$testfile"
set options [list debug incdir=$objdir]
if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
diff --git a/gdb/testsuite/gdb.mi/pthreads.c b/gdb/testsuite/gdb.mi/pthreads.c
index 1ba5a15f9fd..0d8f1b616fc 100644
--- a/gdb/testsuite/gdb.mi/pthreads.c
+++ b/gdb/testsuite/gdb.mi/pthreads.c
@@ -1,3 +1,28 @@
+/* Pthreads test program.
+ Copyright 1996, 2002, 2003, 2004
+ Free Software Foundation, Inc.
+
+ Written by Keith Seitz of Red Hat.
+ Copied from gdb.threads/pthreads.c.
+ Contributed by Red Hat.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <stdio.h>
#include <pthread.h>
@@ -17,7 +42,14 @@ static pthread_attr_t null_attr;
void *
routine (void *arg)
{
- sleep (9);
+ /* When gdb is running, it sets hidden breakpoints in the thread
+ library. The signals caused by these hidden breakpoints can
+ cause system calls such as 'sleep' to return early. Pay attention
+ to the return value from 'sleep' to get the full sleep. */
+ int unslept = 9;
+ while (unslept > 0)
+ unslept = sleep (unslept);
+
printf ("hello thread\n");
}
@@ -26,7 +58,7 @@ void
done_making_threads (void)
{
/* Nothing */
-};
+}
void
create_thread (void)
diff --git a/gdb/testsuite/gdb.objc/basicclass.exp b/gdb/testsuite/gdb.objc/basicclass.exp
index 39cf296042a..c92534bdbea 100644
--- a/gdb/testsuite/gdb.objc/basicclass.exp
+++ b/gdb/testsuite/gdb.objc/basicclass.exp
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -125,13 +125,9 @@ gdb_test continue \
#
# Test resetting breakpoints when re-running program
#
-send_gdb "run\n"
+gdb_run_cmd
gdb_expect {
- -re "The program .* has been started already.*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:.*$gdb_prompt $"\
+ -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:.*$gdb_prompt $"\
{ pass "resetting breakpoints when rerunning" }
-re ".*$gdb_prompt $" { fail "resetting breakpoints when rerunning" }
timeout { fail "resetting breakpoints when rerunning" }
@@ -178,7 +174,7 @@ gdb_test continue \
# Test calling Objective-C methods
#
gdb_test "print \[self printHi\]" \
- "Hi.*\\$\[0-9\] = -?\[0-9\]+" \
+ "Hi.*\\$\[0-9\] = \\(.*objc_object \\*\\) 0x\[0-9a-f\]+" \
"Call an Objective-C method with no arguments"
gdb_test "print \[self printNumber: 42\]" \
diff --git a/gdb/testsuite/gdb.objc/nondebug.exp b/gdb/testsuite/gdb.objc/nondebug.exp
new file mode 100644
index 00000000000..9c7a7443524
--- /dev/null
+++ b/gdb/testsuite/gdb.objc/nondebug.exp
@@ -0,0 +1,77 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This file tests decoding non-debuggable Objective-C symbols
+
+# This file was written by Adam Fedor (fedor@gnu.org)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile "nondebug"
+set srcfile ${testfile}.m
+set binfile ${objdir}/${subdir}/${testfile}
+
+#
+# Objective-C program compilation isn't standard. We need to figure out
+# which libraries to link in. Most of the time it uses pthread
+#
+if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list ] ] != "" } {
+ return -1
+}
+
+proc do_objc_tests {} {
+ global prms_id
+ global bug_id
+ global subdir
+ global objdir
+ global srcdir
+ global binfile
+ global gdb_prompt
+
+ set prms_id 0
+ set bug_id 0
+
+ # Start with a fresh gdb.
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load $binfile
+
+}
+
+do_objc_tests
+
+#
+# Break on multiply defined non-debuggable symbol (PR objc/1236)
+#
+set name "break on non-debuggable method"
+gdb_test_multiple "break someMethod" $name \
+{
+ -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\]\[ \]+-.NonDebug someMethod.*\\\[3\\\]\[ \]+-.NonDebug2 someMethod.*" {
+ send_gdb "2\n"
+ exp_continue
+ }
+ -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n> " {
+ gdb_test "0" "" ""
+ kfail "gdb/1236" $name
+ }
+ -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+.*$gdb_prompt $" { pass $name }
+ -re ".*$gdb_prompt $" { kfail "gdb/1236" $name }
+}
+
diff --git a/gdb/testsuite/gdb.objc/nondebug.m b/gdb/testsuite/gdb.objc/nondebug.m
new file mode 100644
index 00000000000..dcbdde936c7
--- /dev/null
+++ b/gdb/testsuite/gdb.objc/nondebug.m
@@ -0,0 +1,38 @@
+#include <objc/Object.h>
+
+@interface NonDebug: Object
+{
+}
+@end
+@interface NonDebug2: Object
+{
+}
+@end
+
+@implementation NonDebug
+
+- someMethod
+{
+ printf("method someMethod\n");
+ return self;
+}
+
+@end
+@implementation NonDebug2
+
+- someMethod
+{
+ printf("method2 someMethod\n");
+ return self;
+}
+
+@end
+
+
+int main (int argc, const char *argv[])
+{
+ id obj;
+ obj = [NonDebug new];
+ [obj someMethod];
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.objc/objcdecode.exp b/gdb/testsuite/gdb.objc/objcdecode.exp
new file mode 100644
index 00000000000..e00bffeae77
--- /dev/null
+++ b/gdb/testsuite/gdb.objc/objcdecode.exp
@@ -0,0 +1,86 @@
+# Copyright 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This file tests decoding of Objective-C symbols
+
+# This file was written by Adam Fedor (fedor@gnu.org)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile "objcdecode"
+set srcfile ${testfile}.m
+set binfile ${objdir}/${subdir}/${testfile}
+
+#
+# Objective-C program compilation isn't standard. We need to figure out
+# which libraries to link in. Most of the time it uses pthread
+#
+if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
+ return -1
+}
+
+proc do_objc_tests {} {
+ global prms_id
+ global bug_id
+ global subdir
+ global objdir
+ global srcdir
+ global binfile
+ global gdb_prompt
+
+ set prms_id 0
+ set bug_id 0
+
+ # Start with a fresh gdb.
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load $binfile
+
+}
+
+do_objc_tests
+
+#
+# Break on multiply defined method (PR objc/1236)
+#
+set name "break on multiply defined method"
+gdb_test_multiple "break multipleDef" $name \
+{
+ -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] -.Decode multipleDef. at .*\r\n\\\[3\\\] multipleDef at .*\r\n> $" {
+ send_gdb "3\n"
+ exp_continue
+ }
+ -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*\r\n$gdb_prompt $" { pass $name }
+ -re ".*$gdb_prompt $" { kfail "gdb/1236" $name }
+}
+
+set name "continue after break on multiply defined symbol"
+gdb_test_multiple "run" $name \
+{
+ -re "Starting program.*Breakpoint \[0-9\]+, multipleDef \\\(\\\) at .*\r\n$gdb_prompt $" {
+ pass $name
+ }
+ -re "Starting program.*\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] -.Decode multipleDef. at .*\r\n\\\[3\\\] multipleDef at .*\r\n> $" {
+ send_gdb "0\n"
+ kfail "gdb/1238" $name
+ # gdb is in a bad state here.
+ # It would be difficult to do any more tests after this.
+ }
+}
diff --git a/gdb/testsuite/gdb.objc/objcdecode.m b/gdb/testsuite/gdb.objc/objcdecode.m
new file mode 100644
index 00000000000..5e99618d115
--- /dev/null
+++ b/gdb/testsuite/gdb.objc/objcdecode.m
@@ -0,0 +1,49 @@
+#include <objc/Object.h>
+
+@interface Decode: Object
+{
+}
+- multipleDef;
+- (const char *) myDescription;
+@end
+
+@implementation Decode
+
+- multipleDef
+{
+ printf("method multipleDef\n");
+ return self;
+}
+
+- (const char *) myDescription
+{
+ return "Decode gdb test object";
+}
+
+@end
+
+int
+multipleDef()
+{
+ printf("function multipleDef\n");
+ return 0;
+}
+
+int main (int argc, const char *argv[])
+{
+ id obj;
+ obj = [Decode new];
+ multipleDef();
+ [obj multipleDef];
+ return 0;
+}
+
+const char *_NSPrintForDebugger(id object)
+{
+ /* This is not really what _NSPrintForDebugger should do, but it
+ is a simple test if gdb can call this function */
+ if (object && [object respondsTo: @selector(myDescription)])
+ return [object myDescription];
+
+ return NULL;
+}
diff --git a/gdb/testsuite/gdb.stabs/weird.exp b/gdb/testsuite/gdb.stabs/weird.exp
index e3bbfb5e6cc..324f67b1f0b 100644
--- a/gdb/testsuite/gdb.stabs/weird.exp
+++ b/gdb/testsuite/gdb.stabs/weird.exp
@@ -1,4 +1,5 @@
-# Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2001, 2003, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -33,6 +34,24 @@ if ![file isdirectory ${objdir}/${subdir}] then {
set prms_id 0
set bug_id 0
+set testfile weird
+set srcfile ${objdir}/${subdir}/weird.s
+set binfile ${objdir}/${subdir}/weirdx.o
+
+if { [ get_compiler_info "$binfile" ] } {
+ return -1
+}
+
+if { $hp_cc_compiler || $hp_aCC_compiler } {
+ # The native hp-ux assembler does not support stabs at all.
+ # If the compiler is native hp-ux, of course the assembler is too.
+ # But if someone builds gcc with the native assembler (not recommended)
+ # rather than the gnu assembler, then this logic will not suppress it.
+ # -- chastain 2004-01-07
+ unsupported "stabs with hp-ux assembler"
+ continue
+}
+
proc do_tests {} {
global binfile
global gdb_prompt
@@ -236,9 +255,6 @@ proc print_weird_var { var } {
# Don't use gdb_load; it doesn't bitch if the loading produced some
# error messages during symbol reading.
-set testfile weird
-set srcfile ${objdir}/${subdir}/weird.s
-set binfile ${objdir}/${subdir}/weirdx.o
global target_os
set sedscript ${srcdir}/${subdir}/aout.sed
@@ -266,7 +282,6 @@ switch -glob ${target_triplet} {
}
}
-
# Hope this is a Unix box.
set exec_output [remote_exec build "sed" "-f ${sedscript}" "${srcdir}/${subdir}/weird.def" "${srcfile}"]
if { [lindex $exec_output 0] != 0 } {
@@ -274,12 +289,6 @@ if { [lindex $exec_output 0] != 0 } {
return -1
}
-# HP's assembler has no idea of what to do with .stab directives; detect the
-# use of HP compilers and escape from here. (No doubt a better heuristic
-# could be devised.)
-
-if { [ info exists CC ] && [ string first "/opt/ansic/bin/cc" "$CC" ] >= 0 } then { continue }
-
if { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp
index 5cb80bd7c79..d7f897198b1 100644
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
+++ b/gdb/testsuite/gdb.threads/gcore-thread.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ set bug_id 0
# Single-threaded test case
set testfile "pthreads"
set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile ${objdir}/${subdir}/gcore-${testfile}
if [istarget "*-*-linux"] then {
set target_cflags "-D_MIT_POSIX_THREADS"
@@ -78,7 +78,7 @@ gdb_expect {
}
}
-if { ! [ runto main ] } then {
+if { ! [ runto_main ] } then {
gdb_suppress_entire_file "Run to main failed, so all tests in this file will automatically fail."
}
@@ -105,9 +105,25 @@ gdb_test "continue" "Continuing.*Breakpoint.* thread2 .*" "thread 2 is running"
set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
# Drop corefile
-gdb_test "gcore ${objdir}/${subdir}/gcore.test" \
- "Saved corefile ${escapedfilename}" \
- "save a corefile"
+gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
+ "save a corefile" \
+{
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
+ pass "save a corefile"
+ global core_supported
+ set core_supported 1
+ }
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
+ unsupported "save a corefile"
+ global core_supported
+ set core_supported 0
+ }
+}
+
+global core_supported
+if {!$core_supported} {
+ return -1
+}
# Now restart gdb and load the corefile.
gdb_exit
diff --git a/gdb/testsuite/gdb.threads/killed.exp b/gdb/testsuite/gdb.threads/killed.exp
index 2e61e7cd440..1948375155e 100644
--- a/gdb/testsuite/gdb.threads/killed.exp
+++ b/gdb/testsuite/gdb.threads/killed.exp
@@ -75,7 +75,15 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-gdb_test "run" "" "run program to completion"
+gdb_run_cmd
+gdb_expect {
+ -re "$gdb_prompt $" {
+ pass "run program to completion"
+ }
+ timeout "$gdb_prompt $" {
+ fail "run program to completion (timeout)"
+ }
+}
# Try to quit.
send_gdb "quit\n"
diff --git a/gdb/testsuite/gdb.threads/pthreads.c b/gdb/testsuite/gdb.threads/pthreads.c
index fdc03242f42..d82d550ffb4 100644
--- a/gdb/testsuite/gdb.threads/pthreads.c
+++ b/gdb/testsuite/gdb.threads/pthreads.c
@@ -1,3 +1,27 @@
+/* Pthreads test program.
+ Copyright 1996, 2002, 2003
+ Free Software Foundation, Inc.
+
+ Written by Fred Fish of Cygnus Support
+ Contributed by Cygnus Support
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <stdio.h>
#include <pthread.h>
diff --git a/gdb/config/vax/tm-vax.h b/gdb/testsuite/gdb.threads/switch-threads.c
index b5e1ac22a1d..3e5a825f487 100644
--- a/gdb/config/vax/tm-vax.h
+++ b/gdb/testsuite/gdb.threads/switch-threads.c
@@ -1,5 +1,6 @@
-/* Target definitions for VAX systems for GDB.
- Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002
+/* A minimal multi-threaded test case.
+
+ Copyright 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,7 +20,28 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef TM_VAX_H
-#define TM_VAX_H
+#include <pthread.h>
+
+void foo (void)
+{
+}
+
+void *thread_func (void *arg)
+{
+ int x;
+ for (x = 0; x < 10; x++)
+ foo ();
+ return 0;
+}
+
+int main()
+{
+ pthread_t thr;
+ void *ret;
+ int x;
-#endif /* TM_VAX_H */
+ pthread_create (&thr, NULL, thread_func, NULL);
+ pthread_join (thr, &ret);
+ for (x = 0; x < 10; x++)
+ foo ();
+}
diff --git a/gdb/testsuite/gdb.threads/switch-threads.exp b/gdb/testsuite/gdb.threads/switch-threads.exp
new file mode 100644
index 00000000000..d5608cfe7f1
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/switch-threads.exp
@@ -0,0 +1,52 @@
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Daniel Jacobowitz <drow@mvista.com>.
+#
+# It tests that the correct thread is single-stepped. Prior to the
+# introduction of vCont, we didn't pass enough information to remote
+# multi-threaded stubs to reliably get this correct; gdbserver defaulted
+# to the first thread.
+
+# TODO: we should also test explicitly changing threads with the "thread"
+# command.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile "switch-threads"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+runto_main
+
+gdb_breakpoint thread_func
+gdb_continue_to_breakpoint "continue to thread_func"
+gdb_test "next" ".*foo \\(\\);"
+
diff --git a/gdb/testsuite/gdb.threads/thread-specific.c b/gdb/testsuite/gdb.threads/thread-specific.c
new file mode 100644
index 00000000000..88a462dac29
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/thread-specific.c
@@ -0,0 +1,66 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+void *thread_function(void *arg);
+
+unsigned int args[1];
+
+int main() {
+ int res;
+ pthread_t threads[2];
+ void *thread_result;
+ long i = 1;
+
+ args[0] = 1;
+ res = pthread_create(&threads[0],
+ NULL,
+ thread_function,
+ (void *) 0);
+
+ /* thread-specific.exp: last thread start. */
+ args[1] = 1;
+
+ /* Don't run forever. Run just short of it :) */
+ while (i > 0)
+ {
+ /* thread-specific.exp: main loop. */
+ (i) ++;
+ }
+
+ exit(EXIT_SUCCESS);
+}
+
+void *thread_function(void *arg) {
+ int my_number = (long) arg;
+ int *myp = &args[my_number];
+
+ /* Don't run forever. Run just short of it :) */
+ while (*myp > 0)
+ {
+ /* thread-specific.exp: thread loop. */
+ (*myp) ++;
+ }
+
+ pthread_exit(NULL);
+}
diff --git a/gdb/testsuite/gdb.threads/thread-specific.exp b/gdb/testsuite/gdb.threads/thread-specific.exp
new file mode 100644
index 00000000000..66f0bd2261c
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/thread-specific.exp
@@ -0,0 +1,115 @@
+# Copyright 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Daniel Jacobowitz <drow@mvista.com>.
+# It tests that the correct breakpoint is reported when we hit a
+# thread-specific breakpoint inserted for several threads.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "thread-specific"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
+}
+
+# Return a list of the valid thread IDs, with the initial thread first.
+proc get_thread_list { } {
+ global gdb_prompt
+ global expect_out
+
+ set thr_list ""
+
+ gdb_test_multiple "info threads" "get threads list" {
+ -re "info threads\r\n" {
+ exp_continue
+ }
+ -re "^\\* *(\[0-9\]*) Thread \[^\n\]*main\[^\n\]*\n" {
+ set thr_list "$expect_out(1,string) $thr_list"
+ exp_continue
+ }
+ -re "^ *(\[0-9\]*) Thread \[^\n\]*\n" {
+ lappend thr_list $expect_out(1,string)
+ exp_continue
+ }
+ -re ".*$gdb_prompt $" {
+ if { [llength $thr_list] != 0 } {
+ pass "get threads list"
+ } else {
+ fail "get threads list (no threads)"
+ }
+ }
+ }
+
+ return $thr_list
+}
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_load ${binfile}
+
+gdb_test "set print sevenbit-strings" ""
+gdb_test "set width 0" ""
+
+runto_main
+
+gdb_breakpoint [gdb_get_line_number "thread-specific.exp: last thread start"]
+gdb_continue_to_breakpoint "all threads started"
+
+set line [gdb_get_line_number "thread-specific.exp: thread loop"]
+set threads [get_thread_list]
+
+if {[llength $threads] == 0} {
+ # We have already issued a FAIL above.
+ return 1
+}
+
+gdb_test_multiple "break $line thread [lindex $threads 0]" \
+ "breakpoint $line main thread" {
+ -re "Breakpoint (\[0-9\]*) at.* file .*$srcfile, line.*$gdb_prompt $" {
+ set main_breakpoint $expect_out(1,string)
+ pass "breakpoint $line main thread"
+ }
+}
+
+foreach thread [lrange $threads 1 end] {
+ gdb_breakpoint "$line thread $thread"
+}
+
+gdb_test_multiple "continue" "continue to thread-specific breakpoint" {
+ -re "Breakpoint $main_breakpoint, .* at .*\r\n$gdb_prompt $" {
+ fail "continue to thread-specific breakpoint (wrong breakpoint)"
+ }
+ -re "Breakpoint .* at .*\r\n$gdb_prompt $" {
+ pass "continue to thread-specific breakpoint"
+ }
+}
+
+return 0
diff --git a/gdb/testsuite/gdb.trace/configure b/gdb/testsuite/gdb.trace/configure
deleted file mode 100755
index 417620553ee..00000000000
--- a/gdb/testsuite/gdb.trace/configure
+++ /dev/null
@@ -1,899 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.1"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=collection.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:573: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:594: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:612: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/lib/compiler.c b/gdb/testsuite/lib/compiler.c
index 8eb0d47dd19..b1f1f5d5f62 100644
--- a/gdb/testsuite/lib/compiler.c
+++ b/gdb/testsuite/lib/compiler.c
@@ -1,31 +1,65 @@
-/* Often the behavior of any particular test depends upon what compiler was
- used to compile the test. As each test is compiled, this file is
- preprocessed by the same compiler used to compile that specific test
- (different tests might be compiled by different compilers, particularly
- if compiled at different times), and used to generate a *.ci (compiler
- info) file for that test.
+/* This test file is part of GDB, the GNU debugger.
- I.E., when callfuncs is compiled, a callfuncs.ci file will be generated,
- which can then be sourced by callfuncs.exp to give callfuncs.exp access
- to information about the compilation environment.
+ Copyright 1995, 1997, 1999, 2003, 2004 Free Software Foundation, Inc.
- TODO: It might be a good idea to add expect code that tests each
- definition made with 'set" to see if one already exists, and if so
- warn about conflicts if it is being set to something else. */
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-/* This needs to be kept in sync with whatis.c and gdb.exp(get_compiler_info).
- If this ends up being hairy, we could use a common header file. */
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public 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 (__STDC__) || defined (_AIX)
-set signed_keyword_not_used 0
-#else
-set signed_keyword_not_used 1
-#endif
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+/* Sometimes the behavior of a test depends upon the compiler used to
+ compile the test program. A test script can call get_compiler_info
+ to figure out the compiler version and test_compiler_info to test it.
+
+ get_compiler_info runs the preprocessor on this file and then eval's
+ the result. This sets various symbols for use by test_compiler_info.
+
+ TODO: make compiler_info a local variable for get_compiler_info and
+ test_compiler_info.
+
+ TODO: all clients should use test_compiler_info and should not
+ use gcc_compiled, hp_cc_compiler, or hp_aCC_compiler.
+
+ TODO: purge signed_keyword_not_used. */
+
+set compiler_info ""
#if defined (__GNUC__)
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
set gcc_compiled __GNUC__
#else
set gcc_compiled 0
#endif
-return 0
+#if defined (__HP_cc)
+set compiler_info [join {hpcc __HP_cc} -]
+set hp_cc_compiler __HP_cc
+#else
+set hp_cc_compiler 0
+#endif
+
+#if defined (__HP_aCC)
+set compiler_info [join {hpacc __HP_aCC} -]
+set hp_aCC_compiler __HP_aCC
+#else
+set hp_aCC_compiler 0
+#endif
+
+/* gdb.base/whatis.exp still uses this */
+#if defined (__STDC__) || defined (_AIX)
+set signed_keyword_not_used 0
+#else
+set signed_keyword_not_used 1
+#endif
diff --git a/gdb/testsuite/lib/compiler.cc b/gdb/testsuite/lib/compiler.cc
index 5cb00f6685a..0c5eb663b96 100644
--- a/gdb/testsuite/lib/compiler.cc
+++ b/gdb/testsuite/lib/compiler.cc
@@ -1,34 +1,53 @@
-/* Often the behavior of any particular test depends upon what compiler was
- used to compile the test. As each test is compiled, this file is
- preprocessed by the same compiler used to compile that specific test
- (different tests might be compiled by different compilers, particularly
- if compiled at different times), and used to generate a *.ci (compiler
- info) file for that test.
-
- I.E., when callfuncs is compiled, a callfuncs.ci file will be generated,
- which can then be sourced by callfuncs.exp to give callfuncs.exp access
- to information about the compilation environment.
-
- TODO: It might be a good idea to add expect code that tests each
- definition made with 'set" to see if one already exists, and if so
- warn about conflicts if it is being set to something else. */
-
-#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
-set supports_template_debugging 1
+/* This test file is part of GDB, the GNU debugger.
+
+ Copyright 1995, 1999, 2003, 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+/* This file is exactly like compiler.c. I could just use compiler.c if
+ I could be sure that every C++ compiler accepted extensions of ".c". */
+
+set compiler_info ""
+
+#if defined (__GNUC__)
+set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ } -]
+set gcc_compiled __GNUC__
#else
-set supports_template_debugging 0
+set gcc_compiled 0
#endif
-#if defined(__cplusplus)
-set supports_template_debugging 1
+#if defined (__HP_cc)
+set compiler_info [join {hpcc __HP_cc} -]
+set hp_cc_compiler __HP_cc
#else
-set supports_template_debugging 0
+set hp_cc_compiler 0
#endif
-#if defined (__GNUC__)
-set gcc_compiled __GNUC__
+#if defined (__HP_aCC)
+set compiler_info [join {hpacc __HP_aCC} -]
+set hp_aCC_compiler __HP_aCC
#else
-set gcc_compiled 0
+set hp_aCC_compiler 0
#endif
-return 0
+/* gdb.base/whatis.exp still uses this */
+#if defined (__STDC__) || defined (_AIX)
+set signed_keyword_not_used 0
+#else
+set signed_keyword_not_used 1
+#endif
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index a16b0fa7fec..72d9143ab21 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1,5 +1,5 @@
# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-# 2002, 2003
+# 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -248,6 +248,12 @@ proc gdb_run_cmd {args} {
}
return
}
+
+ if [target_info exists gdb,do_reload_on_run] {
+ if { [gdb_load ""] < 0 } {
+ return;
+ }
+ }
send_gdb "run $args\n"
# This doesn't work quite right yet.
gdb_expect 60 {
@@ -269,6 +275,10 @@ proc gdb_breakpoint { function } {
-re "Breakpoint \[0-9\]* at .*: file .*, line $decimal.\r\n$gdb_prompt $" {}
-re "Breakpoint \[0-9\]*: file .*, line $decimal.\r\n$gdb_prompt $" {}
-re "Breakpoint \[0-9\]* at .*$gdb_prompt $" {}
+ -re "Make breakpoint pending.*y or \\\[n\\\]. $" {
+ send_gdb "n\n"
+ exp_continue
+ }
-re "$gdb_prompt $" { fail "setting breakpoint at $function" ; return 0 }
timeout { fail "setting breakpoint at $function (timeout)" ; return 0 }
}
@@ -360,6 +370,57 @@ proc gdb_continue_to_breakpoint {name} {
}
+# gdb_internal_error_resync:
+#
+# Answer the questions GDB asks after it reports an internal error
+# until we get back to a GDB prompt. Decline to quit the debugging
+# session, and decline to create a core file. Return non-zero if the
+# resync succeeds.
+#
+# This procedure just answers whatever questions come up until it sees
+# a GDB prompt; it doesn't require you to have matched the input up to
+# any specific point. However, it only answers questions it sees in
+# the output itself, so if you've matched a question, you had better
+# answer it yourself before calling this.
+#
+# You can use this function thus:
+#
+# gdb_expect {
+# ...
+# -re ".*A problem internal to GDB has been detected" {
+# gdb_internal_error_resync
+# }
+# ...
+# }
+#
+proc gdb_internal_error_resync {} {
+ global gdb_prompt
+
+ set count 0
+ while {$count < 10} {
+ gdb_expect {
+ -re "Quit this debugging session\\? \\(y or n\\) $" {
+ send_gdb "n\n"
+ incr count
+ }
+ -re "Create a core file of GDB\\? \\(y or n\\) $" {
+ send_gdb "n\n"
+ incr count
+ }
+ -re "$gdb_prompt $" {
+ # We're resynchronized.
+ return 1
+ }
+ timeout {
+ perror "Could not resync from internal error (timeout)"
+ return 0
+ }
+ }
+ }
+ perror "Could not resync from internal error (resync count exceeded)"
+ return 0
+}
+
# gdb_test_multiple COMMAND MESSAGE EXPECT_ARGUMENTS
# Send a command to gdb; test the result.
@@ -379,11 +440,26 @@ proc gdb_continue_to_breakpoint {name} {
# 0 if only user-supplied patterns matched
# -1 if there was an internal error.
#
+# You can use this function thus:
+#
+# gdb_test_multiple "print foo" "test foo" {
+# -re "expected output 1" {
+# pass "print foo"
+# }
+# -re "expected output 2" {
+# fail "print foo"
+# }
+# }
+#
+# The standard patterns, such as "Program exited..." and "A problem
+# ...", all being implicitly appended to that list.
+#
proc gdb_test_multiple { command message user_code } {
global verbose
global gdb_prompt
global GDB
upvar timeout timeout
+ upvar expect_out expect_out
if { $message == "" } {
set message $command
@@ -511,6 +587,10 @@ proc gdb_test_multiple { command message user_code } {
}
set code {
+ -re ".*A problem internal to GDB has been detected" {
+ fail "$message (GDB internal error)"
+ gdb_internal_error_resync
+ }
-re "\\*\\*\\* DOSEXIT code.*" {
if { $message != "" } {
fail "$message";
@@ -1025,164 +1105,122 @@ proc skip_hp_tests {} {
return $skip_hp
}
+set compiler_info "unknown"
+set gcc_compiled 0
+set hp_cc_compiler 0
+set hp_aCC_compiler 0
+set signed_keyword_not_used 0
+
+# Figure out what compiler I am using.
+#
+# BINFILE is a "compiler information" output file. This implementation
+# does not use BINFILE.
+#
+# ARGS can be empty or "C++". If empty, "C" is assumed.
+#
+# There are several ways to do this, with various problems.
+#
+# [ gdb_compile -E $ifile -o $binfile.ci ]
+# source $binfile.ci
+#
+# Single Unix Spec v3 says that "-E -o ..." together are not
+# specified. And in fact, the native compiler on hp-ux 11 (among
+# others) does not work with "-E -o ...". Most targets used to do
+# this, and it mostly worked, because it works with gcc.
+#
+# [ catch "exec $compiler -E $ifile > $binfile.ci" exec_output ]
+# source $binfile.ci
+#
+# This avoids the problem with -E and -o together. This almost works
+# if the build machine is the same as the host machine, which is
+# usually true of the targets which are not gcc. But this code does
+# not figure which compiler to call, and it always ends up using the C
+# compiler. Not good for setting hp_aCC_compiler. Targets
+# hppa*-*-hpux* and mips*-*-irix* used to do this.
+#
+# [ gdb_compile -E $ifile > $binfile.ci ]
+# source $binfile.ci
+#
+# dejagnu target_compile says that it supports output redirection,
+# but the code is completely different from the normal path and I
+# don't want to sweep the mines from that path. So I didn't even try
+# this.
+#
+# set cppout [ gdb_compile $ifile "" preprocess $args quiet ]
+# eval $cppout
+#
+# I actually do this for all targets now. gdb_compile runs the right
+# compiler, and TCL captures the output, and I eval the output.
+#
+# Unfortunately, expect logs the output of the command as it goes by,
+# and dejagnu helpfully prints a second copy of it right afterwards.
+# So I turn off expect logging for a moment.
+#
+# [ gdb_compile $ifile $ciexe_file executable $args ]
+# [ remote_exec $ciexe_file ]
+# [ source $ci_file.out ]
+#
+# I could give up on -E and just do this.
+# I didn't get desperate enough to try this.
+#
+# -- chastain 2004-01-06
+
proc get_compiler_info {binfile args} {
- # Create and source the file that provides information about the compiler
- # used to compile the test case.
- # Compiler_type can be null or c++. If null we assume c.
+ # For compiler.c and compiler.cc
global srcdir
- global subdir
- # These two come from compiler.c.
- global signed_keyword_not_used
+
+ # I am going to play with the log to keep noise out.
+ global outdir
+ global tool
+
+ # These come from compiler.c or compiler.cc
+ global compiler_info
global gcc_compiled
+ global hp_cc_compiler
+ global hp_aCC_compiler
+ global signed_keyword_not_used
- if {![istarget "hppa*-*-hpux*"] && ![istarget "mips*-*-irix*"]} {
- if { [llength $args] > 0 } {
- if {$args == "c++"} {
- if { [gdb_compile "${srcdir}/lib/compiler.cc" "${binfile}.ci" preprocess {}] != "" } {
- perror "Couldn't make ${binfile}.ci file"
- return 1;
- }
- }
- } else {
- if { [gdb_compile "${srcdir}/lib/compiler.c" "${binfile}.ci" preprocess {}] != "" } {
- perror "Couldn't make ${binfile}.ci file"
- return 1;
- }
- }
- } else {
- if { [llength $args] > 0 } {
- if {$args == "c++"} {
- if { [eval gdb_preprocess \
- [list "${srcdir}/lib/compiler.cc" "${binfile}.ci"] \
- $args] != "" } {
- perror "Couldn't make ${binfile}.ci file"
- return 1;
- }
- }
- } elseif { $args != "f77" } {
- if { [eval gdb_preprocess \
- [list "${srcdir}/lib/compiler.c" "${binfile}.ci"] \
- $args] != "" } {
- perror "Couldn't make ${binfile}.ci file"
- return 1;
- }
- }
+ # Choose which file to preprocess.
+ set ifile "${srcdir}/lib/compiler.c"
+ if { [llength $args] > 0 && [lindex $args 0] == "c++" } {
+ set ifile "${srcdir}/lib/compiler.cc"
}
-
- uplevel \#0 { set gcc_compiled 0 }
- if { [llength $args] == 0 || $args != "f77" } {
- source ${binfile}.ci
+ # Run $ifile through the right preprocessor.
+ # Toggle gdb.log to keep the compiler output out of the log.
+ log_file
+ set cppout [ gdb_compile "${ifile}" "" preprocess [list "$args" quiet] ]
+ log_file -a "$outdir/$tool.log"
+
+ # Source the output.
+ foreach cppline [ split "$cppout" "\n" ] {
+ if { ! [ regexp "^#" "$cppline" ] } {
+ if { ! [ regexp "^\[\n\r\t \]*$" "$cppline" ] } {
+ verbose "get_compiler_info: $cppline" 2
+ eval "$cppline"
+ }
+ }
}
+ verbose -log "get_compiler_info: $compiler_info"
# Most compilers will evaluate comparisons and other boolean
# operations to 0 or 1.
uplevel \#0 { set true 1 }
uplevel \#0 { set false 0 }
- uplevel \#0 { set hp_cc_compiler 0 }
- uplevel \#0 { set hp_aCC_compiler 0 }
- uplevel \#0 { set hp_f77_compiler 0 }
- uplevel \#0 { set hp_f90_compiler 0 }
- if { !$gcc_compiled && [istarget "hppa*-*-hpux*"] } {
- # Check for the HP compilers
- set compiler [lindex [split [get_compiler $args] " "] 0]
- catch "exec what $compiler" output
- if [regexp ".*HP aC\\+\\+.*" $output] {
- uplevel \#0 { set hp_aCC_compiler 1 }
- # Use of aCC results in boolean results being displayed as
- # "true" or "false"
- uplevel \#0 { set true true }
- uplevel \#0 { set false false }
- } elseif [regexp ".*HP C Compiler.*" $output] {
- uplevel \#0 { set hp_cc_compiler 1 }
- } elseif [regexp ".*HP-UX f77.*" $output] {
- uplevel \#0 { set hp_f77_compiler 1 }
- } elseif [regexp ".*HP-UX f90.*" $output] {
- uplevel \#0 { set hp_f90_compiler 1 }
- }
+ # Use of aCC results in boolean results being displayed as
+ # "true" or "false"
+ if { $hp_aCC_compiler } {
+ uplevel \#0 { set true true }
+ uplevel \#0 { set false false }
}
return 0;
}
-proc get_compiler {args} {
- global CC CC_FOR_TARGET CXX CXX_FOR_TARGET F77_FOR_TARGET
-
- if { [llength $args] == 0
- || ([llength $args] == 1 && [lindex $args 0] == "") } {
- set which_compiler "c"
- } else {
- if { $args =="c++" } {
- set which_compiler "c++"
- } elseif { $args =="f77" } {
- set which_compiler "f77"
- } else {
- perror "Unknown compiler type supplied to gdb_preprocess"
- return ""
- }
- }
-
- if [info exists CC_FOR_TARGET] {
- if {$which_compiler == "c"} {
- set compiler $CC_FOR_TARGET
- }
- }
-
- if [info exists CXX_FOR_TARGET] {
- if {$which_compiler == "c++"} {
- set compiler $CXX_FOR_TARGET
- }
- }
-
- if [info exists F77_FOR_TARGET] {
- if {$which_compiler == "f77"} {
- set compiler $F77_FOR_TARGET
- }
- }
-
- if { ![info exists compiler] } {
- if { $which_compiler == "c" } {
- if {[info exists CC]} {
- set compiler $CC
- }
- }
- if { $which_compiler == "c++" } {
- if {[info exists CXX]} {
- set compiler $CXX
- }
- }
- if {![info exists compiler]} {
- set compiler [board_info [target_info name] compiler];
- if { $compiler == "" } {
- perror "get_compiler: No compiler found"
- return ""
- }
- }
- }
-
- return $compiler
-}
-
-proc gdb_preprocess {source dest args} {
- set compiler [get_compiler "$args"]
- if { $compiler == "" } {
- return 1
- }
-
- set cmdline "$compiler -E $source > $dest"
-
- verbose "Invoking $compiler -E $source > $dest"
- verbose -log "Executing on local host: $cmdline" 2
- set status [catch "exec ${cmdline}" exec_output]
-
- set result [prune_warnings $exec_output]
- regsub "\[\r\n\]*$" "$result" "" result;
- regsub "^\[\r\n\]*" "$result" "" result;
- if { $result != "" } {
- clone_output "gdb compile failed, $result"
- }
- return $result;
+proc test_compiler_info { compiler } {
+ global compiler_info
+ return [string match $compiler $compiler_info]
}
set gdb_wrapper_initialized 0
@@ -1432,6 +1470,11 @@ proc gdb_expect_list {test sentinel list} {
fail "${test} (pattern ${index} + sentinel)"
set ok 0
}
+ -re ".*A problem internal to GDB has been detected" {
+ fail "${test} (GDB internal error)"
+ set ok 0
+ gdb_internal_error_resync
+ }
timeout {
fail "${test} (pattern ${index} + sentinel) (timeout)"
set ok 0
@@ -1450,6 +1493,11 @@ proc gdb_expect_list {test sentinel list} {
fail "${test} (pattern ${index})"
set ok 0
}
+ -re ".*A problem internal to GDB has been detected" {
+ fail "${test} (GDB internal error)"
+ set ok 0
+ gdb_internal_error_resync
+ }
timeout {
fail "${test} (pattern ${index}) (timeout)"
set ok 0
@@ -1840,3 +1888,87 @@ proc gdb_skip_bogus_test { msg } {
return 0;
}
+
+# Note: the procedure gdb_gnu_strip_debug will produce an executable called
+# ${binfile}.dbglnk, which is just like the executable ($binfile) but without
+# the debuginfo. Instead $binfile has a .gnu_debuglink section which contains
+# the name of a idebuginfo only file. This file will be stored in the
+# gdb.base/.debug subdirectory.
+
+# Functions for separate debug info testing
+
+# starting with an executable:
+# foo --> original executable
+
+# at the end of the process we have:
+# foo.stripped --> foo w/o debug info
+# .debug/foo.debug --> foo's debug info
+# foo --> like foo, but with a new .gnu_debuglink section pointing to foo.debug.
+
+# Return the name of the file in which we should stor EXEC's separated
+# debug info. EXEC contains the full path.
+proc separate_debug_filename { exec } {
+
+ # In a .debug subdirectory off the same directory where the testcase
+ # executable is going to be. Something like:
+ # <your-path>/gdb/testsuite/gdb.base/.debug/blah.debug.
+ # This is the default location where gdb expects to findi
+ # the debug info file.
+
+ set exec_dir [file dirname $exec]
+ set exec_file [file tail $exec]
+ set debug_dir [file join $exec_dir ".debug"]
+ set debug_file [file join $debug_dir "${exec_file}.debug"]
+
+ return $debug_file
+}
+
+
+proc gdb_gnu_strip_debug { dest } {
+
+ set debug_file [separate_debug_filename $dest]
+ set strip_to_file_program strip
+ set objcopy_program objcopy
+
+ # Make sure the directory that will hold the separated debug
+ # info actually exists.
+ set debug_dir [file dirname $debug_file]
+ if {! [file isdirectory $debug_dir]} {
+ file mkdir $debug_dir
+ }
+
+ set debug_link [file tail $debug_file]
+ set stripped_file "${dest}.stripped"
+
+ # Get rid of the debug info, and store result in stripped_file
+ # something like gdb/testsuite/gdb.base/blah.stripped.
+ set result [catch "exec $strip_to_file_program --strip-debug ${dest} -o ${stripped_file}" output]
+ verbose "result is $result"
+ verbose "output is $output"
+ if {$result == 1} {
+ return 1
+ }
+
+ # Get rid of everything but the debug info, and store result in debug_file
+ # This will be in the .debug subdirectory, see above.
+ set result [catch "exec $strip_to_file_program --only-keep-debug ${dest} -o ${debug_file}" output]
+ verbose "result is $result"
+ verbose "output is $output"
+ if {$result == 1} {
+ return 1
+ }
+
+ # Link the two previous output files together, adding the .gnu_debuglink
+ # section to the stripped_file, containing a pointer to the debug_file,
+ # save the new file in dest.
+ # This will be the regular executable filename, in the usual location.
+ set result [catch "exec $objcopy_program --add-gnu-debuglink=${debug_file} ${stripped_file} ${dest}" output]
+ verbose "result is $result"
+ verbose "output is $output"
+ if {$result == 1} {
+ return 1
+ }
+
+ return 0
+}
+
diff --git a/gdb/testsuite/lib/java.exp b/gdb/testsuite/lib/java.exp
index bcfd27c9ce0..5c1432fcd37 100644
--- a/gdb/testsuite/lib/java.exp
+++ b/gdb/testsuite/lib/java.exp
@@ -33,6 +33,7 @@ proc java_init { args } {
set GCJ_UNDER_TEST $env(GCJ)
} else {
global tool_root_dir
+ global target_alias
if ![is_remote host] {
set file [lookfor_file $tool_root_dir gcj];
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 4239a3761f3..29a4f76d93e 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -281,35 +281,94 @@ proc mi_gdb_reinitialize_dir { subdir } {
}
}
+# Send GDB the "target" command.
+# FIXME: Some of these patterns are not appropriate for MI. Based on
+# config/monitor.exp:gdb_target_command.
+proc mi_gdb_target_cmd { targetname serialport } {
+ global mi_gdb_prompt
+
+ for {set i 1} {$i <= 3} {incr i} {
+ send_gdb "47-target-select $targetname $serialport\n"
+ gdb_expect 60 {
+ -re "47\\^connected.*$mi_gdb_prompt$" {
+ verbose "Set target to $targetname";
+ return 0;
+ }
+ -re "Couldn't establish connection to remote.*$mi_gdb_prompt$" {
+ verbose "Connection failed";
+ }
+ -re "Remote MIPS debugging.*$mi_gdb_prompt$" {
+ verbose "Set target to $targetname";
+ return 0;
+ }
+ -re "Remote debugging using .*$serialport.*$mi_gdb_prompt$" {
+ verbose "Set target to $targetname";
+ return 0;
+ }
+ -re "Remote target $targetname connected to.*$mi_gdb_prompt$" {
+ verbose "Set target to $targetname";
+ return 0;
+ }
+ -re "Connected to.*$mi_gdb_prompt$" {
+ verbose "Set target to $targetname";
+ return 0;
+ }
+ -re "Ending remote.*$mi_gdb_prompt$" { }
+ -re "Connection refused.*$mi_gdb_prompt$" {
+ verbose "Connection refused by remote target. Pausing, and trying again."
+ sleep 5
+ continue
+ }
+ -re "Timeout reading from remote system.*$mi_gdb_prompt$" {
+ verbose "Got timeout error from gdb.";
+ }
+ timeout {
+ send_gdb "";
+ break
+ }
+ }
+ }
+ return 1
+}
+
#
-# load a file into the debugger.
+# load a file into the debugger (file command only).
# return a -1 if anything goes wrong.
#
-proc mi_gdb_load { arg } {
+proc mi_gdb_file_cmd { arg } {
global verbose
global loadpath
global loadfile
global GDB
global mi_gdb_prompt
global last_mi_gdb_file
+ global last_mi_remote_file
upvar timeout timeout
if { $arg == "" } {
set arg $last_mi_gdb_file;
+ } else {
+ set last_mi_gdb_file $arg
+ if { [ info exists last_mi_remote_file ] } {
+ unset last_mi_remote_file
+ }
}
- set last_mi_gdb_file $arg;
-
- # ``gdb_unload''
+ if [is_remote host] {
+ set arg [remote_download host $arg];
+ if { $arg == "" } {
+ error "download failed"
+ return -1;
+ }
+ }
- # ``gdb_file_cmd''
# FIXME: Several of these patterns are only acceptable for console
# output. Queries are an error for mi.
send_gdb "105-file-exec-and-symbols $arg\n"
gdb_expect 120 {
-re "Reading symbols from.*done.*$mi_gdb_prompt$" {
verbose "\t\tLoaded $arg into the $GDB"
- # All OK
+ return 0
}
-re "has no symbol-table.*$mi_gdb_prompt$" {
perror "$arg wasn't compiled with \"-g\""
@@ -338,14 +397,15 @@ proc mi_gdb_load { arg } {
return -1
}
-re "105-file-exec-and-symbols .*\r\n105\\\^done\r\n$mi_gdb_prompt$" {
- # We are just giving the prompt back for now
- # All OK
- }
+ # We (MI) are just giving the prompt back for now, instead of giving
+ # some acknowledgement.
+ return 0
+ }
timeout {
perror "couldn't load $arg into $GDB (timed out)."
return -1
}
- eof {
+ eof {
# This is an attempt to detect a core dump, but seems not to
# work. Perhaps we need to match .* followed by eof, in which
# gdb_expect does not seem to have a way to do that.
@@ -353,9 +413,46 @@ proc mi_gdb_load { arg } {
return -1
}
}
-
+}
+
+#
+# load a file into the debugger.
+# return a -1 if anything goes wrong.
+#
+proc mi_gdb_load { arg } {
+ global verbose
+ global loadpath
+ global loadfile
+ global GDB
+ global mi_gdb_prompt
+ upvar timeout timeout
+
+ # ``gdb_unload''
+ if { $arg != "" } {
+ mi_gdb_file_cmd $arg
+ }
+
# ``load''
- if { [info procs send_target_sid] != "" } {
+ if { [info procs gdbserver_gdb_load] != "" } {
+ global last_mi_gdb_file
+ global last_mi_remote_file
+
+ if { ! [info exists last_mi_remote_file] } {
+ if [is_remote target] {
+ set last_mi_remote_file [remote_download target $arg]
+ } else {
+ set last_mi_remote_file $last_mi_gdb_file
+ }
+ }
+
+ set res [gdbserver_gdb_load $last_mi_remote_file]
+ set protocol [lindex $res 0]
+ set gdbport [lindex $res 1]
+
+ if { [mi_gdb_target_cmd $protocol $gdbport] != 0 } {
+ return -1
+ }
+ } elseif { [info procs send_target_sid] != "" } {
# For SID, things get complex
send_target_sid
gdb_expect 60 {